From: Sean Whitton Date: Tue, 27 May 2025 10:40:04 +0000 (+0100) Subject: glibc (2.31-13+deb11u13) bullseye-security; urgency=high X-Git-Tag: archive/raspbian/2.31-13+rpi1+deb11u13^2~166 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=1c7f86bb726ec9cd362134dca5e3a658e3d7e670;p=glibc.git glibc (2.31-13+deb11u13) bullseye-security; urgency=high * Non-maintainer upload by the LTS Security Team. * debian/patches/local-CVE-2025-4802-{1,2,3,4}.diff: Fix untrusted LD_LIBRARY_PATH env var vulnerability (CVE-2025-4802). [dgit import unpatched glibc 2.31-13+deb11u13] --- 1c7f86bb726ec9cd362134dca5e3a658e3d7e670 diff --cc debian/changelog index 000000000,000000000..099644194 new file mode 100644 --- /dev/null +++ b/debian/changelog @@@ -1,0 -1,0 +1,17229 @@@ ++glibc (2.31-13+deb11u13) bullseye-security; urgency=high ++ ++ * Non-maintainer upload by the LTS Security Team. ++ * debian/patches/local-CVE-2025-4802-{1,2,3,4}.diff: ++ Fix untrusted LD_LIBRARY_PATH env var vulnerability (CVE-2025-4802). ++ ++ -- Sean Whitton Tue, 27 May 2025 11:40:04 +0100 ++ ++glibc (2.31-13+deb11u12) bullseye-security; urgency=high ++ ++ * Non-maintainer upload by the LTS Security Team. ++ * debian/patches/local-CVE-2025-0395-{1,2}.diff: ++ Fix buffer overflow in assert() function. ++ ++ -- Sean Whitton Wed, 30 Apr 2025 09:01:35 +0800 ++ ++glibc (2.31-13+deb11u11) bullseye; urgency=medium ++ ++ * debian/patches/git-updates.diff: update from upstream stable branch: ++ - debian/patches/any/local-CVE-2024-2961-iso-2022-cn-ext.patch: upstreamed. ++ - debian/patches/any/local-CVE-2024-33599-nscd.patch: upstreamed. ++ - debian/patches/any/local-CVE-2024-33600-nscd.patch: upstreamed. ++ - debian/patches/any/local-CVE-2024-33601-33602-nscd.diff: upstreamed. ++ - Fixes ffsll() performance issue depending on code alignment. ++ - Performance improvements for memcpy() on arm64. ++ - Fixes y2038 regression in nscd following CVE-2024-33601 and ++ CVE-2024-33602 fix. ++ - Fix compatibility with make 4.4. ++ - Fixes build with --enable-hardcoded-path-in-tests with newer linkers. ++ ++ -- Aurelien Jarno Thu, 15 Aug 2024 11:21:36 +0200 ++ ++glibc (2.31-13+deb11u10) bullseye-security; urgency=medium ++ ++ * debian/patches/local-CVE-2024-33599-nscd.patch: Fix a stack-based buffer ++ overflow in nscd netgroup cache (CVE-2024-33599). ++ * debian/patches/local-CVE-2024-33600-nscd.patch: Fix a null pointer ++ dereferences in nscd after failed netgroup cache insertion ++ (CVE-2024-33600). ++ * debian/patches/any/local-CVE-2024-33601-33602-nscd.patch: Fix a DoS in nscd ++ in case of memory allocation failure (CVE-2024-33601) and a memory ++ corruption in nscd when the underlying NSS callback function does not use ++ the buffer space to store all strings (CVE-2024-33602). ++ ++ -- Aurelien Jarno Tue, 30 Apr 2024 23:57:11 +0200 ++ ++glibc (2.31-13+deb11u9) bullseye-security; urgency=medium ++ ++ * debian/patches/any/local-CVE-2024-2961-iso-2022-cn-ext.patch: Fix ++ out-of-bound writes when writing escape sequence in iconv ISO-2022-CN-EXT ++ module (CVE-2024-2961). Closes: #1069191. ++ ++ -- Aurelien Jarno Fri, 19 Apr 2024 22:40:26 +0200 ++ ++glibc (2.31-13+deb11u8) bullseye; urgency=medium ++ ++ * debian/patches/any/local-qsort-memory-corruption.patch: Fix a memory ++ corruption in qsort() when using nontransitive comparison functions. ++ ++ -- Aurelien Jarno Sun, 28 Jan 2024 23:58:14 +0100 ++ ++glibc (2.31-13+deb11u7) bullseye-security; urgency=medium ++ ++ * debian/patches/any/local-CVE-2023-4911.patch: Fix a buffer overflow in the ++ dynamic loader's processing of the GLIBC_TUNABLES environment variable ++ (CVE-2023-4911). ++ ++ -- Aurelien Jarno Mon, 02 Oct 2023 22:22:57 +0200 ++ ++glibc (2.31-13+deb11u6) bullseye; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * debian/patches/git-updates.diff: update from upstream stable branch: ++ - Drop debian/patches/amd64/local-require-bmi-in-avx2-ifunc.diff ++ (obsolete). ++ - Fix memory leak in printf-family functions with long multibyte strings. ++ - Fix a crash in printf-family due to width/precision-dependent ++ allocations. ++ - Fix a segfault in printf handling thousands separator. ++ - Fix an overflow in the AVX2 implementation of wcsnlen when crossing ++ pages. ++ ++ -- Aurelien Jarno Wed, 19 Apr 2023 23:17:51 +0200 ++ ++glibc (2.31-13+deb11u5) bullseye; urgency=medium ++ ++ * debian/patches/local-require-bmi-in-avx2-ifunc.diff: new patch extracted ++ from an upstream commit, to change the AVX2 ifunc selector to require the ++ BMI2 feature. It happened that the wmemchr and wcslen changes backported ++ in 2.31-13+deb11u4 relied on that commit which got forgotten. ++ Closes: #1019855. ++ ++ -- Aurelien Jarno Fri, 14 Oct 2022 21:35:00 +0200 ++ ++glibc (2.31-13+deb11u4) bullseye; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * debian/debhelper.in/libc-dev.NEWS: New file to explain how to update ++ programs to use the TI-RPC library instead of the Sun RPC one. Closes: ++ #1014735. ++ * debian/patches/git-updates.diff: update from upstream stable branch: ++ - Fix an off-by-one buffer overflow/underflow in getcwd() (CVE-2021-3999). ++ - Fix an overflow bug in the SSE2 and AVX2 implementations of wmemchr. ++ - Fix an overflow bug in the SSE4.1 and AVX2 implementations of wcslen and ++ wcsncat. ++ - Fix an overflow bug in the AVX2 and EVEX implementation of wcsncmp. ++ - Add a few EVEX optimized string functions to fix a performance issue (up ++ to 40%) with Skylake-X processors. ++ - Make grantpt usable after multi-threaded fork. Closes: #1015740. ++ - debian/patches/hurd-i386/git-posix_openpt.diff: rebase. ++ * debian/rules.d/build.mk: pass --with-default-link=no to configure to ++ ensure that libio vtable protection is enabled. ++ ++ -- Aurelien Jarno Fri, 26 Aug 2022 23:32:46 +0200 ++ ++glibc (2.31-13+deb11u3) bullseye; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * debian/patches/git-updates.diff: update from upstream stable branch: ++ - Fix bad conversion from ISO-2022-JP-3 with iconv (CVE-2021-43396). ++ Closes: #998622. ++ - Remove PIE check on amd64 to fix FTBFS with binutils 2.37. ++ - Fix a buffer overflow in sunrpc svcunix_create (CVE-2022-23218). ++ - Fix a buffer overflow in sunrpc clnt_create (CVE-2022-23219). ++ * debian/debhelper.in/libc-bin.postinst: stop replacing older versions from ++ /etc/nsswitch.conf. Closes: #998008. ++ * debian/debhelper.in/libc.preinst: simplify the version comparison by only ++ comparing the two first parts, now that kernel 2.X are not supported ++ anymore. Closes: #1004861. ++ * debian/debhelper.in/libc.preinst: drop the check for kernel release > 255 ++ now that glibc and preinstall script are fixed. Closes: #987266. ++ * debian/patches/local-CVE-2021-33574-mq_notify-use-after-free.diff: ++ fix a possible use-after-free in mq_notify (CVE-2021-33574). Closes: ++ #989147. ++ ++ -- Aurelien Jarno Thu, 17 Mar 2022 22:37:00 +0100 ++ ++glibc (2.31-13+deb11u2) bullseye; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * debian/debhelper.in/libc.preinst: do not try to detect if debconf is ++ available when the debconf frontend has already been loaded. ++ ++ -- Aurelien Jarno Sat, 02 Oct 2021 14:47:40 +0200 ++ ++glibc (2.31-13+deb11u1) bullseye; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * debian/script.in/nsscheck.sh: restart openssh-server even if it has been ++ deconfigured during the upgrade. Closes: #990069. ++ * debian/debhelper.in/libc.preinst: fix text fallback when debconf is ++ unusable, the current debconf configuration should be queried without ++ first sourcing the confmodule to avoid losing control of the tty. Big ++ thanks to Colin Watson for the help diagnosing the issue and for providing ++ an easy reproducer. Closes: #994042. ++ ++ -- Aurelien Jarno Thu, 30 Sep 2021 22:47:49 +0200 ++ ++glibc (2.31-13) unstable; urgency=medium ++ ++ [ Colin Watson ] ++ * debian/debhelper.in/libc.postinst, script.in/nsscheck.sh: Look for ++ openssh-server package rather than ssh. Closes: #990069 ++ ++ [ Aurelien Jarno ] ++ * debian/patches/git-updates.diff: update from upstream stable branch: ++ - Fix an arbitrary read in wordexp() (CVE-2021-35942). Closes: ++ #990542. ++ ++ -- Aurelien Jarno Tue, 06 Jul 2021 21:16:59 +0200 ++ ++glibc (2.31-12) unstable; urgency=medium ++ ++ * debian/po/de.po: fix encoding declaration. Closes: #986450. ++ * debian/patches/git-updates.diff: update from upstream stable branch: ++ - On s390x, check for vector support in memmove ifunc-selector in ++ addition to Miscellaneous-Instruction-Extensions. ++ * debian/patches/any/local-rtlddir-cross.diff: drop patch, letting upstream ++ makefiles to install the dynamic linker symlink directly in the right ++ location. This fixes the temporary installation done by upstream makefiles ++ to run some tests in a container. Closes: #973278, #985617. ++ * debian/rules.d/build.mk: do not create the dynamic linker manually. ++ * debian/sysdeps/*.mk: do not create the dynamic linker manually for ++ bi/tri-arch packages. ++ * debian/rules.d/build.mk: create the soname symlink for ld-2.xx.so, to ++ avoid its creation later by ldconfig. ++ * debian/debhelper.in/libc.install, debhelper.in/libc-alt.install, ++ debhelper.in/libc-udeb.install, debhelper.in/libc-udeb.install.hurd-i386: ++ adjust given that the dynamic linker symlink is now already at the correct ++ location. ++ * debian/patches/git-updates.diff: update from upstream stable branch: ++ - Fix GLIBC_TUNABLES parsing for AT_SECURE binaries. ++ * debian/rules.d/build.mk: escape EOL so that $configure_build is correctly ++ passed to the configure script. ++ ++ -- Aurelien Jarno Sat, 01 May 2021 22:56:06 +0200 ++ ++glibc (2.31-11) unstable; urgency=medium ++ ++ * debian/debhelper.in/libc.preinst: handle the case where debconf ++ configuration has never been done. Closes: #986180. ++ ++ -- Aurelien Jarno Wed, 31 Mar 2021 22:09:32 +0200 ++ ++glibc (2.31-10) unstable; urgency=medium ++ ++ [ Samuel Thibault ] ++ * debian/patches/hurd-i386/git-tiocflush.diff: Cope with ++ BSD 4.1-ish ioctl(..., TIOCFLUSH, NULL). ++ * debian/debhelper.in/libc-udeb.install.hurd-i386: Add missing ++ libmachuser/libhurduser. ++ * debian/testsuite-xfail-debian.mk: Update tests. ++ ++ [ Aurelien Jarno ] ++ * debian/patches/git-updates.diff: update from upstream stable branch: ++ - Fix a possible assertion failure in iconv when converting ++ from ISO-2022-JP-3 to UTF-8 (CVE-2021-3326). Closes: #981198. ++ - Fix a possible double-free in nscd when processing a request for netgroup ++ lookup (CVE-2021-27645). Closes: #983479. ++ * debian/debhelper.in/libc.preinst: fallback to text mode in case 1) debconf ++ is about to use the dialog frontend with whiptail or frontend and 2) the ++ corresponding executable is unusable. Closes: #984533. ++ * debian/rules.d/debhelper.mk: correctly strip libpthread.so for bi/triarch ++ builds. Closes: #983457. ++ ++ -- Aurelien Jarno Sun, 21 Mar 2021 00:38:37 +0100 ++ ++glibc (2.31-9) unstable; urgency=medium ++ ++ [ Samuel Thibault ] ++ * debian/testsuite-xfail-debian.mk: Update tests. ++ * debian/patches/hurd-i386/git-mmap_addr.diff: Fix long-running ghc processes. ++ ++ [ Aurelien Jarno ] ++ * Upload to unstable. ++ * debian/patches/git-updates.diff: update from upstream stable branch: ++ - Fix a buffer over-read when processing invalid multi-byte input ++ sequences in the EUC-KR encoding (CVE-2019-25013). Closes: #979273. ++ * debian/control.in/libc: add a Breaks: against libgegl-0.4-0 (<< 0.4.18). ++ Closes: #968349. ++ ++ -- Aurelien Jarno Tue, 05 Jan 2021 06:47:42 +0100 ++ ++glibc (2.31-8) experimental; urgency=medium ++ ++ [ Stephen Kitt ] ++ * Build memusage and memusagestat in the libc pass and ship them into ++ libc-devtools. Move mtrace, sotruss and sprof into that package. ++ Closes: #91815. ++ ++ -- Aurelien Jarno Sun, 03 Jan 2021 18:55:16 +0100 ++ ++glibc (2.31-7) unstable; urgency=medium ++ ++ [ Samuel Thibault ] ++ * debian/testsuite-xfail-debian.mk: Update with 2.33 tests. ++ * debian/patches/hurd-i386/local-clock_gettime_MONOTONIC.diff: Also accept ++ CLOCK_MONOTONIC_RAW, CLOCK_REALTIME_COARSE, CLOCK_MONOTONIC_COARSE. ++ * debian/patches/hurd-i386/tg-hurdsig-SA_SIGINFO.diff: Rename to ++ git-hurdsig-SA_SIGINFO.diff. ++ * debian/patches/hurd-i386/tg-sigstate_thread_reference.diff: Rename to ++ git-sigstate_thread_reference.diff. ++ * debian/patches/hurd-i386/git-siginfo_uesp.diff: Fix ss_sp field in ++ siginfo. ++ * debian/patches/hurd-i386/git-mmap-EINVAL.diff: Fix mmap EINVAL return value. ++ * debian/patches/hurd-i386/git-waitid.diff: Support ++ WEXITED/WCONTINUED/WSTOPPED/WNOWAIT. ++ * debian/patches/hurd-i386/git-hurd-version.diff: Accept including ++ hurd/version.h. ++ * debian/patches/kfreebsd/submitted-waitid.diff: Refresh. ++ * debian/control: Bump hurd-dev build-dep to get proc_waitid RPC. ++ * debian/libc0.3.symbols.hurd-i386: Add proc_waitid RPC. ++ * debian/debhelper.in/libc-dev.install.hurd-i386: Add missing ++ libpthread_syms.a. ++ ++ [ Aurelien Jarno ] ++ * debian/patches/git-updates.diff: update from upstream stable branch: ++ - Fix assertion failure in iconv when converting invalid UCS4 ++ (CVE-2020-29562). Closes: #976391. ++ * debian/sysdeps/arm64.mk: enable static PIE support on arm64. Closes: ++ #973430. ++ * debian/patches/localedata/git-unicode-13-support.diff: backport Unicode 13 ++ support from upstream. Closes: #977691. ++ * debian/local/manpages/po/pt_BR.po: recode to UTF-8 to make lintian happy. ++ * debian/debhelper.in/*.lintian-overrides: update for recent lintian ++ versions. ++ * debian/patches/any/git-ld.so-cache-endianness-markup.diff: backport ld.so ++ cache endianness support from upstream. Closes: #731082. ++ ++ -- Aurelien Jarno Sun, 03 Jan 2021 17:01:18 +0100 ++ ++glibc (2.31-6) unstable; urgency=medium ++ ++ [ Samuel Thibault ] ++ * debian/testsuite-xfail-debian.mk: Update with 2.33 tests. ++ * debian/patches/hurd-i386/git-pthread_link_tests.diff: Fix linking static ++ tests with the build libpthread.a. ++ * debian/patches/hurd-i386/git-libpthread_syms.diff: Fix linking static tests ++ by factorizing the symbols list. ++ * debian/patches/hurd-i386/git-libpthread-nodelete.diff: initialize ++ libpthread.so first and prevent from unloading. ++ * debian/patches/hurd-i386/git-cthreads.diff: Fix build without cthreads.h. ++ * debian/patches/hurd-i386/git-cthreads-symbols.diff: Fix libpthread ++ detection from libc. ++ * debian/patches/hurd-i386/git-libpthread_plt.diff: Fix spurious PLT. ++ * debian/patches/hurd-i386/git-lll-initializer.diff, ++ debian/patches/hurd-i386/sysvshm-lll.diff, ++ debian/patches/hurd-i386/git-lll-ptr.diff, ++ debian/patches/hurd-i386/git-ld-library-path-checks.diff, ++ debian/patches/hurd-i386/git-lll-wait-intr.diff, ++ debian/patches/hurd-i386/git-lll-private.diff, ++ debian/patches/hurd-i386/git-futex-internal.diff, ++ debian/patches/hurd-i386/git-libc-open.diff, ++ debian/patches/hurd-i386/git-pthread_get_cleanup_stack.diff, ++ debian/patches/hurd-i386/git-libpthread-testcancel.diff, ++ debian/patches/hurd-i386/git-SEM_VALUE_MAX.diff, ++ debian/patches/hurd-i386/git-sem-pshared.diff, ++ debian/patches/hurd-i386/git-sem-open-init.diff, ++ debian/patches/hurd-i386/git-sem-open.diff: Add sem_open support. ++ ++ [ Aurelien Jarno ] ++ * debian/debhelper.in/libc.NEWS: fix the name if the libnss-nis package, ++ thanks to Diederik de Haas for the hint. ++ ++ -- Samuel Thibault Wed, 16 Dec 2020 22:33:25 +0100 ++ ++glibc (2.31-5) unstable; urgency=medium ++ ++ [ Samuel Thibault ] ++ * debian/testsuite-xfail-debian.mk: Update with 2.33 tests. ++ * debian/patches/hurd-i386/git-clock-cputime.diff: New patch to support ++ clock_gettime(CPUTIME). ++ * debian/patches/hurd-i386/local-clock_gettime_MONOTONIC.diff: Refresh. ++ * debian/patches/hurd-i386/local-posix_cputime.diff: Remove. ++ * debian/patches/hurd-i386/git-raise.diff: Reject raising invalid signals. ++ * debian/patches/hurd-i386/git-sbrk-end.diff: Remove the tst-sbrk tests, ++ they fail on various architectures. Closes: #972510. ++ * debian/patches/hurd-i386/git-posix_openpt.diff: Note that patch is ++ committed upstream. ++ * debian/patches/hurd-i386/git-WAIT.diff: Fix printing fd in ps' WAIT ++ output. ++ ++ [ Aurelien Jarno ] ++ * debian/patches/git-updates.diff: update from upstream stable branch: ++ - Fix missing floating-point rounding and exception handling functions ++ missing on SH4. Closes: #975421. ++ - Fix an infinite loop in iconv with input containing redundant shift ++ sequences in the IBM1364, ++ IBM1371, IBM1388, IBM1390, or IBM1399 ++ character sets (CVE-2020-27618). Closes: #973914. ++ * debian/patches/localedata/locale-C.diff: replace the LC_CTYPE definition ++ by 'copy "i18n"'. Note that with this change the "blank", "cntrl", ++ "space" classes do not conform to POSIX anymore, however this matches the ++ Fedora behaviour. Closes: #973647. ++ * debian/control.in/libc: downgrade libnss-nis and libnss-nisplus ++ dependencies to recommends. Closes: #972770, #975052, #972552. ++ * debian/debhelper.in/libc.NEWS: add an entry about libnss-nis and ++ libnss-nisplus packages. ++ ++ -- Aurelien Jarno Tue, 01 Dec 2020 08:42:44 +0100 ++ ++glibc (2.31-4) unstable; urgency=medium ++ ++ [ Samuel Thibault ] ++ * debian/patches/hurd-i386/{unsubmitted-sbrk-_end.diff,tg-pie-sbrk.diff}: ++ Merge into... ++ * debian/patches/hurd-i386/git-sbrk-end.diff: ... committed patch. ++ * debian/patches/hurd-i386/unsubmitted-sched_sets.diff: Rename to... ++ * debian/patches/hurd-i386/git-sched_sets.diff: ... committed patch. ++ * debian/patches/hurd-i386/local-posix_cputime.diff: New patch to avoid ++ applications trying to use extended clock ids. ++ * debian/patches/hurd-i386/git-bsd4.3-ioctls.diff: New patch to avoid ++ defining elder macros. ++ ++ [ Aurelien Jarno ] ++ * debian/patches/git-updates.diff: update from upstream stable branch: ++ - Handle translation output codesets with suffixes. Closes: #968260. ++ * debian/control.in/libc: add a Breaks: against libgegl-0.4-0 (<< 0.4.18). ++ Closes: #968342. ++ * debian/control.in/libc: add a Breaks: against busybox (<< 1.30.1-6) due to ++ bug #966074. ++ * debian/debhelper.in/libc-dev{,-alt}.lintian-overrides: remove files as ++ lintian is now smarter. ++ * debian/po/it.po: Update Italian debconf translation, by Luca Monducci. ++ Closes: #969219. ++ * debian/po/pt_BR.po: Update Brazilian Portuguese debconf translation, by ++ Adriano Rafael Gomes. Closes: #970199. ++ * debian/po/de.po: recode to UTF-8. ++ * debian/rules.d/build.mk: stop passing --enable-obsolete-nsl. ++ * debian/debhelper.in/libc-dev{,-alt}.install: do not install libnsl.a. ++ * debian/debhelper.in/libc-dev.install.hurd-i386: ditto. ++ * debian/libc0.1.symbols.common, debian/libc0.3.symbols.hurd-i386, ++ debian/libc6.1.symbols.alpha, debian/libc6.symbols{common,hppa,sparc}: ++ remove libnss_nis.so.2 and libnss_nisplus.so.2 symbols. ++ * debian/rules.d/build.mk: do not ship and ++ as they are shipped by libnsl-dev. ++ * debian/control.in/libc, debian/rules.d/debhelper.mk: make libc6 to depend on ++ libnss-nis and libnss-nisplus, except for stage1 and stage2. ++ * debian/control.in/libc, debian/rules.d/debhelper.mk: make libc6-dev to ++ depend on libnsl-dev, except for stage1 and stage2. ++ ++ -- Aurelien Jarno Sat, 10 Oct 2020 21:54:24 +0200 ++ ++glibc (2.31-3) unstable; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * debian/control.in/libc: add a Breaks: against openarena (<< 0.8.8+dfsg-4~) ++ due to bug#966150. ++ * debian/control.in/libc: add a Breaks: against ioquake3 ++ (<< 1.36+u20200211.f2c61c1~dfsg-2~) as previous versions are not correctly ++ linked with libm. ++ * debian/patches/git-updates.diff: update from upstream stable branch: ++ - Fix an infinite loop in the iconv program (CVE-2016-10228). Closes: ++ #856503. ++ - debian/patches/any/submitted-selinux-deprecations.diff: upstreamed. ++ - debian/patches/x32/submitted-fix-nptl-setgroups-x32.diff: upstreamed. ++ * debian/rules.d/build.mk: install in the ++ multiarch path. Closes: #962457. ++ ++ [ Samuel Thibault ] ++ * debian/libc0.3.symbols.hurd-i386: Fix dependency of __errno_location and ++ __h_errno_location symbols in libpthread. ++ * patches/hurd-i386/unsubmitted-sbrk-_end.diff: Fix _end symbol appearance ++ by reworking sbrk. ++ * patches/hurd-i386/unsubmitted-sched_sets.diff: Add sched_set/getscheduler. ++ * patches/hurd-i386/git-pthread_atfork-hidden.diff: Hide pthread_atfork ++ symbols imported to applications, to avoid leaking them. ++ ++ -- Aurelien Jarno Tue, 04 Aug 2020 17:02:38 +0200 ++ ++glibc (2.31-2) unstable; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * debian/control.in/libc: add a Breaks: against macs (<< 2.2.7.1-3~) due to ++ bug #965073. ++ * debian/patches/git-updates.diff: update from upstream stable branch: ++ - Fix a signed comparison vulnerability in the ARMv7 memcpy and memmove ++ functions (CVE-2020-6096). Closes: #961452. ++ * debian/control.in/libc: do not limit the openssh-server breaks to 32-bit ++ architectures, clock_nanosleep has to be allowed in addition to ++ clock_gettime64. Closes: #965932. ++ * debian/patches/any/submitted-selinux-deprecations.diff: proposed patch to ++ ignore the selinux deprecations introduced in libselinux (>= 3.1), fixing ++ an FTBFS. Closes: #965941. ++ * debian/patches/x32/submitted-fix-nptl-setgroups-x32.patch: proposed patch ++ to fix the setgroups functions in threaded applications on x32 (without ++ the testsuite part). Closes: #965091. ++ ++ [ Samuel Thibault ] ++ * debian/patches/hurd-i386/local-tls-ie-align.diff: Fix TLS IE load with >= ++ 8 byte alignment. ++ * debian/testsuite-xfail-debian.mk: Update backtrace result. ++ * debian/patches/hurd-i386/git-fix-longjmp.diff: Fix longjmp from dl loader. ++ Notably fixes calling setuid programs from eatmydata. ++ * debian/control: Build-depend on gnumach-dev with userland driver RPC interface. ++ * debian/libc0.3.symbols.hurd-i386: Add userland driver RPC interface stubs. ++ * debian/patches/hurd-i386/local-clock_gettime_MONOTONIC.diff: Make ++ clock_nanosleep accept CLOCK_MONOTONIC as well. ++ ++ -- Aurelien Jarno Thu, 23 Jul 2020 00:26:24 +0200 ++ ++glibc (2.31-1) unstable; urgency=medium ++ ++ [ Samuel Thibault ] ++ * debian/control: Build-depend on gcc-10 version that defaults to i686 on ++ hurd-i386. ++ * debian/control: Build-depend on mig-for-host instead of mig. ++ * debian/sysdeps/hurd-i386.mk: Drop adding -march=i686. ++ * debian/hurd-i386/git-pselect.diff: Fix pselect atomicity. ++ * debian/hurd-i386/git-fexecve.diff: Fix fexecve. ++ * debian/hurd-i386/git-cond_destroy.diff: Fix cond_destroy synchronization ++ with woken threads. ++ * debian/hurd-i386/git-holes.diff: Fix detecting support for file holes. ++ * debian/hurd-i386/local-clock_gettime_MONOTONIC.diff: Also fix clock_getres ++ with CLOCK_MONOTONIC. ++ * debian/hurd-i386/git-longjmp-onstack.diff: Fix longjmp-ing from altstack. ++ * debian/hurd-i386/git-register-atfork2.diff: Fix register-atfork ordering. ++ * debian/hurd-i386/git-intr-msg-unwind.diff: Fix unwinding over interruptible ++ RPC. ++ * debian/hurd-i386/git-strtol-test.diff: Fix testing strtol errors. ++ * debian/testsuite-xfail-debian.mk: Update. ++ * debian/debhelper.in/libc-udeb.install.hurd-i386: Add missing ++ libmachuser/libhurduser. ++ * debian/rules.d/debhelper.mk: Add dh_link pass to libc-udeb binaryinst. ++ * debian/debhelper.in/libc-udeb.links.hurd-i386: Add missing ld.so link. ++ * debian/rules: Clean links file. ++ ++ [ Aurelien Jarno ] ++ * debian/patches/git-updates.diff: update from upstream stable branch. ++ * debian/patches/any/git-surplus-tls-accounting.diff: backport TLS surplus ++ accounting from upstream. Closes: #964141. ++ * debian/control.in/main: update breaks on cross-toolchain-base* as they ++ will need changes to build with glibc 2.31. ++ ++ -- Aurelien Jarno Mon, 13 Jul 2020 21:34:17 +0200 ++ ++glibc (2.31-0experimental2) experimental; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * Add an explicit dependency on $(stamp)build_libc for the build-indep ++ target. Currently the build is made during the binary-indep target ++ instead. ++ * debian/control.in/main: build-depends on gcc-10 (>= 10-20200431) on arm64 ++ to ensure that -moutline-atomics is enabled by default. Closes: #956418. ++ * debian/patches/git-updates.diff: update from upstream stable branch. ++ * debian/debhelper.in/libc.NEWS: add an entry explaining the new trust-ad ++ option in resolv.conf. ++ * debian/patches/riscv64/local-asin-acos-raise-invalid.diff: new patch to ++ workaround a GCC 10 bug on riscv64. ++ ++ [ Samuel Thibault ] ++ * debian/patches/hurd-i386/git-tst-udp.diff: New patch to fix ++ sunrpc/tst-udp-* failures. ++ * debian/sysdeps/hurd-i386.mk: Add -march=i686 to fix math issues until gcc ++ is fixed to switch to i686 as was actually expected already. ++ * debian/testsuite-xfail-debian.mk: Update hurd-i386 results. ++ ++ -- Aurelien Jarno Tue, 19 May 2020 00:19:13 +0200 ++ ++glibc (2.31-0experimental1) experimental; urgency=medium ++ ++ [ Samuel Thibault ] ++ * debian/testsuite-xfail-debian.mk: Update hurd-i386 results. ++ ++ [ Aurelien Jarno ] ++ * debian/patches/git-updates.diff: update from upstream stable branch: ++ - Add clone3 syscall to arm64 version of arch-syscall.h. ++ * debian/debhelper.in/libc-udeb.install, debian/rules.d/debhelper.mk: use ++ the multiarch path in the udeb package. ++ * debian/control.in/libc, debian/debhelper.in/libc-pic.install, ++ debian/rules, debian/rules.d/debhelper.mk, ++ debian/patches/any/local-libpic.diff: stop building the libc6-pic package. ++ * debian/control.in/main, debian/rules: build with GCC 10. ++ ++ -- Aurelien Jarno Tue, 12 May 2020 13:12:35 +0200 ++ ++glibc (2.31-0experimental0) experimental; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * New upstream release: ++ - Adds GNU hash support on MIPS (closes: #943538). ++ - debian/symbols.wildcard: add 2.31. ++ - debian/debhelper.in/libc-dev{,-alt}.install: drop libmvec_nonshared.a. ++ - debian/patches/localedata/locales/ku_TR: rebased. ++ - debian/patches/localedata/fo_FO-date_fmt.diff: rebased. ++ - debian/patches/localedata/locales-fr.diff: rebased. ++ - debian/patches/localedata/locale-zh_TW.diff: rebased. ++ - debian/patches/localedata/submitted-bz9725-locale-sv_SE.diff: ++ upstreamed. ++ - debian/patches/localedata/submitted-en_AU-date_fmt.diff: upstreamed. ++ - debian/patches/alpha/local-string-functions.diff: rebased. ++ - debian/patches/hurd-i386/git-ONSTACK.diff: upstreamed. ++ - debian/patches/hurd-i386/git-getrandom.diff: upstreamed. ++ - debian/patches/hurd-i386/git-altstack-RPC.diff: upstreamed. ++ - debian/patches/hurd-i386/local-enable-ldconfig.diff: rebased. ++ - debian/patches/hurd-i386/git-context_functions.diff: upstreamed. ++ - debian/patches/hurd-i386/tg-thread-cancel.diff: rebased. ++ - debian/patches/hurd-i386/git-sendmsg-SCM_RIGHTS.diff: upstreamed. ++ - debian/patches/hurd-i386/git-hurdsig-fixes.diff: upstreamed. ++ - debian/patches/hurd-i386/git-hurdsig-global-dispositions.diff: ++ upstreamed. ++ - debian/patches/hurd-i386/git-hurdsig-globaldisp-version.diff: upstreamed. ++ - debian/patches/hurd-i386/tg-hurdsig-SA_SIGINFO.diff: rebased. ++ - debian/patches/hurd-i386/git-hurdsig-fixes-2.diff: upstreamed. ++ - debian/patches/hurd-i386/git-hurdsig-boot-fix.diff: upstreamed. ++ - debian/patches/hurd-i386/git-single-select-timeout.diff: upstreamed. ++ - debian/patches/hurd-i386/git-setitimer.diff: upstreamed. ++ - debian/patches/hurd-i386/git-remap_getcwd.diff: upstreamed. ++ - debian/patches/hurd-i386/git-io_select_timeout.diff: upstreamed. ++ - debian/patches/hurd-i386/git-poll_errors_fixes.diff: upstreamed. ++ - debian/patches/hurd-i386/local-mach_print.diff: rebased. ++ - debian/patches/hurd-i386/local-exec_filename.diff: rebased. ++ - debian/patches/hurd-i386/git-libpthread_sigs.diff: upstreamed. ++ - debian/patches/hurd-i386/git-hurd_sigstate-PLT.diff: upstreamed. ++ - debian/patches/hurd-i386/git-rlock.diff: upstreamed. ++ - debian/patches/hurd-i386/git-errno_location.diff: upstreamed. ++ - debian/patches/powerpc/local-powerpc8xx-dcbz.diff: rebased. ++ - debian/patches/sh4/local-fpscr_values.diff: rebased. ++ - debian/patches/any/local-ldconfig.diff: upstreamed. ++ - debian/patches/any/submitted-bits-fcntl_h-at.diff: rebased. ++ - debian/patches/any/unsubmitted-dlopen-static-crash.diff: obsolete. ++ - debian/patches/any/local-test-install.diff: rebased. ++ * debian/control.in/libc: add a Breaks on openssh-server (<< 1:8.1p1-5) on ++ 32-bit architectures with seccomp support, to the allow clock_gettime64 ++ syscall. ++ ++ [ Samuel Thibault ] ++ * debian/patches/hurd-i386/local-clock_gettime_MONOTONIC.diff: Refresh. ++ * debian/patches/hurd-i386/submitted-net.diff: Refresh. ++ * debian/testsuite-xfail-debian.mk: Update hurd-i386 results. ++ * debian/debhelper.in/libc-dev.install.hurd-i386: Do not install ++ libpthread_nonshared, removed upstream. ++ * debian/patches/hurd-i386/local-atfork-link.diff: Remove, now useless. ++ * debian/patches/hurd-i386/tg-hurdsig-SA_SIGINFO.diff: Fix build. ++ ++ -- Aurelien Jarno Thu, 12 Mar 2020 07:10:01 +0100 ++ ++glibc (2.30-8) unstable; urgency=medium ++ ++ * sysdeps/hurd.mk: Move ld.so link creation to hurd-i386.mk since it is ++ 32bit-specific. ++ * sysdeps/hurd-i386.mk: Move i386-specific mach headers to multiarch ++ directory, so they get accessible from the "machine" symlink of the ++ gnumach-dev package. ++ * patches/hurd-i386/git-ss_init.diff: Add missing ss initialization. Fixes ++ Xorg startup error, and possibly a lot other bugs with threads. ++ ++ -- Samuel Thibault Mon, 11 May 2020 02:04:03 +0200 ++ ++glibc (2.30-7) unstable; urgency=medium ++ ++ * debian/debhelper.in/libc.postinst: re-add /etc/ld.so.nohwcapc code. ++ ++ -- Aurelien Jarno Tue, 05 May 2020 20:12:38 +0200 ++ ++glibc (2.30-6) unstable; urgency=medium ++ ++ * debian/sysdeps/s390x.mk: do not set libc_rtlddir, it is set to the ++ default. ++ * debian/rules.d/debhelper.mk: only create the dynamic linker in the udeb ++ if it doesn't already exist. ++ ++ -- Aurelien Jarno Tue, 05 May 2020 12:32:42 +0200 ++ ++glibc (2.30-5) unstable; urgency=medium ++ ++ [ Samuel Thibault ] ++ * debian/patches/hurd-i386/git-trunc-times.diff: New patch to fix updating ++ mtime/ctime on O_TRUNC. Closes: #955270. ++ * debian/control: Drop dependency on libihash-dev, not used any more by htl. ++ * debian/sysdeps/hurd.mk: Try to symlink mach/hurd headers from multiarch ++ directory when they are there. ++ ++ [ Aurelien Jarno ] ++ * debian/rules: Add -fdebug-prefix-map= to CFLAGS to improve ++ reproducibility. ++ * debian/control.in/libc: Make libcX-dev declare a Breaks against python3.7 ++ (<< 3.7.7-1+b1) and python3.8 (<< 3.8.2-1+b1) due to #955474. ++ * debian/rules.d/debhelper.mk: install the dynamic loader symlink in the ++ udeb package. ++ * debian/control: conflict against libgcc-X-dev versions that might need the ++ __glibc_has_include macro. ++ * debian/patches/any/local-revert-glibc_has_include.diff: drop patch, ++ obsolete. ++ * debian/control.in/libc: add a Provides: libc6-dbgsym to the libc6-dbg ++ package. Closes: #953654. ++ * debian/control.in/libc: qualify the libselinux-dev build-depends with ++ . ++ * debian/debhelper.in/libc.postinst: drop the code removing ++ /etc/ld.so.hwcappkgs, it's not needed anymore since Squeeze. ++ * debian/patches/git-updates.diff: update from upstream stable branch: ++ - Fixes data race in setting function descriptor during lazy binding on ++ hppa. Closes: #941174. ++ - debian/patches/any/local-tst-system-disable-shell-tests.diff: obsolete. ++ ++ [ Helmut Grohne ] ++ * Refactor generation of multilib include symlinks. (Closes: #958674). ++ * Initial, minimal support for DPKG_ROOT. (Closes: #910685). ++ ++ -- Aurelien Jarno Mon, 04 May 2020 23:39:18 +0200 ++ ++glibc (2.30-4) unstable; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * debian/debhelper.in/libc.preinst, debian/rules.d/debhelper.mk: there ++ is no easy way to check if a file belongs to a package with usrmerge. ++ Just drop all safety checks... Closes: #954915. ++ * debian/patches/any/local-tst-system-disable-shell-tests.diff: disable ++ tests that rely on a particular shell until a fix is found upstream. ++ ++ [ John Paul Adrian Glaubitz ] ++ * debian/testsuite-xfail-debian.mk: mark nptl/tst-cond8-static and ++ nptl/tst-mutex{,pi}8-static as XFAIL on sparc64. Closes: #953869. ++ ++ -- Aurelien Jarno Wed, 25 Mar 2020 13:56:56 +0100 ++ ++glibc (2.30-3) unstable; urgency=medium ++ ++ * debian/patches/git-updates.diff: update from upstream stable branch: ++ - Fix a defect in the PowerPC backtrace function that could cause an ++ out-of-bounds write when executed in a signal frame context ++ (CVE-2020-1751). ++ - Fix use-after-free vulnerability in the glob function when expanding ++ ~user (CVE-2020-1752). Closes: #953788. ++ * debian/debhelper.in/libc.preinst, debian/rules.d/debhelper.mk: determine ++ ld.so ELF magic at build time instead of at run time to avoid using ++ "readlink -m". Closes: #954374. ++ * debian/rules.d/build.mk: unset LANGUAGE when running the testsuite. ++ * debian/testsuite-xfail-debian.mk: ignore signal/tst-minsigstksz-1 and ++ signal/tst-minsigstksz-2 on i386, they fail on i386 with an AVX-512 CPUs ++ due to a kernel bug. Closes: #954715. ++ * debian/control.in/libc, debian/rules.d/debhelper.mk: Make libcX-dev ++ declare a Breaks against libcX-dev-${DEB_HOST_ARCH}-cross ++ (<< ${CURRENT_UPSTREAM_VERSION}~). Closes: #954393. ++ * debian/control.in/libc, debian/control.in/main: drop Conflicts, Breaks and ++ Replaces against package version older than the one available in ++ oldstable. ++ ++ -- Aurelien Jarno Tue, 24 Mar 2020 23:31:35 +0100 ++ ++glibc (2.30-2) unstable; urgency=medium ++ ++ * debian/rules.d/debhelper.mk: depends on libgcc-sN instead of libgccN. ++ Closes: #953657. ++ * debian/rules.d/build.mk: do not install ++ for now as it is not multiarch safe. ++ ++ -- Aurelien Jarno Thu, 12 Mar 2020 23:47:03 +0100 ++ ++glibc (2.30-1) unstable; urgency=medium ++ ++ [ Samuel Thibault ] ++ * testsuite-xfail-debian.mk: Update non-regressions. ++ * debian/patches/hurd-i386/git-fork-pthread_exit.diff: New patch to fix ++ pthread_exit after fork. ++ * debian/patches/hurd-i386/git-spin_lock.diff: New patch to fix ++ pthread_spin_lock behavior for shared memory. ++ * debian/patches/hurd-i386/git-barrier-1.diff: New patch to fix ++ pthread_barrier_wait with one thread. ++ * debian/patches/hurd-i386/git-sem-intr.diff: New patch to make ++ sem_wait/timedwait interruptible. ++ * debian/patches/hurd-i386/local-atfork-link.diff: New patch to fix ++ libpthread link. ++ * debian/patches/hurd-i386/git-register-atfork.diff: Fix linking with static ++ libpthread. ++ * debian/patches/hurd-i386/git-pthread_self.diff: New patch to improve ++ libpthread performance. ++ ++ [ Aurelien Jarno ] ++ * debian/patches/any/local-revert-24323.diff: drop, obsolete. ++ * debian/control.in/libc: add a Breaks: against wcc (<< 0.0.2+dfsg-3). ++ * debian/patches/git-updates.diff: update from upstream stable branch: ++ - Fix argument passing for inlined syscalls on mips* and riscv64. ++ Closes: #951237. ++ - Fix stack corruption in trigonometric functions when passing a ++ pseudo-zero argument on x86 (CVE-2020-10029). Closes: #953108. ++ - debian/patches/any/submitted-stt-gnu-ifunc-detection.patch: upstreamed. ++ * debian/sysdeps/*.mk: stop building libcrypt for multilib packages. ++ Closes: #951880. ++ * debian/debhelper.in/libc.postinst: drop upstart support. ++ * debian/patches/any/local-revert-glibc_has_include.diff: partial revert ++ of upstream commit bfa864e1645e until gcc stops providing fix-includes. ++ Closes: #953083. ++ ++ -- Aurelien Jarno Wed, 11 Mar 2020 22:02:51 +0100 ++ ++glibc (2.30-0experimental2) experimental; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * debian/patches/git-updates.diff: update from upstream stable branch. ++ * debian/patches/any/submitted-stt-gnu-ifunc-detection.patch: fix ++ STT_GNU_IFUNC assembler and linker detection for toolchains defaulting to ++ PIE. ++ * debian/sysdeps/mips*.mk: drop -no-pie. ++ ++ -- Aurelien Jarno Wed, 05 Feb 2020 23:01:35 +0100 ++ ++glibc (2.30-0experimental1) experimental; urgency=medium ++ ++ [ Samuel Thibault ] ++ * patches/hurd-i386/tg-sendmsg-SCM_RIGHTS.diff: Rename to ++ git-sendmsg-SCM_RIGHTS.diff. ++ * patches/hurd-i386/tg-context_functions.diff: Rename to ++ git-context_functions.diff. ++ * patches/hurd-i386/tg-hurdsig-fixes.diff: Rename to git-hurdsig-fixes.diff. ++ * patches/hurd-i386/tg-hurdsig-global-dispositions.diff: Rename to ++ git-hurdsig-global-dispositions.diff, refresh. ++ * patches/hurd-i386/local-hurdsig-globaldisp-version.diff: Rename to ++ git-hurdsig-globaldisp-version.diff. ++ * patches/hurd-i386/tg-hurdsig-fixes-2.diff: Rename to ++ git-hurdsig-fixes-2.diff. ++ * patches/hurd-i386/tg-hurdsig-boot-fix.diff: Rename to ++ git-hurdsig-boot-fix.diff. ++ * patches/hurd-i386/libpthread_sigs.diff: Rename to libpthread_sigs.diff. ++ * patches/hurd-i386/local-hurd_sigstate-PLT.diff: Rename to ++ git-hurd_sigstate-PLT.diff. ++ * patches/hurd-i386/tg-hurdsig-SA_SIGINFO.diff: Refresh. ++ ++ -- Aurelien Jarno Thu, 02 Jan 2020 12:16:20 +0100 ++ ++glibc (2.30-0experimental0) experimental; urgency=medium ++ ++ [ Adam Conrad ] ++ * New upstream release 2.30, with git updates up to 2019-09-08: ++ - debian/symbols.wildcard: Add 2.30, and debian/control: Regenerate. ++ - debian/patches/any/git-libio-stdout-putc.diff: Upstreamed. ++ - debian/patches/any/git-pexpect-pretty-printers.diff: Upstreamed. ++ - debian/patches/any/git-socket-constants.diff: Upstreamed. ++ - debian/patches/any/local-tst-eintr1-eagain.diff: Obsolete. ++ - debian/patches/hurd-i386/git-renameat2.diff: Upstreamed. ++ - debian/patches/any/submitted-resolv-unaligned.diff: Rebased. ++ - debian/patches/hurd-i386/tg-hurdsig-SA_SIGINFO.diff: Rebased. ++ - debian/patches/hurd-i386/tg-hurdsig-fixes-2.diff: Rebased. ++ - debian/patches/hurd-i386/tg-hurdsig-fixes.diff: Rebased. ++ - debian/patches/hurd-i386/tg-hurdsig-global-dispositions.diff: Rebased. ++ - debian/patches/hurd-i386/tg-io_select_timeout.diff: Rebased. ++ - debian/patches/hurd-i386/tg-thread-cancel.diff: Rebased. ++ - debian/patches/kfreebsd/submitted-auxv.diff: Rebased. ++ - debian/patches/locale/locale-print-LANGUAGE.diff: Update for new test. ++ * debian/patches/any/local-test-install.diff: Use install_root rather than ++ DESTDIR when installing container root, since we override install_root. ++ ++ [ Samuel Thibault ] ++ * debian/patches/hurd-i386/local-fix-nss.diff: Rebased. ++ * debian/patches/hurd-i386/{tg-single-select-timeout.diff,tg-setitimer.diff, ++ tg-remap_getcwd.diff,tg-io_select_timeout.diff,tg-poll_errors_fixes.diff, ++ submitted-anon-mmap-shared.diff,tg-ONSTACK.diff}: Rename to git-foo, ++ committed upstream for 2.31. ++ * debian/testsuite-xfail-debian.mk: Update with new failing tests and fixed ++ tests. ++ * debian/patches/hurd-i386/git-ONSTACK.diff: Move earlier in the queue, ++ since was applied upstream. ++ * debian/patches/hurd-i386/tg-hurdsig-global-dispositions.diff: Rebase ++ accordingly. ++ * debian/patches/hurd-i386/libpthread_version.diff: Remove, now useless. ++ * debian/patches/hurd-i386/local-hurdsig-globaldisp-version.diff: Remove ++ version compatibility symbols, now useless. ++ * debian/libc0.3.symbols.hurd-i386: Update accordingly. ++ * debian/patches/hurd-i386/tg-sysvshm.diff: Fix warning. ++ * debian/patches/hurd-i386/local-versionshack.diff: Remove, now useless. ++ ++ [ Aurelien Jarno ] ++ * debian/patches/git-updates.diff: update from upstream stable branch. ++ ++ -- Aurelien Jarno Fri, 06 Dec 2019 23:18:04 +0100 ++ ++glibc (2.29-10) unstable; urgency=medium ++ ++ * debian/debhelper.in/libc.{preinst,postrm}: Remove fallback to dpkg ++ --print-architecture for pre-multiarch systems. ++ * debian/debhelper.in/libc.preinst: fallback to text output in case ++ perl debconf is used and perl is not usable. Closes: #946599, #950389. ++ * debian/patches/git-updates.diff: update from upstream stable branch. ++ ++ -- Aurelien Jarno Tue, 04 Feb 2020 20:37:26 +0100 ++ ++glibc (2.29-9) unstable; urgency=medium ++ ++ [ Samuel Thibault ] ++ * patches/hurd-i386/local-fix-nss.diff: Refresh. ++ * patches/hurd-i386/tg-hurdsig-SA_SIGINFO.diff: Fix setitimer. ++ ++ [ Aurelien Jarno ] ++ * debian/sysdeps/{amd64,x32}.mk: do not optimize i386 pass for pentium4. ++ Closes: #948396. ++ * debian/patches/any/local-revert-24323.diff: revert upstream change ++ preventing dlopening PIE executable, The patch is correct, but breaks ++ the autopkgtest for wcc and prevents the migration of glibc to testing. ++ Revert it temporarily until wcc is fixed. See #948613. ++ ++ -- Aurelien Jarno Fri, 10 Jan 2020 23:21:25 +0100 ++ ++glibc (2.29-8) unstable; urgency=medium ++ ++ [ Samuel Thibault ] ++ * patches/hurd-i386/posix_openpt.diff: Add posix_openpt support. ++ * patches/hurd-i386/git-errno_location.diff: Fix pthread link of protobuf. ++ ++ [ Aurelien Jarno ] ++ * debian/patches/git-updates.diff: update from upstream stable branch: ++ - Fixes ASLR bypass for setuid programs (CVE-2019-19126). Closes: #945250. ++ - debian/patches/any/git-socket-constants.diff: upstreamed. ++ ++ -- Aurelien Jarno Sun, 05 Jan 2020 13:03:42 +0100 ++ ++glibc (2.29-7) unstable; urgency=medium ++ ++ [ Samuel Thibault ] ++ * patches/hurd-i386/git-altstack-RPC.diff: Fix restoring from altstack while ++ blocked in an RPC. ++ * patches/hurd-i386/git-getrandom.diff: Add support for getrandom & ++ getentropy. ++ ++ [ Aurelien Jarno ] ++ * debian/rules.d/debhelper.mk: change dependency from libcrypt1-dev to ++ libcrypt-dev. Closes: #947778. ++ ++ -- Aurelien Jarno Mon, 30 Dec 2019 19:12:42 +0100 ++ ++glibc (2.29-6) unstable; urgency=medium ++ ++ * debian/shlibs-add-udebs: drop libcrypt. ++ * Fix rebootstrap and cross-toolchain-base (Closes: #946396): ++ - debian/control.in/libc: replace libcrypt1 by ${libcrypt:Depends} and ++ libcrypt1-dev by ${libcrypt-dev:Depends}. ++ - debian/rules.d/debhelper.mk: add libcrypt:Depends=libcrypt1 and ++ libcrypt-dev:Depends=libcrypt1-dev to substvars unless build with stage1 ++ or stage2 profiles. ++ ++ -- Aurelien Jarno Tue, 10 Dec 2019 00:06:38 +0100 ++ ++glibc (2.29-5) unstable; urgency=medium ++ ++ * Upload to unstable. ++ ++ -- Aurelien Jarno Fri, 06 Dec 2019 21:33:17 +0100 ++ ++glibc (2.29-4) experimental; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * Upload to experimental. ++ * debian/control.in/libc: make libc depends on libcrypt1, libc-dev depends ++ on libcrypt1-dev and libc-udeb depends on libcrypt1-udeb. Closes: ++ #941853. ++ * debian/rules, debian/rules.d/build.mk, debian/rules.d/debhelper.mk, ++ debian/sysdeps/amd64.mk: disable libcrypt by passing --disable-crypt ++ except for bi/triarch builds. ++ ++ -- Aurelien Jarno Mon, 25 Nov 2019 22:36:50 +0100 ++ ++glibc (2.29-3) unstable; urgency=medium ++ ++ [ Svante Signell ] ++ * patches/hurd-i386/git-rlock.diff: New patch to add support for record ++ locking. ++ ++ [ Samuel Thibault ] ++ * patches/hurd-i386/tg-locarchive.diff,tg-WRLCK-upgrade.diff: Remove, now ++ useless. ++ * control: Bump hurd-dev dependency to get record locking RPC. ++ * libc0.3.symbols.hurd-i386: Update accordingly. ++ * patches/arm/unsubmitted-ldso-abi-check.diff: Remove obsolete patch. ++ Closes: #943798. ++ ++ -- Samuel Thibault Thu, 31 Oct 2019 23:31:12 +0100 ++ ++glibc (2.29-2) unstable; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * debian/control.in/main: drop the profile from the ++ python3:native build-depends. Closes: #939871. ++ * debian/patches/git-updates.diff: update from upstream stable branch: ++ - Fix getegid, geteuid and getppid on alpha with < 5.1 kernels. ++ Closes: #939898. ++ ++ [ Sven Joachim ] ++ * debian/script.in/nsscheck.sh: Do not restart services of different ++ architecture than libc. Closes: #700472. ++ ++ [ Samuel Thibault ] ++ * patches/hurd-i386/submitted-anon-mmap-shared.diff: Re-disable, actually ++ makes some tests fail. ++ ++ -- Aurelien Jarno Fri, 20 Sep 2019 21:39:03 +0200 ++ ++glibc (2.29-1) unstable; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * debian/patches/git-updates.diff: update from upstream stable branch: ++ - Fix math tests on alpha. ++ * debian/sysdeps/alpha.mk, debian/control.in/main: do not force build with ++ gcc-8. ++ * debian/testsuite-xfail-debian.mk: XFAIL narrowing add/sub tests, they ++ have always failed since they have been introduced. ++ * debian/control.in/libc: add a Breaks: iraf-fitsutil (<< 2018.07.06-4) to ++ libc0.1/0.3/6/6.1. See bug#939523. ++ * debian/testsuite-xfail-debian.mk: drop XFAILs related to the wrong value ++ of (MIN)SIGSTKSZ for 32-bit processes on arm64, now that (old-)stable ++ kernels are fixed. ++ ++ [ Samuel Thibault ] ++ * debian/patches/hurd-i386/submitted-anon-mmap-shared.diff: Enable, now that ++ hurd 2017 is behind. ++ * control: Break old version of hurd package accordingly. ++ * debian/patches/hurd-i386/local-exec_filename.diff: Fix glibc 2.26 ++ _hurd_exec_paths symbol visibility. ++ ++ -- Aurelien Jarno Sun, 08 Sep 2019 22:34:02 +0200 ++ ++glibc (2.29-0experimental1) experimental; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * debian/patches/hurd-i386/submitted-net.diff: rebase. ++ * debian/patches/hurd-i386/local-fix-nss.diff: rebase. ++ * debian/patches/git-updates.diff: update from upstream stable branch: ++ - Fix math tests on hppa. ++ * debian/testsuite-xfail-debian.mk: XFAIL two new tests on HPPA that are ++ due to a bug in the testsuite, reported upstream. ++ * debian/sysdeps/sparc64.mk: disable PIE on sparc64 as it produces broken ++ binaries, causing issues in the testsuite. ++ * debian/sysdeps/alpha.mk, debian/control.in/main: build with gcc-8 on alpha ++ as gcc-9 introduces math errors in the testsuite. ++ ++ -- Aurelien Jarno Wed, 21 Aug 2019 11:13:51 +0200 ++ ++glibc (2.29-0experimental0) experimental; urgency=medium ++ ++ [ Adam Conrad ] ++ * New upstream release 2.29, with git updates up to 2019-02-20: ++ - Add PF_XDP, AF_XDP and SOL_XDP to bits/socket.h. Closes: #933800. ++ - debian/symbols.wildcard: Add 2.29, and debian/control: Regenrate. ++ - debian/patches/localedata/locales_CH.diff: Applied upstream. ++ - debian/patches/localedata/submitted-it_IT-thousands_sep.diff: Upstreamed. ++ - debian/patches/localedata/git-en_US-date_fmt.diff: Applied upstream. ++ - debian/patches/hurd-i386/git-magic-pid.diff: Applied upstream. ++ - debian/patches/hurd-i386/git-interrupt_timeout_EIO.diff: Upstreamed. ++ - debian/patches/hurd-i386/git-interrupt_timeout.diff: Applied upstream. ++ - debian/patches/hurd-i386/git-intr-msg.diff: Applied upstream. ++ - debian/patches/hurd-i386/git-pci.diff: Applied upstream. ++ - debian/patches/hurd-i386/git-msync.diff: Applied upstream. ++ - debian/patches/hurd-i386/git-spawn-open.diff: Applied upstream. ++ - debian/patches/hurd-i386/git-tst-preadvwritev2-common.c.diff: Upstreamed. ++ - debian/patches/hurd-i386/git-fcntl64.diff: Applied upstream. ++ - debian/patches/hurd-i386/git-lockf-0.diff: Applied upstream. ++ - debian/patches/hurd-i386/git-libpthread_setpshared.diff: Upstreamed. ++ - debian/patches/hurd-i386/git-AT_EMPTY_PATH.diff: Applied upstream. ++ - debian/patches/hurd-i386/git-altstack.diff: Applied upstream. ++ - debian/patches/riscv64/git-thread-debugging.diff: Applied upstream. ++ - debian/patches/sparc/submitted-sparc64-socketcall.diff: Applied upstream. ++ - debian/patches/any/local-tst-mktime2.diff: Applied upstream. ++ - debian/patches/all/local-remove-manual.diff: Rebased. ++ - debian/patches/alpha/local-string-functions.diff: Rebased. ++ - debian/patches/any/git-libio-stdout-putc.diff: Rebased. ++ - debian/patches/hurd-i386/local-exec_filename.diff: Rebased. ++ - debian/patches/hurd-i386/local-hurdsig-globaldisp-version.diff: Rebased. ++ - debian/patches/hurd-i386/submitted-anon-mmap-shared.diff: Rebased. ++ - debian/patches/hurd-i386/tg-EGREGIOUS-fr.diff: Rebased. ++ - debian/patches/hurd-i386/tg-EIEIO-fr.diff: Rebased. ++ - debian/patches/hurd-i386/tg-hurdsig-global-dispositions.diff: Rebased. ++ - debian/patches/hurd-i386/tg-io_select_timeout.diff: Rebased. ++ - debian/patches/kfreebsd/submitted-auxv.diff: Rebased. ++ * debian/rules.d/build.mk: Switch to new localedata/install-locale-files: ++ - debian/patches/localedata/local-all-no-archive.diff: Dropped for above. ++ * debian/testsuite-xfail-debian.mk: XFAIL tst-thread-exit-clobber, and ++ tst-minsigstksz*, and tst-xsigstack on armhf, which fail on aarch64 hosts. ++ ++ [ Samuel Thibault ] ++ * debian/patches/hurd-i386/submitted-net.diff: Rebased. ++ * debian/patches/hurd-i386/tg-bits_atomic.h_multiple_threads.diff: Rebased. ++ * debian/patches/hurd-i386/local-fix-nss.diff: Fix tst-nss-test3 test. ++ * debian/testsuite-xfail-debian.mk: Clean out test build failures, they are ++ now handled upstream. Clean out now-fixed tests. ++ ++ [ Aurelien Jarno ] ++ * debian/patches/git-updates.diff: update from upstream stable branch: ++ - Fix build on alpha with recent kernel headers. Closes: #934823. ++ - debian/patches/any/git-libio-stdout-putc.diff: rebased. ++ * debian/control.in/main, debian/rules: drop the multiarch-support package. ++ Closes: #910669. ++ * debian/glibc-source.filelist, debian/libc6.symbols.powerpcspe, ++ debian/rules.d/control.mk, debian/sysdeps/powerpcspe.mk, ++ debian/testsuite-xfail-debian.mk: Drop the powerpcspe architecture, it is ++ not supported anymore by GCC 9 and will be removed in GLIBC 2.30. ++ * debian/rules: do not export SHELL, it is already set through configparms. ++ * debian/patches/git-pexpect-pretty-printers.diff: backport pretty printer ++ fix to support recent versions of GDB with color output. ++ * debian/testsuite-xfail-debian.mk: drop XFAILs that were due to kernel bugs ++ which are now fixed in both oldstable and stable kernels. ++ * debian/rules: drop -no-pie -fno-PIE options. This is now fully supported ++ by the GNU libc. ++ * debian/testsuite-xfail-debian.mk: drop XFAILs that have been fixed for ++ quite some time. ++ * debian/control.in/main, debian/rules: build with GCC 9. ++ * debian/sysdeps/mips*.mk: drop -mno-plt, but keep -mno-pie. ++ * debian/patches/any/git-socket-constants.diff: backport upstream change to ++ use in-tree copy of SO_ constants for !__USE_MISC to fix compatibility ++ with recent kernel headers. ++ * debian/shlibs-add-udebs: remove the udeb entries automatically added by ++ dh_makeshlibs before proceeding to workaround debhelper bugs#934889 and ++ #934891. ++ ++ [ YunQiang Su ] ++ * Fix ld.so link on mips{64,n32}r6{,el}. Closes: #933513. ++ ++ [ Sven Mueller ] ++ * debian/rules: honor noudeb build profile. Closes: #930734. ++ ++ [ Josh Triplett ] ++ * debian/patches/any/submitted-ld.so-cache-new-format.diff: default to the ++ new format for ld.so.cache. Closes: #908946. ++ ++ -- Aurelien Jarno Fri, 16 Aug 2019 12:42:42 +0200 ++ ++glibc (2.28-10) unstable; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * debian/patches/git-updates.diff: update from upstream stable branch: ++ - Fix infinite loop in pldd. Closes: #913929. ++ ++ -- Aurelien Jarno Wed, 01 May 2019 19:24:19 +0200 ++ ++glibc (2.28-9) unstable; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * debian/patches/git-updates.diff: update from upstream stable branch: ++ - Fix heap-based buffer over-read in regular-expression matching ++ (CVE-2019-9169). Closes: #924612. ++ - Add entry for the new Japanese era to the ja_JP locale. Closes: ++ #927914. ++ ++ [ Adam Conrad ] ++ * debian/patches/arm/unsubmitted-ldso-abi-check.diff: Fix rtld segv in ++ dl_open() introduced via merge with upstream at 2.28 (LP: #1821677) ++ ++ -- Aurelien Jarno Thu, 25 Apr 2019 21:12:03 +0200 ++ ++glibc (2.28-8) unstable; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * debian/patches/git-updates.diff: update from upstream stable branch. ++ * Update Danish debconf translation, by Joe Hansen. Closes: #923055. ++ ++ [ Samuel Thibault ] ++ * debian/patches/hurd-i386/libpthread_sigs.diff: Enable patch to restore ++ per-thread signal distribution, lost on upgrading to 2.28. Fixes go. ++ * debian/patches/hurd-i386/git-renameat2.diff: New patch, fixes renameat2, ++ now used by coreutils. ++ ++ -- Samuel Thibault Wed, 27 Feb 2019 21:56:01 -0800 ++ ++glibc (2.28-7) unstable; urgency=medium ++ ++ * debian/patches/hurd-i386/local-no-bootstrap-fs-access.diff: Refresh. ++ ++ -- Samuel Thibault Sat, 09 Feb 2019 18:34:27 +0100 ++ ++glibc (2.28-6) unstable; urgency=medium ++ ++ [ Samuel Thibault ] ++ * debian/patches/hurd-i386/git-AT_EMPTY_PATH.diff: New patch, fixes qt's ++ file size query. ++ * debian/patches/hurd-i386/git-altstack.diff: New patch, fixes altstack ++ initial state. ++ ++ [ Aurelien Jarno ] ++ * debian/patches/git-updates.diff: update from upstream stable branch: ++ - Fix a buffer overflow in string/memory functions on x32 (CVE-2019-6488). ++ - Reject IP addresses with trailing characters (CVE-2016-10739). Closes: ++ #920047. ++ - Fix wrong return value for memcmp on amd64 and x32 due to mishandling ++ of most significant bit (CVE-2019-7309). ++ * Update Russian debconf translation, by Lev Lamberov. Closes: ++ #921165. ++ * debian/patches/any/local-ldso-disable-hwcap.diff: only check for ++ /etc/ld.so.nohwcap on alpha, hurd-i386 and i386. Based on a patch from ++ Josh Triplett. Closes: #908928. ++ * debian/patches/any/git-libio-stdout-putc.diff: fix puts and putchar output ++ with change stdout pointer. Closes: #761300. ++ * debhelper.in/locales.bug-presubj: drop obsolete file, the dependency ++ mechanism for locales has been changes a lot of time ago. ++ ++ -- Aurelien Jarno Tue, 05 Feb 2019 19:55:42 +0100 ++ ++glibc (2.28-5) unstable; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * debian/script.in/nsscheck.sh: fix a typo s/samaba/samba/. Closes: ++ #909047. ++ * debian/debhelper.in/libc.postrm: suidmanager is long gone, remove support ++ for it. ++ * debian/patches/git-updates.diff: update from upstream stable branch: ++ - debian/patches/arm/submitted-gcc-8-kernel-assisted-atomics.diff: ++ upstreamed. ++ - any/submitted-workaround-math-errno-gcc-bug.diff: upstreamed. ++ * debian/control.in/libc: fix nocache Breaks, set it to (<< 1.1-1~). Closes: ++ #918583. ++ * debian/patches/localedata/git-en_US-date_fmt.diff: backport from upstream ++ support for date_fmt for the en_US locale. Closes: #877900. ++ ++ [ Samuel Thibault ] ++ * debian/patches/hurd-i386/git-libpthread_setpshared.diff: New patch to ++ avoid letting packages use setpshared. ++ ++ -- Aurelien Jarno Sat, 12 Jan 2019 18:50:25 +0100 ++ ++glibc (2.28-4) unstable; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * debian/testsuite-xfail-debian.mk: whitelist math/test-fenv on riscv64. ++ This failure is also due to a kernel bug. ++ * debian/sysdeps/riscv64.mk: increase TIMEOUTFACTOR to 100 on riscv64. ++ * debian/local/manpages/*: remove manpages that are not installed in the ++ binary packages. ++ * debian/local/manpages/po/de.po: update German manpages translations, by ++ Helge Kreutzmann. Closes: #877434. ++ * debian/patches/git-updates.diff: update from upstream stable branch: ++ - debian/patches/any/submitted-sigaction-sa-restorer.diff: upstreamed. ++ * debian/testsuite-xfail-debian.mk: whitelist tests that sometimes fail in ++ a riscv64 QEMU VM, but not on a HiFive Unleashed board. ++ * debian/patches/submitted-gcc-8-kernel-assisted-atomics.diff: fix kernel ++ assisted atomics on armel with GCC 8. ++ * debian/control.in/main, debian/sysdeps/armel.mk: build with GCC 8 on ++ armel. ++ * debian/patches/any/submitted-workaround-math-errno-gcc-bug.diff: ++ workaround GCC bug BZ #88576 / Debian #917115 by not using -fmath-errno ++ outside of libm. Closes: #916779. ++ * debian/patches/riscv64/git-thread-debugging.diff: fix thread debugging ++ in gdb on riscv64. ++ ++ [ Samuel Thibault ] ++ * debian/testsuite-xfail-debian.mk: whitelist failing new tests on hurd. ++ * debian/patches/hurd-i386/git-fcntl64.diff: Fix 64bit implementation. ++ * debian/patches/hurd-i386/tg-context_functions.diff: Update from topgit. ++ * debian/patches/hurd-i386/tg-sysvshm.diff: Update from topgit. ++ * debian/patches/hurd-i386/tg-magic-pid.diff: rename to git-magic-pid.diff. ++ ++ -- Aurelien Jarno Sat, 29 Dec 2018 11:04:27 +0100 ++ ++glibc (2.28-3) unstable; urgency=medium ++ ++ [ John David Anglin ] ++ * debian/testsuite-xfail-debian.mk: whitelist misc/tst-preadvwritev2, ++ misc/tst-preadvwritev64v2 and test-xfail-tst-setcontext7 on hppa. Closes: ++ #915676. ++ ++ [ Aurelien Jarno ] ++ * debian/testsuite-xfail-debian.mk: whitelist math/test-float64x-float128-mul ++ on sparc64. Closes: #916124. ++ * debian/control.in/libc: add a Breaks: nocache (<< 1.0-1 ) to ++ @libc@ as it doesn't work with glibc 2.28. ++ * debian/testsuite-xfail-debian.mk: whitelist math/test-fpucw, ++ math/test-fpucw-ieee, math/test-fpucw-ieee-static and ++ math/test-fpucw-static on riscv64. Thoses failures are due to a kernel ++ bug. ++ * debian/sysdeps/riscv64.mk: increase TIMEOUTFACTOR to 50 on riscv64. ++ * debian/patches/git-updates.diff: update from upstream stable branch: ++ - debian/patches/riscv64/submitted-start-cfi.diff: upstreamed. ++ * debian/patches/submitted-sigaction-sa-restorer.diff: fix a regression in ++ sigaction on m68k. Closes: #915958. ++ * debian/script.in/nsscheck.sh: drop direct support for file-rc and always ++ run invoke-rc.d instead. invoke-rc.d in stretch has support for file-rc. ++ Closes: #916588. ++ ++ -- Aurelien Jarno Sun, 16 Dec 2018 18:25:59 +0100 ++ ++glibc (2.28-2) unstable; urgency=medium ++ ++ [ Samuel Thibault ] ++ * patches/hurd-i386/git-fcntl64.diff: Fix returning value returned by ++ __f_setlk. ++ ++ [ Aurelien Jarno ] ++ * debian/control.in/libc: breaks r-cran-later (<< 0.7.5+dfsg-2), ie ++ versions built with tinycthread. Closes: #915339. ++ * debian/patches/git-updates.diff: update from upstream stable branch. ++ * debian/testsuite-xfail-debian.mk: allow tst-pkey to fail on ppc64el, ppc64 ++ powerpc and powerpcspe as the glibc implementation is still only partial. ++ Closes: #914997. ++ * debian/control.in/main: glibc-source: add breaks on cross-toolchain-base ++ (<< 29~) and cross-toolchain-base-ports (<< 25~) as those packages are not ++ compatible with glibc 2.28. Closes: #915621. ++ * debian/testsuite-xfail-debian.mk: whitelist misc/tst-preadvwritev2 and ++ misc/tst-preadvwritev64v2 on x32. The failing part of those tests is new, ++ and the it looks like a kernel bug in the compat layer. ++ * debian/testsuite-xfail-debian.mk: whitelist elf/tst-execstack-needed on ++ riscv64, it is similar to the already whitelisted test ++ elf/test-xfail-tst-execstack. ++ * debian/debhelper.in/locales.postinst: fix regexp checking for installed ++ locales package. Closes: #903964. ++ ++ -- Aurelien Jarno Wed, 05 Dec 2018 19:50:21 +0100 ++ ++glibc (2.28-1) unstable; urgency=medium ++ ++ [ Samuel Thibault ] ++ * patches/hurd-i386/git-fcntl64.diff: Fix tst-utmp* tests. ++ * debian/patches/hurd-i386/tg-WRLCK-upgrade.diff: Refresh. ++ ++ [ Aurelien Jarno ] ++ * debian/patches/git-updates.diff: update from upstream stable branch: ++ - Fix a file descriptor leak in if_nametoindex() (CVE-2018-19591). ++ Closes: #914837. ++ * debian/control.in/main: Update Vcs-Git to point to the default branch. ++ ++ -- Aurelien Jarno Wed, 28 Nov 2018 23:42:08 +0100 ++ ++glibc (2.28-0experimental1) experimental; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * debian/control.in/main: Update Vcs-Git to point to the 2.28 branch. ++ * debian/testsuite-xfail-debian.mk: Allow nptl/tst-signal6 to fail on armhf. ++ The failure is due to a kernel bug when building armhf on an ARM64 ++ machine. ++ * debian/testsuite-xfail-debian.mk: Allow math/test-ildouble-fma and ++ math/test-ldouble-fma to fail on powerpc, ppc64, ppc64el. This is a known ++ bug and not a regression. ++ * debian/testsuite-xfail-debian.mk: remove fixed XFAILs. ++ * debian/testsuite-xfail-debian.mk: update XFAILs for the mips* Octeon 3 FPU ++ bug with the new tests. ++ * debian/patches/git-updates.diff: update from upstream stable branch. ++ * debian/control.in/main, debian/sysdeps/armel.mk: build with gcc-7 as ++ gcc-8 triggers issues in the testsuite. ++ ++ [ Samuel Thibault ] ++ * patches/hurd-i386/git-tst-preadvwritev2-common.c.diff: Backport fix for ++ build failure. ++ ++ -- Aurelien Jarno Mon, 12 Nov 2018 21:54:56 +0100 ++ ++glibc (2.28-0experimental0) experimental; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * New upstream release: ++ - Fix undefined behaviour in regexec. Closes: #292550. ++ - debian/control: regenerate. ++ - debian/symbols.wildcard: update for 2.28. ++ - debian/debhelper.in/libc-dev{,-alt}.install: do not install ++ libpthread_nonshared.a. ++ - debian/patches/git-updates.diff: update from upstream stable branch. ++ - debian/patches/localedata/locale-ku_TR.diff: rebased. ++ - debian/patches/localedata/locale-csb_PL.diff: dropped, obsolete. ++ - debian/patches/localedata/locale-se_NO.diff: dropped, obsolete. ++ - debian/patches/localedata/tailor-iso14651_t1.diff: rebased. ++ - debian/patches/arm/local-sigaction.diff: rebased. ++ - debian/patches/hppa/git-check-execstack.diff: upstreamed. ++ - debian/patches/hurd-i386/tg-context_functions.diff: rebased. ++ - debian/patches/hurd-i386/git-tls.diff: upstreamed. ++ - debian/patches/hurd-i386/git-tls-threadvar.diff: upstreamed. ++ - debian/patches/hurd-i386/tg-sysvshm.diff: rebased. ++ - debian/patches/hurd-i386/git-_dl_random.diff: upstreamed. ++ - debian/patches/hurd-i386/git-grantpt.diff: upstreamed. ++ - debian/patches/hurd-i386/git-posix_thread.diff: upstreamed. ++ - debian/patches/hurd-i386/git-gai_misc.diff: upstreamed. ++ - debian/patches/hurd-i386/tg-hurdsig-fixes.diff: rebased. ++ - debian/patches/hurd-i386/tg-hurdsig-global-dispositions.diff: rebased. ++ - debian/patches/hurd-i386/local-hurdsig-global-dispositions-version.diff: ++ rebased. ++ - debian/patches/hurd-i386/tg-hurdsig-SA_SIGINFO.diff: rebased. ++ - debian/patches/hurd-i386/cvs-libpthread.diff: upstreamed. ++ - debian/patches/hurd-i386/cvs-libpthread.abilist.diff: upstreamed. ++ - debian/patches/hurd-i386/libpthread_build.diff: upstreamed. ++ - debian/patches/hurd-i386/tg-libpthread_depends.diff: upstreamed. ++ - debian/patches/hurd-i386/libpthread_version.diff: rebased. ++ - debian/patches/hurd-i386/tg-remap_getcwd.diff: rebased. ++ - debian/patches/hurd-i386/git-exec-static.diff: upstreamed. ++ - debian/patches/hurd-i386/git-socket_flags.diff: upstreamed. ++ - debian/patches/hurd-i386/git-socketpair_flags.diff: upstreamed. ++ - debian/patches/hurd-i386/git-pipe2.diff: upstreamed. ++ - debian/patches/hurd-i386/tg-libc_getspecific.diff: dropped, obsolete. ++ - debian/patches/hurd-i386/git-futimens.diff: upstreamed. ++ - debian/patches/hurd-i386/tg-sigstate_thread_reference.diff: rebased. ++ - debian/patches/hurd-i386/git-tls_thread_leak.diff: upstreamed. ++ - debian/patches/hurd-i386/git-libpthread-stacksize.diff: upstreamed. ++ - debian/patches/hurd-i386/git-reboot-startup.diff: upstreamed. ++ - debian/patches/hurd-i386/cvs-revert-gnu-gnu-cleanup.diff: upstreamed. ++ - debian/patches/hurd-i386/git-gsync-libc.diff: upstreamed. ++ - debian/patches/hurd-i386/git-pthread_deps.diff: upstreamed. ++ - debian/patches/hurd-i386/git-libpthread-gsync-spin.diff: upstreamed. ++ - debian/patches/hurd-i386/git-libpthread-gsync-mutex.diff: upstreamed. ++ - debian/patches/hurd-i386/git-NOFOLLOW.diff: upstreamed. ++ - debian/patches/hurd-i386/git-NOFOLLOW-DIRECTORY.diff: upstreamed. ++ - debian/patches/hurd-i386/git-mlockall.diff: upstreamed. ++ - debian/patches/hurd-i386/git2.25-tls.diff: upstreamed. ++ - debian/patches/hurd-i386/local-nocheck-installed-headers.diff: rebased. ++ - debian/patches/hurd-i386/git-libpthread-2.26.diff: upstreamed. ++ - debian/patches/hurd-i386/git-thread-linkspace.diff: upstreamed. ++ - debian/patches/hurd-i386/libpthread_includes.diff: dropped, obsolete. ++ - debian/patches/hurd-i386/local-exec_filename.diff: rebased. ++ - debian/patches/hurd-i386/git-libpthread-trylock.diff: upstreamed. ++ - debian/patches/hurd-i386/git-test-atexit-race-common.diff: upstreamed. ++ - debian/patches/hurd-i386/git-UTIME.diff: upstreamed. ++ - debian/patches/hurd-i386/git-timer_create_sigmask.diff: upstreamed. ++ - debian/patches/hurd-i386/git-pthread_deps.diff: upstreamed. ++ - debian/patches/kfreebsd/local-fbtl-depends.diff: rebased. ++ - debian/patches/any/local-ldconfig-fsync.diff: dropped, obsolete. ++ - debian/patches/any/submitted-bits-fcntl_h-at.diff: rebased. ++ - debian/patches/any/submitted-intl-tstgettext.diff: upstreamed. ++ - debian/patches/any/git-abilist-ignore-absolute.diff: upstreamed. ++ - debian/debhelper.in/libc{-alt,-otherbuild,}.lintian-overrides: drop ++ libcidn.so override. ++ - debian/libc6.symbols.{common,hppa,sparc}, debian/libc6.1.symbols.alpha, ++ debian/libc0.1.symbols.common, debian/libc0.3.symbols.hurd-i386: drop ++ libcidn.so. ++ * debian/control.in/main: bump binutils build-dependency to 2.29 on all ++ architectures. ++ * debian/control.in/main, debian/rules: build with GCC 8. ++ * debian/control.in/main: build-depends on libidn2-0 (>= 2.0.5~) for the ++ tests. ++ * debian/control.in/libc: recommends libidn2-0 (>= 2.0.5~) to support IDN ++ domain names in getaddrinfo and getnameinfo. ++ * debian/testsuite-xfail-debian.mk: update XFAILs for the mips* Octeon 3 FPU ++ bug with the new tests. ++ * debian/control.in/main: bump Standards-Version to 4.2.1 (no changes). ++ * debian/source/options: drop. ++ ++ [ Samuel Thibault ] ++ * debian/patches/hurd-i386/git-gscope.diff: upstreamed. ++ * debian/patches/hurd-i386/git-hurd-abilist.diff: Remove patch, now useless. ++ * debian/patches/hurd-i386/git-pagesize.diff: upstreamed. ++ * debian/patches/hurd-i386/git-timer_routines.diff: upstreamed. ++ * debian/patches/hurd-i386/submitted-net.diff: rebased. ++ * debian/patches/hurd-i386/tg-context_functions.diff: update. ++ * debian/patches/hurd-i386/tg-hurdsig-SA_SIGINFO.diff: update. ++ * debian/patches/hurd-i386/tg-sysvshm.diff: update. ++ * debian/patches/hurd-i386/tg-verify.h.diff: remove, now useless. ++ * debian/patches/hurd-i386/tg2.26-sched_param.diff: upstreamed. ++ * debian/patches/hurd-i386/libpthread_version.diff: Remove now-useless part. ++ * debian/patches/hurd-i386/local-hurdsig-global-dispositions-version.diff: ++ Likewise. ++ * debian/patches/hurd-i386/tg-ifaddrs_v6.diff: Fix PLT. ++ * debian/patches/hurd-i386/local-hurd_sigstate-PLT.diff: New patch to fix ++ PLTs. ++ * debian/patches/hurd-i386/libpthread_pthread_types.diff: Remove, now ++ useless. ++ * debian/patches/hurd-i386/local-nocheck-installed-headers.diff: Remove, now ++ fixed. ++ * debian/testsuite-xfail-debian.mk: Update. ++ ++ [ Adam Conrad ] ++ * debian/patches/localedata/tailor-iso14651_t1.diff: Build without errors. ++ ++ -- Aurelien Jarno Tue, 30 Oct 2018 00:11:37 +0100 ++ ++glibc (2.27-9) UNRELEASED; urgency=medium ++ ++ * debian/control: Bump hurd-dev dependency to >= 1:0.9.git20181030-1 to get ++ pci.defs. ++ * hurd-i386/git-pci.diff: Enable pci RPCs. ++ * patches/hurd-i386/git-msync.diff: Support msync. ++ * debian/control: Bump gnumach-dev build-dep accordingly. ++ * libc0.3.symbols.hurd-i386: Update symbols accordingly. ++ * patches/hurd-i386/git-spawn-open.diff: Fix crash on spawn with open ++ operation. ++ * patches/hurd-i386/git-lockf-0.diff: Support lockf at offset 0 with size 0 or ++ 1. ++ ++ -- Samuel Thibault Sat, 03 Nov 2018 22:50:40 +0100 ++ ++glibc (2.27-8) unstable; urgency=medium ++ ++ * patches/hurd-i386/git-intr-msg.diff: Fix a cancellation case. ++ * patches/hurd-i386/git-interrupt_timeout_EIO.diff: return EIEIO instead of ++ EIO. ++ ++ -- Samuel Thibault Mon, 29 Oct 2018 21:36:01 +0100 ++ ++glibc (2.27-7) unstable; urgency=medium ++ ++ * patches/hurd-i386/local-no_unsupported_ioctls.diff: Undefine useless bit ++ macros too. ++ * patches/hurd-i386/git-interrupt_timeout{,_EIO}.diff: Fix double-writes in ++ ghc. ++ * patches/hurd-i386/git-intr-msg.diff: Fix crashes due to a race between ++ calling RPC and handling a signal. ++ ++ -- Samuel Thibault Sun, 28 Oct 2018 10:46:23 +0100 ++ ++glibc (2.27-6) unstable; urgency=medium ++ ++ [ Samuel Thibault ] ++ * patches/hurd-i386/tg-socket_flags.diff: Rename to git-socket_flags.diff. ++ * patches/hurd-i386/tg-socketpair_flags.diff: Rename to ++ git-socketpair_flags.diff. ++ * patches/hurd-i386/tg-pipe2.diff: Rename to git-pipe2.diff. ++ * patches/hurd-i386/tg-posix_thread.diff: Rename to git-posix_thread.diff. ++ * patches/hurd-i386/tg-pthread_deps.diff: Rename to git-pthread_deps.diff. ++ * patches/hurd-i386/tg-hurdsig-SA_SIGINFO.diff: Fix standardization of ++ exposition of sigaction ++ * patches/kfreebsd/local-tst-unique.diff: Fix patch application. ++ * patches/hurd-i386/unsubmitted-getaux_at_secure.diff: Fix ++ getauxval(AT_SECURE). ++ * patches/hppa/git-check-execstack.diff: Ignore executable stacks. ++ Closes: #904056. ++ ++ [ Aurelien Jarno ] ++ * debian/patches/git-updates.diff: update from upstream stable branch. ++ ++ -- Samuel Thibault Tue, 04 Sep 2018 21:13:02 +0200 ++ ++glibc (2.27-5) unstable; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * debian/patches/any/git-abilist-ignore-absolute.diff: backport support ++ for binutils 2.31 from upstream. ++ * debian/rules.d/control.mk: Add support for riscv64. Closes: #888793. ++ * debian/testsuite-xfail-debian.mk: add reference testsuite results for ++ riscv64. ++ * debian/patches/git-updates.diff: update from upstream stable branch. ++ ++ [ Samuel Thibault ] ++ * debian/testsuite-xfail-debian.mk: Update hurd-i386 result to new upstream ++ stable branch. ++ ++ -- Aurelien Jarno Mon, 16 Jul 2018 22:23:13 +0200 ++ ++glibc (2.27-4) unstable; urgency=medium ++ ++ [ Samuel Thibault ] ++ * hurd-i386/tg-gsync-libc.diff: Rename to hurd-i386/git-gsync-libc.diff. ++ * hurd-i386/git-timer_create_sigmask.diff: New patch to fix interaction ++ between SIGCHLD and timer_create. Closes: Bug#894379. ++ ++ [ Aurelien Jarno ] ++ * debian/patches/git-updates.diff: update from upstream stable branch: ++ - Fix stack buffer overflow in realpath() (CVE-2018-11236). Closes: ++ #899071. ++ - Fix buffer overflow in AVX-512-optimized implementation of mempcpy() ++ (CVE-2018-11237). Closes: #899070. ++ - Fix crashes with binaries using vtable interposition. Closes: ++ #861116. ++ - Fix LC_PAPER for es_BO locale. Closes: #880675. ++ - debian/patches/arm/unsubmitted-ldso-abi-check.diff: refresh, sigh. ++ * debian/debhelper.in/libc.docs: do not try to install BUGS in the ++ documentation, it has been removed upstream in version 2.27 as ++ obsolete. Closes: #902800. ++ * debian/debhelper.in/libc-dev.docs: drop, as both CONFORMANCE and ++ NAMESPACE have been removed upstream in version 2.27. ++ * debian/debhelper.in/libc-dev-bin.docs: drop as NAMESPACE has been ++ removed upstream in version 2.27. ++ * debian/patches/riscv64/submitted-start-cfi.diff: fix endless loop ++ when throwing an exception from a constructor. ++ * debian/control.in/main: bump Standards-Version to 4.1.4 (no changes). ++ ++ [ Laurent Bigonville ] ++ * debian/local/etc/nsswitch.conf: Switch from the compat to the files ++ module. Closes: #880846. ++ ++ [ Bjarni Ingi Gislason ] ++ * debian/local/manpages/catchsegv.1: apply some corrections to the ++ manpage. Closes: #902236. ++ ++ -- Aurelien Jarno Sat, 07 Jul 2018 18:34:34 +0200 ++ ++glibc (2.27-3) unstable; urgency=medium ++ ++ [ Samuel Thibault ] ++ * hurd-i386/tg-NOFOLLOW.diff: Rename to hurd-i386/git-NOFOLLOW.diff. ++ * hurd-i386/tg-NOFOLLOW-DIRECTORY.diff: Rename to ++ hurd-i386/git-NOFOLLOW-DIRECTORY.diff. ++ * hurd-i386/tg-_dl_random.diff: Rename to hurd-i386/git-_dl_random.diff. ++ * hurd-i386/tg-exec-static.diff: Rename to hurd-i386/git-exec-static.diff. ++ * hurd-i386/tg-futimens.diff: Rename to hurd-i386/git-futimens.diff. ++ * hurd-i386/tg-gai_misc.diff: Rename to hurd-i386/git-gai_misc.diff. ++ * hurd-i386/tg-grantpt.diff: Rename to hurd-i386/git-grantpt.diff. ++ * hurd-i386/tg-gscope.diff: Rename to hurd-i386/git-gscope.diff. ++ * hurd-i386/tg-libpthread-gsync-mutex.diff: Rename to ++ hurd-i386/git-libpthread-gsync-mutex.diff. ++ * hurd-i386/tg-libpthread-gsync-spin.diff: Rename to ++ hurd-i386/git-libpthread-gsync-spin.diff. ++ * hurd-i386/tg-mlockall.diff: Rename to hurd-i386/git-mlockall.diff. ++ * hurd-i386/tg-pagesize.diff: Rename to hurd-i386/git-pagesize.diff. ++ * hurd-i386/tg-reboot-startup.diff: Rename to ++ hurd-i386/git-reboot-startup.diff. ++ * hurd-i386/tg-thread-linkspace.diff: Rename to ++ hurd-i386/git-thread-linkspace.diff. ++ * hurd-i386/tg-timer_routines.diff: Rename to ++ hurd-i386/git-timer_routines.diff. ++ * hurd-i386/tg-tls-threadvar.diff: Rename to ++ hurd-i386/git-tls-threadvar.diff. ++ * hurd-i386/tg-tls.diff: Rename to hurd-i386/git-tls.diff. ++ * hurd-i386/tg-tls_thread_leak.diff: Rename to ++ hurd-i386/git-tls_thread_leak.diff. ++ * hurd-i386/tg2.25-tls.diff: Rename to hurd-i386/git2.25-tls.diff. ++ * hurd-i386/submitted-hurd-abilist.diff: Rename to ++ hurd-i386/git-hurd-abilist.diff. ++ * hurd-i386/local-libpthread-stacksize.diff: Rename to ++ hurd-i386/git-libpthread-stacksize.diff. ++ ++ [ Aurelien Jarno ] ++ * debian/patches/localedata/locales-fr.diff: fix conversion from ++ format to ascii during the latest rebase. Closes: bug#894078. ++ * debian/patches/git-updates.diff: update from upstream stable branch: ++ - Fix a missing reorder-end keyword in et_EE locale. Closes: #894395. ++ ++ -- Aurelien Jarno Thu, 29 Mar 2018 21:47:29 +0200 ++ ++glibc (2.27-2) unstable; urgency=medium ++ ++ [ Samuel Thibault ] ++ * debian/patches/hurd-i386/git-UTIME.diff: New patch. Closes: #762677. ++ * debian/control: Bump hurd build dep accordingly. ++ * debian/libc0.3.symbols.hurd-i386: Update accordingly. ++ ++ [ Aurelien Jarno ] ++ * debian/control.in/main: drop the branch from Vcs-Git. ++ * debian/patches/any/local-bootstrap-headers.diff: update to install ++ gnu/lib-names-$abi.h. Closes: #892126. ++ * debian/patches/git-updates.diff: update from upstream stable branch: ++ - Fix FTBFS on powerpcspe. ++ - debian/patches/sparc/submitted-sparc32-makecontext.diff: upstreamed. ++ ++ [ Helmut Grohne ] ++ * debian/rules: drop DEB_STAGE and DEB_BUILD_PROFILE support. ++ * debian/rules: disable tests for stage1. ++ * debian/control.in/*: drop libc*-dev -> libc* dependencies in stage1. ++ ++ -- Aurelien Jarno Fri, 09 Mar 2018 21:48:04 +0100 ++ ++glibc (2.27-1) unstable; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * debian/sysdeps/*.mk: install gnu/lib-names-*.h for multilib builds. ++ * debian/patches/alpha/submitted-makecontext.diff: new patch to fix ++ infinite backtrace within a context created by makecontext. ++ * debian/patches/sparc/submitted-sparc32-makecontext.diff: new patch ++ to fix infinite backtrace within a context created by makecontext. ++ ++ -- Aurelien Jarno Sat, 03 Mar 2018 11:47:56 +0100 ++ ++glibc (2.27-0experimental1) experimental; urgency=medium ++ ++ [ Samuel Thibault ] ++ * debian/patches/hurd-i386/git-test-atexit-race-common.diff: New patch, ++ fixes hurd-i386 build. ++ ++ [ Aurelien Jarno ] ++ * debian/patches/any/local-ldconfig-ignore-ld.so.diff: add riscv64 program ++ interpreters. ++ * debian/libc6.symbols.riscv64: add riscv64 symbols file. ++ * debian/patches/git-updates.diff: update from upstream stable branch. ++ * debian/testsuite-xfail-debian.mk: Allow tst-malloc-usable-tunables to fail ++ on alpha, arm64, mips64el, ppc64el, ppc64, s390x and sparc64. The failure ++ is due to a kernel bug. ++ * debian/control: Update Vcs-Git and Vcs-Browser fields following the move ++ to Salsa. ++ * debian/control.in/main: do not build-depends on g++-7-multilib for the ++ nobiarch build profile. Closes: #890131. ++ * debian/rules.d/build.mk: use the just built iconvconfig if not ++ cross-compiling. Closes: #890132. ++ * debian/patches/any/local-ldconfig.diff: fix a typo. ++ * debian/patches/hurd-i386/submitted-bind_umask2.diff: fix a typo. ++ * debian/patches/hurd-i386/tg-hurdsig-global-dispositions.diff: fix a typo. ++ * debian/control.in/libc, debian/rules.d/debhelper.mk: drop the version ++ from the linux-libc-dev dependency, as the file is not ++ generated anymore from the installed kernel headers. ++ ++ -- Aurelien Jarno Sat, 24 Feb 2018 23:49:00 +0100 ++ ++glibc (2.27-0experimental0) experimental; urgency=medium ++ ++ [ Samuel Thibault ] ++ * debian/patches/hurd-i386/git-abilist.diff: Add ABI list. ++ * debian/patches/hurd-i386/cvs-libpthread.abilist.diff: Add libpthread ABI ++ list. ++ * debian/patches/hurd-i386/libpthread_version.diff: Add compatibility ABI ++ list. ++ * debian/patches/hurd-i386/local-exec_filename.diff: Add compatibility ABI ++ list. ++ * debian/patches/hurd-i386/local-hurdsig-global-dispositions-version.diff: ++ Add additional ABI list. ++ * debian/patches/hurd-i386/local-mach_print.diff: Add local ABI list. ++ * debian/patches/hurd-i386/local-usr.diff: Fix local ABI list. ++ * debian/patches/hurd-i386/tg-gsync-libc.diff: Update ABI list. ++ * debian/patches/hurd-i386/tg-extern_inline.diff: Update ABI list. ++ * debian/patches/hurd-i386/local-versions.diff: Remove, merged upstream. ++ * debian/testsuite-xfail-debian.mk: Remove ABI list blacklist. ++ ++ [ Aurelien Jarno ] ++ * New upstream version: ++ - debian/control: regenerate. ++ - debian/symbols.wildcards: update for 2.27. ++ - debian/patches/hurd-i386/tg-tls-threadvar.diff: refreshed. ++ - debian/patches/hurd-i386/tg-tlsdesc.sym.diff: upstreamed. ++ - debian/patches/hurd-i386/tg-no-hp-timing.diff: upstreamed. ++ - debian/patches/hurd-i386/local-hurdsig-global-dispositions-version.diff: ++ refreshed. ++ - debian/patches/hurd-i386/unsubmitted-gnumach.defs.diff: upstreamed. ++ - debian/patches/hurd-i386/tg-sigstate_thread_reference.diff: upstreamed. ++ - debian/patches/hurd-i386/tg-allocalim.diff: upstreamed. ++ - debian/patches/hurd-i386/tg-extern_inline.diff: upstreamed. ++ - debian/patches/hurd-i386/tg-gsync-libc.diff: upstreamed. ++ - debian/patches/hurd-i386/tg2.26-sigsetops.h.diff: upstreamed. ++ - debian/patches/hurd-i386/submitted-net.diff: refreshed. ++ - debian/patches/hurd-i386/local-clock_gettime_MONOTONIC.diff: refreshed. ++ - debian/patches/hurd-i386/tg-fcntl-internal.h.diff: upstreamed. ++ - debian/patches/hurd-i386/tg-pagesize.diff: refreshed. ++ * debian/rules: tweak GCC garbage collector on 32-bit MIPS builders. ++ * debian/rules.d/tarball.mk: do a local bare clone before using git archive ++ as it doesn't support https. ++ * debian/control.in/main, debian/sysdeps/{amd64,i386,x32}.mk: enable support ++ for building static PIE. ++ ++ -- Aurelien Jarno Sat, 03 Feb 2018 16:31:03 +0100 ++ ++glibc (2.26.9000+20180127.7e23a7dd-0experimental0) experimental; urgency=medium ++ ++ [ Samuel Thibault ] ++ * debian/patches/hurd-i386/local-exec_filename.diff: Add glibc 2.26 ++ _hurd_exec_paths compatibility symbol for now. ++ * debian/patches/hurd-i386/tg-gsync-libc.diff: Update. ++ ++ [ Aurelien Jarno ] ++ * New upstream snapshot from 20180127: ++ - Fix stack corruption by __pthread_register_cancel. Closes: #887078, ++ #887886. ++ - debian/patches/hurd-i386/local-hurdsig-global-dispositions-version.diff: ++ rebased. ++ - debian/patches/hurd-i386/git-exec_filename.diff: upstreamed. ++ - debian/patches/hurd-i386/tg-faccessat.diff: upstreamed. ++ - debian/patches/hurd-i386/local-exec_filename.diff: rebased. ++ ++ -- Aurelien Jarno Sat, 27 Jan 2018 18:15:52 +0100 ++ ++glibc (2.26.9000+20180108.401311cf-0experimental0) experimental; urgency=medium ++ ++ [ Samuel Thibault ] ++ * debian/sysdeps/hurd.mk: Do not add libpthread add-on since add-ons ++ mechanism is no more. ++ * debian/patches/hurd-i386/submitted-net.diff: rebased. ++ * debian/patches/hurd-i386/unsubmitted-prof-eintr.diff: rebased. ++ * debian/patches/hurd-i386/libpthread_build.diff: Add more Implies to fix ++ build. Drop deprecated internal_function. ++ * debian/patches/hurd-i386/libpthread_includes.diff: Move headers for ++ sysdeps to find them. ++ * debian/patches/hurd-i386/tg-gsync-libc.diff: Update. ++ * debian/testsuite-xfail-debian.mk: Update for hurd-i386. ++ ++ [ Aurelien Jarno ] ++ * New upstream snapshot from 20180108. ++ * debian/control.in/main: Update Vcs-Git to point to the 2.27 branch. ++ * debian/testsuite-xfail-debian.mk: update XFAILs for the mips*el Loongson 3 ++ FPU bug with the new tests. ++ * debian/testsuite-xfail-debian.mk: the arm kernel also pulled the new pkey ++ syscalls without real support, XFAIL the corresponding test. ++ * debian/testsuite-xfail-debian.mk: remove two math XFAIL on armel now that ++ GCC has been fixed. ++ * debian/testsuite-xfail-debian.mk: update XFAILs for the mips* Octeon 3 FPU ++ bug with the new tests. ++ * debian/testsuite-xfail-debian.mk: update XFAILs on alpha, add new math ++ tests only causing wrong exception flags, remove tests that have been ++ fixed in this release. ++ ++ -- Aurelien Jarno Mon, 08 Jan 2018 23:27:20 +0100 ++ ++glibc (2.26.9000+20180105.a6d0afb5-0experimental0) experimental; urgency=medium ++ ++ * New upstream snapshot from 20180105: ++ - debian/patches/git-updates.diff: remove and disable. ++ - debian/patches/locale/preprocessor-collate-uli-sucks.diff: drop, ++ obsolete. ++ - debian/patches/locale/preprocessor-collate.diff: drop, obsolete. ++ - debian/patches/locale/LC_IDENTIFICATION-optional-fields.diff: rebased. ++ - debian/patches/locale/LC_COLLATE-keywords-ordering.diff: drop, obsolete. ++ - debian/patches/locale/local-all-no-archive.diff: rebased. ++ - debian/patches/localedata/sort-UTF8-first.diff: rebased. ++ - debian/patches/localedata/supported.diff: rebased. ++ - debian/patches/localedata/new-valencian-locale.diff: upstreamed. ++ - debian/patches/localedata/locale-ku_TR.diff: rebased. ++ - debian/patches/localedata/tl_PH-yesexpr.diff: upstreamed. ++ - debian/patches/localedata/fo_FO-date_fmt.diff: rebased. ++ - debian/patches/localedata/locales_CH.diff: rebased. ++ - debian/patches/localedata/locales-fr.diff: rebased. ++ - debian/patches/localedata/locale-en_DK.diff: rebased. ++ - debian/patches/localedata/locale-zh_TW.diff: rebased. ++ - debian/patches/localedata/tailor-iso14651_t1.diff: rebased, partly ++ upstreamed. ++ - debian/patches/localedata/locale-hsb_DE.diff: upstreamed. ++ - debian/patches/localedata/tailor-iso14651_t1-common.diff: drop, ++ obsolete. ++ - debian/patches/localedata/submitted-bz9725-locale-sv_SE.diff: rebased. ++ - debian/patches/localedata/locale-C.diff: add a LC_MONETARY section. ++ - debian/patches/localedata/submitted-en_AU-date_fmt.diff: rebased. ++ - debian/patches/localedata/submitted-es_MX-decimal_point.diff: rebased. ++ - debian/patches/localedata/submitted-it_IT-thousands_sep.diff: rebased. ++ - debian/patches/alpha/local-string-functions.diff: rebased. ++ - debian/patches/alpha/submitted-fminmax.diff: upstreamed. ++ - debian/patches/alpha/submitted-rlimit.diff: upstreamed. ++ - debian/patches/arm/git-arm64-memcmp.diff: upstreamed. ++ - debian/patches/hppa/local-elf-make-cflags.diff: upstreamed. ++ - debian/patches/hppa/submitted-gmon-start.diff: upstreamed. ++ - debian/patches/hurd-i386/tg-context_functions.diff: rebased. ++ - debian/patches/hurd-i386/tg-tls-threadvar.diff: rebased. ++ - debian/patches/hurd-i386/tg-faccessat.diff: rebased. ++ - debian/patches/hurd-i386/tg-gsync-libc.diff: rebased. ++ - debian/patches/hurd-i386/submitted-shm_open_pthread.diff: upstreamed. ++ - debian/patches/hurd-i386/cvs-libc_init_secure.diff: upstreamed. ++ - debian/patches/hurd-i386/local-nocheck-installed-headers.diff: rebased. ++ - debian/patches/hurd-i386/git-bits-sysmacros.h.diff: upstreamed. ++ - debian/patches/hurd-i386/git-stack_chk_fail_local.diff: upstreamed. ++ - debian/patches/hurd-i386/git-stack-protect-static.diff: upstreamed. ++ - debian/patches/hurd-i386/git-sigsetops.h.diff: upstreamed. ++ - debian/patches/hurd-i386/git-sigsetops-2.h.diff: upstreamed. ++ - debian/patches/hurd-i386/git-sigsetops-3.h.diff: upstreamed. ++ - debian/patches/hurd-i386/git-bits_socket.h.diff: upstreamed. ++ - debian/patches/hurd-i386/git-preadwritev2.diff: upstreamed. ++ - debian/patches/hurd-i386/git-preadwritev2-2.diff: upstreamed. ++ - debian/patches/hurd-i386/git-preadwritev2-3.diff: upstreamed. ++ - debian/patches/hurd-i386/git-rtld-access.diff: upstreamed. ++ - debian/patches/hurd-i386/git-rtld-sbrk.diff: upstreamed. ++ - debian/patches/hurd-i386/git-rtld-sbrk-2.diff: upstreamed. ++ - debian/patches/hurd-i386/git-divdi.diff: upstreamed. ++ - debian/patches/hurd-i386/git-feraiseexcept.diff: upstreamed. ++ - debian/patches/hurd-i386/git-x86-tunables.diff: upstreamed. ++ - debian/patches/hurd-i386/git-i386-implies-x86.diff: upstreamed. ++ - debian/patches/hurd-i386/git-rtld-strtoul_internal.diff: upstreamed. ++ - debian/patches/hurd-i386/git-clone.diff: upstreamed. ++ - debian/patches/hurd-i386/git-gethostname.diff: upstreamed. ++ - debian/patches/hurd-i386/git-tst-udp-timeout.diff: upstreamed. ++ - debian/patches/hurd-i386/git-tst-udp-nonblocking.diff: upstreamed. ++ - debian/patches/hurd-i386/git-hidden-def.diff: upstreamed. ++ - debian/patches/hurd-i386/git-hidden-def-2.diff: upstreamed. ++ - debian/patches/hurd-i386/git-dl-sysdep-check.diff: upstreamed. ++ - debian/patches/hurd-i386/git-socket-limit.diff: upstreamed. ++ - debian/patches/hurd-i386/git-clock_gettime_gettimeofday.diff: upstreamed. ++ - debian/patches/hurd-i386/git-sigsuspend_not_cancel.diff: upstreamed. ++ - debian/patches/hurd-i386/git-dirfd-linknamespace.diff: upstreamed. ++ - debian/patches/hurd-i386/git-revoke-linknamespace.diff: upstreamed. ++ - debian/patches/hurd-i386/git-seekdir-linknamespace.diff: upstreamed. ++ - debian/patches/hurd-i386/git-ifaddrs-linknamespace.diff: upstreamed. ++ - debian/patches/hurd-i386/git-NO_HIDDEN.diff: upstreamed. ++ - debian/patches/hurd-i386/git-mount_namespace.diff: upstreamed. ++ - debian/patches/mips/git-syscalls5-7-unbound-stack.diff: upstreamed. ++ - debian/patches/any/local-ld-multiarch.diff: rebased. ++ - debian/patches/any/local-disable-libnss-db.diff: rebased. ++ - debian/patches/any/local-cudacc-float128.diff: rebased. ++ - debian/patches/any/submitted-ldconfig-c-collation.diff: upstreamed. ++ - debian/patches/any/git-any-ld.so-newline.diff: upstreamed. ++ - debian/control.in/main: add a Build-Depends on bison. ++ - debian/symbols.wildcards: update for 2.26.9000. ++ - debian/rules: do not remove po/*.mo* on cleanup, they are not built in ++ the source directory anymore. ++ - debian/debhelper.in/glibc-doc.install: rename into glibc-docs.docs and ++ update to the new changelogs location. ++ - debian/changelog.upstream: update changelogs size. ++ - debian/debhelper.in/libc-dev{,-alt}.{install,lintian-overrides}: remove ++ libieee.a. ++ - debian/testsuite-xfail-debian.mk: rename math XFAILs: float -> float32, ++ double -> float64, ldouble -> float128. ++ * debian/testsuite-xfail-debian.mk: mark misc/tst-pkey as XFAIL on alpha, ++ arm64 and mips*, as there is a disagreement between kernel and glibc how ++ to report missing protection key support when the syscalls have been ++ wired. ++ ++ -- Aurelien Jarno Fri, 05 Jan 2018 22:08:07 +0100 ++ ++glibc (2.26-7) UNRELEASED; urgency=medium ++ ++ [ Samuel Thibault ] ++ * debian/patches/hurd-i386/tg-grantpt.diff: Update patch. ++ * debian/patches/hurd-i386/git-libpthread-trylock.diff: New patch. ++ ++ -- Aurelien Jarno Sat, 17 Feb 2018 23:20:49 +0100 ++ ++glibc (2.26-6) unstable; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * debian/patches/git-updates.diff: update from upstream stable branch: ++ - Fix build with binutils 2.30 on arm64. Closes: #888477. ++ ++ -- Aurelien Jarno Fri, 26 Jan 2018 23:35:29 +0100 ++ ++glibc (2.26-5) unstable; urgency=medium ++ ++ [ Samuel Thibault ] ++ * debian/patches/any/local-cudacc-float128.diff: Disable _Float128 for icc ++ too. ++ ++ [ Aurelien Jarno ] ++ * debian/control.in/libc: set the priority of the libc{0.1,0.3,0.6} packages ++ to optional following the changes on the ftp-master side (see bug#846982). ++ * debian/control.in/libc: build-depends on gcc-7 (>= 7.2.0-20) on amd64, i386 ++ and x32 to avoid a missed optimization causing SSE registers to be pushed ++ on the stack. Closes: #886447. ++ * debian/patches/git-updates.diff: update from upstream stable branch: ++ - debian/patches/hurd-i386/git-mount_namespace.diff: upstreamed. ++ * debian/testsuite-xfail-debian.mk: update with new tests. ++ * debian/debhelper.in/libc.NEWS: note that the minimum required Linux kernel ++ is now 3.2 to avoid aborts in the middle of an upgrade. Closes: #888183. ++ ++ -- Aurelien Jarno Tue, 23 Jan 2018 22:51:51 +0100 ++ ++glibc (2.26-4) unstable; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * debian/testsuite-xfail-debian.mk: since we now also run the testsuite for ++ the multilib flavours, simplify the mips* entries into mips*, mips be and ++ mips le, instead of trying to keep all the flavours in sync. Remove ++ XFAILs for tests that have been fixed. ++ * debian/patches/git-updates.diff: update from upstream stable branch: ++ - Fix a buffer underflow in getcwd() (CVE-2018-1000001). Closes: ++ #887001. ++ * debian/control.in/*: add conflicts to only allow one to install one set ++ of multilib packages simultaneously. Closes: #702962, #743618, #784015, ++ #820826, #870257. ++ ++ -- Aurelien Jarno Sun, 14 Jan 2018 11:24:48 +0100 ++ ++glibc (2.26-3) unstable; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * debian/testsuite-xfail-debian.mk: the Loongson 3 FPU bug also applies ++ to mips64el. ++ * debian/patches/git-updates.diff: update from upstream stable branch: ++ - Fix memchr pointer overflow on ia64. Closes: #886840. ++ ++ [ Samuel Thibault ] ++ * debian/patches/hurd-i386/submitted-malloc-setstate.diff: Disable for now, it ++ actually introduces issues. ++ * debian/patches/hurd-i386/submitted-exec_filename.diff: Update submitted ++ patch into committed git-exec_filename.diff. ++ * debian/patches/hurd-i386/local-exec_filename.diff: New patch to keep ++ compatibility with previous submission. ++ * debian/patches/hurd-i386/tg-io_select_timeout.diff: Refresh. ++ * debian/control: Bump hurd-dev build-dependency to get exec_paths RPC ++ definitions. ++ * debian/libc0.3.symbols.hurd-i386: Update accordingly. ++ ++ -- Samuel Thibault Thu, 11 Jan 2018 23:12:24 +0100 ++ ++glibc (2.26-2) unstable; urgency=medium ++ ++ [ Samuel Thibault ] ++ * patches/hurd-i386/unsubmitted-mount_namespace.diff: Rename to ++ git-mount_namespace.diff. ++ ++ [ Helmut Grohne ] ++ * debian/rules.d/build.mk: Remove a left-over closing brace, breaking ++ stage 1. Closes: #886301. ++ ++ [ Aurelien Jarno ] ++ * debian/sysdeps/hppa.mk: increase TIMEOUTFACTOR to 600 on HPPA. ++ ++ -- Aurelien Jarno Fri, 05 Jan 2018 19:09:39 +0100 ++ ++glibc (2.26-1) unstable; urgency=medium ++ ++ [ Samuel Thibault ] ++ * patches/hurd-i386/unsubmitted-mount_namespace.diff: New patch to fix build ++ of support/support_enter_mount_namespace.c on hurd-i386. ++ ++ [ Aurelien Jarno ] ++ * debian/control.in/main: this upload targets unstable, update Vcs-Git ++ accordingly. ++ ++ -- Aurelien Jarno Wed, 03 Jan 2018 18:30:46 +0100 ++ ++glibc (2.26-0experimental3) experimental; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * debian/patches/any/local-ldso-disable-hwcap.diff: Include ++ before . ++ * debian/rules, debian/rules.d/build.mk: stop logging build/check messages ++ to files, both sbuild and debuild are able to do that. ++ * debian/rules, debian/rules.d/build.mk: allow TIMEOUTFACTOR to be override ++ per architecture. ++ * debian/sysdeps/hppa.mk: set TIMEOUTFACTOR to 100 on HPPA. ++ * debian/testsuite-xfail-debian.mk: remove tst-create-detached from XFAIL ++ on HPPA. ++ * debian/patches/git-updates.diff: update from upstream stable branch: ++ - Fix tst-realloc when heap space is exhausted. ++ * debian/testsuite-xfail-debian.mk: convert alpha math XFAILs into granular ++ XFAILs. ++ * debian/testsuite-xfail-debian.mk: remove tst-realloc from XFAIL on ++ sparc64. ++ ++ -- Aurelien Jarno Mon, 01 Jan 2018 13:50:41 +0100 ++ ++glibc (2.26-0experimental2) experimental; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * debian/testsuite-xfail-debian.mk: move double-lround XFAILs from mips64el ++ to mipsel. ++ * debian/patches/git-updates.diff: update from upstream stable branch: ++ - Fix malloc returning pointer from tcache_get when it should returns ++ NULL (CVE-2017-17426). Closes: #883729. ++ - Drop debian/patches/ia64/git-ia64-crash-thread-exit.diff (merged ++ upstream). ++ * debian/control.in/libc: add a Breaks: libperl5.26 (<< 5.26.1-3) to ++ @libc@-dev to handle the xlocale.h removal. Closes: #883392. ++ * debian/control.in/main: point the Vcs-Git field to the glibc-2.26 branch ++ to shut up tracker.debian.org about missing commits. ++ * debian/testsuite-xfail-debian.mk: x32: remove a bunch of conform issues, ++ add tst-platform-1, as this test has x86-64 specific expectations. ++ * debian/sysdeps/sparc64.mk: don't force -mcpu=ultrasparc as that ++ miscompiles at least pthread_barrier_wait.c. Mark tst-realloc as XFAIL, as ++ there are way to trigger the issue on older libc and/or other ++ architectures. ++ * debian/patches/locale/fix-LC_COLLATE-rules.diff: drop, not useful anymore ++ and has side effects. ++ * debian/patches/localedata/local-hu_HU-sort.diff: removed, the hu_HU ++ collation is now the same than upstream. ++ ++ -- Aurelien Jarno Sun, 17 Dec 2017 18:44:55 +0100 ++ ++glibc (2.26-0experimental1) experimental; urgency=medium ++ ++ [ Samuel Thibault ] ++ * debian/testsuite-xfail-debian.mk: Update hurd-i386 xfail with new test. ++ ++ [ Aurelien Jarno ] ++ * Bump build-dependency on binutils to >= 2.25, as required by glibc 2.26. ++ * debian/testsuite-xfail-debian.mk: re-add double-lround XFAILs for ++ mips64el. ++ * debian/patches/git-updates.diff: update from upstream stable branch. ++ ++ -- Aurelien Jarno Wed, 22 Nov 2017 17:46:32 +0100 ++ ++glibc (2.26-0experimental0) experimental; urgency=medium ++ ++ [ Adam Conrad ] ++ * New upstream release (LP: #1703368), with git updates to 2017-10-10: ++ - debian/{symbols.wildcards,control}: Update and regen for 2.26. ++ - debian/patches/alpha/submitted-termios_h.diff: upstreamed. ++ - debian/patches/arm/submitted-strip-bit-0.diff: upstreamed. ++ - debian/patches/hurd-i386/git-__inet6_scopeid_pton.diff: upstreamed. ++ - debian/patches/any/submitted-string2-strcmp.diff: obsolete. ++ - debian/patches/any/local-tst-writev.diff: fixed upstream. ++ - debian/patches/any/local-dynamic-resolvconf.diff: fixed upstream. ++ - debian/patches/any/submitted-unicode-9.0.0.diff: obsolete. ++ - debian/patches/any/cvs-malloc-hardening.diff: upstreamed. ++ - debian/patches/any/local-bits-sigstack.diff: fixed upstream. ++ - debian/patches/powerpc/submitted-tst-tlsopt-powerpc.diff: upstreamed. ++ - debian/patches/i386/local-cmov.diff: dropped, no longer useful. ++ - debian/patches/all/local-ldd.diff: rebased. ++ - debian/patches/any/local-ldso-disable-hwcap.diff: rebased. ++ - debian/patches/any/local-tcsetaddr.diff: rebased. ++ - debian/patches/any/submitted-resolv-unaligned.diff: rebased. ++ - debian/patches/arm/local-arm-futex.diff: rebased. ++ - debian/patches/hurd-i386/local-ED.diff: rebased. ++ - debian/patches/hurd-i386/tg-EGREGIOUS-fr.diff: rebased. ++ - debian/patches/hurd-i386/tg-EIEIO-fr.diff: rebased. ++ - debian/patches/kfreebsd/submitted-auxv.diff: rebased. ++ - debian/patches/kfreebsd/submitted-waitid.diff: rebased. ++ - debian/patches/localedata/locales-fr.diff: rebased. ++ - debian/patches/sparc/submitted-sparc64-socketcall.diff: rebased. ++ - debian/patches/localedata/local-hu_HU-sort.diff: Make testsuite ++ agree with the sorting we see in Debian, may need another look. ++ - debian/patches/any/local-cudacc-float128.diff: Local patch to prevent ++ defining __HAVE_FLOAT128 on NVIDIA's CUDA compilers (LP: #1717257) ++ - debian/patches/arm/git-arm64-memcmp.diff: Backport optimized memcmp ++ for AArch64, improving performance from 25% to 500% (LP: #1720832) ++ - debian/control.in/libc: Drop ancient Breaks satisfied in oldoldstable. ++ - debian/{debhelper.in/libc.preinst,sysdeps/amd64.mk,sysdeps/i386.mk}: ++ Bump MIN_KERNEL_SUPPORTED to 3.2 on x86, following upstream's change. ++ - debian/sysdeps/{powerpc.mk,ppc64.mk,s390x.mk}: Disable lock-elision on ++ powerpc and s390, following IBM's recommendation. ++ - debian/testsuite-xfail-debian.mk: Re-enable xfailed resolv tests. ++ - debian/testsuite-xfail-debian.mk: Allow tst-create-detached to fail on ++ all platforms; the design of this test is such that the outcome relies ++ on cache sizes and noisiness of the build system, which is unreliable. ++ - debian/rules.d/build.mk: Configure with --enable-obsolete-nsl until we ++ sort out a reasonable nsswitch migration strategy from compat to files. ++ ++ [ Samuel Thibault ] ++ * Adjust hurd-i386 patches to restore build and functionality with 2.26: ++ - patches/hurd-i386/tg-gsync-libc.diff: rebased. ++ - patches/hurd-i386/tg-hurdsig-global-dispositions.diff: rebased. ++ - patches/hurd-i386/tg-pipe2.diff: rebased. ++ - patches/hurd-i386/tg-socket_flags.diff: rebased. ++ - patches/hurd-i386/tg2.25-tls.diff: rebased. ++ - patches/hurd-i386/tg2.26-sched_param.diff: New patch. ++ - patches/hurd-i386/git-sigsetops.h.diff: New patch. ++ - patches/hurd-i386/git-sigsetops-2.h.diff: New patch. ++ - patches/hurd-i386/git-sigsetops-3.h.diff: New patch. ++ - patches/hurd-i386/tg2.26-sigsetops.h.diff: New patch. ++ - patches/hurd-i386/git-bits_socket.h.diff: New patch. ++ - patches/hurd-i386/git-preadwritev2.diff: New patch. ++ - patches/hurd-i386/git-preadwritev2-2.diff: New patch. ++ - patches/hurd-i386/git-preadwritev2-3.diff: New patch. ++ - patches/hurd-i386/git-rtld-access.diff: New patch. ++ - patches/hurd-i386/git-rtld-sbrk.diff: New patch. ++ - patches/hurd-i386/git-rtld-sbrk-2.diff: New patch. ++ - patches/hurd-i386/git-divdi.diff: New patch. ++ - patches/hurd-i386/git-feraiseexcept.diff: New patch. ++ - patches/hurd-i386/cvs-libpthread.diff: Update. ++ - patches/hurd-i386/git-libpthread-2.26.diff: New patch. ++ - patches/hurd-i386/git-i386-implies-x86.diff: New patch. ++ - patches/hurd-i386/git-x86-tunables.diff: New patch. ++ - patches/hurd-i386/git-rtld-strtoul_internal.diff: New patch. ++ - patches/hurd-i386/git-clone.diff: New patch. ++ - patches/hurd-i386/git-gethostname.diff: New patch. ++ - patches/hurd-i386/cvs-libpthread-sigstate.diff: Remove unused merged ++ patch. ++ - patches/hurd-i386/cvs-send-recv-posix.diff: Remove unused merged patch. ++ - patches/hurd-i386/cvs-truncate64.diff: Remove unused merged patch. ++ - patches/hurd-i386/git-tst-udp-timeout.diff: New patch. ++ - patches/hurd-i386/git-tst-udp-nonblocking.diff: New patch. ++ - patches/hurd-i386/unsubmitted-exp-hidden-jump.diff: New patch. ++ - patches/hurd-i386/git-hidden-def.diff: New patch. ++ - patches/hurd-i386/git-hidden-def.diff-2: New patch. ++ - patches/hurd-i386/git-dl-sysdep-check.diff: New patch. ++ - patches/hurd-i386/git-socket-limit.diff: New patch. ++ - patches/hurd-i386/tg-thread-linkspace.diff: New patch. ++ - patches/hurd-i386/git-clock_gettime_gettimeofday.diff: New patch. ++ - patches/hurd-i386/tg-gsync-libc.diff: Update. ++ - patches/hurd-i386/tg-libpthread-gsync-mutex.diff: Update. ++ - patches/hurd-i386/tg-sendmsg-SCM_CREDS.diff: Update. ++ - patches/hurd-i386/git-sigsuspend_not_cancel.diff: New patch. ++ - patches/hurd-i386/tg-sysvshm.diff: Update. ++ - patches/hurd-i386/tg-ifaddrs_v6.diff: Update. ++ - patches/hurd-i386/git-dirfd-linknamespace.diff: New patch. ++ - patches/hurd-i386/git-revoke-linknamespace.diff: New patch. ++ - patches/hurd-i386/git-seekdir-linknamespace.diff: New patch. ++ - patches/hurd-i386/git-ifaddrs-linknamespace.diff: New patch. ++ - patches/hurd-i386/git-NO_HIDDEN.diff: New patch. ++ - patches/hurd-i386/unsubmitted-NO_HIDDEN.diff: Remove patch. ++ - patches/hurd-i386/unsubmitted-exp-hidden-jump.diff: Remove patch. ++ - testsuite-xfail-debian.mk: Update. ++ - testsuite-xfail-debian.mk: Remove now-removed XPG3 entries. ++ ++ [ Aurelien Jarno ] ++ * debian/patches/git-updates.diff: update from upstream stable branch: ++ - Fix buffer overflow in glob with GLOB_TILDE (CVE-2017-15670). Closes: ++ #879501. ++ - Fix memory leak in glob with GLOB_TILDE (CVE-2017-15671). Closes: ++ #879500. ++ * debian/rules, debian/control.in/main: build with GCC 7. ++ * debian/testsuite-xfail-debian.mk: remove a few XFAIL on s390x that were ++ due to GCC 6 issues. ++ * debian/testsuite-xfail-debian.mk: drop support for s390. ++ * debian/testsuite-xfail-debian.mk: Use granular fma XFAIL on mips*. ++ * debian/testsuite-xfail-debian.mk: mark misc/tst-set_ppr as XFAIL on ++ powerpc as it requires a recent CPU or a recent kernel for CPU feature ++ detection. ++ * debian/patches/any/local-libgcc-compat-{abilists,main,ports}.diff: drop ++ workaround for binaries built with some broken versions of GCC 3.2 more ++ than 10 years ago. ++ * debian/testsuite-xfail-debian.mk: remove many XFAIL from mips, mipsel and ++ mips64el. ++ ++ -- Aurelien Jarno Sun, 19 Nov 2017 12:49:13 +0100 ++ ++glibc (2.25-6) unstable; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * debian/control.in/main: add mips r6 architectures to Build-Depends: ++ g++-6-multilib. Closes: #884774. ++ * debian/patches/git-updates.diff: update from upstream stable branch: ++ - Fixes incorrect RPATH/RUNPATH handling for SUID binaries ++ (CVE-2017-16997). Closes: #884615. ++ * debian/control.in/main, debian/copyright, rules.d/tarball.mk: prefer ++ https for upstream links. ++ * debian/control.in/main: bump Standards-Version to 4.1.3. ++ * debian/patches/alpha/submitted-rlimit.diff: new patch to fix getrlimit ++ and setrlimit with RLIM_INFINITY on alpha. ++ * debian/patches/alpha/submitted-fminmax.diff: new patch to fix fmin and ++ fmax on alpha. ++ * debian/testsuite-xfail-debian.mk: mark test-fexcept, test-ldouble and ++ test-ldouble-finite as XFAIL as the failures are due to new tests, and ++ thus not a regression. ++ ++ -- Aurelien Jarno Sun, 31 Dec 2017 18:50:30 +0100 ++ ++glibc (2.25-5) unstable; urgency=medium ++ ++ [ Samuel Thibault ] ++ * hurd-i386/git-rtld-access.diff: Fix spurious errno update. ++ ++ [ Aurelien Jarno ] ++ * debian/rules.d/debhelper.mk: strip all *crt*.o files, unless ++ DEB_BUILD_OPTIONS contains nostrip. Closes: #884524. ++ * debian/patches/git-updates.diff: update from upstream stable branch: ++ - Fix memory leak in ld.so (CVE-2017-1000408). Closes: #884132. ++ - Fix buffer overflow in ld.so (CVE-2017-1000409). Closes: #884133. ++ ++ -- Aurelien Jarno Sat, 16 Dec 2017 15:37:43 +0100 ++ ++glibc (2.25-4) unstable; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * debian/patches/kfreebsd/local-sysdeps.diff: update to revision 6194 (from ++ glibc-bsd): ++ - Provide TCP_KEEPIDLE in netinet/tcp.h. Closes: #881185. ++ - Fix FTBFS on kfreebsd-amd64. ++ * debian/control.in/libc: add conflicts with libc0.1-i686 on kfreebsd-i386 ++ and libc6-i686 on i386, to make sure the transitional packages are not ++ kept when upgrading from stretch. ++ * debian/patches/any/local-ldso-disable-hwcap.diff: use __access_noerrno ++ instead of __access. Closes: #877493. ++ * debian/rules, debian/rules.d/debhelper.mk: reverse the logic to build ++ libc6-dbg. Only fill it with files from the main libc and optimized ++ flavours. Other debugging symbols are available in the dbgsym packages. ++ Closes: #520680. ++ * debian/rules.d/build.mk: add /usr/local multi-arch paths to ld.so.conf ++ files. Closes: #685519, #771934. ++ * debian/patches/any/git-any-ld.so-newline.diff: add missing newline after ++ "cannot allocate TLS data structures for initial thread". Closes: ++ #776659. ++ * debian/glibc-source.filelist: update with the latest mips* symbol files. ++ * debian/patches/git-updates.diff: update from upstream stable branch: ++ - Fix SysV IPC on IA64. Closes: #884194. ++ ++ [ Samuel Thibault ] ++ * patches/hurd-i386/local-no-bootstrap-fs-access.diff: Refresh. ++ * patches/hurd-i386/git-rtld-access.diff: New patch. ++ * patches/hurd-i386/local-msg-nosignal.diff: Remove, now useless. ++ * testsuite-xfail-debian.mk: Update gnu-gnu according to git-updates.diff. ++ * control: Bump hurd-dev build-dep. ++ * libc0.3.symbols.hurd-i386: Update symbols accordingly. ++ ++ -- Aurelien Jarno Tue, 12 Dec 2017 20:21:48 +0100 ++ ++glibc (2.25-3) unstable; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * debian/patches/git-updates.diff: update from upstream stable branch: ++ - Fix assertion failure in posix_spawn(). Closes: #882794. ++ - Fix missing posix_fadvise64 from static mips64el build. Closes: ++ #883186. ++ - Fix buffer overflow in glob with GLOB_TILDE (CVE-2017-15670). Closes: ++ #879501. ++ - Fix memory leak in glob with GLOB_TILDE (CVE-2017-15671). Closes: ++ #879500. ++ - Fix a buffer overflow in glob with GLOB_TILDE in unescaping ++ (CVE-2017-15804). Closes: #879955. ++ * debian/patches/any/local-dlfptr.diff: remove, it's not used anymore by ++ HPPA and causes issues on IA64. Closes: #882874. ++ * debian/patches/submitted-ldconfig-c-collation.diff: New patch to process ++ include directives in ldconfig using the C/POSIX collation. ++ * debian/patches/ia64/git-ia64-crash-thread-exit.diff: Fix crash on thread ++ exit on IA64. Closes: #883285. ++ * debian/sysdeps/x32.mk: set the minimum kernel version to 2.6.32 for the ++ libc6-amd64:x32 and libc6-i386:x32 flavours, to match libc6:amd64 and ++ libc6:i386. Closes: #882255. ++ * debian/sysdeps/linux.mk: note that all builds for a given gnu triplet ++ have the same minimum kernel version. ++ ++ [ Samuel Thibault ] ++ * libc0.3.symbols.hurd-i386: Update against newer hurd definitions. ++ * control: Bump dependency accordingly. ++ ++ [ Jason Duerstock ] ++ * debian/control.in/libc, debian/control.in/main, debian/rules.d/control.mk: ++ Add support for IA64. Closes: #883012. ++ ++ -- Aurelien Jarno Sat, 02 Dec 2017 11:07:17 +0100 ++ ++glibc (2.25-2) unstable; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * debian/testsuite-xfail-debian.mk: move corner cases FPU XFAIL from ++ mips/mipsel section to mips* section. ++ * debian/control.in/libc: add a Conflicts: again openrc (<< 0.27-2~). ++ Closes: #882129. ++ * debian/control.in/libc: add Breaks: and Replaces against ++ kfreebsd-kernel-headers (<< 10.3~4) to avoid conflict. ++ Closes: #882346. ++ * debian/testsuite-xfail-debian.mk: mark tst-create-detached on HPPA. ++ Closes: #882152. ++ * debian/patches/git-updates.diff: update from upstream stable branch: ++ - Don't use IFUNC resolver for longjmp or system in libpthread. ++ Closes: #882336. ++ * debian/script.in/nohwcap.sh: always check for all optimized packages ++ as multiarch allows one to install foreign architectures. Closes: ++ #882272. ++ ++ [ YunQiang Su ] ++ * Add symbol files for mipsn32 and mips64. ++ ++ [ YunQiang Su / Aurelien Jarno ] ++ * Add mipsr6, mipsr6el, mipsn32r6, mipsn32r6el, mips64r6, mips64r6el ++ architectures. Closes: #824985, #881457. ++ ++ -- Aurelien Jarno Wed, 22 Nov 2017 00:14:20 +0100 ++ ++glibc (2.25-1) unstable; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * debian/rules.d/debhelper.mk: relax the dependency on linux-libc-dev ++ to the major upstream version. ++ ++ -- Aurelien Jarno Sat, 18 Nov 2017 10:13:37 +0100 ++ ++glibc (2.25-0experimental4) experimental; urgency=medium ++ ++ [ Samuel Thibault ] ++ * patches/hurd-i386/git-bits-sysmacros.h.diff: New patch. ++ * patches/hurd-i386/git-stack_chk_fail_local.diff: New patch. ++ * patches/hurd-i386/git-stack-protect-static.diff: New patch. ++ * patches/hurd-i386/cvs-libpthread.diff: Update, fixes rt/tst-aio and ++ rt/tst-aio64 sync ordering. ++ * sysdeps/hurd.mk: Enable stack-protector on the Hurd. ++ ++ [ Aurelien Jarno ] ++ * debian/patches/git-updates.diff: update from upstream stable branch: ++ - Fix TLS relocations against local symbols on powerpc, sparc and ++ sparc64. Closes: #874074. ++ * Replace debian/patches/mips/submitted-syscalls5-7-unbound-stack.diff ++ by the final version git/submitted-syscalls5-7-unbound-stack.diff. ++ * debian/rules.d/debhelper.mk: do not install gdb python hooks for stage 1. ++ Closes: #874491. ++ * Update Portuguese debconf translation, by Pedro Ribeiro. ++ Closes: #874610. ++ * Update German debconf translation, by Helge Kreutzman. Closes: #877291. ++ * debian/sysdeps/ppc64el.mk: disable lock elision. Closes:# 878071. ++ * debian/script.in/nohwcap.sh: fix alpha ev67 optimized package name. ++ Closes: #881147. ++ * debian/debhelper.in/libc.postinst, script.in/nsscheck.sh: check for ++ postgresql in NSS check. Closes: #710275. ++ * debian/sysdeps/{alpha,hurd-i386,i386}.mk: do not build optimized libraries ++ libc6.1-alphaev67, libc6-xen and libc0.3-xen during stage 1 and stage 2. ++ Closes: #881455, #881636. ++ * debian/rules, debian/sysdeps/*.mk: skip the multilib pass for the nobiarch ++ profile (in addition to skipping the package creation). ++ * debian/rules: only build -dev multilib packages in stage1. Closes: ++ #881454, #881646. ++ ++ -- Aurelien Jarno Tue, 14 Nov 2017 23:38:04 +0100 ++ ++glibc (2.25-0experimental3) experimental; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * debian/debhelper.in/libc-dev-alt.install, debian/rules.d/debhelper.mk: do ++ no try to install libm-*.a for builds without mvec. ++ * debian/rules.d/build.mk: run configure with --enable-stack-protector= ++ strong. ++ * debian/sysdeps/hurd.mk: disable stack-protector on the Hurd. ++ * debian/patches/kfreebsd/local-sysdeps.diff: update to revision 6172 (from ++ glibc-bsd). ++ * debian/rules, debian/rules.d/build.mk, debian/control.in/main: use ++ dh_update_autotools_config from debhelper instead of ++ dh_autotools-dev_updateconfig from autotools-dev. ++ ++ -- Aurelien Jarno Sun, 27 Aug 2017 01:49:39 +0200 ++ ++glibc (2.25-0experimental2) experimental; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * Do not try to install NPTL GDB pretty-printers on non-Linux. ++ * debian/control.in/main: build-depends on autotools-dev. ++ * debian/rules, debian/rules.d/build.mk: update/restore config.guess and ++ config.sub on configure/clean. ++ * debian/debhelper.in/libc-dev{-alt,}.install: install libm-*.a to also ++ install the versioned static library on architectures with mvec support. ++ Closes: #872852. ++ * debian/patches/git-updates.diff: update from upstream stable branch. ++ * debian/rules.d/build.mk: reduce TIMEOUTFACTOR to 15 from 25. This should ++ fix FTBFS on HPPA. ++ * debian/debhelper.in/nscd.init: add support for the try-restart argument ++ to nscd's init script. ++ * debian/debhelper.in/libc.postinst, debian/script.in/nsscheck.sh: drop ++ wheezy to jessie upgrade code for samba. ++ * debian/debhelper.in/libc.postinst, debian/debhelper.in/libc.templates, ++ debian/po/*: do not call /etc/init.d scripts even as a fallback as ++ invoke-rc.d is now always available. ++ * debian/debhelper.in/libc.preinst, debian/debhelper.in/libc.postrm: drop ++ code to handle upgrades from wheezy. ++ * debian/script.in/nohwcap.sh: drop code to support libc0.1-i686 and ++ libc6-i686. ++ * debhelper.in/*.lintian-overrides: cleanup lintian overrides. ++ * debian/control.in/main: drop the XS-Testsuite field, it has been replaced ++ by a Testsuite field automatically added by dpkg. ++ * debian/control.in/main: bump Standards-Version to 4.0.1. ++ ++ -- Aurelien Jarno Sat, 26 Aug 2017 16:22:03 +0200 ++ ++glibc (2.25-0experimental1) experimental; urgency=medium ++ ++ [ Samuel Thibault ] ++ * patches/hurd-i386/submitted-net.diff: rebased. ++ * patches/hurd-i386/tg-tls.diff: update. ++ * patches/hurd-i386/submitted-malloc-setstate.diff: update. ++ * patches/hurd-i386/submitted-shm_open_pthread.diff: new patch. ++ * patches/hurd-i386/cvs-libc_init_secure.diff: new patch. ++ * patches/hurd-i386/cvs-libpthread.diff: update. ++ * patches/hurd-i386/git-__inet6_scopeid_pton.diff: new patch from upstream. ++ * patches/hurd-i386/tg2.25-tls.diff: new patch. ++ * patches/hurd-i386/local-nocheck-installed-headers.diff: New patch to ++ disable checking hurd and mach headers for standards, they are not. ++ * patches/hurd-i386/submitted-net.diff: Disable installing if_ppp.h, it just ++ does not work without OS-specific ppp_defs.h. ++ * testsuite-xfail-debian.mk: update for hurd-i386. ++ ++ [ Aurelien Jarno ] ++ * debian/patches/git-updates.diff: update from upstream stable branch: ++ - Reduce EDNS payload size to 1200 bytes (CVE-2017-12132). Closes: ++ #870650. ++ - debian/patches/hppa/local-fptr-table-size.diff: upstreamed. ++ - debian/patches/hppa/local-shmlba.diff: upstreamed. ++ - debian/patches/hppa/submitted-gmon-start.diff: partially upstreamed. ++ - debian/patches/hppa/submitted-dladdr.diff: upstreamed. ++ - debian/patches/hppa/local-stack-grows-up.diff: upstreamed. ++ - debian/patches/hppa/submitted-setcontext.diff: upstreamed. ++ - debian/patches/hppa/submitted-sysdeps-cancel.diff: upstreamed. ++ - debian/patches/hppa/submitted-longjmp.diff: upstreamed. ++ * debian/patches/kfreebsd/local-sysdeps.diff, local-fbtl.diff: ++ update to revision 6171 (from glibc-bsd). ++ * testsuite-xfail-debian.mk: update for kfreebsd-i386. ++ * debian/patches/any/local-bits-sigstack.diff: new patch to fix ++ on Hurd and kFreeBSD. ++ * debian/control.in/main: Build-Depends on python3 when running the ++ testsuite. ++ * debian/rules.d/build.mk, debian/debhelper.in/libc-dev.install, ++ debian/debhelper.in/libc-dev-alt.install: install the NPTL GDB ++ pretty-printer python macros in the libc6-dev and libc6-*-dev packages. ++ Closes: #868247. ++ * debian/debhelper.in/libc-dev-alt.{preinst,postinst}: remove, used to ++ handle the multiarch transition. ++ * debian/debhelper.in/libc.{preinst,postinst}: remove code not needed ++ since jessie. ++ * debian/patches/mips/submitted-syscalls5-7-unbound-stack.diff: new ++ patch to fix unbounded stack allocation in O32 syscalls with 5 to 7 ++ arguments, causing nptl/tst-rwlock15 to fail on mips and mipsel. ++ * debian/control.in/main,debian/compat: switch to debhelper 10. ++ ++ [ John David Anglin ] ++ * debian/patches/any/submitted-resolv-unaligned.diff: new patch to fix ++ misaligned accesses in res_query.c to fields in HEADER struct (closes: ++ #827703). ++ ++ -- Aurelien Jarno Sun, 20 Aug 2017 19:02:51 +0200 ++ ++glibc (2.25-0experimental0) experimental; urgency=medium ++ ++ * New upstream release: ++ - debian/control: regenerate. ++ - debian/symbols.wildcard: update for 2.25. ++ - debian/patches/git-updates.diff: update from upstream stable branch. ++ - debian/patches/alpha/local-string-functions.diff: rebased. ++ - debian/patches/alpha/submitted-fegetenv-namespace.diff: upstreamed. ++ - debian/patches/amd64/local-blacklist-for-Intel-TSX.diff: upstreamed. ++ - debian/patches/hppa/cvs-atomic-machine.diff: upstreamed. ++ - debian/patches/hurd-i386/tg-tls.diff: rebased. ++ - debian/patches/hurd-i386/tg-tls-threadvar.diff: rebased. ++ - debian/patches/hurd-i386/tg-hurdsig-fixes-2.diff: rebased. ++ - debian/patches/hurd-i386/unsubmitted-NO_HIDDEN.diff: rebased. ++ - debian/patches/hurd-i386/cvs-check-local-headers.diff: upstreamed. ++ - debian/patches/hurd-i386/tg-faccessat.diff: rebased and reworked. ++ - debian/patches/hurd-i386/tg-gsync-libc.diff: rebased. ++ - debian/patches/hurd-i386/git-recvmsg.diff: upstreamed. ++ - debian/patches/hurd-i386/cvs-adjtime-NULL.diff: upstreamed. ++ - debian/patches/hurd-i386/cvs-mallocfork.diff: upstreamed. ++ - debian/patches/hurd-i386/cvs-hurd_signal.h_c++.diff: upstreamed. ++ - debian/patches/i386/cvs-cpuid-level2.diff: upstreamed. ++ - debian/patches/kfreebsd/submitted-auxv.diff: rebased. ++ - debian/patches/sparc/cvs-test-strncmp.diff: upstreamed. ++ - debian/patches/any/local-rtlddir-cross.diff: rebased. ++ - debian/patches/any/local-asserth-decls.diff: rebased. ++ - debian/patches/any/submitted-longdouble.diff: dropped, obsolete. ++ - debian/patches/any/local-disable-libnss-db.diff: rebased. ++ - debian/patches/any/local-revert-bz13979.diff: rebased. ++ - debian/patches/any/submitted-dlopen-noload.diff: upstreamed. ++ - debian/patches/any/cvs-malloc-hardening.diff: rebased. ++ * debian/testsuite-xfail-debian.mk: mark a few resolv related tests as ++ XFAIL, as they fail due to local-dynamic-resolvconf.diff, which ++ automatically reload a changed /etc/resolv.conf file. A better version ++ of this patch has been merged in glibc 2.26, but is not easily ++ backportable. ++ * debian/testsuite-xfail-debian.mk: mark tst-strfrom and tst-strfrom-locale ++ as XFAIL on mips*, they are due to corner case bugs in the FPU. Give more ++ details about each issue. ++ * debian/testsuite-xfail-debian.mk: mark test-double, test-idouble, ++ test-ifloat and test-ildouble as XFAIL on s390x, they are due to a bug in ++ GCC 6 (fixed in GCC 7) and not a regression from 2.24. ++ ++ -- Aurelien Jarno Wed, 02 Aug 2017 18:54:56 +0200 ++ ++glibc (2.24-18) UNRELEASED; urgency=medium ++ ++ [ Samuel Thibault ] ++ * libc0.3.symbols.hurd-i386: Update with proc_set/get_exe RPCs. ++ * patches/hurd-i386/tg-hurdsig-SA_SIGINFO.diff: Always define SA_SIGINFO. ++ * patches/hurd-i386/local-no_unsupported_ioctls.diff: New patch. ++ * patches/hurd-i386/local-clock_gettime_MONOTONIC.diff: Complete with ++ clock_getres(). ++ * patches/hurd-i386/local-bootstrap.diff: Renamed to tg-bootstrap.diff. ++ * patches/hurd-i386/submitted-add-needed.diff: Renamed to ++ tg-mach-hurd-link.diff. ++ ++ [ Svante Signell ] ++ * patches/hurd-i386/submitted-exec_filename.diff: Update, fixes ++ execve/spawni relative path case. ++ ++ -- Aurelien Jarno Sat, 26 Aug 2017 11:11:58 +0200 ++ ++glibc (2.24-17) unstable; urgency=medium ++ ++ [ Samuel Thibault ] ++ * patches/hurd-i386/unsubmitted-clock_t_centiseconds.diff: Drop clock() part ++ from patch, it always uses CLOCKS_PER_SEC which is always 1000000. Should ++ fix ffmpeg build. Closes: Bug#872556. ++ ++ [ Aurelien Jarno ] ++ * debian/patches/any/submitted-intl-tstgettext.diff: new patch to fix the ++ intl/tst-gettext with newer gettext versions. Closes: #873097. ++ ++ -- Aurelien Jarno Sat, 26 Aug 2017 11:09:24 +0200 ++ ++glibc (2.24-16) unstable; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * debian/sysdeps/kfreebsd-i386.mk: don't try to build libc0.1-i686. ++ * debian/sysdeps/hurd-i386.mk: don't try to build libc0.3-i686. ++ * debian/sysdeps/i386.mk: don't try to build libc6-i686. ++ * debian/testsuite-xfail-debian.mk: update kfreebsd* according to ++ git-updates.diff. ++ ++ [ Samuel Thibault ] ++ * debian/testsuite-xfail-debian.mk: update hurd according to git-updates.diff. ++ ++ -- Aurelien Jarno Mon, 21 Aug 2017 08:51:25 +0200 ++ ++glibc (2.24-15) unstable; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * debian/patches/git-updates.diff: update from upstream stable branch: ++ - Avoid use-after-free read access in clntudp_call (CVE-2017-12133). ++ Closes: #870648. ++ * debian/control.in/*: Change back gcc-multilib to a Recommends for ++ biarch packages. It provides the /usr/include/linux/asm symlink. ++ * debian/control.in/x32: Add a gcc-multilib Recommends for libc6-dev-x32. ++ * Update French debconf translation, by Alban Vidal. Closes: #872025. ++ * debian/control.in/main: Change multiarch-support to priority optional ++ and section oldlibs. ++ * debian/control.in/opt: Remove transitional packages libc0.1-i686, ++ libc0.3-i686, libc6-i686. ++ * debian/control.in/libc, debian/control.in/main, debian/control.in/opt: ++ change the priority of libc0.1-dbg, libc0.1-udeb, libc0.3-dbg, ++ libc0.3-udeb, libc0.3-xen, libc6.1-alphaev67, libc6.1-dbg, libc6.1-udeb, ++ libc6-dbg, libc6-udeb, libc6-xen and locales-all to optional. ++ ++ -- Aurelien Jarno Sun, 20 Aug 2017 15:12:10 +0200 ++ ++glibc (2.24-14) unstable; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * debian/patches/git-updates.diff: update from upstream stable branch: ++ - Fix namespace register pollution on sh4. Closes: #776471. ++ * debian/patches/powerpc/submitted-tst-tlsopt-powerpc.diff: new proposed ++ patch to fix tst-tlsopt-powerpc when built with binutils >= 2.29. ++ ++ -- Aurelien Jarno Tue, 01 Aug 2017 13:46:34 +0200 ++ ++glibc (2.24-13) unstable; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * debian/patches/git-updates.diff: update from upstream stable branch: ++ - Fix ld.so segfault on arm64. ++ - Fix build with newer binutils. Closes: #869717. ++ - debian/patches/any/submitted-perl-inc.diff: drop, upstreamd. ++ - debian/patches/any/local-CVE-2017-1000366-rtld-LD_LIBRARY_PATH.diff: ++ drop, upstreamd. ++ - debian/patches/any/local-CVE-2017-1000366-rtld-LD_PRELOAD.diff: drop, ++ upstreamed. ++ - debian/patches/any/local-CVE-2017-1000366-rtld-LD_AUDIT.diff: drop, ++ upstreamed. ++ - debian/patches/any/cvs-vectorized-strcspn-guards.diff: drop, upstreamed. ++ - debian/patches/any/cvs-hwcap-AT_SECURE.diff: drop, upstreamed. ++ * debian/rules.d/debhelper.mk: relax the dependency on linux-libc-dev to the ++ upstream version. ++ * Greek debconf translation update from Vangelis Skarmoutsos. Closes: ++ #867474. ++ * Update Dutch debconf translation, by Frans Spiesschaert. Closes: #867981. ++ * debian/debhelper.in/libc-bin.triggers: declare the trigger as ++ interest-await. ++ * debian/control.in/*: Demote gcc-multilib 'Recommends' to a 'Suggests'. ++ Closes: #865429. ++ ++ [ Adam Conrad ] ++ * debian/patches/arm/submitted-strip-bit-0.diff: Fix ld.so crash on armv7t. ++ ++ [ Santiago Vila ] ++ * debian/debhelper.in/libc-bin.postinst: do not update /etc/nsswitch.conf ++ when its content already matches the default. Closes: #865144. ++ ++ -- Aurelien Jarno Mon, 31 Jul 2017 16:54:16 +0200 ++ ++glibc (2.24-12) unstable; urgency=high ++ ++ [ Aurelien Jarno ] ++ * debian/patches/git-updates.diff: update from upstream stable branch: ++ - Drop patches/any/cvs-remove-pid-tid-cache-clone.diff (merged upstream). ++ - Remove wrong assertion on parent PID in fork. ++ - Fix 64-bit atomics on m68k. Closes: #855692. ++ * debian/debhelper.in/libc.templates: update the kernel 3.2 warning to ++ mention that the support limitation comes from Debian and not from ++ upstream. Closes: #864720. ++ * debian/rules, debian/rules.d/build.mk: do not capture the build path ++ when generating glibc-source tarball. Closes: #861183. ++ * debian/control.in/main: build-depends on gperf. Closes: #847478. ++ * debian/patches/hppa/submitted-longjmp.diff: new patch from Helge Deller ++ to fix longjmp on hppa. Closes: #858738. ++ * debian/sysdeps/mipsel.mk, debian/sysdeps/mips64el.mk: leave the default ++ GCC ISA level, currently MIPS32R2/MIPS64R2. ++ * debian/patches/any/local-CVE-2017-1000366-rtld-LD_AUDIT.diff, ++ debian/patches/any/local-CVE-2017-1000366-rtld-LD_LIBRARY_PATH.diff, ++ debian/patches/any/local-CVE-2017-1000366-rtld-LD_PRELOAD.diff: add ++ patches to protect the dynamic linker against stack clashes ++ (CVE-2017-1000366). ++ * debian/patches/any/cvs-vectorized-strcspn-guards.diff: patch backported ++ from upstream to allow usage of strcspn in ld.so. ++ * debian/patches/any/cvs-hwcap-AT_SECURE.diff: patch backported from ++ upstream to disable HWCAP for AT_SECURE programs. ++ ++ [ John Paul Adrian Glaubitz ] ++ * debian/sysdeps/sh3.mk: copy from sh4.mk. Closes: #851867. ++ ++ -- Aurelien Jarno Sun, 18 Jun 2017 20:04:53 +0200 ++ ++glibc (2.24-11) unstable; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * debian/patches/git-updates.diff: update from upstream stable branch: ++ - Improve memcpy/memset performance on Skylake server. ++ * debian/patches/any/cvs-malloc-hardening.diff: patch backported from ++ upstream to further harden glibc malloc metadata against 1-byte ++ overflows. Closes: #862950. ++ ++ -- Aurelien Jarno Sun, 28 May 2017 19:29:33 +0200 ++ ++glibc (2.24-10) unstable; urgency=medium ++ ++ [ Samuel Thibault ] ++ * hurd-i386/cvs-truncate64.diff: New patch to support 64bit truncate. ++ * hurd-i386/cvs-send-recv-posix.diff: New patch to make send/recv more ++ posix. ++ ++ [ Aurelien Jarno ] ++ * debian/patches/git-updates.diff: update from upstream stable branch: ++ - Fix readahead on mips64el. ++ - Improve branch predication in _dl_runtime_resolve_avx512_opt; ++ - Fix symbol redirect for fts_set on 32-bit architectures. ++ - Fix AVX2/AVX512 optimized unaligned memset. ++ - Don't use PLT nor GOT in static archives on amd64. ++ - Drop GLIBC_TUNABLES in setxid processes. ++ - Fix write-after-destroy in lock elision on powerpc/ppc64el. ++ * Drop patches/any/cvs-resolv-internal-qtype.diff, merged upstream. ++ * any/cvs-remove-pid-tid-cache-clone.diff: patch from upstream to remove ++ cached PID/TID in clone. Closes: #857909. ++ * debian/rules.d/build.mk: do not fail the build in case of testsuite ++ regressions when building a +debXuX version. That way changes in the ++ environment (e.g.: kernel) do not prevent security or stable versions ++ to be built. ++ ++ -- Aurelien Jarno Wed, 12 Apr 2017 00:13:55 +0200 ++ ++glibc (2.24-9) unstable; urgency=medium ++ ++ [ Samuel Thibault ] ++ * hurd-i386/tg-libpthread-gsync-mutex.diff: Update patch, fixes trylock ++ error return. ++ * hurd-i386/tg-magic-pid.diff: New patch, add support for /proc/self. ++ * hurd-i386/tg-mlockall.diff: New patch, add support for mlockall. ++ - control: Bump gnumach-dev build-depend accordingly. ++ * hurd-i386/tg-gsync-libc.diff: Fix linking against built libmachuser ++ instead of installed libmachuser. ++ * libc0.3.symbols.hurd-i386: Add vm_wire_all symbols. ++ ++ [ Aurelien Jarno ] ++ * debian/sysdeps/{amd64,i386,x32}.mk: disable lock elision (aka Intel TSX) ++ on x86 architectures. This causes programs (wrongly) unlocking an already ++ unlocked mutex to abort. More importantly most of the other distributions ++ decided to disable it, so we don't want to be the only distribution left ++ testing this code path. Closes: #850182. ++ * debian/rules.d/build.mk: pass --no-recursion before -T in the call to tar ++ to workaround or fix bug#829738. This reduces the size of the glibc-source ++ package by 40% ++ * debian/patches/localedata/supported.diff: rename the kk_KZ locale with the ++ RK1048 charset to kk_KZ.RK1048 to avoid conflicting with the kk_KZ locale ++ with the PT154 charset. Closes: #847596. ++ * debian/patches/git-updates.diff: update from upstream stable branch: ++ - debian/patches/alpha/submitted-math-fixes.diff: Drop, merged upstream. ++ * patches/any/cvs-resolv-internal-qtype.diff: patch from upstream to fix a ++ NULL pointer dereference in libresolv when receiving a T_UNSPEC internal ++ QTYPE (CVE-2015-5180). Closes: #796106. ++ * Make the package build reproducibly, thanks to Ximin Luo for the patch. ++ Closes: #783210. ++ - debian/rules: export SOURCE_DATE_EPOCH when not building with ++ dpkg-buildpackage. ++ - debian/rules.d/build.mk: use --clamp-mtime instead of touching the ++ files. ++ - debian/rules.d/debhelper.mk: do not chmod +x the shell script, call ++ it with sh instead. ++ * debian/rules.d/control.mk: Add the sh3 architecture to libc6_archs. ++ Closes: #850565. ++ ++ -- Aurelien Jarno Mon, 16 Jan 2017 18:43:37 +0100 ++ ++glibc (2.24-8) unstable; urgency=medium ++ ++ [ Samuel Thibault ] ++ * hurd-i386/tg-libc_rwlock_recursive.diff: New patch to work around ++ fakeroot-tcp issue, see #845930. ++ * hurd-i386/cvs-hurd_signal.h_c++.diff: New patch to fix building gdb. ++ * hurd-i386/tg-poll_errors_fixes.diff: Fix port leak. ++ ++ -- Samuel Thibault Sun, 04 Dec 2016 22:49:53 +0100 ++ ++glibc (2.24-7) unstable; urgency=medium ++ ++ [ Samuel Thibault ] ++ * hurd-i386/tg-hurdsig-SA_SIGINFO.diff: Fix passing address to legacy SIGBUS ++ handlers. ++ * hurd-i386/tg-libpthread-gsync-mutex.diff: New patch to make mutexes use ++ gsync too. ++ * hurd-i386/tg-NOFOLLOW.diff: New patch to fix O_NOFOLLOW errors. ++ * hurd-i386/tg-NOFOLLOW-DIRECTORY.diff: New patch to fix O_NOFOLLOW | ++ O_DIRECTORY errors. ++ ++ [ Aurelien Jarno ] ++ * debian/patches/git-updates.diff: update from upstream stable branch. ++ * debian/rules: build with -no-pie -fno-PIE. Closes: #845512, #845521. ++ ++ [ Matthias Klose ] ++ * Allow to inject the libc-dev dependency on linux-libc-dev by the build ++ environment. ++ ++ -- Aurelien Jarno Fri, 25 Nov 2016 23:09:39 +0100 ++ ++glibc (2.24-6) unstable; urgency=medium ++ ++ [ Samuel Thibault ] ++ * libc0.3.symbols.hurd-i386: Drop removed RPCs. ++ * hurd-i386/cvs-libpthread.diff: Update to latest upstream version. ++ - hurd-i386/cvs-libpthread-static-weak.diff: Drop, merged upstream. ++ - hurd-i386/cvs-pthread-atfork.diff: Drop, merged upstream. ++ - hurd-i386/cvs-setcancelstate.diff: Drop, merged upstream. ++ * hurd-i386/tg-libpthread-gsync-spin.diff: New patch to make spinlocks use ++ gsync too. Thanks Svante Signell for investigating issues with the first ++ version. ++ * hurd-i386/tg-ONSTACK.diff: New patch to fix SS_ONSTACK support. ++ Closes: #551470. ++ * hurd-i386/tg-extern_inline.diff: Update to upstream. ++ - hurd-i386/tg-sigstate_thread_reference.diff: Refresh. ++ - hurd-i386/tg-gsync-libc.diff: Refresh. ++ * hurd-i386/tg-hurdsig-SA_SIGINFO.diff: Update to upstream. ++ * hurd-i386/tg-EGREGIOUS-fr.diff: New patch to fix grammar in french ++ translation. ++ ++ [ Aurelien Jarno ] ++ * debian/patches/git-updates.diff: update from upstream stable branch: ++ - Fix pread/pwrite syscalls on SH4. ++ - Fix build on powerpc/ppc64el with binutils from trunk. Closes: #843691. ++ - Fix flexible array usage in gconv.h. Closes: #841304. ++ - Fix linknamespace parallel test failures. Closes: #844132. ++ * debian/patches/any/submitted-unicode-9.0.0.diff: proposed patch to update ++ Unicode support to version 9.0.0. Closes: #842466. ++ * debian/patches/localedata/locale-C.diff: update to Unicode 9.0.0. ++ * debian/patches/localedata/submitted-en_AU-date_fmt.diff: improve date_fmt ++ for en_AU locale. Closes: #841916. ++ ++ -- Aurelien Jarno Mon, 21 Nov 2016 19:22:48 +0100 ++ ++glibc (2.24-5) unstable; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * debian/sysdeps/linux.mk: fix cross-compilation by also looking at headers ++ in $(LINUX_HEADERS). ++ * debian/testsuite-xfail-debian.mk: allow nptl/tst-stack4 to fail on HPPA. ++ ++ [ Samuel Thibault ] ++ * hurd-i386/cvs-libpthread-static-weak.diff: New patch to fix weak ++ references when linking in libpthread statically. ++ * hurd-i386/cvs-pthread-atfork.diff: New patch to fix unregistering atfork ++ handlers at library unload. Closes: #841068. ++ * debhelper.in/libc-dev.install.hurd-i386: Install libpthread_nonshared.a. ++ ++ -- Aurelien Jarno Tue, 18 Oct 2016 23:10:46 +0200 ++ ++glibc (2.24-4) unstable; urgency=medium ++ ++ [ Samuel Thibault ] ++ * hurd-i386/tg-hurdsig-SA_SIGINFO.diff: Fix preemptors and thus ++ hurd_safe_*. ++ * hurd-i386/tg-hurdsig-fixes.diff: Fix uninitialized value. ++ * hurd-i386/submitted-exec_filename.diff: Add missing includes, fix const ++ warning. ++ * hurd-i386/cvs-mallocfork.diff: New patch to fix concurrency between ++ hurd_malloc and fork, triggered by malloc/tst-malloc-fork-deadlock. ++ * hurd-i386/cvs-libpthread.diff: Update to latest upstream version. ++ Closes: #839742. ++ * hurd-i386/libpthread_build.diff: Refresh. ++ * hurd-i386/libpthread_version.diff: Refresh. ++ * hurd-i386/unsubmitted-libc_alloca_cutoff.diff: Refresh. ++ * hurd-i386/cvs-hidden.diff: Drop, merged upstream. ++ * hurd-i386/cvs-libpthread-2.23.diff: Drop, merged upstream. ++ * hurd-i386/cvs-libpthread-api.diff: Drop, merged upstream. ++ * hurd-i386/cvs-libpthread_build.diff: Drop, merged upstream. ++ * hurd-i386/cvs-libpthread_clean2.diff: Drop, merged upstream. ++ * hurd-i386/cvs-pt-kill.diff: Drop, merged upstream. ++ * hurd-i386/libpthread-versions.diff: Drop, merged upstream. ++ * hurd-i386/libpthread_clean.diff: Drop, merged upstream. ++ * hurd-i386/libpthread_sigmask.diff: Drop, merged upstream. ++ * hurd-i386/libpthread_spin-lock.diff: Drop, merged upstream. ++ * hurd-i386/unsubmitted-libpthread-semaphore.h.diff: Drop, merged upstream. ++ * hurd-i386/tg-pthread_deps.diff: New patch, fixes references to libc ++ symbols. ++ * testsuite-xfail-debian.mk: Clear fixed hurd-i386 test. ++ * control: Drop hurd dependency from libc-bin: the reason for the dep has ++ disappeared. ++ * hurd-i386/unsubmitted-libc_alloca_cutoff.diff: Rename to ++ hurd-i386/tg-allocalim.diff. ++ * hurd-i386/unsubmitted-timer_routines.diff: Rename to ++ hurd-i386/tg-timer_routines.diff. ++ * hurd-i386/tg-glibc-2.24-restore-malloc-hook.diff: Restore malloc_hook for ++ now for mach-defpager. ++ * hurd-i386/cvs-setcancelstate.diff: New patch to work around a bug with ++ newer libpthread snapshot. ++ ++ [ Adam Conrad ] ++ * debian/rules.d/tarball.mk: Apply --no-renames to make the diff readable. ++ * debian/rules.d/tarball.mk: Avoid filterdiff bugs with git pathspec magic. ++ * debian/patches/git-updates.diff: Update to 2.24 master to test the above. ++ ++ [ John David Anglin ] ++ * debian/patches/hppa/cvs-atomic-machine.diff: New patch from upstream to ++ fix nptl/tst-stack4 on hppa. Closes: #838574. ++ ++ [ Aurelien Jarno ] ++ * debian/sysdeps/linux.mk: Install both kernel and library headers symlinks ++ using a single for loop. ++ * debian/sysdeps/linux.mk: Also install a /usr/include//arch ++ symlink if it exists, needed for the tilegx architecture. ++ * debian/control.in/main: add a dependency on lsb-base (>= 3.0-6) for ncsd. ++ * debian/debhelper.in/nscd.init: also invalidate services and netgroup ++ during reload. Closes: #793649. ++ * debian/control.in/main, debian/rules.d/debhelper.mk: install nscd systemd ++ files. Closes: #767707. ++ * debian/patches/localedata/locale-C.diff: switch back transliterations to ++ combining. Closes: #840199. ++ * debian/debhelper.in/locales.postinst: improve locales-all detection. ++ Closes: #840901. ++ * debian/patches/i386/local-cpuid-level2.diff: replace by upstream patch ++ cvs-cpuid-level2.diff. ++ * debian/control.in/main: slightly relax the build-dependency on g++-6 to ++ make lintian happy. ++ ++ -- Aurelien Jarno Sun, 16 Oct 2016 13:06:08 +0200 ++ ++glibc (2.24-3) unstable; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * patches/kfreebsd/local-sysdeps.diff: update to revision 6102 (from ++ glibc-bsd). ++ * debian/control.in/main: Drop "Provides: locales" for locales-all. ++ Closes: #837694. ++ * Mark libc-l10n as Multi-Arch: foreign. ++ ++ [ Samuel Thibault ] ++ * hurd-i386/tg-poll_errors_fixes.diff: Fix spurious port destroy on io_select ++ returning an error. ++ * hurd-i386/cvs-libpthread.diff: Update from upstream. Fixes spurious ++ dependencies of libp11, libgnutls30, libbsd0. ++ ++ [ John David Anglin ] ++ * patches/hppa/submitted-sysdeps-cancel.diff: new patch to fix syscall ++ cancellation issues. Closes: #837518. ++ * testsuite-xfail-debian.mk: HPPA updates. ++ ++ -- Aurelien Jarno Sat, 17 Sep 2016 20:00:44 +0200 ++ ++glibc (2.24-2) unstable; urgency=medium ++ ++ [ Samuel Thibault ] ++ * hurd-i386/tg-gsync-libc.diff: Fix for glibc 2.24. ++ * testsuite-xfail-debian.mk: Update header conformance results. ++ ++ [ Aurelien Jarno ] ++ * debian/rules.d/debhelper.mk: remove the arch-qualifier from the ++ linux-libc-dev depends. Closes: #836446. ++ * debian/patches/any/submitted-perl-inc.diff: new patch to fix the ++ testsuite with perl (>= 5.22.2-4), which removed '.' from @INC by ++ default. ++ * debian/patches/git-updates.diff: update from upstream stable branch. ++ ++ -- Aurelien Jarno Sat, 03 Sep 2016 22:36:31 +0200 ++ ++glibc (2.24-1) unstable; urgency=medium ++ ++ [ Adam Conrad ] ++ * debian/rules.d/control.mk: Manually add binutils, linux-libc-dev, and the ++ current GCC to the rebuild test deps, so they land in Testsuite-Triggers. ++ ++ [ Aurelien Jarno ] ++ * debian/patches/git-updates.diff: update from upstream stable branch: ++ - debian/patches/any/submitted-argp-attribute.diff: upstreamed. ++ - Fix backtrace hang on armel/armhf, possibly causing a minor ++ denial-of-service vulnerability (CVE-2016-6323). Closes: #834752. ++ * debian/control.in/libc: drop ${locale-compat:Depends} as it was not used ++ anymore. ++ * debian/control.in/libc, debian/rules.d/debhelper.mk: compute the ++ linux-libc-dev dependency from the one installed at build time. Closes: ++ #834706. ++ * debian/patches/series: apply hppa/submitted-setcontext.diff. Closes: ++ #835414. ++ ++ [ Samuel Thibault ] ++ * patches/hurd-i386/cvs-adjtime-NULL.diff: New patch to fix crash on ++ adjtime(..., NULL). ++ ++ -- Aurelien Jarno Wed, 31 Aug 2016 17:51:04 +0200 ++ ++glibc (2.24-0experimental1) experimental; urgency=medium ++ ++ [ Samuel Thibault ] ++ * testsuite-xfail-debian.mk: Update with hurd-i386 non-regressions. ++ ++ [ Aurelien Jarno ] ++ * debian/patches/git-updates.diff: update from upstream stable branch: ++ - debian/patches/powerpc/submitted-powerpc-ifunc-sel.diff: upstreamed. ++ - debian/patches/sparc/submitted-sparc-fdim.diff: upstreamed. ++ * debian/patches/sparc/cvs-test-strncmp.diff: new patch from upstream to ++ fix wcsmbs/test-wcsncmp on architecture with strong alignment. Closes: ++ #825865. ++ * debian/patches/testsuite-xfail-debian.mk: remove xfail-test-wcsncmp on ++ sparc. ++ * debian/sysdeps/{sparc,sparc64}.mk: force target to sparcv9-linux-gnu. ++ * debian/patches/sparc/local-sparcv9-target.diff: drop, obsolete. ++ * patches/hppa/local-stack-grows-up.diff: restore one hunk that has not been ++ merged upstream from the 2.23 version. ++ * patches/localedata/locale-C.diff: update to unicode 8.0.0, add missing ++ categories, use the copy directive when possible. ++ * debian/rules.d/build.mk: disable the C++ compiler when tests are disabled, ++ based on a patch from Matthias Klose. Closes: #834138. ++ * rules.d/build.mk: test for DEB_BUILD_OPTIONS="nocheck" using filter ++ instead of findstring. ++ * patches/kfreebsd/local-sysdeps.diff: update to revision 6101 (from ++ glibc-bsd). ++ ++ -- Aurelien Jarno Mon, 15 Aug 2016 16:55:38 +0200 ++ ++glibc (2.24-0experimental0) experimental; urgency=medium ++ ++ * New upstream release: version 2.24. ++ * debian/patches/hurd-i386/submitted-malloc-setstate.diff: only apply on ++ hurd-i386, as it causes regressions on at least x32. ++ * debian/rules.d/tarball.mk: make the orig tarball generation a bit more ++ reproducible. ++ * debian/sysdeps/sparc64.mk: compile all flavours with -mcpu=ultrasparc. ++ * debian/patches/submitted-sparc-fdim.diff: new patch to fix fdimf and ++ fdim function on SPARC. ++ ++ -- Aurelien Jarno Thu, 04 Aug 2016 03:13:12 +0200 ++ ++glibc (2.23.90+20160725.b898b64-1) experimental; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * New upstream snapshot from 20160725. ++ * debian/testsuite-xfail-debian.mk: remove HPPA math tests from XFAIL, ++ the problem is fixed from some time already. ++ * debian/patches/powerpc/submitted-powerpc-ifunc-sel.diff: new patch to ++ fix the ifunc tests with GCC 6 on PowerPC. ++ ++ -- Aurelien Jarno Mon, 25 Jul 2016 23:38:37 +0200 ++ ++glibc (2.23.90+20160719.2c3d888-1) experimental; urgency=medium ++ ++ [ Samuel Thibault ] ++ * testsuite-xfail-debian.mk: Add missing test failure (no actual ++ regression). ++ ++ [ Aurelien Jarno ] ++ * New upstream snapshot from 20160719: ++ - debian/patches/hurd-i386/cvs-tabdly.diff: upstreamed. ++ * debian/control.in/main, debian/rules: build with GCC 6. Closes: #835946. ++ ++ -- Aurelien Jarno Tue, 19 Jul 2016 23:34:49 +0200 ++ ++glibc (2.23.90+20160711.c10f90d-1) experimental; urgency=medium ++ ++ [ Samuel Thibault ] ++ * patches/hurd-i386/submitted-malloc-setstate.diff: New patch to fix ++ malloc_setstate. ++ * testsuite-xfail-debian.mk: Update hurd-i386 testsuite results, no actual ++ regression. ++ ++ [ Aurelien Jarno ] ++ * New upstream snapshot from 20160711: ++ - debian/patches/localedata/locale-de_LI.diff: upstreamed. ++ - debian/patches/hppa/submitted-libm-test-ulps.diff: upstreamed. ++ * debian/testsuite-xfail-debian.mk: allow conform/XPG3/sys/stat.h ++ and conform/XPG4/sys/stat.h to fail on mips and mipsel, similarly ++ to the others sys/stat.h conform tests. Group all theses entries ++ and an explanation. ++ * debian/testsuite-xfail-debian.mk: do not allow math/test-fenv to ++ fail now that we do not have Loongson 2 buildds anymore. ++ * debian/patches/kfreebsd/local-sysdeps.diff, local-fbtl.diff: ++ update to revision 6087 (from glibc-bsd). ++ * debian/testsuite-xfail-debian.mk: allow more failures on kfreebsd-*, ++ mostly due to the fsid_t type, and which are not regressions. ++ * testsuite-xfail-debian.mk: Update x32 testsuite results, no actual ++ regression. ++ * Replace debian/patches/alpha/submitted-trunc.diff by ++ debian/patches/alpha/submitted-math-fixes.diff containing additional ++ math fixes. ++ * debian/rules: better glibc version detection for snapshots. ++ ++ -- Aurelien Jarno Mon, 11 Jul 2016 22:45:50 +0200 ++ ++glibc (2.23.90+20160507.87523e9-1) experimental; urgency=medium ++ ++ * New upstream snapshot from 20160705: ++ - Fix locales license. Closes: #555168. ++ - Fix Spanish locale 1st week definition. Closes: #826888. ++ - debian/patches/localedata/sort-UTF8-first.diff: rebased. ++ - debian/patches/localedata/locale-eo_EO.diff: upstreamed. ++ - debian/patches/localedata/locale-ku_TR.diff: rebased. ++ - debian/patches/localedata/fo_FO-date_fmt.diff: rebased. ++ - debian/patches/localedata/locales-fr.diff: rebased. ++ - debian/patches/localedata/locale-en_DK.diff: rebased. ++ - debian/patches/localedata/locale-hsb_DE.diff: rebased. ++ - debian/patches/localedata/fr_CH-first_weekday.diff: upstreamed. ++ - debian/patches/localedata/locale-de_LI.diff: rebased. ++ - debian/patches/localedata/submitted-bz9725-locale-sv_SE.diff: rebased. ++ - debian/patches/localedata/first_weekday.diff: upstreamed. ++ - debian/patches/localedata/submitted-en_AU-date_fmt.diff: rebased. ++ - debian/patches/amd64/local-blacklist-for-Intel-TSX.diff ++ - debian/patches/arm/local-arm-futex.diff: rebased. ++ - debian/patches/hppa/local-stack-grows-up.diff: dropped, obsolete. ++ - debian/patches/hurd-i386/local-enable-ldconfig.diff: rebased. ++ - debian/patches/hurd-i386/tg-tls-threadvar.diff: rebased. ++ - debian/patches/hurd-i386/tg-hooks.diff: rebased. ++ - debian/patches/hurd-i386/cvs-openat.diff: upstreamed. ++ - debian/patches/hurd-i386/cvs-gai_sigqueue.diff: upstreamed. ++ - debian/patches/hurd-i386/cvs-aio_sigqueue.diff: upstreamed. ++ - debian/patches/hurd-i386/cvs-open.diff: upstreamed. ++ - debian/patches/hurd-i386/cvs-c++-types.diff: upstreamed. ++ - debian/patches/hurd-i386/cvs-errnos.d.diff: upstreamed. ++ - debian/patches/hurd-i386/cvs-mach-syscalls.mk.diff: upstreamed. ++ - debian/patches/hurd-i386/cvs-auxv.diff: upstreamed. ++ - debian/patches/hurd-i386/cvs-gprof-tick.diff: upstreamed. ++ - debian/patches/hurd-i386/cvs-IPV6_PKTINFO.diff: upstreamed. ++ - debian/patches/hurd-i386/cvs-i686-link.diff: upstreamed. ++ - debian/patches/hurd-i386/cvs-check-local-headers.diff: rebased. ++ - debian/patches/hurd-i386/tg-gsync-libc.diff: rebased. ++ - debian/patches/i386/local-cpuid-level2.diff: rebased. ++ - debian/patches/sparc/submitted-sparc64-socketcall.diff: rebased. ++ - debian/patches/sparc/cvs-sparc-nearbyint.diff: upstreamed. ++ - debian/patches/any/local-libgcc-compat-ports.diff: rebased. ++ - debian/patches/any/submitted-longdouble.diff: rebased. ++ - debian/patches/any/submitted-string2-strcmp.diff: rebased. ++ - debian/patches/any/local-dynamic-resolvconf.diff: rebased. ++ - debian/patches/any/cvs-tst-malloc-thread-exit.diff: upstreamed. ++ - debian/patches/any/cvs-sys-personality-h.diff: upstreamed. ++ * debian/patches/localedata/{locale-C.diff,locale-de_LI.diff, ++ locale-eu_FR.diff,new-valencian-locale.diff}: change LC_IDENTIFICATION ++ to i18n:2012. ++ * debian/debhelper.in/locales.config: convert iw_IL into he_IL, as the ++ former was deprecated and has been removed. ++ ++ -- Aurelien Jarno Tue, 05 Jul 2016 20:47:21 +0200 ++ ++glibc (2.23-5) unstable; urgency=medium ++ ++ * patches/hurd-i386/git-recvmsg.diff: New patch, fixes recvmsg on PF_LOCAL ++ sockets with msg_name != NULL. Closes: #833558. ++ * hurd-i386/libpthread_version.diff: Really fix pthread_setcancelstate ++ aliasing. ++ * libc0.3.symbols.hurd-i386: Update symbols. ++ * hurd-i386/tg-sysvshm.diff: Update from topgit. ++ * hurd-i386/cvs-check-local-headers.diff: Update from git. ++ * hurd-i386/tg-extern_inline.diff: Fix using inlines in libc. ++ * hurd-i386/cvs-libpthread-2.23.diff: Fix calling pthread functions from ++ libc. ++ * hurd-i386/tg-gsync-libc.diff: New patch, use gsync for libc ++ synchronization primitives. ++ ++ -- Samuel Thibault Tue, 23 Aug 2016 21:16:41 +0200 ++ ++glibc (2.23-4) unstable; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * patches/kfreebsd/local-sysdeps.diff: update to revision 6098 (from ++ glibc-bsd). ++ * debian/debhelper.in/libc.postinst: drop code to handle the /var/mail ++ transition for pre-Potato installations. ++ * debian/debhelper.in/libc.{preinst,postinst}, debian/script.in/nohwcap.sh: ++ Remove fallback to dpkg --print-architecture for pre-multiarch systems. ++ * debian/debhelper.in/libc.{preinst,postinst}: do not run the NSS check ++ code from a chroot as it might not have an init system installed. ++ * debian/testsuite-xfail-debian.mk: allow tst-robust8 to fail on amd64, it ++ is an intermittent failure that might be due to a kernel issue. ++ ++ -- Aurelien Jarno Wed, 27 Jul 2016 00:39:51 +0200 ++ ++glibc (2.23-3) unstable; urgency=medium ++ ++ [ Samuel Thibault ] ++ * hurd-i386/libpthread_version.diff: Update with pthread_setcancelstate ++ aliasing. ++ ++ [ Aurelien Jarno ] ++ * patches/kfreebsd/local-sysdeps.diff: update to revision 6097 (from ++ glibc-bsd). ++ ++ -- Aurelien Jarno Mon, 25 Jul 2016 23:23:29 +0200 ++ ++glibc (2.23-2) unstable; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * Danish debconf translation update from Joe Hansen. Closes: #830589. ++ * patches/kfreebsd/local-sysdeps.diff: update to revision 6096 (from ++ glibc-bsd). ++ ++ [ Samuel Thibault ] ++ * hurd-i386/cvs-libpthread-2.23.diff: Update, adds pthread_setcancelstate ++ alias, fixes rsyslog start. ++ * hurd-i386/cvs-tabdly.diff: New patch. Closes: #830584. ++ * hurd-i386/local-clock_gettime_MONOTONIC.diff: Complete patch with ++ timer_create, to fix ghc 8 build. ++ ++ -- Aurelien Jarno Tue, 19 Jul 2016 20:22:37 +0200 ++ ++glibc (2.23-1) unstable; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * debian/patches/git-updates.diff: update from upstream stable branch: ++ - debian/patches/hppa/submitted-start.diff: drop, upstreamed. ++ * debian/patches/localedata/locale-C.diff: update comment about the week ++ entry. Closes: #829093. ++ * debian/testsuite-xfail-debian.mk: allow malloc/tst-mallocfork2 to fail ++ on hurd-i386, this is not a regression but a new test. ++ * debian/patches/sparc/cvs-sparc-nearbyint.diff: new patch from upstream ++ to fix nearbyint* functions with a sNaN input on SPARC. ++ * debian/testsuite-xfail-debian.mk: allow math/test-double-finite and ++ math/test-float-finite to fail on alpha, as this architecture do not ++ fully support IEEE flags. ++ * debian/patches/alpha/submitted-trunc.diff: new patch to fix trunc and ++ truncf results for big values on alpha. ++ * debian/testsuite-xfail-debian.mk: allow nptl/tst-cancel9 and ++ nptl/tst-cancelx9 to fail on hppa, they are not regressions. ++ ++ [ John David Anglin ] ++ * debian/patches/hppa/submitted-libm-test-ulps.diff: new patch to update ++ the math test ULPs on hppa. ++ ++ [ Samuel Thibault ] ++ * patches/hurd-i386/tg-poll_errors_fixes.diff: Update from tg branch, fixes ++ gettimeofday call from select. ++ ++ -- Aurelien Jarno Sun, 03 Jul 2016 21:59:34 +0200 ++ ++glibc (2.23-0experimental4) experimental; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * debian/patches/git-updates.diff: update from upstream stable branch. ++ * debian/rules.d/build.mk: allow a test to fail without having a .out ++ file. ++ * patches/kfreebsd/local-sysdeps.diff: update to revision 6075 (from ++ glibc-bsd). ++ ++ -- Aurelien Jarno Thu, 30 Jun 2016 12:25:44 +0200 ++ ++glibc (2.23-0experimental3) experimental; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * debian/patches/git-updates.diff: update from upstream stable branch: ++ - debian/patches/hurd-i386/tg-hurdsig-fixes-2.diff: refresh. ++ - debian/patches/hurd-i386/cvs-libpthread.so.diff: drop, upstreamed. ++ - debian/patches/mips/submitted-vfork.diff: drop, upstreamed. ++ - debian/patches/sparc/submitted-vfork.diff: drop, upstreamed. ++ * debian/rules.d/build.mk: reduce TIMEOUTFACTOR to 15 from 50. That ++ corresponds to a 5 minutes default, which should be more than enough even ++ on slow architectures. ++ * debian/sysdeps/mips64el.mk: change the ISA back to MIPS3 to fix math FMA ++ tests on some CPUs. ++ ++ -- Aurelien Jarno Tue, 28 Jun 2016 00:48:51 +0200 ++ ++glibc (2.23-0experimental2) experimental; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * debian/patches/git-updates.diff: update from upstream stable branch. ++ * patches/kfreebsd/local-fbtl.diff: update to revision 5973 (from ++ glibc-bsd). ++ * debian/rules, debian/rules.d/build.mk: rename localedir into complocaledir ++ following upstream change. ++ * debian/patches/local-allocalim-header.diff: drop, obsolete. ++ * debian/patches/any/local-no-pagesize.diff: drop, obsolete. ++ ++ [ Adam Conrad ] ++ * debian/testsuite-xfail-debian.mk: Also allow tst-malloc-thread-fail to ++ fail where we've already done so for test-xfail-tst-malloc-thread-exit. ++ ++ -- Aurelien Jarno Thu, 14 Apr 2016 14:20:30 +0200 ++ ++glibc (2.23-0experimental1) experimental; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * debian/patches/git-updates.diff: update from upstream stable branch. ++ * debian/testsuite-xfail-debian.mk (powerpc) really mark ++ tst-malloc-thread-exit as xfail. ++ * debian/testsuite-xfail-debian.mk (ppc64) mark tst-malloc-thread-exit ++ test as xfail, it is a known issue and not a regression. ++ * patches/kfreebsd/local-fbtl.diff: update to revision 5969 (from ++ glibc-bsd). ++ * debian/patches/kfreebsd/local-tst-malloc-fbtl.diff: drop, obsoleted by ++ hurd-i386/cvs-libpthread.so.diff. ++ * debian/patches/kfreebsd/local-tst-unique.diff: disable tst-unique* on ++ GNU/kFreeBSD, as they are not supported by the FreeBSD ELF OSABI. ++ * debian/patches/alpha/submitted-fts64.diff: new patch to fix the new fts64 ++ function on alpha. ++ ++ [ Samuel Thibault ] ++ * hurd-i386/cvs-libpthread.diff: More updates to glibc-2.23. ++ * hurd-i386/cvs-openat.diff: Fix __openat prototype. ++ * hurd-i386/cvs-gai_sigqueue.diff: Fix gai_sigqueue prototype. ++ * hurd-i386/cvs-aio_sigqueue.diff: Fix aio_sigqueue prototype. ++ * hurd-i386/cvs-libpthread.diff: Separate 2.23 changes to... ++ * hurd-i386/cvs-libpthread-2.23.diff: ... separate patch. ++ * hurd-i386/cvs-libpthread.so.diff: Fix building malloc tests. ++ * testsuite-xfail-debian.mk: Skip test which just overflows memory. ++ * hurd-i386/cvs-pt-kill.diff: Fix pthread_kill locking. ++ * hurd-i386/cvs-open.diff: Fix __open in ld.so, thus fixing dlopen(). ++ * hurd-i386/cvs-c++-types.diff: Add expected c++-types.data. ++ * hurd-i386/local-ihash-use.diff: Note that libpthread uses ihash.h. ++ * testsuite-xfail-debian.mk: Add failing new tests. Disable the problematic ++ test-lfs test. ++ * hurd-i386/local-versions.diff: New patch to fix symbol version. ++ ++ [ Adam Conrad ] ++ * debian/patches/any/cvs-tst-malloc-thread-exit.diff: Backport fix from ++ upstream to make tst-malloc-thread-exit use fewer system resources. ++ * debian/debhelper.in/locales.config: Make default_environment_locale ++ get preseeded correctly both with and without /etc/default/locale. ++ * debian/control.in/i386: Remove list of Breaks that predate oldstable. ++ * debian/control.in/*: Drop long obsolete file overlap Breaks/Replaces. ++ ++ -- Aurelien Jarno Thu, 24 Mar 2016 00:21:05 +0100 ++ ++glibc (2.23-0experimental0) experimental; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * New upstream release: version 2.23, with git updates up to 2016-03-12: ++ - Fix German translation of "Alarm clock". Closes: #291293. ++ - Fix strtol in Turkish locales. Closes: #458611. ++ - Add LFS support for fts functions. Closes: #534521. ++ - Fix build with GCC 6. Closes: #811574. ++ - Fix unbounded stack allocation in nan* functions (CVE-2014-9761). ++ Closes: #813187. ++ - debian/patches/localedata/locale-ku_TR.diff: rebased. ++ - debian/patches/localedata/fix-lang.diff: upstreamed. ++ - debian/patches/localedata/first_weekday.diff: rebased. ++ - debian/patches/localedata/locale-nb_NO.diff: upstreamed. ++ - debian/patches/localedata/cvs-bg_BG-t_fmt.diff: upstreamed. ++ - debian/patches/alpha/local-string-functions.diff: rebased. ++ - debian/patches/amd64/local-blacklist-for-Intel-TSX.diff: rebased. ++ - debian/patches/arm/local-ioperm.diff: dropped. ++ - debian/patches/hppa/cvs-allocatestack-stacktop.diff: upstreamed. ++ - debian/patches/hppa/local-pthread_spin_unlock.diff: upstreamed. ++ - debian/patches/hppa/submitted-mathdef.diff: upstreamed. ++ - debian/patches/hppa/cvs-update-mman.h.diff: upstreamed. ++ - debian/patches/hppa/submitted-dladdr.diff: partially upstreamed, rebased. ++ - debian/patches/hurd-i386/local-enable-ldconfig.diff: rebased. ++ - debian/patches/hurd-i386/tg-tls.diff: rebased. ++ - debian/patches/hurd-i386/tg-tls-threadvar.diff: rebased. ++ - debian/patches/hurd-i386/tg-hurdsig-fixes.diff: rebased. ++ - debian/patches/hurd-i386/tg-hurdsig-global-dispositions.diff: rebased. ++ - debian/patches/hurd-i386/cvs-libpthread.diff: updated. ++ - debian/patches/hurd-i386/unsubmitted-gnumach.defs.diff: rebased. ++ - debian/patches/hurd-i386/submitted-fork_port_leak.diff: upstreamed. ++ - debian/patches/hurd-i386/tg-libc_getspecific.diff: rebased. ++ - debian/patches/hurd-i386/cvs-libpthread-libc-lockP.diff: upstreamed. ++ - debian/patches/hurd-i386/tg-mmap32th_bit.diff: upstreamed. ++ - debian/patches/hurd-i386/tg-sysheaders.diff: upstreamed. ++ - debian/patches/hurd-i386/cvs-bootstrap.diff: upstreamed. ++ - debian/patches/hurd-i386/cvs-cache-mach_host_self.diff: upstreamed. ++ - debian/patches/hurd-i386/cvs-csu_crt0.diff: upstreamed. ++ - debian/patches/hurd-i386/cvs-s_scalbn.diff: upstreamed. ++ - debian/patches/hurd-i386/local-mach_print.diff: rebased. ++ - debian/patches/hurd-i386/cvs-hidden.diff: rebased. ++ - debian/patches/hurd-i386/cvs-O_DIRECTORY.diff: upstreamed. ++ - debian/patches/hurd-i386/cvs-raise-longjump.diff: upstreamed. ++ - debian/patches/hurd-i386/tg-faccessat.diff: rebased. ++ - debian/patches/i386/local-i386-ulps.diff: dropped. ++ - debian/patches/kfreebsd/local-scripts.diff: rebased. ++ - debian/patches/m68k/submitted-gcc34-seccomment.diff: rebased. ++ - debian/patches/mips/cvs-testsuite-o32-fp.diff: upstreamed. ++ - debian/patches/powerpc/local-powerpc8xx-dcbz.diff: rebased. ++ - debian/patches/sh4/local-fpscr_values.diff: rebased. ++ - debian/patches/any/local-bindresvport_blacklist.diff: rebased. ++ - debian/patches/any/local-libgcc-compat-main.diff: rebased. ++ - debian/patches/any/local-libgcc-compat-abilists.diff: rebased. ++ - debian/patches/any/local-mktemp.diff: upstreamed. ++ - debian/patches/any/cvs-stdio-lock.diff: upstreamed. ++ - debian/patches/any/local-tcsetaddr.diff: rebased. ++ - debian/patches/any/local-tst-mktime2.diff: rebased. ++ - debian/patches/any/submitted-nis-netgrp.diff: upstreamed. ++ - debian/patches/any/submitted-longdouble.diff: rebased. ++ - debian/patches/any/local-dynamic-resolvconf.diff: rebased. ++ - debian/patches/any/local-static-dlopen-search-path.diff: upstreamed. ++ - debian/patches/any/local-math-logb.diff: upstreamed. ++ - debian/patches/any/cvs-gawk-gensub.diff: upstreamed. ++ - debian/patches/any/cvs-grantpt-namespace.diff: upstreamed. ++ - debian/patches/any/cvs-grantpt-pty-owner.diff: upstreamed. ++ - debian/patches/any/cvs-bits-libc-stdio-lock.diff: upstreamed. ++ - debian/patches/any/submitted-hle-checking-mutex.diff: upstreamed. ++ - debian/{control,symbols.wildcards,copyright}: Updated strings for 2.23. ++ - debian/patches/kfreebsd/local-undef-glibc.diff: rebased. ++ - debian/patches/kfreebsd/local-tst-malloc-backtrace.diff: rebased, ++ renamed into local-tst-malloc-fbtl.diff. ++ - debian/patches/hurd-i386/submitted-net.diff: rebased. ++ - debian/patches/hurd-i386/tg-bits_atomic.h_multiple_threads.diff: ++ rebased. ++ - debian/patches/hurd-i386/submitted-handle-eprototype.diff: dropped. ++ * debian/testsuite-xfail-debian.mk (powerpc) mark tst-malloc-thread-fail ++ test as xfail, it is a known issue and not a regression. ++ * debian/testsuite-xfail-debian.mk (mipsel): mark a few math tests are ++ failing, due to a bug in the Loongson 3 FPU. ++ * patches/kfreebsd/local-fbtl.diff: update to revision 5940 (from ++ glibc-bsd). ++ ++ -- Aurelien Jarno Sun, 13 Mar 2016 19:22:45 +0100 ++ ++glibc (2.22-13) unstable; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * debian/patches/mips/submitted-vfork.diff: new patch to fix ABI change and ++ testsuite on mips*. ++ * debian/patches/sparc/submitted-vfork.diff: new patch to fix ABI change and ++ testsuite on sparc*. ++ * debian/sysdeps/mipsel.mk, debian/sysdeps/mips64el.mk: bump ISA to MIPS32 ++ and MIPS64. ++ * debian/patches/hppa/submitted-start.diff: new patch from John David Anglin ++ to fix crash in executables built with -p and linked against gcrt1.o. ++ Closes: #827876. ++ ++ -- Aurelien Jarno Mon, 27 Jun 2016 00:51:43 +0200 ++ ++glibc (2.22-12) unstable; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * Update from upstream stable branch: ++ - fix FTBFS with recent binutils versions on mips* and sparc*. Closes: ++ #827477. ++ * debian/sysdeps/kfreebsd-i386.mk: fix libc0.1-i686 package name. ++ * debian/rules.d/build.mk: in case of build failure due testsuite ++ issues, display again the failed tests so that they appear at the end of ++ the build log. ++ * debian/local/etc/nsswitch.conf: add gshadow line to default ++ /etc/nsswitch.conf (addresses #699090). ++ * debian/debhelper.in/libc-bin.postinst: update /etc/nsswitch.conf to the ++ current default if it matches a version shipped by base-files or ++ libc-bin. This is based on a patch from Santiago Vila, thanks. Closes: ++ #827105. ++ ++ [ Samuel Thibault ] ++ * hurd-i386/tg-eintr.diff: New patch to fix "Interrupted" issues in ghc. ++ ++ -- Aurelien Jarno Mon, 20 Jun 2016 00:01:21 +0200 ++ ++glibc (2.22-11) unstable; urgency=medium ++ ++ [ Samuel Thibault ] ++ * hurd-i386/tg-poll_errors_fixes.diff: Fix crash when calling poll or select ++ on a fd which had never been allocated. Closes: #826175. ++ * hurd-i386/tg-faccessat.diff: Finish faccessat implementation. Fixes ++ findutils. Closes: #823027. ++ ++ [ Aurelien Jarno ] ++ * Update from upstream stable branch. ++ * debian/control: re-add libc0.1-i686, libc0.3-i686, libc6-i686 as a ++ dummy package to ease the upgrades. Closes: #825421, #826290. ++ * debian/sysdeps/i386.mk: add libc6-i686 dummy package. ++ * debian/sysdeps/hurd-i386.mk: add libc0.1-i686 dummy package. ++ * debian/sysdeps/kfreebsd-i386.mk: add libc0.3-i686 dummy package. ++ * debian/debhelper.in/libc.NEWS: drop the new about libc6-i686, libc0.1-i686 ++ and libc0.3-i686 packages removal. ++ * debian/script.in/nohwcap.sh: drop sparc optimized packages. ++ ++ -- Aurelien Jarno Sun, 05 Jun 2016 00:04:04 +0200 ++ ++glibc (2.22-10) unstable; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * Update from upstream stable branch: ++ - Fix a stack overflow in Sun RPC clntudp_call() (CVE-2016-4429). ++ * debian/control.in/main: build-depends on dpkg (>= 1.18.7) instead of ++ dpkg-dev (>= 1.18.7) as the cputable file is in dpkg, not dpkg-dev. ++ Closes: #824127. ++ * debian/debhelper.in/libc.NEWS: add an entry about the dropped libc6-i686, ++ libc0.1-i686 and libc0.3-i686 packages. Closes: #825421. ++ ++ [ Samuel Thibault ] ++ * patches/hurd-i386/cvs-i686-link.diff: Fix link of i686 build. ++ * sysdeps/hurd-i386.mk: Disable ifunc, not working yet. ++ * sysdeps/hurd-i386.mk: Fix and re-enable xen build. ++ * control: Re-introduce libc0.3-xen package. ++ * patches/hurd-i386/cvs-check-local-headers.diff: Update exclusion list. ++ ++ [ John David Anglin ] ++ * debian/patches/hppa/submitted-setcontext.diff: new patch to fix setcontext ++ return code on hppa. Closes: #824344. ++ * debian/patches/hppa/submitted-dladdr.diff: update patch to fix ++ debug/backtrace-tst test failure. Closes: #824362. ++ * debian/testsuite-xfail-debian.mk: update expected testsuite results. ++ Closes: #824363. ++ ++ -- Aurelien Jarno Tue, 31 May 2016 23:48:20 +0200 ++ ++glibc (2.22-9) unstable; urgency=medium ++ ++ [ Samuel Thibault ] ++ * hurd-i386/cvs-libpthread.so.diff: Fix building malloc tests. ++ * debian/testsuite-xfail-debian.mk: Update LFS tests. ++ ++ [ Aurelien Jarno ] ++ * debian/testsuite-xfail-debian.mk: drop check on i586 flavours. ++ * debian/patches/kfreebsd/local-tst-malloc-backtrace.diff: drop, obsoleted ++ by hurd-i386/cvs-libpthread.so.diff. ++ * debian/patches/arm/unsubmitted-ldconfig-cache-abi.diff: correctly apply ++ patch. Really fix #822489. ++ * control.in/main: Bump Standards-Version to 3.9.8 (no changes). ++ ++ -- Aurelien Jarno Thu, 12 May 2016 12:55:01 +0200 ++ ++glibc (2.22-8) unstable; urgency=medium ++ ++ [ Samuel Thibault ] ++ * hurd-i386/cvs-gprof-tick.diff: Cherry-pick from upstream to fix gprof ++ timing. ++ * hurd-i386/cvs-IPV6_PKTINFO.diff: Cherry-pick from upstream to fix ++ IPV6_*PKT* macros. ++ ++ [ Aurelien Jarno ] ++ * Update from upstream stable branch: ++ - Fix a buffer overflow in the glob function (CVE-2016-1234). ++ - Fix a stack overflow in getaddrinfo function (CVE-2016-3706). ++ - Fix nss_hesiod breakage. Closes: #821358. ++ * patches/kfreebsd/local-sysdeps.diff: update to revision 6051 (from ++ glibc-bsd) to fix FTBFS and provide PT_FOLLOW_FORK in sys/ptrace.h. ++ Closes: #822143, #823387. ++ * patches/arm/unsubmitted-ldconfig-cache-abi.diff: apply fix from Steve ++ McIntyre to fix an armhf ABI detection crash in ldconfig on arm64. ++ Closes: #822489. ++ * debian/control.in/main: upgrade breaks on binutils. This is plainly ++ wrong though, glibc should not be a special case: either we don't ++ support partial upgrades or we do that for all libraries. With that ++ let's hope people will stop reporting bugs, sigh. Closes: #819165. ++ * Drop libc*-i686 packages as GCC now defaults to i686: ++ - debian/control: drop packages, add provides and build-depends on ++ g++-5 (>= 5.3.1-17) and dpkg-dev (>= 1.18.7). ++ - debian/sysdeps/hurd-i386.mk: stop building libc0.3-i686. Use the ++ default compiler options to build libc0.3-xen. ++ - debian/sysdeps/i386.mk: stop building libc6-i686. ++ - debian/sysdeps/kfreebsd-i386.mk: drop. ++ - debian/patches/i386/submitted-i686-timing.diff: drop. Closes: ++ #218519. ++ ++ [ Adam Conrad ] ++ * debian/control.in/libc: Force i686 variants off the system on upgrade. ++ ++ -- Aurelien Jarno Wed, 11 May 2016 23:39:05 +0200 ++ ++glibc (2.22-7) unstable; urgency=medium ++ ++ [ Samuel Thibault ] ++ * hurd-i386/submitted-auxv.diff: Update from upstream commit into ++ cvs-auxv.diff. ++ * hurd-i386/unsubmitted-prof-eintr.diff: Fix recording profiling from ++ ext2fs. ++ * hurd-i386/submitted-anon-mmap-shared.diff: Disable, actually breaks ++ booting hurd-i386. ++ * control: Add myself as uploader. ++ ++ -- Samuel Thibault Tue, 19 Apr 2016 11:48:08 +0200 ++ ++glibc (2.22-6) unstable; urgency=medium ++ ++ [ Samuel Thibault ] ++ * hurd-i386/submitted-auxv.diff: New patch, fixes cvs crash. ++ * hurd-i386/submitted-anon-mmap-shared.diff: New patch, fixes inheritence of ++ shared anonymous memory. ++ ++ [ Aurelien Jarno ] ++ * Update from upstream stable branch: ++ - Fix stack overflow when getnetbyname is invoked on a very long name ++ (CVE-2016-3075). ++ - Fix HTM on powerpc/ppc64/ppc64el. ++ ++ -- Aurelien Jarno Sat, 09 Apr 2016 13:35:19 +0200 ++ ++glibc (2.22-5) unstable; urgency=medium ++ ++ [ Samuel Thibault ] ++ * testsuite-xfail-debian.mk: Disable the problematic test-lfs test on hurd. ++ ++ [ Aurelien Jarno ] ++ * Update from upstream stable branch: ++ - Fix assertion failure with unconnectable name server addresses. Closes: ++ #816669. ++ * Drop libnss-dns-udeb and libnss-files-udeb and merge the files they ++ include in libc6-udeb. ++ * debian/patches/any/cvs-sys-personality-h.diff: new patch to synchronise ++ with kernel headers. Closes: #697456. ++ ++ -- Aurelien Jarno Tue, 29 Mar 2016 00:44:21 +0200 ++ ++glibc (2.22-4) unstable; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * Update from upstream stable branch: ++ - Fix a memory leak in the resolver (CVE-2016-5417). Closes: #818178. ++ * debian/patches/localedata/fr_CA-first_weekday.diff: drop. Closes: ++ #769051. ++ * debian/rules, debian/rules.d/build.mk: move the C.UTF-8 locale and ++ locales-all generation to a separate target instead of building them ++ in the build_libc target. ++ * debian/control.in/main, debian/rules, debian/rules.d/build.mk: make sure ++ to use the just built localedef when building locales. When ++ cross-compiling use the system localedef with the correct endianness and ++ build-depends on the correct version. ++ ++ [ Samuel Thibault ] ++ * patches/hurd-i386/tg-sendmsg-SCM_RIGHTS.diff,tg-sendmsg-SCM_CREDS.diff: ++ Update. ++ * patches/hurd-i386/cvs-errnos.d.diff: New patch to fix build dependency ++ loop. ++ * patches/hurd-i386/cvs-mach-syscalls.mk.diff: New patch to fix missing ++ dependency. ++ ++ [ Adam Conrad ] ++ * debian/glibc-source.filelist: Refresh list of source files and sort. ++ ++ -- Aurelien Jarno Mon, 21 Mar 2016 18:41:37 +0100 ++ ++glibc (2.22-3) unstable; urgency=medium ++ ++ * Update from upstream stable branch: ++ - Fix linking shared objects that use libmvec.so functions. Closes: ++ #817879. ++ * debian/sysdeps/sh4.mk: build with -fno-delete-null-pointer-checks to ++ workaround a missing SH4 specific __builtin_trap implementation in GCC. ++ * debian/patches/localedata/locale-C.diff: fix LC_TIME week and d_t_fmt ++ fields in C.UTF-8 locale. Closes: #817895. ++ * debian/sysdeps/powerpcspe.mk: pass --without-fp to the configure script ++ on powerpcspe. Closes: #817926. ++ * debian/rules.d/control.mk: add nios2 architecture. Closes: #817944. ++ * debian/patches/any/submitted-dlopen-noload.diff: new patch to fix a crash ++ in dlopen() with RTLD_NOLOAD. Closes: #817900. ++ ++ -- Aurelien Jarno Sat, 12 Mar 2016 22:40:15 +0100 ++ ++glibc (2.22-2) unstable; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * Update from upstream stable branch: ++ - Fix pow() precision on CPUs with fma4, and the corresponding testsuite ++ failures. ++ - debian/patches/s390/submitted-socketcall.diff: drop, merged upstream. ++ * debian/libc6{,-mips32,-mipsn32}.symbols.mips64el: add symbols for files for ++ mips64el. ++ * patches/kfreebsd/local-sysdeps.diff: update to revision 5932 (from ++ glibc-bsd): ++ - Fix consistency check for PIC code when built with GCC 5. Closes: ++ #817207. ++ * debian/rules, debian/rules.d/build.mk, debian/rules.d/debhelper.mk: define ++ the mvec variable per flavour and not per platform. ++ * sysdeps/*mk: enable libmvec only on amd64 and x32 flavours. ++ * debian/debhelper.in/libc-dev-alt.install: install libmvec_nonshared.a also ++ for alternative builds. ++ * debian/debhelper.in/libc-dev{,-alt}.install: install libmvec.a. ++ ++ -- Aurelien Jarno Wed, 09 Mar 2016 18:42:19 +0100 ++ ++glibc (2.22-1) unstable; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * debian/testsuite-xfail-debian.mk (alpha): mark a few failures which ++ are not a regression compared to 2.21 as xfail. ++ * debian/testsuite-xfail-debian.mk (hurd): mark another failure which ++ is not a regression compared to 2.21 as xfail. ++ * debian/control.in/main: avoid experimental versions, use versions that ++ went through unstable instead. ++ ++ [ Samuel Thibault ] ++ * control: Accept hurd-headers-dev and libihash-dev as alternatives to ++ hurd-dev for bootstrapping. ++ ++ -- Aurelien Jarno Mon, 07 Mar 2016 12:38:18 +0100 ++ ++glibc (2.22-0experimental3) experimental; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * Update from upstream stable branch: ++ - debian/patches/any/local-CVE-2015-7547.diff: drop, merged upstream. ++ * debian/testsuite-xfail-debian.mk (hurd): correctly detect Hurd. Mark tests ++ failing to build as unsupported. Update for glibc 2.22. ++ * debian/patches/hurd-i386/submitted-hurd-abilist.diff: new patch to get the ++ abilist tests buildable on Hurd. ++ * debian/testsuite-xfail-debian.mk (mips): correctly detect 64-bit mips ++ flavours. ++ * debian/testsuite-xfail-debian.mk (hppa): mark new tests which fail as ++ xfail. ++ * debian/testsuite-xfail-debian.mk (alpha): mark new tests which fail as ++ xfail. ++ * control.in/main: Bump Standards-Version to 3.9.7 (no changes). ++ * debian/patches/sparc/submitted-sparc64-socketcall.diff: new patch to fix ++ bind(), listen() and setsockopt()when built against 4.4+ kernel headers. ++ * Update German debconf translation, by Helge Kreutzman. Closes: #815697. ++ * Update Japanese debconf translation, by Takuma Yamada. Closes: #815858. ++ ++ -- Aurelien Jarno Tue, 01 Mar 2016 18:56:42 +0100 ++ ++glibc (2.22-0experimental2) experimental; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * debian/patches/m68k/local-fpic.diff: drop, obsolete. ++ * debian/patches/m68k/local-mathinline_h.diff: drop, not applied for a ++ lot of time, obsolete. ++ * debian/patches/sparc/submitted-timing.diff: drop, obsolete, not ++ needed anymore since libc6-sparcv9 has been removed. ++ * debian/patches/any/local-no-malloc-backtrace.diff: drop, the real bug ++ has been fixed upstream. ++ * debian/patches/any/local-no-SOCK_NONBLOCK.diff: drop, both GNU/Hurd ++ and GNU/kFreeBSD now support SOCK_NONBLOCK. ++ * debian/patches/any/local-libgcc-compat-ports.diff: refresh. ++ * debian/patches/any/local-disable-test-tgmath2.diff: drop, 8 years have ++ passed, the build daemons should now have enough resources to build ++ and run this test. ++ * debian/patches/s390/submitted-nexttowardf.diff: drop, fixed upstream ++ another way. ++ * debian/patches/alpha/submitted-rtld-fPIC.diff: drop, fixed upstream ++ another way. ++ * debian/patches/any/unsubmitted-scanf-includes.diff: replace the hack by ++ the upstream fix patches/any/cvs-bits-libc-stdio-lock.diff. This also ++ stop installing and . Closes: ++ #404532, #639697. ++ * debian/control, debian/rules.d/control.mk, debian/sysdeps/arm.mk: remove ++ support for the ARM old-ABI architecture, it is not supported upstream ++ anymore. ++ * debian/sysdeps/*.mk: cleanup and homogenize: ++ - define options common to all flavours using the non-flavour specific ++ variable. ++ - reorganize to not mix generic variables with flavour specific variables. ++ - move -march and -mtune options from extra_cflags to CC and CXX as they ++ might slightly change the ABI and the configure script needs to detect ++ that. ++ * debian/testsuite-checking/expected-results-sparc64-linux-gnu-libc: allow ++ new tests to fail, cleanup resolved issues. ++ * Replace debian/patches/i386/submitted-i586-ulps.diff by ++ debian/patches/i386/local-i386-ulps.diff. The actual math precision ++ depends on the CPU manufacturer and on the ability to use SSE2 ++ instructions or not. Change the i386 ULPs to the lowest precision ++ produced by AMD and Intel CPU with and without SSE2 until upstream can ++ figure out a better solution. ++ * debian/testsuite-checking/expected-results-powerpc64le-linux-gnu-libc: ++ allow nptl/tst-cancel17 and nptl/tst-cancelx17, this is a know upstream ++ race condition. ++ * debian/testsuite-checking/*, debian/testsuite-xfail-debian.mk, ++ debian/rules.d/build.mk: rework testsuite system by extending upstream. ++ * debian/debhelper.in/libc{,-alt,otherbuild).install: stop shipping ++ testsuite results as it make the package build non-reproducible in case ++ of different kernels and race conditions in the testsuite. ++ * debian/testsuite-xfail-debian.mk: allow stdlib/tst-makecontext to fail ++ on armel and armhf, as it is a new test introduced with glibc 2.22 and ++ not a regression. ++ * debian/patches/git-updates.diff: update to the latest commit of the ++ 2.22 branch. ++ * debian/patches/alpha/submitted-abilist.diff: drop, merged upstream. ++ * debian/patches/hppa/cvs-inline-syscall.diff: drop, merged upstream. ++ * debian/patches/hppa/cvs-start.diff: drop, merged upstream. ++ * debian/control.in/main: update VCS fields to the canonical location. ++ * debian/control.in/{libc,libnss-dns-udeb,libnss-files-udeb}: rename ++ XC-Package-Type into Package-Type. ++ * debian/control.in/libc: drop conflicts on prelink (<= 0.0.20090311-1) as ++ we don't support Lenny to Stretch upgrades. ++ * debian/debhelper.in/libc-bin.{postinst,lintian-overrides}, ++ debian/rules.d/debhelper.mk, debian/local/sbin/ldconfig: remove ldconfig ++ wrapper as new debhelper versions use the trigger instead of an explicit ++ call to ldconfig. ++ * debian/testsuite-xfail-debian.mk: allow POSIX2008/netdb.h/linknamespace ++ and -XOPEN2K/netdb.h/linknamespace to fail on kfreebsd-* (new tests). ++ * debian/testsuite-xfail-debian.mk: allow tst-setcontext2 to fail on ++ kfreebsd-* (new test also failing on native FreeBSD). ++ ++ [ Adam Conrad ] ++ * debian/patches/any/cvs-gawk-gensub.diff: Fix scary output from newer gawk. ++ * debian/debhelper.in/libc-bin.postinst: Call ldconfig during configure as ++ well, or major version upgrades will leave us without due to dep ordering. ++ ++ -- Aurelien Jarno Mon, 15 Feb 2016 21:48:56 +0100 ++ ++glibc (2.22-0experimental1) experimental; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * debian/debhelper.in/libc-dev.install: install libmvec_nonshared.a. ++ Closes: #806910. ++ * debian/control.in/main, debian/rules: build with gcc-5. ++ * patches/kfreebsd/local-sysdeps.diff, patches/kfreebsd/local-fbtl.diff: ++ update to revision 5856 (from glibc-bsd): ++ - Update to glibc 2.22. ++ * debian/patches/kfreebsd/local-tst-malloc-backtrace.diff: new patch to fix ++ tst-malloc-backtrace on GNU/kFreeBSD. ++ * debian/sysdeps/ppc64el.mk: default to POWER8 and use default gcc options. ++ * debian/rules.d/build.mk: explicitly disable mathvec when mvec=no. ++ * debian/testsuite-checking/expected-results-s390x-linux-gnu-libc: ++ allow elf/tst-protected1a and elf/tst-protected1b to fail as they are ++ new tests. Cleanup resolved issues. ++ * debian/testsuite-checking/expected-results-aarch64-linux-gnu-libc: ++ cleanup resolved issues. ++ * debian/rules.d/build.mk: abort if the log file does not contain any ++ testsuite result. ++ * debian/patches/localedata/submitted-locale-bo.diff: drop, now useless. ++ * debian/patches/any/submitted-resolv-ipv6-nameservers.diff: drop, now ++ useless. ++ * debian/testsuite-checking/expected-results-powerpc-linux-gnu-libc, ++ debian/testsuite-checking/expected-results-powerpc64-linux-gnu-ppc64: ++ cleanup resolved issues. ++ * debian/testsuite-checking/expected-results-powerpc-linux-gnu-powerpc, ++ debian/testsuite-checking/expected-results-powerpc64-linux-gnu-libc: ++ new files. ++ * debian/patches/i386/submitted-i586-ulps.diff: new patch to provide ++ i586 ULPs. ++ * debian/patches/git-updates.diff: update to the latest commit of the ++ 2.22 branch. ++ * debian/testsuite-checking/expected-results-i?86-linux-gnu-*: cleanup ++ resolved issues. ++ * debian/testsuite-checking/expected-results-x86_64-linux-gnu-*: cleanup ++ resolved issues. ++ * debian/testsuite-checking/expected-results-x86_64-linux-gnux32-*: ++ update and cleanup resolved issues. ++ * debian/testsuite-checking/expected-results-powerpc64le-linux-gnu-libc: ++ update and cleanup resolved issues. ++ * debian/testsuite-checking/expected-results-mips*: update and cleanup ++ resolved issues. ++ * debian/testsuite-checking/expected-results-*kfreebsd-gnu*: update and ++ cleanup resolved issues. ++ * debian/patches/mips/local-r10k.diff: dropped, we don't support systems ++ with a MIPS R10K CPU since the ISA has been switched to MIPS R2. ++ * debian/patches/mips/cvs-testsuite-o32-fp.diff: new patch to fix testsuite ++ build on pre-R2 ISA. ++ * debian/patcheS/any/cvs-grantpt-namespace.diff: new patch to fix the ++ grantpt link namespace when built without pt_chown. ++ * debian/patches/alpha/submitted-abilist.diff: new patch to fix alpha ABI ++ baseline sorting. ++ * debian/patches/alpha/submitted-fegetenv-namespace.diff: new patch to fix ++ the fegetenv link namespace on alpha. ++ * debian/patches/alpha/submitted-termios_h.diff: new patch to fix ++ visibility issues in termios.h on alpha. ++ ++ -- Aurelien Jarno Thu, 10 Dec 2015 23:29:06 +0100 ++ ++glibc (2.22-0experimental0) experimental; urgency=medium ++ ++ [ Adam Conrad ] ++ * New upstream release: version 2.22, with git updates up to 2015-11-27: ++ - debian/patches/all/local-alias-UTF-8.diff: Fixed upstream. ++ - debian/patches/any/cvs-ldconfig-aux-cache.diff: Upstreamed. ++ - debian/patches/any/cvs-localplt-new-readelf.diff: Upstreamed. ++ - debian/patches/any/cvs-logbl-accuracy.diff: Upstreamed. ++ - debian/patches/any/cvs-vismain-pie.diff: Upstreamed. ++ - debian/patches/any/local-xfail-stdlib-linkns.diff: Dropped. ++ - debian/patches/any/local-tester-gcc-4.9.diff: Dropped. ++ - debian/patches/arm/cvs-arm-sfi_breg.diff: Upstreamed. ++ - debian/patches/arm/cvs-memcpy-memmove-always-bx.diff: Upstreamed. ++ - debian/patches/hppa/cvs-alloca-werror.diff: Upstreamed. ++ - debian/patches/hppa/cvs-fpu-r2.diff: Upstreamed. ++ - debian/patches/hppa/cvs-fpu2.diff: Upstreamed. ++ - debian/patches/hppa/local-fcntl-osync.diff: Fixed upstream. ++ - debian/patches/hppa/local-setcontext.diff: Fixed upstream. ++ - debian/patches/powerpc/cvs-power7-strncpy.diff: Upstreamed. ++ - debian/patches/powerpc/cvs-ppc-feraiseexcept.diff: Upstreamed. ++ - debian/patches/powerpc/cvs-ppc-pow.diff: Upstreamed. ++ - debian/patches/powerpc/cvs-ppc-sqrt.diff: Upstreamed. ++ - debian/patches/powerpc/cvs-ppc-sqrtf.diff: Upstreamed. ++ - debian/patches/powerpc/cvs-ppc-tabort-le.diff: Upstreamed. ++ - debian/patches/all/local-alias-et_EE.diff: Rebased. ++ - debian/patches/amd64/local-blacklist-for-Intel-TSX.diff: Rebased. ++ - debian/patches/any/local-libgcc-compat-ports.diff: Rebased. ++ - debian/patches/any/local-libpic.diff: Rebased. ++ - debian/patches/any/local-no-pagesize.diff: Rebased. ++ - debian/patches/any/submitted-longdouble.diff: Rebased. ++ - debian/patches/any/submitted-missing-etc-hosts.diff: Rebased. ++ - debian/patches/any/submitted-resolv-ipv6-nameservers.diff: Rebased. ++ - debian/patches/i386/submitted-i686-timing.diff: Rebased. ++ - debian/patches/localedata/local-all-no-archive.diff: Rebased. ++ - debian/patches/localedata/submitted-locale-bo.diff: Rebased. ++ - debian/patches/mips/submitted-rld_map.diff: Rebased. ++ * debian/{control,symbols.wildcards,copyright}: Updated strings for 2.22. ++ * debian/libc6*.symbols: Add libmvec.so.1 to the amd64/x32 symbols files. ++ * debian/*: Conditionally add libmvec to libc-udeb only on amd64 and x32. ++ ++ [ Samuel Thibault ] ++ * debian/patches/hurd-i386/tg-tls.diff: Rebased. ++ * debian/patches/hurd-i386/tg-tls-threadvar.diff: Rebased. ++ * debian/patches/hurd-i386/tg-ioctl-base-types.diff: Upstreamed. ++ * debian/patches/hurd-i386/tg-extern_inline.diff: Rebased. ++ * debian/patches/hurd-i386/tg-aio_misc.diff: Upstreamed. ++ * debian/patches/hurd-i386/tg-chflags.diff: Upstreamed. ++ * debian/patches/hurd-i386/tg-select-EINTR.diff: Upstreamed. ++ * debian/patches/hurd-i386/tg-af_local_strlen.diff: Upstreamed. ++ * debian/patches/hurd-i386/tg-nice.diff: Upstreamed. ++ * debian/patches/hurd-i386/tg-nfds-poll.diff: Upstreamed. ++ * debian/patches/hurd-i386/tg-sigstate_locking.diff: Upstreamed. ++ * debian/patches/hurd-i386/tg-mmap_file_prot_none_fix.diff: Upstreamed. ++ * debian/patches/hurd-i386/cvs-unwind-resume.diff: Upstreamed. ++ * debian/patches/hurd-i386/cvs-libc-modules.h.diff: Upstreamed. ++ * debian/patches/hurd-i386/cvs-warnings.diff: Upstreamed. ++ * debian/patches/hurd-i386/cvs-check-local-headers.diff: Upstreamed. ++ * debian/patches/hurd-i386/cvs-mlock.diff: Upstreamed. ++ * debian/patches/hurd-i386/cvs-csu_crt0.diff: New patch, fixes gcrt0.o ++ build. ++ * debian/patches/hurd-i386/cvs-s_scalbn.diff: New patch, fixes s_scalbn.S ++ build. ++ * debian/patches/hurd-i386/tg-tls-threadvar.diff: Update. ++ * patches/hurd-i386/tg-posix_thread.diff: Update, to define ++ _POSIX_THREAD_KEYS_MAX, _POSIX_THREAD_DESTRUCTOR_ITERATIONS and ++ _POSIX_THREAD_THREADS_MAX. ++ ++ [ Aurelien Jarno ] ++ * debian/patches/hppa/cvs-atomic.diff: Upstreamed. ++ * debian/patches/hppa/cvs-sysdep-errno.diff: Upstreamed. ++ * debian/patches/hppa/cvs-inline-syscall-rewrite.diff: Upstreamed. ++ * debian/patches/any/cvs-mangle-tls_dtor_list.diff: Rebased. ++ * debian/patches/any/cvs-tls-dtv.diff: Upstreamed. ++ * debian/patches/any/cvs-rfc3542-advanced-api.diff: Upstreamed. ++ * debian/patches/any/cvs-check-localplt.diff: Upstreamed. ++ * debian/patches/any/cvs-ld_pointer_guard.diff: Upstreamed. ++ * debian/patches/any/cvs-mangle-tls_dtor_list.diff: Upstream. ++ ++ -- Aurelien Jarno Wed, 02 Dec 2015 00:06:13 +0100 ++ ++glibc (2.21-9) unstable; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * Update from upstream stable branch: ++ - Fixes bug18240 failing with a timeout on machines with a lot of swap. ++ Closes: #814958. ++ ++ -- Aurelien Jarno Wed, 17 Feb 2016 18:45:59 +0100 ++ ++glibc (2.21-8) unstable; urgency=critical ++ ++ * Update from upstream stable branch: ++ - Fix an integer overflow in hcreate() and hcreate_r() (CVE-2015-8778). ++ Closes: #812441. ++ * patches/any/local-CVE-2015-7547.diff: new patch to fix glibc getaddrinfo ++ stack-based buffer overflow (CVE-2015-7547). ++ ++ -- Aurelien Jarno Mon, 15 Feb 2016 21:38:15 +0100 ++ ++glibc (2.21-7) unstable; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * patches/localedata/cvs-bg_BG-t_fmt.diff: new patch from upstream to ++ use colon as time separator in the Bulgarian locale. Closes: ++ #808143. ++ * Update French debconf translation, by Christian Perrier. Closes: ++ #809636. ++ * Update Brazilian Portuguese debconf translation, by Adriano Rafael ++ Gomes. Closes: #809741. ++ * patches/hppa/cvs-update-mman.h.diff: new patch from upstream to add huge ++ pages support on hppa. Closes: #809776. ++ * patches/hppa/submitted-dladdr.diff: new patch from John David Anglin to ++ fix dladdr issues on hppa. Closes: #810053. ++ * sysdeps/armel.mk, sysdeps/armhf.mk: re-enable IFUNC support now that ++ binutils has been fixed. ++ * debian/control.in/main: update Vcs-* fields to point to the new git ++ repository. ++ * Update Dutch debconf translation, by Frans Spiesschaert. Closes: #812351. ++ * Update from upstream stable branch: ++ - Fix segmentation fault caused by passing out-of-range data to strftime() ++ (CVE-2015-8776). Closes: #812445. ++ - Fix multiple unbounded stack allocations in catopen() (CVE-2015-8779). ++ Closes: #812455. ++ * patches/any/submitted-hle-checking-mutex.diff: add proposed patch to fix ++ a wrong assertion in pthread_mutex_unlock() on systems with hardware lock ++ elision. Closes: #810322. ++ ++ [ Samuel Thibault ] ++ * patches/hurd-i386/cvs-libpthread-sigstate.diff: New patch to fix spurious ++ signal blocking leading to sigill. Fixes rsyslog tests. ++ * patches/hurd-i386/cvs-raise-longjump.diff: New patch to fix longjump from ++ signal handler. Closes: #800900. ++ * patches/hurd-i386/cvs-O_DIRECTORY.diff: New patch to fix O_DIRECTORY lookup ++ on trivial translators. Closes: #785404. ++ ++ -- Aurelien Jarno Sun, 24 Jan 2016 00:21:18 +0100 ++ ++glibc (2.21-6) unstable; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * sysdeps/kfreebsd.mk: test if the header directory exists before ++ trying to link directories from there. Fixes FTBFS on GNU/kFreeBSD. ++ * patches/s390/submitted-socketcall.diff: new patch to fix broken ++ socketcall related function on s390x when built against 4.3+ kernel ++ headers. ++ ++ -- Aurelien Jarno Fri, 25 Dec 2015 03:35:01 +0100 ++ ++glibc (2.21-5) unstable; urgency=medium ++ ++ [ Samuel Thibault ] ++ * Team upload. ++ * patches/hurd-i386/cvs-libpthread-api.diff: Update patch, add missing throw ++ specifications. ++ * patches/any/local-stdio-lock.diff: Update to git commit, and ++ rename into patches/any/cvs-stdio-lock.diff. ++ * debhelper.in/libc.lintian-overrides: Override error about the embedded ++ libidn. ++ ++ [ Aurelien Jarno ] ++ * sysdeps/armel.mk, sysdeps/armhf.mk: pass --disable-multi-arch on armel and ++ armhf as IFUNC support is broken in binutils (see #807974). ++ ++ -- Samuel Thibault Tue, 22 Dec 2015 15:23:35 +0100 ++ ++glibc (2.21-4) unstable; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * debian/debhelper.in/libc.{preinst,prerm}: remove code handling the ++ upgrade from squeeze to wheezy, as we don't support squeeze to stretch ++ upgrades. Move tests which might exit with a failure at the beginning. ++ * debian/sysdeps/amd64.mk, debian/sysdeps/i386.mk: downgrade the minimal ++ Linux kernel version to 2.6.32 to support RHEL6 kernels. ++ * debhelper.in/libc.preinst: add a note explainling that pre-3.2 kernel ++ are not officially supported. ++ * debhelper.in/libc.preinst, debhelper.in/libc.templates, po/*: display ++ kernel related notes using debconf if available. ++ * patches/any/cvs-grantpt-pty-owner.diff: new patch from upstream to ++ improve granpt when /dev/pts is not mounted with the correct options. ++ Closes: #806882. ++ ++ [ Samuel Thibault ] ++ * patches/hurd-i386/cvs-libpthread-api.diff: New patch, cleans libpthread ++ API. Fixes conflicting declarations between pthread.h and sigthread.h. ++ ++ -- Aurelien Jarno Thu, 10 Dec 2015 22:34:54 +0100 ++ ++glibc (2.21-3) unstable; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * debian/control.in/opt: drop libc0.3-i686 and libc0.3-xen entries. ++ ++ -- Aurelien Jarno Fri, 04 Dec 2015 00:22:07 +0100 ++ ++glibc (2.21-2) unstable; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * debhelper.in/libc.preinst: drop outdated code about pre-2.6 kernels. ++ * rules.d/debhelper.mk: prefix calls to objcopy and strip with ++ $(DEB_HOST_GNU_TYPE)-. ++ * testsuite-checking/expected-results-hppa-linux-gnu-libc: update testsuite ++ result, from John David Anglin. Closes: #806839. ++ * debhelper.in/libc.NEWS: add an entry about the required minimum kernel. ++ * rules.d/debhelper.mk: strip *crt*.o files. ++ * patches/any/cvs-tls-dtv.diff: update with a new patch from upstream ++ changing the IE model for static variables. Closes: #806971. ++ ++ -- Aurelien Jarno Thu, 03 Dec 2015 22:46:21 +0100 ++ ++glibc (2.21-1) unstable; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * testsuite-checking/expected-results-mips64el-linux-gnu-*: allow ++ nptl/tst-cancel24-static to fail on mips64el. It's an upstream regression ++ only affecting static binaries currently under investigation. ++ * patches/hppa/submitted-mathdef.diff: update to include the ABI baseline ++ changes. ++ * testsuite-checking/expected-results-*kfreebsd-gnu-*: re-add rt/tst-shm as ++ it seems it can still occasionally fail on the buildds. ++ ++ -- Aurelien Jarno Tue, 01 Dec 2015 00:17:43 +0100 ++ ++glibc (2.21-0experimental4) experimental; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * testsuite-checking/expected-results-*kfreebsd-gnu-*: re-add tst-getpid1 ++ and tst-getpid2 as it seems they can still occasionally fail on the ++ buildds. ++ * testsuite-checking/expected-results-mips64el-linux-gnu-libc: rename into ++ testsuite-checking/expected-results-mips64el-linux-gnuabi64-libc. ++ * testsuite-checking/expected-results-{arm,mips}*: allow nptl/tst-stack4 to ++ fail. It's a new test which fails intermitently on the buildds and a known ++ upstream problem. ++ * patches/hppa/submitted-mathdef.diff: new patch from John David Anglin to ++ define __NO_LONG_DOUBLE_MATH on hppa. Closes: #805836. ++ * patches/hppa/cvs-inline-syscall-rewrite.diff: new patch backported from ++ upstream as requested by John David Anglin. ++ * patches/hppa/cvs-sysdep-errno.diff: new patch backported from upstream as ++ requested by John David Anglin. ++ * testsuite-checking/expected-results-hppa-linux-gnu-libc: update testsuite ++ result, from John David Anglin. ++ * testsuite-checking/*{arm,mips,hppa}*: allow nptl/tst-cancel24-static to ++ fail on armel, armhf, hppa, mips, mipsel. It's an upstream regression ++ only affecting static binaries currently under investigation. ++ ++ [ Samuel Thibault ] ++ * patches/hurd-i386/tg-tls-threadvar.diff: Update, to fix recursion while ++ accessing TLS while locking for accessing TLS. ++ * patches/hurd-i386/tg-context_functions.diff: Update, to fix sigprocmask ++ visibility. ++ * patches/hurd-i386/cvs-hidden.diff: New patch, to fix build with hidden ++ support. ++ * sysdeps/hurd-i386.mk: Disable libc0.3-i686 and libc0.3-xen build for now, ++ to get 2.21 out against the binutils version which broke them. ++ ++ -- Aurelien Jarno Sun, 29 Nov 2015 23:24:08 +0100 ++ ++glibc (2.21-0experimental3) experimental; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * patches/hppa/cvs-allocatestack-stacktop.diff: new patch from upstream ++ to fix a set-but-unused warning in nptl/allocatestack.c, causing a ++ build failure. ++ * patches/hppa/local-stack-grows-up.diff: rebase. ++ * patches/any/cvs-tls-dtv.diff: new patch from upstream to fix DTV race, ++ assert, and DTV_SURPLUS Static TLS limit. This also reduces the failure ++ rate of nptl/tst-stack4. Closes: #793641. ++ * Add expected testsuite result for mips64el: ++ - testsuite-checking/expected-results-mips64el-linux-gnu-libc ++ - testsuite-checking/expected-results-mips64el-linux-gnuabin32-mipsn32 ++ - testsuite-checking/expected-results-mipsel-linux-gnu-mips32 ++ * patches/kfreebsd/local-sysdeps.diff, patches/kfreebsd/local-fbtl.diff: ++ update to revision 5844 (from glibc-bsd): ++ - Update to glibc 2.21. ++ - Define F_DUP2FD_CLOEXEC. Closes: #712074. ++ - Define SOCK_CLOEXEC and SOCK_NONBLOCK. ++ - Wire-up accept4. Closes: #722885. ++ * sysdeps/kfreebsd-{amd64,i386}.mk: configure with --disable-werror. ++ * patches/kfreebsd/local-nscd-no-sockcloexec.diff: Drop. ++ * patches/kfreebsd/local-getaddrinfo-freebsd-kernel.diff: improve and remove ++ a warning. ++ * patches/kfreebsd/local-tst-auxv.diff: new patch to disable AT_EXECFN ++ testing in tst-auxv when it is not defined. ++ * patches/any/cvs-rfc3542-advanced-api.diff: new patch from usptream to ++ add missing Advanced API (RFC3542) (1) defines. Closes: #753909. ++ * debian/rules: don't put debug files from libc0.1-i386 and libc6-mips32 ++ into libc0.1-dbg or libc6-dbg. ++ * patches/hppa/cvs-atomic.diff, patches/hppa/cvs-inline-syscall.diff: new ++ patches from upstream to improve atomic and inline syscalls on HPPA ++ (closes: #799478). ++ * rules.d/build.mk: don't run the testsuite with make -k, as a build ++ failure in the testsuite, otherwise build failures cause the regression ++ comparison to be entirely skipped. ++ * testsuite-checking/expected-results-*kfreebsd-gnu-*: update testsuite ++ results. ++ * patches/any/cvs-check-localplt.diff: new patch from upstream to fix ++ check-localplt test with recent binutils version on x86. ++ * patches/hppa/submitted-gmon-start.diff: new patch from upstream to ++ fix __gmon_start__ symbol proliferation on hppa. Closes: #805730. ++ * Update from upstream stable branch: ++ - patches/any/cvs-make-typo.diff: Merged. ++ - Fix FTBFS with libselinux 2.4. ++ ++ [ Samuel Thibault ] ++ * patches/hurd-i386/tg-pagesize.diff: Refresh. ++ * patches/hurd-i386/submitted-handle-eprototype.diff: Refresh. ++ * patches/hurd-i386/tg-posix_thread.diff: Update, to define ++ _POSIX_THREAD_KEYS_MAX, _POSIX_THREAD_DESTRUCTOR_ITERATIONS and ++ _POSIX_THREAD_THREADS_MAX. ++ ++ -- Aurelien Jarno Sun, 22 Nov 2015 19:37:39 +0100 ++ ++glibc (2.21-0experimental2) experimental; urgency=medium ++ ++ [ Samuel Thibault ] ++ * Symbol versions which contain _DEBIAN_ are unexpected by upstream scripts. ++ Add hurd-i386-only patches/hurd-i386/local-versions-hack.diff to work ++ around the issue. Also take the opportunity of the upstream version bump ++ to bump the versions to GLIBC_2_21, which will allow one to remove the ++ _DEBIAN_ hacks once packages are rebuilt. ++ * patches/hurd-i386/unsubmitted-libpthread-semaphore.h.diff: Remove ++ libpthread/sysdeps/i386/bits/semaphore.h, now that hurd Implies ++ libpthread/sysdeps/generic. Move libpthread/include/semaphore.h into ++ libpthread/sysdeps/pthread/semaphore.h instead of the latter just ++ including the former, since the latter is what gets installed. ++ * patches/hurd-i386/cvs-cache-mach_host_self.diff: New patch to avoid port ++ count issue on the host port. ++ * patches/hurd-i386/unsubmitted-gnumach.defs.diff: Also build ++ task_notify.defs stubs. Drop unneeded change. ++ * libc0.3.symbols.hurd-i386: Update. ++ * patches/hurd-i386/local-mach_print.diff: New patch to export mach_print. ++ ++ [ Aurelien Jarno ] ++ * rules.d/debhelper.mk: replace GLIBC_VERSION before LIBC. Closes: ++ #797538. ++ * Drop loongson-2f flavour on mipsel as this machine is not supported ++ anymore (default to R2 ISA). ++ * kfreebsd/local-sysdeps.diff: update to revision 5772 (from glibc-bsd). ++ Closes: #764692, #785796. ++ * testsuite-checking/expected-results-mips*: allow the new tst-audit9 ++ fail, like the others tst-auditX. ++ * testsuite-checking/expected-results-mips(el)-linux-gnu-libc: allow ++ conformtest for sys/stat.h to fail for O32 ABI. They were previously ++ under the failing test run-conformtest.out, but it has been lost in ++ the conversion to the new format. ++ * testsuite-checking/expected-results-mips*: sort the files. Remove ++ failures due to old kernel now that all buildds run jessie. ++ * debhelper.in/locales-all.prerm: do not specify a path to check for ++ locale-gen. ++ * libc6.1.symbols.alpha: remove invoke_dynamic_linker from libpcprofile.so. ++ It has disappeared, but it is a private library. ++ * Remove debver2localesdep.pl, it is unused since 2.19-16. ++ * Use $(GLIBC_VERSION) for shlib, instead of defining the version in a ++ separate shlibver file. ++ * Remove completely outdated README, README.source and TODO files. ++ * rules.d/debhelper.mk: use the default compression format for libc6, ++ libc-bin and multiarch-support. Nowadays deboostrap is able to handle ++ the xz format and modern distributions also support it. Anyway almost ++ all packages installed by debootstrap are now using the xz format. ++ * Bump debhelper compatibility to level 9. This brings compressed debug ++ file using the build-id instead of a fixed path. This is much more ++ multiarch friendly. ++ * control.in/*: remove pre-squeeze conflicts. ++ * libc-bin, libc-dev-bin: Recommends the manpages package and add lintian ++ override for missing manpages. ++ * sysdeps/s390x.mk: --enable-lock-elision. ++ * testsuite-checking/expected-results-x86_64-linux-gnux32-*: allow ++ conformtest for headers with tv_nsec to fail for x32. The type ++ non-compliance is intentional. These tests were previously marked as ++ failing under the run-conformtest.out, but they have been lost during ++ the conversion to the new format. ++ * testsuite-checking/compare.sh: re-enable failures in case of regressions. ++ * rules.d/build.mk: don't require flavours to be tested before being ++ installed. They are still tested when calling the build-arch or ++ binary-arch targets, but not anymore when calling the build-indep or ++ binary-indep targets. ++ * patches/hppa/cvs-alloca-werror.diff: new patch from upstream to fix a ++ build failure. ++ * debhelper.in/libc.preinst: fix up error message for too old Linux ++ kernels. Closes: #800846. ++ * patches/any/cvs-ld_pointer_guard.diff: new patch from upstream to ++ unconditionally disable LD_POINTER_GUARD. Closes: #798316, #801691. ++ * patches/any/cvs-mangle-tls_dtor_list.diff: new patch from upstream to ++ mangle function pointers in tls_dtor_list. Closes: #802256. ++ * Update Brazilian Portuguese debconf translation, by Adriano Rafael ++ Gomes. Closes: #799418. ++ ++ [ Steven Chamberlain ] ++ * sysdeps/kfreebsd.mk: find kfreebsd-kernel-headers in multiarch path. ++ Closes: #672774, #798064. ++ ++ [ Helmut Grohne ] ++ * Fix some issues with stage 1. Closes: #797831. ++ ++ [ Adam Conrad ] ++ * debian/patches/arm/local-arm-futex.diff: Lie about the minimum kernel ++ support for futex_atomic_cmpxchg_inatomic to restore the previous state ++ and fix the pulsesink (and others) regression on ARM (closes: #788799) ++ ++ [ Henrique de Moraes Holschuh ] ++ * Replace patches/amd64/local-blacklist-on-TSX-Haswell.diff by ++ local-blacklist-for-Intel-TSX.diff also blacklisting some Broadwell ++ models. Closes: #800574. ++ ++ -- Aurelien Jarno Mon, 19 Oct 2015 00:20:34 +0200 ++ ++glibc (2.21-0experimental1) experimental; urgency=medium ++ ++ [ Samuel Thibault ] ++ * patches/hurd-i386/cvs-libpthread.diff: Update from upstream. ++ * patches/hurd-i386/cvs-libpthread-dlopen.diff: Merged. ++ * patches/hurd-i386/cvs-libpthread-libc-lockP2.diff: Merged. ++ * patches/hurd-i386/cvs-bind_umask.diff: Merged. ++ * patches/hurd-i386/cvs-fork_ss_hang.diff: Merged. ++ * patches/hurd-i386/cvs-munmap-0.diff: Merged. ++ * patches/hurd-i386/cvs-static-dlopen.diff: Merged. ++ * patches/hurd-i386/cvs-tcbhead_t.diff: Merged. ++ * patches/hurd-i386/cvs-libpthread_versions.diff: Rebased. ++ * patches/hurd-i386/local-disable-tst-xmmymm.diff: Dropped. ++ * patches/hurd-i386/local-hurdsig-global-dispositions-version.diff: Rebased. ++ * patches/hurd-i386/submitted-exec_filename.diff: Rebased. ++ * patches/hurd-i386/submitted-net.diff: Rebased. ++ * patches/hurd-i386/tg-EIEIO-fr.diff: Rebased. ++ * patches/hurd-i386/tg-af_local_strlen.diff: Rebased. ++ * patches/hurd-i386/tg-chflags.diff: Rebased. ++ * patches/hurd-i386/tg-tls-threadvar.diff: Update. ++ * patches/hurd-i386/tg-tls.diff: Rebased. ++ * patches/hurd-i386/tg-tls_thread_leak.diff: Rebased. ++ * patches/hurd-i386/unsubmitted-NO_HIDDEN.diff: Rebased. ++ * patches/hurd-i386/tg-no-hp-timing.diff: Update. ++ * patches/series: Re-enable all hurd patches. ++ * patches/hurd-i386/libpthread-versions.diff: New patch, updates to new ++ version engine. ++ * patches/hurd-i386/cvs-revert-gnu-gnu-cleanup.diff: New patch, reverts ++ cleanup of the gnu-gnu hack. ++ * patches/hurd-i386/libpthread_pthread_types.diff: New patch, fixes ++ inclusion of pthread_types.h ++ * patches/hurd-i386/unsubmitted-libc_alloca_cutoff.diff: New patch, ++ implements alloca cutoff limit. ++ * patches/hurd-i386/cvs-unwind-resume.diff: New patch, fixes unwind-resume ++ build. ++ * patches/hurd-i386/unsubmitted-libpthread-semaphore.h.diff: New patch, ++ fixes semaphore header inclusion. ++ * patches/hurd-i386/unsubmitted-timer_routines.diff: New patch, fixes ++ timer_routines build. ++ * patches/hurd-i386/cvs-libc-modules.h.diff: New patch, adds missing ++ dependency on libc-modules.h. ++ * patches/hurd-i386/cvs-warnings.diff: New patch, fixes warnings. ++ * patches/hurd-i386/cvs-check-local-headers.diff: New patch, clears spurious ++ local-header warnings. ++ * sysdeps/hurd.mk: Disable -Werror since MIG currently generates warnings. ++ * testsuite-checking/expected-results-{i586-gnu-libc,i686-gnu- ++ {i386,i686,xen}}: update testsuite results ++ ++ [ Adam Conrad ] ++ * debian/{rules.d/debhelper.mk,sysdeps/*}: Define per-platform pldd ++ variable to control installation of usr/bin/pldd in libc-bin, and ++ leverage the same trick to decide to install usr/lib/pt_chown too. ++ * debian/patches/kfreebsd/local-no-pldd.diff: Drop, no longer used. ++ * debian/patches/alpha/submitted-PTR_MANGLE.diff: Use IS_IN macros. ++ * debian/patches/powerpc/cvs-ppc-sqrt.diff: Fix sqrt() on powerpc. ++ * debian/patches/powerpc/cvs-ppc-sqrtf.diff: Likewise for sqrtf(). ++ * debian/patches/powerpc/cvs-ppc-pow.diff: Likewise for pow(). ++ * debian/patches/powerpc/cvs-ppc-feraiseexcept.diff: Fix inline ++ feraiseexcept and feclearexcept macro input conversion on PPC. ++ * debian/patches/any/submitted-longdouble.diff: Refresh for above. ++ * debian/patches/any/local-disable-test-tgmath2.diff: Likewise. ++ * debian/patches/any/cvs-logbl-accuracy.diff: Fix ldbl-128ibm logbl. ++ * debian/patches/powerpc/local-math-logb.diff: Refresh and move to ++ debian/patches/any/local-math-logb.diff, as it's not PPC-specific. ++ * debian/patches/any/cvs-localplt-new-readelf.diff: Preemptively ++ fix localplt test breakage with binutils 2.26 before it lands. ++ * debian/patches/any/cvs-make-typo.diff: Fix typo in elf/Makefile. ++ * debian/patches/powerpc/cvs-power7-strncpy.diff: Optimize strncpy ++ for POWER7 drastically (10-70%) on strings longer than 16 chars. ++ * debian/patches/powerpc/cvs-ppc-tabort-le.diff: Fix TABORT encoding ++ when building on toolchains without HTM support (no-op on gcc-4.9) ++ * debian/patches/arm/cvs-arm-sfi_breg.diff: Fix LDR_GLOBAL macro. ++ * debian/patches/arm/cvs-memcpy-memmove-always-bx.diff: Fix memcpy ++ and memmove for the ARM_ALWAYS_BX class of hardware like ArmadaXP. ++ * debian/{control.in/*,debhelper.in/*,rules.d/*}: Stop hardcoding our ++ upstream version all over the place and use GLIBC_VERSION instead. ++ * debian/debhelper.in/libc.preinst: Unconditionally wipe ld.so.cache ++ on major version upgrades, which is significantly less error-prone. ++ ++ [ Aurelien Jarno ] ++ * debian/patches/any/local-libgcc-compat-main.diff: Fix definition of ++ __floatdisf for sparc. ++ * debian/patches/any/local-libgcc-compat-ports.diff: Fix definition of ++ __floatdisf for mips. Remove usage of INTUSE (Closes: #782198). ++ * debian/sysdeps/linux.mk, debhelper.in/libc.preinst: bump minimal Linux ++ kernel version to 3.2 (ie the version in Wheezy). ++ * debian/patches/localedata/locale-C.diff: fix d_fmt time format (Closes: ++ #775179). ++ * Create source tarball in a deterministic manner: adjust file modification ++ time, user, group, permissions, and file order (addresses: #783210). ++ * Update from upstream stable branch: ++ - Fix a buffer overflow in getanswer_r (CVE-2015-1781). Closes: #796105. ++ * sysdeps/linux.mk: don't build pt_chown (CVE-2013-2207). Closes: #717544. ++ * Move translation to a new libc-l10n package from the locales packages. ++ Add a dependency from locales and locales-all to libc-l10n, so that they ++ both provide the same feature. Closes: #788352. ++ * control.in/main: Bump Standards-Version to 3.9.6 (no changes). ++ ++ [ Breno Leitao ] ++ * Remove --without-cvs that is not used anymore as a valid configuration. ++ It was removed in commit 92963737c4376bcfd65235d5c325fa7f48302f89 ++ (Closes: #781245). ++ ++ [ Matthias Klose ] ++ * Fix multilib enabled stage1 cross builds (closes: #766877). ++ ++ -- Aurelien Jarno Sat, 29 Aug 2015 00:43:02 +0200 ++ ++glibc (2.21-0experimental0) experimental; urgency=medium ++ ++ * New upstream release: version 2.21, with git updates up to 2015-02-10: ++ - debian/patches/git-updates.diff: Updated. ++ - debian/patches/all/submitted-po-fr-fixes.diff: Rebased. ++ - debian/patches/alpha/cvs-__pointer_chk_guard.diff: Merged. ++ - debian/patches/alpha/cvs-unwind-backtrace.diff: Merged. ++ - debian/patches/alpha/local-gcc4.1.diff: Rebased. ++ - debian/patches/alpha/local-lowlevellock.diff: Dropped. ++ - debian/patches/alpha/local-string-functions.diff: Rebased. ++ - debian/patches/alpha/submitted-PTR_MANGLE.diff: Rebased. ++ - debian/patches/alpha/submitted-dl-support.diff: Rebased. ++ - debian/patches/alpha/submitted-lll_futex_timed_wait_bitset.diff: Dropped. ++ - debian/patches/alpha/submitted-rtld-fPIC.diff: Rebased. ++ - debian/patches/amd64/cvs-slow-sse42.diff: Merged. ++ - debian/patches/amd64/local-blacklist-on-TSX-Haswell.diff: Rebased. ++ - debian/patches/amd64/submitted-rwlock-stack-imbalance.diff: Dropped. ++ - debian/patches/any/cvs-check_pf-infinite-loop.diff: Merged. ++ - debian/patches/any/cvs-getnetbyname.diff: Merged. ++ - debian/patches/any/cvs-pie-lt_executable.diff: Merged. ++ - debian/patches/any/cvs-regex-alloca.diff: Merged. ++ - debian/patches/any/cvs-resolv-first-query-failure.diff: Merged. ++ - debian/patches/any/cvs-socketcall-syscall.diff: Merged. ++ - debian/patches/any/cvs-strtod.diff: Merged. ++ - debian/patches/any/cvs-vfprintf.diff: Merged. ++ - debian/patches/any/cvs-wordexp.diff: Merged. ++ - debian/patches/any/cvs-wprintf.diff: Merged. ++ - debian/patches/any/cvs-wscanf.diff: Merged. ++ - debian/patches/any/local-disable-libnss-db.diff: Rebased. ++ - debian/patches/any/local-disable-test-tgmath2.diff: Rebased. ++ - debian/patches/any/local-libgcc-compat-ports.diff: Rebased. ++ - debian/patches/any/local-libpic.diff: Rebased. ++ - debian/patches/any/local-no-SOCK_NONBLOCK.diff: Rebased. ++ - debian/patches/any/local-no-pagesize.diff: Rebased. ++ - debian/patches/any/local-rtlddir-cross.diff: Rebased. ++ - debian/patches/any/local-stdio-lock.diff: Rebased. ++ - debian/patches/any/local-sysctl.diff: Rebased. ++ - debian/patches/any/submitted-argp-attribute.diff: Rebased. ++ - debian/patches/any/submitted-bits-fcntl_h-at.diff: Rebased. ++ - debian/patches/any/submitted-longdouble.diff: Rebased. ++ - debian/patches/any/submitted-nl_langinfo-static.diff: Merged. ++ - debian/patches/any/submitted-ptsname_r-uninitialized-memory.diff: Merged. ++ - debian/patches/any/submitted-resolv-ipv6-nameservers.diff: Rebased. ++ - debian/patches/any/submitted-sysdeps-auxv.diff: Merged. ++ - debian/patches/any/unsubmitted-scanf-includes.diff: Rebased. ++ - debian/patches/any/unsubmitted-tst-ftell-locale.diff: Dropped. ++ - debian/patches/any/unsubmitted-tst-tlsmod-as-needed.diff: Merged. ++ - debian/patches/arm/local-ioperm.diff: Rebased. ++ - debian/patches/arm/local-lowlevellock.diff: Dropped. ++ - debian/patches/arm/local-sigaction.diff: Rebased. ++ - debian/patches/arm/local-vfp-sysdeps.diff: Rebased. ++ - debian/patches/arm/unsubmitted-ldconfig-cache-abi.diff: Rebased. ++ - debian/patches/arm64/cvs-includes-cleanup.diff: Merged. ++ - debian/patches/arm64/submitted-align.diff: Merged. ++ - debian/patches/arm64/submitted-setcontext.diff: Merged. ++ - debian/patches/arm64/submitted-tst-setcontext.diff: Merged. ++ - debian/patches/hppa/cvs-sigrtmin.diff: Merged. ++ - debian/patches/hppa/local-atomic.diff: Dropped. ++ - debian/patches/hppa/local-elf-make-cflags.diff: Rebased. ++ - debian/patches/hppa/local-fcntl-osync.diff: Rebased. ++ - debian/patches/hppa/local-fpu.diff: Rebased. ++ - debian/patches/hppa/local-inlining.diff: Rebased. ++ - debian/patches/hppa/local-lowlevellock.diff: Dropped. ++ - debian/patches/hppa/local-pthread_spin_unlock.diff: Rebased. ++ - debian/patches/hppa/local-setjmp-namespace.diff: Dropped. ++ - debian/patches/hppa/local-shmlba.diff: Rebased. ++ - debian/patches/hppa/local-stack-grows-up.diff: Rebased. ++ - debian/patches/hurd-i386/tg-libpthread_depends.diff: Rebased. ++ - debian/patches/i386/submitted-i686-timing.diff: Rebased. ++ - debian/patches/kfreebsd/local-fbtl-depends.diff: Rebased. ++ - debian/patches/kfreebsd/local-fbtl.diff: Rebased. ++ - debian/patches/kfreebsd/local-scripts.diff: Rebased. ++ - debian/patches/kfreebsd/local-sysdeps.diff: Rebased. ++ - debian/patches/kfreebsd/submitted-waitid.diff: Rebased. ++ - debian/patches/locale/locale-print-LANGUAGE.diff: Rebased. ++ - debian/patches/locale/submitted-XDR-revert.diff: Merged. ++ - debian/patches/localedata/sort-UTF8-first.diff: Rebased. ++ - debian/patches/localedata/supported.diff: Rebased. ++ - debian/patches/m68k/local-fpic.diff: Rebased. ++ - debian/patches/m68k/local-mathinline_h.diff: Rebased. ++ - debian/patches/m68k/local-reloc.diff: Rebased. ++ - debian/patches/mips/local-lowlevellock.diff: Dropped. ++ - debian/patches/mips/local-r10k.diff: Rebased. ++ - debian/patches/mips/submitted-rld_map.diff: Rebased. ++ - debian/patches/powerpc/cvs-ibm-branch.diff: Dropped. ++ - debian/patches/sparc/local-fork.diff: Dropped. ++ - debian/patches/sparc/local-sparcv9-target.diff: Rebased. ++ * Drop some hppa patches that Carlos O'Donell claims are no longer needed: ++ - debian/patches/hppa/local-EAGAIN.diff: Dropped. ++ - debian/patches/hppa/local-fanotify_mark-5i.diff: Dropped. ++ - debian/patches/hppa/submitted-fadvise64_64.diff: Dropped. ++ - debian/patches/hppa/submitted-nptl-carlos.diff: Dropped. ++ * debian/*: Update occurences of 2.19 to 2.21 and update symbols to match. ++ * debian/patches/any/cvs-vismain-pie.diff: Compile vismain with -fPIE ++ and link with -pie to fix testsuite failure with the new binutils. ++ * debian/patches/any/local-libgcc-compat-abilists.diff: Fix the ablists ++ to match the symbols added in local-libgcc-compat* for the testsuite. ++ * debian/patches/sh4/local-fpscr_values.diff: Make the sh abilist match. ++ * debian/{control.in/main,rules}: Switch to gcc-4.9 on all architectures. ++ * debian/patches/any/local-tester-gcc-4.9.diff: Fix gcc-4.9 regression. ++ * debian/patches/any/local-xfail-stdlib-linkns.diff: XFAIL this test due ++ to building with pt_chown, which we should revisit very, very soon. ++ * debian/sysdeps/*: --enable-lock-elision on PPC targets (LP: #1414819) ++ * debian/libc*.symbols*: Remove local __invoke_dynamic_linker__ symbol, ++ which no longer shows up in random support libraries' symbol tables. ++ * debian/sysdeps/*: Neither ports nor nptl are considered add-ons anymore. ++ * debian/{rules.d/build.mk,testsuite-checking/*}: Adjust for upstream's ++ new testsuite, and convert old expected-results-* to match new output. ++ * debian/testsuite-checking/*: Let arm64 fail the tests indicated by the ++ upstream port maintainer as broken, and let i386 fail tst-cleanupx4. ++ * debian/debhelper.in/glibc-doc.install: Install changelogs that exist. ++ * debian/patches/i386/submitted-i686-timing.diff: Fix -Wundef warnings. ++ * debian/patches/arm/unsubmitted-ldso-abi-check.diff: Fix build failures ++ from format mismatches, uninitialised variables, and const conversions. ++ * debian/rules.d/debhelper.mk: Fix bootstrap libdirs (Closes: #715059) ++ * debian/patches/arm/unsubmitted-ldconfig-cache-abi.diff: Same as above. ++ * Other than two hurd-i386 patches required as scaffolding for others, ++ all the hurd-i386 patches are disabled, so this build *will* fail there. ++ * kfreebsd's sysdeps patches almost certainly need updating for 2.21 too. ++ * Failing on testsuite failures is disabled to attempt to get full builds. ++ ++ -- Adam Conrad Fri, 06 Mar 2015 13:47:43 -0700 ++ ++glibc (2.19-22) unstable; urgency=medium ++ ++ * patches/hurd-i386/cvs-cache-mach_host_self.diff: Remove, since it introduces ++ a new symbol, which will be easier to handle in 2.21. ++ ++ -- Samuel Thibault Tue, 22 Sep 2015 01:38:34 +0200 ++ ++glibc (2.19-21) unstable; urgency=medium ++ ++ [ Samuel Thibault ] ++ * patches/hurd-i386/cvs-bootstrap.diff: Fix typos. ++ * libc0.3.symbols.hurd-i386: Remove internal _server_routine symbols, fixes ++ build with newer mig. ++ * patches/hurd-i386/cvs-cache-mach_host_self.diff: New patch to avoid port ++ count issue on the host port. ++ * patches/hurd-i386/tg-sendmsg-SCM_RIGHTS.diff: Update from upstream. ++ * patches/hurd-i386/tg-sendmsg-SCM_CREDS.diff: New patch, adds support for ++ passing credentials over sockets (SCM_CREDS). ++ ++ -- Samuel Thibault Mon, 21 Sep 2015 19:54:01 +0200 ++ ++glibc (2.19-20) unstable; urgency=medium ++ ++ [ Samuel Thibault ] ++ * patches/hurd-i386/tg-mmap32th_bit.diff: New patch to fix libpciaccess ++ mapping of BARs above 2GiB. Closes: #793543. ++ * rules.d/build.mk: Also install crt0.o in stage1, if any. ++ * sysdeps/hurd-i386.mk: Fix stage1 about xen packages for hurd-i386 too. ++ * patches/hurd-i386/tg-sysheaders.diff: New patch to fix stage1 finding hurd ++ headers. ++ * patches/hurd-i386/cvs-libpthread_clean2.diff: New patch to drop spurious ++ code getting in the way for stage1. ++ * patches/hurd-i386/cvs-libpthread_build.diff: New patch to fix build of ++ generic libpthread code. ++ * patches/hurd-i386/libpthread_build.diff: Fix header inclusion to get ++ pthread headers from libpthread/ instead of system. ++ * sysdeps/hurd.mk: Create symlinks to kernel and hurd headers required for ++ build, so that we can pass --with-headers to configure to make the build ++ really self-hosted. ++ * patches/hurd-i386/local-clock_gettime_MONOTONIC.diff: Update patch to not ++ advertise _POSIX_CLOCK_SELECTION for vlc ++ * patches/hurd-i386/{local,cvs}-bootstrap.diff: New patch to fix crt*.o build ++ in stage1. ++ * rules, rules.d/build.mk: Set MIG to gnu-type alias of mig, to fix ++ cross-build. ++ * control, control.d/main: Bump mig dependency to get the gnu-type alias in ++ non-cross case too. ++ ++ [ Aurelien Jarno ] ++ * Update from upstream stable branch: ++ - Fix pthread_mutex_trylock with lock elision. Closes: #759197, ++ #788999. ++ - Fix gprof entry point on ppc64el. Closes: #794222. ++ - Fix a buffer overflow in getanswer_r (CVE-2015-1781). Closes: #796105. ++ - Fix getaddrinfo sometimes returning uninitialized data with nscd. ++ Closes: #798515. ++ * sysdeps.mk/mips*.mk: force the ISA until it gets propagated to all GCC ++ versions. ++ * Update hppa patches. Closes: #785664: ++ - Replace patches/hppa/local-fpu.diff by upstream patch cvs-fpu-r2.diff. ++ - Add patches/hppa/cvs-fpu2.diff from upstream. ++ - Add patches/hppa/local-fptr-table-size.diff from Carlos O'Donnell. ++ - Add patches/hppa/local-setcontext.diff. ++ - Add patches/hppa/cvs-start.diff from upstream. ++ * patches/any/cvs-pie-lt_executable.diff: new patch from upstream to fix ++ explicit loader invocation with PIE binaries. Closes: #796899. ++ ++ -- Aurelien Jarno Sun, 13 Sep 2015 18:39:36 +0200 ++ ++glibc (2.19-19) unstable; urgency=medium ++ ++ * patches/hurd-i386/cvs-mlock.diff: New patch to permit one to use mlock ++ from non-root process. ++ ++ -- Samuel Thibault Thu, 09 Jul 2015 14:28:56 +0200 ++ ++glibc (2.19-18) unstable; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * debhelper.in/locales.templates: allow the C.UTF-8 locale to be ++ selected as the default locale. Closes: #782241. ++ ++ -- Aurelien Jarno Tue, 14 Apr 2015 19:50:11 +0200 ++ ++glibc (2.19-17) unstable; urgency=medium ++ ++ [ Adam Conrad ] ++ * debian/rules.d/debhelper.mk: Unconditionally create tmp.substvars. ++ Closes: #780431. ++ ++ -- Aurelien Jarno Sat, 14 Mar 2015 10:17:56 +0100 ++ ++glibc (2.19-16) unstable; urgency=medium ++ ++ [ Samuel Thibault ] ++ * patches/hurd-i386/cvs-libpthread-dlopen.diff: New patch to allow ++ libpthread.so to be dynamically loaded from a dlopened library. ++ * patches/hurd-i386/cvs-libpthread-libc-lockP{,2}.diff: New patch to ++ dynamically call pthread functions from libc. ++ ++ [ Aurelien Jarno ] ++ * We have a transition mechanism for the locales, as the Debian archive ++ used to expose arch:all packages on all architectures even when the ++ corresponding arch:any package is not available yet. This has been ++ fixed long time ago, the transition mechanism has not been used ++ correctly for a lot of time and has been broken by the split out of ++ libc-bin. The breakage has been partially fixed by the "Breaks: locales ++ (<< 2.19)" added to libc6. It's now time to add the missing "Depends: ++ libc-bin (>> 2.19)" to locales and remove the transition mechanism. ++ Closes: #583088, #779442 ++ * patches/any/cvs-ldconfig-aux-cache.diff: new patch from upstream to ++ ignore corrupted aux-cache instead of segfaulting. Closes: #759530. ++ ++ -- Aurelien Jarno Thu, 12 Mar 2015 22:00:40 +0100 ++ ++glibc (2.19-15) unstable; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * 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. ++ ++ -- Aurelien Jarno Sun, 08 Feb 2015 15:54:37 +0100 ++ ++glibc (2.19-14) unstable; urgency=medium ++ ++ [ Samuel Thibault ] ++ * patches/hurd-i386/libpthread_spin-lock.diff: New patch to fix spin-lock.h ++ inclusion order. ++ * patches/hurd-i386/tg-WRLCK-upgrade.diff: New patch to fix atomicity of ++ changing between rd locks and wr locks. ++ * patches/hurd-i386/cvs-static-dlopen.diff: New patch to fix dlopen from ++ static binaries, busybox notably. ++ * control.in/main: Bump mig dependency to get _routines@ symbols, bump ++ gnumach-dev dependency to get protected payload symbols. ++ * libc0.3.symbols.hurd-i386: Update symbols. ++ * patches/hurd-i386/submitted-startup-pid2.diff: Remove, replaced by... ++ * patches/hurd-i386/tg-reboot-startup.diff: ... new patch to make reboot ++ lookup startup through /servers/startup instead of guessing its pid and ++ using its message port. ++ ++ [ Adam Conrad ] ++ * debian/rules.d/tarball.mk: Fix update-from-upstream manual/* filter rule. ++ ++ [ Petr Salinger ] ++ * kfreebsd/local-sysdeps.diff: update to revision 5688 (from glibc-bsd). ++ Do not return EINTR from sigwait. Closes: #763705. ++ ++ [ Aurelien Jarno ] ++ * debian/patches/any/cvs-wordexp.diff: new patch from upstream to fix a ++ command execution in wordexp() with WRDE_NOCMD specified (CVS-2014-7817). ++ * 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-vfprintf.diff: new patch from ustream to fix a ++ stack overflow in vfprintf (CVE-2012-3406). Closes: #681888. ++ * debian/patches/git-updates.diff: update to the latest commit of the 2.19 ++ branch to fix a few buffer overflow, unbounded stack allocation or memory ++ leaks that have not been (yet ?) tagged as security issue. This branch ++ includes a few patches already applied manually: ++ - drop patches/localedata/unsubmitted-tst-setlocale3-ENV.diff (merged ++ upstream). ++ - drop patches/s390/cvs-s390-abi-reversal.diff (merged upstream). ++ - update patches/any/cvs-resolv-first-query-failure.diff ++ - drop patches/any/cvs-resolv-reuse-fd.diff (merged upstream). ++ - drop patches/any/cvs-posix_spawn_file_actions_addopen.diff (merged ++ upstream). ++ - drop patches/any/cvs-setlocale-alloca.diff (merged upstream). ++ - drop patches/any/cvs-CVE-2014-0475.diff (merged upstream). ++ - drop patches/any/cvs-CVE-2014-5119.diff (merged upstream). ++ - drop patches/any/cvs-CVE-2014-6040.diff (merged upstream). ++ ++ -- Aurelien Jarno Sun, 01 Feb 2015 00:32:31 +0100 ++ ++glibc (2.19-13) unstable; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * kfreebsd/local-fbtl.diff: update to revision 5677 (from glibc-bsd). ++ Workarounds a kfreebsd 9.0 to 10.1 ABI break. Closes: #740509. ++ * patches/hppa/cvs-sigrtmin.diff: backport patch from upstream to change ++ __SIGRTMIN to match other architectures. Closes: #766605. ++ * patches/amd64/cvs-slow-sse42.diff: backport patch from upstream to fix ++ a performance issue with strcmp and friends functions on some machines. ++ * patches/any/cvs-regex-alloca.diff: new patch from upstream to fix a ++ segmentation fault in regex in case of heap allocation failure. Closes: ++ #767225. ++ * Don't fail to build in case of testsuite regressions, so that changes ++ in the environment (e.g.: kernel) do not prevent security or stable ++ versions to be built. It will be re-enabled after the Jessie release. ++ * debian/control.in/main: build-depends on debhelper (>= 9.20141010) to ++ get Build-Profiles features. This fixes the following lintian warning: ++ restriction-formula-with-debhelper-without-debhelper-version. ++ ++ [ Samuel Thibault ] ++ * hurd-i386/cvs-libpthread.diff: Update to Sun Nov 2. ++ * hurd-i386/libpthread_clean.diff: Refresh, most of it merged into ++ cvs-libpthread.diff. ++ * hurd-i386/cvs-libpthread-pthread_condattr_setclock.diff, ++ cvs-libpthread_guardsize.diff, cvs-libpthread_std_thread.diff: Remove, ++ merged into cvs-libpthread.diff. ++ ++ -- Aurelien Jarno Thu, 06 Nov 2014 20:28:41 +0100 ++ ++glibc (2.19-12) unstable; urgency=medium ++ ++ [ Samuel Thibault ] ++ * patches/hurd-i386/tg-thread-cancel.diff: Update patch from upstream, fixes ++ a rare deadlock. ++ * patches/hurd-i386/local-libpthread-stacksize.diff: New patch to make ++ libpthread stacks size default to 8MiB like on Linux, to avoid surprises ++ with packages which assume the Linuxish default. ++ * patches/hurd-i386/tg-poll_errors_fixes.diff: Update patch, fixes ++ select returned value in case of errors. Closes: #764840. ++ ++ [ Petr Salinger ] ++ * update testsuite-checking/expected-results-*-kfreebsd-gnu-* ++ under 10.x kernels, provided by Steven Chamberlain. Closes: #762404. ++ ++ [ Aurelien Jarno ] ++ * Remove mtrace(1) and pldd(1) manpages, provided by the manpages package ++ starting with version 3.74. ++ * debian/control.in/*: update the syntax of the Build-Profiles field and ++ build depends on dpkg-dev (>= 1.17.14) to get the new feature. Closes: ++ #764274. ++ * Remove libc6-prof package as it's broken for years and there are better ++ way to profile code nowadays. Closes: #760450. ++ * patches/amd64/local-blacklist-on-TSX-Haswell.diff: new patch from ++ Henrique de Moraes Holschuh to disable TSX on processors which might get ++ it disable through a microcode update. Closes: #762195. ++ * Install French, German, Polish and Spanish version of validlocale(8) ++ manpage. Add a Replaces: manpages-fr-extra (<= 20141008). ++ * Update French manpages translations, by David Prévot. Closes: #715289. ++ * Update German manpages translations, by Helge Kreutzmann. Closes: #717979. ++ * kfreebsd/local-fbtl.diff: update to revision 5651 (from glibc-bsd). ++ Workarounds a kfreebsd 9.0 to 10.1 ABI break. Closes: #740509. ++ * patches/any/cvs-CVE-2014-6040.diff: new patch from upstream to fix crashes ++ on invalid input in IBM gconv modules (CVE-2014-6040). ++ * patches/any/cvs-check_pf-infinite-loop.diff: new patch from upstream to ++ fix an infinite loop in infinite loop in check_pf. ++ * patches/any/local-static-dlopen-search-path.diff: new patch to re-enable ++ default search path for dlopen() in static libraries. Closes: #754813, ++ #757941. ++ ++ [ Helmut Grohne ] ++ * debian/patches/any/local-bootstrap-headers.diff: Update to handle ++ stubs-$abi.h which is required for multilib bootstraps. Closes: #756473 ++ ++ -- Aurelien Jarno Wed, 22 Oct 2014 20:01:11 +0200 ++ ++glibc (2.19-11) unstable; urgency=medium ++ ++ [ Samuel Thibault ] ++ * patches/hurd-i386/tg-thread-cancel.diff: Update patch against two other ++ overzealous assertions. ++ * patches/hurd-i386/submitted-bind_umask.diff: Split into cvs-bind_umask.diff ++ and submitted-bind_umask2.diff as requested by upstream. ++ * patches/hurd-i386/cvs-fork_ss_hang.diff: New patch which fixes some dash ++ hangs. ++ * patches/hurd-i386/cvs-libpthread_guardsize.diff: Add another guard size ++ computation fix. Fixes gcj's boehm-gc. Closes: #760076. ++ ++ [ Aurelien Jarno ] ++ * debian/control.in/main: Build-Depends on dpkg (>= 1.17.11) instead of ++ dpkg-dev (>= 1.17.1). Closes: #759495. ++ * debian/debhelper.in/libc.{preinst,postinst,postrm}: correctly remove old ++ conffiles /etc/ld.so.conf.d/i486-{kfreebsd-gnu.conf,gnu-gnu.conf,gnu.conf}. ++ Closes: #759568. ++ * Update Italian debconf translation, by Luca Monducci. Closes: #760092. ++ ++ [ Petr Salinger ] ++ * kfreebsd/local-fbtl.diff: update to revision 5520 (from glibc-bsd). ++ Fixes x87 precision mode in newly created pthreads. Closes: #761175. ++ ++ -- Aurelien Jarno Fri, 12 Sep 2014 23:49:50 +0200 ++ ++glibc (2.19-10) unstable; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * debian/rules: drop the i486 to i586 GNU triplet conversion. ++ * debian/control.in/main: build-depends on dpkg-dev (>= 1.17.1) and ++ gcc-4.8 (>= 4.8.3-8) to make sure to get the new i586 GNU triplet on ++ i386, hurd-i386 and kfreebsd-i386. ++ * Remove iconv(1), iconvconfig(8), localedef(1) and sprof(1) manpages, ++ provided by the manpages packages starting with version 3.71. ++ * patches/any/cvs-CVE-2014-5119.diff: New patch from upstream to remove ++ support for loadable gconv transliteration modules (CVE-2014-5119). ++ ++ [ Samuel Thibault ] ++ * patches/hurd-i386/cvs-libpthread_guardsize.diff: Fix guard size computation. ++ Fixes the creation of thousands of threads, and thus pulseaudio testsuite. ++ Closes: #758671. ++ * patches/hurd-i386/cvs-libpthread_std_thread.diff: New patch to deal with ++ std::thread using __pthread_key_create to detect presence of libpthread. ++ Fixes build of webkitgtk and most probably other libstdc++-related ++ failures. ++ * patches/hurd-i386/submitted-bind_umask.diff: New patch to fix bind() when ++ umask is 0000, fixes clamav testsuite. Closes: #759218. ++ ++ [ Adam Conrad ] ++ * debian/patches/series: Actually apply the submitted arm64 alignment and ++ setcontext patches mentioned in 2.19-0experimental0 (closes: #759042) ++ ++ -- Aurelien Jarno Wed, 27 Aug 2014 07:13:10 +0200 ++ ++glibc (2.19-9) unstable; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * debian/rules.d/control.mk: don't add libc6{,-dev}-{armel,armhf} ++ packages in debian/control as we don't build them in Debian. New dak ++ code checks for NEW packages directly in debian/control. ++ ++ -- Aurelien Jarno Thu, 14 Aug 2014 17:58:27 +0200 ++ ++glibc (2.19-8) unstable; urgency=medium ++ ++ [ Helmut Grohne ] ++ * debian/patches/build stage2 without selinux. Closes: #742640. ++ * Don't emit dependencies on libgcc when building stage2. Closes: #755580. ++ * Add a "nobiarch" build profile that inhibits all multilib packages from ++ being built. Closes: #745380. ++ ++ [ Aurelien Jarno ] ++ * debian/patches/arm64/cvs-includes-cleanup.diff: new patch from upstream to ++ clean sys/user.h and sys/procfs.h. Closes: #755169. ++ * debian/patches/s390/cvs-s390-abi-reversal.diff: new patch backported from ++ upstream to revert the S/390 jmp_buf/ucontext_t ABI change. ++ * Update Turkish debconf translation, by Mert Dirik. Closes: #757495. ++ * Remove ia64 support. Closes: #756095. ++ * Update debian/copyright with the libidn/punycode.{c,h} license. Closes: ++ #754731. ++ * debian/control/libc: drop Recommends on: gcc | c-compiler. Closes: ++ #747933. ++ ++ -- Aurelien Jarno Thu, 14 Aug 2014 15:54:09 +0200 ++ ++glibc (2.19-7) unstable; urgency=high ++ ++ * debian/patches/localedata/unsubmitted-tst-setlocale3-ENV.diff: Apply ++ correct environment for the tst-setlocale3 test to find its locales. ++ ++ -- Adam Conrad Sat, 12 Jul 2014 17:29:20 -0600 ++ ++glibc (2.19-6) unstable; urgency=high ++ ++ [ Aurelien Jarno ] ++ * debian/patches/any/cvs-CVE-2014-0475.diff: fix a directory traversal in ++ locale environment handling (CVE-2014-0475). ++ * debian/patches/any/cvs-setlocale-alloca.diff: Additional setlocale ++ hardening. ++ * debian/control.in/main, debian/sysdeps/linux.mk: drop systemtap support. ++ sdt.h has been moved to a different location in the latest upload, and ++ it's not really clear on which architectures systemtap support should ++ be enabled. ++ ++ [ Helmut Grohne ] ++ * debian/rules.d/debhelper.mk: fix dh_strip call in stage1. Closes: ++ #754350. ++ ++ [ Petr Salinger ] ++ * kfreebsd/local-sysdeps.diff: update to revision 5490 (from glibc-bsd). ++ * kfreebsd/local-fbtl.diff: likewise. ++ * update testsuite-checking/expected-results-*-kfreebsd-gnu-* ++ ++ -- Aurelien Jarno Sat, 12 Jul 2014 17:22:50 +0200 ++ ++glibc (2.19-5) unstable; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * debian/sysdeps/mips*.mk: replace EGLIBC_PASSES into GLIBC_PASSES. ++ * debian/patches/alpha/cvs-__pointer_chk_guard.diff: new patch from ++ upstream to fix testsuite failures on alpha. ++ * debian/patches/alpha/local-string-functions.diff: disable strcmp ++ and strncmp as these functions behaves incorrectly when crossing ++ pages. This fixes badsalttest in the testsuite. ++ * debian/debhelper.in/libc.postinst: don't run "telinit u" under systemd ++ Closes: #753725. ++ * debian/testsuite-checking/expected-results-alpha-linux-gnu-libc: ignore ++ floating point failures, as alpha is not fully IEEE compliant. Closes: ++ #753099. ++ * testsuite-checking/expected-results-*s390*: ignore tst-cancelx17.out ++ failure, it is due to a bug in the test (see BZ #12683). ++ ++ [ Helmut Grohne ] ++ * Rename the bootstrap stage to DEB_BUILD_PROFILES=stage1 to conform ++ with https://wiki.debian.org/BuildProfileSpec. (Closes: #752480) ++ * Don't try to install xen headers in i386 bootstrap build, because ++ they are not built. Closes: #743676. ++ ++ [ Adam Conrad ] ++ * debian/patches/alpha/cvs-unwind-backtrace.diff: Backport upstream ++ fix to enable unwind tables when building the backtrace routines. ++ ++ -- Aurelien Jarno Sun, 06 Jul 2014 21:42:09 +0200 ++ ++glibc (2.19-4) unstable; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * debian/debhelper.in/libc.{preinst,postrm,postinst}: correctly remove ++ old ld.so configuration if more than one libc6 package is installed ++ (multiarch case). Closes: #752389, #752404. ++ ++ [ Samuel Thibault ] ++ * patches/hurd-i386/tg-tls-threadvar.diff: Update to fix gcc-4.9 build. ++ ++ [ Adam Conrad ] ++ * debian/control.in/main: glibc-source Conflics/Replaces eglibc-source. ++ * debian/patches/powerpc/local-powerpc8xx-dcbz.diff: Restrict the trap ++ to 32-bit builds, since the Freescale 8xx CPUs aren't 64-bit capable. ++ ++ -- Aurelien Jarno Mon, 23 Jun 2014 20:10:39 +0200 ++ ++glibc (2.19-3experimental0) experimental; urgency=medium ++ ++ [ Aurelien Jarno] ++ * Switch back to glibc sources: ++ - debian/control.in/*: replace eglibc by glibc, update descriptions. ++ - rename debian/debhelper.in/eglibc-source.install into ++ glibc-source.install. ++ - rename debian/debhelper.in/eglibc-source.lintian-overrides into ++ glibc-source.lintian-overrides. ++ - rename debian/eglibc-source.filelist into glibc-source.filelist ++ - debian/copyright: update. ++ - debian/rules, debian/rules.d/*: replace eglibc by glibc. ++ - source/lintian-overrides: replace eglibc by glibc. ++ - debian/sysdeps/*: replace eglibc by glibc. ++ - debian/po/*: update using debconf-updatepo. ++ - debian/rules.d/tarball.mk: rewrite to generate the orig tarball and ++ to fetch the branch updates through git. ++ - patches/any/submitted-nl_langinfo-static.diff: refresh. ++ - patches/any/submitted-ldsodefs_rtld_debug.diff: drop. ++ - patches/any/local-dynamic-resolvconf.diff: new patch from the eglibc ++ tree to dynamically take into account changes in resolv.conf. ++ - patches/powerpc/local-powerpc8xx-dcbz.diff: new patch from the eglibc ++ tree to workaround dcbz issues on PowerPC 8XX CPUs. ++ - patches/sh4/local-fpscr_values.diff: new patch from eglibc tree to ++ export the ___fpscr_values symbol on SH4. ++ - patches/any/local-libpic.diff: new patch from eglibc tree to install ++ *_pic.a files. ++ - patches/any/local-bootstrap-headers.diff: new patch from eglibc tree ++ to ease header installation when bootstrapping. ++ ++ -- Aurelien Jarno Wed, 18 Jun 2014 20:22:44 +0200 ++ ++eglibc (2.19-3) unstable; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * debian/control.in/libc: fix libtirpc1 breaks. Closes: #751852. ++ * debian/rules.d/build.mk: generate ld.so configuration file using ++ DEB_HOST_MULTIARCH instead of DEB_HOST_GNU_TYPE to have a stable ++ path even when the GNU triplet change. ++ * debian/debhelper.in/libc.{preinst,postrm,postinst}: remove old ++ ld.so configuration file on hurd-i386, i386 and kfreebsd-i386. ++ * debian/debhelper.in/libc.postinst: don't create/modify ld.so.conf, ++ but instead provide it as a conffile in libc-bin. Closes: #737588. ++ * debian/debhelper.in/libc.preinst: remove dead code. ++ ++ -- Aurelien Jarno Tue, 17 Jun 2014 18:57:11 +0200 ++ ++eglibc (2.19-2) unstable; urgency=medium ++ ++ [ Adam Conrad ] ++ * expected-results-aarch64-linux-gnu-libc: Ignore basic-test.out on ++ arm64 after assurance from upstream that this isn't a regression. ++ ++ [ Aurelien Jarno ] ++ * Add support for mipsn32, mipsn32el, mips64 and mips64el, based on ++ patches from Eleanor Chen, Yunqiang Su and Sphinx Jiang. Closes: ++ #715038. ++ - debian/control.in/main: bump build-depends on linux-libc-dev to (>= ++ 3.9). Do it for all architectures as this version is in Jessie for quite ++ some time. ++ - control.in/mips32: new file. ++ - control.in/mipsn32: add mips64 and mips64el architectures. ++ - control.in/mips64: add mipsn32 and mipsn32el architectures. ++ - debian/rules.d/control.mk: add mipsn32, mipsn32el, mips64 and mips64el ++ to the architecture list. ++ - debian/sysdeps/mips64.mk: new file. ++ - debian/sysdeps/mips64el.mk: new file. ++ - debian/sysdeps/mipsn32.mk: new file. ++ - debian/sysdeps/mipsn32el.mk: new file. ++ * debian/control.in/libc: add a Breaks: check (<< 0.9.10-6.1+b1) on s390x, ++ to make sure libcheck.a is using the GLIBC_2.19 version of the *jmp* ++ functions. ++ * debian/control.in/libc: add a Breaks: libtirpc1 (<< 0.2.3), as earlier ++ versions try to unlock a lock which hasn't been locked, causing an ++ issue with lock elision. Closes: #751134. ++ * Update Swedish debconf translation, by Martin Bagge. Closes: #751172. ++ * debian/patches/alpha/submitted-lll_futex_timed_wait_bitset.diff: new ++ patch to fix issues in the testsuite on alpha. Closes: #750996. ++ * debian/testsuite-checking/expected-results-mips*-linux-gnu-*: re-add ++ tst-mqueue5.out (removed in the latest cleanup) as it still occasionally ++ fails. ++ * debian/patches/any/submitted-resolv-ipv6-nameservers.diff: new patch to ++ fix resolving issues when using IPv6 nameservers in resolv.conf. Closes: ++ #627531, #644406, #709867. ++ * 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. ++ * patches/kfreebsd/local-sysdeps.diff: update to revision 5486 (from ++ glibc-bsd). Closes: #751565. ++ ++ -- Aurelien Jarno Mon, 16 Jun 2014 20:40:57 +0200 ++ ++eglibc (2.19-1) unstable; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * debian/control.in/main: remove outdated Build-Depends on bzip2. ++ * debian/patches/any/cvs-resolv-reuse-fd.diff: new patch from upstream ++ to fix invalid file descriptor reuse while sending DNS query. Closes: ++ #722075. ++ * Finish debconf translation update from Esko Arajärvi. Closes: #750124. ++ * debian/patches/git-updates.diff: update from the 2.19 branch: ++ - fixes pthread_spin_lock on sparc/sparc64. Closes: #749087. ++ * debian/patches/any/submitted-argp-attribute.diff: new patch from Ondřej ++ Bílka to fix string functions with FORTIFY_SOURCE=2 when is ++ included before . Closes: #647084. ++ * debian/sysdeps/{sparc,sparc64}.mk: temporarily pass --disable-multiarch ++ to configure to try to fix random segmentation faults on Niagara 1 ++ machines. ++ ++ [ Samuel Thibault ] ++ * hurd-i386/unsubmitted-pthread_posix-option.diff: Split patches into... ++ * ... hurd-i386/tg-{posix_thread,gai_misc}.diff. ++ * patches/hurd-i386/cvs-libpthread_guardsize.diff: Fix guard size ++ computation and enable again. ++ ++ -- Aurelien Jarno Wed, 04 Jun 2014 20:32:06 +0200 ++ ++eglibc (2.19-0experimental0) experimental; urgency=medium ++ ++ [ Adam Conrad ] ++ * New upstream release: version 2.19, orig tarball built at SVN r25252: ++ - debian/patches/alpha/local-string-functions.diff: Rebased. ++ - debian/patches/any/local-disable-test-tgmath2.diff: Rebased. ++ - debian/patches/any/local-localedef-fix-trampoline.diff: Rebased. ++ - debian/patches/any/local-no-malloc-backtrace.diff: Rebased. ++ - debian/patches/any/submitted-longdouble.diff: Rebased. ++ - debian/patches/hurd-i386/local-enable-ldconfig.diff: Rebased. ++ - debian/patches/kfreebsd/local-fbtl-depends.diff: Rebased. ++ - debian/patches/kfreebsd/local-scripts.diff: Rebased. ++ - debian/patches/locale/preprocessor-collate-uli-sucks.diff: Rebased. ++ - debian/patches/localedata/fix-lang.diff: Rebased. ++ - debian/patches/localedata/locale-en_DK.diff: Rebased. ++ - debian/patches/localedata/locale-hsb_DE.diff: Rebased. ++ - debian/patches/localedata/locale-ku_TR.diff: Rebased. ++ - debian/patches/localedata/locales-fr.diff: Rebased. ++ - debian/patches/localedata/sort-UTF8-first.diff: Rebased. ++ - debian/patches/powerpc/local-math-logb.diff: Rebased. ++ - debian/patches/sparc/local-fork.diff: Rebased. ++ - debian/patches/sparc/local-sparcv9-target.diff: Rebased. ++ - debian/patches/i386/local-i586-ulps.diff: Regenerate. ++ - debian/patches/alpha/submitted-PTR_MANGLE.diff: Fixed upstream. ++ - debian/patches/ia64/submitted-fpu-ulps.diff: Regenerated upstream. ++ - debian/patches/powerpc/submitted-gettimeofday-vdso.diff: Dropped. ++ - debian/patches/any/local-use-glibc-predef.diff: Merged upstream. ++ - debian/patches/any/submitted-getaddrinfo-lo.diff: Merged upstream. ++ - debian/patches/any/local-getaddrinfo-interface.diff: Merged upstream. ++ - debian/patches/any/submitted-resolv-init.diff: Merged upstream. ++ - debian/patches/arm/cvs-arm-always-blx.diff: Merged upstream. ++ - debian/patches/arm/cvs-memcpy-align.diff: Merged upstream. ++ - debian/patches/sparc/cvs-strcmp.diff: Merged upstream. ++ - debian/patches/sparc/cvs-efd_semaphore.diff: Merged upstream. ++ - debian/patches/sparc/submitted-prlimit.diff: Merged upstream. ++ - Drop all cvs-* patches that are included in the 2.19 upstream release. ++ * debian/sysdeps/ppc64el.mk: Use --with-cpu=power7 to optimize properly. ++ * debian/*: Update occurences of 2.18 to 2.19 and update symbols to match. ++ * debian/patches/any/unsubmitted-tst-ftell-locale.diff: Apply the correct ++ environment for the tst-ftell-partial-wide.out test to find its locales. ++ * debian/*: Remove references to libbsd-compat.a which is no longer built. ++ * debian/sysdeps/powerpc.mk: Follow rename of stubs-64.h to stubs-64-v1.h. ++ * debian/patches/any/submitted-sysdeps-auxv.diff: Fix implicit declaration ++ when including in the testsuite by fixing up header guards. ++ * expected-results-aarch64-linux-gnu-libc: Tolerate fenv-tls test failure. ++ * debian/rules.d/tarball.mk: Add an update-from-upstream-git glibc target. ++ * debian/patches/git-updates.diff: Updates to current release/2.19/master. ++ * debian/sysdeps/arm64.mk: Enable IFUNC, now that binutils can support it. ++ * debian/patches/locale/submitted-XDR-revert.diff: Return the XDR currency ++ to locale/iso-4217.def because localedata/locales/i18n needs to have it. ++ * debian/patches/powerpc/cvs-ibm-branch.diff: Pull in IBM's 2.19 backports ++ to fix several bugs and add optimisations on POWER7 and POWER8 machines. ++ * debian/patches/any/local-no-malloc-backtrace.diff: Change M_CHECK_ACTION ++ to abort if the first bit is set (ie: MALLOC_CHECK_=1), like the second. ++ * debian/patches/arm64/submitted-align.diff: Right pthread_self alignment. ++ * debian/patches/arm64/submitted-setcontext.diff: Bring in patch from Will ++ Newton of Linaro to reimplement setcontext without rt_sigreturn syscall. ++ * debian/patches/arm64/submitted-tst-setcontext.diff: Apply test for same. ++ * debian/debhelper.in/libc-bin.manpages: Drop locale.1, moved to manpages. ++ ++ [ Aurelien Jarno ] ++ * debian/debhelper.in/libc.preinst: remove check for sparc32 kernel, the ++ support has been removed with Lenny. ++ * debian/debhelper.in/libc.preinst: remove code to upgrade armhf systems ++ from pre-Wheezy versions. ++ * debian/debhelper.in/libc.preinst: don't act on the filesystem until it ++ is sure that the libc is going to be upgraded. ++ * debian/debhelper.in/libc.preinst: stop checking for /etc/init.d/glibc.sh ++ on upgrade, we don't support lenny to jessie upgrades. ++ * debhelper.in/libc-alt.preinst: drop, we don't support lenny to jessie ++ upgrades. ++ * sysdeps/{amd64.mk,i386.mk,x32.mk}: enable lock elision. ++ * expected-results-arm-linux-gnueabi-{armel,libc}: ignore basic-test.out ++ test, as it is due to GCC bug #748616. ++ * debian/control.in/main: build-depends on systemtap-sdt-dev on linux-any. ++ debian/sysdeps/linux.mk: enable systemtap support. Closes: #700760. ++ * patches/any/cvs-strtod.diff: new patch to fix strtod on some ++ architectures, fixing a FTBFS on sparc. ++ ++ [ Samuel Thibault ] ++ * Hurd fixes for new upstream ++ - debian/patches/hurd-i386/libpthread_version.diff: Rebased. ++ - debian/patches/hurd-i386/submitted-net.diff: Rebased. ++ - debian/patches/hurd-i386/tg-elfosabi_gnu.diff: Fixed upstream. ++ - debian/patches/hurd-i386/tg-pthread-atfork.diff: Fixed upstream. ++ - debian/patches/hurd-i386/tg-tls-threadvar.diff: Rebased. ++ - debian/patches/hurd-i386/tg-tls.diff: Rebased. ++ - debian/patches/hurd-i386/unsubmitted-gnumach.defs.diff: Rebased. ++ - update testsuite hurd-i386 results. ++ ++ [ Martin Pitt ] ++ * Adjust autopkgtest to build the package within the test instead of ++ having a simple "/bin/true" test. This avoids copying the sizable ++ built tree between host and VM twice. ++ ++ [ Petr Salinger ] ++ * kfreebsd/local-nscd-nosendfile-fix.diff: remove, fixed upstream. ++ * kfreebsd/local-no-execfn.diff: new patch, ++ to handle systems without AT_EXECFN ++ * kfreebsd/local-sysdeps.diff: update to revision 5466 (from glibc-bsd). ++ * kfreebsd/local-fbtl.diff: likewise. ++ * update testsuite-checking/expected-results-*-kfreebsd-gnu-* ++ ++ -- Adam Conrad Thu, 22 May 2014 23:42:20 -0600 ++ ++eglibc (2.18-7) unstable; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * testsuite-checking/expected-results-*s390*: ignore tst-cancel17.out ++ failure, it is due to a bug in the test (see BZ #12683). ++ * local/etc/bindresvport.blacklist: add port 655 (tinc). Closes: #748338. ++ * control.in/*: remove conflicts between multiarch libc packages using the ++ same dynamic library loader. This was introduced in 2.18-6, but sadly the ++ infrastructure is not ready for that, leaving now way to fix the problem. ++ Reopens: #745552. ++ ++ [ Samuel Thibault ] ++ * patches/hurd-i386/cvs-libpthread_guardsize.diff: Disable for now, it ++ breaks a bunch of tests. ++ ++ -- Aurelien Jarno Mon, 19 May 2014 11:49:49 +0200 ++ ++eglibc (2.18-6) unstable; urgency=medium ++ ++ [ Samuel Thibault ] ++ * patches/hurd-i386/cvs-libpthread_guardsize.diff: Fix guardsize semantic ++ for gcc's -fsplit-stack. ++ ++ [ Aurelien Jarno ] ++ * patches/any/cvs-make-4.0.diff: patch from upstream to allow GNU Make ++ 4.0 and greater. Closes: #747013. ++ * patches/sparc/cvs-strcmp.diff: patch from upstream to fix a corner case ++ in the sparc specific strcmp() implementation. Closes: #746310. ++ * debhelper.in/nscd.init: invalidate nscd cache on startup. Closes: ++ #689427. ++ * patches/any/cvs-wprintf.diff: patch from upstream to correctly handle ++ %p in wprintf(). Closes: #729514. ++ * patches/any/submitted-resolv-first-query-failure.diff: replace by upstream ++ version patches/any/cvs-resolv-first-query-failure.diff. ++ * control.in/*: add conflicts between multiarch libc packages using the same ++ dynamic library loader. Closes: #745552. ++ * patches/localedata/submitted-it_IT-thousands_sep.diff: new patch to define ++ the thousands separator for the it_IT locale. Closes: #712157. ++ * patches/any/submitted-ptsname_r-uninitialized-memory.diff: new patch to ++ fix uninitialized memory in ptsname_r(). Closes: #741482. ++ * patches/all/submitted-po-fr-fixes.diff: new patch to fix the French ++ translation of inappropriate (inappropré -> inapproprié). Closes: ++ #733237. ++ * patches/any/cvs-socketcall-syscall.diff: new patch from upstream to fix ++ socketcall multiplex syscall features detection. Closes: #730744. ++ * patches/any/submitted-nl_langinfo-static.diff: new patch to fix ++ nl_langinfo() used in static binaries. Closes: #747103. ++ * patches/any/sparc/cvs-efd_semaphore.diff: new patch from upstream to ++ declare EFD_SEMAPHORE in on SPARC. Closes: #730092, ++ #737697. ++ * patches/svn-updates.diff: update from 2.18 branch, to fix a race in free() ++ of fastbin chunk. ++ * local/manpages/sprof.1, local/manpages/rpcgen.1: apply typographical ++ fixes from Bjarni Ingi Gislason . Closes: #726849, ++ #740973. ++ * patches/hppa/*.diff: apply changes from John David Anglin ++ . Closes: #725508, #741243. ++ * testsuite-checking/expected-results-mips*el: re-add tst-tls2.out and ++ tst-tls3.out (remove in the latest cleanup) as they still occasionally ++ fail. ++ * local/manpages/sotruss.1: new manpage. ++ * patches/sparc/submitted-prlimit.diff: new patch to fix missing ++ prlimit/prlimit64 prototypes on SPARC. Closes: #703559. ++ * source/lintian-overrides: add override for false positive ++ license-problem-non-free-RFC tag. Remove old override for ++ outdated-autotools-helper-file tag. ++ * control.in/main: Bump Standards-Version to 3.9.5 (no changes). ++ ++ -- Aurelien Jarno Wed, 14 May 2014 19:15:10 +0200 ++ ++eglibc (2.18-5) unstable; urgency=medium ++ ++ [ Samuel Thibault ] ++ * patches/hurd-i386/tg-mmap_file_prot_none_fix.diff: New patch, fixes locale ++ generation. ++ * control.in/main: Bump hurd dependency to version with newer RPCs. ++ * libc0.3.symbols.hurd-i386: Update accordingly. ++ * patches/hurd-i386/libpthread_nort.diff: Remove patch, replaced by... ++ * patches/hurd-i386/cvs-libpthread-pthread_condattr_setclock.diff: Fix for ++ pthread_condattr_setclock, for glib2.0 build. ++ * patches/hurd-i386/cvs-munmap-0.diff: New patch to fix gcc's -fsplit-stack ++ initialization. ++ * patches/hurd-i386/cvs-tcbhead_t.diff: New patch to complete TLS variables, ++ to fix gcc's -fsplit-stack support. ++ * Update hurd-i386 testsuite results. ++ * patches/hurd-i386/tg-extern_inline.diff: Only inline within libc. ++ * patches/hurd-i386/tg-tls-threadvar.diff: Use tcbhead_t for _hurd_sigstate ++ instead of TLS variable. Fixes some corner cases triggered with gcl. ++ * patches/hurd-i386/tg-sigstate_locking.diff: Refresh. ++ * patches/hurd-i386/tg-sigstate_thread_reference.diff: Refresh. ++ ++ [ Petr Salinger ] ++ * kfreebsd/local-sysdeps.diff: update to revision 5460 (from glibc-bsd). ++ * kfreebsd/local-fbtl.diff: likewise ++ ++ [ Adam Conrad ] ++ * debian/patches/arm/cvs-{memcpy-align.patch,arm-always-blx.diff}: Backport ++ ifunc memcpy routines from 2.19 to fix alignment issues and computed-jump ++ calculations for ARM_ALWAYS_BX, should fix memcpy on our ArmadaXP buildds. ++ ++ -- Adam Conrad Sun, 27 Apr 2014 15:06:57 -0600 ++ ++eglibc (2.18-4) unstable; urgency=high ++ ++ [ Aurelien Jarno ] ++ * debian/debhelper.in/libc.preinst: Don't fail if the dynamic loader ++ symlink is dangling or missing. Closes: #740158, #740196. ++ * debian/debhelper.in/libc.preinst: only disable ldconfig after making ++ sure a fixed version hasn't already been unpacked, as the unpack order ++ is not guaranteed. ++ * 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. ++ ++ -- Aurelien Jarno Sun, 02 Mar 2014 15:32:16 +0100 ++ ++eglibc (2.18-3) unstable; urgency=medium ++ ++ * debian/patches/any/local-no-malloc-backtrace.diff: Lower the default ++ for MALLOC_CHECK_ to 1, and add it to the list of insecure variables ++ that can't be set for suid binaries. This allows us to not backtrace ++ malloc failures by default (Closes: #739913, LP: #1266492) and skips ++ backtrace for suid binaries where an attacker calling into a corrupt ++ malloc internal data structure with malloc could lead to Bad Things. ++ ++ -- Adam Conrad Sun, 23 Feb 2014 18:43:36 -0700 ++ ++eglibc (2.18-2) unstable; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * 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. 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. ++ ++ [ Petr Salinger ] ++ * kfreebsd/local-sysdeps.diff: update to revision 5443 (from glibc-bsd). ++ ++ -- Aurelien Jarno Sun, 23 Feb 2014 13:30:11 +0100 ++ ++eglibc (2.18-1) unstable; urgency=medium ++ ++ [ Adam Conrad ] ++ * debian/patches/hurd-i386/libpthread_version.diff: Remove stderr vomit. ++ * debian/patches/arm/cvs-arm__{longjmp,sigsetjmp}-thumb.diff: Pull patch ++ from upstream to allow building longjmp and sigsetjmp code with Thumb. ++ * debian/patches/arm/cvs-arm-pointer-mangle-frame.diff: Upstream diff to ++ no longer apply pointer encryption to the frame pointer (LP: #1268937) ++ * debian/patches/powerpc/cvs-gettimeofday-32.diff: Replace the submitted ++ version of this patch with the upstream commit, which also fixes time. ++ * debian/debhelper.in/libc.postinst: Track samba to smbd service rename. ++ ++ [ Aurelien Jarno ] ++ * debian/testsuite-checking/expected-results-mips*: Update following ++ the prlimit64 fix deployment on the build daemons. ++ * patches/alpha/cvs-tls-macros.diff: New patch from upstream to fix ++ FTBFS on alpha. Closes: #735774. ++ ++ [ Samuel Thibault ] ++ * patches/hurd-i386/cvs-libpthread.diff: New snapshot, brings thread ++ destruction fixes and name resolution fix. ++ * patches/hurd-i386/libpthread_build.diff: Refresh. ++ * patches/hurd-i386/libpthread_fix.diff: Remove, fixed upstream. ++ * patches/hurd-i386/libpthread_globsigdisp.diff: Remove, merged upstream. ++ * patches/hurd-i386/tg-tls_thread_leak.diff: Re-enable, now working. ++ * control.d/libc: Upgrade hurd Breaks to version which include the fix again ++ gcc-4.8-built libc. ++ ++ -- Adam Conrad Thu, 20 Feb 2014 19:38:49 -0700 ++ ++eglibc (2.18-0experimental1) experimental; urgency=low ++ ++ [ Adam Conrad ] ++ * debian/patches/i386/cvs-nonascii-case-strcmp.diff: Pull upstream patch ++ to fix LC_CTYPE nonascii-case fallback in i686 strcasecmp/strncasecmp. ++ * debian/testsuite-checking/*: Update 686 targets to match the 586 ones. ++ * Generate expected-results-powerpc64le-linux-gnu-libc for ppc64el port. ++ * debian/testsuite-checking/*: Normalize expected results for ARM ports. ++ * debian/patches/i386/cvs-sse42-strstr*: Backport upstream commits which ++ drop buggy SSE4.2 srtstr implementations in favour of an SSE2 version. ++ * debian/patches/any/cvs-ptrace_peeksiginfo_args.diff: Prepend __ prefix ++ to ptrace_peeksiginfo_args struct to prevent namespace clash w/ linux. ++ * debian/patches/powerpc/cvs-ppc64-vdso-ifunc.diff: Pull upstream fix to ++ squash undefined behaviour in PowerPC64 vDSO IFUNC symbol resolutions. ++ * debian/patches/powerpc/submitted-gettimeofday-vdso.diff: New diff from ++ Adhemerval Zanella at IBM to fix gettimeofday vDSO/IFUNC interactions. ++ * debian/patches/powerpc/submitted-gettimeofday-32.diff: Pull patch from ++ Adhemerval Zanella at IBM to fix 32-bit gettimeofday VSYSCALL lookups. ++ * debian/rules.d/build.mk, debian/sysdeps/{hurd,linux,kfreebsd}.mk: Make ++ pt_chown keyed off a new variable that we can use to enable or disable ++ it per kernel type rather than just the primary libc (Closes: #734607) ++ * debian/patches/kfreebsd/submitted-waitid.diff: On Linux, we must undef ++ waitflags before we define them or we'll conflict with kernel headers. ++ ++ [ Aurelien Jarno ] ++ * debian/patches/any/cvs-vfscanf-0e+0.diff: new patch from upstream to ++ fix parsing of 0e+0. Closes: #732993. ++ * debian/patches/mips/submitted-wordsize-clang.diff: drop now that clang ++ correctly defines_MIPS_SZPTR. ++ ++ [ Samuel Thibault ] ++ * patches/hurd-i386/tg-nfds-poll.diff: New patch to fix poll call with big ++ array. ++ * patches/hurd-i386/tg-sigstate_locking.diff: New patch to fix sigstate ++ creation. ++ * patches/hurd-i386/tg-sigstate_thread_reference.diff: New patch to fix ++ sigstate thread reference counting. ++ * patches/hurd-i386/{libpthreadlibpthread_stubs,libpthread_hurd_cond_wait, ++ submitted-libpthread-elf,cvs-libpthread_lock,libpthread_cancellation, ++ libpthread_hurd_cond_timedwait,libpthread_ctypes,cvs-pthread_atfork, ++ cvs-tls-threadvar-threadself,cvs-libpthread-tls, ++ cvs-libpthread-userstack}.diff: Remove, replaced by... ++ * patches/hurd-i386/cvs-libpthread.diff: ... this git snapshot, and... ++ * patches/hurd-i386/libpthread_build.diff: ... these build fixes. ++ * patches/hurd-i386/tg-aio_misc.diff: New patch to fix aio build. ++ * control.d/main: Build-depend on newer gnumach-dev to get ++ thread_terminate_release RPC. ++ * libc0.3.symbols.hurd-i386: Add thread_terminate_release. ++ ++ -- Adam Conrad Fri, 10 Jan 2014 16:06:00 -0700 ++ ++eglibc (2.18-0experimental0) experimental; urgency=low ++ ++ [ Adam Conrad ] ++ * New upstream release: version 2.18, orig tarball built at SVN r24653: ++ - patches/alpha/local-string-functions.diff: Rebased. ++ - patches/alpha/submitted-PTR_MANGLE.diff: Rebased. ++ - patches/any/local-allocalim-header.diff: Rebased. ++ - patches/any/local-disable-test-tgmath2.diff: Rebased. ++ - patches/any/local-dlfptr.diff: Rebased. ++ - patches/any/local-ld-multiarch.diff: Rebased. ++ - patches/any/local-ldso-disable-hwcap.diff: Rebased. ++ - patches/any/local-mktemp.diff: Rebased. ++ - patches/any/local-nss-overflow.diff: Rebased. ++ - patches/any/submitted-bits-fcntl_h-at.diff: Rebased. ++ - patches/any/submitted-longdouble.diff: Rebased. ++ - patches/arm/local-vfp-sysdeps.diff: Rebased. ++ - patches/arm/unsubmitted-ldconfig-cache-abi.diff: Rebased. ++ - patches/hppa/submitted-nptl-carlos.diff: Rebased. ++ - patches/sparc/local-fork.diff: Rebased. ++ - patches/ia64/submitted-fpu-ulps.diff: Rebased. ++ - patches/localedata/first_weekday.diff: Rebased. ++ - patches/locale/LC_IDENTIFICATION-optional-fields.diff: Rebased. ++ - patches/powerpcspe/unsubmitted-nearbyint.diff: Applied upstream. ++ - patches/m68k/cvs-sysdep-cfi.diff: Applied upstream. ++ - patches/i386/cvs-simd-exception.diff: Applied upstream. ++ - patches/any/local-rtld.diff: Applied upstream. ++ - patches/any/cvs-tst-array-as-needed.diff: Applied upstream. ++ - patches/any/cvs-use-glibc-wchar.diff: Applied upstream. ++ - patches/any/submitted-setfsid-wur.diff: Applied upstream. ++ - patches/any/cvs-sys-param-h-DEV_BSIZE.diff: Applied upstream. ++ - patches/any/cvs-getaddrinfo-stack-overflow.diff: Applied upstream. ++ - patches/any/cvs-regexp-overrun.diff: Applied upstream. ++ - patches/any/cvs-gethostbyname-numeric.diff: Applied upstream. ++ - patches/any/cvs-getaddrinfo-EAI_NONAME.diff: Applied upstream. ++ - patches/any/cvs-tst-cancel4-buf.diff: Applied upstream. ++ - patches/arm64/cvs-setjmp-clobber.diff: Applied upstream. ++ - patches/any/cvs-tst-cancel4-buf.diff: Applied upstream. ++ - patches/any/cvs-CVE-2013-4332-pvalloc.diff: Rebased. ++ - patches/any/cvs-CVE-2013-4332-valloc.diff: Rebased. ++ - patches/any/cvs-CVE-2013-4788-static-ptrguard.diff: Rebased. ++ - patches/any/cvs-CVE-2013-4788-static-ptrguard-arm.diff: Rebased. ++ - patches/any/cvs-CVE-2013-2207-pt_chown.diff: Applied upstream. ++ * debian/patches/any/cvs-tst-tls-atexit-deps.diff: Fix compilation of ++ stdlib/tst-tls-atexit with binutils defaulting to ld --as-needed. ++ * debian/control: Build-dep on netbase for service lookups in tests. ++ * debian/sysdeps/{linux,hurd}.mk: Force on pt_chown on linux and hurd. ++ * debian/rules.d/debhelper.mk: Compress $(libc), multiarch-support, and ++ libc-bin with gzip, and let the rest default to dpkg's new defaults. ++ * debian/debhelper.in/libc-bin.lintian-overrides: The manpages for zic ++ zdump, ldd, ldconfig, and getent have moved to the manpages package. ++ * debian/debhelper.in/libc.lintian-overrides: Don't whine about ldconfig. ++ * debian/testsuite-checking/*: Allow powerpc to fail test-{double,float}. ++ * debian/testsuite-checking/expected-results-aarch64-linux-gnu-libc: New. ++ * debian/testsuite-checking/expected-results-arm-linux-gnueabi-armel: New. ++ * debian/testsuite-checking/expected-results-i686-linux-gnu-libc: New. ++ * debian/patches/any/local-rtlddir-cross.diff: Revert to the state found ++ in 2.17 where ld.so was installed to slibdir and so listed in libc.so. ++ * Skeleton in packaging support for the new powerpc64le-linux-gnu: ++ - debian/sysdeps/ppc64el.mk: Define base ppc64el libc targets. ++ - debian/rules.d/control.mk: Add ppc64el to the list of libc_arches. ++ - debian/control.in/main: Build-depend on gcc-4.8 for ppc64el builds. ++ * debian/libc6.symbols.ppc64: Add missing libc6 symbols file for ppc64. ++ * debian/libc6.symbols.arm64: Add missing libc6 symbols file for arm64. ++ * debian/sysdeps/*: Enable new IFUNC support on armel and armhf builds. ++ * debian/patches/arm/cvs-ifunc-hwcap-fix.diff: Fix IFUNC on non-NEON. ++ * debian/patches/arm/cvs-arm-pointer-mangling.diff: Add ARM support for ++ pointer encryption in glibc internal structures in C and assembler. ++ * debian/patches/any/cvs-tst-cleanup2-ret.diff: Fix return regression ++ on recent versions of gcc in nptl/tst-cleanup2 and nptl/tst-cleanupx2. ++ * debian/patches/any/unsubmitted-tst-tlsmod-as-needed.diff: Fix linking ++ tst-tlsmod5.so and tst-tlsmod6.so with an as-needed default toolchain. ++ * debian/patches/any/unsubmitted-scanf-includes.diff: Fix includes for ++ the scanf15 and scanf17 tests for arches that need misc/bits/syscall.h. ++ * debian/patches/any/local-use-glibc-predef.diff: Backport stdc-predef.h ++ from glibc instead of eglibc, avoiding bits/predefs.h (closes: #717557) ++ * debian/rules.d/quilt.mk: Fix unpatch with only one arch patch applied. ++ * debian/patches/arm64/cvs-arm64-sigcontext.diff: arm64 sigcontextinfo.h. ++ * debian/patches/arm64/cvs-arm64-relocs.diff: Add arm64 reloc definitions. ++ * debian/patches/arm64/cvs-arm64-mcount-profiling.diff: mcount profiling. ++ * debian/patches/arm64/cvs-arm64-ifunc.diff: Enable arm64 IFUNC support. ++ * debian/{rules,sysdeps/arm64.mk,control}: Enable libc6-prof on aarch64. ++ * debian/{control.in/main,rules,sysdeps/*}: Switch to using gcc-4.8 on all ++ architectures as gcc-4.6 and gcc-4.7 are going away in the near future. ++ * debian/rules: Build for i586 where dpkg-architecture claims i486, which ++ matches the default that gcc-4.8 has had on i386 for the last two years. ++ * debian/rules: Set configure_build the same as configure_target above, so ++ we don't think we're cross-building and skip half the testsuite on i386. ++ * debian/patches/i386/local-i586-ulps.diff: Regen ulps for i586, not i686. ++ * debian/patches/i386/cvs-tst-cond25.diff: Pull fix for an intermittent ++ failure in nptl/tst-cond25 in pthread_cond_timedwait.S on i486 and up. ++ ++ [ Samuel Thibault ] ++ * patches/hurd-i386/libpthread_hurd_cond_timedwait.diff: Rebased. ++ * patches/hurd-i386/libpthread_hurd_cond_wait.diff: Rebased. ++ * patches/hurd-i386/submitted-add-needed.diff: Rebased. ++ * patches/hurd-i386/submitted-exec_filename.diff: Rebased. ++ * patches/hurd-i386/tg-EIEIO-fr.diff: Rebased. ++ * patches/hurd-i386/tg-elfosabi_gnu.diff: Rebased. ++ * patches/hurd-i386/tg-exec-static.diff: Rebased. ++ * patches/hurd-i386/tg-hurdsig-fixes.diff: Rebased. ++ * patches/hurd-i386/tg-hurdsig-global-dispositions.diff: Rebased. ++ * patches/hurd-i386/tg-sendmsg-SCM_RIGHTS.diff: Rebased. ++ * patches/hurd-i386/tg-tls-threadvar.diff: Rebased. ++ * patches/hurd-i386/tg-tls.diff: Rebased. ++ * patches/hurd-i386/unsubmitted-clock_t_centiseconds.diff: Rebased. ++ * patches/hurd-i386/submitted-net.diff: Rebased. ++ * patches/hurd-i386/local-ulimit.diff: Removed, fixed upstream. ++ * patches/hurd-i386/libpthread_hurd_cond_timedwait.diff: Add missing ++ version. ++ * patches/hurd-i386/libpthread_hurd_cond_wait.diff: Likewise. ++ * patches/hurd-i386/unsubmitted-NO_HIDDEN.diff: New patch, fixes undefined ++ __GI_memmove/memset reference failures. ++ * testsuite-checking/expected-results-i486-gnu-libc, ++ expected-results-i686-gnu-i386, expected-results-i686-gnu-i686, ++ expected-results-i686-gnu-xen: Update testsuite result. ++ ++ [ Petr Salinger ] ++ * debian/*: change version occurences from 2.17 to 2.18 for upgrades/deps. ++ * kfreebsd/local-sysdeps.diff: update to revision 5214 (from glibc-bsd). ++ * kfreebsd/local-fbtl.diff: likewise ++ * sysdeps/kfreebsd.mk: pt_chown is mandatory ++ * update symbols file for kfreebsd ++ * update testsuite-checking/expected-results-*-kfreebsd-gnu-* ++ * add kfreebsd/submitted-waitid.diff. Closes: #720188. ++ * add kfreebsd/submitted-auxv.diff. Closes: #717912. ++ * drop obsolete patches/*/local-linuxthreads* ++ * drop obsolete linuxthreads part of kfreebsd/local-scripts.diff ++ * drop obsolete kfreebsd/local-dosavesse.diff, local-pthread_at_fork.diff, ++ kfreebsd/local-nosavesse.diff, kfreebsd/local-use-thr-primitives.diff, ++ and kfreebsd/submitted-libc_once.diff. ++ * drop kfreebsd/local-readdir_r.diff, obsoleted by fix for CVE-2013-4237. ++ ++ [ Aurelien Jarno ] ++ * Drop s390 support. ++ * sysdeps/{hurd,kfreebsd,linux}.mk: remove dead code. ++ * Remove linuxthreads from the tarball: ++ - rules.d/tarball.mk: don't fetech linuxthreads and linuxthreads_db. ++ - rules.d/build.mk: don't build linuxthreads manpages. ++ - rules: don't run make clean in linuxthreads directory. ++ - patches/any/local-sysctl.diff: drop the linuxthreads part. ++ - patches/all/local-pthread-manpages.diff: remove. ++ - local/manpages/pthread_*.3: import the few remaining linuxthreads ++ manpages. ++ - debhelper.in/glibc-doc.manpages: update manpage locations. ++ * debian/sysdeps/s390.mk: Enable new IFUNC support. ++ * debian/rules.d/debhelper.mk: compress locales-all with xz -z7. ++ * patches/any/cvs-strcasecmp-locales.diff: new patch from upstream to ++ fix mismatch between strcasecmp and toupper/tolower in tr_TR.iso88599 ++ locale (Closes: #716775). ++ * patches/any/cvs-CVE-2013-4458-getaddrinfo.diff: new patch from upstream ++ to fix stack (frame) overflow in getaddrinfo() when called with AF_INET6 ++ / CVE-2013-4458 (Closes: #727181). ++ * testsuite-checking/expected-results-s390-linux-gnu-s390, ++ testsuite-checking/expected-results-s390x-linux-gnu-libc: cleanup. ++ * patches/svn-updates.diff: update with the glibc 2.18 branch to get commits ++ which are not yet available in eglibc. Fixes multiarch math functions on ++ sparc. ++ * testsuite-checking/expected-results-i486*: rename expected result files ++ from i486 to i586. ++ * testsuite-checking/convertlog.sh: use sort -u to avoid duplicated entries ++ in the test results. ++ * testsuite-checking/expected-results-mips*: remove duplicated entries, ++ cleanup. ++ * testsuite-checking/expected-results-arm-linux-gnueabihf-libc: cleanup. ++ * testsuite-checking/expected-results-arm-linux-gnueabi-libc: cleanup. ++ * testsuite-checking/expected-results-*86-linux-gnu*: cleanup. ++ * patches/any/cvs-DL_CALL_DT_INIT_FINI.diff, ++ patches/hppa/cvs-hppa-DL_CALL_DT_INIT_FINI.diff, ++ patches/ia64/cvs-ia64-DL_CALL_DT_INIT_FINI.diff: new patches from upstream ++ to fix a segmentation fault in ld.so on hppa and ia64. ++ * testsuite-checking/expected-results-sparc*-linux-gnu-*: cleanup. ++ * patches/s390/cvs-s390-tls-got-pointer.diff: new patch from upstream to fix ++ the TLS GOT pointer setup on s390. ++ * debian/rules.d/build.mk: define the installation in configparms to avoid ++ broken glibc makefiles to spuriously trigger install rules trying to ++ overwrite system headers. ++ * testsuite-checking/expected-results-*-kfreebsd-gnu-*: allow ++ check-local-headers.out to fail as the script is linux specific and ++ doesn't now about kfreebsd specific headers. ++ * debian/rules: don't pass -fstrict-aliasing to HOST_CFLAGS, it is already ++ included in -O2. ++ * Replace patches/any/submitted-findlocale-div-by-zero.diff by upstream ++ version patches/any/cvs-findlocale-div-by-zero.diff. ++ * patches/any/cvs-CVE-2013-4332-memalign-2.diff: patch from upstream to ++ address some remaining issues from CVE-2013-4332. ++ * patches/ia64/local-rtld-compile-options.diff: new patch to workaround ++ miscompilation issues. ++ * testsuite-checking/expected-results-ia64-linux-gnu-libc: cleanup and ++ update. ++ ++ -- Adam Conrad Mon, 09 Dec 2013 22:14:44 -0700 ++ ++eglibc (2.17-98) UNRELEASED; urgency=low ++ ++ [ Samuel Thibault ] ++ * patches/hurd-i386/tg-ifaddrs_v6.diff: Add missing initialization of sa_len ++ fields. ++ * patches/hurd-i386/tg-futimens.diff: New patch to add futimens support for ++ apt 0.9.15.1. ++ ++ -- Aurelien Jarno Fri, 29 Nov 2013 18:11:34 +0100 ++ ++eglibc (2.17-97) unstable; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * patches/mips/local-prlimit64.diff: remove. ++ * patches/mips/cvs-prlimit64.diff: new patch from upstream to fix ++ getrlimit64/setrlimit64 with recent 64-bit kernels (Closes: #665897). ++ * patches/any/submitted-findlocale-div-by-zero.diff: new patch to fix ++ a SIGFPE when locale-archive has been corrupted to all zeros (Closes: ++ #718890, #730336). ++ ++ [ Petr Salinger ] ++ * kfreebsd/local-sysdeps.diff: raise MAXLOGNAME ++ ++ -- Aurelien Jarno Fri, 29 Nov 2013 16:43:19 +0100 ++ ++eglibc (2.17-96) unstable; urgency=low ++ ++ * patches/any/cvs-CVE-2013-4237-alignment.diff: Fix alignment of the ++ directory block in dirstream.h, fixing readdir regression on sparc. ++ * testsuite-checking/*: Allow ptrguard test to fail on mips and hurd. ++ ++ -- Adam Conrad Fri, 15 Nov 2013 09:39:47 +0000 ++ ++eglibc (2.17-95) unstable; urgency=low ++ ++ [ Adam Conrad ] ++ * patches/any/cvs-CVE-2013-4788-static-ptrguard-arm.diff: Pull fix ++ from git to fix the static-ptrguard testsuite regression on ARM. ++ * patches/series: Re-enable CVE-2013-4788 fixes (Closes: #717178) ++ * patches/series.kfreebsd*: Disable kfreebsd/local-readdir_r.diff. ++ ++ [ Samuel Thibault ] ++ * patches/any/cvs-CVE-2012-44xx.diff: Include to get ++ MIN/MAX macros on hurd-i386. ++ ++ -- Adam Conrad Sat, 09 Nov 2013 21:45:05 -0700 ++ ++eglibc (2.17-94) unstable; urgency=low ++ ++ [ Adam Conrad] ++ * 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/cvs-CVE-2013-4237.diff: backport git fix to respect the ++ NAME_MAX constraints in readdir_r: CVE-2013-4237 (Closes: #719558) ++ * debian/patches/any/cvs-CVE-2013-2207-pt_chown.diff: backpot git patch ++ to disable building and using pt_chown, but leave disabled for now ++ until we come up with a complete plan to not break end-user machines. ++ * patches/any/cvs-CVE-2013-4788-static-ptrguard*: backport fix from git ++ for pointer mangling in static builds, disabled due to ARM regression. ++ * patches/arm64/cvs-setjmp-clobber.diff: __sigsetjmp clobbers register ++ x1 before making the tail call to __sigjmp_save, which causes the ++ latter to always save the signal mask. Backport git patch to fix. ++ * patches/ubuntu/unsubmitted-dlopen-static-crash.diff: New patch from ++ Maciej Rozycki to fix a dlopen segfault in statically linked programs. ++ ++ [ Samuel Thibault ] ++ * libc0.3.symbols.hurd-i386: Refresh. ++ * patches/hurd-i386/tg-sendmsg-SCM_RIGHTS.diff: Fix spurious returned error ++ when flags are not 0. Thanks Svante Signell for the catch ++ (Closes: #724681) ++ * patches/hurd-i386/libpthread_stubs.diff: Drop stub for pthread_atfork, now ++ implemented. ++ * patches/hurd-i386/tg-tls.diff: Fix getting LDT on fork. ++ * patches/hurd-i386/local-dl-dynamic-weak.diff: Remove patch, issue fixed in ++ libpthread. ++ * control: Make libc0.3 break old binaries which were depending on the ++ previous patch. ++ * patches/hurd-i386/tg-extern_inline.diff: Do not expose some internals of ++ libc outside libc. ++ * patches/hurd-i386/cvs-tls-threadvar-threadself.diff: New patch, store ++ pthread_self in TLS instead of threadvar. ++ * patches/hurd-i386/cvs-libpthread-tls.diff: New patch, delay TLS ++ deallocation. ++ * patches/hurd-i386/tg-tls.diff: Update, fix errno declaration for TLS. ++ * patches/hurd-i386/tg-tls-threadvar.diff: Update, replace all threadvars ++ with TLS. ++ * patches/hurd-i386/cvs-libpthread-userstack.diff: New patch, allow ++ user-provided stacks. ++ * patches/hurd-i386/tg-libc_getspecific.diff: New patch, fix erroneous ++ __libc_getspecific weak reference. ++ * control: Make libc0.3 break old hurd with overzealous inlines. ++ * patches/hurd-i386/libpthread.diff: Synchronize with upstream. ++ ++ [ Petr Salinger ] ++ * fbtl.diff: limit default stack size to 4 * ARCH_STACK_DEFAULT_SIZE. ++ See #727009, #725516. ++ * sysdeps.diff: fixup get/set owner of socket ++ ++ -- Adam Conrad Sat, 09 Nov 2013 18:06:17 -0700 ++ ++eglibc (2.17-93) unstable; urgency=low ++ ++ [ Adam Conrad ] ++ * patches/any/cvs-tst-cancel4-buf.diff: Increase nptl test case buffer ++ size to 16384 so we really block on current (>= 3.10) Linux kernels. ++ * patches/any/cvs-CVE-2013-4332-*.diff: Backport git fixes for integer ++ overflows in allocator functions: CVE-2013-4332 (Closes: #722536) ++ * debian{control,sysdeps/arm64.mk}: Switch to gcc-4.8 on arm64 only. ++ ++ [ Samuel Thibault ] ++ * patches/hurd-i386/unsubmitted-clock_t_centiseconds.diff: New patch from ++ Richard Braun to work around applications which do not like micro-second ++ clock_t, such as guile. ++ * Update hurd-i386 testsuite progressions. ++ * patches/hurd-i386/submitted-startup-pid2.diff: New patch from Justus ++ Winter to prepare reboot() for /hurd/init getting PID 2 instead of 1. ++ * patches/hurd-i386/submitted-path_mounted.diff: New patch from Justus ++ Winter to fix hurd-i386's _PATH_MOUNTED according to Debian usage. ++ * patches/hurd-i386/tg-socket{,pair}_flags.diff: New patch from Thomas ++ Schwinge to add support for SOCK_CLOEXEC and SOCK_NONBLOCK. ++ * patches/hurd-i386/tg-pthread-atfork.diff,cvs-pthread_atfork.diff: Add ++ pthread_atfork support. ++ * patches/hurd-i386/tg-thread-cancel.diff: Update patch against two other ++ overzealous assertions. ++ * patches/hurd-i386/tg-pipe2.diff: New patch to add pipe2 support. ++ ++ [ Pino Toscano ] ++ * Generate udeb shlibs also for Hurd's libmachuser and libhurduser. ++ ++ -- Adam Conrad Sun, 22 Sep 2013 20:05:36 -0600 ++ ++eglibc (2.17-92) unstable; urgency=low ++ ++ * kfreebsd/local-sysdeps.diff: update to revision 4839 (from glibc-bsd). ++ ++ -- Petr Salinger Wed, 31 Jul 2013 22:38:47 +0100 ++ ++eglibc (2.17-91) unstable; urgency=low ++ ++ [ Petr Salinger ] ++ * switch libpthread implementation on kfreebsd-* to fbtl. ++ Closes: #703545. Closes: #665287. Closes: #683825. Closes: #489066. ++ * split some parts of kfreebsd/local-linuxthreads29.diff ++ into kfreebsd/local-nscd-no-sockcloexec.diff and ++ kfreebsd/local-linuxthreads-tlsdesc.diff ++ * add kfreebsd/local-fbtl.diff and kfreebsd/local-fbtl-depends.diff ++ * kfreebsd/local-sysdeps.diff: update to revision 4809 (from glibc-bsd). ++ Closes: #718181. Addresses: #717032 in new binutils. ++ * update testsuite-checking/expected-results-*-kfreebsd-gnu-* ++ by fbtl tests that are known to fail. ++ ++ [ Aurelien Jarno ] ++ * debian/rules.d/build.mk: run the testsuite in parallel again. ++ * prepare symbols file update for kfreebsd-* switch to fbtl. ++ ++ [ Samuel Thibault ] ++ * hurd-i386/local-no-bootstrap-fs-access.diff: Do not call access at ++ process startup on hurd-i386. Fixes root filesystem startup. ++ * hurd-i386/unsubmitted-tls.diff: rename into tg-tls-threadvar.diff ++ * hurd-i386/tg-tls.diff: Move some hooks to tg-tls-threadvar.diff. ++ ++ [ Adam Conrad ] ++ * debian/control.in/main: Drop build-conflicts on binutils-gold to ++ make us buildable again with the new binutils that provides it. ++ * debian/*: Remove ldd.1, ldconfig.8, ld.so.8, gai.conf.5, zic.8, ++ and zdump.1, and let them move to manpages (Reference: #556173) ++ ++ -- Adam Conrad Wed, 31 Jul 2013 20:56:32 +0100 ++ ++eglibc (2.17-7) unstable; urgency=medium ++ ++ [ Aurelien Jarno ] ++ * debian/rules.d/build.mk: unexport LD_PRELOAD to allow the testsuite ++ to pass even if eatmydata is used. Closes: #713035. ++ * debian/script.in/nohwcap.sh: handle new multiarch format of dpkg-query. ++ Closes: #713837. ++ * debian/patches/m68k/cvs-sysdep-cfi.diff: new patch from upstream to fix ++ cfi assembly code. Closes: #709992. ++ * patches/any/cvs-gethostbyname-numeric.diff: new patch from upstream to fix ++ gethostbyname when used with numeric addresses. ++ * debian/patches/any/cvs-getaddrinfo-EAI_NONAME.diff: new patch from ++ upstream to return EAI_NONAME instead of EAI_SYSTEM when the network ++ is down. Closes: #713799. ++ * debian/local/ldconfig_wrap: rename into debian/local/sbin/ldconfig to ++ be consistent with the naming of other files in this directory. ++ * debian/patches/mips/local-prlimit64.diff: new patch to temporarily ++ workaround issues with the prlimit64 syscall on MIPS. ++ * debian/testsuite-checking/expected-results-mips*: allow a few tests to ++ fail due to the prlimit64 syscall issue on MIPS. ++ * Add 32-bit biarch packages on sparc64. ++ ++ [ Samuel Thibault ] ++ * Remove unapplied hurd-i386/local-nice.diff (applied as tg-nice.diff) ++ ++ [ Petr Salinger ] ++ * kfreebsd/local-sysdeps.diff: update to revision 4552 (from glibc-bsd). ++ Closes: #712196. ++ ++ -- Aurelien Jarno Sun, 30 Jun 2013 01:18:27 +0200 ++ ++eglibc (2.17-6) unstable; urgency=low ++ ++ [ Aurelien Jarno ] ++ * control.in/main, sysdeps/mips.mk, sysdeps/mipsel.mk: build the libc ++ back with gcc-4.7, but using -mno-plt. ++ ++ [ Samuel Thibault ] ++ * hurd-i386/libpthread_ctypes.diff: Fix ctypes initialization. ++ * hurd-i386/submitted-handle-eprototype.diff: Fix DNS lookups. ++ * hurd-i386/tg-io_select_timeout.diff: Fixes select timeout. ++ * hurd-i386/tg-poll_errors_fixes.diff: Fixes poll posixity. ++ * hurd-i386/local-select.diff: Removed, made obsolete by ++ tg-io_select_timeout.diff. ++ * hurd-i386/tg-context_functions.diff: Add *context support. ++ ++ -- Aurelien Jarno Tue, 18 Jun 2013 07:58:13 +0200 ++ ++eglibc (2.17-5) unstable; urgency=low ++ ++ [ Petr Salinger ] ++ * kfreebsd/local-sysdeps.diff: update to revision 4512 (from glibc-bsd). ++ Closes: #710841. ++ ++ [ Adam Conrad ] ++ * debian/tests/control: Add a bogus Depends line to the rebuild test. ++ ++ [ Aurelien Jarno ] ++ * Build glibc on mips with gcc-4.4 until a recent binutils version is ++ available in sid. ++ ++ -- Aurelien Jarno Wed, 05 Jun 2013 00:18:31 +0200 ++ ++eglibc (2.17-4) unstable; urgency=low ++ ++ [ Adam Conrad ] ++ * Drop versioned build-dependencies on tar, make, and sed, as they're ++ all {Build-,}Essential and available in oldstable (Closes: #708504) ++ ++ [ Petr Salinger ] ++ * kfreebsd/local-sysdeps.diff: update to revision 4511 (from glibc-bsd). ++ Closes: #635192. Closes: #667448. ++ * debian/sysdeps/kfreebsd.mk, debian/debhelper.in/libc.preinst: ++ bump minimal FreeBSD kernel version to 8.3. ++ ++ [ Aurelien Jarno ] ++ * Remove any/local-o_cloexec.diff, kfreebsd/local-freopen.diff and ++ any/unsubmitted-cloexec-conditional.diff (not needed anymore). ++ * debhelper.in/libc-bin.postinst: remove duplicate trigger message. ++ Closes: #707919. ++ * Update Hungarian debconf translation, by Nagy Elemér Károly. ++ * Add powerpcspe/unsubmitted-nearbyint.diff to fix FTBFS on powerpcspe ++ (Closes: #708741). ++ * Update testsuite-checking/expected-results-powerpc-linux-gnuspe-libc ++ (Closes: #693895). ++ * rules.d/build.mk: use rdfind + symlinks instead of fdupes + handcoded ++ shell script to optimize disk space. ++ ++ -- Aurelien Jarno Sat, 01 Jun 2013 22:03:20 +0200 ++ ++eglibc (2.17-3) unstable; urgency=medium ++ ++ [ Petr Salinger ] ++ * Allow failure of tst-secure-getenv on kfreebsd-*, as the kernel ++ in squeeze provides /proc/self/exe only on a best effort basis. ++ * kfreebsd/local-sysdeps.diff: update to revision 4438 (from glibc-bsd). ++ ++ [ Aurelien Jarno ] ++ * Add s390x symbols files. ++ ++ [ Adam Conrad ] ++ * sysdeps/mips.mk: Install n64 and n32 stubs headers into each of ++ their respective libc-dev-* multilib packages (Closes: #708265) ++ * sysdeps/mipsel.mk: Do the same for mipsel multilib dev packages. ++ ++ -- Adam Conrad Wed, 15 May 2013 18:50:01 -0600 ++ ++eglibc (2.17-2) unstable; urgency=low ++ ++ [ Adam Conrad ] ++ * debian/patches/any/unsubmitted-cloexec-conditional.diff: Catch yet ++ another unconditional O_CLOEXEC and conditionalize it for freebsd. ++ * debian/patches/kfreebsd/local-HAVE_TLS_SUPPORT.diff: Removed, as ++ this is no longer needed by the updated glibc-bsd sysdeps upstream. ++ * debian/patches/any/cvs-regexp-overrun.diff: Backport patch from git ++ to resolve regex matcher overrun, CVE-2013-0242 (Closes: #699399) ++ * debian/sysdeps/ia64.mk, debian/control: Switch ia64 back to gcc-4.6, ++ as our world explodes when compiled with gcc-4.7 on ia64 right now. ++ ++ [ Aurelien Jarno ] ++ * patches/any/cvs-sys-param-h-DEV_BSIZE.diff: New patch to fix ++ conflict with kFreeBSD kernel headers. ++ * patches/kfreebsd/local-linuxthreads-TLS-THREAD.diff: New patch to remove ++ conditional defines on USE___THREAD and HAVE_TLS_SUPPORT. ++ * patches/kfreebsd/local-linuxthreads-mutex-initializer.diff: New patch to ++ define MUTEX_INITIALIZER. ++ * Japanese debconf translation update from Nobuhiro Iwamatsu. ++ closes: #695077. ++ * patches/any/cvs-getaddrinfo-stack-overflow.diff: New patch to fix ++ a stack overflow in getaddrinfo(), CVE-2013-1914. Closes: #704623. ++ * patches/any/local-missing-linux_types.h.diff: Drop, not need anymore. ++ * local/manpages/ld.so.8: drop --ignore-rpath documentation. Closes: ++ #707802. ++ * patches/all/local-ldd.diff: check if the dynamic linker works before ++ using it. Closes: #631242, #707091. ++ * patches/kfreebsd/local-scripts.diff: remove dynamic linker name, now ++ handled by abi-variants. ++ * debian/control.in/main: remove ${misc:Depends} from libc Depends: field to ++ not get a dependency on debconf. Closes: #707813. ++ * patches/localedata/submitted-locale-bo.diff: New patch to fix bo_IN and ++ bo_CN locales, causing localedef to fail and localechooser to FTBFS. ++ ++ [ Petr Salinger ] ++ * patches/kfreebsd/local-linuxthreads-initfini.diff: follow upstream ++ changes in startup code ++ * patches/kfreebsd/local-no-pldd.diff: pldd is linux only utility ++ * patches/kfreebsd/local-nscd-nosendfile-fix.diff: handle system without ++ sendfile syscall ++ * patches/kfreebsd/local-linuxthreads-stackguard.diff: handle elf subdir ++ removal ++ * patches/kfreebsd/local-freopen.diff: support architecture without dup3() ++ * patches/kfreebsd/local-linuxthreads-ctype_init.diff: follow upstream ++ changes in ctype initialization ++ * re-enable lost any/local-linuxthreads-XPG7.diff ++ any/local-linuxthreads-setclock.diff ++ * drop obsolete any/local-linuxthreads-unwind.diff ++ any/local-linuxthreads-lowlevellock.diff ++ * kfreebsd/local-sysdeps.diff: update to revision 4431 (from glibc-bsd). ++ * Add into testsuite-checking/expected-results-*-kfreebsd-gnu-* ++ tst-timer5 test and new tst-backtrace[4-6] tests that are known to fail. ++ * raise version dependency on g++-4.7 (>= 4.7.3-4) [kfreebsd-amd64] due to ++ multilib problems in earlier versions ++ ++ -- Aurelien Jarno Sun, 12 May 2013 16:46:17 +0200 ++ ++eglibc (2.17-1) unstable; urgency=low ++ ++ [ Samuel Thibault ] ++ * Rename several hurd-i386 patches to reflect upstream submission status: ++ - patches/hurd-i386/unsubmitted-single-hurdselect-timeout.diff into ++ patches/hurd-i386/tg-single-select-timeout.diff, ++ - patches/hurd-i386/unsubmitted-select-EINTR.diff into ++ patches/hurd-i386/tg-select-EINTR.diff, ++ - patches/hurd-i386/unsubmitted-setitimer_fix.diff into ++ patches/hurd-i386/tg-setitimer.diff. ++ * patches/hurd-i386/tg-ifaddrs_v6.diff: New, fixes IPv6 in getifaddrs. ++ * patches/hurd-i386/tg-remap_getcwd.diff: New patch, fixes remap translator. ++ * patches/hurd-i386/tg-nice.diff: New patch, fixes nice level granularity. ++ * patches/hurd-i386/tg-tls.diff: Update to tg version. ++ * patches/hurd-i386/tg-exec-static.diff: New, fixes boot with static exec. ++ * patches/hurd-i386/tg-EIEIO-fr.diff: New, fixes french translation of EIEIO. ++ * patches/hurd-i386/tg-af_local_strlen.diff: New patch, fixes using PF_LOCAL ++ paths without ending \0. ++ ++ [ Adam Conrad ] ++ * debian/debhelper.in/libc.postint: Switch from 'awk gsub' to 'tr -d' to ++ avoid warnings when the awk alternative points to gawk (LP: #1156923) ++ * debian/patches/any/submitted-setfsid-wur.diff: Drop __wur from setfsuid ++ and setfsgid functions to avoid -Werror=unused-result (Closes: #701422) ++ * debian/patches/i386/cvs-simd-exception.diff: Pull patch from upstream ++ to fix a performance regression in i386 SIMD exceptions (LP: #1157244) ++ * debian/patches/svn-updates.diff: Update to r22884 of eglibc-2_17 branch ++ ++ -- Adam Conrad Tue, 07 May 2013 01:57:11 -0600 ++ ++eglibc (2.17-0experimental2) experimental; urgency=low ++ ++ * Switch to gcc-4.7 across the board to tidy up some C99 conformance, ++ and force it to an experimental version at the request of Matthias. ++ * debian/sysdeps/arm64.mk: Remove --enable-multi-arch (LP: #1117602) ++ * debian/debhelper.in/libc.postinst: Add support for upstart restarts ++ and don't restart init when upgrading in chroots (Closes: #608903) ++ * debian/testsuite-checking/expected-mips*: Allow tst-audit8 to fail. ++ ++ -- Adam Conrad Wed, 06 Feb 2013 22:41:23 -0700 ++ ++eglibc (2.17-0experimental1) experimental; urgency=low ++ ++ [ Adam Conrad ] ++ * Rebase kfreebsd patches missed in the previous upload due to quilt: ++ - debian/patches/kfreebsd/local-undef-glibc.diff: Unfuzz. ++ - debian/patches/kfreebsd/local-use-thr-primitives.diff: Unfuzz. ++ - debian/patches/kfreebsd/local-linuxthreads29.diff: Unfuzz. ++ - debian/patches/kfreebsd/local-readdir_r.diff: Track file rename. ++ - debian/patches/kfreebsd/local-memusage_no_mremap.diff: Unfuzz. ++ * debian/patches/kfreebsd/local-HAVE_TLS_SUPPORT.diff: Following the ++ upstream removal of TLS configure options, enable unconditionally. ++ * debian/patches/any/local-tst-dir-overlayfs.diff: Dropped, as I seem ++ to be the only person building on overlayfs, and I'll just use aufs. ++ * Update debian/patches/kfreebsd/local-sysdeps.diff to revision 4353. ++ * debian/patches/any/unsubmitted-cloexec-conditional.diff: Make more ++ occurences of O_CLOEXEC conditional on it actually being defined. ++ * debian/rules: Don't put x32 debug symbols in libc-dbg (LP: #1106471) ++ * debian/testsuite-checking/expected-*: Allow all arches to fail the ++ tst-cputimer1 test, as it harmlessly comes and goes on all of them. ++ * debian/testsuite-checking/expected-*: Adjust ia64 and armel results ++ to allow failures expected by the upstream port maintainers of each. ++ * Drop the armhf-specific symbols hack for the new linker, as we're ++ no longer expecting partial upgrades from the out-of-archive port. ++ * debian/{control,control.in/main}: Bump Standards-Version to 3.9.4. ++ * Amend eglibc-source.lintian-overrides to add libc-dev-alt.postinst. ++ ++ [ Pino Toscano ] ++ * debian/rules.d/build.mk: When threads is no, disable nscd in all passes. ++ ++ -- Adam Conrad Sun, 03 Feb 2013 20:34:44 -0700 ++ ++eglibc (2.17-0experimental0) experimental; urgency=low ++ ++ [ Adam Conrad ] ++ * New upstream release: version 2.17, orig tarball built at SVN r22169: ++ - Restricts ld.so self-loading checks to normal mode (LP: #1088677) ++ - debian/rules.d/tarball.mk: ports is no longer external to libc. ++ - debian/*: Update all 2.16 occurences to 2.17 for upgrades/deps. ++ - patches/localedata/supported.diff: Rebased against new upstream. ++ - patches/localedata/locale-ia.diff: Dropped, merged upstream. ++ - patches/localedata/submitted-es_MX-decimal_point.diff: Rebased. ++ - patches/amd64/local-pthread_cond_wait.diff: Dropped, fixed upstream. ++ - patches/i386/local-pthread_cond_wait.diff: Dropped (closes: #694962) ++ - patches/arm64/cvs-ldconfig-cache-abi.diff: Dropped, merged upstream. ++ - patches/arm64/submitted-aarch64-support.diff: Merged upstream. ++ - patches/arm/cvs-ldconfig-cache-abi.diff: Dropped, merged upstream. ++ - patches/arm/local-atomic.diff: Dropped, fixed differently upstream. ++ - patches/arm/unsubmitted-armhf-linker.diff: Dropped, not needed. ++ - patches/arm/unsubmitted-ldconfig-cache-abi.diff: Rewritten slightly. ++ - patches/hppa/submitted-nptl-carlos.diff: Rebased against upstream. ++ - patches/hppa/local-stack-grows-up.diff: Rebased against upstream. ++ - patches/hurd-i386/local-enable-ldconfig.diff: dl-cache.c dropped. ++ - patches/hurd-i386/tg-tls.diff: Rebase and drop powerpc support. ++ - patches/hurd-i386/tg-regenerate_errno.h.diff: Merged upstream. ++ - patches/hurd-i386/tg-extern_inline.diff: Drop powerpc support. ++ - patches/hurd-i386/tg-elfosabi_gnu.diff: Drop powerpc support. ++ - patches/hurd-i386/tg-grantpt.diff: Rebased against new upstream. ++ - patches/hurd-i386/unsubmitted-pthread_posix-option.diff: Rebased. ++ - patches/hurd-i386/submitted-getgroups.diff: Dropped, merged upstream. ++ - patches/hurd-i386/submitted-getlogin_r.diff: Dropped, fixed upstream. ++ - patches/hurd-i386/submitted-ptsname.diff: Dropped, merged upstream. ++ - patches/hurd-i386/submitted-sendto.diff: Dropped, fixed upstream. ++ - patches/hurd-i386/cvs-add-missing-includes.diff: Merged upstream. ++ - patches/hurd-i386/cvs-mach-check-local-headers.sh.diff: Merged. ++ - patches/hurd-i386/cvs-lremovexattr.diff: Dropped, merged upstream. ++ - patches/hurd-i386/cvs-renameat.diff: Dropped, merged upstream. ++ - patches/hurd-i386/cvs-mknodat.diff: Dropped, merged upstream. ++ - patches/hurd-i386/cvs-llistxattr.diff: Dropped, merged upstream. ++ - patches/i386/submitted-i686-timing.diff: Rebase, and fix a bug that ++ was excluding dl-caller.c from shared-only-routines for rtld builds. ++ - patches/m68k/cvs-syscall-arguments.diff: Dropped, merged upstream. ++ - patches/powerpc/local-math-logb.diff: Rebased against new upstream. ++ - patches/all/unsubmitted-autoconfupdate.diff: Dropped, not needed. ++ - patches/any/local-bindresvport_blacklist.diff: Rebase with upstream. ++ - patches/any/local-ldso-disable-hwcap.diff: Rebased against upstream. ++ - patches/any/local-libgcc-compat-ports.diff: Rebased against upstream. ++ - patches/any/local-nss-upgrade.diff: Rebased against new upstream. ++ - patches/any/local-o_cloexec.diff: Rebased against new upstream. ++ - patches/any/local-rtld.diff: Rebased against new upstream. ++ - patches/any/submitted-popen.diff: Dropped, finally merged upstream. ++ - patches/any/submitted-accept4-hidden.diff: Dropped, merged upstream. ++ - patches/any/submitted-bits-fcntl_h-at.diff: Rebased against upstream. ++ - patches/any/local-gai-rfc1918-scope-global.patch: Merged upstream. ++ - patches/any/submitted-resolv-assert.diff: Dropped, merged upstream. ++ - patches/any/local-revert-fclose-posix2008.diff: Reverted upstream. ++ - patches/any/local-sunrpc-dos.diff: Dropped, different fix upstream. ++ - patches/any/cvs-cxxheaders-detection[123].diff: Merged upstream. ++ * debian/patches/powerpc/submitted-UAPI_ASM_POWERPC_ELF.diff: Remove, ++ as this has been fixed in the 3.7 release and 3.8 kernel headers. ++ * debian/sysdeps/{amd64,i386}.mk: Fix rtlddir for x32 alternate builds. ++ * debian/sysdeps/{armel,armhf}.mk: Merge multilib configs from Ubuntu. ++ * debian/debhelper.in/libc.preinst: Fix preinst kernel check to match ++ the reality that we need >= 2.6.32, as found in squeeze/lucid/RHEL6. ++ * debian/rules: Fix EGLIBC_VERSION epoch parsing breakage (LP: #929565) ++ * debian/patches/any/cvs-tst-array-as-needed.diff: Fix tst-array2 and ++ tst-array5 to build with --no-as-needed to prevent test regressions. ++ * debian/patches/any/unsubmitted-ldso-machine-mismatch.diff: Skip past ++ libraries that are built for other machines, rather than erroring. ++ * debian/patches/i386/unsubmitted-quiet-ldconfig.diff: Fix ldconfig on ++ x86 to stop complaining so loudly about wrong-arch libraries on path. ++ * debian/{rules.d/build.mk,sysdeps/hurd*}: When the threads variable is ++ not set to "yes", add --disable-nscd to the main configure options. ++ * debian/patches/any/cvs-use-glibc-wchar.diff: Switch from the eglibc ++ implementation of wchar.h to the cleaner glibc-2.18 implementation. ++ * debian/patches/arm/local-eabi-wchar.diff: Dropped, no longer needed. ++ * debian/patches/any/local-tst-dir-overlayfs.diff: Apply dirty hack to ++ skip tst-dir on overlayfs, as it currently fails (see: LP #1107492) ++ * debian/patches/svn-updates.diff: Bring svn-updates to revision 22169. ++ ++ [ Matthias Klose ] ++ * debian/{rules,rules.d/control.mk,control.in/libc}: Allow turning off ++ libc-prof arbitrarily, and disable it for arm64, which lacks support. ++ * debian/rules.d/build.mk: Fix armhf multilib with WITH_BUILD_SYSROOT. ++ ++ [ Steve McIntyre ] ++ * debian/patches/arm/unsubmitted-ldso-multilib.diff: Stop ld.so from ++ exiting prematurely when it encounters wrong-float ABI libraries. ++ ++ [ Pino Toscano ] ++ * Rebase/remove hurd-i386 patches against the new upstream version: ++ - patches/hurd-i386/tg-ptrmangle.diff: Remove, obsolete. ++ - patches/hurd-i386/tg-check_native.diff: Remove, obsolete. ++ - patches/hurd-i386/submitted-regex_internal.diff: Fixed upstream. ++ - patches/hurd-i386/local-disable-sendmmsg.diff: Fixed upstream. ++ - patches/hurd-i386/unsubmitted-pthread.diff: Drop, obsolete. ++ - patches/hurd-i386/unsubmitted-mremap.diff: Rebased for new upstream. ++ * debian/patches/hurd-i386/local-disable-tst-xmmymm.diff: Disable test. ++ * Update expected-results-i486-gnu-libc, expected-results-i686-gnu-i386, ++ expected-results-i686-gnu-i686, expected-results-i686-gnu-xen. ++ ++ -- Adam Conrad Sun, 27 Jan 2013 23:33:32 -0700 ++ ++eglibc (2.16-0experimental1) experimental; urgency=low ++ ++ [ Adam Conrad ] ++ * Add patches/any/cvs-cxxheaders-detection[1-3].diff to bring us up to date ++ with my C++ header detection patch on glibc trunk, for g++-4.7_4.7.2-10. ++ * Add patches/powerpc/submitted-UAPI_ASM_POWERPC_ELF.diff to fix builds on ++ PowerPC against linux headers from 3.7-rc. Remove if fixed for 3.7-final. ++ * debian/debhelper.in/libc-dev-alt.{preinst,postinst}: Do the directory to ++ symlink migration in postinst, which solves issues with dpkg following ++ the new symlink on unpack and removing all the "old" (now new) files. ++ * debian/rules.d/debhelper.mk: Add a MULTIARCHDIR subst for the above. ++ * debian/sysdeps/{amd64,i386}.mk: Enable and bootstrap x32 multilib builds. ++ * debian/control.in/main: Bump g++4.7 build-dep to 4.7.2-11 for x32 builds. ++ * debian/control.in/main: Bump linux-libc-dev build-dep for alt x32 builds. ++ * debian/{tests,control.in/main}: Add simple autopkgtest rebuild testcase. ++ ++ [ Aurelien Jarno ] ++ * Add patches/m68k/cvs-syscall-arguments.diff to fix cancellable syscall ++ with 5 or 6 arguments. Closes: #693852. ++ * debian/rules: don't force the GCC version for BUILD_CC and BUILD_CXX. ++ ++ [ Pino Toscano ] ++ * Update testsuite-checking/expected-results-i686-gnu-xen and ++ testsuite-checking/expected-results-i686-gnu-i686. ++ * Add patches/hurd-i386/local-ulimit.diff to use Linux' ulimit on hurd-i386 ++ instead of the bogus BSD version. Fix expected-results-i486-gnu-libc, ++ expected-results-i686-gnu-i386, expected-results-i686-gnu-i686, ++ expected-results-i686-gnu-xen accordingly. ++ * debian/testsuite-checking/compare.sh: accept the build directory as an ++ argument. ++ ++ [ Jonathan Nieder ] ++ * 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) ++ ++ -- Adam Conrad Sun, 25 Nov 2012 01:18:07 -0700 ++ ++eglibc (2.16-0experimental0) experimental; urgency=low ++ ++ [ Aurelien Jarno ] ++ * New upstream version. Closes: #672934. ++ - Provide a compatibility symbol for the old memcpy() behaviour. Remove ++ the memcpy-wrapper. Closes: #625522. ++ - Fix printing of incomplete multibyte characters. Closes: #208308. ++ - Disable patches/svn-updates.diff. ++ - Update patches/localedata/sort-UTF8-first.diff. ++ - Update patches/localedata/supported.diff. ++ - Update patches/localedata/locales-fr.diff (partially merged upstream). ++ - Remove patches/localedata/locales_GB.diff (merged upstream). ++ - Remove patches/localedata/submitted-bz9732-dz_BT-collation.diff (merged ++ upstream). ++ - Update patches/localedata/locale-se_NO.diff. ++ - Update patches/localedata/tailor-iso14651_t1-common.diff. ++ - Update patches/localedata/fix-lang.diff. ++ - Remove patches/localedata/fr_LU-first_weekday.diff (merged upstream). ++ - Remove patches/localedata/cy_GB-first_weekday.diff (merged upstream). ++ - Update patches/localedata/submitted-bz9725-locale-sv_SE.diff (partially ++ merged upstream). ++ - Update patches/localedata/first_weekday.diff (partially merged ++ upstream). ++ - Remove patches/localedata/submitted-bz9912-locale-ru_UA.diff (merged ++ upstream). ++ - Remove patches/localedata/locale-et_EE.diff (merged upstream). ++ - Remove patches/localedata/submitted-translit-colon.diff (merged upstream). ++ - Remove patches/localedata/locale-bem-en_ZA.diff (merged upstream). ++ - Remove patches/localedata/locale-ff_SN.diff (merged upstream). ++ - Remove patches/localedata/locale-sw.diff (merged upstream). ++ - Remove patches/localedata/locale-sv_FI.diff (merged upstream). ++ - Remove patches/localedata/locale-os_RU.diff (merged upstream). ++ - Remove patches/localedata/cvs-rupee.diff (merged upstream). ++ - Remove patches/localedata/cvs-es-lc_numeric.diff (merged upstream). ++ - Remove patches/localedata/submitted-de_AT-mon.diff (merged upstream). ++ - Remove patches/localedata/cvs-rupeesign.diff (merged upstream). ++ - Remove patches/alpha/cvs-fp_control-plt.diff (merged upstream). ++ - Remove patches/alpha/cvs-have_tls_thread.diff (merged upstream). ++ - Remove patches/alpha/cvs-preconfigure.diff (merged upstream). ++ - Remove patches/alpha/cvs-stat_ver_linux.diff (merged upstream). ++ - Remove patches/alpha/cvs-syscall.diff (merged upstream). ++ - Remove patches/alpha/cvs-tls_dtv_unallocated.diff (merged upstrea). ++ - Remove obsolete parts of alpha/local-string-functions.diff (merged ++ upstream). ++ - Remove patches/alpha/submitted-creat64.diff (obsolete). ++ - Remove patches/alpha/submitted-fcntl_h.diff (merged upstream). ++ - Remove patches/alpha/submitted-fxstatat.patch (obsolete). ++ - Remove patches/alpha/submitted-libm-hidden.diff (merged upstream). ++ - Remove patches/alpha/submitted-____longjmp_chk.diff (merged upstream). ++ - Remove patches/alpha/submitted-epoll_create1.diff (obsolete). ++ - Remove patches/alpha/submitted-fallocated.patch (merged upstream). ++ - Remove patches/alpha/submitted-fpu-ulps.diff (merged upstream). ++ - Remove patches/alpha/submitted-rlimit-rttime.diff (merged upstream). ++ - Remove patches/alpha/submitted-sysconf-cache.diff (merged upstream). ++ - Remove patches/alpha/cvs-stackinfo.diff (merged upstream). ++ - Remove patches/alpha/submitted-statfs64.patch (merged upstream). ++ - Remove patches/amd64/local-clone.diff (obsolete). ++ - Remove patches/amd64/submitted-tst-audit6-avx.diff (obsolete). ++ - Update patches/amd64/submitted-rwlock-stack-imbalance.diff. ++ - Remove patches/amd64/cvs-getcontext.diff (merged upstream). ++ - Remove patches/amd64/cvs-memset.diff (merged upstream). ++ - Remove patches/amd64/cvs-powl.diff (merged upstream). ++ - Remove patches/amd64/cvs-pthread-stack-alignment.diff (merged upstream). ++ - Remove patches/amd64/cvs-avx-detection.diff (merged upstream). ++ - Remove patches/amd64/cvs-dl_trampoline-cfi.diff (merged upstream). ++ - Remove patches/amd64/cvs-avx-osxsave.diff (merged upstream). ++ - Update patches/arm/local-sigaction.diff. ++ - Remove patches/arm/submitted-armhf-triplet.diff (merged upstream). ++ - Remove patches/arm/cvs-clone-cantunwind.diff (merged upstream). ++ - Remove patches/arm/cvs-syscall-mcount.diff (merged upstream). ++ - Remove patches/arm/cvs-ucontext.diff (merged upstream). ++ - Remove patches/arm/cvs-make-get-set-swap-context.diff (merged upstream). ++ - Remove patches/hppa/local-linuxthreads.diff (obsolete). ++ - Remove patches/hppa/local-linuxthreads-gscope.diff (obsolete). ++ - Remove patches/hppa/submitted-lt.diff (obsolete). ++ - Update patches/hppa/local-stack-grows-up.diff. ++ - Remove patches/hppa/local-dlfptr.diff (merged upstream). ++ - Remove patches/hppa/submitted-fcntl_h.diff (merged upstream). ++ - Remove patches/hppa/submitted-libm-hidden.diff (merged upstream). ++ - Remove patches/hppa/submitted-stackinfo.diff (merged upstream). ++ - Remove patches/hppa/cvs-sys_procfs_h.diff (merged upstream). ++ - Remove patches/hppa/cvs-test-tls-support.diff (merged upstream). ++ - Remove patches/hppa/cvs-cloexec-nonblock.diff (merged upstream). ++ - Remove patches/hppa/cvs-prlimit64.diff (merged upstream). ++ - Update patches/hurd-i386/local-enable-ldconfig.diff. ++ - Remove patches/hurd-i386/cvs-mlock.diff (merged upstream). ++ - Update patches/hurd-i386/unsubmitted-tls.diff. ++ - Update patches/hurd-i386/tg-tls.diff. ++ - Update patches/hurd-i386/unsubmitted-gcc-4.1-init-first.diff. ++ - Remove patches/hurd-i386/cvs-posix_opt.h.diff (merged upstream). ++ - Remove patches/hurd-i386/cvs-ioctl-decode-argument.diff (merged ++ upstream). ++ - Remove patches/hurd-i386/tg-libc_once.diff (merged upstream). ++ - Remove patches/hurd-i386/cvs-struct_stat.diff (merged upstream). ++ - Remove patches/hurd-i386/cvs-strtoul_PLT.diff (merged upstream). ++ - Update patches/hurd-i386/tg-sysvshm.diff. ++ - Remove patches/hurd-i386/cvs-IPV6_PKTINFO.diff (merged upstream). ++ - Remove patches/hurd-i386/cvs-critical-sections.diff (merged ++ upstream). ++ - Remove patches/hurd-i386/cvs-dup3.diff (merged upstream). ++ - Remove patches/hurd-i386/cvs-dup3-lock.diff (merged upstream). ++ - Remove patches/hurd-i386/cvs-dl-sysdep.c_SHARED.diff (merged upstream). ++ - Remove patches/hurd-i386/cvs-itimer-lock.diff (merged upstream). ++ - Remove patches/hurd-i386/cvs-null-pathname.diff (merged upstream). ++ - Remove patches/hurd-i386/cvs-sbrk.diff (merged upstream). ++ - Remove patches/hurd-i386/cvs-readlinkat.diff (merged upstream). ++ - Remove patches/hurd-i386/cvs-SOL_IP.diff (merged upstream). ++ - Remove patches/hurd-i386/cvs-____longjmp_chk.diff (merged upstream). ++ - Remove patches/hurd-i386/cvs-mkdir_root.diff (merged upstream). ++ - Remove patches/hurd-i386/cvs-catch-signal.diff (merged upstream) ++ - Remove patches/hurd-i386/cvs-header-prot.diff (merged upstream). ++ - Remove patches/hurd-i386/cvs-psiginfo.diff (merged upstream). ++ - Remove patches/hurd-i386/cvs-if_freereq.diff (merged upstream). ++ - Remove patches/hurd-i386/cvs-ldsodefs.h.diff (merged upstream). ++ - Remove patches/hurd-i386/submitted-init-first.diff (merged upstream). ++ - Remove patches/hurd-i386/cvs-libc_stack_end.diff (merged upstream). ++ - Remove patches/hurd-i386/tg-ttyname_ERANGE.diff (merged upstream). ++ - Remove patches/hurd-i386/cvs-DEV_BSIZE.diff (merged upstream). ++ - Remove patches/hurd-i386/cvs-fork_ports.diff (merged upstream). ++ - Remove patches/hurd-i386/cvs-setresid.diff (merged upstream). ++ - Remove patches/hurd-i386/cvs-sgttyb.diff (merged upstream). ++ - Remove patches/hurd-i386/cvs-hurd_socket_server_indexcheck.diff (merged ++ upstream). ++ - Remove patches/hurd-i386/cvs-hurd-recvfrom.diff (merged upstream). ++ - Remove patches/hurd-i386/cvs-select-inputcheck.diff (merged upstream). ++ - Remove patches/hurd-i386/cvs-posix2008.diff (merged upstream). ++ - Remove patches/hurd-i386/cvs-mach-nanosleep.diff (merged upstream). ++ - Remove patches/hurd-i386/cvs-mmap.diff (merged upstream). ++ - Remove patches/hurd-i386/cvs-hurd-socket-EAFNOSUPPORT.diff (merged ++ upstream). ++ - Remove patches/hurd-i386/cvs-symlink_dealloc.diff (merged upstream). ++ - Remove patches/hurd-i386/cvs-O_CLOEXEC.diff (merged upstream). ++ - Update patches/hurd-i386/submitted-exec_filename.diff. ++ - Update patches/hurd-i386/submitted-net.diff. ++ - Update patches/hurd-i386/unsubmitted-pthread.diff. ++ - Update patches/ia64/local-dlfptr.diff (ia64 moved to ports). ++ - Update patches/ia64/submitted-libm.diff (ia64 moved to ports). ++ - Remove patches/ia64/submitted-sysconf.diff (merged upstream). ++ - Update patches/ia64/submitted-fpu-ulps.diff (merged upstream). ++ - Update patches/ia64/submitted-remainder.diff (merged upstream). ++ - Remove patches/i386/local-clone.diff (obsolete). ++ - Remove patches/i386/cvs-cacheinfo.diff (merged upstream). ++ - Update patches/i386/submitted-i686-timing.diff. ++ - Remove patches/i386/cvs-feraiseexcept-plt.diff (merged upstream). ++ - Update patches/i386/local-pthread_cond_wait.diff. ++ - Update patches/kfreebsd/local-scripts.diff. ++ - Remove patches/m68k/cvs-byteswap.diff (merged uptream). ++ - Remove patches/m68k/local-compat.diff (obsolete). ++ - Update patches/m68k/submitted-gcc34-seccomment.diff. ++ - Update patches/mips/local-r10k.diff. ++ - Remove patches/mips/submitted-dl-platform.diff (merged upstream). ++ - Remove patches/mips/cvs-dlopen-lazy.diff (merged upstream). ++ - Remove patches/powerpc/local-libgcc_eh-ld.so.diff (obsolete). ++ - Remove patches/s390/cvs-iconv-z9-109.diff (merged upstream). ++ - Remove patches/s390/cvs-vsyscalls.diff (merged upstream). ++ - Remove patches/s390/s390/cvs-libm-ulps.diff (merged upstream). ++ - Remove patches/sparc/submitted-bzero.diff (merged upstream). ++ - Remove patches/sparc/cvs-ifunc.diff (merged upstream). ++ - Remove patches/sparc/cvs-rlimits.diff (merged upstream). ++ - Update patches/sparc/local-fork.diff. ++ - Remove patches/sparc/cvs-fcntl_h.diff (merged upstream). ++ - Update patches/any/local-fhs-nscd.diff. ++ - Update patches/any/local-ldconfig.diff. ++ - Update patches/any/local-libgcc-compat-ports.diff. ++ - Update patches/any/local-linuxthreads-defines.diff. ++ - Remove patches/any/cvs-sched_h.diff (merged upstream). ++ - Update patches/any/submitted-popen.diff. ++ - Remove patches/any/submitted-autotools.diff (merged upstream). ++ - Remove patches/any/submitted-localedef-mmap.diff (obsolete). ++ - Remove patches/any/submitted-leading-zero-stack-guard.diff (merged ++ upstream). ++ - Remove patches/any/local-relro-mprotect.diff (merged upstream). ++ - Remove patches/any/cvs-fopen.diff (merged upstream). ++ - Remove patches/any/cvs-resolv-tld.diff (merged upstream). ++ - Remove patches/any/cvs-sys-param-ARG_MAX.diff (merged upstream). ++ - Remove patches/any/submitted-at-pagesize.diff (obsolete). ++ - Remove patches/any/cvs-setlocale.diff (merged upstream). ++ - Remove parts of patches/any/submitted-rlimit-rttime.diff and rename ++ it to patches/alpha/any/submitted-rlimit-rttime.diff. ++ - Remove patches/any/cvs-regex-oom.diff (merged upstream). ++ - Remove patches/any/cvs-getaddrinfo-single-lookup.diff (merged upstream). ++ - Remove patches/any/cvs-unique_sym_table-corruptions.diff (merged ++ upstream). ++ - Remove patches/any/submitted-mqueue-throw.diff (merged upstream). ++ - Remove patches/any/cvs-addmntent.diff (merge upstream). ++ - Remove patches/any/cvs-resolv-different-nameserver.diff (merged upstream). ++ - Remove patches/any/cvs-fnmatch.diff (merged upstream). ++ - Remove patches/any/cvs-ifunc.diff (merged upstream). ++ - Remove patches/powerpc/submitted-ifunc.diff (merged upstream). ++ - Remove patches/any/cvs-dlopen-tls.diff (merged upstream). ++ - Remove patches/any/submitted-glob_h-ifdef.diff (obsolete). ++ - Remove patches/any/cvs-dl_close-scope-handling.diff (merged upstream). ++ - Remove patches/any/cvs-nptl-pthread-race.diff (merged upstream). ++ - Remove patches/any/cvs-vfscanf.diff (merged upstream). ++ - Remove patches/any/cvs-tzfile.diff (merged upstream). ++ - Rename patches/any/submitted-clock-settime.diff into ++ patches/any/cvs-clock-settime.diff. ++ - Update patches/any/local-no-pagesize.diff. ++ - Update patches/any/local-rtld.diff. ++ - Update patches/any/local-disable-test-tgmath2.diff. ++ - Remove patches/any/cvs-clock-settime.diff. ++ - Update patches/any/submitted-longdouble.diff. ++ - Update patches/any/submitted-bits-fcntl_h-at.diff. ++ - Remove patches/any/submitted-fwrite-wur.diff (merged upstream). ++ - Remove patches/any/submitted-stack-guard-quick-randomization.diff ++ (obsolete). ++ - Remove patches/any/cvs-fmtmsg-lock.diff (merged upstream). ++ - Remove patches/any/cvs-reloc-sort.diff (merged upstream). ++ - Remove patches/any/cvs-pthread-builtin-expect.diff (merged upstream). ++ - Remove patches/any/cvs-vfprintf-positional.diff (merged upstream). ++ - Remove patches/any/cvs-vfprintf-many-format-strings.diff (merged ++ upstream). ++ - Remove patches/any/cvs-arch-lowlevellock.diff (merged upstream). ++ - Remove patches/any/cvs-strtod-overflow.diff (merged upstream). ++ * Add patches/any/local-revert-fclose-posix2008.diff to fix issues with ++ Ruby. ++ * Add patches/amd64/local-pthread_cond_wait.diff from Jeff Law to fix ++ lost wakeups in pthread_cond_wait. ++ * Add patches/i386/cvs-feraiseexcept-plt.diff to fix plt issues. ++ * Add patches/ia64/submitted-fpu-ulps.diff to fix FPU tests. ++ * Add patches/ia64/submitted-remainder.diff to fix FPU tests. ++ * Add patches/powerpc/local-math-logb.diff to workaround a GCC issue. ++ * Add patches/alpha/cvs-tls_dtv_unallocated.diff, ++ patches/alpha/cvs-have_tls_thread.diff, ++ patches/alpha cvs-preconfigure.diff and ++ patches/alpha/cvs-stat_ver_linux.diff to fix FTBFS on alpha. ++ * Add patches/alpha/cvs-fp_control-plt.diff to fix testsuite on alpha. ++ * Add patches/alpha/local-string-functions.diff to remove some broken ++ alpha specific string version, and pass the testsuite. ++ * Update debian/sysdeps/mips.mk, debian/sysdeps/mipsel.mk to force ++ build without MIPS PLT. ++ * Build with GCC 4.6. Closes: bug#654744. ++ * Remove rpcinfo from debian/control.in/main, debhelper.in/libc-bin.install ++ and debhelper.in/libc-bin.manpages. ++ * Update debian/libc6.symbols.common to add libnss_db symbols. ++ * Update debian/symbols.wildcards with 2.14, 2.15 and 2.16 symbols. ++ * Update debian/shlibver to 2.16. ++ * Update debian/debhelper.in/*.lintian to new library names. ++ * Update testsuite-checking/expected-results-arm-linux-gnueabi-libc, ++ testsuite-checking/expected-results-arm-linux-gnueabihf-libc, ++ testsuite-checking/expected-results-i486-linux-gnu-libc, ++ testsuite-checking/expected-results-i686-linux-gnu-i386, ++ testsuite-checking/expected-results-i686-linux-gnu-i686, ++ testsuite-checking/expected-results-i686-linux-gnu-xen ++ testsuite-checking/expected-results-ia64-linux-gnu-libc, ++ testsuite-checking/expected-results-mips-linux-gnu-libc, ++ testsuite-checking/expected-results-mips64-linux-gnu-mips64, ++ testsuite-checking/expected-results-mips32-linux-gnu-mipsn32, ++ testsuite-checking/expected-results-mipsel-linux-gnu-libc, ++ testsuite-checking/expected-results-mips32el-linux-gnu-mipsn32, ++ testsuite-checking/expected-results-mips64el-linux-gnu-mipsn64, ++ testsuite-checking/expected-results-powerpc-linux-gnu-libc, ++ testsuite-checking/expected-results-powerpc64-linux-gnu-ppc64, ++ testsuite-checking/expected-results-sparc-linux-gnu-libc, ++ testsuite-checking/expected-results-sparc64-linux-gnu-libc, ++ testsuite-checking/expected-results-sparc64-linux-gnu-sparc64, ++ testsuite-checking/expected-results-s390x-linux-gnu-libc, ++ testsuite-checking/expected-results-s390x-linux-gnu-s390x, ++ testsuite-checking/expected-results-x86_64-linux-gnu-amd64 and ++ testsuite-checking/expected-results-x86_64-linux-gnu-libc to add ++ new tests that are known to fail. ++ * debian/control.in/main: Build-Conflicts with binutils-gold. ++ * debian/rules.d/quilt.mk, debian/rules.d/tarball.mk, debian/source/format: ++ switch to quilt (3.0) format, compress source with xz. ++ * debian/rules, debian/rules.d/build.mk: define vardbddir to /var/lib/misc. ++ * debian/rules.d/*mk: use make ifdef instead of shell ones. ++ * debian/rules.d/build.mk: call configure with --enable-obsolete-rpc ++ * debian/rules.d/debhelper.mk: compress locales, libc6-pic and libc6-prof ++ with xz. ++ * debian/sysdeps/i386.mk: install files from libc6-dev-amd64 as symlinks ++ now that i386 and amd64 versions are compatible (see bug#637000 and ++ bug#637141). ++ * debian/sysdeps/*.mk, debhelper.in/libc.preinst: bump minimal Linux ++ kernel version to 2.6.32. ++ * debian/debhelper.in/{libc.docs,libc-dev.docs}: don't install FAQ, replaced ++ upstream by http://sourceware.org/glibc/wiki/FAQ. ++ * rules.d/debhelper.mk, debhelper.in/libc-pic.install: install libc6-pic ++ files using debhelper. ++ * debian/control.in/*: drop build-depends from libc6 to libc-bin. Add ++ ${shlibs:Depends} depends to libc6 and libc-bin. ++ * debian/control.in/*, debian/sysdeps/linux.mk: enable selinux support. ++ * patches/any/local-disable-libnss-db.diff: disable libnss-db as the format ++ is not compatible with the libnss-db package, and is architecture ++ dependent. ++ * patches/svn-updates.diff: update from upstream SVN. ++ ++ [ Daniel Schepler ] ++ * Add x32 support (Closes: #667023): ++ - debian/control.in/main: Build-Depend on g++-4.7-multilib on amd64, ++ i386, x32. ++ - debian/control.in/libc: Add Replaces: libc6-x32 to libc6 on x32. ++ - debian/control.in/amd64, debian/control.in/i386: Add x32 to ++ Architecture list for libc6-amd64 and libc6-i386 (and corresponding ++ -dev packages). ++ - debian/control.in/x32: New file, add libc6-x32 and libc6-dev-x32 ++ packages on amd64 and i386. ++ - debian/libc6.symbols.x32, debian/libc6-x32.symbols.amd64, ++ debian/libc6-x32.symbols.i386: New symbols files for x32 libraries. ++ - debian/libc6-amd64.symbols.x32, debian/libc6-i386.symbols.x32: ++ New files, copying the appropriate existing files. ++ - debian/patches/any/cvs-malloc-arena.diff: Fix for BZ#14562 which ++ caused random assertions in threaded programs on x32. ++ - debian/rules.d/build.mk, debian/rules.d/debhelper.mk: Add /libx32 to ++ the library directories handled by alt templates instead of otherbuild. ++ - debian/rules.d/control.mk: Add x32 to libc6_archs. ++ - debian/sysdeps/amd64.mk, debian/sysdeps/i386.mk: Add libc6-x32 builds ++ using gcc-4.7. ++ - debian/sysdeps/amd64.mk, debian/sysdeps/i386.mk: Bump minimum kernel ++ version to 3.4.0, since that's the first version with x32 support ++ integrated into the mainline. ++ - debian/sysdeps/x32.mk: New file, building libc, amd64, i386 flavors ++ all using gcc-4.7. ++ - debian/testsuite-checking/expected-results-x86_64-linux-gnux32-libc, ++ debian/testsuite-checking/expected-results-x86_64-linux-gnux32-x32: ++ New files copied from amd64 testsuite exceptions. ++ * debian/debhelper.in/libc-bin.install: Add new binaries pldd and sotruss. ++ - debian/debhelper.in/libc.install: Also add audit libraries needed by ++ sotruss. ++ * debian/patches/all/local-remove-manual.texi: Update stub manual/Makefile ++ with version from eglibc 2.16 upstream. ++ * debian/rules.d/quilt.mk: Update refresh target to pop all patches before ++ repushing and refreshing them, since patches are applied by default now. ++ * debian/rules: Expand clean target to remove several autogenerated files ++ under debian/ that weren't getting removed. ++ ++ [ Wookey ] ++ * Add arm64 support (Closes: #690873): ++ - debian/patches/all/unsubmitted-autoconfupdate.diff: Update autotools ++ config.sub and config.guess to detect aarch64/arm64 correctly ++ - debian/patches/arm64/submitted-aarch64-support.diff: Massive backport ++ of the current state of arm64 support upstream and on libc-alpha. ++ - debian/patches/arm64/submitted-bits-fcntl_h-at.diff: Include AT_* ++ definitions in sysdeps/unix/sysv/linux/aarch64/bits/fcntl.h ++ - debian/sysdeps/arm64.mk: Define base arm64 libc targets. ++ - debian/rules.d/control.mk: Add arm64 to the list of libc_arches. ++ - debian/control.in/main: Build-depend on gcc-4.7 for arm64 builds. ++ * debian/rules: Clean up base/cross compiler mangling to work sanely. ++ * debian/sysdeps/linux.mk: Define bootstrap BUILD_PROFILE without selinux. ++ ++ [ Adam Conrad ] ++ * debian/debhelper.in/{libc-bin.install,libc-dev-bin.install}: install ++ sotruss binary to libc-dev-bin instead of libc-bin. ++ * debian/sysdeps/{i386,amd64,x32}.mk: Don't set MIN_KERNEL_SUPPORTED ++ explicitly, as this will cause serious upgrade headaches, and there's ++ no guarantee that a 3.4.0 kernel actually has x32 support built in. ++ * debian/control.in/main: Bump the linux-libc-dev build-dep to (>= 3.4) ++ on all linux-any architectures, not just amd64, i386, and x32. ++ * debian/debhelper.in/libc-bin.manpages: Add a pldd(1) manpage. ++ * Drop patches/any/cvs-malloc-arena.diff, included in our new upstream. ++ * debian/sysdeps/{i386,amd64}.mk: Comment out x32 multilib builds until ++ we've reached a consensus about bootstrapping this into the archive. ++ * Version gcc-4.7 build-deps to get a version that works for eglibc. ++ * debian/sysdeps/*: clean up use of CC and CXX to match wookey's fixes. ++ * debian/control.in/libc: Update nscd/locales breaks to (<< 2.16) ++ * debian/rules: Unset CFLAGS and friends and use the package versions. ++ * Move ldconfig to ldconfig.real, install ldconfig wrapper, and set up ++ a dpkg trigger for libc-bin to avoid excessive calls to ldconfig ++ * Don't build nscd during when doing a bootstrap DEB_BUILD_PROFILE ++ * Make our DEB_BUILD_PROFILE=bootstrap support look more like Ubuntu's ++ previously known-working DEB_STAGE=stage1 support for the time being. ++ * debian/rules.d/build.mk: If WITH_SYSROOT is passed to debian/rules, ++ then pass --with-headers=$(WITH_SYSROOT)/$(includedir) to the build. ++ * Sync support for armel/armhf biarch packages, but keep it disabled. ++ * Adjust libc.posinst and libc.preinst service restart code for 2.16. ++ * Merge regression/progression test suite improvements from Ubuntu. ++ * Provide backward compatibility for DEB_STAGE->DEB_BUILD_PROFILE. ++ * patches/arm/local-vfp-sysdeps.diff: Force the Tag_ABI_HardFP_use ++ and Tag_ABI_VFP_args EABI tags when building for armhf, so compilers ++ only linking crti.o will generate what appear to be armhf binaries. ++ * debian/patches/arm/cvs-ldconfig-cache-abi.diff: Backport upstream ++ patch to re-enable ldconfig cache tagging for armhf binaries again. ++ * debian/patches/arm64/cvs-ldconfig-cache-abi.diff: Same for aarch64. ++ * 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. ++ ++ [ Matthias Klose ] ++ * Add patches/any/local-revert-bz13979.diff: revert a commit that made ++ attempts to build with FORTIFIED_SOURCE issue warnings if GCC didn't ++ have optimisations turned on. This breaks some unclever AC macros. ++ * Fix building x32 multilib libraries, by correctly passing -mx32. ++ * Fix some ln calls in sysdeps/{amd64,i386} for binary-arch idempotence. ++ ++ [ Pino Toscano ] ++ * Update patches/hurd-i386/submitted-AF_LINK.diff. ++ * Add patches/hurd-i386/tg-verify.h.diff, ++ patches/hurd-i386/tg-pagesize.diff, ++ patches/hurd-i386/tg-fcntl-internal.h.diff, ++ patches/hurd-i386/local-disable-sendmmsg.diff, ++ patches/hurd-i386/cvs-add-missing-includes.diff, ++ and patches/hurd-i386/submitted-libpthread-elf.diff to fix build on Hurd. ++ * Drop obsolete patches patches/hurd-i386/tg-__i686_defined.diff and ++ patches/hurd-i386/unsubmitted-gcc-4.1-init-first.diff ++ * Add patches/hurd-i386/cvs-mach-check-local-headers.sh.diff to ++ reduce false header errors from the check-local-headers.out test. ++ * Add patches/hurd-i386/cvs-llistxattr.diff, ++ patches/hurd-i386/cvs-renameat.diff and ++ patches/hurd-i386/cvs-lremovexattr.diff to implement llistxattr, ++ lremovexattr and renameat. ++ Add patches/hurd-i386/cvs-mknodat.diff to fix tst-mknodat. ++ * Update testsuite-checking/expected-results-i686-gnu-i386, ++ testsuite-checking/expected-results-i686-gnu-xen, ++ testsuite-checking/expected-results-i486-gnu-libc and ++ testsuite-checking/expected-results-i686-gnu-i686. ++ ++ -- Aurelien Jarno Tue, 20 Nov 2012 08:48:56 +0100 ++ ++eglibc (2.13-39) UNRELEASED; urgency=low ++ ++ [ Samuel Thibault ] ++ * patches/hurd-i386/unsubmitted-setitimer_fix.diff: Finish fixing setitimer. ++ * patches/hurd-i386/unsubmitted-select-EINTR.diff: Fix select vs signals. ++ * patches/hurd-i386/cvs-libpthread_lock.diff: Fix file lock primitives ++ version to fix stdio thread-safety. ++ * patches/hurd-i386/tg-pie-sbrk.diff: Fix sbrk() use in PIE binaries (e.g. ++ libgc, perl). ++ * patches/hurd-i386/libpthread_cancellation.diff: New patch, fixes ++ cancellations. ++ * patches/hurd-i386/libpthread_hurd_cond_timedwait.diff: New patch, introduces ++ pthread_hurd_cond_timedwait_np needed to fix select with zero timeout in ++ Hurd servers. ++ ++ [ Adam Conrad ] ++ * debian/testsuite-checking/compare.sh: Disable failing the build on test ++ regressions to ease the pain of ongoing stable/security maintenance. ++ * debian/debhelper.in/libc.preinst: Remove ld.so's aux-cache on upgrades. ++ ++ [ 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. ++ ++ -- Adam Conrad Sun, 30 Dec 2012 10:22:43 -0700 ++ ++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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 ++ . 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 ++ on arm. Closes: #652844. ++ * Update French debconf translation, by Christian Perrier. Closes: ++ #652860. ++ ++ -- Aurelien Jarno 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 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 and explain how to get ++ it. Closes: #644990. ++ * Add patches/alpha/submitted-fallocated.diff to define fallocate() in ++ 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 . Closes: #631867. ++ * Drop kfreebsd/local-ftw.diff, needed only for pre 8.0 kernels. ++ ++ -- Aurelien Jarno 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 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 . 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/ for multiarch and ldconfig leaves ++ /lib/ld-linux.so.N pointing at an old glibc. Closes: #629534. ++ ++ -- Aurelien Jarno 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 . 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/.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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 ++ 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 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 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 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 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 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 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 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 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 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 to . 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 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 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 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 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 . 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 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 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 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 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 one 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 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 Mon, 31 Aug 2009 07:05:00 +0200 ++ ++eglibc (2.9-25) unstable; urgency=low ++ ++ * Remove Ben Collins 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 ++ 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 ++ from 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 ++ and include , 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 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 . ++ * patches/hurd-i386/local-unlockpt-chroot.diff: new patch to fix ptys in ++ chroots. ++ ++ -- Aurelien Jarno 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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--2.4.tar.bz2 add-on unpacks ++ into either or glibc--2.4, in which case it is renamed ++ into . ++ ++ [ 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 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 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 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 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 ++ 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 . (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 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 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 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 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 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 . ++ - 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 ++ 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 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 Fri, 14 Oct 2005 14:18:22 -0400 ++ ++glibc (2.3.5-6) unstable; urgency=low ++ ++ * GOTO Masanori ++ ++ * debian/script.in/kernelcheck.sh: Use sed instead of bash extension. ++ (Closes: #325373, #325471, #325504, #325511) ++ ++ -- GOTO Masanori Mon, 29 Aug 2005 12:40:32 +0900 ++ ++glibc (2.3.5-5) unstable; urgency=low ++ ++ * GOTO Masanori ++ ++ * 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 . ++ - 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 : ++ - debian/patches/glibc235-gcc4-hurd.dpatch: New file, to build glibc ++ on Hurd with gcc-4.0. (Closes: #324549) ++ ++ -- GOTO Masanori 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 ++ ++ * d-i wants to remove libnss-files-udeb and libnss-dns-udeb dependency ++ from libc-udeb. Suggested by Joey Hess . ++ (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 . ++ - 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 . ++ ++ * Add Depends: lib64gcc1 and provide lib64c-dev for 64bit -dev packages. ++ Suggested by Matthias Klose . (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 : ++ - debian/debhelper.in/glibc-doc.install: Install HTML documents ++ correctly. (Closes: #321740) ++ ++ -- GOTO Masanori 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 ++ ++ * Localedata update: ++ - debian/patches/cvs-localedata.dpatch: New file, to update localedata ++ to the latest cvs. Reported by Safir Secerovic , ++ Reviewed by Denis Barbier . (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 : ++ - 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 ++ (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 . ++ (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 . ++ (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 : ++ - 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 : ++ - 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 : ++ - 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 : ++ - 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 : ++ - 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 Sun, 17 Jul 2005 17:27:30 +0900 ++ ++glibc (2.3.5-2) experimental; urgency=low ++ ++ * Debconf5 release. ++ ++ * GOTO Masanori ++ ++ * 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 . ++ (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 ++ . ++ - debian/sysdeps/depflags.pl: Add conflicts initrd-tools (<< 0.1.79). ++ ++ * Add support PowerPC64, based on patches and suggestions by Bastian Blank ++ and Jeff Bailey : ++ - 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 ++ . (Closes: #313404) ++ ++ * A Costa . (Closes: #305662, #305666) ++ - debian/local/manpages/tzconfig.8: Fixed typo. ++ - debian/local/manpages/ldconfig.8: Likewise. ++ ++ * Clytie Siddall : ++ - debian/po/vi.po: Add the Vietnamese translation for locales. ++ (Closes: #309618, 311793) ++ ++ * Jens Seidel : ++ - debian/po/de.po: Fix typo. (Closes: #314084) ++ ++ -- GOTO Masanori Thu, 21 Apr 2005 16:52:36 +0900 ++ ++glibc (2.3.5-1) experimental; urgency=low ++ ++ * GOTO Masanori ++ ++ * 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 Sun, 10 Apr 2005 14:02:19 +0900 ++ ++glibc (2.3.4-3) experimental; urgency=low ++ ++ * GOTO Masanori ++ ++ * 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 Tue, 29 Mar 2005 17:22:25 +0900 ++ ++glibc (2.3.4-2) experimental; urgency=low ++ ++ * GOTO Masanori ++ ++ * 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 Tue, 22 Mar 2005 11:17:32 +0900 ++ ++glibc (2.3.4-1) experimental; urgency=low ++ ++ * GOTO Masanori ++ ++ * 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 . ++ ++ -- GOTO Masanori Fri, 18 Mar 2005 09:41:49 +0900 ++ ++glibc (2.3.2.ds1-22) unstable; urgency=medium ++ ++ * Daniel Jacobowitz ++ ++ - 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 Tue, 10 May 2005 15:11:53 -0400 ++ ++glibc (2.3.2.ds1-21) unstable; urgency=high ++ ++ * GOTO Masanori ++ ++ - 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 . (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 . ++ (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 : ++ - 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 : ++ - 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 : ++ - 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 : ++ - debian/local/manpages/iconv.1: Escape hyphens for Unicode ++ environments. (Closes: #292013) ++ - Emilian Nowak : ++ - debian/po/pl.po: Add Polish debconf translation. (Closes: #294444) ++ - Matti Polla : ++ - debian/po/fi.po: Add Finnish debconf translation. (Closes: #303816) ++ - Khalid Aziz : ++ - debian/patches/glibc232-clock_settime.dpatch: Fix clock_settime ++ always fails with EINVAL. (Closes: #304668) ++ - Thiemo Seufer : ++ - 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 Mon, 14 Feb 2005 09:26:26 +0900 ++ ++glibc (2.3.2.ds1-20) unstable; urgency=high ++ ++ * GOTO Masanori ++ ++ - debian/patches/hppa-drop-utimes.dpatch: Fix sudo breakage because ++ system call utimes() is not defined on hppa. Patched by Randolph Chung ++ . (Closes: #284449) ++ ++ - Fix ia64 unwind FTBFS. Patched by Matthias Klose : ++ - 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 . (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 ++ . (Closes: #284137) ++ ++ -- GOTO Masanori Wed, 15 Dec 2004 19:44:47 +0900 ++ ++glibc (2.3.2.ds1-19) unstable; urgency=high ++ ++ * GOTO Masanori ++ ++ - 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 . (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 . ++ - 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 . (Closes: #281993) ++ - debian/patches/glibc232-ia64-unwindinfo.dpatch: Add to work ++ ia64 unwind info and libunwind properly. Requested by David Mosberger ++ . (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 ++ . ++ - 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 and Matthias Klose ++ . (Closes: #275997, #283461) ++ ++ -- GOTO Masanori Sat, 6 Nov 2004 19:04:26 +0900 ++ ++glibc (2.3.2.ds1-18) unstable; urgency=high ++ ++ * GOTO Masanori ++ ++ - 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 Tue, 5 Oct 2004 09:32:01 +0900 ++ ++glibc (2.3.2.ds1-17) unstable; urgency=high ++ ++ * GOTO Masanori ++ ++ - 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 Thu, 19 Aug 2004 12:39:35 +0900 ++ ++glibc (2.3.2.ds1-16) unstable; urgency=high ++ ++ * GOTO Masanori ++ ++ - 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 ++ ++ - debian/debhelper.in/libc-dev.install.hurd-i386: Don't install ++ getconf. ++ ++ -- GOTO Masanori Mon, 2 Aug 2004 11:53:54 +0900 ++ ++glibc (2.3.2.ds1-15) unstable; urgency=high ++ ++ * Jeff Bailey ++ ++ - 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 Sun, 1 Aug 2004 08:50:13 -0400 ++ ++glibc (2.3.2.ds1-14) unstable; urgency=low ++ ++ * GOTO Masanori ++ ++ - 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 . ++ (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 . (Closes: #257840) ++ - debian/patches/locale-sr_CS.dpatch: Add sr_CS and sr_CS@cyrillic. ++ Patched by Christian Perrier . 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 ++ . ++ (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 ++ . (Closes: #251732) ++ ++ - debian/debhelper.in/libc.postinst: Add apache-ssl and apache-perl to ++ restart script. Suggested by Daniel Jacobowitz . ++ (Closes: #208997) ++ - debian/debhelper.in/libc.postinst: Add vsftpd to restart script. ++ Suggested by Jeff Bailey . (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 . (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 ++ ++ - 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 ++ ++ - 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 Mon, 31 May 2004 23:43:29 +0900 ++ ++glibc (2.3.2.ds1-13) unstable; urgency=low ++ ++ * Jeff Bailey ++ ++ - 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 ++ ++ - 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 . (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 ++ . (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 ++ ++ - 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 Wed, 26 May 2004 00:18:06 +0900 ++ ++glibc (2.3.2.ds1-12) unstable; urgency=low ++ ++ * GOTO Masanori ++ ++ - 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 ++ . (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 . ++ (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 and Patched by ++ Carlos O'Donell . (Closes: #228375) ++ - debian/patches/glibc232-ppc32-nanosecond.dpatch: Fix ppc32 stat ++ reports bogus nanosecond data. Patched by Anton Blanchard ++ . (Closes: #231358) ++ - debian/patches/nptl-io-locking.dpatch: Add stdio performance ++ improvement for nptl. Dpatched by Michael Clark ++ . (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 ++ . ++ - 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 . ++ (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 . Related bug #243183 ++ is currently suspended. ++ - debian/patches/locale-et_EE.dpatch: Fix et_EE locale incorrect charset. ++ Patched by Petter Reinholdtsen . (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 . ++ (Closes: #230669) ++ - debian/po/cs.po: added. Patched by Miroslav Kure ++ . (Closes: #230969) ++ - debian/po/el.po: added. Patched by Konstantinos Margaritis ++ . (Closes: #230997) ++ - debian/po/ru.po: added. Patched by Ilgiz Kalmetev ++ . (Closes: #221657) ++ - debian/po/uk.po: added. Patched by Eugeniy Meshcheryakov ++ . (Closes: #235850) ++ - debian/po/zh_CN.po: added. Patched by Hiei Xu ++ and Carlos Z.F. Liu . (Closes: #231907) ++ - debian/po/tr.po: added. Patched by Ercin EKER ++ and Recai Oktas . (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 ++ . (Closes: #207199) ++ ++ * Jeff Bailey ++ ++ - 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 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 ++ ++ - 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 ++ ++ - Added and enabled a sparc v9b target (UltraSPARC III). ++ ++ * Bastian Blank ++ ++ - 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 Wed, 21 Apr 2004 00:40:55 +0900 ++ ++glibc (2.3.2.ds1-11) unstable; urgency=low ++ ++ * Jeff Bailey ++ ++ - 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 ++ ++ - Require linux-kernel-headers >= 2.5.999-test7-bk-9 to avoid module- ++ related problems on ARM. ++ ++ * Ben Collins ++ ++ - Bump sparcv9 back to -mcpu=v8 -mtune=ultrasparc. Should fix sparcv9. ++ ++ * Daniel Jacobowitz ++ ++ - 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 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 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 ++ ++ - 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 . (Closes: #219839) ++ - debian/po/nl.po: Update nl debconf template translation. ++ Patched by cobaco . (Closes: #220693) ++ ++ * Carlos O'Donell ++ ++ - 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 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 ++ ++ - debian/control.in/opt: Add more ix86 CPUs in the description. ++ - debian/debhelper.in/libc.preinst: Ignore old libc4/5. ++ (Closes: #218449) ++ ++ * Daniel Jacobowitz ++ ++ - 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 ++ ++ 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 ++ ++ - debian/patches/arm-ioperm.dpatch: Third time lucky? ++ ++ -- Jeff Bailey Wed, 5 Nov 2003 10:53:14 -0500 ++ ++glibc (2.3.2.ds1-9) unstable; urgency=low ++ ++ * GOTO Masanori ++ ++ - debian/po/es.po: Update. Patched by Carlos Valdivia Yagüe ++ . ++ - 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 ++ ++ - 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 Sat, 1 Nov 2003 18:54:16 -0500 ++ ++glibc (2.3.2.ds1-8) unstable; urgency=low ++ ++ * Daniel Jacobowitz ++ ++ - 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 ++ (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 ++ ++ - 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 ++ ++ - 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 Tue, 28 Oct 2003 18:29:09 -0500 ++ ++glibc (2.3.2.ds1-7) experimental; urgency=low ++ ++ * Daniel Jacobowitz ++ ++ - 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 ++ ++ - debian/patches/arm-ioperm.dpatch: Try again. ++ ++ * Jeff Bailey ++ ++ Welcome back HPPA, Thanks to Carlos O'Donell ++ ++ - 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 ++ ++ - 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 ++ ++ - debian/po/ru.po: Update. Patched by Ilgiz Kalmetev ++ . (Closes: #214349) ++ ++ -- Daniel Jacobowitz Sat, 25 Oct 2003 15:09:02 -0400 ++ ++glibc (2.3.2.ds1-6) experimental; urgency=low ++ ++ * Phil Blundell ++ ++ - debian/patches/arm-ioperm.dpatch: New. ++ ++ * Daniel Jacobowitz ++ ++ - Add debhelper build dependency. ++ - Use linux-kernel-headers package for headers. ++ - Add S/390 support. ++ - Build libc6-dev-sparc64. ++ ++ -- Daniel Jacobowitz Mon, 20 Oct 2003 16:27:39 -0400 ++ ++glibc (2.3.2.ds1-5) experimental; urgency=low ++ ++ * Daniel Jacobowitz ++ ++ - Fix a thinko in i686 timing patch for non-HP_TIMING architectures. ++ - Add -k to make check. ++ ++ -- Daniel Jacobowitz Mon, 13 Oct 2003 10:53:31 -0400 ++ ++glibc (2.3.2.ds1-4) experimental; urgency=low ++ ++ * Daniel Jacobowitz ++ ++ - 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 ++ ++ - Build libraries for sparcv9 and sparc64. ++ - Enable TLS for ia64. ++ ++ -- Daniel Jacobowitz Sun, 12 Oct 2003 19:42:11 -0400 ++ ++glibc (2.3.2.ds1-3) experimental; urgency=low ++ ++ * Daniel Jacobowitz ++ ++ - 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 Mon, 6 Oct 2003 21:18:28 -0400 ++ ++glibc (2.3.2.ds1-2) experimental; urgency=low ++ ++ * Daniel Jacobowitz ++ ++ - 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 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 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 ++ ++ - 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 . (Closes: #212080) ++ ++ - debian/manpages/iconv.1: Fix typo in -o option. Patched by ++ Max Vozeler . (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 . ++ (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 . ++ ++ - debian/patches/80_glibc232-locales-nb_NO-fix.dpatch: Added to fix ++ nb_NO as real locale, not an alias. Patched by Petter Reinholdtsen ++ . (Closes: #206474) ++ ++ * Jeff Bailey : ++ ++ - 20_glibc232-hppa-full-2003-10-20.dpatch: New HPPA patch. ++ (Closes: #209253) Thanks to Carlos O'Donell ++ ++ - 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 Wed, 22 Oct 2003 13:46:39 -0400 ++ ++glibc (2.3.2-8) unstable; urgency=low ++ ++ * Phil Blundell ++ ++ - 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 ++ ++ - 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 . (Closes: #210301) ++ ++ -- Philip Blundell Wed, 17 Sep 2003 20:44:48 +0100 ++ ++glibc (2.3.2-7) unstable; urgency=medium ++ ++ * GOTO Masanori ++ ++ - debian/patches/90_glibc232-mathinline_iso.dpatch: Fix inline math ++ function complaints with gcc -pedantic -ffast-math. Patched by ++ Thomas Richter . (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 ++ ++ - 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 Fri, 12 Sep 2003 14:56:19 -0400 ++ ++glibc (2.3.2-6) unstable; urgency=low ++ ++ * Phil Blundell ++ ++ - debian/control.in/main: require kernel-headers-2.4.20-m68k (>= ++ 2.4.20-1) for m68k. Requested by Adam Conrad . ++ ++ - 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 ++ ++ - debian/sysdeps/kfreebsd-gnu.mk: Added to support kfreebsd-gnu. ++ Patched by Robert Millan . (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 Mon, 8 Sep 2003 08:51:49 +0100 ++ ++glibc (2.3.2-5) unstable; urgency=low ++ ++ * Phil Blundell ++ ++ - 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 ++ ++ - 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 . ++ (Closes: #194637) ++ ++ - debian/sysdeps/freebsd.mk: Modified config-os from freebsd-gnu ++ to kfreebsd-gnu. Patched by Robert Millan . ++ (Closes: #206663) ++ ++ - debian/patches/80_glibc232-iconvdata-fix.dpatch: Fix cp932 ++ does not work. (Closes: #205679) ++ ++ -- Philip Blundell Tue, 26 Aug 2003 22:51:03 +0100 ++ ++glibc (2.3.2-4) unstable; urgency=low ++ ++ * Jeff Bailey ++ - debian/locales/DEBIAN/postinst: Use tail -n 1 instead of tail -1. ++ Thanks to Jurij Smakov (Closes: #206464) ++ ++ * Phil Blundell ++ - 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 ++ ++ - debian/po/es.po: Updated Spanish (es) debconf template. ++ Patched by Carlos Valdivia Yagüe . ++ - debian/patches/81_glibc232-utimes-fix.dpatch: Fix utimes wrong time ++ calculation. Patched by Paul Eggert . ++ (Closes: #204728, #202243, #205110) ++ ++ -- Philip Blundell Tue, 26 Aug 2003 17:27:00 +0100 ++ ++glibc (2.3.2-3) unstable; urgency=low ++ ++ * GOTO Masanori ++ ++ - debian/patches/80_glibc232-futimes-buildfix.dpatch: Fix build failure ++ on arm, mips, mipsel, due to be missing #include . ++ (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 . ++ (Closes: #195873) ++ - debian/po/nl.po: Added nl.po debconf template. Patched by ++ Bart Cornelis . (Closes: #205090) ++ ++ -- GOTO Masanori 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 ++ ++ - debian/patches/glibc23-arm-waitpid.dpatch: Fix arm ld-linux failure due ++ to sys_waitpid missing. Patched by Philip Blundell . ++ - debian/patches/50_glibc232-arm-dwarf2-buildfix.dpatch: Avoid arm dwarf2 ++ build failure. Patched by Philip Blundell . ++ - debian/patches/50_glibc232-m68k-dwarf2-buildfix.dpatch: Avoid m68k ++ dwarf2 build failure. Suggested by Philip Blundell , ++ Andreas Schwab . ++ - 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 ++ - debian/packages.d/s390x.mk: Remove gcc-3.2 hardcode ++ ++ * Phil Blundell ++ - 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 Sat, 19 Jul 2003 00:37:11 +0900 ++ ++glibc (2.3.2-1) experimental; urgency=low ++ ++ ** UPLOADING THIS TO EXPERIMENTAL ** ++ ++ * Clint Adams ++ - 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 ++ - 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 ++ - Updated glibc 2.3.2. ++ - debian/patches/cvs.dpatch: rename it to 10_cvs.dpatch. ++ I plan to introduce <2digitnumber>_.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/ 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/ 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/ 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// 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 . ++ - 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 . ++ - 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 . ++ - 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 ++ - 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 ++ . Some suggestions by Joey Hess . ++ - 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 . ++ (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 . ++ ++ - 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 . ++ ++ - 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/ 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 , ++ Thiemo Seufer . ++ ++ - 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 . (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 . ++ ++ - debian/patches/sparc32-buildfix.dpatch: added to fix sparc32 build. ++ ++ * Ben Collins ++ - 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 Tue, 15 Jul 2003 14:35:58 -0400 ++ ++glibc (2.3.1-17) unstable; urgency=low ++ ++ * GOTO Masanori ++ - 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 Sat, 19 Apr 2003 22:01:40 +0900 ++ ++glibc (2.3.1-16) unstable; urgency=high ++ ++ * GOTO Masanori ++ - 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/ 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 Tue, 18 Mar 2003 00:04:13 +0900 ++ ++glibc (2.3.1-15) unstable; urgency=low ++ ++ * GOTO Masanori ++ - 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 (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 . ++ - 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 . (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 . ++ - 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 . ++ - debian/patches/libgcc-compat-all.dpatch: update for mips and add ++ for alpha, patched by Guido Guenther . ++ - debian/patches/libgcc-compat-other.dpatch: add for arm, m68k, ia64 ++ and s390. Patched by GOTO Masanori . ++ ++ - 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 ++ . 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 . ++ His summary: Malloc alignment has been moved back to 8 for optimal ++ performance. ++ ++ - These debian/patches/ 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 " 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 Wed, 26 Feb 2003 18:44:08 +0900 ++ ++glibc (2.3.1-14) unstable; urgency=low ++ ++ * GOTO Masanori ++ - 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 . ++ (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 Fri, 21 Feb 2003 09:19:45 +0900 ++ ++glibc (2.3.1-13) unstable; urgency=low ++ ++ * GOTO Masanori ++ - 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 Wed, 19 Feb 2003 09:26:17 +0900 ++ ++glibc (2.3.1-12) unstable; urgency=low ++ ++ * GOTO Masanori ++ - 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 ++ (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 ++ . (Closes: #179781, #180330) ++ - debian/locales/DEBIAN/{postinst,templates,config}: Fix default ++ environment variable "Leave alone" does not affect its meaning. ++ (Closes: #180040) ++ * Daniel Jacobowitz ++ - debian/libc/etc/init.d/devpts.sh: Update devpts.sh to work with the ++ new grep package (Closes: #181409). ++ ++ -- GOTO Masanori Sat, 8 Feb 2003 22:08:59 +0900 ++ ++glibc (2.3.1-11) unstable; urgency=low ++ ++ * GOTO Masanori ++ - 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 . ++ - 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 Wed, 22 Jan 2003 22:17:45 +0900 ++ ++glibc (2.3.1-10) unstable; urgency=low ++ ++ * The "trudging the sludge" release. ++ ++ * GOTO Masanori ++ - 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 . (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 ++ - debian/patches/alpha-pic.dpatch: Fix errno reporting from syscalls ++ on Alpha (Closes: #175511). ++ ++ -- GOTO Masanori Sun, 5 Jan 2003 09:13:22 +0900 ++ ++glibc (2.3.1-9) unstable; urgency=low ++ ++ * Daniel Jacobowitz ++ - 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 ++ - 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 . (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 Thu, 2 Jan 2003 12:02:13 -0500 ++ ++glibc (2.3.1-8) unstable; urgency=high ++ ++ * Daniel Jacobowitz ++ - 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 Tue, 24 Dec 2002 12:35:39 -0500 ++ ++glibc (2.3.1-7) unstable; urgency=high ++ ++ * The "Climb Ev'ry Mountain" release. ++ ++ * GOTO Masanori ++ - 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 ++ - sysdeps/linux.mk: Finish disabling sparc64. ++ ++ -- GOTO Masanori 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 ++ - 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 ++ - 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 ++ - 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 ++ 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 Mon, 2 Dec 2002 17:26:38 -0500 ++ ++glibc (2.3.1-5) unstable; urgency=low ++ ++ * This is the "Leonids" release. ++ ++ * Jeff Bailey ++ - 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 Mon, 18 Nov 2002 23:12:47 -0500 ++ ++glibc (2.3.1-4) unstable; urgency=low ++ ++ * Daniel Jacobowitz ++ - 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 ++ - 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 ++ - 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 Tue, 29 Oct 2002 13:14:51 -0500 ++ ++glibc (2.3.1-3) unstable; urgency=low ++ ++ * GOTO Masanori ++ - 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 . ++ - 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 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 ++ - 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 ++ - 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 Fri, 18 Oct 2002 11:27:07 -0400 ++ ++glibc (2.3.1-1) unstable; urgency=low ++ ++ * This is the "twilight" release... ++ ++ * Jeff Bailey ++ - 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 ++ - 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 ++ - 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 ++ - 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 ++ ++ - 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 ++ - 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 . ++ - debian/patches/glibc22-hppa-fcntl-lfs.dpatch: added, patched by ++ Randolph Chung . Closes: #160846 ++ ++ * Ben Collins ++ - 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 ++ - 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 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 ++ - 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 . Closes: #157374 ++ ++ * XXX Below here was during the 2.2.5 development, and never released. ++ ++ * GOTO Masanori ++ - 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 and ++ Franz Sirl . ++ Closes: #155606 ++ ++ -- Jeff Bailey 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 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 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 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 Tue, 10 Sep 2002 22:35:48 -0700 ++ ++glibc (2.2.5-14) unstable; urgency=low ++ ++ * GOTO Masanori ++ - 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 . ++ - debian/patches/malloc-security.dpatch: Applied malloc security patch ++ Patched by Wolfram Gloger . ++ - debian/patches/alpha-build-failure.dpatch: Fix alpha build failure. ++ ++ -- GOTO Masanori 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 ++ - applied patches/locale-de_CH. ++ - debian/control: fix my uploader address due to my obsolete gpg key. ++ - debian/copyright: update copyright year. ++ ++ * Jeff Bailey ++ - 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 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 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 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 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 Sat, 13 Jul 2002 10:08:51 -0400 ++ ++glibc (2.2.5-8) testing-security unstable; urgency=low ++ ++ * Resolver security bug fix. ++ ++ -- Ben Collins 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 ++ * 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 ++ * 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 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 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 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 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 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 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 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 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 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 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 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 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 ++ , 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 ++ , closes: #87903 ++ * Added eo_EO locale by Robert Thomson ++ * 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 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 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 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 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 ++ * 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 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 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 . 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 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 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 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 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 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 ++ , 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 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 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 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 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 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 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 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 ++ , 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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/ now resembles $(tmpdir) tree for . ++ * 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 ) ++ (db2 patch slightly modified) ++ * Add debian/patches/powerpc-plt.dpatch: ++ 1999-10-07 Geoffrey Keating ++ * 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 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 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 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 and David S. Miller . ++ ++ -- Joel Klecker 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 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//* for control archive items. ++ Adjust debian/rules for this. ++ * Add setperms target to set modes of debian//*. ++ 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 ". ++ * 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 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 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 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 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 ++ ++ * sysdeps/generic/getenv.c (getenv): Fix lookup for single ++ character variable on bigendian platforms without unaligned memory ++ access. ++ ++ -- Joel Klecker 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- -> build//foo). ++ Use bz2 tarballs. ++ ++ * debian/patches/sparc-linux-types.dpatch: Remove, applied upstream. ++ ++ * devpts.sh never used any bashisms (closes:Bug#43296). ++ ++ -- Joel Klecker 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 ++ ++ * 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 ++ - (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 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 Mon, 17 May 1999 19:29:12 -0700 ++ ++glibc (2.1.1-5) unstable; urgency=low ++ ++ * CVS as of 1999-05-08. ++ ++ -- Joel Klecker Sat, 8 May 1999 19:31:52 -0700 ++ ++glibc (2.1.1-4) unstable; urgency=low ++ ++ * Fix logic errors in tzconfig. ++ ++ -- Joel Klecker 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 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 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 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 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 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 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 Fri, 12 Mar 1999 22:33:01 -0800 ++ ++glibc (2.1.1-0pre1.1) unstable; urgency=low ++ ++ * Fix $(libc) replaces on i386. ++ ++ -- Joel Klecker 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 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 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 Mon, 8 Feb 1999 03:22:27 -0800 ++ ++glibc (2.1-2) unstable; urgency=low ++ ++ * Get shlibs file dependencies correct. ++ ++ -- Joel Klecker 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 Sat, 6 Feb 1999 12:26:10 -0800 ++ diff --cc debian/changelog.upstream index 000000000,000000000..8209ba3a1 new file mode 100644 --- /dev/null +++ b/debian/changelog.upstream @@@ -1,0 -1,0 +1,3 @@@ ++The upstream changelog being composed of multiple files with a total size ++of more than 3MB, they are provided by the glibc-doc package in the ++/usr/share/doc/glibc-doc/ directory. diff --cc debian/compat index 000000000,000000000..f599e28b8 new file mode 100644 --- /dev/null +++ b/debian/compat @@@ -1,0 -1,0 +1,1 @@@ ++10 diff --cc debian/control index 000000000,000000000..6db420858 new file mode 100644 --- /dev/null +++ b/debian/control @@@ -1,0 -1,0 +1,811 @@@ ++Source: glibc ++Section: libs ++Priority: required ++Build-Depends: gettext, dpkg (>= 1.18.7), dpkg-dev (>= 1.17.14), xz-utils, file, quilt, ++ autoconf, gawk, debhelper (>= 10), rdfind, symlinks, netbase, gperf, bison, ++ linux-libc-dev (>= 3.9) [linux-any], ++ libaudit-dev [linux-any], libcap-dev [linux-any], libselinux-dev [linux-any] , ++ mig-for-host (>= 1.5-3) [hurd-i386], gnumach-dev (>= 2:1.8+git20200710-2~) [hurd-i386], ++ hurd-dev (>= 1:0.9.git20201127-4~) [hurd-i386] | hurd-headers-dev [hurd-i386], ++ kfreebsd-kernel-headers [kfreebsd-any], ++ binutils (>= 2.29), ++ g++-10, g++-10-multilib [amd64 i386 kfreebsd-amd64 mips mipsel mipsn32 mipsn32el mips64 mips64el mipsr6 mipsr6el mipsn32r6 mipsn32r6el mips64r6 mips64r6el powerpc ppc64 s390x sparc sparc64 x32] , ++ gcc-10 (>= 10-20200431) [arm64], ++ gcc-10 (>= 10.1.0-3) [hurd-i386], ++ python3:native, ++ libidn2-0 (>= 2.0.5~) , ++ libc-bin (>= 2.31) , ++ libgd-dev , ++Build-Depends-Indep: perl, po-debconf (>= 1.0) ++Maintainer: GNU Libc Maintainers ++Uploaders: Clint Adams , Aurelien Jarno , Adam Conrad , Samuel Thibault ++Standards-Version: 4.2.1 ++Vcs-Browser: https://salsa.debian.org/glibc-team/glibc ++Vcs-Git: https://salsa.debian.org/glibc-team/glibc.git ++Homepage: https://www.gnu.org/software/libc/libc.html ++ ++Package: libc-bin ++Architecture: any ++Section: libs ++Priority: required ++Essential: yes ++Multi-Arch: foreign ++Depends: ${shlibs:Depends}, ${misc:Depends} ++Recommends: manpages ++Build-Profiles: ++Description: 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 ++ * 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, manpages-dev, libc-devtools (>> 2.31) ++Build-Profiles: ++Description: GNU C Library: Development binaries ++ This package contains utility programs related to the GNU C Library ++ development package. ++ . ++ * gencat: generate message catalogs ++ * rpcgen: compile RPC protocols to C ++ ++Package: libc-devtools ++Architecture: any ++Section: devel ++Priority: optional ++Multi-Arch: foreign ++Depends: ${shlibs:Depends}, ${misc:Depends} ++Breaks: libc-dev-bin (<< 2.31-8) ++Replaces: libc-dev-bin (<< 2.31-8) ++Recommends: manpages, manpages-dev ++Build-Profiles: ++Description: GNU C Library: Development tools ++ This package contains development tools shipped by the GNU C ++ Library. ++ . ++ * memusage, memusagestat: profile a program's memory usage ++ * mtrace: interpret the malloc trace log ++ * sotruss: trace shared library calls ++ * sprof: display shared object profiling data ++ ++Package: libc-l10n ++Architecture: all ++Section: localization ++Priority: standard ++Multi-Arch: foreign ++Depends: ${misc:Depends} ++Build-Profiles: ++Description: GNU C Library: localization files ++ This package contains the translation files for the GNU C library and ++ utility programs. ++ ++Package: glibc-doc ++Architecture: all ++Section: doc ++Priority: optional ++Multi-Arch: foreign ++Depends: ${misc:Depends} ++Suggests: glibc-doc-reference ++Build-Profiles: ++Description: 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: glibc-source ++Architecture: all ++Section: devel ++Priority: optional ++Multi-Arch: foreign ++Depends: ${misc:Depends} ++Recommends: xz-utils ++Breaks: cross-toolchain-base (<< 45~), cross-toolchain-base-ports (<< 37~), cross-toolchain-base-mipsen (<< 10) ++Build-Profiles: ++Description: GNU C Library: sources ++ This package contains the sources and patches which are needed to ++ build glibc. ++ ++Package: locales ++Architecture: all ++Section: localization ++Priority: standard ++Depends: libc-bin (>> 2.31), libc-l10n (>> 2.31), ${misc:Depends}, debconf | debconf-2.0 ++Build-Profiles: ++Description: 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 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: optional ++Multi-Arch: foreign ++Depends: libc-l10n (>> 2.31), ${misc:Depends} ++Build-Profiles: ++Description: 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: lsb-base (>= 3.0-6), ${shlibs:Depends}, ${misc:Depends} ++Build-Profiles: ++Description: 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: libc6 ++Architecture: amd64 arm64 armel armhf hppa i386 m68k mips mipsel mipsn32 mipsn32el mips64 mips64el mipsr6 mipsr6el mipsn32r6 mipsn32r6el mips64r6 mips64r6el nios2 powerpc ppc64 ppc64el riscv64 sparc sparc64 s390x sh3 sh4 x32 ++Section: libs ++Priority: optional ++Multi-Arch: same ++Depends: ${shlibs:Depends}, ${libgcc:Depends}, ${libcrypt:Depends} ++Recommends: libidn2-0 (>= 2.0.5~), libnss-nis, libnss-nisplus ++Suggests: glibc-doc, debconf | debconf-2.0, libc-l10n, locales [!hurd-i386] ++Provides: libc6-sparcv9b [sparc sparc64], libc0.1-i686 [kfreebsd-i386], libc0.3-i686 [hurd-i386], libc6-i686 [i386] ++Conflicts: libc0.1-i686 [kfreebsd-i386], libc6-i686 [i386] ++Breaks: nscd (<< 2.31), locales (<< 2.31), locales-all (<< 2.31), hurd (<< 1:0.9.git20170910-1), libtirpc1 (<< 0.2.3), r-cran-later (<< 0.7.5+dfsg-2), nocache (<< 1.1-1~), iraf-fitsutil (<< 2018.07.06-4), wcc (<< 0.0.2+dfsg-3), openssh-server (<< 1:8.1p1-5), macs (<< 2.2.7.1-3~), openarena (<< 0.8.8+dfsg-4~), ioquake3 (<< 1.36+u20200211.f2c61c1~dfsg-2~), libgegl-0.4-0 (<< 0.4.18), busybox (<< 1.30.1-6), libgegl-0.4-0 (<< 0.4.18) ++Replaces: libc6-amd64 [amd64], ++ libc6-i386 [i386], ++ libc0.1-i686 [kfreebsd-i386], ++ libc0.3-i686 [hurd-i386], ++ libc6-i686 [i386], ++ libc6-x32 [x32], ++ libc0.1-i386 [kfreebsd-i386], ++ libc6-powerpc [powerpc], ++ libc6-ppc64 [ppc64], ++ libc6-s390x [s390x], ++ libc6-sparc64 [sparc64], ++ libc6-mips64 [mips64 mips64el], ++ libc6-mipsn32 [mipsn32 mipsn32el], ++ libc6-mips32 [mips mipsel], ++ hurd (<< 20120408-3) [hurd-i386] ++Build-Profiles: ++Description: 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 arm64 armel armhf hppa i386 m68k mips mipsel mipsn32 mipsn32el mips64 mips64el mipsr6 mipsr6el mipsn32r6 mipsn32r6el mips64r6 mips64r6el nios2 powerpc ppc64 ppc64el riscv64 sparc sparc64 s390x sh3 sh4 x32 ++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] | hurd-headers-dev [hurd-i386], ${libcrypt-dev:Depends}, ${libnsl-dev:Depends} ++Replaces: hurd-dev (<< 20120408-3) [hurd-i386], kfreebsd-kernel-headers (<< 10.3~4) [kfreebsd-amd64 kfreebsd-i386] ++Suggests: glibc-doc, manpages-dev ++Provides: libc-dev, libc6-dev [alpha ia64 hurd-i386 kfreebsd-i386 kfreebsd-amd64] ++Breaks: check (<< 0.9.10-6.1+b1) [s390x], kfreebsd-kernel-headers (<< 10.3~4) [kfreebsd-amd64 kfreebsd-i386], libperl5.26 (<< 5.26.1-3), ${libc-dev:Breaks}, python3.7 (<< 3.7.7-1+b1), python3.8 (<< 3.8.2-1+b1), libgcc-7-dev (<< 7.5.0-6~), libgcc-8-dev (<< 8.4.0-2~), libgcc-9-dev (<< 9.3.0-5~), libgcc-10-dev (<< 10-20200321-1~) ++Conflicts: libc6.1-dev, libc0.1-dev, libc0.3-dev, ++Description: 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 arm64 armel armhf hppa i386 m68k mips mipsel mipsn32 mipsn32el mips64 mips64el mipsr6 mipsr6el mipsn32r6 mipsn32r6el mips64r6 mips64r6el nios2 powerpc ppc64 ppc64el riscv64 sparc sparc64 s390x sh3 sh4 x32 ++Section: debug ++Priority: optional ++Multi-Arch: same ++Provides: libc-dbg, libc6-dbgsym ++Depends: libc6 (= ${binary:Version}), ${misc:Depends} ++Build-Profiles: ++Description: GNU C Library: detached debugging symbols ++ This package contains the detached debugging symbols for the GNU C ++ library. ++ ++Package: libc6-udeb ++Package-Type: udeb ++Architecture: amd64 arm64 armel armhf hppa i386 m68k mips mipsel mipsn32 mipsn32el mips64 mips64el mipsr6 mipsr6el mipsn32r6 mipsn32r6el mips64r6 mips64r6el nios2 powerpc ppc64 ppc64el riscv64 sparc sparc64 s390x sh3 sh4 x32 ++Section: debian-installer ++Priority: optional ++Depends: libcrypt1-udeb ++Provides: libc6, libc-udeb, libnss-dns-udeb, libnss-files-udeb, ${locale-compat:Depends} ++Build-Profiles: ++Description: 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: optional ++Multi-Arch: same ++Depends: ${shlibs:Depends}, ${libgcc:Depends}, ${libcrypt:Depends} ++Recommends: libidn2-0 (>= 2.0.5~), libnss-nis, libnss-nisplus ++Suggests: glibc-doc, debconf | debconf-2.0, libc-l10n, locales [!hurd-i386] ++Provides: libc6-sparcv9b [sparc sparc64], libc0.1-i686 [kfreebsd-i386], libc0.3-i686 [hurd-i386], libc6-i686 [i386] ++Conflicts: libc0.1-i686 [kfreebsd-i386], libc6-i686 [i386] ++Breaks: nscd (<< 2.31), locales (<< 2.31), locales-all (<< 2.31), hurd (<< 1:0.9.git20170910-1), libtirpc1 (<< 0.2.3), r-cran-later (<< 0.7.5+dfsg-2), nocache (<< 1.1-1~), iraf-fitsutil (<< 2018.07.06-4), wcc (<< 0.0.2+dfsg-3), openssh-server (<< 1:8.1p1-5), macs (<< 2.2.7.1-3~), openarena (<< 0.8.8+dfsg-4~), ioquake3 (<< 1.36+u20200211.f2c61c1~dfsg-2~), libgegl-0.4-0 (<< 0.4.18), busybox (<< 1.30.1-6), libgegl-0.4-0 (<< 0.4.18) ++Replaces: libc6-amd64 [amd64], ++ libc6-i386 [i386], ++ libc0.1-i686 [kfreebsd-i386], ++ libc0.3-i686 [hurd-i386], ++ libc6-i686 [i386], ++ libc6-x32 [x32], ++ libc0.1-i386 [kfreebsd-i386], ++ libc6-powerpc [powerpc], ++ libc6-ppc64 [ppc64], ++ libc6-s390x [s390x], ++ libc6-sparc64 [sparc64], ++ libc6-mips64 [mips64 mips64el], ++ libc6-mipsn32 [mipsn32 mipsn32el], ++ libc6-mips32 [mips mipsel], ++ hurd (<< 20120408-3) [hurd-i386] ++Build-Profiles: ++Description: 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] | hurd-headers-dev [hurd-i386], ${libcrypt-dev:Depends}, ${libnsl-dev:Depends} ++Replaces: hurd-dev (<< 20120408-3) [hurd-i386], kfreebsd-kernel-headers (<< 10.3~4) [kfreebsd-amd64 kfreebsd-i386] ++Suggests: glibc-doc, manpages-dev ++Provides: libc-dev, libc6-dev [alpha ia64 hurd-i386 kfreebsd-i386 kfreebsd-amd64] ++Breaks: check (<< 0.9.10-6.1+b1) [s390x], kfreebsd-kernel-headers (<< 10.3~4) [kfreebsd-amd64 kfreebsd-i386], libperl5.26 (<< 5.26.1-3), ${libc-dev:Breaks}, python3.7 (<< 3.7.7-1+b1), python3.8 (<< 3.8.2-1+b1), libgcc-7-dev (<< 7.5.0-6~), libgcc-8-dev (<< 8.4.0-2~), libgcc-9-dev (<< 9.3.0-5~), libgcc-10-dev (<< 10-20200321-1~) ++Conflicts: libc6-dev, libc0.1-dev, libc0.3-dev, ++Description: 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: optional ++Multi-Arch: same ++Provides: libc-dbg, libc6.1-dbgsym ++Depends: libc6.1 (= ${binary:Version}), ${misc:Depends} ++Build-Profiles: ++Description: GNU C Library: detached debugging symbols ++ This package contains the detached debugging symbols for the GNU C ++ library. ++ ++Package: libc6.1-udeb ++Package-Type: udeb ++Architecture: alpha ia64 ++Section: debian-installer ++Priority: optional ++Depends: libcrypt1-udeb ++Provides: libc6.1, libc-udeb, libnss-dns-udeb, libnss-files-udeb, ${locale-compat:Depends} ++Build-Profiles: ++Description: 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: optional ++Multi-Arch: same ++Depends: ${shlibs:Depends}, ${libgcc:Depends}, ${libcrypt:Depends} ++Recommends: libidn2-0 (>= 2.0.5~), libnss-nis, libnss-nisplus ++Suggests: glibc-doc, debconf | debconf-2.0, libc-l10n, locales [!hurd-i386] ++Provides: libc6-sparcv9b [sparc sparc64], libc0.1-i686 [kfreebsd-i386], libc0.3-i686 [hurd-i386], libc6-i686 [i386] ++Conflicts: libc0.1-i686 [kfreebsd-i386], libc6-i686 [i386] ++Breaks: nscd (<< 2.31), locales (<< 2.31), locales-all (<< 2.31), hurd (<< 1:0.9.git20170910-1), libtirpc1 (<< 0.2.3), r-cran-later (<< 0.7.5+dfsg-2), nocache (<< 1.1-1~), iraf-fitsutil (<< 2018.07.06-4), wcc (<< 0.0.2+dfsg-3), openssh-server (<< 1:8.1p1-5), macs (<< 2.2.7.1-3~), openarena (<< 0.8.8+dfsg-4~), ioquake3 (<< 1.36+u20200211.f2c61c1~dfsg-2~), libgegl-0.4-0 (<< 0.4.18), busybox (<< 1.30.1-6), libgegl-0.4-0 (<< 0.4.18) ++Replaces: libc6-amd64 [amd64], ++ libc6-i386 [i386], ++ libc0.1-i686 [kfreebsd-i386], ++ libc0.3-i686 [hurd-i386], ++ libc6-i686 [i386], ++ libc6-x32 [x32], ++ libc0.1-i386 [kfreebsd-i386], ++ libc6-powerpc [powerpc], ++ libc6-ppc64 [ppc64], ++ libc6-s390x [s390x], ++ libc6-sparc64 [sparc64], ++ libc6-mips64 [mips64 mips64el], ++ libc6-mipsn32 [mipsn32 mipsn32el], ++ libc6-mips32 [mips mipsel], ++ hurd (<< 20120408-3) [hurd-i386] ++Build-Profiles: ++Description: 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] | hurd-headers-dev [hurd-i386], ${libcrypt-dev:Depends}, ${libnsl-dev:Depends} ++Replaces: hurd-dev (<< 20120408-3) [hurd-i386], kfreebsd-kernel-headers (<< 10.3~4) [kfreebsd-amd64 kfreebsd-i386] ++Suggests: glibc-doc, manpages-dev ++Provides: libc-dev, libc6-dev [alpha ia64 hurd-i386 kfreebsd-i386 kfreebsd-amd64] ++Breaks: check (<< 0.9.10-6.1+b1) [s390x], kfreebsd-kernel-headers (<< 10.3~4) [kfreebsd-amd64 kfreebsd-i386], libperl5.26 (<< 5.26.1-3), ${libc-dev:Breaks}, python3.7 (<< 3.7.7-1+b1), python3.8 (<< 3.8.2-1+b1), libgcc-7-dev (<< 7.5.0-6~), libgcc-8-dev (<< 8.4.0-2~), libgcc-9-dev (<< 9.3.0-5~), libgcc-10-dev (<< 10-20200321-1~) ++Conflicts: libc6-dev, libc6.1-dev, libc0.1-dev, ++Description: 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: optional ++Multi-Arch: same ++Provides: libc-dbg, libc0.3-dbgsym ++Depends: libc0.3 (= ${binary:Version}), ${misc:Depends} ++Build-Profiles: ++Description: GNU C Library: detached debugging symbols ++ This package contains the detached debugging symbols for the GNU C ++ library. ++ ++Package: libc0.3-udeb ++Package-Type: udeb ++Architecture: hurd-i386 ++Section: debian-installer ++Priority: optional ++Depends: libcrypt1-udeb ++Provides: libc0.3, libc-udeb, libnss-dns-udeb, libnss-files-udeb, ${locale-compat:Depends} ++Build-Profiles: ++Description: 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: optional ++Multi-Arch: same ++Depends: ${shlibs:Depends}, ${libgcc:Depends}, ${libcrypt:Depends} ++Recommends: libidn2-0 (>= 2.0.5~), libnss-nis, libnss-nisplus ++Suggests: glibc-doc, debconf | debconf-2.0, libc-l10n, locales [!hurd-i386] ++Provides: libc6-sparcv9b [sparc sparc64], libc0.1-i686 [kfreebsd-i386], libc0.3-i686 [hurd-i386], libc6-i686 [i386] ++Conflicts: libc0.1-i686 [kfreebsd-i386], libc6-i686 [i386] ++Breaks: nscd (<< 2.31), locales (<< 2.31), locales-all (<< 2.31), hurd (<< 1:0.9.git20170910-1), libtirpc1 (<< 0.2.3), r-cran-later (<< 0.7.5+dfsg-2), nocache (<< 1.1-1~), iraf-fitsutil (<< 2018.07.06-4), wcc (<< 0.0.2+dfsg-3), openssh-server (<< 1:8.1p1-5), macs (<< 2.2.7.1-3~), openarena (<< 0.8.8+dfsg-4~), ioquake3 (<< 1.36+u20200211.f2c61c1~dfsg-2~), libgegl-0.4-0 (<< 0.4.18), busybox (<< 1.30.1-6), libgegl-0.4-0 (<< 0.4.18) ++Replaces: libc6-amd64 [amd64], ++ libc6-i386 [i386], ++ libc0.1-i686 [kfreebsd-i386], ++ libc0.3-i686 [hurd-i386], ++ libc6-i686 [i386], ++ libc6-x32 [x32], ++ libc0.1-i386 [kfreebsd-i386], ++ libc6-powerpc [powerpc], ++ libc6-ppc64 [ppc64], ++ libc6-s390x [s390x], ++ libc6-sparc64 [sparc64], ++ libc6-mips64 [mips64 mips64el], ++ libc6-mipsn32 [mipsn32 mipsn32el], ++ libc6-mips32 [mips mipsel], ++ hurd (<< 20120408-3) [hurd-i386] ++Build-Profiles: ++Description: 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] | hurd-headers-dev [hurd-i386], ${libcrypt-dev:Depends}, ${libnsl-dev:Depends} ++Replaces: hurd-dev (<< 20120408-3) [hurd-i386], kfreebsd-kernel-headers (<< 10.3~4) [kfreebsd-amd64 kfreebsd-i386] ++Suggests: glibc-doc, manpages-dev ++Provides: libc-dev, libc6-dev [alpha ia64 hurd-i386 kfreebsd-i386 kfreebsd-amd64] ++Breaks: check (<< 0.9.10-6.1+b1) [s390x], kfreebsd-kernel-headers (<< 10.3~4) [kfreebsd-amd64 kfreebsd-i386], libperl5.26 (<< 5.26.1-3), ${libc-dev:Breaks}, python3.7 (<< 3.7.7-1+b1), python3.8 (<< 3.8.2-1+b1), libgcc-7-dev (<< 7.5.0-6~), libgcc-8-dev (<< 8.4.0-2~), libgcc-9-dev (<< 9.3.0-5~), libgcc-10-dev (<< 10-20200321-1~) ++Conflicts: libc6-dev, libc6.1-dev, libc0.3-dev, ++Description: 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: optional ++Multi-Arch: same ++Provides: libc-dbg, libc0.1-dbgsym ++Depends: libc0.1 (= ${binary:Version}), ${misc:Depends} ++Build-Profiles: ++Description: GNU C Library: detached debugging symbols ++ This package contains the detached debugging symbols for the GNU C ++ library. ++ ++Package: libc0.1-udeb ++Package-Type: udeb ++Architecture: kfreebsd-amd64 kfreebsd-i386 ++Section: debian-installer ++Priority: optional ++Depends: libcrypt1-udeb ++Provides: libc0.1, libc-udeb, libnss-dns-udeb, libnss-files-udeb, ${locale-compat:Depends} ++Build-Profiles: ++Description: 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 x32 ++Section: libs ++Priority: optional ++Depends: libc6 (= ${binary:Version}), ${misc:Depends} ++Conflicts: libc0.1-i386, libc6-amd64 [amd64], libc6-amd64:i386 [x32], libc6-i386:amd64 [x32], libc6-i386:x32 [amd64], libc6-mips32, libc6-mips64, libc6-mipsn32, libc6-powerpc, libc6-ppc64, libc6-s390, libc6-sparc, libc6-sparc64, libc6-x32 [x32], libc6-x32:i386 [amd64] ++Replaces: libc6-dev-i386 ++Build-Profiles: ++Description: 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 x32 ++Section: libdevel ++Priority: optional ++Provides: lib32c-dev ++Depends: libc6-i386 (= ${binary:Version}) , libc6-dev (= ${binary:Version}), ${misc:Depends} ++Recommends: gcc-multilib ++Build-Profiles: ++Description: 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-sparc ++Architecture: sparc64 ++Section: libs ++Priority: optional ++Depends: libc6 (= ${binary:Version}), ${misc:Depends} ++Build-Profiles: ++Conflicts: libc0.1-i386, libc6-amd64, libc6-i386, libc6-mips32, libc6-mips64, libc6-mipsn32, libc6-powerpc, libc6-ppc64, libc6-s390, libc6-sparc64, libc6-x32 ++Description: GNU C Library: 32bit Shared libraries for SPARC ++ 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 SPARC systems. ++ ++Package: libc6-dev-sparc ++Architecture: sparc64 ++Section: libdevel ++Priority: optional ++Provides: lib32c-dev ++Depends: libc6-sparc (= ${binary:Version}) , libc6-dev (= ${binary:Version}), ${misc:Depends} ++Recommends: gcc-multilib ++Build-Profiles: ++Description: GNU C Library: 32bit Development Libraries for SPARC ++ 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 SPARC systems. ++ ++Package: libc6-sparc64 ++Architecture: sparc ++Section: libs ++Priority: optional ++Depends: libc6 (= ${binary:Version}), ${misc:Depends} ++Conflicts: libc0.1-i386, libc6-amd64, libc6-i386, libc6-mips32, libc6-mips64, libc6-mipsn32, libc6-powerpc, libc6-ppc64, libc6-s390, libc6-sparc, libc6-x32 ++Build-Profiles: ++Description: 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 ++Depends: libc6-sparc64 (= ${binary:Version}) , libc6-dev (= ${binary:Version}), ${misc:Depends} ++Recommends: gcc-multilib ++Build-Profiles: ++Description: 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} ++Conflicts: libc0.1-i386, libc6-amd64, libc6-i386, libc6-mips32, libc6-mips64, libc6-mipsn32, libc6-powerpc, libc6-ppc64, libc6-sparc, libc6-sparc64, libc6-x32 ++Build-Profiles: ++Description: 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 ++Depends: libc6-s390 (= ${binary:Version}) , libc6-dev (= ${binary:Version}), ${misc:Depends} ++Recommends: gcc-multilib ++Build-Profiles: ++Description: 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-amd64 ++Architecture: i386 x32 ++Section: libs ++Priority: optional ++Depends: libc6 (= ${binary:Version}), ${misc:Depends} ++Conflicts: libc0.1-i386, libc6-amd64:i386 [x32], libc6-amd64:x32 [i386], libc6-i386 [i386], libc6-i386:amd64 [x32], libc6-mips32, libc6-mips64, libc6-mipsn32, libc6-powerpc, libc6-ppc64, libc6-s390, libc6-sparc, libc6-sparc64, libc6-x32 [x32], libc6-x32:amd64 [i386] ++Build-Profiles: ++Description: 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 x32 ++Section: libdevel ++Priority: optional ++Depends: libc6-amd64 (= ${binary:Version}) , libc6-dev (= ${binary:Version}), ${misc:Depends} ++Recommends: gcc-multilib ++Provides: lib64c-dev ++Build-Profiles: ++Description: 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} ++Conflicts: libc0.1-i386, libc6-amd64, libc6-i386, libc6-mips32, libc6-mips64, libc6-mipsn32, libc6-ppc64, libc6-s390, libc6-sparc, libc6-sparc64, libc6-x32 ++Build-Profiles: ++Description: 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 ++Depends: libc6-powerpc (= ${binary:Version}) , libc6-dev (= ${binary:Version}), ${misc:Depends} ++Recommends: gcc-multilib ++Build-Profiles: ++Description: 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} ++Conflicts: libc0.1-i386, libc6-amd64, libc6-i386, libc6-mips32, libc6-mips64, libc6-mipsn32, libc6-powerpc, libc6-s390, libc6-sparc, libc6-sparc64, libc6-x32 ++Build-Profiles: ++Description: 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 ++Depends: libc6-ppc64 (= ${binary:Version}) , libc6-dev (= ${binary:Version}), ${misc:Depends} ++Recommends: gcc-multilib ++Build-Profiles: ++Description: 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-mips32 ++Architecture: mipsn32 mipsn32el mips64 mips64el mipsn32r6 mipsn32r6el mips64r6 mips64r6el ++Section: libs ++Priority: optional ++Depends: libc6 (= ${binary:Version}), ${misc:Depends} ++Conflicts: libc0.1-i386, libc6-amd64, libc6-i386, libc6-mips32:mips64 [mips64el mips64r6 mips64r6el mipsn32 mipsn32el mipsn32r6 mipsn32r6el], libc6-mips32:mips64el [mips64 mips64r6 mips64r6el mipsn32 mipsn32el mipsn32r6 mipsn32r6el], libc6-mips32:mips64r6 [mips64 mips64el mips64r6el mipsn32 mipsn32el mipsn32r6 mipsn32r6el], libc6-mips32:mips64r6el [mips64 mips64el mips64r6 mipsn32 mipsn32el mipsn32r6 mipsn32r6el], libc6-mips32:mipsn32 [mips64 mips64el mips64r6 mips64r6el mipsn32el mipsn32r6 mipsn32r6el], libc6-mips32:mipsn32el [mips64 mips64el mips64r6 mips64r6el mipsn32 mipsn32r6 mipsn32r6el], libc6-mips32:mipsn32r6 [mips64 mips64el mips64r6 mips64r6el mipsn32 mipsn32el mipsn32r6el], libc6-mips32:mipsn32r6el [mips64 mips64el mips64r6 mips64r6el mipsn32 mipsn32el mipsn32r6], libc6-mips64 [mips64 mips64el mips64r6 mips64r6el], libc6-mips64:mips [mipsn32 mipsn32el mipsn32r6 mipsn32r6el], libc6-mips64:mipsel [mipsn32 mipsn32el mipsn32r6 mipsn32r6el], libc6-mips64:mipsn32 [mipsn32el mipsn32r6 mipsn32r6el], libc6-mips64:mipsn32el [mipsn32 mipsn32r6 mipsn32r6el], libc6-mips64:mipsn32r6 [mipsn32 mipsn32el mipsn32r6el], libc6-mips64:mipsn32r6el [mipsn32 mipsn32el mipsn32r6], libc6-mips64:mipsr6 [mipsn32 mipsn32el mipsn32r6 mipsn32r6el], libc6-mips64:mipsr6el [mipsn32 mipsn32el mipsn32r6 mipsn32r6el], libc6-mipsn32 [mipsn32 mipsn32el mipsn32r6 mipsn32r6el], libc6-mipsn32:mips [mips64 mips64el mips64r6 mips64r6el], libc6-mipsn32:mips64 [mips64el mips64r6 mips64r6el], libc6-mipsn32:mips64el [mips64 mips64r6 mips64r6el], libc6-mipsn32:mips64r6 [mips64 mips64el mips64r6el], libc6-mipsn32:mips64r6el [mips64 mips64el mips64r6], libc6-mipsn32:mipsel [mips64 mips64el mips64r6 mips64r6el], libc6-mipsn32:mipsr6 [mips64 mips64el mips64r6 mips64r6el], libc6-mipsn32:mipsr6el [mips64 mips64el mips64r6 mips64r6el], libc6-powerpc, libc6-ppc64, libc6-s390, libc6-sparc, libc6-sparc64, libc6-x32 ++Build-Profiles: ++Description: GNU C Library: o32 Shared libraries for MIPS ++ This package includes shared versions of the standard C library and the ++ standard math library, as well as many others. This is the o32 version ++ of the library, meant for MIPS systems. ++ ++Package: libc6-dev-mips32 ++Architecture: mipsn32 mipsn32el mips64 mips64el mipsn32r6 mipsn32r6el mips64r6 mips64r6el ++Section: libdevel ++Priority: optional ++Provides: lib32c-dev ++Depends: libc6-mips32 (= ${binary:Version}) , libc6-dev (= ${binary:Version}), ++ libc6-dev-mipsn32 (= ${binary:Version}) [mips64 mips64el mips64r6 mips64r6el], ++ libc6-dev-mips64 (= ${binary:Version}) [mipsn32 mipsn32el mipsn32r6 mipsn32r6el], ++ ${misc:Depends} ++Recommends: gcc-multilib ++Build-Profiles: ++Description: GNU C Library: o32 Development Libraries for MIPS ++ Contains the symlinks and object files needed to compile and link programs ++ which use the standard C library. This is the o32 version of the ++ library, meant for MIPS systems. ++ ++Package: libc6-mipsn32 ++Architecture: mips mipsel mips64 mips64el mipsr6 mipsr6el mips64r6 mips64r6el ++Section: libs ++Priority: optional ++Depends: libc6 (= ${binary:Version}), ${misc:Depends} ++Conflicts: libc0.1-i386, libc6-amd64, libc6-i386, libc6-mips32 [mips mipsel mipsr6 mipsr6el], libc6-mips32:mips64 [mips64el mips64r6 mips64r6el], libc6-mips32:mips64el [mips64 mips64r6 mips64r6el], libc6-mips32:mips64r6 [mips64 mips64el mips64r6el], libc6-mips32:mips64r6el [mips64 mips64el mips64r6], libc6-mips32:mipsn32 [mips64 mips64el mips64r6 mips64r6el], libc6-mips32:mipsn32el [mips64 mips64el mips64r6 mips64r6el], libc6-mips32:mipsn32r6 [mips64 mips64el mips64r6 mips64r6el], libc6-mips32:mipsn32r6el [mips64 mips64el mips64r6 mips64r6el], libc6-mips64 [mips64 mips64el mips64r6 mips64r6el], libc6-mips64:mips [mipsel mipsr6 mipsr6el], libc6-mips64:mipsel [mips mipsr6 mipsr6el], libc6-mips64:mipsn32 [mips mipsel mipsr6 mipsr6el], libc6-mips64:mipsn32el [mips mipsel mipsr6 mipsr6el], libc6-mips64:mipsn32r6 [mips mipsel mipsr6 mipsr6el], libc6-mips64:mipsn32r6el [mips mipsel mipsr6 mipsr6el], libc6-mips64:mipsr6 [mips mipsel mipsr6el], libc6-mips64:mipsr6el [mips mipsel mipsr6], libc6-mipsn32:mips [mips64 mips64el mips64r6 mips64r6el mipsel mipsr6 mipsr6el], libc6-mipsn32:mips64 [mips mips64el mips64r6 mips64r6el mipsel mipsr6 mipsr6el], libc6-mipsn32:mips64el [mips mips64 mips64r6 mips64r6el mipsel mipsr6 mipsr6el], libc6-mipsn32:mips64r6 [mips mips64 mips64el mips64r6el mipsel mipsr6 mipsr6el], libc6-mipsn32:mips64r6el [mips mips64 mips64el mips64r6 mipsel mipsr6 mipsr6el], libc6-mipsn32:mipsel [mips mips64 mips64el mips64r6 mips64r6el mipsr6 mipsr6el], libc6-mipsn32:mipsr6 [mips mips64 mips64el mips64r6 mips64r6el mipsel mipsr6el], libc6-mipsn32:mipsr6el [mips mips64 mips64el mips64r6 mips64r6el mipsel mipsr6], libc6-powerpc, libc6-ppc64, libc6-s390, libc6-sparc, libc6-sparc64, libc6-x32 ++Build-Profiles: ++Description: 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 mips64 mips64el mipsr6 mipsr6el mips64r6 mips64r6el ++Section: libdevel ++Priority: optional ++Provides: libn32c-dev ++Depends: libc6-mipsn32 (= ${binary:Version}) , libc6-dev-mips64 (= ${binary:Version}) [mips mipsel mipsr6 mipsr6el], libc6-dev (= ${binary:Version}), ${misc:Depends} ++Recommends: gcc-multilib ++Build-Profiles: ++Description: 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 mipsn32 mipsn32el mipsr6 mipsr6el mipsn32r6 mipsn32r6el ++Section: libs ++Priority: optional ++Depends: libc6 (= ${binary:Version}), ${misc:Depends} ++Conflicts: libc0.1-i386, libc6-amd64, libc6-i386, libc6-mips32 [mips mipsel mipsr6 mipsr6el], libc6-mips32:mips64 [mipsn32 mipsn32el mipsn32r6 mipsn32r6el], libc6-mips32:mips64el [mipsn32 mipsn32el mipsn32r6 mipsn32r6el], libc6-mips32:mips64r6 [mipsn32 mipsn32el mipsn32r6 mipsn32r6el], libc6-mips32:mips64r6el [mipsn32 mipsn32el mipsn32r6 mipsn32r6el], libc6-mips32:mipsn32 [mipsn32el mipsn32r6 mipsn32r6el], libc6-mips32:mipsn32el [mipsn32 mipsn32r6 mipsn32r6el], libc6-mips32:mipsn32r6 [mipsn32 mipsn32el mipsn32r6el], libc6-mips32:mipsn32r6el [mipsn32 mipsn32el mipsn32r6], libc6-mips64:mips [mipsel mipsn32 mipsn32el mipsn32r6 mipsn32r6el mipsr6 mipsr6el], libc6-mips64:mipsel [mips mipsn32 mipsn32el mipsn32r6 mipsn32r6el mipsr6 mipsr6el], libc6-mips64:mipsn32 [mips mipsel mipsn32el mipsn32r6 mipsn32r6el mipsr6 mipsr6el], libc6-mips64:mipsn32el [mips mipsel mipsn32 mipsn32r6 mipsn32r6el mipsr6 mipsr6el], libc6-mips64:mipsn32r6 [mips mipsel mipsn32 mipsn32el mipsn32r6el mipsr6 mipsr6el], libc6-mips64:mipsn32r6el [mips mipsel mipsn32 mipsn32el mipsn32r6 mipsr6 mipsr6el], libc6-mips64:mipsr6 [mips mipsel mipsn32 mipsn32el mipsn32r6 mipsn32r6el mipsr6el], libc6-mips64:mipsr6el [mips mipsel mipsn32 mipsn32el mipsn32r6 mipsn32r6el mipsr6], libc6-mipsn32 [mipsn32 mipsn32el mipsn32r6 mipsn32r6el], libc6-mipsn32:mips [mipsel mipsr6 mipsr6el], libc6-mipsn32:mips64 [mips mipsel mipsr6 mipsr6el], libc6-mipsn32:mips64el [mips mipsel mipsr6 mipsr6el], libc6-mipsn32:mips64r6 [mips mipsel mipsr6 mipsr6el], libc6-mipsn32:mips64r6el [mips mipsel mipsr6 mipsr6el], libc6-mipsn32:mipsel [mips mipsr6 mipsr6el], libc6-mipsn32:mipsr6 [mips mipsel mipsr6el], libc6-mipsn32:mipsr6el [mips mipsel mipsr6], libc6-powerpc, libc6-ppc64, libc6-s390, libc6-sparc, libc6-sparc64, libc6-x32 ++Build-Profiles: ++Description: 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 mipsn32 mipsn32el mipsr6 mipsr6el mipsn32r6 mipsn32r6el ++Section: libdevel ++Priority: optional ++Provides: lib64c-dev ++Depends: libc6-mips64 (= ${binary:Version}) , libc6-dev (= ${binary:Version}), ${misc:Depends} ++Recommends: gcc-multilib ++Build-Profiles: ++Description: 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} ++Conflicts: libc6-amd64, libc6-i386, libc6-mips32, libc6-mips64, libc6-mipsn32, libc6-powerpc, libc6-ppc64, libc6-s390, libc6-sparc, libc6-sparc64, libc6-x32 ++Build-Profiles: ++Description: 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 ++Depends: libc0.1-i386 (= ${binary:Version}) , libc0.1-dev (= ${binary:Version}), ${misc:Depends} ++Recommends: gcc-multilib ++Build-Profiles: ++Description: 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-x32 ++Architecture: amd64 i386 ++Section: libs ++Priority: optional ++Depends: libc6 (= ${binary:Version}), ${misc:Depends} ++Conflicts: libc0.1-i386, libc6-amd64 [amd64], libc6-amd64:x32 [i386], libc6-i386 [i386], libc6-i386:x32 [amd64], libc6-mips32, libc6-mips64, libc6-mipsn32, libc6-powerpc, libc6-ppc64, libc6-s390, libc6-sparc, libc6-sparc64, libc6-x32:amd64 [i386], libc6-x32:i386 [amd64] ++Build-Profiles: ++Description: GNU C Library: X32 ABI 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 X32 ABI version ++ of the library, meant for AMD64 systems. ++ ++Package: libc6-dev-x32 ++Architecture: amd64 i386 ++Section: libdevel ++Priority: optional ++Depends: libc6-x32 (= ${binary:Version}) , libc6-dev-i386 (= ${binary:Version}) [amd64], libc6-dev-amd64 (= ${binary:Version}) [i386], libc6-dev (= ${binary:Version}), ${misc:Depends} ++Recommends: gcc-multilib ++Build-Profiles: ++Description: GNU C Library: X32 ABI 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 X32 ABI version of the ++ library, meant for amd64 systems. ++ ++Package: libc6-xen ++Architecture: i386 ++Section: libs ++Priority: optional ++Multi-Arch: same ++Pre-Depends: libc6 (= ${binary:Version}) ++Depends: ${misc:Depends} ++Build-Profiles: ++Description: 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.3-xen ++Architecture: hurd-i386 ++Section: libs ++Priority: optional ++Multi-Arch: same ++Pre-Depends: libc0.3 (= ${binary:Version}) ++Depends: ${misc:Depends} ++Build-Profiles: ++Description: 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: optional ++Multi-Arch: same ++Pre-Depends: libc6.1 (= ${binary:Version}) ++Depends: ${misc:Depends} ++Build-Profiles: ++Description: 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. ++ diff --cc debian/control.in/amd64 index 000000000,000000000..d3b1f7570 new file mode 100644 --- /dev/null +++ b/debian/control.in/amd64 @@@ -1,0 -1,0 +1,25 @@@ ++Package: libc6-amd64 ++Architecture: i386 x32 ++Section: libs ++Priority: optional ++Depends: libc6 (= ${binary:Version}), ${misc:Depends} ++Conflicts: libc0.1-i386, libc6-amd64:i386 [x32], libc6-amd64:x32 [i386], libc6-i386 [i386], libc6-i386:amd64 [x32], libc6-mips32, libc6-mips64, libc6-mipsn32, libc6-powerpc, libc6-ppc64, libc6-s390, libc6-sparc, libc6-sparc64, libc6-x32 [x32], libc6-x32:amd64 [i386] ++Build-Profiles: ++Description: 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 x32 ++Section: libdevel ++Priority: optional ++Depends: libc6-amd64 (= ${binary:Version}) , libc6-dev (= ${binary:Version}), ${misc:Depends} ++Recommends: gcc-multilib ++Provides: lib64c-dev ++Build-Profiles: ++Description: 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. ++ diff --cc debian/control.in/armel index 000000000,000000000..1de4efb60 new file mode 100644 --- /dev/null +++ b/debian/control.in/armel @@@ -1,0 -1,0 +1,23 @@@ ++Package: libc6-armel ++Architecture: armhf ++Section: libs ++Priority: optional ++Depends: libc6 (= ${binary:Version}), ${misc:Depends} ++Build-Profiles: ++Description: GNU C Library: ARM softfp shared libraries for armhf ++ This package includes shared versions of the standard C ++ library and the standard math library, as well as many others. ++ This is the ARM softfp version of the library, meant for armhf systems. ++ ++Package: libc6-dev-armel ++Architecture: armhf ++Section: libdevel ++Priority: optional ++Depends: libc6-armel (= ${binary:Version}) , libc6-dev (= ${binary:Version}), ${misc:Depends} ++Recommends: gcc-multilib ++Build-Profiles: ++Description: GNU C Library: ARM softfp development libraries for armhf ++ Contains the symlinks and object files needed to compile and link programs ++ which use the standard C library. This is the ARM softfp version of the ++ library, meant for armhf systems. ++ diff --cc debian/control.in/armhf index 000000000,000000000..ad32a06bc new file mode 100644 --- /dev/null +++ b/debian/control.in/armhf @@@ -1,0 -1,0 +1,23 @@@ ++Package: libc6-armhf ++Architecture: armel ++Section: libs ++Priority: optional ++Depends: libc6 (= ${binary:Version}), ${misc:Depends} ++Build-Profiles: ++Description: GNU C Library: ARM hard float shared libraries for armel ++ This package includes shared versions of the standard C ++ library and the standard math library, as well as many others. ++ This is the ARM hard float version of the library, meant for armel systems. ++ ++Package: libc6-dev-armhf ++Architecture: armel ++Section: libdevel ++Priority: optional ++Depends: libc6-armhf (= ${binary:Version}) , libc6-dev (= ${binary:Version}), ${misc:Depends} ++Recommends: gcc-multilib ++Build-Profiles: ++Description: GNU C Library: ARM hard float development libraries for armel ++ Contains the symlinks and object files needed to compile and link programs ++ which use the standard C library. This is the ARM hard float version of the ++ library, meant for armel systems. ++ diff --cc debian/control.in/i386 index 000000000,000000000..862992620 new file mode 100644 --- /dev/null +++ b/debian/control.in/i386 @@@ -1,0 -1,0 +1,26 @@@ ++Package: libc6-i386 ++Architecture: amd64 x32 ++Section: libs ++Priority: optional ++Depends: libc6 (= ${binary:Version}), ${misc:Depends} ++Conflicts: libc0.1-i386, libc6-amd64 [amd64], libc6-amd64:i386 [x32], libc6-i386:amd64 [x32], libc6-i386:x32 [amd64], libc6-mips32, libc6-mips64, libc6-mipsn32, libc6-powerpc, libc6-ppc64, libc6-s390, libc6-sparc, libc6-sparc64, libc6-x32 [x32], libc6-x32:i386 [amd64] ++Replaces: libc6-dev-i386 ++Build-Profiles: ++Description: 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 x32 ++Section: libdevel ++Priority: optional ++Provides: lib32c-dev ++Depends: libc6-i386 (= ${binary:Version}) , libc6-dev (= ${binary:Version}), ${misc:Depends} ++Recommends: gcc-multilib ++Build-Profiles: ++Description: 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. ++ diff --cc debian/control.in/kfreebsd-i386 index 000000000,000000000..1ddf7a286 new file mode 100644 --- /dev/null +++ b/debian/control.in/kfreebsd-i386 @@@ -1,0 -1,0 +1,25 @@@ ++Package: libc0.1-i386 ++Architecture: kfreebsd-amd64 ++Section: libs ++Priority: optional ++Depends: libc0.1 (= ${binary:Version}), ${misc:Depends} ++Conflicts: libc6-amd64, libc6-i386, libc6-mips32, libc6-mips64, libc6-mipsn32, libc6-powerpc, libc6-ppc64, libc6-s390, libc6-sparc, libc6-sparc64, libc6-x32 ++Build-Profiles: ++Description: 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 ++Depends: libc0.1-i386 (= ${binary:Version}) , libc0.1-dev (= ${binary:Version}), ${misc:Depends} ++Recommends: gcc-multilib ++Build-Profiles: ++Description: 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. ++ diff --cc debian/control.in/libc index 000000000,000000000..55b2b52a7 new file mode 100644 --- /dev/null +++ b/debian/control.in/libc @@@ -1,0 -1,0 +1,75 @@@ ++Package: @libc@ ++Architecture: @archs@ ++Section: libs ++Priority: optional ++Multi-Arch: same ++Depends: ${shlibs:Depends}, ${libgcc:Depends}, ${libcrypt:Depends} ++Recommends: libidn2-0 (>= 2.0.5~), libnss-nis, libnss-nisplus ++Suggests: glibc-doc, debconf | debconf-2.0, libc-l10n, locales [!hurd-i386] ++Provides: libc6-sparcv9b [sparc sparc64], libc0.1-i686 [kfreebsd-i386], libc0.3-i686 [hurd-i386], libc6-i686 [i386] ++Conflicts: libc0.1-i686 [kfreebsd-i386], libc6-i686 [i386] ++Breaks: nscd (<< @GLIBC_VERSION@), locales (<< @GLIBC_VERSION@), locales-all (<< @GLIBC_VERSION@), hurd (<< 1:0.9.git20170910-1), libtirpc1 (<< 0.2.3), r-cran-later (<< 0.7.5+dfsg-2), nocache (<< 1.1-1~), iraf-fitsutil (<< 2018.07.06-4), wcc (<< 0.0.2+dfsg-3), openssh-server (<< 1:8.1p1-5), macs (<< 2.2.7.1-3~), openarena (<< 0.8.8+dfsg-4~), ioquake3 (<< 1.36+u20200211.f2c61c1~dfsg-2~), libgegl-0.4-0 (<< 0.4.18), busybox (<< 1.30.1-6), libgegl-0.4-0 (<< 0.4.18) ++Replaces: libc6-amd64 [amd64], ++ libc6-i386 [i386], ++ libc0.1-i686 [kfreebsd-i386], ++ libc0.3-i686 [hurd-i386], ++ libc6-i686 [i386], ++ libc6-x32 [x32], ++ libc0.1-i386 [kfreebsd-i386], ++ libc6-powerpc [powerpc], ++ libc6-ppc64 [ppc64], ++ libc6-s390x [s390x], ++ libc6-sparc64 [sparc64], ++ libc6-mips64 [mips64 mips64el], ++ libc6-mipsn32 [mipsn32 mipsn32el], ++ libc6-mips32 [mips mipsel], ++ hurd (<< 20120408-3) [hurd-i386] ++Build-Profiles: ++Description: 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] | hurd-headers-dev [hurd-i386], ${libcrypt-dev:Depends}, ${libnsl-dev:Depends} ++Replaces: hurd-dev (<< 20120408-3) [hurd-i386], kfreebsd-kernel-headers (<< 10.3~4) [kfreebsd-amd64 kfreebsd-i386] ++Suggests: glibc-doc, manpages-dev ++Provides: libc-dev, libc6-dev [alpha ia64 hurd-i386 kfreebsd-i386 kfreebsd-amd64] ++Breaks: check (<< 0.9.10-6.1+b1) [s390x], kfreebsd-kernel-headers (<< 10.3~4) [kfreebsd-amd64 kfreebsd-i386], libperl5.26 (<< 5.26.1-3), ${libc-dev:Breaks}, python3.7 (<< 3.7.7-1+b1), python3.8 (<< 3.8.2-1+b1), libgcc-7-dev (<< 7.5.0-6~), libgcc-8-dev (<< 8.4.0-2~), libgcc-9-dev (<< 9.3.0-5~), libgcc-10-dev (<< 10-20200321-1~) ++Conflicts: @libc-dev-conflict@ ++Description: 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: optional ++Multi-Arch: same ++Provides: libc-dbg, @libc@-dbgsym ++Depends: @libc@ (= ${binary:Version}), ${misc:Depends} ++Build-Profiles: ++Description: GNU C Library: detached debugging symbols ++ This package contains the detached debugging symbols for the GNU C ++ library. ++ ++Package: @libc@-udeb ++Package-Type: udeb ++Architecture: @archs@ ++Section: debian-installer ++Priority: optional ++Depends: libcrypt1-udeb ++Provides: @libc@, libc-udeb, libnss-dns-udeb, libnss-files-udeb, ${locale-compat:Depends} ++Build-Profiles: ++Description: 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. ++ diff --cc debian/control.in/main index 000000000,000000000..e32fba468 new file mode 100644 --- /dev/null +++ b/debian/control.in/main @@@ -1,0 -1,0 +1,159 @@@ ++Source: glibc ++Section: libs ++Priority: required ++Build-Depends: gettext, dpkg (>= 1.18.7), dpkg-dev (>= 1.17.14), xz-utils, file, quilt, ++ autoconf, gawk, debhelper (>= 10), rdfind, symlinks, netbase, gperf, bison, ++ linux-libc-dev (>= 3.9) [linux-any], ++ libaudit-dev [linux-any], libcap-dev [linux-any], libselinux-dev [linux-any] , ++ mig-for-host (>= 1.5-3) [hurd-i386], gnumach-dev (>= 2:1.8+git20200710-2~) [hurd-i386], ++ hurd-dev (>= 1:0.9.git20201127-4~) [hurd-i386] | hurd-headers-dev [hurd-i386], ++ kfreebsd-kernel-headers [kfreebsd-any], ++ binutils (>= 2.29), ++ g++-10, g++-10-multilib [amd64 i386 kfreebsd-amd64 mips mipsel mipsn32 mipsn32el mips64 mips64el mipsr6 mipsr6el mipsn32r6 mipsn32r6el mips64r6 mips64r6el powerpc ppc64 s390x sparc sparc64 x32] , ++ gcc-10 (>= 10-20200431) [arm64], ++ gcc-10 (>= 10.1.0-3) [hurd-i386], ++ python3:native, ++ libidn2-0 (>= 2.0.5~) , ++ libc-bin (>= @GLIBC_VERSION@) , ++ libgd-dev , ++Build-Depends-Indep: perl, po-debconf (>= 1.0) ++Maintainer: GNU Libc Maintainers ++Uploaders: Clint Adams , Aurelien Jarno , Adam Conrad , Samuel Thibault ++Standards-Version: 4.2.1 ++Vcs-Browser: https://salsa.debian.org/glibc-team/glibc ++Vcs-Git: https://salsa.debian.org/glibc-team/glibc.git ++Homepage: https://www.gnu.org/software/libc/libc.html ++ ++Package: libc-bin ++Architecture: any ++Section: libs ++Priority: required ++Essential: yes ++Multi-Arch: foreign ++Depends: ${shlibs:Depends}, ${misc:Depends} ++Recommends: manpages ++Build-Profiles: ++Description: 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 ++ * 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, manpages-dev, libc-devtools (>> @GLIBC_VERSION@) ++Build-Profiles: ++Description: GNU C Library: Development binaries ++ This package contains utility programs related to the GNU C Library ++ development package. ++ . ++ * gencat: generate message catalogs ++ * rpcgen: compile RPC protocols to C ++ ++Package: libc-devtools ++Architecture: any ++Section: devel ++Priority: optional ++Multi-Arch: foreign ++Depends: ${shlibs:Depends}, ${misc:Depends} ++Breaks: libc-dev-bin (<< 2.31-8) ++Replaces: libc-dev-bin (<< 2.31-8) ++Recommends: manpages, manpages-dev ++Build-Profiles: ++Description: GNU C Library: Development tools ++ This package contains development tools shipped by the GNU C ++ Library. ++ . ++ * memusage, memusagestat: profile a program's memory usage ++ * mtrace: interpret the malloc trace log ++ * sotruss: trace shared library calls ++ * sprof: display shared object profiling data ++ ++Package: libc-l10n ++Architecture: all ++Section: localization ++Priority: standard ++Multi-Arch: foreign ++Depends: ${misc:Depends} ++Build-Profiles: ++Description: GNU C Library: localization files ++ This package contains the translation files for the GNU C library and ++ utility programs. ++ ++Package: glibc-doc ++Architecture: all ++Section: doc ++Priority: optional ++Multi-Arch: foreign ++Depends: ${misc:Depends} ++Suggests: glibc-doc-reference ++Build-Profiles: ++Description: 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: glibc-source ++Architecture: all ++Section: devel ++Priority: optional ++Multi-Arch: foreign ++Depends: ${misc:Depends} ++Recommends: xz-utils ++Breaks: cross-toolchain-base (<< 45~), cross-toolchain-base-ports (<< 37~), cross-toolchain-base-mipsen (<< 10) ++Build-Profiles: ++Description: GNU C Library: sources ++ This package contains the sources and patches which are needed to ++ build glibc. ++ ++Package: locales ++Architecture: all ++Section: localization ++Priority: standard ++Depends: libc-bin (>> @GLIBC_VERSION@), libc-l10n (>> @GLIBC_VERSION@), ${misc:Depends}, debconf | debconf-2.0 ++Build-Profiles: ++Description: 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 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: optional ++Multi-Arch: foreign ++Depends: libc-l10n (>> @GLIBC_VERSION@), ${misc:Depends} ++Build-Profiles: ++Description: 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: lsb-base (>= 3.0-6), ${shlibs:Depends}, ${misc:Depends} ++Build-Profiles: ++Description: 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+. ++ diff --cc debian/control.in/mips32 index 000000000,000000000..7025b0622 new file mode 100644 --- /dev/null +++ b/debian/control.in/mips32 @@@ -1,0 -1,0 +1,28 @@@ ++Package: libc6-mips32 ++Architecture: mipsn32 mipsn32el mips64 mips64el mipsn32r6 mipsn32r6el mips64r6 mips64r6el ++Section: libs ++Priority: optional ++Depends: libc6 (= ${binary:Version}), ${misc:Depends} ++Conflicts: libc0.1-i386, libc6-amd64, libc6-i386, libc6-mips32:mips64 [mips64el mips64r6 mips64r6el mipsn32 mipsn32el mipsn32r6 mipsn32r6el], libc6-mips32:mips64el [mips64 mips64r6 mips64r6el mipsn32 mipsn32el mipsn32r6 mipsn32r6el], libc6-mips32:mips64r6 [mips64 mips64el mips64r6el mipsn32 mipsn32el mipsn32r6 mipsn32r6el], libc6-mips32:mips64r6el [mips64 mips64el mips64r6 mipsn32 mipsn32el mipsn32r6 mipsn32r6el], libc6-mips32:mipsn32 [mips64 mips64el mips64r6 mips64r6el mipsn32el mipsn32r6 mipsn32r6el], libc6-mips32:mipsn32el [mips64 mips64el mips64r6 mips64r6el mipsn32 mipsn32r6 mipsn32r6el], libc6-mips32:mipsn32r6 [mips64 mips64el mips64r6 mips64r6el mipsn32 mipsn32el mipsn32r6el], libc6-mips32:mipsn32r6el [mips64 mips64el mips64r6 mips64r6el mipsn32 mipsn32el mipsn32r6], libc6-mips64 [mips64 mips64el mips64r6 mips64r6el], libc6-mips64:mips [mipsn32 mipsn32el mipsn32r6 mipsn32r6el], libc6-mips64:mipsel [mipsn32 mipsn32el mipsn32r6 mipsn32r6el], libc6-mips64:mipsn32 [mipsn32el mipsn32r6 mipsn32r6el], libc6-mips64:mipsn32el [mipsn32 mipsn32r6 mipsn32r6el], libc6-mips64:mipsn32r6 [mipsn32 mipsn32el mipsn32r6el], libc6-mips64:mipsn32r6el [mipsn32 mipsn32el mipsn32r6], libc6-mips64:mipsr6 [mipsn32 mipsn32el mipsn32r6 mipsn32r6el], libc6-mips64:mipsr6el [mipsn32 mipsn32el mipsn32r6 mipsn32r6el], libc6-mipsn32 [mipsn32 mipsn32el mipsn32r6 mipsn32r6el], libc6-mipsn32:mips [mips64 mips64el mips64r6 mips64r6el], libc6-mipsn32:mips64 [mips64el mips64r6 mips64r6el], libc6-mipsn32:mips64el [mips64 mips64r6 mips64r6el], libc6-mipsn32:mips64r6 [mips64 mips64el mips64r6el], libc6-mipsn32:mips64r6el [mips64 mips64el mips64r6], libc6-mipsn32:mipsel [mips64 mips64el mips64r6 mips64r6el], libc6-mipsn32:mipsr6 [mips64 mips64el mips64r6 mips64r6el], libc6-mipsn32:mipsr6el [mips64 mips64el mips64r6 mips64r6el], libc6-powerpc, libc6-ppc64, libc6-s390, libc6-sparc, libc6-sparc64, libc6-x32 ++Build-Profiles: ++Description: GNU C Library: o32 Shared libraries for MIPS ++ This package includes shared versions of the standard C library and the ++ standard math library, as well as many others. This is the o32 version ++ of the library, meant for MIPS systems. ++ ++Package: libc6-dev-mips32 ++Architecture: mipsn32 mipsn32el mips64 mips64el mipsn32r6 mipsn32r6el mips64r6 mips64r6el ++Section: libdevel ++Priority: optional ++Provides: lib32c-dev ++Depends: libc6-mips32 (= ${binary:Version}) , libc6-dev (= ${binary:Version}), ++ libc6-dev-mipsn32 (= ${binary:Version}) [mips64 mips64el mips64r6 mips64r6el], ++ libc6-dev-mips64 (= ${binary:Version}) [mipsn32 mipsn32el mipsn32r6 mipsn32r6el], ++ ${misc:Depends} ++Recommends: gcc-multilib ++Build-Profiles: ++Description: GNU C Library: o32 Development Libraries for MIPS ++ Contains the symlinks and object files needed to compile and link programs ++ which use the standard C library. This is the o32 version of the ++ library, meant for MIPS systems. ++ diff --cc debian/control.in/mips64 index 000000000,000000000..aaf8a2d70 new file mode 100644 --- /dev/null +++ b/debian/control.in/mips64 @@@ -1,0 -1,0 +1,25 @@@ ++Package: libc6-mips64 ++Architecture: mips mipsel mipsn32 mipsn32el mipsr6 mipsr6el mipsn32r6 mipsn32r6el ++Section: libs ++Priority: optional ++Depends: libc6 (= ${binary:Version}), ${misc:Depends} ++Conflicts: libc0.1-i386, libc6-amd64, libc6-i386, libc6-mips32 [mips mipsel mipsr6 mipsr6el], libc6-mips32:mips64 [mipsn32 mipsn32el mipsn32r6 mipsn32r6el], libc6-mips32:mips64el [mipsn32 mipsn32el mipsn32r6 mipsn32r6el], libc6-mips32:mips64r6 [mipsn32 mipsn32el mipsn32r6 mipsn32r6el], libc6-mips32:mips64r6el [mipsn32 mipsn32el mipsn32r6 mipsn32r6el], libc6-mips32:mipsn32 [mipsn32el mipsn32r6 mipsn32r6el], libc6-mips32:mipsn32el [mipsn32 mipsn32r6 mipsn32r6el], libc6-mips32:mipsn32r6 [mipsn32 mipsn32el mipsn32r6el], libc6-mips32:mipsn32r6el [mipsn32 mipsn32el mipsn32r6], libc6-mips64:mips [mipsel mipsn32 mipsn32el mipsn32r6 mipsn32r6el mipsr6 mipsr6el], libc6-mips64:mipsel [mips mipsn32 mipsn32el mipsn32r6 mipsn32r6el mipsr6 mipsr6el], libc6-mips64:mipsn32 [mips mipsel mipsn32el mipsn32r6 mipsn32r6el mipsr6 mipsr6el], libc6-mips64:mipsn32el [mips mipsel mipsn32 mipsn32r6 mipsn32r6el mipsr6 mipsr6el], libc6-mips64:mipsn32r6 [mips mipsel mipsn32 mipsn32el mipsn32r6el mipsr6 mipsr6el], libc6-mips64:mipsn32r6el [mips mipsel mipsn32 mipsn32el mipsn32r6 mipsr6 mipsr6el], libc6-mips64:mipsr6 [mips mipsel mipsn32 mipsn32el mipsn32r6 mipsn32r6el mipsr6el], libc6-mips64:mipsr6el [mips mipsel mipsn32 mipsn32el mipsn32r6 mipsn32r6el mipsr6], libc6-mipsn32 [mipsn32 mipsn32el mipsn32r6 mipsn32r6el], libc6-mipsn32:mips [mipsel mipsr6 mipsr6el], libc6-mipsn32:mips64 [mips mipsel mipsr6 mipsr6el], libc6-mipsn32:mips64el [mips mipsel mipsr6 mipsr6el], libc6-mipsn32:mips64r6 [mips mipsel mipsr6 mipsr6el], libc6-mipsn32:mips64r6el [mips mipsel mipsr6 mipsr6el], libc6-mipsn32:mipsel [mips mipsr6 mipsr6el], libc6-mipsn32:mipsr6 [mips mipsel mipsr6el], libc6-mipsn32:mipsr6el [mips mipsel mipsr6], libc6-powerpc, libc6-ppc64, libc6-s390, libc6-sparc, libc6-sparc64, libc6-x32 ++Build-Profiles: ++Description: 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 mipsn32 mipsn32el mipsr6 mipsr6el mipsn32r6 mipsn32r6el ++Section: libdevel ++Priority: optional ++Provides: lib64c-dev ++Depends: libc6-mips64 (= ${binary:Version}) , libc6-dev (= ${binary:Version}), ${misc:Depends} ++Recommends: gcc-multilib ++Build-Profiles: ++Description: 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. ++ diff --cc debian/control.in/mipsn32 index 000000000,000000000..d62f073dd new file mode 100644 --- /dev/null +++ b/debian/control.in/mipsn32 @@@ -1,0 -1,0 +1,25 @@@ ++Package: libc6-mipsn32 ++Architecture: mips mipsel mips64 mips64el mipsr6 mipsr6el mips64r6 mips64r6el ++Section: libs ++Priority: optional ++Depends: libc6 (= ${binary:Version}), ${misc:Depends} ++Conflicts: libc0.1-i386, libc6-amd64, libc6-i386, libc6-mips32 [mips mipsel mipsr6 mipsr6el], libc6-mips32:mips64 [mips64el mips64r6 mips64r6el], libc6-mips32:mips64el [mips64 mips64r6 mips64r6el], libc6-mips32:mips64r6 [mips64 mips64el mips64r6el], libc6-mips32:mips64r6el [mips64 mips64el mips64r6], libc6-mips32:mipsn32 [mips64 mips64el mips64r6 mips64r6el], libc6-mips32:mipsn32el [mips64 mips64el mips64r6 mips64r6el], libc6-mips32:mipsn32r6 [mips64 mips64el mips64r6 mips64r6el], libc6-mips32:mipsn32r6el [mips64 mips64el mips64r6 mips64r6el], libc6-mips64 [mips64 mips64el mips64r6 mips64r6el], libc6-mips64:mips [mipsel mipsr6 mipsr6el], libc6-mips64:mipsel [mips mipsr6 mipsr6el], libc6-mips64:mipsn32 [mips mipsel mipsr6 mipsr6el], libc6-mips64:mipsn32el [mips mipsel mipsr6 mipsr6el], libc6-mips64:mipsn32r6 [mips mipsel mipsr6 mipsr6el], libc6-mips64:mipsn32r6el [mips mipsel mipsr6 mipsr6el], libc6-mips64:mipsr6 [mips mipsel mipsr6el], libc6-mips64:mipsr6el [mips mipsel mipsr6], libc6-mipsn32:mips [mips64 mips64el mips64r6 mips64r6el mipsel mipsr6 mipsr6el], libc6-mipsn32:mips64 [mips mips64el mips64r6 mips64r6el mipsel mipsr6 mipsr6el], libc6-mipsn32:mips64el [mips mips64 mips64r6 mips64r6el mipsel mipsr6 mipsr6el], libc6-mipsn32:mips64r6 [mips mips64 mips64el mips64r6el mipsel mipsr6 mipsr6el], libc6-mipsn32:mips64r6el [mips mips64 mips64el mips64r6 mipsel mipsr6 mipsr6el], libc6-mipsn32:mipsel [mips mips64 mips64el mips64r6 mips64r6el mipsr6 mipsr6el], libc6-mipsn32:mipsr6 [mips mips64 mips64el mips64r6 mips64r6el mipsel mipsr6el], libc6-mipsn32:mipsr6el [mips mips64 mips64el mips64r6 mips64r6el mipsel mipsr6], libc6-powerpc, libc6-ppc64, libc6-s390, libc6-sparc, libc6-sparc64, libc6-x32 ++Build-Profiles: ++Description: 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 mips64 mips64el mipsr6 mipsr6el mips64r6 mips64r6el ++Section: libdevel ++Priority: optional ++Provides: libn32c-dev ++Depends: libc6-mipsn32 (= ${binary:Version}) , libc6-dev-mips64 (= ${binary:Version}) [mips mipsel mipsr6 mipsr6el], libc6-dev (= ${binary:Version}), ${misc:Depends} ++Recommends: gcc-multilib ++Build-Profiles: ++Description: 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. ++ diff --cc debian/control.in/opt index 000000000,000000000..a5a3f1e97 new file mode 100644 --- /dev/null +++ b/debian/control.in/opt @@@ -1,0 -1,0 +1,49 @@@ ++Package: libc6-xen ++Architecture: i386 ++Section: libs ++Priority: optional ++Multi-Arch: same ++Pre-Depends: libc6 (= ${binary:Version}) ++Depends: ${misc:Depends} ++Build-Profiles: ++Description: 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.3-xen ++Architecture: hurd-i386 ++Section: libs ++Priority: optional ++Multi-Arch: same ++Pre-Depends: libc0.3 (= ${binary:Version}) ++Depends: ${misc:Depends} ++Build-Profiles: ++Description: 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: optional ++Multi-Arch: same ++Pre-Depends: libc6.1 (= ${binary:Version}) ++Depends: ${misc:Depends} ++Build-Profiles: ++Description: 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. ++ diff --cc debian/control.in/powerpc index 000000000,000000000..774f41418 new file mode 100644 --- /dev/null +++ b/debian/control.in/powerpc @@@ -1,0 -1,0 +1,25 @@@ ++Package: libc6-powerpc ++Architecture: ppc64 ++Section: libs ++Priority: optional ++Depends: libc6 (= ${binary:Version}), ${misc:Depends} ++Conflicts: libc0.1-i386, libc6-amd64, libc6-i386, libc6-mips32, libc6-mips64, libc6-mipsn32, libc6-ppc64, libc6-s390, libc6-sparc, libc6-sparc64, libc6-x32 ++Build-Profiles: ++Description: 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 ++Depends: libc6-powerpc (= ${binary:Version}) , libc6-dev (= ${binary:Version}), ${misc:Depends} ++Recommends: gcc-multilib ++Build-Profiles: ++Description: 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. ++ diff --cc debian/control.in/ppc64 index 000000000,000000000..f5042ca75 new file mode 100644 --- /dev/null +++ b/debian/control.in/ppc64 @@@ -1,0 -1,0 +1,25 @@@ ++Package: libc6-ppc64 ++Architecture: powerpc ++Section: libs ++Priority: optional ++Depends: libc6 (= ${binary:Version}), ${misc:Depends} ++Conflicts: libc0.1-i386, libc6-amd64, libc6-i386, libc6-mips32, libc6-mips64, libc6-mipsn32, libc6-powerpc, libc6-s390, libc6-sparc, libc6-sparc64, libc6-x32 ++Build-Profiles: ++Description: 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 ++Depends: libc6-ppc64 (= ${binary:Version}) , libc6-dev (= ${binary:Version}), ${misc:Depends} ++Recommends: gcc-multilib ++Build-Profiles: ++Description: 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. ++ diff --cc debian/control.in/s390 index 000000000,000000000..ca6b26302 new file mode 100644 --- /dev/null +++ b/debian/control.in/s390 @@@ -1,0 -1,0 +1,25 @@@ ++Package: libc6-s390 ++Architecture: s390x ++Section: libs ++Priority: optional ++Depends: libc6 (= ${binary:Version}), ${misc:Depends} ++Conflicts: libc0.1-i386, libc6-amd64, libc6-i386, libc6-mips32, libc6-mips64, libc6-mipsn32, libc6-powerpc, libc6-ppc64, libc6-sparc, libc6-sparc64, libc6-x32 ++Build-Profiles: ++Description: 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 ++Depends: libc6-s390 (= ${binary:Version}) , libc6-dev (= ${binary:Version}), ${misc:Depends} ++Recommends: gcc-multilib ++Build-Profiles: ++Description: 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. ++ diff --cc debian/control.in/sparc index 000000000,000000000..ede4735a8 new file mode 100644 --- /dev/null +++ b/debian/control.in/sparc @@@ -1,0 -1,0 +1,25 @@@ ++Package: libc6-sparc ++Architecture: sparc64 ++Section: libs ++Priority: optional ++Depends: libc6 (= ${binary:Version}), ${misc:Depends} ++Build-Profiles: ++Conflicts: libc0.1-i386, libc6-amd64, libc6-i386, libc6-mips32, libc6-mips64, libc6-mipsn32, libc6-powerpc, libc6-ppc64, libc6-s390, libc6-sparc64, libc6-x32 ++Description: GNU C Library: 32bit Shared libraries for SPARC ++ 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 SPARC systems. ++ ++Package: libc6-dev-sparc ++Architecture: sparc64 ++Section: libdevel ++Priority: optional ++Provides: lib32c-dev ++Depends: libc6-sparc (= ${binary:Version}) , libc6-dev (= ${binary:Version}), ${misc:Depends} ++Recommends: gcc-multilib ++Build-Profiles: ++Description: GNU C Library: 32bit Development Libraries for SPARC ++ 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 SPARC systems. ++ diff --cc debian/control.in/sparc64 index 000000000,000000000..a8670d6cf new file mode 100644 --- /dev/null +++ b/debian/control.in/sparc64 @@@ -1,0 -1,0 +1,25 @@@ ++Package: libc6-sparc64 ++Architecture: sparc ++Section: libs ++Priority: optional ++Depends: libc6 (= ${binary:Version}), ${misc:Depends} ++Conflicts: libc0.1-i386, libc6-amd64, libc6-i386, libc6-mips32, libc6-mips64, libc6-mipsn32, libc6-powerpc, libc6-ppc64, libc6-s390, libc6-sparc, libc6-x32 ++Build-Profiles: ++Description: 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 ++Depends: libc6-sparc64 (= ${binary:Version}) , libc6-dev (= ${binary:Version}), ${misc:Depends} ++Recommends: gcc-multilib ++Build-Profiles: ++Description: 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. ++ diff --cc debian/control.in/x32 index 000000000,000000000..41e6f751b new file mode 100644 --- /dev/null +++ b/debian/control.in/x32 @@@ -1,0 -1,0 +1,24 @@@ ++Package: libc6-x32 ++Architecture: amd64 i386 ++Section: libs ++Priority: optional ++Depends: libc6 (= ${binary:Version}), ${misc:Depends} ++Conflicts: libc0.1-i386, libc6-amd64 [amd64], libc6-amd64:x32 [i386], libc6-i386 [i386], libc6-i386:x32 [amd64], libc6-mips32, libc6-mips64, libc6-mipsn32, libc6-powerpc, libc6-ppc64, libc6-s390, libc6-sparc, libc6-sparc64, libc6-x32:amd64 [i386], libc6-x32:i386 [amd64] ++Build-Profiles: ++Description: GNU C Library: X32 ABI 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 X32 ABI version ++ of the library, meant for AMD64 systems. ++ ++Package: libc6-dev-x32 ++Architecture: amd64 i386 ++Section: libdevel ++Priority: optional ++Depends: libc6-x32 (= ${binary:Version}) , libc6-dev-i386 (= ${binary:Version}) [amd64], libc6-dev-amd64 (= ${binary:Version}) [i386], libc6-dev (= ${binary:Version}), ${misc:Depends} ++Recommends: gcc-multilib ++Build-Profiles: ++Description: GNU C Library: X32 ABI 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 X32 ABI version of the ++ library, meant for amd64 systems. ++ diff --cc debian/copyright index 000000000,000000000..0517e7685 new file mode 100644 --- /dev/null +++ b/debian/copyright @@@ -1,0 -1,0 +1,509 @@@ ++This is the Debian prepackaged version of the GNU C Library version 2.23. ++ ++It was put together by the GNU Libc Maintainers ++from ++ ++* Most of the GNU C library is under the following copyright: ++ ++ Copyright (C) 1991-2015 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-2015 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 ISC portions are under the following license: ++ ++ Portions Copyright (c) 1996-1999 by Internet Software Consortium. ++ ++ 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. ++ ++ THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS ++ ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES ++ OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE ++ CONSORTIUM 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. */ ++ ++* The file sunrpc/des_impl.c is copyright Eric Young: ++ ++ Copyright (C) 1992 Eric Young ++ Collected from libdes and modified for SECURE RPC by Martin Kuck 1994 ++ This file is distributed under the terms of the GNU Lesser General ++ Public License, version 2.1 or later - see the file COPYING.LIB for details. ++ If you did not receive a copy of the license with this program, please ++ see to obtain a copy. ++ ++* The libidn code is copyright Simon Josefsson, with portions copyright ++ The Internet Society, Tom Tromey and Red Hat, Inc.: ++ ++ Copyright (C) 2002, 2003, 2004, 2011 Simon Josefsson ++ ++ This file is part of GNU Libidn. ++ ++ GNU Libidn is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ GNU Libidn is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with GNU Libidn; if not, see . ++ ++* The following notice applies to portions of libidn/nfkc.c: ++ ++ This file contains functions from GLIB, including gutf8.c and ++ gunidecomp.c, all licensed under LGPL and copyright hold by: ++ ++ Copyright (C) 1999, 2000 Tom Tromey ++ Copyright 2000 Red Hat, Inc. ++ ++* The following applies to portions of libidn/punycode.c and ++ libidn/punycode.h: ++ ++ This file is derived from RFC 3492bis written by Adam M. Costello. ++ ++ Disclaimer and license: Regarding this entire document or any ++ portion of it (including the pseudocode and C code), the author ++ makes no guarantees and is not responsible for any damage resulting ++ from its use. The author grants irrevocable permission to anyone ++ to use, modify, and distribute it in any way that does not diminish ++ the rights of anyone else to use, modify, and distribute it, ++ provided that redistributed derivative works do not contain ++ misleading author or version information. Derivative works need ++ not be licensed under similar terms. ++ ++ Copyright (C) The Internet Society (2003). All Rights Reserved. ++ ++ This document and translations of it may be copied and furnished to ++ others, and derivative works that comment on or otherwise explain it ++ or assist in its implementation may be prepared, copied, published ++ and distributed, in whole or in part, without restriction of any ++ kind, provided that the above copyright notice and this paragraph are ++ included on all such copies and derivative works. However, this ++ document itself may not be modified in any way, such as by removing ++ the copyright notice or references to the Internet Society or other ++ Internet organizations, except as needed for the purpose of ++ developing Internet standards in which case the procedures for ++ copyrights defined in the Internet Standards process must be ++ followed, or as required to translate it into languages other than ++ English. ++ ++ The limited permissions granted above are perpetual and will not be ++ revoked by the Internet Society or its successors or assigns. ++ ++ This document and the information contained herein is provided on an ++ "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING ++ TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING ++ BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION ++ HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF ++ MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. ++ ++* The file inet/rcmd.c is under a UCB copyright and the following: ++ ++ Copyright (C) 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. ++ ++ * The file posix/runtests.c is copyright Tom Lord: ++ ++ Copyright 1995 by Tom Lord ++ ++ All Rights Reserved ++ ++ Permission to use, copy, modify, and distribute this software and its ++ documentation for any purpose and without fee is hereby granted, ++ provided that the above copyright notice appear in all copies and that ++ both that copyright notice and this permission notice appear in ++ supporting documentation, and that the name of the copyright holder not be ++ used in advertising or publicity pertaining to distribution of the ++ software without specific, written prior permission. ++ ++ Tom Lord DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, ++ INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO ++ EVENT SHALL TOM LORD BE LIABLE FOR ANY SPECIAL, 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 posix/rxspencer tests are copyright Henry Spencer: ++ ++ Copyright 1992, 1993, 1994, 1997 Henry Spencer. All rights reserved. ++ This software is not subject to any license of the American Telephone ++ and Telegraph Company or of the Regents of the University of California. ++ ++ Permission is granted to anyone to use this software for any purpose on ++ any computer system, and to alter it and redistribute it, subject ++ to the following restrictions: ++ ++ 1. The author is not responsible for the consequences of use of this ++ software, no matter how awful, even if they arise from flaws in it. ++ ++ 2. The origin of this software must not be misrepresented, either by ++ explicit claim or by omission. Since few users ever read sources, ++ credits must appear in the documentation. ++ ++ 3. Altered versions must be plainly marked as such, and must not be ++ misrepresented as being the original software. Since few users ++ ever read sources, credits must appear in the documentation. ++ ++ 4. This notice may not be removed or altered. ++ ++* The file posix/PCRE.tests is copyright University of Cambridge: ++ ++ Copyright (c) 1997-2003 University of Cambridge ++ ++ Permission is granted to anyone to use this software for any purpose on any ++ computer system, and to redistribute it freely, subject to the following ++ restrictions: ++ ++ 1. This software is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ++ ++ 2. The origin of this software must not be misrepresented, either by ++ explicit claim or by omission. In practice, this means that if you use ++ PCRE in software that you distribute to others, commercially or ++ otherwise, you must put a sentence like this ++ ++ Regular expression support is provided by the PCRE library package, ++ which is open source software, written by Philip Hazel, and copyright ++ by the University of Cambridge, England. ++ ++ somewhere reasonably visible in your documentation and in any relevant ++ files or online help data or similar. A reference to the ftp site for ++ the source, that is, to ++ ++ ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/ ++ ++ should also be given in the documentation. However, this condition is not ++ intended to apply to whole chains of software. If package A includes PCRE, ++ it must acknowledge it, but if package B is software that includes package ++ A, the condition is not imposed on package B (unless it uses PCRE ++ independently). ++ ++ 3. Altered versions must be plainly marked as such, and must not be ++ misrepresented as being the original software. ++ ++ 4. If PCRE is embedded in any software that is released under the GNU ++ General Purpose Licence (GPL), or Lesser General Purpose Licence (LGPL), ++ then the terms of that licence shall supersede any condition above with ++ which it is incompatible. ++ ++* Files from Sun fdlibm are copyright Sun Microsystems, Inc.: ++ ++ Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. ++ ++ Developed at SunPro, a Sun Microsystems, Inc. business. ++ Permission to use, copy, modify, and distribute this ++ software is freely granted, provided that this notice ++ is preserved. ++ ++* Part of stdio-common/tst-printf.c is copyright C E Chew: ++ ++ (C) Copyright C E Chew ++ ++ Feel free to copy, use and distribute this software provided: ++ ++ 1. you do not pretend that you wrote it ++ 2. you leave this copyright notice intact. ++ ++* Various long double libm functions are copyright Stephen L. Moshier: ++ ++ Copyright 2001 by Stephen L. Moshier ++ ++ This library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser 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 library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with this library; if not, see ++ . */ diff --cc debian/debhelper.in/glibc-doc.docs index 000000000,000000000..cd9a0a24b new file mode 100644 --- /dev/null +++ b/debian/debhelper.in/glibc-doc.docs @@@ -1,0 -1,0 +1,1 @@@ ++ChangeLog.old/* diff --cc debian/debhelper.in/glibc-doc.links index 000000000,000000000..046c4269a new file mode 100644 --- /dev/null +++ b/debian/debhelper.in/glibc-doc.links @@@ -1,0 -1,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 diff --cc debian/debhelper.in/glibc-doc.manpages index 000000000,000000000..b706a124d new file mode 100644 --- /dev/null +++ b/debian/debhelper.in/glibc-doc.manpages @@@ -1,0 -1,0 +1,8 @@@ ++debian/local/manpages/pthread_atfork.3 ++debian/local/manpages/pthread_condattr_init.3 ++debian/local/manpages/pthread_cond_init.3 ++debian/local/manpages/pthread_key_create.3 ++debian/local/manpages/pthread_mutexattr_init.3 ++debian/local/manpages/pthread_mutexattr_setkind_np.3 ++debian/local/manpages/pthread_mutex_init.3 ++debian/local/manpages/pthread_once.3 diff --cc debian/debhelper.in/glibc-source.install index 000000000,000000000..683e48682 new file mode 100644 --- /dev/null +++ b/debian/debhelper.in/glibc-source.install @@@ -1,0 -1,0 +1,1 @@@ ++BUILD-TREE/glibc-*.tar.xz /usr/src/glibc diff --cc debian/debhelper.in/glibc-source.lintian-overrides index 000000000,000000000..1e917b43e new file mode 100644 --- /dev/null +++ b/debian/debhelper.in/glibc-source.lintian-overrides @@@ -1,0 -1,0 +1,33 @@@ ++# all those files are part of Debian packaging which is provided as part ++# of glibc-source binary package to allow re-use of it for cross ++# compiler packages. ++ ++glibc-source: missing-dep-for-interpreter make => make | build-essential | dpkg-dev (usr/src/glibc/debian/rules) ++glibc-source: shell-script-fails-syntax-check usr/src/glibc/debian/debhelper.in/libc-otherbuild.postinst ++glibc-source: shell-script-fails-syntax-check usr/src/glibc/debian/debhelper.in/libc-otherbuild.postrm ++glibc-source: script-not-executable usr/src/glibc/debian/debhelper.in/libc-alt.preinst ++glibc-source: script-not-executable usr/src/glibc/debian/debhelper.in/libc-alt.postrm ++glibc-source: script-not-executable usr/src/glibc/debian/debhelper.in/libc-bin.postinst ++glibc-source: script-not-executable usr/src/glibc/debian/debhelper.in/libc-dev-alt.preinst ++glibc-source: script-not-executable usr/src/glibc/debian/debhelper.in/libc-dev-alt.preinst.i386 ++glibc-source: script-not-executable usr/src/glibc/debian/debhelper.in/libc-dev-alt.postinst ++glibc-source: script-not-executable usr/src/glibc/debian/debhelper.in/libc-otherbuild.postinst ++glibc-source: script-not-executable usr/src/glibc/debian/debhelper.in/libc-otherbuild.postrm ++glibc-source: script-not-executable usr/src/glibc/debian/debhelper.in/libc.postinst ++glibc-source: script-not-executable usr/src/glibc/debian/debhelper.in/libc.postrm ++glibc-source: script-not-executable usr/src/glibc/debian/debhelper.in/libc.preinst ++glibc-source: script-not-executable usr/src/glibc/debian/debhelper.in/libc.prerm ++glibc-source: script-not-executable usr/src/glibc/debian/debhelper.in/locales-all.postinst ++glibc-source: script-not-executable usr/src/glibc/debian/debhelper.in/locales-all.prerm ++glibc-source: script-not-executable usr/src/glibc/debian/debhelper.in/locales.config ++glibc-source: script-not-executable usr/src/glibc/debian/debhelper.in/locales.postinst ++glibc-source: script-not-executable usr/src/glibc/debian/debhelper.in/locales.postrm ++glibc-source: script-not-executable usr/src/glibc/debian/debhelper.in/locales.prerm ++glibc-source: script-not-executable usr/src/glibc/debian/debhelper.in/nscd.init ++glibc-source: script-not-executable usr/src/glibc/debian/debhelper.in/nscd.postrm ++glibc-source: script-not-executable usr/src/glibc/debian/generate-supported.mk ++glibc-source: script-not-executable usr/src/glibc/debian/local/manpages/Makefile ++glibc-source: script-not-executable usr/src/glibc/debian/local/usr_sbin/locale-gen ++glibc-source: script-not-executable usr/src/glibc/debian/local/usr_sbin/update-locale ++glibc-source: script-not-executable usr/src/glibc/debian/local/usr_sbin/validlocale ++glibc-source: script-not-executable usr/src/glibc/debian/shlibs-add-udebs diff --cc debian/debhelper.in/libc-alt.install index 000000000,000000000..459592cdb new file mode 100644 --- /dev/null +++ b/debian/debhelper.in/libc-alt.install @@@ -1,0 -1,0 +1,6 @@@ ++# This file is used for biarch libraries. ++TMPDIR/RTLDDIR/*.so* RTLDDIR ++TMPDIR/SLIBDIR/*.so* SLIBDIR ++TMPDIR/LIBDIR/gconv/* LIBDIR/gconv/ ++ ++TMPDIR/etc/ld.so.conf.d /etc diff --cc debian/debhelper.in/libc-alt.lintian-overrides index 000000000,000000000..8b2b5bafa new file mode 100644 --- /dev/null +++ b/debian/debhelper.in/libc-alt.lintian-overrides @@@ -1,0 -1,0 +1,10 @@@ ++# 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-GLIBC_VERSION.so ++ ++# ld.so must be executable, otherwise the system will not work ++LIBC-FLAVOR: shared-library-is-executable */ld-GLIBC_VERSION.so 0755 ++ ++# It is normal that the ELF dynamic linker does not need any other ++# library ++LIBC-FLAVOR: shared-lib-without-dependency-information */ld-GLIBC_VERSION.so diff --cc debian/debhelper.in/libc-alt.postrm index 000000000,000000000..55c8b4ac1 new file mode 100644 --- /dev/null +++ b/debian/debhelper.in/libc-alt.postrm @@@ -1,0 -1,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 diff --cc debian/debhelper.in/libc-bin.dirs index 000000000,000000000..60acff7c0 new file mode 100644 --- /dev/null +++ b/debian/debhelper.in/libc-bin.dirs @@@ -1,0 -1,0 +1,2 @@@ ++usr/lib/locale ++usr/share/libc-bin diff --cc debian/debhelper.in/libc-bin.install index 000000000,000000000..dfab166b5 new file mode 100644 --- /dev/null +++ b/debian/debhelper.in/libc-bin.install @@@ -1,0 -1,0 +1,21 @@@ ++debian/local/etc/bindresvport.blacklist etc ++debian/local/etc/ld.so.conf 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/pldd 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/zdump usr/bin ++debian/tmp-libc/usr/sbin/zic usr/sbin ++BUILD-TREE/C.UTF-8 usr/lib/locale diff --cc debian/debhelper.in/libc-bin.lintian-overrides index 000000000,000000000..66bcc685c new file mode 100644 --- /dev/null +++ b/debian/debhelper.in/libc-bin.lintian-overrides @@@ -1,0 -1,0 +1,21 @@@ ++# ldconfig must be executable even when the libc is not configured, and ++# thus must be linked statically ++libc-bin: statically-linked-binary sbin/ldconfig ++libc-bin: shared-library-lacks-prerequisites sbin/ldconfig ++ ++# pt_chown must be setuid root and in /usr/lib, otherwise non-root users ++# won't be able to login ++libc-bin: setuid-binary usr/lib/pt_chown 4755 root/root ++libc-bin: sharedobject-in-library-directory-missing-soname usr/lib/pt_chown ++ ++# these manpages are provided by the manpages package ++libc-bin: no-manual-page sbin/ldconfig ++libc-bin: no-manual-page usr/bin/getent ++libc-bin: no-manual-page usr/bin/iconv ++libc-bin: no-manual-page usr/bin/ldd ++libc-bin: no-manual-page usr/bin/locale ++libc-bin: no-manual-page usr/bin/localedef ++libc-bin: no-manual-page usr/bin/pldd ++libc-bin: no-manual-page usr/bin/zdump ++libc-bin: no-manual-page usr/sbin/iconvconfig ++libc-bin: no-manual-page usr/sbin/zic diff --cc debian/debhelper.in/libc-bin.manpages index 000000000,000000000..82da9df2c new file mode 100644 --- /dev/null +++ b/debian/debhelper.in/libc-bin.manpages @@@ -1,0 -1,0 +1,3 @@@ ++debian/local/manpages/catchsegv.1 ++debian/local/manpages/getconf.1 ++debian/local/manpages/tzselect.1 diff --cc debian/debhelper.in/libc-bin.postinst index 000000000,000000000..6309f1946 new file mode 100644 --- /dev/null +++ b/debian/debhelper.in/libc-bin.postinst @@@ -1,0 -1,0 +1,43 @@@ ++#!/bin/sh ++set -e ++export LC_ALL=C ++ ++install_from_default() { ++ if [ ! -f $2 ]; then ++ cp -p $1 $2 ++ fi ++} ++ ++update_to_current_default() { ++ if [ -f $2 ]; then ++ md5=`md5sum $2 | cut -f 1 -d " "` ++ case "$md5" in ++ # modified file ++ *) ++ return ++ ;; ++ esac ++ if ! cmp -s $1 $2; then ++ echo "Updating $2 to current default." ++ cp -p $1 $2 ++ fi ++ fi ++} ++ ++if [ "$1" = "configure" ] && [ "$2" = "" ] ; then ++ install_from_default /usr/share/libc-bin/nsswitch.conf /etc/nsswitch.conf ++fi ++ ++if [ "$1" = "configure" ] && [ "$2" != "" ]; then ++ update_to_current_default /usr/share/libc-bin/nsswitch.conf /etc/nsswitch.conf ++fi ++ ++if [ "$1" = "triggered" ] || [ "$1" = "configure" ]; then ++ ldconfig || ldconfig --verbose ++ exit 0 ++fi ++ ++#DEBHELPER# ++ ++exit 0 ++ diff --cc debian/debhelper.in/libc-bin.triggers index 000000000,000000000..c57bf655d new file mode 100644 --- /dev/null +++ b/debian/debhelper.in/libc-bin.triggers @@@ -1,0 -1,0 +1,9 @@@ ++# For standard directories the ldconfig call can be delayed, the dynamic ++# linker will search the standard directories itself, which will incur a ++# small performance penalty. ++# ++# For non-standard directories listed in /etc/ld.so.conf or in a file in ++# /etc/ld.so.conf.d/, the call to ldconfig is essential and can not be ++# skipped, otherwise libraries won't be found. Therefore declare ldconfig ++# as interest-await. ++interest-await ldconfig diff --cc debian/debhelper.in/libc-dev-alt.install index 000000000,000000000..2bd44d9bb new file mode 100644 --- /dev/null +++ b/debian/debhelper.in/libc-dev-alt.install @@@ -1,0 -1,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/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/libm.a LIBDIR ++TMPDIR/LIBDIR/libm-*.a LIBDIR ++TMPDIR/LIBDIR/libmcheck.a LIBDIR ++TMPDIR/LIBDIR/libmvec.a LIBDIR ++TMPDIR/LIBDIR/libpthread.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 ++ ++TMPDIR/usr/share/gdb/* usr/share/gdb diff --cc debian/debhelper.in/libc-dev-alt.lintian-overrides index 000000000,000000000..2feb30221 new file mode 100644 --- /dev/null +++ b/debian/debhelper.in/libc-dev-alt.lintian-overrides @@@ -1,0 -1,0 +1,3 @@@ ++# 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 */libmcheck.a diff --cc debian/debhelper.in/libc-dev-bin.install index 000000000,000000000..902029b5a new file mode 100644 --- /dev/null +++ b/debian/debhelper.in/libc-dev-bin.install @@@ -1,0 -1,0 +1,2 @@@ ++debian/tmp-libc/usr/bin/gencat usr/bin ++debian/tmp-libc/usr/bin/rpcgen usr/bin diff --cc debian/debhelper.in/libc-dev-bin.manpages index 000000000,000000000..576ec52c4 new file mode 100644 --- /dev/null +++ b/debian/debhelper.in/libc-dev-bin.manpages @@@ -1,0 -1,0 +1,2 @@@ ++debian/local/manpages/gencat.1 ++debian/local/manpages/rpcgen.1 diff --cc debian/debhelper.in/libc-dev.NEWS index 000000000,000000000..b0d2330ee new file mode 100644 --- /dev/null +++ b/debian/debhelper.in/libc-dev.NEWS @@@ -1,0 -1,0 +1,21 @@@ ++glibc (2.31-13+deb11u4) bullseye; urgency=medium ++ ++ Starting with glibc 2.31, Sun RPC is removed from glibc. This includes the ++ rpcgen program, librpcsvc, and the Sun RPC header files. However backward ++ runtime compatibility is provided, that is to say existing binaries will ++ continue to work. ++ ++ In order to link new binaries, the rpcsvc-proto package (a dependency of ++ libc6-dev) provides rpcgen and several rpcsvc header files and RPC protocol ++ definitions from Sun RPC sources that were previously shipped by glibc, and ++ an alternative RPC library shall be used. The most used alternative library ++ is TI-RPC, the corresponding development package is libtirpc-dev. ++ ++ Here are the necessary steps to switch an existing program to use the TI-RPC ++ library: ++ - Make sure the rpcsvc-proto, libtirpc-dev and pkg-config packages are ++ installed. ++ - Add the output of 'pkg-config --cflags libtirpc' to CFLAGS or equivalent. ++ - Add the output of 'pkg-config --libs libtirpc' to LDFLAGS or equivalent. ++ ++ -- Aurelien Jarno Wed, 03 Aug 2022 12:07:29 +0200 diff --cc debian/debhelper.in/libc-dev.install index 000000000,000000000..2b6f46b97 new file mode 100644 --- /dev/null +++ b/debian/debhelper.in/libc-dev.install @@@ -1,0 -1,0 +1,22 @@@ ++TMPDIR/LIBDIR/libanl.a LIBDIR ++TMPDIR/LIBDIR/libBrokenLocale.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/libm.a LIBDIR ++TMPDIR/LIBDIR/libm-*.a LIBDIR ++TMPDIR/LIBDIR/libmcheck.a LIBDIR ++TMPDIR/LIBDIR/libmvec.a LIBDIR ++TMPDIR/LIBDIR/libpthread.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 ++TMPDIR/usr/share/gdb/* usr/share/gdb diff --cc debian/debhelper.in/libc-dev.install.hurd-i386 index 000000000,000000000..c5ccb7458 new file mode 100644 --- /dev/null +++ b/debian/debhelper.in/libc-dev.install.hurd-i386 @@@ -1,0 -1,0 +1,21 @@@ ++TMPDIR/LIBDIR/libBrokenLocale.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/libm.a LIBDIR ++TMPDIR/LIBDIR/libmachuser.a LIBDIR ++TMPDIR/LIBDIR/libmcheck.a LIBDIR ++TMPDIR/LIBDIR/libpthread.a LIBDIR ++TMPDIR/LIBDIR/libpthread_syms.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 diff --cc debian/debhelper.in/libc-dev.lintian-overrides index 000000000,000000000..897ba7246 new file mode 100644 --- /dev/null +++ b/debian/debhelper.in/libc-dev.lintian-overrides @@@ -1,0 -1,0 +1,3 @@@ ++# Those file are actually .o files not package in a ar archive, and ++# thus should not be stripped ++LIBC-dev: unstripped-binary-or-object */libmcheck.a diff --cc debian/debhelper.in/libc-devtools.install index 000000000,000000000..7a0024da0 new file mode 100644 --- /dev/null +++ b/debian/debhelper.in/libc-devtools.install @@@ -1,0 -1,0 +1,5 @@@ ++debian/tmp-libc/usr/bin/memusage usr/bin ++debian/tmp-libc/usr/bin/memusagestat usr/bin ++debian/tmp-libc/usr/bin/mtrace usr/bin ++debian/tmp-libc/usr/bin/sotruss usr/bin ++debian/tmp-libc/usr/bin/sprof usr/bin diff --cc debian/debhelper.in/libc-devtools.lintian-overrides index 000000000,000000000..273ab1d88 new file mode 100644 --- /dev/null +++ b/debian/debhelper.in/libc-devtools.lintian-overrides @@@ -1,0 -1,0 +1,5 @@@ ++# these manpages are provided by the manpages package ++libc-devtools: binary-without-manpage usr/bin/memusage ++libc-devtools: binary-without-manpage usr/bin/memusagestat ++libc-devtools: binary-without-manpage usr/bin/mtrace ++libc-devtools: binary-without-manpage usr/bin/sprof diff --cc debian/debhelper.in/libc-devtools.manpages index 000000000,000000000..c43e02daa new file mode 100644 --- /dev/null +++ b/debian/debhelper.in/libc-devtools.manpages @@@ -1,0 -1,0 +1,1 @@@ ++debian/local/manpages/sotruss.1 diff --cc debian/debhelper.in/libc-l10n.install index 000000000,000000000..48a012b46 new file mode 100644 --- /dev/null +++ b/debian/debhelper.in/libc-l10n.install @@@ -1,0 -1,0 +1,2 @@@ ++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 diff --cc debian/debhelper.in/libc-otherbuild.install index 000000000,000000000..071d0e21f new file mode 100644 --- /dev/null +++ b/debian/debhelper.in/libc-otherbuild.install @@@ -1,0 -1,0 +1,3 @@@ ++# This file is used for making NPTL and other ++# optimized libraries. ++TMPDIR/SLIBDIR/*.so* SLIBDIR diff --cc debian/debhelper.in/libc-otherbuild.lintian-overrides index 000000000,000000000..734932670 new file mode 100644 --- /dev/null +++ b/debian/debhelper.in/libc-otherbuild.lintian-overrides @@@ -1,0 -1,0 +1,14 @@@ ++# 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-GLIBC_VERSION.so ++ ++# ld.so must be executable, otherwise the system will not work ++LIBC-FLAVOR: shared-library-is-executable */ld-GLIBC_VERSION.so 0755 ++ ++# It is normal that the ELF dynamic linker does not need any other ++# library ++LIBC-FLAVOR: shared-lib-without-dependency-information */ld-GLIBC_VERSION.so ++ ++# The libraries are installed in an hwcap directory, which contrary ++# to what lintian thinks, is controlled by ldconfig ++LIBC-FLAVOR: package-has-unnecessary-activation-of-ldconfig-trigger diff --cc debian/debhelper.in/libc-otherbuild.postinst index 000000000,000000000..d4c1d59f7 new file mode 100644 --- /dev/null +++ b/debian/debhelper.in/libc-otherbuild.postinst @@@ -1,0 -1,0 +1,13 @@@ ++#!/bin/sh ++ ++set -e ++ ++if [ "$1" = "configure" ] ++then ++ # /etc/ld.so.nohwcap code: ++ __NOHWCAP__ ++fi ++ ++#DEBHELPER# ++ ++exit 0 diff --cc debian/debhelper.in/libc-otherbuild.postrm index 000000000,000000000..bd6445344 new file mode 100644 --- /dev/null +++ b/debian/debhelper.in/libc-otherbuild.postrm @@@ -1,0 -1,0 +1,12 @@@ ++#!/bin/sh ++ ++set -e ++ ++if [ "$1" = "remove" ]; then ++ # /etc/ld.so.nohwcap code ++ __NOHWCAP__ ++fi ++ ++#DEBHELPER# ++ ++exit 0 diff --cc debian/debhelper.in/libc-prof.install index 000000000,000000000..86fd85e50 new file mode 100644 --- /dev/null +++ b/debian/debhelper.in/libc-prof.install @@@ -1,0 -1,0 +1,1 @@@ ++TMPDIR/LIBDIR/*_p.a LIBDIR diff --cc debian/debhelper.in/libc-udeb.install index 000000000,000000000..93d04dfb7 new file mode 100644 --- /dev/null +++ b/debian/debhelper.in/libc-udeb.install @@@ -1,0 -1,0 +1,16 @@@ ++TMPDIR/RTLDDIR/*.so* RTLDDIR ++TMPDIR/SLIBDIR/ld*.so* SLIBDIR ++TMPDIR/SLIBDIR/libm-*.so* SLIBDIR ++TMPDIR/SLIBDIR/libm.so* SLIBDIR ++TMPDIR/SLIBDIR/libmvec-* SLIBDIR ++TMPDIR/SLIBDIR/libmvec.so* SLIBDIR ++TMPDIR/SLIBDIR/libdl*.so* SLIBDIR ++TMPDIR/SLIBDIR/libresolv*.so* SLIBDIR ++TMPDIR/SLIBDIR/libc-*.so* SLIBDIR ++TMPDIR/SLIBDIR/libc.so* SLIBDIR ++TMPDIR/SLIBDIR/libutil* SLIBDIR ++TMPDIR/SLIBDIR/libcrypt* SLIBDIR ++TMPDIR/SLIBDIR/librt*.so* SLIBDIR ++TMPDIR/SLIBDIR/libpthread*.so* SLIBDIR ++TMPDIR/SLIBDIR/libnss_dns*.so* SLIBDIR ++TMPDIR/SLIBDIR/libnss_files*.so* SLIBDIR diff --cc debian/debhelper.in/libc-udeb.install.hurd-i386 index 000000000,000000000..b6d7726dd new file mode 100644 --- /dev/null +++ b/debian/debhelper.in/libc-udeb.install.hurd-i386 @@@ -1,0 -1,0 +1,18 @@@ ++TMPDIR/RTLDDIR/*.so* RTLDDIR ++TMPDIR/SLIBDIR/ld*.so* SLIBDIR ++TMPDIR/SLIBDIR/libm-*.so* SLIBDIR ++TMPDIR/SLIBDIR/libm.so* SLIBDIR ++TMPDIR/SLIBDIR/libmvec-* SLIBDIR ++TMPDIR/SLIBDIR/libmvec.so* SLIBDIR ++TMPDIR/SLIBDIR/libdl*.so* SLIBDIR ++TMPDIR/SLIBDIR/libresolv*.so* SLIBDIR ++TMPDIR/SLIBDIR/libc-*.so* SLIBDIR ++TMPDIR/SLIBDIR/libc.so* SLIBDIR ++TMPDIR/SLIBDIR/libutil* SLIBDIR ++TMPDIR/SLIBDIR/libcrypt* SLIBDIR ++TMPDIR/SLIBDIR/librt*.so* SLIBDIR ++TMPDIR/SLIBDIR/libpthread*.so* SLIBDIR ++TMPDIR/SLIBDIR/libnss_dns*.so* SLIBDIR ++TMPDIR/SLIBDIR/libnss_files*.so* SLIBDIR ++TMPDIR/SLIBDIR/libmachuser*.so* SLIBDIR ++TMPDIR/SLIBDIR/libhurduser*.so* SLIBDIR diff --cc debian/debhelper.in/libc-udeb.links.hurd-i386 index 000000000,000000000..1cd23fce7 new file mode 100644 --- /dev/null +++ b/debian/debhelper.in/libc-udeb.links.hurd-i386 @@@ -1,0 -1,0 +1,1 @@@ ++lib/ld.so.1 lib/ld.so diff --cc debian/debhelper.in/libc.NEWS index 000000000,000000000..e90909cb4 new file mode 100644 --- /dev/null +++ b/debian/debhelper.in/libc.NEWS @@@ -1,0 -1,0 +1,128 @@@ ++glibc (2.31-5) unstable; urgency=medium ++ ++ Starting with glibc 2.31-5, the NIS and NIS+ name service modules ++ libnss_nis.so.2.0.0 and libnss_nisplus.so.2.0.0 are not provided anymore by ++ the libc6 package. People needing those modules have to install the ++ libnss-nis and/or the libnss-nisplus packages, which are recommended by ++ the libc6 package. ++ ++ -- Aurelien Jarno Tue, 01 Dec 2020 08:42:44 +0100 ++ ++glibc (2.31-0experimental2) experimental; urgency=medium ++ ++ Starting with glibc 2.31, the DNS stub resolver does not blindly trust the ++ AD (authenticated data) flag, indicating a DNSSEC validation: ++ ++ - By default the name servers and the network path to them are treated as ++ untrusted. In this mode, the AD flag is not set in queries, and it is ++ automatically cleared in responses, indicating a lack of DNSSEC ++ validation. ++ ++ - A new trust-ad option, set via the options directive in /etc/resolv.conf ++ (or if RES_TRUSTAD is set in _res.options), indicates that the name ++ server is trusted. In this mode, the AD bit, as provided by the name ++ server, is made available to the applications. ++ ++ Therefore if you trust your name servers, for example because you use a ++ locally running validating resolver (e.g. unbound, systemd-resolved or ++ dnsmasq), you might want to add the following line to /etc/resolv.conf: ++ ++ options trust-ad ++ ++ -- Aurelien Jarno Sun, 17 May 2020 15:59:38 +0200 ++ ++glibc (2.26-5) unstable; urgency=medium ++ ++ Starting with version 2.26-1, the glibc requires a 3.2 or later Linux ++ kernel. If you use an older kernel, please upgrade it *before* ++ installing this glibc version. Failing to do so will end-up with the ++ following failure: ++ ++ Preparing to unpack .../libc6_2.26-5_amd64.deb ... ++ ERROR: This version of the GNU libc requires kernel version ++ 3.2 or later. Please upgrade your kernel before installing ++ glibc. ++ ++ The decision to not support older kernels is a GNU libc upstream ++ decision. ++ ++ Note: This obviously does not apply to non-Linux kernels. ++ ++ -- Aurelien Jarno Tue, 23 Jan 2018 22:03:12 +0100 ++ ++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/ instead of the more ++ traditional /lib, where is the multiarch triplet and can be ++ retrieved with 'dpkg-architecture -qDEB_HOST_MULTIARCH'. Similarly the ++ includes are now shipped in /usr/include/ 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/ -I/usr/include/ ++ ++ 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/ ++ CPATH=/usr/include/ ++ export LIBRARY_PATH CPATH ++ ++ -- Aurelien Jarno Mon, 09 Jan 2012 12:47:16 +0100 ++ ++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 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 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 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 Tue, 24 Apr 2007 00:26:48 +0200 diff --cc debian/debhelper.in/libc.README.Debian index 000000000,000000000..c2d7bbecb new file mode 100644 --- /dev/null +++ b/debian/debhelper.in/libc.README.Debian @@@ -1,0 -1,0 +1,116 @@@ ++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. ++A6: ++ ++The program is broken. It probably says "extern int errno" somewhere, ++instead of including . 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. diff --cc debian/debhelper.in/libc.dirs index 000000000,000000000..eff2b4328 new file mode 100644 --- /dev/null +++ b/debian/debhelper.in/libc.dirs @@@ -1,0 -1,0 +1,1 @@@ ++etc/ld.so.conf.d diff --cc debian/debhelper.in/libc.docs index 000000000,000000000..93d9844b6 new file mode 100644 --- /dev/null +++ b/debian/debhelper.in/libc.docs @@@ -1,0 -1,0 +1,2 @@@ ++NEWS ++hesiod/README.hesiod diff --cc debian/debhelper.in/libc.install index 000000000,000000000..a01eb7291 new file mode 100644 --- /dev/null +++ b/debian/debhelper.in/libc.install @@@ -1,0 -1,0 +1,6 @@@ ++TMPDIR/RTLDDIR/*.so* RTLDDIR ++TMPDIR/SLIBDIR/*.so* SLIBDIR ++TMPDIR/LIBDIR/gconv/* LIBDIR/gconv ++TMPDIR/LIBDIR/audit/* LIBDIR/audit ++ ++TMPDIR/etc/ld.so.conf.d /etc diff --cc debian/debhelper.in/libc.lintian-overrides index 000000000,000000000..a3929d90d new file mode 100644 --- /dev/null +++ b/debian/debhelper.in/libc.lintian-overrides @@@ -1,0 -1,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-GLIBC_VERSION.so ++ ++# ld.so must be executable, otherwise the system will not work ++LIBC: shared-library-is-executable */ld-GLIBC_VERSION.so 0755 ++ ++# It is normal that the ELF dynamic linker does not need any other ++# library ++LIBC: shared-lib-without-dependency-information */ld-GLIBC_VERSION.so ++ ++# dependency on debconf is not needed, as glibc has a fallback to tty ++LIBC: missing-debconf-dependency-for-preinst diff --cc debian/debhelper.in/libc.postinst index 000000000,000000000..f52a1430b new file mode 100644 --- /dev/null +++ b/debian/debhelper.in/libc.postinst @@@ -1,0 -1,0 +1,172 @@@ ++#!/bin/sh ++set -e ++export LC_ALL=C ++ ++type=$1 ++preversion=$2 ++ ++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 ++ # /etc/ld.so.nohwcap code: ++ __NOHWCAP__ ++fi ++ ++if [ "$type" = configure -a -z "$DPKG_ROOT" ] ++then ++ # Load debconf module if available ++ if [ -f /usr/share/debconf/confmodule ] ; then ++ . /usr/share/debconf/confmodule ++ fi ++ ++ if [ -n "$preversion" ] && [ -x "$(which ischroot)" ] && ! ischroot; then ++ if dpkg --compare-versions "$preversion" lt GLIBC_VERSION; 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 openssh-server postgresql-common proftpd" ++ check="$check postfix postfix-tls rsync samba sasl2-bin slapd" ++ check="$check smail sendmail snmpd spamassassin vsftpd" ++ check="$check 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 ++ case "$service" in ++ gdm) ++ echo -n " $service: reloading..." ++ if invoke-rc.d ${service} reload > /dev/null 2>&1; then ++ echo "done." ++ else ++ echo "FAILED! ($?)" ++ failed="$service $failed" ++ fi ++ ;; ++ *) ++ echo -n " $service: restarting..." ++ if invoke-rc.d ${service} 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 \`invoke-rc.d start'" ++ echo "If the service still fails to start, you may need to file a bug on" ++ echo "${DPKG_MAINTSCRIPT_PACKAGE}:${DPKG_MAINTSCRIPT_ARCH} 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 GLIBC_VERSION ++ fi # Upgrading ++ ++ # Restart init. Currently handles chroots, systemd and upstart, and ++ # assumes anything else is going to not fail at behaving like ++ # sysvinit: ++ TELINIT=yes ++ if ischroot 2>/dev/null; then ++ # Don't bother trying to re-exec init from a chroot: ++ TELINIT=no ++ elif [ -d /run/systemd/system ]; then ++ # Skip if systemd is the active PID 1, since systemd doesn't ++ # need a reexec for a clean shutdown ++ TELINIT=no ++ fi ++ if [ "$TELINIT" = "yes" ]; then ++ telinit u 2>/dev/null || true ; sleep 1 ++ fi ++fi ++ ++#DEBHELPER# ++ ++exit 0 diff --cc debian/debhelper.in/libc.postrm index 000000000,000000000..4c5cc6e02 new file mode 100644 --- /dev/null +++ b/debian/debhelper.in/libc.postrm @@@ -1,0 -1,0 +1,31 @@@ ++#! /bin/sh ++set -e ++ ++if [ "$1" = remove ]; then ++ # 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} ++ 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 ++ ++#DEBHELPER# ++ ++exit 0 diff --cc debian/debhelper.in/libc.preinst index 000000000,000000000..133ca4780 new file mode 100644 --- /dev/null +++ b/debian/debhelper.in/libc.preinst @@@ -1,0 -1,0 +1,274 @@@ ++#!/bin/sh ++set -e ++export LC_ALL=C ++ ++type=$1 ++preversion=$2 ++ ++kernel_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 ++} ++ ++if [ "$type" != abort-upgrade -a -z "$DPKG_ROOT" ] ++then ++ # Check if the debconf module is available and usable ++ USE_DEBCONF= ++ if [ "$DEBIAN_HAS_FRONTEND" ]; then ++ # Debconf is already loaded, so we already checked if the frontend ++ # is usable or not ++ USE_DEBCONF=1 ++ elif [ -f /usr/share/debconf/confmodule ]; then ++ # cdebconf has a working fallback mechanism in case dialog ++ # is not usable, so do not try to do anything smart here ++ if [ "$DEBCONF_USE_CDEBCONF" ] ; then ++ USE_DEBCONF=1 ++ # debconf requires perl ++ elif perl -e "" 2>/dev/null ; then ++ # Check that the selected frontend will work ++ if [ -n "$DEBIAN_FRONTEND" ] ; then ++ frontend="$DEBIAN_FRONTEND" ++ else ++ # Query the frontend without first sourcing the confmodule to avoid ++ # losing control of the tty. This snippet must not be copied blindly. ++ frontend="$(echo 'GET debconf/frontend' | debconf-communicate | sed '/^0 /!d;s/^0 //')" ++ frontend="${frontend:-Dialog}" ++ fi ++ frontend=`echo $frontend | tr '[:upper:]' '[:lower:]'` ++ case "$frontend" in ++ dialog) ++ # debconf uses whiptail by default unless dialog is available and ++ # $DEBCONF_FORCE_DIALOG is set ++ if [ -x "$(which whiptail)" ] && ! ( [ -n "$DEBCONF_FORCE_DIALOG" ] && [ -x "$(which dialog)" ] ); then ++ frontend=whiptail ++ fi ++ # Only enable debconf if the whiptail/dialog are not available ++ # (in which case debconf has a fallback mechanism) or usable ++ if ! [ -x "$(which $frontend)" ] || $frontend --version > /dev/null 2>&1 ; then ++ USE_DEBCONF=1 ++ fi ++ ;; ++ *) ++ # For now assume that all other frontends are fine ++ USE_DEBCONF=1 ++ ;; ++ esac ++ fi ++ fi ++ ++ # Load debconf module if available and usable ++ if [ "$USE_DEBCONF" ]; then ++ . /usr/share/debconf/confmodule ++ fi ++ ++ # 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 ++ ++ # glibc kernel version check ++ system=`uname -s` ++ if [ "$system" = "Linux" ] ++ then ++ # sanity checking for the appropriate kernel on each architecture. ++ kernel_ver=`uname -r` ++ case ${DPKG_MAINTSCRIPT_ARCH} in ++ *) ++ # The GNU libc requires a >= 3.2 kernel, found in wheezy ++ kernel_ver_min=3.2 ++ kernel_ver_rec=3.2 ++ ;; ++ esac ++ ++ if kernel_compare_versions "$kernel_ver" lt $kernel_ver_min ++ then ++ if [ "$USE_DEBCONF" ] ++ then ++ db_version 2.0 ++ db_fset glibc/kernel-too-old seen false ++ db_reset glibc/kernel-too-old ++ db_subst glibc/kernel-too-old kernel_ver $kernel_ver_rec ++ db_input critical glibc/kernel-too-old || true ++ db_go ++ db_stop ++ else ++ echo "ERROR: This version of the GNU libc requires kernel version" ++ echo "$kernel_ver_rec or later. Please upgrade your kernel before installing" ++ echo "glibc." ++ echo ++ fi ++ exit 1 ++ fi ++ ++ if kernel_compare_versions "$kernel_ver" lt $kernel_ver_rec ++ then ++ if [ "$USE_DEBCONF" ] ++ then ++ db_version 2.0 ++ db_fset glibc/kernel-not-supported seen false ++ db_reset glibc/kernel-not-supported ++ db_subst glibc/kernel-not-supported kernel_ver $kernel_ver_rec ++ db_input critical glibc/kernel-not-supported || true ++ db_go ++ db_stop ++ else ++ echo "WARNING: This version of the GNU libc requires kernel version" ++ echo "$kernel_ver_rec or later. Older versions might work but are not officially" ++ echo "supported. Please consider upgrading your kernel." ++ echo ++ fi ++ fi ++ ++ elif [ $system = "GNU/kFreeBSD" ] ++ then ++ kernel_ver=`uname -r` ++ kernel_ver_min=8.3 ++ if kernel_compare_versions "$kernel_ver" lt $kernel_ver_min ++ then ++ if [ "$USE_DEBCONF" ] ++ then ++ db_version 2.0 ++ db_version 2.0 ++ db_fset glibc/kernel-too-old seen false ++ db_reset glibc/kernel-too-old ++ db_subst glibc/kernel-too-old kernel_ver $kernel_ver_min ++ db_input critical glibc/kernel-too-old || true ++ db_go ++ db_stop ++ else ++ echo "ERROR: This version of the GNU libc requires kernel version" ++ echo "$kernel_ver_min or later. Please upgrade your kernel before installing" ++ echo "glibc." ++ echo ++ fi ++ exit 1 ++ fi ++ fi ++fi ++ ++if [ "$type" = upgrade -a -z "$DPKG_ROOT" ] ++then ++ if [ -n "$preversion" ] && [ -x "$(which ischroot)" ] && ! ischroot; then ++ # NSS authentication trouble guard ++ if dpkg --compare-versions "$preversion" lt GLIBC_VERSION; then ++ if pidof xscreensaver xlockmore >/dev/null; then ++ if [ "$USE_DEBCONF" ] ; 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 [ "$USE_DEBCONF" ] ; 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 GLIBC_VERSION ++ fi # Upgrading ++ ++ # This will keep us from using hwcap libs (optimized) during an ++ # upgrade. ++ touch /etc/ld.so.nohwcap ++fi ++ ++#DEBHELPER# ++ ++if [ -n "$preversion" ]; then ++ if dpkg --compare-versions "$preversion" lt GLIBC_VERSION; then ++ # unconditionally wipe ld.so.cache on major version upgrades; this ++ # makes those upgrades a bit slower, but is less error-prone than ++ # hoping we notice every time the cache format is changed upstream ++ rm -f "$DPKG_ROOT/etc/ld.so.cache" ++ rm -f "$DPKG_ROOT/var/cache/ldconfig/aux-cache" ++ fi ++fi ++ ++exit 0 diff --cc debian/debhelper.in/libc.templates index 000000000,000000000..44e4be81e new file mode 100644 --- /dev/null +++ b/debian/debhelper.in/libc.templates @@@ -1,0 -1,0 +1,74 @@@ ++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 ++ 'invoke-rc.d 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. ++ ++Template: glibc/kernel-too-old ++Type: error ++_Description: Kernel must be upgraded ++ This version of the GNU libc requires kernel version ${kernel_ver} or ++ later. Please upgrade your kernel before installing glibc. ++ ++Template: glibc/kernel-not-supported ++Type: note ++_Description: Kernel version not supported ++ This version of the GNU libc requires kernel version ${kernel_ver} or ++ later. Older versions might work but are not officially supported by ++ Debian. Please consider upgrading your kernel. diff --cc debian/debhelper.in/locales-all.NEWS index 000000000,000000000..006de70b2 new file mode 100644 --- /dev/null +++ b/debian/debhelper.in/locales-all.NEWS @@@ -1,0 -1,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 Mon, 26 Nov 2007 18:56:32 +0100 ++ diff --cc debian/debhelper.in/locales-all.dirs index 000000000,000000000..5f19b31dd new file mode 100644 --- /dev/null +++ b/debian/debhelper.in/locales-all.dirs @@@ -1,0 -1,0 +1,1 @@@ ++usr/lib/locale diff --cc debian/debhelper.in/locales-all.install index 000000000,000000000..392e822e5 new file mode 100644 --- /dev/null +++ b/debian/debhelper.in/locales-all.install @@@ -1,0 -1,0 +1,1 @@@ ++BUILD-TREE/locales-all/usr/lib/locale/* /usr/lib/locale diff --cc debian/debhelper.in/locales-all.postinst index 000000000,000000000..6a95b00b0 new file mode 100644 --- /dev/null +++ b/debian/debhelper.in/locales-all.postinst @@@ -1,0 -1,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 ++ diff --cc debian/debhelper.in/locales-all.prerm index 000000000,000000000..382eb6a17 new file mode 100644 --- /dev/null +++ b/debian/debhelper.in/locales-all.prerm @@@ -1,0 -1,0 +1,31 @@@ ++#!/bin/sh ++set -e ++ ++pathfind() { ++ OLDIFS="$IFS" ++ IFS=: ++ for p in $PATH; do ++ if [ -x "$p/$*" ]; then ++ IFS="$OLDIFS" ++ return 0 ++ fi ++ done ++ IFS="$OLDIFS" ++ return 1 ++} ++ ++case "$1" in ++ remove|purge) ++ # Is locales installed? ++ if pathfind locale-gen ; then ++ # If yes, generate locales selected in the debconf question ++ locale-gen ++ fi ++ ;; ++ *) ++ ;; ++esac ++ ++#DEBHELPER# ++ ++exit 0 diff --cc debian/debhelper.in/locales.NEWS index 000000000,000000000..12b746a25 new file mode 100644 --- /dev/null +++ b/debian/debhelper.in/locales.NEWS @@@ -1,0 -1,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 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 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 Tue, 11 Apr 2006 21:24:13 +0200 ++ diff --cc debian/debhelper.in/locales.README.Debian index 000000000,000000000..3083b1547 new file mode 100644 --- /dev/null +++ b/debian/debhelper.in/locales.README.Debian @@@ -1,0 -1,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 Thu 29 Nov 2007 18:54:12 +0100 diff --cc debian/debhelper.in/locales.config index 000000000,000000000..d073fdb21 new file mode 100644 --- /dev/null +++ b/debian/debhelper.in/locales.config @@@ -1,0 -1,0 +1,94 @@@ ++#! /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' -e 's/iw_IL/he_IL/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 [ -n "$SUPPORTED_LOCALES" ] && [ -n "$DEFAULT_ENVIRONMENT" ]; then ++ if echo "$SUPPORTED_LOCALES" | grep -q -e "\b$DEFAULT_ENVIRONMENT\b" ; then ++ db_set locales/default_environment_locale "$DEFAULT_ENVIRONMENT" ++ fi ++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 diff --cc debian/debhelper.in/locales.dirs index 000000000,000000000..5f19b31dd new file mode 100644 --- /dev/null +++ b/debian/debhelper.in/locales.dirs @@@ -1,0 -1,0 +1,1 @@@ ++usr/lib/locale diff --cc debian/debhelper.in/locales.install index 000000000,000000000..f5a7f404e new file mode 100644 --- /dev/null +++ b/debian/debhelper.in/locales.install @@@ -1,0 -1,0 +1,5 @@@ ++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 diff --cc debian/debhelper.in/locales.links index 000000000,000000000..01d3919e1 new file mode 100644 --- /dev/null +++ b/debian/debhelper.in/locales.links @@@ -1,0 -1,0 +1,1 @@@ ++etc/locale.alias usr/share/locale/locale.alias diff --cc debian/debhelper.in/locales.manpages index 000000000,000000000..f7aca6326 new file mode 100644 --- /dev/null +++ b/debian/debhelper.in/locales.manpages @@@ -1,0 -1,0 +1,8 @@@ ++debian/local/manpages/locale-gen.8 ++debian/local/manpages/locale.gen.5 ++debian/local/manpages/update-locale.8 ++debian/local/manpages/validlocale.8 ++debian/local/manpages/de/validlocale.de.8 ++debian/local/manpages/fr/validlocale.fr.8 ++debian/local/manpages/es/validlocale.es.8 ++debian/local/manpages/pl/validlocale.pl.8 diff --cc debian/debhelper.in/locales.postinst index 000000000,000000000..81ed275e3 new file mode 100644 --- /dev/null +++ b/debian/debhelper.in/locales.postinst @@@ -1,0 -1,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 -W -f='${db:Status-Abbrev}' locales-all 2>/dev/null | grep -q '^i' ; 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 diff --cc debian/debhelper.in/locales.postrm index 000000000,000000000..3add654db new file mode 100644 --- /dev/null +++ b/debian/debhelper.in/locales.postrm @@@ -1,0 -1,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 diff --cc debian/debhelper.in/locales.prerm index 000000000,000000000..30b3d6ba6 new file mode 100644 --- /dev/null +++ b/debian/debhelper.in/locales.prerm @@@ -1,0 -1,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 diff --cc debian/debhelper.in/locales.templates index 000000000,000000000..2a3c5335b new file mode 100644 --- /dev/null +++ b/debian/debhelper.in/locales.templates @@@ -1,0 -1,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, C.UTF-8, ${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. diff --cc debian/debhelper.in/nscd.dirs index 000000000,000000000..4a278c4a8 new file mode 100644 --- /dev/null +++ b/debian/debhelper.in/nscd.dirs @@@ -1,0 -1,0 +1,1 @@@ ++var/cache/nscd diff --cc debian/debhelper.in/nscd.init index 000000000,000000000..4eeeb9e2f new file mode 100644 --- /dev/null +++ b/debian/debhelper.in/nscd.init @@@ -1,0 -1,0 +1,146 @@@ ++#!/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 ++} ++ ++invalidate_cache() ++{ ++ for table in passwd group hosts services netgroup ; do ++ $DAEMON --invalidate $table ++ done ++} ++ ++case "$1" in ++start) ++ log_daemon_msg "Starting $DESC" "$NAME" ++ start_nscd ++ case "$?" in ++ 0) invalidate_cache ; 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" ++ invalidate_cache ++ 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 ++ ;; ++try-restart) ++ log_daemon_msg "Trying to restart $DESC" "$NAME" ++ stop_nscd ++ case "$?" in ++ 0) ++ start_nscd ++ case "$?" in ++ 0) invalidate_cache ; log_end_msg 0 ; exit 0 ;; ++ *) log_failure_msg " (failed to start)." ; exit 1 ;; ++ esac ++ ;; ++ 1) log_success_msg "(not running)." ; exit 0 ;; ++ *) 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 ++ diff --cc debian/debhelper.in/nscd.install index 000000000,000000000..440b39a57 new file mode 100644 --- /dev/null +++ b/debian/debhelper.in/nscd.install @@@ -1,0 -1,0 +1,3 @@@ ++debian/tmp-libc/usr/sbin/nscd usr/sbin ++nscd/nscd.conf /etc ++ diff --cc debian/debhelper.in/nscd.manpages index 000000000,000000000..35d1692f4 new file mode 100644 --- /dev/null +++ b/debian/debhelper.in/nscd.manpages @@@ -1,0 -1,0 +1,2 @@@ ++debian/local/manpages/nscd.conf.5 ++debian/local/manpages/nscd.8 diff --cc debian/debhelper.in/nscd.postrm index 000000000,000000000..899e0e6c6 new file mode 100644 --- /dev/null +++ b/debian/debhelper.in/nscd.postrm @@@ -1,0 -1,0 +1,14 @@@ ++#!/bin/sh ++set -e ++ ++case "$1" in ++ purge) ++ rm -rf /var/cache/nscd ++ ;; ++ *) ++ ;; ++esac ++ ++#DEBHELPER# ++ ++exit 0 diff --cc debian/generate-supported.mk index 000000000,000000000..d2a28c2dc new file mode 100644 --- /dev/null +++ b/debian/generate-supported.mk @@@ -1,0 -1,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 diff --cc debian/glibc-source.filelist index 000000000,000000000..b17fcbd2e new file mode 100644 --- /dev/null +++ b/debian/glibc-source.filelist @@@ -1,0 -1,0 +1,91 @@@ ++debian/changelog ++debian/changelog.upstream ++debian/compat ++debian/control ++debian/control.in ++debian/copyright ++debian/debhelper.in ++debian/generate-supported.mk ++debian/glibc-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/libc0.3.symbols.hurd-i386 ++debian/libc6.1.symbols.alpha ++debian/libc6-amd64.symbols.i386 ++debian/libc6-amd64.symbols.x32 ++debian/libc6-i386.symbols.amd64 ++debian/libc6-i386.symbols.x32 ++debian/libc6-mips32.symbols.mips64 ++debian/libc6-mips32.symbols.mips64el ++debian/libc6-mips32.symbols.mips64r6 ++debian/libc6-mips32.symbols.mips64r6el ++debian/libc6-mips32.symbols.mipsn32 ++debian/libc6-mips32.symbols.mipsn32el ++debian/libc6-mips32.symbols.mipsn32r6 ++debian/libc6-mips32.symbols.mipsn32r6el ++debian/libc6-mips64.symbols.mips ++debian/libc6-mips64.symbols.mipsel ++debian/libc6-mips64.symbols.mipsn32 ++debian/libc6-mips64.symbols.mipsn32el ++debian/libc6-mips64.symbols.mipsn32r6 ++debian/libc6-mips64.symbols.mipsn32r6el ++debian/libc6-mips64.symbols.mipsr6 ++debian/libc6-mips64.symbols.mipsr6el ++debian/libc6-mipsn32.symbols.mips ++debian/libc6-mipsn32.symbols.mips64 ++debian/libc6-mipsn32.symbols.mips64el ++debian/libc6-mipsn32.symbols.mips64r6 ++debian/libc6-mipsn32.symbols.mips64r6el ++debian/libc6-mipsn32.symbols.mipsel ++debian/libc6-mipsn32.symbols.mipsr6 ++debian/libc6-mipsn32.symbols.mipsr6el ++debian/libc6-ppc64.symbols.powerpc ++debian/libc6-s390.symbols.s390x ++debian/libc6-sparc64.symbols.sparc ++debian/libc6-sparc.symbols.sparc64 ++debian/libc6.symbols.amd64 ++debian/libc6.symbols.arm ++debian/libc6.symbols.arm64 ++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.mips64 ++debian/libc6.symbols.mips64el ++debian/libc6.symbols.mips64r6 ++debian/libc6.symbols.mips64r6el ++debian/libc6.symbols.mipsel ++debian/libc6.symbols.mipsn32 ++debian/libc6.symbols.mipsn32el ++debian/libc6.symbols.mipsn32r6 ++debian/libc6.symbols.mipsn32r6el ++debian/libc6.symbols.mipsr6 ++debian/libc6.symbols.mipsr6el ++debian/libc6.symbols.powerpc ++debian/libc6.symbols.ppc64 ++debian/libc6.symbols.ppc64el ++debian/libc6.symbols.s390x ++debian/libc6.symbols.sparc ++debian/libc6.symbols.sparc64 ++debian/libc6.symbols.x32 ++debian/libc6-x32.symbols.amd64 ++debian/libc6-x32.symbols.i386 ++debian/local ++debian/patches ++debian/po ++debian/quiltrc ++debian/rules ++debian/rules.d ++debian/script.in ++debian/shlibs-add-udebs ++debian/source ++debian/symbols.wildcards ++debian/sysdeps ++debian/tests ++debian/testsuite-xfail-debian.mk ++debian/watch diff --cc debian/libc0.1-i386.symbols.kfreebsd-amd64 index 000000000,000000000..8e7f62775 new file mode 100644 --- /dev/null +++ b/debian/libc0.1-i386.symbols.kfreebsd-amd64 @@@ -1,0 -1,0 +1,6 @@@ ++#include "libc0.1.symbols.common" ++ld.so.1 #PACKAGE# (>= 2.17-91), #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libc.so.0.1 #PACKAGE# (>= 2.17-91), #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++ diff --cc debian/libc0.1.symbols.common index 000000000,000000000..e363a12d5 new file mode 100644 --- /dev/null +++ b/debian/libc0.1.symbols.common @@@ -1,0 -1,0 +1,55 @@@ ++libc.so.0.1 #PACKAGE# (>= 2.17-91), #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libBrokenLocale.so.1 #PACKAGE# (>= 2.17-91), #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libSegFault.so #PACKAGE# (>= 2.17-91), #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libcrypt.so.1 #PACKAGE# (>= 2.17-91), #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libdl.so.2 #PACKAGE# (>= 2.17-91), #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libm.so.1 #PACKAGE# (>= 2.17-91), #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libmemusage.so #PACKAGE# (>= 2.17-91), #PACKAGE# #MINVER# ++ 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# (>= 2.17-91), #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libnss_compat.so.2 #PACKAGE# (>= 2.17-91), #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libnss_dns.so.2 #PACKAGE# (>= 2.17-91), #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libnss_files.so.2 #PACKAGE# (>= 2.17-91), #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libnss_hesiod.so.2 #PACKAGE# (>= 2.17-91), #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libpcprofile.so #PACKAGE# (>= 2.17-91), #PACKAGE# #MINVER# ++ __cyg_profile_func_enter@Base 2.3.6 ++ __cyg_profile_func_exit@Base 2.3.6 ++#include "symbols.wildcards" ++libresolv.so.2 #PACKAGE# (>= 2.17-91), #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++librt.so.1 #PACKAGE# (>= 2.17-91), #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libutil.so.1 #PACKAGE# (>= 2.17-91), #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libanl.so.1 #PACKAGE# (>= 2.17-91), #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libpthread.so.0 #PACKAGE# (>= 2.17-91), #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 ++ pthread_getaffinity_np@GLIBC_2.3.4 2.18 ++ pthread_setaffinity_np@GLIBC_2.3.4 2.18 ++ pthread_attr_getaffinity_np@GLIBC_2.3.4 2.18 ++ pthread_attr_setaffinity_np@GLIBC_2.3.4 2.18 ++ pthread_setname_np@GLIBC_2.12 2.18 ++ pthread_getname_np@GLIBC_2.12 2.18 ++libthread_db.so.1 #PACKAGE# (>= 2.17-91), #PACKAGE# #MINVER# ++#include "symbols.wildcards" diff --cc debian/libc0.1.symbols.kfreebsd-amd64 index 000000000,000000000..a4636b30e new file mode 100644 --- /dev/null +++ b/debian/libc0.1.symbols.kfreebsd-amd64 @@@ -1,0 -1,0 +1,3 @@@ ++#include "libc0.1.symbols.common" ++ld-kfreebsd-x86-64.so.1 #PACKAGE# (>= 2.17-91), #PACKAGE# #MINVER# ++#include "symbols.wildcards" diff --cc debian/libc0.1.symbols.kfreebsd-i386 index 000000000,000000000..4268c43d9 new file mode 100644 --- /dev/null +++ b/debian/libc0.1.symbols.kfreebsd-i386 @@@ -1,0 -1,0 +1,3 @@@ ++#include "libc0.1.symbols.common" ++ld.so.1 #PACKAGE# (>= 2.17-91), #PACKAGE# #MINVER# ++#include "symbols.wildcards" diff --cc debian/libc0.3.symbols.hurd-i386 index 000000000,000000000..98f7b56c2 new file mode 100644 --- /dev/null +++ b/debian/libc0.3.symbols.hurd-i386 @@@ -1,0 -1,0 +1,1148 @@@ ++ld.so.1 #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libc.so.0.3 #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++ (symver|optional)HURD_CTHREADS_0.3 2.11 ++ __errno_location@GLIBC_2.2.6 2.29-8~ ++ __h_errno_location@GLIBC_2.2.6 2.29-8~ ++libBrokenLocale.so.1 #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libSegFault.so #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# ++ 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" ++libpcprofile.so #PACKAGE# #MINVER# ++ __cyg_profile_func_enter@Base 2.3.6 ++ __cyg_profile_func_exit@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_routines@Base 2.19-14~ ++ __auth_getids@Base 2.11 ++ __auth_makeauth@Base 2.11 ++ __auth_server_authenticate@Base 2.11 ++ __auth_server_authenticate_reply@Base 2.23-4 ++ __auth_server_authenticate_request@Base 2.23-4 ++ __auth_user_authenticate@Base 2.11 ++ __auth_user_authenticate_reply@Base 2.23-4 ++ __auth_user_authenticate_request@Base 2.23-4 ++ __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_exec_paths@Base 2.26-3~ ++ __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_exec_paths@Base 2.26-3~ ++ __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_record_lock@Base 2.29-3~ ++ __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 ++ __file_utimens@Base 2.27-2~ ++ __fsys_forward@Base 2.11 ++ __fsys_get_children@Base 2.25-3 ++ __fsys_get_options@Base 2.11 ++ __fsys_get_source@Base 2.25-3 ++ __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_async_reply@Base 2.17-6~ ++ __io_async_request@Base 2.17-6~ ++ __io_clear_some_openmodes@Base 2.11 ++ __io_clear_some_openmodes_reply@Base 2.17-6~ ++ __io_clear_some_openmodes_request@Base 2.17-6~ ++ __io_duplicate@Base 2.11 ++ __io_duplicate_reply@Base 2.17-6~ ++ __io_duplicate_request@Base 2.17-6~ ++ __io_eofnotify@Base 2.11 ++ __io_eofnotify_reply@Base 2.17-6~ ++ __io_eofnotify_request@Base 2.17-6~ ++ __io_get_conch@Base 2.11 ++ __io_get_conch_reply@Base 2.17-6~ ++ __io_get_conch_request@Base 2.17-6~ ++ __io_get_icky_async_id@Base 2.11 ++ __io_get_icky_async_id_reply@Base 2.17-6~ ++ __io_get_icky_async_id_request@Base 2.17-6~ ++ __io_get_openmodes@Base 2.11 ++ __io_get_openmodes_reply@Base 2.17-6~ ++ __io_get_openmodes_request@Base 2.17-6~ ++ __io_get_owner@Base 2.11 ++ __io_get_owner_reply@Base 2.17-6~ ++ __io_get_owner_request@Base 2.17-6~ ++ __io_identity@Base 2.11 ++ __io_identity_reply@Base 2.17-6~ ++ __io_identity_request@Base 2.17-6~ ++ __io_map@Base 2.11 ++ __io_map_cntl@Base 2.11 ++ __io_map_cntl_reply@Base 2.17-6~ ++ __io_map_cntl_request@Base 2.17-6~ ++ __io_map_reply@Base 2.17-6~ ++ __io_map_request@Base 2.17-6~ ++ __io_mod_owner@Base 2.11 ++ __io_mod_owner_reply@Base 2.17-6~ ++ __io_mod_owner_request@Base 2.17-6~ ++ __io_pathconf@Base 2.11 ++ __io_pathconf_reply@Base 2.17-6~ ++ __io_pathconf_request@Base 2.17-6~ ++ __io_postnotify@Base 2.11 ++ __io_postnotify_reply@Base 2.17-6~ ++ __io_postnotify_request@Base 2.17-6~ ++ __io_prenotify@Base 2.11 ++ __io_prenotify_reply@Base 2.17-6~ ++ __io_prenotify_request@Base 2.17-6~ ++ __io_read@Base 2.11 ++ __io_read_reply@Base 2.17-6~ ++ __io_read_request@Base 2.17-6~ ++ __io_readable@Base 2.11 ++ __io_readable_reply@Base 2.17-6~ ++ __io_readable_request@Base 2.17-6~ ++ __io_readnotify@Base 2.11 ++ __io_readnotify_reply@Base 2.17-6~ ++ __io_readnotify_request@Base 2.17-6~ ++ __io_readsleep@Base 2.11 ++ __io_readsleep_reply@Base 2.17-6~ ++ __io_readsleep_request@Base 2.17-6~ ++ __io_reauthenticate@Base 2.11 ++ __io_release_conch@Base 2.11 ++ __io_release_conch_reply@Base 2.17-6~ ++ __io_release_conch_request@Base 2.17-6~ ++ __io_restrict_auth@Base 2.11 ++ __io_restrict_auth_reply@Base 2.17-6~ ++ __io_restrict_auth_request@Base 2.17-6~ ++ __io_revoke@Base 2.11 ++ __io_revoke_reply@Base 2.17-6~ ++ __io_revoke_request@Base 2.17-6~ ++ __io_seek@Base 2.11 ++ __io_seek_reply@Base 2.17-6~ ++ __io_seek_request@Base 2.17-6~ ++ __io_select@Base 2.11 ++ __io_select_reply@Base 2.17-6~ ++ __io_select_request@Base 2.17-6~ ++ __io_select_timeout@Base 2.17-6~ ++ __io_select_timeout_reply@Base 2.17-6~ ++ __io_select_timeout_request@Base 2.17-6~ ++ __io_server_version@Base 2.11 ++ __io_server_version_reply@Base 2.17-6~ ++ __io_server_version_request@Base 2.17-6~ ++ __io_set_all_openmodes@Base 2.11 ++ __io_set_all_openmodes_reply@Base 2.17-6~ ++ __io_set_all_openmodes_request@Base 2.17-6~ ++ __io_set_some_openmodes@Base 2.11 ++ __io_set_some_openmodes_reply@Base 2.17-6~ ++ __io_set_some_openmodes_request@Base 2.17-6~ ++ __io_sigio@Base 2.11 ++ __io_sigio_reply@Base 2.17-6~ ++ __io_sigio_request@Base 2.17-6~ ++ __io_stat@Base 2.11 ++ __io_stat_reply@Base 2.17-6~ ++ __io_stat_request@Base 2.17-6~ ++ __io_write@Base 2.11 ++ __io_write_reply@Base 2.17-6~ ++ __io_write_request@Base 2.17-6~ ++ __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 ++ __pci_conf_read@Base 2.27-8+hurd.1 ++ __pci_conf_write@Base 2.27-8+hurd.1 ++ __pci_get_dev_regions@Base 2.27-8+hurd.1 ++ __pci_get_dev_rom@Base 2.27-8+hurd.1 ++ __pci_get_ndevs@Base 2.27-8+hurd.1 ++ __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_code@Base 2.17-93~ ++ __proc_get_code_request@Base 2.17-93~ ++ __proc_get_entry@Base 2.25-4 ++ __proc_get_exe@Base 2.24-17 ++ __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_is_important@Base 2.17-93~ ++ __proc_is_important_request@Base 2.17-93~ ++ __proc_make_login_coll@Base 2.11 ++ __proc_make_login_coll_request@Base 2.11 ++ __proc_make_task_namespace@Base 2.23-4 ++ __proc_make_task_namespace_request@Base 2.23-4 ++ __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_important@Base 2.17-93~ ++ __proc_mark_important_request@Base 2.17-93~ ++ __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_set_code@Base 2.17-93~ ++ __proc_set_code_request@Base 2.17-93~ ++ __proc_set_entry@Base 2.25-4 ++ __proc_set_exe@Base 2.24-17 ++ __proc_set_init_task@Base 2.17-94~ ++ __proc_set_init_task_request@Base 2.17-94~ ++ __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_waitid@Base 2.31-7~ ++ __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_routines@Base 2.19-14~ ++ auth_getids@Base 2.11 ++ auth_makeauth@Base 2.11 ++ auth_server_authenticate@Base 2.11 ++ auth_server_authenticate_reply@Base 2.23-4 ++ auth_server_authenticate_request@Base 2.23-4 ++ auth_user_authenticate@Base 2.11 ++ auth_user_authenticate_reply@Base 2.23-4 ++ auth_user_authenticate_request@Base 2.23-4 ++ 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_exec_paths@Base 2.26-3~ ++ 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_exec_paths@Base 2.26-3~ ++ 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_record_lock@Base 2.29-3~ ++ 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 ++ file_utimens@Base 2.27-2~ ++ fsys_forward@Base 2.11 ++ fsys_get_children@Base 2.25-3 ++ fsys_get_options@Base 2.11 ++ fsys_get_source@Base 2.25-3 ++ 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_async_reply@Base 2.17-6~ ++ io_async_request@Base 2.17-6~ ++ io_clear_some_openmodes@Base 2.11 ++ io_clear_some_openmodes_reply@Base 2.17-6~ ++ io_clear_some_openmodes_request@Base 2.17-6~ ++ io_duplicate@Base 2.11 ++ io_duplicate_reply@Base 2.17-6~ ++ io_duplicate_request@Base 2.17-6~ ++ io_eofnotify@Base 2.11 ++ io_eofnotify_reply@Base 2.17-6~ ++ io_eofnotify_request@Base 2.17-6~ ++ io_get_conch@Base 2.11 ++ io_get_conch_reply@Base 2.17-6~ ++ io_get_conch_request@Base 2.17-6~ ++ io_get_icky_async_id@Base 2.11 ++ io_get_icky_async_id_reply@Base 2.17-6~ ++ io_get_icky_async_id_request@Base 2.17-6~ ++ io_get_openmodes@Base 2.11 ++ io_get_openmodes_reply@Base 2.17-6~ ++ io_get_openmodes_request@Base 2.17-6~ ++ io_get_owner@Base 2.11 ++ io_get_owner_reply@Base 2.17-6~ ++ io_get_owner_request@Base 2.17-6~ ++ io_identity@Base 2.11 ++ io_identity_reply@Base 2.17-6~ ++ io_identity_request@Base 2.17-6~ ++ io_map@Base 2.11 ++ io_map_cntl@Base 2.11 ++ io_map_cntl_reply@Base 2.17-6~ ++ io_map_cntl_request@Base 2.17-6~ ++ io_map_reply@Base 2.17-6~ ++ io_map_request@Base 2.17-6~ ++ io_mod_owner@Base 2.11 ++ io_mod_owner_reply@Base 2.17-6~ ++ io_mod_owner_request@Base 2.17-6~ ++ io_pathconf@Base 2.11 ++ io_pathconf_reply@Base 2.17-6~ ++ io_pathconf_request@Base 2.17-6~ ++ io_postnotify@Base 2.11 ++ io_postnotify_reply@Base 2.17-6~ ++ io_postnotify_request@Base 2.17-6~ ++ io_prenotify@Base 2.11 ++ io_prenotify_reply@Base 2.17-6~ ++ io_prenotify_request@Base 2.17-6~ ++ io_read@Base 2.11 ++ io_read_reply@Base 2.17-6~ ++ io_read_request@Base 2.17-6~ ++ io_readable@Base 2.11 ++ io_readable_reply@Base 2.17-6~ ++ io_readable_request@Base 2.17-6~ ++ io_readnotify@Base 2.11 ++ io_readnotify_reply@Base 2.17-6~ ++ io_readnotify_request@Base 2.17-6~ ++ io_readsleep@Base 2.11 ++ io_readsleep_reply@Base 2.17-6~ ++ io_readsleep_request@Base 2.17-6~ ++ io_reauthenticate@Base 2.11 ++ io_release_conch@Base 2.11 ++ io_release_conch_reply@Base 2.17-6~ ++ io_release_conch_request@Base 2.17-6~ ++ io_restrict_auth@Base 2.11 ++ io_restrict_auth_reply@Base 2.17-6~ ++ io_restrict_auth_request@Base 2.17-6~ ++ io_revoke@Base 2.11 ++ io_revoke_reply@Base 2.17-6~ ++ io_revoke_request@Base 2.17-6~ ++ io_seek@Base 2.11 ++ io_seek_reply@Base 2.17-6~ ++ io_seek_request@Base 2.17-6~ ++ io_select@Base 2.11 ++ io_select_reply@Base 2.17-6~ ++ io_select_request@Base 2.17-6~ ++ io_select_timeout@Base 2.17-6~ ++ io_select_timeout_reply@Base 2.17-6~ ++ io_select_timeout_request@Base 2.17-6~ ++ io_server_version@Base 2.11 ++ io_server_version_reply@Base 2.17-6~ ++ io_server_version_request@Base 2.17-6~ ++ io_set_all_openmodes@Base 2.11 ++ io_set_all_openmodes_reply@Base 2.17-6~ ++ io_set_all_openmodes_request@Base 2.17-6~ ++ io_set_some_openmodes@Base 2.11 ++ io_set_some_openmodes_reply@Base 2.17-6~ ++ io_set_some_openmodes_request@Base 2.17-6~ ++ io_sigio@Base 2.11 ++ io_sigio_reply@Base 2.17-6~ ++ io_sigio_request@Base 2.17-6~ ++ io_stat@Base 2.11 ++ io_stat_reply@Base 2.17-6~ ++ io_stat_request@Base 2.17-6~ ++ io_write@Base 2.11 ++ io_write_reply@Base 2.17-6~ ++ io_write_request@Base 2.17-6~ ++ 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 ++ pci_conf_read@Base 2.27-8+hurd.1 ++ pci_conf_write@Base 2.27-8+hurd.1 ++ pci_get_dev_regions@Base 2.27-8+hurd.1 ++ pci_get_dev_rom@Base 2.27-8+hurd.1 ++ pci_get_ndevs@Base 2.27-8+hurd.1 ++ 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_code@Base 2.17-93~ ++ proc_get_code_request@Base 2.17-93~ ++ proc_get_entry@Base 2.25-4 ++ proc_get_exe@Base 2.24-17 ++ 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_is_important@Base 2.17-93~ ++ proc_is_important_request@Base 2.17-93~ ++ proc_make_login_coll@Base 2.11 ++ proc_make_login_coll_request@Base 2.11 ++ proc_make_task_namespace@Base 2.23-4 ++ proc_make_task_namespace_request@Base 2.23-4 ++ 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_important@Base 2.17-93~ ++ proc_mark_important_request@Base 2.17-93~ ++ 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_set_code@Base 2.17-93~ ++ proc_set_code_request@Base 2.17-93~ ++ proc_set_entry@Base 2.25-4 ++ proc_set_exe@Base 2.24-17 ++ proc_set_init_task@Base 2.17-94~ ++ proc_set_init_task_request@Base 2.17-94~ ++ 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_waitid@Base 2.31-7~ ++ 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_routines@Base 2.19-14~ ++ __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_intr_ack@Base 2.31-1+b1 ++ __device_intr_register@Base 2.31-1+b1 ++ __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 ++ __gsync_requeue@Base 2.23-4 ++ __gsync_wait@Base 2.23-4 ++ __gsync_wake@Base 2.23-4 ++ __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_notify_new_task@Base 2.21 ++ __mach_port_allocate_name_rpc@Base 2.11 ++ __mach_port_allocate_rpc@Base 2.11 ++ __mach_port_clear_protected_payload@Base 2.19-14~ ++ __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_protected_payload@Base 2.19-14~ ++ __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_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_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_supply_completed@Base 2.11 ++ __memory_object_terminate@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 ++ __register_new_task_notification@Base 2.19-14~ ++ __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_name@Base 2.18-5 ++ __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_terminate_release@Base 2.18-0experimental1 ++ __thread_wire@Base 2.11 ++ __vm_allocate_contiguous@Base 2.31-1+b1 ++ __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_msync@Base 2.27-9 ++ __vm_object_sync@Base 2.27-9 ++ __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_wire_all@Base 2.24-9~ ++ __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_intr_ack@Base 2.31-1+b1 ++ device_intr_register@Base 2.31-1+b1 ++ 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 ++ gsync_requeue@Base 2.23-4 ++ gsync_wait@Base 2.23-4 ++ gsync_wake@Base 2.23-4 ++ 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_notify_new_task@Base 2.21 ++ mach_port_allocate_name_rpc@Base 2.11 ++ mach_port_allocate_rpc@Base 2.11 ++ mach_port_clear_protected_payload@Base 2.19-14~ ++ 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_protected_payload@Base 2.19-14~ ++ 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_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_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_supply_completed@Base 2.11 ++ memory_object_terminate@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 ++ register_new_task_notification@Base 2.19-14~ ++ 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_name@Base 2.18-5 ++ 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_terminate_release@Base 2.18-0experimental1 ++ thread_wire@Base 2.11 ++ vm_allocate_contiguous@Base 2.31-1+b1 ++ 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_msync@Base 2.27-9 ++ vm_object_sync@Base 2.27-9 ++ 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_wire_all@Base 2.24-9~ ++ vm_write@Base 2.11 ++libpthread.so.0.3 #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++ *@GLIBC_2.2.6 2.13-38~ ++ __errno_location@GLIBC_2.2.6 2.29-8~ ++ __h_errno_location@GLIBC_2.2.6 2.29-8~ diff --cc debian/libc6-amd64.symbols.i386 index 000000000,000000000..6d3201ff9 new file mode 100644 --- /dev/null +++ b/debian/libc6-amd64.symbols.i386 @@@ -1,0 -1,0 +1,7 @@@ ++#include "libc6.symbols.common" ++ld-linux-x86-64.so.2 #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libc.so.6 #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libmvec.so.1 #PACKAGE# #MINVER# ++#include "symbols.wildcards" diff --cc debian/libc6-amd64.symbols.x32 index 000000000,000000000..6d3201ff9 new file mode 100644 --- /dev/null +++ b/debian/libc6-amd64.symbols.x32 @@@ -1,0 -1,0 +1,7 @@@ ++#include "libc6.symbols.common" ++ld-linux-x86-64.so.2 #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libc.so.6 #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libmvec.so.1 #PACKAGE# #MINVER# ++#include "symbols.wildcards" diff --cc debian/libc6-i386.symbols.amd64 index 000000000,000000000..357d2f26a new file mode 100644 --- /dev/null +++ b/debian/libc6-i386.symbols.amd64 @@@ -1,0 -1,0 +1,5 @@@ ++#include "libc6.symbols.common" ++ld-linux.so.2 #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libc.so.6 #PACKAGE# #MINVER# ++#include "symbols.wildcards" diff --cc debian/libc6-i386.symbols.x32 index 000000000,000000000..442e5cd31 new file mode 100644 --- /dev/null +++ b/debian/libc6-i386.symbols.x32 @@@ -1,0 -1,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" diff --cc debian/libc6-mips32.symbols.mips64 index 000000000,000000000..59332301f new file mode 100644 --- /dev/null +++ b/debian/libc6-mips32.symbols.mips64 @@@ -1,0 -1,0 +1,5 @@@ ++#include "libc6.symbols.common" ++ld.so.1 #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libc.so.6 #PACKAGE# #MINVER# ++#include "symbols.wildcards" diff --cc debian/libc6-mips32.symbols.mips64el index 000000000,000000000..59332301f new file mode 100644 --- /dev/null +++ b/debian/libc6-mips32.symbols.mips64el @@@ -1,0 -1,0 +1,5 @@@ ++#include "libc6.symbols.common" ++ld.so.1 #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libc.so.6 #PACKAGE# #MINVER# ++#include "symbols.wildcards" diff --cc debian/libc6-mips32.symbols.mips64r6 index 000000000,000000000..59332301f new file mode 100644 --- /dev/null +++ b/debian/libc6-mips32.symbols.mips64r6 @@@ -1,0 -1,0 +1,5 @@@ ++#include "libc6.symbols.common" ++ld.so.1 #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libc.so.6 #PACKAGE# #MINVER# ++#include "symbols.wildcards" diff --cc debian/libc6-mips32.symbols.mips64r6el index 000000000,000000000..59332301f new file mode 100644 --- /dev/null +++ b/debian/libc6-mips32.symbols.mips64r6el @@@ -1,0 -1,0 +1,5 @@@ ++#include "libc6.symbols.common" ++ld.so.1 #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libc.so.6 #PACKAGE# #MINVER# ++#include "symbols.wildcards" diff --cc debian/libc6-mips32.symbols.mipsn32 index 000000000,000000000..59332301f new file mode 100644 --- /dev/null +++ b/debian/libc6-mips32.symbols.mipsn32 @@@ -1,0 -1,0 +1,5 @@@ ++#include "libc6.symbols.common" ++ld.so.1 #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libc.so.6 #PACKAGE# #MINVER# ++#include "symbols.wildcards" diff --cc debian/libc6-mips32.symbols.mipsn32el index 000000000,000000000..59332301f new file mode 100644 --- /dev/null +++ b/debian/libc6-mips32.symbols.mipsn32el @@@ -1,0 -1,0 +1,5 @@@ ++#include "libc6.symbols.common" ++ld.so.1 #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libc.so.6 #PACKAGE# #MINVER# ++#include "symbols.wildcards" diff --cc debian/libc6-mips32.symbols.mipsn32r6 index 000000000,000000000..59332301f new file mode 100644 --- /dev/null +++ b/debian/libc6-mips32.symbols.mipsn32r6 @@@ -1,0 -1,0 +1,5 @@@ ++#include "libc6.symbols.common" ++ld.so.1 #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libc.so.6 #PACKAGE# #MINVER# ++#include "symbols.wildcards" diff --cc debian/libc6-mips32.symbols.mipsn32r6el index 000000000,000000000..59332301f new file mode 100644 --- /dev/null +++ b/debian/libc6-mips32.symbols.mipsn32r6el @@@ -1,0 -1,0 +1,5 @@@ ++#include "libc6.symbols.common" ++ld.so.1 #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libc.so.6 #PACKAGE# #MINVER# ++#include "symbols.wildcards" diff --cc debian/libc6-mips64.symbols.mips index 000000000,000000000..59332301f new file mode 100644 --- /dev/null +++ b/debian/libc6-mips64.symbols.mips @@@ -1,0 -1,0 +1,5 @@@ ++#include "libc6.symbols.common" ++ld.so.1 #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libc.so.6 #PACKAGE# #MINVER# ++#include "symbols.wildcards" diff --cc debian/libc6-mips64.symbols.mipsel index 000000000,000000000..59332301f new file mode 100644 --- /dev/null +++ b/debian/libc6-mips64.symbols.mipsel @@@ -1,0 -1,0 +1,5 @@@ ++#include "libc6.symbols.common" ++ld.so.1 #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libc.so.6 #PACKAGE# #MINVER# ++#include "symbols.wildcards" diff --cc debian/libc6-mips64.symbols.mipsn32 index 000000000,000000000..59332301f new file mode 100644 --- /dev/null +++ b/debian/libc6-mips64.symbols.mipsn32 @@@ -1,0 -1,0 +1,5 @@@ ++#include "libc6.symbols.common" ++ld.so.1 #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libc.so.6 #PACKAGE# #MINVER# ++#include "symbols.wildcards" diff --cc debian/libc6-mips64.symbols.mipsn32el index 000000000,000000000..59332301f new file mode 100644 --- /dev/null +++ b/debian/libc6-mips64.symbols.mipsn32el @@@ -1,0 -1,0 +1,5 @@@ ++#include "libc6.symbols.common" ++ld.so.1 #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libc.so.6 #PACKAGE# #MINVER# ++#include "symbols.wildcards" diff --cc debian/libc6-mips64.symbols.mipsn32r6 index 000000000,000000000..59332301f new file mode 100644 --- /dev/null +++ b/debian/libc6-mips64.symbols.mipsn32r6 @@@ -1,0 -1,0 +1,5 @@@ ++#include "libc6.symbols.common" ++ld.so.1 #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libc.so.6 #PACKAGE# #MINVER# ++#include "symbols.wildcards" diff --cc debian/libc6-mips64.symbols.mipsn32r6el index 000000000,000000000..59332301f new file mode 100644 --- /dev/null +++ b/debian/libc6-mips64.symbols.mipsn32r6el @@@ -1,0 -1,0 +1,5 @@@ ++#include "libc6.symbols.common" ++ld.so.1 #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libc.so.6 #PACKAGE# #MINVER# ++#include "symbols.wildcards" diff --cc debian/libc6-mips64.symbols.mipsr6 index 000000000,000000000..59332301f new file mode 100644 --- /dev/null +++ b/debian/libc6-mips64.symbols.mipsr6 @@@ -1,0 -1,0 +1,5 @@@ ++#include "libc6.symbols.common" ++ld.so.1 #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libc.so.6 #PACKAGE# #MINVER# ++#include "symbols.wildcards" diff --cc debian/libc6-mips64.symbols.mipsr6el index 000000000,000000000..59332301f new file mode 100644 --- /dev/null +++ b/debian/libc6-mips64.symbols.mipsr6el @@@ -1,0 -1,0 +1,5 @@@ ++#include "libc6.symbols.common" ++ld.so.1 #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libc.so.6 #PACKAGE# #MINVER# ++#include "symbols.wildcards" diff --cc debian/libc6-mipsn32.symbols.mips index 000000000,000000000..59332301f new file mode 100644 --- /dev/null +++ b/debian/libc6-mipsn32.symbols.mips @@@ -1,0 -1,0 +1,5 @@@ ++#include "libc6.symbols.common" ++ld.so.1 #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libc.so.6 #PACKAGE# #MINVER# ++#include "symbols.wildcards" diff --cc debian/libc6-mipsn32.symbols.mips64 index 000000000,000000000..59332301f new file mode 100644 --- /dev/null +++ b/debian/libc6-mipsn32.symbols.mips64 @@@ -1,0 -1,0 +1,5 @@@ ++#include "libc6.symbols.common" ++ld.so.1 #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libc.so.6 #PACKAGE# #MINVER# ++#include "symbols.wildcards" diff --cc debian/libc6-mipsn32.symbols.mips64el index 000000000,000000000..59332301f new file mode 100644 --- /dev/null +++ b/debian/libc6-mipsn32.symbols.mips64el @@@ -1,0 -1,0 +1,5 @@@ ++#include "libc6.symbols.common" ++ld.so.1 #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libc.so.6 #PACKAGE# #MINVER# ++#include "symbols.wildcards" diff --cc debian/libc6-mipsn32.symbols.mips64r6 index 000000000,000000000..59332301f new file mode 100644 --- /dev/null +++ b/debian/libc6-mipsn32.symbols.mips64r6 @@@ -1,0 -1,0 +1,5 @@@ ++#include "libc6.symbols.common" ++ld.so.1 #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libc.so.6 #PACKAGE# #MINVER# ++#include "symbols.wildcards" diff --cc debian/libc6-mipsn32.symbols.mips64r6el index 000000000,000000000..59332301f new file mode 100644 --- /dev/null +++ b/debian/libc6-mipsn32.symbols.mips64r6el @@@ -1,0 -1,0 +1,5 @@@ ++#include "libc6.symbols.common" ++ld.so.1 #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libc.so.6 #PACKAGE# #MINVER# ++#include "symbols.wildcards" diff --cc debian/libc6-mipsn32.symbols.mipsel index 000000000,000000000..59332301f new file mode 100644 --- /dev/null +++ b/debian/libc6-mipsn32.symbols.mipsel @@@ -1,0 -1,0 +1,5 @@@ ++#include "libc6.symbols.common" ++ld.so.1 #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libc.so.6 #PACKAGE# #MINVER# ++#include "symbols.wildcards" diff --cc debian/libc6-mipsn32.symbols.mipsr6 index 000000000,000000000..59332301f new file mode 100644 --- /dev/null +++ b/debian/libc6-mipsn32.symbols.mipsr6 @@@ -1,0 -1,0 +1,5 @@@ ++#include "libc6.symbols.common" ++ld.so.1 #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libc.so.6 #PACKAGE# #MINVER# ++#include "symbols.wildcards" diff --cc debian/libc6-mipsn32.symbols.mipsr6el index 000000000,000000000..59332301f new file mode 100644 --- /dev/null +++ b/debian/libc6-mipsn32.symbols.mipsr6el @@@ -1,0 -1,0 +1,5 @@@ ++#include "libc6.symbols.common" ++ld.so.1 #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libc.so.6 #PACKAGE# #MINVER# ++#include "symbols.wildcards" diff --cc debian/libc6-ppc64.symbols.powerpc index 000000000,000000000..5c61fda85 new file mode 100644 --- /dev/null +++ b/debian/libc6-ppc64.symbols.powerpc @@@ -1,0 -1,0 +1,5 @@@ ++#include "libc6.symbols.common" ++ld64.so.1 #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libc.so.6 #PACKAGE# #MINVER# ++#include "symbols.wildcards" diff --cc debian/libc6-s390.symbols.s390x index 000000000,000000000..59332301f new file mode 100644 --- /dev/null +++ b/debian/libc6-s390.symbols.s390x @@@ -1,0 -1,0 +1,5 @@@ ++#include "libc6.symbols.common" ++ld.so.1 #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libc.so.6 #PACKAGE# #MINVER# ++#include "symbols.wildcards" diff --cc debian/libc6-sparc.symbols.sparc64 index 000000000,000000000..8aabdce27 new file mode 100644 --- /dev/null +++ b/debian/libc6-sparc.symbols.sparc64 @@@ -1,0 -1,0 +1,6 @@@ ++#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" ++ diff --cc debian/libc6-sparc64.symbols.sparc index 000000000,000000000..357d2f26a new file mode 100644 --- /dev/null +++ b/debian/libc6-sparc64.symbols.sparc @@@ -1,0 -1,0 +1,5 @@@ ++#include "libc6.symbols.common" ++ld-linux.so.2 #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libc.so.6 #PACKAGE# #MINVER# ++#include "symbols.wildcards" diff --cc debian/libc6-x32.symbols.amd64 index 000000000,000000000..d2c11a5a9 new file mode 100644 --- /dev/null +++ b/debian/libc6-x32.symbols.amd64 @@@ -1,0 -1,0 +1,7 @@@ ++#include "libc6.symbols.common" ++ld-linux-x32.so.2 #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libc.so.6 #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libmvec.so.1 #PACKAGE# #MINVER# ++#include "symbols.wildcards" diff --cc debian/libc6-x32.symbols.i386 index 000000000,000000000..d2c11a5a9 new file mode 100644 --- /dev/null +++ b/debian/libc6-x32.symbols.i386 @@@ -1,0 -1,0 +1,7 @@@ ++#include "libc6.symbols.common" ++ld-linux-x32.so.2 #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libc.so.6 #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libmvec.so.1 #PACKAGE# #MINVER# ++#include "symbols.wildcards" diff --cc debian/libc6.1.symbols.alpha index 000000000,000000000..346effbe2 new file mode 100644 --- /dev/null +++ b/debian/libc6.1.symbols.alpha @@@ -1,0 -1,0 +1,50 @@@ ++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# ++#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# ++ 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" ++libpcprofile.so #PACKAGE# #MINVER# ++ __cyg_profile_func_enter@Base 2.3.6 ++ __cyg_profile_func_exit@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" diff --cc debian/libc6.symbols.amd64 index 000000000,000000000..6d3201ff9 new file mode 100644 --- /dev/null +++ b/debian/libc6.symbols.amd64 @@@ -1,0 -1,0 +1,7 @@@ ++#include "libc6.symbols.common" ++ld-linux-x86-64.so.2 #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libc.so.6 #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libmvec.so.1 #PACKAGE# #MINVER# ++#include "symbols.wildcards" diff --cc debian/libc6.symbols.arm index 000000000,000000000..7aaffeca8 new file mode 100644 --- /dev/null +++ b/debian/libc6.symbols.arm @@@ -1,0 -1,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" diff --cc debian/libc6.symbols.arm64 index 000000000,000000000..9c58fbac3 new file mode 100644 --- /dev/null +++ b/debian/libc6.symbols.arm64 @@@ -1,0 -1,0 +1,5 @@@ ++#include "libc6.symbols.common" ++ld-linux-aarch64.so.1 #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libc.so.6 #PACKAGE# #MINVER# ++#include "symbols.wildcards" diff --cc debian/libc6.symbols.armel index 000000000,000000000..389631c21 new file mode 100644 --- /dev/null +++ b/debian/libc6.symbols.armel @@@ -1,0 -1,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 diff --cc debian/libc6.symbols.armhf index 000000000,000000000..3a029db50 new file mode 100644 --- /dev/null +++ b/debian/libc6.symbols.armhf @@@ -1,0 -1,0 +1,9 @@@ ++#include "libc6.symbols.common" ++ld-linux-armhf.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 diff --cc debian/libc6.symbols.common index 000000000,000000000..ad16ce9ee new file mode 100644 --- /dev/null +++ b/debian/libc6.symbols.common @@@ -1,0 -1,0 +1,46 @@@ ++libBrokenLocale.so.1 #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libSegFault.so #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# ++ 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" ++libpcprofile.so #PACKAGE# #MINVER# ++ __cyg_profile_func_enter@Base 2.3.6 ++ __cyg_profile_func_exit@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" diff --cc debian/libc6.symbols.hppa index 000000000,000000000..2c49a6d70 new file mode 100644 --- /dev/null +++ b/debian/libc6.symbols.hppa @@@ -1,0 -1,0 +1,31 @@@ ++#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" ++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" diff --cc debian/libc6.symbols.i386 index 000000000,000000000..442e5cd31 new file mode 100644 --- /dev/null +++ b/debian/libc6.symbols.i386 @@@ -1,0 -1,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" diff --cc debian/libc6.symbols.m68k index 000000000,000000000..59332301f new file mode 100644 --- /dev/null +++ b/debian/libc6.symbols.m68k @@@ -1,0 -1,0 +1,5 @@@ ++#include "libc6.symbols.common" ++ld.so.1 #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libc.so.6 #PACKAGE# #MINVER# ++#include "symbols.wildcards" diff --cc debian/libc6.symbols.mips index 000000000,000000000..bfe690b36 new file mode 100644 --- /dev/null +++ b/debian/libc6.symbols.mips @@@ -1,0 -1,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" diff --cc debian/libc6.symbols.mips64 index 000000000,000000000..59332301f new file mode 100644 --- /dev/null +++ b/debian/libc6.symbols.mips64 @@@ -1,0 -1,0 +1,5 @@@ ++#include "libc6.symbols.common" ++ld.so.1 #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libc.so.6 #PACKAGE# #MINVER# ++#include "symbols.wildcards" diff --cc debian/libc6.symbols.mips64el index 000000000,000000000..59332301f new file mode 100644 --- /dev/null +++ b/debian/libc6.symbols.mips64el @@@ -1,0 -1,0 +1,5 @@@ ++#include "libc6.symbols.common" ++ld.so.1 #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libc.so.6 #PACKAGE# #MINVER# ++#include "symbols.wildcards" diff --cc debian/libc6.symbols.mips64r6 index 000000000,000000000..59332301f new file mode 100644 --- /dev/null +++ b/debian/libc6.symbols.mips64r6 @@@ -1,0 -1,0 +1,5 @@@ ++#include "libc6.symbols.common" ++ld.so.1 #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libc.so.6 #PACKAGE# #MINVER# ++#include "symbols.wildcards" diff --cc debian/libc6.symbols.mips64r6el index 000000000,000000000..59332301f new file mode 100644 --- /dev/null +++ b/debian/libc6.symbols.mips64r6el @@@ -1,0 -1,0 +1,5 @@@ ++#include "libc6.symbols.common" ++ld.so.1 #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libc.so.6 #PACKAGE# #MINVER# ++#include "symbols.wildcards" diff --cc debian/libc6.symbols.mipsel index 000000000,000000000..bfe690b36 new file mode 100644 --- /dev/null +++ b/debian/libc6.symbols.mipsel @@@ -1,0 -1,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" diff --cc debian/libc6.symbols.mipsn32 index 000000000,000000000..59332301f new file mode 100644 --- /dev/null +++ b/debian/libc6.symbols.mipsn32 @@@ -1,0 -1,0 +1,5 @@@ ++#include "libc6.symbols.common" ++ld.so.1 #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libc.so.6 #PACKAGE# #MINVER# ++#include "symbols.wildcards" diff --cc debian/libc6.symbols.mipsn32el index 000000000,000000000..59332301f new file mode 100644 --- /dev/null +++ b/debian/libc6.symbols.mipsn32el @@@ -1,0 -1,0 +1,5 @@@ ++#include "libc6.symbols.common" ++ld.so.1 #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libc.so.6 #PACKAGE# #MINVER# ++#include "symbols.wildcards" diff --cc debian/libc6.symbols.mipsn32r6 index 000000000,000000000..59332301f new file mode 100644 --- /dev/null +++ b/debian/libc6.symbols.mipsn32r6 @@@ -1,0 -1,0 +1,5 @@@ ++#include "libc6.symbols.common" ++ld.so.1 #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libc.so.6 #PACKAGE# #MINVER# ++#include "symbols.wildcards" diff --cc debian/libc6.symbols.mipsn32r6el index 000000000,000000000..59332301f new file mode 100644 --- /dev/null +++ b/debian/libc6.symbols.mipsn32r6el @@@ -1,0 -1,0 +1,5 @@@ ++#include "libc6.symbols.common" ++ld.so.1 #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libc.so.6 #PACKAGE# #MINVER# ++#include "symbols.wildcards" diff --cc debian/libc6.symbols.mipsr6 index 000000000,000000000..59332301f new file mode 100644 --- /dev/null +++ b/debian/libc6.symbols.mipsr6 @@@ -1,0 -1,0 +1,5 @@@ ++#include "libc6.symbols.common" ++ld.so.1 #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libc.so.6 #PACKAGE# #MINVER# ++#include "symbols.wildcards" diff --cc debian/libc6.symbols.mipsr6el index 000000000,000000000..59332301f new file mode 100644 --- /dev/null +++ b/debian/libc6.symbols.mipsr6el @@@ -1,0 -1,0 +1,5 @@@ ++#include "libc6.symbols.common" ++ld.so.1 #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libc.so.6 #PACKAGE# #MINVER# ++#include "symbols.wildcards" diff --cc debian/libc6.symbols.powerpc index 000000000,000000000..a8f71670c new file mode 100644 --- /dev/null +++ b/debian/libc6.symbols.powerpc @@@ -1,0 -1,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" diff --cc debian/libc6.symbols.ppc64 index 000000000,000000000..5c61fda85 new file mode 100644 --- /dev/null +++ b/debian/libc6.symbols.ppc64 @@@ -1,0 -1,0 +1,5 @@@ ++#include "libc6.symbols.common" ++ld64.so.1 #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libc.so.6 #PACKAGE# #MINVER# ++#include "symbols.wildcards" diff --cc debian/libc6.symbols.ppc64el index 000000000,000000000..624aec172 new file mode 100644 --- /dev/null +++ b/debian/libc6.symbols.ppc64el @@@ -1,0 -1,0 +1,5 @@@ ++#include "libc6.symbols.common" ++ld64.so.2 #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libc.so.6 #PACKAGE# #MINVER# ++#include "symbols.wildcards" diff --cc debian/libc6.symbols.riscv64 index 000000000,000000000..9e4205c8f new file mode 100644 --- /dev/null +++ b/debian/libc6.symbols.riscv64 @@@ -1,0 -1,0 +1,5 @@@ ++#include "libc6.symbols.common" ++ld-linux-riscv64-lp64d.so.1 #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libc.so.6 #PACKAGE# #MINVER# ++#include "symbols.wildcards" diff --cc debian/libc6.symbols.s390x index 000000000,000000000..5c61fda85 new file mode 100644 --- /dev/null +++ b/debian/libc6.symbols.s390x @@@ -1,0 -1,0 +1,5 @@@ ++#include "libc6.symbols.common" ++ld64.so.1 #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libc.so.6 #PACKAGE# #MINVER# ++#include "symbols.wildcards" diff --cc debian/libc6.symbols.sparc index 000000000,000000000..25746d9ae new file mode 100644 --- /dev/null +++ b/debian/libc6.symbols.sparc @@@ -1,0 -1,0 +1,44 @@@ ++#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" ++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" ++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" diff --cc debian/libc6.symbols.sparc64 index 000000000,000000000..357d2f26a new file mode 100644 --- /dev/null +++ b/debian/libc6.symbols.sparc64 @@@ -1,0 -1,0 +1,5 @@@ ++#include "libc6.symbols.common" ++ld-linux.so.2 #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libc.so.6 #PACKAGE# #MINVER# ++#include "symbols.wildcards" diff --cc debian/libc6.symbols.x32 index 000000000,000000000..d2c11a5a9 new file mode 100644 --- /dev/null +++ b/debian/libc6.symbols.x32 @@@ -1,0 -1,0 +1,7 @@@ ++#include "libc6.symbols.common" ++ld-linux-x32.so.2 #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libc.so.6 #PACKAGE# #MINVER# ++#include "symbols.wildcards" ++libmvec.so.1 #PACKAGE# #MINVER# ++#include "symbols.wildcards" diff --cc debian/local/etc/bindresvport.blacklist index 000000000,000000000..1dc056eb5 new file mode 100644 --- /dev/null +++ b/debian/local/etc/bindresvport.blacklist @@@ -1,0 -1,0 +1,15 @@@ ++# ++# 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 ++655 # tinc ++774 # rpasswd ++783 # spamd ++873 # rsync ++921 # lwresd ++993 # imaps ++995 # pops diff --cc debian/local/etc/ld.so.conf index 000000000,000000000..20c976308 new file mode 100644 --- /dev/null +++ b/debian/local/etc/ld.so.conf @@@ -1,0 -1,0 +1,2 @@@ ++include /etc/ld.so.conf.d/*.conf ++ diff --cc debian/local/etc/ld.so.conf.d/libc.conf index 000000000,000000000..463b8bb75 new file mode 100644 --- /dev/null +++ b/debian/local/etc/ld.so.conf.d/libc.conf @@@ -1,0 -1,0 +1,2 @@@ ++# libc default configuration ++/usr/local/lib diff --cc debian/local/etc/nsswitch.conf index 000000000,000000000..f20778e89 new file mode 100644 --- /dev/null +++ b/debian/local/etc/nsswitch.conf @@@ -1,0 -1,0 +1,20 @@@ ++# /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: files ++group: files ++shadow: files ++gshadow: files ++ ++hosts: files dns ++networks: files ++ ++protocols: db files ++services: db files ++ethers: db files ++rpc: db files ++ ++netgroup: nis diff --cc debian/local/manpages/Makefile index 000000000,000000000..73265be49 new file mode 100644 --- /dev/null +++ b/debian/local/manpages/Makefile @@@ -1,0 -1,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/*~ diff --cc debian/local/manpages/catchsegv.1 index 000000000,000000000..4a831ff43 new file mode 100644 --- /dev/null +++ b/debian/local/manpages/catchsegv.1 @@@ -1,0 -1,0 +1,223 @@@ ++.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. ++.ie \nF \{\ ++.de IX ++.tm Index:\\$1\t\\n%\t"\\$2" ++.. ++.\} ++.el \{\ ++.de IX ++.. ++.\} ++.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 \fIprogram\fR [\,\fIargs\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 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" ++ diff --cc debian/local/manpages/de/validlocale.de.8 index 000000000,000000000..885c1d252 new file mode 100644 --- /dev/null +++ b/debian/local/manpages/de/validlocale.de.8 @@@ -1,0 -1,0 +1,57 @@@ ++.\"******************************************************************* ++.\" ++.\" This file was generated with po4a. Translate the source file. ++.\" ++.\"******************************************************************* ++.TH validlocale 8 0.1 "Petter Reinholdtsen" "" ++.SH NAME ++.LP ++validlocale \- Prüfen, ob eine übergebene Locale verfügbar ist ++.SH SYNTAX ++.LP ++validlocale <\fILocale\fP> ++.SH BESCHREIBUNG ++.LP ++Überprüft, ob eine als Argument übergebene Locale gültig ist. Falls sie es ++nicht ist, wird auf der Standardausgabe die Zeichenkette angegeben, die zu ++/etc/locale.gen hinzugefügt werden muss, damit locale\-gen die Locale (falls ++sie überhaupt existiert) erstellt. ++.SH DATEIEN ++.LP ++\fI/usr/sbin/validlocale\fP ++.br ++\fI/usr/share/i18n/SUPPORTED\fP ++.SH UMGEBUNGSVARIABLEN ++.LP ++.TP ++\fBDEFAULTCHARSET\fP ++welcher Zeichensatz angenommen werden soll, falls eine übergebene Locale ++nicht in der Liste der unterstützten Locale enthalten ist ++.SH BEISPIELE ++.LP ++Falls Sie eine gültige Locale als Parameter übergeben, wird auf der ++Standardfehlerausgabe eine Zeichenkette ausgegeben, die diese angibt: ++.LP ++.IP ++% validlocale C ++.br ++locale 'C' valid and available ++.LP ++Wenn eine ungültige (nicht erstellte oder einfach nicht existierende) Locale ++übergeben wird, wird es eine Zeichenkette auf der Standardfehlerausgabe ++ausgeben, die dies mitteilt und eine Zeichenkette auf die Standardausgabe, ++der zu /etc/locale.gen hinzugefügt werden muss, damit die Locale erstellt ++wird: ++.LP ++.IP ++% validlocale de_AU@euro ++.br ++locale 'de_AU@euro' not available ++.br ++de_AU@euro ISO\-8859\-15 ++.SH AUTOREN ++.LP ++Petter Reinholdtsen ++.SH "SIEHE AUCH" ++.LP ++locale\-gen(8), localedef(1), locale(1) diff --cc debian/local/manpages/es/addendum.es index 000000000,000000000..2cf510dcf new file mode 100644 --- /dev/null +++ b/debian/local/manpages/es/addendum.es @@@ -1,0 -1,0 +1,3 @@@ ++ ++.SH TRADUCTOR ++Traducción de Rubén Porras Campo diff --cc debian/local/manpages/es/validlocale.es.8 index 000000000,000000000..9ec4102c3 new file mode 100644 --- /dev/null +++ b/debian/local/manpages/es/validlocale.es.8 @@@ -1,0 -1,0 +1,57 @@@ ++.\"******************************************************************* ++.\" ++.\" 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_AU@euro' not available ++.br ++de_AU@euro ISO\-8859\-15 ++.SH AUTORES ++.LP ++Petter Reinholdtsen ++.SH "VÉASE ADEMÁS" ++.LP ++locale\-gen(8), localedef(1), locale(1) diff --cc debian/local/manpages/fr/addendum.fr index 000000000,000000000..da2d2ffad new file mode 100644 --- /dev/null +++ b/debian/local/manpages/fr/addendum.fr @@@ -1,0 -1,0 +1,4 @@@ ++PO4A-HEADER:mode=after;position=AUTEUR;beginboundary=\.SH ++ ++.SH "TRADUCTION" ++Clément Stenac, 2005. Veuillez signaler toute erreur à diff --cc debian/local/manpages/fr/validlocale.fr.8 index 000000000,000000000..605512dc4 new file mode 100644 --- /dev/null +++ b/debian/local/manpages/fr/validlocale.fr.8 @@@ -1,0 -1,0 +1,60 @@@ ++.\"******************************************************************* ++.\" ++.\" This file was generated with po4a. Translate the source file. ++.\" ++.\"******************************************************************* ++.TH validlocale 8 0.1 "Petter Reinholdtsen" "" ++.SH NOM ++.LP ++validlocale \- Vérifier si un ensemble donné de paramètres régionaux est ++disponible ++.SH SYNTAXE ++.LP ++validlocale <\fIlocale\fP> ++.SH DESCRIPTION ++.LP ++Tester si l'ensemble de paramètres régionaux donné en argument est ++valable. S'il ne l'est pas, afficher sur la sortie standard la chaîne de ++caractères à ajouter à /etc/locale.gen pour 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 l’encodage de caractères qui doit être supposé si l'ensemble de ++paramètres régionaux donné n'est pas dans la liste des ensembles gérés. ++.SH EXEMPLES ++.LP ++Si un ensemble de paramètres régionaux valable est indiqué en paramètre, la ++sortie d'erreur standard affiche\ : ++.LP ++.IP ++% validlocale C ++.br ++locale 'C' valid and available ++.LP ++Lorsqu'un ensemble de paramètres régionaux non valable (non créé ou ++inexistant) est indiqué, un message sur la sortie d'erreur l’indique, et une ++chaîne de caractères à ajouter à /etc/locale.gen pour le créer est envoyée ++sur la sortie standard\ : ++.LP ++.IP ++% validlocale fr_MQ@euro ++.br ++locale 'fr_MQ@euro' not available ++.br ++fr_MQ@euro ISO\-8859\-1 ++.SH AUTEURS ++.LP ++Petter Reinholdtsen ++ ++.SH "TRADUCTION" ++Clément Stenac, 2005. Veuillez signaler toute erreur à ++.SH "VOIR AUSSI" ++.LP ++locale(1), localedef(1), locale\-gen(8) diff --cc debian/local/manpages/gencat.1 index 000000000,000000000..b2210d2db new file mode 100644 --- /dev/null +++ b/debian/local/manpages/gencat.1 @@@ -1,0 -1,0 +1,240 @@@ ++.rn '' }` ++.\" $RCSfile: gencat.1,v $$Revision: 1.1 $$Date$ ++.\" ++.\" $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 . ++ ++.rn }` '' ++.IX Title "GENCAT 1" ++.IX Name "gencat - Generate message catalog" ++ ++.IX Header "NAME" ++ ++.IX Header "SYNOPSIS" ++ ++.IX Header "DESCRIPTION" ++ ++.IX Header "AUTHOR" ++ diff --cc debian/local/manpages/getconf.1 index 000000000,000000000..3184efe5e new file mode 100644 --- /dev/null +++ b/debian/local/manpages/getconf.1 @@@ -1,0 -1,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 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" ++ diff --cc debian/local/manpages/id/addendum.id index 000000000,000000000..a5d1ce1fc new file mode 100644 --- /dev/null +++ b/debian/local/manpages/id/addendum.id @@@ -1,0 -1,0 +1,3 @@@ ++ ++.SH PENERJEMAH ++Parlin Imanuel Toh diff --cc debian/local/manpages/locale-gen.8 index 000000000,000000000..f6e315b8c new file mode 100644 --- /dev/null +++ b/debian/local/manpages/locale-gen.8 @@@ -1,0 -1,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! ++.\" ++.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 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 diff --cc debian/local/manpages/locale-gen.8.sgml index 000000000,000000000..d03befc11 new file mode 100644 --- /dev/null +++ b/debian/local/manpages/locale-gen.8.sgml @@@ -1,0 -1,0 +1,148 @@@ ++ 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 $< > $@ ++ --> ++ ++ ++ Eduard"> ++ Bloch"> ++ ++ March 10, 2005"> ++ ++ 8"> ++ blade@debian.org"> ++ ++ LOCALE-GEN"> ++ ++ ++ Debian GNU/Linux"> ++ GNU"> ++]> ++ ++ ++ ++
++ &dhemail; ++
++ ++ &dhfirstname; ++ &dhsurname; ++ ++ ++ 2001 ++ &dhusername; ++ ++ &dhdate; ++
++ ++ &dhucpackage; ++ ++ &dhsection; ++ ++ ++ &dhpackage; ++ ++ generates localisation files from templates ++ ++ ++ ++ &dhpackage; ++ ++ ++ ++ ++ ++ DESCRIPTION ++ ++ This manual page documents briefly the ++ &dhpackage; command. ++ ++ 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. ++ ++ &dhpackage; is a program that reads the file ++ /etc/locale.gen and invokes ++ localedef for the chosen localisation profiles. ++ Run &dhpackage; after you have modified the /etc/locale.gen file. ++ ++ ++ ++ ++ ++ OPTIONS ++ ++ ++ ++ ++ ++ By default, &dhpackage; removes all ++ existing locales and generates new ones afresh. The ++ 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. ++ ++ ++ ++ ++ ++ ++ FILES ++ ++ /etc/locale.gen ++ 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. ++ ++ ++ ++ ++ ++ SEE ALSO ++ ++ localedef(1), locale(1), locale.alias(5), locale.gen(5). ++ ++ ++ ++ ++ AUTHOR ++ ++ This manual page was written by &dhusername; <&dhemail;> 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 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. ++ ++ ++
++ ++ diff --cc debian/local/manpages/locale.alias.5 index 000000000,000000000..013d63a39 new file mode 100644 --- /dev/null +++ b/debian/local/manpages/locale.alias.5 @@@ -1,0 -1,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 ++ ++ ++ ++Where 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 diff --cc debian/local/manpages/locale.gen.5 index 000000000,000000000..3625018ae new file mode 100644 --- /dev/null +++ b/debian/local/manpages/locale.gen.5 @@@ -1,0 -1,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: ++ ++ ++ ++where is one of the locales given in ++.B /usr/share/i18n/locales ++and 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 diff --cc debian/local/manpages/nscd.8 index 000000000,000000000..bb254cca0 new file mode 100644 --- /dev/null +++ b/debian/local/manpages/nscd.8 @@@ -1,0 -1,0 +1,87 @@@ ++.\" Placed in the Public Domain by Sebastian Rittau . ++.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 diff --cc debian/local/manpages/nscd.conf.5 index 000000000,000000000..8fc649874 new file mode 100644 --- /dev/null +++ b/debian/local/manpages/nscd.conf.5 @@@ -1,0 -1,0 +1,243 @@@ ++.\" Placed in the Public Domain by Sebastian Rittau ++.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) diff --cc debian/local/manpages/pl/validlocale.pl.8 index 000000000,000000000..0726dd2ac new file mode 100644 --- /dev/null +++ b/debian/local/manpages/pl/validlocale.pl.8 @@@ -1,0 -1,0 +1,55 @@@ ++.\"******************************************************************* ++.\" ++.\" 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_AU@euro' not available ++.br ++de_AU@euro ISO\-8859\-15 ++.SH AUTOR ++.LP ++Petter Reinholdtsen ++.SH "PATRZ TAKÅ»E" ++.LP ++locale\-gen(8), localedef(1), locale(1) diff --cc debian/local/manpages/po/de.po index 000000000,000000000..cf0a6c29a new file mode 100644 --- /dev/null +++ b/debian/local/manpages/po/de.po @@@ -1,0 -1,0 +1,298 @@@ ++# base-config manual page ++# Copyright (C) 2005 Free Software Foundation, Inc. ++# Jens Seidel , 2005. ++# Helge Kreutzmann , 2013, 2017. ++# ++msgid "" ++msgstr "" ++"Project-Id-Version: eglibc 2.24-17\n" ++"POT-Creation-Date: 2014-10-21 15:29+0200\n" ++"PO-Revision-Date: 2017-10-01 20:46+0200\n" ++"Last-Translator: Helge Kreutzmann \n" ++"Language-Team: German \n" ++"Language: de\n" ++"MIME-Version: 1.0\n" ++"Content-Type: text/plain; charset=UTF-8\n" ++"Content-Transfer-Encoding: 8bit\n" ++ ++# type: TH ++#. type: TH ++#: validlocale.8:1 ++#, no-wrap ++msgid "validlocale" ++msgstr "validlocale" ++ ++# type: TH ++#. type: TH ++#: validlocale.8:1 ++#, no-wrap ++msgid "0.1" ++msgstr "0.1" ++ ++# type: TH ++#. type: TH ++#: validlocale.8:1 ++#, no-wrap ++msgid "Petter Reinholdtsen" ++msgstr "Petter Reinholdtsen" ++ ++# type: SH ++#. type: SH ++#: validlocale.8:2 ++#, no-wrap ++msgid "NAME" ++msgstr "NAME" ++ ++# type: Plain text ++#. type: Plain text ++#: validlocale.8:5 ++msgid "validlocale - Test if a given locale is available" ++msgstr "validlocale - Prüfen, ob eine übergebene Locale verfügbar ist" ++ ++# type: SH ++#. type: SH ++#: validlocale.8:5 ++#, no-wrap ++msgid "SYNTAX" ++msgstr "SYNTAX" ++ ++# type: Plain text ++#. type: Plain text ++#: validlocale.8:8 ++msgid "validlocale EIE" ++msgstr "validlocale EIE" ++ ++# type: SH ++#. type: SH ++#: validlocale.8:8 ++#, no-wrap ++msgid "DESCRIPTION" ++msgstr "BESCHREIBUNG" ++ ++# type: Plain text ++#. 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 "" ++"Überprüft, ob eine als Argument übergebene Locale gültig ist. Falls sie es " ++"nicht ist, wird auf der Standardausgabe die Zeichenkette angegeben, die zu /" ++"etc/locale.gen hinzugefügt werden muss, damit locale-gen die Locale (falls " ++"sie überhaupt existiert) erstellt." ++ ++# type: SH ++#. type: SH ++#: validlocale.8:13 ++#, no-wrap ++msgid "FILES" ++msgstr "DATEIEN" ++ ++# type: Plain text ++#. type: Plain text ++#: validlocale.8:16 ++msgid "I" ++msgstr "I" ++ ++# type: Plain text ++#. type: Plain text ++#: validlocale.8:18 ++msgid "I" ++msgstr "I" ++ ++# type: SH ++#. type: SH ++#: validlocale.8:18 ++#, no-wrap ++msgid "ENVIRONMENT VARIABLES" ++msgstr "UMGEBUNGSVARIABLEN" ++ ++# type: TP ++#. type: TP ++#: validlocale.8:20 ++#, no-wrap ++msgid "B" ++msgstr "B" ++ ++# type: Plain text ++#. type: Plain text ++#: validlocale.8:24 ++msgid "" ++"Which charset to assume if the given locale is missing from the list of " ++"supported locales." ++msgstr "" ++"welcher Zeichensatz angenommen werden soll, falls eine übergebene Locale " ++"nicht in der Liste der unterstützten Locale enthalten ist" ++ ++# type: SH ++#. type: SH ++#: validlocale.8:24 ++#, no-wrap ++msgid "EXAMPLES" ++msgstr "BEISPIELE" ++ ++# type: Plain text ++#. type: Plain text ++#: validlocale.8:28 ++msgid "" ++"If you give a valid locale as parameter, it outputs a string specifying this " ++"on stderr:" ++msgstr "" ++"Falls Sie eine gültige Locale als Parameter übergeben, wird auf der " ++"Standardfehlerausgabe eine Zeichenkette ausgegeben, die diese angibt:" ++ ++# type: Plain text ++#. type: Plain text ++#: validlocale.8:31 ++msgid "% validlocale C" ++msgstr "% validlocale C" ++ ++# type: Plain text ++#. type: Plain text ++#: validlocale.8:33 ++msgid "locale 'C' valid and available" ++msgstr "locale 'C' valid and available" ++ ++# type: Plain text ++# s/invalid/invalid Locale/ ++#. 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 "" ++"Wenn eine ungültige (nicht erstellte oder einfach nicht existierende) Locale " ++"übergeben wird, wird es eine Zeichenkette auf der Standardfehlerausgabe " ++"ausgeben, die dies mitteilt und eine Zeichenkette auf die Standardausgabe, " ++"der zu /etc/locale.gen hinzugefügt werden muss, damit die Locale erstellt " ++"wird:" ++ ++# type: Plain text ++#. type: Plain text ++#: validlocale.8:40 ++msgid "% validlocale de_AU@euro" ++msgstr "% validlocale de_AU@euro" ++ ++# type: Plain text ++#. type: Plain text ++#: validlocale.8:42 ++msgid "locale 'de_AU@euro' not available" ++msgstr "locale 'de_AU@euro' not available" ++ ++# type: Plain text ++#. type: Plain text ++#: validlocale.8:44 ++msgid "de_AU@euro ISO-8859-15" ++msgstr "de_AU@euro ISO-8859-15" ++ ++# type: SH ++#. type: SH ++#: validlocale.8:44 ++#, no-wrap ++msgid "AUTHORS" ++msgstr "AUTOREN" ++ ++# type: Plain text ++#. type: Plain text ++#: validlocale.8:47 ++msgid "Petter Reinholdtsen Epere@hungry.comE" ++msgstr "Petter Reinholdtsen Epere@hungry.comE" ++ ++# type: SH ++#. type: SH ++#: validlocale.8:47 ++#, no-wrap ++msgid "SEE ALSO" ++msgstr "SIEHE AUCH" ++ ++# FIXME: Falsche Reihenfolge ++# type: Plain text ++#. type: Plain text ++#: validlocale.8:49 ++msgid "locale-gen(8), localedef(1), locale(1)" ++msgstr "locale-gen(8), localedef(1), locale(1)" ++ ++# 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" ++#~ msgstr "B" ++ ++# type: Plain text ++#~ msgid "" ++#~ "B 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 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 generates a menu of choices from the contents of B, and from debconf templates." ++#~ msgstr "" ++#~ "B erzeugt ein Auswahlmenü aus dem Inhalt von B und von Debconf-Vorlagen." ++ ++# type: SH ++#~ msgid "AUTHOR" ++#~ msgstr "AUTOR" ++ ++# type: Plain text ++#~ msgid "Joey Hess Ejoeyh@debian.orgE" ++#~ msgstr "Joey Hess Ejoey@debian.orgE" ++ ++# type: SH ++#~ msgid "OPTIONS" ++#~ msgstr "OPTIONEN" ++ ++# type: TH ++#~ msgid "APT-SETUP" ++#~ msgstr "APT-SETUP" ++ ++# type: Plain text ++#~ msgid "B" ++#~ msgstr "B" ++ ++# type: TP ++#~ msgid "I" ++#~ msgstr "I" ++ ++# type: TP ++#~ msgid "I<-N>" ++#~ msgstr "I<-N>" ++ ++# type: Plain text ++#~ msgid "Joey Hess Ejoey@kitenet.netE" ++#~ msgstr "Joey Hess Ejoey@kitenet.netE" ++ ++# type: TH ++#~ msgid "TZSETUP" ++#~ msgstr "APT-SETUP" ++ ++# type: SH ++#~ msgid "DERIVATION" ++#~ msgstr "BESCHREIBUNG" diff --cc debian/local/manpages/po/es.po index 000000000,000000000..af4bcfb71 new file mode 100644 --- /dev/null +++ b/debian/local/manpages/po/es.po @@@ -1,0 -1,0 +1,704 @@@ ++msgid "" ++msgstr "" ++"Project-Id-Version: 2.74\n" ++"POT-Creation-Date: 2014-10-21 15:29+0200\n" ++"PO-Revision-Date: 2014-10-21 21:05+0200\n" ++"Last-Translator: Rubén Porras \n" ++"Language-Team: Spanish \n" ++"Language: es\n" ++"MIME-Version: 1.0\n" ++"Content-Type: text/plain; charset=UTF-8\n" ++"Content-Transfer-Encoding: 8bit\n" ++ ++# type: TH ++#. type: TH ++#: validlocale.8:1 ++#, no-wrap ++msgid "validlocale" ++msgstr "validlocale" ++ ++# type: TH ++#. type: TH ++#: validlocale.8:1 ++#, no-wrap ++msgid "0.1" ++msgstr "0.1" ++ ++# type: TH ++#. type: TH ++#: validlocale.8:1 ++#, no-wrap ++msgid "Petter Reinholdtsen" ++msgstr "Petter Reinholdtsen" ++ ++# type: SH ++#. type: SH ++#: validlocale.8:2 ++#, no-wrap ++msgid "NAME" ++msgstr "NOMBRE" ++ ++# type: Plain text ++#. 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 ++#. type: SH ++#: validlocale.8:5 ++#, no-wrap ++msgid "SYNTAX" ++msgstr "SINTAXIS" ++ ++# type: Plain text ++#. type: Plain text ++#: validlocale.8:8 ++msgid "validlocale EIE" ++msgstr "validlocale EIE" ++ ++# type: SH ++#. type: SH ++#: validlocale.8:8 ++#, no-wrap ++msgid "DESCRIPTION" ++msgstr "DESCRIPCIÓN" ++ ++# type: Plain text ++#. 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 ++#. type: SH ++#: validlocale.8:13 ++#, no-wrap ++msgid "FILES" ++msgstr "FICHEROS" ++ ++# type: Plain text ++#. type: Plain text ++#: validlocale.8:16 ++msgid "I" ++msgstr "I" ++ ++# type: Plain text ++#. type: Plain text ++#: validlocale.8:18 ++msgid "I" ++msgstr "I" ++ ++# type: SH ++#. type: SH ++#: validlocale.8:18 ++#, no-wrap ++msgid "ENVIRONMENT VARIABLES" ++msgstr "VARIABLES DE ENTORNO" ++ ++# type: TP ++#. type: TP ++#: validlocale.8:20 ++#, no-wrap ++msgid "B" ++msgstr "B" ++ ++# type: Plain text ++#. 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 ++#. type: SH ++#: validlocale.8:24 ++#, no-wrap ++msgid "EXAMPLES" ++msgstr "EJEMPLOS" ++ ++# type: Plain text ++#. 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 ++#. type: Plain text ++#: validlocale.8:31 ++msgid "% validlocale C" ++msgstr "% validlocale C" ++ ++# type: Plain text ++#. type: Plain text ++#: validlocale.8:33 ++msgid "locale 'C' valid and available" ++msgstr "locale 'C' valid and available" ++ ++# type: Plain text ++#. 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 ++#. type: Plain text ++#: validlocale.8:40 ++msgid "% validlocale de_AU@euro" ++msgstr "% validlocale de_AU@euro" ++ ++# type: Plain text ++#. type: Plain text ++#: validlocale.8:42 ++#, fuzzy ++#| msgid "locale 'de_AT@euro' not available" ++msgid "locale 'de_AU@euro' not available" ++msgstr "locale 'de_AT@euro' not available" ++ ++# type: Plain text ++#. type: Plain text ++#: validlocale.8:44 ++#, fuzzy ++#| msgid "de_AT@euro ISO-8859-15" ++msgid "de_AU@euro ISO-8859-15" ++msgstr "de_AT@euro ISO-8859-15" ++ ++# type: SH ++#. type: SH ++#: validlocale.8:44 ++#, no-wrap ++msgid "AUTHORS" ++msgstr "AUTORES" ++ ++# type: Plain text ++#. type: Plain text ++#: validlocale.8:47 ++msgid "Petter Reinholdtsen Epere@hungry.comE" ++msgstr "Petter Reinholdtsen Epere@hungry.comE" ++ ++# type: SH ++#. type: SH ++#: validlocale.8:47 ++#, no-wrap ++msgid "SEE ALSO" ++msgstr "VÉASE ADEMÁS" ++ ++# type: Plain text ++#. 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" ++#~ msgstr "B" ++ ++# type: Plain text ++#~ msgid "" ++#~ "B 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 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 generates a menu of choices from the contents of B, and from debconf templates." ++#~ msgstr "" ++#~ "B genera un menú de elecciones con los contenidos de B, 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 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 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. B contains timing information to go with the log. " ++#~ "This allows replays of base-config runs using the B(1) utility." ++#~ msgstr "" ++#~ "Cualquier ejecución de base-config se registra en B. B 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(1)B<.>" ++ ++# type: Plain text ++#~ msgid "" ++#~ "B, if it exists, is used by B " ++#~ "on new installs to get values from the debian-installer first stage " ++#~ "install." ++#~ msgstr "" ++#~ "Si existe B, B 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, 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, 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(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(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. These " ++#~ "variables may be set at run time, or for new installs, may be passed to " ++#~ "the kernel at the B(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. 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(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" ++#~ msgstr "B" ++ ++# type: TP ++#~ msgid "B" ++#~ msgstr "B" ++ ++# type: TP ++#~ msgid "B" ++#~ msgstr "B" ++ ++# type: TP ++#~ msgid "B" ++#~ msgstr "B" ++ ++# type: Plain text ++#~ msgid "Control various things about B(7)" ++#~ msgstr "Controlan varias cosas de B(7)" ++ ++# type: SH ++#~ msgid "AUTHOR" ++#~ msgstr "AUTOR" ++ ++# type: Plain text ++#~ msgid "Joey Hess Ejoeyh@debian.orgE" ++#~ msgstr "Joey Hess Ejoey@debian.orgE" ++ ++# type: TH ++#~ msgid "TERMWRAP" ++#~ msgstr "TERMWRAP" ++ ++# type: Plain text ++#~ msgid "termwrap - terminal wrapper" ++#~ msgstr "termwrap - envuelve un terminal" ++ ++# type: Plain text ++#~ msgid "B" ++#~ msgstr "B" ++ ++# type: Plain text ++#~ msgid "" ++#~ "B is used to execute B(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 se usa para ejecutar B(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" ++#~ msgstr "B" ++ ++# type: Plain text ++#~ msgid "" ++#~ "B 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(8) to scan CDs." ++#~ msgstr "" ++#~ "B 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(8) para analizar CD's." ++ ++# type: TP ++#~ msgid "I" ++#~ msgstr "I" ++ ++# 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 Ejoey@kitenet.netE" ++#~ msgstr "Joey Hess Ejoey@kitenet.netE" ++ ++# 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" ++#~ msgstr "B" ++ ++# type: Plain text ++#, fuzzy ++#~ msgid "" ++#~ "This manual page explains how you can use the B 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 " ++#~ "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 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 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 will try to change the timezone " ++#~ "for you. See the B section below for technical details. You " ++#~ "must have root privileges to actually change anything. Please use " ++#~ "B(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 tratará de cambiar la zona " ++#~ "horaria por usted. Lea la sección B de más abajo " ++#~ "para los detalles técnicos. Debe de tener privilegios de superusuario " ++#~ "para cambiar realmente cualquier configuración. Puede usar " ++#~ "B(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. This file contains either the line B, " ++#~ "which indicates that the hardware clock is set to UTC, or it contains the " ++#~ "line B, 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(8) for more details on this topic." ++#~ msgstr "" ++#~ "El sistema Debian GNU/Linux obtiene la configuración del fichero I. Este fichero contiene o bien la línea B, que " ++#~ "indica que el reloj físico está en UTC, o bien la línea B, 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(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 is actually pretty simple. It just updates " ++#~ "the link I to point to the correct timezone installed in " ++#~ "I." ++#~ msgstr "" ++#~ "El trabajo hecho por B es realmente bastante sencillo. Sólo " ++#~ "actualiza el enlace I para que apunte al la zona horaria " ++#~ "correcta instalada en I." ++ ++# type: Plain text ++#, fuzzy ++#~ msgid "" ++#~ "There is nothing wrong with doing this manually. However, using " ++#~ "B 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 no es necesario recordar donde se guardan las zonas horarias." ++ ++# type: Plain text ++#~ msgid "I I I" ++#~ msgstr "I I I" ++ ++# type: SH ++#~ msgid "DERIVATION" ++#~ msgstr "DERIVACIÓN" ++ ++# type: Plain text ++#, fuzzy ++#~ msgid "" ++#~ "This program is based on B(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(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(8) B(1) B(5) B(8)" ++#~ msgstr "B(8) B(1) B(5) B(8)" diff --cc debian/local/manpages/po/fr.po index 000000000,000000000..883626daf new file mode 100644 --- /dev/null +++ b/debian/local/manpages/po/fr.po @@@ -1,0 -1,0 +1,463 @@@ ++# validlocale.8 manpage ++# Copyright (C) 2004 Free Software Foundation, Inc. ++# ++# Antoine Gémis . ++# Clément Stenac , 2005. ++# David Prévot , 2013. ++msgid "" ++msgstr "" ++"Project-Id-Version: base-config\n" ++"Report-Msgid-Bugs-To: \n" ++"POT-Creation-Date: 2013-07-07 12:24-0400\n" ++"PO-Revision-Date: 2013-07-07 11:17-0400\n" ++"Last-Translator: Clément Stenac \n" ++"Language-Team: French \n" ++"Language: fr\n" ++"MIME-Version: 1.0\n" ++"Content-Type: text/plain; charset=UTF-8\n" ++"Content-Transfer-Encoding: 8-bit\n" ++"Plural-Forms: nplurals=2; plural=(n > 1);\n" ++"X-Generator: Lokalize 1.4\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érifier 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 EIE" ++msgstr "validlocale EIE" ++ ++#. 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 "" ++"Tester si l'ensemble de paramètres régionaux donné en argument est valable. " ++"S'il ne l'est pas, afficher sur la sortie standard la chaîne de caractères à " ++"ajouter à /etc/locale.gen pour 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" ++msgstr "I" ++ ++#. type: Plain text ++#: validlocale.8:18 ++msgid "I" ++msgstr "I" ++ ++#. type: SH ++#: validlocale.8:18 ++#, no-wrap ++msgid "ENVIRONMENT VARIABLES" ++msgstr "VARIABLES D'ENVIRONNEMENT" ++ ++#. type: TP ++#: validlocale.8:20 ++#, no-wrap ++msgid "B" ++msgstr "B" ++ ++#. 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 l’encodage de caractères qui doit être supposé si l'ensemble de " ++"paramètres régionaux donné n'est pas dans la liste des ensembles gérés." ++ ++#. 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 un ensemble de paramètres régionaux valable est indiqué en paramètre, la " ++"sortie d'erreur standard affiche :" ++ ++#. 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 "" ++"Lorsqu'un ensemble de paramètres régionaux non valable (non créé ou " ++"inexistant) est indiqué, un message sur la sortie d'erreur l’indique, et une " ++"chaîne de caractères à ajouter à /etc/locale.gen pour le créer est envoyée " ++"sur la sortie standard :" ++ ++#. type: Plain text ++#: validlocale.8:40 ++msgid "% validlocale de_AU@euro" ++msgstr "% validlocale fr_MQ@euro" ++ ++#. type: Plain text ++#: validlocale.8:42 ++msgid "locale 'de_AU@euro' not available" ++msgstr "locale 'fr_MQ@euro' not available" ++ ++#. type: Plain text ++#: validlocale.8:44 ++msgid "de_AU@euro ISO-8859-15" ++msgstr "fr_MQ@euro ISO-8859-1" ++ ++#. type: SH ++#: validlocale.8:44 ++#, no-wrap ++msgid "AUTHORS" ++msgstr "AUTEURS" ++ ++#. type: Plain text ++#: validlocale.8:47 ++msgid "Petter Reinholdtsen Epere@hungry.comE" ++msgstr "Petter Reinholdtsen Epere@hungry.comE" ++ ++#. type: SH ++#: validlocale.8:47 ++#, no-wrap ++msgid "SEE ALSO" ++msgstr "VOIR AUSSI" ++ ++#. type: Plain text ++#: validlocale.8:49 ++msgid "locale-gen(8), localedef(1), locale(1)" ++msgstr "locale(1), localedef(1), locale-gen(8)" ++ ++#~ msgid "BASE-CONFIG" ++#~ msgstr "BASE-CONFIG" ++ ++#~ msgid "base-config - Debian base system configuration" ++#~ msgstr "base-config - Configuration du système Debian de base" ++ ++#~ msgid "SYNOPSIS" ++#~ msgstr "SYNOPSIS" ++ ++#~ msgid "B" ++#~ msgstr "B" ++ ++#~ msgid "" ++#~ "B 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 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." ++ ++#~ msgid "IMPLEMENTATION" ++#~ msgstr "IMPLÉMENTATION" ++ ++#~ msgid "" ++#~ "B generates a menu of choices from the contents of B, and from debconf templates." ++#~ msgstr "" ++#~ "B génère un menu de choix à partir du contenu de B et depuis les modèles debconf." ++ ++#~ 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." ++ ++#~ 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." ++ ++#~ 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" ++ ++#~ 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." ++ ++#~ msgid "" ++#~ "B 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 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)" ++ ++#~ 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." ++ ++#~ msgid "" ++#~ "Every base-config run is logged to B. B contains timing information to go with the log. " ++#~ "This allows replays of base-config runs using the B(1) utility." ++#~ msgstr "" ++#~ "Chaque exécution de base-config est consignée dans B. Les informations temporelles du journal sont consignées dans B, ceci permet de relancer base-config en utilisant " ++#~ "B(1)B<.>" ++ ++#~ msgid "" ++#~ "B, if it exists, is used by B " ++#~ "on new installs to get values from the debian-installer first stage " ++#~ "install." ++#~ msgstr "" ++#~ "Le fichier B, s'il existe, est " ++#~ "utilisé par B pendant les nouvelles installations pour " ++#~ "obtenir les valeurs produites par la première étape de debian-installer" ++ ++#~ msgid "" ++#~ "Other packages can drop files into B, 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 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." ++ ++#~ 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(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(1)" ++ ++#~ 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" ++ ++#~ msgid "ENVIRONMENT" ++#~ msgstr "ENVIRONNEMENT" ++ ++#~ msgid "" ++#~ "The following environment variables influence B. These " ++#~ "variables may be set at run time, or for new installs, may be passed to " ++#~ "the kernel at the B(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(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 »." ++ ++#~ msgid "B" ++#~ msgstr "B" ++ ++#~ msgid "B" ++#~ msgstr "B" ++ ++#~ msgid "B" ++#~ msgstr "B" ++ ++#~ msgid "B" ++#~ msgstr "B" ++ ++#~ msgid "Control various things about B(7)" ++#~ msgstr "Contrôle de nombreux aspects de (7)" ++ ++#~ msgid "AUTHOR" ++#~ msgstr "AUTEUR" ++ ++#~ msgid "Joey Hess Ejoeyh@debian.orgE" ++#~ msgstr "Joey Hess Ejoey@debian.orgE" ++ ++#~ msgid "TERMWRAP" ++#~ msgstr "TERMWRAP" ++ ++#~ msgid "termwrap - terminal wrapper" ++#~ msgstr "termwrap - encapsulateur de terminal" ++ ++#~ msgid "B" ++#~ msgstr "B" ++ ++#~ msgid "" ++#~ "B is used to execute B(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 est utilisé pour exécuter B (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." ++ ++#~ msgid "OPTIONS" ++#~ msgstr "OPTIONS" ++ ++#~ msgid "I<-nnt>" ++#~ msgstr "I<-nnt>" ++ ++#~ msgid "Don't run another terminal." ++#~ msgstr "Ne pas lancer d'autre terminal" ++ ++#~ msgid "APT-SETUP" ++#~ msgstr "APT-SETUP" ++ ++#~ msgid "apt-setup - add apt download sources" ++#~ msgstr "apt-setup - permet d'ajouter des sources de téléchargement apt" ++ ++#~ msgid "B" ++#~ msgstr "B" ++ ++#~ msgid "" ++#~ "B 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(8) to scan CDs." ++#~ msgstr "" ++#~ "B 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(8) " ++#~ "pour parcourir des cédéroms." ++ ++#~ msgid "I" ++#~ msgstr "I<« probe »>" ++ ++#~ 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." ++ ++#~ msgid "I<-N>" ++#~ msgstr "I<-N>" ++ ++#~ 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." ++ ++#~ msgid "Joey Hess Ejoey@kitenet.netE" ++#~ msgstr "Joey Hess Ejoey@kitenet.netE" diff --cc debian/local/manpages/po/id.po index 000000000,000000000..74511177a new file mode 100644 --- /dev/null +++ b/debian/local/manpages/po/id.po @@@ -1,0 -1,0 +1,554 @@@ ++# SOME DESCRIPTIVE TITLE ++# Copyright (C) YEAR Free Software Foundation, Inc. ++# FIRST AUTHOR , YEAR. ++# ++msgid "" ++msgstr "" ++"Project-Id-Version: base-config man\n" ++"POT-Creation-Date: 2014-10-21 15:29+0200\n" ++"PO-Revision-Date: 2005-11-11 16:50-0500\n" ++"Last-Translator: Debian Indonesia Team \n" ++"Language-Team: Debian Indonesia Team \n" ++"Language: \n" ++"MIME-Version: 1.0\n" ++"Content-Type: text/plain; charset=ascii\n" ++"Content-Transfer-Encoding: 8bit\n" ++ ++# type: TH ++#. type: TH ++#: validlocale.8:1 ++#, fuzzy, no-wrap ++msgid "validlocale" ++msgstr "validlocale" ++ ++# type: TH ++#. type: TH ++#: validlocale.8:1 ++#, fuzzy, no-wrap ++msgid "0.1" ++msgstr "0.1" ++ ++# type: TH ++#. type: TH ++#: validlocale.8:1 ++#, fuzzy, no-wrap ++msgid "Petter Reinholdtsen" ++msgstr "Petter Reinholdtsen" ++ ++# type: SH ++#. type: SH ++#: validlocale.8:2 ++#, fuzzy, no-wrap ++msgid "NAME" ++msgstr "NAMA" ++ ++# type: Plain text ++#. 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 ++#. type: SH ++#: validlocale.8:5 ++#, fuzzy, no-wrap ++msgid "SYNTAX" ++msgstr "RINGKASAN" ++ ++# type: Plain text ++#. type: Plain text ++#: validlocale.8:8 ++#, fuzzy ++msgid "validlocale EIE" ++msgstr "validlocale EIE" ++ ++# type: SH ++#. type: SH ++#: validlocale.8:8 ++#, fuzzy, no-wrap ++msgid "DESCRIPTION" ++msgstr "PENJELASAN" ++ ++# type: Plain text ++#. 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 ++#. type: SH ++#: validlocale.8:13 ++#, fuzzy, no-wrap ++msgid "FILES" ++msgstr "BERKAS-BERKAS" ++ ++# type: Plain text ++#. type: Plain text ++#: validlocale.8:16 ++#, fuzzy ++msgid "I" ++msgstr "I" ++ ++# type: Plain text ++#. type: Plain text ++#: validlocale.8:18 ++#, fuzzy ++msgid "I" ++msgstr "I" ++ ++# type: SH ++#. type: SH ++#: validlocale.8:18 ++#, fuzzy, no-wrap ++msgid "ENVIRONMENT VARIABLES" ++msgstr "VARIABEL-VARIABEL LINGKUNGAN" ++ ++# type: TP ++#. type: TP ++#: validlocale.8:20 ++#, fuzzy, no-wrap ++msgid "B" ++msgstr "B" ++ ++# type: Plain text ++#. 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 ++#. type: SH ++#: validlocale.8:24 ++#, fuzzy, no-wrap ++msgid "EXAMPLES" ++msgstr "CONTOH" ++ ++# type: Plain text ++#. 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 ++#. type: Plain text ++#: validlocale.8:31 ++#, fuzzy ++msgid "% validlocale C" ++msgstr "% validlocale C" ++ ++# type: Plain text ++#. type: Plain text ++#: validlocale.8:33 ++#, fuzzy ++msgid "locale 'C' valid and available" ++msgstr "locale 'C' valid and available" ++ ++# type: Plain text ++#. 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 ++#. type: Plain text ++#: validlocale.8:40 ++#, fuzzy ++msgid "% validlocale de_AU@euro" ++msgstr "% validlocale de_AU@euro" ++ ++# type: Plain text ++#. type: Plain text ++#: validlocale.8:42 ++#, fuzzy ++msgid "locale 'de_AU@euro' not available" ++msgstr "locale 'de_AT@euro' not available" ++ ++# type: Plain text ++#. type: Plain text ++#: validlocale.8:44 ++#, fuzzy ++msgid "de_AU@euro ISO-8859-15" ++msgstr "de_AT@euro ISO-8859-15" ++ ++# type: SH ++#. type: SH ++#: validlocale.8:44 ++#, fuzzy, no-wrap ++msgid "AUTHORS" ++msgstr "PENULIS" ++ ++# type: Plain text ++#. type: Plain text ++#: validlocale.8:47 ++#, fuzzy ++msgid "Petter Reinholdtsen Epere@hungry.comE" ++msgstr "Petter Reinholdtsen Epere@hungry.comE" ++ ++# type: SH ++#. type: SH ++#: validlocale.8:47 ++#, fuzzy, no-wrap ++msgid "SEE ALSO" ++msgstr "LIHAT JUGA" ++ ++# type: Plain text ++#. 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" ++#~ msgstr "B" ++ ++# type: Plain text ++#, fuzzy ++#~ msgid "" ++#~ "B 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 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 generates a menu of choices from the contents of B, and from debconf templates." ++#~ msgstr "" ++#~ "B menghasilkan pilihan menu dari isi berkas B, 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 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 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. B contains timing information to go with the log. " ++#~ "This allows replays of base-config runs using the B(1) utility." ++#~ msgstr "" ++#~ "Setiap kali base-config dijalankan, akan ditulis log pada B. B berisi informasi waktu " ++#~ "untuk dijalankan dengan log. Ini memungkinkan pengulangan jalannya base-" ++#~ "config dengan menggunakan utilitas B(1)" ++ ++# type: Plain text ++#, fuzzy ++#~ msgid "" ++#~ "B, if it exists, is used by B " ++#~ "on new installs to get values from the debian-installer first stage " ++#~ "install." ++#~ msgstr "" ++#~ "B, jika ada, digunakan oleh B " ++#~ "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, 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, 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(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(1)" ++ ++# type: SH ++#, fuzzy ++#~ msgid "ENVIRONMENT" ++#~ msgstr "LINGKUNGAN" ++ ++# type: Plain text ++#, fuzzy ++#~ msgid "" ++#~ "The following environment variables influence B. These " ++#~ "variables may be set at run time, or for new installs, may be passed to " ++#~ "the kernel at the B(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. Nilai-" ++#~ "nilai ini dapat diatur saat menjalankan, atau untuk instalasi baru, dapat " ++#~ "diberikan pada kernel melalui baris perintah B(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" ++#~ msgstr "B" ++ ++# type: TP ++#, fuzzy ++#~ msgid "B" ++#~ msgstr "B" ++ ++# type: TP ++#, fuzzy ++#~ msgid "B" ++#~ msgstr "B" ++ ++# type: TP ++#, fuzzy ++#~ msgid "B" ++#~ msgstr "B" ++ ++# type: Plain text ++#, fuzzy ++#~ msgid "Control various things about B(7)" ++#~ msgstr "Mengatur beragam hal mengenai B(7)" ++ ++# type: SH ++#, fuzzy ++#~ msgid "AUTHOR" ++#~ msgstr "PENULIS" ++ ++# type: Plain text ++#, fuzzy ++#~ msgid "Joey Hess Ejoeyh@debian.orgE" ++#~ msgstr "Joey Hess Ejoeyh@debian.orgE" ++ ++# 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" ++#~ msgstr "B" ++ ++# type: Plain text ++#, fuzzy ++#~ msgid "" ++#~ "B is used to execute B(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 digunakan untuk menjalankan B(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" ++#~ msgstr "B" ++ ++# type: Plain text ++#, fuzzy ++#~ msgid "" ++#~ "B 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(8) to scan CDs." ++#~ msgstr "" ++#~ "B 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(8) untuk memindai CD." ++ ++# type: TP ++#, fuzzy ++#~ msgid "I" ++#~ msgstr "I" ++ ++# 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 Ejoey@kitenet.netE" ++#~ msgstr "Joey Hess Ejoey@kitenet.netE" ++ ++# type: SH ++#, fuzzy ++#~ msgid "DERIVATION" ++#~ msgstr "PENJELASAN" diff --cc debian/local/manpages/po/man.pot index 000000000,000000000..12f75aa53 new file mode 100644 --- /dev/null +++ b/debian/local/manpages/po/man.pot @@@ -1,0 -1,0 +1,175 @@@ ++# SOME DESCRIPTIVE TITLE ++# Copyright (C) YEAR Free Software Foundation, Inc. ++# This file is distributed under the same license as the PACKAGE package. ++# FIRST AUTHOR , YEAR. ++# ++#, fuzzy ++msgid "" ++msgstr "" ++"Project-Id-Version: PACKAGE VERSION\n" ++"POT-Creation-Date: 2014-10-21 15:29+0200\n" ++"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" ++"Last-Translator: FULL NAME \n" ++"Language-Team: LANGUAGE \n" ++"Language: \n" ++"MIME-Version: 1.0\n" ++"Content-Type: text/plain; charset=CHARSET\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 "" ++ ++#. 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 EIE" ++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" ++msgstr "" ++ ++#. type: Plain text ++#: validlocale.8:18 ++msgid "I" ++msgstr "" ++ ++#. type: SH ++#: validlocale.8:18 ++#, no-wrap ++msgid "ENVIRONMENT VARIABLES" ++msgstr "" ++ ++#. type: TP ++#: validlocale.8:20 ++#, no-wrap ++msgid "B" ++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_AU@euro' not available" ++msgstr "" ++ ++#. type: Plain text ++#: validlocale.8:44 ++msgid "de_AU@euro ISO-8859-15" ++msgstr "" ++ ++#. type: SH ++#: validlocale.8:44 ++#, no-wrap ++msgid "AUTHORS" ++msgstr "" ++ ++#. type: Plain text ++#: validlocale.8:47 ++msgid "Petter Reinholdtsen Epere@hungry.comE" ++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 "" diff --cc debian/local/manpages/po/pl.po index 000000000,000000000..376d4a847 new file mode 100644 --- /dev/null +++ b/debian/local/manpages/po/pl.po @@@ -1,0 -1,0 +1,522 @@@ ++msgid "" ++msgstr "" ++"Project-Id-Version: base-config\n" ++"POT-Creation-Date: 2014-10-21 15:29+0200\n" ++"PO-Revision-Date: 2014-10-21 21:05+0200\n" ++"Last-Translator: Robert Luberda \n" ++"Language-Team: Polish \n" ++"Language: pl\n" ++"MIME-Version: 1.0\n" ++"Content-Type: text/plain; charset=UTF-8\n" ++"Content-Transfer-Encoding: 8bit\n" ++ ++# type: TH ++#. type: TH ++#: validlocale.8:1 ++#, no-wrap ++msgid "validlocale" ++msgstr "validlocale" ++ ++# type: TH ++#. type: TH ++#: validlocale.8:1 ++#, no-wrap ++msgid "0.1" ++msgstr "0.1" ++ ++# type: TH ++#. type: TH ++#: validlocale.8:1 ++#, no-wrap ++msgid "Petter Reinholdtsen" ++msgstr "Petter Reinholdtsen" ++ ++# type: SH ++#. type: SH ++#: validlocale.8:2 ++#, no-wrap ++msgid "NAME" ++msgstr "NAZWA" ++ ++# type: Plain text ++#. 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 ++#. type: SH ++#: validlocale.8:5 ++#, no-wrap ++msgid "SYNTAX" ++msgstr "SKŁADNIA" ++ ++# type: Plain text ++#. type: Plain text ++#: validlocale.8:8 ++msgid "validlocale EIE" ++msgstr "validlocale EIE" ++ ++# type: SH ++#. type: SH ++#: validlocale.8:8 ++#, no-wrap ++msgid "DESCRIPTION" ++msgstr "OPIS" ++ ++# type: Plain text ++#. 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 ++#. type: SH ++#: validlocale.8:13 ++#, no-wrap ++msgid "FILES" ++msgstr "PLIKI" ++ ++# type: Plain text ++#. type: Plain text ++#: validlocale.8:16 ++msgid "I" ++msgstr "I" ++ ++# type: Plain text ++#. type: Plain text ++#: validlocale.8:18 ++msgid "I" ++msgstr "I" ++ ++# type: SH ++#. type: SH ++#: validlocale.8:18 ++#, no-wrap ++msgid "ENVIRONMENT VARIABLES" ++msgstr "ZMIENNE ŚRODOWISKOWE" ++ ++# type: TP ++#. type: TP ++#: validlocale.8:20 ++#, no-wrap ++msgid "B" ++msgstr "B" ++ ++# type: Plain text ++#. 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 ++#. type: SH ++#: validlocale.8:24 ++#, no-wrap ++msgid "EXAMPLES" ++msgstr "PRZYKŁADY" ++ ++# type: Plain text ++#. 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 ++#. type: Plain text ++#: validlocale.8:31 ++msgid "% validlocale C" ++msgstr "% validlocale C" ++ ++# type: Plain text ++#. type: Plain text ++#: validlocale.8:33 ++msgid "locale 'C' valid and available" ++msgstr "locale 'C' valid and available" ++ ++# type: Plain text ++#. 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 ++#. type: Plain text ++#: validlocale.8:40 ++msgid "% validlocale de_AU@euro" ++msgstr "% validlocale de_AU@euro" ++ ++# type: Plain text ++#. type: Plain text ++#: validlocale.8:42 ++#, fuzzy ++#| msgid "locale 'de_AT@euro' not available" ++msgid "locale 'de_AU@euro' not available" ++msgstr "locale 'de_AT@euro' not available" ++ ++# type: Plain text ++#. type: Plain text ++#: validlocale.8:44 ++#, fuzzy ++#| msgid "de_AT@euro ISO-8859-15" ++msgid "de_AU@euro ISO-8859-15" ++msgstr "de_AT@euro ISO-8859-15" ++ ++# type: SH ++#. type: SH ++#: validlocale.8:44 ++#, no-wrap ++msgid "AUTHORS" ++msgstr "AUTOR" ++ ++# type: Plain text ++#. type: Plain text ++#: validlocale.8:47 ++msgid "Petter Reinholdtsen Epere@hungry.comE" ++msgstr "Petter Reinholdtsen Epere@hungry.comE" ++ ++# type: SH ++#. type: SH ++#: validlocale.8:47 ++#, no-wrap ++msgid "SEE ALSO" ++msgstr "PATRZ TAKÅ»E" ++ ++# type: Plain text ++#. 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" ++#~ msgstr "B" ++ ++# type: Plain text ++#~ msgid "" ++#~ "B 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 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 generates a menu of choices from the contents of B, and from debconf templates." ++#~ msgstr "" ++#~ "B generuje menu z listą wyborów na podstawie zawartości " ++#~ "katalogu B 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 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 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. B contains timing information to go with the log. " ++#~ "This allows replays of base-config runs using the B(1) utility." ++#~ msgstr "" ++#~ "Każde uruchomienie programu base-config jest zapisywane w B. B zawiera informacje o czasie " ++#~ "wykonywania poszczególnych poleceń. Pozwala to na powtórzenie uruchomień " ++#~ "base-config za pomocą programiku B(1)." ++ ++# type: Plain text ++#~ msgid "" ++#~ "B, if it exists, is used by B " ++#~ "on new installs to get values from the debian-installer first stage " ++#~ "install." ++#~ msgstr "" ++#~ "Podczas nowych instalacji B używa B, 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, 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, " ++#~ "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(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(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. These " ++#~ "variables may be set at run time, or for new installs, may be passed to " ++#~ "the kernel at the B(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. " ++#~ "Można je ustawić przy uruchomieniu programu lub (w przypadku instalacji " ++#~ "nowego systemu) można je podać jądru przy pomocy linii poleceń B(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" ++#~ msgstr "B" ++ ++# type: TP ++#~ msgid "B" ++#~ msgstr "B" ++ ++# type: TP ++#~ msgid "B" ++#~ msgstr "B" ++ ++# type: TP ++#~ msgid "B" ++#~ msgstr "B" ++ ++# type: Plain text ++#~ msgid "Control various things about B(7)" ++#~ msgstr "Wpływają na działanie systemu B(7)" ++ ++# type: SH ++#~ msgid "AUTHOR" ++#~ msgstr "AUTOR" ++ ++# type: Plain text ++#~ msgid "Joey Hess Ejoeyh@debian.orgE" ++#~ msgstr "Joey Hess Ejoeyh@debian.orgE" ++ ++# 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" ++#~ msgstr "B" ++ ++# type: Plain text ++#~ msgid "" ++#~ "B is used to execute B(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 jest używany do wywołania B(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" ++#~ msgstr "B" ++ ++# type: Plain text ++#~ msgid "" ++#~ "B 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(8) to scan CDs." ++#~ msgstr "" ++#~ "B 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(8) do przeszukiwania płyt CD." ++ ++# type: TP ++#~ msgid "I" ++#~ msgstr "I" ++ ++# 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 Ejoey@kitenet.netE" ++#~ msgstr "Joey Hess Ejoey@kitenet.netE" diff --cc debian/local/manpages/po/pt_BR.po index 000000000,000000000..e02949520 new file mode 100644 --- /dev/null +++ b/debian/local/manpages/po/pt_BR.po @@@ -1,0 -1,0 +1,503 @@@ ++# SOME DESCRIPTIVE TITLE ++# Copyright (C) 2005 Free Software Foundation, Inc. ++# Brazilian , 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 \n" ++"Language-Team: Brazilian \n" ++"MIME-Version: 1.0\n" ++"Content-Type: text/plain; charset=utf-8\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 EIE" ++msgstr "validlocale EIE" ++ ++# 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" ++msgstr "I" ++ ++# type: Plain text ++#: validlocale.8:18 ++msgid "I" ++msgstr "I" ++ ++# type: SH ++#: validlocale.8:18 ++#, no-wrap ++msgid "ENVIRONMENT VARIABLES" ++msgstr "VARIÁVEIS DE AMBIENTE" ++ ++# type: TP ++#: validlocale.8:20 ++#, no-wrap ++msgid "B" ++msgstr "B" ++ ++# 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 Epere@hungry.comE" ++msgstr "Petter Reinholdtsen Epere@hungry.comE" ++ ++# 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" ++#~ msgstr "B" ++ ++# type: Plain text ++#~ msgid "" ++#~ "B 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 é 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 generates a menu of choices from the contents of B, and from debconf templates." ++#~ msgstr "" ++#~ "B gera um menu de opções a partir do conteúdo de B, 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 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 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. B contains timing information to go with the log. " ++#~ "This allows replays of base-config runs using the B(1) utility." ++#~ msgstr "" ++#~ "Cada execução do base-config é registrada em B. B 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(1)." ++ ++# type: Plain text ++#~ msgid "" ++#~ "B, if it exists, is used by B " ++#~ "on new installs to get values from the debian-installer first stage " ++#~ "install." ++#~ msgstr "" ++#~ "B, se o arquivo existe, é usado pelo B 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, 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, 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(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(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. These " ++#~ "variables may be set at run time, or for new installs, may be passed to " ++#~ "the kernel at the B(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. 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" ++#~ "(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" ++#~ msgstr "B" ++ ++# type: TP ++#~ msgid "B" ++#~ msgstr "B" ++ ++# type: TP ++#~ msgid "B" ++#~ msgstr "B" ++ ++# type: TP ++#~ msgid "B" ++#~ msgstr "B" ++ ++# type: Plain text ++#~ msgid "Control various things about B(7)" ++#~ msgstr "Controla várias coisas sobre o B(7)" ++ ++# type: SH ++#~ msgid "AUTHOR" ++#~ msgstr "AUTOR" ++ ++# type: Plain text ++#~ msgid "Joey Hess Ejoeyh@debian.orgE" ++#~ msgstr "Joey Hess Ejoey@kitenet.netE" ++ ++# type: TH ++#~ msgid "TERMWRAP" ++#~ msgstr "TERMWRAP" ++ ++# type: Plain text ++#~ msgid "termwrap - terminal wrapper" ++#~ msgstr "termwrap - wrapper de terminal" ++ ++# type: Plain text ++#~ msgid "B" ++#~ msgstr "B" ++ ++# type: Plain text ++#~ msgid "" ++#~ "B is used to execute B(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 é usado para executar B(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" ++#~ msgstr "B" ++ ++# type: Plain text ++#~ msgid "" ++#~ "B 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(8) to scan CDs." ++#~ msgstr "" ++#~ "B é 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(8) para vasculhar CDs." ++ ++# type: TP ++#~ msgid "I" ++#~ msgstr "I" ++ ++# 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 Ejoey@kitenet.netE" ++#~ msgstr "Joey Hess Ejoey@kitenet.netE" ++ ++# type: TH ++#, fuzzy ++#~ msgid "TZSETUP" ++#~ msgstr "APT-SETUP" ++ ++# type: SH ++#, fuzzy ++#~ msgid "DERIVATION" ++#~ msgstr "DESCRIÇÃO" diff --cc debian/local/manpages/po4a.cfg index 000000000,000000000..61c7566cb new file mode 100644 --- /dev/null +++ b/debian/local/manpages/po4a.cfg @@@ -1,0 -1,0 +1,9 @@@ ++[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 \ ++ de:de/validlocale.de.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 diff --cc debian/local/manpages/pthread_atfork.3 index 000000000,000000000..d8e806a77 new file mode 100644 --- /dev/null +++ b/debian/local/manpages/pthread_atfork.3 @@@ -1,0 -1,0 +1,53 @@@ ++.TH PTHREAD_ATFORK 3 LinuxThreads ++ ++.SH NAME ++pthread_atfork \- register handlers to be called at fork(2) time ++ ++.SH SYNOPSIS ++.B #include ++ ++.BI "int pthread_atfork(void (*" prepare ")(void), void (*" parent ")(void), void (*" child ")(void));" ++ ++.SH DESCRIPTION ++ ++\fBpthread_atfork\fP registers handler functions to be called just before ++and just after a new process is created with \fBfork\fP(2). The \fIprepare\fP ++handler will be called from the parent process, just before the new ++process is created. The \fIparent\fP handler will be called from the parent ++process, just before \fBfork\fP(2) returns. The \fIchild\fP handler will be ++called from the child process, just before \fBfork\fP(2) returns. ++ ++One or several of the three handlers \fIprepare\fP, \fIparent\fP and \fIchild\fP ++can be given as \fBNULL\fP, meaning that no handler needs to be called at ++the corresponding point. ++ ++\fBpthread_atfork\fP can be called several times to install several sets ++of handlers. At \fBfork\fP(2) time, the \fIprepare\fP handlers are called in ++LIFO order (last added with \fBpthread_atfork\fP, first called before \fBfork\fP), ++while the \fIparent\fP and \fIchild\fP handlers are called in FIFO order ++(first added, first called). ++ ++To understand the purpose of \fBpthread_atfork\fP, recall that \fBfork\fP(2) ++duplicates the whole memory space, including mutexes in their current ++locking state, but only the calling thread: other threads are not ++running in the child process. The mutexes are not usable after the ++\fBfork\fP and must be initialized with \fIpthread_mutex_init\fP in the child ++process. This is a limitation of the current implementation and might ++or might not be present in future versions. ++ ++.SH "RETURN VALUE" ++ ++\fBpthread_atfork\fP returns 0 on success and a non-zero error code on error. ++ ++.SH ERRORS ++.TP ++\fBENOMEM\fP ++insufficient memory available to register the handlers. ++ ++.SH AUTHOR ++Xavier Leroy ++ ++.SH "SEE ALSO" ++\fBfork\fP(2), ++\fBpthread_mutex_lock\fP(3), ++\fBpthread_mutex_unlock\fP(3). diff --cc debian/local/manpages/pthread_cond_init.3 index 000000000,000000000..a872d08f4 new file mode 100644 --- /dev/null +++ b/debian/local/manpages/pthread_cond_init.3 @@@ -1,0 -1,0 +1,229 @@@ ++.TH PTHREAD_COND 3 LinuxThreads ++ ++ ++.SH NAME ++pthread_cond_init, pthread_cond_destroy, pthread_cond_signal, pthread_cond_broadcast, pthread_cond_wait, pthread_cond_timedwait \- operations on conditions ++ ++.SH SYNOPSIS ++.B #include ++ ++.BI "pthread_cond_t " cond " = PTHREAD_COND_INITIALIZER;" ++ ++.BI "int pthread_cond_init(pthread_cond_t *" cond ", pthread_condattr_t *" cond_attr ");" ++ ++.BI "int pthread_cond_signal(pthread_cond_t *" cond ");" ++ ++.BI "int pthread_cond_broadcast(pthread_cond_t *" cond ");" ++ ++.BI "int pthread_cond_wait(pthread_cond_t *" cond ", pthread_mutex_t *" mutex ");" ++ ++.BI "int pthread_cond_timedwait(pthread_cond_t *" cond ", pthread_mutex_t *" mutex ", const struct timespec *" abstime ");" ++ ++.BI "int pthread_cond_destroy(pthread_cond_t *" cond ");" ++ ++.SH DESCRIPTION ++ ++A condition (short for ``condition variable'') is a synchronization ++device that allows threads to suspend execution and relinquish the ++processors until some predicate on shared data is satisfied. The basic ++operations on conditions are: signal the condition (when the ++predicate becomes true), and wait for the condition, suspending the ++thread execution until another thread signals the condition. ++ ++A condition variable must always be associated with a mutex, to avoid ++the race condition where a thread prepares to wait on a condition ++variable and another thread signals the condition just before the ++first thread actually waits on it. ++ ++\fBpthread_cond_init\fP initializes the condition variable \fIcond\fP, using the ++condition attributes specified in \fIcond_attr\fP, or default attributes ++if \fIcond_attr\fP is \fBNULL\fP. The LinuxThreads implementation supports no ++attributes for conditions, hence the \fIcond_attr\fP parameter is actually ++ignored. ++ ++Variables of type \fBpthread_cond_t\fP can also be initialized ++statically, using the constant \fBPTHREAD_COND_INITIALIZER\fP. ++ ++\fBpthread_cond_signal\fP restarts one of the threads that are waiting on ++the condition variable \fIcond\fP. If no threads are waiting on \fIcond\fP, ++nothing happens. If several threads are waiting on \fIcond\fP, exactly one ++is restarted, but it is not specified which. ++ ++\fBpthread_cond_broadcast\fP restarts all the threads that are waiting on ++the condition variable \fIcond\fP. Nothing happens if no threads are ++waiting on \fIcond\fP. ++ ++\fBpthread_cond_wait\fP atomically unlocks the \fImutex\fP (as per ++\fBpthread_unlock_mutex\fP) and waits for the condition variable \fIcond\fP to ++be signaled. The thread execution is suspended and does not consume ++any CPU time until the condition variable is signaled. The \fImutex\fP ++must be locked by the calling thread on entrance to ++\fBpthread_cond_wait\fP. Before returning to the calling thread, ++\fBpthread_cond_wait\fP re-acquires \fImutex\fP (as per \fBpthread_lock_mutex\fP). ++ ++Unlocking the mutex and suspending on the condition variable is done ++atomically. Thus, if all threads always acquire the mutex before ++signaling the condition, this guarantees that the condition cannot be ++signaled (and thus ignored) between the time a thread locks the mutex ++and the time it waits on the condition variable. ++ ++\fBpthread_cond_timedwait\fP atomically unlocks \fImutex\fP and waits on ++\fIcond\fP, as \fBpthread_cond_wait\fP does, but it also bounds the duration ++of the wait. If \fIcond\fP has not been signaled within the amount of time ++specified by \fIabstime\fP, the mutex \fImutex\fP is re-acquired and ++\fBpthread_cond_timedwait\fP returns the error \fBETIMEDOUT\fP. ++The \fIabstime\fP parameter specifies an absolute time, with the same ++origin as \fBtime\fP(2) and \fBgettimeofday\fP(2): an \fIabstime\fP of 0 ++corresponds to 00:00:00 GMT, January 1, 1970. ++ ++\fBpthread_cond_destroy\fP destroys a condition variable, freeing the ++resources it might hold. No threads must be waiting on the condition ++variable on entrance to \fBpthread_cond_destroy\fP. In the LinuxThreads ++implementation, no resources are associated with condition variables, ++thus \fBpthread_cond_destroy\fP actually does nothing except checking that ++the condition has no waiting threads. ++ ++.SH CANCELLATION ++ ++\fBpthread_cond_wait\fP and \fBpthread_cond_timedwait\fP are cancellation ++points. If a thread is cancelled while suspended in one of these ++functions, the thread immediately resumes execution, then locks again ++the \fImutex\fP argument to \fBpthread_cond_wait\fP and ++\fBpthread_cond_timedwait\fP, and finally executes the cancellation. ++Consequently, cleanup handlers are assured that \fImutex\fP is locked when ++they are called. ++ ++.SH "ASYNC-SIGNAL SAFETY" ++ ++The condition functions are not async-signal safe, and should not be ++called from a signal handler. In particular, calling ++\fBpthread_cond_signal\fP or \fBpthread_cond_broadcast\fP from a signal ++handler may deadlock the calling thread. ++ ++.SH "RETURN VALUE" ++ ++All condition variable functions return 0 on success and a non-zero ++error code on error. ++ ++.SH ERRORS ++ ++\fBpthread_cond_init\fP, \fBpthread_cond_signal\fP, \fBpthread_cond_broadcast\fP, ++and \fBpthread_cond_wait\fP never return an error code. ++ ++The \fBpthread_cond_timedwait\fP function returns the following error codes ++on error: ++.RS ++.TP ++\fBETIMEDOUT\fP ++the condition variable was not signaled until the timeout specified by ++\fIabstime\fP ++ ++.TP ++\fBEINTR\fP ++\fBpthread_cond_timedwait\fP was interrupted by a signal ++.RE ++ ++The \fBpthread_cond_destroy\fP function returns the following error code ++on error: ++.RS ++.TP ++\fBEBUSY\fP ++some threads are currently waiting on \fIcond\fP. ++.RE ++ ++.SH AUTHOR ++Xavier Leroy ++ ++.SH "SEE ALSO" ++\fBpthread_condattr_init\fP(3), ++\fBpthread_mutex_lock\fP(3), ++\fBpthread_mutex_unlock\fP(3), ++\fBgettimeofday\fP(2), ++\fBnanosleep\fP(2). ++ ++.SH EXAMPLE ++ ++Consider two shared variables \fIx\fP and \fIy\fP, protected by the mutex \fImut\fP, ++and a condition variable \fIcond\fP that is to be signaled whenever \fIx\fP ++becomes greater than \fIy\fP. ++ ++.RS ++.ft 3 ++.nf ++.sp ++int x,y; ++pthread_mutex_t mut = PTHREAD_MUTEX_INITIALIZER; ++pthread_cond_t cond = PTHREAD_COND_INITIALIZER; ++.ft ++.LP ++.RE ++.fi ++ ++Waiting until \fIx\fP is greater than \fIy\fP is performed as follows: ++ ++.RS ++.ft 3 ++.nf ++.sp ++pthread_mutex_lock(&mut); ++while (x <= y) { ++ pthread_cond_wait(&cond, &mut); ++} ++/* operate on x and y */ ++pthread_mutex_unlock(&mut); ++.ft ++.LP ++.RE ++.fi ++ ++Modifications on \fIx\fP and \fIy\fP that may cause \fIx\fP to become greater than ++\fIy\fP should signal the condition if needed: ++ ++.RS ++.ft 3 ++.nf ++.sp ++pthread_mutex_lock(&mut); ++/* modify x and y */ ++if (x > y) pthread_cond_broadcast(&cond); ++pthread_mutex_unlock(&mut); ++.ft ++.LP ++.RE ++.fi ++ ++If it can be proved that at most one waiting thread needs to be waken ++up (for instance, if there are only two threads communicating through ++\fIx\fP and \fIy\fP), \fBpthread_cond_signal\fP can be used as a slightly more ++efficient alternative to \fBpthread_cond_broadcast\fP. In doubt, use ++\fBpthread_cond_broadcast\fP. ++ ++To wait for \fIx\fP to becomes greater than \fIy\fP with a timeout of 5 ++seconds, do: ++ ++.RS ++.ft 3 ++.nf ++.sp ++struct timeval now; ++struct timespec timeout; ++int retcode; ++ ++pthread_mutex_lock(&mut); ++gettimeofday(&now); ++timeout.tv_sec = now.tv_sec + 5; ++timeout.tv_nsec = now.tv_usec * 1000; ++retcode = 0; ++while (x <= y && retcode != ETIMEDOUT) { ++ retcode = pthread_cond_timedwait(&cond, &mut, &timeout); ++} ++if (retcode == ETIMEDOUT) { ++ /* timeout occurred */ ++} else { ++ /* operate on x and y */ ++} ++pthread_mutex_unlock(&mut); ++.ft ++.LP ++.RE ++.fi diff --cc debian/local/manpages/pthread_condattr_init.3 index 000000000,000000000..23abb063c new file mode 100644 --- /dev/null +++ b/debian/local/manpages/pthread_condattr_init.3 @@@ -1,0 -1,0 +1,38 @@@ ++.TH PTHREAD_CONDATTR 3 LinuxThreads ++ ++ ++.SH NAME ++pthread_condattr_init, pthread_condattr_destroy \- condition creation attributes ++ ++.SH SYNOPSIS ++.B #include ++ ++.BI "int pthread_condattr_init(pthread_condattr_t *" attr ");" ++ ++.BI "int pthread_condattr_destroy(pthread_condattr_t *" attr ");" ++ ++.SH DESCRIPTION ++ ++Condition attributes can be specified at condition creation time, by passing a ++condition attribute object as second argument to \fBpthread_cond_init\fP(3). ++Passing \fBNULL\fP is equivalent to passing a condition attribute object with ++all attributes set to their default values. ++ ++The LinuxThreads implementation supports no attributes for ++conditions. The functions on condition attributes are included only ++for compliance with the POSIX standard. ++ ++\fBpthread_condattr_init\fP initializes the condition attribute object ++\fIattr\fP and fills it with default values for the attributes. ++\fBpthread_condattr_destroy\fP destroys a condition attribute object, ++which must not be reused until it is reinitialized. Both functions do ++nothing in the LinuxThreads implementation. ++ ++.SH "RETURN VALUE" ++\fBpthread_condattr_init\fP and \fBpthread_condattr_destroy\fP always return 0. ++ ++.SH AUTHOR ++Xavier Leroy ++ ++.SH "SEE ALSO" ++\fBpthread_cond_init\fP(3). diff --cc debian/local/manpages/pthread_key_create.3 index 000000000,000000000..4041fd5e4 new file mode 100644 --- /dev/null +++ b/debian/local/manpages/pthread_key_create.3 @@@ -1,0 -1,0 +1,151 @@@ ++.TH PTHREAD_SPECIFIC 3 LinuxThreads ++ ++.SH NAME ++pthread_key_create, pthread_key_delete, pthread_setspecific, pthread_getspecific \- management of thread-specific data ++ ++.SH SYNOPSIS ++.B #include ++ ++.BI "int pthread_key_create(pthread_key_t *" key ", void (*" destr_function ") (void *));" ++ ++.BI "int pthread_key_delete(pthread_key_t " key ");" ++ ++.BI "int pthread_setspecific(pthread_key_t " key ", const void *" pointer ");" ++ ++.BI "void * pthread_getspecific(pthread_key_t " key ");" ++ ++.SH DESCRIPTION ++ ++Programs often need global or static variables that have different ++values in different threads. Since threads share one memory space, ++this cannot be achieved with regular variables. Thread-specific data ++is the POSIX threads answer to this need. ++ ++Each thread possesses a private memory block, the thread-specific data ++area, or TSD area for short. This area is indexed by TSD keys. The TSD ++area associates values of type \fBvoid *\fP to TSD keys. TSD keys are ++common to all threads, but the value associated with a given TSD key ++can be different in each thread. ++ ++For concreteness, the TSD areas can be viewed as arrays of \fBvoid *\fP ++pointers, TSD keys as integer indices into these arrays, and the value ++of a TSD key as the value of the corresponding array element in the ++calling thread. ++ ++When a thread is created, its TSD area initially associates \fBNULL\fP ++with all keys. ++ ++\fBpthread_key_create\fP allocates a new TSD key. The key is stored in the ++location pointed to by \fIkey\fP. There is a limit of \fBPTHREAD_KEYS_MAX\fP ++on the number of keys allocated at a given time. The value initially ++associated with the returned key is \fBNULL\fP in all currently executing ++threads. ++ ++The \fIdestr_function\fP argument, if not \fBNULL\fP, specifies a destructor ++function associated with the key. When a thread terminates via ++\fBpthread_exit\fP or by cancellation, \fIdestr_function\fP is called with ++arguments the value associated with the key in that thread. The ++\fIdestr_function\fP is not called if that value is \fBNULL\fP. The order in ++which destructor functions are called at thread termination time is ++unspecified. ++ ++Before the destructor function is called, the \fBNULL\fP value is ++associated with the key in the current thread. A destructor function ++might, however, re-associate non-\fBNULL\fP values to that key or some ++other key. To deal with this, if after all the destructors have been ++called for all non-\fBNULL\fP values, there are still some non-\fBNULL\fP ++values with associated destructors, then the process is repeated. The ++LinuxThreads implementation stops the process after ++\fBPTHREAD_DESTRUCTOR_ITERATIONS\fP iterations, even if some non-\fBNULL\fP ++values with associated descriptors remain. Other implementations may ++loop indefinitely. ++ ++\fBpthread_key_delete\fP deallocates a TSD key. It does not check whether ++non-\fBNULL\fP values are associated with that key in the currently ++executing threads, nor call the destructor function associated with ++the key. ++ ++\fBpthread_setspecific\fP changes the value associated with \fIkey\fP in the ++calling thread, storing the given \fIpointer\fP instead. ++ ++\fBpthread_getspecific\fP returns the value currently associated with ++\fIkey\fP in the calling thread. ++ ++.SH "RETURN VALUE" ++ ++\fBpthread_key_create\fP, \fBpthread_key_delete\fP, and \fBpthread_setspecific\fP ++return 0 on success and a non-zero error code on failure. If ++successful, \fBpthread_key_create\fP stores the newly allocated key in the ++location pointed to by its \fIkey\fP argument. ++ ++\fBpthread_getspecific\fP returns the value associated with \fIkey\fP on ++success, and \fBNULL\fP on error. ++ ++.SH ERRORS ++\fBpthread_key_create\fP returns the following error code on error: ++.RS ++.TP ++\fBEAGAIN\fP ++\fBPTHREAD_KEYS_MAX\fP keys are already allocated ++.RE ++ ++\fBpthread_key_delete\fP and \fBpthread_setspecific\fP return the following ++error code on error: ++.RS ++.TP ++\fBEINVAL\fP ++\fIkey\fP is not a valid, allocated TSD key ++.RE ++ ++\fBpthread_getspecific\fP returns \fBNULL\fP if \fIkey\fP is not a valid, ++allocated TSD key. ++ ++.SH AUTHOR ++Xavier Leroy ++ ++.SH "SEE ALSO" ++pthread_create(3), pthread_exit(3), pthread_testcancel(3). ++ ++.SH EXAMPLE ++ ++The following code fragment allocates a thread-specific array of 100 ++characters, with automatic reclaimation at thread exit: ++ ++.RS ++.ft 3 ++.nf ++.sp ++/* Key for the thread-specific buffer */ ++static pthread_key_t buffer_key; ++ ++/* Once-only initialisation of the key */ ++static pthread_once_t buffer_key_once = PTHREAD_ONCE_INIT; ++ ++/* Allocate the thread-specific buffer */ ++void buffer_alloc(void) ++{ ++ pthread_once(&buffer_key_once, buffer_key_alloc); ++ pthread_setspecific(buffer_key, malloc(100)); ++} ++ ++/* Return the thread-specific buffer */ ++char * get_buffer(void) ++{ ++ return (char *) pthread_getspecific(buffer_key); ++} ++ ++/* Allocate the key */ ++static void buffer_key_alloc() ++{ ++ pthread_key_create(&buffer_key, buffer_destroy); ++} ++ ++/* Free the thread-specific buffer */ ++static void buffer_destroy(void * buf) ++{ ++ free(buf); ++} ++.ft ++.LP ++.RE ++.fi diff --cc debian/local/manpages/pthread_mutex_init.3 index 000000000,000000000..0d7f5dd55 new file mode 100644 --- /dev/null +++ b/debian/local/manpages/pthread_mutex_init.3 @@@ -1,0 -1,0 +1,209 @@@ ++.TH PTHREAD_MUTEX 3 LinuxThreads ++ ++ ++.SH NAME ++pthread_mutex_init, pthread_mutex_lock, pthread_mutex_trylock, pthread_mutex_unlock, pthread_mutex_destroy \- operations on mutexes ++ ++.SH SYNOPSIS ++.B #include ++ ++.BI "pthread_mutex_t " fastmutex " = PTHREAD_MUTEX_INITIALIZER;" ++ ++.BI "pthread_mutex_t " recmutex " = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;" ++ ++.BI "pthread_mutex_t " errchkmutex " = PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP;" ++ ++.BI "int pthread_mutex_init(pthread_mutex_t *" mutex ", const pthread_mutexattr_t *" mutexattr ");" ++ ++.BI "int pthread_mutex_lock(pthread_mutex_t *" mutex ");" ++ ++.BI "int pthread_mutex_trylock(pthread_mutex_t *" mutex ");" ++ ++.BI "int pthread_mutex_unlock(pthread_mutex_t *" mutex ");" ++ ++.BI "int pthread_mutex_destroy(pthread_mutex_t *" mutex ");" ++ ++.SH DESCRIPTION ++A mutex is a MUTual EXclusion device, and is useful for protecting ++shared data structures from concurrent modifications, and implementing ++critical sections and monitors. ++ ++A mutex has two possible states: unlocked (not owned by any thread), ++and locked (owned by one thread). A mutex can never be owned by two ++different threads simultaneously. A thread attempting to lock a mutex ++that is already locked by another thread is suspended until the owning ++thread unlocks the mutex first. ++ ++\fBpthread_mutex_init\fP initializes the mutex object pointed to by ++\fImutex\fP according to the mutex attributes specified in \fImutexattr\fP. ++If \fImutexattr\fP is \fBNULL\fP, default attributes are used instead. ++ ++The LinuxThreads implementation supports only one mutex attributes, ++the \fImutex kind\fP, which is either ``fast'', ``recursive'', or ++``error checking''. The kind of a mutex determines whether ++it can be locked again by a thread that already owns it. ++The default kind is ``fast''. See \fBpthread_mutexattr_init\fP(3) for more ++information on mutex attributes. ++ ++Variables of type \fBpthread_mutex_t\fP can also be initialized ++statically, using the constants \fBPTHREAD_MUTEX_INITIALIZER\fP (for fast ++mutexes), \fBPTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP\fP (for recursive ++mutexes), and \fBPTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP\fP (for error checking ++mutexes). ++ ++\fBpthread_mutex_lock\fP locks the given mutex. If the mutex is currently ++unlocked, it becomes locked and owned by the calling thread, and ++\fBpthread_mutex_lock\fP returns immediately. If the mutex is already ++locked by another thread, \fBpthread_mutex_lock\fP suspends the calling ++thread until the mutex is unlocked. ++ ++If the mutex is already locked by the calling thread, the behavior of ++\fBpthread_mutex_lock\fP depends on the kind of the mutex. If the mutex is ++of the ``fast'' kind, the calling thread is suspended until the mutex ++is unlocked, thus effectively causing the calling thread to ++deadlock. If the mutex is of the ``error checking'' kind, ++\fBpthread_mutex_lock\fP returns immediately with the error code \fBEDEADLK\fP. ++If the mutex is of the ``recursive'' kind, \fBpthread_mutex_lock\fP ++succeeds and returns immediately, recording the number of times the ++calling thread has locked the mutex. An equal number of ++\fBpthread_mutex_unlock\fP operations must be performed before the mutex ++returns to the unlocked state. ++ ++\fBpthread_mutex_trylock\fP behaves identically to \fBpthread_mutex_lock\fP, ++except that it does not block the calling thread if the mutex is ++already locked by another thread (or by the calling thread in the case ++of a ``fast'' mutex). Instead, \fBpthread_mutex_trylock\fP returns ++immediately with the error code \fBEBUSY\fP. ++ ++\fBpthread_mutex_unlock\fP unlocks the given mutex. The mutex is assumed ++to be locked and owned by the calling thread on entrance to ++\fBpthread_mutex_unlock\fP. If the mutex is of the ``fast'' kind, ++\fBpthread_mutex_unlock\fP always returns it to the unlocked state. If it ++is of the ``recursive'' kind, it decrements the locking count of the ++mutex (number of \fBpthread_mutex_lock\fP operations performed on it by ++the calling thread), and only when this count reaches zero is the ++mutex actually unlocked. ++ ++On ``error checking'' and ``recursive'' mutexes, ++\fBpthread_mutex_unlock\fP actually checks at run-time that the mutex is ++locked on entrance, and that it was locked by the same thread that is ++now calling \fBpthread_mutex_unlock\fP. If these conditions are not met, ++an error code is returned and the mutex remains unchanged. ``Fast'' ++mutexes perform no such checks, thus allowing a locked mutex to be ++unlocked by a thread other than its owner. This is non-portable behavior ++and must not be relied upon. ++ ++\fBpthread_mutex_destroy\fP destroys a mutex object, freeing the resources ++it might hold. The mutex must be unlocked on entrance. In the ++LinuxThreads implementation, no resources are associated with mutex ++objects, thus \fBpthread_mutex_destroy\fP actually does nothing except ++checking that the mutex is unlocked. ++ ++.SH CANCELLATION ++ ++None of the mutex functions is a cancellation point, not even ++\fBpthread_mutex_lock\fP, in spite of the fact that it can suspend a ++thread for arbitrary durations. This way, the status of mutexes at ++cancellation points is predictable, allowing cancellation handlers to ++unlock precisely those mutexes that need to be unlocked before the ++thread stops executing. Consequently, threads using deferred ++cancellation should never hold a mutex for extended periods of time. ++ ++.SH "ASYNC-SIGNAL SAFETY" ++ ++The mutex functions are not async-signal safe. What this means is that ++they should not be called from a signal handler. In particular, ++calling \fBpthread_mutex_lock\fP or \fBpthread_mutex_unlock\fP from a signal ++handler may deadlock the calling thread. ++ ++.SH "RETURN VALUE" ++ ++\fBpthread_mutex_init\fP always returns 0. The other mutex functions ++return 0 on success and a non-zero error code on error. ++ ++.SH ERRORS ++ ++The \fBpthread_mutex_lock\fP function returns the following error code ++on error: ++.RS ++.TP ++\fBEINVAL\fP ++the mutex has not been properly initialized. ++ ++.TP ++\fBEDEADLK\fP ++the mutex is already locked by the calling thread ++(``error checking'' mutexes only). ++.RE ++ ++The \fBpthread_mutex_trylock\fP function returns the following error codes ++on error: ++.RS ++.TP ++\fBEBUSY\fP ++the mutex could not be acquired because it was currently locked. ++ ++.TP ++\fBEINVAL\fP ++the mutex has not been properly initialized. ++.RE ++ ++The \fBpthread_mutex_unlock\fP function returns the following error code ++on error: ++.RS ++.TP ++\fBEINVAL\fP ++the mutex has not been properly initialized. ++ ++.TP ++\fBEPERM\fP ++the calling thread does not own the mutex (``error checking'' mutexes only). ++.RE ++ ++The \fBpthread_mutex_destroy\fP function returns the following error code ++on error: ++.RS ++.TP ++\fBEBUSY\fP ++the mutex is currently locked. ++.RE ++ ++.SH AUTHOR ++Xavier Leroy ++ ++.SH "SEE ALSO" ++\fBpthread_mutexattr_init\fP(3), ++\fBpthread_mutexattr_setkind_np\fP(3), ++\fBpthread_cancel\fP(3). ++ ++.SH EXAMPLE ++ ++A shared global variable \fIx\fP can be protected by a mutex as follows: ++ ++.RS ++.ft 3 ++.nf ++.sp ++int x; ++pthread_mutex_t mut = PTHREAD_MUTEX_INITIALIZER; ++.ft ++.LP ++.RE ++.fi ++ ++All accesses and modifications to \fIx\fP should be bracketed by calls to ++\fBpthread_mutex_lock\fP and \fBpthread_mutex_unlock\fP as follows: ++ ++.RS ++.ft 3 ++.nf ++.sp ++pthread_mutex_lock(&mut); ++/* operate on x */ ++pthread_mutex_unlock(&mut); ++.ft ++.LP ++.RE ++.fi ++ ++ diff --cc debian/local/manpages/pthread_mutexattr_init.3 index 000000000,000000000..eea58952e new file mode 100644 --- /dev/null +++ b/debian/local/manpages/pthread_mutexattr_init.3 @@@ -1,0 -1,0 +1,81 @@@ ++.TH PTHREAD_MUTEXATTR 3 LinuxThreads ++ ++ ++.SH NAME ++pthread_mutexattr_init, pthread_mutexattr_destroy, pthread_mutexattr_settype, pthread_mutexattr_gettype \- mutex creation attributes ++ ++.SH SYNOPSIS ++.B #include ++ ++.BI "int pthread_mutexattr_init(pthread_mutexattr_t *" attr ");" ++ ++.BI "int pthread_mutexattr_destroy(pthread_mutexattr_t *" attr ");" ++ ++.BI "int pthread_mutexattr_settype(pthread_mutexattr_t *" attr ", int " kind ");" ++ ++.BI "int pthread_mutexattr_gettype(const pthread_mutexattr_t *" attr ", int *" kind ");" ++ ++.SH DESCRIPTION ++ ++Mutex attributes can be specified at mutex creation time, by passing a ++mutex attribute object as second argument to \fBpthread_mutex_init\fP(3). ++Passing \fBNULL\fP is equivalent to passing a mutex attribute object with ++all attributes set to their default values. ++ ++\fBpthread_mutexattr_init\fP initializes the mutex attribute object \fIattr\fP ++and fills it with default values for the attributes. ++ ++\fBpthread_mutexattr_destroy\fP destroys a mutex attribute object, which ++must not be reused until it is reinitialized. \fBpthread_mutexattr_destroy\fP ++does nothing in the LinuxThreads implementation. ++ ++LinuxThreads supports only one mutex attribute: the mutex kind, which ++is either \fBPTHREAD_MUTEX_FAST_NP\fP for ``fast'' mutexes, ++\fBPTHREAD_MUTEX_RECURSIVE_NP\fP for ``recursive'' mutexes, ++or \fBPTHREAD_MUTEX_ERRORCHECK_NP\fP for ``error checking'' mutexes. ++As the \fBNP\fP suffix indicates, this is a non-portable extension to the ++POSIX standard and should not be employed in portable programs. ++ ++The mutex kind determines what happens if a thread attempts to lock a ++mutex it already owns with \fBpthread_mutex_lock\fP(3). If the mutex is of ++the ``fast'' kind, \fBpthread_mutex_lock\fP(3) simply suspends the calling ++thread forever. If the mutex is of the ``error checking'' kind, ++\fBpthread_mutex_lock\fP(3) returns immediately with the error code ++\fBEDEADLK\fP. If the mutex is of the ``recursive'' kind, the call to ++\fBpthread_mutex_lock\fP(3) returns immediately with a success return ++code. The number of times the thread owning the mutex has locked it is ++recorded in the mutex. The owning thread must call ++\fBpthread_mutex_unlock\fP(3) the same number of times before the mutex ++returns to the unlocked state. ++ ++The default mutex kind is ``fast'', that is, \fBPTHREAD_MUTEX_FAST_NP\fP. ++ ++\fBpthread_mutexattr_settype\fP sets the mutex kind attribute in \fIattr\fP ++to the value specified by \fIkind\fP. ++ ++\fBpthread_mutexattr_gettype\fP retrieves the current value of the ++mutex kind attribute in \fIattr\fP and stores it in the location pointed ++to by \fIkind\fP. ++ ++.SH "RETURN VALUE" ++\fBpthread_mutexattr_init\fP, \fBpthread_mutexattr_destroy\fP and ++\fBpthread_mutexattr_gettype\fP always return 0. ++ ++\fBpthread_mutexattr_settype\fP returns 0 on success and a non-zero ++error code on error. ++ ++.SH ERRORS ++ ++On error, \fBpthread_mutexattr_settype\fP returns the following error code: ++.TP ++\fBEINVAL\fP ++\fIkind\fP is neither \fBPTHREAD_MUTEX_FAST_NP\fP nor \fBPTHREAD_MUTEX_RECURSIVE_NP\fP ++nor \fBPTHREAD_MUTEX_ERRORCHECK_NP\fP ++ ++.SH AUTHOR ++Xavier Leroy ++ ++.SH "SEE ALSO" ++\fBpthread_mutex_init\fP(3), ++\fBpthread_mutex_lock\fP(3), ++\fBpthread_mutex_unlock\fP(3). diff --cc debian/local/manpages/pthread_mutexattr_setkind_np.3 index 000000000,000000000..0daa0c430 new file mode 100644 --- /dev/null +++ b/debian/local/manpages/pthread_mutexattr_setkind_np.3 @@@ -1,0 -1,0 +1,38 @@@ ++.TH PTHREAD_MUTEXATTR_SETKIND_NP 3 LinuxThreads ++ ++ ++.SH NAME ++pthread_mutexattr_setkind_np, pthread_mutexattr_getkind_np \- deprecated mutex creation attributes ++ ++.SH SYNOPSIS ++.B #include ++ ++.BI "int pthread_mutexattr_setkind_np(pthread_mutexattr_t *" attr ", int " kind ");" ++ ++.BI "int pthread_mutexattr_getkind_np(const pthread_mutexattr_t *" attr ", int *" kind ");" ++ ++.SH DESCRIPTION ++ ++These functions are deprecated, use \fBpthread_mutexattr_settype\fP(3) ++and \fBpthread_mutexattr_gettype\fP(3) instead. ++ ++.SH "RETURN VALUE" ++\fBpthread_mutexattr_getkind_np\fP always returns 0. ++ ++\fBpthread_mutexattr_setkind_np\fP returns 0 on success and a non-zero ++error code on error. ++ ++.SH ERRORS ++ ++On error, \fBpthread_mutexattr_setkind_np\fP returns the following error code: ++.TP ++\fBEINVAL\fP ++\fIkind\fP is neither \fBPTHREAD_MUTEX_FAST_NP\fP nor \fBPTHREAD_MUTEX_RECURSIVE_NP\fP ++nor \fBPTHREAD_MUTEX_ERRORCHECK_NP\fP ++ ++.SH AUTHOR ++Xavier Leroy ++ ++.SH "SEE ALSO" ++\fBpthread_mutexattr_settype\fP(3), ++\fBpthread_mutexattr_gettype\fP(3). diff --cc debian/local/manpages/pthread_once.3 index 000000000,000000000..8ba47a36c new file mode 100644 --- /dev/null +++ b/debian/local/manpages/pthread_once.3 @@@ -1,0 -1,0 +1,34 @@@ ++.TH PTHREAD_ONCE 3 LinuxThreads ++ ++.SH NAME ++pthread_once \- once-only initialization ++ ++.SH SYNOPSIS ++.B #include ++ ++.BI "pthread_once_t " once_control " = PTHREAD_ONCE_INIT;" ++ ++.BI "int pthread_once(pthread_once_t *" once_control ", void (*" init_routine ") (void));" ++ ++.SH DESCRIPTION ++ ++The purpose of \fBpthread_once\fP is to ensure that a piece of ++initialization code is executed at most once. The \fIonce_control\fP ++argument points to a static or extern variable statically initialized ++to \fBPTHREAD_ONCE_INIT\fP. ++ ++The first time \fBpthread_once\fP is called with a given \fIonce_control\fP ++argument, it calls \fIinit_routine\fP with no argument and changes the ++value of the \fIonce_control\fP variable to record that initialization has ++been performed. Subsequent calls to \fBpthread_once\fP with the same ++\fBonce_control\fP argument do nothing. ++ ++.SH "RETURN VALUE" ++\fBpthread_once\fP always returns 0. ++ ++.SH ERRORS ++None. ++ ++.SH AUTHOR ++Xavier Leroy ++ diff --cc debian/local/manpages/rpcgen.1 index 000000000,000000000..be9b3e68a new file mode 100644 --- /dev/null +++ b/debian/local/manpages/rpcgen.1 @@@ -1,0 -1,0 +1,460 @@@ ++.\" @(#)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. ++.\" Correction to the original for groff in October 2013 ++.\" Local register 'X' interferes with the same register in the ++.\" 'an-old.tmac' macro file in groff ++.\" The original did not have any value for register X, added zero ++.ie \n(.g \{\ ++.\" 'X' can be defined on the command line ++.if r X .nr XTH \nX ++.nr X 0 ++.\} ++.el .nr X ++.\" End correction for groff ++.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 "" "" "\&" ++.\" Correction to the original for groff in October 2013 ++.\" The local register 'X' can interfere with the same register in the ++.\" 'an-old.tmac' macro file in groff ++.if \n(.g \{\ ++.ie r XTH .nr X \n[XTH] \" X was defined on the command line ++.el .rr X ++.\} ++.\" End correction for groff ++.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). diff --cc debian/local/manpages/sotruss.1 index 000000000,000000000..0705652a1 new file mode 100644 --- /dev/null +++ b/debian/local/manpages/sotruss.1 @@@ -1,0 -1,0 +1,52 @@@ ++.TH SOTRUSS "1" "May 2014" "sotruss" "User Commands" ++.SH NAME ++sotruss \- trace shared library calls through PLT ++.SH SYNOPSIS ++.B sotruss ++[\fI\,OPTION\/\fR...] [\fI\,--\/\fR] \fI\,EXECUTABLE \/\fR[\fI\,EXECUTABLE-OPTION\/\fR...] ++.SH DESCRIPTION ++.B sotruss ++is a small wrapper around ++.B ld.so ++that runs the specified ++.I executable ++until it exits. It intercepts and produce a trace of the dynamic library calls which ++are called by the executed process via the Procedure Linkage Table (PLT). It ++outputs the caller, the calle and the parameters as each call is executed. ++.SH OPTIONS ++.TP ++\fB\-F\fR, \fB\-\-from\fR FROMLIST ++Trace calls from objects on FROMLIST. ++.TP ++\fB\-T\fR, \fB\-\-to\fR TOLIST ++Trace calls to objects on TOLIST. ++.TP ++\fB\-e\fR, \fB\-\-exit\fR ++Also show exits from the function calls. ++.TP ++\fB\-f\fR, \fB\-\-follow\fR ++Trace child processes as they are created by currently traced processes as a result of the ++.BR fork(2) ++system call. ++.TP ++\fB\-o\fR, \fB\-\-output\fR FILENAME ++Write output to FILENAME (or FILENAME. in case ++\fB\-f\fR is also used) instead of standard error. ++.TP ++\-?, \fB\-\-help\fR ++Give this help list ++.TP ++\fB\-\-usage\fR ++Give a short usage message ++.TP ++\fB\-\-version\fR ++Print program version ++.SH AUTHOR ++Written by Ulrich Drepper. ++.SH COPYRIGHT ++Copyright \(co 2013 Free Software Foundation, Inc. ++.br ++This is free software; see the source for copying conditions. There is NO ++warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ++.SH "SEE ALSO" ++.BR ld.so(8). diff --cc debian/local/manpages/tzselect.1 index 000000000,000000000..dbb6f7f3e new file mode 100644 --- /dev/null +++ b/debian/local/manpages/tzselect.1 @@@ -1,0 -1,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 ++ ++Please see nroff source for legal notice. ++ ++ ++ ++ ++ ++ ++ ++ diff --cc debian/local/manpages/update-locale.8 index 000000000,000000000..249ac43f9 new file mode 100644 --- /dev/null +++ b/debian/local/manpages/update-locale.8 @@@ -1,0 -1,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 ++.SH "SEE ALSO" ++.LP ++locale\-gen(8), locale(1) diff --cc debian/local/manpages/validlocale.8 index 000000000,000000000..ad1d909da new file mode 100644 --- /dev/null +++ b/debian/local/manpages/validlocale.8 @@@ -1,0 -1,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 ++.SH "SEE ALSO" ++.LP ++locale\-gen(8), localedef(1), locale(1) diff --cc debian/local/usr_sbin/locale-gen index 000000000,000000000..3d13dadfe new file mode 100755 --- /dev/null +++ b/debian/local/usr_sbin/locale-gen @@@ -1,0 -1,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." diff --cc debian/local/usr_sbin/update-locale index 000000000,000000000..3951cdd9b new file mode 100755 --- /dev/null +++ b/debian/local/usr_sbin/update-locale @@@ -1,0 -1,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 () ++ { ++ $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; diff --cc debian/local/usr_sbin/validlocale index 000000000,000000000..fadf79754 new file mode 100755 --- /dev/null +++ b/debian/local/usr_sbin/validlocale @@@ -1,0 -1,0 +1,75 @@@ ++#!/usr/bin/perl -w ++# ++# Author: Petter Reinholdtsen ++# 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 \n" ++} ++ ++sub get_default_charset { ++ my ($locale) = @_; ++ my ($l, $c); ++ open(SUPPORTED, "< $supportedlist") || die "Unable to open $supportedlist"; ++ while () { ++ 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; ++ } ++} diff --cc debian/patches/README index 000000000,000000000..ee22d17ae new file mode 100644 --- /dev/null +++ b/debian/patches/README @@@ -1,0 -1,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'. ++ diff --cc debian/patches/all/local-alias-et_EE.diff index 000000000,000000000..5a020f0fa new file mode 100644 --- /dev/null +++ b/debian/patches/all/local-alias-et_EE.diff @@@ -1,0 -1,0 +1,17 @@@ ++--- ++ intl/locale.alias | 4 ++-- ++ 1 file changed, 2 insertions(+), 2 deletions(-) ++ ++--- a/intl/locale.alias +++++ b/intl/locale.alias ++@@ -33,8 +33,8 @@ ++ dansk da_DK.ISO-8859-1 ++ deutsch de_DE.ISO-8859-1 ++ dutch nl_NL.ISO-8859-1 ++-eesti et_EE.ISO-8859-1 ++-estonian et_EE.ISO-8859-1 +++eesti et_EE.ISO-8859-15 +++estonian et_EE.ISO-8859-15 ++ finnish fi_FI.ISO-8859-1 ++ french fr_FR.ISO-8859-1 ++ galego gl_ES.ISO-8859-1 diff --cc debian/patches/all/local-ldd.diff index 000000000,000000000..85975e21a new file mode 100644 --- /dev/null +++ b/debian/patches/all/local-ldd.diff @@@ -1,0 -1,0 +1,37 @@@ ++2013-05-11 Aurelien Jarno ++ ++ * elf/ldd.bash.in: Verify the dynamic linker is working before ++ using it. ++ ++--- ++ elf/ldd.bash.in | 20 +++----------------- ++ 1 file changed, 3 insertions(+), 17 deletions(-) ++ ++--- a/elf/ldd.bash.in +++++ b/elf/ldd.bash.in ++@@ -151,17 +152,18 @@ ++ echo "ldd: ${file}:" $"not regular file" >&2 ++ result=1 ++ elif test -r "$file"; then ++- test -x "$file" || echo 'ldd:' $"\ ++-warning: you do not have execution permission for" "\`$file'" >&2 ++ RTLD= ++ ret=1 ++ for rtld in ${RTLDLIST}; do ++ if test -x $rtld; then ++- verify_out=`${rtld} --verify "$file"` ++- ret=$? ++- case $ret in ++- [02]) RTLD=${rtld}; break;; ++- esac +++ dummy=`$rtld 2>&1` +++ if test $? = 127; then +++ verify_out=`${rtld} --verify "$file"` +++ ret=$? +++ case $ret in +++ [02]) RTLD=${rtld}; break;; +++ esac +++ fi ++ fi ++ done ++ case $ret in diff --cc debian/patches/all/local-nis-shadow.diff index 000000000,000000000..a6db81557 new file mode 100644 --- /dev/null +++ b/debian/patches/all/local-nis-shadow.diff @@@ -1,0 -1,0 +1,12 @@@ ++--- ++ nis/nss | 2 +- ++ 1 file changed, 1 insertion(+), 1 deletion(-) ++ ++--- a/nis/nss +++++ b/nis/nss ++@@ -34,4 +34,4 @@ ++ # server cannot be trusted to send the passwd.adjuct table only to ++ # privileged clients. Instead the passwd.adjunct.byname table is ++ # used to synthesize the shadow.byname table if it does not exist. ++-#ADJUNCT_AS_SHADOW=TRUE +++ADJUNCT_AS_SHADOW=TRUE diff --cc debian/patches/all/local-remove-manual.diff index 000000000,000000000..30453f8cd new file mode 100644 --- /dev/null +++ b/debian/patches/all/local-remove-manual.diff @@@ -1,0 -1,0 +1,224 @@@ ++The GNU Libc Reference manual has to be removed for licensing reasons. ++But some files have a dependency on manual/errno.texi; the easiest ++solution is to drop those dependencies and make sure that MAKEINFO=: ++so that no target depends on manual/*.texi files. ++ ++--- ++ manual/Makefile | 254 +++++++++++++++++++++++++++++++++++++++++++++ ++ sysdeps/gnu/Makefile | 2 ++ sysdeps/mach/hurd/Makefile | 2 ++ 3 files changed, 256 insertions(+), 2 deletions(-) ++ ++Index: b/manual/Makefile ++=================================================================== ++--- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++++ b/manual/Makefile 2012-07-08 07:59:25.000000000 -0700 ++@@ -0,0 +1,182 @@ +++# Copyright (C) 1992-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, see +++# . +++ +++# Makefile for the GNU C Library manual. +++ +++subdir := manual +++ +++# Allow override +++INSTALL_INFO = install-info +++ +++.PHONY: dvi pdf info html +++ +++# Get glibc's configuration info. +++include ../Makeconfig +++ +++dvi: $(objpfx)libc.dvi +++pdf: $(objpfx)libc.pdf +++ +++TEXI2DVI = texi2dvi +++TEXI2PDF = texi2dvi --pdf +++ +++ifneq ($(strip $(MAKEINFO)),:) +++info: $(objpfx)libc.info +++endif +++ +++chapters = $(addsuffix .texi, \ +++ intro errno memory ctype string charset locale \ +++ message search pattern io stdio llio filesys \ +++ pipe socket terminal syslog math arith time \ +++ resource setjmp signal startup process job nss \ +++ users sysinfo conf crypt debug) +++add-chapters = $(wildcard $(foreach d, $(add-ons), ../$d/$d.texi)) +++appendices = lang.texi header.texi install.texi maint.texi platform.texi \ +++ contrib.texi +++licenses = freemanuals.texi lgpl-2.1.texi fdl-1.3.texi +++ +++-include $(objpfx)texis +++$(objpfx)texis: texis.awk $(chapters) $(add-chapters) $(appendices) $(licenses) +++ $(make-target-directory) +++ $(AWK) -f $^ > $@.T +++ mv -f $@.T $@ +++ +++nonexamples = $(filter-out $(add-chapters) %.c.texi, $(texis)) +++examples = $(filter-out $(foreach d, $(add-ons), ../$d/%.c.texi), \ +++ $(filter %.c.texi, $(texis))) +++ +++# Generated files directly included from libc.texinfo. +++libc-texi-generated = chapters.texi top-menu.texi dir-add.texi \ +++ libm-err.texi version.texi +++ +++# Add path to build dir for generated files +++texis-path := $(filter-out $(libc-texi-generated) summary.texi $(examples), \ +++ $(texis)) \ +++ $(addprefix $(objpfx),$(filter $(libc-texi-generated) summary.texi \ +++ $(examples), $(texis))) +++ +++# Kludge: implicit rule so Make knows the one command does it all. +++chapters.% top-menu.%: libc-texinfo.sh $(texis-path) Makefile +++ AWK=$(AWK) $(SHELL) $< $(objpfx) \ +++ '$(chapters)' \ +++ '$(add-chapters)' \ +++ '$(appendices) $(licenses)' +++ +++ +++$(objpfx)libc.dvi $(objpfx)libc.pdf $(objpfx)libc.info: \ +++ $(addprefix $(objpfx),$(libc-texi-generated)) +++$(objpfx)libc.dvi $(objpfx)libc.pdf: texinfo.tex +++ +++html: $(objpfx)libc/index.html +++$(objpfx)libc/index.html: $(addprefix $(objpfx),$(libc-texi-generated)) +++ $(MAKEINFO) -P $(objpfx) -o $(objpfx)libc --html libc.texinfo +++ +++# Generate the summary from the Texinfo source files for each chapter. +++$(objpfx)summary.texi: $(objpfx)stamp-summary ; +++$(objpfx)stamp-summary: summary.awk $(filter-out $(objpfx)summary.texi, \ +++ $(texis-path)) +++ $(AWK) -f $^ | sort -t' ' -df -k 1,1 | tr '\014' '\012' \ +++ > $(objpfx)summary-tmp +++ $(move-if-change) $(objpfx)summary-tmp $(objpfx)summary.texi +++ touch $@ +++ +++# Generate a file which can be added to the `dir' content to provide direct +++# access to the documentation of the function, variables, and other +++# definitions. +++$(objpfx)dir-add.texi: xtract-typefun.awk $(texis-path) +++ (echo "@dircategory GNU C library functions and macros"; \ +++ echo "@direntry"; \ +++ $(AWK) -f $^ | sort; \ +++ echo "@end direntry") > $@.new +++ mv -f $@.new $@ +++ +++# The table with the math errors is generated. +++$(objpfx)libm-err.texi: $(objpfx)stamp-libm-err +++$(objpfx)stamp-libm-err: libm-err-tab.pl $(wildcard $(foreach dir,$(sysdirs),\ +++ $(dir)/libm-test-ulps)) +++ pwd=`pwd`; \ +++ $(PERL) $< $$pwd/.. > $(objpfx)libm-err-tmp +++ $(move-if-change) $(objpfx)libm-err-tmp $(objpfx)libm-err.texi +++ touch $@ +++ +++# Generate a file with the version number. +++$(objpfx)version.texi: $(objpfx)stamp-version ; +++$(objpfx)stamp-version: $(common-objpfx)config.make +++ echo "@set VERSION $(version)" > $(objpfx)version-tmp +++ $(move-if-change) $(objpfx)version-tmp $(objpfx)version.texi +++ touch $@ +++ +++# Generate Texinfo files from the C source for the example programs. +++$(objpfx)%.c.texi: examples/%.c +++ sed -e '1,/^\*\/$$/d' \ +++ -e 's,[{}],@&,g' \ +++ -e 's,/\*\(@.*\)\*/,\1,g' \ +++ -e 's,/\* *,/* @r{,g' -e 's, *\*/,} */,' \ +++ -e 's/\(@[a-z][a-z]*\)@{\([^}]*\)@}/\1{\2}/g'\ +++ $< | expand > $@.new +++ mv -f $@.new $@ +++ +++$(objpfx)%.info: %.texinfo +++ LANGUAGE=C LC_ALL=C $(MAKEINFO) -P $(objpfx) --output=$@ $< +++ +++$(objpfx)%.dvi: %.texinfo +++ cd $(objpfx);$(TEXI2DVI) -I $(shell cd $(/dev/null 2>&1; then \ +++ test -f $(inst_infodir)/dir || $(INSTALL_DATA) dir $(inst_infodir);\ +++ $(INSTALL_INFO) --info-dir=$(inst_infodir) $(inst_infodir)/libc.info;\ +++ else : ; fi +++endif +++# Catchall implicit rule for other installation targets from the parent. +++install-%: ; +++ +++$(inst_infodir)/libc.info: $(objpfx)libc.info +++ $(make-target-directory) +++ for file in $<*; do \ +++ $(INSTALL_DATA) $$file $(@D)/; \ +++ done +++ +++TAGS: $(minimal-dist) +++ $(ETAGS) -o $@ $^ ++Index: b/sysdeps/gnu/Makefile ++=================================================================== ++--- a/sysdeps/gnu/Makefile 2012-02-17 18:24:59.000000000 -0800 +++++ b/sysdeps/gnu/Makefile 2012-10-16 09:25:03.000000000 -0700 ++@@ -19,7 +19,7 @@ ++ # Generate the list of strings for errno codes from the section of the ++ # manual which documents the codes. ++ ++-$(..)sysdeps/gnu/errlist.c: $(..)sysdeps/gnu/errlist.awk \ +++$(..)sysdeps/gnu/errlist-disabled.c: $(..)sysdeps/gnu/errlist.awk \ ++ $(..)manual/errno.texi ++ $(AWK) -f $^ > $@-tmp ++ # Make it unwritable so noone will edit it by mistake. ++Index: b/sysdeps/mach/hurd/Makefile ++=================================================================== ++--- a/sysdeps/mach/hurd/Makefile 2012-10-16 09:25:03.000000000 -0700 +++++ b/sysdeps/mach/hurd/Makefile 2012-10-16 09:25:03.000000000 -0700 ++@@ -85,7 +85,7 @@ ++ -e 's, \.\./, $(..),g' > $@t ++ mv -f $@t $@ ++ ++-$(hurd)/bits/errno.h: $(common-objpfx)stamp-errnos ; +++$(hurd)/bits/errno-disabled.h: $(common-objpfx)stamp-errnos ; ++ $(common-objpfx)stamp-errnos: $(hurd)/errnos.awk $(errno.texinfo) \ ++ $(mach-errnos-deps) $(common-objpfx)errnos.d ++ mkdir -p $(hurd-objpfx)bits diff --cc debian/patches/all/local-ru_RU.diff index 000000000,000000000..7b7c4f6a2 new file mode 100644 --- /dev/null +++ b/debian/patches/all/local-ru_RU.diff @@@ -1,0 -1,0 +1,23 @@@ ++# DP: Description: Change default charset for 'russian' locale alias ++# DP: Related bugs: #62586 ++# DP: Dpatch author: Ben Collins ++# DP: Patch author: Alistair McKinstry ++# DP: Upstream status: Submitted ++# DP: Status Details: http://sources.redhat.com/bugzilla/show_bug.cgi?id=120 ++# DP: Date: 2002-03-10 ++ ++--- ++ intl/locale.alias | 2 +- ++ 1 file changed, 1 insertion(+), 1 deletion(-) ++ ++--- a/intl/locale.alias +++++ b/intl/locale.alias ++@@ -63,7 +63,7 @@ ++ polish pl_PL.ISO-8859-2 ++ portuguese pt_PT.ISO-8859-1 ++ romanian ro_RO.ISO-8859-2 ++-russian ru_RU.ISO-8859-5 +++russian ru_RU.KOI8-R ++ slovak sk_SK.ISO-8859-2 ++ slovene sl_SI.ISO-8859-2 ++ slovenian sl_SI.ISO-8859-2 diff --cc debian/patches/all/submitted-po-fr-fixes.diff index 000000000,000000000..13557a18b new file mode 100644 --- /dev/null +++ b/debian/patches/all/submitted-po-fr-fixes.diff @@@ -1,0 -1,0 +1,17 @@@ ++2014-05-05 Aurelien Jarno ++ ++ * po/fr.po: Fix French translation of inappropriate. ++ ++diff --git a/po/fr.po b/po/fr.po ++index f73622a..3625de1 100644 ++--- a/po/fr.po +++++ b/po/fr.po ++@@ -6015,7 +6015,7 @@ msgstr "Trop de fichiers ouverts dans le système" ++ #. TRANS modes on an ordinary file. ++ #: sysdeps/gnu/errlist.c:286 ++ msgid "Inappropriate ioctl for device" ++-msgstr "Ioctl() inappropré pour un périphérique" +++msgstr "Ioctl() inapproprié pour un périphérique" ++ ++ #. TRANS An attempt to execute a file that is currently open for writing, or ++ #. TRANS write to a file that is currently being executed. Often using a diff --cc debian/patches/alpha/local-gcc4.1.diff index 000000000,000000000..f01bbe834 new file mode 100644 --- /dev/null +++ b/debian/patches/alpha/local-gcc4.1.diff @@@ -1,0 -1,0 +1,55 @@@ ++2006-05-30 Falk Hueffner ++ ++ * sysdeps/unix/sysv/linux/alpha/ioperm.c: force the architecture ++ to ev6 in assembly code. ++ ++{standard input}: Assembler messages: ++{standard input}:341: Error: macro requires $at register while noat in effect ++{standard input}:374: Error: macro requires $at register while noat in effect ++{standard input}:438: Error: macro requires $at register while noat in effect ++{standard input}:471: Error: macro requires $at register while noat in effect ++make[3]: *** [/tmp/buildd/glibc-2.3.6/build-tree/alpha-libc/misc/ioperm.o] Error 1 ++ ++Hrm. gcc puts .arch ev4 into the .s, and this overrides -mev6 for as. ++I cannot really think of anything better than ++ ++--- ++ sysdeps/unix/sysv/linux/alpha/ioperm.c | 8 ++++---- ++ 1 file changed, 4 insertions(+), 4 deletions(-) ++ ++--- a/sysdeps/unix/sysv/linux/alpha/ioperm.c +++++ b/sysdeps/unix/sysv/linux/alpha/ioperm.c ++@@ -177,13 +177,13 @@ ++ static inline void ++ stb_mb(unsigned char val, unsigned long addr) ++ { ++- __asm__("stb %1,%0; mb" : "=m"(*(vucp)addr) : "r"(val)); +++ __asm__(".arch ev6; stb %1,%0; mb" : "=m"(*(vucp)addr) : "r"(val)); ++ } ++ ++ static inline void ++ stw_mb(unsigned short val, unsigned long addr) ++ { ++- __asm__("stw %1,%0; mb" : "=m"(*(vusp)addr) : "r"(val)); +++ __asm__(".arch ev6; stw %1,%0; mb" : "=m"(*(vusp)addr) : "r"(val)); ++ } ++ ++ static inline void ++@@ -355,7 +355,7 @@ ++ unsigned long int addr = dense_port_to_cpu_addr (port); ++ unsigned char r; ++ ++- __asm__ ("ldbu %0,%1" : "=r"(r) : "m"(*(vucp)addr)); +++ __asm__ (".arch ev6; ldbu %0,%1" : "=r"(r) : "m"(*(vucp)addr)); ++ return r; ++ } ++ ++@@ -365,7 +365,7 @@ ++ unsigned long int addr = dense_port_to_cpu_addr (port); ++ unsigned short r; ++ ++- __asm__ ("ldwu %0,%1" : "=r"(r) : "m"(*(vusp)addr)); +++ __asm__ (".arch ev6; ldwu %0,%1" : "=r"(r) : "m"(*(vusp)addr)); ++ return r; ++ } ++ diff --cc debian/patches/alpha/local-string-functions.diff index 000000000,000000000..9d12e68a1 new file mode 100644 --- /dev/null +++ b/debian/patches/alpha/local-string-functions.diff @@@ -1,0 -1,0 +1,995 @@@ ++The alpha assembly version of various string functions do not work ++correctly on some corner cases, and thus doesn't pass the testsuite. ++This patch removes them. ++ ++--- ++ sysdeps/alpha/alphaev67/stpncpy.S | 115 ------------- ++ sysdeps/alpha/alphaev67/strncat.S | 87 ---------- ++ sysdeps/alpha/stpncpy.S | 106 ------------ ++ sysdeps/alpha/strcmp.S | 194 ---------------------- ++ sysdeps/alpha/strncat.S | 94 ---------- ++ sysdeps/alpha/strncmp.S | 277 -------------------------------- ++ sysdeps/alpha/strncpy.S | 87 ---------- ++ 7 files changed, 960 deletions(-) ++ ++--- a/sysdeps/alpha/strncat.S +++++ /dev/null ++@@ -1,94 +0,0 @@ ++-/* Copyright (C) 1996-2020 Free Software Foundation, Inc. ++- This file is part of the GNU C Library. ++- Contributed by Richard Henderson , 1996. ++- ++- The GNU C Library is free software; you can redistribute it and/or ++- modify it under the terms of the GNU Lesser General Public ++- License as published by the Free Software Foundation; either ++- version 2.1 of the License, or (at your option) any later version. ++- ++- The GNU C Library is distributed in the hope that it will be useful, ++- but WITHOUT ANY WARRANTY; without even the implied warranty of ++- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++- Lesser General Public License 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 ++- . */ ++- ++-/* Append no more than COUNT characters from the null-terminated string SRC ++- to the null-terminated string DST. Always null-terminate the new DST. */ ++- ++-#include ++- ++- .text ++- ++-ENTRY(strncat) ++- ldgp gp, 0(pv) ++-#ifdef PROF ++- .set noat ++- lda AT, _mcount ++- jsr AT, (AT), _mcount ++- .set at ++-#endif ++- .prologue 1 ++- ++- mov a0, v0 # set up return value ++- beq a2, $zerocount ++- ++- /* Find the end of the string. */ ++- ++- ldq_u t0, 0(a0) # load first quadword (a0 may be misaligned) ++- lda t1, -1(zero) ++- insqh t1, a0, t1 ++- andnot a0, 7, a0 ++- or t1, t0, t0 ++- cmpbge zero, t0, t1 # t1 <- bitmask: bit i == 1 <==> i-th byte == 0 ++- bne t1, $found ++- ++-$loop: ldq t0, 8(a0) ++- addq a0, 8, a0 # addr += 8 ++- cmpbge zero, t0, t1 ++- beq t1, $loop ++- ++-$found: negq t1, t2 # clear all but least set bit ++- and t1, t2, t1 ++- ++- and t1, 0xf0, t2 # binary search for that set bit ++- and t1, 0xcc, t3 ++- and t1, 0xaa, t4 ++- cmovne t2, 4, t2 ++- cmovne t3, 2, t3 ++- cmovne t4, 1, t4 ++- addq t2, t3, t2 ++- addq a0, t4, a0 ++- addq a0, t2, a0 ++- ++- /* Now do the append. */ ++- ++- jsr t9, __stxncpy ++- ++- /* Worry about the null termination. */ ++- ++- zapnot t0, t8, t1 # was last byte a null? ++- bne t1, 0f ++- ret ++- ++-0: and t10, 0x80, t1 ++- bne t1, 1f ++- ++- /* Here there are bytes left in the current word. Clear one. */ ++- addq t10, t10, t10 # end-of-count bit <<= 1 ++- zap t0, t10, t0 ++- stq_u t0, 0(a0) ++- ret ++- ++-1: /* Here we must read the next DST word and clear the first byte. */ ++- ldq_u t0, 8(a0) ++- zap t0, 1, t0 ++- stq_u t0, 8(a0) ++- ++-$zerocount: ++- ret ++- ++- END(strncat) ++--- a/sysdeps/alpha/strncpy.S +++++ /dev/null ++@@ -1,87 +0,0 @@ ++-/* Copyright (C) 1996-2020 Free Software Foundation, Inc. ++- Contributed by Richard Henderson (rth@tamu.edu) ++- 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 ++- . */ ++- ++-/* Copy no more than COUNT bytes of the null-terminated string from ++- SRC to DST. If SRC does not cover all of COUNT, the balance is ++- zeroed. */ ++- ++-#include ++- ++- .set noat ++- .set noreorder ++- ++- .text ++- ++-ENTRY(strncpy) ++- ldgp gp, 0(pv) ++-#ifdef PROF ++- lda AT, _mcount ++- jsr AT, (AT), _mcount ++-#endif ++- .prologue 1 ++- ++- mov a0, v0 # set return value now ++- beq a2, $zerocount ++- jsr t9, __stxncpy # do the work of the copy ++- ++- bne a2, $multiword # do we have full words left? ++- ++- .align 3 ++- subq t8, 1, t2 # e0 : guess not ++- subq t10, 1, t3 # .. e1 : ++- or t2, t8, t2 # e0 : clear the bits between the last ++- or t3, t10, t3 # .. e1 : written byte and the last byte in ++- andnot t3, t2, t3 # e0 : COUNT ++- zap t0, t3, t0 # e1 : ++- stq_u t0, 0(a0) # e0 : ++- ret # .. e1 : ++- ++-$multiword: ++- subq t8, 1, t7 # e0 : clear the final bits in the prev ++- or t7, t8, t7 # e1 : word ++- zapnot t0, t7, t0 # e0 : ++- subq a2, 1, a2 # .. e1 : ++- stq_u t0, 0(a0) # e0 : ++- addq a0, 8, a0 # .. e1 : ++- ++- beq a2, 1f # e1 : ++- blbc a2, 0f # e1 : ++- ++- stq_u zero, 0(a0) # e0 : zero one word ++- subq a2, 1, a2 # .. e1 : ++- addq a0, 8, a0 # e0 : ++- beq a2, 1f # .. e1 : ++- ++-0: stq_u zero, 0(a0) # e0 : zero two words ++- subq a2, 2, a2 # .. e1 : ++- stq_u zero, 8(a0) # e0 : ++- addq a0, 16, a0 # .. e1 : ++- bne a2, 0b # e1 : ++- unop ++- ++-1: ldq_u t0, 0(a0) # e0 : clear the leading bits in the final ++- subq t10, 1, t7 # .. e1 : word ++- or t7, t10, t7 # e0 : ++- zap t0, t7, t0 # e1 (stall) ++- stq_u t0, 0(a0) # e0 : ++- ++-$zerocount: ++- ret # .. e1 : ++- ++- END(strncpy) ++-libc_hidden_builtin_def (strncpy) ++--- a/sysdeps/alpha/alphaev67/strncat.S +++++ /dev/null ++@@ -1,87 +0,0 @@ ++-/* Copyright (C) 2000-2020 Free Software Foundation, Inc. ++- Contributed by Richard Henderson , 1996. ++- EV67 optimized by Rick Gorton . ++- 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 ++- . */ ++- ++-/* Append no more than COUNT characters from the null-terminated string SRC ++- to the null-terminated string DST. Always null-terminate the new DST. */ ++- ++-#include ++- ++- .arch ev6 ++- .set noreorder ++- .text ++- ++-ENTRY(strncat) ++- ldgp gp, 0(pv) ++-#ifdef PROF ++- .set noat ++- lda AT, _mcount ++- jsr AT, (AT), _mcount ++- .set at ++-#endif ++- .prologue 1 ++- ++- mov a0, v0 # set up return value ++- beq a2, $zerocount # U : ++- /* Find the end of the string. */ ++- ldq_u t0, 0(a0) # L : load first quadword (a0 may be misaligned) ++- lda t1, -1 # E : ++- ++- insqh t1, v0, t1 # U : ++- andnot a0, 7, a0 # E : ++- nop # E : ++- or t1, t0, t0 # E : ++- ++- nop # E : ++- nop # E : ++- cmpbge zero, t0, t1 # E : bits set iff byte == 0 ++- bne t1, $found # U : ++- ++-$loop: ldq t0, 8(a0) # L : ++- addq a0, 8, a0 # E : ++- cmpbge zero, t0, t1 # E : ++- beq t1, $loop # U : ++- ++-$found: cttz t1, t2 # U0 : ++- addq a0, t2, a0 # E : ++- jsr t9, __stxncpy # L0 : Now do the append. ++- ++- /* Worry about the null termination. */ ++- ++- cttz t10, t2 # U0: byte offset of end-of-count. ++- bic a0, 7, a0 # E : word align the last write address. ++- zapnot t0, t8, t1 # U : was last byte a null? ++- nop # E : ++- ++- bne t1, 0f # U : ++- nop # E : ++- nop # E : ++- ret # L0 : ++- ++-0: addq t2, a0, a0 # E : address of end-of-count ++- stb zero, 1(a0) # L : ++- nop # E : ++- ret # L0 : ++- ++-$zerocount: ++- nop # E : ++- nop # E : ++- nop # E : ++- ret # L0 : ++- ++- END(strncat) ++--- a/sysdeps/alpha/stpncpy.S +++++ /dev/null ++@@ -1,106 +0,0 @@ ++-/* Copyright (C) 1996-2020 Free Software Foundation, Inc. ++- This file is part of the GNU C Library. ++- Contributed by Richard Henderson (rth@tamu.edu) ++- ++- The GNU C Library is free software; you can redistribute it and/or ++- modify it under the terms of the GNU Lesser General Public ++- License as published by the Free Software Foundation; either ++- version 2.1 of the License, or (at your option) any later version. ++- ++- The GNU C Library is distributed in the hope that it will be useful, ++- but WITHOUT ANY WARRANTY; without even the implied warranty of ++- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++- Lesser General Public License 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 ++- . */ ++- ++-/* Copy no more than COUNT bytes of the null-terminated string from ++- SRC to DST. If SRC does not cover all of COUNT, the balance is ++- zeroed. Return the address of the terminating null in DEST, if ++- any, else DEST + COUNT. */ ++- ++-#include ++- ++- .set noat ++- .set noreorder ++- ++- .text ++- ++-ENTRY(__stpncpy) ++- ldgp gp, 0(pv) ++-#ifdef PROF ++- lda AT, _mcount ++- jsr AT, (AT), _mcount ++-#endif ++- .prologue 1 ++- ++- beq a2, $zerocount ++- jsr t9, __stxncpy # do the work of the copy ++- ++- and t8, 0xf0, t3 # binary search for byte offset of the ++- and t8, 0xcc, t2 # last byte written. ++- and t8, 0xaa, t1 ++- andnot a0, 7, v0 ++- cmovne t3, 4, t3 ++- cmovne t2, 2, t2 ++- cmovne t1, 1, t1 ++- addq v0, t3, v0 ++- addq t1, t2, t1 ++- addq v0, t1, v0 ++- ++- bne a2, $multiword # do we have full words left? ++- ++- .align 3 ++- zapnot t0, t8, t4 # e0 : was last byte a null? ++- subq t8, 1, t2 # .. e1 : ++- addq v0, 1, t5 # e0 : ++- subq t10, 1, t3 # .. e1 : ++- or t2, t8, t2 # e0 : clear the bits between the last ++- or t3, t10, t3 # .. e1 : written byte and the last byte in ++- andnot t3, t2, t3 # e0 : COUNT ++- cmovne t4, t5, v0 # .. e1 : if last written wasnt null, inc v0 ++- zap t0, t3, t0 # e0 : ++- stq_u t0, 0(a0) # e1 : ++- ret # .. e1 : ++- ++- .align 3 ++-$multiword: ++- subq t8, 1, t7 # e0 : clear the final bits in the prev ++- or t7, t8, t7 # e1 : word ++- zapnot t0, t7, t0 # e0 : ++- subq a2, 1, a2 # .. e1 : ++- stq_u t0, 0(a0) # e0 : ++- addq a0, 8, a0 # .. e1 : ++- ++- beq a2, 1f # e1 : ++- blbc a2, 0f # e1 : ++- ++- stq_u zero, 0(a0) # e0 : zero one word ++- subq a2, 1, a2 # .. e1 : ++- addq a0, 8, a0 # e0 : ++- beq a2, 1f # .. e1 : ++- ++-0: stq_u zero, 0(a0) # e0 : zero two words ++- subq a2, 2, a2 # .. e1 : ++- stq_u zero, 8(a0) # e0 : ++- addq a0, 16, a0 # .. e1 : ++- bne a2, 0b # e1 : ++- unop ++- ++-1: ldq_u t0, 0(a0) # e0 : clear the leading bits in the final ++- subq t10, 1, t7 # .. e1 : word ++- or t7, t10, t7 # e0 : ++- zap t0, t7, t0 # e1 (stall) ++- stq_u t0, 0(a0) # e0 : ++- ret # .. e1 : ++- ++-$zerocount: ++- mov a0, v0 ++- ret ++- ++- END(__stpncpy) ++- ++-libc_hidden_def (__stpncpy) ++-weak_alias (__stpncpy, stpncpy) ++--- a/sysdeps/alpha/alphaev67/stpncpy.S +++++ /dev/null ++@@ -1,115 +0,0 @@ ++-/* Copyright (C) 2000-2020 Free Software Foundation, Inc. ++- Contributed by Richard Henderson (rth@redhat.com) ++- 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 ++- . */ ++- ++-/* Copy no more than N bytes from SRC to DEST, returning the address of ++- the terminating '\0' in DEST. */ ++- ++-#include ++- ++- .arch ev6 ++- .set noat ++- .set noreorder ++- .text ++- ++-ENTRY(__stpncpy) ++- ldgp gp, 0(pv) ++-#ifdef PROF ++- lda AT, _mcount ++- jsr AT, (AT), _mcount ++-#endif ++- .prologue 1 ++- ++- mov a0, v0 ++- beq a2, $zerocount ++- ++- .align 4 ++- nop ++- nop ++- jsr t9, __stxncpy # do the work of the copy ++- ++- cttz t8, t4 ++- zapnot t0, t8, t5 ++- andnot a0, 7, a0 ++- bne a2, $multiword # do we have full words left? ++- ++- subq t8, 1, t2 ++- subq t10, 1, t3 ++- cmpult zero, t5, t5 ++- addq a0, t4, v0 ++- ++- or t2, t8, t2 ++- or t3, t10, t3 ++- addq v0, t5, v0 ++- andnot t3, t2, t3 ++- ++- zap t0, t3, t0 ++- nop ++- stq t0, 0(a0) ++- ret ++- ++-$multiword: ++- subq t8, 1, t7 # clear the final bits in the prev word ++- cmpult zero, t5, t5 ++- or t7, t8, t7 ++- zapnot t0, t7, t0 ++- ++- subq a2, 1, a2 ++- stq t0, 0(a0) ++- addq a0, 8, a1 ++- beq a2, 1f # loop over full words remaining ++- ++- nop ++- nop ++- nop ++- blbc a2, 0f ++- ++- stq zero, 0(a1) ++- subq a2, 1, a2 ++- addq a1, 8, a1 ++- beq a2, 1f ++- ++-0: stq zero, 0(a1) ++- subq a2, 2, a2 ++- nop ++- nop ++- ++- stq zero, 8(a1) ++- addq a1, 16, a1 ++- nop ++- bne a2, 0b ++- ++-1: ldq t0, 0(a1) # clear the leading bits in the final word ++- subq t10, 1, t7 ++- addq a0, t4, v0 ++- nop ++- ++- or t7, t10, t7 ++- addq v0, t5, v0 ++- zap t0, t7, t0 ++- stq t0, 0(a1) ++- ++-$zerocount: ++- nop ++- nop ++- nop ++- ret ++- ++- END(__stpncpy) ++- ++-libc_hidden_def (__stpncpy) ++-weak_alias (__stpncpy, stpncpy) ++--- a/sysdeps/alpha/strcmp.S +++++ /dev/null ++@@ -1,194 +0,0 @@ ++-/* Copyright (C) 1996-2020 Free Software Foundation, Inc. ++- Contributed by Richard Henderson (rth@tamu.edu) ++- 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 ++- . */ ++- ++-/* Bytewise compare two null-terminated strings. */ ++- ++-#include ++- ++- .set noat ++- .set noreorder ++- ++- .text ++- ++-ENTRY(strcmp) ++-#ifdef PROF ++- ldgp gp, 0(pv) ++- lda AT, _mcount ++- jmp AT, (AT), _mcount ++- .prologue 1 ++-#else ++- .prologue 0 ++-#endif ++- ++- ldq_u t0, 0(a0) # e0 : give cache time to catch up ++- xor a0, a1, t2 # .. e1 : are s1 and s2 co-aligned? ++- ldq_u t1, 0(a1) # e0 : ++- and t2, 7, t2 # .. e1 : ++- lda t3, -1 # e0 : ++- bne t2, $unaligned # .. e1 : ++- ++- /* On entry to this basic block: ++- t0 == the first destination word for masking back in ++- t1 == the first source word. ++- t3 == -1. */ ++- ++-$aligned: ++- mskqh t3, a0, t3 # e0 : ++- nop # .. e1 : ++- ornot t1, t3, t1 # e0 : ++- ornot t0, t3, t0 # .. e1 : ++- cmpbge zero, t1, t7 # e0 : bits set iff null found ++- bne t7, $eos # e1 (zdb) ++- ++- /* Aligned compare main loop. ++- On entry to this basic block: ++- t0 == an s1 word. ++- t1 == an s2 word not containing a null. */ ++- ++-$a_loop: ++- xor t0, t1, t2 # e0 : ++- bne t2, $wordcmp # .. e1 (zdb) ++- ldq_u t1, 8(a1) # e0 : ++- ldq_u t0, 8(a0) # .. e1 : ++- addq a1, 8, a1 # e0 : ++- addq a0, 8, a0 # .. e1 : ++- cmpbge zero, t1, t7 # e0 : ++- beq t7, $a_loop # .. e1 (zdb) ++- br $eos # e1 : ++- ++- /* The two strings are not co-aligned. Align s1 and cope. */ ++- ++-$unaligned: ++- and a0, 7, t4 # e0 : find s1 misalignment ++- and a1, 7, t5 # .. e1 : find s2 misalignment ++- subq a1, t4, a1 # e0 : ++- ++- /* If s2 misalignment is larger than s2 misalignment, we need ++- extra startup checks to avoid SEGV. */ ++- ++- cmplt t4, t5, t8 # .. e1 : ++- beq t8, $u_head # e1 : ++- ++- mskqh t3, t5, t3 # e0 : ++- ornot t1, t3, t3 # e0 : ++- cmpbge zero, t3, t7 # e1 : is there a zero? ++- beq t7, $u_head # e1 : ++- ++- /* We've found a zero in the first partial word of s2. Align ++- our current s1 and s2 words and compare what we've got. */ ++- ++- extql t1, t5, t1 # e0 : ++- extql t0, a0, t0 # e0 : ++- cmpbge zero, t1, t7 # .. e1 : find that zero again ++- br $eos # e1 : and finish up ++- ++- .align 3 ++-$u_head: ++- /* We know just enough now to be able to assemble the first ++- full word of s2. We can still find a zero at the end of it. ++- ++- On entry to this basic block: ++- t0 == first word of s1 ++- t1 == first partial word of s2. */ ++- ++- ldq_u t2, 8(a1) # e0 : load second partial s2 word ++- lda t3, -1 # .. e1 : create leading garbage mask ++- extql t1, a1, t1 # e0 : create first s2 word ++- mskqh t3, a0, t3 # e0 : ++- extqh t2, a1, t4 # e0 : ++- ornot t0, t3, t0 # .. e1 : kill s1 garbage ++- or t1, t4, t1 # e0 : s2 word now complete ++- cmpbge zero, t0, t7 # .. e1 : find zero in first s1 word ++- ornot t1, t3, t1 # e0 : kill s2 garbage ++- lda t3, -1 # .. e1 : ++- mskql t3, a1, t3 # e0 : mask for s2[1] bits we have seen ++- bne t7, $eos # .. e1 : ++- xor t0, t1, t4 # e0 : compare aligned words ++- bne t4, $wordcmp # .. e1 (zdb) ++- or t2, t3, t3 # e0 : ++- cmpbge zero, t3, t7 # e1 : ++- bne t7, $u_final # e1 : ++- ++- /* Unaligned copy main loop. In order to avoid reading too much, ++- the loop is structured to detect zeros in aligned words from s2. ++- This has, unfortunately, effectively pulled half of a loop ++- iteration out into the head and half into the tail, but it does ++- prevent nastiness from accumulating in the very thing we want ++- to run as fast as possible. ++- ++- On entry to this basic block: ++- t2 == the unshifted low-bits from the next s2 word. */ ++- ++- .align 3 ++-$u_loop: ++- extql t2, a1, t3 # e0 : ++- ldq_u t2, 16(a1) # .. e1 : load next s2 high bits ++- ldq_u t0, 8(a0) # e0 : load next s1 word ++- addq a1, 8, a1 # .. e1 : ++- addq a0, 8, a0 # e0 : ++- nop # .. e1 : ++- extqh t2, a1, t1 # e0 : ++- cmpbge zero, t0, t7 # .. e1 : find zero in current s1 word ++- or t1, t3, t1 # e0 : ++- bne t7, $eos # .. e1 : ++- xor t0, t1, t4 # e0 : compare the words ++- bne t4, $wordcmp # .. e1 (zdb) ++- cmpbge zero, t2, t4 # e0 : find zero in next low bits ++- beq t4, $u_loop # .. e1 (zdb) ++- ++- /* We've found a zero in the low bits of the last s2 word. Get ++- the next s1 word and align them. */ ++-$u_final: ++- ldq_u t0, 8(a0) # e1 : ++- extql t2, a1, t1 # .. e0 : ++- cmpbge zero, t1, t7 # e0 : ++- ++- /* We've found a zero somewhere in a word we just read. ++- On entry to this basic block: ++- t0 == s1 word ++- t1 == s2 word ++- t7 == cmpbge mask containing the zero. */ ++- ++- .align 3 ++-$eos: ++- negq t7, t6 # e0 : create bytemask of valid data ++- and t6, t7, t8 # e1 : ++- subq t8, 1, t6 # e0 : ++- or t6, t8, t7 # e1 : ++- zapnot t0, t7, t0 # e0 : kill the garbage ++- zapnot t1, t7, t1 # .. e1 : ++- xor t0, t1, v0 # e0 : and compare ++- beq v0, $done # .. e1 : ++- ++- /* Here we have two differing co-aligned words in t0 & t1. ++- Bytewise compare them and return (t0 > t1 ? 1 : -1). */ ++-$wordcmp: ++- cmpbge t0, t1, t2 # e0 : comparison yields bit mask of ge ++- cmpbge t1, t0, t3 # .. e1 : ++- xor t2, t3, t0 # e0 : bits set iff t0/t1 bytes differ ++- negq t0, t1 # e1 : clear all but least bit ++- and t0, t1, t0 # e0 : ++- lda v0, -1 # .. e1 : ++- and t0, t2, t1 # e0 : was bit set in t0 > t1? ++- cmovne t1, 1, v0 # .. e1 (zdb) ++- ++-$done: ++- ret # e1 : ++- ++- END(strcmp) ++-libc_hidden_builtin_def (strcmp) ++--- a/sysdeps/alpha/strncmp.S +++++ /dev/null ++@@ -1,277 +0,0 @@ ++-/* Copyright (C) 1996-2020 Free Software Foundation, Inc. ++- Contributed by Richard Henderson (rth@tamu.edu) ++- 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 ++- . */ ++- ++-/* Bytewise compare two null-terminated strings of length no longer than N. */ ++- ++-#include ++- ++- .set noat ++- .set noreorder ++- ++-/* EV6 only predicts one branch per octaword. We'll use these to push ++- subsequent branches back to the next bundle. This will generally add ++- a fetch+decode cycle to older machines, so skip in that case. */ ++-#ifdef __alpha_fix__ ++-# define ev6_unop unop ++-#else ++-# define ev6_unop ++-#endif ++- ++- .text ++- ++-ENTRY(strncmp) ++-#ifdef PROF ++- ldgp gp, 0(pv) ++- lda AT, _mcount ++- jsr AT, (AT), _mcount ++- .prologue 1 ++-#else ++- .prologue 0 ++-#endif ++- ++- xor a0, a1, t2 # are s1 and s2 co-aligned? ++- beq a2, $zerolength ++- ldq_u t0, 0(a0) # load asap to give cache time to catch up ++- ldq_u t1, 0(a1) ++- lda t3, -1 ++- and t2, 7, t2 ++- srl t3, 1, t6 ++- and a0, 7, t4 # find s1 misalignment ++- and a1, 7, t5 # find s2 misalignment ++- cmovlt a2, t6, a2 # bound neg count to LONG_MAX ++- addq a1, a2, a3 # s2+count ++- addq a2, t4, a2 # bias count by s1 misalignment ++- and a2, 7, t10 # ofs of last byte in s1 last word ++- srl a2, 3, a2 # remaining full words in s1 count ++- bne t2, $unaligned ++- ++- /* On entry to this basic block: ++- t0 == the first word of s1. ++- t1 == the first word of s2. ++- t3 == -1. */ ++-$aligned: ++- mskqh t3, a1, t8 # mask off leading garbage ++- ornot t1, t8, t1 ++- ornot t0, t8, t0 ++- cmpbge zero, t1, t7 # bits set iff null found ++- beq a2, $eoc # check end of count ++- bne t7, $eos ++- beq t10, $ant_loop ++- ++- /* Aligned compare main loop. ++- On entry to this basic block: ++- t0 == an s1 word. ++- t1 == an s2 word not containing a null. */ ++- ++- .align 4 ++-$a_loop: ++- xor t0, t1, t2 # e0 : ++- bne t2, $wordcmp # .. e1 (zdb) ++- ldq_u t1, 8(a1) # e0 : ++- ldq_u t0, 8(a0) # .. e1 : ++- ++- subq a2, 1, a2 # e0 : ++- addq a1, 8, a1 # .. e1 : ++- addq a0, 8, a0 # e0 : ++- beq a2, $eoc # .. e1 : ++- ++- cmpbge zero, t1, t7 # e0 : ++- beq t7, $a_loop # .. e1 : ++- ++- br $eos ++- ++- /* Alternate aligned compare loop, for when there's no trailing ++- bytes on the count. We have to avoid reading too much data. */ ++- .align 4 ++-$ant_loop: ++- xor t0, t1, t2 # e0 : ++- ev6_unop ++- ev6_unop ++- bne t2, $wordcmp # .. e1 (zdb) ++- ++- subq a2, 1, a2 # e0 : ++- beq a2, $zerolength # .. e1 : ++- ldq_u t1, 8(a1) # e0 : ++- ldq_u t0, 8(a0) # .. e1 : ++- ++- addq a1, 8, a1 # e0 : ++- addq a0, 8, a0 # .. e1 : ++- cmpbge zero, t1, t7 # e0 : ++- beq t7, $ant_loop # .. e1 : ++- ++- br $eos ++- ++- /* The two strings are not co-aligned. Align s1 and cope. */ ++- /* On entry to this basic block: ++- t0 == the first word of s1. ++- t1 == the first word of s2. ++- t3 == -1. ++- t4 == misalignment of s1. ++- t5 == misalignment of s2. ++- t10 == misalignment of s1 end. */ ++- .align 4 ++-$unaligned: ++- /* If s1 misalignment is larger than s2 misalignment, we need ++- extra startup checks to avoid SEGV. */ ++- subq a1, t4, a1 # adjust s2 for s1 misalignment ++- cmpult t4, t5, t9 ++- subq a3, 1, a3 # last byte of s2 ++- bic a1, 7, t8 ++- mskqh t3, t5, t7 # mask garbage in s2 ++- subq a3, t8, a3 ++- ornot t1, t7, t7 ++- srl a3, 3, a3 # remaining full words in s2 count ++- beq t9, $u_head ++- ++- /* Failing that, we need to look for both eos and eoc within the ++- first word of s2. If we find either, we can continue by ++- pretending that the next word of s2 is all zeros. */ ++- lda t2, 0 # next = zero ++- cmpeq a3, 0, t8 # eoc in the first word of s2? ++- cmpbge zero, t7, t7 # eos in the first word of s2? ++- or t7, t8, t8 ++- bne t8, $u_head_nl ++- ++- /* We know just enough now to be able to assemble the first ++- full word of s2. We can still find a zero at the end of it. ++- ++- On entry to this basic block: ++- t0 == first word of s1 ++- t1 == first partial word of s2. ++- t3 == -1. ++- t10 == ofs of last byte in s1 last word. ++- t11 == ofs of last byte in s2 last word. */ ++-$u_head: ++- ldq_u t2, 8(a1) # load second partial s2 word ++- subq a3, 1, a3 ++-$u_head_nl: ++- extql t1, a1, t1 # create first s2 word ++- mskqh t3, a0, t8 ++- extqh t2, a1, t4 ++- ornot t0, t8, t0 # kill s1 garbage ++- or t1, t4, t1 # s2 word now complete ++- cmpbge zero, t0, t7 # find eos in first s1 word ++- ornot t1, t8, t1 # kill s2 garbage ++- beq a2, $eoc ++- subq a2, 1, a2 ++- bne t7, $eos ++- mskql t3, a1, t8 # mask out s2[1] bits we have seen ++- xor t0, t1, t4 # compare aligned words ++- or t2, t8, t8 ++- bne t4, $wordcmp ++- cmpbge zero, t8, t7 # eos in high bits of s2[1]? ++- cmpeq a3, 0, t8 # eoc in s2[1]? ++- or t7, t8, t7 ++- bne t7, $u_final ++- ++- /* Unaligned copy main loop. In order to avoid reading too much, ++- the loop is structured to detect zeros in aligned words from s2. ++- This has, unfortunately, effectively pulled half of a loop ++- iteration out into the head and half into the tail, but it does ++- prevent nastiness from accumulating in the very thing we want ++- to run as fast as possible. ++- ++- On entry to this basic block: ++- t2 == the unshifted low-bits from the next s2 word. ++- t10 == ofs of last byte in s1 last word. ++- t11 == ofs of last byte in s2 last word. */ ++- .align 4 ++-$u_loop: ++- extql t2, a1, t3 # e0 : ++- ldq_u t2, 16(a1) # .. e1 : load next s2 high bits ++- ldq_u t0, 8(a0) # e0 : load next s1 word ++- addq a1, 8, a1 # .. e1 : ++- ++- addq a0, 8, a0 # e0 : ++- subq a3, 1, a3 # .. e1 : ++- extqh t2, a1, t1 # e0 : ++- cmpbge zero, t0, t7 # .. e1 : eos in current s1 word ++- ++- or t1, t3, t1 # e0 : ++- beq a2, $eoc # .. e1 : eoc in current s1 word ++- subq a2, 1, a2 # e0 : ++- cmpbge zero, t2, t4 # .. e1 : eos in s2[1] ++- ++- xor t0, t1, t3 # e0 : compare the words ++- ev6_unop ++- ev6_unop ++- bne t7, $eos # .. e1 : ++- ++- cmpeq a3, 0, t5 # e0 : eoc in s2[1] ++- ev6_unop ++- ev6_unop ++- bne t3, $wordcmp # .. e1 : ++- ++- or t4, t5, t4 # e0 : eos or eoc in s2[1]. ++- beq t4, $u_loop # .. e1 (zdb) ++- ++- /* We've found a zero in the low bits of the last s2 word. Get ++- the next s1 word and align them. */ ++- .align 3 ++-$u_final: ++- ldq_u t0, 8(a0) ++- extql t2, a1, t1 ++- cmpbge zero, t1, t7 ++- bne a2, $eos ++- ++- /* We've hit end of count. Zero everything after the count ++- and compare whats left. */ ++- .align 3 ++-$eoc: ++- mskql t0, t10, t0 ++- mskql t1, t10, t1 ++- cmpbge zero, t1, t7 ++- ++- /* We've found a zero somewhere in a word we just read. ++- On entry to this basic block: ++- t0 == s1 word ++- t1 == s2 word ++- t7 == cmpbge mask containing the zero. */ ++- .align 3 ++-$eos: ++- negq t7, t6 # create bytemask of valid data ++- and t6, t7, t8 ++- subq t8, 1, t6 ++- or t6, t8, t7 ++- zapnot t0, t7, t0 # kill the garbage ++- zapnot t1, t7, t1 ++- xor t0, t1, v0 # ... and compare ++- beq v0, $done ++- ++- /* Here we have two differing co-aligned words in t0 & t1. ++- Bytewise compare them and return (t0 > t1 ? 1 : -1). */ ++- .align 3 ++-$wordcmp: ++- cmpbge t0, t1, t2 # comparison yields bit mask of ge ++- cmpbge t1, t0, t3 ++- xor t2, t3, t0 # bits set iff t0/t1 bytes differ ++- negq t0, t1 # clear all but least bit ++- and t0, t1, t0 ++- lda v0, -1 ++- and t0, t2, t1 # was bit set in t0 > t1? ++- cmovne t1, 1, v0 ++-$done: ++- ret ++- ++- .align 3 ++-$zerolength: ++- clr v0 ++- ret ++- ++- END(strncmp) ++-libc_hidden_builtin_def (strncmp) diff --cc debian/patches/alpha/submitted-dl-support.diff index 000000000,000000000..bf7e5cff2 new file mode 100644 --- /dev/null +++ b/debian/patches/alpha/submitted-dl-support.diff @@@ -1,0 -1,0 +1,16 @@@ ++older versions of glibc would build dl-sysdep as shared-only and dl-support as ++static-only. alpha hooks in a cache variable via dl-auxv.h. newer versions of ++glibc build dl-sysdep as both shared and static which means we now have symbol ++duplication for static builds with dl-sysdep and dl-support. since dl-sysdep ++is both shared/static, there is no point in hooking dl-support anymore, so we ++can punt it. ++ ++--- ++ sysdeps/unix/sysv/linux/alpha/dl-support.c | 2 -- ++ 1 file changed, 2 deletions(-) ++ ++--- a/sysdeps/unix/sysv/linux/alpha/dl-support.c +++++ /dev/null ++@@ -1,2 +0,0 @@ ++-#include "dl-auxv.h" ++-#include diff --cc debian/patches/alpha/submitted-fts64.diff index 000000000,000000000..3a6cc44fa new file mode 100644 --- /dev/null +++ b/debian/patches/alpha/submitted-fts64.diff @@@ -1,0 -1,0 +1,13 @@@ ++2016-03-22 Aurelien Jarno ++ ++ * sysdeps/unix/sysv/linux/alpha/fts.c: New file. ++ * sysdeps/unix/sysv/linux/alpha/fts64.c: New file. ++ ++--- /dev/null +++++ b/sysdeps/unix/sysv/linux/alpha/fts.c ++@@ -0,0 +1 @@ +++#include ++--- /dev/null +++++ b/sysdeps/unix/sysv/linux/alpha/fts64.c ++@@ -0,0 +1 @@ +++#include diff --cc debian/patches/alpha/submitted-makecontext.diff index 000000000,000000000..63e033baf new file mode 100644 --- /dev/null +++ b/debian/patches/alpha/submitted-makecontext.diff @@@ -1,0 -1,0 +1,30 @@@ ++2018-03-01 Aurelien Jarno ++ ++ [BZ #22910] ++ * sysdeps/unix/sysv/linux/alpha/setcontext.S (__startcontext): Set ++ up CFI directive to forbid further backtracing. ++ ++ ++--- a/sysdeps/unix/sysv/linux/alpha/makecontext.S +++++ b/sysdeps/unix/sysv/linux/alpha/makecontext.S ++@@ -138,10 +138,14 @@ weak_alias (__makecontext, makecontext) ++ ++ .align 4 ++ .ent __startcontext +++ cfi_startproc ++ __startcontext: ++ .frame $31, 0, $31, 0 ++ .prologue 0 ++ +++ /* Mark ra as undefined in order to stop unwinding here. */ +++ cfi_undefined(ra) +++ ++ jsr $26, ($27), 0 ++ ldgp $29, 0($26) ++ mov $9, $16 ++@@ -160,4 +164,5 @@ __startcontext: ++ ++ halt ++ +++ cfi_endproc ++ .end __startcontext diff --cc debian/patches/any/git-ld.so-cache-endianness-markup.diff index 000000000,000000000..e6645dcaa new file mode 100644 --- /dev/null +++ b/debian/patches/any/git-ld.so-cache-endianness-markup.diff @@@ -1,0 -1,0 +1,184 @@@ ++commit 84ba719b260551918965d0a433914de683087645 ++Author: Florian Weimer ++Date: Fri Dec 4 09:13:43 2020 +0100 ++ ++ elf: Add endianness markup to ld.so.cache (bug 27008) ++ ++ Use a reserved byte in the new format cache header to indicate whether ++ the file is in little endian or big endian format. Eventually, this ++ information could be used to provide a unified cache for qemu-user ++ and similiar scenarios. ++ ++ Reviewed-by: Adhemerval Zanella ++ ++--- a/elf/cache.c +++++ b/elf/cache.c ++@@ -152,6 +152,14 @@ ++ printf (") => %s\n", key); ++ } ++ +++/* Print an error and exit if the new-file cache is internally +++ inconsistent. */ +++static void +++check_new_cache (struct cache_file_new *cache) +++{ +++ if (! cache_file_new_matches_endian (cache)) +++ error (EXIT_FAILURE, 0, _("Cache file has wrong endianness.\n")); +++} ++ ++ /* Print the whole cache file, if a file contains the new cache format ++ hidden in the old one, print the contents of the new format. */ ++@@ -193,6 +201,7 @@ ++ || memcmp (cache_new->version, CACHE_VERSION, ++ sizeof CACHE_VERSION - 1)) ++ error (EXIT_FAILURE, 0, _("File is not a cache file.\n")); +++ check_new_cache (cache_new); ++ format = 1; ++ /* This is where the strings start. */ ++ cache_data = (const char *) cache_new; ++@@ -222,6 +231,7 @@ ++ && memcmp (cache_new->version, CACHE_VERSION, ++ sizeof CACHE_VERSION - 1) == 0) ++ { +++ check_new_cache (cache_new); ++ cache_data = (const char *) cache_new; ++ format = 1; ++ } ++@@ -361,6 +371,7 @@ ++ ++ file_entries_new->nlibs = cache_entry_count; ++ file_entries_new->len_strings = total_strlen; +++ file_entries_new->flags = cache_file_new_flags_endian_current; ++ } ++ ++ /* Pad for alignment of cache_file_new. */ ++--- a/elf/dl-cache.c +++++ b/elf/dl-cache.c ++@@ -210,6 +210,11 @@ ++ && memcmp (file, CACHEMAGIC_VERSION_NEW, ++ sizeof CACHEMAGIC_VERSION_NEW - 1) == 0) ++ { +++ if (! cache_file_new_matches_endian (file)) +++ { +++ __munmap (file, cachesize); +++ file = (void *) -1; +++ } ++ cache_new = file; ++ cache = file; ++ } ++@@ -231,7 +236,20 @@ ++ if (cachesize < (offset + sizeof (struct cache_file_new)) ++ || memcmp (cache_new->magic, CACHEMAGIC_VERSION_NEW, ++ sizeof CACHEMAGIC_VERSION_NEW - 1) != 0) ++- cache_new = (void *) -1; +++ cache_new = (void *) -1; +++ else +++ { +++ if (! cache_file_new_matches_endian (cache_new)) +++ { +++ /* The old-format part of the cache is bogus as well +++ if the endianness does not match. (But it is +++ unclear how the new header can be located if the +++ endianess does not match.) */ +++ cache = (void *) -1; +++ cache_new = (void *) -1; +++ __munmap (file, cachesize); +++ } +++ } ++ } ++ else ++ { ++--- a/sysdeps/generic/dl-cache.h +++++ b/sysdeps/generic/dl-cache.h ++@@ -16,6 +16,11 @@ ++ License along with the GNU C Library; if not, see ++ . */ ++ +++#ifndef _DL_CACHE_H +++#define _DL_CACHE_H +++ +++#include +++#include ++ #include ++ ++ #ifndef _DL_CACHE_DEFAULT_ID ++@@ -83,17 +88,72 @@ ++ uint64_t hwcap; /* Hwcap entry. */ ++ }; ++ +++/* See flags member of struct cache_file_new below. */ +++enum +++ { +++ /* No endianness information available. An old ldconfig version +++ without endianness support wrote the file. */ +++ cache_file_new_flags_endian_unset = 0, +++ +++ /* Cache is invalid and should be ignored. */ +++ cache_file_new_flags_endian_invalid = 1, +++ +++ /* Cache format is little endian. */ +++ cache_file_new_flags_endian_little = 2, +++ +++ /* Cache format is big endian. */ +++ cache_file_new_flags_endian_big = 3, +++ +++ /* Bit mask to extract the cache_file_new_flags_endian_* +++ values. */ +++ cache_file_new_flags_endian_mask = 3, +++ +++ /* Expected value of the endian bits in the flags member for the +++ current architecture. */ +++ cache_file_new_flags_endian_current +++ = (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +++ ? cache_file_new_flags_endian_little +++ : cache_file_new_flags_endian_big), +++ }; +++ ++ struct cache_file_new ++ { ++ char magic[sizeof CACHEMAGIC_NEW - 1]; ++ char version[sizeof CACHE_VERSION - 1]; ++ uint32_t nlibs; /* Number of entries. */ ++ uint32_t len_strings; /* Size of string table. */ ++- uint32_t unused[5]; /* Leave space for future extensions +++ +++ /* flags & cache_file_new_flags_endian_mask is one of the values +++ cache_file_new_flags_endian_unset, cache_file_new_flags_endian_invalid, +++ cache_file_new_flags_endian_little, cache_file_new_flags_endian_big. +++ +++ The remaining bits are unused and should be generated as zero and +++ ignored by readers. */ +++ uint8_t flags; +++ +++ uint8_t padding_unsed[3]; /* Not used, for future extensions. */ +++ +++ uint32_t unused[4]; /* Leave space for future extensions ++ and align to 8 byte boundary. */ ++ struct file_entry_new libs[0]; /* Entries describing libraries. */ ++ /* After this the string table of size len_strings is found. */ ++ }; +++_Static_assert (sizeof (struct cache_file_new) == 48, +++ "size of struct cache_file_new"); +++ +++/* Returns false if *CACHE has the wrong endianness for this +++ architecture, and true if the endianness matches (or is +++ unknown). */ +++static inline bool +++cache_file_new_matches_endian (const struct cache_file_new *cache) +++{ +++ /* A zero value for cache->flags means that no endianness +++ information is available. */ +++ return cache->flags == 0 +++ || ((cache->flags & cache_file_new_flags_endian_big) +++ == cache_file_new_flags_endian_current); +++} +++ ++ ++ /* Used to align cache_file_new. */ ++ #define ALIGN_CACHE(addr) \ ++@@ -101,3 +161,5 @@ ++ & (~(__alignof__ (struct cache_file_new) - 1))) ++ ++ extern int _dl_cache_libcmp (const char *p1, const char *p2) attribute_hidden; +++ +++#endif /* _DL_CACHE_H */ diff --cc debian/patches/any/git-surplus-tls-accounting.diff index 000000000,000000000..a1447613c new file mode 100644 --- /dev/null +++ b/debian/patches/any/git-surplus-tls-accounting.diff @@@ -1,0 -1,0 +1,1202 @@@ ++commit ffb17e7ba3a5ba9632cee97330b325072fbe41dd ++Author: Szabolcs Nagy ++Date: Wed Jun 10 13:40:40 2020 +0100 ++ ++ rtld: Avoid using up static TLS surplus for optimizations [BZ #25051] ++ ++ On some targets static TLS surplus area can be used opportunistically ++ for dynamically loaded modules such that the TLS access then becomes ++ faster (TLSDESC and powerpc TLS optimization). However we don't want ++ all surplus TLS to be used for this optimization because dynamically ++ loaded modules with initial-exec model TLS can only use surplus TLS. ++ ++ The new contract for surplus static TLS use is: ++ ++ - libc.so can have up to 192 bytes of IE TLS, ++ - other system libraries together can have up to 144 bytes of IE TLS. ++ - Some "optional" static TLS is available for opportunistic use. ++ ++ The optional TLS is now tunable: rtld.optional_static_tls, so users ++ can directly affect the allocated static TLS size. (Note that module ++ unloading with dlclose does not reclaim static TLS. After the optional ++ TLS runs out, TLS access is no longer optimized to use static TLS.) ++ ++ The default setting of rtld.optional_static_tls is 512 so the surplus ++ TLS is 3*192 + 4*144 + 512 = 1664 by default, the same as before. ++ ++ Fixes BZ #25051. ++ ++ Tested on aarch64-linux-gnu and x86_64-linux-gnu. ++ ++ Reviewed-by: Carlos O'Donell ++ ++commit 17796419b5fd694348cceb65c3f77601faae082c ++Author: Szabolcs Nagy ++Date: Tue Jul 7 10:49:11 2020 +0100 ++ ++ rtld: Account static TLS surplus for audit modules ++ ++ The new static TLS surplus size computation is ++ ++ surplus_tls = 192 * (nns-1) + 144 * nns + 512 ++ ++ where nns is controlled via the rtld.nns tunable. This commit ++ accounts audit modules too so nns = rtld.nns + audit modules. ++ ++ rtld.nns should only include the namespaces required by the ++ application, namespaces for audit modules are accounted on top ++ of that so audit modules don't use up the static TLS that is ++ reserved for the application. This allows loading many audit ++ modules without tuning rtld.nns or using up static TLS, and it ++ fixes ++ ++ FAIL: elf/tst-auditmany ++ ++ Note that DL_NNS is currently a hard upper limit for nns, and ++ if rtld.nns + audit modules go over the limit that's a fatal ++ error. By default rtld.nns is 4 which allows 12 audit modules. ++ ++ Counting the audit modules is based on existing audit string ++ parsing code, we cannot use GLRO(dl_naudit) before the modules ++ are actually loaded. ++ ++commit 0c7b002fac12dcb2f53ba83ee56bb3b5d2439447 ++Author: Szabolcs Nagy ++Date: Tue Jun 9 09:57:28 2020 +0100 ++ ++ rtld: Add rtld.nns tunable for the number of supported namespaces ++ ++ TLS_STATIC_SURPLUS is 1664 bytes currently which is not enough to ++ support DL_NNS (== 16) number of dynamic link namespaces, if we ++ assume 192 bytes of TLS are reserved for libc use and 144 bytes ++ are reserved for other system libraries that use IE TLS. ++ ++ A new tunable is introduced to control the number of supported ++ namespaces and to adjust the surplus static TLS size as follows: ++ ++ surplus_tls = 192 * (rtld.nns-1) + 144 * rtld.nns + 512 ++ ++ The default is rtld.nns == 4 and then the surplus TLS size is the ++ same as before, so the behaviour is unchanged by default. If an ++ application creates more namespaces than the rtld.nns setting ++ allows, then it is not guaranteed to work, but the limit is not ++ checked. So existing usage will continue to work, but in the ++ future if an application creates more than 4 dynamic link ++ namespaces then the tunable will need to be set. ++ ++ In this patch DL_NNS is a fixed value and provides a maximum to ++ the rtld.nns setting. ++ ++ Static linking used fixed 2048 bytes surplus TLS, this is changed ++ so the same contract is used as for dynamic linking. With static ++ linking DL_NNS == 1 so rtld.nns tunable is forced to 1, so by ++ default the surplus TLS is reduced to 144 + 512 = 656 bytes. This ++ change is not expected to cause problems. ++ ++ Tested on aarch64-linux-gnu and x86_64-linux-gnu. ++ ++ Reviewed-by: Carlos O'Donell ++ ++commit 4c6e0415ef206a595c62d5d37e3b9a821782c533 ++Author: Florian Weimer ++Date: Fri Apr 3 13:17:48 2020 +0200 ++ ++ elf: Simplify handling of lists of audit strings ++ ++ All list elements are colon-separated strings, and there is a hard ++ upper limit for the number of audit modules, so it is possible to ++ pre-allocate a fixed-size array of strings to which the LD_AUDIT ++ environment variable and --audit arguments are added. ++ ++ Also eliminate the global variables for the audit list because ++ the list is only needed briefly during startup. ++ ++ There is a slight behavior change: All duplicate LD_AUDIT environment ++ variables are now processed, not just the last one as before. However, ++ such environment vectors are invalid anyway. ++ ++ Reviewed-by: Carlos O'Donell ++ ++--- a/elf/rtld.c +++++ b/elf/rtld.c ++@@ -45,6 +45,7 @@ ++ #include ++ #include ++ #include +++#include ++ ++ #include ++ ++@@ -109,8 +110,53 @@ ++ /* Print the various times we collected. */ ++ static void print_statistics (const hp_timing_t *total_timep); ++ ++-/* Add audit objects. */ ++-static void process_dl_audit (char *str); +++/* Length limits for names and paths, to protect the dynamic linker, +++ particularly when __libc_enable_secure is active. */ +++#ifdef NAME_MAX +++# define SECURE_NAME_LIMIT NAME_MAX +++#else +++# define SECURE_NAME_LIMIT 255 +++#endif +++#ifdef PATH_MAX +++# define SECURE_PATH_LIMIT PATH_MAX +++#else +++# define SECURE_PATH_LIMIT 1024 +++#endif +++ +++/* Strings containing colon-separated lists of audit modules. */ +++struct audit_list +++{ +++ /* Array of strings containing colon-separated path lists. Each +++ audit module needs its own namespace, so pre-allocate the largest +++ possible list. */ +++ const char *audit_strings[DL_NNS]; +++ +++ /* Number of entries added to audit_strings. */ +++ size_t length; +++ +++ /* Index into the audit_strings array (for the iteration phase). */ +++ size_t current_index; +++ +++ /* Tail of audit_strings[current_index] which still needs +++ processing. */ +++ const char *current_tail; +++ +++ /* Scratch buffer for returning a name which is part of the strings +++ in audit_strings. */ +++ char fname[SECURE_NAME_LIMIT]; +++}; +++ +++/* Creates an empty audit list. */ +++static void audit_list_init (struct audit_list *); +++ +++/* Add a string to the end of the audit list, for later parsing. Must +++ not be called after audit_list_next. */ +++static void audit_list_add_string (struct audit_list *, const char *); +++ +++/* Extract the next audit module from the audit list. Only modules +++ for which dso_name_valid_for_suid is true are returned. Must be +++ called after all the audit_list_add_string calls. */ +++static const char *audit_list_next (struct audit_list *); ++ ++ /* This is a list of all the modes the dynamic loader can be in. */ ++ enum mode { normal, list, verify, trace }; ++@@ -118,7 +164,7 @@ ++ /* Process all environments variables the dynamic linker must recognize. ++ Since all of them start with `LD_' we are a bit smarter while finding ++ all the entries. */ ++-static void process_envvars (enum mode *modep); +++static void process_envvars (enum mode *modep, struct audit_list *); ++ ++ #ifdef DL_ARGV_NOT_RELRO ++ int _dl_argc attribute_hidden; ++@@ -146,19 +192,6 @@ ++ strong_alias (__pointer_chk_guard_local, __pointer_chk_guard) ++ #endif ++ ++-/* Length limits for names and paths, to protect the dynamic linker, ++- particularly when __libc_enable_secure is active. */ ++-#ifdef NAME_MAX ++-# define SECURE_NAME_LIMIT NAME_MAX ++-#else ++-# define SECURE_NAME_LIMIT 255 ++-#endif ++-#ifdef PATH_MAX ++-# define SECURE_PATH_LIMIT PATH_MAX ++-#else ++-# define SECURE_PATH_LIMIT 1024 ++-#endif ++- ++ /* Check that AT_SECURE=0, or that the passed name does not contain ++ directories and is not overly long. Reject empty names ++ unconditionally. */ ++@@ -176,89 +209,92 @@ ++ return *p != '\0'; ++ } ++ ++-/* LD_AUDIT variable contents. Must be processed before the ++- audit_list below. */ ++-const char *audit_list_string; ++- ++-/* Cyclic list of auditing DSOs. audit_list->next is the first ++- element. */ ++-static struct audit_list +++static void +++audit_list_init (struct audit_list *list) ++ { ++- const char *name; ++- struct audit_list *next; ++-} *audit_list; +++ list->length = 0; +++ list->current_index = 0; +++ list->current_tail = NULL; +++} ++ ++-/* Iterator for audit_list_string followed by audit_list. */ ++-struct audit_list_iter +++static void +++audit_list_add_string (struct audit_list *list, const char *string) ++ { ++- /* Tail of audit_list_string still needing processing, or NULL. */ ++- const char *audit_list_tail; +++ /* Empty strings do not load anything. */ +++ if (*string == '\0') +++ return; ++ ++- /* The list element returned in the previous iteration. NULL before ++- the first element. */ ++- struct audit_list *previous; +++ if (list->length == array_length (list->audit_strings)) +++ _dl_fatal_printf ("Fatal glibc error: Too many audit modules requested\n"); ++ ++- /* Scratch buffer for returning a name which is part of ++- audit_list_string. */ ++- char fname[SECURE_NAME_LIMIT]; ++-}; +++ list->audit_strings[list->length++] = string; ++ ++-/* Initialize an audit list iterator. */ ++-static void ++-audit_list_iter_init (struct audit_list_iter *iter) ++-{ ++- iter->audit_list_tail = audit_list_string; ++- iter->previous = NULL; +++ /* Initialize processing of the first string for +++ audit_list_next. */ +++ if (list->length == 1) +++ list->current_tail = string; ++ } ++ ++-/* Iterate through both audit_list_string and audit_list. */ ++ static const char * ++-audit_list_iter_next (struct audit_list_iter *iter) +++audit_list_next (struct audit_list *list) ++ { ++- if (iter->audit_list_tail != NULL) +++ if (list->current_tail == NULL) +++ return NULL; +++ +++ while (true) ++ { ++- /* First iterate over audit_list_string. */ ++- while (*iter->audit_list_tail != '\0') +++ /* Advance to the next string in audit_strings if the current +++ string has been exhausted. */ +++ while (*list->current_tail == '\0') ++ { ++- /* Split audit list at colon. */ ++- size_t len = strcspn (iter->audit_list_tail, ":"); ++- if (len > 0 && len < sizeof (iter->fname)) +++ ++list->current_index; +++ if (list->current_index == list->length) ++ { ++- memcpy (iter->fname, iter->audit_list_tail, len); ++- iter->fname[len] = '\0'; +++ list->current_tail = NULL; +++ return NULL; ++ } ++- else ++- /* Do not return this name to the caller. */ ++- iter->fname[0] = '\0'; +++ list->current_tail = list->audit_strings[list->current_index]; +++ } ++ ++- /* Skip over the substring and the following delimiter. */ ++- iter->audit_list_tail += len; ++- if (*iter->audit_list_tail == ':') ++- ++iter->audit_list_tail; ++- ++- /* If the name is valid, return it. */ ++- if (dso_name_valid_for_suid (iter->fname)) ++- return iter->fname; ++- /* Otherwise, wrap around and try the next name. */ ++- } ++- /* Fall through to the procesing of audit_list. */ ++- } ++- ++- if (iter->previous == NULL) ++- { ++- if (audit_list == NULL) ++- /* No pre-parsed audit list. */ ++- return NULL; ++- /* Start of audit list. The first list element is at ++- audit_list->next (cyclic list). */ ++- iter->previous = audit_list->next; ++- return iter->previous->name; +++ /* Split the in-string audit list at the next colon colon. */ +++ size_t len = strcspn (list->current_tail, ":"); +++ if (len > 0 && len < sizeof (list->fname)) +++ { +++ memcpy (list->fname, list->current_tail, len); +++ list->fname[len] = '\0'; +++ } +++ else +++ /* Mark the name as unusable for dso_name_valid_for_suid. */ +++ list->fname[0] = '\0'; +++ +++ /* Skip over the substring and the following delimiter. */ +++ list->current_tail += len; +++ if (*list->current_tail == ':') +++ ++list->current_tail; +++ +++ /* If the name is valid, return it. */ +++ if (dso_name_valid_for_suid (list->fname)) +++ return list->fname; +++ +++ /* Otherwise wrap around to find the next list element. . */ ++ } ++- if (iter->previous == audit_list) ++- /* Cyclic list wrap-around. */ ++- return NULL; ++- iter->previous = iter->previous->next; ++- return iter->previous->name; +++} +++ +++/* Count audit modules before they are loaded so GLRO(dl_naudit) +++ is not yet usable. */ +++static size_t +++audit_list_count (struct audit_list *list) +++{ +++ /* Restore the audit_list iterator state at the end. */ +++ const char *saved_tail = list->current_tail; +++ size_t naudit = 0; +++ +++ assert (list->current_index == 0); +++ while (audit_list_next (list) != NULL) +++ naudit++; +++ list->current_tail = saved_tail; +++ list->current_index = 0; +++ return naudit; ++ } ++ ++ #ifndef HAVE_INLINED_SYSCALLS ++@@ -695,7 +731,7 @@ ++ static bool tls_init_tp_called; ++ ++ static void * ++-init_tls (void) +++init_tls (size_t naudit) ++ { ++ /* Number of elements in the static TLS block. */ ++ GL(dl_tls_static_nelem) = GL(dl_tls_max_dtv_idx); ++@@ -737,6 +773,9 @@ ++ } ++ assert (i == GL(dl_tls_max_dtv_idx)); ++ +++ /* Calculate the size of the static TLS surplus. */ +++ _dl_tls_static_surplus_init (naudit); +++ ++ /* Compute the TLS offsets for the various blocks. */ ++ _dl_determine_tlsoffset (); ++ ++@@ -1059,15 +1098,13 @@ ++ ++ /* Load all audit modules. */ ++ static void ++-load_audit_modules (struct link_map *main_map) +++load_audit_modules (struct link_map *main_map, struct audit_list *audit_list) ++ { ++ struct audit_ifaces *last_audit = NULL; ++- struct audit_list_iter al_iter; ++- audit_list_iter_init (&al_iter); ++ ++ while (true) ++ { ++- const char *name = audit_list_iter_next (&al_iter); +++ const char *name = audit_list_next (audit_list); ++ if (name == NULL) ++ break; ++ load_audit_module (name, &last_audit); ++@@ -1099,6 +1136,9 @@ ++ bool rtld_is_main = false; ++ void *tcbp = NULL; ++ +++ struct audit_list audit_list; +++ audit_list_init (&audit_list); +++ ++ GL(dl_init_static_tls) = &_dl_nothread_init_static_tls; ++ ++ #if defined SHARED && defined _LIBC_REENTRANT \ ++@@ -1112,7 +1152,7 @@ ++ GL(dl_make_stack_executable_hook) = &_dl_make_stack_executable; ++ ++ /* Process the environment variable which control the behaviour. */ ++- process_envvars (&mode); +++ process_envvars (&mode, &audit_list); ++ ++ #ifndef HAVE_INLINED_SYSCALLS ++ /* Set up a flag which tells we are just starting. */ ++@@ -1186,7 +1226,7 @@ ++ } ++ else if (! strcmp (_dl_argv[1], "--audit") && _dl_argc > 2) ++ { ++- process_dl_audit (_dl_argv[2]); +++ audit_list_add_string (&audit_list, _dl_argv[2]); ++ ++ _dl_skip_args += 2; ++ _dl_argc -= 2; ++@@ -1618,12 +1658,13 @@ ++ ++ /* If we have auditing DSOs to load, do it now. */ ++ bool need_security_init = true; ++- if (__glibc_unlikely (audit_list != NULL) ++- || __glibc_unlikely (audit_list_string != NULL)) +++ if (audit_list.length > 0) ++ { +++ size_t naudit = audit_list_count (&audit_list); +++ ++ /* Since we start using the auditing DSOs right away we need to ++ initialize the data structures now. */ ++- tcbp = init_tls (); +++ tcbp = init_tls (naudit); ++ ++ /* Initialize security features. We need to do it this early ++ since otherwise the constructors of the audit libraries will ++@@ -1632,7 +1673,11 @@ ++ security_init (); ++ need_security_init = false; ++ ++- load_audit_modules (main_map); +++ load_audit_modules (main_map, &audit_list); +++ +++ /* The count based on audit strings may overestimate the number +++ of audit modules that got loaded, but not underestimate. */ +++ assert (GLRO(dl_naudit) <= naudit); ++ } ++ ++ /* Keep track of the currently loaded modules to count how many ++@@ -1876,7 +1921,7 @@ ++ multiple threads (from a non-TLS-using libpthread). */ ++ bool was_tls_init_tp_called = tls_init_tp_called; ++ if (tcbp == NULL) ++- tcbp = init_tls (); +++ tcbp = init_tls (0); ++ ++ if (__glibc_likely (need_security_init)) ++ /* Initialize security features. But only if we have not done it ++@@ -2497,30 +2542,6 @@ ++ } ++ } ++ ++-static void ++-process_dl_audit (char *str) ++-{ ++- /* The parameter is a colon separated list of DSO names. */ ++- char *p; ++- ++- while ((p = (strsep) (&str, ":")) != NULL) ++- if (dso_name_valid_for_suid (p)) ++- { ++- /* This is using the local malloc, not the system malloc. The ++- memory can never be freed. */ ++- struct audit_list *newp = malloc (sizeof (*newp)); ++- newp->name = p; ++- ++- if (audit_list == NULL) ++- audit_list = newp->next = newp; ++- else ++- { ++- newp->next = audit_list->next; ++- audit_list = audit_list->next = newp; ++- } ++- } ++-} ++- ++ /* Process all environments variables the dynamic linker must recognize. ++ Since all of them start with `LD_' we are a bit smarter while finding ++ all the entries. */ ++@@ -2528,7 +2549,7 @@ ++ ++ ++ static void ++-process_envvars (enum mode *modep) +++process_envvars (enum mode *modep, struct audit_list *audit_list) ++ { ++ char **runp = _environ; ++ char *envline; ++@@ -2568,7 +2589,7 @@ ++ break; ++ } ++ if (memcmp (envline, "AUDIT", 5) == 0) ++- audit_list_string = &envline[6]; +++ audit_list_add_string (audit_list, &envline[6]); ++ break; ++ ++ case 7: ++--- a/csu/libc-tls.c +++++ b/csu/libc-tls.c ++@@ -46,13 +46,19 @@ ++ struct dtv_slotinfo_list *_dl_tls_dtv_slotinfo_list; ++ /* Number of modules in the static TLS block. */ ++ size_t _dl_tls_static_nelem; ++-/* Size of the static TLS block. Giving this initialized value ++- preallocates some surplus bytes in the static TLS area. */ ++-size_t _dl_tls_static_size = 2048; +++/* Size of the static TLS block. */ +++size_t _dl_tls_static_size; ++ /* Size actually allocated in the static TLS block. */ ++ size_t _dl_tls_static_used; ++ /* Alignment requirement of the static TLS block. */ ++ size_t _dl_tls_static_align; +++/* Size of surplus space in the static TLS area for dynamically +++ loaded modules with IE-model TLS or for TLSDESC optimization. +++ See comments in elf/dl-tls.c where it is initialized. */ +++size_t _dl_tls_static_surplus; +++/* Remaining amount of static TLS that may be used for optimizing +++ dynamic TLS access (e.g. with TLSDESC). */ +++size_t _dl_tls_static_optional; ++ ++ /* Generation counter for the dtv. */ ++ size_t _dl_tls_generation; ++@@ -81,10 +87,8 @@ ++ static void ++ init_static_tls (size_t memsz, size_t align) ++ { ++- /* That is the size of the TLS memory for this object. The initialized ++- value of _dl_tls_static_size is provided by dl-open.c to request some ++- surplus that permits dynamic loading of modules with IE-model TLS. */ ++- GL(dl_tls_static_size) = roundup (memsz + GL(dl_tls_static_size), +++ /* That is the size of the TLS memory for this object. */ +++ GL(dl_tls_static_size) = roundup (memsz + GLRO(dl_tls_static_surplus), ++ TLS_TCB_ALIGN); ++ #if TLS_TCB_AT_TP ++ GL(dl_tls_static_size) += TLS_TCB_SIZE; ++@@ -125,25 +129,24 @@ ++ break; ++ } ++ +++ /* Calculate the size of the static TLS surplus, with 0 auditors. */ +++ _dl_tls_static_surplus_init (0); +++ ++ /* We have to set up the TCB block which also (possibly) contains ++ 'errno'. Therefore we avoid 'malloc' which might touch 'errno'. ++ Instead we use 'sbrk' which would only uses 'errno' if it fails. ++ In this case we are right away out of memory and the user gets ++- what she/he deserves. ++- ++- The initialized value of _dl_tls_static_size is provided by dl-open.c ++- to request some surplus that permits dynamic loading of modules with ++- IE-model TLS. */ +++ what she/he deserves. */ ++ #if TLS_TCB_AT_TP ++ /* Align the TCB offset to the maximum alignment, as ++ _dl_allocate_tls_storage (in elf/dl-tls.c) does using __libc_memalign ++ and dl_tls_static_align. */ ++- tcb_offset = roundup (memsz + GL(dl_tls_static_size), max_align); +++ tcb_offset = roundup (memsz + GLRO(dl_tls_static_surplus), max_align); ++ tlsblock = __sbrk (tcb_offset + TLS_INIT_TCB_SIZE + max_align); ++ #elif TLS_DTV_AT_TP ++ tcb_offset = roundup (TLS_INIT_TCB_SIZE, align ?: 1); ++ tlsblock = __sbrk (tcb_offset + memsz + max_align ++- + TLS_PRE_TCB_SIZE + GL(dl_tls_static_size)); +++ + TLS_PRE_TCB_SIZE + GLRO(dl_tls_static_surplus)); ++ tlsblock += TLS_PRE_TCB_SIZE; ++ #else ++ /* In case a model with a different layout for the TCB and DTV ++--- a/elf/dl-tls.c +++++ b/elf/dl-tls.c ++@@ -29,10 +29,66 @@ ++ #include ++ #include ++ ++-/* Amount of excess space to allocate in the static TLS area ++- to allow dynamic loading of modules defining IE-model TLS data. */ ++-#define TLS_STATIC_SURPLUS 64 + DL_NNS * 100 +++#define TUNABLE_NAMESPACE rtld +++#include ++ +++/* Surplus static TLS, GLRO(dl_tls_static_surplus), is used for +++ +++ - IE TLS in libc.so for all dlmopen namespaces except in the initial +++ one where libc.so is not loaded dynamically but at startup time, +++ - IE TLS in other libraries which may be dynamically loaded even in the +++ initial namespace, +++ - and optionally for optimizing dynamic TLS access. +++ +++ The maximum number of namespaces is DL_NNS, but to support that many +++ namespaces correctly the static TLS allocation should be significantly +++ increased, which may cause problems with small thread stacks due to the +++ way static TLS is accounted (bug 11787). +++ +++ So there is a rtld.nns tunable limit on the number of supported namespaces +++ that affects the size of the static TLS and by default it's small enough +++ not to cause problems with existing applications. The limit is not +++ enforced or checked: it is the user's responsibility to increase rtld.nns +++ if more dlmopen namespaces are used. +++ +++ Audit modules use their own namespaces, they are not included in rtld.nns, +++ but come on top when computing the number of namespaces. */ +++ +++/* Size of initial-exec TLS in libc.so. */ +++#define LIBC_IE_TLS 192 +++/* Size of initial-exec TLS in libraries other than libc.so. +++ This should be large enough to cover runtime libraries of the +++ compiler such as libgomp and libraries in libc other than libc.so. */ +++#define OTHER_IE_TLS 144 +++ +++/* Calculate the size of the static TLS surplus, when the given +++ number of audit modules are loaded. Must be called after the +++ number of audit modules is known and before static TLS allocation. */ +++void +++_dl_tls_static_surplus_init (size_t naudit) +++{ +++ size_t nns, opt_tls; +++ +++#if HAVE_TUNABLES +++ nns = TUNABLE_GET (nns, size_t, NULL); +++ opt_tls = TUNABLE_GET (optional_static_tls, size_t, NULL); +++#else +++ /* Default values of the tunables. */ +++ nns = 4; +++ opt_tls = 512; +++#endif +++ if (nns > DL_NNS) +++ nns = DL_NNS; +++ if (DL_NNS - nns < naudit) +++ _dl_fatal_printf ("Failed loading %lu audit modules, %lu are supported.\n", +++ (unsigned long) naudit, (unsigned long) (DL_NNS - nns)); +++ nns += naudit; +++ +++ GL(dl_tls_static_optional) = opt_tls; +++ GLRO(dl_tls_static_surplus) = ((nns - 1) * LIBC_IE_TLS +++ + nns * OTHER_IE_TLS +++ + opt_tls); +++} ++ ++ /* Out-of-memory handler. */ ++ static void ++@@ -218,7 +274,8 @@ ++ } ++ ++ GL(dl_tls_static_used) = offset; ++- GL(dl_tls_static_size) = (roundup (offset + TLS_STATIC_SURPLUS, max_align) +++ GL(dl_tls_static_size) = (roundup (offset + GLRO(dl_tls_static_surplus), +++ max_align) ++ + TLS_TCB_SIZE); ++ #elif TLS_DTV_AT_TP ++ /* The TLS blocks start right after the TCB. */ ++@@ -262,7 +319,7 @@ ++ } ++ ++ GL(dl_tls_static_used) = offset; ++- GL(dl_tls_static_size) = roundup (offset + TLS_STATIC_SURPLUS, +++ GL(dl_tls_static_size) = roundup (offset + GLRO(dl_tls_static_surplus), ++ TLS_TCB_ALIGN); ++ #else ++ # error "Either TLS_TCB_AT_TP or TLS_DTV_AT_TP must be defined" ++--- a/elf/dl-tunables.list +++++ b/elf/dl-tunables.list ++@@ -126,4 +126,18 @@ ++ default: 3 ++ } ++ } +++ +++ rtld { +++ nns { +++ type: SIZE_T +++ minval: 1 +++ maxval: 16 +++ default: 4 +++ } +++ optional_static_tls { +++ type: SIZE_T +++ minval: 0 +++ default: 512 +++ } +++ } ++ } ++--- a/sysdeps/generic/ldsodefs.h +++++ b/sysdeps/generic/ldsodefs.h ++@@ -439,6 +439,9 @@ ++ EXTERN size_t _dl_tls_static_used; ++ /* Alignment requirement of the static TLS block. */ ++ EXTERN size_t _dl_tls_static_align; +++ /* Remaining amount of static TLS that may be used for optimizing +++ dynamic TLS access (e.g. with TLSDESC). */ +++ EXTERN size_t _dl_tls_static_optional; ++ ++ /* Number of additional entries in the slotinfo array of each slotinfo ++ list element. A large number makes it almost certain take we never ++@@ -580,6 +583,11 @@ ++ binaries, don't honor for PIEs). */ ++ EXTERN ElfW(Addr) _dl_use_load_bias; ++ +++ /* Size of surplus space in the static TLS area for dynamically +++ loaded modules with IE-model TLS or for TLSDESC optimization. +++ See comments in elf/dl-tls.c where it is initialized. */ +++ EXTERN size_t _dl_tls_static_surplus; +++ ++ /* Name of the shared object to be profiled (if any). */ ++ EXTERN const char *_dl_profile; ++ /* Filename of the output file. */ ++@@ -1086,6 +1094,10 @@ ++ /* Calculate offset of the TLS blocks in the static TLS block. */ ++ extern void _dl_determine_tlsoffset (void) attribute_hidden; ++ +++/* Calculate the size of the static TLS surplus, when the given +++ number of audit modules are loaded. */ +++void _dl_tls_static_surplus_init (size_t naudit) attribute_hidden; +++ ++ #ifndef SHARED ++ /* Set up the TCB for statically linked applications. This is called ++ early during startup because we always use TLS (for errno and the ++--- a/elf/Makefile +++++ b/elf/Makefile ++@@ -201,7 +201,8 @@ ++ tst-unwind-ctor tst-unwind-main tst-audit13 \ ++ tst-sonamemove-link tst-sonamemove-dlopen tst-dlopen-tlsmodid \ ++ tst-dlopen-self tst-auditmany tst-initfinilazyfail tst-dlopenfail \ ++- tst-dlopenfail-2 +++ tst-dlopenfail-2 \ +++ tst-tls-ie tst-tls-ie-dlmopen ++ # reldep9 ++ tests-internal += loadtest unload unload2 circleload1 \ ++ neededtest neededtest2 neededtest3 neededtest4 \ ++@@ -312,7 +313,11 @@ ++ tst-auditmanymod7 tst-auditmanymod8 tst-auditmanymod9 \ ++ tst-initlazyfailmod tst-finilazyfailmod \ ++ tst-dlopenfailmod1 tst-dlopenfaillinkmod tst-dlopenfailmod2 \ ++- tst-dlopenfailmod3 tst-ldconfig-ld-mod +++ tst-dlopenfailmod3 tst-ldconfig-ld-mod \ +++ tst-tls-ie-mod0 tst-tls-ie-mod1 tst-tls-ie-mod2 \ +++ tst-tls-ie-mod3 tst-tls-ie-mod4 tst-tls-ie-mod5 \ +++ tst-tls-ie-mod6 +++ ++ # Most modules build with _ISOMAC defined, but those filtered out ++ # depend on internal headers. ++ modules-names-tests = $(filter-out ifuncmod% tst-libc_dlvsym-dso tst-tlsmod%,\ ++@@ -1699,3 +1704,23 @@ ++ ++ $(objpfx)tst-ldconfig-ld_so_conf-update.out: $(objpfx)tst-ldconfig-ld-mod.so ++ $(objpfx)tst-ldconfig-ld_so_conf-update: $(libdl) +++ +++$(objpfx)tst-tls-ie: $(libdl) $(shared-thread-library) +++$(objpfx)tst-tls-ie.out: \ +++ $(objpfx)tst-tls-ie-mod0.so \ +++ $(objpfx)tst-tls-ie-mod1.so \ +++ $(objpfx)tst-tls-ie-mod2.so \ +++ $(objpfx)tst-tls-ie-mod3.so \ +++ $(objpfx)tst-tls-ie-mod4.so \ +++ $(objpfx)tst-tls-ie-mod5.so \ +++ $(objpfx)tst-tls-ie-mod6.so +++ +++$(objpfx)tst-tls-ie-dlmopen: $(libdl) $(shared-thread-library) +++$(objpfx)tst-tls-ie-dlmopen.out: \ +++ $(objpfx)tst-tls-ie-mod0.so \ +++ $(objpfx)tst-tls-ie-mod1.so \ +++ $(objpfx)tst-tls-ie-mod2.so \ +++ $(objpfx)tst-tls-ie-mod3.so \ +++ $(objpfx)tst-tls-ie-mod4.so \ +++ $(objpfx)tst-tls-ie-mod5.so \ +++ $(objpfx)tst-tls-ie-mod6.so ++--- a/elf/dl-reloc.c +++++ b/elf/dl-reloc.c ++@@ -39,13 +39,16 @@ ++ /* We are trying to perform a static TLS relocation in MAP, but it was ++ dynamically loaded. This can only work if there is enough surplus in ++ the static TLS area already allocated for each running thread. If this ++- object's TLS segment is too big to fit, we fail. If it fits, ++- we set MAP->l_tls_offset and return. ++- This function intentionally does not return any value but signals error ++- directly, as static TLS should be rare and code handling it should ++- not be inlined as much as possible. */ +++ object's TLS segment is too big to fit, we fail with -1. If it fits, +++ we set MAP->l_tls_offset and return 0. +++ A portion of the surplus static TLS can be optionally used to optimize +++ dynamic TLS access (with TLSDESC or powerpc TLS optimizations). +++ If OPTIONAL is true then TLS is allocated for such optimization and +++ the caller must have a fallback in case the optional portion of surplus +++ TLS runs out. If OPTIONAL is false then the entire surplus TLS area is +++ considered and the allocation only fails if that runs out. */ ++ int ++-_dl_try_allocate_static_tls (struct link_map *map) +++_dl_try_allocate_static_tls (struct link_map *map, bool optional) ++ { ++ /* If we've already used the variable with dynamic access, or if the ++ alignment requirements are too high, fail. */ ++@@ -68,8 +71,14 @@ ++ ++ size_t n = (freebytes - blsize) / map->l_tls_align; ++ ++- size_t offset = GL(dl_tls_static_used) + (freebytes - n * map->l_tls_align ++- - map->l_tls_firstbyte_offset); +++ /* Account optional static TLS surplus usage. */ +++ size_t use = freebytes - n * map->l_tls_align - map->l_tls_firstbyte_offset; +++ if (optional && use > GL(dl_tls_static_optional)) +++ goto fail; +++ else if (optional) +++ GL(dl_tls_static_optional) -= use; +++ +++ size_t offset = GL(dl_tls_static_used) + use; ++ ++ map->l_tls_offset = GL(dl_tls_static_used) = offset; ++ #elif TLS_DTV_AT_TP ++@@ -83,6 +92,13 @@ ++ if (used > GL(dl_tls_static_size)) ++ goto fail; ++ +++ /* Account optional static TLS surplus usage. */ +++ size_t use = used - GL(dl_tls_static_used); +++ if (optional && use > GL(dl_tls_static_optional)) +++ goto fail; +++ else if (optional) +++ GL(dl_tls_static_optional) -= use; +++ ++ map->l_tls_offset = offset; ++ map->l_tls_firstbyte_offset = GL(dl_tls_static_used); ++ GL(dl_tls_static_used) = used; ++@@ -110,12 +126,15 @@ ++ return 0; ++ } ++ +++/* This function intentionally does not return any value but signals error +++ directly, as static TLS should be rare and code handling it should +++ not be inlined as much as possible. */ ++ void ++ __attribute_noinline__ ++ _dl_allocate_static_tls (struct link_map *map) ++ { ++ if (map->l_tls_offset == FORCED_DYNAMIC_TLS_OFFSET ++- || _dl_try_allocate_static_tls (map)) +++ || _dl_try_allocate_static_tls (map, false)) ++ { ++ _dl_signal_error (0, map->l_name, NULL, N_("\ ++ cannot allocate memory in static TLS block")); ++--- a/elf/dynamic-link.h +++++ b/elf/dynamic-link.h ++@@ -40,9 +40,10 @@ ++ (__builtin_expect ((sym_map)->l_tls_offset \ ++ != FORCED_DYNAMIC_TLS_OFFSET, 1) \ ++ && (__builtin_expect ((sym_map)->l_tls_offset != NO_TLS_OFFSET, 1) \ ++- || _dl_try_allocate_static_tls (sym_map) == 0)) +++ || _dl_try_allocate_static_tls (sym_map, true) == 0)) ++ ++-int _dl_try_allocate_static_tls (struct link_map *map) attribute_hidden; +++int _dl_try_allocate_static_tls (struct link_map *map, bool optional) +++ attribute_hidden; ++ ++ #include ++ ++--- /dev/null +++++ b/elf/tst-tls-ie-dlmopen.c ++@@ -0,0 +1,112 @@ +++/* Test dlopen of modules with initial-exec TLS after dlmopen. +++ Copyright (C) 2016-2020 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 +++ . */ +++ +++/* This test tries to check that surplus static TLS is not used up for +++ dynamic TLS optimizations and 4*144 = 576 bytes of static TLS is +++ still available for dlopening modules with initial-exec TLS after 3 +++ new dlmopen namespaces are created. It depends on rtld.nns=4 and +++ rtld.optional_static_tls=512 tunable settings. */ +++ +++#include +++#include +++#include +++#include +++#include +++ +++static int do_test (void); +++#include +++#include +++#include +++#include +++ +++/* Have some big TLS in the main exe: should not use surplus TLS. */ +++__thread char maintls[1000]; +++ +++static pthread_barrier_t barrier; +++ +++/* Forces multi-threaded behaviour. */ +++static void * +++blocked_thread_func (void *closure) +++{ +++ xpthread_barrier_wait (&barrier); +++ /* TLS load and access tests run here in the main thread. */ +++ xpthread_barrier_wait (&barrier); +++ return NULL; +++} +++ +++static void * +++load_and_access (Lmid_t lmid, const char *mod, const char *func) +++{ +++ /* Load module with TLS. */ +++ void *p = xdlmopen (lmid, mod, RTLD_NOW); +++ /* Access the TLS variable to ensure it is allocated. */ +++ void (*f) (void) = (void (*) (void))xdlsym (p, func); +++ f (); +++ return p; +++} +++ +++static int +++do_test (void) +++{ +++ void *mods[5]; +++ +++ { +++ int ret = pthread_barrier_init (&barrier, NULL, 2); +++ if (ret != 0) +++ { +++ errno = ret; +++ printf ("error: pthread_barrier_init: %m\n"); +++ exit (1); +++ } +++ } +++ +++ pthread_t blocked_thread = xpthread_create (NULL, blocked_thread_func, NULL); +++ xpthread_barrier_wait (&barrier); +++ +++ printf ("maintls[%zu]:\t %p .. %p\n", +++ sizeof maintls, maintls, maintls + sizeof maintls); +++ memset (maintls, 1, sizeof maintls); +++ +++ /* Load modules with dynamic TLS (use surplus static TLS for libc +++ in new namespaces and may be for TLS optimizations too). */ +++ mods[0] = load_and_access (LM_ID_BASE, "tst-tls-ie-mod0.so", "access0"); +++ mods[1] = load_and_access (LM_ID_NEWLM, "tst-tls-ie-mod1.so", "access1"); +++ mods[2] = load_and_access (LM_ID_NEWLM, "tst-tls-ie-mod2.so", "access2"); +++ mods[3] = load_and_access (LM_ID_NEWLM, "tst-tls-ie-mod3.so", "access3"); +++ /* Load modules with initial-exec TLS (can only use surplus static TLS). */ +++ mods[4] = load_and_access (LM_ID_BASE, "tst-tls-ie-mod6.so", "access6"); +++ +++ /* Here 576 bytes + 3 * libc use of surplus static TLS is in use so less +++ than 1024 bytes are available (exact number depends on TLS optimizations +++ and the libc TLS use). */ +++ printf ("The next dlmopen should fail...\n"); +++ void *p = dlmopen (LM_ID_BASE, "tst-tls-ie-mod4.so", RTLD_NOW); +++ if (p != NULL) +++ FAIL_EXIT1 ("error: expected dlmopen to fail because there is " +++ "not enough surplus static TLS.\n"); +++ printf ("...OK failed with: %s.\n", dlerror ()); +++ +++ xpthread_barrier_wait (&barrier); +++ xpthread_join (blocked_thread); +++ +++ /* Close the modules. */ +++ for (int i = 0; i < 5; ++i) +++ xdlclose (mods[i]); +++ +++ return 0; +++} ++--- /dev/null +++++ b/elf/tst-tls-ie-mod.h ++@@ -0,0 +1,40 @@ +++/* Module with specified TLS size and model. +++ Copyright (C) 2020 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 +++ . */ +++ +++/* This file is parameterized by macros N, SIZE and MODEL. */ +++ +++#include +++#include +++ +++#define CONCATX(x, y) x ## y +++#define CONCAT(x, y) CONCATX (x, y) +++#define STRX(x) #x +++#define STR(x) STRX (x) +++ +++#define VAR CONCAT (var, N) +++ +++__attribute__ ((aligned (8), tls_model (MODEL))) +++__thread char VAR[SIZE]; +++ +++void +++CONCAT (access, N) (void) +++{ +++ printf (STR (VAR) "[%d]:\t %p .. %p " MODEL "\n", SIZE, VAR, VAR + SIZE); +++ fflush (stdout); +++ memset (VAR, 1, SIZE); +++} ++--- /dev/null +++++ b/elf/tst-tls-ie-mod0.c ++@@ -0,0 +1,4 @@ +++#define N 0 +++#define SIZE 480 +++#define MODEL "global-dynamic" +++#include "tst-tls-ie-mod.h" ++--- /dev/null +++++ b/elf/tst-tls-ie-mod1.c ++@@ -0,0 +1,4 @@ +++#define N 1 +++#define SIZE 120 +++#define MODEL "global-dynamic" +++#include "tst-tls-ie-mod.h" ++--- /dev/null +++++ b/elf/tst-tls-ie-mod2.c ++@@ -0,0 +1,4 @@ +++#define N 2 +++#define SIZE 24 +++#define MODEL "global-dynamic" +++#include "tst-tls-ie-mod.h" ++--- /dev/null +++++ b/elf/tst-tls-ie-mod3.c ++@@ -0,0 +1,4 @@ +++#define N 3 +++#define SIZE 16 +++#define MODEL "global-dynamic" +++#include "tst-tls-ie-mod.h" ++--- /dev/null +++++ b/elf/tst-tls-ie-mod4.c ++@@ -0,0 +1,4 @@ +++#define N 4 +++#define SIZE 1024 +++#define MODEL "initial-exec" +++#include "tst-tls-ie-mod.h" ++--- /dev/null +++++ b/elf/tst-tls-ie-mod5.c ++@@ -0,0 +1,4 @@ +++#define N 5 +++#define SIZE 128 +++#define MODEL "initial-exec" +++#include "tst-tls-ie-mod.h" ++--- /dev/null +++++ b/elf/tst-tls-ie-mod6.c ++@@ -0,0 +1,4 @@ +++#define N 6 +++#define SIZE 576 +++#define MODEL "initial-exec" +++#include "tst-tls-ie-mod.h" ++--- /dev/null +++++ b/elf/tst-tls-ie.c ++@@ -0,0 +1,111 @@ +++/* Test dlopen of modules with initial-exec TLS. +++ Copyright (C) 2016-2020 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 +++ . */ +++ +++/* This test tries to check that surplus static TLS is not used up for +++ dynamic TLS optimizations and 3*192 + 4*144 = 1152 bytes of static +++ TLS is available for dlopening modules with initial-exec TLS. It +++ depends on rtld.nns=4 and rtld.optional_static_tls=512 tunable setting. */ +++ +++#include +++#include +++#include +++#include +++#include +++ +++static int do_test (void); +++#include +++#include +++#include +++#include +++ +++/* Have some big TLS in the main exe: should not use surplus TLS. */ +++__thread char maintls[1000]; +++ +++static pthread_barrier_t barrier; +++ +++/* Forces multi-threaded behaviour. */ +++static void * +++blocked_thread_func (void *closure) +++{ +++ xpthread_barrier_wait (&barrier); +++ /* TLS load and access tests run here in the main thread. */ +++ xpthread_barrier_wait (&barrier); +++ return NULL; +++} +++ +++static void * +++load_and_access (const char *mod, const char *func) +++{ +++ /* Load module with TLS. */ +++ void *p = xdlopen (mod, RTLD_NOW); +++ /* Access the TLS variable to ensure it is allocated. */ +++ void (*f) (void) = (void (*) (void))xdlsym (p, func); +++ f (); +++ return p; +++} +++ +++static int +++do_test (void) +++{ +++ void *mods[6]; +++ +++ { +++ int ret = pthread_barrier_init (&barrier, NULL, 2); +++ if (ret != 0) +++ { +++ errno = ret; +++ printf ("error: pthread_barrier_init: %m\n"); +++ exit (1); +++ } +++ } +++ +++ pthread_t blocked_thread = xpthread_create (NULL, blocked_thread_func, NULL); +++ xpthread_barrier_wait (&barrier); +++ +++ printf ("maintls[%zu]:\t %p .. %p\n", +++ sizeof maintls, maintls, maintls + sizeof maintls); +++ memset (maintls, 1, sizeof maintls); +++ +++ /* Load modules with dynamic TLS (may use surplus static TLS +++ opportunistically). */ +++ mods[0] = load_and_access ("tst-tls-ie-mod0.so", "access0"); +++ mods[1] = load_and_access ("tst-tls-ie-mod1.so", "access1"); +++ mods[2] = load_and_access ("tst-tls-ie-mod2.so", "access2"); +++ mods[3] = load_and_access ("tst-tls-ie-mod3.so", "access3"); +++ /* Load modules with initial-exec TLS (can only use surplus static TLS). */ +++ mods[4] = load_and_access ("tst-tls-ie-mod4.so", "access4"); +++ mods[5] = load_and_access ("tst-tls-ie-mod5.so", "access5"); +++ +++ /* Here 1152 bytes of surplus static TLS is in use and at most 512 bytes +++ are available (depending on TLS optimizations). */ +++ printf ("The next dlopen should fail...\n"); +++ void *p = dlopen ("tst-tls-ie-mod6.so", RTLD_NOW); +++ if (p != NULL) +++ FAIL_EXIT1 ("error: expected dlopen to fail because there is " +++ "not enough surplus static TLS.\n"); +++ printf ("...OK failed with: %s.\n", dlerror ()); +++ +++ xpthread_barrier_wait (&barrier); +++ xpthread_join (blocked_thread); +++ +++ /* Close the modules. */ +++ for (int i = 0; i < 6; ++i) +++ xdlclose (mods[i]); +++ +++ return 0; +++} diff --cc debian/patches/any/local-CVE-2021-33574-mq_notify-use-after-free.diff index 000000000,000000000..1d91a5c47 new file mode 100644 --- /dev/null +++ b/debian/patches/any/local-CVE-2021-33574-mq_notify-use-after-free.diff @@@ -1,0 -1,0 +1,157 @@@ ++This is basically a backport of the following upstream commits below with ++__pthread_attr_copy implemented as a static function in mq_notify.c Indeed it ++has been added upstream in glibc 2.32 and is exported as a GLIBC_PRIVATE symbol ++from libpthread.so while __mq_notify is exported by librt.so. As Debian ++supports online upgrades, We need to support the case where 1) a process is ++started loading libpthread.so, 2) the glibc libraries are upgraded 3) librt.so ++is dlopened. This scenario might happens for instance with OpenJDK. ++ ++commit 331c6e8a184167dd21a9f0b3fc165aeefea6eeca ++Author: Florian Weimer ++Date: Tue May 19 12:32:39 2020 +0200 ++ ++ nptl: Add __pthread_attr_copy for copying pthread_attr_t objects ++ ++commit 79474303223c5665bec75ffbdb2a86ee04a2514b ++Author: Nikita Popov ++Date: Mon Aug 9 20:17:34 2021 +0530 ++ ++ librt: fix NULL pointer dereference (bug 28213) ++ ++ Helper thread frees copied attribute on NOTIFY_REMOVED message ++ received from the OS kernel. Unfortunately, it fails to check whether ++ copied attribute actually exists (data.attr != NULL). This worked ++ earlier because free() checks passed pointer before actually ++ attempting to release corresponding memory. But ++ __pthread_attr_destroy assumes pointer is not NULL. ++ ++ So passing NULL pointer to __pthread_attr_destroy will result in ++ segmentation fault. This scenario is possible if ++ notification->sigev_notify_attributes == NULL (which means default ++ thread attributes should be used). ++ ++ Signed-off-by: Nikita Popov ++ Reviewed-by: Siddhesh Poyarekar ++ (cherry picked from commit b805aebd42364fe696e417808a700fdb9800c9e8) ++ ++commit 42d359350510506b87101cf77202fefcbfc790cb ++Author: Andreas Schwab ++Date: Thu May 27 12:49:47 2021 +0200 ++ ++ Use __pthread_attr_copy in mq_notify (bug 27896) ++ ++ Make a deep copy of the pthread attribute object to remove a potential ++ use-after-free issue. ++ ++commit 217b6dc298156bdb0d6aea9ea93e7e394a5ff091 ++Author: Florian Weimer ++Date: Tue Jun 1 17:51:41 2021 +0200 ++ ++ Fix use of __pthread_attr_copy in mq_notify (bug 27896) ++ ++ __pthread_attr_copy can fail and does not initialize the attribute ++ structure in that case. ++ ++ If __pthread_attr_copy is never called and there is no allocated ++ attribute, pthread_attr_destroy should not be called, otherwise ++ there is a null pointer dereference in rt/tst-mqueue6. ++ ++ Fixes commit 42d359350510506b87101cf77202fefcbfc790cb ++ ("Use __pthread_attr_copy in mq_notify (bug 27896)"). ++ ++ Reviewed-by: Siddhesh Poyarekar ++ ++diff --git a/sysdeps/unix/sysv/linux/mq_notify.c b/sysdeps/unix/sysv/linux/mq_notify.c ++index f288bac477..e78ae74f0b 100644 ++--- a/sysdeps/unix/sysv/linux/mq_notify.c +++++ b/sysdeps/unix/sysv/linux/mq_notify.c ++@@ -134,9 +134,12 @@ helper_thread (void *arg) ++ to wait until it is done with it. */ ++ (void) __pthread_barrier_wait (¬ify_barrier); ++ } ++- else if (data.raw[NOTIFY_COOKIE_LEN - 1] == NOTIFY_REMOVED) ++- /* The only state we keep is the copy of the thread attributes. */ ++- free (data.attr); +++ else if (data.raw[NOTIFY_COOKIE_LEN - 1] == NOTIFY_REMOVED && data.attr != NULL) +++ { +++ /* The only state we keep is the copy of the thread attributes. */ +++ pthread_attr_destroy (data.attr); +++ free (data.attr); +++ } ++ } ++ return NULL; ++ } ++@@ -214,6 +217,42 @@ init_mq_netlink (void) ++ } ++ } ++ +++static int +++__pthread_attr_copy (pthread_attr_t *target, const pthread_attr_t *source) +++{ +++ /* Avoid overwriting *TARGET until all allocations have +++ succeeded. */ +++ union +++ { +++ pthread_attr_t external; +++ struct pthread_attr internal; +++ } temp; +++ +++ +++ temp.external = *source; +++ +++ /* Force new allocation. This function has full ownership of temp. */ +++ temp.internal.cpuset = NULL; +++ temp.internal.cpusetsize = 0; +++ +++ struct pthread_attr *isource = (struct pthread_attr *) source; +++ +++ /* Propagate affinity mask information. */ +++ if (isource->cpuset != NULL && isource->cpusetsize > 0) +++ { +++ temp.internal.cpuset = (cpu_set_t *) malloc (isource->cpusetsize); +++ if (temp.internal.cpuset == NULL) +++ return ENOMEM; +++ +++ temp.internal.cpusetsize = isource->cpusetsize; +++ memcpy (temp.internal.cpuset, isource->cpuset, isource->cpusetsize); +++ } +++ +++ /* Transfer ownership. *target is not assumed to have been +++ initialized. */ +++ *target = temp.external; +++ return 0; +++} ++ ++ /* Register notification upon message arrival to an empty message queue ++ MQDES. */ ++@@ -257,8 +296,14 @@ mq_notify (mqd_t mqdes, const struct sigevent *notification) ++ if (data.attr == NULL) ++ return -1; ++ ++- memcpy (data.attr, notification->sigev_notify_attributes, ++- sizeof (pthread_attr_t)); +++ int ret = __pthread_attr_copy (data.attr, +++ notification->sigev_notify_attributes); +++ if (ret != 0) +++ { +++ free (data.attr); +++ __set_errno (ret); +++ return -1; +++ } ++ } ++ ++ /* Construct the new request. */ ++@@ -271,8 +316,11 @@ mq_notify (mqd_t mqdes, const struct sigevent *notification) ++ int retval = INLINE_SYSCALL (mq_notify, 2, mqdes, &se); ++ ++ /* If it failed, free the allocated memory. */ ++- if (__glibc_unlikely (retval != 0)) ++- free (data.attr); +++ if (retval != 0 && data.attr != NULL) +++ { +++ pthread_attr_destroy (data.attr); +++ free (data.attr); +++ } ++ ++ return retval; ++ } diff --cc debian/patches/any/local-CVE-2023-4911.patch index 000000000,000000000..4c4c2094a new file mode 100644 --- /dev/null +++ b/debian/patches/any/local-CVE-2023-4911.patch @@@ -1,0 -1,0 +1,60 @@@ ++From d2b77337f734fcacdfc8e0ddec14cf31a746c7be Mon Sep 17 00:00:00 2001 ++From: Siddhesh Poyarekar ++Date: Mon, 11 Sep 2023 18:53:15 -0400 ++Subject: [PATCH v2] tunables: Terminate immediately if end of input is reached ++ ++The string parsing routine may end up writing beyond bounds of tunestr ++if the input tunable string is malformed, of the form name=name=val. ++This gets processed twice, first as name=name=val and next as name=val, ++resulting in tunestr being name=name=val:name=val, thus overflowing ++tunestr. ++ ++Terminate the parsing loop at the first instance itself so that tunestr ++does not overflow. ++--- ++Changes from v1: ++ ++- Also null-terminate tunestr before exiting. ++ ++ elf/dl-tunables.c | 17 ++++++++++------- ++ 1 file changed, 10 insertions(+), 7 deletions(-) ++ ++diff --git a/elf/dl-tunables.c b/elf/dl-tunables.c ++index 8e7ee9df10..76cf8b9da3 100644 ++--- a/elf/dl-tunables.c +++++ b/elf/dl-tunables.c ++@@ -187,11 +187,7 @@ parse_tunables (char *tunestr, char *valstring) ++ /* If we reach the end of the string before getting a valid name-value ++ pair, bail out. */ ++ if (p[len] == '\0') ++- { ++- if (__libc_enable_secure) ++- tunestr[off] = '\0'; ++- return; ++- } +++ break; ++ ++ /* We did not find a valid name-value pair before encountering the ++ colon. */ ++@@ -251,9 +247,16 @@ parse_tunables (char *tunestr, char *valstring) ++ } ++ } ++ ++- if (p[len] != '\0') ++- p += len + 1; +++ /* We reached the end while processing the tunable string. */ +++ if (p[len] == '\0') +++ break; +++ +++ p += len + 1; ++ } +++ +++ /* Terminate tunestr before we leave. */ +++ if (__libc_enable_secure) +++ tunestr[off] = '\0'; ++ } ++ #endif ++ ++-- ++2.41.0 ++ diff --cc debian/patches/any/local-CVE-2025-0395-1.diff index 000000000,000000000..141b38598 new file mode 100644 --- /dev/null +++ b/debian/patches/any/local-CVE-2025-0395-1.diff @@@ -1,0 -1,0 +1,64 @@@ ++From: Florian Weimer ++Date: Wed, 22 Jan 2025 17:22:02 +0100 ++X-Dgit-Generated: 2.31-13+deb11u11 a1ddae4d1e9eb3916efc51db03a68650a6b5fbd0 ++Subject: Fix underallocation of abort_msg_s struct (CVE-2025-0395) ++ ++Include the space needed to store the length of the message itself, in ++addition to the message string. This resolves BZ #32582. ++ ++Signed-off-by: Siddhesh Poyarekar ++Reviewed: Adhemerval Zanella ++(cherry picked from commit 68ee0f704cb81e9ad0a78c644a83e1e9cd2ee578) ++ ++Conflict in sysdeps/posix/libc_fatal.c due to missing cleanup after ++backtrace removal. ++ ++(cherry picked from commit df4e1f4a5096b385c9bcc94424cf2eaa227b3761) ++ ++--- ++ ++diff --git a/assert/assert.c b/assert/assert.c ++index 6e383b470b..68c46b3d47 100644 ++--- a/assert/assert.c +++++ b/assert/assert.c ++@@ -18,6 +18,7 @@ ++ #include ++ #include ++ #include +++#include ++ #include ++ #include ++ #include ++@@ -64,7 +65,8 @@ __assert_fail_base (const char *fmt, const char *assertion, const char *file, ++ (void) __fxprintf (NULL, "%s", str); ++ (void) fflush (stderr); ++ ++- total = (total + 1 + GLRO(dl_pagesize) - 1) & ~(GLRO(dl_pagesize) - 1); +++ total = ALIGN_UP (total + sizeof (struct abort_msg_s) + 1, +++ GLRO(dl_pagesize)); ++ struct abort_msg_s *buf = __mmap (NULL, total, PROT_READ | PROT_WRITE, ++ MAP_ANON | MAP_PRIVATE, -1, 0); ++ if (__glibc_likely (buf != MAP_FAILED)) ++diff --git a/sysdeps/posix/libc_fatal.c b/sysdeps/posix/libc_fatal.c ++index 86e5bc7f1b..497acaaad3 100644 ++--- a/sysdeps/posix/libc_fatal.c +++++ b/sysdeps/posix/libc_fatal.c ++@@ -20,6 +20,7 @@ ++ #include ++ #include ++ #include +++#include ++ #include ++ #include ++ #include ++@@ -125,8 +126,8 @@ __libc_message (enum __libc_message_action action, const char *fmt, ...) ++ ++ if ((action & do_abort)) ++ { ++- total = ((total + 1 + GLRO(dl_pagesize) - 1) ++- & ~(GLRO(dl_pagesize) - 1)); +++ total = ALIGN_UP (total + sizeof (struct abort_msg_s) + 1, +++ GLRO(dl_pagesize)); ++ struct abort_msg_s *buf = __mmap (NULL, total, ++ PROT_READ | PROT_WRITE, ++ MAP_ANON | MAP_PRIVATE, -1, 0); diff --cc debian/patches/any/local-CVE-2025-0395-2.diff index 000000000,000000000..aa40f069f new file mode 100644 --- /dev/null +++ b/debian/patches/any/local-CVE-2025-0395-2.diff @@@ -1,0 -1,0 +1,267 @@@ ++From: Siddhesh Poyarekar ++Date: Fri, 31 Jan 2025 12:16:30 -0500 ++X-Dgit-Generated: 2.31-13+deb11u11 431ec3508613cf4c34d38e539c5df73819a5603d ++Subject: assert: Add test for CVE-2025-0395 ++ ++Use the __progname symbol to override the program name to induce the ++failure that CVE-2025-0395 describes. ++ ++This is related to BZ #32582 ++ ++Signed-off-by: Siddhesh Poyarekar ++Reviewed-by: Adhemerval Zanella ++(cherry picked from commit cdb9ba84191ce72e86346fb8b1d906e7cd930ea2) ++(cherry picked from commit 31eb872cb21449832ab47ad5db83281d240e1d03 ++ and commits adding support_need_proc & xgetline) ++ ++--- ++ ++diff --git a/assert/Makefile b/assert/Makefile ++index 17c7ff0ddb..e4c9ead4d4 100644 ++--- a/assert/Makefile +++++ b/assert/Makefile ++@@ -25,7 +25,7 @@ include ../Makeconfig ++ headers := assert.h ++ ++ routines := assert assert-perr __assert ++-tests := test-assert test-assert-perr tst-assert-c++ tst-assert-g++ +++tests := test-assert test-assert-perr tst-assert-c++ tst-assert-g++ tst-assert-sa-2025-0001 ++ ++ ifeq ($(have-cxx-thread_local),yes) ++ CFLAGS-tst-assert-c++.o = -std=c++11 ++diff --git a/assert/tst-assert-sa-2025-0001.c b/assert/tst-assert-sa-2025-0001.c ++new file mode 100644 ++index 0000000000..102cb0078d ++--- /dev/null +++++ b/assert/tst-assert-sa-2025-0001.c ++@@ -0,0 +1,92 @@ +++/* Test for CVE-2025-0395. +++ Copyright The GNU Toolchain Authors. +++ 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 +++ . */ +++ +++/* Test that a large enough __progname does not result in a buffer overflow +++ when printing an assertion failure. This was CVE-2025-0395. */ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++extern const char *__progname; +++ +++int +++do_test (int argc, char **argv) +++{ +++ +++ support_need_proc ("Reads /proc/self/maps to add guards to writable maps."); +++ ignore_stderr (); +++ +++ /* XXX assumes that the assert is on a 2 digit line number. */ +++ const char *prompt = ": %s:99: do_test: Assertion `argc < 1' failed.\n"; +++ +++ int ret = fprintf (stderr, prompt, __FILE__); +++ if (ret < 0) +++ FAIL_EXIT1 ("fprintf failed: %m\n"); +++ +++ size_t pagesize = getpagesize (); +++ size_t namesize = pagesize - 1 - ret; +++ +++ /* Alter the progname so that the assert message fills the entire page. */ +++ char progname[namesize]; +++ memset (progname, 'A', namesize - 1); +++ progname[namesize - 1] = '\0'; +++ __progname = progname; +++ +++ FILE *f = xfopen ("/proc/self/maps", "r"); +++ char *line = NULL; +++ size_t len = 0; +++ uintptr_t prev_to = 0; +++ +++ /* Pad the beginning of every writable mapping with a PROT_NONE map. This +++ ensures that the mmap in the assert_fail path never ends up below a +++ writable map and will terminate immediately in case of a buffer +++ overflow. */ +++ while (xgetline (&line, &len, f)) +++ { +++ uintptr_t from, to; +++ char perm[4]; +++ +++ sscanf (line, "%" SCNxPTR "-%" SCNxPTR " %c%c%c%c ", +++ &from, &to, +++ &perm[0], &perm[1], &perm[2], &perm[3]); +++ +++ bool writable = (memchr (perm, 'w', 4) != NULL); +++ +++ if (prev_to != 0 && from - prev_to > pagesize && writable) +++ xmmap ((void *) from - pagesize, pagesize, PROT_NONE, +++ MAP_ANONYMOUS | MAP_PRIVATE, 0); +++ +++ prev_to = to; +++ } +++ +++ xfclose (f); +++ +++ assert (argc < 1); +++ return 0; +++} +++ +++#define EXPECTED_SIGNAL SIGABRT +++#define TEST_FUNCTION_ARGV do_test +++#include ++diff --git a/support/Makefile b/support/Makefile ++index 05e8c292b7..a0b7e7bece 100644 ++--- a/support/Makefile +++++ b/support/Makefile ++@@ -56,6 +56,7 @@ libsupport-routines = \ ++ support_format_hostent \ ++ support_format_netent \ ++ support_isolate_in_subprocess \ +++ support_need_proc \ ++ support_ptrace \ ++ support_openpty \ ++ support_paths \ ++@@ -98,6 +99,7 @@ libsupport-routines = \ ++ xfork \ ++ xftruncate \ ++ xgetsockname \ +++ xgetline \ ++ xlisten \ ++ xlseek \ ++ xmalloc \ ++diff --git a/support/support.h b/support/support.h ++index 0536474c41..d0831e2ab7 100644 ++--- a/support/support.h +++++ b/support/support.h ++@@ -81,6 +81,11 @@ char *support_quote_string (const char *); ++ regular file open for writing, and initially empty. */ ++ int support_descriptor_supports_holes (int fd); ++ +++/* Predicates that a test requires a working /proc filesystem. This +++ call will exit with UNSUPPORTED if /proc is not available, printing +++ WHY_MSG as part of the diagnostic. */ +++void support_need_proc (const char *why_msg); +++ ++ /* Error-checking wrapper functions which terminate the process on ++ error. */ ++ ++diff --git a/support/support_need_proc.c b/support/support_need_proc.c ++new file mode 100644 ++index 0000000000..9b4eab7539 ++--- /dev/null +++++ b/support/support_need_proc.c ++@@ -0,0 +1,35 @@ +++/* Indicate that a test requires a working /proc. +++ Copyright (C) 2022 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 +++ . */ +++ +++#include +++#include +++#include +++ +++/* We test for /proc/self/maps since that's one of the files that one +++ of our tests actually uses, but the general idea is if Linux's +++ /proc/ (procfs) filesystem is mounted. If not, the process exits +++ with an UNSUPPORTED result code. */ +++ +++void +++support_need_proc (const char *why_msg) +++{ +++#ifdef __linux__ +++ if (access ("/proc/self/maps", R_OK)) +++ FAIL_UNSUPPORTED ("/proc is not available, %s", why_msg); +++#endif +++} ++diff --git a/support/xgetline.c b/support/xgetline.c ++new file mode 100644 ++index 0000000000..baf656ae89 ++--- /dev/null +++++ b/support/xgetline.c ++@@ -0,0 +1,39 @@ +++/* fopen with error checking. +++ Copyright (C) 2020-2021 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 +++ . */ +++ +++#include +++#include +++ +++size_t +++xgetline (char **lineptr, size_t *n, FILE *stream) +++{ +++ TEST_VERIFY (!ferror (stream)); +++ ssize_t ret = getline (lineptr, n, stream); +++ if (ferror (stream)) +++ { +++ TEST_VERIFY (ret < 0); +++ FAIL_EXIT1 ("getline: %m"); +++ } +++ if (feof (stream)) +++ { +++ TEST_VERIFY (ret <= 0); +++ return 0; +++ } +++ TEST_VERIFY (ret > 0); +++ return ret; +++} ++diff --git a/support/xstdio.h b/support/xstdio.h ++index b62267a2a2..807c3afc43 100644 ++--- a/support/xstdio.h +++++ b/support/xstdio.h ++@@ -27,6 +27,11 @@ __BEGIN_DECLS ++ FILE *xfopen (const char *path, const char *mode); ++ void xfclose (FILE *); ++ +++/* Read a line from FP, using getline. *BUFFER must be NULL, or a +++ heap-allocated pointer of *LENGTH bytes. Return the number of +++ bytes in the line if a line was read, or 0 on EOF. */ +++size_t xgetline (char **lineptr, size_t *n, FILE *stream); +++ ++ __END_DECLS ++ ++ #endif /* SUPPORT_XSTDIO_H */ diff --cc debian/patches/any/local-CVE-2025-4802-1.diff index 000000000,000000000..f28d3ebb3 new file mode 100644 --- /dev/null +++ b/debian/patches/any/local-CVE-2025-4802-1.diff @@@ -1,0 -1,0 +1,44 @@@ ++From: Florian Weimer ++Date: Mon, 23 Dec 2024 13:57:55 +0100 ++X-Dgit-Generated: 2.31-13+deb11u12 11e6ec9bdac7cee00b40c2f5577904e2e3c83af7 ++Subject: support: Add support_record_failure_barrier ++ ++This can be used to stop execution after a TEST_COMPARE_BLOB ++failure, for example. ++ ++(cherry picked from commit d0b8aa6de4529231fadfe604ac2c434e559c2d9e) ++ ++--- ++ ++diff --git a/support/check.h b/support/check.h ++index 77d1d1e14d..42ce87db66 100644 ++--- a/support/check.h +++++ b/support/check.h ++@@ -187,6 +187,9 @@ void support_record_failure_reset (void); ++ failures or not. */ ++ int support_record_failure_is_failed (void); ++ +++/* Terminate the process if any failures have been encountered so far. */ +++void support_record_failure_barrier (void); +++ ++ __END_DECLS ++ ++ #endif /* SUPPORT_CHECK_H */ ++diff --git a/support/support_record_failure.c b/support/support_record_failure.c ++index f766c06236..21b695a843 100644 ++--- a/support/support_record_failure.c +++++ b/support/support_record_failure.c ++@@ -112,3 +112,13 @@ support_record_failure_is_failed (void) ++ synchronization for reliable test error reporting anyway. */ ++ return __atomic_load_n (&state->failed, __ATOMIC_RELAXED); ++ } +++ +++void +++support_record_failure_barrier (void) +++{ +++ if (__atomic_load_n (&state->failed, __ATOMIC_RELAXED)) +++ { +++ puts ("error: exiting due to previous errors"); +++ exit (1); +++ } +++} diff --cc debian/patches/any/local-CVE-2025-4802-2.diff index 000000000,000000000..e914142f6 new file mode 100644 --- /dev/null +++ b/debian/patches/any/local-CVE-2025-4802-2.diff @@@ -1,0 -1,0 +1,87 @@@ ++From: Florian Weimer ++Date: Thu, 26 Nov 2020 16:59:44 +0100 ++X-Dgit-Generated: 2.31-13+deb11u12 5b074fc64b51be81893e2cdf6407fdc028ab4429 ++Subject: support: Add support_copy_file ++ ++Reviewed-by: Adhemerval Zanella ++(cherry picked from commit 603ae243f6fe03208a3bb92adecf72403367bd95) ++ ++--- ++ ++diff --git a/support/Makefile b/support/Makefile ++index a0b7e7bece..070db07abb 100644 ++--- a/support/Makefile +++++ b/support/Makefile ++@@ -44,6 +44,7 @@ libsupport-routines = \ ++ support_capture_subprocess \ ++ support_capture_subprocess_check \ ++ support_chroot \ +++ support_copy_file \ ++ support_copy_file_range \ ++ support_descriptor_supports_holes \ ++ support_descriptors \ ++diff --git a/support/support.h b/support/support.h ++index d0831e2ab7..ce38c2968d 100644 ++--- a/support/support.h +++++ b/support/support.h ++@@ -119,6 +119,11 @@ extern const char support_sbindir_prefix[]; ++ /* Corresponds to the install's sbin/ directory (without prefix). */ ++ extern const char support_install_rootsbindir[]; ++ +++/* Copies the file at the path FROM to TO. If TO does not exist, it +++ is created. If TO is a regular file, it is truncated before +++ copying. The file mode is copied, but the permissions are not. */ +++extern void support_copy_file (const char *from, const char *to); +++ ++ extern ssize_t support_copy_file_range (int, off64_t *, int, off64_t *, ++ size_t, unsigned int); ++ ++diff --git a/support/support_copy_file.c b/support/support_copy_file.c ++new file mode 100644 ++index 0000000000..c93e1e58c8 ++--- /dev/null +++++ b/support/support_copy_file.c ++@@ -0,0 +1,43 @@ +++/* Copy a file from one path to another. +++ Copyright (C) 2020 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 +++ . */ +++ +++#include +++#include +++#include +++#include +++ +++void +++support_copy_file (const char *from, const char *to) +++{ +++ struct stat64 st; +++ xstat (from, &st); +++ int fd_from = xopen (from, O_RDONLY, 0); +++ mode_t mode = st.st_mode & 0777; +++ int fd_to = xopen (to, O_WRONLY | O_TRUNC | O_CREAT, mode); +++ ssize_t ret = support_copy_file_range (fd_from, NULL, fd_to, NULL, +++ st.st_size, 0); +++ if (ret < 0) +++ FAIL_EXIT1 ("copying from \"%s\" to \"%s\": %m", from, to); +++ if (ret != st.st_size) +++ FAIL_EXIT1 ("copying from \"%s\" to \"%s\": only %zd of %llu bytes copied", +++ from, to, ret, (unsigned long long int) st.st_size); +++ if (fchmod (fd_to, mode) < 0) +++ FAIL_EXIT1 ("fchmod on %s to 0%o: %m", to, mode); +++ xclose (fd_to); +++ xclose (fd_from); +++} diff --cc debian/patches/any/local-CVE-2025-4802-3.diff index 000000000,000000000..c2db65f6c new file mode 100644 --- /dev/null +++ b/debian/patches/any/local-CVE-2025-4802-3.diff @@@ -1,0 -1,0 +1,79 @@@ ++From: Adhemerval Zanella ++Date: Mon, 6 Nov 2023 17:25:49 -0300 ++X-Dgit-Generated: 2.31-13+deb11u12 b88aa88380e523158a60404330511f6b1764a814 ++Subject: elf: Ignore LD_LIBRARY_PATH and debug env var for setuid for static ++ ++It mimics the ld.so behavior. ++ ++Checked on x86_64-linux-gnu. ++Reviewed-by: Siddhesh Poyarekar ++ ++(cherry picked from commit 5451fa962cd0a90a0e2ec1d8910a559ace02bba0) ++ ++--- ++ ++diff --git a/elf/dl-support.c b/elf/dl-support.c ++index 7704c101c5..f766c83144 100644 ++--- a/elf/dl-support.c +++++ b/elf/dl-support.c ++@@ -312,8 +312,6 @@ _dl_non_dynamic_init (void) ++ _dl_main_map.l_phdr = GL(dl_phdr); ++ _dl_main_map.l_phnum = GL(dl_phnum); ++ ++- _dl_verbose = *(getenv ("LD_WARN") ?: "") == '\0' ? 0 : 1; ++- ++ /* Set up the data structures for the system-supplied DSO early, ++ so they can influence _dl_init_paths. */ ++ setup_vdso (NULL, NULL); ++@@ -321,24 +319,6 @@ _dl_non_dynamic_init (void) ++ /* With vDSO setup we can initialize the function pointers. */ ++ setup_vdso_pointers (); ++ ++- /* Initialize the data structures for the search paths for shared ++- objects. */ ++- _dl_init_paths (getenv ("LD_LIBRARY_PATH")); ++- ++- /* Remember the last search directory added at startup. */ ++- _dl_init_all_dirs = GL(dl_all_dirs); ++- ++- _dl_lazy = *(getenv ("LD_BIND_NOW") ?: "") == '\0'; ++- ++- _dl_bind_not = *(getenv ("LD_BIND_NOT") ?: "") != '\0'; ++- ++- _dl_dynamic_weak = *(getenv ("LD_DYNAMIC_WEAK") ?: "") == '\0'; ++- ++- _dl_profile_output = getenv ("LD_PROFILE_OUTPUT"); ++- if (_dl_profile_output == NULL || _dl_profile_output[0] == '\0') ++- _dl_profile_output ++- = &"/var/tmp\0/var/profile"[__libc_enable_secure ? 9 : 0]; ++- ++ if (__libc_enable_secure) ++ { ++ static const char unsecure_envvars[] = ++@@ -361,6 +341,26 @@ _dl_non_dynamic_init (void) ++ #endif ++ } ++ +++ _dl_verbose = *(getenv ("LD_WARN") ?: "") == '\0' ? 0 : 1; +++ +++ /* Initialize the data structures for the search paths for shared +++ objects. */ +++ _dl_init_paths (getenv ("LD_LIBRARY_PATH")); +++ +++ /* Remember the last search directory added at startup. */ +++ _dl_init_all_dirs = GL(dl_all_dirs); +++ +++ _dl_lazy = *(getenv ("LD_BIND_NOW") ?: "") == '\0'; +++ +++ _dl_bind_not = *(getenv ("LD_BIND_NOT") ?: "") != '\0'; +++ +++ _dl_dynamic_weak = *(getenv ("LD_DYNAMIC_WEAK") ?: "") == '\0'; +++ +++ _dl_profile_output = getenv ("LD_PROFILE_OUTPUT"); +++ if (_dl_profile_output == NULL || _dl_profile_output[0] == '\0') +++ _dl_profile_output +++ = &"/var/tmp\0/var/profile"[__libc_enable_secure ? 9 : 0]; +++ ++ #ifdef DL_PLATFORM_INIT ++ DL_PLATFORM_INIT; ++ #endif diff --cc debian/patches/any/local-CVE-2025-4802-4.diff index 000000000,000000000..d36840f96 new file mode 100644 --- /dev/null +++ b/debian/patches/any/local-CVE-2025-4802-4.diff @@@ -1,0 -1,0 +1,159 @@@ ++From: Florian Weimer ++Date: Tue, 20 May 2025 19:36:02 +0200 ++X-Dgit-Generated: 2.31-13+deb11u12 cc5afe9a3287b4fee677f12dc59adc3e20e729d8 ++Subject: elf: Test case for bug 32976 (CVE-2025-4802) ++ ++Check that LD_LIBRARY_PATH is ignored for AT_SECURE statically ++linked binaries, using support_capture_subprogram_self_sgid. ++ ++Reviewed-by: Carlos O'Donell ++(cherry picked from commit d8f7a79335b0d861c12c42aec94c04cd5bb181e2) ++ ++--- ++ ++diff --git a/elf/Makefile b/elf/Makefile ++index eb66b270d6..227945fd1e 100644 ++--- a/elf/Makefile +++++ b/elf/Makefile ++@@ -152,7 +152,7 @@ $(inst_auditdir)/sotruss-lib.so: $(objpfx)sotruss-lib.so $(+force) ++ endif ++ ++ tests-static-normal := tst-leaks1-static tst-array1-static tst-array5-static \ ++- tst-dl-iter-static \ +++ tst-dl-iter-static tst-dlopen-sgid \ ++ tst-tlsalign-static tst-tlsalign-extern-static \ ++ tst-linkall-static tst-env-setuid tst-env-setuid-tunables ++ tests-static-internal := tst-tls1-static tst-tls2-static \ ++@@ -262,7 +262,7 @@ modules-names = testobj1 testobj2 testobj3 testobj4 testobj5 testobj6 \ ++ tst-alignmod tst-alignmod2 \ ++ $(modules-execstack-$(have-z-execstack)) \ ++ tst-dlopenrpathmod tst-deep1mod1 tst-deep1mod2 tst-deep1mod3 \ ++- tst-dlmopen1mod tst-auditmod1 \ +++ tst-dlmopen1mod tst-dlopen-sgid-mod tst-auditmod1 \ ++ unload3mod1 unload3mod2 unload3mod3 unload3mod4 \ ++ unload4mod1 unload4mod2 unload4mod3 unload4mod4 \ ++ unload6mod1 unload6mod2 unload6mod3 \ ++@@ -1724,3 +1724,6 @@ $(objpfx)tst-tls-ie-dlmopen.out: \ ++ $(objpfx)tst-tls-ie-mod4.so \ ++ $(objpfx)tst-tls-ie-mod5.so \ ++ $(objpfx)tst-tls-ie-mod6.so +++ +++$(objpfx)tst-dlopen-sgid: $(common-objpfx)dlfcn/libdl.a +++$(objpfx)tst-dlopen-sgid.out: $(objpfx)tst-dlopen-sgid-mod.so ++diff --git a/elf/tst-dlopen-sgid-mod.c b/elf/tst-dlopen-sgid-mod.c ++new file mode 100644 ++index 0000000000..5eb79eef48 ++--- /dev/null +++++ b/elf/tst-dlopen-sgid-mod.c ++@@ -0,0 +1 @@ +++/* Opening this object should not succeed. */ ++diff --git a/elf/tst-dlopen-sgid.c b/elf/tst-dlopen-sgid.c ++new file mode 100644 ++index 0000000000..f1a2bce990 ++--- /dev/null +++++ b/elf/tst-dlopen-sgid.c ++@@ -0,0 +1,104 @@ +++/* Test case for ignored LD_LIBRARY_PATH in static startug (bug 32976). +++ Copyright (C) 2025 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 +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++/* This is the name of our test object. Use a custom module for +++ testing, so that this object does not get picked up from the system +++ path. */ +++static const char dso_name[] = "tst-dlopen-sgid-mod.so"; +++ +++/* Used to mark the recursive invocation. */ +++static char magic_argument[] = "run-actual-test"; +++ +++static int +++do_test (void) +++{ +++/* Pathname of the directory that receives the shared objects this +++ test attempts to load. */ +++ char *libdir = support_create_temp_directory ("tst-dlopen-sgid-"); +++ +++ /* This is supposed to be ignored and stripped. */ +++ TEST_COMPARE (setenv ("LD_LIBRARY_PATH", libdir, 1), 0); +++ +++ /* Copy of libc.so.6. */ +++ { +++ char *from = xasprintf ("%s/%s", support_objdir_root, LIBC_SO); +++ char *to = xasprintf ("%s/%s", libdir, LIBC_SO); +++ add_temp_file (to); +++ support_copy_file (from, to); +++ free (to); +++ free (from); +++ } +++ +++ /* Copy of the test object. */ +++ { +++ char *from = xasprintf ("%s/elf/%s", support_objdir_root, dso_name); +++ char *to = xasprintf ("%s/%s", libdir, dso_name); +++ add_temp_file (to); +++ support_copy_file (from, to); +++ free (to); +++ free (from); +++ } +++ +++ TEST_COMPARE (support_capture_subprogram_self_sgid (magic_argument), 0); +++ +++ free (libdir); +++ +++ return 0; +++} +++ +++static void +++alternative_main (int argc, char **argv) +++{ +++ if (argc == 2 && strcmp (argv[1], magic_argument) == 0) +++ { +++ if (getgid () == getegid ()) +++ /* This can happen if the file system is mounted nosuid. */ +++ FAIL_UNSUPPORTED ("SGID failed: GID and EGID match (%jd)\n", +++ (intmax_t) getgid ()); +++ +++ /* Should be removed due to SGID. */ +++ TEST_COMPARE_STRING (getenv ("LD_LIBRARY_PATH"), NULL); +++ +++ TEST_VERIFY (dlopen (dso_name, RTLD_NOW) == NULL); +++ { +++ const char *message = dlerror (); +++ TEST_COMPARE_STRING (message, +++ "tst-dlopen-sgid-mod.so:" +++ " cannot open shared object file:" +++ " No such file or directory"); +++ } +++ +++ support_record_failure_barrier (); +++ exit (EXIT_SUCCESS); +++ } +++} +++ +++#define PREPARE alternative_main +++#include diff --cc debian/patches/any/local-asserth-decls.diff index 000000000,000000000..e4909d274 new file mode 100644 --- /dev/null +++ b/debian/patches/any/local-asserth-decls.diff @@@ -1,0 -1,0 +1,36 @@@ ++# DP: Description: /usr/include/assert.h ++# DP: One must be allowed to include 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 ++# 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 ++@@ -61,6 +61,8 @@ ++ ++ #else /* Not NDEBUG. */ ++ +++#ifndef _ASSERT_H_DECLS +++#define _ASSERT_H_DECLS ++ __BEGIN_DECLS ++ ++ /* This prints an "Assertion failed" message and aborts. */ ++@@ -81,6 +83,7 @@ ++ ++ ++ __END_DECLS +++#endif /* Not _ASSERT_H_DECLS */ ++ ++ /* When possible, define assert so that it does not add extra ++ parentheses around EXPR. Otherwise, those added parentheses would diff --cc debian/patches/any/local-bindresvport_blacklist.diff index 000000000,000000000..f2ded6d70 new file mode 100644 --- /dev/null +++ b/debian/patches/any/local-bindresvport_blacklist.diff @@@ -1,0 -1,0 +1,162 @@@ ++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,34 +29,114 @@ ++ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ */ ++ +++#include +++#include ++ #include +++#include ++ #include ++ #include ++ #include ++ #include ++ #include ++ #include ++ +++#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; +++} +++ ++ /* ++ * Locks the static variables in this file. ++ */ ++ __libc_lock_define_initialized (static, lock); ++ ++ /* ++ * 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) diff --cc debian/patches/any/local-bootstrap-headers.diff index 000000000,000000000..2d20170f9 new file mode 100644 --- /dev/null +++ b/debian/patches/any/local-bootstrap-headers.diff @@@ -1,0 -1,0 +1,83 @@@ ++Taken from EGLIBC, r1484 + r1525 ++ ++2018-03-09 Aurelien Jarno ++ ++ * Makefile (install-headers): Amend to install gnu/lib-names-$abi.h. ++ ++2014-07-30 Helmut Grohne ++ ++ * With the advent of multilib gnu/stubs.h became a meta-header that ++ includes the correct stubs-$abi.h. So install gnu/stubs.h as usual ++ and install stubs-bootstrap.h as gnu/stubs-$abi.h ++ ++2007-02-20 Jim Blandy ++ ++ * Makefile (install-headers): Preserve old behavior: depend on ++ $(inst_includedir)/gnu/stubs.h only if install-bootstrap-headers ++ is set; otherwise, place gnu/stubs.h on the 'install-others' list. ++ ++2007-02-16 Jim Blandy ++ ++ * Makefile: Amend make install-headers to install everything ++ necessary for building a cross-compiler. Install gnu/stubs.h as ++ part of 'install-headers', not 'install-others'. ++ If install-bootstrap-headers is 'yes', install a dummy copy of ++ gnu/stubs.h, instead of computing the real thing. ++ * include/stubs-bootstrap.h: New file. ++ ++ ++--- /dev/null +++++ b/include/stubs-bootstrap.h ++@@ -0,0 +1,12 @@ +++/* Placeholder stubs.h file for bootstrapping. +++ +++ When bootstrapping a GCC/GLIBC pair, GCC requires that the GLIBC +++ headers be installed, but we can't fully build GLIBC without that +++ GCC. So we run the command: +++ +++ make install-headers install-bootstrap-headers=yes +++ +++ to install the headers GCC needs, but avoid building certain +++ difficult headers. The header depends, via the +++ GLIBC subdir 'stubs' make targets, on every .o file in GLIBC, but +++ an empty stubs.h like this will do fine for GCC. */ ++--- a/Makefile +++++ b/Makefile ++@@ -177,6 +177,14 @@ ++ install-others-nosubdir: $(installed-stubs) ++ endif ++ +++# If we're bootstrapping, install a dummy gnu/stubs.h along with the +++# other headers, so 'make install-headers' produces a useable include +++# tree. Otherwise, install gnu/stubs.h later, after the rest of the +++# build is done. +++ifeq ($(install-bootstrap-headers),yes) +++install-headers: $(inst_includedir)/gnu/stubs.h $(installed-stubs) \ +++ $(inst_includedir)/$(lib-names-h-abi) +++endif ++ ++ # Since stubs.h is never needed when building the library, we simplify the ++ # hairy installation process by producing it in place only as the last part ++@@ -184,6 +192,14 @@ ++ # iterates over all the subdirs; subdir_install in each subdir depends on ++ # the subdir's stubs file. Having more direct dependencies would result in ++ # extra iterations over the list for subdirs and many recursive makes. +++ifeq ($(install-bootstrap-headers),yes) +++# gnu/stubs.h depends (via the subdir 'stubs' targets) on all the .o +++# files in GLIBC. For bootstrapping a GCC/GLIBC pair, an empty +++# gnu/stubs.h is good enough. +++$(installed-stubs): include/stubs-bootstrap.h $(+force) +++ $(make-target-directory) +++ $(INSTALL_DATA) $< $@ +++else ++ $(installed-stubs): include/stubs-prologue.h subdir_install ++ $(make-target-directory) ++ @rm -f $(objpfx)stubs.h ++@@ -192,6 +208,7 @@ ++ then echo 'stubs.h unchanged'; \ ++ else $(INSTALL_DATA) $(objpfx)stubs.h $@; fi ++ rm -f $(objpfx)stubs.h +++endif ++ ++ # This makes the Info or DVI file of the documentation from the Texinfo source. ++ .PHONY: info dvi pdf html diff --cc debian/patches/any/local-cudacc-float128.diff index 000000000,000000000..36b4454e0 new file mode 100644 --- /dev/null +++ b/debian/patches/any/local-cudacc-float128.diff @@@ -1,0 -1,0 +1,29 @@@ ++Description: Turn off HAVE_FLOAT128 for CUDACC and ICC compilers. ++Author: Adam Conrad ++Bug-Ubuntu: https://bugs.launchpad.net/bugs/1717257 ++Forwarded: no ++Last-Update: 2017-10-11 ++ ++--- glibc-2.26.orig/sysdeps/x86/bits/floatn.h +++++ glibc-2.26/sysdeps/x86/bits/floatn.h ++@@ -28,7 +28,8 @@ ++ support, for x86_64 and x86. */ ++ #if (defined __x86_64__ \ ++ ? __GNUC_PREREQ (4, 3) \ ++- : (defined __GNU__ ? __GNUC_PREREQ (4, 5) : __GNUC_PREREQ (4, 4))) +++ : (defined __GNU__ ? __GNUC_PREREQ (4, 5) : __GNUC_PREREQ (4, 4))) \ +++ && !defined(__CUDACC__) && !defined(__ICC) ++ # define __HAVE_FLOAT128 1 ++ #else ++ # define __HAVE_FLOAT128 0 ++--- glibc-2.26.orig/sysdeps/powerpc/bits/floatn.h +++++ glibc-2.26/sysdeps/powerpc/bits/floatn.h ++@@ -25,7 +25,7 @@ ++ floating-point type with the IEEE 754 binary128 format, and this glibc ++ includes corresponding *f128 interfaces for it. */ ++ #if defined _ARCH_PWR8 && defined __LITTLE_ENDIAN__ && (_CALL_ELF == 2) \ ++- && defined __FLOAT128__ && !defined __NO_LONG_DOUBLE_MATH +++ && defined __FLOAT128__ && !defined __NO_LONG_DOUBLE_MATH && !defined(__CUDACC__) && !defined(__ICC) ++ # define __HAVE_FLOAT128 1 ++ #else ++ # define __HAVE_FLOAT128 0 diff --cc debian/patches/any/local-disable-libnss-db.diff index 000000000,000000000..c69d05af6 new file mode 100644 --- /dev/null +++ b/debian/patches/any/local-disable-libnss-db.diff @@@ -1,0 -1,0 +1,18 @@@ ++Disable libnss-db as the format is not compatible with the libnss-db package, and is ++architecture dependent. ++ ++--- ++ nss/Makefile | 2 +- ++ 1 file changed, 1 insertion(+), 1 deletion(-) ++ ++--- a/nss/Makefile +++++ b/nss/Makefile ++@@ -61,7 +61,7 @@ ++ endif ++ ++ # Specify rules for the nss_* modules. We have some services. ++-services := files db compat +++services := files compat ++ ++ extra-libs = $(services:%=libnss_%) ++ # These libraries will be built in the `others' pass rather than diff --cc debian/patches/any/local-fhs-linux-paths.diff index 000000000,000000000..ae4581b2b new file mode 100644 --- /dev/null +++ b/debian/patches/any/local-fhs-linux-paths.diff @@@ -1,0 -1,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/" ++ diff --cc debian/patches/any/local-fhs-nscd.diff index 000000000,000000000..ad797103c new file mode 100644 --- /dev/null +++ b/debian/patches/any/local-fhs-nscd.diff @@@ -1,0 -1,0 +1,23 @@@ ++--- ++ nscd/nscd.h | 10 +++++----- ++ 1 file changed, 5 insertions(+), 5 deletions(-) ++ ++--- a/nscd/nscd.h +++++ b/nscd/nscd.h ++@@ -112,11 +112,11 @@ ++ ++ ++ /* 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_NETGROUP_DB "/var/db/nscd/netgroup" +++#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" +++#define _PATH_NSCD_NETGROUP_DB "/var/cache/nscd/netgroup" ++ ++ /* Path used when not using persistent storage. */ ++ #define _PATH_NSCD_XYZ_DB_TMP "/var/run/nscd/dbXXXXXX" diff --cc debian/patches/any/local-ld-multiarch.diff index 000000000,000000000..ecec48995 new file mode 100644 --- /dev/null +++ b/debian/patches/any/local-ld-multiarch.diff @@@ -1,0 -1,0 +1,50 @@@ ++2012-05-01 Aurelien Jarno ++ ++ * elf/Makefile(trusted-dirs.st): Fix DL_DST_LIB computation with ++ two level slibdir directories. ++ ++2009-09-08 Aurelien Jarno ++ ++ * Makeconfig: add support for multiarch compat directories. ++ ++--- ++ Makeconfig | 9 +++++++++ ++ elf/Makefile | 2 +- ++ 2 files changed, 10 insertions(+), 1 deletion(-) ++ ++--- a/Makeconfig +++++ b/Makeconfig ++@@ -136,6 +136,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. ++ ifndef slibdir ++ slibdir = $(exec_prefix)/lib ++@@ -589,6 +594,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 ++@@ -507,7 +507,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). diff --cc debian/patches/any/local-ldconfig-ignore-ld.so.diff index 000000000,000000000..5a200060d new file mode 100644 --- /dev/null +++ b/debian/patches/any/local-ldconfig-ignore-ld.so.diff @@@ -1,0 -1,0 +1,57 @@@ ++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,25 @@ 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-riscv64-lp64.so.1" +++ "ld-linux-riscv64-lp64d.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 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. */ diff --cc debian/patches/any/local-ldconfig-multiarch.diff index 000000000,000000000..261cbd7d7 new file mode 100644 --- /dev/null +++ b/debian/patches/any/local-ldconfig-multiarch.diff @@@ -1,0 -1,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 ++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 ++@@ -62,6 +62,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; ++@@ -1361,12 +1372,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; diff --cc debian/patches/any/local-ldso-disable-hwcap.diff index 000000000,000000000..e5e199f92 new file mode 100644 --- /dev/null +++ b/debian/patches/any/local-ldso-disable-hwcap.diff @@@ -1,0 -1,0 +1,138 @@@ ++# 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 ++# 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 | 8 ++++++++ ++ elf/dl-hwcaps.c | 26 +++++++++++++++++++++++--- ++ 2 files changed, 31 insertions(+), 3 deletions(-) ++ ++--- a/elf/dl-hwcaps.c +++++ b/elf/dl-hwcaps.c ++@@ -22,6 +22,9 @@ ++ #include ++ #include ++ #include +++#include +++#include +++#include ++ ++ #include ++ #include ++@@ -43,6 +46,7 @@ ++ size_t cnt = platform != NULL; ++ size_t n, m; ++ size_t total; +++ struct r_strlenpair *temp; ++ struct r_strlenpair *result; ++ struct r_strlenpair *rp; ++ char *cp; ++@@ -124,8 +128,24 @@ ++ /* For TLS enabled builds always add 'tls'. */ ++ ++cnt; ++ +++#ifdef NEED_LD_SO_NOHWCAP +++ if (__access_noerrno ("/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; +++ } +++#endif +++ ++ /* Create temporary data structure to generate result table. */ ++- struct r_strlenpair temp[cnt]; +++ temp = (struct r_strlenpair *) alloca (cnt * sizeof (*temp)); ++ m = 0; ++ #ifdef NEED_DL_SYSINFO_DSO ++ if (dsocaps != NULL) ++@@ -210,8 +230,13 @@ ++ *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")); +++ { +++#ifdef NEED_LD_SO_NOHWCAP +++ no_memory: +++#endif +++ _dl_signal_error (ENOMEM, NULL, NULL, +++ N_("cannot create capability list")); +++ } ++ ++ if (cnt == 1) ++ { ++--- a/elf/dl-cache.c +++++ b/elf/dl-cache.c ++@@ -25,6 +25,9 @@ ++ #include ++ #include <_itoa.h> ++ #include +++#include +++#include +++#include ++ ++ #ifndef _DL_PLATFORMS_COUNT ++ # define _DL_PLATFORMS_COUNT 0 ++@@ -246,6 +249,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; ++@@ -259,6 +263,11 @@ ++ ++ uint64_t hwcap_mask = GET_HWCAP_MASK(); ++ +++#ifdef NEED_LD_SO_NOHWCAP +++ if (__access_noerrno ("/etc/ld.so.nohwcap", F_OK) == 0) +++ disable_hwcap = 1; +++#endif +++ ++ #define _DL_HWCAP_TLS_MASK (1LL << 63) ++ uint64_t hwcap_exclude = ~((GLRO(dl_hwcap) & hwcap_mask) ++ | _DL_HWCAP_PLATFORM | _DL_HWCAP_TLS_MASK); ++@@ -269,6 +278,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) \ ++--- a/sysdeps/alpha/ldsodefs.h +++++ b/sysdeps/alpha/ldsodefs.h ++@@ -37,6 +37,8 @@ struct La_alpha_retval; ++ struct La_alpha_retval *, \ ++ const char *); ++ +++#define NEED_LD_SO_NOHWCAP +++ ++ #include_next ++ ++ #endif ++--- a/sysdeps/i386/ldsodefs.h +++++ b/sysdeps/i386/ldsodefs.h ++@@ -0,0 +1,7 @@ +++#ifndef __LDSODEFS_H +++ +++#define NEED_LD_SO_NOHWCAP +++ +++#include_next +++ +++#endif diff --cc debian/patches/any/local-nss-overflow.diff index 000000000,000000000..d47fe1ac0 new file mode 100644 --- /dev/null +++ b/debian/patches/any/local-nss-overflow.diff @@@ -1,0 -1,0 +1,51 @@@ ++2009-01-12 Arthur Loiret ++ ++ nss/nss_files/files-parse.c: Include . ++ (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 ++@@ -20,6 +20,7 @@ ++ #include ++ #include ++ #include +++#include ++ ++ /* These symbols are defined by the including source file: ++ ++@@ -159,7 +160,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)) \ ++@@ -174,10 +180,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)) \ diff --cc debian/patches/any/local-nss-upgrade.diff index 000000000,000000000..a9af8979c new file mode 100644 --- /dev/null +++ b/debian/patches/any/local-nss-upgrade.diff @@@ -1,0 -1,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 ++@@ -395,9 +395,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); +++ } ++ } ++ # ifdef USE_NSCD ++ else if (is_nscd) diff --cc debian/patches/any/local-qsort-memory-corruption.patch index 000000000,000000000..f90073092 new file mode 100644 --- /dev/null +++ b/debian/patches/any/local-qsort-memory-corruption.patch @@@ -1,0 -1,0 +1,13 @@@ ++diff -rup a/stdlib/qsort.c b/stdlib/qsort.c ++--- a/stdlib/qsort.c 2023-07-31 10:54:16.000000000 -0700 +++++ b/stdlib/qsort.c 2024-01-15 09:08:25.596167959 -0800 ++@@ -224,7 +224,8 @@ _quicksort (void *const pbase, size_t to ++ while ((run_ptr += size) <= end_ptr) ++ { ++ tmp_ptr = run_ptr - size; ++- while ((*cmp) ((void *) run_ptr, (void *) tmp_ptr, arg) < 0) +++ while (tmp_ptr != base_ptr +++ && (*cmp) ((void *) run_ptr, (void *) tmp_ptr, arg) < 0) ++ tmp_ptr -= size; ++ ++ tmp_ptr += size; diff --cc debian/patches/any/local-revert-bz13979.diff index 000000000,000000000..71df364fa new file mode 100644 --- /dev/null +++ b/debian/patches/any/local-revert-bz13979.diff @@@ -1,0 -1,0 +1,46 @@@ ++Revert: ++ ++From: Roland Mc Grath ++Date: Tue, 8 May 2012 17:44:57 +0000 (+0200) ++Subject: Warn if user requests __FORTIFY_SOURCE but it is disabled ++X-Git-Tag: glibc-2.16-tps~448 ++X-Git-Url: http://sourceware.org/git/?p=glibc.git;a=commitdiff_plain;h=05c2c9618f583ea4acd69b3fe5ae2a2922dd2ddc ++ ++Warn if user requests __FORTIFY_SOURCE but it is disabled ++ ++[BZ #13979] ++ * include/features.h: Warn if user requests __FORTIFY_SOURCE ++ checking but the checks are disabled for any reason. ++--- ++ ++2012-05-08 Roland Mc Grath ++ ++ [BZ #13979] ++ * include/features.h: Warn if user requests __FORTIFY_SOURCE ++ checking but the checks are disabled for any reason. ++ ++--- a/include/features.h +++++ b/include/features.h ++@@ -368,18 +368,14 @@ ++ # define __USE_GNU 1 ++ #endif ++ ++-#if defined _FORTIFY_SOURCE && _FORTIFY_SOURCE > 0 ++-# if !defined __OPTIMIZE__ || __OPTIMIZE__ <= 0 ++-# warning _FORTIFY_SOURCE requires compiling with optimization (-O) ++-# elif !__GNUC_PREREQ (4, 1) ++-# warning _FORTIFY_SOURCE requires GCC 4.1 or later ++-# elif _FORTIFY_SOURCE > 1 +++#if defined _FORTIFY_SOURCE && _FORTIFY_SOURCE > 0 \ +++ && __GNUC_PREREQ (4, 1) && defined __OPTIMIZE__ && __OPTIMIZE__ > 0 +++# if _FORTIFY_SOURCE > 1 ++ # define __USE_FORTIFY_LEVEL 2 ++ # else ++ # define __USE_FORTIFY_LEVEL 1 ++ # endif ++-#endif ++-#ifndef __USE_FORTIFY_LEVEL +++#else ++ # define __USE_FORTIFY_LEVEL 0 ++ #endif ++ diff --cc debian/patches/any/local-stubs_h.diff index 000000000,000000000..86ad59254 new file mode 100644 --- /dev/null +++ b/debian/patches/any/local-stubs_h.diff @@@ -1,0 -1,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. diff --cc debian/patches/any/local-tcsetaddr.diff index 000000000,000000000..0091dcb97 new file mode 100644 --- /dev/null +++ b/debian/patches/any/local-tcsetaddr.diff @@@ -1,0 -1,0 +1,84 @@@ ++# 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 ++# 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 ++@@ -44,7 +44,12 @@ ++ __tcsetattr (int fd, int optional_actions, 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) ++ { ++@@ -75,7 +80,55 @@ ++ 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; ++ } ++ weak_alias (__tcsetattr, tcsetattr) ++ libc_hidden_def (tcsetattr) diff --cc debian/patches/any/local-test-install.diff index 000000000,000000000..dbb0e6e35 new file mode 100644 --- /dev/null +++ b/debian/patches/any/local-test-install.diff @@@ -1,0 -1,0 +1,16 @@@ ++Description: Use install_root for test destination override, not DESTDIR ++Author: Adam Conrad ++Forwarded: no ++Last-Update: 2020-02-08 ++ ++--- glibc-2.30.orig/Makefile +++++ glibc-2.30/Makefile ++@@ -618,7 +618,7 @@ endif ++ # Setting INSTALL_UNCOMPRESSED causes localedata/Makefile to ++ # install the charmaps uncompressed, as the testroot does not ++ # provide a gunzip program. ++- $(MAKE) install DESTDIR=$(objpfx)testroot.pristine \ +++ $(MAKE) install install_root=$(objpfx)testroot.pristine \ ++ INSTALL_UNCOMPRESSED=yes subdirs='$(sorted-subdirs)' ++ rm -f $(symbolic-link-list) ++ touch $(objpfx)testroot.pristine/install.stamp diff --cc debian/patches/any/submitted-bits-fcntl_h-at.diff index 000000000,000000000..d09ad971d new file mode 100644 --- /dev/null +++ b/debian/patches/any/submitted-bits-fcntl_h-at.diff @@@ -1,0 -1,0 +1,133 @@@ ++2012-10-08 Wookey ++ ++ * include AT_* defines in sysdeps/unix/sysv/linux/aarch64/bits/fcntl.h ++ ++2009-11-19 Aurelien Jarno ++ ++ * io/fcntl.h: Move AT_* defines to... ++ * sysdeps/mach/hurd/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/bits/fcntl.h: ...here. ++ ++2009-11-19 Aurelien Jarno ++ ++ * sysdeps/unix/sysv/linux/alpha/bits/fcntl.h: Define AT_* ++ constants. ++ * sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Define AT_* ++ constants. ++ * sysdeps/unix/sysv/linux/hppa/bits/fcntl.h: Define AT_* ++ constants. ++ * sysdeps/unix/sysv/linux/ia64/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 | 28 ---------------------------- ++ sysdeps/mach/hurd/bits/fcntl.h | 23 +++++++++++++++++++++++ ++ sysdeps/unix/sysv/linux/bits/fcntl-linux.h | 23 +++++++++++++++++++++++ ++ 3 files changed, 46 insertions(+), 28 deletions(-) ++ ++--- a/io/fcntl.h +++++ b/io/fcntl.h ++@@ -139,34 +139,6 @@ ++ # define SEEK_END 2 /* Seek from end of file. */ ++ #endif /* XPG */ ++ ++-/* The constants AT_REMOVEDIR and AT_EACCESS have the same value. AT_EACCESS ++- is meaningful only to faccessat, while AT_REMOVEDIR is meaningful only to ++- unlinkat. The two functions do completely different things and therefore, ++- the flags can be allowed to overlap. For example, passing AT_REMOVEDIR to ++- faccessat would be undefined behavior and thus treating it equivalent to ++- AT_EACCESS is valid undefined behavior. */ ++-#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. */ ++-# ifdef __USE_GNU ++-# define AT_NO_AUTOMOUNT 0x800 /* Suppress terminal automount ++- traversal. */ ++-# define AT_EMPTY_PATH 0x1000 /* Allow empty relative pathname. */ ++-# define AT_STATX_SYNC_TYPE 0x6000 ++-# define AT_STATX_SYNC_AS_STAT 0x0000 ++-# define AT_STATX_FORCE_SYNC 0x2000 ++-# define AT_STATX_DONT_SYNC 0x4000 ++-# define AT_RECURSIVE 0x8000 /* Apply to the entire subtree. */ ++-# endif ++-# 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 ++@@ -228,3 +228,26 @@ ++ # 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. */ +++# ifdef __USE_GNU +++# define AT_NO_AUTOMOUNT 0x800 /* Suppress terminal automount +++ traversal. */ +++# define AT_EMPTY_PATH 0x1000 /* Allow empty relative pathname. */ +++# define AT_STATX_SYNC_TYPE 0x6000 +++# define AT_STATX_SYNC_AS_STAT 0x0000 +++# define AT_STATX_FORCE_SYNC 0x2000 +++# define AT_STATX_DONT_SYNC 0x4000 +++# define AT_RECURSIVE 0x8000 /* Apply to the entire subtree. */ +++# endif +++# define AT_EACCESS 0x200 /* Test access permitted for +++ effective IDs, not real IDs. */ +++#endif ++--- a/sysdeps/unix/sysv/linux/bits/fcntl-linux.h +++++ b/sysdeps/unix/sysv/linux/bits/fcntl-linux.h ++@@ -366,6 +366,29 @@ ++ # define MAX_HANDLE_SZ 128 ++ #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. */ +++# ifdef __USE_GNU +++# define AT_NO_AUTOMOUNT 0x800 /* Suppress terminal automount +++ traversal. */ +++# define AT_EMPTY_PATH 0x1000 /* Allow empty relative pathname. */ +++# define AT_STATX_SYNC_TYPE 0x6000 +++# define AT_STATX_SYNC_AS_STAT 0x0000 +++# define AT_STATX_FORCE_SYNC 0x2000 +++# define AT_STATX_DONT_SYNC 0x4000 +++# define AT_RECURSIVE 0x8000 /* Apply to the entire subtree. */ +++# endif +++# define AT_EACCESS 0x200 /* Test access permitted for +++ effective IDs, not real IDs. */ +++#endif +++ ++ __BEGIN_DECLS ++ ++ #ifdef __USE_GNU diff --cc debian/patches/any/submitted-ld.so-cache-new-format.diff index 000000000,000000000..9b96b2818 new file mode 100644 --- /dev/null +++ b/debian/patches/any/submitted-ld.so-cache-new-format.diff @@@ -1,0 -1,0 +1,59 @@@ ++2018-09-16 Josh Triplett ++ ++ * elf/ldconfig.c: Default to the new format for ld.so.cache. glibc has ++ supported this format for 18+ years. ++ * elf/dl-cache.c (_dl_load_cache_lookup): Reorder conditionals to look ++ for the new format first. ++ ++--- a/elf/dl-cache.c +++++ b/elf/dl-cache.c ++@@ -203,7 +203,14 @@ _dl_load_cache_lookup (const char *name) ++ - the old format with the new format in it ++ - only the new format ++ The following checks if the cache contains any of these formats. */ ++- if (file != MAP_FAILED && cachesize > sizeof *cache +++ if (file != MAP_FAILED && cachesize > sizeof *cache_new +++ && memcmp (file, CACHEMAGIC_VERSION_NEW, +++ sizeof CACHEMAGIC_VERSION_NEW - 1) == 0) +++ { +++ cache_new = file; +++ cache = file; +++ } +++ else if (file != MAP_FAILED && cachesize > sizeof *cache ++ && memcmp (file, CACHEMAGIC, sizeof CACHEMAGIC - 1) == 0 ++ /* Check for corruption, avoiding overflow. */ ++ && ((cachesize - sizeof *cache) / sizeof (struct file_entry) ++@@ -223,13 +230,6 @@ _dl_load_cache_lookup (const char *name) ++ sizeof CACHEMAGIC_VERSION_NEW - 1) != 0) ++ cache_new = (void *) -1; ++ } ++- else if (file != MAP_FAILED && cachesize > sizeof *cache_new ++- && memcmp (file, CACHEMAGIC_VERSION_NEW, ++- sizeof CACHEMAGIC_VERSION_NEW - 1) == 0) ++- { ++- cache_new = file; ++- cache = file; ++- } ++ else ++ { ++ if (file != MAP_FAILED) ++--- a/elf/ldconfig.c +++++ b/elf/ldconfig.c ++@@ -95,7 +95,7 @@ int opt_verbose; ++ ++ /* Format to support. */ ++ /* 0: only libc5/glibc2; 1: both; 2: only glibc 2.2. */ ++-int opt_format = 1; +++int opt_format = 2; ++ ++ /* Build cache. */ ++ static int opt_build_cache = 1; ++@@ -148,7 +148,7 @@ static const struct argp_option options[] = ++ { NULL, 'f', N_("CONF"), 0, N_("Use CONF as configuration file"), 0}, ++ { NULL, 'n', NULL, 0, N_("Only process directories specified on the command line. Don't build cache."), 0}, ++ { NULL, 'l', NULL, 0, N_("Manually link individual libraries."), 0}, ++- { "format", 'c', N_("FORMAT"), 0, N_("Format to use: new, old or compat (default)"), 0}, +++ { "format", 'c', N_("FORMAT"), 0, N_("Format to use: new (default), old, or compat"), 0}, ++ { "ignore-aux-cache", 'i', NULL, 0, N_("Ignore auxiliary cache file"), 0}, ++ { NULL, 0, NULL, 0, NULL, 0 } ++ }; diff --cc debian/patches/any/submitted-missing-etc-hosts.diff index 000000000,000000000..590a869ef new file mode 100644 --- /dev/null +++ b/debian/patches/any/submitted-missing-etc-hosts.diff @@@ -1,0 -1,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 ++@@ -479,7 +479,7 @@ ++ else ++ { ++ *errnop = errno; ++- *herrnop = NO_DATA; +++ *herrnop = HOST_NOT_FOUND; ++ } ++ ++ return status; diff --cc debian/patches/any/submitted-nptl-invalid-td.patch index 000000000,000000000..00695114e new file mode 100644 --- /dev/null +++ b/debian/patches/any/submitted-nptl-invalid-td.patch @@@ -1,0 -1,0 +1,22 @@@ ++2010-02-27 Aurelien Jarno ++ ++ * 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 ++@@ -206,8 +206,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 ++ ++ diff --cc debian/patches/any/submitted-resolv-unaligned.diff index 000000000,000000000..e974c6bbc new file mode 100644 --- /dev/null +++ b/debian/patches/any/submitted-resolv-unaligned.diff @@@ -1,0 -1,0 +1,97 @@@ ++diff --git a/resolv/res_mkquery.c b/resolv/res_mkquery.c ++index d80b5318e5..99d7d96027 100644 ++--- a/resolv/res_mkquery.c +++++ b/resolv/res_mkquery.c ++@@ -83,6 +83,15 @@ ++ #include ++ #include ++ +++/* The structure HEADER is normally aligned to a word boundary and its +++ fields are accessed using word loads and stores. We need to access +++ this structure when it is aligned on a byte boundary. This can cause +++ problems on machines with strict alignment. So, we create a new +++ typedef to reduce its alignment to one. This ensures the fields are +++ accessed with byte loads and stores. */ +++typedef HEADER __attribute__ ((__aligned__(1))) UHEADER; +++#define HEADER UHEADER +++ ++ int ++ __res_context_mkquery (struct resolv_context *ctx, int op, const char *dname, ++ int class, int type, const unsigned char *data, ++diff --git a/resolv/res_query.c b/resolv/res_query.c ++index 07dc6f6583..f26338bc9b 100644 ++--- a/resolv/res_query.c +++++ b/resolv/res_query.c ++@@ -81,6 +81,14 @@ ++ #include ++ #include ++ +++/* The structure HEADER is normally aligned to a word boundary and its +++ fields are accessed using word loads and stores. We need to access +++ this structure when it is aligned on a byte boundary. This can cause +++ problems on machines with strict alignment. So, we create a new +++ typedef to reduce its alignment to one. This ensures the fields are +++ accessed with byte loads and stores. */ +++typedef HEADER __attribute__ ((__aligned__(1))) UHEADER; +++ ++ #if PACKETSZ > 65536 ++ #define MAXPACKET PACKETSZ ++ #else ++@@ -117,8 +125,8 @@ __libc_res_nquery(res_state statp, ++ int *nanswerp2, int *resplen2, int *answerp2_malloced) ++ { ++ struct __res_state *statp = ctx->resp; ++- HEADER *hp = (HEADER *) answer; ++- HEADER *hp2; +++ UHEADER *hp = (UHEADER *) answer; +++ UHEADER *hp2; ++ int n, use_malloc = 0; ++ ++ size_t bufsize = (type == T_QUERY_A_AND_AAAA ? 2 : 1) * QUERYSIZE; ++@@ -235,7 +243,7 @@ __libc_res_nquery(res_state statp, ++ ++ if (answerp != NULL) ++ /* __res_context_send might have reallocated the buffer. */ ++- hp = (HEADER *) *answerp; +++ hp = (UHEADER *) *answerp; ++ ++ /* We simplify the following tests by assigning HP to HP2 or ++ vice versa. It is easy to verify that this is the same as ++@@ -246,7 +254,7 @@ __libc_res_nquery(res_state statp, ++ } ++ else ++ { ++- hp2 = (HEADER *) *answerp2; +++ hp2 = (UHEADER *) *answerp2; ++ if (n < (int) sizeof (HEADER)) ++ { ++ hp = hp2; ++@@ -336,7 +344,7 @@ __libc_res_nsearch(res_state statp, ++ { ++ struct __res_state *statp = ctx->resp; ++ const char *cp; ++- HEADER *hp = (HEADER *) answer; +++ UHEADER *hp = (UHEADER *) answer; ++ char tmp[NS_MAXDNAME]; ++ u_int dots; ++ int trailing_dot, ret, saved_herrno; ++diff --git a/resolv/res_send.c b/resolv/res_send.c ++index 93db5b9a61..36a389509d 100644 ++--- a/resolv/res_send.c +++++ b/resolv/res_send.c ++@@ -110,6 +110,15 @@ ++ #include ++ #include ++ +++/* The structure HEADER is normally aligned to a word boundary and its +++ fields are accessed using word loads and stores. We need to access +++ this structure when it is aligned on a byte boundary. This can cause +++ problems on machines with strict alignment. So, we create a new +++ typedef to reduce its alignment to one. This ensures the fields are +++ accessed with byte loads and stores. */ +++typedef HEADER __attribute__ ((__aligned__(1))) UHEADER; +++#define HEADER UHEADER +++ ++ #if PACKETSZ > 65536 ++ #define MAXPACKET PACKETSZ ++ #else diff --cc debian/patches/any/unsubmitted-ldso-machine-mismatch.diff index 000000000,000000000..fc063a57d new file mode 100644 --- /dev/null +++ b/debian/patches/any/unsubmitted-ldso-machine-mismatch.diff @@@ -1,0 -1,0 +1,15 @@@ ++--- glibc/elf/dl-load.c 2013-01-23 20:55:08.648614327 -0700 +++++ glibc/elf/dl-load.c 2013-01-23 20:55:52.852612764 -0700 ++@@ -2008,6 +2008,12 @@ ++ goto close_and_out; ++ } ++ #endif +++ else if (! __builtin_expect (elf_machine_matches_host (ehdr), 1)) +++ { +++ /* Another non-fatal error, let's skip right past the +++ the libraries obviously built for other machines. */ +++ goto close_and_out; +++ } ++ else if (ehdr->e_ident[EI_DATA] != byteorder) ++ { ++ if (BYTE_ORDER == BIG_ENDIAN) diff --cc debian/patches/arm/local-arm-futex.diff index 000000000,000000000..7a0c80f98 new file mode 100644 --- /dev/null +++ b/debian/patches/arm/local-arm-futex.diff @@@ -1,0 -1,0 +1,23 @@@ ++Description: Lie about futex_atomic_cmpxchg_inatomic kernel support. ++ In past versions of glibc, we incorrectly assumed all ARM kernels ++ in all configurations supported futex_atomic_cmpxchg_inatomic. This ++ was clearly a lie, however it was a lie that we relied on, because ++ the fallback implementation appears to not play nicely with certain ++ applications like pulseaudio. Restore the lie for kernels > 2.6.32 ++ and plug our ears and scream "LA LA LA" about how wrong this is. ++Author: Adam Conrad ++Bug-Ubuntu: https://launchpad.net/bugs/1436162 ++Bug-Debian: https://bugs.debian.org/788799 ++Last-Update: 2015-03-25 ++ ++--- glibc-2.21.orig/sysdeps/unix/sysv/linux/arm/kernel-features.h +++++ glibc-2.21/sysdeps/unix/sysv/linux/arm/kernel-features.h ++@@ -37,7 +37,7 @@ ++ /* The ARM kernel before 3.14.3 may or may not support ++ futex_atomic_cmpxchg_inatomic, depending on kernel ++ configuration. */ ++-#if __LINUX_KERNEL_VERSION < 0x030E03 +++#if __LINUX_KERNEL_VERSION < 0x020620 ++ # undef __ASSUME_SET_ROBUST_LIST ++ #endif ++ diff --cc debian/patches/arm/local-sigaction.diff index 000000000,000000000..5211af3a5 new file mode 100644 --- /dev/null +++ b/debian/patches/arm/local-sigaction.diff @@@ -1,0 -1,0 +1,26 @@@ ++--- ++ sysdeps/unix/sysv/linux/arm/sigaction.c | 13 ++++--------- ++ 1 file changed, 4 insertions(+), 9 deletions(-) ++ ++--- a/sysdeps/unix/sysv/linux/arm/sigaction.c +++++ b/sysdeps/unix/sysv/linux/arm/sigaction.c ++@@ -22,15 +22,10 @@ extern void __default_rt_sa_restorer (void); ++ ++ #define SET_SA_RESTORER(kact, act) \ ++ ({ \ ++- if ((kact)->sa_flags & SA_RESTORER) \ ++- (kact)->sa_restorer = (act)->sa_restorer; \ ++- else \ ++- { \ ++- (kact)->sa_restorer = ((kact)->sa_flags & SA_SIGINFO) \ ++- ? __default_rt_sa_restorer \ ++- : __default_sa_restorer; \ ++- (kact)->sa_flags |= SA_RESTORER; \ ++- } \ +++ (kact)->sa_restorer = ((kact)->sa_flags & SA_SIGINFO) \ +++ ? __default_rt_sa_restorer \ +++ : __default_sa_restorer; \ +++ (kact)->sa_flags |= SA_RESTORER; \ ++ }) ++ ++ #define RESET_SA_RESTORER(act, kact) \ diff --cc debian/patches/arm/local-soname-hack.diff index 000000000,000000000..f2c376d22 new file mode 100644 --- /dev/null +++ b/debian/patches/arm/local-soname-hack.diff @@@ -1,0 -1,0 +1,25 @@@ ++For backward compatibility with armhf binaries built with the ++old linker SONAME, we need to fake out the linker to believe ++the new is the old, until such a point as everything is rebuilt ++ ++--- ++ elf/dl-load.c | 5 ++++- ++ 1 file changed, 4 insertions(+), 1 deletion(-) ++ ++--- a/elf/dl-load.c +++++ b/elf/dl-load.c ++@@ -2303,10 +2303,13 @@ ++ soname = ((const char *) D_PTR (l, l_info[DT_STRTAB]) ++ + l->l_info[DT_SONAME]->d_un.d_val); ++ if (strcmp (name, soname) != 0) +++#ifdef __arm__ +++ if (strcmp(name, "ld-linux.so.3") || strcmp(soname, "ld-linux-armhf.so.3")) +++#endif ++ continue; ++ ++ /* We have a match on a new name -- cache it. */ ++- add_name_to_object (l, soname); +++ add_name_to_object (l, name); ++ l->l_soname_added = 1; ++ } ++ diff --cc debian/patches/arm/local-vfp-sysdeps.diff index 000000000,000000000..fb70a187b new file mode 100644 --- /dev/null +++ b/debian/patches/arm/local-vfp-sysdeps.diff @@@ -1,0 -1,0 +1,23 @@@ ++Description: Work around broken compilers (like fpc) on armhf ++ patches/arm/local-vfp-sysdeps.diff: Force the Tag_ABI_HardFP_use ++ and Tag_ABI_VFP_args EABI tags when building for armhf, so compilers ++ only linking crti.o will generate what appear to be armhf binaries. ++Author: Adam Conrad ++Forwarded: no ++ ++--- eglibc-2.16.orig/sysdeps/arm/sysdep.h +++++ eglibc-2.16/sysdeps/arm/sysdep.h ++@@ -117,6 +117,13 @@ ++ the caller. */ ++ .eabi_attribute 24, 1 ++ +++#ifdef __ARM_PCS_VFP +++/* Tag_ABI_HardFP_use: This code uses hard floating point */ +++ .eabi_attribute 27, 3 +++/* Tag_ABI_VFP_args: This code stores FP arguments in VFP registers */ +++ .eabi_attribute 28, 1 +++#endif /* __ARM_PCS_VFP */ +++ ++ /* The thumb2 encoding is reasonably complete. Unless suppressed, use it. */ ++ .syntax unified ++ # if defined(__thumb2__) && !defined(NO_THUMB) diff --cc debian/patches/arm/unsubmitted-ldconfig-cache-abi.diff index 000000000,000000000..0a3f06a52 new file mode 100644 --- /dev/null +++ b/debian/patches/arm/unsubmitted-ldconfig-cache-abi.diff @@@ -1,0 -1,0 +1,145 @@@ ++diff --git a/sysdeps/unix/sysv/linux/arm/readelflib.c b/sysdeps/unix/sysv/linux/arm/readelflib.c ++index e767f9e..37483fc 100644 ++--- a/sysdeps/unix/sysv/linux/arm/readelflib.c +++++ b/sysdeps/unix/sysv/linux/arm/readelflib.c ++@@ -25,6 +25,131 @@ int process_elf64_file (const char *file_name, const char *lib, int *flag, ++ unsigned int *osversion, char **soname, ++ void *file_contents, size_t file_length); ++ +++/* Read an unsigned leb128 value from P, store the value in VAL, return +++ P incremented past the value. We assume that a word is large enough to +++ hold any value so encoded; if it is smaller than a pointer on some target, +++ pointers should not be leb128 encoded on that target. */ +++static unsigned char * +++read_uleb128 (unsigned char *p, unsigned long *val) +++{ +++ unsigned int shift = 0; +++ unsigned char byte; +++ unsigned long result; +++ +++ result = 0; +++ do +++ { +++ byte = *p++; +++ result |= (byte & 0x7f) << shift; +++ shift += 7; +++ } +++ while (byte & 0x80); +++ +++ *val = result; +++ return p; +++} +++ +++#define ATTR_TAG_FILE 1 +++#define ABI_VFP_args 28 +++#define VFP_ARGS_IN_VFP_REGS 1 +++ +++/* Check the ABI in the ARM attributes. Search through the section +++ headers looking for the ARM attributes section, then check the +++ VFP_ARGS attribute. */ +++static int is_library_hf(const char *file_name, void *file_contents, size_t file_length) +++{ +++ unsigned int i; +++ Elf32_Ehdr *ehdr = (Elf32_Ehdr *) file_contents; +++ Elf32_Shdr *shdrs; +++ +++ shdrs = file_contents + ehdr->e_shoff; +++ for (i = 0; i < ehdr->e_shnum; i++) +++ { +++ if (SHT_ARM_ATTRIBUTES == shdrs[i].sh_type) +++ { +++ /* We've found a likely section. Load the contents and +++ * check the tags */ +++ unsigned char *p = (unsigned char *)file_contents + shdrs[i].sh_offset; +++ unsigned char * end; +++ +++ /* Sanity-check the attribute section details. Make sure +++ * that it's the "aeabi" section, that's all we care +++ * about. */ +++ if (*p == 'A') +++ { +++ unsigned long len = shdrs[i].sh_size - 1; +++ unsigned long namelen; +++ p++; +++ +++ while (len > 0) +++ { +++ unsigned long section_len = p[0] | p[1] << 8 | p[2] << 16 | p[3] << 24; +++ if (section_len > len) +++ section_len = len; +++ +++ p += 4; +++ len -= section_len; +++ section_len -= 4; +++ +++ if (0 != strcmp((char *)p, "aeabi")) +++ { +++ p += section_len; +++ continue; +++ } +++ namelen = strlen((char *)p) + 1; +++ p += namelen; +++ section_len -= namelen; +++ +++ /* We're in a valid section. Walk through this +++ * section looking for the tag we care about +++ * (ABI_VFP_args) */ +++ while (section_len > 0) +++ { +++ unsigned long val = 0; +++ unsigned long tag; +++ unsigned long size; +++ +++ end = p; +++ tag = (*p++); +++ +++ size = p[0] | p[1] << 8 | p[2] << 16 | p[3] << 24; +++ if (size > section_len) +++ size = section_len; +++ p += 4; +++ +++ section_len -= size; +++ end += size; +++ if (ATTR_TAG_FILE != tag) +++ { +++ /* ignore, we don't care */ +++ p = end; +++ continue; +++ } +++ while (p < end) +++ { +++ p = read_uleb128 (p, &tag); +++ /* Handle the different types of tag. */ +++ if ( (tag == 4) || (tag == 5) || (tag == 67) ) +++ { +++ /* Special cases for string values */ +++ namelen = strlen((char *)p) + 1; +++ p += namelen; +++ } +++ else +++ { +++ p = read_uleb128 (p, &val); +++ } +++ if ( (tag == ABI_VFP_args) && (val == VFP_ARGS_IN_VFP_REGS) ) +++ return 1; +++ } +++ } +++ } +++ } +++ } +++ } +++ return 0; +++} +++ ++ /* Returns 0 if everything is ok, != 0 in case of error. */ ++ int ++ process_elf_file (const char *file_name, const char *lib, int *flag, ++@@ -47,6 +171,8 @@ process_elf_file (const char *file_name, const char *lib, int *flag, ++ *flag = FLAG_ARM_LIBHF|FLAG_ELF_LIBC6; ++ else if (elf32_header->e_flags & EF_ARM_ABI_FLOAT_SOFT) ++ *flag = FLAG_ARM_LIBSF|FLAG_ELF_LIBC6; +++ else if (is_library_hf(file_name, file_contents, file_length)) +++ *flag = FLAG_ARM_LIBHF|FLAG_ELF_LIBC6; ++ else ++ /* We must assume the unmarked objects are compatible ++ with all ABI variants. Such objects may have been diff --cc debian/patches/arm/unsubmitted-ldso-multilib.diff index 000000000,000000000..c72396493 new file mode 100644 --- /dev/null +++ b/debian/patches/arm/unsubmitted-ldso-multilib.diff @@@ -1,0 -1,0 +1,18 @@@ ++--- glibc/elf/dl-load.c 2013-01-23 19:29:03.412797023 -0700 +++++ glibc/elf/dl-load.c 2013-01-23 19:30:02.556794931 -0700 ++@@ -1999,6 +2000,15 @@ ++ *found_other_class = true; ++ goto close_and_out; ++ } +++#ifdef __arm__ +++ else if (!VALID_FLOAT_ABI (ehdr->e_flags)) +++ { +++ /* This is not a fatal error. On architectures where +++ soft-float and hard-float binaries can be run this +++ might happen. */ +++ goto close_and_out; +++ } +++#endif ++ else if (ehdr->e_ident[EI_DATA] != byteorder) ++ { ++ if (BYTE_ORDER == BIG_ENDIAN) diff --cc debian/patches/git-updates.diff index 000000000,000000000..75005cfac new file mode 100644 --- /dev/null +++ b/debian/patches/git-updates.diff @@@ -1,0 -1,0 +1,23515 @@@ ++GIT update of https://sourceware.org/git/glibc.git/release/2.31/master from glibc-2.31 ++ ++diff --git a/INSTALL b/INSTALL ++index 242cb06f91..b487e18634 100644 ++--- a/INSTALL +++++ b/INSTALL ++@@ -184,14 +184,9 @@ if 'CFLAGS' is specified it must enable optimization. For example: ++ '--enable-pt_chown' ++ The file 'pt_chown' is a helper binary for 'grantpt' (*note ++ Pseudo-Terminals: Allocation.) that is installed setuid root to fix ++- up pseudo-terminal ownership. It is not built by default because ++- systems using the Linux kernel are commonly built with the 'devpts' ++- filesystem enabled and mounted at '/dev/pts', which manages ++- pseudo-terminal ownership automatically. By using ++- '--enable-pt_chown', you may build 'pt_chown' and install it setuid ++- and owned by 'root'. The use of 'pt_chown' introduces additional ++- security risks to the system and you should enable it only if you ++- understand and accept those risks. +++ up pseudo-terminal ownership on GNU/Hurd. It is not required on +++ GNU/Linux, and the GNU C Library will not use the installed +++ 'pt_chown' program when configured with '--enable-pt_chown'. ++ ++ '--disable-werror' ++ By default, the GNU C Library is built with '-Werror'. If you wish ++diff --git a/Makeconfig b/Makeconfig ++index f252842979..3ce38059f4 100644 ++--- a/Makeconfig +++++ b/Makeconfig ++@@ -42,6 +42,22 @@ else ++ objdir must be defined by the build-directory Makefile. ++ endif ++ +++# Did we request 'make -s' run? "yes" or "no". +++# Starting from make-4.4 MAKEFLAGS now contains long +++# options like '--shuffle'. To detect presence of 's' +++# we pick first word with short options. Long options +++# are guaranteed to come after whitespace. We use '-' +++# prefix to always have a word before long options +++# even if no short options were passed. +++# Typical MAKEFLAGS values to watch for: +++# "rs --shuffle=42" (silent) +++# " --shuffle" (not silent) +++ifeq ($(findstring s, $(firstword -$(MAKEFLAGS))),) +++silent-make := no +++else +++silent-make := yes +++endif +++ ++ # Root of the sysdeps tree. ++ sysdep_dir := $(..)sysdeps ++ export sysdep_dir := $(sysdep_dir) ++@@ -557,9 +573,12 @@ link-libc-rpath-link = -Wl,-rpath-link=$(rpath-link) ++ # before the expansion of LDLIBS-* variables). ++ ++ # Tests use -Wl,-rpath instead of -Wl,-rpath-link for ++-# build-hardcoded-path-in-tests. +++# build-hardcoded-path-in-tests. Add -Wl,--disable-new-dtags to force +++# DT_RPATH instead of DT_RUNPATH which only applies to DT_NEEDED entries +++# in the executable and doesn't applies to DT_NEEDED entries in shared +++# libraries which are loaded via DT_NEEDED entries in the executable. ++ ifeq (yes,$(build-hardcoded-path-in-tests)) ++-link-libc-tests-rpath-link = $(link-libc-rpath) +++link-libc-tests-rpath-link = $(link-libc-rpath) -Wl,--disable-new-dtags ++ else ++ link-libc-tests-rpath-link = $(link-libc-rpath-link) ++ endif # build-hardcoded-path-in-tests ++@@ -892,7 +911,7 @@ endif ++ # umpteen zillion filenames along with it (we use `...' instead) ++ # but we don't want this echoing done when the user has said ++ # he doesn't want to see commands echoed by using -s. ++-ifneq "$(findstring s,$(MAKEFLAGS))" "" # if -s +++ifeq ($(silent-make),yes) # if -s ++ +cmdecho := echo >/dev/null ++ else # not -s ++ +cmdecho := echo ++diff --git a/Makerules b/Makerules ++index 1e9c18f0d8..e07a42e20c 100644 ++--- a/Makerules +++++ b/Makerules ++@@ -805,7 +805,7 @@ endif ++ # Maximize efficiency by minimizing the number of rules. ++ .SUFFIXES: # Clear the suffix list. We don't use suffix rules. ++ # Don't define any builtin rules. ++-MAKEFLAGS := $(MAKEFLAGS)r +++MAKEFLAGS := $(MAKEFLAGS) -r ++ ++ # Generic rule for making directories. ++ %/: ++@@ -822,7 +822,7 @@ MAKEFLAGS := $(MAKEFLAGS)r ++ .PRECIOUS: $(foreach l,$(libtypes),$(patsubst %,$(common-objpfx)$l,c)) ++ ++ # Use the verbose option of ar and tar when not running silently. ++-ifeq "$(findstring s,$(MAKEFLAGS))" "" # if not -s +++ifeq ($(silent-make),no) # if not -s ++ verbose := v ++ else # -s ++ verbose := ++diff --git a/NEWS b/NEWS ++index 292fbc595a..8a20d3c4e3 100644 ++--- a/NEWS +++++ b/NEWS ++@@ -5,6 +5,94 @@ See the end for copying conditions. ++ Please send GNU C library bug reports via ++ using `glibc' in the "product" field. ++ +++Version 2.31.1 +++ +++The following bugs are resolved with this release: +++ [14231] stdio-common tests memory requirements +++ [19519] iconv(1) with -c option hangs on illegal multi-byte sequences +++ (CVE-2016-10228) +++ [20019] NULL pointer dereference in libc.so.6 IFUNC due to uninitialized GOT +++ [20543] Please move from .gnu.linkonce to comdat +++ [22542] CVE-2022-23219: Buffer overflow in sunrpc clnt_create for "unix" +++ [23296] Data race in setting function descriptor during lazy binding +++ [24973] iconv encounters segmentation fault when converting 0x00 0xfe in +++ EUC-KR to UTF-8 (CVE-2019-25013) +++ [25487] sinl() stack corruption from crafted input (CVE-2020-10029) +++ [25523] MIPS/Linux inline syscall template is miscompiled +++ [25623] test-sysvmsg, test-sysvsem, test-sysvshm fail with 2.31 on 32 bit and +++ old kernel +++ [25635] arm: Wrong sysdep order selection for soft-fp +++ [25639] localedata: Some names of days and months wrongly spelt in +++ Occitan +++ [25691] stdio: Remove memory leak from multibyte convertion +++ [25715] system() returns wrong errors when posix_spawn fails +++ [25810] x32: Incorrect syscall entries with pointer, off_t and size_t +++ [25896] Incorrect prctl +++ [25902] Bad LOADARGS_N +++ [25933] Off by one error in __strncmp_avx2 +++ [25966] Incorrect access of __x86_shared_non_temporal_threshold for x32 +++ [25976] nss_compat: internal_end*ent may clobber errno, hiding ERANGE +++ [26211] printf integer overflow calculating allocation size +++ [26224] iconv hangs when converting some invalid inputs from several IBM +++ character sets (CVE-2020-27618) +++ [26248] Incorrect argument types for INLINE_SETXID_SYSCALL +++ [26332] Incorrect cache line size load causes memory corruption in memset +++ [26383] bind_textdomain_codeset doesn't accept //TRANSLIT anymore +++ [26923] Assertion failure in iconv when converting invalid UCS4 (CVE-2020-29562) +++ [26932] libc: sh: Multiple floating point functions defined as stubs only +++ [27130] "rep movsb" performance issue +++ [27177] GLIBC_TUNABLES=glibc.cpu.x86_ibt=on:glibc.cpu.x86_shstk=on doesn't work +++ [27457] vzeroupper use in AVX2 multiarch string functions cause HTM aborts +++ [27974] Overflow bug in some implementation of wcsnlen, wmemchr, and wcsncat +++ [28524] Conversion from ISO-2022-JP-3 with iconv may emit spurious NULs +++ [28755] overflow bug in wcsncmp_avx2 and wcsncmp_evex +++ [28768] CVE-2022-23218: Buffer overflow in sunrpc svcunix_create +++ [28769] CVE-2021-3999: Off-by-one buffer overflow/underflow in getcwd() +++ [28896] strncmp-avx2-rtm and wcsncmp-avx2-rtm fallback on non-rtm +++ variants when avoiding overflow +++ [29530] segfault in printf handling thousands separator +++ +++Security related changes: +++ +++ CVE-2016-10228: An infinite loop has been fixed in the iconv program when +++ invoked with the -c option and when processing invalid multi-byte input +++ sequences. Reported by Jan Engelhardt. +++ +++ CVE-2020-10029: Trigonometric functions on x86 targets suffered from stack +++ corruption when they were passed a pseudo-zero argument. Reported by Guido +++ Vranken / ForAllSecure Mayhem. +++ +++ CVE-2020-1751: A defect in the PowerPC backtrace function could cause an +++ out-of-bounds write when executed in a signal frame context. +++ +++ CVE-2020-1752: A use-after-free vulnerability in the glob function when +++ expanding ~user has been fixed. +++ +++ CVE-2020-6096: A signed comparison vulnerability in the ARMv7 memcpy and +++ memmove functions has been fixed. Discovered by Jason Royes and Samual +++ Dytrych of the Cisco Security Assessment and Penetration Team (See +++ TALOS-2020-1019). +++ +++ CVE-2020-27618: An infinite loop has been fixed in the iconv program when +++ invoked with input containing redundant shift sequences in the IBM1364, +++ IBM1371, IBM1388, IBM1390, or IBM1399 character sets. +++ +++ CVE-2020-29562: An assertion failure has been fixed in the iconv function +++ when invoked with UCS4 input containing an invalid character. +++ +++ CVE-2021-3999: Passing a buffer of size exactly 1 byte to the getcwd +++ function may result in an off-by-one buffer underflow and overflow +++ when the current working directory is longer than PATH_MAX and also +++ corresponds to the / directory through an unprivileged mount +++ namespace. Reported by Qualys. +++ +++ CVE-2022-23219: Passing an overlong file name to the clnt_create +++ legacy function could result in a stack-based buffer overflow when +++ using the "unix" protocol. Reported by Martin Sebor. +++ +++ CVE-2022-23218: Passing an overlong file name to the svcunix_create +++ legacy function could result in a stack-based buffer overflow. +++ ++ Version 2.31 ++ ++ Major new features: ++@@ -141,6 +229,18 @@ Changes to build and runtime requirements: ++ source tree. ChangeLog files are located in the ChangeLog.old directory as ++ ChangeLog.N where the highest N has the latest entries. ++ +++* On Linux, the system administrator needs to configure /dev/pts with +++ the intended access modes for pseudo-terminals. glibc no longer +++ attemps to adjust permissions of terminal devices. The previous glibc +++ defaults ("tty" group, user read/write and group write) already +++ corresponded to what most systems used, so that grantpt did not +++ perform any adjustments. +++ +++* On Linux, the posix_openpt and getpt functions no longer attempt to +++ use legacy (BSD) pseudo-terminals and assume that if /dev/ptmx exists +++ (and pseudo-terminals are supported), a devpts file system is mounted +++ on /dev/pts. Current systems already meet these requirements. +++ ++ Security related changes: ++ ++ CVE-2019-19126: ld.so failed to ignore the LD_PREFER_MAP_32BIT_EXEC ++diff --git a/Rules b/Rules ++index 8b771f6095..beab969fde 100644 ++--- a/Rules +++++ b/Rules ++@@ -155,6 +155,7 @@ xtests: tests $(xtests-special) ++ else ++ tests: $(tests:%=$(objpfx)%.out) $(tests-internal:%=$(objpfx)%.out) \ ++ $(tests-container:%=$(objpfx)%.out) \ +++ $(tests-mcheck:%=$(objpfx)%-mcheck.out) \ ++ $(tests-special) $(tests-printers-out) ++ xtests: tests $(xtests:%=$(objpfx)%.out) $(xtests-special) ++ endif ++@@ -165,7 +166,7 @@ ifeq ($(run-built-tests),no) ++ tests-expected = ++ else ++ tests-expected = $(tests) $(tests-internal) $(tests-printers) \ ++- $(tests-container) +++ $(tests-container) $(tests-mcheck:%=%-mcheck) ++ endif ++ tests: ++ $(..)scripts/merge-test-results.sh -s $(objpfx) $(subdir) \ ++@@ -191,6 +192,7 @@ else ++ binaries-pie-tests = ++ binaries-pie-notests = ++ endif +++binaries-mcheck-tests = $(tests-mcheck:%=%-mcheck) ++ else ++ binaries-all-notests = ++ binaries-all-tests = $(tests) $(tests-internal) $(xtests) $(test-srcs) ++@@ -200,6 +202,7 @@ binaries-static-tests = ++ binaries-static = ++ binaries-pie-tests = ++ binaries-pie-notests = +++binaries-mcheck-tests = ++ endif ++ ++ binaries-pie = $(binaries-pie-tests) $(binaries-pie-notests) ++@@ -223,6 +226,14 @@ $(addprefix $(objpfx),$(binaries-shared-tests)): %: %.o \ ++ $(+link-tests) ++ endif ++ +++ifneq "$(strip $(binaries-mcheck-tests))" "" +++$(addprefix $(objpfx),$(binaries-mcheck-tests)): %-mcheck: %.o \ +++ $(link-extra-libs-tests) \ +++ $(sort $(filter $(common-objpfx)lib%,$(link-libc))) \ +++ $(addprefix $(csu-objpfx),start.o) $(+preinit) $(+postinit) +++ $(+link-tests) +++endif +++ ++ ifneq "$(strip $(binaries-pie-tests))" "" ++ $(addprefix $(objpfx),$(binaries-pie-tests)): %: %.o \ ++ $(link-extra-libs-tests) \ ++@@ -253,6 +264,12 @@ $(addprefix $(objpfx),$(binaries-static-tests)): %: %.o \ ++ $(+link-static-tests) ++ endif ++ +++# All mcheck tests will be run with MALLOC_CHECK_=3 +++define mcheck-ENVS +++$(1)-mcheck-ENV = MALLOC_CHECK_=3 +++endef +++$(foreach t,$(tests-mcheck),$(eval $(call mcheck-ENVS,$(t)))) +++ ++ ifneq "$(strip $(tests) $(tests-internal) $(xtests) $(test-srcs))" "" ++ # These are the implicit rules for making test outputs ++ # from the test programs and whatever input files are present. ++diff --git a/configure b/configure ++index b959d2d988..3b98ec312f 100755 ++--- a/configure +++++ b/configure ++@@ -4035,7 +4035,7 @@ if ${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS \ ++ -o conftest conftest.S 1>&5 2>&5; then ++ # Do a link to see if the backend supports IFUNC relocs. ++ $READELF -r conftest 1>&5 ++- LC_ALL=C $READELF -r conftest | grep 'no relocations' >/dev/null || { +++ LC_ALL=C $READELF -Wr conftest | grep -q 'IRELATIVE\|R_SPARC_JMP_IREL' && { ++ libc_cv_ld_gnu_indirect_function=yes ++ } ++ fi ++diff --git a/configure.ac b/configure.ac ++index 49b900c1ed..e20034f301 100644 ++--- a/configure.ac +++++ b/configure.ac ++@@ -649,7 +649,7 @@ if ${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS \ ++ -o conftest conftest.S 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then ++ # Do a link to see if the backend supports IFUNC relocs. ++ $READELF -r conftest 1>&AS_MESSAGE_LOG_FD ++- LC_ALL=C $READELF -r conftest | grep 'no relocations' >/dev/null || { +++ LC_ALL=C $READELF -Wr conftest | grep -q 'IRELATIVE\|R_SPARC_JMP_IREL' && { ++ libc_cv_ld_gnu_indirect_function=yes ++ } ++ fi ++diff --git a/debug/Makefile b/debug/Makefile ++index c62b2154bc..3a6b442238 100644 ++--- a/debug/Makefile +++++ b/debug/Makefile ++@@ -168,6 +168,8 @@ extra-libs-others = $(extra-libs) ++ ++ libSegFault-routines = segfault ++ libSegFault-inhibit-o = $(filter-out .os,$(object-suffixes)) +++# libSegFault.so installs a signal handler in its ELF constructor. +++LDFLAGS-SegFault.so = -Wl,--enable-new-dtags,-z,nodelete ++ ++ libpcprofile-routines = pcprofile ++ libpcprofile-inhibit-o = $(filter-out .os,$(object-suffixes)) ++diff --git a/debug/backtrace.c b/debug/backtrace.c ++index cc4b9a5c90..69cf4c23c8 100644 ++--- a/debug/backtrace.c +++++ b/debug/backtrace.c ++@@ -23,6 +23,7 @@ ++ #include ++ #include ++ #include +++#include ++ ++ struct trace_arg ++ { ++@@ -78,6 +79,10 @@ backtrace_helper (struct _Unwind_Context *ctx, void *a) ++ if (arg->cnt != -1) ++ { ++ arg->array[arg->cnt] = (void *) unwind_getip (ctx); +++ if (arg->cnt > 0) +++ arg->array[arg->cnt] +++ = unwind_arch_adjustment (arg->array[arg->cnt - 1], +++ arg->array[arg->cnt]); ++ ++ /* Check whether we make any progress. */ ++ _Unwind_Word cfa = unwind_getcfa (ctx); ++diff --git a/elf/Makefile b/elf/Makefile ++index 632a4d8b0f..f9646f9c8c 100644 ++--- a/elf/Makefile +++++ b/elf/Makefile ++@@ -1348,6 +1348,8 @@ CFLAGS-ifuncmain7pie.c += $(pie-ccflag) ++ CFLAGS-ifuncmain9pie.c += $(pie-ccflag) ++ CFLAGS-tst-ifunc-textrel.c += $(pic-ccflag) ++ +++LDFLAGS-ifuncmain6pie = -Wl,-z,lazy +++ ++ $(objpfx)ifuncmain1pie: $(objpfx)ifuncmod1.so ++ $(objpfx)ifuncmain1staticpie: $(objpfx)ifuncdep1pic.o ++ $(objpfx)ifuncmain1vispie: $(objpfx)ifuncmod1.so ++@@ -1581,8 +1583,6 @@ $(objpfx)tst-nodelete-dlclose.out: $(objpfx)tst-nodelete-dlclose-dso.so \ ++ ++ tst-env-setuid-ENV = MALLOC_CHECK_=2 MALLOC_MMAP_THRESHOLD_=4096 \ ++ LD_HWCAP_MASK=0x1 ++-tst-env-setuid-tunables-ENV = \ ++- GLIBC_TUNABLES=glibc.malloc.check=2:glibc.malloc.mmap_threshold=4096 ++ ++ $(objpfx)tst-debug1: $(libdl) ++ $(objpfx)tst-debug1.out: $(objpfx)tst-debug1mod1.so ++diff --git a/elf/dl-tunables.c b/elf/dl-tunables.c ++index 44d06665b4..2296ad3870 100644 ++--- a/elf/dl-tunables.c +++++ b/elf/dl-tunables.c ++@@ -177,6 +177,7 @@ parse_tunables (char *tunestr, char *valstring) ++ return; ++ ++ char *p = tunestr; +++ size_t off = 0; ++ ++ while (true) ++ { ++@@ -190,7 +191,11 @@ parse_tunables (char *tunestr, char *valstring) ++ /* If we reach the end of the string before getting a valid name-value ++ pair, bail out. */ ++ if (p[len] == '\0') ++- return; +++ { +++ if (__libc_enable_secure) +++ tunestr[off] = '\0'; +++ return; +++ } ++ ++ /* We did not find a valid name-value pair before encountering the ++ colon. */ ++@@ -216,35 +221,28 @@ parse_tunables (char *tunestr, char *valstring) ++ ++ if (tunable_is_name (cur->name, name)) ++ { ++- /* If we are in a secure context (AT_SECURE) then ignore the tunable ++- unless it is explicitly marked as secure. Tunable values take ++- precendence over their envvar aliases. */ +++ /* If we are in a secure context (AT_SECURE) then ignore the +++ tunable unless it is explicitly marked as secure. Tunable +++ values take precedence over their envvar aliases. We write +++ the tunables that are not SXID_ERASE back to TUNESTR, thus +++ dropping all SXID_ERASE tunables and any invalid or +++ unrecognized tunables. */ ++ if (__libc_enable_secure) ++ { ++- if (cur->security_level == TUNABLE_SECLEVEL_SXID_ERASE) +++ if (cur->security_level != TUNABLE_SECLEVEL_SXID_ERASE) ++ { ++- if (p[len] == '\0') ++- { ++- /* Last tunable in the valstring. Null-terminate and ++- return. */ ++- *name = '\0'; ++- return; ++- } ++- else ++- { ++- /* Remove the current tunable from the string. We do ++- this by overwriting the string starting from NAME ++- (which is where the current tunable begins) with ++- the remainder of the string. We then have P point ++- to NAME so that we continue in the correct ++- position in the valstring. */ ++- char *q = &p[len + 1]; ++- p = name; ++- while (*q != '\0') ++- *name++ = *q++; ++- name[0] = '\0'; ++- len = 0; ++- } +++ if (off > 0) +++ tunestr[off++] = ':'; +++ +++ const char *n = cur->name; +++ +++ while (*n != '\0') +++ tunestr[off++] = *n++; +++ +++ tunestr[off++] = '='; +++ +++ for (size_t j = 0; j < len; j++) +++ tunestr[off++] = value[j]; ++ } ++ ++ if (cur->security_level != TUNABLE_SECLEVEL_NONE) ++@@ -257,9 +255,7 @@ parse_tunables (char *tunestr, char *valstring) ++ } ++ } ++ ++- if (p[len] == '\0') ++- return; ++- else +++ if (p[len] != '\0') ++ p += len + 1; ++ } ++ } ++diff --git a/elf/ifuncmain1.c b/elf/ifuncmain1.c ++index 747fc02648..6effce3d77 100644 ++--- a/elf/ifuncmain1.c +++++ b/elf/ifuncmain1.c ++@@ -19,7 +19,14 @@ typedef int (*foo_p) (void); ++ #endif ++ ++ foo_p foo_ptr = foo; +++ +++/* Address-significant access to protected symbols is not supported in +++ position-dependent mode on several architectures because GCC +++ generates relocations that assume that the address is local to the +++ main program. */ +++#ifdef __PIE__ ++ foo_p foo_procted_ptr = foo_protected; +++#endif ++ ++ extern foo_p get_foo_p (void); ++ extern foo_p get_foo_hidden_p (void); ++@@ -37,12 +44,16 @@ main (void) ++ if ((*foo_ptr) () != -1) ++ abort (); ++ +++#ifdef __PIE__ ++ if (foo_procted_ptr != foo_protected) ++ abort (); +++#endif ++ if (foo_protected () != 0) ++ abort (); +++#ifdef __PIE__ ++ if ((*foo_procted_ptr) () != 0) ++ abort (); +++#endif ++ ++ p = get_foo_p (); ++ if (p != foo) ++@@ -55,8 +66,10 @@ main (void) ++ abort (); ++ ++ p = get_foo_protected_p (); +++#ifdef __PIE__ ++ if (p != foo_protected) ++ abort (); +++#endif ++ if (ret_foo_protected != 0 || (*p) () != ret_foo_protected) ++ abort (); ++ ++diff --git a/elf/ifuncmain5.c b/elf/ifuncmain5.c ++index f398085cb4..6fda768fb6 100644 ++--- a/elf/ifuncmain5.c +++++ b/elf/ifuncmain5.c ++@@ -14,12 +14,19 @@ get_foo (void) ++ return foo; ++ } ++ +++ +++/* Address-significant access to protected symbols is not supported in +++ position-dependent mode on several architectures because GCC +++ generates relocations that assume that the address is local to the +++ main program. */ +++#ifdef __PIE__ ++ foo_p ++ __attribute__ ((noinline)) ++ get_foo_protected (void) ++ { ++ return foo_protected; ++ } +++#endif ++ ++ int ++ main (void) ++@@ -30,9 +37,11 @@ main (void) ++ if ((*p) () != -1) ++ abort (); ++ +++#ifdef __PIE__ ++ p = get_foo_protected (); ++ if ((*p) () != 0) ++ abort (); +++#endif ++ ++ return 0; ++ } ++diff --git a/elf/ifuncmain6pie.c b/elf/ifuncmain6pie.c ++index 04faeb86ef..4a01906836 100644 ++--- a/elf/ifuncmain6pie.c +++++ b/elf/ifuncmain6pie.c ++@@ -9,7 +9,6 @@ ++ #include "ifunc-sel.h" ++ ++ typedef int (*foo_p) (void); ++-extern foo_p foo_ptr; ++ ++ static int ++ one (void) ++@@ -28,20 +27,17 @@ foo_ifunc (void) ++ } ++ ++ extern int foo (void); ++-extern foo_p get_foo (void); +++extern int call_foo (void); ++ extern foo_p get_foo_p (void); ++ ++-foo_p my_foo_ptr = foo; +++foo_p foo_ptr = foo; ++ ++ int ++ main (void) ++ { ++ foo_p p; ++ ++- p = get_foo (); ++- if (p != foo) ++- abort (); ++- if ((*p) () != -30) +++ if (call_foo () != -30) ++ abort (); ++ ++ p = get_foo_p (); ++@@ -52,12 +48,8 @@ main (void) ++ ++ if (foo_ptr != foo) ++ abort (); ++- if (my_foo_ptr != foo) ++- abort (); ++ if ((*foo_ptr) () != -30) ++ abort (); ++- if ((*my_foo_ptr) () != -30) ++- abort (); ++ if (foo () != -30) ++ abort (); ++ ++diff --git a/elf/ifuncmod6.c b/elf/ifuncmod6.c ++index 2e16c1d06d..2f6d0715e6 100644 ++--- a/elf/ifuncmod6.c +++++ b/elf/ifuncmod6.c ++@@ -4,7 +4,7 @@ extern int foo (void); ++ ++ typedef int (*foo_p) (void); ++ ++-foo_p foo_ptr = foo; +++extern foo_p foo_ptr; ++ ++ foo_p ++ get_foo_p (void) ++@@ -12,8 +12,8 @@ get_foo_p (void) ++ return foo_ptr; ++ } ++ ++-foo_p ++-get_foo (void) +++int +++call_foo (void) ++ { ++- return foo; +++ return foo (); ++ } ++diff --git a/elf/rtld-Rules b/elf/rtld-Rules ++index 7e0254cc41..3b73937d4d 100644 ++--- a/elf/rtld-Rules +++++ b/elf/rtld-Rules ++@@ -52,7 +52,7 @@ $(objpfx)rtld-libc.a: $(foreach dir,$(rtld-subdirs),\ ++ mv -f $@T $@ ++ ++ # Use the verbose option of ar and tar when not running silently. ++-ifeq "$(findstring s,$(MAKEFLAGS))" "" # if not -s +++ifeq ($(silent-make),no) # if not -s ++ verbose := v ++ else # -s ++ verbose := ++diff --git a/elf/tst-env-setuid-tunables.c b/elf/tst-env-setuid-tunables.c ++index 971d5892b1..ca0c8c245c 100644 ++--- a/elf/tst-env-setuid-tunables.c +++++ b/elf/tst-env-setuid-tunables.c ++@@ -25,35 +25,76 @@ ++ #include "config.h" ++ #undef _LIBC ++ ++-#define test_parent test_parent_tunables ++-#define test_child test_child_tunables ++- ++-static int test_child_tunables (void); ++-static int test_parent_tunables (void); ++- ++-#include "tst-env-setuid.c" ++- ++-#define CHILD_VALSTRING_VALUE "glibc.malloc.mmap_threshold=4096" ++-#define PARENT_VALSTRING_VALUE \ ++- "glibc.malloc.check=2:glibc.malloc.mmap_threshold=4096" +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++#include +++#include +++#include +++#include +++ +++const char *teststrings[] = +++{ +++ "glibc.malloc.check=2:glibc.malloc.mmap_threshold=4096", +++ "glibc.malloc.check=2:glibc.malloc.check=2:glibc.malloc.mmap_threshold=4096", +++ "glibc.malloc.check=2:glibc.malloc.mmap_threshold=4096:glibc.malloc.check=2", +++ "glibc.malloc.perturb=0x800", +++ "glibc.malloc.perturb=0x800:glibc.malloc.mmap_threshold=4096", +++ "glibc.malloc.perturb=0x800:not_valid.malloc.check=2:glibc.malloc.mmap_threshold=4096", +++ "glibc.not_valid.check=2:glibc.malloc.mmap_threshold=4096", +++ "not_valid.malloc.check=2:glibc.malloc.mmap_threshold=4096", +++ "glibc.malloc.garbage=2:glibc.maoc.mmap_threshold=4096:glibc.malloc.check=2", +++ "glibc.malloc.check=4:glibc.malloc.garbage=2:glibc.maoc.mmap_threshold=4096", +++ ":glibc.malloc.garbage=2:glibc.malloc.check=1", +++ "glibc.malloc.check=1:glibc.malloc.check=2", +++ "not_valid.malloc.check=2", +++ "glibc.not_valid.check=2", +++}; +++ +++const char *resultstrings[] = +++{ +++ "glibc.malloc.mmap_threshold=4096", +++ "glibc.malloc.mmap_threshold=4096", +++ "glibc.malloc.mmap_threshold=4096", +++ "glibc.malloc.perturb=0x800", +++ "glibc.malloc.perturb=0x800:glibc.malloc.mmap_threshold=4096", +++ "glibc.malloc.perturb=0x800:glibc.malloc.mmap_threshold=4096", +++ "glibc.malloc.mmap_threshold=4096", +++ "glibc.malloc.mmap_threshold=4096", +++ "", +++ "", +++ "", +++ "", +++ "", +++ "", +++}; ++ ++ static int ++-test_child_tunables (void) +++test_child (int off) ++ { ++ const char *val = getenv ("GLIBC_TUNABLES"); ++ ++ #if HAVE_TUNABLES ++- if (val != NULL && strcmp (val, CHILD_VALSTRING_VALUE) == 0) +++ if (val != NULL && strcmp (val, resultstrings[off]) == 0) ++ return 0; ++ ++ if (val != NULL) ++- printf ("Unexpected GLIBC_TUNABLES VALUE %s\n", val); +++ printf ("[%d] Unexpected GLIBC_TUNABLES VALUE %s\n", off, val); ++ ++ return 1; ++ #else ++ if (val != NULL) ++ { ++- printf ("GLIBC_TUNABLES not cleared\n"); +++ printf ("[%d] GLIBC_TUNABLES not cleared\n", off); ++ return 1; ++ } ++ return 0; ++@@ -61,15 +102,48 @@ test_child_tunables (void) ++ } ++ ++ static int ++-test_parent_tunables (void) +++do_test (int argc, char **argv) ++ { ++- const char *val = getenv ("GLIBC_TUNABLES"); +++ /* Setgid child process. */ +++ if (argc == 2) +++ { +++ if (getgid () == getegid ()) +++ /* This can happen if the file system is mounted nosuid. */ +++ FAIL_UNSUPPORTED ("SGID failed: GID and EGID match (%jd)\n", +++ (intmax_t) getgid ()); ++ ++- if (val != NULL && strcmp (val, PARENT_VALSTRING_VALUE) == 0) ++- return 0; +++ int ret = test_child (atoi (argv[1])); ++ ++- if (val != NULL) ++- printf ("Unexpected GLIBC_TUNABLES VALUE %s\n", val); +++ if (ret != 0) +++ exit (1); ++ ++- return 1; +++ exit (EXIT_SUCCESS); +++ } +++ else +++ { +++ int ret = 0; +++ +++ /* Spawn tests. */ +++ for (int i = 0; i < array_length (teststrings); i++) +++ { +++ char buf[INT_BUFSIZE_BOUND (int)]; +++ +++ printf ("Spawned test for %s (%d)\n", teststrings[i], i); +++ snprintf (buf, sizeof (buf), "%d\n", i); +++ if (setenv ("GLIBC_TUNABLES", teststrings[i], 1) != 0) +++ exit (1); +++ +++ int status = support_capture_subprogram_self_sgid (buf); +++ +++ /* Bail out early if unsupported. */ +++ if (WEXITSTATUS (status) == EXIT_UNSUPPORTED) +++ return EXIT_UNSUPPORTED; +++ +++ ret |= status; +++ } +++ return ret; +++ } ++ } +++ +++#define TEST_FUNCTION_ARGV do_test +++#include ++diff --git a/elf/tst-env-setuid.c b/elf/tst-env-setuid.c ++index 41dc79e83a..2dbccdb69e 100644 ++--- a/elf/tst-env-setuid.c +++++ b/elf/tst-env-setuid.c ++@@ -29,173 +29,12 @@ ++ #include ++ #include ++ +++#include ++ #include ++ #include +++#include ++ ++ static char SETGID_CHILD[] = "setgid-child"; ++-#define CHILD_STATUS 42 ++- ++-/* Return a GID which is not our current GID, but is present in the ++- supplementary group list. */ ++-static gid_t ++-choose_gid (void) ++-{ ++- const int count = 64; ++- gid_t groups[count]; ++- int ret = getgroups (count, groups); ++- if (ret < 0) ++- { ++- printf ("getgroups: %m\n"); ++- exit (1); ++- } ++- gid_t current = getgid (); ++- for (int i = 0; i < ret; ++i) ++- { ++- if (groups[i] != current) ++- return groups[i]; ++- } ++- return 0; ++-} ++- ++-/* Spawn and execute a program and verify that it returns the CHILD_STATUS. */ ++-static pid_t ++-do_execve (char **args) ++-{ ++- pid_t kid = vfork (); ++- ++- if (kid < 0) ++- { ++- printf ("vfork: %m\n"); ++- return -1; ++- } ++- ++- if (kid == 0) ++- { ++- /* Child process. */ ++- execve (args[0], args, environ); ++- _exit (-errno); ++- } ++- ++- if (kid < 0) ++- return 1; ++- ++- int status; ++- ++- if (waitpid (kid, &status, 0) < 0) ++- { ++- printf ("waitpid: %m\n"); ++- return 1; ++- } ++- ++- if (WEXITSTATUS (status) == EXIT_UNSUPPORTED) ++- return EXIT_UNSUPPORTED; ++- ++- if (!WIFEXITED (status) || WEXITSTATUS (status) != CHILD_STATUS) ++- { ++- printf ("Unexpected exit status %d from child process\n", ++- WEXITSTATUS (status)); ++- return 1; ++- } ++- return 0; ++-} ++- ++-/* Copies the executable into a restricted directory, so that we can ++- safely make it SGID with the TARGET group ID. Then runs the ++- executable. */ ++-static int ++-run_executable_sgid (gid_t target) ++-{ ++- char *dirname = xasprintf ("%s/tst-tunables-setuid.%jd", ++- test_dir, (intmax_t) getpid ()); ++- char *execname = xasprintf ("%s/bin", dirname); ++- int infd = -1; ++- int outfd = -1; ++- int ret = 0; ++- if (mkdir (dirname, 0700) < 0) ++- { ++- printf ("mkdir: %m\n"); ++- goto err; ++- } ++- infd = open ("/proc/self/exe", O_RDONLY); ++- if (infd < 0) ++- { ++- printf ("open (/proc/self/exe): %m\n"); ++- goto err; ++- } ++- outfd = open (execname, O_WRONLY | O_CREAT | O_EXCL, 0700); ++- if (outfd < 0) ++- { ++- printf ("open (%s): %m\n", execname); ++- goto err; ++- } ++- char buf[4096]; ++- for (;;) ++- { ++- ssize_t rdcount = read (infd, buf, sizeof (buf)); ++- if (rdcount < 0) ++- { ++- printf ("read: %m\n"); ++- goto err; ++- } ++- if (rdcount == 0) ++- break; ++- char *p = buf; ++- char *end = buf + rdcount; ++- while (p != end) ++- { ++- ssize_t wrcount = write (outfd, buf, end - p); ++- if (wrcount == 0) ++- errno = ENOSPC; ++- if (wrcount <= 0) ++- { ++- printf ("write: %m\n"); ++- goto err; ++- } ++- p += wrcount; ++- } ++- } ++- if (fchown (outfd, getuid (), target) < 0) ++- { ++- printf ("fchown (%s): %m\n", execname); ++- goto err; ++- } ++- if (fchmod (outfd, 02750) < 0) ++- { ++- printf ("fchmod (%s): %m\n", execname); ++- goto err; ++- } ++- if (close (outfd) < 0) ++- { ++- printf ("close (outfd): %m\n"); ++- goto err; ++- } ++- if (close (infd) < 0) ++- { ++- printf ("close (infd): %m\n"); ++- goto err; ++- } ++- ++- char *args[] = {execname, SETGID_CHILD, NULL}; ++- ++- ret = do_execve (args); ++- ++-err: ++- if (outfd >= 0) ++- close (outfd); ++- if (infd >= 0) ++- close (infd); ++- if (execname) ++- { ++- unlink (execname); ++- free (execname); ++- } ++- if (dirname) ++- { ++- rmdir (dirname); ++- free (dirname); ++- } ++- return ret; ++-} ++ ++ #ifndef test_child ++ static int ++@@ -256,40 +95,32 @@ do_test (int argc, char **argv) ++ if (argc == 2 && strcmp (argv[1], SETGID_CHILD) == 0) ++ { ++ if (getgid () == getegid ()) ++- { ++- /* This can happen if the file system is mounted nosuid. */ ++- fprintf (stderr, "SGID failed: GID and EGID match (%jd)\n", ++- (intmax_t) getgid ()); ++- exit (EXIT_UNSUPPORTED); ++- } +++ /* This can happen if the file system is mounted nosuid. */ +++ FAIL_UNSUPPORTED ("SGID failed: GID and EGID match (%jd)\n", +++ (intmax_t) getgid ()); ++ ++ int ret = test_child (); ++ ++ if (ret != 0) ++ exit (1); ++ ++- exit (CHILD_STATUS); +++ exit (EXIT_SUCCESS); ++ } ++ else ++ { ++ if (test_parent () != 0) ++ exit (1); ++ ++- /* Try running a setgid program. */ ++- gid_t target = choose_gid (); ++- if (target == 0) ++- { ++- fprintf (stderr, ++- "Could not find a suitable GID for user %jd, skipping test\n", ++- (intmax_t) getuid ()); ++- exit (0); ++- } +++ int status = support_capture_subprogram_self_sgid (SETGID_CHILD); ++ ++- return run_executable_sgid (target); ++- } +++ if (WEXITSTATUS (status) == EXIT_UNSUPPORTED) +++ return EXIT_UNSUPPORTED; +++ +++ if (!WIFEXITED (status)) +++ FAIL_EXIT1 ("Unexpected exit status %d from child process\n", status); ++ ++- /* Something went wrong and our argv was corrupted. */ ++- _exit (1); +++ return 0; +++ } ++ } ++ ++ #define TEST_FUNCTION_ARGV do_test ++diff --git a/iconv/Makefile b/iconv/Makefile ++index b8fe8c47df..f9b51e23ec 100644 ++--- a/iconv/Makefile +++++ b/iconv/Makefile ++@@ -26,7 +26,7 @@ headers = iconv.h gconv.h ++ routines = iconv_open iconv iconv_close \ ++ gconv_open gconv gconv_close gconv_db gconv_conf \ ++ gconv_builtin gconv_simple gconv_trans gconv_cache ++-routines += gconv_dl +++routines += gconv_dl gconv_charset ++ ++ vpath %.c ../locale/programs ../intl ++ ++@@ -44,7 +44,7 @@ CFLAGS-linereader.c += -DNO_TRANSLITERATION ++ CFLAGS-simple-hash.c += -I../locale ++ ++ tests = tst-iconv1 tst-iconv2 tst-iconv3 tst-iconv4 tst-iconv5 tst-iconv6 \ ++- tst-iconv7 tst-iconv-mt +++ tst-iconv7 tst-iconv8 tst-iconv-mt tst-iconv-opt ++ ++ others = iconv_prog iconvconfig ++ install-others-programs = $(inst_bindir)/iconv ++@@ -61,6 +61,7 @@ include $(patsubst %,$(..)libof-iterator.mk,$(cpp-srcs-left)) ++ ++ ifeq ($(run-built-tests),yes) ++ xtests-special += $(objpfx)test-iconvconfig.out +++tests-special += $(objpfx)tst-iconv_prog.out ++ endif ++ ++ # Make a copy of the file because gconv module names are constructed ++@@ -81,6 +82,13 @@ endif ++ ++ include ../Rules ++ +++ifeq ($(run-built-tests),yes) +++LOCALES := en_US.UTF-8 +++include ../gen-locales.mk +++ +++$(objpfx)tst-iconv-opt.out: $(gen-locales) +++endif +++ ++ $(inst_bindir)/iconv: $(objpfx)iconv_prog $(+force) ++ $(do-install-program) ++ ++@@ -95,3 +103,8 @@ $(objpfx)test-iconvconfig.out: /dev/null $(objpfx)iconvconfig ++ cmp $$tmp $(inst_gconvdir)/gconv-modules.cache; \ ++ rm -f $$tmp) > $@; \ ++ $(evaluate-test) +++ +++$(objpfx)tst-iconv_prog.out: tst-iconv_prog.sh $(objpfx)iconv_prog +++ $(BASH) $< $(common-objdir) '$(test-wrapper-env)' \ +++ '$(run-program-env)' > $@; \ +++ $(evaluate-test) ++diff --git a/iconv/Versions b/iconv/Versions ++index 60ab10a277..d51af52fa3 100644 ++--- a/iconv/Versions +++++ b/iconv/Versions ++@@ -7,6 +7,9 @@ libc { ++ # functions shared with iconv program ++ __gconv_get_alias_db; __gconv_get_cache; __gconv_get_modules_db; ++ +++ # functions used elsewhere in glibc +++ __gconv_open; __gconv_create_spec; __gconv_destroy_spec; +++ ++ # function used by the gconv modules ++ __gconv_transliterate; ++ } ++diff --git a/iconv/gconv_charset.c b/iconv/gconv_charset.c ++new file mode 100644 ++index 0000000000..4ba0aa99f5 ++--- /dev/null +++++ b/iconv/gconv_charset.c ++@@ -0,0 +1,228 @@ +++/* Charset name normalization. +++ Copyright (C) 2020 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 +++ . */ +++ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include "gconv_int.h" +++#include "gconv_charset.h" +++ +++ +++/* This function returns a pointer to the last suffix in a conversion code +++ string. Valid suffixes matched by this function are of the form: '/' or ',' +++ followed by arbitrary text that doesn't contain '/' or ','. It does not +++ edit the string in any way. The caller is expected to parse the suffix and +++ remove it (by e.g. truncating the string) before the next call. */ +++static char * +++find_suffix (char *s) +++{ +++ /* The conversion code is in the form of a triplet, separated by '/' chars. +++ The third component of the triplet contains suffixes. If we don't have two +++ slashes, we don't have a suffix. */ +++ +++ int slash_count = 0; +++ char *suffix_term = NULL; +++ +++ for (int i = 0; s[i] != '\0'; i++) +++ switch (s[i]) +++ { +++ case '/': +++ slash_count++; +++ /* Fallthrough */ +++ case ',': +++ suffix_term = &s[i]; +++ } +++ +++ if (slash_count >= 2) +++ return suffix_term; +++ +++ return NULL; +++} +++ +++ +++struct gconv_parsed_code +++{ +++ char *code; +++ bool translit; +++ bool ignore; +++}; +++ +++ +++/* This function parses an iconv_open encoding PC.CODE, strips any suffixes +++ (such as TRANSLIT or IGNORE) from it and sets corresponding flags in it. */ +++static void +++gconv_parse_code (struct gconv_parsed_code *pc) +++{ +++ pc->translit = false; +++ pc->ignore = false; +++ +++ while (1) +++ { +++ /* First drop any trailing whitespaces and separators. */ +++ size_t len = strlen (pc->code); +++ while ((len > 0) +++ && (isspace (pc->code[len - 1]) +++ || pc->code[len - 1] == ',' +++ || pc->code[len - 1] == '/')) +++ len--; +++ +++ pc->code[len] = '\0'; +++ +++ if (len == 0) +++ return; +++ +++ char * suffix = find_suffix (pc->code); +++ if (suffix == NULL) +++ { +++ /* At this point, we have processed and removed all suffixes from the +++ code and what remains of the code is suffix free. */ +++ return; +++ } +++ else +++ { +++ /* A suffix is processed from the end of the code array going +++ backwards, one suffix at a time. The suffix is an index into the +++ code character array and points to: one past the end of the code +++ and any unprocessed suffixes, and to the beginning of the suffix +++ currently being processed during this iteration. We must process +++ this suffix and then drop it from the code by terminating the +++ preceding text with NULL. +++ +++ We want to allow and recognize suffixes such as: +++ +++ "/TRANSLIT" i.e. single suffix +++ "//TRANSLIT" i.e. single suffix and multiple separators +++ "//TRANSLIT/IGNORE" i.e. suffixes separated by "/" +++ "/TRANSLIT//IGNORE" i.e. suffixes separated by "//" +++ "//IGNORE,TRANSLIT" i.e. suffixes separated by "," +++ "//IGNORE," i.e. trailing "," +++ "//TRANSLIT/" i.e. trailing "/" +++ "//TRANSLIT//" i.e. trailing "//" +++ "/" i.e. empty suffix. +++ +++ Unknown suffixes are silently discarded and ignored. */ +++ +++ if ((__strcasecmp_l (suffix, +++ GCONV_TRIPLE_SEPARATOR +++ GCONV_TRANSLIT_SUFFIX, +++ _nl_C_locobj_ptr) == 0) +++ || (__strcasecmp_l (suffix, +++ GCONV_SUFFIX_SEPARATOR +++ GCONV_TRANSLIT_SUFFIX, +++ _nl_C_locobj_ptr) == 0)) +++ pc->translit = true; +++ +++ if ((__strcasecmp_l (suffix, +++ GCONV_TRIPLE_SEPARATOR +++ GCONV_IGNORE_ERRORS_SUFFIX, +++ _nl_C_locobj_ptr) == 0) +++ || (__strcasecmp_l (suffix, +++ GCONV_SUFFIX_SEPARATOR +++ GCONV_IGNORE_ERRORS_SUFFIX, +++ _nl_C_locobj_ptr) == 0)) +++ pc->ignore = true; +++ +++ /* We just processed this suffix. We can now drop it from the +++ code string by truncating it at the suffix's position. */ +++ suffix[0] = '\0'; +++ } +++ } +++} +++ +++ +++/* This function accepts the charset names of the source and destination of the +++ conversion and populates *conv_spec with an equivalent conversion +++ specification that may later be used by __gconv_open. The charset names +++ might contain options in the form of suffixes that alter the conversion, +++ e.g. "ISO-10646/UTF-8/TRANSLIT". It processes the charset names, ignoring +++ and truncating any suffix options in fromcode, and processing and truncating +++ any suffix options in tocode. Supported suffix options ("TRANSLIT" or +++ "IGNORE") when found in tocode lead to the corresponding flag in *conv_spec +++ to be set to true. Unrecognized suffix options are silently discarded. If +++ the function succeeds, it returns conv_spec back to the caller. It returns +++ NULL upon failure. conv_spec must be allocated and freed by the caller. */ +++struct gconv_spec * +++__gconv_create_spec (struct gconv_spec *conv_spec, const char *fromcode, +++ const char *tocode) +++{ +++ struct gconv_parsed_code pfc, ptc; +++ struct gconv_spec *ret = NULL; +++ +++ pfc.code = __strdup (fromcode); +++ ptc.code = __strdup (tocode); +++ +++ if ((pfc.code == NULL) +++ || (ptc.code == NULL)) +++ goto out; +++ +++ gconv_parse_code (&pfc); +++ gconv_parse_code (&ptc); +++ +++ /* We ignore suffixes in the fromcode because that is how the current +++ implementation has always handled them. Only suffixes in the tocode are +++ processed and handled. The reality is that invalid input in the input +++ character set should only be ignored if the fromcode specifies IGNORE. +++ The current implementation ignores invalid intput in the input character +++ set if the tocode contains IGNORE. We preserve this behavior for +++ backwards compatibility. In the future we may split the handling of +++ IGNORE to allow a finer grained specification of ignorning invalid input +++ and/or ignoring invalid output. */ +++ conv_spec->translit = ptc.translit; +++ conv_spec->ignore = ptc.ignore; +++ +++ /* 3 extra bytes because 1 extra for '\0', and 2 extra so strip might +++ be able to add one or two trailing '/' characters if necessary. */ +++ conv_spec->fromcode = malloc (strlen (fromcode) + 3); +++ if (conv_spec->fromcode == NULL) +++ goto out; +++ +++ conv_spec->tocode = malloc (strlen (tocode) + 3); +++ if (conv_spec->tocode == NULL) +++ { +++ free (conv_spec->fromcode); +++ conv_spec->fromcode = NULL; +++ goto out; +++ } +++ +++ /* Strip unrecognized characters and ensure that the code has two '/' +++ characters as per conversion code triplet specification. */ +++ strip (conv_spec->fromcode, pfc.code); +++ strip (conv_spec->tocode, ptc.code); +++ ret = conv_spec; +++ +++out: +++ free (pfc.code); +++ free (ptc.code); +++ +++ return ret; +++} +++libc_hidden_def (__gconv_create_spec) +++ +++ +++void +++__gconv_destroy_spec (struct gconv_spec *conv_spec) +++{ +++ free (conv_spec->fromcode); +++ free (conv_spec->tocode); +++ return; +++} +++libc_hidden_def (__gconv_destroy_spec) ++diff --git a/iconv/gconv_charset.h b/iconv/gconv_charset.h ++index 348acc089b..e9c122cf7e 100644 ++--- a/iconv/gconv_charset.h +++++ b/iconv/gconv_charset.h ++@@ -19,9 +19,41 @@ ++ ++ #include ++ #include +++#include +++#include +++#include +++#include +++#include "gconv_int.h" ++ ++ ++-static void +++/* An iconv encoding is in the form of a triplet, with parts separated by +++ a '/' character. The first part is the standard name, the second part is +++ the character set, and the third part is the error handler. If the first +++ part is sufficient to identify both the standard and the character set +++ then the second part can be empty e.g. UTF-8//. If the first part is not +++ sufficient to identify both the standard and the character set then the +++ second part is required e.g. ISO-10646/UTF8/. If neither the first or +++ second parts are provided e.g. //, then the current locale is used. +++ The actual values used in the first and second parts are not entirely +++ relevant to the implementation. The values themselves are used in a hash +++ table to lookup modules and so the naming convention of the first two parts +++ is somewhat arbitrary and only helps locate the entries in the cache. +++ The third part is the error handler and is comprised of a ',' or '/' +++ separated list of suffixes. Currently, we support "TRANSLIT" for +++ transliteration and "IGNORE" for ignoring conversion errors due to +++ unrecognized input characters. */ +++#define GCONV_TRIPLE_SEPARATOR "/" +++#define GCONV_SUFFIX_SEPARATOR "," +++#define GCONV_TRANSLIT_SUFFIX "TRANSLIT" +++#define GCONV_IGNORE_ERRORS_SUFFIX "IGNORE" +++ +++ +++/* This function copies in-order, characters from the source 's' that are +++ either alpha-numeric or one in one of these: "_-.,:/" - into the destination +++ 'wp' while dropping all other characters. In the process, it converts all +++ alphabetical characters to upper case. It then appends up to two '/' +++ characters so that the total number of '/'es in the destination is 2. */ +++static inline void __attribute__ ((unused, always_inline)) ++ strip (char *wp, const char *s) ++ { ++ int slash_count = 0; ++diff --git a/iconv/gconv_int.h b/iconv/gconv_int.h ++index fbaf12cee2..f721ce30ff 100644 ++--- a/iconv/gconv_int.h +++++ b/iconv/gconv_int.h ++@@ -75,6 +75,15 @@ struct gconv_module ++ }; ++ ++ +++/* The specification of the conversion that needs to be performed. */ +++struct gconv_spec +++{ +++ char *fromcode; +++ char *tocode; +++ bool translit; +++ bool ignore; +++}; +++ ++ /* Flags for `gconv_open'. */ ++ enum ++ { ++@@ -136,10 +145,33 @@ __libc_lock_define (extern, __gconv_lock attribute_hidden) ++ }) ++ ++ ++-/* Return in *HANDLE decriptor for transformation from FROMSET to TOSET. */ ++-extern int __gconv_open (const char *toset, const char *fromset, ++- __gconv_t *handle, int flags) ++- attribute_hidden; +++/* Return in *HANDLE, a decriptor for the transformation. The function expects +++ the specification of the transformation in the structure pointed to by +++ CONV_SPEC. It only reads *CONV_SPEC and does not take ownership of it. */ +++extern int __gconv_open (struct gconv_spec *conv_spec, +++ __gconv_t *handle, int flags); +++libc_hidden_proto (__gconv_open) +++ +++/* This function accepts the charset names of the source and destination of the +++ conversion and populates *conv_spec with an equivalent conversion +++ specification that may later be used by __gconv_open. The charset names +++ might contain options in the form of suffixes that alter the conversion, +++ e.g. "ISO-10646/UTF-8/TRANSLIT". It processes the charset names, ignoring +++ and truncating any suffix options in fromcode, and processing and truncating +++ any suffix options in tocode. Supported suffix options ("TRANSLIT" or +++ "IGNORE") when found in tocode lead to the corresponding flag in *conv_spec +++ to be set to true. Unrecognized suffix options are silently discarded. If +++ the function succeeds, it returns conv_spec back to the caller. It returns +++ NULL upon failure. */ +++extern struct gconv_spec * +++__gconv_create_spec (struct gconv_spec *conv_spec, const char *fromcode, +++ const char *tocode); +++libc_hidden_proto (__gconv_create_spec) +++ +++/* This function frees all heap memory allocated by __gconv_create_spec. */ +++extern void +++__gconv_destroy_spec (struct gconv_spec *conv_spec); +++libc_hidden_proto (__gconv_destroy_spec) ++ ++ /* Free resources associated with transformation descriptor CD. */ ++ extern int __gconv_close (__gconv_t cd) ++diff --git a/iconv/gconv_open.c b/iconv/gconv_open.c ++index b39626d252..2878620957 100644 ++--- a/iconv/gconv_open.c +++++ b/iconv/gconv_open.c ++@@ -31,7 +31,7 @@ ++ ++ ++ int ++-__gconv_open (const char *toset, const char *fromset, __gconv_t *handle, +++__gconv_open (struct gconv_spec *conv_spec, __gconv_t *handle, ++ int flags) ++ { ++ struct __gconv_step *steps; ++@@ -40,77 +40,38 @@ __gconv_open (const char *toset, const char *fromset, __gconv_t *handle, ++ size_t cnt = 0; ++ int res; ++ int conv_flags = 0; ++- const char *errhand; ++- const char *ignore; ++ bool translit = false; +++ char *tocode, *fromcode; ++ ++ /* Find out whether any error handling method is specified. */ ++- errhand = strchr (toset, '/'); ++- if (errhand != NULL) ++- errhand = strchr (errhand + 1, '/'); ++- if (__glibc_likely (errhand != NULL)) ++- { ++- if (*++errhand == '\0') ++- errhand = NULL; ++- else ++- { ++- /* Make copy without the error handling description. */ ++- char *newtoset = (char *) alloca (errhand - toset + 1); ++- char *tok; ++- char *ptr = NULL /* Work around a bogus warning */; ++- ++- newtoset[errhand - toset] = '\0'; ++- toset = memcpy (newtoset, toset, errhand - toset); +++ translit = conv_spec->translit; ++ ++- /* Find the appropriate transliteration handlers. */ ++- tok = strdupa (errhand); +++ if (conv_spec->ignore) +++ conv_flags |= __GCONV_IGNORE_ERRORS; ++ ++- tok = __strtok_r (tok, ",", &ptr); ++- while (tok != NULL) ++- { ++- if (__strcasecmp_l (tok, "TRANSLIT", _nl_C_locobj_ptr) == 0) ++- translit = true; ++- else if (__strcasecmp_l (tok, "IGNORE", _nl_C_locobj_ptr) == 0) ++- /* Set the flag to ignore all errors. */ ++- conv_flags |= __GCONV_IGNORE_ERRORS; ++- ++- tok = __strtok_r (NULL, ",", &ptr); ++- } ++- } ++- } ++- ++- /* For the source character set we ignore the error handler specification. ++- XXX Is this really always the best? */ ++- ignore = strchr (fromset, '/'); ++- if (ignore != NULL && (ignore = strchr (ignore + 1, '/')) != NULL ++- && *++ignore != '\0') ++- { ++- char *newfromset = (char *) alloca (ignore - fromset + 1); ++- ++- newfromset[ignore - fromset] = '\0'; ++- fromset = memcpy (newfromset, fromset, ignore - fromset); ++- } +++ tocode = conv_spec->tocode; +++ fromcode = conv_spec->fromcode; ++ ++ /* If the string is empty define this to mean the charset of the ++ currently selected locale. */ ++- if (strcmp (toset, "//") == 0) +++ if (strcmp (tocode, "//") == 0) ++ { ++ const char *codeset = _NL_CURRENT (LC_CTYPE, CODESET); ++ size_t len = strlen (codeset); ++ char *dest; ++- toset = dest = (char *) alloca (len + 3); +++ tocode = dest = (char *) alloca (len + 3); ++ memcpy (__mempcpy (dest, codeset, len), "//", 3); ++ } ++- if (strcmp (fromset, "//") == 0) +++ if (strcmp (fromcode, "//") == 0) ++ { ++ const char *codeset = _NL_CURRENT (LC_CTYPE, CODESET); ++ size_t len = strlen (codeset); ++ char *dest; ++- fromset = dest = (char *) alloca (len + 3); +++ fromcode = dest = (char *) alloca (len + 3); ++ memcpy (__mempcpy (dest, codeset, len), "//", 3); ++ } ++ ++- res = __gconv_find_transform (toset, fromset, &steps, &nsteps, flags); +++ res = __gconv_find_transform (tocode, fromcode, &steps, &nsteps, flags); ++ if (res == __GCONV_OK) ++ { ++ /* Allocate room for handle. */ ++@@ -209,3 +170,4 @@ __gconv_open (const char *toset, const char *fromset, __gconv_t *handle, ++ *handle = result; ++ return res; ++ } +++libc_hidden_def (__gconv_open) ++diff --git a/iconv/gconv_simple.c b/iconv/gconv_simple.c ++index d4797fba17..963b29f246 100644 ++--- a/iconv/gconv_simple.c +++++ b/iconv/gconv_simple.c ++@@ -239,11 +239,9 @@ ucs4_internal_loop (struct __gconv_step *step, ++ int flags = step_data->__flags; ++ const unsigned char *inptr = *inptrp; ++ unsigned char *outptr = *outptrp; ++- size_t n_convert = MIN (inend - inptr, outend - outptr) / 4; ++ int result; ++- size_t cnt; ++ ++- for (cnt = 0; cnt < n_convert; ++cnt, inptr += 4) +++ for (; inptr + 4 <= inend && outptr + 4 <= outend; inptr += 4) ++ { ++ uint32_t inval; ++ ++@@ -307,11 +305,9 @@ ucs4_internal_loop_unaligned (struct __gconv_step *step, ++ int flags = step_data->__flags; ++ const unsigned char *inptr = *inptrp; ++ unsigned char *outptr = *outptrp; ++- size_t n_convert = MIN (inend - inptr, outend - outptr) / 4; ++ int result; ++- size_t cnt; ++ ++- for (cnt = 0; cnt < n_convert; ++cnt, inptr += 4) +++ for (; inptr + 4 <= inend && outptr + 4 <= outend; inptr += 4) ++ { ++ if (__glibc_unlikely (inptr[0] > 0x80)) ++ { ++@@ -613,11 +609,9 @@ ucs4le_internal_loop (struct __gconv_step *step, ++ int flags = step_data->__flags; ++ const unsigned char *inptr = *inptrp; ++ unsigned char *outptr = *outptrp; ++- size_t n_convert = MIN (inend - inptr, outend - outptr) / 4; ++ int result; ++- size_t cnt; ++ ++- for (cnt = 0; cnt < n_convert; ++cnt, inptr += 4) +++ for (; inptr + 4 <= inend && outptr + 4 <= outend; inptr += 4) ++ { ++ uint32_t inval; ++ ++@@ -684,11 +678,9 @@ ucs4le_internal_loop_unaligned (struct __gconv_step *step, ++ int flags = step_data->__flags; ++ const unsigned char *inptr = *inptrp; ++ unsigned char *outptr = *outptrp; ++- size_t n_convert = MIN (inend - inptr, outend - outptr) / 4; ++ int result; ++- size_t cnt; ++ ++- for (cnt = 0; cnt < n_convert; ++cnt, inptr += 4) +++ for (; inptr + 4 <= inend && outptr + 4 <= outend; inptr += 4) ++ { ++ if (__glibc_unlikely (inptr[3] > 0x80)) ++ { ++diff --git a/iconv/iconv_open.c b/iconv/iconv_open.c ++index 687067070a..5b30055c04 100644 ++--- a/iconv/iconv_open.c +++++ b/iconv/iconv_open.c ++@@ -31,49 +31,15 @@ ++ iconv_t ++ iconv_open (const char *tocode, const char *fromcode) ++ { ++- /* Normalize the name. We remove all characters beside alpha-numeric, ++- '_', '-', '/', '.', and ':'. */ ++- size_t tocode_len = strlen (tocode) + 3; ++- char *tocode_conv; ++- bool tocode_usealloca = __libc_use_alloca (tocode_len); ++- if (tocode_usealloca) ++- tocode_conv = (char *) alloca (tocode_len); ++- else ++- { ++- tocode_conv = (char *) malloc (tocode_len); ++- if (tocode_conv == NULL) ++- return (iconv_t) -1; ++- } ++- strip (tocode_conv, tocode); ++- tocode = (tocode_conv[2] == '\0' && tocode[0] != '\0' ++- ? upstr (tocode_conv, tocode) : tocode_conv); +++ __gconv_t cd; +++ struct gconv_spec conv_spec; ++ ++- size_t fromcode_len = strlen (fromcode) + 3; ++- char *fromcode_conv; ++- bool fromcode_usealloca = __libc_use_alloca (fromcode_len); ++- if (fromcode_usealloca) ++- fromcode_conv = (char *) alloca (fromcode_len); ++- else ++- { ++- fromcode_conv = (char *) malloc (fromcode_len); ++- if (fromcode_conv == NULL) ++- { ++- if (! tocode_usealloca) ++- free (tocode_conv); ++- return (iconv_t) -1; ++- } ++- } ++- strip (fromcode_conv, fromcode); ++- fromcode = (fromcode_conv[2] == '\0' && fromcode[0] != '\0' ++- ? upstr (fromcode_conv, fromcode) : fromcode_conv); +++ if (__gconv_create_spec (&conv_spec, fromcode, tocode) == NULL) +++ return (iconv_t) -1; ++ ++- __gconv_t cd; ++- int res = __gconv_open (tocode, fromcode, &cd, 0); +++ int res = __gconv_open (&conv_spec, &cd, 0); ++ ++- if (! fromcode_usealloca) ++- free (fromcode_conv); ++- if (! tocode_usealloca) ++- free (tocode_conv); +++ __gconv_destroy_spec (&conv_spec); ++ ++ if (__builtin_expect (res, __GCONV_OK) != __GCONV_OK) ++ { ++diff --git a/iconv/iconv_prog.c b/iconv/iconv_prog.c ++index 9709e4a701..d59979759c 100644 ++--- a/iconv/iconv_prog.c +++++ b/iconv/iconv_prog.c ++@@ -39,6 +39,7 @@ ++ #include ++ #include "iconv_prog.h" ++ #include "iconvconfig.h" +++#include "gconv_charset.h" ++ ++ /* Get libc version number. */ ++ #include "../version.h" ++@@ -118,8 +119,7 @@ main (int argc, char *argv[]) ++ { ++ int status = EXIT_SUCCESS; ++ int remaining; ++- iconv_t cd; ++- const char *orig_to_code; +++ __gconv_t cd; ++ struct charmap_t *from_charmap = NULL; ++ struct charmap_t *to_charmap = NULL; ++ ++@@ -139,39 +139,6 @@ main (int argc, char *argv[]) ++ exit (EXIT_SUCCESS); ++ } ++ ++- /* If we have to ignore errors make sure we use the appropriate name for ++- the to-character-set. */ ++- orig_to_code = to_code; ++- if (omit_invalid) ++- { ++- const char *errhand = strchrnul (to_code, '/'); ++- int nslash = 2; ++- char *newp; ++- char *cp; ++- ++- if (*errhand == '/') ++- { ++- --nslash; ++- errhand = strchrnul (errhand + 1, '/'); ++- ++- if (*errhand == '/') ++- { ++- --nslash; ++- errhand = strchr (errhand, '\0'); ++- } ++- } ++- ++- newp = (char *) alloca (errhand - to_code + nslash + 7 + 1); ++- cp = mempcpy (newp, to_code, errhand - to_code); ++- while (nslash-- > 0) ++- *cp++ = '/'; ++- if (cp[-1] != '/') ++- *cp++ = ','; ++- memcpy (cp, "IGNORE", sizeof ("IGNORE")); ++- ++- to_code = newp; ++- } ++- ++ /* POSIX 1003.2b introduces a silly thing: the arguments to -t anf -f ++ can be file names of charmaps. In this case iconv will have to read ++ those charmaps and use them to do the conversion. But there are ++@@ -184,10 +151,10 @@ main (int argc, char *argv[]) ++ file. */ ++ from_charmap = charmap_read (from_code, /*0, 1*/1, 0, 0, 0); ++ ++- if (strchr (orig_to_code, '/') != NULL) +++ if (strchr (to_code, '/') != NULL) ++ /* The to-name might be a charmap file name. Try reading the ++ file. */ ++- to_charmap = charmap_read (orig_to_code, /*0, 1,*/1, 0, 0, 0); +++ to_charmap = charmap_read (to_code, /*0, 1,*/1, 0, 0, 0); ++ ++ ++ /* At this point we have to handle two cases. The first one is ++@@ -201,9 +168,25 @@ main (int argc, char *argv[]) ++ argc, remaining, argv, output_file); ++ else ++ { +++ struct gconv_spec conv_spec; +++ int res; +++ +++ if (__gconv_create_spec (&conv_spec, from_code, to_code) == NULL) +++ { +++ error (EXIT_FAILURE, errno, +++ _("failed to start conversion processing")); +++ exit (1); +++ } +++ +++ if (omit_invalid) +++ conv_spec.ignore = true; +++ ++ /* Let's see whether we have these coded character sets. */ ++- cd = iconv_open (to_code, from_code); ++- if (cd == (iconv_t) -1) +++ res = __gconv_open (&conv_spec, &cd, 0); +++ +++ __gconv_destroy_spec (&conv_spec); +++ +++ if (res != __GCONV_OK) ++ { ++ if (errno == EINVAL) ++ { ++@@ -221,7 +204,7 @@ main (int argc, char *argv[]) ++ const char *from_pretty = ++ (from_code[0] ? from_code : nl_langinfo (CODESET)); ++ const char *to_pretty = ++- (orig_to_code[0] ? orig_to_code : nl_langinfo (CODESET)); +++ (to_code[0] ? to_code : nl_langinfo (CODESET)); ++ ++ if (from_wrong) ++ { ++diff --git a/iconv/tst-iconv-opt.c b/iconv/tst-iconv-opt.c ++new file mode 100644 ++index 0000000000..669d812a6a ++--- /dev/null +++++ b/iconv/tst-iconv-opt.c ++@@ -0,0 +1,347 @@ +++/* Test iconv's TRANSLIT and IGNORE option handling +++ +++ Copyright (C) 2020 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 +++ . */ +++ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++/* Run one iconv test. Arguments: +++ to: destination character set and options +++ from: source character set +++ input: input string to be converted +++ exp_in: expected number of bytes consumed +++ exp_ret: expected return value (error or number of irreversible conversions) +++ exp_out: expected output string +++ exp_err: expected value of `errno' after iconv returns. */ +++static void +++test_iconv (const char *to, const char *from, char *input, size_t exp_in, +++ size_t exp_ret, const char *exp_out, int exp_err) +++{ +++ iconv_t cd; +++ char outbuf[500]; +++ size_t inlen, outlen; +++ char *inptr, *outptr; +++ size_t n; +++ +++ cd = iconv_open (to, from); +++ TEST_VERIFY (cd != (iconv_t) -1); +++ +++ inlen = strlen (input); +++ outlen = sizeof (outbuf); +++ inptr = input; +++ outptr = outbuf; +++ +++ errno = 0; +++ n = iconv (cd, &inptr, &inlen, &outptr, &outlen); +++ +++ TEST_COMPARE (n, exp_ret); +++ TEST_VERIFY (inptr == input + exp_in); +++ TEST_COMPARE (errno, exp_err); +++ TEST_COMPARE_BLOB (outbuf, outptr - outbuf, exp_out, strlen (exp_out)); +++ TEST_VERIFY (iconv_close (cd) == 0); +++} +++ +++ +++/* We test option parsing by converting UTF-8 inputs to ASCII under various +++ option combinations. The UTF-8 inputs fall into three categories: +++ - ASCII-only, +++ - non-ASCII, +++ - non-ASCII with invalid UTF-8 characters. */ +++ +++/* 1. */ +++char ascii[] = "Just some ASCII text"; +++ +++/* 2. Valid UTF-8 input and some corresponding expected outputs with various +++ options. The two non-ASCII characters below are accented alphabets: +++ an `a' then an `o'. */ +++char utf8[] = "UTF-8 text with \u00E1 couple \u00F3f non-ASCII characters"; +++char u2a[] = "UTF-8 text with "; +++char u2a_translit[] = "UTF-8 text with a couple of non-ASCII characters"; +++char u2a_ignore[] = "UTF-8 text with couple f non-ASCII characters"; +++ +++/* 3. Invalid UTF-8 input and some corresponding expected outputs. \xff is +++ invalid UTF-8. It's followed by some valid but non-ASCII UTF-8. */ +++char iutf8[] = "Invalid UTF-8 \xff\u27E6text\u27E7"; +++char iu2a[] = "Invalid UTF-8 "; +++char iu2a_ignore[] = "Invalid UTF-8 text"; +++char iu2a_both[] = "Invalid UTF-8 [|text|]"; +++ +++/* 4. Another invalid UTF-8 input and corresponding expected outputs. This time +++ the valid non-ASCII UTF-8 characters appear before the invalid \xff. */ +++char jutf8[] = "Invalid \u27E6UTF-8\u27E7 \xfftext"; +++char ju2a[] = "Invalid "; +++char ju2a_translit[] = "Invalid [|UTF-8|] "; +++char ju2a_ignore[] = "Invalid UTF-8 text"; +++char ju2a_both[] = "Invalid [|UTF-8|] text"; +++ +++/* We also test option handling for character set names that have the form +++ "A/B". In this test, we test conversions "ISO-10646/UTF-8", and either +++ ISO-8859-1 or ASCII. */ +++ +++/* 5. Accented 'A' and 'a' characters in ISO-8859-1 and UTF-8, and an +++ equivalent ASCII transliteration. */ +++char iso8859_1_a[] = {0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, /* Accented A's. */ +++ 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, /* Accented a's. */ +++ 0x00}; +++char utf8_a[] = "\u00C0\u00C1\u00C2\u00C3\u00C4\u00C5" +++ "\u00E0\u00E1\u00E2\u00E3\u00E4\u00E5"; +++char ascii_a[] = "AAAAAAaaaaaa"; +++ +++/* 6. An invalid ASCII string where [0] is invalid and [1] is '~'. */ +++char iascii [] = {0x80, '~', '\0'}; +++char empty[] = ""; +++char ia2u_ignore[] = "~"; +++ +++static int +++do_test (void) +++{ +++ xsetlocale (LC_ALL, "en_US.UTF-8"); +++ +++ +++ /* 0. iconv_open should gracefully fail for invalid character sets. */ +++ +++ TEST_VERIFY (iconv_open ("INVALID", "UTF-8") == (iconv_t) -1); +++ TEST_VERIFY (iconv_open ("UTF-8", "INVALID") == (iconv_t) -1); +++ TEST_VERIFY (iconv_open ("INVALID", "INVALID") == (iconv_t) -1); +++ +++ +++ /* 1. ASCII-only UTF-8 input should convert to ASCII with no changes: */ +++ +++ test_iconv ("ASCII", "UTF-8", ascii, strlen (ascii), 0, ascii, 0); +++ test_iconv ("ASCII//", "UTF-8", ascii, strlen (ascii), 0, ascii, 0); +++ test_iconv ("ASCII//TRANSLIT", "UTF-8", ascii, strlen (ascii), 0, ascii, 0); +++ test_iconv ("ASCII//TRANSLIT//", "UTF-8", ascii, strlen (ascii), 0, ascii, +++ 0); +++ test_iconv ("ASCII//IGNORE", "UTF-8", ascii, strlen (ascii), 0, ascii, 0); +++ test_iconv ("ASCII//IGNORE//", "UTF-8", ascii, strlen (ascii), 0, ascii, 0); +++ +++ +++ /* 2. Valid UTF-8 input with non-ASCII characters: */ +++ +++ /* EILSEQ when converted to ASCII. */ +++ test_iconv ("ASCII", "UTF-8", utf8, strlen (u2a), (size_t) -1, u2a, EILSEQ); +++ +++ /* Converted without error with TRANSLIT enabled. */ +++ test_iconv ("ASCII//TRANSLIT", "UTF-8", utf8, strlen (utf8), 2, u2a_translit, +++ 0); +++ +++ /* EILSEQ with IGNORE enabled. Non-ASCII chars dropped from output. */ +++ test_iconv ("ASCII//IGNORE", "UTF-8", utf8, strlen (utf8), (size_t) -1, +++ u2a_ignore, EILSEQ); +++ +++ /* With TRANSLIT and IGNORE enabled, transliterated without error. We test +++ four combinations. */ +++ +++ test_iconv ("ASCII//TRANSLIT,IGNORE", "UTF-8", utf8, strlen (utf8), 2, +++ u2a_translit, 0); +++ test_iconv ("ASCII//TRANSLIT//IGNORE", "UTF-8", utf8, strlen (utf8), 2, +++ u2a_translit, 0); +++ test_iconv ("ASCII//IGNORE,TRANSLIT", "UTF-8", utf8, strlen (utf8), 2, +++ u2a_translit, 0); +++ /* Due to bug 19519, iconv was ignoring TRANSLIT for the following input. */ +++ test_iconv ("ASCII//IGNORE//TRANSLIT", "UTF-8", utf8, strlen (utf8), 2, +++ u2a_translit, 0); +++ +++ /* Misspellings of TRANSLIT and IGNORE are ignored, but conversion still +++ works while respecting any other correctly spelled options. */ +++ +++ test_iconv ("ASCII//T", "UTF-8", utf8, strlen (u2a), (size_t) -1, u2a, +++ EILSEQ); +++ test_iconv ("ASCII//TRANSLITERATE", "UTF-8", utf8, strlen (u2a), (size_t) -1, +++ u2a, EILSEQ); +++ test_iconv ("ASCII//I", "UTF-8", utf8, strlen (u2a), (size_t) -1, u2a, +++ EILSEQ); +++ test_iconv ("ASCII//IGNORED", "UTF-8", utf8, strlen (u2a), (size_t) -1, u2a, +++ EILSEQ); +++ test_iconv ("ASCII//TRANSLITERATE//IGNORED", "UTF-8", utf8, strlen (u2a), +++ (size_t) -1, u2a, EILSEQ); +++ test_iconv ("ASCII//IGNORED,TRANSLITERATE", "UTF-8", utf8, strlen (u2a), +++ (size_t) -1, u2a, EILSEQ); +++ test_iconv ("ASCII//T//I", "UTF-8", utf8, strlen (u2a), (size_t) -1, u2a, +++ EILSEQ); +++ +++ test_iconv ("ASCII//TRANSLIT//I", "UTF-8", utf8, strlen (utf8), 2, +++ u2a_translit, 0); +++ /* Due to bug 19519, iconv was ignoring TRANSLIT for the following input. */ +++ test_iconv ("ASCII//I//TRANSLIT", "UTF-8", utf8, strlen (utf8), 2, +++ u2a_translit, 0); +++ test_iconv ("ASCII//IGNORED,TRANSLIT", "UTF-8", utf8, strlen (utf8), 2, +++ u2a_translit, 0); +++ test_iconv ("ASCII//TRANSLIT,IGNORED", "UTF-8", utf8, strlen (utf8), 2, +++ u2a_translit, 0); +++ +++ test_iconv ("ASCII//IGNORE,T", "UTF-8", utf8, strlen (utf8), (size_t) -1, +++ u2a_ignore, EILSEQ); +++ test_iconv ("ASCII//T,IGNORE", "UTF-8", utf8, strlen (utf8), (size_t) -1, +++ u2a_ignore, EILSEQ); +++ /* Due to bug 19519, iconv was ignoring IGNORE for the following input. */ +++ test_iconv ("ASCII//TRANSLITERATE//IGNORE", "UTF-8", utf8, strlen (utf8), +++ (size_t) -1, u2a_ignore, EILSEQ); +++ test_iconv ("ASCII//IGNORE//TRANSLITERATE", "UTF-8", utf8, strlen (utf8), +++ (size_t) -1, u2a_ignore, EILSEQ); +++ +++ +++ /* 3. Invalid UTF-8 followed by some valid non-ASCII UTF-8 characters: */ +++ +++ /* EILSEQ; output is truncated at the first invalid UTF-8 character. */ +++ test_iconv ("ASCII", "UTF-8", iutf8, strlen (iu2a), (size_t) -1, iu2a, +++ EILSEQ); +++ +++ /* With TRANSLIT enabled: EILSEQ; output still truncated at the first invalid +++ UTF-8 character. */ +++ test_iconv ("ASCII//TRANSLIT", "UTF-8", iutf8, strlen (iu2a), (size_t) -1, +++ iu2a, EILSEQ); +++ +++ /* With IGNORE enabled: EILSEQ; output omits invalid UTF-8 characters and +++ valid UTF-8 non-ASCII characters. */ +++ test_iconv ("ASCII//IGNORE", "UTF-8", iutf8, strlen (iutf8), (size_t) -1, +++ iu2a_ignore, EILSEQ); +++ +++ /* With TRANSLIT and IGNORE enabled, output omits only invalid UTF-8 +++ characters and transliterates valid non-ASCII UTF-8 characters. We test +++ four combinations. */ +++ +++ test_iconv ("ASCII//TRANSLIT,IGNORE", "UTF-8", iutf8, strlen (iutf8), 2, +++ iu2a_both, 0); +++ /* Due to bug 19519, iconv was ignoring IGNORE for the following input. */ +++ test_iconv ("ASCII//TRANSLIT//IGNORE", "UTF-8", iutf8, strlen (iutf8), 2, +++ iu2a_both, 0); +++ test_iconv ("ASCII//IGNORE,TRANSLIT", "UTF-8", iutf8, strlen (iutf8), 2, +++ iu2a_both, 0); +++ /* Due to bug 19519, iconv was ignoring TRANSLIT for the following input. */ +++ test_iconv ("ASCII//IGNORE//TRANSLIT", "UTF-8", iutf8, strlen (iutf8), 2, +++ iu2a_both, 0); +++ +++ +++ /* 4. Invalid UTF-8 with valid non-ASCII UTF-8 chars appearing first: */ +++ +++ /* EILSEQ; output is truncated at the first non-ASCII character. */ +++ test_iconv ("ASCII", "UTF-8", jutf8, strlen (ju2a), (size_t) -1, ju2a, +++ EILSEQ); +++ +++ /* With TRANSLIT enabled: EILSEQ; output now truncated at the first invalid +++ UTF-8 character. */ +++ test_iconv ("ASCII//TRANSLIT", "UTF-8", jutf8, strlen (jutf8) - 5, +++ (size_t) -1, ju2a_translit, EILSEQ); +++ test_iconv ("ASCII//translit", "UTF-8", jutf8, strlen (jutf8) - 5, +++ (size_t) -1, ju2a_translit, EILSEQ); +++ +++ /* With IGNORE enabled: EILSEQ; output omits invalid UTF-8 characters and +++ valid UTF-8 non-ASCII characters. */ +++ test_iconv ("ASCII//IGNORE", "UTF-8", jutf8, strlen (jutf8), (size_t) -1, +++ ju2a_ignore, EILSEQ); +++ test_iconv ("ASCII//ignore", "UTF-8", jutf8, strlen (jutf8), (size_t) -1, +++ ju2a_ignore, EILSEQ); +++ +++ /* With TRANSLIT and IGNORE enabled, output omits only invalid UTF-8 +++ characters and transliterates valid non-ASCII UTF-8 characters. We test +++ several combinations. */ +++ +++ test_iconv ("ASCII//TRANSLIT,IGNORE", "UTF-8", jutf8, strlen (jutf8), 2, +++ ju2a_both, 0); +++ /* Due to bug 19519, iconv was ignoring IGNORE for the following input. */ +++ test_iconv ("ASCII//TRANSLIT//IGNORE", "UTF-8", jutf8, strlen (jutf8), 2, +++ ju2a_both, 0); +++ test_iconv ("ASCII//IGNORE,TRANSLIT", "UTF-8", jutf8, strlen (jutf8), 2, +++ ju2a_both, 0); +++ /* Due to bug 19519, iconv was ignoring TRANSLIT for the following input. */ +++ test_iconv ("ASCII//IGNORE//TRANSLIT", "UTF-8", jutf8, strlen (jutf8), 2, +++ ju2a_both, 0); +++ test_iconv ("ASCII//translit,ignore", "UTF-8", jutf8, strlen (jutf8), 2, +++ ju2a_both, 0); +++ /* Trailing whitespace and separators should be ignored. */ +++ test_iconv ("ASCII//IGNORE,TRANSLIT ", "UTF-8", jutf8, strlen (jutf8), 2, +++ ju2a_both, 0); +++ test_iconv ("ASCII//IGNORE,TRANSLIT/", "UTF-8", jutf8, strlen (jutf8), 2, +++ ju2a_both, 0); +++ test_iconv ("ASCII//IGNORE,TRANSLIT//", "UTF-8", jutf8, strlen (jutf8), 2, +++ ju2a_both, 0); +++ test_iconv ("ASCII//IGNORE,TRANSLIT,", "UTF-8", jutf8, strlen (jutf8), 2, +++ ju2a_both, 0); +++ test_iconv ("ASCII//IGNORE,TRANSLIT,,", "UTF-8", jutf8, strlen (jutf8), 2, +++ ju2a_both, 0); +++ test_iconv ("ASCII//IGNORE,TRANSLIT /,", "UTF-8", jutf8, strlen (jutf8), 2, +++ ju2a_both, 0); +++ +++ /* TRANSLIT or IGNORE suffixes in fromcode should be ignored. */ +++ test_iconv ("ASCII", "UTF-8//TRANSLIT", jutf8, strlen (ju2a), (size_t) -1, +++ ju2a, EILSEQ); +++ test_iconv ("ASCII", "UTF-8//IGNORE", jutf8, strlen (ju2a), (size_t) -1, +++ ju2a, EILSEQ); +++ test_iconv ("ASCII", "UTF-8//TRANSLIT,IGNORE", jutf8, strlen (ju2a), +++ (size_t) -1, ju2a, EILSEQ); +++ +++ +++ /* 5. Charset names of the form "A/B/": */ +++ +++ /* ISO-8859-1 is converted to UTF-8 without needing transliteration. */ +++ test_iconv ("ISO-10646/UTF-8", "ISO-8859-1", iso8859_1_a, +++ strlen (iso8859_1_a), 0, utf8_a, 0); +++ test_iconv ("ISO-10646/UTF-8/", "ISO-8859-1", iso8859_1_a, +++ strlen (iso8859_1_a), 0, utf8_a, 0); +++ test_iconv ("ISO-10646/UTF-8/IGNORE", "ISO-8859-1", iso8859_1_a, +++ strlen (iso8859_1_a), 0, utf8_a, 0); +++ test_iconv ("ISO-10646/UTF-8//IGNORE", "ISO-8859-1", iso8859_1_a, +++ strlen (iso8859_1_a), 0, utf8_a, 0); +++ test_iconv ("ISO-10646/UTF-8/TRANSLIT", "ISO-8859-1", iso8859_1_a, +++ strlen (iso8859_1_a), 0, utf8_a, 0); +++ test_iconv ("ISO-10646/UTF-8//TRANSLIT", "ISO-8859-1", iso8859_1_a, +++ strlen (iso8859_1_a), 0, utf8_a, 0); +++ test_iconv ("ISO-10646/UTF-8//TRANSLIT/IGNORE", "ISO-8859-1", iso8859_1_a, +++ strlen (iso8859_1_a), 0, utf8_a, 0); +++ test_iconv ("ISO-10646/UTF-8//TRANSLIT//IGNORE", "ISO-8859-1", iso8859_1_a, +++ strlen (iso8859_1_a), 0, utf8_a, 0); +++ test_iconv ("ISO-10646/UTF-8/TRANSLIT,IGNORE", "ISO-8859-1", iso8859_1_a, +++ strlen (iso8859_1_a), 0, utf8_a, 0); +++ +++ /* UTF-8 with accented A's is converted to ASCII with transliteration. */ +++ test_iconv ("ASCII", "ISO-10646/UTF-8", utf8_a, +++ 0, (size_t) -1, empty, EILSEQ); +++ test_iconv ("ASCII//IGNORE", "ISO-10646/UTF-8", utf8_a, +++ strlen (utf8_a), (size_t) -1, empty, EILSEQ); +++ test_iconv ("ASCII//TRANSLIT", "ISO-10646/UTF-8", utf8_a, +++ strlen (utf8_a), 12, ascii_a, 0); +++ +++ /* Invalid ASCII is converted to UTF-8 only with IGNORE. */ +++ test_iconv ("ISO-10646/UTF-8", "ASCII", iascii, strlen (empty), (size_t) -1, +++ empty, EILSEQ); +++ test_iconv ("ISO-10646/UTF-8/TRANSLIT", "ASCII", iascii, strlen (empty), +++ (size_t) -1, empty, EILSEQ); +++ test_iconv ("ISO-10646/UTF-8/IGNORE", "ASCII", iascii, strlen (iascii), +++ (size_t) -1, ia2u_ignore, EILSEQ); +++ test_iconv ("ISO-10646/UTF-8/TRANSLIT,IGNORE", "ASCII", iascii, +++ strlen (iascii), (size_t) -1, ia2u_ignore, EILSEQ); +++ /* Due to bug 19519, iconv was ignoring IGNORE for the following three +++ inputs: */ +++ test_iconv ("ISO-10646/UTF-8/TRANSLIT/IGNORE", "ASCII", iascii, +++ strlen (iascii), (size_t) -1, ia2u_ignore, EILSEQ); +++ test_iconv ("ISO-10646/UTF-8//TRANSLIT,IGNORE", "ASCII", iascii, +++ strlen (iascii), (size_t) -1, ia2u_ignore, EILSEQ); +++ test_iconv ("ISO-10646/UTF-8//TRANSLIT//IGNORE", "ASCII", iascii, +++ strlen (iascii), (size_t) -1, ia2u_ignore, EILSEQ); +++ +++ return 0; +++} +++ +++#include ++diff --git a/iconv/tst-iconv8.c b/iconv/tst-iconv8.c ++new file mode 100644 ++index 0000000000..0b92b19f66 ++--- /dev/null +++++ b/iconv/tst-iconv8.c ++@@ -0,0 +1,50 @@ +++/* Test iconv behavior on UCS4 conversions with //IGNORE. +++ Copyright (C) 2020 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 +++ . */ +++ +++/* Derived from BZ #26923 */ +++#include +++#include +++#include +++#include +++ +++static int +++do_test (void) +++{ +++ iconv_t cd = iconv_open ("UTF-8//IGNORE", "ISO-10646/UCS4/"); +++ TEST_VERIFY_EXIT (cd != (iconv_t) -1); +++ +++ /* +++ * Convert sequence beginning with an irreversible character into buffer that +++ * is too small. +++ */ +++ char input[12] = "\xe1\x80\xa1" "AAAAAAAAA"; +++ char *inptr = input; +++ size_t insize = sizeof (input); +++ char output[6]; +++ char *outptr = output; +++ size_t outsize = sizeof (output); +++ +++ TEST_VERIFY (iconv (cd, &inptr, &insize, &outptr, &outsize) == -1); +++ TEST_VERIFY (errno == E2BIG); +++ +++ TEST_VERIFY_EXIT (iconv_close (cd) != -1); +++ +++ return 0; +++} +++ +++#include ++diff --git a/iconv/tst-iconv_prog.sh b/iconv/tst-iconv_prog.sh ++new file mode 100644 ++index 0000000000..d8db7b335c ++--- /dev/null +++++ b/iconv/tst-iconv_prog.sh ++@@ -0,0 +1,284 @@ +++#!/bin/bash +++# Test for some known iconv(1) hangs from bug 19519, and miscellaneous +++# iconv(1) program error conditions. +++# Copyright (C) 2020 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 +++# . +++ +++codir=$1 +++test_wrapper_env="$2" +++run_program_env="$3" +++ +++# We have to have some directories in the library path. +++LIBPATH=$codir:$codir/iconvdata +++ +++# How the start the iconv(1) program. $from is not defined/expanded yet. +++ICONV=' +++$codir/elf/ld.so --library-path $LIBPATH --inhibit-rpath ${from}.so +++$codir/iconv/iconv_prog +++' +++ICONV="$test_wrapper_env $run_program_env $ICONV" +++ +++# List of known hangs; +++# Gathered by running an exhaustive 2 byte input search against glibc-2.28 +++hangarray=( +++"\x00\x23;-c;ANSI_X3.110;UTF-8//TRANSLIT//IGNORE" +++"\x00\xa1;-c;ARMSCII-8;UTF-8//TRANSLIT//IGNORE" +++"\x00\xa1;-c;ASMO_449;UTF-8//TRANSLIT//IGNORE" +++"\x00\x81;-c;BIG5;UTF-8//TRANSLIT//IGNORE" +++"\x00\xff;-c;BIG5HKSCS;UTF-8//TRANSLIT//IGNORE" +++"\x00\xff;-c;BRF;UTF-8//TRANSLIT//IGNORE" +++"\x00\xff;-c;BS_4730;UTF-8//TRANSLIT//IGNORE" +++"\x00\x81;-c;CP1250;UTF-8//TRANSLIT//IGNORE" +++"\x00\x98;-c;CP1251;UTF-8//TRANSLIT//IGNORE" +++"\x00\x81;-c;CP1252;UTF-8//TRANSLIT//IGNORE" +++"\x00\x81;-c;CP1253;UTF-8//TRANSLIT//IGNORE" +++"\x00\x81;-c;CP1254;UTF-8//TRANSLIT//IGNORE" +++"\x00\x81;-c;CP1255;UTF-8//TRANSLIT//IGNORE" +++"\x00\x81;-c;CP1257;UTF-8//TRANSLIT//IGNORE" +++"\x00\x81;-c;CP1258;UTF-8//TRANSLIT//IGNORE" +++"\xff\xff;-c;CP932;UTF-8//TRANSLIT//IGNORE" +++"\xff\xff;-c;CSA_Z243.4-1985-1;UTF-8//TRANSLIT//IGNORE" +++"\xff\xff;-c;CSA_Z243.4-1985-2;UTF-8//TRANSLIT//IGNORE" +++"\xff\xff;-c;DEC-MCS;UTF-8//TRANSLIT//IGNORE" +++"\xff\xff;-c;DIN_66003;UTF-8//TRANSLIT//IGNORE" +++"\xff\xff;-c;DS_2089;UTF-8//TRANSLIT//IGNORE" +++"\x00\x41;-c;EBCDIC-AT-DE;UTF-8//TRANSLIT//IGNORE" +++"\x00\x41;-c;EBCDIC-AT-DE-A;UTF-8//TRANSLIT//IGNORE" +++"\x00\x41;-c;EBCDIC-CA-FR;UTF-8//TRANSLIT//IGNORE" +++"\x00\x41;-c;EBCDIC-DK-NO;UTF-8//TRANSLIT//IGNORE" +++"\x00\x41;-c;EBCDIC-DK-NO-A;UTF-8//TRANSLIT//IGNORE" +++"\x00\x41;-c;EBCDIC-ES;UTF-8//TRANSLIT//IGNORE" +++"\x00\x41;-c;EBCDIC-ES-A;UTF-8//TRANSLIT//IGNORE" +++"\x00\x41;-c;EBCDIC-ES-S;UTF-8//TRANSLIT//IGNORE" +++"\x00\x41;-c;EBCDIC-FI-SE;UTF-8//TRANSLIT//IGNORE" +++"\x00\x41;-c;EBCDIC-FI-SE-A;UTF-8//TRANSLIT//IGNORE" +++"\x00\x41;-c;EBCDIC-FR;UTF-8//TRANSLIT//IGNORE" +++"\x00\x41;-c;EBCDIC-IS-FRISS;UTF-8//TRANSLIT//IGNORE" +++"\x00\x41;-c;EBCDIC-IT;UTF-8//TRANSLIT//IGNORE" +++"\x00\x41;-c;EBCDIC-PT;UTF-8//TRANSLIT//IGNORE" +++"\x00\x41;-c;EBCDIC-UK;UTF-8//TRANSLIT//IGNORE" +++"\x00\x41;-c;EBCDIC-US;UTF-8//TRANSLIT//IGNORE" +++"\xff\xff;-c;ES;UTF-8//TRANSLIT//IGNORE" +++"\xff\xff;-c;ES2;UTF-8//TRANSLIT//IGNORE" +++"\xff\xff;-c;EUC-CN;UTF-8//TRANSLIT//IGNORE" +++"\xff\xff;-c;EUC-JISX0213;UTF-8//TRANSLIT//IGNORE" +++"\xff\xff;-c;EUC-JP;UTF-8//TRANSLIT//IGNORE" +++"\xff\xff;-c;EUC-JP-MS;UTF-8//TRANSLIT//IGNORE" +++"\xff\xff;-c;EUC-KR;UTF-8//TRANSLIT//IGNORE" +++"\xff\xff;-c;EUC-TW;UTF-8//TRANSLIT//IGNORE" +++"\xff\xff;-c;GB18030;UTF-8//TRANSLIT//IGNORE" +++"\xff\xff;-c;GB_1988-80;UTF-8//TRANSLIT//IGNORE" +++"\xff\xff;-c;GBK;UTF-8//TRANSLIT//IGNORE" +++"\xff\xff;-c;GOST_19768-74;UTF-8//TRANSLIT//IGNORE" +++"\xff\xff;-c;GREEK7;UTF-8//TRANSLIT//IGNORE" +++"\xff\xff;-c;GREEK7-OLD;UTF-8//TRANSLIT//IGNORE" +++"\xff\xff;-c;GREEK-CCITT;UTF-8//TRANSLIT//IGNORE" +++"\xff\xff;-c;HP-GREEK8;UTF-8//TRANSLIT//IGNORE" +++"\xff\xff;-c;HP-ROMAN8;UTF-8//TRANSLIT//IGNORE" +++"\xff\xff;-c;HP-ROMAN9;UTF-8//TRANSLIT//IGNORE" +++"\xff\xff;-c;HP-THAI8;UTF-8//TRANSLIT//IGNORE" +++"\xff\xff;-c;HP-TURKISH8;UTF-8//TRANSLIT//IGNORE" +++"\x00\x41;-c;IBM038;UTF-8//TRANSLIT//IGNORE" +++"\x00\x80;-c;IBM1004;UTF-8//TRANSLIT//IGNORE" +++"\x00\xff;-c;IBM1008;UTF-8//TRANSLIT//IGNORE" +++"\xff\xff;-c;IBM1046;UTF-8//TRANSLIT//IGNORE" +++"\x00\x51;-c;IBM1132;UTF-8//TRANSLIT//IGNORE" +++"\x00\xa0;-c;IBM1133;UTF-8//TRANSLIT//IGNORE" +++"\x00\xce;-c;IBM1137;UTF-8//TRANSLIT//IGNORE" +++"\x00\x80;-c;IBM1161;UTF-8//TRANSLIT//IGNORE" +++"\x00\xdb;-c;IBM1162;UTF-8//TRANSLIT//IGNORE" +++"\x00\x70;-c;IBM12712;UTF-8//TRANSLIT//IGNORE" +++"\x00\x0f;-c;IBM1364;UTF-8" +++"\x0e\x0e;-c;IBM1364;UTF-8" +++"\x00\x0f;-c;IBM1371;UTF-8" +++"\x0e\x0e;-c;IBM1371;UTF-8" +++"\x00\x0f;-c;IBM1388;UTF-8" +++"\x0e\x0e;-c;IBM1388;UTF-8" +++"\x00\x0f;-c;IBM1390;UTF-8" +++"\x0e\x0e;-c;IBM1390;UTF-8" +++"\x00\x0f;-c;IBM1399;UTF-8" +++"\x0e\x0e;-c;IBM1399;UTF-8" +++"\x00\x53;-c;IBM16804;UTF-8//TRANSLIT//IGNORE" +++"\x00\x41;-c;IBM274;UTF-8//TRANSLIT//IGNORE" +++"\x00\x41;-c;IBM275;UTF-8//TRANSLIT//IGNORE" +++"\x00\x41;-c;IBM281;UTF-8//TRANSLIT//IGNORE" +++"\x00\x57;-c;IBM290;UTF-8//TRANSLIT//IGNORE" +++"\x00\x45;-c;IBM420;UTF-8//TRANSLIT//IGNORE" +++"\x00\x68;-c;IBM423;UTF-8//TRANSLIT//IGNORE" +++"\x00\x70;-c;IBM424;UTF-8//TRANSLIT//IGNORE" +++"\x00\x53;-c;IBM4517;UTF-8//TRANSLIT//IGNORE" +++"\x00\x53;-c;IBM4899;UTF-8//TRANSLIT//IGNORE" +++"\x00\xa5;-c;IBM4909;UTF-8//TRANSLIT//IGNORE" +++"\x00\xdc;-c;IBM4971;UTF-8//TRANSLIT//IGNORE" +++"\x00\x41;-c;IBM803;UTF-8//TRANSLIT//IGNORE" +++"\x00\x91;-c;IBM851;UTF-8//TRANSLIT//IGNORE" +++"\x00\x9b;-c;IBM856;UTF-8//TRANSLIT//IGNORE" +++"\x00\xd5;-c;IBM857;UTF-8//TRANSLIT//IGNORE" +++"\xff\xff;-c;IBM864;UTF-8//TRANSLIT//IGNORE" +++"\x00\x94;-c;IBM868;UTF-8//TRANSLIT//IGNORE" +++"\x00\x94;-c;IBM869;UTF-8//TRANSLIT//IGNORE" +++"\xff\xff;-c;IBM874;UTF-8//TRANSLIT//IGNORE" +++"\x00\x6a;-c;IBM875;UTF-8//TRANSLIT//IGNORE" +++"\x00\x41;-c;IBM880;UTF-8//TRANSLIT//IGNORE" +++"\x00\x80;-c;IBM891;UTF-8//TRANSLIT//IGNORE" +++"\xff\xff;-c;IBM903;UTF-8//TRANSLIT//IGNORE" +++"\xff\xff;-c;IBM904;UTF-8//TRANSLIT//IGNORE" +++"\x00\x41;-c;IBM905;UTF-8//TRANSLIT//IGNORE" +++"\x00\x80;-c;IBM9066;UTF-8//TRANSLIT//IGNORE" +++"\x00\x48;-c;IBM918;UTF-8//TRANSLIT//IGNORE" +++"\x00\x57;-c;IBM930;UTF-8//TRANSLIT//IGNORE" +++"\x00\x80;-c;IBM932;UTF-8//TRANSLIT//IGNORE" +++"\x00\x41;-c;IBM933;UTF-8//TRANSLIT//IGNORE" +++"\x00\x41;-c;IBM935;UTF-8//TRANSLIT//IGNORE" +++"\x00\x41;-c;IBM937;UTF-8//TRANSLIT//IGNORE" +++"\x00\x41;-c;IBM939;UTF-8//TRANSLIT//IGNORE" +++"\x00\x80;-c;IBM943;UTF-8//TRANSLIT//IGNORE" +++"\xff\xff;-c;INIS;UTF-8//TRANSLIT//IGNORE" +++"\xff\xff;-c;INIS-8;UTF-8//TRANSLIT//IGNORE" +++"\xff\xff;-c;INIS-CYRILLIC;UTF-8//TRANSLIT//IGNORE" +++"\x00\xec;-c;ISIRI-3342;UTF-8//TRANSLIT//IGNORE" +++"\x00\xec;-c;ISO_10367-BOX;UTF-8//TRANSLIT//IGNORE" +++"\xff\xff;-c;ISO-2022-CN;UTF-8//TRANSLIT//IGNORE" +++"\xff\xff;-c;ISO-2022-CN-EXT;UTF-8//TRANSLIT//IGNORE" +++"\xff\xff;-c;ISO-2022-JP;UTF-8//TRANSLIT//IGNORE" +++"\xff\xff;-c;ISO-2022-JP-2;UTF-8//TRANSLIT//IGNORE" +++"\xff\xff;-c;ISO-2022-JP-3;UTF-8//TRANSLIT//IGNORE" +++"\xff\xff;-c;ISO-2022-KR;UTF-8//TRANSLIT//IGNORE" +++"\xff\xff;-c;ISO_2033;UTF-8//TRANSLIT//IGNORE" +++"\xff\xff;-c;ISO_5427;UTF-8//TRANSLIT//IGNORE" +++"\xff\xff;-c;ISO_5427-EXT;UTF-8//TRANSLIT//IGNORE" +++"\xff\xff;-c;ISO_5428;UTF-8//TRANSLIT//IGNORE" +++"\x00\xa4;-c;ISO_6937;UTF-8//TRANSLIT//IGNORE" +++"\x00\xa0;-c;ISO_6937-2;UTF-8//TRANSLIT//IGNORE" +++"\xff\xff;-c;ISO-8859-11;UTF-8//TRANSLIT//IGNORE" +++"\x00\xa5;-c;ISO-8859-3;UTF-8//TRANSLIT//IGNORE" +++"\xff\xff;-c;ISO-8859-6;UTF-8//TRANSLIT//IGNORE" +++"\xff\xff;-c;ISO-8859-7;UTF-8//TRANSLIT//IGNORE" +++"\xff\xff;-c;ISO-8859-8;UTF-8//TRANSLIT//IGNORE" +++"\x00\x80;-c;ISO-IR-197;UTF-8//TRANSLIT//IGNORE" +++"\x00\x80;-c;ISO-IR-209;UTF-8//TRANSLIT//IGNORE" +++"\x00\x80;-c;IT;UTF-8//TRANSLIT//IGNORE" +++"\x00\x80;-c;JIS_C6220-1969-RO;UTF-8//TRANSLIT//IGNORE" +++"\x00\x80;-c;JIS_C6229-1984-B;UTF-8//TRANSLIT//IGNORE" +++"\x00\x80;-c;JOHAB;UTF-8//TRANSLIT//IGNORE" +++"\x00\x80;-c;JUS_I.B1.002;UTF-8//TRANSLIT//IGNORE" +++"\x00\x80;-c;KOI-8;UTF-8//TRANSLIT//IGNORE" +++"\x00\x88;-c;KOI8-T;UTF-8//TRANSLIT//IGNORE" +++"\xff\xff;-c;KSC5636;UTF-8//TRANSLIT//IGNORE" +++"\xff\xff;-c;LATIN-GREEK;UTF-8//TRANSLIT//IGNORE" +++"\xff\xff;-c;LATIN-GREEK-1;UTF-8//TRANSLIT//IGNORE" +++"\x00\xf6;-c;MAC-IS;UTF-8//TRANSLIT//IGNORE" +++"\xff\xff;-c;MSZ_7795.3;UTF-8//TRANSLIT//IGNORE" +++"\xff\xff;-c;NATS-DANO;UTF-8//TRANSLIT//IGNORE" +++"\xff\xff;-c;NATS-SEFI;UTF-8//TRANSLIT//IGNORE" +++"\xff\xff;-c;NC_NC00-10;UTF-8//TRANSLIT//IGNORE" +++"\xff\xff;-c;NF_Z_62-010;UTF-8//TRANSLIT//IGNORE" +++"\xff\xff;-c;NF_Z_62-010_1973;UTF-8//TRANSLIT//IGNORE" +++"\xff\xff;-c;NS_4551-1;UTF-8//TRANSLIT//IGNORE" +++"\xff\xff;-c;NS_4551-2;UTF-8//TRANSLIT//IGNORE" +++"\xff\xff;-c;PT;UTF-8//TRANSLIT//IGNORE" +++"\xff\xff;-c;PT2;UTF-8//TRANSLIT//IGNORE" +++"\x00\x98;-c;RK1048;UTF-8//TRANSLIT//IGNORE" +++"\x00\x98;-c;SEN_850200_B;UTF-8//TRANSLIT//IGNORE" +++"\x00\x98;-c;SEN_850200_C;UTF-8//TRANSLIT//IGNORE" +++"\x00\x80;-c;Shift_JISX0213;UTF-8//TRANSLIT//IGNORE" +++"\x00\x80;-c;SJIS;UTF-8//TRANSLIT//IGNORE" +++"\x00\x23;-c;T.61-8BIT;UTF-8//TRANSLIT//IGNORE" +++"\xff\xff;-c;TIS-620;UTF-8//TRANSLIT//IGNORE" +++"\xff\xff;-c;TSCII;UTF-8//TRANSLIT//IGNORE" +++"\xff\xff;-c;UHC;UTF-8//TRANSLIT//IGNORE" +++"\x00\xd8;-c;UNICODE;UTF-8//TRANSLIT//IGNORE" +++"\x00\xdc;-c;UTF-16;UTF-8//TRANSLIT//IGNORE" +++"\xdc\x00;-c;UTF-16BE;UTF-8//TRANSLIT//IGNORE" +++"\x00\xdc;-c;UTF-16LE;UTF-8//TRANSLIT//IGNORE" +++"\xff\xff;-c;UTF-7;UTF-8//TRANSLIT//IGNORE" +++"\x00\x81;-c;WIN-SAMI-2;UTF-8//TRANSLIT//IGNORE" +++) +++ +++# List of option combinations that *should* lead to an error +++errorarray=( +++# Converting from/to invalid character sets should cause error +++"\x00\x00;;INVALID;INVALID" +++"\x00\x00;;INVALID;UTF-8" +++"\x00\x00;;UTF-8;INVALID" +++) +++ +++# Requires $twobyte input, $c flag, $from, and $to to be set; sets $ret +++execute_test () +++{ +++ eval PROG=\"$ICONV\" +++ echo -en "$twobyte" \ +++ | timeout -k 4 3 $PROG $c -f $from -t "$to" &>/dev/null +++ ret=$? +++} +++ +++check_hangtest_result () +++{ +++ if [ "$ret" -eq "124" ] || [ "$ret" -eq "137" ]; then # timeout/hang +++ result="HANG" +++ else +++ if [ "$ret" -eq "139" ]; then # segfault +++ result="SEGFAULT" +++ else +++ if [ "$ret" -gt "127" ]; then # unexpected error +++ result="UNEXPECTED" +++ else +++ result="OK" +++ fi +++ fi +++ fi +++ +++ echo -n "$result: from: \"$from\", to: \"$to\"," +++ echo " input \"$twobyte\", flags \"$c\"" +++ +++ if [ "$result" != "OK" ]; then +++ exit 1 +++ fi +++} +++ +++for hangcommand in "${hangarray[@]}"; do +++ twobyte="$(echo "$hangcommand" | cut -d";" -f 1)" +++ c="$(echo "$hangcommand" | cut -d";" -f 2)" +++ from="$(echo "$hangcommand" | cut -d";" -f 3)" +++ to="$(echo "$hangcommand" | cut -d";" -f 4)" +++ execute_test +++ check_hangtest_result +++done +++ +++check_errtest_result () +++{ +++ if [ "$ret" -eq "1" ]; then # we errored out as expected +++ result="PASS" +++ else +++ result="FAIL" +++ fi +++ echo -n "$result: from: \"$from\", to: \"$to\"," +++ echo " input \"$twobyte\", flags \"$c\", return code $ret" +++ +++ if [ "$result" != "PASS" ]; then +++ exit 1 +++ fi +++} +++ +++for errorcommand in "${errorarray[@]}"; do +++ twobyte="$(echo "$errorcommand" | cut -d";" -f 1)" +++ c="$(echo "$errorcommand" | cut -d";" -f 2)" +++ from="$(echo "$errorcommand" | cut -d";" -f 3)" +++ to="$(echo "$errorcommand" | cut -d";" -f 4)" +++ execute_test +++ check_errtest_result +++done ++diff --git a/iconvdata/Makefile b/iconvdata/Makefile ++index c83962f351..31b1cf8a9f 100644 ++--- a/iconvdata/Makefile +++++ b/iconvdata/Makefile ++@@ -1,4 +1,5 @@ ++ # Copyright (C) 1997-2020 Free Software Foundation, Inc. +++# Copyright (C) The GNU Toolchain Authors. ++ # This file is part of the GNU C Library. ++ ++ # The GNU C Library is free software; you can redistribute it and/or ++@@ -73,7 +74,9 @@ modules.so := $(addsuffix .so, $(modules)) ++ ifeq (yes,$(build-shared)) ++ tests = bug-iconv1 bug-iconv2 tst-loading tst-e2big tst-iconv4 bug-iconv4 \ ++ tst-iconv6 bug-iconv5 bug-iconv6 tst-iconv7 bug-iconv8 bug-iconv9 \ ++- bug-iconv10 bug-iconv11 bug-iconv12 +++ bug-iconv10 bug-iconv11 bug-iconv12 bug-iconv13 bug-iconv14 \ +++ bug-iconv15 \ +++ tst-iconv-iso-2022-cn-ext ++ ifeq ($(have-thread-library),yes) ++ tests += bug-iconv3 ++ endif ++@@ -316,6 +319,12 @@ $(objpfx)bug-iconv10.out: $(objpfx)gconv-modules \ ++ $(addprefix $(objpfx),$(modules.so)) ++ $(objpfx)bug-iconv12.out: $(objpfx)gconv-modules \ ++ $(addprefix $(objpfx),$(modules.so)) +++$(objpfx)bug-iconv14.out: $(objpfx)gconv-modules \ +++ $(addprefix $(objpfx),$(modules.so)) +++$(objpfx)bug-iconv15.out: $(addprefix $(objpfx), $(gconv-modules)) \ +++ $(addprefix $(objpfx),$(modules.so)) +++$(objpfx)tst-iconv-iso-2022-cn-ext.out: $(addprefix $(objpfx), $(gconv-modules)) \ +++ $(addprefix $(objpfx),$(modules.so)) ++ ++ $(objpfx)iconv-test.out: run-iconv-test.sh $(objpfx)gconv-modules \ ++ $(addprefix $(objpfx),$(modules.so)) \ ++diff --git a/iconvdata/bug-iconv13.c b/iconvdata/bug-iconv13.c ++new file mode 100644 ++index 0000000000..87aaff398e ++--- /dev/null +++++ b/iconvdata/bug-iconv13.c ++@@ -0,0 +1,53 @@ +++/* bug 24973: Test EUC-KR module +++ Copyright (C) 2020 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 +++ . */ +++ +++#include +++#include +++#include +++#include +++ +++static int +++do_test (void) +++{ +++ iconv_t cd = iconv_open ("UTF-8//IGNORE", "EUC-KR"); +++ TEST_VERIFY_EXIT (cd != (iconv_t) -1); +++ +++ /* 0xfe (->0x7e : row 94) and 0xc9 (->0x49 : row 41) are user-defined +++ areas, which are not allowed and should be skipped over due to +++ //IGNORE. The trailing 0xfe also is an incomplete sequence, which +++ should be checked first. */ +++ char input[4] = { '\xc9', '\xa1', '\0', '\xfe' }; +++ char *inptr = input; +++ size_t insize = sizeof (input); +++ char output[4]; +++ char *outptr = output; +++ size_t outsize = sizeof (output); +++ +++ /* This used to crash due to buffer overrun. */ +++ TEST_VERIFY (iconv (cd, &inptr, &insize, &outptr, &outsize) == (size_t) -1); +++ TEST_VERIFY (errno == EINVAL); +++ /* The conversion should produce one character, the converted null +++ character. */ +++ TEST_VERIFY (sizeof (output) - outsize == 1); +++ +++ TEST_VERIFY_EXIT (iconv_close (cd) != -1); +++ +++ return 0; +++} +++ +++#include ++diff --git a/iconvdata/bug-iconv14.c b/iconvdata/bug-iconv14.c ++new file mode 100644 ++index 0000000000..902f140fa9 ++--- /dev/null +++++ b/iconvdata/bug-iconv14.c ++@@ -0,0 +1,127 @@ +++/* Assertion in ISO-2022-JP-3 due to two-character sequence (bug 27256). +++ Copyright (C) 2021 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 +++ . */ +++ +++#include +++#include +++#include +++#include +++ +++/* Use an escape sequence to return to the initial state. */ +++static void +++with_escape_sequence (void) +++{ +++ iconv_t c = iconv_open ("UTF-8", "ISO-2022-JP-3"); +++ TEST_VERIFY_EXIT (c != (iconv_t) -1); +++ +++ char in[] = "\e$(O+D\e(B"; +++ char *inbuf = in; +++ size_t inleft = strlen (in); +++ char out[3]; /* Space for one output character. */ +++ char *outbuf; +++ size_t outleft; +++ +++ outbuf = out; +++ outleft = sizeof (out); +++ TEST_COMPARE (iconv (c, &inbuf, &inleft, &outbuf, &outleft), (size_t) -1); +++ TEST_COMPARE (errno, E2BIG); +++ TEST_COMPARE (inleft, 3); +++ TEST_COMPARE (inbuf - in, strlen (in) - 3); +++ TEST_COMPARE (outleft, sizeof (out) - 2); +++ TEST_COMPARE (outbuf - out, 2); +++ TEST_COMPARE (out[0] & 0xff, 0xc3); +++ TEST_COMPARE (out[1] & 0xff, 0xa6); +++ +++ /* Return to the initial shift state, producing the pending +++ character. */ +++ outbuf = out; +++ outleft = sizeof (out); +++ TEST_COMPARE (iconv (c, &inbuf, &inleft, &outbuf, &outleft), 0); +++ TEST_COMPARE (inleft, 0); +++ TEST_COMPARE (inbuf - in, strlen (in)); +++ TEST_COMPARE (outleft, sizeof (out) - 2); +++ TEST_COMPARE (outbuf - out, 2); +++ TEST_COMPARE (out[0] & 0xff, 0xcc); +++ TEST_COMPARE (out[1] & 0xff, 0x80); +++ +++ /* Nothing should be flushed the second time. */ +++ outbuf = out; +++ outleft = sizeof (out); +++ TEST_COMPARE (iconv (c, NULL, 0, &outbuf, &outleft), 0); +++ TEST_COMPARE (outleft, sizeof (out)); +++ TEST_COMPARE (outbuf - out, 0); +++ TEST_COMPARE (out[0] & 0xff, 0xcc); +++ TEST_COMPARE (out[1] & 0xff, 0x80); +++ +++ TEST_COMPARE (iconv_close (c), 0); +++} +++ +++/* Use an explicit flush to return to the initial state. */ +++static void +++with_flush (void) +++{ +++ iconv_t c = iconv_open ("UTF-8", "ISO-2022-JP-3"); +++ TEST_VERIFY_EXIT (c != (iconv_t) -1); +++ +++ char in[] = "\e$(O+D"; +++ char *inbuf = in; +++ size_t inleft = strlen (in); +++ char out[3]; /* Space for one output character. */ +++ char *outbuf; +++ size_t outleft; +++ +++ outbuf = out; +++ outleft = sizeof (out); +++ TEST_COMPARE (iconv (c, &inbuf, &inleft, &outbuf, &outleft), (size_t) -1); +++ TEST_COMPARE (errno, E2BIG); +++ TEST_COMPARE (inleft, 0); +++ TEST_COMPARE (inbuf - in, strlen (in)); +++ TEST_COMPARE (outleft, sizeof (out) - 2); +++ TEST_COMPARE (outbuf - out, 2); +++ TEST_COMPARE (out[0] & 0xff, 0xc3); +++ TEST_COMPARE (out[1] & 0xff, 0xa6); +++ +++ /* Flush the pending character. */ +++ outbuf = out; +++ outleft = sizeof (out); +++ TEST_COMPARE (iconv (c, NULL, 0, &outbuf, &outleft), 0); +++ TEST_COMPARE (outleft, sizeof (out) - 2); +++ TEST_COMPARE (outbuf - out, 2); +++ TEST_COMPARE (out[0] & 0xff, 0xcc); +++ TEST_COMPARE (out[1] & 0xff, 0x80); +++ +++ /* Nothing should be flushed the second time. */ +++ outbuf = out; +++ outleft = sizeof (out); +++ TEST_COMPARE (iconv (c, NULL, 0, &outbuf, &outleft), 0); +++ TEST_COMPARE (outleft, sizeof (out)); +++ TEST_COMPARE (outbuf - out, 0); +++ TEST_COMPARE (out[0] & 0xff, 0xcc); +++ TEST_COMPARE (out[1] & 0xff, 0x80); +++ +++ TEST_COMPARE (iconv_close (c), 0); +++} +++ +++static int +++do_test (void) +++{ +++ with_escape_sequence (); +++ with_flush (); +++ return 0; +++} +++ +++#include ++diff --git a/iconvdata/bug-iconv15.c b/iconvdata/bug-iconv15.c ++new file mode 100644 ++index 0000000000..cc04bd0313 ++--- /dev/null +++++ b/iconvdata/bug-iconv15.c ++@@ -0,0 +1,60 @@ +++/* Bug 28524: Conversion from ISO-2022-JP-3 with iconv +++ may emit spurious NUL character on state reset. +++ Copyright (C) The GNU Toolchain Authors. +++ 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 +++ . */ +++ +++#include +++#include +++#include +++ +++static int +++do_test (void) +++{ +++ char in[] = "\x1b(I"; +++ char *inbuf = in; +++ size_t inleft = sizeof (in) - 1; +++ char out[1]; +++ char *outbuf = out; +++ size_t outleft = sizeof (out); +++ iconv_t cd; +++ +++ cd = iconv_open ("UTF8", "ISO-2022-JP-3"); +++ TEST_VERIFY_EXIT (cd != (iconv_t) -1); +++ +++ /* First call to iconv should alter internal state. +++ Now, JISX0201_Kana_set is selected and +++ state value != ASCII_set. */ +++ TEST_VERIFY (iconv (cd, &inbuf, &inleft, &outbuf, &outleft) != (size_t) -1); +++ +++ /* No bytes should have been added to +++ the output buffer at this point. */ +++ TEST_VERIFY (outbuf == out); +++ TEST_VERIFY (outleft == sizeof (out)); +++ +++ /* Second call shall emit spurious NUL character in unpatched glibc. */ +++ TEST_VERIFY (iconv (cd, NULL, NULL, &outbuf, &outleft) != (size_t) -1); +++ +++ /* No characters are expected to be produced. */ +++ TEST_VERIFY (outbuf == out); +++ TEST_VERIFY (outleft == sizeof (out)); +++ +++ TEST_VERIFY_EXIT (iconv_close (cd) != -1); +++ +++ return 0; +++} +++ +++#include ++diff --git a/iconvdata/euc-kr.c b/iconvdata/euc-kr.c ++index b0d56cf3ee..1045bae926 100644 ++--- a/iconvdata/euc-kr.c +++++ b/iconvdata/euc-kr.c ++@@ -80,11 +80,7 @@ euckr_from_ucs4 (uint32_t ch, unsigned char *cp) ++ \ ++ if (ch <= 0x9f) \ ++ ++inptr; \ ++- /* 0xfe(->0x7e : row 94) and 0xc9(->0x59 : row 41) are \ ++- user-defined areas. */ \ ++- else if (__builtin_expect (ch == 0xa0, 0) \ ++- || __builtin_expect (ch > 0xfe, 0) \ ++- || __builtin_expect (ch == 0xc9, 0)) \ +++ else if (__glibc_unlikely (ch == 0xa0)) \ ++ { \ ++ /* This is illegal. */ \ ++ STANDARD_FROM_LOOP_ERR_HANDLER (1); \ ++diff --git a/iconvdata/ibm1364.c b/iconvdata/ibm1364.c ++index 49e7267ab4..521f0825b7 100644 ++--- a/iconvdata/ibm1364.c +++++ b/iconvdata/ibm1364.c ++@@ -158,24 +158,14 @@ enum ++ \ ++ if (__builtin_expect (ch, 0) == SO) \ ++ { \ ++- /* Shift OUT, change to DBCS converter. */ \ ++- if (curcs == db) \ ++- { \ ++- result = __GCONV_ILLEGAL_INPUT; \ ++- break; \ ++- } \ +++ /* Shift OUT, change to DBCS converter (redundant escape okay). */ \ ++ curcs = db; \ ++ ++inptr; \ ++ continue; \ ++ } \ ++ if (__builtin_expect (ch, 0) == SI) \ ++ { \ ++- /* Shift IN, change to SBCS converter. */ \ ++- if (curcs == sb) \ ++- { \ ++- result = __GCONV_ILLEGAL_INPUT; \ ++- break; \ ++- } \ +++ /* Shift IN, change to SBCS converter (redundant escape okay). */ \ ++ curcs = sb; \ ++ ++inptr; \ ++ continue; \ ++diff --git a/iconvdata/iso-2022-cn-ext.c b/iconvdata/iso-2022-cn-ext.c ++index 947b807421..34e1010bed 100644 ++--- a/iconvdata/iso-2022-cn-ext.c +++++ b/iconvdata/iso-2022-cn-ext.c ++@@ -575,6 +575,12 @@ DIAG_IGNORE_Os_NEEDS_COMMENT (5, "-Wmaybe-uninitialized"); ++ { \ ++ const char *escseq; \ ++ \ +++ if (outptr + 4 > outend) \ +++ { \ +++ result = __GCONV_FULL_OUTPUT; \ +++ break; \ +++ } \ +++ \ ++ assert (used == CNS11643_2_set); /* XXX */ \ ++ escseq = "*H"; \ ++ *outptr++ = ESC; \ ++@@ -588,6 +594,12 @@ DIAG_IGNORE_Os_NEEDS_COMMENT (5, "-Wmaybe-uninitialized"); ++ { \ ++ const char *escseq; \ ++ \ +++ if (outptr + 4 > outend) \ +++ { \ +++ result = __GCONV_FULL_OUTPUT; \ +++ break; \ +++ } \ +++ \ ++ assert ((used >> 5) >= 3 && (used >> 5) <= 7); \ ++ escseq = "+I+J+K+L+M" + ((used >> 5) - 3) * 2; \ ++ *outptr++ = ESC; \ ++diff --git a/iconvdata/iso-2022-jp-3.c b/iconvdata/iso-2022-jp-3.c ++index 8c3b7e627e..c7b470db61 100644 ++--- a/iconvdata/iso-2022-jp-3.c +++++ b/iconvdata/iso-2022-jp-3.c ++@@ -1,5 +1,6 @@ ++ /* Conversion module for ISO-2022-JP-3. ++ Copyright (C) 1998-2020 Free Software Foundation, Inc. +++ Copyright (C) The GNU Toolchain Authors. ++ This file is part of the GNU C Library. ++ Contributed by Ulrich Drepper , 1998, ++ and Bruno Haible , 2002. ++@@ -67,10 +68,15 @@ enum ++ CURRENT_SEL_MASK = 7 << 3 ++ }; ++ ++-/* During UCS-4 to ISO-2022-JP-3 conversion, the COUNT element of the state ++- also contains the last two bytes to be output, shifted by 6 bits, and a ++- one-bit indicator whether they must be preceded by the shift sequence, ++- in bit 22. */ +++/* During UCS-4 to ISO-2022-JP-3 conversion, the COUNT element of the +++ state also contains the last two bytes to be output, shifted by 6 +++ bits, and a one-bit indicator whether they must be preceded by the +++ shift sequence, in bit 22. During ISO-2022-JP-3 to UCS-4 +++ conversion, COUNT may also contain a non-zero pending wide +++ character, shifted by six bits. This happens for certain inputs in +++ JISX0213_1_2004_set and JISX0213_2_set if the second wide character +++ in a combining sequence cannot be written because the buffer is +++ full. */ ++ ++ /* Since this is a stateful encoding we have to provide code which resets ++ the output state to the initial state. This has to be done during the ++@@ -80,10 +86,27 @@ enum ++ { \ ++ if (FROM_DIRECTION) \ ++ { \ ++- /* It's easy, we don't have to emit anything, we just reset the \ ++- state for the input. */ \ ++- data->__statep->__count &= 7; \ ++- data->__statep->__count |= ASCII_set; \ +++ uint32_t ch = data->__statep->__count >> 6; \ +++ \ +++ if (__glibc_unlikely (ch != 0)) \ +++ { \ +++ if (__glibc_likely (outbuf + 4 <= outend)) \ +++ { \ +++ /* Write out the last character. */ \ +++ put32u (outbuf, ch); \ +++ outbuf += 4; \ +++ data->__statep->__count &= 7; \ +++ data->__statep->__count |= ASCII_set; \ +++ } \ +++ else \ +++ /* We don't have enough room in the output buffer. */ \ +++ status = __GCONV_FULL_OUTPUT; \ +++ } \ +++ else \ +++ { \ +++ data->__statep->__count &= 7; \ +++ data->__statep->__count |= ASCII_set; \ +++ } \ ++ } \ ++ else \ ++ { \ ++@@ -151,7 +174,21 @@ enum ++ #define LOOPFCT FROM_LOOP ++ #define BODY \ ++ { \ ++- uint32_t ch = *inptr; \ +++ uint32_t ch; \ +++ \ +++ /* Output any pending character. */ \ +++ ch = set >> 6; \ +++ if (__glibc_unlikely (ch != 0)) \ +++ { \ +++ put32 (outptr, ch); \ +++ outptr += 4; \ +++ /* Remove the pending character, but preserve state bits. */ \ +++ set &= (1 << 6) - 1; \ +++ continue; \ +++ } \ +++ \ +++ /* Otherwise read the next input byte. */ \ +++ ch = *inptr; \ ++ \ ++ /* Recognize escape sequences. */ \ ++ if (__glibc_unlikely (ch == ESC)) \ ++@@ -297,21 +334,25 @@ enum ++ uint32_t u1 = __jisx0213_to_ucs_combining[ch - 1][0]; \ ++ uint32_t u2 = __jisx0213_to_ucs_combining[ch - 1][1]; \ ++ \ +++ inptr += 2; \ +++ \ +++ put32 (outptr, u1); \ +++ outptr += 4; \ +++ \ ++ /* See whether we have room for two characters. */ \ ++- if (outptr + 8 <= outend) \ +++ if (outptr + 4 <= outend) \ ++ { \ ++- inptr += 2; \ ++- put32 (outptr, u1); \ ++- outptr += 4; \ ++ put32 (outptr, u2); \ ++ outptr += 4; \ ++ continue; \ ++ } \ ++- else \ ++- { \ ++- result = __GCONV_FULL_OUTPUT; \ ++- break; \ ++- } \ +++ \ +++ /* Otherwise store only the first character now, and \ +++ put the second one into the queue. */ \ +++ set |= u2 << 6; \ +++ /* Tell the caller why we terminate the loop. */ \ +++ result = __GCONV_FULL_OUTPUT; \ +++ break; \ ++ } \ ++ \ ++ inptr += 2; \ ++diff --git a/iconvdata/ksc5601.h b/iconvdata/ksc5601.h ++index d3eb3a4ff8..f5cdc72797 100644 ++--- a/iconvdata/ksc5601.h +++++ b/iconvdata/ksc5601.h ++@@ -50,15 +50,15 @@ ksc5601_to_ucs4 (const unsigned char **s, size_t avail, unsigned char offset) ++ unsigned char ch2; ++ int idx; ++ +++ if (avail < 2) +++ return 0; +++ ++ /* row 94(0x7e) and row 41(0x49) are user-defined area in KS C 5601 */ ++ ++ if (ch < offset || (ch - offset) <= 0x20 || (ch - offset) >= 0x7e ++ || (ch - offset) == 0x49) ++ return __UNKNOWN_10646_CHAR; ++ ++- if (avail < 2) ++- return 0; ++- ++ ch2 = (*s)[1]; ++ if (ch2 < offset || (ch2 - offset) <= 0x20 || (ch2 - offset) >= 0x7f) ++ return __UNKNOWN_10646_CHAR; ++diff --git a/iconvdata/tst-iconv-iso-2022-cn-ext.c b/iconvdata/tst-iconv-iso-2022-cn-ext.c ++new file mode 100644 ++index 0000000000..96a8765fd5 ++--- /dev/null +++++ b/iconvdata/tst-iconv-iso-2022-cn-ext.c ++@@ -0,0 +1,128 @@ +++/* Verify ISO-2022-CN-EXT does not write out of the bounds. +++ Copyright (C) 2024 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 +++ . */ +++ +++#include +++#include +++ +++#include +++#include +++#include +++ +++#include +++#include +++#include +++ +++/* The test sets up a two memory page buffer with the second page marked +++ PROT_NONE to trigger a fault if the conversion writes beyond the exact +++ expected amount. Then we carry out various conversions and precisely +++ place the start of the output buffer in order to trigger a SIGSEGV if the +++ process writes anywhere between 1 and page sized bytes more (only one +++ PROT_NONE page is setup as a canary) than expected. These tests exercise +++ all three of the cases in ISO-2022-CN-EXT where the converter must switch +++ character sets and may run out of buffer space while doing the +++ operation. */ +++ +++static int +++do_test (void) +++{ +++ iconv_t cd = iconv_open ("ISO-2022-CN-EXT", "UTF-8"); +++ TEST_VERIFY_EXIT (cd != (iconv_t) -1); +++ +++ char *ntf; +++ size_t ntfsize; +++ char *outbufbase; +++ { +++ int pgz = getpagesize (); +++ TEST_VERIFY_EXIT (pgz > 0); +++ ntfsize = 2 * pgz; +++ +++ ntf = xmmap (NULL, ntfsize, PROT_READ | PROT_WRITE, MAP_PRIVATE +++ | MAP_ANONYMOUS, -1); +++ xmprotect (ntf + pgz, pgz, PROT_NONE); +++ +++ outbufbase = ntf + pgz; +++ } +++ +++ /* Check if SOdesignation escape sequence does not trigger an OOB write. */ +++ { +++ char inbuf[] = "\xe4\xba\xa4\xe6\x8d\xa2"; +++ +++ for (int i = 0; i < 9; i++) +++ { +++ char *inp = inbuf; +++ size_t inleft = sizeof (inbuf) - 1; +++ +++ char *outp = outbufbase - i; +++ size_t outleft = i; +++ +++ TEST_VERIFY_EXIT (iconv (cd, &inp, &inleft, &outp, &outleft) +++ == (size_t) -1); +++ TEST_COMPARE (errno, E2BIG); +++ +++ TEST_VERIFY_EXIT (iconv (cd, NULL, NULL, NULL, NULL) == 0); +++ } +++ } +++ +++ /* Same as before for SS2designation. */ +++ { +++ char inbuf[] = "ã´½ \xe3\xb4\xbd"; +++ +++ for (int i = 0; i < 14; i++) +++ { +++ char *inp = inbuf; +++ size_t inleft = sizeof (inbuf) - 1; +++ +++ char *outp = outbufbase - i; +++ size_t outleft = i; +++ +++ TEST_VERIFY_EXIT (iconv (cd, &inp, &inleft, &outp, &outleft) +++ == (size_t) -1); +++ TEST_COMPARE (errno, E2BIG); +++ +++ TEST_VERIFY_EXIT (iconv (cd, NULL, NULL, NULL, NULL) == 0); +++ } +++ } +++ +++ /* Same as before for SS3designation. */ +++ { +++ char inbuf[] = "劄 \xe5\x8a\x84"; +++ +++ for (int i = 0; i < 14; i++) +++ { +++ char *inp = inbuf; +++ size_t inleft = sizeof (inbuf) - 1; +++ +++ char *outp = outbufbase - i; +++ size_t outleft = i; +++ +++ TEST_VERIFY_EXIT (iconv (cd, &inp, &inleft, &outp, &outleft) +++ == (size_t) -1); +++ TEST_COMPARE (errno, E2BIG); +++ +++ TEST_VERIFY_EXIT (iconv (cd, NULL, NULL, NULL, NULL) == 0); +++ } +++ } +++ +++ TEST_VERIFY_EXIT (iconv_close (cd) != -1); +++ +++ xmunmap (ntf, ntfsize); +++ +++ return 0; +++} +++ +++#include ++diff --git a/include/libc-symbols.h b/include/libc-symbols.h ++index 685e20fdc0..68fc798051 100644 ++--- a/include/libc-symbols.h +++++ b/include/libc-symbols.h ++@@ -59,6 +59,19 @@ ++ # define IN_MODULE (-1) ++ #endif ++ +++/* Use symbol_version_reference to specify the version a symbol +++ reference should link to. Use symbol_version or +++ default_symbol_version for the definition of a versioned symbol. +++ The difference is that the latter is a no-op in non-shared +++ builds. */ +++#ifdef __ASSEMBLER__ +++# define symbol_version_reference(real, name, version) \ +++ .symver real, name##@##version +++#else /* !__ASSEMBLER__ */ +++# define symbol_version_reference(real, name, version) \ +++ __asm__ (".symver " #real "," #name "@" #version) +++#endif +++ ++ #ifndef _ISOMAC ++ ++ /* This is defined for the compilation of all C library code. features.h ++@@ -396,19 +409,6 @@ for linking") ++ past the last element in SET. */ ++ #define symbol_set_end_p(set, ptr) ((ptr) >= (void *const *) &__stop_##set) ++ ++-/* Use symbol_version_reference to specify the version a symbol ++- reference should link to. Use symbol_version or ++- default_symbol_version for the definition of a versioned symbol. ++- The difference is that the latter is a no-op in non-shared ++- builds. */ ++-#ifdef __ASSEMBLER__ ++-# define symbol_version_reference(real, name, version) \ ++- .symver real, name##@##version ++-#else /* !__ASSEMBLER__ */ ++-# define symbol_version_reference(real, name, version) \ ++- __asm__ (".symver " #real "," #name "@" #version) ++-#endif ++- ++ #ifdef SHARED ++ # define symbol_version(real, name, version) \ ++ symbol_version_reference(real, name, version) ++diff --git a/include/sys/prctl.h b/include/sys/prctl.h ++index 0920ed642b..d33f3a290e 100644 ++--- a/include/sys/prctl.h +++++ b/include/sys/prctl.h ++@@ -4,6 +4,7 @@ ++ # ifndef _ISOMAC ++ ++ extern int __prctl (int __option, ...); +++libc_hidden_proto (__prctl) ++ ++ # endif /* !_ISOMAC */ ++ #endif ++diff --git a/include/sys/un.h b/include/sys/un.h ++index bdbee99980..152afd9fc7 100644 ++--- a/include/sys/un.h +++++ b/include/sys/un.h ++@@ -1 +1,13 @@ ++ #include +++ +++#ifndef _ISOMAC +++ +++/* Set ADDR->sun_family to AF_UNIX and ADDR->sun_path to PATHNAME. +++ Return 0 on success or -1 on failure (due to overlong PATHNAME). +++ The caller should always use sizeof (struct sockaddr_un) as the +++ socket address length, disregaring the length of PATHNAME. +++ Only concrete (non-abstract) pathnames are supported. */ +++int __sockaddr_un_set (struct sockaddr_un *addr, const char *pathname) +++ attribute_hidden; +++ +++#endif /* _ISOMAC */ ++diff --git a/intl/dcigettext.c b/intl/dcigettext.c ++index 465c8df34c..bd332e71da 100644 ++--- a/intl/dcigettext.c +++++ b/intl/dcigettext.c ++@@ -1119,11 +1119,19 @@ _nl_find_msg (struct loaded_l10nfile *domain_file, ++ outcharset = encoding; ++ ++ # ifdef _LIBC +++ +++ struct gconv_spec conv_spec; +++ +++ __gconv_create_spec (&conv_spec, charset, outcharset); +++ ++ /* We always want to use transliteration. */ ++- outcharset = norm_add_slashes (outcharset, "TRANSLIT"); ++- charset = norm_add_slashes (charset, ""); ++- int r = __gconv_open (outcharset, charset, &convd->conv, ++- GCONV_AVOID_NOCONV); +++ conv_spec.translit = true; +++ +++ int r = __gconv_open (&conv_spec, &convd->conv, +++ GCONV_AVOID_NOCONV); +++ +++ __gconv_destroy_spec (&conv_spec); +++ ++ if (__builtin_expect (r != __GCONV_OK, 0)) ++ { ++ /* If the output encoding is the same there is ++diff --git a/intl/tst-codeset.c b/intl/tst-codeset.c ++index fd70432eca..e9f6e5e09f 100644 ++--- a/intl/tst-codeset.c +++++ b/intl/tst-codeset.c ++@@ -22,13 +22,11 @@ ++ #include ++ #include ++ #include +++#include ++ ++ static int ++ do_test (void) ++ { ++- char *s; ++- int result = 0; ++- ++ unsetenv ("LANGUAGE"); ++ unsetenv ("OUTPUT_CHARSET"); ++ setlocale (LC_ALL, "de_DE.ISO-8859-1"); ++@@ -36,25 +34,21 @@ do_test (void) ++ bindtextdomain ("codeset", OBJPFX "domaindir"); ++ ++ /* Here we expect output in ISO-8859-1. */ ++- s = gettext ("cheese"); ++- if (strcmp (s, "K\344se")) ++- { ++- printf ("call 1 returned: %s\n", s); ++- result = 1; ++- } +++ TEST_COMPARE_STRING (gettext ("cheese"), "K\344se"); ++ +++ /* Here we expect output in UTF-8. */ ++ bind_textdomain_codeset ("codeset", "UTF-8"); +++ TEST_COMPARE_STRING (gettext ("cheese"), "K\303\244se"); ++ ++- /* Here we expect output in UTF-8. */ ++- s = gettext ("cheese"); ++- if (strcmp (s, "K\303\244se")) ++- { ++- printf ("call 2 returned: %s\n", s); ++- result = 1; ++- } ++- ++- return result; +++ /* `a with umlaut' is transliterated to `ae'. */ +++ bind_textdomain_codeset ("codeset", "ASCII//TRANSLIT"); +++ TEST_COMPARE_STRING (gettext ("cheese"), "Kaese"); +++ +++ /* Transliteration also works by default even if not set. */ +++ bind_textdomain_codeset ("codeset", "ASCII"); +++ TEST_COMPARE_STRING (gettext ("cheese"), "Kaese"); +++ +++ return 0; ++ } ++ ++-#define TEST_FUNCTION do_test () ++-#include "../test-skeleton.c" +++#include ++diff --git a/localedata/locales/oc_FR b/localedata/locales/oc_FR ++index d0d89a149e..ba9377ed41 100644 ++--- a/localedata/locales/oc_FR +++++ b/localedata/locales/oc_FR ++@@ -92,7 +92,7 @@ day "dimenge";/ ++ "diluns";/ ++ "dimars";/ ++ "dimcres";/ ++- "dijus";/ +++ "dijus";/ ++ "divendres";/ ++ "dissabte" ++ abmon "gen.";/ ++@@ -110,7 +110,7 @@ abmon "gen.";/ ++ alt_mon "genir";/ ++ "febrir";/ ++ "mar";/ ++- "abrial";/ +++ "abril";/ ++ "mai";/ ++ "junh";/ ++ "julhet";/ ++@@ -122,7 +122,7 @@ alt_mon "genir";/ ++ mon "de genir";/ ++ "de febrir";/ ++ "de mar";/ ++- "dabrial";/ +++ "dabril";/ ++ "de mai";/ ++ "de junh";/ ++ "de julhet";/ ++diff --git a/malloc/Makefile b/malloc/Makefile ++index 984045b5b9..8edeb3d621 100644 ++--- a/malloc/Makefile +++++ b/malloc/Makefile ++@@ -61,6 +61,16 @@ endif ++ tests += $(tests-static) ++ test-srcs = tst-mtrace ++ +++# These tests either are run with MALLOC_CHECK_=3 by default or do not work +++# with MALLOC_CHECK_=3 because they expect a specific failure. +++tests-exclude-mcheck = tst-mcheck tst-malloc-usable \ +++ tst-interpose-nothread tst-interpose-static-nothread \ +++ tst-interpose-static-thread tst-malloc-too-large \ +++ tst-mxfast tst-safe-linking +++ +++# Run all tests with MALLOC_CHECK_=3 +++tests-mcheck = $(filter-out $(tests-exclude-mcheck),$(tests)) +++ ++ routines = malloc morecore mcheck mtrace obstack reallocarray \ ++ scratch_buffer_grow scratch_buffer_grow_preserve \ ++ scratch_buffer_set_array_size \ ++@@ -99,6 +109,11 @@ $(objpfx)tst-malloc-thread-exit: $(shared-thread-library) ++ $(objpfx)tst-malloc-thread-fail: $(shared-thread-library) ++ $(objpfx)tst-malloc-fork-deadlock: $(shared-thread-library) ++ $(objpfx)tst-malloc-stats-cancellation: $(shared-thread-library) +++$(objpfx)tst-malloc-backtrace-mcheck: $(shared-thread-library) +++$(objpfx)tst-malloc-thread-exit-mcheck: $(shared-thread-library) +++$(objpfx)tst-malloc-thread-fail-mcheck: $(shared-thread-library) +++$(objpfx)tst-malloc-fork-deadlock-mcheck: $(shared-thread-library) +++$(objpfx)tst-malloc-stats-cancellation-mcheck: $(shared-thread-library) ++ ++ # Export the __malloc_initialize_hook variable to libc.so. ++ LDFLAGS-tst-mallocstate = -rdynamic ++@@ -238,6 +253,8 @@ $(tests:%=$(objpfx)%.o): CPPFLAGS += -DTEST_NO_MALLOPT ++ $(objpfx)tst-interpose-nothread: $(objpfx)tst-interpose-aux-nothread.o ++ $(objpfx)tst-interpose-thread: \ ++ $(objpfx)tst-interpose-aux-thread.o $(shared-thread-library) +++$(objpfx)tst-interpose-thread-mcheck: \ +++ $(objpfx)tst-interpose-aux-thread.o $(shared-thread-library) ++ $(objpfx)tst-interpose-static-nothread: $(objpfx)tst-interpose-aux-nothread.o ++ $(objpfx)tst-interpose-static-thread: \ ++ $(objpfx)tst-interpose-aux-thread.o $(static-thread-library) ++@@ -255,3 +272,6 @@ $(objpfx)tst-dynarray-fail-mem.out: $(objpfx)tst-dynarray-fail.out ++ $(objpfx)tst-malloc-tcache-leak: $(shared-thread-library) ++ $(objpfx)tst-malloc_info: $(shared-thread-library) ++ $(objpfx)tst-mallocfork2: $(shared-thread-library) +++$(objpfx)tst-malloc-tcache-leak-mcheck: $(shared-thread-library) +++$(objpfx)tst-malloc_info-mcheck: $(shared-thread-library) +++$(objpfx)tst-mallocfork2-mcheck: $(shared-thread-library) ++diff --git a/malloc/tst-mallocfork2.c b/malloc/tst-mallocfork2.c ++index 0602a94895..fc1fd64b21 100644 ++--- a/malloc/tst-mallocfork2.c +++++ b/malloc/tst-mallocfork2.c ++@@ -62,6 +62,9 @@ static volatile sig_atomic_t sigusr1_received; ++ progress. Checked by liveness_signal_handler. */ ++ static volatile sig_atomic_t progress_indicator = 1; ++ +++/* Set to 1 if an error occurs in the signal handler. */ +++static volatile sig_atomic_t error_indicator = 0; +++ ++ static void ++ sigusr1_handler (int signo) ++ { ++@@ -72,7 +75,8 @@ sigusr1_handler (int signo) ++ if (pid == -1) ++ { ++ write_message ("error: fork\n"); ++- abort (); +++ error_indicator = 1; +++ return; ++ } ++ if (pid == 0) ++ _exit (0); ++@@ -81,12 +85,14 @@ sigusr1_handler (int signo) ++ if (ret < 0) ++ { ++ write_message ("error: waitpid\n"); ++- abort (); +++ error_indicator = 1; +++ return; ++ } ++ if (status != 0) ++ { ++ write_message ("error: unexpected exit status from subprocess\n"); ++- abort (); +++ error_indicator = 1; +++ return; ++ } ++ } ++ ++@@ -122,9 +128,25 @@ signal_sender (int signo, bool sleep) ++ } ++ } ++ +++/* Children processes. */ +++static pid_t sigusr1_sender_pids[5] = { 0 }; +++static pid_t sigusr2_sender_pid = 0; +++ +++static void +++kill_children (void) +++{ +++ for (size_t i = 0; i < array_length (sigusr1_sender_pids); ++i) +++ if (sigusr1_sender_pids[i] > 0) +++ kill (sigusr1_sender_pids[i], SIGKILL); +++ if (sigusr2_sender_pid > 0) +++ kill (sigusr2_sender_pid, SIGKILL); +++} +++ ++ static int ++ do_test (void) ++ { +++ atexit (kill_children); +++ ++ /* shared->barrier is intialized along with sigusr1_sender_pids ++ below. */ ++ shared = support_shared_allocate (sizeof (*shared)); ++@@ -148,14 +170,13 @@ do_test (void) ++ return 1; ++ } ++ ++- pid_t sigusr2_sender_pid = xfork (); +++ sigusr2_sender_pid = xfork (); ++ if (sigusr2_sender_pid == 0) ++ signal_sender (SIGUSR2, true); ++ ++ /* Send SIGUSR1 signals from several processes. Hopefully, one ++ signal will hit one of the ciritical functions. Use a barrier to ++ avoid sending signals while not running fork/free/malloc. */ ++- pid_t sigusr1_sender_pids[5]; ++ { ++ pthread_barrierattr_t attr; ++ xpthread_barrierattr_init (&attr); ++@@ -166,7 +187,7 @@ do_test (void) ++ } ++ for (size_t i = 0; i < array_length (sigusr1_sender_pids); ++i) ++ { ++- sigusr1_sender_pids[i] = fork (); +++ sigusr1_sender_pids[i] = xfork (); ++ if (sigusr1_sender_pids[i] == 0) ++ signal_sender (SIGUSR1, false); ++ } ++@@ -211,7 +232,7 @@ do_test (void) ++ ++malloc_signals; ++ xpthread_barrier_wait (&shared->barrier); ++ ++- if (objects[slot] == NULL) +++ if (objects[slot] == NULL || error_indicator != 0) ++ { ++ printf ("error: malloc: %m\n"); ++ for (size_t i = 0; i < array_length (sigusr1_sender_pids); ++i) ++@@ -225,10 +246,6 @@ do_test (void) ++ for (int slot = 0; slot < malloc_objects; ++slot) ++ free (objects[slot]); ++ ++- for (size_t i = 0; i < array_length (sigusr1_sender_pids); ++i) ++- kill (sigusr1_sender_pids[i], SIGKILL); ++- kill (sigusr2_sender_pid, SIGKILL); ++- ++ printf ("info: signals received during fork: %u\n", fork_signals); ++ printf ("info: signals received during free: %u\n", free_signals); ++ printf ("info: signals received during malloc: %u\n", malloc_signals); ++diff --git a/math/Makefile b/math/Makefile ++index 5985b6744b..3496af4040 100644 ++--- a/math/Makefile +++++ b/math/Makefile ++@@ -644,6 +644,128 @@ ifneq ($(long-double-fcts),yes) ++ # We won't compile the `long double' code at all. Tell the `double' code ++ # to define aliases for the `FUNCl' names. ++ math-CPPFLAGS += -DNO_LONG_DOUBLE +++# GCC 10 diagnoses aliases with types conflicting with built-in +++# functions. +++CFLAGS-w_acos.c += -fno-builtin-acosl +++CFLAGS-w_acosh.c += -fno-builtin-acoshl +++CFLAGS-w_asin.c += -fno-builtin-asinl +++CFLAGS-s_asinh.c += -fno-builtin-asinhl +++CFLAGS-s_atan.c += -fno-builtin-atanl +++CFLAGS-w_atan2.c += -fno-builtin-atan2l +++CFLAGS-w_atanh.c += -fno-builtin-atanhl +++CFLAGS-s_cabs.c += -fno-builtin-cabsl +++CFLAGS-s_cacos.c += -fno-builtin-cacosl +++CFLAGS-s_cacosh.c += -fno-builtin-cacoshl +++CFLAGS-s_canonicalize.c += -fno-builtin-canonicalizel +++CFLAGS-s_carg.c += -fno-builtin-cargl +++CFLAGS-s_casin.c += -fno-builtin-casinl +++CFLAGS-s_casinh.c += -fno-builtin-casinhl +++CFLAGS-s_catan.c += -fno-builtin-catanl +++CFLAGS-s_catanh.c += -fno-builtin-catanhl +++CFLAGS-s_cbrt.c += -fno-builtin-cbrtl +++CFLAGS-s_ccos.c += -fno-builtin-ccosl +++CFLAGS-s_ccosh.c += -fno-builtin-ccoshl +++CFLAGS-s_ceil.c += -fno-builtin-ceill +++CFLAGS-s_cexp.c += -fno-builtin-cexpl +++CFLAGS-s_cimag.c += -fno-builtin-cimagl +++CFLAGS-s_clog.c += -fno-builtin-clogl +++CFLAGS-s_clog10.c += -fno-builtin-clog10l +++CFLAGS-s_conj.c += -fno-builtin-conjl +++CFLAGS-s_copysign.c += -fno-builtin-copysignl +++CFLAGS-s_cos.c += -fno-builtin-cosl +++CFLAGS-w_cosh.c += -fno-builtin-coshl +++CFLAGS-s_cpow.c += -fno-builtin-cpowl +++CFLAGS-s_cproj.c += -fno-builtin-cprojl +++CFLAGS-s_creal.c += -fno-builtin-creall +++CFLAGS-s_csin.c += -fno-builtin-csinl +++CFLAGS-s_csinh.c += -fno-builtin-csinhl +++CFLAGS-s_csqrt.c += -fno-builtin-csqrtl +++CFLAGS-s_ctan.c += -fno-builtin-ctanl +++CFLAGS-s_ctanh.c += -fno-builtin-ctanhl +++CFLAGS-s_dadd.c += -fno-builtin-daddl +++CFLAGS-s_ddiv.c += -fno-builtin-ddivl +++CFLAGS-s_dmul.c += -fno-builtin-dmull +++CFLAGS-s_dsub.c += -fno-builtin-dsubl +++CFLAGS-s_erf.c += -fno-builtin-erfl +++CFLAGS-s_erfc.c += -fno-builtin-erfcl +++CFLAGS-e_exp.c += -fno-builtin-expl +++CFLAGS-w_exp10.c += -fno-builtin-exp10l +++CFLAGS-e_exp2.c += -fno-builtin-exp2l +++CFLAGS-s_expm1.c += -fno-builtin-expm1l +++CFLAGS-s_fabs.c += -fno-builtin-fabsl +++CFLAGS-s_fadd.c += -fno-builtin-faddl +++CFLAGS-s_fdim.c += -fno-builtin-fdiml +++CFLAGS-s_fdiv.c += -fno-builtin-fdivl +++CFLAGS-s_finite.c += -fno-builtin-finitel +++CFLAGS-s_floor.c += -fno-builtin-floorl +++CFLAGS-s_fma.c += -fno-builtin-fmal +++CFLAGS-s_fmax.c += -fno-builtin-fmaxl +++CFLAGS-s_fmaxmag.c += -fno-builtin-fmaxmagl +++CFLAGS-s_fmin.c += -fno-builtin-fminl +++CFLAGS-s_fminmag.c += -fno-builtin-fminmagl +++CFLAGS-w_fmod.c += -fno-builtin-fmodl +++CFLAGS-s_fmul.c += -fno-builtin-fmull +++CFLAGS-s_frexp.c += -fno-builtin-frexpl +++CFLAGS-s_fromfp.c += -fno-builtin-fromfpl +++CFLAGS-s_fromfpx.c += -fno-builtin-fromfpxl +++CFLAGS-s_fsub.c += -fno-builtin-fsubl +++CFLAGS-s_gamma.c += -fno-builtin-gammal +++CFLAGS-s_getpayload.c += -fno-builtin-getpayloadl +++CFLAGS-w_hypot.c += -fno-builtin-hypotl +++CFLAGS-w_ilogb.c += -fno-builtin-ilogbl +++CFLAGS-s_isinf.c += -fno-builtin-isinfl +++CFLAGS-s_isnan.c += -fno-builtin-isnanl +++CFLAGS-w_j0.c += -fno-builtin-j0l +++CFLAGS-w_j1.c += -fno-builtin-j1l +++CFLAGS-w_jn.c += -fno-builtin-jnl +++CFLAGS-s_ldexp.c += -fno-builtin-ldexpl +++CFLAGS-w_lgamma.c += -fno-builtin-lgammal +++CFLAGS-w_lgamma_r.c += -fno-builtin-lgammal_r +++CFLAGS-w_llogb.c += -fno-builtin-llogbl +++CFLAGS-s_llrint.c += -fno-builtin-llrintl +++CFLAGS-s_llround.c += -fno-builtin-llroundl +++CFLAGS-e_log.c += -fno-builtin-logl +++CFLAGS-w_log10.c += -fno-builtin-log10l +++CFLAGS-w_log1p.c += -fno-builtin-log1pl +++CFLAGS-e_log2.c += -fno-builtin-log2l +++CFLAGS-s_logb.c += -fno-builtin-logbl +++CFLAGS-s_lrint.c += -fno-builtin-lrintl +++CFLAGS-s_lround.c += -fno-builtin-lroundl +++CFLAGS-s_modf.c += -fno-builtin-modfl +++CFLAGS-s_nan.c += -fno-builtin-nanl +++CFLAGS-s_nearbyint.c += -fno-builtin-nearbyintl +++CFLAGS-s_nextafter.c += -fno-builtin-nextafterl +++CFLAGS-s_nextdown.c += -fno-builtin-nextdownl +++CFLAGS-s_nexttoward.c += -fno-builtin-nexttoward -fno-builtin-nexttowardl +++CFLAGS-s_nexttowardf.c += -fno-builtin-nexttowardf +++CFLAGS-s_nextup.c += -fno-builtin-nextupl +++CFLAGS-e_pow.c += -fno-builtin-powl +++CFLAGS-w_remainder.c += -fno-builtin-remainderl -fno-builtin-dreml +++CFLAGS-s_remquo.c += -fno-builtin-remquol +++CFLAGS-s_rint.c += -fno-builtin-rintl +++CFLAGS-s_round.c += -fno-builtin-roundl +++CFLAGS-s_roundeven.c += -fno-builtin-roundevenl +++CFLAGS-w_scalb.c += -fno-builtin-scalbl +++CFLAGS-w_scalbln.c += -fno-builtin-scalblnl +++CFLAGS-s_scalbn.c += -fno-builtin-scalbnl +++CFLAGS-s_setpayload.c += -fno-builtin-setpayloadl +++CFLAGS-s_setpayloadsig.c += -fno-builtin-setpayloadsigl +++CFLAGS-s_significand.c += -fno-builtin-significandl +++CFLAGS-s_sin.c += -fno-builtin-sinl +++CFLAGS-s_sincos.c += -fno-builtin-sincosl +++CFLAGS-w_sinh.c += -fno-builtin-sinhl +++CFLAGS-w_sqrt.c += -fno-builtin-sqrtl +++CFLAGS-s_tan.c += -fno-builtin-tanl +++CFLAGS-s_tanh.c += -fno-builtin-tanhl +++CFLAGS-w_tgamma.c += -fno-builtin-tgammal +++CFLAGS-s_totalorder.c += -fno-builtin-totalorderl +++CFLAGS-s_totalordermag.c += -fno-builtin-totalordermagl +++CFLAGS-s_trunc.c += -fno-builtin-truncl +++CFLAGS-s_ufromfp.c += -fno-builtin-ufromfpl +++CFLAGS-s_ufromfpx.c += -fno-builtin-ufromfpxl +++CFLAGS-s_y0.c += -fno-builtin-y0l +++CFLAGS-s_y1.c += -fno-builtin-y1l +++CFLAGS-s_yn.c += -fno-builtin-ynl ++ endif ++ ++ # These files quiet sNaNs in a way that is optimized away without ++diff --git a/misc/Makefile b/misc/Makefile ++index e0465980c7..e167e199eb 100644 ++--- a/misc/Makefile +++++ b/misc/Makefile ++@@ -87,7 +87,7 @@ tests := tst-dirname tst-tsearch tst-fdset tst-mntent tst-hsearch \ ++ tst-preadvwritev tst-preadvwritev64 tst-makedev tst-empty \ ++ tst-preadvwritev2 tst-preadvwritev64v2 tst-warn-wide \ ++ tst-ldbl-warn tst-ldbl-error tst-dbl-efgcvt tst-ldbl-efgcvt \ ++- tst-mntent-autofs +++ tst-mntent-autofs tst-syscalls ++ ++ # Tests which need libdl. ++ ifeq (yes,$(build-shared)) ++diff --git a/misc/tst-syscalls.c b/misc/tst-syscalls.c ++new file mode 100644 ++index 0000000000..cfcd382320 ++--- /dev/null +++++ b/misc/tst-syscalls.c ++@@ -0,0 +1,167 @@ +++/* Test for syscall interfaces. +++ Copyright (C) 2020 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 +++ . */ +++ +++/* This test verifies that the x32 system call handling zero-extends +++ unsigned 32-bit arguments to the 64-bit argument registers for +++ system calls (bug 25810). The bug is specific to x32, but the test +++ should pass on all architectures. */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++ +++/* On x32, this can be passed in a single 64-bit integer register. */ +++struct Array +++{ +++ size_t length; +++ void *ptr; +++}; +++ +++static int error_count; +++ +++__attribute__ ((noclone, noinline)) +++struct Array +++allocate (size_t bytes) +++{ +++ if (!bytes) +++ return __extension__ (struct Array) {0, 0}; +++ +++ void *p = mmap (0x0, bytes, PROT_READ | PROT_WRITE, +++ MAP_PRIVATE | MAP_ANON, -1, 0); +++ if (p == MAP_FAILED) +++ return __extension__ (struct Array) {0, 0}; +++ +++ return __extension__ (struct Array) {bytes, p}; +++} +++ +++__attribute__ ((noclone, noinline)) +++void +++deallocate (struct Array b) +++{ +++ /* On x32, the 64-bit integer register containing `b' may be copied +++ to another 64-bit integer register to pass the second argument to +++ munmap. */ +++ if (b.length && munmap (b.ptr, b.length)) +++ { +++ printf ("munmap error: %m\n"); +++ error_count++; +++ } +++} +++ +++__attribute__ ((noclone, noinline)) +++void * +++do_mmap (void *addr, size_t length) +++{ +++ return mmap (addr, length, PROT_READ | PROT_WRITE, +++ MAP_PRIVATE | MAP_ANON, -1, 0); +++} +++ +++__attribute__ ((noclone, noinline)) +++void * +++reallocate (struct Array b) +++{ +++ /* On x32, the 64-bit integer register containing `b' may be copied +++ to another 64-bit integer register to pass the second argument to +++ do_mmap. */ +++ if (b.length) +++ return do_mmap (b.ptr, b.length); +++ return NULL; +++} +++ +++__attribute__ ((noclone, noinline)) +++void +++protect (struct Array b) +++{ +++ if (b.length) +++ { +++ /* On x32, the 64-bit integer register containing `b' may be copied +++ to another 64-bit integer register to pass the second argument +++ to mprotect. */ +++ if (mprotect (b.ptr, b.length, +++ PROT_READ | PROT_WRITE | PROT_EXEC)) +++ { +++ printf ("mprotect error: %m\n"); +++ error_count++; +++ } +++ } +++} +++ +++__attribute__ ((noclone, noinline)) +++ssize_t +++do_read (int fd, void *ptr, struct Array b) +++{ +++ /* On x32, the 64-bit integer register containing `b' may be copied +++ to another 64-bit integer register to pass the second argument to +++ read. */ +++ if (b.length) +++ return read (fd, ptr, b.length); +++ return 0; +++} +++ +++__attribute__ ((noclone, noinline)) +++ssize_t +++do_write (int fd, void *ptr, struct Array b) +++{ +++ /* On x32, the 64-bit integer register containing `b' may be copied +++ to another 64-bit integer register to pass the second argument to +++ write. */ +++ if (b.length) +++ return write (fd, ptr, b.length); +++ return 0; +++} +++ +++static int +++do_test (void) +++{ +++ struct Array array; +++ +++ array = allocate (1); +++ protect (array); +++ deallocate (array); +++ void *p = reallocate (array); +++ if (p == MAP_FAILED) +++ { +++ printf ("mmap error: %m\n"); +++ error_count++; +++ } +++ array.ptr = p; +++ protect (array); +++ deallocate (array); +++ +++ int fd = xopen ("/dev/null", O_RDWR, 0); +++ char buf[2]; +++ array.ptr = buf; +++ if (do_read (fd, array.ptr, array) == -1) +++ { +++ printf ("read error: %m\n"); +++ error_count++; +++ } +++ if (do_write (fd, array.ptr, array) == -1) +++ { +++ printf ("write error: %m\n"); +++ error_count++; +++ } +++ xclose (fd); +++ +++ return error_count ? EXIT_FAILURE : EXIT_SUCCESS; +++} +++ +++#include ++diff --git a/nptl/Makefile b/nptl/Makefile ++index 584e0ffd96..2df4c9098c 100644 ++--- a/nptl/Makefile +++++ b/nptl/Makefile ++@@ -332,7 +332,7 @@ tests-internal := tst-rwlock19 tst-rwlock20 \ ++ tst-mutexpi8 tst-mutexpi8-static tst-cancel25 ++ ++ xtests = tst-setuid1 tst-setuid1-static tst-setuid2 \ ++- tst-mutexpp1 tst-mutexpp6 tst-mutexpp10 +++ tst-mutexpp1 tst-mutexpp6 tst-mutexpp10 tst-setgroups ++ ++ # This test can run into task limits because of a linux kernel bug ++ # and then cause the make process to fail too, see bug 24537. ++diff --git a/nptl/descr.h b/nptl/descr.h ++index 9dcf480bdf..5f1f35e9a4 100644 ++--- a/nptl/descr.h +++++ b/nptl/descr.h ++@@ -94,7 +94,13 @@ struct pthread_unwind_buf ++ struct xid_command ++ { ++ int syscall_no; ++- long int id[3]; +++ /* Enforce zero-extension for the pointer argument in +++ +++ int setgroups (size_t size, const gid_t *list); +++ +++ The kernel XID arguments are unsigned and do not require sign +++ extension. */ +++ unsigned long int id[3]; ++ volatile int cntr; ++ volatile int error; /* -1: no call yet, 0: success seen, >0: error seen. */ ++ }; ++diff --git a/nptl/tst-setgroups.c b/nptl/tst-setgroups.c ++new file mode 100644 ++index 0000000000..ae3c1b1ba0 ++--- /dev/null +++++ b/nptl/tst-setgroups.c ++@@ -0,0 +1,79 @@ +++/* Test setgroups as root and in the presence of threads (Bug 26248) +++ Copyright (C) 2020 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 +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++/* The purpose of this test is to test the setgroups API as root and in +++ the presence of threads. Once we create a thread the setgroups +++ implementation must ensure that all threads are set to the same +++ group and this operation should not fail. Lastly we test setgroups +++ with a zero sized group and a bad address and verify we get EPERM. */ +++ +++static void * +++start_routine (void *args) +++{ +++ return NULL; +++} +++ +++static int +++do_test (void) +++{ +++ int size; +++ /* NB: Stack address can be at 0xfffXXXXX on 32-bit OSes. */ +++ gid_t list[NGROUPS_MAX]; +++ int status = EXIT_SUCCESS; +++ +++ pthread_t thread = xpthread_create (NULL, start_routine, NULL); +++ +++ size = getgroups (sizeof (list) / sizeof (list[0]), list); +++ if (size < 0) +++ { +++ status = EXIT_FAILURE; +++ error (0, errno, "getgroups failed"); +++ } +++ if (setgroups (size, list) < 0) +++ { +++ if (errno == EPERM) +++ status = EXIT_UNSUPPORTED; +++ else +++ { +++ status = EXIT_FAILURE; +++ error (0, errno, "setgroups failed"); +++ } +++ } +++ +++ if (status == EXIT_SUCCESS && setgroups (0, list) < 0) +++ { +++ status = EXIT_FAILURE; +++ error (0, errno, "setgroups failed"); +++ } +++ +++ xpthread_join (thread); +++ +++ return status; +++} +++ +++#include ++diff --git a/nscd/netgroupcache.c b/nscd/netgroupcache.c ++index 88c69d1e9c..799298ad84 100644 ++--- a/nscd/netgroupcache.c +++++ b/nscd/netgroupcache.c ++@@ -24,6 +24,7 @@ ++ #include ++ #include ++ #include +++#include ++ ++ #include "../inet/netgroup.h" ++ #include "nscd.h" ++@@ -66,6 +67,16 @@ struct dataset ++ char strdata[0]; ++ }; ++ +++/* Send a notfound response to FD. Always returns -1 to indicate an +++ ephemeral error. */ +++static time_t +++send_notfound (int fd) +++{ +++ if (fd != -1) +++ TEMP_FAILURE_RETRY (send (fd, ¬found, sizeof (notfound), MSG_NOSIGNAL)); +++ return -1; +++} +++ ++ /* Sends a notfound message and prepares a notfound dataset to write to the ++ cache. Returns true if there was enough memory to allocate the dataset and ++ returns the dataset in DATASETP, total bytes to write in TOTALP and the ++@@ -84,8 +95,7 @@ do_notfound (struct database_dyn *db, int fd, request_header *req, ++ total = sizeof (notfound); ++ timeout = time (NULL) + db->negtimeout; ++ ++- if (fd != -1) ++- TEMP_FAILURE_RETRY (send (fd, ¬found, total, MSG_NOSIGNAL)); +++ send_notfound (fd); ++ ++ dataset = mempool_alloc (db, sizeof (struct dataset) + req->key_len, 1); ++ /* If we cannot permanently store the result, so be it. */ ++@@ -110,11 +120,78 @@ do_notfound (struct database_dyn *db, int fd, request_header *req, ++ return cacheable; ++ } ++ +++struct addgetnetgrentX_scratch +++{ +++ /* This is the result that the caller should use. It can be NULL, +++ point into buffer, or it can be in the cache. */ +++ struct dataset *dataset; +++ +++ struct scratch_buffer buffer; +++ +++ /* Used internally in addgetnetgrentX as a staging area. */ +++ struct scratch_buffer tmp; +++ +++ /* Number of bytes in buffer that are actually used. */ +++ size_t buffer_used; +++}; +++ +++static void +++addgetnetgrentX_scratch_init (struct addgetnetgrentX_scratch *scratch) +++{ +++ scratch->dataset = NULL; +++ scratch_buffer_init (&scratch->buffer); +++ scratch_buffer_init (&scratch->tmp); +++ +++ /* Reserve space for the header. */ +++ scratch->buffer_used = sizeof (struct dataset); +++ static_assert (sizeof (struct dataset) < sizeof (scratch->tmp.__space), +++ "initial buffer space"); +++ memset (scratch->tmp.data, 0, sizeof (struct dataset)); +++} +++ +++static void +++addgetnetgrentX_scratch_free (struct addgetnetgrentX_scratch *scratch) +++{ +++ scratch_buffer_free (&scratch->buffer); +++ scratch_buffer_free (&scratch->tmp); +++} +++ +++/* Copy LENGTH bytes from S into SCRATCH. Returns NULL if SCRATCH +++ could not be resized, otherwise a pointer to the copy. */ +++static char * +++addgetnetgrentX_append_n (struct addgetnetgrentX_scratch *scratch, +++ const char *s, size_t length) +++{ +++ while (true) +++ { +++ size_t remaining = scratch->buffer.length - scratch->buffer_used; +++ if (remaining >= length) +++ break; +++ if (!scratch_buffer_grow_preserve (&scratch->buffer)) +++ return NULL; +++ } +++ char *copy = scratch->buffer.data + scratch->buffer_used; +++ memcpy (copy, s, length); +++ scratch->buffer_used += length; +++ return copy; +++} +++ +++/* Copy S into SCRATCH, including its null terminator. Returns false +++ if SCRATCH could not be resized. */ +++static bool +++addgetnetgrentX_append (struct addgetnetgrentX_scratch *scratch, const char *s) +++{ +++ if (s == NULL) +++ s = ""; +++ return addgetnetgrentX_append_n (scratch, s, strlen (s) + 1) != NULL; +++} +++ +++/* Caller must initialize and free *SCRATCH. If the return value is +++ negative, this function has sent a notfound response. */ ++ static time_t ++ addgetnetgrentX (struct database_dyn *db, int fd, request_header *req, ++ const char *key, uid_t uid, struct hashentry *he, ++- struct datahead *dh, struct dataset **resultp, ++- void **tofreep) +++ struct datahead *dh, struct addgetnetgrentX_scratch *scratch) ++ { ++ if (__glibc_unlikely (debug_level > 0)) ++ { ++@@ -133,14 +210,10 @@ addgetnetgrentX (struct database_dyn *db, int fd, request_header *req, ++ ++ char *key_copy = NULL; ++ struct __netgrent data; ++- size_t buflen = MAX (1024, sizeof (*dataset) + req->key_len); ++- size_t buffilled = sizeof (*dataset); ++- char *buffer = NULL; ++ size_t nentries = 0; ++ size_t group_len = strlen (key) + 1; ++ struct name_list *first_needed ++ = alloca (sizeof (struct name_list) + group_len); ++- *tofreep = NULL; ++ ++ if (netgroup_database == NULL ++ && __nss_database_lookup2 ("netgroup", NULL, NULL, &netgroup_database)) ++@@ -148,12 +221,10 @@ addgetnetgrentX (struct database_dyn *db, int fd, request_header *req, ++ /* No such service. */ ++ cacheable = do_notfound (db, fd, req, key, &dataset, &total, &timeout, ++ &key_copy); ++- goto writeout; +++ goto maybe_cache_add; ++ } ++ ++ memset (&data, '\0', sizeof (data)); ++- buffer = xmalloc (buflen); ++- *tofreep = buffer; ++ first_needed->next = first_needed; ++ memcpy (first_needed->name, key, group_len); ++ data.needed_groups = first_needed; ++@@ -196,8 +267,8 @@ addgetnetgrentX (struct database_dyn *db, int fd, request_header *req, ++ while (1) ++ { ++ int e; ++- status = getfct.f (&data, buffer + buffilled, ++- buflen - buffilled - req->key_len, &e); +++ status = getfct.f (&data, scratch->tmp.data, +++ scratch->tmp.length, &e); ++ if (status == NSS_STATUS_SUCCESS) ++ { ++ if (data.type == triple_val) ++@@ -205,68 +276,10 @@ addgetnetgrentX (struct database_dyn *db, int fd, request_header *req, ++ const char *nhost = data.val.triple.host; ++ const char *nuser = data.val.triple.user; ++ const char *ndomain = data.val.triple.domain; ++- ++- size_t hostlen = strlen (nhost ?: "") + 1; ++- size_t userlen = strlen (nuser ?: "") + 1; ++- size_t domainlen = strlen (ndomain ?: "") + 1; ++- ++- if (nhost == NULL || nuser == NULL || ndomain == NULL ++- || nhost > nuser || nuser > ndomain) ++- { ++- const char *last = nhost; ++- if (last == NULL ++- || (nuser != NULL && nuser > last)) ++- last = nuser; ++- if (last == NULL ++- || (ndomain != NULL && ndomain > last)) ++- last = ndomain; ++- ++- size_t bufused ++- = (last == NULL ++- ? buffilled ++- : last + strlen (last) + 1 - buffer); ++- ++- /* We have to make temporary copies. */ ++- size_t needed = hostlen + userlen + domainlen; ++- ++- if (buflen - req->key_len - bufused < needed) ++- { ++- buflen += MAX (buflen, 2 * needed); ++- /* Save offset in the old buffer. We don't ++- bother with the NULL check here since ++- we'll do that later anyway. */ ++- size_t nhostdiff = nhost - buffer; ++- size_t nuserdiff = nuser - buffer; ++- size_t ndomaindiff = ndomain - buffer; ++- ++- char *newbuf = xrealloc (buffer, buflen); ++- /* Fix up the triplet pointers into the new ++- buffer. */ ++- nhost = (nhost ? newbuf + nhostdiff ++- : NULL); ++- nuser = (nuser ? newbuf + nuserdiff ++- : NULL); ++- ndomain = (ndomain ? newbuf + ndomaindiff ++- : NULL); ++- buffer = newbuf; ++- } ++- ++- nhost = memcpy (buffer + bufused, ++- nhost ?: "", hostlen); ++- nuser = memcpy ((char *) nhost + hostlen, ++- nuser ?: "", userlen); ++- ndomain = memcpy ((char *) nuser + userlen, ++- ndomain ?: "", domainlen); ++- } ++- ++- char *wp = buffer + buffilled; ++- wp = memmove (wp, nhost ?: "", hostlen); ++- wp += hostlen; ++- wp = memmove (wp, nuser ?: "", userlen); ++- wp += userlen; ++- wp = memmove (wp, ndomain ?: "", domainlen); ++- wp += domainlen; ++- buffilled = wp - buffer; +++ if (!(addgetnetgrentX_append (scratch, nhost) +++ && addgetnetgrentX_append (scratch, nuser) +++ && addgetnetgrentX_append (scratch, ndomain))) +++ return send_notfound (fd); ++ ++nentries; ++ } ++ else ++@@ -318,8 +331,8 @@ addgetnetgrentX (struct database_dyn *db, int fd, request_header *req, ++ } ++ else if (status == NSS_STATUS_TRYAGAIN && e == ERANGE) ++ { ++- buflen *= 2; ++- buffer = xrealloc (buffer, buflen); +++ if (!scratch_buffer_grow (&scratch->tmp)) +++ return send_notfound (fd); ++ } ++ else if (status == NSS_STATUS_RETURN ++ || status == NSS_STATUS_NOTFOUND ++@@ -349,13 +362,20 @@ addgetnetgrentX (struct database_dyn *db, int fd, request_header *req, ++ { ++ cacheable = do_notfound (db, fd, req, key, &dataset, &total, &timeout, ++ &key_copy); ++- goto writeout; +++ goto maybe_cache_add; ++ } ++ ++- total = buffilled; +++ /* Capture the result size without the key appended. */ +++ total = scratch->buffer_used; +++ +++ /* Make a copy of the key. The scratch buffer must not move after +++ this point. */ +++ key_copy = addgetnetgrentX_append_n (scratch, key, req->key_len); +++ if (key_copy == NULL) +++ return send_notfound (fd); ++ ++ /* Fill in the dataset. */ ++- dataset = (struct dataset *) buffer; +++ dataset = scratch->buffer.data; ++ timeout = datahead_init_pos (&dataset->head, total + req->key_len, ++ total - offsetof (struct dataset, resp), ++ he == NULL ? 0 : dh->nreloads + 1, ++@@ -364,11 +384,7 @@ addgetnetgrentX (struct database_dyn *db, int fd, request_header *req, ++ dataset->resp.version = NSCD_VERSION; ++ dataset->resp.found = 1; ++ dataset->resp.nresults = nentries; ++- dataset->resp.result_len = buffilled - sizeof (*dataset); ++- ++- assert (buflen - buffilled >= req->key_len); ++- key_copy = memcpy (buffer + buffilled, key, req->key_len); ++- buffilled += req->key_len; +++ dataset->resp.result_len = total - sizeof (*dataset); ++ ++ /* Now we can determine whether on refill we have to create a new ++ record or not. */ ++@@ -399,7 +415,7 @@ addgetnetgrentX (struct database_dyn *db, int fd, request_header *req, ++ if (__glibc_likely (newp != NULL)) ++ { ++ /* Adjust pointer into the memory block. */ ++- key_copy = (char *) newp + (key_copy - buffer); +++ key_copy = (char *) newp + (key_copy - (char *) dataset); ++ ++ dataset = memcpy (newp, dataset, total + req->key_len); ++ cacheable = true; ++@@ -411,14 +427,12 @@ addgetnetgrentX (struct database_dyn *db, int fd, request_header *req, ++ } ++ ++ if (he == NULL && fd != -1) ++- { ++- /* We write the dataset before inserting it to the database ++- since while inserting this thread might block and so would ++- unnecessarily let the receiver wait. */ ++- writeout: +++ /* We write the dataset before inserting it to the database since +++ while inserting this thread might block and so would +++ unnecessarily let the receiver wait. */ ++ writeall (fd, &dataset->resp, dataset->head.recsize); ++- } ++ +++ maybe_cache_add: ++ if (cacheable) ++ { ++ /* If necessary, we also propagate the data to disk. */ ++@@ -442,7 +456,7 @@ addgetnetgrentX (struct database_dyn *db, int fd, request_header *req, ++ } ++ ++ out: ++- *resultp = dataset; +++ scratch->dataset = dataset; ++ ++ return timeout; ++ } ++@@ -463,6 +477,9 @@ addinnetgrX (struct database_dyn *db, int fd, request_header *req, ++ if (user != NULL) ++ key = (char *) rawmemchr (key, '\0') + 1; ++ const char *domain = *key++ ? key : NULL; +++ struct addgetnetgrentX_scratch scratch; +++ +++ addgetnetgrentX_scratch_init (&scratch); ++ ++ if (__glibc_unlikely (debug_level > 0)) ++ { ++@@ -478,12 +495,8 @@ addinnetgrX (struct database_dyn *db, int fd, request_header *req, ++ group, group_len, ++ db, uid); ++ time_t timeout; ++- void *tofree; ++ if (result != NULL) ++- { ++- timeout = result->head.timeout; ++- tofree = NULL; ++- } +++ timeout = result->head.timeout; ++ else ++ { ++ request_header req_get = ++@@ -492,7 +505,10 @@ addinnetgrX (struct database_dyn *db, int fd, request_header *req, ++ .key_len = group_len ++ }; ++ timeout = addgetnetgrentX (db, -1, &req_get, group, uid, NULL, NULL, ++- &result, &tofree); +++ &scratch); +++ result = scratch.dataset; +++ if (timeout < 0) +++ goto out; ++ } ++ ++ struct indataset ++@@ -503,24 +519,26 @@ addinnetgrX (struct database_dyn *db, int fd, request_header *req, ++ = (struct indataset *) mempool_alloc (db, ++ sizeof (*dataset) + req->key_len, ++ 1); ++- struct indataset dataset_mem; ++ bool cacheable = true; ++ if (__glibc_unlikely (dataset == NULL)) ++ { ++ cacheable = false; ++- dataset = &dataset_mem; +++ /* The alloca is safe because nscd_run_worker verfies that +++ key_len is not larger than MAXKEYLEN. */ +++ dataset = alloca (sizeof (*dataset) + req->key_len); ++ } ++ ++ datahead_init_pos (&dataset->head, sizeof (*dataset) + req->key_len, ++ sizeof (innetgroup_response_header), ++- he == NULL ? 0 : dh->nreloads + 1, result->head.ttl); +++ he == NULL ? 0 : dh->nreloads + 1, +++ result == NULL ? db->negtimeout : result->head.ttl); ++ /* Set the notfound status and timeout based on the result from ++ getnetgrent. */ ++- dataset->head.notfound = result->head.notfound; +++ dataset->head.notfound = result == NULL || result->head.notfound; ++ dataset->head.timeout = timeout; ++ ++ dataset->resp.version = NSCD_VERSION; ++- dataset->resp.found = result->resp.found; +++ dataset->resp.found = result != NULL && result->resp.found; ++ /* Until we find a matching entry the result is 0. */ ++ dataset->resp.result = 0; ++ ++@@ -568,7 +586,9 @@ addinnetgrX (struct database_dyn *db, int fd, request_header *req, ++ goto out; ++ } ++ ++- if (he == NULL) +++ /* addgetnetgrentX may have already sent a notfound response. Do +++ not send another one. */ +++ if (he == NULL && dataset->resp.found) ++ { ++ /* We write the dataset before inserting it to the database ++ since while inserting this thread might block and so would ++@@ -602,7 +622,7 @@ addinnetgrX (struct database_dyn *db, int fd, request_header *req, ++ } ++ ++ out: ++- free (tofree); +++ addgetnetgrentX_scratch_free (&scratch); ++ return timeout; ++ } ++ ++@@ -612,11 +632,12 @@ addgetnetgrentX_ignore (struct database_dyn *db, int fd, request_header *req, ++ const char *key, uid_t uid, struct hashentry *he, ++ struct datahead *dh) ++ { ++- struct dataset *ignore; ++- void *tofree; ++- time_t timeout = addgetnetgrentX (db, fd, req, key, uid, he, dh, ++- &ignore, &tofree); ++- free (tofree); +++ struct addgetnetgrentX_scratch scratch; +++ addgetnetgrentX_scratch_init (&scratch); +++ time_t timeout = addgetnetgrentX (db, fd, req, key, uid, he, dh, &scratch); +++ addgetnetgrentX_scratch_free (&scratch); +++ if (timeout < 0) +++ timeout = 0; ++ return timeout; ++ } ++ ++@@ -660,5 +681,9 @@ readdinnetgr (struct database_dyn *db, struct hashentry *he, ++ .key_len = he->len ++ }; ++ ++- return addinnetgrX (db, -1, &req, db->data + he->key, he->owner, he, dh); +++ time_t timeout = addinnetgrX (db, -1, &req, db->data + he->key, he->owner, +++ he, dh); +++ if (timeout < 0) +++ timeout = 0; +++ return timeout; ++ } ++diff --git a/nscd/selinux.c b/nscd/selinux.c ++index a4ea8008e2..1ebf924826 100644 ++--- a/nscd/selinux.c +++++ b/nscd/selinux.c ++@@ -33,6 +33,7 @@ ++ #ifdef HAVE_LIBAUDIT ++ # include ++ #endif +++#include ++ ++ #include "dbg_log.h" ++ #include "selinux.h" ++@@ -320,6 +321,12 @@ avc_free_lock (void *lock) ++ } ++ ++ +++/* avc_init (along with several other symbols) was marked as deprecated by the +++ SELinux API starting from version 3.1. We use it here, but should +++ eventually switch to the newer API. */ +++DIAG_PUSH_NEEDS_COMMENT +++DIAG_IGNORE_NEEDS_COMMENT (10, "-Wdeprecated-declarations"); +++ ++ /* Initialize the user space access vector cache (AVC) for NSCD along with ++ log/thread/lock callbacks. */ ++ void ++@@ -335,7 +342,14 @@ nscd_avc_init (void) ++ audit_init (); ++ #endif ++ } +++DIAG_POP_NEEDS_COMMENT +++ ++ +++/* security_context_t and sidput (along with several other symbols) were marked +++ as deprecated by the SELinux API starting from version 3.1. We use them +++ here, but should eventually switch to the newer API. */ +++DIAG_PUSH_NEEDS_COMMENT +++DIAG_IGNORE_NEEDS_COMMENT (10, "-Wdeprecated-declarations"); ++ ++ /* Check the permission from the caller (via getpeercon) to nscd. ++ Returns 0 if access is allowed, 1 if denied, and -1 on error. ++@@ -422,6 +436,7 @@ out: ++ ++ return rc; ++ } +++DIAG_POP_NEEDS_COMMENT ++ ++ ++ /* Wrapper to get AVC statistics. */ ++diff --git a/nss/makedb.c b/nss/makedb.c ++index 8e389a1683..8e1e8ec9ad 100644 ++--- a/nss/makedb.c +++++ b/nss/makedb.c ++@@ -38,6 +38,7 @@ ++ #include ++ #include ++ #include "nss_db/nss_db.h" +++#include ++ ++ /* Get libc version number. */ ++ #include "../version.h" ++@@ -841,6 +842,13 @@ print_database (int fd) ++ ++ ++ #ifdef HAVE_SELINUX +++ +++/* security_context_t and matchpathcon (along with several other symbols) were +++ marked as deprecated by the SELinux API starting from version 3.1. We use +++ them here, but should eventually switch to the newer API. */ +++DIAG_PUSH_NEEDS_COMMENT +++DIAG_IGNORE_NEEDS_COMMENT (10, "-Wdeprecated-declarations"); +++ ++ static void ++ set_file_creation_context (const char *outname, mode_t mode) ++ { ++@@ -870,6 +878,7 @@ set_file_creation_context (const char *outname, mode_t mode) ++ freecon (ctx); ++ } ++ } +++DIAG_POP_NEEDS_COMMENT ++ ++ static void ++ reset_file_creation_context (void) ++diff --git a/nss/nss_compat/compat-grp.c b/nss/nss_compat/compat-grp.c ++index a8de1e03b3..f8b19a5cf0 100644 ++--- a/nss/nss_compat/compat-grp.c +++++ b/nss/nss_compat/compat-grp.c ++@@ -142,7 +142,7 @@ _nss_compat_setgrent (int stayopen) ++ } ++ ++ ++-static enum nss_status +++static enum nss_status __attribute_warn_unused_result__ ++ internal_endgrent (ent_t *ent) ++ { ++ if (ent->stream != NULL) ++@@ -163,6 +163,15 @@ internal_endgrent (ent_t *ent) ++ return NSS_STATUS_SUCCESS; ++ } ++ +++/* Like internal_endgrent, but preserve errno in all cases. */ +++static void +++internal_endgrent_noerror (ent_t *ent) +++{ +++ int saved_errno = errno; +++ enum nss_status unused __attribute__ ((unused)) = internal_endgrent (ent); +++ __set_errno (saved_errno); +++} +++ ++ enum nss_status ++ _nss_compat_endgrent (void) ++ { ++@@ -483,7 +492,7 @@ _nss_compat_getgrnam_r (const char *name, struct group *grp, ++ if (result == NSS_STATUS_SUCCESS) ++ result = internal_getgrnam_r (name, grp, &ent, buffer, buflen, errnop); ++ ++- internal_endgrent (&ent); +++ internal_endgrent_noerror (&ent); ++ ++ return result; ++ } ++@@ -612,7 +621,7 @@ _nss_compat_getgrgid_r (gid_t gid, struct group *grp, ++ if (result == NSS_STATUS_SUCCESS) ++ result = internal_getgrgid_r (gid, grp, &ent, buffer, buflen, errnop); ++ ++- internal_endgrent (&ent); +++ internal_endgrent_noerror (&ent); ++ ++ return result; ++ } ++diff --git a/nss/nss_compat/compat-initgroups.c b/nss/nss_compat/compat-initgroups.c ++index 939b25b33b..7591442ff9 100644 ++--- a/nss/nss_compat/compat-initgroups.c +++++ b/nss/nss_compat/compat-initgroups.c ++@@ -133,7 +133,7 @@ internal_setgrent (ent_t *ent) ++ } ++ ++ ++-static enum nss_status +++static enum nss_status __attribute_warn_unused_result__ ++ internal_endgrent (ent_t *ent) ++ { ++ if (ent->stream != NULL) ++@@ -157,6 +157,15 @@ internal_endgrent (ent_t *ent) ++ return NSS_STATUS_SUCCESS; ++ } ++ +++/* Like internal_endgrent, but preserve errno in all cases. */ +++static void +++internal_endgrent_noerror (ent_t *ent) +++{ +++ int saved_errno = errno; +++ enum nss_status unused __attribute__ ((unused)) = internal_endgrent (ent); +++ __set_errno (saved_errno); +++} +++ ++ /* Add new group record. */ ++ static void ++ add_group (long int *start, long int *size, gid_t **groupsp, long int limit, ++@@ -501,7 +510,7 @@ _nss_compat_initgroups_dyn (const char *user, gid_t group, long int *start, ++ done: ++ scratch_buffer_free (&tmpbuf); ++ ++- internal_endgrent (&intern); +++ internal_endgrent_noerror (&intern); ++ ++ return status; ++ } ++diff --git a/nss/nss_compat/compat-pwd.c b/nss/nss_compat/compat-pwd.c ++index ec3f35c594..bd5e707da0 100644 ++--- a/nss/nss_compat/compat-pwd.c +++++ b/nss/nss_compat/compat-pwd.c ++@@ -259,7 +259,7 @@ _nss_compat_setpwent (int stayopen) ++ } ++ ++ ++-static enum nss_status +++static enum nss_status __attribute_warn_unused_result__ ++ internal_endpwent (ent_t *ent) ++ { ++ if (ent->stream != NULL) ++@@ -287,6 +287,15 @@ internal_endpwent (ent_t *ent) ++ return NSS_STATUS_SUCCESS; ++ } ++ +++/* Like internal_endpwent, but preserve errno in all cases. */ +++static void +++internal_endpwent_noerror (ent_t *ent) +++{ +++ int saved_errno = errno; +++ enum nss_status unused __attribute__ ((unused)) = internal_endpwent (ent); +++ __set_errno (saved_errno); +++} +++ ++ enum nss_status ++ _nss_compat_endpwent (void) ++ { ++@@ -822,7 +831,7 @@ _nss_compat_getpwnam_r (const char *name, struct passwd *pwd, ++ if (result == NSS_STATUS_SUCCESS) ++ result = internal_getpwnam_r (name, pwd, &ent, buffer, buflen, errnop); ++ ++- internal_endpwent (&ent); +++ internal_endpwent_noerror (&ent); ++ ++ return result; ++ } ++@@ -1061,7 +1070,7 @@ _nss_compat_getpwuid_r (uid_t uid, struct passwd *pwd, ++ if (result == NSS_STATUS_SUCCESS) ++ result = internal_getpwuid_r (uid, pwd, &ent, buffer, buflen, errnop); ++ ++- internal_endpwent (&ent); +++ internal_endpwent_noerror (&ent); ++ ++ return result; ++ } ++diff --git a/nss/nss_compat/compat-spwd.c b/nss/nss_compat/compat-spwd.c ++index f6b7a1ef15..d0e3c51b45 100644 ++--- a/nss/nss_compat/compat-spwd.c +++++ b/nss/nss_compat/compat-spwd.c ++@@ -215,7 +215,7 @@ _nss_compat_setspent (int stayopen) ++ } ++ ++ ++-static enum nss_status +++static enum nss_status __attribute_warn_unused_result__ ++ internal_endspent (ent_t *ent) ++ { ++ if (ent->stream != NULL) ++@@ -244,6 +244,15 @@ internal_endspent (ent_t *ent) ++ return NSS_STATUS_SUCCESS; ++ } ++ +++/* Like internal_endspent, but preserve errno in all cases. */ +++static void +++internal_endspent_noerror (ent_t *ent) +++{ +++ int saved_errno = errno; +++ enum nss_status unused __attribute__ ((unused)) = internal_endspent (ent); +++ __set_errno (saved_errno); +++} +++ ++ enum nss_status ++ _nss_compat_endspent (void) ++ { ++@@ -261,7 +270,6 @@ _nss_compat_endspent (void) ++ return result; ++ } ++ ++- ++ static enum nss_status ++ getspent_next_nss_netgr (const char *name, struct spwd *result, ent_t *ent, ++ char *group, char *buffer, size_t buflen, ++@@ -786,7 +794,7 @@ _nss_compat_getspnam_r (const char *name, struct spwd *pwd, ++ if (result == NSS_STATUS_SUCCESS) ++ result = internal_getspnam_r (name, pwd, &ent, buffer, buflen, errnop); ++ ++- internal_endspent (&ent); +++ internal_endspent_noerror (&ent); ++ ++ return result; ++ } ++diff --git a/posix/glob.c b/posix/glob.c ++index cba9cd1819..4580cefb9f 100644 ++--- a/posix/glob.c +++++ b/posix/glob.c ++@@ -827,31 +827,32 @@ __glob (const char *pattern, int flags, int (*errfunc) (const char *, int), ++ { ++ size_t home_len = strlen (p->pw_dir); ++ size_t rest_len = end_name == NULL ? 0 : strlen (end_name); ++- char *d; +++ char *d, *newp; +++ bool use_alloca = glob_use_alloca (alloca_used, +++ home_len + rest_len + 1); ++ ++- if (__glibc_unlikely (malloc_dirname)) ++- free (dirname); ++- malloc_dirname = 0; ++- ++- if (glob_use_alloca (alloca_used, home_len + rest_len + 1)) ++- dirname = alloca_account (home_len + rest_len + 1, ++- alloca_used); +++ if (use_alloca) +++ newp = alloca_account (home_len + rest_len + 1, alloca_used); ++ else ++ { ++- dirname = malloc (home_len + rest_len + 1); ++- if (dirname == NULL) +++ newp = malloc (home_len + rest_len + 1); +++ if (newp == NULL) ++ { ++ scratch_buffer_free (&pwtmpbuf); ++ retval = GLOB_NOSPACE; ++ goto out; ++ } ++- malloc_dirname = 1; ++ } ++- d = mempcpy (dirname, p->pw_dir, home_len); +++ d = mempcpy (newp, p->pw_dir, home_len); ++ if (end_name != NULL) ++ d = mempcpy (d, end_name, rest_len); ++ *d = '\0'; ++ +++ if (__glibc_unlikely (malloc_dirname)) +++ free (dirname); +++ dirname = newp; +++ malloc_dirname = !use_alloca; +++ ++ dirlen = home_len + rest_len; ++ dirname_modified = 1; ++ } ++diff --git a/posix/wordexp-test.c b/posix/wordexp-test.c ++index ed1b22308e..cb3f989cba 100644 ++--- a/posix/wordexp-test.c +++++ b/posix/wordexp-test.c ++@@ -183,6 +183,7 @@ struct test_case_struct ++ { 0, NULL, "$var", 0, 0, { NULL, }, IFS }, ++ { 0, NULL, "\"\\n\"", 0, 1, { "\\n", }, IFS }, ++ { 0, NULL, "", 0, 0, { NULL, }, IFS }, +++ { 0, NULL, "${1234567890123456789012}", 0, 0, { NULL, }, IFS }, ++ ++ /* Flags not already covered (testit() has special handling for these) */ ++ { 0, NULL, "one two", WRDE_DOOFFS, 2, { "one", "two", }, IFS }, ++diff --git a/posix/wordexp.c b/posix/wordexp.c ++index e082d94895..56289503a1 100644 ++--- a/posix/wordexp.c +++++ b/posix/wordexp.c ++@@ -1399,7 +1399,7 @@ envsubst: ++ /* Is it a numeric parameter? */ ++ else if (isdigit (env[0])) ++ { ++- int n = atoi (env); +++ unsigned long n = strtoul (env, NULL, 10); ++ ++ if (n >= __libc_argc) ++ /* Substitute NULL. */ ++diff --git a/socket/Makefile b/socket/Makefile ++index 125c042cab..19fc6ab41d 100644 ++--- a/socket/Makefile +++++ b/socket/Makefile ++@@ -29,10 +29,14 @@ headers := sys/socket.h sys/un.h bits/sockaddr.h bits/socket.h \ ++ routines := accept bind connect getpeername getsockname getsockopt \ ++ listen recv recvfrom recvmsg send sendmsg sendto \ ++ setsockopt shutdown socket socketpair isfdtype opensock \ ++- sockatmark accept4 recvmmsg sendmmsg +++ sockatmark accept4 recvmmsg sendmmsg sockaddr_un_set ++ ++ tests := tst-accept4 ++ +++tests-internal := \ +++ tst-sockaddr_un_set \ +++ # tests-internal +++ ++ aux := sa_len ++ ++ include ../Rules ++diff --git a/socket/sockaddr_un_set.c b/socket/sockaddr_un_set.c ++new file mode 100644 ++index 0000000000..0bd40dc34e ++--- /dev/null +++++ b/socket/sockaddr_un_set.c ++@@ -0,0 +1,41 @@ +++/* Set the sun_path member of struct sockaddr_un. +++ Copyright (C) 2022 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 +++ . */ +++ +++#include +++#include +++#include +++#include +++ +++int +++__sockaddr_un_set (struct sockaddr_un *addr, const char *pathname) +++{ +++ size_t name_length = strlen (pathname); +++ +++ /* The kernel supports names of exactly sizeof (addr->sun_path) +++ bytes, without a null terminator, but userspace does not; see the +++ SUN_LEN macro. */ +++ if (name_length >= sizeof (addr->sun_path)) +++ { +++ __set_errno (EINVAL); /* Error code used by the kernel. */ +++ return -1; +++ } +++ +++ addr->sun_family = AF_UNIX; +++ memcpy (addr->sun_path, pathname, name_length + 1); +++ return 0; +++} ++diff --git a/socket/tst-sockaddr_un_set.c b/socket/tst-sockaddr_un_set.c ++new file mode 100644 ++index 0000000000..29c2a81afd ++--- /dev/null +++++ b/socket/tst-sockaddr_un_set.c ++@@ -0,0 +1,62 @@ +++/* Test the __sockaddr_un_set function. +++ Copyright (C) 2022 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 +++ . */ +++ +++/* Re-compile the function because the version in libc is not +++ exported. */ +++#include "sockaddr_un_set.c" +++ +++#include +++ +++static int +++do_test (void) +++{ +++ struct sockaddr_un sun; +++ +++ memset (&sun, 0xcc, sizeof (sun)); +++ __sockaddr_un_set (&sun, ""); +++ TEST_COMPARE (sun.sun_family, AF_UNIX); +++ TEST_COMPARE (__sockaddr_un_set (&sun, ""), 0); +++ +++ memset (&sun, 0xcc, sizeof (sun)); +++ TEST_COMPARE (__sockaddr_un_set (&sun, "/example"), 0); +++ TEST_COMPARE_STRING (sun.sun_path, "/example"); +++ +++ { +++ char pathname[108]; /* Length of sun_path (ABI constant). */ +++ memset (pathname, 'x', sizeof (pathname)); +++ pathname[sizeof (pathname) - 1] = '\0'; +++ memset (&sun, 0xcc, sizeof (sun)); +++ TEST_COMPARE (__sockaddr_un_set (&sun, pathname), 0); +++ TEST_COMPARE (sun.sun_family, AF_UNIX); +++ TEST_COMPARE_STRING (sun.sun_path, pathname); +++ } +++ +++ { +++ char pathname[109]; +++ memset (pathname, 'x', sizeof (pathname)); +++ pathname[sizeof (pathname) - 1] = '\0'; +++ memset (&sun, 0xcc, sizeof (sun)); +++ errno = 0; +++ TEST_COMPARE (__sockaddr_un_set (&sun, pathname), -1); +++ TEST_COMPARE (errno, EINVAL); +++ } +++ +++ return 0; +++} +++ +++#include ++diff --git a/stdio-common/Makefile b/stdio-common/Makefile ++index 95af0c12d7..5e92d6b9ae 100644 ++--- a/stdio-common/Makefile +++++ b/stdio-common/Makefile ++@@ -66,6 +66,10 @@ tests := tstscanf test_rdwr test-popen tstgetln test-fseek \ ++ tst-scanf-round \ ++ tst-renameat2 tst-bz11319 tst-bz11319-fortify2 \ ++ scanf14a scanf16a \ +++ tst-printf-bz25691 \ +++ tst-vfprintf-width-prec-alloc \ +++ tst-grouping2 \ +++ # tests ++ ++ ++ test-srcs = tst-unbputc tst-printf tst-printfsz-islongdouble ++@@ -75,10 +79,12 @@ tests-special += $(objpfx)tst-unbputc.out $(objpfx)tst-printf.out \ ++ $(objpfx)tst-printf-bz18872-mem.out \ ++ $(objpfx)tst-setvbuf1-cmp.out \ ++ $(objpfx)tst-vfprintf-width-prec-mem.out \ ++- $(objpfx)tst-printfsz-islongdouble.out +++ $(objpfx)tst-printfsz-islongdouble.out \ +++ $(objpfx)tst-printf-bz25691-mem.out ++ generated += tst-printf-bz18872.c tst-printf-bz18872.mtrace \ ++ tst-printf-bz18872-mem.out \ ++- tst-vfprintf-width-prec.mtrace tst-vfprintf-width-prec-mem.out +++ tst-vfprintf-width-prec.mtrace tst-vfprintf-width-prec-mem.out \ +++ tst-printf-bz25691.mtrace tst-printf-bz25691-mem.out ++ endif ++ ++ include ../Rules ++@@ -91,6 +97,7 @@ $(objpfx)bug14.out: $(gen-locales) ++ $(objpfx)scanf13.out: $(gen-locales) ++ $(objpfx)test-vfprintf.out: $(gen-locales) ++ $(objpfx)tst-grouping.out: $(gen-locales) +++$(objpfx)tst-grouping2.out: $(gen-locales) ++ $(objpfx)tst-sprintf.out: $(gen-locales) ++ $(objpfx)tst-sscanf.out: $(gen-locales) ++ $(objpfx)tst-swprintf.out: $(gen-locales) ++@@ -100,6 +107,8 @@ endif ++ tst-printf-bz18872-ENV = MALLOC_TRACE=$(objpfx)tst-printf-bz18872.mtrace ++ tst-vfprintf-width-prec-ENV = \ ++ MALLOC_TRACE=$(objpfx)tst-vfprintf-width-prec.mtrace +++tst-printf-bz25691-ENV = \ +++ MALLOC_TRACE=$(objpfx)tst-printf-bz25691.mtrace ++ ++ $(objpfx)tst-unbputc.out: tst-unbputc.sh $(objpfx)tst-unbputc ++ $(SHELL) $< $(common-objpfx) '$(test-program-prefix)' > $@; \ ++diff --git a/stdio-common/bug22.c b/stdio-common/bug22.c ++index b3d48eb8e1..029b549941 100644 ++--- a/stdio-common/bug22.c +++++ b/stdio-common/bug22.c ++@@ -57,7 +57,7 @@ do_test (void) ++ ++ ret = fprintf (fp, "%." SN3 "d", 1); ++ printf ("ret = %d\n", ret); ++- if (ret != -1 || errno != EOVERFLOW) +++ if (ret != N3) ++ return 1; ++ ++ /* GCC 9 warns about output of more than INT_MAX characters; this is ++diff --git a/stdio-common/tst-grouping2.c b/stdio-common/tst-grouping2.c ++new file mode 100644 ++index 0000000000..3024c942a6 ++--- /dev/null +++++ b/stdio-common/tst-grouping2.c ++@@ -0,0 +1,39 @@ +++/* Test printf with grouping and large width (bug 29530) +++ Copyright (C) 2022 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 +++ . */ +++ +++#include +++#include +++#include +++#include +++ +++static int +++do_test (void) +++{ +++ const int field_width = 1000; +++ char buf[field_width + 1]; +++ +++ xsetlocale (LC_NUMERIC, "de_DE.UTF-8"); +++ +++ /* This used to crash in group_number. */ +++ TEST_COMPARE (sprintf (buf, "%'*d", field_width, 1000), field_width); +++ TEST_COMPARE_STRING (buf + field_width - 6, " 1.000"); +++ +++ return 0; +++} +++ +++#include ++diff --git a/stdio-common/tst-printf-bz25691.c b/stdio-common/tst-printf-bz25691.c ++new file mode 100644 ++index 0000000000..37b30a3a8a ++--- /dev/null +++++ b/stdio-common/tst-printf-bz25691.c ++@@ -0,0 +1,108 @@ +++/* Test for memory leak with large width (BZ#25691). +++ Copyright (C) 2020 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 +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++ +++#include +++#include +++#include +++ +++static int +++do_test (void) +++{ +++ mtrace (); +++ +++ /* For 's' conversion specifier with 'l' modifier the array must be +++ converted to multibyte characters up to the precision specific +++ value. */ +++ { +++ /* The input size value is to force a heap allocation on temporary +++ buffer (in the old implementation). */ +++ const size_t winputsize = 64 * 1024 + 1; +++ wchar_t *winput = xmalloc (winputsize * sizeof (wchar_t)); +++ wmemset (winput, L'a', winputsize - 1); +++ winput[winputsize - 1] = L'\0'; +++ +++ char result[9]; +++ const char expected[] = "aaaaaaaa"; +++ int ret; +++ +++ ret = snprintf (result, sizeof (result), "%.65537ls", winput); +++ TEST_COMPARE (ret, winputsize - 1); +++ TEST_COMPARE_BLOB (result, sizeof (result), expected, sizeof (expected)); +++ +++ ret = snprintf (result, sizeof (result), "%ls", winput); +++ TEST_COMPARE (ret, winputsize - 1); +++ TEST_COMPARE_BLOB (result, sizeof (result), expected, sizeof (expected)); +++ +++ free (winput); +++ } +++ +++ /* For 's' converstion specifier the array is interpreted as a multibyte +++ character sequence and converted to wide characters up to the precision +++ specific value. */ +++ { +++ /* The input size value is to force a heap allocation on temporary +++ buffer (in the old implementation). */ +++ const size_t mbssize = 32 * 1024; +++ char *mbs = xmalloc (mbssize); +++ memset (mbs, 'a', mbssize - 1); +++ mbs[mbssize - 1] = '\0'; +++ +++ const size_t expectedsize = 32 * 1024; +++ wchar_t *expected = xmalloc (expectedsize * sizeof (wchar_t)); +++ wmemset (expected, L'a', expectedsize - 1); +++ expected[expectedsize-1] = L'\0'; +++ +++ const size_t resultsize = mbssize * sizeof (wchar_t); +++ wchar_t *result = xmalloc (resultsize); +++ int ret; +++ +++ ret = swprintf (result, resultsize, L"%.65537s", mbs); +++ TEST_COMPARE (ret, mbssize - 1); +++ TEST_COMPARE_BLOB (result, (ret + 1) * sizeof (wchar_t), +++ expected, expectedsize * sizeof (wchar_t)); +++ +++ ret = swprintf (result, resultsize, L"%1$.65537s", mbs); +++ TEST_COMPARE (ret, mbssize - 1); +++ TEST_COMPARE_BLOB (result, (ret + 1) * sizeof (wchar_t), +++ expected, expectedsize * sizeof (wchar_t)); +++ +++ /* Same test, but with an invalid multibyte sequence. */ +++ mbs[mbssize - 2] = 0xff; +++ +++ ret = swprintf (result, resultsize, L"%.65537s", mbs); +++ TEST_COMPARE (ret, -1); +++ +++ ret = swprintf (result, resultsize, L"%1$.65537s", mbs); +++ TEST_COMPARE (ret, -1); +++ +++ free (mbs); +++ free (result); +++ free (expected); +++ } +++ +++ return 0; +++} +++ +++#include ++diff --git a/stdio-common/tst-vfprintf-width-prec-alloc.c b/stdio-common/tst-vfprintf-width-prec-alloc.c ++new file mode 100644 ++index 0000000000..0a74b53a33 ++--- /dev/null +++++ b/stdio-common/tst-vfprintf-width-prec-alloc.c ++@@ -0,0 +1,41 @@ +++/* Test large width or precision does not involve large allocation. +++ Copyright (C) 2020 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 +++ . */ +++ +++#include +++#include +++#include +++ +++char test_string[] = "test"; +++ +++static int +++do_test (void) +++{ +++ struct rlimit limit; +++ TEST_VERIFY_EXIT (getrlimit (RLIMIT_AS, &limit) == 0); +++ limit.rlim_cur = 200 * 1024 * 1024; +++ TEST_VERIFY_EXIT (setrlimit (RLIMIT_AS, &limit) == 0); +++ FILE *fp = fopen ("/dev/null", "w"); +++ TEST_VERIFY_EXIT (fp != NULL); +++ TEST_COMPARE (fprintf (fp, "%1000000000d", 1), 1000000000); +++ TEST_COMPARE (fprintf (fp, "%.1000000000s", test_string), 4); +++ TEST_COMPARE (fprintf (fp, "%1000000000d %1000000000d", 1, 2), 2000000001); +++ TEST_COMPARE (fprintf (fp, "%2$.*1$s", 0x7fffffff, test_string), 4); +++ return 0; +++} +++ +++#include ++diff --git a/stdio-common/vfprintf-internal.c b/stdio-common/vfprintf-internal.c ++index 3be92d4b6e..b1c8f5c43e 100644 ++--- a/stdio-common/vfprintf-internal.c +++++ b/stdio-common/vfprintf-internal.c ++@@ -31,6 +31,7 @@ ++ #include ++ #include ++ #include +++#include ++ ++ /* This code is shared between the standard stdio implementation found ++ in GNU C library and the libio implementation originally found in ++@@ -45,10 +46,6 @@ ++ #include ++ #endif ++ ++-/* In some cases we need extra space for all the output which is not ++- counted in the width of the string. We assume 32 characters is ++- enough. */ ++-#define EXTSIZ 32 ++ #define ARGCHECK(S, Format) \ ++ do \ ++ { \ ++@@ -119,22 +116,38 @@ ++ while (0) ++ #endif ++ ++-#define done_add(val) \ ++- do { \ ++- unsigned int _val = val; \ ++- assert ((unsigned int) done < (unsigned int) INT_MAX); \ ++- if (__glibc_unlikely (INT_MAX - done < _val)) \ ++- { \ ++- done = -1; \ ++- __set_errno (EOVERFLOW); \ ++- goto all_done; \ ++- } \ ++- done += _val; \ ++- } while (0) +++/* Add LENGTH to DONE. Return the new value of DONE, or -1 on +++ overflow (and set errno accordingly). */ +++static inline int +++done_add_func (size_t length, int done) +++{ +++ if (done < 0) +++ return done; +++ int ret; +++ if (INT_ADD_WRAPV (done, length, &ret)) +++ { +++ __set_errno (EOVERFLOW); +++ return -1; +++ } +++ return ret; +++} +++ +++#define done_add(val) \ +++ do \ +++ { \ +++ /* Ensure that VAL has a type similar to int. */ \ +++ _Static_assert (sizeof (val) == sizeof (int), "value int size"); \ +++ _Static_assert ((__typeof__ (val)) -1 < 0, "value signed"); \ +++ done = done_add_func ((val), done); \ +++ if (done < 0) \ +++ goto all_done; \ +++ } \ +++ while (0) ++ ++ #ifndef COMPILE_WPRINTF ++ # define vfprintf __vfprintf_internal ++ # define CHAR_T char +++# define OTHER_CHAR_T wchar_t ++ # define UCHAR_T unsigned char ++ # define INT_T int ++ typedef const char *THOUSANDS_SEP_T; ++@@ -143,25 +156,14 @@ typedef const char *THOUSANDS_SEP_T; ++ # define STR_LEN(Str) strlen (Str) ++ ++ # define PUT(F, S, N) _IO_sputn ((F), (S), (N)) ++-# define PAD(Padchar) \ ++- do { \ ++- if (width > 0) \ ++- { \ ++- ssize_t written = _IO_padn (s, (Padchar), width); \ ++- if (__glibc_unlikely (written != width)) \ ++- { \ ++- done = -1; \ ++- goto all_done; \ ++- } \ ++- done_add (written); \ ++- } \ ++- } while (0) ++ # define PUTC(C, F) _IO_putc_unlocked (C, F) ++ # define ORIENT if (_IO_vtable_offset (s) == 0 && _IO_fwide (s, -1) != -1)\ ++ return -1 +++# define CONVERT_FROM_OTHER_STRING __wcsrtombs ++ #else ++ # define vfprintf __vfwprintf_internal ++ # define CHAR_T wchar_t +++# define OTHER_CHAR_T char ++ /* This is a hack!!! There should be a type uwchar_t. */ ++ # define UCHAR_T unsigned int /* uwchar_t */ ++ # define INT_T wint_t ++@@ -173,21 +175,9 @@ typedef wchar_t THOUSANDS_SEP_T; ++ # include <_itowa.h> ++ ++ # define PUT(F, S, N) _IO_sputn ((F), (S), (N)) ++-# define PAD(Padchar) \ ++- do { \ ++- if (width > 0) \ ++- { \ ++- ssize_t written = _IO_wpadn (s, (Padchar), width); \ ++- if (__glibc_unlikely (written != width)) \ ++- { \ ++- done = -1; \ ++- goto all_done; \ ++- } \ ++- done_add (written); \ ++- } \ ++- } while (0) ++ # define PUTC(C, F) _IO_putwc_unlocked (C, F) ++ # define ORIENT if (_IO_fwide (s, 1) != 1) return -1 +++# define CONVERT_FROM_OTHER_STRING __mbsrtowcs ++ ++ # undef _itoa ++ # define _itoa(Val, Buf, Base, Case) _itowa (Val, Buf, Base, Case) ++@@ -196,6 +186,33 @@ typedef wchar_t THOUSANDS_SEP_T; ++ # define EOF WEOF ++ #endif ++ +++static inline int +++pad_func (FILE *s, CHAR_T padchar, int width, int done) +++{ +++ if (width > 0) +++ { +++ ssize_t written; +++#ifndef COMPILE_WPRINTF +++ written = _IO_padn (s, padchar, width); +++#else +++ written = _IO_wpadn (s, padchar, width); +++#endif +++ if (__glibc_unlikely (written != width)) +++ return -1; +++ return done_add_func (width, done); +++ } +++ return done; +++} +++ +++#define PAD(Padchar) \ +++ do \ +++ { \ +++ done = pad_func (s, (Padchar), width, done); \ +++ if (done < 0) \ +++ goto all_done; \ +++ } \ +++ while (0) +++ ++ #include "_i18n_number.h" ++ ++ /* Include the shared code for parsing the format string. */ ++@@ -215,24 +232,115 @@ typedef wchar_t THOUSANDS_SEP_T; ++ } \ ++ while (0) ++ ++-#define outstring(String, Len) \ ++- do \ ++- { \ ++- assert ((size_t) done <= (size_t) INT_MAX); \ ++- if ((size_t) PUT (s, (String), (Len)) != (size_t) (Len)) \ ++- { \ ++- done = -1; \ ++- goto all_done; \ ++- } \ ++- if (__glibc_unlikely (INT_MAX - done < (Len))) \ ++- { \ ++- done = -1; \ ++- __set_errno (EOVERFLOW); \ ++- goto all_done; \ ++- } \ ++- done += (Len); \ ++- } \ ++- while (0) +++static inline int +++outstring_func (FILE *s, const UCHAR_T *string, size_t length, int done) +++{ +++ assert ((size_t) done <= (size_t) INT_MAX); +++ if ((size_t) PUT (s, string, length) != (size_t) (length)) +++ return -1; +++ return done_add_func (length, done); +++} +++ +++#define outstring(String, Len) \ +++ do \ +++ { \ +++ const void *string_ = (String); \ +++ done = outstring_func (s, string_, (Len), done); \ +++ if (done < 0) \ +++ goto all_done; \ +++ } \ +++ while (0) +++ +++/* Write the string SRC to S. If PREC is non-negative, write at most +++ PREC bytes. If LEFT is true, perform left justification. */ +++static int +++outstring_converted_wide_string (FILE *s, const OTHER_CHAR_T *src, int prec, +++ int width, bool left, int done) +++{ +++ /* Use a small buffer to combine processing of multiple characters. +++ CONVERT_FROM_OTHER_STRING expects the buffer size in (wide) +++ characters, and buf_length counts that. */ +++ enum { buf_length = 256 / sizeof (CHAR_T) }; +++ CHAR_T buf[buf_length]; +++ _Static_assert (sizeof (buf) > MB_LEN_MAX, +++ "buffer is large enough for a single multi-byte character"); +++ +++ /* Add the initial padding if needed. */ +++ if (width > 0 && !left) +++ { +++ /* Make a first pass to find the output width, so that we can +++ add the required padding. */ +++ mbstate_t mbstate = { 0 }; +++ const OTHER_CHAR_T *src_copy = src; +++ size_t total_written; +++ if (prec < 0) +++ total_written = CONVERT_FROM_OTHER_STRING +++ (NULL, &src_copy, 0, &mbstate); +++ else +++ { +++ /* The source might not be null-terminated. Enforce the +++ limit manually, based on the output length. */ +++ total_written = 0; +++ size_t limit = prec; +++ while (limit > 0 && src_copy != NULL) +++ { +++ size_t write_limit = buf_length; +++ if (write_limit > limit) +++ write_limit = limit; +++ size_t written = CONVERT_FROM_OTHER_STRING +++ (buf, &src_copy, write_limit, &mbstate); +++ if (written == (size_t) -1) +++ return -1; +++ if (written == 0) +++ break; +++ total_written += written; +++ limit -= written; +++ } +++ } +++ +++ /* Output initial padding. */ +++ if (total_written < width) +++ { +++ done = pad_func (s, L_(' '), width - total_written, done); +++ if (done < 0) +++ return done; +++ } +++ } +++ +++ /* Convert the input string, piece by piece. */ +++ size_t total_written = 0; +++ { +++ mbstate_t mbstate = { 0 }; +++ /* If prec is negative, remaining is not decremented, otherwise, +++ it serves as the write limit. */ +++ size_t remaining = -1; +++ if (prec >= 0) +++ remaining = prec; +++ while (remaining > 0 && src != NULL) +++ { +++ size_t write_limit = buf_length; +++ if (remaining < write_limit) +++ write_limit = remaining; +++ size_t written = CONVERT_FROM_OTHER_STRING +++ (buf, &src, write_limit, &mbstate); +++ if (written == (size_t) -1) +++ return -1; +++ if (written == 0) +++ break; +++ done = outstring_func (s, (const UCHAR_T *) buf, written, done); +++ if (done < 0) +++ return done; +++ total_written += written; +++ if (prec >= 0) +++ remaining -= written; +++ } +++ } +++ +++ /* Add final padding. */ +++ if (width > 0 && left && total_written < width) +++ return pad_func (s, L_(' '), width - total_written, done); +++ return done; +++} ++ ++ /* For handling long_double and longlong we use the same flag. If ++ `long' and `long long' are effectively the same type define it to ++@@ -1022,7 +1130,6 @@ static const uint8_t jump_table[] = ++ LABEL (form_string): \ ++ { \ ++ size_t len; \ ++- int string_malloced; \ ++ \ ++ /* The string argument could in fact be `char *' or `wchar_t *'. \ ++ But this should not make a difference here. */ \ ++@@ -1034,7 +1141,6 @@ static const uint8_t jump_table[] = ++ /* Entry point for printing other strings. */ \ ++ LABEL (print_string): \ ++ \ ++- string_malloced = 0; \ ++ if (string == NULL) \ ++ { \ ++ /* Write "(null)" if there's space. */ \ ++@@ -1051,41 +1157,12 @@ static const uint8_t jump_table[] = ++ } \ ++ else if (!is_long && spec != L_('S')) \ ++ { \ ++- /* This is complicated. We have to transform the multibyte \ ++- string into a wide character string. */ \ ++- const char *mbs = (const char *) string; \ ++- mbstate_t mbstate; \ ++- \ ++- len = prec != -1 ? __strnlen (mbs, (size_t) prec) : strlen (mbs); \ ++- \ ++- /* Allocate dynamically an array which definitely is long \ ++- enough for the wide character version. Each byte in the \ ++- multi-byte string can produce at most one wide character. */ \ ++- if (__glibc_unlikely (len > SIZE_MAX / sizeof (wchar_t))) \ ++- { \ ++- __set_errno (EOVERFLOW); \ ++- done = -1; \ ++- goto all_done; \ ++- } \ ++- else if (__libc_use_alloca (len * sizeof (wchar_t))) \ ++- string = (CHAR_T *) alloca (len * sizeof (wchar_t)); \ ++- else if ((string = (CHAR_T *) malloc (len * sizeof (wchar_t))) \ ++- == NULL) \ ++- { \ ++- done = -1; \ ++- goto all_done; \ ++- } \ ++- else \ ++- string_malloced = 1; \ ++- \ ++- memset (&mbstate, '\0', sizeof (mbstate_t)); \ ++- len = __mbsrtowcs (string, &mbs, len, &mbstate); \ ++- if (len == (size_t) -1) \ ++- { \ ++- /* Illegal multibyte character. */ \ ++- done = -1; \ ++- goto all_done; \ ++- } \ +++ done = outstring_converted_wide_string \ +++ (s, (const char *) string, prec, width, left, done); \ +++ if (done < 0) \ +++ goto all_done; \ +++ /* The padding has already been written. */ \ +++ break; \ ++ } \ ++ else \ ++ { \ ++@@ -1108,8 +1185,6 @@ static const uint8_t jump_table[] = ++ outstring (string, len); \ ++ if (left) \ ++ PAD (L' '); \ ++- if (__glibc_unlikely (string_malloced)) \ ++- free (string); \ ++ } \ ++ break; ++ #else ++@@ -1158,7 +1233,6 @@ static const uint8_t jump_table[] = ++ LABEL (form_string): \ ++ { \ ++ size_t len; \ ++- int string_malloced; \ ++ \ ++ /* The string argument could in fact be `char *' or `wchar_t *'. \ ++ But this should not make a difference here. */ \ ++@@ -1170,7 +1244,6 @@ static const uint8_t jump_table[] = ++ /* Entry point for printing other strings. */ \ ++ LABEL (print_string): \ ++ \ ++- string_malloced = 0; \ ++ if (string == NULL) \ ++ { \ ++ /* Write "(null)" if there's space. */ \ ++@@ -1196,51 +1269,12 @@ static const uint8_t jump_table[] = ++ } \ ++ else \ ++ { \ ++- const wchar_t *s2 = (const wchar_t *) string; \ ++- mbstate_t mbstate; \ ++- \ ++- memset (&mbstate, '\0', sizeof (mbstate_t)); \ ++- \ ++- if (prec >= 0) \ ++- { \ ++- /* The string `s2' might not be NUL terminated. */ \ ++- if (__libc_use_alloca (prec)) \ ++- string = (char *) alloca (prec); \ ++- else if ((string = (char *) malloc (prec)) == NULL) \ ++- { \ ++- done = -1; \ ++- goto all_done; \ ++- } \ ++- else \ ++- string_malloced = 1; \ ++- len = __wcsrtombs (string, &s2, prec, &mbstate); \ ++- } \ ++- else \ ++- { \ ++- len = __wcsrtombs (NULL, &s2, 0, &mbstate); \ ++- if (len != (size_t) -1) \ ++- { \ ++- assert (__mbsinit (&mbstate)); \ ++- s2 = (const wchar_t *) string; \ ++- if (__libc_use_alloca (len + 1)) \ ++- string = (char *) alloca (len + 1); \ ++- else if ((string = (char *) malloc (len + 1)) == NULL) \ ++- { \ ++- done = -1; \ ++- goto all_done; \ ++- } \ ++- else \ ++- string_malloced = 1; \ ++- (void) __wcsrtombs (string, &s2, len + 1, &mbstate); \ ++- } \ ++- } \ ++- \ ++- if (len == (size_t) -1) \ ++- { \ ++- /* Illegal wide-character string. */ \ ++- done = -1; \ ++- goto all_done; \ ++- } \ +++ done = outstring_converted_wide_string \ +++ (s, (const wchar_t *) string, prec, width, left, done); \ +++ if (done < 0) \ +++ goto all_done; \ +++ /* The padding has already been written. */ \ +++ break; \ ++ } \ ++ \ ++ if ((width -= len) < 0) \ ++@@ -1254,8 +1288,6 @@ static const uint8_t jump_table[] = ++ outstring (string, len); \ ++ if (left) \ ++ PAD (' '); \ ++- if (__glibc_unlikely (string_malloced)) \ ++- free (string); \ ++ } \ ++ break; ++ #endif ++@@ -1307,7 +1339,6 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap, unsigned int mode_flags) ++ ++ /* Buffer intermediate results. */ ++ CHAR_T work_buffer[WORK_BUFFER_SIZE]; ++- CHAR_T *workstart = NULL; ++ CHAR_T *workend; ++ ++ /* We have to save the original argument pointer. */ ++@@ -1416,7 +1447,6 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap, unsigned int mode_flags) ++ UCHAR_T pad = L_(' ');/* Padding character. */ ++ CHAR_T spec; ++ ++- workstart = NULL; ++ workend = work_buffer + WORK_BUFFER_SIZE; ++ ++ /* Get current character in format string. */ ++@@ -1508,31 +1538,6 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap, unsigned int mode_flags) ++ pad = L_(' '); ++ left = 1; ++ } ++- ++- if (__glibc_unlikely (width >= INT_MAX / sizeof (CHAR_T) - EXTSIZ)) ++- { ++- __set_errno (EOVERFLOW); ++- done = -1; ++- goto all_done; ++- } ++- ++- if (width >= WORK_BUFFER_SIZE - EXTSIZ) ++- { ++- /* We have to use a special buffer. */ ++- size_t needed = ((size_t) width + EXTSIZ) * sizeof (CHAR_T); ++- if (__libc_use_alloca (needed)) ++- workend = (CHAR_T *) alloca (needed) + width + EXTSIZ; ++- else ++- { ++- workstart = (CHAR_T *) malloc (needed); ++- if (workstart == NULL) ++- { ++- done = -1; ++- goto all_done; ++- } ++- workend = workstart + width + EXTSIZ; ++- } ++- } ++ } ++ JUMP (*f, step1_jumps); ++ ++@@ -1540,31 +1545,13 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap, unsigned int mode_flags) ++ LABEL (width): ++ width = read_int (&f); ++ ++- if (__glibc_unlikely (width == -1 ++- || width >= INT_MAX / sizeof (CHAR_T) - EXTSIZ)) +++ if (__glibc_unlikely (width == -1)) ++ { ++ __set_errno (EOVERFLOW); ++ done = -1; ++ goto all_done; ++ } ++ ++- if (width >= WORK_BUFFER_SIZE - EXTSIZ) ++- { ++- /* We have to use a special buffer. */ ++- size_t needed = ((size_t) width + EXTSIZ) * sizeof (CHAR_T); ++- if (__libc_use_alloca (needed)) ++- workend = (CHAR_T *) alloca (needed) + width + EXTSIZ; ++- else ++- { ++- workstart = (CHAR_T *) malloc (needed); ++- if (workstart == NULL) ++- { ++- done = -1; ++- goto all_done; ++- } ++- workend = workstart + width + EXTSIZ; ++- } ++- } ++ if (*f == L_('$')) ++ /* Oh, oh. The argument comes from a positional parameter. */ ++ goto do_positional; ++@@ -1613,34 +1600,6 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap, unsigned int mode_flags) ++ } ++ else ++ prec = 0; ++- if (prec > width && prec > WORK_BUFFER_SIZE - EXTSIZ) ++- { ++- /* Deallocate any previously allocated buffer because it is ++- too small. */ ++- if (__glibc_unlikely (workstart != NULL)) ++- free (workstart); ++- workstart = NULL; ++- if (__glibc_unlikely (prec >= INT_MAX / sizeof (CHAR_T) - EXTSIZ)) ++- { ++- __set_errno (EOVERFLOW); ++- done = -1; ++- goto all_done; ++- } ++- size_t needed = ((size_t) prec + EXTSIZ) * sizeof (CHAR_T); ++- ++- if (__libc_use_alloca (needed)) ++- workend = (CHAR_T *) alloca (needed) + prec + EXTSIZ; ++- else ++- { ++- workstart = (CHAR_T *) malloc (needed); ++- if (workstart == NULL) ++- { ++- done = -1; ++- goto all_done; ++- } ++- workend = workstart + prec + EXTSIZ; ++- } ++- } ++ JUMP (*f, step2_jumps); ++ ++ /* Process 'h' modifier. There might another 'h' following. */ ++@@ -1704,10 +1663,6 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap, unsigned int mode_flags) ++ /* The format is correctly handled. */ ++ ++nspecs_done; ++ ++- if (__glibc_unlikely (workstart != NULL)) ++- free (workstart); ++- workstart = NULL; ++- ++ /* Look for next format specifier. */ ++ #ifdef COMPILE_WPRINTF ++ f = __find_specwc ((end_of_spec = ++f)); ++@@ -1725,18 +1680,11 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap, unsigned int mode_flags) ++ ++ /* Hand off processing for positional parameters. */ ++ do_positional: ++- if (__glibc_unlikely (workstart != NULL)) ++- { ++- free (workstart); ++- workstart = NULL; ++- } ++ done = printf_positional (s, format, readonly_format, ap, &ap_save, ++ done, nspecs_done, lead_str_end, work_buffer, ++ save_errno, grouping, thousands_sep, mode_flags); ++ ++ all_done: ++- if (__glibc_unlikely (workstart != NULL)) ++- free (workstart); ++ /* Unlock the stream. */ ++ _IO_funlockfile (s); ++ _IO_cleanup_region_end (0); ++@@ -1780,8 +1728,6 @@ printf_positional (FILE *s, const CHAR_T *format, int readonly_format, ++ /* Just a counter. */ ++ size_t cnt; ++ ++- CHAR_T *workstart = NULL; ++- ++ if (grouping == (const char *) -1) ++ { ++ #ifdef COMPILE_WPRINTF ++@@ -1974,7 +1920,6 @@ printf_positional (FILE *s, const CHAR_T *format, int readonly_format, ++ char pad = specs[nspecs_done].info.pad; ++ CHAR_T spec = specs[nspecs_done].info.spec; ++ ++- workstart = NULL; ++ CHAR_T *workend = work_buffer + WORK_BUFFER_SIZE; ++ ++ /* Fill in last information. */ ++@@ -2008,27 +1953,6 @@ printf_positional (FILE *s, const CHAR_T *format, int readonly_format, ++ prec = specs[nspecs_done].info.prec; ++ } ++ ++- /* Maybe the buffer is too small. */ ++- if (MAX (prec, width) + EXTSIZ > WORK_BUFFER_SIZE) ++- { ++- if (__libc_use_alloca ((MAX (prec, width) + EXTSIZ) ++- * sizeof (CHAR_T))) ++- workend = ((CHAR_T *) alloca ((MAX (prec, width) + EXTSIZ) ++- * sizeof (CHAR_T)) ++- + (MAX (prec, width) + EXTSIZ)); ++- else ++- { ++- workstart = (CHAR_T *) malloc ((MAX (prec, width) + EXTSIZ) ++- * sizeof (CHAR_T)); ++- if (workstart == NULL) ++- { ++- done = -1; ++- goto all_done; ++- } ++- workend = workstart + (MAX (prec, width) + EXTSIZ); ++- } ++- } ++- ++ /* Process format specifiers. */ ++ while (1) ++ { ++@@ -2102,18 +2026,12 @@ printf_positional (FILE *s, const CHAR_T *format, int readonly_format, ++ break; ++ } ++ ++- if (__glibc_unlikely (workstart != NULL)) ++- free (workstart); ++- workstart = NULL; ++- ++ /* Write the following constant string. */ ++ outstring (specs[nspecs_done].end_of_fmt, ++ specs[nspecs_done].next_fmt ++ - specs[nspecs_done].end_of_fmt); ++ } ++ all_done: ++- if (__glibc_unlikely (workstart != NULL)) ++- free (workstart); ++ scratch_buffer_free (&argsbuf); ++ scratch_buffer_free (&specsbuf); ++ return done; ++@@ -2236,7 +2154,8 @@ group_number (CHAR_T *front_ptr, CHAR_T *w, CHAR_T *rear_ptr, ++ copy_rest: ++ /* No further grouping to be done. Copy the rest of the ++ number. */ ++- memmove (w, s, (front_ptr -s) * sizeof (CHAR_T)); +++ w -= s - front_ptr; +++ memmove (w, front_ptr, (s - front_ptr) * sizeof (CHAR_T)); ++ break; ++ } ++ else if (*grouping != '\0') ++diff --git a/stdlib/Makefile b/stdlib/Makefile ++index 45214b59e4..4615f6dfe7 100644 ++--- a/stdlib/Makefile +++++ b/stdlib/Makefile ++@@ -70,7 +70,7 @@ tests := tst-strtol tst-strtod testmb testrand testsort testdiv \ ++ test-canon test-canon2 tst-strtoll tst-environ \ ++ tst-xpg-basename tst-random tst-random2 tst-bsearch \ ++ tst-limits tst-rand48 bug-strtod tst-setcontext \ ++- tst-setcontext2 test-a64l tst-qsort tst-system testmb2 \ +++ tst-setcontext2 test-a64l tst-qsort testmb2 \ ++ bug-strtod2 tst-atof1 tst-atof2 tst-strtod2 \ ++ tst-rand48-2 tst-makecontext tst-strtod5 \ ++ tst-qsort2 tst-makecontext2 tst-strtod6 tst-unsetenv1 \ ++@@ -92,6 +92,7 @@ tests := tst-strtol tst-strtod testmb testrand testsort testdiv \ ++ tests-internal := tst-strtod1i tst-strtod3 tst-strtod4 tst-strtod5i \ ++ tst-tls-atexit tst-tls-atexit-nodelete ++ tests-static := tst-secure-getenv +++tests-container := tst-system ++ ++ ifeq ($(build-hardcoded-path-in-tests),yes) ++ tests += tst-empty-env ++diff --git a/stdlib/tst-secure-getenv.c b/stdlib/tst-secure-getenv.c ++index 3cfe9a05c3..d4b1139c5e 100644 ++--- a/stdlib/tst-secure-getenv.c +++++ b/stdlib/tst-secure-getenv.c ++@@ -30,167 +30,12 @@ ++ #include ++ #include ++ +++#include ++ #include +++#include ++ #include ++ ++ static char MAGIC_ARGUMENT[] = "run-actual-test"; ++-#define MAGIC_STATUS 19 ++- ++-/* Return a GID which is not our current GID, but is present in the ++- supplementary group list. */ ++-static gid_t ++-choose_gid (void) ++-{ ++- int count = getgroups (0, NULL); ++- if (count < 0) ++- { ++- printf ("getgroups: %m\n"); ++- exit (1); ++- } ++- gid_t *groups; ++- groups = xcalloc (count, sizeof (*groups)); ++- int ret = getgroups (count, groups); ++- if (ret < 0) ++- { ++- printf ("getgroups: %m\n"); ++- exit (1); ++- } ++- gid_t current = getgid (); ++- gid_t not_current = 0; ++- for (int i = 0; i < ret; ++i) ++- { ++- if (groups[i] != current) ++- { ++- not_current = groups[i]; ++- break; ++- } ++- } ++- free (groups); ++- return not_current; ++-} ++- ++- ++-/* Copies the executable into a restricted directory, so that we can ++- safely make it SGID with the TARGET group ID. Then runs the ++- executable. */ ++-static int ++-run_executable_sgid (gid_t target) ++-{ ++- char *dirname = xasprintf ("%s/secure-getenv.%jd", ++- test_dir, (intmax_t) getpid ()); ++- char *execname = xasprintf ("%s/bin", dirname); ++- int infd = -1; ++- int outfd = -1; ++- int ret = -1; ++- if (mkdir (dirname, 0700) < 0) ++- { ++- printf ("mkdir: %m\n"); ++- goto err; ++- } ++- infd = open ("/proc/self/exe", O_RDONLY); ++- if (infd < 0) ++- { ++- printf ("open (/proc/self/exe): %m\n"); ++- goto err; ++- } ++- outfd = open (execname, O_WRONLY | O_CREAT | O_EXCL, 0700); ++- if (outfd < 0) ++- { ++- printf ("open (%s): %m\n", execname); ++- goto err; ++- } ++- char buf[4096]; ++- for (;;) ++- { ++- ssize_t rdcount = read (infd, buf, sizeof (buf)); ++- if (rdcount < 0) ++- { ++- printf ("read: %m\n"); ++- goto err; ++- } ++- if (rdcount == 0) ++- break; ++- char *p = buf; ++- char *end = buf + rdcount; ++- while (p != end) ++- { ++- ssize_t wrcount = write (outfd, buf, end - p); ++- if (wrcount == 0) ++- errno = ENOSPC; ++- if (wrcount <= 0) ++- { ++- printf ("write: %m\n"); ++- goto err; ++- } ++- p += wrcount; ++- } ++- } ++- if (fchown (outfd, getuid (), target) < 0) ++- { ++- printf ("fchown (%s): %m\n", execname); ++- goto err; ++- } ++- if (fchmod (outfd, 02750) < 0) ++- { ++- printf ("fchmod (%s): %m\n", execname); ++- goto err; ++- } ++- if (close (outfd) < 0) ++- { ++- printf ("close (outfd): %m\n"); ++- goto err; ++- } ++- if (close (infd) < 0) ++- { ++- printf ("close (infd): %m\n"); ++- goto err; ++- } ++- ++- int kid = fork (); ++- if (kid < 0) ++- { ++- printf ("fork: %m\n"); ++- goto err; ++- } ++- if (kid == 0) ++- { ++- /* Child process. */ ++- char *args[] = { execname, MAGIC_ARGUMENT, NULL }; ++- execve (execname, args, environ); ++- printf ("execve (%s): %m\n", execname); ++- _exit (1); ++- } ++- int status; ++- if (waitpid (kid, &status, 0) < 0) ++- { ++- printf ("waitpid: %m\n"); ++- goto err; ++- } ++- if (!WIFEXITED (status) || WEXITSTATUS (status) != MAGIC_STATUS) ++- { ++- printf ("Unexpected exit status %d from child process\n", ++- status); ++- goto err; ++- } ++- ret = 0; ++- ++-err: ++- if (outfd >= 0) ++- close (outfd); ++- if (infd >= 0) ++- close (infd); ++- if (execname) ++- { ++- unlink (execname); ++- free (execname); ++- } ++- if (dirname) ++- { ++- rmdir (dirname); ++- free (dirname); ++- } ++- return ret; ++-} ++ ++ static int ++ do_test (void) ++@@ -212,15 +57,15 @@ do_test (void) ++ exit (1); ++ } ++ ++- gid_t target = choose_gid (); ++- if (target == 0) ++- { ++- fprintf (stderr, ++- "Could not find a suitable GID for user %jd, skipping test\n", ++- (intmax_t) getuid ()); ++- exit (0); ++- } ++- return run_executable_sgid (target); +++ int status = support_capture_subprogram_self_sgid (MAGIC_ARGUMENT); +++ +++ if (WEXITSTATUS (status) == EXIT_UNSUPPORTED) +++ return EXIT_UNSUPPORTED; +++ +++ if (!WIFEXITED (status)) +++ FAIL_EXIT1 ("Unexpected exit status %d from child process\n", status); +++ +++ return 0; ++ } ++ ++ static void ++@@ -229,23 +74,15 @@ alternative_main (int argc, char **argv) ++ if (argc == 2 && strcmp (argv[1], MAGIC_ARGUMENT) == 0) ++ { ++ if (getgid () == getegid ()) ++- { ++- /* This can happen if the file system is mounted nosuid. */ ++- fprintf (stderr, "SGID failed: GID and EGID match (%jd)\n", ++- (intmax_t) getgid ()); ++- exit (MAGIC_STATUS); ++- } +++ /* This can happen if the file system is mounted nosuid. */ +++ FAIL_UNSUPPORTED ("SGID failed: GID and EGID match (%jd)\n", +++ (intmax_t) getgid ()); ++ if (getenv ("PATH") == NULL) ++- { ++- printf ("PATH variable not present\n"); ++- exit (3); ++- } +++ FAIL_EXIT (3, "PATH variable not present\n"); ++ if (secure_getenv ("PATH") != NULL) ++- { ++- printf ("PATH variable not filtered out\n"); ++- exit (4); ++- } ++- exit (MAGIC_STATUS); +++ FAIL_EXIT (4, "PATH variable not filtered out\n"); +++ +++ exit (EXIT_SUCCESS); ++ } ++ } ++ ++diff --git a/stdlib/tst-system.c b/stdlib/tst-system.c ++index b6c5aea08f..eddea33f4c 100644 ++--- a/stdlib/tst-system.c +++++ b/stdlib/tst-system.c ++@@ -17,14 +17,130 @@ ++ . */ ++ ++ #include +++#include +++#include +++#include +++#include ++ +++#include +++#include +++#include +++#include +++ +++static char *tmpdir; +++static long int namemax; +++ +++static void +++do_prepare (int argc, char *argv[]) +++{ +++ tmpdir = support_create_temp_directory ("tst-system-"); +++ /* Include the last '/0'. */ +++ namemax = pathconf (tmpdir, _PC_NAME_MAX) + 1; +++ TEST_VERIFY_EXIT (namemax != -1); +++} +++#define PREPARE do_prepare +++ +++struct args +++{ +++ const char *command; +++ int exit_status; +++ int term_sig; +++ const char *path; +++}; +++ +++static void +++call_system (void *closure) +++{ +++ struct args *args = (struct args *) closure; +++ int ret; +++ +++ if (args->path != NULL) +++ TEST_COMPARE (setenv ("PATH", args->path, 1), 0); +++ ret = system (args->command); +++ if (args->term_sig == 0) +++ { +++ /* Expect regular termination. */ +++ TEST_VERIFY (WIFEXITED (ret) != 0); +++ TEST_COMPARE (WEXITSTATUS (ret), args->exit_status); +++ } +++ else +++ { +++ /* status_or_signal < 0. Expect termination by signal. */ +++ TEST_VERIFY (WIFSIGNALED (ret) != 0); +++ TEST_COMPARE (WTERMSIG (ret), args->term_sig); +++ } +++} ++ ++ static int ++ do_test (void) ++ { ++- return system (":"); ++-} +++ TEST_VERIFY (system (NULL) != 0); ++ +++ { +++ char cmd[namemax]; +++ memset (cmd, 'a', sizeof(cmd)); +++ cmd[sizeof(cmd) - 1] = '\0'; +++ +++ struct support_capture_subprocess result; +++ result = support_capture_subprocess (call_system, +++ &(struct args) { +++ cmd, 127, 0, tmpdir +++ }); +++ support_capture_subprocess_check (&result, "system", 0, sc_allow_stderr); +++ +++ char *returnerr = xasprintf ("%s: execing %s failed: " +++ "No such file or directory", +++ basename(_PATH_BSHELL), cmd); +++ TEST_COMPARE_STRING (result.err.buffer, returnerr); +++ free (returnerr); +++ } +++ +++ { +++ char cmd[namemax + 1]; +++ memset (cmd, 'a', sizeof(cmd)); +++ cmd[sizeof(cmd) - 1] = '\0'; +++ +++ struct support_capture_subprocess result; +++ result = support_capture_subprocess (call_system, +++ &(struct args) { +++ cmd, 127, 0, tmpdir +++ }); +++ support_capture_subprocess_check (&result, "system", 0, sc_allow_stderr); +++ +++ char *returnerr = xasprintf ("%s: execing %s failed: " +++ "File name too long", +++ basename(_PATH_BSHELL), cmd); +++ TEST_COMPARE_STRING (result.err.buffer, returnerr); +++ free (returnerr); +++ } +++ +++ { +++ struct support_capture_subprocess result; +++ result = support_capture_subprocess (call_system, +++ &(struct args) { +++ "kill $$", 0, SIGTERM +++ }); +++ support_capture_subprocess_check (&result, "system", 0, sc_allow_none); +++ } +++ +++ { +++ struct support_capture_subprocess result; +++ result = support_capture_subprocess (call_system, +++ &(struct args) { "echo ...", 0 }); +++ support_capture_subprocess_check (&result, "system", 0, sc_allow_stdout); +++ TEST_COMPARE_STRING (result.out.buffer, "...\n"); +++ } +++ +++ { +++ struct support_capture_subprocess result; +++ result = support_capture_subprocess (call_system, +++ &(struct args) { "exit 1", 1 }); +++ support_capture_subprocess_check (&result, "system", 0, sc_allow_none); +++ } +++ +++ TEST_COMPARE (system (""), 0); +++ +++ return 0; +++} ++ ++-#define TEST_FUNCTION do_test () ++-#include "../test-skeleton.c" +++#include ++diff --git a/string/test-memchr.c b/string/test-memchr.c ++index 5dd0aa5470..de70e794d9 100644 ++--- a/string/test-memchr.c +++++ b/string/test-memchr.c ++@@ -65,8 +65,8 @@ do_one_test (impl_t *impl, const CHAR *s, int c, size_t n, CHAR *exp_res) ++ CHAR *res = CALL (impl, s, c, n); ++ if (res != exp_res) ++ { ++- error (0, 0, "Wrong result in function %s %p %p", impl->name, ++- res, exp_res); +++ error (0, 0, "Wrong result in function %s (%p, %d, %zu) -> %p != %p", +++ impl->name, s, c, n, res, exp_res); ++ ret = 1; ++ return; ++ } ++@@ -91,7 +91,7 @@ do_test (size_t align, size_t pos, size_t len, size_t n, int seek_char) ++ } ++ buf[align + len] = 0; ++ ++- if (pos < len) +++ if (pos < MIN(n, len)) ++ { ++ buf[align + pos] = seek_char; ++ buf[align + len] = -seek_char; ++@@ -107,6 +107,38 @@ do_test (size_t align, size_t pos, size_t len, size_t n, int seek_char) ++ do_one_test (impl, (CHAR *) (buf + align), seek_char, n, result); ++ } ++ +++static void +++do_overflow_tests (void) +++{ +++ size_t i, j, len; +++ const size_t one = 1; +++ uintptr_t buf_addr = (uintptr_t) buf1; +++ +++ for (i = 0; i < 750; ++i) +++ { +++ do_test (0, i, 751, SIZE_MAX - i, BIG_CHAR); +++ do_test (0, i, 751, i - buf_addr, BIG_CHAR); +++ do_test (0, i, 751, -buf_addr - i, BIG_CHAR); +++ do_test (0, i, 751, SIZE_MAX - buf_addr - i, BIG_CHAR); +++ do_test (0, i, 751, SIZE_MAX - buf_addr + i, BIG_CHAR); +++ +++ len = 0; +++ for (j = 8 * sizeof(size_t) - 1; j ; --j) +++ { +++ len |= one << j; +++ do_test (0, i, 751, len - i, BIG_CHAR); +++ do_test (0, i, 751, len + i, BIG_CHAR); +++ do_test (0, i, 751, len - buf_addr - i, BIG_CHAR); +++ do_test (0, i, 751, len - buf_addr + i, BIG_CHAR); +++ +++ do_test (0, i, 751, ~len - i, BIG_CHAR); +++ do_test (0, i, 751, ~len + i, BIG_CHAR); +++ do_test (0, i, 751, ~len - buf_addr - i, BIG_CHAR); +++ do_test (0, i, 751, ~len - buf_addr + i, BIG_CHAR); +++ } +++ } +++} +++ ++ static void ++ do_random_tests (void) ++ { ++@@ -221,6 +253,7 @@ test_main (void) ++ do_test (page_size / 2 - i, i, i, 1, 0x9B); ++ ++ do_random_tests (); +++ do_overflow_tests (); ++ return ret; ++ } ++ ++diff --git a/string/test-strncat.c b/string/test-strncat.c ++index abbacb95c6..0c7f68d086 100644 ++--- a/string/test-strncat.c +++++ b/string/test-strncat.c ++@@ -134,6 +134,66 @@ do_test (size_t align1, size_t align2, size_t len1, size_t len2, ++ } ++ } ++ +++static void +++do_overflow_tests (void) +++{ +++ size_t i, j, len; +++ const size_t one = 1; +++ CHAR *s1, *s2; +++ uintptr_t s1_addr; +++ s1 = (CHAR *) buf1; +++ s2 = (CHAR *) buf2; +++ s1_addr = (uintptr_t)s1; +++ for (j = 0; j < 200; ++j) +++ s2[j] = 32 + 23 * j % (BIG_CHAR - 32); +++ s2[200] = 0; +++ for (i = 0; i < 750; ++i) { +++ for (j = 0; j < i; ++j) +++ s1[j] = 32 + 23 * j % (BIG_CHAR - 32); +++ s1[i] = '\0'; +++ +++ FOR_EACH_IMPL (impl, 0) +++ { +++ s2[200] = '\0'; +++ do_one_test (impl, s2, s1, SIZE_MAX - i); +++ s2[200] = '\0'; +++ do_one_test (impl, s2, s1, i - s1_addr); +++ s2[200] = '\0'; +++ do_one_test (impl, s2, s1, -s1_addr - i); +++ s2[200] = '\0'; +++ do_one_test (impl, s2, s1, SIZE_MAX - s1_addr - i); +++ s2[200] = '\0'; +++ do_one_test (impl, s2, s1, SIZE_MAX - s1_addr + i); +++ } +++ +++ len = 0; +++ for (j = 8 * sizeof(size_t) - 1; j ; --j) +++ { +++ len |= one << j; +++ FOR_EACH_IMPL (impl, 0) +++ { +++ s2[200] = '\0'; +++ do_one_test (impl, s2, s1, len - i); +++ s2[200] = '\0'; +++ do_one_test (impl, s2, s1, len + i); +++ s2[200] = '\0'; +++ do_one_test (impl, s2, s1, len - s1_addr - i); +++ s2[200] = '\0'; +++ do_one_test (impl, s2, s1, len - s1_addr + i); +++ +++ s2[200] = '\0'; +++ do_one_test (impl, s2, s1, ~len - i); +++ s2[200] = '\0'; +++ do_one_test (impl, s2, s1, ~len + i); +++ s2[200] = '\0'; +++ do_one_test (impl, s2, s1, ~len - s1_addr - i); +++ s2[200] = '\0'; +++ do_one_test (impl, s2, s1, ~len - s1_addr + i); +++ } +++ } +++ } +++} +++ ++ static void ++ do_random_tests (void) ++ { ++@@ -316,6 +376,7 @@ test_main (void) ++ } ++ ++ do_random_tests (); +++ do_overflow_tests (); ++ return ret; ++ } ++ ++diff --git a/string/test-strncmp.c b/string/test-strncmp.c ++index d961ac4493..02806f4ebd 100644 ++--- a/string/test-strncmp.c +++++ b/string/test-strncmp.c ++@@ -403,6 +403,18 @@ check2 (void) ++ free (s2); ++ } ++ +++static void +++check3 (void) +++{ +++ const CHAR *s1 = L ("abc"); +++ CHAR *s2 = STRDUP (s1); +++ +++ FOR_EACH_IMPL (impl, 0) +++ check_result (impl, s1, s2, SIZE_MAX, 0); +++ +++ free (s2); +++} +++ ++ int ++ test_main (void) ++ { ++@@ -412,6 +424,7 @@ test_main (void) ++ ++ check1 (); ++ check2 (); +++ check3 (); ++ ++ printf ("%23s", ""); ++ FOR_EACH_IMPL (impl, 0) ++diff --git a/string/test-strnlen.c b/string/test-strnlen.c ++index 80ac9e8602..ca34352b0d 100644 ++--- a/string/test-strnlen.c +++++ b/string/test-strnlen.c ++@@ -27,6 +27,7 @@ ++ ++ #ifndef WIDE ++ # define STRNLEN strnlen +++# define MEMSET memset ++ # define CHAR char ++ # define BIG_CHAR CHAR_MAX ++ # define MIDDLE_CHAR 127 ++@@ -34,6 +35,7 @@ ++ #else ++ # include ++ # define STRNLEN wcsnlen +++# define MEMSET wmemset ++ # define CHAR wchar_t ++ # define BIG_CHAR WCHAR_MAX ++ # define MIDDLE_CHAR 1121 ++@@ -73,7 +75,7 @@ do_test (size_t align, size_t len, size_t maxlen, int max_char) ++ { ++ size_t i; ++ ++- align &= 63; +++ align &= (getpagesize () / sizeof (CHAR) - 1); ++ if ((align + len) * sizeof (CHAR) >= page_size) ++ return; ++ ++@@ -87,6 +89,56 @@ do_test (size_t align, size_t len, size_t maxlen, int max_char) ++ do_one_test (impl, (CHAR *) (buf + align), maxlen, MIN (len, maxlen)); ++ } ++ +++static void +++do_overflow_tests (void) +++{ +++ size_t i, j, al_idx, repeats, len; +++ const size_t one = 1; +++ uintptr_t buf_addr = (uintptr_t) buf1; +++ const size_t alignments[] = { 0, 1, 7, 9, 31, 33, 63, 65, 95, 97, 127, 129 }; +++ +++ for (al_idx = 0; al_idx < sizeof (alignments) / sizeof (alignments[0]); +++ al_idx++) +++ { +++ for (repeats = 0; repeats < 2; ++repeats) +++ { +++ size_t align = repeats ? (getpagesize () - alignments[al_idx]) +++ : alignments[al_idx]; +++ align /= sizeof (CHAR); +++ for (i = 0; i < 750; ++i) +++ { +++ do_test (align, i, SIZE_MAX, BIG_CHAR); +++ +++ do_test (align, i, SIZE_MAX - i, BIG_CHAR); +++ do_test (align, i, i - buf_addr, BIG_CHAR); +++ do_test (align, i, -buf_addr - i, BIG_CHAR); +++ do_test (align, i, SIZE_MAX - buf_addr - i, BIG_CHAR); +++ do_test (align, i, SIZE_MAX - buf_addr + i, BIG_CHAR); +++ +++ len = 0; +++ for (j = 8 * sizeof (size_t) - 1; j; --j) +++ { +++ len |= one << j; +++ do_test (align, i, len, BIG_CHAR); +++ do_test (align, i, len - i, BIG_CHAR); +++ do_test (align, i, len + i, BIG_CHAR); +++ do_test (align, i, len - buf_addr - i, BIG_CHAR); +++ do_test (align, i, len - buf_addr + i, BIG_CHAR); +++ +++ do_test (align, i, ~len - i, BIG_CHAR); +++ do_test (align, i, ~len + i, BIG_CHAR); +++ do_test (align, i, ~len - buf_addr - i, BIG_CHAR); +++ do_test (align, i, ~len - buf_addr + i, BIG_CHAR); +++ +++ do_test (align, i, -buf_addr, BIG_CHAR); +++ do_test (align, i, j - buf_addr, BIG_CHAR); +++ do_test (align, i, -buf_addr - j, BIG_CHAR); +++ } +++ } +++ } +++ } +++} +++ ++ static void ++ do_random_tests (void) ++ { ++@@ -153,7 +205,7 @@ do_page_tests (void) ++ size_t last_offset = (page_size / sizeof (CHAR)) - 1; ++ ++ CHAR *s = (CHAR *) buf2; ++- memset (s, 65, (last_offset - 1)); +++ MEMSET (s, 65, (last_offset - 1)); ++ s[last_offset] = 0; ++ ++ /* Place short strings ending at page boundary. */ ++@@ -196,6 +248,35 @@ do_page_tests (void) ++ } ++ } ++ +++/* Tests meant to unveil fail on implementations that access bytes +++ beyond the maxium length. */ +++ +++static void +++do_page_2_tests (void) +++{ +++ size_t i, exp_len, offset; +++ size_t last_offset = page_size / sizeof (CHAR); +++ +++ CHAR *s = (CHAR *) buf2; +++ MEMSET (s, 65, last_offset); +++ +++ /* Place short strings ending at page boundary without the null +++ byte. */ +++ offset = last_offset; +++ for (i = 0; i < 128; i++) +++ { +++ /* Decrease offset to stress several sizes and alignments. */ +++ offset--; +++ exp_len = last_offset - offset; +++ FOR_EACH_IMPL (impl, 0) +++ { +++ /* If an implementation goes beyond EXP_LEN, it will trigger +++ the segfault. */ +++ do_one_test (impl, (CHAR *) (s + offset), exp_len, exp_len); +++ } +++ } +++} +++ ++ int ++ test_main (void) ++ { ++@@ -242,6 +323,8 @@ test_main (void) ++ ++ do_random_tests (); ++ do_page_tests (); +++ do_page_2_tests (); +++ do_overflow_tests (); ++ return ret; ++ } ++ ++diff --git a/sunrpc/Makefile b/sunrpc/Makefile ++index d5840d0770..162a5cef53 100644 ++--- a/sunrpc/Makefile +++++ b/sunrpc/Makefile ++@@ -95,7 +95,8 @@ others += rpcgen ++ endif ++ ++ tests = tst-xdrmem tst-xdrmem2 test-rpcent tst-udp-error tst-udp-timeout \ ++- tst-udp-nonblocking +++ tst-udp-nonblocking tst-bug22542 tst-bug28768 +++ ++ xtests := tst-getmyaddr ++ ++ ifeq ($(have-thread-library),yes) ++@@ -246,3 +247,5 @@ $(objpfx)tst-udp-timeout: $(common-objpfx)linkobj/libc.so ++ $(objpfx)tst-udp-nonblocking: $(common-objpfx)linkobj/libc.so ++ $(objpfx)tst-udp-garbage: \ ++ $(common-objpfx)linkobj/libc.so $(shared-thread-library) +++ +++$(objpfx)tst-bug22542: $(common-objpfx)linkobj/libc.so ++diff --git a/sunrpc/clnt_gen.c b/sunrpc/clnt_gen.c ++index 13ced8994e..b44357cd88 100644 ++--- a/sunrpc/clnt_gen.c +++++ b/sunrpc/clnt_gen.c ++@@ -57,9 +57,13 @@ clnt_create (const char *hostname, u_long prog, u_long vers, ++ ++ if (strcmp (proto, "unix") == 0) ++ { ++- memset ((char *)&sun, 0, sizeof (sun)); ++- sun.sun_family = AF_UNIX; ++- strcpy (sun.sun_path, hostname); +++ if (__sockaddr_un_set (&sun, hostname) < 0) +++ { +++ struct rpc_createerr *ce = &get_rpc_createerr (); +++ ce->cf_stat = RPC_SYSTEMERROR; +++ ce->cf_error.re_errno = errno; +++ return NULL; +++ } ++ sock = RPC_ANYSOCK; ++ client = clntunix_create (&sun, prog, vers, &sock, 0, 0); ++ if (client == NULL) ++diff --git a/sunrpc/svc_unix.c b/sunrpc/svc_unix.c ++index e01afeabe6..b065d6063a 100644 ++--- a/sunrpc/svc_unix.c +++++ b/sunrpc/svc_unix.c ++@@ -154,7 +154,10 @@ svcunix_create (int sock, u_int sendsize, u_int recvsize, char *path) ++ SVCXPRT *xprt; ++ struct unix_rendezvous *r; ++ struct sockaddr_un addr; ++- socklen_t len = sizeof (struct sockaddr_in); +++ socklen_t len = sizeof (addr); +++ +++ if (__sockaddr_un_set (&addr, path) < 0) +++ return NULL; ++ ++ if (sock == RPC_ANYSOCK) ++ { ++@@ -165,12 +168,6 @@ svcunix_create (int sock, u_int sendsize, u_int recvsize, char *path) ++ } ++ madesock = TRUE; ++ } ++- memset (&addr, '\0', sizeof (addr)); ++- addr.sun_family = AF_UNIX; ++- len = strlen (path) + 1; ++- memcpy (addr.sun_path, path, len); ++- len += sizeof (addr.sun_family); ++- ++ __bind (sock, (struct sockaddr *) &addr, len); ++ ++ if (__getsockname (sock, (struct sockaddr *) &addr, &len) != 0 ++diff --git a/sunrpc/tst-bug22542.c b/sunrpc/tst-bug22542.c ++new file mode 100644 ++index 0000000000..d6cd79787b ++--- /dev/null +++++ b/sunrpc/tst-bug22542.c ++@@ -0,0 +1,44 @@ +++/* Test to verify that overlong hostname is rejected by clnt_create +++ and doesn't cause a buffer overflow (bug 22542). +++ +++ Copyright (C) 2022 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 +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++ +++static int +++do_test (void) +++{ +++ /* Create an arbitrary hostname that's longer than fits in sun_path. */ +++ char name [sizeof ((struct sockaddr_un*)0)->sun_path * 2]; +++ memset (name, 'x', sizeof name - 1); +++ name [sizeof name - 1] = '\0'; +++ +++ errno = 0; +++ CLIENT *clnt = clnt_create (name, 0, 0, "unix"); +++ +++ TEST_VERIFY (clnt == NULL); +++ TEST_COMPARE (errno, EINVAL); +++ return 0; +++} +++ +++#include ++diff --git a/sunrpc/tst-bug28768.c b/sunrpc/tst-bug28768.c ++new file mode 100644 ++index 0000000000..35a4b7b0b3 ++--- /dev/null +++++ b/sunrpc/tst-bug28768.c ++@@ -0,0 +1,42 @@ +++/* Test to verify that long path is rejected by svcunix_create (bug 28768). +++ Copyright (C) 2022 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 +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++ +++/* svcunix_create does not have a default version in linkobj/libc.so. */ +++compat_symbol_reference (libc, svcunix_create, svcunix_create, GLIBC_2_1); +++ +++static int +++do_test (void) +++{ +++ char pathname[109]; +++ memset (pathname, 'x', sizeof (pathname)); +++ pathname[sizeof (pathname) - 1] = '\0'; +++ +++ errno = 0; +++ TEST_VERIFY (svcunix_create (RPC_ANYSOCK, 4096, 4096, pathname) == NULL); +++ TEST_COMPARE (errno, EINVAL); +++ +++ return 0; +++} +++ +++#include ++diff --git a/support/Makefile b/support/Makefile ++index 3325feb790..05e8c292b7 100644 ++--- a/support/Makefile +++++ b/support/Makefile ++@@ -83,8 +83,10 @@ libsupport-routines = \ ++ xasprintf \ ++ xbind \ ++ xcalloc \ +++ xchdir \ ++ xchroot \ ++ xclock_gettime \ +++ xclone \ ++ xclose \ ++ xconnect \ ++ xcopy_file_range \ ++diff --git a/support/capture_subprocess.h b/support/capture_subprocess.h ++index 9808750f80..421f657678 100644 ++--- a/support/capture_subprocess.h +++++ b/support/capture_subprocess.h ++@@ -41,6 +41,12 @@ struct support_capture_subprocess support_capture_subprocess ++ struct support_capture_subprocess support_capture_subprogram ++ (const char *file, char *const argv[]); ++ +++/* Copy the running program into a setgid binary and run it with CHILD_ID +++ argument. If execution is successful, return the exit status of the child +++ program, otherwise return a non-zero failure exit code. */ +++int support_capture_subprogram_self_sgid +++ (char *child_id); +++ ++ /* Deallocate the subprocess data captured by ++ support_capture_subprocess. */ ++ void support_capture_subprocess_free (struct support_capture_subprocess *); ++diff --git a/support/shell-container.c b/support/shell-container.c ++index 509e0d69b1..201536d24e 100644 ++--- a/support/shell-container.c +++++ b/support/shell-container.c ++@@ -135,6 +135,37 @@ copy_func (char **argv) ++ ++ } ++ +++/* Emulate the 'exit' builtin. The exit value is optional. */ +++static int +++exit_func (char **argv) +++{ +++ int exit_val = 0; +++ +++ if (argv[0] != 0) +++ exit_val = atoi (argv[0]) & 0xff; +++ exit (exit_val); +++ return 0; +++} +++ +++/* Emulate the "/bin/kill" command. Options are ignored. */ +++static int +++kill_func (char **argv) +++{ +++ int signum = SIGTERM; +++ int i; +++ +++ for (i = 0; argv[i]; i++) +++ { +++ pid_t pid; +++ if (strcmp (argv[i], "$$") == 0) +++ pid = getpid (); +++ else +++ pid = atoi (argv[i]); +++ kill (pid, signum); +++ } +++ return 0; +++} +++ ++ /* This is a list of all the built-in commands we understand. */ ++ static struct { ++ const char *name; ++@@ -143,6 +174,8 @@ static struct { ++ { "true", true_func }, ++ { "echo", echo_func }, ++ { "cp", copy_func }, +++ { "exit", exit_func }, +++ { "kill", kill_func }, ++ { NULL, NULL } ++ }; ++ ++@@ -238,7 +271,7 @@ run_command_array (char **argv) ++ ++ fprintf (stderr, "sh: execing %s failed: %s", ++ argv[0], strerror (errno)); ++- exit (1); +++ exit (127); ++ } ++ ++ waitpid (pid, &status, 0); ++@@ -251,6 +284,11 @@ run_command_array (char **argv) ++ if (rv) ++ exit (rv); ++ } +++ else if (WIFSIGNALED (status)) +++ { +++ int sig = WTERMSIG (status); +++ raise (sig); +++ } ++ else ++ exit (1); ++ } ++diff --git a/support/subprocess.h b/support/subprocess.h ++index 8b442fd5c0..34ffd02e8e 100644 ++--- a/support/subprocess.h +++++ b/support/subprocess.h ++@@ -38,6 +38,11 @@ struct support_subprocess support_subprocess ++ struct support_subprocess support_subprogram ++ (const char *file, char *const argv[]); ++ +++/* Invoke program FILE with ARGV arguments by using posix_spawn and wait for it +++ to complete. Return program exit status. */ +++int support_subprogram_wait +++ (const char *file, char *const argv[]); +++ ++ /* Wait for the subprocess indicated by PROC::PID. Return the status ++ indicate by waitpid call. */ ++ int support_process_wait (struct support_subprocess *proc); ++diff --git a/support/support.h b/support/support.h ++index 77d68c2aba..0536474c41 100644 ++--- a/support/support.h +++++ b/support/support.h ++@@ -23,6 +23,7 @@ ++ #ifndef SUPPORT_H ++ #define SUPPORT_H ++ +++#include ++ #include ++ #include ++ /* For mode_t. */ ++diff --git a/support/support_capture_subprocess.c b/support/support_capture_subprocess.c ++index eeed676e3d..28a37df67f 100644 ++--- a/support/support_capture_subprocess.c +++++ b/support/support_capture_subprocess.c ++@@ -20,11 +20,14 @@ ++ #include ++ ++ #include +++#include ++ #include ++ #include ++ #include ++ #include ++ #include +++#include +++#include ++ ++ static void ++ transfer (const char *what, struct pollfd *pfd, struct xmemstream *stream) ++@@ -36,7 +39,7 @@ transfer (const char *what, struct pollfd *pfd, struct xmemstream *stream) ++ if (ret < 0) ++ { ++ support_record_failure (); ++- printf ("error: reading from subprocess %s: %m", what); +++ printf ("error: reading from subprocess %s: %m\n", what); ++ pfd->events = 0; ++ pfd->revents = 0; ++ } ++@@ -102,6 +105,129 @@ support_capture_subprogram (const char *file, char *const argv[]) ++ return result; ++ } ++ +++/* Copies the executable into a restricted directory, so that we can +++ safely make it SGID with the TARGET group ID. Then runs the +++ executable. */ +++static int +++copy_and_spawn_sgid (char *child_id, gid_t gid) +++{ +++ char *dirname = xasprintf ("%s/tst-tunables-setuid.%jd", +++ test_dir, (intmax_t) getpid ()); +++ char *execname = xasprintf ("%s/bin", dirname); +++ int infd = -1; +++ int outfd = -1; +++ int ret = 1, status = 1; +++ +++ TEST_VERIFY (mkdir (dirname, 0700) == 0); +++ if (support_record_failure_is_failed ()) +++ goto err; +++ +++ infd = open ("/proc/self/exe", O_RDONLY); +++ if (infd < 0) +++ FAIL_UNSUPPORTED ("unsupported: Cannot read binary from procfs\n"); +++ +++ outfd = open (execname, O_WRONLY | O_CREAT | O_EXCL, 0700); +++ TEST_VERIFY (outfd >= 0); +++ if (support_record_failure_is_failed ()) +++ goto err; +++ +++ char buf[4096]; +++ for (;;) +++ { +++ ssize_t rdcount = read (infd, buf, sizeof (buf)); +++ TEST_VERIFY (rdcount >= 0); +++ if (support_record_failure_is_failed ()) +++ goto err; +++ if (rdcount == 0) +++ break; +++ char *p = buf; +++ char *end = buf + rdcount; +++ while (p != end) +++ { +++ ssize_t wrcount = write (outfd, buf, end - p); +++ if (wrcount == 0) +++ errno = ENOSPC; +++ TEST_VERIFY (wrcount > 0); +++ if (support_record_failure_is_failed ()) +++ goto err; +++ p += wrcount; +++ } +++ } +++ TEST_VERIFY (fchown (outfd, getuid (), gid) == 0); +++ if (support_record_failure_is_failed ()) +++ goto err; +++ TEST_VERIFY (fchmod (outfd, 02750) == 0); +++ if (support_record_failure_is_failed ()) +++ goto err; +++ TEST_VERIFY (close (outfd) == 0); +++ if (support_record_failure_is_failed ()) +++ goto err; +++ TEST_VERIFY (close (infd) == 0); +++ if (support_record_failure_is_failed ()) +++ goto err; +++ +++ /* We have the binary, now spawn the subprocess. Avoid using +++ support_subprogram because we only want the program exit status, not the +++ contents. */ +++ ret = 0; +++ +++ char * const args[] = {execname, child_id, NULL}; +++ +++ status = support_subprogram_wait (args[0], args); +++ +++err: +++ if (outfd >= 0) +++ close (outfd); +++ if (infd >= 0) +++ close (infd); +++ if (execname != NULL) +++ { +++ unlink (execname); +++ free (execname); +++ } +++ if (dirname != NULL) +++ { +++ rmdir (dirname); +++ free (dirname); +++ } +++ +++ if (ret != 0) +++ FAIL_EXIT1("Failed to make sgid executable for test\n"); +++ +++ return status; +++} +++ +++int +++support_capture_subprogram_self_sgid (char *child_id) +++{ +++ gid_t target = 0; +++ const int count = 64; +++ gid_t groups[count]; +++ +++ /* Get a GID which is not our current GID, but is present in the +++ supplementary group list. */ +++ int ret = getgroups (count, groups); +++ if (ret < 0) +++ FAIL_UNSUPPORTED("Could not get group list for user %jd\n", +++ (intmax_t) getuid ()); +++ +++ gid_t current = getgid (); +++ for (int i = 0; i < ret; ++i) +++ { +++ if (groups[i] != current) +++ { +++ target = groups[i]; +++ break; +++ } +++ } +++ +++ if (target == 0) +++ FAIL_UNSUPPORTED("Could not find a suitable GID for user %jd\n", +++ (intmax_t) getuid ()); +++ +++ return copy_and_spawn_sgid (child_id, target); +++} +++ ++ void ++ support_capture_subprocess_free (struct support_capture_subprocess *p) ++ { ++diff --git a/support/support_subprocess.c b/support/support_subprocess.c ++index 36e3a77af2..4a25828111 100644 ++--- a/support/support_subprocess.c +++++ b/support/support_subprocess.c ++@@ -27,7 +27,7 @@ ++ #include ++ ++ static struct support_subprocess ++-support_suprocess_init (void) +++support_subprocess_init (void) ++ { ++ struct support_subprocess result; ++ ++@@ -48,7 +48,7 @@ support_suprocess_init (void) ++ struct support_subprocess ++ support_subprocess (void (*callback) (void *), void *closure) ++ { ++- struct support_subprocess result = support_suprocess_init (); +++ struct support_subprocess result = support_subprocess_init (); ++ ++ result.pid = xfork (); ++ if (result.pid == 0) ++@@ -71,7 +71,7 @@ support_subprocess (void (*callback) (void *), void *closure) ++ struct support_subprocess ++ support_subprogram (const char *file, char *const argv[]) ++ { ++- struct support_subprocess result = support_suprocess_init (); +++ struct support_subprocess result = support_subprocess_init (); ++ ++ posix_spawn_file_actions_t fa; ++ /* posix_spawn_file_actions_init does not fail. */ ++@@ -84,7 +84,7 @@ support_subprogram (const char *file, char *const argv[]) ++ xposix_spawn_file_actions_addclose (&fa, result.stdout_pipe[1]); ++ xposix_spawn_file_actions_addclose (&fa, result.stderr_pipe[1]); ++ ++- result.pid = xposix_spawn (file, &fa, NULL, argv, NULL); +++ result.pid = xposix_spawn (file, &fa, NULL, argv, environ); ++ ++ xclose (result.stdout_pipe[1]); ++ xclose (result.stderr_pipe[1]); ++@@ -92,6 +92,19 @@ support_subprogram (const char *file, char *const argv[]) ++ return result; ++ } ++ +++int +++support_subprogram_wait (const char *file, char *const argv[]) +++{ +++ posix_spawn_file_actions_t fa; +++ +++ posix_spawn_file_actions_init (&fa); +++ struct support_subprocess res = support_subprocess_init (); +++ +++ res.pid = xposix_spawn (file, &fa, NULL, argv, environ); +++ +++ return support_process_wait (&res); +++} +++ ++ int ++ support_process_wait (struct support_subprocess *proc) ++ { ++diff --git a/support/temp_file.c b/support/temp_file.c ++index 277c5e0cf1..e41128c2d4 100644 ++--- a/support/temp_file.c +++++ b/support/temp_file.c ++@@ -1,5 +1,6 @@ ++ /* Temporary file handling for tests. ++- Copyright (C) 1998-2020 Free Software Foundation, Inc. +++ Copyright (C) 1998-2022 Free Software Foundation, Inc. +++ Copyright The GNU Tools Authors. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++@@ -20,15 +21,17 @@ ++ some 32-bit platforms. */ ++ #define _FILE_OFFSET_BITS 64 ++ +++#include ++ #include ++ #include ++ #include ++ +++#include ++ #include ++ #include ++ #include ++ #include ++-#include +++#include ++ ++ /* List of temporary files. */ ++ static struct temp_name_list ++@@ -36,14 +39,20 @@ static struct temp_name_list ++ struct temp_name_list *next; ++ char *name; ++ pid_t owner; +++ bool toolong; ++ } *temp_name_list; ++ ++ /* Location of the temporary files. Set by the test skeleton via ++ support_set_test_dir. The string is not be freed. */ ++ static const char *test_dir = _PATH_TMP; ++ ++-void ++-add_temp_file (const char *name) +++/* Name of subdirectories in a too long temporary directory tree. */ +++static char toolong_subdir[NAME_MAX + 1]; +++static bool toolong_initialized; +++static size_t toolong_path_max; +++ +++static void +++add_temp_file_internal (const char *name, bool toolong) ++ { ++ struct temp_name_list *newp ++ = (struct temp_name_list *) xcalloc (sizeof (*newp), 1); ++@@ -53,21 +62,26 @@ add_temp_file (const char *name) ++ newp->name = newname; ++ newp->next = temp_name_list; ++ newp->owner = getpid (); +++ newp->toolong = toolong; ++ temp_name_list = newp; ++ } ++ else ++ free (newp); ++ } ++ +++void +++add_temp_file (const char *name) +++{ +++ add_temp_file_internal (name, false); +++} +++ ++ int ++-create_temp_file (const char *base, char **filename) +++create_temp_file_in_dir (const char *base, const char *dir, char **filename) ++ { ++ char *fname; ++ int fd; ++ ++- fname = (char *) xmalloc (strlen (test_dir) + 1 + strlen (base) ++- + sizeof ("XXXXXX")); ++- strcpy (stpcpy (stpcpy (stpcpy (fname, test_dir), "/"), base), "XXXXXX"); +++ fname = xasprintf ("%s/%sXXXXXX", dir, base); ++ ++ fd = mkstemp (fname); ++ if (fd == -1) ++@@ -86,8 +100,14 @@ create_temp_file (const char *base, char **filename) ++ return fd; ++ } ++ ++-char * ++-support_create_temp_directory (const char *base) +++int +++create_temp_file (const char *base, char **filename) +++{ +++ return create_temp_file_in_dir (base, test_dir, filename); +++} +++ +++static char * +++create_temp_directory_internal (const char *base, bool toolong) ++ { ++ char *path = xasprintf ("%s/%sXXXXXX", test_dir, base); ++ if (mkdtemp (path) == NULL) ++@@ -95,16 +115,132 @@ support_create_temp_directory (const char *base) ++ printf ("error: mkdtemp (\"%s\"): %m", path); ++ exit (1); ++ } ++- add_temp_file (path); +++ add_temp_file_internal (path, toolong); ++ return path; ++ } ++ ++-/* Helper functions called by the test skeleton follow. */ +++char * +++support_create_temp_directory (const char *base) +++{ +++ return create_temp_directory_internal (base, false); +++} +++ +++static void +++ensure_toolong_initialized (void) +++{ +++ if (!toolong_initialized) +++ FAIL_EXIT1 ("uninitialized toolong directory tree\n"); +++} +++ +++static void +++initialize_toolong (const char *base) +++{ +++ long name_max = pathconf (base, _PC_NAME_MAX); +++ name_max = (name_max < 0 ? 64 +++ : (name_max < sizeof (toolong_subdir) ? name_max +++ : sizeof (toolong_subdir) - 1)); +++ +++ long path_max = pathconf (base, _PC_PATH_MAX); +++ path_max = (path_max < 0 ? 1024 +++ : path_max <= PTRDIFF_MAX ? path_max : PTRDIFF_MAX); +++ +++ /* Sanity check to ensure that the test does not create temporary directories +++ in different filesystems because this API doesn't support it. */ +++ if (toolong_initialized) +++ { +++ if (name_max != strlen (toolong_subdir)) +++ FAIL_UNSUPPORTED ("name_max: Temporary directories in different" +++ " filesystems not supported yet\n"); +++ if (path_max != toolong_path_max) +++ FAIL_UNSUPPORTED ("path_max: Temporary directories in different" +++ " filesystems not supported yet\n"); +++ return; +++ } +++ +++ toolong_path_max = path_max; +++ +++ size_t len = name_max; +++ memset (toolong_subdir, 'X', len); +++ toolong_initialized = true; +++} +++ +++char * +++support_create_and_chdir_toolong_temp_directory (const char *basename) +++{ +++ char *base = create_temp_directory_internal (basename, true); +++ xchdir (base); +++ +++ initialize_toolong (base); +++ +++ size_t sz = strlen (toolong_subdir); +++ +++ /* Create directories and descend into them so that the final path is larger +++ than PATH_MAX. */ +++ for (size_t i = 0; i <= toolong_path_max / sz; i++) +++ { +++ int ret = mkdir (toolong_subdir, S_IRWXU); +++ if (ret != 0 && errno == ENAMETOOLONG) +++ FAIL_UNSUPPORTED ("Filesystem does not support creating too long " +++ "directory trees\n"); +++ else if (ret != 0) +++ FAIL_EXIT1 ("Failed to create directory tree: %m\n"); +++ xchdir (toolong_subdir); +++ } +++ return base; +++} ++ ++ void ++-support_set_test_dir (const char *path) +++support_chdir_toolong_temp_directory (const char *base) ++ { ++- test_dir = path; +++ ensure_toolong_initialized (); +++ +++ xchdir (base); +++ +++ size_t sz = strlen (toolong_subdir); +++ for (size_t i = 0; i <= toolong_path_max / sz; i++) +++ xchdir (toolong_subdir); +++} +++ +++/* Helper functions called by the test skeleton follow. */ +++ +++static void +++remove_toolong_subdirs (const char *base) +++{ +++ ensure_toolong_initialized (); +++ +++ if (chdir (base) != 0) +++ { +++ printf ("warning: toolong cleanup base failed: chdir (\"%s\"): %m\n", +++ base); +++ return; +++ } +++ +++ /* Descend. */ +++ int levels = 0; +++ size_t sz = strlen (toolong_subdir); +++ for (levels = 0; levels <= toolong_path_max / sz; levels++) +++ if (chdir (toolong_subdir) != 0) +++ { +++ printf ("warning: toolong cleanup failed: chdir (\"%s\"): %m\n", +++ toolong_subdir); +++ break; +++ } +++ +++ /* Ascend and remove. */ +++ while (--levels >= 0) +++ { +++ if (chdir ("..") != 0) +++ { +++ printf ("warning: toolong cleanup failed: chdir (\"..\"): %m\n"); +++ return; +++ } +++ if (remove (toolong_subdir) != 0) +++ { +++ printf ("warning: could not remove subdirectory: %s: %m\n", +++ toolong_subdir); +++ return; +++ } +++ } ++ } ++ ++ void ++@@ -119,6 +255,9 @@ support_delete_temp_files (void) ++ around, to prevent PID reuse.) */ ++ if (temp_name_list->owner == pid) ++ { +++ if (temp_name_list->toolong) +++ remove_toolong_subdirs (temp_name_list->name); +++ ++ if (remove (temp_name_list->name) != 0) ++ printf ("warning: could not remove temporary file: %s: %m\n", ++ temp_name_list->name); ++@@ -143,3 +282,9 @@ support_print_temp_files (FILE *f) ++ fprintf (f, ")\n"); ++ } ++ } +++ +++void +++support_set_test_dir (const char *path) +++{ +++ test_dir = path; +++} ++diff --git a/support/temp_file.h b/support/temp_file.h ++index 8b6303a6e4..2598f82136 100644 ++--- a/support/temp_file.h +++++ b/support/temp_file.h ++@@ -32,11 +32,27 @@ void add_temp_file (const char *name); ++ *FILENAME. */ ++ int create_temp_file (const char *base, char **filename); ++ +++/* Create a temporary file in directory DIR. Return the opened file +++ descriptor on success, or -1 on failure. Write the file name to +++ *FILENAME if FILENAME is not NULL. In this case, the caller is +++ expected to free *FILENAME. */ +++int create_temp_file_in_dir (const char *base, const char *dir, +++ char **filename); +++ ++ /* Create a temporary directory and schedule it for deletion. BASE is ++ used as a prefix for the unique directory name, which the function ++ returns. The caller should free this string. */ ++ char *support_create_temp_directory (const char *base); ++ +++/* Create a temporary directory tree that is longer than PATH_MAX and schedule +++ it for deletion. BASENAME is used as a prefix for the unique directory +++ name, which the function returns. The caller should free this string. */ +++char *support_create_and_chdir_toolong_temp_directory (const char *basename); +++ +++/* Change into the innermost directory of the directory tree BASE, which was +++ created using support_create_and_chdir_toolong_temp_directory. */ +++void support_chdir_toolong_temp_directory (const char *base); +++ ++ __END_DECLS ++ ++ #endif /* SUPPORT_TEMP_FILE_H */ ++diff --git a/support/xchdir.c b/support/xchdir.c ++new file mode 100644 ++index 0000000000..beb4feff72 ++--- /dev/null +++++ b/support/xchdir.c ++@@ -0,0 +1,28 @@ +++/* chdir with error checking. +++ Copyright (C) 2020 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 +++ . */ +++ +++#include +++#include +++#include +++ +++void +++xchdir (const char *path) +++{ +++ if (chdir (path) != 0) +++ FAIL_EXIT1 ("chdir (\"%s\"): %m", path); +++} ++diff --git a/support/xclone.c b/support/xclone.c ++new file mode 100644 ++index 0000000000..243eee8b23 ++--- /dev/null +++++ b/support/xclone.c ++@@ -0,0 +1,49 @@ +++/* Auxiliary functions to issue the clone syscall. +++ Copyright (C) 2021 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 +++ . */ +++ +++#ifdef __linux__ +++# include +++# include /* For _STACK_GROWS_{UP,DOWN}. */ +++# include +++ +++pid_t +++xclone (int (*fn) (void *arg), void *arg, void *stack, size_t stack_size, +++ int flags) +++{ +++ pid_t r = -1; +++ +++# ifdef __ia64__ +++ extern int __clone2 (int (*fn) (void *arg), void *stack, size_t stack_size, +++ int flags, void *arg, ...); +++ r = __clone2 (fn, stack, stack_size, flags, arg, /* ptid */ NULL, +++ /* tls */ NULL, /* ctid */ NULL); +++# else +++# if _STACK_GROWS_DOWN +++ r = clone (fn, stack + stack_size, flags, arg, /* ptid */ NULL, +++ /* tls */ NULL, /* ctid */ NULL); +++# elif _STACK_GROWS_UP +++ r = clone (fn, stack, flags, arg, /* ptid */ NULL, /* tls */ NULL, NULL); +++# endif +++# endif +++ +++ if (r < 0) +++ FAIL_EXIT1 ("clone: %m"); +++ +++ return r; +++} +++#endif ++diff --git a/support/xsched.h b/support/xsched.h ++new file mode 100644 ++index 0000000000..eefd731940 ++--- /dev/null +++++ b/support/xsched.h ++@@ -0,0 +1,34 @@ +++/* Wrapper for sched.h functions. +++ Copyright (C) 2021 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 +++ . */ +++ +++#ifndef SUPPORT_XSCHED_H +++#define SUPPORT_XSCHED_H +++ +++__BEGIN_DECLS +++ +++#include +++#include +++ +++#ifdef __linux__ +++pid_t xclone (int (*fn) (void *arg), void *arg, void *stack, +++ size_t stack_size, int flags); +++#endif +++ +++__END_DECLS +++ +++#endif ++diff --git a/support/xunistd.h b/support/xunistd.h ++index 96f498f2e5..43799d92c5 100644 ++--- a/support/xunistd.h +++++ b/support/xunistd.h ++@@ -44,6 +44,7 @@ long xsysconf (int name); ++ long long xlseek (int fd, long long offset, int whence); ++ void xftruncate (int fd, long long length); ++ void xsymlink (const char *target, const char *linkpath); +++void xchdir (const char *path); ++ ++ /* Equivalent of "mkdir -p". */ ++ void xmkdirp (const char *, mode_t); ++diff --git a/sysdeps/aarch64/dl-machine.h b/sysdeps/aarch64/dl-machine.h ++index db3335e5ad..8ffa0d1c51 100644 ++--- a/sysdeps/aarch64/dl-machine.h +++++ b/sysdeps/aarch64/dl-machine.h ++@@ -392,13 +392,6 @@ elf_machine_lazy_rel (struct link_map *map, ++ /* Check for unexpected PLT reloc type. */ ++ if (__builtin_expect (r_type == AARCH64_R(JUMP_SLOT), 1)) ++ { ++- if (map->l_mach.plt == 0) ++- { ++- /* Prelinking. */ ++- *reloc_addr += l_addr; ++- return; ++- } ++- ++ if (__glibc_unlikely (map->l_info[DT_AARCH64 (VARIANT_PCS)] != NULL)) ++ { ++ /* Check the symbol table for variant PCS symbols. */ ++@@ -422,7 +415,10 @@ elf_machine_lazy_rel (struct link_map *map, ++ } ++ } ++ ++- *reloc_addr = map->l_mach.plt; +++ if (map->l_mach.plt == 0) +++ *reloc_addr += l_addr; +++ else +++ *reloc_addr = map->l_mach.plt; ++ } ++ else if (__builtin_expect (r_type == AARCH64_R(TLSDESC), 1)) ++ { ++diff --git a/sysdeps/aarch64/memcpy.S b/sysdeps/aarch64/memcpy.S ++index d0d47e90b8..d8eb5e7583 100644 ++--- a/sysdeps/aarch64/memcpy.S +++++ b/sysdeps/aarch64/memcpy.S ++@@ -1,4 +1,5 @@ ++-/* Copyright (C) 2012-2020 Free Software Foundation, Inc. +++/* Generic optimized memcpy using SIMD. +++ Copyright (C) 2012-2022 Free Software Foundation, Inc. ++ ++ This file is part of the GNU C Library. ++ ++@@ -20,7 +21,7 @@ ++ ++ /* Assumptions: ++ * ++- * ARMv8-a, AArch64, unaligned accesses. +++ * ARMv8-a, AArch64, Advanced SIMD, unaligned accesses. ++ * ++ */ ++ ++@@ -33,33 +34,20 @@ ++ #define A_l x6 ++ #define A_lw w6 ++ #define A_h x7 ++-#define A_hw w7 ++ #define B_l x8 ++ #define B_lw w8 ++ #define B_h x9 ++-#define C_l x10 ++-#define C_h x11 ++-#define D_l x12 ++-#define D_h x13 ++-#define E_l x14 ++-#define E_h x15 ++-#define F_l x16 ++-#define F_h x17 ++-#define G_l count ++-#define G_h dst ++-#define H_l src ++-#define H_h srcend +++#define C_lw w10 ++ #define tmp1 x14 ++ ++-/* Copies are split into 3 main cases: small copies of up to 32 bytes, ++- medium copies of 33..128 bytes which are fully unrolled. Large copies ++- of more than 128 bytes align the destination and use an unrolled loop ++- processing 64 bytes per iteration. ++- In order to share code with memmove, small and medium copies read all ++- data before writing, allowing any kind of overlap. So small, medium ++- and large backwards memmoves are handled by falling through into memcpy. ++- Overlapping large forward memmoves use a loop that copies backwards. ++-*/ +++#define A_q q0 +++#define B_q q1 +++#define C_q q2 +++#define D_q q3 +++#define E_q q4 +++#define F_q q5 +++#define G_q q6 +++#define H_q q7 ++ ++ #ifndef MEMMOVE ++ # define MEMMOVE memmove ++@@ -68,212 +56,198 @@ ++ # define MEMCPY memcpy ++ #endif ++ ++-ENTRY_ALIGN (MEMMOVE, 6) +++/* This implementation supports both memcpy and memmove and shares most code. +++ It uses unaligned accesses and branchless sequences to keep the code small, +++ simple and improve performance. ++ ++- DELOUSE (0) ++- DELOUSE (1) ++- DELOUSE (2) +++ Copies are split into 3 main cases: small copies of up to 32 bytes, medium +++ copies of up to 128 bytes, and large copies. The overhead of the overlap +++ check in memmove is negligible since it is only required for large copies. ++ ++- sub tmp1, dstin, src ++- cmp count, 128 ++- ccmp tmp1, count, 2, hi ++- b.lo L(move_long) ++- ++- /* Common case falls through into memcpy. */ ++-END (MEMMOVE) ++-libc_hidden_builtin_def (MEMMOVE) ++-ENTRY (MEMCPY) +++ Large copies use a software pipelined loop processing 64 bytes per +++ iteration. The destination pointer is 16-byte aligned to minimize +++ unaligned accesses. The loop tail is handled by always copying 64 bytes +++ from the end. */ ++ +++ENTRY_ALIGN (MEMCPY, 6) ++ DELOUSE (0) ++ DELOUSE (1) ++ DELOUSE (2) ++ ++- prfm PLDL1KEEP, [src] ++ add srcend, src, count ++ add dstend, dstin, count ++- cmp count, 32 ++- b.ls L(copy32) ++ cmp count, 128 ++ b.hi L(copy_long) +++ cmp count, 32 +++ b.hi L(copy32_128) ++ ++- /* Medium copies: 33..128 bytes. */ ++- ldp A_l, A_h, [src] ++- ldp B_l, B_h, [src, 16] ++- ldp C_l, C_h, [srcend, -32] ++- ldp D_l, D_h, [srcend, -16] ++- cmp count, 64 ++- b.hi L(copy128) ++- stp A_l, A_h, [dstin] ++- stp B_l, B_h, [dstin, 16] ++- stp C_l, C_h, [dstend, -32] ++- stp D_l, D_h, [dstend, -16] ++- ret ++- ++- .p2align 4 ++ /* Small copies: 0..32 bytes. */ ++-L(copy32): ++- /* 16-32 bytes. */ ++ cmp count, 16 ++- b.lo 1f ++- ldp A_l, A_h, [src] ++- ldp B_l, B_h, [srcend, -16] ++- stp A_l, A_h, [dstin] ++- stp B_l, B_h, [dstend, -16] +++ b.lo L(copy16) +++ ldr A_q, [src] +++ ldr B_q, [srcend, -16] +++ str A_q, [dstin] +++ str B_q, [dstend, -16] ++ ret ++- .p2align 4 ++-1: ++- /* 8-15 bytes. */ ++- tbz count, 3, 1f +++ +++ /* Copy 8-15 bytes. */ +++L(copy16): +++ tbz count, 3, L(copy8) ++ ldr A_l, [src] ++ ldr A_h, [srcend, -8] ++ str A_l, [dstin] ++ str A_h, [dstend, -8] ++ ret ++- .p2align 4 ++-1: ++- /* 4-7 bytes. */ ++- tbz count, 2, 1f +++ +++ /* Copy 4-7 bytes. */ +++L(copy8): +++ tbz count, 2, L(copy4) ++ ldr A_lw, [src] ++- ldr A_hw, [srcend, -4] +++ ldr B_lw, [srcend, -4] ++ str A_lw, [dstin] ++- str A_hw, [dstend, -4] +++ str B_lw, [dstend, -4] ++ ret ++ ++- /* Copy 0..3 bytes. Use a branchless sequence that copies the same ++- byte 3 times if count==1, or the 2nd byte twice if count==2. */ ++-1: ++- cbz count, 2f +++ /* Copy 0..3 bytes using a branchless sequence. */ +++L(copy4): +++ cbz count, L(copy0) ++ lsr tmp1, count, 1 ++ ldrb A_lw, [src] ++- ldrb A_hw, [srcend, -1] +++ ldrb C_lw, [srcend, -1] ++ ldrb B_lw, [src, tmp1] ++ strb A_lw, [dstin] ++ strb B_lw, [dstin, tmp1] ++- strb A_hw, [dstend, -1] ++-2: ret +++ strb C_lw, [dstend, -1] +++L(copy0): +++ ret +++ +++ .p2align 4 +++ /* Medium copies: 33..128 bytes. */ +++L(copy32_128): +++ ldp A_q, B_q, [src] +++ ldp C_q, D_q, [srcend, -32] +++ cmp count, 64 +++ b.hi L(copy128) +++ stp A_q, B_q, [dstin] +++ stp C_q, D_q, [dstend, -32] +++ ret ++ ++ .p2align 4 ++- /* Copy 65..128 bytes. Copy 64 bytes from the start and ++- 64 bytes from the end. */ +++ /* Copy 65..128 bytes. */ ++ L(copy128): ++- ldp E_l, E_h, [src, 32] ++- ldp F_l, F_h, [src, 48] ++- ldp G_l, G_h, [srcend, -64] ++- ldp H_l, H_h, [srcend, -48] ++- stp A_l, A_h, [dstin] ++- stp B_l, B_h, [dstin, 16] ++- stp E_l, E_h, [dstin, 32] ++- stp F_l, F_h, [dstin, 48] ++- stp G_l, G_h, [dstend, -64] ++- stp H_l, H_h, [dstend, -48] ++- stp C_l, C_h, [dstend, -32] ++- stp D_l, D_h, [dstend, -16] +++ ldp E_q, F_q, [src, 32] +++ cmp count, 96 +++ b.ls L(copy96) +++ ldp G_q, H_q, [srcend, -64] +++ stp G_q, H_q, [dstend, -64] +++L(copy96): +++ stp A_q, B_q, [dstin] +++ stp E_q, F_q, [dstin, 32] +++ stp C_q, D_q, [dstend, -32] ++ ret ++ ++- /* Align DST to 16 byte alignment so that we don't cross cache line ++- boundaries on both loads and stores. There are at least 128 bytes ++- to copy, so copy 16 bytes unaligned and then align. The loop ++- copies 64 bytes per iteration and prefetches one iteration ahead. */ +++ /* Align loop64 below to 16 bytes. */ +++ nop ++ ++- .p2align 4 +++ /* Copy more than 128 bytes. */ ++ L(copy_long): ++- and tmp1, dstin, 15 ++- bic dst, dstin, 15 ++- ldp D_l, D_h, [src] ++- sub src, src, tmp1 +++ /* Copy 16 bytes and then align src to 16-byte alignment. */ +++ ldr D_q, [src] +++ and tmp1, src, 15 +++ bic src, src, 15 +++ sub dst, dstin, tmp1 ++ add count, count, tmp1 /* Count is now 16 too large. */ ++- ldp A_l, A_h, [src, 16] ++- stp D_l, D_h, [dstin] ++- ldp B_l, B_h, [src, 32] ++- ldp C_l, C_h, [src, 48] ++- ldp D_l, D_h, [src, 64]! +++ ldp A_q, B_q, [src, 16] +++ str D_q, [dstin] +++ ldp C_q, D_q, [src, 48] ++ subs count, count, 128 + 16 /* Test and readjust count. */ ++- b.ls L(last64) +++ b.ls L(copy64_from_end) ++ L(loop64): ++- stp A_l, A_h, [dst, 16] ++- ldp A_l, A_h, [src, 16] ++- stp B_l, B_h, [dst, 32] ++- ldp B_l, B_h, [src, 32] ++- stp C_l, C_h, [dst, 48] ++- ldp C_l, C_h, [src, 48] ++- stp D_l, D_h, [dst, 64]! ++- ldp D_l, D_h, [src, 64]! +++ stp A_q, B_q, [dst, 16] +++ ldp A_q, B_q, [src, 80] +++ stp C_q, D_q, [dst, 48] +++ ldp C_q, D_q, [src, 112] +++ add src, src, 64 +++ add dst, dst, 64 ++ subs count, count, 64 ++ b.hi L(loop64) ++ ++- /* Write the last full set of 64 bytes. The remainder is at most 64 ++- bytes, so it is safe to always copy 64 bytes from the end even if ++- there is just 1 byte left. */ ++-L(last64): ++- ldp E_l, E_h, [srcend, -64] ++- stp A_l, A_h, [dst, 16] ++- ldp A_l, A_h, [srcend, -48] ++- stp B_l, B_h, [dst, 32] ++- ldp B_l, B_h, [srcend, -32] ++- stp C_l, C_h, [dst, 48] ++- ldp C_l, C_h, [srcend, -16] ++- stp D_l, D_h, [dst, 64] ++- stp E_l, E_h, [dstend, -64] ++- stp A_l, A_h, [dstend, -48] ++- stp B_l, B_h, [dstend, -32] ++- stp C_l, C_h, [dstend, -16] +++ /* Write the last iteration and copy 64 bytes from the end. */ +++L(copy64_from_end): +++ ldp E_q, F_q, [srcend, -64] +++ stp A_q, B_q, [dst, 16] +++ ldp A_q, B_q, [srcend, -32] +++ stp C_q, D_q, [dst, 48] +++ stp E_q, F_q, [dstend, -64] +++ stp A_q, B_q, [dstend, -32] ++ ret ++ ++- .p2align 4 ++-L(move_long): ++- cbz tmp1, 3f +++END (MEMCPY) +++libc_hidden_builtin_def (MEMCPY) +++ +++ENTRY_ALIGN (MEMMOVE, 4) +++ DELOUSE (0) +++ DELOUSE (1) +++ DELOUSE (2) ++ ++ add srcend, src, count ++ add dstend, dstin, count +++ cmp count, 128 +++ b.hi L(move_long) +++ cmp count, 32 +++ b.hi L(copy32_128) ++ ++- /* Align dstend to 16 byte alignment so that we don't cross cache line ++- boundaries on both loads and stores. There are at least 128 bytes ++- to copy, so copy 16 bytes unaligned and then align. The loop ++- copies 64 bytes per iteration and prefetches one iteration ahead. */ +++ /* Small moves: 0..32 bytes. */ +++ cmp count, 16 +++ b.lo L(copy16) +++ ldr A_q, [src] +++ ldr B_q, [srcend, -16] +++ str A_q, [dstin] +++ str B_q, [dstend, -16] +++ ret ++ ++- and tmp1, dstend, 15 ++- ldp D_l, D_h, [srcend, -16] ++- sub srcend, srcend, tmp1 +++L(move_long): +++ /* Only use backward copy if there is an overlap. */ +++ sub tmp1, dstin, src +++ cbz tmp1, L(move0) +++ cmp tmp1, count +++ b.hs L(copy_long) +++ +++ /* Large backwards copy for overlapping copies. +++ Copy 16 bytes and then align srcend to 16-byte alignment. */ +++L(copy_long_backwards): +++ ldr D_q, [srcend, -16] +++ and tmp1, srcend, 15 +++ bic srcend, srcend, 15 ++ sub count, count, tmp1 ++- ldp A_l, A_h, [srcend, -16] ++- stp D_l, D_h, [dstend, -16] ++- ldp B_l, B_h, [srcend, -32] ++- ldp C_l, C_h, [srcend, -48] ++- ldp D_l, D_h, [srcend, -64]! +++ ldp A_q, B_q, [srcend, -32] +++ str D_q, [dstend, -16] +++ ldp C_q, D_q, [srcend, -64] ++ sub dstend, dstend, tmp1 ++ subs count, count, 128 ++- b.ls 2f ++- ++- nop ++-1: ++- stp A_l, A_h, [dstend, -16] ++- ldp A_l, A_h, [srcend, -16] ++- stp B_l, B_h, [dstend, -32] ++- ldp B_l, B_h, [srcend, -32] ++- stp C_l, C_h, [dstend, -48] ++- ldp C_l, C_h, [srcend, -48] ++- stp D_l, D_h, [dstend, -64]! ++- ldp D_l, D_h, [srcend, -64]! +++ b.ls L(copy64_from_start) +++ +++L(loop64_backwards): +++ str B_q, [dstend, -16] +++ str A_q, [dstend, -32] +++ ldp A_q, B_q, [srcend, -96] +++ str D_q, [dstend, -48] +++ str C_q, [dstend, -64]! +++ ldp C_q, D_q, [srcend, -128] +++ sub srcend, srcend, 64 ++ subs count, count, 64 ++- b.hi 1b ++- ++- /* Write the last full set of 64 bytes. The remainder is at most 64 ++- bytes, so it is safe to always copy 64 bytes from the start even if ++- there is just 1 byte left. */ ++-2: ++- ldp G_l, G_h, [src, 48] ++- stp A_l, A_h, [dstend, -16] ++- ldp A_l, A_h, [src, 32] ++- stp B_l, B_h, [dstend, -32] ++- ldp B_l, B_h, [src, 16] ++- stp C_l, C_h, [dstend, -48] ++- ldp C_l, C_h, [src] ++- stp D_l, D_h, [dstend, -64] ++- stp G_l, G_h, [dstin, 48] ++- stp A_l, A_h, [dstin, 32] ++- stp B_l, B_h, [dstin, 16] ++- stp C_l, C_h, [dstin] ++-3: ret +++ b.hi L(loop64_backwards) +++ +++ /* Write the last iteration and copy 64 bytes from the start. */ +++L(copy64_from_start): +++ ldp E_q, F_q, [src, 32] +++ stp A_q, B_q, [dstend, -32] +++ ldp A_q, B_q, [src] +++ stp C_q, D_q, [dstend, -64] +++ stp E_q, F_q, [dstin, 32] +++ stp A_q, B_q, [dstin] +++L(move0): +++ ret ++ ++-END (MEMCPY) ++-libc_hidden_builtin_def (MEMCPY) +++END (MEMMOVE) +++libc_hidden_builtin_def (MEMMOVE) ++diff --git a/sysdeps/aarch64/multiarch/memcpy.c b/sysdeps/aarch64/multiarch/memcpy.c ++index 2fafefd5d2..eb6e94a005 100644 ++--- a/sysdeps/aarch64/multiarch/memcpy.c +++++ b/sysdeps/aarch64/multiarch/memcpy.c ++@@ -36,7 +36,7 @@ extern __typeof (__redirect_memcpy) __memcpy_falkor attribute_hidden; ++ libc_ifunc (__libc_memcpy, ++ (IS_THUNDERX (midr) ++ ? __memcpy_thunderx ++- : (IS_FALKOR (midr) || IS_PHECDA (midr) || IS_ARES (midr) || IS_KUNPENG920 (midr) +++ : (IS_FALKOR (midr) || IS_PHECDA (midr) || IS_KUNPENG920 (midr) ++ ? __memcpy_falkor ++ : (IS_THUNDERX2 (midr) || IS_THUNDERX2PA (midr) ++ ? __memcpy_thunderx2 ++diff --git a/sysdeps/aarch64/strcpy.S b/sysdeps/aarch64/strcpy.S ++index 548130e413..a8ff52c072 100644 ++--- a/sysdeps/aarch64/strcpy.S +++++ b/sysdeps/aarch64/strcpy.S ++@@ -234,8 +234,13 @@ L(entry_no_page_cross): ++ #endif ++ /* calculate the loc value */ ++ cmeq datav.16b, datav.16b, #0 +++#ifdef __AARCH64EB__ +++ mov data1, datav.d[1] +++ mov data2, datav.d[0] +++#else ++ mov data1, datav.d[0] ++ mov data2, datav.d[1] +++#endif ++ cmp data1, 0 ++ csel data1, data1, data2, ne ++ mov pos, 8 ++diff --git a/sysdeps/aarch64/strnlen.S b/sysdeps/aarch64/strnlen.S ++index 5981247dd9..086a5c7e99 100644 ++--- a/sysdeps/aarch64/strnlen.S +++++ b/sysdeps/aarch64/strnlen.S ++@@ -154,8 +154,13 @@ L(loop_end): ++ byte. */ ++ ++ cmeq datav.16b, datav.16b, #0 +++#ifdef __AARCH64EB__ +++ mov data1, datav.d[1] +++ mov data2, datav.d[0] +++#else ++ mov data1, datav.d[0] ++ mov data2, datav.d[1] +++#endif ++ cmp data1, 0 ++ csel data1, data1, data2, ne ++ sub len, src, srcin ++diff --git a/sysdeps/aarch64/sysdep.h b/sysdeps/aarch64/sysdep.h ++index 604c489170..f1feb19dc7 100644 ++--- a/sysdeps/aarch64/sysdep.h +++++ b/sysdeps/aarch64/sysdep.h ++@@ -45,7 +45,7 @@ ++ #define ENTRY(name) \ ++ .globl C_SYMBOL_NAME(name); \ ++ .type C_SYMBOL_NAME(name),%function; \ ++- .align 4; \ +++ .p2align 6; \ ++ C_LABEL(name) \ ++ cfi_startproc; \ ++ CALL_MCOUNT ++diff --git a/sysdeps/arm/armv7/multiarch/memcpy_impl.S b/sysdeps/arm/armv7/multiarch/memcpy_impl.S ++index bf4ac7077f..379bb56fc9 100644 ++--- a/sysdeps/arm/armv7/multiarch/memcpy_impl.S +++++ b/sysdeps/arm/armv7/multiarch/memcpy_impl.S ++@@ -268,7 +268,7 @@ ENTRY(memcpy) ++ ++ mov dst, dstin /* Preserve dstin, we need to return it. */ ++ cmp count, #64 ++- bge .Lcpy_not_short +++ bhs .Lcpy_not_short ++ /* Deal with small copies quickly by dropping straight into the ++ exit block. */ ++ ++@@ -351,10 +351,10 @@ ENTRY(memcpy) ++ ++ 1: ++ subs tmp2, count, #64 /* Use tmp2 for count. */ ++- blt .Ltail63aligned +++ blo .Ltail63aligned ++ ++ cmp tmp2, #512 ++- bge .Lcpy_body_long +++ bhs .Lcpy_body_long ++ ++ .Lcpy_body_medium: /* Count in tmp2. */ ++ #ifdef USE_VFP ++@@ -378,7 +378,7 @@ ENTRY(memcpy) ++ add src, src, #64 ++ vstr d1, [dst, #56] ++ add dst, dst, #64 ++- bge 1b +++ bhs 1b ++ tst tmp2, #0x3f ++ beq .Ldone ++ ++@@ -412,7 +412,7 @@ ENTRY(memcpy) ++ ldrd A_l, A_h, [src, #64]! ++ strd A_l, A_h, [dst, #64]! ++ subs tmp2, tmp2, #64 ++- bge 1b +++ bhs 1b ++ tst tmp2, #0x3f ++ bne 1f ++ ldr tmp2,[sp], #FRAME_SIZE ++@@ -482,7 +482,7 @@ ENTRY(memcpy) ++ add src, src, #32 ++ ++ subs tmp2, tmp2, #prefetch_lines * 64 * 2 ++- blt 2f +++ blo 2f ++ 1: ++ cpy_line_vfp d3, 0 ++ cpy_line_vfp d4, 64 ++@@ -494,7 +494,7 @@ ENTRY(memcpy) ++ add dst, dst, #2 * 64 ++ add src, src, #2 * 64 ++ subs tmp2, tmp2, #prefetch_lines * 64 ++- bge 1b +++ bhs 1b ++ ++ 2: ++ cpy_tail_vfp d3, 0 ++@@ -615,8 +615,8 @@ ENTRY(memcpy) ++ 1: ++ pld [src, #(3 * 64)] ++ subs count, count, #64 ++- ldrmi tmp2, [sp], #FRAME_SIZE ++- bmi .Ltail63unaligned +++ ldrlo tmp2, [sp], #FRAME_SIZE +++ blo .Ltail63unaligned ++ pld [src, #(4 * 64)] ++ ++ #ifdef USE_NEON ++@@ -633,7 +633,7 @@ ENTRY(memcpy) ++ neon_load_multi d0-d3, src ++ neon_load_multi d4-d7, src ++ subs count, count, #64 ++- bmi 2f +++ blo 2f ++ 1: ++ pld [src, #(4 * 64)] ++ neon_store_multi d0-d3, dst ++@@ -641,7 +641,7 @@ ENTRY(memcpy) ++ neon_store_multi d4-d7, dst ++ neon_load_multi d4-d7, src ++ subs count, count, #64 ++- bpl 1b +++ bhs 1b ++ 2: ++ neon_store_multi d0-d3, dst ++ neon_store_multi d4-d7, dst ++diff --git a/sysdeps/arm/be/nofpu/Implies b/sysdeps/arm/be/nofpu/Implies ++new file mode 100644 ++index 0000000000..c90dd7fd5c ++--- /dev/null +++++ b/sysdeps/arm/be/nofpu/Implies ++@@ -0,0 +1 @@ +++arm/nofpu ++diff --git a/sysdeps/arm/le/nofpu/Implies b/sysdeps/arm/le/nofpu/Implies ++new file mode 100644 ++index 0000000000..c90dd7fd5c ++--- /dev/null +++++ b/sysdeps/arm/le/nofpu/Implies ++@@ -0,0 +1 @@ +++arm/nofpu ++diff --git a/sysdeps/arm/memcpy.S b/sysdeps/arm/memcpy.S ++index 510e8adaf2..bcfbc51d99 100644 ++--- a/sysdeps/arm/memcpy.S +++++ b/sysdeps/arm/memcpy.S ++@@ -68,7 +68,7 @@ ENTRY(memcpy) ++ cfi_remember_state ++ ++ subs r2, r2, #4 ++- blt 8f +++ blo 8f ++ ands ip, r0, #3 ++ PLD( pld [r1, #0] ) ++ bne 9f ++@@ -82,7 +82,7 @@ ENTRY(memcpy) ++ cfi_rel_offset (r6, 4) ++ cfi_rel_offset (r7, 8) ++ cfi_rel_offset (r8, 12) ++- blt 5f +++ blo 5f ++ ++ CALGN( ands ip, r1, #31 ) ++ CALGN( rsb r3, ip, #32 ) ++@@ -98,9 +98,9 @@ ENTRY(memcpy) ++ #endif ++ ++ PLD( pld [r1, #0] ) ++-2: PLD( subs r2, r2, #96 ) +++2: PLD( cmp r2, #96 ) ++ PLD( pld [r1, #28] ) ++- PLD( blt 4f ) +++ PLD( blo 4f ) ++ PLD( pld [r1, #60] ) ++ PLD( pld [r1, #92] ) ++ ++@@ -108,9 +108,7 @@ ENTRY(memcpy) ++ 4: ldmia r1!, {r3, r4, r5, r6, r7, r8, ip, lr} ++ subs r2, r2, #32 ++ stmia r0!, {r3, r4, r5, r6, r7, r8, ip, lr} ++- bge 3b ++- PLD( cmn r2, #96 ) ++- PLD( bge 4b ) +++ bhs 3b ++ ++ 5: ands ip, r2, #28 ++ rsb ip, ip, #32 ++@@ -222,7 +220,7 @@ ENTRY(memcpy) ++ strbge r4, [r0], #1 ++ subs r2, r2, ip ++ strb lr, [r0], #1 ++- blt 8b +++ blo 8b ++ ands ip, r1, #3 ++ beq 1b ++ ++@@ -236,7 +234,7 @@ ENTRY(memcpy) ++ .macro forward_copy_shift pull push ++ ++ subs r2, r2, #28 ++- blt 14f +++ blo 14f ++ ++ CALGN( ands ip, r1, #31 ) ++ CALGN( rsb ip, ip, #32 ) ++@@ -253,9 +251,9 @@ ENTRY(memcpy) ++ cfi_rel_offset (r10, 16) ++ ++ PLD( pld [r1, #0] ) ++- PLD( subs r2, r2, #96 ) +++ PLD( cmp r2, #96 ) ++ PLD( pld [r1, #28] ) ++- PLD( blt 13f ) +++ PLD( blo 13f ) ++ PLD( pld [r1, #60] ) ++ PLD( pld [r1, #92] ) ++ ++@@ -280,9 +278,7 @@ ENTRY(memcpy) ++ mov ip, ip, PULL #\pull ++ orr ip, ip, lr, PUSH #\push ++ stmia r0!, {r3, r4, r5, r6, r7, r8, r10, ip} ++- bge 12b ++- PLD( cmn r2, #96 ) ++- PLD( bge 13b ) +++ bhs 12b ++ ++ pop {r5 - r8, r10} ++ cfi_adjust_cfa_offset (-20) ++diff --git a/sysdeps/arm/memmove.S b/sysdeps/arm/memmove.S ++index 954037ef3a..0d07b76ee6 100644 ++--- a/sysdeps/arm/memmove.S +++++ b/sysdeps/arm/memmove.S ++@@ -85,7 +85,7 @@ ENTRY(memmove) ++ add r1, r1, r2 ++ add r0, r0, r2 ++ subs r2, r2, #4 ++- blt 8f +++ blo 8f ++ ands ip, r0, #3 ++ PLD( pld [r1, #-4] ) ++ bne 9f ++@@ -99,7 +99,7 @@ ENTRY(memmove) ++ cfi_rel_offset (r6, 4) ++ cfi_rel_offset (r7, 8) ++ cfi_rel_offset (r8, 12) ++- blt 5f +++ blo 5f ++ ++ CALGN( ands ip, r1, #31 ) ++ CALGN( sbcsne r4, ip, r2 ) @ C is always set here ++@@ -114,9 +114,9 @@ ENTRY(memmove) ++ #endif ++ ++ PLD( pld [r1, #-4] ) ++-2: PLD( subs r2, r2, #96 ) +++2: PLD( cmp r2, #96 ) ++ PLD( pld [r1, #-32] ) ++- PLD( blt 4f ) +++ PLD( blo 4f ) ++ PLD( pld [r1, #-64] ) ++ PLD( pld [r1, #-96] ) ++ ++@@ -124,9 +124,7 @@ ENTRY(memmove) ++ 4: ldmdb r1!, {r3, r4, r5, r6, r7, r8, ip, lr} ++ subs r2, r2, #32 ++ stmdb r0!, {r3, r4, r5, r6, r7, r8, ip, lr} ++- bge 3b ++- PLD( cmn r2, #96 ) ++- PLD( bge 4b ) +++ bhs 3b ++ ++ 5: ands ip, r2, #28 ++ rsb ip, ip, #32 ++@@ -237,7 +235,7 @@ ENTRY(memmove) ++ strbge r4, [r0, #-1]! ++ subs r2, r2, ip ++ strb lr, [r0, #-1]! ++- blt 8b +++ blo 8b ++ ands ip, r1, #3 ++ beq 1b ++ ++@@ -251,7 +249,7 @@ ENTRY(memmove) ++ .macro backward_copy_shift push pull ++ ++ subs r2, r2, #28 ++- blt 14f +++ blo 14f ++ ++ CALGN( ands ip, r1, #31 ) ++ CALGN( rsb ip, ip, #32 ) ++@@ -268,9 +266,9 @@ ENTRY(memmove) ++ cfi_rel_offset (r10, 16) ++ ++ PLD( pld [r1, #-4] ) ++- PLD( subs r2, r2, #96 ) +++ PLD( cmp r2, #96 ) ++ PLD( pld [r1, #-32] ) ++- PLD( blt 13f ) +++ PLD( blo 13f ) ++ PLD( pld [r1, #-64] ) ++ PLD( pld [r1, #-96] ) ++ ++@@ -295,9 +293,7 @@ ENTRY(memmove) ++ mov r4, r4, PUSH #\push ++ orr r4, r4, r3, PULL #\pull ++ stmdb r0!, {r4 - r8, r10, ip, lr} ++- bge 12b ++- PLD( cmn r2, #96 ) ++- PLD( bge 13b ) +++ bhs 12b ++ ++ pop {r5 - r8, r10} ++ cfi_adjust_cfa_offset (-20) ++diff --git a/sysdeps/generic/unwind-arch.h b/sysdeps/generic/unwind-arch.h ++new file mode 100644 ++index 0000000000..d712e5e11d ++--- /dev/null +++++ b/sysdeps/generic/unwind-arch.h ++@@ -0,0 +1,30 @@ +++/* Return backtrace of current program state. Arch-specific bits. +++ Copyright (C) 2020 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 +++ . */ +++ +++#ifndef _UNWIND_ARCH_H +++#define _UNWIND_ARCH_H +++ +++#include +++ +++static inline void * +++unwind_arch_adjustment (void *prev, void *addr) +++{ +++ return addr; +++} +++ +++#endif ++diff --git a/sysdeps/gnu/Makefile b/sysdeps/gnu/Makefile ++index 97fcb6fb90..26dc91d90a 100644 ++--- a/sysdeps/gnu/Makefile +++++ b/sysdeps/gnu/Makefile ++@@ -54,8 +54,7 @@ $(objpfx)errlist-compat.h: $(objpfx)errlist-compat.c ++ generated += errlist-compat.c errlist-compat.h ++ ++ # This will force the generation above to happy if need be. ++-$(foreach o,$(object-suffixes) $(object-suffixes:=.d),\ ++- $(objpfx)errlist$o): $(objpfx)errlist-compat.h +++$(foreach o,$(object-suffixes),$(objpfx)errlist$o): $(objpfx)errlist-compat.h ++ endif ++ ++ ifeq ($(subdir),login) ++diff --git a/sysdeps/hppa/dl-fptr.c b/sysdeps/hppa/dl-fptr.c ++index 0a37397284..25ca8f8463 100644 ++--- a/sysdeps/hppa/dl-fptr.c +++++ b/sysdeps/hppa/dl-fptr.c ++@@ -172,8 +172,8 @@ make_fdesc (ElfW(Addr) ip, ElfW(Addr) gp) ++ } ++ ++ install: ++- fdesc->ip = ip; ++ fdesc->gp = gp; +++ fdesc->ip = ip; ++ ++ return (ElfW(Addr)) fdesc; ++ } ++@@ -350,7 +350,9 @@ ElfW(Addr) ++ _dl_lookup_address (const void *address) ++ { ++ ElfW(Addr) addr = (ElfW(Addr)) address; ++- unsigned int *desc, *gptr; +++ ElfW(Word) reloc_arg; +++ volatile unsigned int *desc; +++ unsigned int *gptr; ++ ++ /* Return ADDR if the least-significant two bits of ADDR are not consistent ++ with ADDR being a linker defined function pointer. The normal value for ++@@ -367,7 +369,11 @@ _dl_lookup_address (const void *address) ++ if (!_dl_read_access_allowed (desc)) ++ return addr; ++ ++- /* Load first word of candidate descriptor. It should be a pointer +++ /* First load the relocation offset. */ +++ reloc_arg = (ElfW(Word)) desc[1]; +++ atomic_full_barrier(); +++ +++ /* Then load first word of candidate descriptor. It should be a pointer ++ with word alignment and point to memory that can be read. */ ++ gptr = (unsigned int *) desc[0]; ++ if (((unsigned int) gptr & 3) != 0 ++@@ -377,8 +383,8 @@ _dl_lookup_address (const void *address) ++ /* See if descriptor requires resolution. The following trampoline is ++ used in each global offset table for function resolution: ++ ++- ldw 0(r20),r22 ++- bv r0(r22) +++ ldw 0(r20),r21 +++ bv r0(r21) ++ ldw 4(r20),r21 ++ tramp: b,l .-12,r20 ++ depwi 0,31,2,r20 ++@@ -389,7 +395,15 @@ _dl_lookup_address (const void *address) ++ if (gptr[0] == 0xea9f1fdd /* b,l .-12,r20 */ ++ && gptr[1] == 0xd6801c1e /* depwi 0,31,2,r20 */ ++ && (ElfW(Addr)) gptr[2] == elf_machine_resolve ()) ++- _dl_fixup ((struct link_map *) gptr[5], (ElfW(Word)) desc[1]); +++ { +++ struct link_map *l = (struct link_map *) gptr[5]; +++ +++ /* If gp has been resolved, we need to hunt for relocation offset. */ +++ if (!(reloc_arg & PA_GP_RELOC)) +++ reloc_arg = _dl_fix_reloc_arg (addr, l); +++ +++ _dl_fixup (l, reloc_arg); +++ } ++ ++ return (ElfW(Addr)) desc[0]; ++ } ++diff --git a/sysdeps/hppa/dl-machine.h b/sysdeps/hppa/dl-machine.h ++index 9e98366ea3..8ecff97706 100644 ++--- a/sysdeps/hppa/dl-machine.h +++++ b/sysdeps/hppa/dl-machine.h ++@@ -48,6 +48,14 @@ ++ #define GOT_FROM_PLT_STUB (4*4) ++ #define PLT_ENTRY_SIZE (2*4) ++ +++/* The gp slot in the function descriptor contains the relocation offset +++ before resolution. To distinguish between a resolved gp value and an +++ unresolved relocation offset we set an unused bit in the relocation +++ offset. This would allow us to do a synchronzied two word update +++ using this bit (interlocked update), but instead of waiting for the +++ update we simply recompute the gp value given that we know the ip. */ +++#define PA_GP_RELOC 1 +++ ++ /* Initialize the function descriptor table before relocations */ ++ static inline void ++ __hppa_init_bootstrap_fdesc_table (struct link_map *map) ++@@ -117,10 +125,28 @@ elf_machine_fixup_plt (struct link_map *map, lookup_t t, ++ volatile Elf32_Addr *rfdesc = reloc_addr; ++ /* map is the link_map for the caller, t is the link_map for the object ++ being called */ ++- rfdesc[1] = value.gp; ++- /* Need to ensure that the gp is visible before the code ++- entry point is updated */ ++- rfdesc[0] = value.ip; +++ +++ /* We would like the function descriptor to be double word aligned. This +++ helps performance (ip and gp then reside on the same cache line) and +++ we can update the pair atomically with a single store. The linker +++ now ensures this alignment but we still have to handle old code. */ +++ if ((unsigned int)reloc_addr & 7) +++ { +++ /* Need to ensure that the gp is visible before the code +++ entry point is updated */ +++ rfdesc[1] = value.gp; +++ atomic_full_barrier(); +++ rfdesc[0] = value.ip; +++ } +++ else +++ { +++ /* Update pair atomically with floating point store. */ +++ union { ElfW(Word) v[2]; double d; } u; +++ +++ u.v[0] = value.ip; +++ u.v[1] = value.gp; +++ *(volatile double *)rfdesc = u.d; +++ } ++ return value; ++ } ++ ++@@ -265,7 +291,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) ++ here. The trampoline code will load the proper ++ LTP and pass the reloc offset to the fixup ++ function. */ ++- fptr->gp = iplt - jmprel; +++ fptr->gp = (iplt - jmprel) | PA_GP_RELOC; ++ } /* r_sym != 0 */ ++ else ++ { ++diff --git a/sysdeps/hppa/dl-runtime.c b/sysdeps/hppa/dl-runtime.c ++new file mode 100644 ++index 0000000000..885a3f1837 ++--- /dev/null +++++ b/sysdeps/hppa/dl-runtime.c ++@@ -0,0 +1,58 @@ +++/* On-demand PLT fixup for shared objects. HPPA version. +++ Copyright (C) 2019 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. */ +++ +++/* Clear PA_GP_RELOC bit in relocation offset. */ +++#define reloc_offset (reloc_arg & ~PA_GP_RELOC) +++#define reloc_index (reloc_arg & ~PA_GP_RELOC) / sizeof (PLTREL) +++ +++#include +++ +++/* The caller has encountered a partially relocated function descriptor. +++ The gp of the descriptor has been updated, but not the ip. We find +++ the function descriptor again and compute the relocation offset and +++ return that to the caller. The caller will continue on to call +++ _dl_fixup with the relocation offset. */ +++ +++ElfW(Word) +++attribute_hidden __attribute ((noinline)) ARCH_FIXUP_ATTRIBUTE +++_dl_fix_reloc_arg (struct fdesc *fptr, struct link_map *l) +++{ +++ Elf32_Addr l_addr, iplt, jmprel, end_jmprel, r_type; +++ const Elf32_Rela *reloc; +++ +++ l_addr = l->l_addr; +++ jmprel = D_PTR(l, l_info[DT_JMPREL]); +++ end_jmprel = jmprel + l->l_info[DT_PLTRELSZ]->d_un.d_val; +++ +++ /* Look for the entry... */ +++ for (iplt = jmprel; iplt < end_jmprel; iplt += sizeof (Elf32_Rela)) +++ { +++ reloc = (const Elf32_Rela *) iplt; +++ r_type = ELF32_R_TYPE (reloc->r_info); +++ +++ if (__builtin_expect (r_type == R_PARISC_IPLT, 1) +++ && fptr == (struct fdesc *) (reloc->r_offset + l_addr)) +++ /* Found entry. Return the reloc offset. */ +++ return iplt - jmprel; +++ } +++ +++ /* Crash if we weren't passed a valid function pointer. */ +++ ABORT_INSTRUCTION; +++ return 0; +++} ++diff --git a/sysdeps/hppa/dl-trampoline.S b/sysdeps/hppa/dl-trampoline.S ++index 0114ca8b19..d0804b30c0 100644 ++--- a/sysdeps/hppa/dl-trampoline.S +++++ b/sysdeps/hppa/dl-trampoline.S ++@@ -31,7 +31,7 @@ ++ slow down __cffc when it attempts to call fixup to resolve function ++ descriptor references. Please refer to gcc/gcc/config/pa/fptr.c ++ ++- Enter with r19 = reloc offset, r20 = got-8, r21 = fixup ltp. */ +++ Enter with r19 = reloc offset, r20 = got-8, r21 = fixup ltp, r22 = fp. */ ++ ++ /* RELOCATION MARKER: bl to provide gcc's __cffc with fixup loc. */ ++ .text ++@@ -61,17 +61,20 @@ _dl_runtime_resolve: ++ copy %sp, %r1 /* Copy previous sp */ ++ /* Save function result address (on entry) */ ++ stwm %r28,128(%sp) ++- /* Fillin some frame info to follow ABI */ +++ /* Fill in some frame info to follow ABI */ ++ stw %r1,-4(%sp) /* Previous sp */ ++ stw %r21,-32(%sp) /* PIC register value */ ++ ++ /* Save input floating point registers. This must be done ++ in the new frame since the previous frame doesn't have ++ enough space */ ++- ldo -56(%sp),%r1 +++ ldo -64(%sp),%r1 ++ fstd,ma %fr4,-8(%r1) ++ fstd,ma %fr5,-8(%r1) ++ fstd,ma %fr6,-8(%r1) +++ +++ /* Test PA_GP_RELOC bit. */ +++ bb,>= %r19,31,2f /* branch if not reloc offset */ ++ fstd,ma %fr7,-8(%r1) ++ ++ /* Set up args to fixup func, needs only two arguments */ ++@@ -79,7 +82,7 @@ _dl_runtime_resolve: ++ copy %r19,%r25 /* (2) reloc offset */ ++ ++ /* Call the real address resolver. */ ++- bl _dl_fixup,%rp +++3: bl _dl_fixup,%rp ++ copy %r21,%r19 /* set fixup func ltp */ ++ ++ /* While the linker will set a function pointer to NULL when it ++@@ -102,7 +105,7 @@ _dl_runtime_resolve: ++ copy %r29, %r19 ++ ++ /* Reload arguments fp args */ ++- ldo -56(%sp),%r1 +++ ldo -64(%sp),%r1 ++ fldd,ma -8(%r1),%fr4 ++ fldd,ma -8(%r1),%fr5 ++ fldd,ma -8(%r1),%fr6 ++@@ -129,6 +132,25 @@ _dl_runtime_resolve: ++ bv %r0(%rp) ++ ldo -128(%sp),%sp ++ +++2: +++ /* Set up args for _dl_fix_reloc_arg. */ +++ copy %r22,%r26 /* (1) function pointer */ +++ depi 0,31,2,%r26 /* clear least significant bits */ +++ ldw 8+4(%r20),%r25 /* (2) got[1] == struct link_map */ +++ +++ /* Save ltp and link map arg for _dl_fixup. */ +++ stw %r21,-56(%sp) /* ltp */ +++ stw %r25,-60(%sp) /* struct link map */ +++ +++ /* Find reloc offset. */ +++ bl _dl_fix_reloc_arg,%rp +++ copy %r21,%r19 /* set func ltp */ +++ +++ /* Set up args for _dl_fixup. */ +++ ldw -56(%sp),%r21 /* ltp */ +++ ldw -60(%sp),%r26 /* (1) struct link map */ +++ b 3b +++ copy %ret0,%r25 /* (2) reloc offset */ ++ .EXIT ++ .PROCEND ++ cfi_endproc ++@@ -153,7 +175,7 @@ _dl_runtime_profile: ++ copy %sp, %r1 /* Copy previous sp */ ++ /* Save function result address (on entry) */ ++ stwm %r28,192(%sp) ++- /* Fillin some frame info to follow ABI */ +++ /* Fill in some frame info to follow ABI */ ++ stw %r1,-4(%sp) /* Previous sp */ ++ stw %r21,-32(%sp) /* PIC register value */ ++ ++@@ -181,10 +203,11 @@ _dl_runtime_profile: ++ fstd,ma %fr5,8(%r1) ++ fstd,ma %fr6,8(%r1) ++ fstd,ma %fr7,8(%r1) ++- /* 32-bit stack pointer and return register */ ++- stw %sp,-56(%sp) ++- stw %r2,-52(%sp) ++ +++ /* Test PA_GP_RELOC bit. */ +++ bb,>= %r19,31,2f /* branch if not reloc offset */ +++ /* 32-bit stack pointer */ +++ stw %sp,-56(%sp) ++ ++ /* Set up args to fixup func, needs five arguments */ ++ ldw 8+4(%r20),%r26 /* (1) got[1] == struct link_map */ ++@@ -197,7 +220,7 @@ _dl_runtime_profile: ++ stw %r1, -52(%sp) /* (5) long int *framesizep */ ++ ++ /* Call the real address resolver. */ ++- bl _dl_profile_fixup,%rp +++3: bl _dl_profile_fixup,%rp ++ copy %r21,%r19 /* set fixup func ltp */ ++ ++ /* Load up the returned function descriptor */ ++@@ -215,7 +238,9 @@ _dl_runtime_profile: ++ fldd,ma 8(%r1),%fr5 ++ fldd,ma 8(%r1),%fr6 ++ fldd,ma 8(%r1),%fr7 ++- ldw -52(%sp),%rp +++ +++ /* Reload rp register -(192+20) without adjusting stack */ +++ ldw -212(%sp),%rp ++ ++ /* Reload static link register -(192+16) without adjusting stack */ ++ ldw -208(%sp),%r29 ++@@ -303,6 +328,33 @@ L(cont): ++ ldw -20(%sp),%rp ++ /* Return */ ++ bv,n 0(%r2) +++ +++2: +++ /* Set up args for _dl_fix_reloc_arg. */ +++ copy %r22,%r26 /* (1) function pointer */ +++ depi 0,31,2,%r26 /* clear least significant bits */ +++ ldw 8+4(%r20),%r25 /* (2) got[1] == struct link_map */ +++ +++ /* Save ltp and link map arg for _dl_fixup. */ +++ stw %r21,-92(%sp) /* ltp */ +++ stw %r25,-116(%sp) /* struct link map */ +++ +++ /* Find reloc offset. */ +++ bl _dl_fix_reloc_arg,%rp +++ copy %r21,%r19 /* set func ltp */ +++ +++ /* Restore fixup ltp. */ +++ ldw -92(%sp),%r21 /* ltp */ +++ +++ /* Set up args to fixup func, needs five arguments */ +++ ldw -116(%sp),%r26 /* (1) struct link map */ +++ copy %ret0,%r25 /* (2) reloc offset */ +++ stw %r25,-120(%sp) /* Save reloc offset */ +++ ldw -212(%sp),%r24 /* (3) profile_fixup needs rp */ +++ ldo -56(%sp),%r23 /* (4) La_hppa_regs */ +++ ldo -112(%sp), %r1 +++ b 3b +++ stw %r1, -52(%sp) /* (5) long int *framesizep */ ++ .EXIT ++ .PROCEND ++ cfi_endproc ++diff --git a/sysdeps/i386/dl-machine.h b/sysdeps/i386/dl-machine.h ++index 8af0789a9c..4334ade2a0 100644 ++--- a/sysdeps/i386/dl-machine.h +++++ b/sysdeps/i386/dl-machine.h ++@@ -338,16 +338,22 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, ++ { ++ # ifndef RTLD_BOOTSTRAP ++ if (sym_map != map ++- && sym_map->l_type != lt_executable ++ && !sym_map->l_relocated) ++ { ++ const char *strtab ++ = (const char *) D_PTR (map, l_info[DT_STRTAB]); ++- _dl_error_printf ("\ +++ if (sym_map->l_type == lt_executable) +++ _dl_fatal_printf ("\ +++%s: IFUNC symbol '%s' referenced in '%s' is defined in the executable \ +++and creates an unsatisfiable circular dependency.\n", +++ RTLD_PROGNAME, strtab + refsym->st_name, +++ map->l_name); +++ else +++ _dl_error_printf ("\ ++ %s: Relink `%s' with `%s' for IFUNC symbol `%s'\n", ++- RTLD_PROGNAME, map->l_name, ++- sym_map->l_name, ++- strtab + refsym->st_name); +++ RTLD_PROGNAME, map->l_name, +++ sym_map->l_name, +++ strtab + refsym->st_name); ++ } ++ # endif ++ value = ((Elf32_Addr (*) (void)) value) (); ++diff --git a/sysdeps/i386/sysdep.h b/sysdeps/i386/sysdep.h ++index b4bcd8fb6c..6094af8fec 100644 ++--- a/sysdeps/i386/sysdep.h +++++ b/sysdeps/i386/sysdep.h ++@@ -61,7 +61,7 @@ lose: SYSCALL_PIC_SETUP \ ++ ++ # define SETUP_PIC_REG(reg) \ ++ .ifndef GET_PC_THUNK(reg); \ ++- .section .gnu.linkonce.t.GET_PC_THUNK(reg),"ax",@progbits; \ +++ .section .text.GET_PC_THUNK(reg),"axG",@progbits,GET_PC_THUNK(reg),comdat; \ ++ .globl GET_PC_THUNK(reg); \ ++ .hidden GET_PC_THUNK(reg); \ ++ .p2align 4; \ ++@@ -97,7 +97,8 @@ GET_PC_THUNK(reg): \ ++ ++ # define SETUP_PIC_REG_STR(reg) \ ++ ".ifndef " GET_PC_THUNK_STR (reg) "\n" \ ++- ".section .gnu.linkonce.t." GET_PC_THUNK_STR (reg) ",\"ax\",@progbits\n" \ +++ ".section .text." GET_PC_THUNK_STR (reg) ",\"axG\",@progbits," \ +++ GET_PC_THUNK_STR (reg) ",comdat\n" \ ++ ".globl " GET_PC_THUNK_STR (reg) "\n" \ ++ ".hidden " GET_PC_THUNK_STR (reg) "\n" \ ++ ".p2align 4\n" \ ++diff --git a/sysdeps/ieee754/ldbl-96/Makefile b/sysdeps/ieee754/ldbl-96/Makefile ++index 995e90d6da..6030adf7e7 100644 ++--- a/sysdeps/ieee754/ldbl-96/Makefile +++++ b/sysdeps/ieee754/ldbl-96/Makefile ++@@ -17,5 +17,8 @@ ++ # . ++ ++ ifeq ($(subdir),math) ++-tests += test-canonical-ldbl-96 test-totalorderl-ldbl-96 +++tests += test-canonical-ldbl-96 test-totalorderl-ldbl-96 test-sinl-pseudo +++ifeq ($(have-ssp),yes) +++CFLAGS-test-sinl-pseudo.c += -fstack-protector-all ++ endif +++endif # $(subdir) == math ++diff --git a/sysdeps/ieee754/ldbl-96/e_rem_pio2l.c b/sysdeps/ieee754/ldbl-96/e_rem_pio2l.c ++index 5f742321ae..bcdf20179f 100644 ++--- a/sysdeps/ieee754/ldbl-96/e_rem_pio2l.c +++++ b/sysdeps/ieee754/ldbl-96/e_rem_pio2l.c ++@@ -210,6 +210,18 @@ __ieee754_rem_pio2l (long double x, long double *y) ++ return 0; ++ } ++ +++ if ((i0 & 0x80000000) == 0) +++ { +++ /* Pseudo-zero and unnormal representations are not valid +++ representations of long double. We need to avoid stack +++ corruption in __kernel_rem_pio2, which expects input in a +++ particular normal form, but those representations do not need +++ to be consistently handled like any particular floating-point +++ value. */ +++ y[1] = y[0] = __builtin_nanl (""); +++ return 0; +++ } +++ ++ /* Split the 64 bits of the mantissa into three 24-bit integers ++ stored in a double array. */ ++ exp = j0 - 23; ++diff --git a/sysdeps/ieee754/ldbl-96/test-sinl-pseudo.c b/sysdeps/ieee754/ldbl-96/test-sinl-pseudo.c ++new file mode 100644 ++index 0000000000..f59b97769d ++--- /dev/null +++++ b/sysdeps/ieee754/ldbl-96/test-sinl-pseudo.c ++@@ -0,0 +1,41 @@ +++/* Test sinl for pseudo-zeros and unnormals for ldbl-96 (bug 25487). +++ Copyright (C) 2020 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 +++ . */ +++ +++#include +++#include +++#include +++ +++static int +++do_test (void) +++{ +++ for (int i = 0; i < 64; i++) +++ { +++ uint64_t sig = i == 63 ? 0 : 1ULL << i; +++ long double ld; +++ SET_LDOUBLE_WORDS (ld, 0x4141, +++ sig >> 32, sig & 0xffffffffULL); +++ /* The requirement is that no stack overflow occurs when the +++ pseudo-zero or unnormal goes through range reduction. */ +++ volatile long double ldr; +++ ldr = sinl (ld); +++ (void) ldr; +++ } +++ return 0; +++} +++ +++#include ++diff --git a/sysdeps/posix/getcwd.c b/sysdeps/posix/getcwd.c ++index f00b337a13..839d78d7b7 100644 ++--- a/sysdeps/posix/getcwd.c +++++ b/sysdeps/posix/getcwd.c ++@@ -241,6 +241,14 @@ __getcwd (char *buf, size_t size) ++ char *path; ++ #ifndef NO_ALLOCATION ++ size_t allocated = size; +++ +++ /* A size of 1 byte is never useful. */ +++ if (allocated == 1) +++ { +++ __set_errno (ERANGE); +++ return NULL; +++ } +++ ++ if (size == 0) ++ { ++ if (buf != NULL) ++diff --git a/sysdeps/posix/system.c b/sysdeps/posix/system.c ++index e613e6a344..a03f478fc7 100644 ++--- a/sysdeps/posix/system.c +++++ b/sysdeps/posix/system.c ++@@ -101,7 +101,8 @@ cancel_handler (void *arg) ++ static int ++ do_system (const char *line) ++ { ++- int status; +++ int status = -1; +++ int ret; ++ pid_t pid; ++ struct sigaction sa; ++ #ifndef _LIBC_REENTRANT ++@@ -144,14 +145,14 @@ do_system (const char *line) ++ __posix_spawnattr_setflags (&spawn_attr, ++ POSIX_SPAWN_SETSIGDEF | POSIX_SPAWN_SETSIGMASK); ++ ++- status = __posix_spawn (&pid, SHELL_PATH, 0, &spawn_attr, ++- (char *const[]){ (char*) SHELL_NAME, ++- (char*) "-c", ++- (char *) line, NULL }, ++- __environ); +++ ret = __posix_spawn (&pid, SHELL_PATH, 0, &spawn_attr, +++ (char *const[]){ (char *) SHELL_NAME, +++ (char *) "-c", +++ (char *) line, NULL }, +++ __environ); ++ __posix_spawnattr_destroy (&spawn_attr); ++ ++- if (status == 0) +++ if (ret == 0) ++ { ++ /* Cancellation results in cleanup handlers running as exceptions in ++ the block where they were installed, so it is safe to reference ++@@ -186,6 +187,9 @@ do_system (const char *line) ++ } ++ DO_UNLOCK (); ++ +++ if (ret != 0) +++ __set_errno (ret); +++ ++ return status; ++ } ++ ++diff --git a/sysdeps/powerpc/powerpc32/sysdep.h b/sysdeps/powerpc/powerpc32/sysdep.h ++index 2ba009e919..829eec266a 100644 ++--- a/sysdeps/powerpc/powerpc32/sysdep.h +++++ b/sysdeps/powerpc/powerpc32/sysdep.h ++@@ -179,8 +179,8 @@ GOT_LABEL: ; \ ++ #else ++ /* Position-dependent code does not require access to the GOT. */ ++ # define __GLRO(rOUT, rGOT, member, offset) \ ++- lis rOUT,(member+LOWORD)@ha; \ ++- lwz rOUT,(member+LOWORD)@l(rOUT) +++ lis rOUT,(member)@ha; \ +++ lwz rOUT,(member)@l(rOUT) ++ #endif /* PIC */ ++ ++ #endif /* __ASSEMBLER__ */ ++diff --git a/sysdeps/powerpc/powerpc64/backtrace.c b/sysdeps/powerpc/powerpc64/backtrace.c ++index 8a53a1088f..362a2b713c 100644 ++--- a/sysdeps/powerpc/powerpc64/backtrace.c +++++ b/sysdeps/powerpc/powerpc64/backtrace.c ++@@ -54,11 +54,22 @@ struct signal_frame_64 { ++ /* We don't care about the rest, since the IP value is at 'uc' field. */ ++ }; ++ +++/* Test if the address match to the inside the trampoline code. +++ Up to and including kernel 5.8, returning from an interrupt or syscall to a +++ signal handler starts execution directly at the handler's entry point, with +++ LR set to address of the sigreturn trampoline (the vDSO symbol). +++ Newer kernels will branch to signal handler from the trampoline instead, so +++ checking the stacktrace against the vDSO entrypoint does not work in such +++ case. +++ The vDSO branches with a 'bctrl' instruction, so checking either the +++ vDSO address itself and the next instruction should cover all kernel +++ versions. */ ++ static inline bool ++ is_sigtramp_address (void *nip) ++ { ++ #ifdef HAVE_SIGTRAMP_RT64 ++- if (nip == GLRO (dl_vdso_sigtramp_rt64)) +++ if (nip == GLRO (dl_vdso_sigtramp_rt64) || +++ nip == GLRO (dl_vdso_sigtramp_rt64) + 4) ++ return true; ++ #endif ++ return false; ++diff --git a/sysdeps/s390/configure b/sysdeps/s390/configure ++index fa46e9e351..e7f576338d 100644 ++--- a/sysdeps/s390/configure +++++ b/sysdeps/s390/configure ++@@ -123,7 +123,9 @@ void testinsn (char *buf) ++ __asm__ (".machine \"arch13\" \n\t" ++ ".machinemode \"zarch_nohighgprs\" \n\t" ++ "lghi %%r0,16 \n\t" ++- "mvcrl 0(%0),32(%0)" : : "a" (buf) : "memory", "r0"); +++ "mvcrl 0(%0),32(%0) \n\t" +++ "vstrs %%v20,%%v20,%%v20,%%v20,0,2" +++ : : "a" (buf) : "memory", "r0"); ++ } ++ EOF ++ if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS --shared conftest.c ++@@ -271,7 +273,9 @@ else ++ void testinsn (char *buf) ++ { ++ __asm__ ("lghi %%r0,16 \n\t" ++- "mvcrl 0(%0),32(%0)" : : "a" (buf) : "memory", "r0"); +++ "mvcrl 0(%0),32(%0) \n\t" +++ "vstrs %%v20,%%v20,%%v20,%%v20,0,2" +++ : : "a" (buf) : "memory", "r0"); ++ } ++ EOF ++ if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS --shared conftest.c ++diff --git a/sysdeps/s390/configure.ac b/sysdeps/s390/configure.ac ++index 3ed5a8ef87..5c3479e8cf 100644 ++--- a/sysdeps/s390/configure.ac +++++ b/sysdeps/s390/configure.ac ++@@ -88,7 +88,9 @@ void testinsn (char *buf) ++ __asm__ (".machine \"arch13\" \n\t" ++ ".machinemode \"zarch_nohighgprs\" \n\t" ++ "lghi %%r0,16 \n\t" ++- "mvcrl 0(%0),32(%0)" : : "a" (buf) : "memory", "r0"); +++ "mvcrl 0(%0),32(%0) \n\t" +++ "vstrs %%v20,%%v20,%%v20,%%v20,0,2" +++ : : "a" (buf) : "memory", "r0"); ++ } ++ EOF ++ dnl test, if assembler supports S390 arch13 instructions ++@@ -195,7 +197,9 @@ cat > conftest.c <<\EOF ++ void testinsn (char *buf) ++ { ++ __asm__ ("lghi %%r0,16 \n\t" ++- "mvcrl 0(%0),32(%0)" : : "a" (buf) : "memory", "r0"); +++ "mvcrl 0(%0),32(%0) \n\t" +++ "vstrs %%v20,%%v20,%%v20,%%v20,0,2" +++ : : "a" (buf) : "memory", "r0"); ++ } ++ EOF ++ dnl test, if assembler supports S390 arch13 zarch instructions as default ++diff --git a/sysdeps/s390/memmove.c b/sysdeps/s390/memmove.c ++index 5fc85e129f..ee59b5de14 100644 ++--- a/sysdeps/s390/memmove.c +++++ b/sysdeps/s390/memmove.c ++@@ -43,7 +43,7 @@ extern __typeof (__redirect_memmove) MEMMOVE_ARCH13 attribute_hidden; ++ s390_libc_ifunc_expr (__redirect_memmove, memmove, ++ ({ ++ s390_libc_ifunc_expr_stfle_init (); ++- (HAVE_MEMMOVE_ARCH13 +++ (HAVE_MEMMOVE_ARCH13 && (hwcap & HWCAP_S390_VXRS_EXT2) ++ && S390_IS_ARCH13_MIE3 (stfle_bits)) ++ ? MEMMOVE_ARCH13 ++ : (HAVE_MEMMOVE_Z13 && (hwcap & HWCAP_S390_VX)) ++diff --git a/sysdeps/s390/multiarch/ifunc-impl-list.c b/sysdeps/s390/multiarch/ifunc-impl-list.c ++index e6195c6e26..17c0cc3952 100644 ++--- a/sysdeps/s390/multiarch/ifunc-impl-list.c +++++ b/sysdeps/s390/multiarch/ifunc-impl-list.c ++@@ -171,7 +171,8 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, ++ IFUNC_IMPL (i, name, memmove, ++ # if HAVE_MEMMOVE_ARCH13 ++ IFUNC_IMPL_ADD (array, i, memmove, ++- S390_IS_ARCH13_MIE3 (stfle_bits), +++ ((dl_hwcap & HWCAP_S390_VXRS_EXT2) +++ && S390_IS_ARCH13_MIE3 (stfle_bits)), ++ MEMMOVE_ARCH13) ++ # endif ++ # if HAVE_MEMMOVE_Z13 ++diff --git a/sysdeps/sh/be/sh4/fpu/Implies b/sysdeps/sh/be/sh4/fpu/Implies ++new file mode 100644 ++index 0000000000..71b28ee1a4 ++--- /dev/null +++++ b/sysdeps/sh/be/sh4/fpu/Implies ++@@ -0,0 +1 @@ +++sh/sh4/fpu ++diff --git a/sysdeps/sh/le/sh4/fpu/Implies b/sysdeps/sh/le/sh4/fpu/Implies ++new file mode 100644 ++index 0000000000..71b28ee1a4 ++--- /dev/null +++++ b/sysdeps/sh/le/sh4/fpu/Implies ++@@ -0,0 +1 @@ +++sh/sh4/fpu ++diff --git a/sysdeps/unix/make-syscalls.sh b/sysdeps/unix/make-syscalls.sh ++index c07626677f..4f6c3490a2 100644 ++--- a/sysdeps/unix/make-syscalls.sh +++++ b/sysdeps/unix/make-syscalls.sh ++@@ -30,6 +30,7 @@ ++ # P: optionally-NULL pointer to typed object (e.g., 3rd argument to sigaction) ++ # s: non-NULL string (e.g., 1st arg to open) ++ # S: optionally-NULL string (e.g., 1st arg to acct) +++# U: unsigned long int (32-bit types are zero-extended to 64-bit types) ++ # v: vararg scalar (e.g., optional 3rd arg to open) ++ # V: byte-per-page vector (3rd arg to mincore) ++ # W: wait status, optionally-NULL pointer to int (e.g., 2nd arg of wait4) ++@@ -184,6 +185,27 @@ while read file srcfile caller syscall args strong weak; do ++ ?:?????????) nargs=9;; ++ esac ++ +++ # Derive the unsigned long int arguments from the argument signature +++ ulong_arg_1=0 +++ ulong_arg_2=0 +++ ulong_count=0 +++ for U in $(echo $args | sed -e "s/.*:/:/" | grep -ob U) +++ do +++ ulong_count=$(expr $ulong_count + 1) +++ ulong_arg=$(echo $U | sed -e "s/:U//") +++ case $ulong_count in +++ 1) +++ ulong_arg_1=$ulong_arg +++ ;; +++ 2) +++ ulong_arg_2=$ulong_arg +++ ;; +++ *) +++ echo >&2 "$0: Too many unsigned long int arguments for syscall ($strong $weak)" +++ exit 2 +++ esac +++ done +++ ++ # Make sure only the first syscall rule is used, if multiple dirs ++ # define the same syscall. ++ echo '' ++@@ -245,6 +267,8 @@ while read file srcfile caller syscall args strong weak; do ++ \$(make-target-directory) ++ (echo '#define SYSCALL_NAME $syscall'; \\ ++ echo '#define SYSCALL_NARGS $nargs'; \\ +++ echo '#define SYSCALL_ULONG_ARG_1 $ulong_arg_1'; \\ +++ echo '#define SYSCALL_ULONG_ARG_2 $ulong_arg_2'; \\ ++ echo '#define SYSCALL_SYMBOL $strong'; \\ ++ echo '#define SYSCALL_NOERRNO $noerrno'; \\ ++ echo '#define SYSCALL_ERRVAL $errval'; \\ ++diff --git a/sysdeps/unix/syscall-template.S b/sysdeps/unix/syscall-template.S ++index cf6c7a58fb..f807a8603f 100644 ++--- a/sysdeps/unix/syscall-template.S +++++ b/sysdeps/unix/syscall-template.S ++@@ -25,6 +25,12 @@ ++ defining a few macros: ++ SYSCALL_NAME syscall name ++ SYSCALL_NARGS number of arguments this call takes +++ SYSCALL_ULONG_ARG_1 the first unsigned long int argument this +++ call takes. 0 means that there are no +++ unsigned long int arguments. +++ SYSCALL_ULONG_ARG_2 the second unsigned long int argument this +++ call takes. 0 means that there is at most +++ one unsigned long int argument. ++ SYSCALL_SYMBOL primary symbol name ++ SYSCALL_NOERRNO 1 to define a no-errno version (see below) ++ SYSCALL_ERRVAL 1 to define an error-value version (see below) ++@@ -44,9 +50,31 @@ ++ /* This indirection is needed so that SYMBOL gets macro-expanded. */ ++ #define syscall_hidden_def(SYMBOL) hidden_def (SYMBOL) ++ ++-#define T_PSEUDO(SYMBOL, NAME, N) PSEUDO (SYMBOL, NAME, N) ++-#define T_PSEUDO_NOERRNO(SYMBOL, NAME, N) PSEUDO_NOERRNO (SYMBOL, NAME, N) ++-#define T_PSEUDO_ERRVAL(SYMBOL, NAME, N) PSEUDO_ERRVAL (SYMBOL, NAME, N) +++/* If PSEUDOS_HAVE_ULONG_INDICES is defined, PSEUDO and T_PSEUDO macros +++ have 2 extra arguments for unsigned long int arguments: +++ Extra argument 1: Position of the first unsigned long int argument. +++ Extra argument 2: Position of the second unsigned long int argument. +++ */ +++#ifndef PSEUDOS_HAVE_ULONG_INDICES +++# undef SYSCALL_ULONG_ARG_1 +++# define SYSCALL_ULONG_ARG_1 0 +++#endif +++ +++#if SYSCALL_ULONG_ARG_1 +++# define T_PSEUDO(SYMBOL, NAME, N, U1, U2) \ +++ PSEUDO (SYMBOL, NAME, N, U1, U2) +++# define T_PSEUDO_NOERRNO(SYMBOL, NAME, N, U1, U2) \ +++ PSEUDO_NOERRNO (SYMBOL, NAME, N, U1, U2) +++# define T_PSEUDO_ERRVAL(SYMBOL, NAME, N, U1, U2) \ +++ PSEUDO_ERRVAL (SYMBOL, NAME, N, U1, U2) +++#else +++# define T_PSEUDO(SYMBOL, NAME, N) \ +++ PSEUDO (SYMBOL, NAME, N) +++# define T_PSEUDO_NOERRNO(SYMBOL, NAME, N) \ +++ PSEUDO_NOERRNO (SYMBOL, NAME, N) +++# define T_PSEUDO_ERRVAL(SYMBOL, NAME, N) \ +++ PSEUDO_ERRVAL (SYMBOL, NAME, N) +++#endif ++ #define T_PSEUDO_END(SYMBOL) PSEUDO_END (SYMBOL) ++ #define T_PSEUDO_END_NOERRNO(SYMBOL) PSEUDO_END_NOERRNO (SYMBOL) ++ #define T_PSEUDO_END_ERRVAL(SYMBOL) PSEUDO_END_ERRVAL (SYMBOL) ++@@ -56,7 +84,12 @@ ++ /* This kind of system call stub never returns an error. ++ We return the return value register to the caller unexamined. */ ++ +++# if SYSCALL_ULONG_ARG_1 +++T_PSEUDO_NOERRNO (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS, +++ SYSCALL_ULONG_ARG_1, SYSCALL_ULONG_ARG_2) +++# else ++ T_PSEUDO_NOERRNO (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS) +++# endif ++ ret_NOERRNO ++ T_PSEUDO_END_NOERRNO (SYSCALL_SYMBOL) ++ ++@@ -66,7 +99,12 @@ T_PSEUDO_END_NOERRNO (SYSCALL_SYMBOL) ++ value, or zero for success. We may massage the kernel's return value ++ to meet that ABI, but we never set errno here. */ ++ +++# if SYSCALL_ULONG_ARG_1 +++T_PSEUDO_ERRVAL (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS, +++ SYSCALL_ULONG_ARG_1, SYSCALL_ULONG_ARG_2) +++# else ++ T_PSEUDO_ERRVAL (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS) +++# endif ++ ret_ERRVAL ++ T_PSEUDO_END_ERRVAL (SYSCALL_SYMBOL) ++ ++@@ -75,7 +113,12 @@ T_PSEUDO_END_ERRVAL (SYSCALL_SYMBOL) ++ /* This is a "normal" system call stub: if there is an error, ++ it returns -1 and sets errno. */ ++ +++# if SYSCALL_ULONG_ARG_1 +++T_PSEUDO (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS, +++ SYSCALL_ULONG_ARG_1, SYSCALL_ULONG_ARG_2) +++# else ++ T_PSEUDO (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS) +++# endif ++ ret ++ T_PSEUDO_END (SYSCALL_SYMBOL) ++ ++diff --git a/sysdeps/unix/syscalls.list b/sysdeps/unix/syscalls.list ++index e28e801c7a..6b22b2cb45 100644 ++--- a/sysdeps/unix/syscalls.list +++++ b/sysdeps/unix/syscalls.list ++@@ -39,27 +39,27 @@ kill - kill i:ii __kill kill ++ link - link i:ss __link link ++ listen - listen i:ii __listen listen ++ lseek - lseek i:iii __libc_lseek __lseek lseek ++-madvise - madvise i:pii __madvise madvise +++madvise - madvise i:pUi __madvise madvise ++ mkdir - mkdir i:si __mkdir mkdir ++-mmap - mmap b:aniiii __mmap mmap ++-mprotect - mprotect i:aii __mprotect mprotect ++-munmap - munmap i:ai __munmap munmap +++mmap - mmap b:aUiiii __mmap mmap +++mprotect - mprotect i:aUi __mprotect mprotect +++munmap - munmap i:aU __munmap munmap ++ open - open Ci:siv __libc_open __open open ++ profil - profil i:piii __profil profil ++ ptrace - ptrace i:iiii ptrace ++-read - read Ci:ibn __libc_read __read read ++-readlink - readlink i:spi __readlink readlink +++read - read Ci:ibU __libc_read __read read +++readlink - readlink i:spU __readlink readlink ++ readv - readv Ci:ipi __readv readv ++ reboot - reboot i:i reboot ++-recv - recv Ci:ibni __libc_recv recv ++-recvfrom - recvfrom Ci:ibniBN __libc_recvfrom __recvfrom recvfrom +++recv - recv Ci:ibUi __libc_recv recv +++recvfrom - recvfrom Ci:ibUiBN __libc_recvfrom __recvfrom recvfrom ++ recvmsg - recvmsg Ci:ipi __libc_recvmsg __recvmsg recvmsg ++ rename - rename i:ss rename ++ rmdir - rmdir i:s __rmdir rmdir ++ select - select Ci:iPPPP __select __libc_select select ++-send - send Ci:ibni __libc_send __send send +++send - send Ci:ibUi __libc_send __send send ++ sendmsg - sendmsg Ci:ipi __libc_sendmsg __sendmsg sendmsg ++-sendto - sendto Ci:ibnibn __libc_sendto __sendto sendto +++sendto - sendto Ci:ibUibn __libc_sendto __sendto sendto ++ setdomain - setdomainname i:si setdomainname ++ setegid - setegid i:i __setegid setegid ++ seteuid - seteuid i:i __seteuid seteuid ++@@ -94,5 +94,5 @@ uname - uname i:p __uname uname ++ unlink - unlink i:s __unlink unlink ++ utimes - utimes i:sp __utimes utimes ++ vhangup - vhangup i:i vhangup ++-write - write Ci:ibn __libc_write __write write +++write - write Ci:ibU __libc_write __write write ++ writev - writev Ci:ipi __writev writev ++diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile ++index f12b7b1a2d..0a0da00151 100644 ++--- a/sysdeps/unix/sysv/linux/Makefile +++++ b/sysdeps/unix/sysv/linux/Makefile ++@@ -60,7 +60,9 @@ sysdep_routines += adjtimex clone umount umount2 readahead \ ++ setfsuid setfsgid epoll_pwait signalfd \ ++ eventfd eventfd_read eventfd_write prlimit \ ++ personality epoll_wait tee vmsplice splice \ ++- open_by_handle_at mlock2 pkey_mprotect pkey_set pkey_get +++ open_by_handle_at mlock2 pkey_mprotect pkey_set pkey_get \ +++ prctl \ +++ process_vm_readv process_vm_writev ++ ++ CFLAGS-gethostid.c = -fexceptions ++ CFLAGS-tee.c = -fexceptions -fasynchronous-unwind-tables ++@@ -273,7 +275,7 @@ sysdep_routines += xstatconv internal_statvfs internal_statvfs64 \ ++ ++ sysdep_headers += bits/fcntl-linux.h ++ ++-tests += tst-fallocate tst-fallocate64 +++tests += tst-fallocate tst-fallocate64 tst-getcwd-smallbuff ++ endif ++ ++ ifeq ($(subdir),elf) ++diff --git a/sysdeps/unix/sysv/linux/aarch64/arch-syscall.h b/sysdeps/unix/sysv/linux/aarch64/arch-syscall.h ++index 9378387747..c8471947b9 100644 ++--- a/sysdeps/unix/sysv/linux/aarch64/arch-syscall.h +++++ b/sysdeps/unix/sysv/linux/aarch64/arch-syscall.h ++@@ -17,6 +17,7 @@ ++ #define __NR_clock_nanosleep 115 ++ #define __NR_clock_settime 112 ++ #define __NR_clone 220 +++#define __NR_clone3 435 ++ #define __NR_close 57 ++ #define __NR_connect 203 ++ #define __NR_copy_file_range 285 ++diff --git a/sysdeps/unix/sysv/linux/aarch64/cpu-features.h b/sysdeps/unix/sysv/linux/aarch64/cpu-features.h ++index 1389cea1b3..346d045fb4 100644 ++--- a/sysdeps/unix/sysv/linux/aarch64/cpu-features.h +++++ b/sysdeps/unix/sysv/linux/aarch64/cpu-features.h ++@@ -51,8 +51,12 @@ ++ ++ #define IS_PHECDA(midr) (MIDR_IMPLEMENTOR(midr) == 'h' \ ++ && MIDR_PARTNUM(midr) == 0x000) ++-#define IS_ARES(midr) (MIDR_IMPLEMENTOR(midr) == 'A' \ ++- && MIDR_PARTNUM(midr) == 0xd0c) +++#define IS_NEOVERSE_N1(midr) (MIDR_IMPLEMENTOR(midr) == 'A' \ +++ && MIDR_PARTNUM(midr) == 0xd0c) +++#define IS_NEOVERSE_N2(midr) (MIDR_IMPLEMENTOR(midr) == 'A' \ +++ && MIDR_PARTNUM(midr) == 0xd49) +++#define IS_NEOVERSE_V1(midr) (MIDR_IMPLEMENTOR(midr) == 'A' \ +++ && MIDR_PARTNUM(midr) == 0xd40) ++ ++ #define IS_EMAG(midr) (MIDR_IMPLEMENTOR(midr) == 'P' \ ++ && MIDR_PARTNUM(midr) == 0x000) ++diff --git a/sysdeps/unix/sysv/linux/aarch64/localplt.data b/sysdeps/unix/sysv/linux/aarch64/localplt.data ++index a60053b914..08af68b5e8 100644 ++--- a/sysdeps/unix/sysv/linux/aarch64/localplt.data +++++ b/sysdeps/unix/sysv/linux/aarch64/localplt.data ++@@ -7,6 +7,9 @@ libc.so: malloc ++ libc.so: memalign ++ libc.so: realloc ++ libm.so: matherr +++# If outline atomics are used, libgcc (built outside of glibc) may +++# call __getauxval using the PLT. +++libc.so: __getauxval ? ++ # The dynamic loader needs __tls_get_addr for TLS. ++ ld.so: __tls_get_addr ++ # The main malloc is interposed into the dynamic linker, for ++diff --git a/sysdeps/unix/sysv/linux/getpt.c b/sysdeps/unix/sysv/linux/getpt.c ++index 1803b232c9..3cc745e11a 100644 ++--- a/sysdeps/unix/sysv/linux/getpt.c +++++ b/sysdeps/unix/sysv/linux/getpt.c ++@@ -16,69 +16,18 @@ ++ License along with the GNU C Library; if not, see ++ . */ ++ ++-#include ++ #include ++-#include ++ #include ++ #include ++-#include ++- ++-#include "linux_fsinfo.h" ++ ++ /* Path to the master pseudo terminal cloning device. */ ++ #define _PATH_DEVPTMX _PATH_DEV "ptmx" ++-/* Directory containing the UNIX98 pseudo terminals. */ ++-#define _PATH_DEVPTS _PATH_DEV "pts" ++- ++-/* Prototype for function that opens BSD-style master pseudo-terminals. */ ++-extern int __bsd_getpt (void) attribute_hidden; ++ ++ /* Open a master pseudo terminal and return its file descriptor. */ ++ int ++ __posix_openpt (int oflag) ++ { ++- static int have_no_dev_ptmx; ++- int fd; ++- ++- if (!have_no_dev_ptmx) ++- { ++- fd = __open (_PATH_DEVPTMX, oflag); ++- if (fd != -1) ++- { ++- struct statfs fsbuf; ++- static int devpts_mounted; ++- ++- /* Check that the /dev/pts filesystem is mounted ++- or if /dev is a devfs filesystem (this implies /dev/pts). */ ++- if (devpts_mounted ++- || (__statfs (_PATH_DEVPTS, &fsbuf) == 0 ++- && fsbuf.f_type == DEVPTS_SUPER_MAGIC) ++- || (__statfs (_PATH_DEV, &fsbuf) == 0 ++- && fsbuf.f_type == DEVFS_SUPER_MAGIC)) ++- { ++- /* Everything is ok. */ ++- devpts_mounted = 1; ++- return fd; ++- } ++- ++- /* If /dev/pts is not mounted then the UNIX98 pseudo terminals ++- are not usable. */ ++- __close (fd); ++- have_no_dev_ptmx = 1; ++- __set_errno (ENOENT); ++- } ++- else ++- { ++- if (errno == ENOENT || errno == ENODEV) ++- have_no_dev_ptmx = 1; ++- else ++- return -1; ++- } ++- } ++- else ++- __set_errno (ENOENT); ++- ++- return -1; +++ return __open (_PATH_DEVPTMX, oflag); ++ } ++ weak_alias (__posix_openpt, posix_openpt) ++ ++@@ -86,16 +35,6 @@ weak_alias (__posix_openpt, posix_openpt) ++ int ++ __getpt (void) ++ { ++- int fd = __posix_openpt (O_RDWR); ++- if (fd == -1) ++- fd = __bsd_getpt (); ++- return fd; +++ return __posix_openpt (O_RDWR); ++ } ++- ++- ++-#define PTYNAME1 "pqrstuvwxyzabcde"; ++-#define PTYNAME2 "0123456789abcdef"; ++- ++-#define __getpt __bsd_getpt ++-#define HAVE_POSIX_OPENPT ++-#include +++weak_alias (__getpt, getpt) ++diff --git a/sysdeps/unix/sysv/linux/grantpt.c b/sysdeps/unix/sysv/linux/grantpt.c ++index 2030e07fa6..43122f9a76 100644 ++--- a/sysdeps/unix/sysv/linux/grantpt.c +++++ b/sysdeps/unix/sysv/linux/grantpt.c ++@@ -1,44 +1,41 @@ ++-#include ++-#include ++-#include ++-#include ++-#include ++-#include ++-#include ++-#include +++/* grantpt implementation for Linux. +++ Copyright (C) 1998-2020 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Zack Weinberg , 1998. ++ ++-#include +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public +++ License as published by the Free Software Foundation; either +++ version 2.1 of the License, or (at your option) any later version. ++ ++-#include "pty-private.h" +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General Public License for more details. ++ ++-#if HAVE_PT_CHOWN ++-/* Close all file descriptors except the one specified. */ ++-static void ++-close_all_fds (void) ++-{ ++- DIR *dir = __opendir ("/proc/self/fd"); ++- if (dir != NULL) ++- { ++- struct dirent64 *d; ++- while ((d = __readdir64 (dir)) != NULL) ++- if (isdigit (d->d_name[0])) ++- { ++- char *endp; ++- long int fd = strtol (d->d_name, &endp, 10); ++- if (*endp == '\0' && fd != PTY_FILENO && fd != dirfd (dir)) ++- __close_nocancel_nostatus (fd); ++- } +++ You should have received a copy of the GNU Lesser General Public +++ License along with the GNU C Library; if not, see +++ . */ +++ +++#include +++#include +++#include +++#include ++ ++- __closedir (dir); +++int +++grantpt (int fd) +++{ +++ /* Without pt_chown on Linux, we have delegated the creation of the +++ pty node with the right group and permission mode to the kernel, and +++ non-root users are unlikely to be able to change it. Therefore let's +++ consider that POSIX enforcement is the responsibility of the whole +++ system and not only the GNU libc. */ ++ ++- int nullfd = __open_nocancel (_PATH_DEVNULL, O_RDONLY); ++- assert (nullfd == STDIN_FILENO); ++- nullfd = __open_nocancel (_PATH_DEVNULL, O_WRONLY); ++- assert (nullfd == STDOUT_FILENO); ++- __dup2 (STDOUT_FILENO, STDERR_FILENO); ++- } +++ /* Verify that fd refers to a ptmx descriptor. */ +++ unsigned int ptyno; +++ int ret = __ioctl (fd, TIOCGPTN, &ptyno); +++ if (ret != 0 && errno == ENOTTY) +++ /* POSIX requires EINVAL instead of ENOTTY provided by the kernel. */ +++ __set_errno (EINVAL); +++ return ret; ++ } ++-# define CLOSE_ALL_FDS() close_all_fds() ++-#endif ++- ++-#include ++diff --git a/sysdeps/unix/sysv/linux/hppa/atomic-machine.h b/sysdeps/unix/sysv/linux/hppa/atomic-machine.h ++index 9d8ffbe860..bf61b66b70 100644 ++--- a/sysdeps/unix/sysv/linux/hppa/atomic-machine.h +++++ b/sysdeps/unix/sysv/linux/hppa/atomic-machine.h ++@@ -36,9 +36,37 @@ typedef uintptr_t uatomicptr_t; ++ typedef intmax_t atomic_max_t; ++ typedef uintmax_t uatomic_max_t; ++ +++#define atomic_full_barrier() __sync_synchronize () +++ ++ #define __HAVE_64B_ATOMICS 0 ++ #define USE_ATOMIC_COMPILER_BUILTINS 0 ++ +++/* We use the compiler atomic load and store builtins as the generic +++ defines are not atomic. In particular, we need to use compare and +++ exchange for stores as the implementation is synthesized. */ +++void __atomic_link_error (void); +++#define __atomic_check_size_ls(mem) \ +++ if ((sizeof (*mem) != 1) && (sizeof (*mem) != 2) && sizeof (*mem) != 4) \ +++ __atomic_link_error (); +++ +++#define atomic_load_relaxed(mem) \ +++ ({ __atomic_check_size_ls((mem)); \ +++ __atomic_load_n ((mem), __ATOMIC_RELAXED); }) +++#define atomic_load_acquire(mem) \ +++ ({ __atomic_check_size_ls((mem)); \ +++ __atomic_load_n ((mem), __ATOMIC_ACQUIRE); }) +++ +++#define atomic_store_relaxed(mem, val) \ +++ do { \ +++ __atomic_check_size_ls((mem)); \ +++ __atomic_store_n ((mem), (val), __ATOMIC_RELAXED); \ +++ } while (0) +++#define atomic_store_release(mem, val) \ +++ do { \ +++ __atomic_check_size_ls((mem)); \ +++ __atomic_store_n ((mem), (val), __ATOMIC_RELEASE); \ +++ } while (0) +++ ++ /* XXX Is this actually correct? */ ++ #define ATOMIC_EXCHANGE_USES_CAS 1 ++ ++diff --git a/sysdeps/unix/sysv/linux/microblaze/sysdep.h b/sysdeps/unix/sysv/linux/microblaze/sysdep.h ++index ed873d9dd4..796663a23a 100644 ++--- a/sysdeps/unix/sysv/linux/microblaze/sysdep.h +++++ b/sysdeps/unix/sysv/linux/microblaze/sysdep.h ++@@ -209,8 +209,8 @@ SYSCALL_ERROR_LABEL_DCL: \ ++ ++ # define inline_syscall0(name,dummy) \ ++ ({ \ ++- register long __ret __asm__("r3"); \ ++- register long __r12 __asm__("r12") = name; \ +++ register long int __ret __asm__("r3"); \ +++ register long int __r12 __asm__("r12") = name; \ ++ __asm__ __volatile__( "brki r14,8; nop;" \ ++ : "=r"(__ret) \ ++ : "r"(__r12) \ ++@@ -219,9 +219,10 @@ SYSCALL_ERROR_LABEL_DCL: \ ++ ++ # define inline_syscall1(name,arg1) \ ++ ({ \ ++- register long __ret __asm__("r3"); \ ++- register long __r12 __asm__("r12") = name; \ ++- register long __r5 __asm__("r5") = (long)(arg1); \ +++ long int __arg1 = (long int) (arg1); \ +++ register long int __ret __asm__("r3"); \ +++ register long int __r12 __asm__("r12") = name; \ +++ register long int __r5 __asm__("r5") = __arg1; \ ++ __asm__ __volatile__( "brki r14,8; nop;" \ ++ : "=r"(__ret) \ ++ : "r"(__r5), "r"(__r12) \ ++@@ -230,10 +231,12 @@ SYSCALL_ERROR_LABEL_DCL: \ ++ ++ # define inline_syscall2(name,arg1,arg2) \ ++ ({ \ ++- register long __ret __asm__("r3"); \ ++- register long __r12 __asm__("r12") = name; \ ++- register long __r5 __asm__("r5") = (long)(arg1); \ ++- register long __r6 __asm__("r6") = (long)(arg2); \ +++ long int __arg1 = (long int) (arg1); \ +++ long int __arg2 = (long int) (arg2); \ +++ register long int __ret __asm__("r3"); \ +++ register long int __r12 __asm__("r12") = name; \ +++ register long int __r5 __asm__("r5") = __arg1; \ +++ register long int __r6 __asm__("r6") = __arg2; \ ++ __asm__ __volatile__( "brki r14,8; nop;" \ ++ : "=r"(__ret) \ ++ : "r"(__r5), "r"(__r6), "r"(__r12) \ ++@@ -243,11 +246,14 @@ SYSCALL_ERROR_LABEL_DCL: \ ++ ++ # define inline_syscall3(name,arg1,arg2,arg3) \ ++ ({ \ ++- register long __ret __asm__("r3"); \ ++- register long __r12 __asm__("r12") = name; \ ++- register long __r5 __asm__("r5") = (long)(arg1); \ ++- register long __r6 __asm__("r6") = (long)(arg2); \ ++- register long __r7 __asm__("r7") = (long)(arg3); \ +++ long int __arg1 = (long int) (arg1); \ +++ long int __arg2 = (long int) (arg2); \ +++ long int __arg3 = (long int) (arg3); \ +++ register long int __ret __asm__("r3"); \ +++ register long int __r12 __asm__("r12") = name; \ +++ register long int __r5 __asm__("r5") = __arg1; \ +++ register long int __r6 __asm__("r6") = __arg2; \ +++ register long int __r7 __asm__("r7") = __arg3; \ ++ __asm__ __volatile__( "brki r14,8; nop;" \ ++ : "=r"(__ret) \ ++ : "r"(__r5), "r"(__r6), "r"(__r7), "r"(__r12) \ ++@@ -257,12 +263,16 @@ SYSCALL_ERROR_LABEL_DCL: \ ++ ++ # define inline_syscall4(name,arg1,arg2,arg3,arg4) \ ++ ({ \ ++- register long __ret __asm__("r3"); \ ++- register long __r12 __asm__("r12") = name; \ ++- register long __r5 __asm__("r5") = (long)(arg1); \ ++- register long __r6 __asm__("r6") = (long)(arg2); \ ++- register long __r7 __asm__("r7") = (long)(arg3); \ ++- register long __r8 __asm__("r8") = (long)(arg4); \ +++ long int __arg1 = (long int) (arg1); \ +++ long int __arg2 = (long int) (arg2); \ +++ long int __arg3 = (long int) (arg3); \ +++ long int __arg4 = (long int) (arg4); \ +++ register long int __ret __asm__("r3"); \ +++ register long int __r12 __asm__("r12") = name; \ +++ register long int __r5 __asm__("r5") = __arg1; \ +++ register long int __r6 __asm__("r6") = __arg2; \ +++ register long int __r7 __asm__("r7") = __arg3; \ +++ register long int __r8 __asm__("r8") = __arg4; \ ++ __asm__ __volatile__( "brki r14,8; nop;" \ ++ : "=r"(__ret) \ ++ : "r"(__r5), "r"(__r6), "r"(__r7), "r"(__r8),"r"(__r12) \ ++@@ -272,13 +282,18 @@ SYSCALL_ERROR_LABEL_DCL: \ ++ ++ # define inline_syscall5(name,arg1,arg2,arg3,arg4,arg5) \ ++ ({ \ ++- register long __ret __asm__("r3"); \ ++- register long __r12 __asm__("r12") = name; \ ++- register long __r5 __asm__("r5") = (long)(arg1); \ ++- register long __r6 __asm__("r6") = (long)(arg2); \ ++- register long __r7 __asm__("r7") = (long)(arg3); \ ++- register long __r8 __asm__("r8") = (long)(arg4); \ ++- register long __r9 __asm__("r9") = (long)(arg5); \ +++ long int __arg1 = (long int) (arg1); \ +++ long int __arg2 = (long int) (arg2); \ +++ long int __arg3 = (long int) (arg3); \ +++ long int __arg4 = (long int) (arg4); \ +++ long int __arg5 = (long int) (arg5); \ +++ register long int __ret __asm__("r3"); \ +++ register long int __r12 __asm__("r12") = name; \ +++ register long int __r5 __asm__("r5") = __arg1; \ +++ register long int __r6 __asm__("r6") = __arg2; \ +++ register long int __r7 __asm__("r7") = __arg3; \ +++ register long int __r8 __asm__("r8") = __arg4; \ +++ register long int __r9 __asm__("r9") = __arg5; \ ++ __asm__ __volatile__( "brki r14,8; nop;" \ ++ : "=r"(__ret) \ ++ : "r"(__r5), "r"(__r6), "r"(__r7), "r"(__r8),"r"(__r9), "r"(__r12) \ ++@@ -288,14 +303,20 @@ SYSCALL_ERROR_LABEL_DCL: \ ++ ++ # define inline_syscall6(name,arg1,arg2,arg3,arg4,arg5,arg6) \ ++ ({ \ ++- register long __ret __asm__("r3"); \ ++- register long __r12 __asm__("r12") = name; \ ++- register long __r5 __asm__("r5") = (long)(arg1); \ ++- register long __r6 __asm__("r6") = (long)(arg2); \ ++- register long __r7 __asm__("r7") = (long)(arg3); \ ++- register long __r8 __asm__("r8") = (long)(arg4); \ ++- register long __r9 __asm__("r9") = (long)(arg5); \ ++- register long __r10 __asm__("r10") = (long)(arg6); \ +++ long int __arg1 = (long int) (arg1); \ +++ long int __arg2 = (long int) (arg2); \ +++ long int __arg3 = (long int) (arg3); \ +++ long int __arg4 = (long int) (arg4); \ +++ long int __arg5 = (long int) (arg5); \ +++ long int __arg6 = (long int) (arg6); \ +++ register long int __ret __asm__("r3"); \ +++ register long int __r12 __asm__("r12") = name; \ +++ register long int __r5 __asm__("r5") = __arg1; \ +++ register long int __r6 __asm__("r6") = __arg2; \ +++ register long int __r7 __asm__("r7") = __arg3; \ +++ register long int __r8 __asm__("r8") = __arg4; \ +++ register long int __r9 __asm__("r9") = __arg5; \ +++ register long int __r10 __asm__("r10") = __arg6; \ ++ __asm__ __volatile__( "brki r14,8; nop;" \ ++ : "=r"(__ret) \ ++ : "r"(__r5), "r"(__r6), "r"(__r7), "r"(__r8),"r"(__r9), "r"(__r10), \ ++diff --git a/sysdeps/unix/sysv/linux/mips/mips32/mips-syscall5.S b/sysdeps/unix/sysv/linux/mips/mips32/mips-syscall5.S ++index b2bbf10181..ff445a5406 100644 ++--- a/sysdeps/unix/sysv/linux/mips/mips32/mips-syscall5.S +++++ b/sysdeps/unix/sysv/linux/mips/mips32/mips-syscall5.S ++@@ -22,9 +22,9 @@ ++ .text ++ .set nomips16 ++ ++-/* long long __mips_syscall5 (long arg1, long arg2, long arg3, long arg4, ++- long arg5, ++- long number) */ +++/* long long int __mips_syscall5 (long int arg1, long int arg2, long int arg3, +++ long int arg4, long int arg5, +++ long int number) */ ++ ++ ENTRY(__mips_syscall5) ++ lw v0, 20(sp) ++diff --git a/sysdeps/unix/sysv/linux/mips/mips32/mips-syscall6.S b/sysdeps/unix/sysv/linux/mips/mips32/mips-syscall6.S ++index 572d7c1137..2b4a3117d1 100644 ++--- a/sysdeps/unix/sysv/linux/mips/mips32/mips-syscall6.S +++++ b/sysdeps/unix/sysv/linux/mips/mips32/mips-syscall6.S ++@@ -22,9 +22,9 @@ ++ .text ++ .set nomips16 ++ ++-/* long long __mips_syscall6 (long arg1, long arg2, long arg3, long arg4, ++- long arg5, long arg6, ++- long number) */ +++/* long long int __mips_syscall6 (long int arg1, long int arg2, long int arg3, +++ long int arg4, long int arg5, long int arg6, +++ long int number) */ ++ ++ ENTRY(__mips_syscall6) ++ lw v0, 24(sp) ++diff --git a/sysdeps/unix/sysv/linux/mips/mips32/mips-syscall7.S b/sysdeps/unix/sysv/linux/mips/mips32/mips-syscall7.S ++index 05164cb253..2723bbb138 100644 ++--- a/sysdeps/unix/sysv/linux/mips/mips32/mips-syscall7.S +++++ b/sysdeps/unix/sysv/linux/mips/mips32/mips-syscall7.S ++@@ -22,9 +22,10 @@ ++ .text ++ .set nomips16 ++ ++-/* long long __mips_syscall7 (long arg1, long arg2, long arg3, long arg4, ++- long arg5, long arg6, long arg7, ++- long number) */ +++/* long long int __mips_syscall7 (long int arg1, long int arg2, long int arg3, +++ long int arg4, long int arg5, long int arg6, +++ long int arg7, +++ long int number) */ ++ ++ ENTRY(__mips_syscall7) ++ lw v0, 28(sp) ++diff --git a/sysdeps/unix/sysv/linux/mips/mips32/mips16/mips16-syscall.h b/sysdeps/unix/sysv/linux/mips/mips32/mips16/mips16-syscall.h ++index 9bf551ace8..f23ede0259 100644 ++--- a/sysdeps/unix/sysv/linux/mips/mips32/mips16/mips16-syscall.h +++++ b/sysdeps/unix/sysv/linux/mips/mips32/mips16/mips16-syscall.h ++@@ -19,51 +19,57 @@ ++ #ifndef MIPS16_SYSCALL_H ++ #define MIPS16_SYSCALL_H 1 ++ ++-long long __nomips16 __mips16_syscall0 (long number); +++long long int __nomips16 __mips16_syscall0 (long int number); ++ #define __mips16_syscall0(dummy, number) \ ++- __mips16_syscall0 ((long) (number)) +++ __mips16_syscall0 ((long int) (number)) ++ ++-long long __nomips16 __mips16_syscall1 (long a0, ++- long number); +++long long int __nomips16 __mips16_syscall1 (long int a0, +++ long int number); ++ #define __mips16_syscall1(a0, number) \ ++- __mips16_syscall1 ((long) (a0), \ ++- (long) (number)) +++ __mips16_syscall1 ((long int) (a0), \ +++ (long int) (number)) ++ ++-long long __nomips16 __mips16_syscall2 (long a0, long a1, ++- long number); +++long long int __nomips16 __mips16_syscall2 (long int a0, long int a1, +++ long int number); ++ #define __mips16_syscall2(a0, a1, number) \ ++- __mips16_syscall2 ((long) (a0), (long) (a1), \ ++- (long) (number)) +++ __mips16_syscall2 ((long int) (a0), (long int) (a1), \ +++ (long int) (number)) ++ ++-long long __nomips16 __mips16_syscall3 (long a0, long a1, long a2, ++- long number); +++long long int __nomips16 __mips16_syscall3 (long int a0, long int a1, +++ long int a2, +++ long int number); ++ #define __mips16_syscall3(a0, a1, a2, number) \ ++- __mips16_syscall3 ((long) (a0), (long) (a1), (long) (a2), \ ++- (long) (number)) +++ __mips16_syscall3 ((long int) (a0), (long int) (a1), \ +++ (long int) (a2), \ +++ (long int) (number)) ++ ++-long long __nomips16 __mips16_syscall4 (long a0, long a1, long a2, long a3, ++- long number); +++long long int __nomips16 __mips16_syscall4 (long int a0, long int a1, +++ long int a2, long int a3, +++ long int number); ++ #define __mips16_syscall4(a0, a1, a2, a3, number) \ ++- __mips16_syscall4 ((long) (a0), (long) (a1), (long) (a2), \ ++- (long) (a3), \ ++- (long) (number)) +++ __mips16_syscall4 ((long int) (a0), (long int) (a1), \ +++ (long int) (a2), (long int) (a3), \ +++ (long int) (number)) ++ ++ /* The remaining ones use regular MIPS wrappers. */ ++ ++ #define __mips16_syscall5(a0, a1, a2, a3, a4, number) \ ++- __mips_syscall5 ((long) (a0), (long) (a1), (long) (a2), \ ++- (long) (a3), (long) (a4), \ ++- (long) (number)) +++ __mips_syscall5 ((long int) (a0), (long int) (a1), \ +++ (long int) (a2), (long int) (a3), \ +++ (long int) (a4), \ +++ (long int) (number)) ++ ++ #define __mips16_syscall6(a0, a1, a2, a3, a4, a5, number) \ ++- __mips_syscall6 ((long) (a0), (long) (a1), (long) (a2), \ ++- (long) (a3), (long) (a4), (long) (a5), \ ++- (long) (number)) +++ __mips_syscall6 ((long int) (a0), (long int) (a1), \ +++ (long int) (a2), (long int) (a3), \ +++ (long int) (a4), (long int) (a5), \ +++ (long int) (number)) ++ ++ #define __mips16_syscall7(a0, a1, a2, a3, a4, a5, a6, number) \ ++- __mips_syscall7 ((long) (a0), (long) (a1), (long) (a2), \ ++- (long) (a3), (long) (a4), (long) (a5), \ ++- (long) (a6), \ ++- (long) (number)) +++ __mips_syscall7 ((long int) (a0), (long int) (a1), \ +++ (long int) (a2), (long int) (a3), \ +++ (long int) (a4), (long int) (a5), \ +++ (long int) (a6), \ +++ (long int) (number)) ++ ++ #endif ++diff --git a/sysdeps/unix/sysv/linux/mips/mips32/mips16/mips16-syscall0.c b/sysdeps/unix/sysv/linux/mips/mips32/mips16/mips16-syscall0.c ++index 92f16e2724..43c05f8050 100644 ++--- a/sysdeps/unix/sysv/linux/mips/mips32/mips16/mips16-syscall0.c +++++ b/sysdeps/unix/sysv/linux/mips/mips32/mips16/mips16-syscall0.c ++@@ -20,8 +20,8 @@ ++ ++ #undef __mips16_syscall0 ++ ++-long long __nomips16 ++-__mips16_syscall0 (long number) +++long long int __nomips16 +++__mips16_syscall0 (long int number) ++ { ++ union __mips_syscall_return ret; ++ ret.reg.v0 = INTERNAL_SYSCALL_MIPS16 (number, ret.reg.v1, 0); ++diff --git a/sysdeps/unix/sysv/linux/mips/mips32/mips16/mips16-syscall1.c b/sysdeps/unix/sysv/linux/mips/mips32/mips16/mips16-syscall1.c ++index fa985a96e5..16a567e834 100644 ++--- a/sysdeps/unix/sysv/linux/mips/mips32/mips16/mips16-syscall1.c +++++ b/sysdeps/unix/sysv/linux/mips/mips32/mips16/mips16-syscall1.c ++@@ -20,9 +20,9 @@ ++ ++ #undef __mips16_syscall1 ++ ++-long long __nomips16 ++-__mips16_syscall1 (long a0, ++- long number) +++long long int __nomips16 +++__mips16_syscall1 (long int a0, +++ long int number) ++ { ++ union __mips_syscall_return ret; ++ ret.reg.v0 = INTERNAL_SYSCALL_MIPS16 (number, ret.reg.v1, 1, ++diff --git a/sysdeps/unix/sysv/linux/mips/mips32/mips16/mips16-syscall2.c b/sysdeps/unix/sysv/linux/mips/mips32/mips16/mips16-syscall2.c ++index f042ac815d..c0a856c344 100644 ++--- a/sysdeps/unix/sysv/linux/mips/mips32/mips16/mips16-syscall2.c +++++ b/sysdeps/unix/sysv/linux/mips/mips32/mips16/mips16-syscall2.c ++@@ -20,9 +20,9 @@ ++ ++ #undef __mips16_syscall2 ++ ++-long long __nomips16 ++-__mips16_syscall2 (long a0, long a1, ++- long number) +++long long int __nomips16 +++__mips16_syscall2 (long int a0, long int a1, +++ long int number) ++ { ++ union __mips_syscall_return ret; ++ ret.reg.v0 = INTERNAL_SYSCALL_MIPS16 (number, ret.reg.v1, 2, ++diff --git a/sysdeps/unix/sysv/linux/mips/mips32/mips16/mips16-syscall3.c b/sysdeps/unix/sysv/linux/mips/mips32/mips16/mips16-syscall3.c ++index dfe2f7feb5..042768ebf2 100644 ++--- a/sysdeps/unix/sysv/linux/mips/mips32/mips16/mips16-syscall3.c +++++ b/sysdeps/unix/sysv/linux/mips/mips32/mips16/mips16-syscall3.c ++@@ -20,9 +20,9 @@ ++ ++ #undef __mips16_syscall3 ++ ++-long long __nomips16 ++-__mips16_syscall3 (long a0, long a1, long a2, ++- long number) +++long long int __nomips16 +++__mips16_syscall3 (long int a0, long int a1, long int a2, +++ long int number) ++ { ++ union __mips_syscall_return ret; ++ ret.reg.v0 = INTERNAL_SYSCALL_MIPS16 (number, ret.reg.v1, 3, ++diff --git a/sysdeps/unix/sysv/linux/mips/mips32/mips16/mips16-syscall4.c b/sysdeps/unix/sysv/linux/mips/mips32/mips16/mips16-syscall4.c ++index 39de510357..8658d822ab 100644 ++--- a/sysdeps/unix/sysv/linux/mips/mips32/mips16/mips16-syscall4.c +++++ b/sysdeps/unix/sysv/linux/mips/mips32/mips16/mips16-syscall4.c ++@@ -20,9 +20,9 @@ ++ ++ #undef __mips16_syscall4 ++ ++-long long __nomips16 ++-__mips16_syscall4 (long a0, long a1, long a2, long a3, ++- long number) +++long long int __nomips16 +++__mips16_syscall4 (long int a0, long int a1, long int a2, long int a3, +++ long int number) ++ { ++ union __mips_syscall_return ret; ++ ret.reg.v0 = INTERNAL_SYSCALL_MIPS16 (number, ret.reg.v1, 4, ++diff --git a/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h ++index beefcf284b..0c6a83e9b3 100644 ++--- a/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h +++++ b/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h ++@@ -52,7 +52,7 @@ ++ #undef INLINE_SYSCALL ++ #define INLINE_SYSCALL(name, nr, args...) \ ++ ({ INTERNAL_SYSCALL_DECL (_sc_err); \ ++- long result_var = INTERNAL_SYSCALL (name, _sc_err, nr, args); \ +++ long int result_var = INTERNAL_SYSCALL (name, _sc_err, nr, args); \ ++ if ( INTERNAL_SYSCALL_ERROR_P (result_var, _sc_err) ) \ ++ { \ ++ __set_errno (INTERNAL_SYSCALL_ERRNO (result_var, _sc_err)); \ ++@@ -61,10 +61,10 @@ ++ result_var; }) ++ ++ #undef INTERNAL_SYSCALL_DECL ++-#define INTERNAL_SYSCALL_DECL(err) long err __attribute__ ((unused)) +++#define INTERNAL_SYSCALL_DECL(err) long int err __attribute__ ((unused)) ++ ++ #undef INTERNAL_SYSCALL_ERROR_P ++-#define INTERNAL_SYSCALL_ERROR_P(val, err) ((void) (val), (long) (err)) +++#define INTERNAL_SYSCALL_ERROR_P(val, err) ((void) (val), (long int) (err)) ++ ++ #undef INTERNAL_SYSCALL_ERRNO ++ #define INTERNAL_SYSCALL_ERRNO(val, err) ((void) (err), val) ++@@ -103,11 +103,11 @@ ++ ++ union __mips_syscall_return ++ { ++- long long val; +++ long long int val; ++ struct ++ { ++- long v0; ++- long v1; +++ long int v0; +++ long int v1; ++ } ++ reg; ++ }; ++@@ -152,13 +152,13 @@ union __mips_syscall_return ++ ++ #define internal_syscall0(v0_init, input, number, err, dummy...) \ ++ ({ \ ++- long _sys_result; \ +++ long int _sys_result; \ ++ \ ++ { \ ++- register long __s0 asm ("$16") __attribute__ ((unused)) \ +++ register long int __s0 asm ("$16") __attribute__ ((unused)) \ ++ = (number); \ ++- register long __v0 asm ("$2"); \ ++- register long __a3 asm ("$7"); \ +++ register long int __v0 asm ("$2"); \ +++ register long int __a3 asm ("$7"); \ ++ __asm__ volatile ( \ ++ ".set\tnoreorder\n\t" \ ++ v0_init \ ++@@ -175,14 +175,15 @@ union __mips_syscall_return ++ ++ #define internal_syscall1(v0_init, input, number, err, arg1) \ ++ ({ \ ++- long _sys_result; \ +++ long int _sys_result; \ ++ \ ++ { \ ++- register long __s0 asm ("$16") __attribute__ ((unused)) \ +++ long int _arg1 = (long int) (arg1); \ +++ register long int __s0 asm ("$16") __attribute__ ((unused)) \ ++ = (number); \ ++- register long __v0 asm ("$2"); \ ++- register long __a0 asm ("$4") = (long) (arg1); \ ++- register long __a3 asm ("$7"); \ +++ register long int __v0 asm ("$2"); \ +++ register long int __a0 asm ("$4") = _arg1; \ +++ register long int __a3 asm ("$7"); \ ++ __asm__ volatile ( \ ++ ".set\tnoreorder\n\t" \ ++ v0_init \ ++@@ -199,15 +200,17 @@ union __mips_syscall_return ++ ++ #define internal_syscall2(v0_init, input, number, err, arg1, arg2) \ ++ ({ \ ++- long _sys_result; \ +++ long int _sys_result; \ ++ \ ++ { \ ++- register long __s0 asm ("$16") __attribute__ ((unused)) \ +++ long int _arg1 = (long int) (arg1); \ +++ long int _arg2 = (long int) (arg2); \ +++ register long int __s0 asm ("$16") __attribute__ ((unused)) \ ++ = (number); \ ++- register long __v0 asm ("$2"); \ ++- register long __a0 asm ("$4") = (long) (arg1); \ ++- register long __a1 asm ("$5") = (long) (arg2); \ ++- register long __a3 asm ("$7"); \ +++ register long int __v0 asm ("$2"); \ +++ register long int __a0 asm ("$4") = _arg1; \ +++ register long int __a1 asm ("$5") = _arg2; \ +++ register long int __a3 asm ("$7"); \ ++ __asm__ volatile ( \ ++ ".set\tnoreorder\n\t" \ ++ v0_init \ ++@@ -225,16 +228,19 @@ union __mips_syscall_return ++ #define internal_syscall3(v0_init, input, number, err, \ ++ arg1, arg2, arg3) \ ++ ({ \ ++- long _sys_result; \ +++ long int _sys_result; \ ++ \ ++ { \ ++- register long __s0 asm ("$16") __attribute__ ((unused)) \ +++ long int _arg1 = (long int) (arg1); \ +++ long int _arg2 = (long int) (arg2); \ +++ long int _arg3 = (long int) (arg3); \ +++ register long int __s0 asm ("$16") __attribute__ ((unused)) \ ++ = (number); \ ++- register long __v0 asm ("$2"); \ ++- register long __a0 asm ("$4") = (long) (arg1); \ ++- register long __a1 asm ("$5") = (long) (arg2); \ ++- register long __a2 asm ("$6") = (long) (arg3); \ ++- register long __a3 asm ("$7"); \ +++ register long int __v0 asm ("$2"); \ +++ register long int __a0 asm ("$4") = _arg1; \ +++ register long int __a1 asm ("$5") = _arg2; \ +++ register long int __a2 asm ("$6") = _arg3; \ +++ register long int __a3 asm ("$7"); \ ++ __asm__ volatile ( \ ++ ".set\tnoreorder\n\t" \ ++ v0_init \ ++@@ -252,16 +258,20 @@ union __mips_syscall_return ++ #define internal_syscall4(v0_init, input, number, err, \ ++ arg1, arg2, arg3, arg4) \ ++ ({ \ ++- long _sys_result; \ +++ long int _sys_result; \ ++ \ ++ { \ ++- register long __s0 asm ("$16") __attribute__ ((unused)) \ +++ long int _arg1 = (long int) (arg1); \ +++ long int _arg2 = (long int) (arg2); \ +++ long int _arg3 = (long int) (arg3); \ +++ long int _arg4 = (long int) (arg4); \ +++ register long int __s0 asm ("$16") __attribute__ ((unused)) \ ++ = (number); \ ++- register long __v0 asm ("$2"); \ ++- register long __a0 asm ("$4") = (long) (arg1); \ ++- register long __a1 asm ("$5") = (long) (arg2); \ ++- register long __a2 asm ("$6") = (long) (arg3); \ ++- register long __a3 asm ("$7") = (long) (arg4); \ +++ register long int __v0 asm ("$2"); \ +++ register long int __a0 asm ("$4") = _arg1; \ +++ register long int __a1 asm ("$5") = _arg2; \ +++ register long int __a2 asm ("$6") = _arg3; \ +++ register long int __a3 asm ("$7") = _arg4; \ ++ __asm__ volatile ( \ ++ ".set\tnoreorder\n\t" \ ++ v0_init \ ++@@ -285,63 +295,66 @@ union __mips_syscall_return ++ compiler specifics required for the stack arguments to be pushed, ++ which would be the case if these syscalls were inlined. */ ++ ++-long long __nomips16 __mips_syscall5 (long arg1, long arg2, long arg3, ++- long arg4, long arg5, ++- long number); +++long long int __nomips16 __mips_syscall5 (long int arg1, long int arg2, +++ long int arg3, long int arg4, +++ long int arg5, +++ long int number); ++ libc_hidden_proto (__mips_syscall5, nomips16) ++ ++ #define internal_syscall5(v0_init, input, number, err, \ ++ arg1, arg2, arg3, arg4, arg5) \ ++ ({ \ ++ union __mips_syscall_return _sc_ret; \ ++- _sc_ret.val = __mips_syscall5 ((long) (arg1), \ ++- (long) (arg2), \ ++- (long) (arg3), \ ++- (long) (arg4), \ ++- (long) (arg5), \ ++- (long) (number)); \ +++ _sc_ret.val = __mips_syscall5 ((long int) (arg1), \ +++ (long int) (arg2), \ +++ (long int) (arg3), \ +++ (long int) (arg4), \ +++ (long int) (arg5), \ +++ (long int) (number)); \ ++ err = _sc_ret.reg.v1; \ ++ _sc_ret.reg.v0; \ ++ }) ++ ++-long long __nomips16 __mips_syscall6 (long arg1, long arg2, long arg3, ++- long arg4, long arg5, long arg6, ++- long number); +++long long int __nomips16 __mips_syscall6 (long int arg1, long int arg2, +++ long int arg3, long int arg4, +++ long int arg5, long int arg6, +++ long int number); ++ libc_hidden_proto (__mips_syscall6, nomips16) ++ ++ #define internal_syscall6(v0_init, input, number, err, \ ++ arg1, arg2, arg3, arg4, arg5, arg6) \ ++ ({ \ ++ union __mips_syscall_return _sc_ret; \ ++- _sc_ret.val = __mips_syscall6 ((long) (arg1), \ ++- (long) (arg2), \ ++- (long) (arg3), \ ++- (long) (arg4), \ ++- (long) (arg5), \ ++- (long) (arg6), \ ++- (long) (number)); \ +++ _sc_ret.val = __mips_syscall6 ((long int) (arg1), \ +++ (long int) (arg2), \ +++ (long int) (arg3), \ +++ (long int) (arg4), \ +++ (long int) (arg5), \ +++ (long int) (arg6), \ +++ (long int) (number)); \ ++ err = _sc_ret.reg.v1; \ ++ _sc_ret.reg.v0; \ ++ }) ++ ++-long long __nomips16 __mips_syscall7 (long arg1, long arg2, long arg3, ++- long arg4, long arg5, long arg6, ++- long arg7, ++- long number); +++long long int __nomips16 __mips_syscall7 (long int arg1, long int arg2, +++ long int arg3, long int arg4, +++ long int arg5, long int arg6, +++ long int arg7, +++ long int number); ++ libc_hidden_proto (__mips_syscall7, nomips16) ++ ++ #define internal_syscall7(v0_init, input, number, err, \ ++ arg1, arg2, arg3, arg4, arg5, arg6, arg7) \ ++ ({ \ ++ union __mips_syscall_return _sc_ret; \ ++- _sc_ret.val = __mips_syscall7 ((long) (arg1), \ ++- (long) (arg2), \ ++- (long) (arg3), \ ++- (long) (arg4), \ ++- (long) (arg5), \ ++- (long) (arg6), \ ++- (long) (arg7), \ ++- (long) (number)); \ +++ _sc_ret.val = __mips_syscall7 ((long int) (arg1), \ +++ (long int) (arg2), \ +++ (long int) (arg3), \ +++ (long int) (arg4), \ +++ (long int) (arg5), \ +++ (long int) (arg6), \ +++ (long int) (arg7), \ +++ (long int) (number)); \ ++ err = _sc_ret.reg.v1; \ ++ _sc_ret.reg.v0; \ ++ }) ++diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h ++index f96636538a..4a9d7054f9 100644 ++--- a/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h +++++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h ++@@ -47,14 +47,14 @@ ++ ++ /* Convert X to a long long, without losing any bits if it is one ++ already or warning if it is a 32-bit pointer. */ ++-#define ARGIFY(X) ((long long) (__typeof__ ((X) - (X))) (X)) +++#define ARGIFY(X) ((long long int) (__typeof__ ((X) - (X))) (X)) ++ ++ /* Define a macro which expands into the inline wrapper code for a system ++ call. */ ++ #undef INLINE_SYSCALL ++ #define INLINE_SYSCALL(name, nr, args...) \ ++ ({ INTERNAL_SYSCALL_DECL (_sc_err); \ ++- long result_var = INTERNAL_SYSCALL (name, _sc_err, nr, args); \ +++ long int result_var = INTERNAL_SYSCALL (name, _sc_err, nr, args); \ ++ if ( INTERNAL_SYSCALL_ERROR_P (result_var, _sc_err) ) \ ++ { \ ++ __set_errno (INTERNAL_SYSCALL_ERRNO (result_var, _sc_err)); \ ++@@ -63,10 +63,10 @@ ++ result_var; }) ++ ++ #undef INTERNAL_SYSCALL_DECL ++-#define INTERNAL_SYSCALL_DECL(err) long err __attribute__ ((unused)) +++#define INTERNAL_SYSCALL_DECL(err) long int err __attribute__ ((unused)) ++ ++ #undef INTERNAL_SYSCALL_ERROR_P ++-#define INTERNAL_SYSCALL_ERROR_P(val, err) ((void) (val), (long) (err)) +++#define INTERNAL_SYSCALL_ERROR_P(val, err) ((void) (val), (long int) (err)) ++ ++ #undef INTERNAL_SYSCALL_ERRNO ++ #define INTERNAL_SYSCALL_ERRNO(val, err) ((void) (err), val) ++@@ -112,13 +112,13 @@ ++ ++ #define internal_syscall0(v0_init, input, number, err, dummy...) \ ++ ({ \ ++- long _sys_result; \ +++ long int _sys_result; \ ++ \ ++ { \ ++- register long long __s0 asm ("$16") __attribute__ ((unused)) \ +++ register long long int __s0 asm ("$16") __attribute__ ((unused))\ ++ = (number); \ ++- register long long __v0 asm ("$2"); \ ++- register long long __a3 asm ("$7"); \ +++ register long long int __v0 asm ("$2"); \ +++ register long long int __a3 asm ("$7"); \ ++ __asm__ volatile ( \ ++ ".set\tnoreorder\n\t" \ ++ v0_init \ ++@@ -135,14 +135,15 @@ ++ ++ #define internal_syscall1(v0_init, input, number, err, arg1) \ ++ ({ \ ++- long _sys_result; \ +++ long int _sys_result; \ ++ \ ++ { \ ++- register long long __s0 asm ("$16") __attribute__ ((unused)) \ +++ long long int _arg1 = ARGIFY (arg1); \ +++ register long long int __s0 asm ("$16") __attribute__ ((unused))\ ++ = (number); \ ++- register long long __v0 asm ("$2"); \ ++- register long long __a0 asm ("$4") = ARGIFY (arg1); \ ++- register long long __a3 asm ("$7"); \ +++ register long long int __v0 asm ("$2"); \ +++ register long long int __a0 asm ("$4") = _arg1; \ +++ register long long int __a3 asm ("$7"); \ ++ __asm__ volatile ( \ ++ ".set\tnoreorder\n\t" \ ++ v0_init \ ++@@ -159,15 +160,17 @@ ++ ++ #define internal_syscall2(v0_init, input, number, err, arg1, arg2) \ ++ ({ \ ++- long _sys_result; \ +++ long int _sys_result; \ ++ \ ++ { \ ++- register long long __s0 asm ("$16") __attribute__ ((unused)) \ +++ long long int _arg1 = ARGIFY (arg1); \ +++ long long int _arg2 = ARGIFY (arg2); \ +++ register long long int __s0 asm ("$16") __attribute__ ((unused))\ ++ = (number); \ ++- register long long __v0 asm ("$2"); \ ++- register long long __a0 asm ("$4") = ARGIFY (arg1); \ ++- register long long __a1 asm ("$5") = ARGIFY (arg2); \ ++- register long long __a3 asm ("$7"); \ +++ register long long int __v0 asm ("$2"); \ +++ register long long int __a0 asm ("$4") = _arg1; \ +++ register long long int __a1 asm ("$5") = _arg2; \ +++ register long long int __a3 asm ("$7"); \ ++ __asm__ volatile ( \ ++ ".set\tnoreorder\n\t" \ ++ v0_init \ ++@@ -185,16 +188,19 @@ ++ #define internal_syscall3(v0_init, input, number, err, \ ++ arg1, arg2, arg3) \ ++ ({ \ ++- long _sys_result; \ +++ long int _sys_result; \ ++ \ ++ { \ ++- register long long __s0 asm ("$16") __attribute__ ((unused)) \ +++ long long int _arg1 = ARGIFY (arg1); \ +++ long long int _arg2 = ARGIFY (arg2); \ +++ long long int _arg3 = ARGIFY (arg3); \ +++ register long long int __s0 asm ("$16") __attribute__ ((unused))\ ++ = (number); \ ++- register long long __v0 asm ("$2"); \ ++- register long long __a0 asm ("$4") = ARGIFY (arg1); \ ++- register long long __a1 asm ("$5") = ARGIFY (arg2); \ ++- register long long __a2 asm ("$6") = ARGIFY (arg3); \ ++- register long long __a3 asm ("$7"); \ +++ register long long int __v0 asm ("$2"); \ +++ register long long int __a0 asm ("$4") = _arg1; \ +++ register long long int __a1 asm ("$5") = _arg2; \ +++ register long long int __a2 asm ("$6") = _arg3; \ +++ register long long int __a3 asm ("$7"); \ ++ __asm__ volatile ( \ ++ ".set\tnoreorder\n\t" \ ++ v0_init \ ++@@ -212,16 +218,20 @@ ++ #define internal_syscall4(v0_init, input, number, err, \ ++ arg1, arg2, arg3, arg4) \ ++ ({ \ ++- long _sys_result; \ +++ long int _sys_result; \ ++ \ ++ { \ ++- register long long __s0 asm ("$16") __attribute__ ((unused)) \ +++ long long int _arg1 = ARGIFY (arg1); \ +++ long long int _arg2 = ARGIFY (arg2); \ +++ long long int _arg3 = ARGIFY (arg3); \ +++ long long int _arg4 = ARGIFY (arg4); \ +++ register long long int __s0 asm ("$16") __attribute__ ((unused))\ ++ = (number); \ ++- register long long __v0 asm ("$2"); \ ++- register long long __a0 asm ("$4") = ARGIFY (arg1); \ ++- register long long __a1 asm ("$5") = ARGIFY (arg2); \ ++- register long long __a2 asm ("$6") = ARGIFY (arg3); \ ++- register long long __a3 asm ("$7") = ARGIFY (arg4); \ +++ register long long int __v0 asm ("$2"); \ +++ register long long int __a0 asm ("$4") = _arg1; \ +++ register long long int __a1 asm ("$5") = _arg2; \ +++ register long long int __a2 asm ("$6") = _arg3; \ +++ register long long int __a3 asm ("$7") = _arg4; \ ++ __asm__ volatile ( \ ++ ".set\tnoreorder\n\t" \ ++ v0_init \ ++@@ -239,17 +249,22 @@ ++ #define internal_syscall5(v0_init, input, number, err, \ ++ arg1, arg2, arg3, arg4, arg5) \ ++ ({ \ ++- long _sys_result; \ +++ long int _sys_result; \ ++ \ ++ { \ ++- register long long __s0 asm ("$16") __attribute__ ((unused)) \ +++ long long int _arg1 = ARGIFY (arg1); \ +++ long long int _arg2 = ARGIFY (arg2); \ +++ long long int _arg3 = ARGIFY (arg3); \ +++ long long int _arg4 = ARGIFY (arg4); \ +++ long long int _arg5 = ARGIFY (arg5); \ +++ register long long int __s0 asm ("$16") __attribute__ ((unused))\ ++ = (number); \ ++- register long long __v0 asm ("$2"); \ ++- register long long __a0 asm ("$4") = ARGIFY (arg1); \ ++- register long long __a1 asm ("$5") = ARGIFY (arg2); \ ++- register long long __a2 asm ("$6") = ARGIFY (arg3); \ ++- register long long __a3 asm ("$7") = ARGIFY (arg4); \ ++- register long long __a4 asm ("$8") = ARGIFY (arg5); \ +++ register long long int __v0 asm ("$2"); \ +++ register long long int __a0 asm ("$4") = _arg1; \ +++ register long long int __a1 asm ("$5") = _arg2; \ +++ register long long int __a2 asm ("$6") = _arg3; \ +++ register long long int __a3 asm ("$7") = _arg4; \ +++ register long long int __a4 asm ("$8") = _arg5; \ ++ __asm__ volatile ( \ ++ ".set\tnoreorder\n\t" \ ++ v0_init \ ++@@ -267,18 +282,24 @@ ++ #define internal_syscall6(v0_init, input, number, err, \ ++ arg1, arg2, arg3, arg4, arg5, arg6) \ ++ ({ \ ++- long _sys_result; \ +++ long int _sys_result; \ ++ \ ++ { \ ++- register long long __s0 asm ("$16") __attribute__ ((unused)) \ +++ long long int _arg1 = ARGIFY (arg1); \ +++ long long int _arg2 = ARGIFY (arg2); \ +++ long long int _arg3 = ARGIFY (arg3); \ +++ long long int _arg4 = ARGIFY (arg4); \ +++ long long int _arg5 = ARGIFY (arg5); \ +++ long long int _arg6 = ARGIFY (arg6); \ +++ register long long int __s0 asm ("$16") __attribute__ ((unused))\ ++ = (number); \ ++- register long long __v0 asm ("$2"); \ ++- register long long __a0 asm ("$4") = ARGIFY (arg1); \ ++- register long long __a1 asm ("$5") = ARGIFY (arg2); \ ++- register long long __a2 asm ("$6") = ARGIFY (arg3); \ ++- register long long __a3 asm ("$7") = ARGIFY (arg4); \ ++- register long long __a4 asm ("$8") = ARGIFY (arg5); \ ++- register long long __a5 asm ("$9") = ARGIFY (arg6); \ +++ register long long int __v0 asm ("$2"); \ +++ register long long int __a0 asm ("$4") = _arg1; \ +++ register long long int __a1 asm ("$5") = _arg2; \ +++ register long long int __a2 asm ("$6") = _arg3; \ +++ register long long int __a3 asm ("$7") = _arg4; \ +++ register long long int __a4 asm ("$8") = _arg5; \ +++ register long long int __a5 asm ("$9") = _arg6; \ ++ __asm__ volatile ( \ ++ ".set\tnoreorder\n\t" \ ++ v0_init \ ++diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h ++index 9d30291f84..3e1f1cc3c5 100644 ++--- a/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h +++++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h ++@@ -50,7 +50,7 @@ ++ #undef INLINE_SYSCALL ++ #define INLINE_SYSCALL(name, nr, args...) \ ++ ({ INTERNAL_SYSCALL_DECL (_sc_err); \ ++- long result_var = INTERNAL_SYSCALL (name, _sc_err, nr, args); \ +++ long int result_var = INTERNAL_SYSCALL (name, _sc_err, nr, args); \ ++ if ( INTERNAL_SYSCALL_ERROR_P (result_var, _sc_err) ) \ ++ { \ ++ __set_errno (INTERNAL_SYSCALL_ERRNO (result_var, _sc_err)); \ ++@@ -59,10 +59,10 @@ ++ result_var; }) ++ ++ #undef INTERNAL_SYSCALL_DECL ++-#define INTERNAL_SYSCALL_DECL(err) long err __attribute__ ((unused)) +++#define INTERNAL_SYSCALL_DECL(err) long int err __attribute__ ((unused)) ++ ++ #undef INTERNAL_SYSCALL_ERROR_P ++-#define INTERNAL_SYSCALL_ERROR_P(val, err) ((void) (val), (long) (err)) +++#define INTERNAL_SYSCALL_ERROR_P(val, err) ((void) (val), (long int) (err)) ++ ++ #undef INTERNAL_SYSCALL_ERRNO ++ #define INTERNAL_SYSCALL_ERRNO(val, err) ((void) (err), val) ++@@ -108,13 +108,13 @@ ++ ++ #define internal_syscall0(v0_init, input, number, err, dummy...) \ ++ ({ \ ++- long _sys_result; \ +++ long int _sys_result; \ ++ \ ++ { \ ++- register long __s0 asm ("$16") __attribute__ ((unused)) \ +++ register long int __s0 asm ("$16") __attribute__ ((unused)) \ ++ = (number); \ ++- register long __v0 asm ("$2"); \ ++- register long __a3 asm ("$7"); \ +++ register long int __v0 asm ("$2"); \ +++ register long int __a3 asm ("$7"); \ ++ __asm__ volatile ( \ ++ ".set\tnoreorder\n\t" \ ++ v0_init \ ++@@ -131,14 +131,15 @@ ++ ++ #define internal_syscall1(v0_init, input, number, err, arg1) \ ++ ({ \ ++- long _sys_result; \ +++ long int _sys_result; \ ++ \ ++ { \ ++- register long __s0 asm ("$16") __attribute__ ((unused)) \ +++ long int _arg1 = (long int) (arg1); \ +++ register long int __s0 asm ("$16") __attribute__ ((unused)) \ ++ = (number); \ ++- register long __v0 asm ("$2"); \ ++- register long __a0 asm ("$4") = (long) (arg1); \ ++- register long __a3 asm ("$7"); \ +++ register long int __v0 asm ("$2"); \ +++ register long int __a0 asm ("$4") = _arg1; \ +++ register long int __a3 asm ("$7"); \ ++ __asm__ volatile ( \ ++ ".set\tnoreorder\n\t" \ ++ v0_init \ ++@@ -155,15 +156,17 @@ ++ ++ #define internal_syscall2(v0_init, input, number, err, arg1, arg2) \ ++ ({ \ ++- long _sys_result; \ +++ long int _sys_result; \ ++ \ ++ { \ ++- register long __s0 asm ("$16") __attribute__ ((unused)) \ +++ long int _arg1 = (long int) (arg1); \ +++ long int _arg2 = (long int) (arg2); \ +++ register long int __s0 asm ("$16") __attribute__ ((unused)) \ ++ = (number); \ ++- register long __v0 asm ("$2"); \ ++- register long __a0 asm ("$4") = (long) (arg1); \ ++- register long __a1 asm ("$5") = (long) (arg2); \ ++- register long __a3 asm ("$7"); \ +++ register long int __v0 asm ("$2"); \ +++ register long int __a0 asm ("$4") = _arg1; \ +++ register long int __a1 asm ("$5") = _arg2; \ +++ register long int __a3 asm ("$7"); \ ++ __asm__ volatile ( \ ++ ".set\tnoreorder\n\t" \ ++ v0_init \ ++@@ -181,16 +184,19 @@ ++ #define internal_syscall3(v0_init, input, number, err, \ ++ arg1, arg2, arg3) \ ++ ({ \ ++- long _sys_result; \ +++ long int _sys_result; \ ++ \ ++ { \ ++- register long __s0 asm ("$16") __attribute__ ((unused)) \ +++ long int _arg1 = (long int) (arg1); \ +++ long int _arg2 = (long int) (arg2); \ +++ long int _arg3 = (long int) (arg3); \ +++ register long int __s0 asm ("$16") __attribute__ ((unused)) \ ++ = (number); \ ++- register long __v0 asm ("$2"); \ ++- register long __a0 asm ("$4") = (long) (arg1); \ ++- register long __a1 asm ("$5") = (long) (arg2); \ ++- register long __a2 asm ("$6") = (long) (arg3); \ ++- register long __a3 asm ("$7"); \ +++ register long int __v0 asm ("$2"); \ +++ register long int __a0 asm ("$4") = _arg1; \ +++ register long int __a1 asm ("$5") = _arg2; \ +++ register long int __a2 asm ("$6") = _arg3; \ +++ register long int __a3 asm ("$7"); \ ++ __asm__ volatile ( \ ++ ".set\tnoreorder\n\t" \ ++ v0_init \ ++@@ -208,16 +214,20 @@ ++ #define internal_syscall4(v0_init, input, number, err, \ ++ arg1, arg2, arg3, arg4) \ ++ ({ \ ++- long _sys_result; \ +++ long int _sys_result; \ ++ \ ++ { \ ++- register long __s0 asm ("$16") __attribute__ ((unused)) \ +++ long int _arg1 = (long int) (arg1); \ +++ long int _arg2 = (long int) (arg2); \ +++ long int _arg3 = (long int) (arg3); \ +++ long int _arg4 = (long int) (arg4); \ +++ register long int __s0 asm ("$16") __attribute__ ((unused)) \ ++ = (number); \ ++- register long __v0 asm ("$2"); \ ++- register long __a0 asm ("$4") = (long) (arg1); \ ++- register long __a1 asm ("$5") = (long) (arg2); \ ++- register long __a2 asm ("$6") = (long) (arg3); \ ++- register long __a3 asm ("$7") = (long) (arg4); \ +++ register long int __v0 asm ("$2"); \ +++ register long int __a0 asm ("$4") = _arg1; \ +++ register long int __a1 asm ("$5") = _arg2; \ +++ register long int __a2 asm ("$6") = _arg3; \ +++ register long int __a3 asm ("$7") = _arg4; \ ++ __asm__ volatile ( \ ++ ".set\tnoreorder\n\t" \ ++ v0_init \ ++@@ -235,17 +245,22 @@ ++ #define internal_syscall5(v0_init, input, number, err, \ ++ arg1, arg2, arg3, arg4, arg5) \ ++ ({ \ ++- long _sys_result; \ +++ long int _sys_result; \ ++ \ ++ { \ ++- register long __s0 asm ("$16") __attribute__ ((unused)) \ +++ long int _arg1 = (long int) (arg1); \ +++ long int _arg2 = (long int) (arg2); \ +++ long int _arg3 = (long int) (arg3); \ +++ long int _arg4 = (long int) (arg4); \ +++ long int _arg5 = (long int) (arg5); \ +++ register long int __s0 asm ("$16") __attribute__ ((unused)) \ ++ = (number); \ ++- register long __v0 asm ("$2"); \ ++- register long __a0 asm ("$4") = (long) (arg1); \ ++- register long __a1 asm ("$5") = (long) (arg2); \ ++- register long __a2 asm ("$6") = (long) (arg3); \ ++- register long __a3 asm ("$7") = (long) (arg4); \ ++- register long __a4 asm ("$8") = (long) (arg5); \ +++ register long int __v0 asm ("$2"); \ +++ register long int __a0 asm ("$4") = _arg1; \ +++ register long int __a1 asm ("$5") = _arg2; \ +++ register long int __a2 asm ("$6") = _arg3; \ +++ register long int __a3 asm ("$7") = _arg4; \ +++ register long int __a4 asm ("$8") = _arg5; \ ++ __asm__ volatile ( \ ++ ".set\tnoreorder\n\t" \ ++ v0_init \ ++@@ -263,18 +278,24 @@ ++ #define internal_syscall6(v0_init, input, number, err, \ ++ arg1, arg2, arg3, arg4, arg5, arg6) \ ++ ({ \ ++- long _sys_result; \ +++ long int _sys_result; \ ++ \ ++ { \ ++- register long __s0 asm ("$16") __attribute__ ((unused)) \ +++ long int _arg1 = (long int) (arg1); \ +++ long int _arg2 = (long int) (arg2); \ +++ long int _arg3 = (long int) (arg3); \ +++ long int _arg4 = (long int) (arg4); \ +++ long int _arg5 = (long int) (arg5); \ +++ long int _arg6 = (long int) (arg6); \ +++ register long int __s0 asm ("$16") __attribute__ ((unused)) \ ++ = (number); \ ++- register long __v0 asm ("$2"); \ ++- register long __a0 asm ("$4") = (long) (arg1); \ ++- register long __a1 asm ("$5") = (long) (arg2); \ ++- register long __a2 asm ("$6") = (long) (arg3); \ ++- register long __a3 asm ("$7") = (long) (arg4); \ ++- register long __a4 asm ("$8") = (long) (arg5); \ ++- register long __a5 asm ("$9") = (long) (arg6); \ +++ register long int __v0 asm ("$2"); \ +++ register long int __a0 asm ("$4") = _arg1; \ +++ register long int __a1 asm ("$5") = _arg2; \ +++ register long int __a2 asm ("$6") = _arg3; \ +++ register long int __a3 asm ("$7") = _arg4; \ +++ register long int __a4 asm ("$8") = _arg5; \ +++ register long int __a5 asm ("$9") = _arg6; \ ++ __asm__ volatile ( \ ++ ".set\tnoreorder\n\t" \ ++ v0_init \ ++diff --git a/sysdeps/unix/sysv/linux/mips/mips64/syscall.S b/sysdeps/unix/sysv/linux/mips/mips64/syscall.S ++index 26adf2cd04..a9baff3c17 100644 ++--- a/sysdeps/unix/sysv/linux/mips/mips64/syscall.S +++++ b/sysdeps/unix/sysv/linux/mips/mips64/syscall.S ++@@ -20,7 +20,7 @@ ++ #include ++ ++ /* Usage: ++- long syscall (syscall_number, arg1, arg2, arg3, arg4, arg5, arg6, arg7) +++ long int syscall (syscall_number, arg1, arg2, arg3, arg4, arg5, arg6, arg7) ++ ++ We need to do some arg shifting, syscall_number will be in v0. */ ++ ++diff --git a/sysdeps/unix/sysv/linux/mips/sysdep.h b/sysdeps/unix/sysv/linux/mips/sysdep.h ++index cdfc0b1b58..a4cf1540fe 100644 ++--- a/sysdeps/unix/sysv/linux/mips/sysdep.h +++++ b/sysdeps/unix/sysv/linux/mips/sysdep.h ++@@ -36,8 +36,8 @@ ++ the INTERNAL_SYSCALL_{ERROR_P,ERRNO} macros work correctly. */ ++ #define INTERNAL_VSYSCALL_CALL(funcptr, err, nr, args...) \ ++ ({ \ ++- long _ret = funcptr (args); \ ++- err = ((unsigned long) (_ret) >= (unsigned long) -4095L); \ +++ long int _ret = funcptr (args); \ +++ err = ((unsigned long int) (_ret) >= (unsigned long int) -4095L); \ ++ if (err) \ ++ _ret = -_ret; \ ++ _ret; \ ++diff --git a/sysdeps/unix/sysv/linux/mips/unwind-arch.h b/sysdeps/unix/sysv/linux/mips/unwind-arch.h ++new file mode 100644 ++index 0000000000..a009899983 ++--- /dev/null +++++ b/sysdeps/unix/sysv/linux/mips/unwind-arch.h ++@@ -0,0 +1,67 @@ +++/* Return backtrace of current program state. Arch-specific bits. +++ Copyright (C) 2020 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 +++ . */ +++ +++#ifndef _UNWIND_ARCH_H +++#define _UNWIND_ARCH_H +++ +++#include +++ +++/* MIPS fallback code handle a frame where its FDE can not be obtained +++ (for instance a signal frame) by reading the kernel allocated signal frame +++ and adding '2' to the value of 'sc_pc' [1]. The added value is used to +++ recognize an end of an EH region on mips16 [2]. +++ +++ The idea here is to adjust the obtained signal frame ADDR value and remove +++ the libgcc added value by checking if the previous frame is a signal frame +++ one. +++ +++ [1] libgcc/config/mips/linux-unwind.h from gcc code. +++ [2] gcc/config/mips/mips.h from gcc code. */ +++ +++static inline void * +++unwind_arch_adjustment (void *prev, void *addr) +++{ +++ uint32_t *pc = (uint32_t *) prev; +++ +++ if (pc == NULL) +++ return addr; +++ +++ /* For MIPS16 or microMIPS frame libgcc makes no adjustment. */ +++ if ((uintptr_t) pc & 0x3) +++ return addr; +++ +++ /* The vDSO containes either +++ +++ 24021061 li v0, 0x1061 (rt_sigreturn) +++ 0000000c syscall +++ or +++ 24021017 li v0, 0x1017 (sigreturn) +++ 0000000c syscall */ +++ if (pc[1] != 0x0000000c) +++ return addr; +++#if _MIPS_SIM == _ABIO32 +++ if (pc[0] == (0x24020000 | __NR_sigreturn)) +++ return (void *) ((uintptr_t) addr - 2); +++#endif +++ if (pc[0] == (0x24020000 | __NR_rt_sigreturn)) +++ return (void *) ((uintptr_t) addr - 2); +++ +++ return addr; +++} +++ +++#endif ++diff --git a/sysdeps/unix/sysv/linux/msgctl.c b/sysdeps/unix/sysv/linux/msgctl.c ++index 27879e76cd..fd46aec1a0 100644 ++--- a/sysdeps/unix/sysv/linux/msgctl.c +++++ b/sysdeps/unix/sysv/linux/msgctl.c ++@@ -21,6 +21,7 @@ ++ #include ++ #include ++ #include +++#include /* For __kernel_mode_t. */ ++ ++ #ifndef DEFAULT_VERSION ++ # ifndef __ASSUME_SYSVIPC_BROKEN_MODE_T ++@@ -61,7 +62,6 @@ __new_msgctl (int msqid, int cmd, struct msqid_ds *buf) ++ ++ int ret = msgctl_syscall (msqid, cmd, buf); ++ ++-#ifdef __ASSUME_SYSVIPC_BROKEN_MODE_T ++ if (ret >= 0) ++ { ++ switch (cmd) ++@@ -69,10 +69,16 @@ __new_msgctl (int msqid, int cmd, struct msqid_ds *buf) ++ case IPC_STAT: ++ case MSG_STAT: ++ case MSG_STAT_ANY: +++#ifdef __ASSUME_SYSVIPC_BROKEN_MODE_T ++ buf->msg_perm.mode >>= 16; +++#else +++ /* Old Linux kernel versions might not clear the mode padding. */ +++ if (sizeof ((struct msqid_ds){0}.msg_perm.mode) +++ != sizeof (__kernel_mode_t)) +++ buf->msg_perm.mode &= 0xFFFF; +++#endif ++ } ++ } ++-#endif ++ ++ return ret; ++ } ++diff --git a/sysdeps/unix/sysv/linux/nios2/kernel-features.h b/sysdeps/unix/sysv/linux/nios2/kernel-features.h ++deleted file mode 100644 ++index d68d114981..0000000000 ++--- a/sysdeps/unix/sysv/linux/nios2/kernel-features.h +++++ /dev/null ++@@ -1,22 +0,0 @@ ++-/* Set flags signalling availability of kernel features based on given ++- kernel version number. NIOS2 version. ++- Copyright (C) 2019-2020 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 ++- . */ ++- ++-#include_next ++- ++-#undef __ASSUME_SYSVIPC_DEFAULT_IPC_64 ++diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h b/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h ++index 725dfafde8..ffc150851e 100644 ++--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h +++++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h ++@@ -134,47 +134,47 @@ ++ # define LOADARGS_0(name, dummy) \ ++ r0 = name ++ # define LOADARGS_1(name, __arg1) \ ++- long int arg1 = (long int) (__arg1); \ +++ long int _arg1 = (long int) (__arg1); \ ++ LOADARGS_0(name, 0); \ ++ extern void __illegally_sized_syscall_arg1 (void); \ ++ if (__builtin_classify_type (__arg1) != 5 && sizeof (__arg1) > 4) \ ++ __illegally_sized_syscall_arg1 (); \ ++- r3 = arg1 +++ r3 = _arg1 ++ # define LOADARGS_2(name, __arg1, __arg2) \ ++- long int arg2 = (long int) (__arg2); \ +++ long int _arg2 = (long int) (__arg2); \ ++ LOADARGS_1(name, __arg1); \ ++ extern void __illegally_sized_syscall_arg2 (void); \ ++ if (__builtin_classify_type (__arg2) != 5 && sizeof (__arg2) > 4) \ ++ __illegally_sized_syscall_arg2 (); \ ++- r4 = arg2 +++ r4 = _arg2 ++ # define LOADARGS_3(name, __arg1, __arg2, __arg3) \ ++- long int arg3 = (long int) (__arg3); \ +++ long int _arg3 = (long int) (__arg3); \ ++ LOADARGS_2(name, __arg1, __arg2); \ ++ extern void __illegally_sized_syscall_arg3 (void); \ ++ if (__builtin_classify_type (__arg3) != 5 && sizeof (__arg3) > 4) \ ++ __illegally_sized_syscall_arg3 (); \ ++- r5 = arg3 +++ r5 = _arg3 ++ # define LOADARGS_4(name, __arg1, __arg2, __arg3, __arg4) \ ++- long int arg4 = (long int) (__arg4); \ +++ long int _arg4 = (long int) (__arg4); \ ++ LOADARGS_3(name, __arg1, __arg2, __arg3); \ ++ extern void __illegally_sized_syscall_arg4 (void); \ ++ if (__builtin_classify_type (__arg4) != 5 && sizeof (__arg4) > 4) \ ++ __illegally_sized_syscall_arg4 (); \ ++- r6 = arg4 +++ r6 = _arg4 ++ # define LOADARGS_5(name, __arg1, __arg2, __arg3, __arg4, __arg5) \ ++- long int arg5 = (long int) (__arg5); \ +++ long int _arg5 = (long int) (__arg5); \ ++ LOADARGS_4(name, __arg1, __arg2, __arg3, __arg4); \ ++ extern void __illegally_sized_syscall_arg5 (void); \ ++ if (__builtin_classify_type (__arg5) != 5 && sizeof (__arg5) > 4) \ ++ __illegally_sized_syscall_arg5 (); \ ++- r7 = arg5 +++ r7 = _arg5 ++ # define LOADARGS_6(name, __arg1, __arg2, __arg3, __arg4, __arg5, __arg6) \ ++- long int arg6 = (long int) (__arg6); \ +++ long int _arg6 = (long int) (__arg6); \ ++ LOADARGS_5(name, __arg1, __arg2, __arg3, __arg4, __arg5); \ ++ extern void __illegally_sized_syscall_arg6 (void); \ ++ if (__builtin_classify_type (__arg6) != 5 && sizeof (__arg6) > 4) \ ++ __illegally_sized_syscall_arg6 (); \ ++- r8 = arg6 +++ r8 = _arg6 ++ ++ # define ASM_INPUT_0 "0" (r0) ++ # define ASM_INPUT_1 ASM_INPUT_0, "1" (r3) ++diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h b/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h ++index ee7f43653d..8a3f1c43e4 100644 ++--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h +++++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h ++@@ -139,47 +139,47 @@ ++ #define LOADARGS_0(name, dummy) \ ++ r0 = name ++ #define LOADARGS_1(name, __arg1) \ ++- long int arg1 = (long int) (__arg1); \ +++ long int _arg1 = (long int) (__arg1); \ ++ LOADARGS_0(name, 0); \ ++ extern void __illegally_sized_syscall_arg1 (void); \ ++ if (__builtin_classify_type (__arg1) != 5 && sizeof (__arg1) > 8) \ ++ __illegally_sized_syscall_arg1 (); \ ++- r3 = arg1 +++ r3 = _arg1 ++ #define LOADARGS_2(name, __arg1, __arg2) \ ++- long int arg2 = (long int) (__arg2); \ +++ long int _arg2 = (long int) (__arg2); \ ++ LOADARGS_1(name, __arg1); \ ++ extern void __illegally_sized_syscall_arg2 (void); \ ++ if (__builtin_classify_type (__arg2) != 5 && sizeof (__arg2) > 8) \ ++ __illegally_sized_syscall_arg2 (); \ ++- r4 = arg2 +++ r4 = _arg2 ++ #define LOADARGS_3(name, __arg1, __arg2, __arg3) \ ++- long int arg3 = (long int) (__arg3); \ +++ long int _arg3 = (long int) (__arg3); \ ++ LOADARGS_2(name, __arg1, __arg2); \ ++ extern void __illegally_sized_syscall_arg3 (void); \ ++ if (__builtin_classify_type (__arg3) != 5 && sizeof (__arg3) > 8) \ ++ __illegally_sized_syscall_arg3 (); \ ++- r5 = arg3 +++ r5 = _arg3 ++ #define LOADARGS_4(name, __arg1, __arg2, __arg3, __arg4) \ ++- long int arg4 = (long int) (__arg4); \ +++ long int _arg4 = (long int) (__arg4); \ ++ LOADARGS_3(name, __arg1, __arg2, __arg3); \ ++ extern void __illegally_sized_syscall_arg4 (void); \ ++ if (__builtin_classify_type (__arg4) != 5 && sizeof (__arg4) > 8) \ ++ __illegally_sized_syscall_arg4 (); \ ++- r6 = arg4 +++ r6 = _arg4 ++ #define LOADARGS_5(name, __arg1, __arg2, __arg3, __arg4, __arg5) \ ++- long int arg5 = (long int) (__arg5); \ +++ long int _arg5 = (long int) (__arg5); \ ++ LOADARGS_4(name, __arg1, __arg2, __arg3, __arg4); \ ++ extern void __illegally_sized_syscall_arg5 (void); \ ++ if (__builtin_classify_type (__arg5) != 5 && sizeof (__arg5) > 8) \ ++ __illegally_sized_syscall_arg5 (); \ ++- r7 = arg5 +++ r7 = _arg5 ++ #define LOADARGS_6(name, __arg1, __arg2, __arg3, __arg4, __arg5, __arg6) \ ++- long int arg6 = (long int) (__arg6); \ +++ long int _arg6 = (long int) (__arg6); \ ++ LOADARGS_5(name, __arg1, __arg2, __arg3, __arg4, __arg5); \ ++ extern void __illegally_sized_syscall_arg6 (void); \ ++ if (__builtin_classify_type (__arg6) != 5 && sizeof (__arg6) > 8) \ ++ __illegally_sized_syscall_arg6 (); \ ++- r8 = arg6 +++ r8 = _arg6 ++ ++ #define ASM_INPUT_0 "0" (r0) ++ #define ASM_INPUT_1 ASM_INPUT_0, "1" (r3) ++diff --git a/sysdeps/unix/sysv/linux/prctl.c b/sysdeps/unix/sysv/linux/prctl.c ++new file mode 100644 ++index 0000000000..d5725f14cf ++--- /dev/null +++++ b/sysdeps/unix/sysv/linux/prctl.c ++@@ -0,0 +1,42 @@ +++/* prctl - Linux specific syscall. +++ Copyright (C) 2020 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 +++ . */ +++ +++#include +++#include +++#include +++ +++/* Unconditionally read all potential arguments. This may pass +++ garbage values to the kernel, but avoids the need for teaching +++ glibc the argument counts of individual options (including ones +++ that are added to the kernel in the future). */ +++ +++int +++__prctl (int option, ...) +++{ +++ va_list arg; +++ va_start (arg, option); +++ unsigned long int arg2 = va_arg (arg, unsigned long int); +++ unsigned long int arg3 = va_arg (arg, unsigned long int); +++ unsigned long int arg4 = va_arg (arg, unsigned long int); +++ unsigned long int arg5 = va_arg (arg, unsigned long int); +++ va_end (arg); +++ return INLINE_SYSCALL_CALL (prctl, option, arg2, arg3, arg4, arg5); +++} +++ +++libc_hidden_def (__prctl) +++weak_alias (__prctl, prctl) ++diff --git a/sysdeps/unix/sysv/linux/process_vm_readv.c b/sysdeps/unix/sysv/linux/process_vm_readv.c ++new file mode 100644 ++index 0000000000..e1377f7e50 ++--- /dev/null +++++ b/sysdeps/unix/sysv/linux/process_vm_readv.c ++@@ -0,0 +1,32 @@ +++/* process_vm_readv - Linux specific syscall. +++ Copyright (C) 2020 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 +++ . */ +++ +++#include +++#include +++#include +++#include +++ +++ssize_t +++process_vm_readv (pid_t pid, const struct iovec *local_iov, +++ unsigned long int liovcnt, +++ const struct iovec *remote_iov, +++ unsigned long int riovcnt, unsigned long int flags) +++{ +++ return INLINE_SYSCALL_CALL (process_vm_readv, pid, local_iov, +++ liovcnt, remote_iov, riovcnt, flags); +++} ++diff --git a/sysdeps/unix/sysv/linux/process_vm_writev.c b/sysdeps/unix/sysv/linux/process_vm_writev.c ++new file mode 100644 ++index 0000000000..944ab9b7f1 ++--- /dev/null +++++ b/sysdeps/unix/sysv/linux/process_vm_writev.c ++@@ -0,0 +1,32 @@ +++/* process_vm_writev - Linux specific syscall. +++ Copyright (C) 2020 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 +++ . */ +++ +++#include +++#include +++#include +++#include +++ +++ssize_t +++process_vm_writev (pid_t pid, const struct iovec *local_iov, +++ unsigned long int liovcnt, +++ const struct iovec *remote_iov, +++ unsigned long int riovcnt, unsigned long int flags) +++{ +++ return INLINE_SYSCALL_CALL (process_vm_writev, pid, local_iov, +++ liovcnt, remote_iov, riovcnt, flags); +++} ++diff --git a/sysdeps/unix/sysv/linux/ptsname.c b/sysdeps/unix/sysv/linux/ptsname.c ++index 81d9d26f1e..3e9be3f0d4 100644 ++--- a/sysdeps/unix/sysv/linux/ptsname.c +++++ b/sysdeps/unix/sysv/linux/ptsname.c ++@@ -21,39 +21,14 @@ ++ #include ++ #include ++ #include ++-#include ++-#include ++ #include ++ #include ++ ++ #include <_itoa.h> ++ ++-/* Check if DEV corresponds to a master pseudo terminal device. */ ++-#define MASTER_P(Dev) \ ++- (__gnu_dev_major ((Dev)) == 2 \ ++- || (__gnu_dev_major ((Dev)) == 4 \ ++- && __gnu_dev_minor ((Dev)) >= 128 && __gnu_dev_minor ((Dev)) < 192) \ ++- || (__gnu_dev_major ((Dev)) >= 128 && __gnu_dev_major ((Dev)) < 136)) ++- ++-/* Check if DEV corresponds to a slave pseudo terminal device. */ ++-#define SLAVE_P(Dev) \ ++- (__gnu_dev_major ((Dev)) == 3 \ ++- || (__gnu_dev_major ((Dev)) == 4 \ ++- && __gnu_dev_minor ((Dev)) >= 192 && __gnu_dev_minor ((Dev)) < 256) \ ++- || (__gnu_dev_major ((Dev)) >= 136 && __gnu_dev_major ((Dev)) < 144)) ++- ++-/* Note that major number 4 corresponds to the old BSD style pseudo ++- terminal devices. As of Linux 2.1.115 these are no longer ++- supported. They have been replaced by major numbers 2 (masters) ++- and 3 (slaves). */ ++- ++ /* Directory where we can find the slave pty nodes. */ ++ #define _PATH_DEVPTS "/dev/pts/" ++ ++-/* The are declared in getpt.c. */ ++-extern const char __libc_ptyname1[] attribute_hidden; ++-extern const char __libc_ptyname2[] attribute_hidden; ++- ++ /* Static buffer for `ptsname'. */ ++ static char buffer[sizeof (_PATH_DEVPTS) + 20]; ++ ++@@ -68,19 +43,15 @@ ptsname (int fd) ++ } ++ ++ +++/* 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_internal (int fd, char *buf, size_t buflen, struct stat64 *stp) +++__ptsname_r (int fd, char *buf, size_t buflen) ++ { ++ int save_errno = errno; ++ unsigned int ptyno; ++ ++- if (!__isatty (fd)) ++- { ++- __set_errno (ENOTTY); ++- return ENOTTY; ++- } ++- ++-#ifdef TIOCGPTN ++ if (__ioctl (fd, TIOCGPTN, &ptyno) == 0) ++ { ++ /* Buffer we use to print the number in. For a maximum size for ++@@ -101,67 +72,11 @@ __ptsname_internal (int fd, char *buf, size_t buflen, struct stat64 *stp) ++ ++ memcpy (__stpcpy (buf, devpts), p, &numbuf[sizeof (numbuf)] - p); ++ } ++- else if (errno != EINVAL) ++- return errno; ++ else ++-#endif ++- { ++- char *p; ++- ++- if (buflen < strlen (_PATH_TTY) + 3) ++- { ++- __set_errno (ERANGE); ++- return ERANGE; ++- } ++- ++- if (__fxstat64 (_STAT_VER, fd, stp) < 0) ++- return errno; ++- ++- /* Check if FD really is a master pseudo terminal. */ ++- if (! MASTER_P (stp->st_rdev)) ++- { ++- __set_errno (ENOTTY); ++- return ENOTTY; ++- } ++- ++- ptyno = __gnu_dev_minor (stp->st_rdev); ++- ++- if (ptyno / 16 >= strlen (__libc_ptyname1)) ++- { ++- __set_errno (ENOTTY); ++- return ENOTTY; ++- } ++- ++- p = __stpcpy (buf, _PATH_TTY); ++- p[0] = __libc_ptyname1[ptyno / 16]; ++- p[1] = __libc_ptyname2[ptyno % 16]; ++- p[2] = '\0'; ++- } ++- ++- if (__xstat64 (_STAT_VER, buf, stp) < 0) +++ /* Bad file descriptor, or not a ptmx descriptor. */ ++ return errno; ++ ++- /* Check if the name we're about to return really corresponds to a ++- slave pseudo terminal. */ ++- if (! S_ISCHR (stp->st_mode) || ! SLAVE_P (stp->st_rdev)) ++- { ++- /* This really is a configuration problem. */ ++- __set_errno (ENOTTY); ++- return ENOTTY; ++- } ++- ++ __set_errno (save_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) ++diff --git a/sysdeps/unix/sysv/linux/riscv/sysdep.h b/sysdeps/unix/sysv/linux/riscv/sysdep.h ++index 201bf9a91b..2bd9b16f32 100644 ++--- a/sysdeps/unix/sysv/linux/riscv/sysdep.h +++++ b/sysdeps/unix/sysv/linux/riscv/sysdep.h ++@@ -176,10 +176,11 @@ ++ # define internal_syscall1(number, err, arg0) \ ++ ({ \ ++ long int _sys_result; \ +++ long int _arg0 = (long int) (arg0); \ ++ \ ++ { \ ++ register long int __a7 asm ("a7") = number; \ ++- register long int __a0 asm ("a0") = (long int) (arg0); \ +++ register long int __a0 asm ("a0") = _arg0; \ ++ __asm__ volatile ( \ ++ "scall\n\t" \ ++ : "+r" (__a0) \ ++@@ -193,11 +194,13 @@ ++ # define internal_syscall2(number, err, arg0, arg1) \ ++ ({ \ ++ long int _sys_result; \ +++ long int _arg0 = (long int) (arg0); \ +++ long int _arg1 = (long int) (arg1); \ ++ \ ++ { \ ++ register long int __a7 asm ("a7") = number; \ ++- register long int __a0 asm ("a0") = (long int) (arg0); \ ++- register long int __a1 asm ("a1") = (long int) (arg1); \ +++ register long int __a0 asm ("a0") = _arg0; \ +++ register long int __a1 asm ("a1") = _arg1; \ ++ __asm__ volatile ( \ ++ "scall\n\t" \ ++ : "+r" (__a0) \ ++@@ -211,12 +214,15 @@ ++ # define internal_syscall3(number, err, arg0, arg1, arg2) \ ++ ({ \ ++ long int _sys_result; \ +++ long int _arg0 = (long int) (arg0); \ +++ long int _arg1 = (long int) (arg1); \ +++ long int _arg2 = (long int) (arg2); \ ++ \ ++ { \ ++ register long int __a7 asm ("a7") = number; \ ++- register long int __a0 asm ("a0") = (long int) (arg0); \ ++- register long int __a1 asm ("a1") = (long int) (arg1); \ ++- register long int __a2 asm ("a2") = (long int) (arg2); \ +++ register long int __a0 asm ("a0") = _arg0; \ +++ register long int __a1 asm ("a1") = _arg1; \ +++ register long int __a2 asm ("a2") = _arg2; \ ++ __asm__ volatile ( \ ++ "scall\n\t" \ ++ : "+r" (__a0) \ ++@@ -230,13 +236,17 @@ ++ # define internal_syscall4(number, err, arg0, arg1, arg2, arg3) \ ++ ({ \ ++ long int _sys_result; \ +++ long int _arg0 = (long int) (arg0); \ +++ long int _arg1 = (long int) (arg1); \ +++ long int _arg2 = (long int) (arg2); \ +++ long int _arg3 = (long int) (arg3); \ ++ \ ++ { \ ++ register long int __a7 asm ("a7") = number; \ ++- register long int __a0 asm ("a0") = (long int) (arg0); \ ++- register long int __a1 asm ("a1") = (long int) (arg1); \ ++- register long int __a2 asm ("a2") = (long int) (arg2); \ ++- register long int __a3 asm ("a3") = (long int) (arg3); \ +++ register long int __a0 asm ("a0") = _arg0; \ +++ register long int __a1 asm ("a1") = _arg1; \ +++ register long int __a2 asm ("a2") = _arg2; \ +++ register long int __a3 asm ("a3") = _arg3; \ ++ __asm__ volatile ( \ ++ "scall\n\t" \ ++ : "+r" (__a0) \ ++@@ -250,14 +260,19 @@ ++ # define internal_syscall5(number, err, arg0, arg1, arg2, arg3, arg4) \ ++ ({ \ ++ long int _sys_result; \ +++ long int _arg0 = (long int) (arg0); \ +++ long int _arg1 = (long int) (arg1); \ +++ long int _arg2 = (long int) (arg2); \ +++ long int _arg3 = (long int) (arg3); \ +++ long int _arg4 = (long int) (arg4); \ ++ \ ++ { \ ++ register long int __a7 asm ("a7") = number; \ ++- register long int __a0 asm ("a0") = (long int) (arg0); \ ++- register long int __a1 asm ("a1") = (long int) (arg1); \ ++- register long int __a2 asm ("a2") = (long int) (arg2); \ ++- register long int __a3 asm ("a3") = (long int) (arg3); \ ++- register long int __a4 asm ("a4") = (long int) (arg4); \ +++ register long int __a0 asm ("a0") = _arg0; \ +++ register long int __a1 asm ("a1") = _arg1; \ +++ register long int __a2 asm ("a2") = _arg2; \ +++ register long int __a3 asm ("a3") = _arg3; \ +++ register long int __a4 asm ("a4") = _arg4; \ ++ __asm__ volatile ( \ ++ "scall\n\t" \ ++ : "+r" (__a0) \ ++@@ -271,15 +286,21 @@ ++ # define internal_syscall6(number, err, arg0, arg1, arg2, arg3, arg4, arg5) \ ++ ({ \ ++ long int _sys_result; \ +++ long int _arg0 = (long int) (arg0); \ +++ long int _arg1 = (long int) (arg1); \ +++ long int _arg2 = (long int) (arg2); \ +++ long int _arg3 = (long int) (arg3); \ +++ long int _arg4 = (long int) (arg4); \ +++ long int _arg5 = (long int) (arg5); \ ++ \ ++ { \ ++ register long int __a7 asm ("a7") = number; \ ++- register long int __a0 asm ("a0") = (long int) (arg0); \ ++- register long int __a1 asm ("a1") = (long int) (arg1); \ ++- register long int __a2 asm ("a2") = (long int) (arg2); \ ++- register long int __a3 asm ("a3") = (long int) (arg3); \ ++- register long int __a4 asm ("a4") = (long int) (arg4); \ ++- register long int __a5 asm ("a5") = (long int) (arg5); \ +++ register long int __a0 asm ("a0") = _arg0; \ +++ register long int __a1 asm ("a1") = _arg1; \ +++ register long int __a2 asm ("a2") = _arg2; \ +++ register long int __a3 asm ("a3") = _arg3; \ +++ register long int __a4 asm ("a4") = _arg4; \ +++ register long int __a5 asm ("a5") = _arg5; \ ++ __asm__ volatile ( \ ++ "scall\n\t" \ ++ : "+r" (__a0) \ ++@@ -294,16 +315,23 @@ ++ # define internal_syscall7(number, err, arg0, arg1, arg2, arg3, arg4, arg5, arg6) \ ++ ({ \ ++ long int _sys_result; \ +++ long int _arg0 = (long int) (arg0); \ +++ long int _arg1 = (long int) (arg1); \ +++ long int _arg2 = (long int) (arg2); \ +++ long int _arg3 = (long int) (arg3); \ +++ long int _arg4 = (long int) (arg4); \ +++ long int _arg5 = (long int) (arg5); \ +++ long int _arg6 = (long int) (arg6); \ ++ \ ++ { \ ++ register long int __a7 asm ("a7") = number; \ ++- register long int __a0 asm ("a0") = (long int) (arg0); \ ++- register long int __a1 asm ("a1") = (long int) (arg1); \ ++- register long int __a2 asm ("a2") = (long int) (arg2); \ ++- register long int __a3 asm ("a3") = (long int) (arg3); \ ++- register long int __a4 asm ("a4") = (long int) (arg4); \ ++- register long int __a5 asm ("a5") = (long int) (arg5); \ ++- register long int __a6 asm ("a6") = (long int) (arg6); \ +++ register long int __a0 asm ("a0") = _arg0; \ +++ register long int __a1 asm ("a1") = _arg1; \ +++ register long int __a2 asm ("a2") = _arg2; \ +++ register long int __a3 asm ("a3") = _arg3; \ +++ register long int __a4 asm ("a4") = _arg4; \ +++ register long int __a5 asm ("a5") = _arg5; \ +++ register long int __a6 asm ("a6") = _arg6; \ ++ __asm__ volatile ( \ ++ "scall\n\t" \ ++ : "+r" (__a0) \ ++diff --git a/sysdeps/unix/sysv/linux/semctl.c b/sysdeps/unix/sysv/linux/semctl.c ++index 0c3eb0932f..30571af49f 100644 ++--- a/sysdeps/unix/sysv/linux/semctl.c +++++ b/sysdeps/unix/sysv/linux/semctl.c ++@@ -22,6 +22,7 @@ ++ #include ++ #include ++ #include +++#include /* For __kernel_mode_t. */ ++ ++ /* Define a `union semun' suitable for Linux here. */ ++ union semun ++@@ -92,7 +93,6 @@ __new_semctl (int semid, int semnum, int cmd, ...) ++ ++ int ret = semctl_syscall (semid, semnum, cmd, arg); ++ ++-#ifdef __ASSUME_SYSVIPC_BROKEN_MODE_T ++ if (ret >= 0) ++ { ++ switch (cmd) ++@@ -100,10 +100,16 @@ __new_semctl (int semid, int semnum, int cmd, ...) ++ case IPC_STAT: ++ case SEM_STAT: ++ case SEM_STAT_ANY: +++#ifdef __ASSUME_SYSVIPC_BROKEN_MODE_T ++ arg.buf->sem_perm.mode >>= 16; +++#else +++ /* Old Linux kernel versions might not clear the mode padding. */ +++ if (sizeof ((struct semid_ds){0}.sem_perm.mode) +++ != sizeof (__kernel_mode_t)) +++ arg.buf->sem_perm.mode &= 0xFFFF; +++#endif ++ } ++ } ++-#endif ++ ++ return ret; ++ } ++diff --git a/sysdeps/unix/sysv/linux/sh/be/sh4/fpu/Implies b/sysdeps/unix/sysv/linux/sh/be/sh4/fpu/Implies ++new file mode 100644 ++index 0000000000..7eeaf15a5a ++--- /dev/null +++++ b/sysdeps/unix/sysv/linux/sh/be/sh4/fpu/Implies ++@@ -0,0 +1 @@ +++unix/sysv/linux/sh/sh4/fpu ++diff --git a/sysdeps/unix/sysv/linux/sh/le/sh4/fpu/Implies b/sysdeps/unix/sysv/linux/sh/le/sh4/fpu/Implies ++new file mode 100644 ++index 0000000000..7eeaf15a5a ++--- /dev/null +++++ b/sysdeps/unix/sysv/linux/sh/le/sh4/fpu/Implies ++@@ -0,0 +1 @@ +++unix/sysv/linux/sh/sh4/fpu ++diff --git a/sysdeps/unix/sysv/linux/shmctl.c b/sysdeps/unix/sysv/linux/shmctl.c ++index 39fa861e17..f41b359b8b 100644 ++--- a/sysdeps/unix/sysv/linux/shmctl.c +++++ b/sysdeps/unix/sysv/linux/shmctl.c ++@@ -22,6 +22,7 @@ ++ #include ++ #include ++ #include +++#include /* For __kernel_mode_t. */ ++ ++ #ifndef DEFAULT_VERSION ++ # ifndef __ASSUME_SYSVIPC_BROKEN_MODE_T ++@@ -63,7 +64,6 @@ __new_shmctl (int shmid, int cmd, struct shmid_ds *buf) ++ ++ int ret = shmctl_syscall (shmid, cmd, buf); ++ ++-#ifdef __ASSUME_SYSVIPC_BROKEN_MODE_T ++ if (ret >= 0) ++ { ++ switch (cmd) ++@@ -71,10 +71,16 @@ __new_shmctl (int shmid, int cmd, struct shmid_ds *buf) ++ case IPC_STAT: ++ case SHM_STAT: ++ case SHM_STAT_ANY: +++#ifdef __ASSUME_SYSVIPC_BROKEN_MODE_T ++ buf->shm_perm.mode >>= 16; +++#else +++ /* Old Linux kernel versions might not clear the mode padding. */ +++ if (sizeof ((struct shmid_ds){0}.shm_perm.mode) +++ != sizeof (__kernel_mode_t)) +++ buf->shm_perm.mode &= 0xFFFF; +++#endif ++ } ++ } ++-#endif ++ ++ return ret; ++ } ++diff --git a/sysdeps/unix/sysv/linux/sparc/Makefile b/sysdeps/unix/sysv/linux/sparc/Makefile ++index b0d182a439..1475039677 100644 ++--- a/sysdeps/unix/sysv/linux/sparc/Makefile +++++ b/sysdeps/unix/sysv/linux/sparc/Makefile ++@@ -11,8 +11,12 @@ ifeq ($(subdir),sysvipc) ++ sysdep_routines += getshmlba ++ endif ++ +++ifeq ($(subdir),signal) +++sysdep_routines += sigreturn_stub +++endif +++ ++ ifeq ($(subdir),nptl) ++ # pull in __syscall_error routine ++-libpthread-routines += sysdep ++-libpthread-shared-only-routines += sysdep +++libpthread-routines += sysdep sigreturn_stub +++libpthread-shared-only-routines += sysdep sigreturn_stub ++ endif ++diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/sigaction.c b/sysdeps/unix/sysv/linux/sparc/sparc32/sigaction.c ++index 6b2f664226..938aa7aa8c 100644 ++--- a/sysdeps/unix/sysv/linux/sparc/sparc32/sigaction.c +++++ b/sysdeps/unix/sysv/linux/sparc/sparc32/sigaction.c ++@@ -24,8 +24,8 @@ ++ #include ++ #include ++ ++-static void __rt_sigreturn_stub (void); ++-static void __sigreturn_stub (void); +++void __rt_sigreturn_stub (void); +++void __sigreturn_stub (void); ++ ++ #define STUB(act, sigsetsize) \ ++ (act) ? ((unsigned long)((act->sa_flags & SA_SIGINFO) \ ++@@ -35,25 +35,3 @@ static void __sigreturn_stub (void); ++ (sigsetsize) ++ ++ #include ++- ++-static ++-inhibit_stack_protector ++-void ++-__rt_sigreturn_stub (void) ++-{ ++- __asm__ ("mov %0, %%g1\n\t" ++- "ta 0x10\n\t" ++- : /* no outputs */ ++- : "i" (__NR_rt_sigreturn)); ++-} ++- ++-static ++-inhibit_stack_protector ++-void ++-__sigreturn_stub (void) ++-{ ++- __asm__ ("mov %0, %%g1\n\t" ++- "ta 0x10\n\t" ++- : /* no outputs */ ++- : "i" (__NR_sigreturn)); ++-} ++diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/sigreturn_stub.S b/sysdeps/unix/sysv/linux/sparc/sparc32/sigreturn_stub.S ++new file mode 100644 ++index 0000000000..727cc94737 ++--- /dev/null +++++ b/sysdeps/unix/sysv/linux/sparc/sparc32/sigreturn_stub.S ++@@ -0,0 +1,34 @@ +++/* Sigreturn stub function used on sa_restore field. +++ Copyright (C) 2020 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 +++ . */ +++ +++#include +++ +++/* These functions must not change the register window or the stack +++ pointer [1]. +++ +++ [1] https://lkml.org/lkml/2016/5/27/465 */ +++ +++ENTRY (__rt_sigreturn_stub) +++ mov __NR_rt_sigreturn, %g1 +++ ta 0x10 +++END (__rt_sigreturn_stub) +++ +++ENTRY (__sigreturn_stub) +++ mov __NR_sigreturn, %g1 +++ ta 0x10 +++END (__sigreturn_stub) ++diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/sigaction.c b/sysdeps/unix/sysv/linux/sparc/sparc64/sigaction.c ++index 9c0dc2a630..4e26172321 100644 ++--- a/sysdeps/unix/sysv/linux/sparc/sparc64/sigaction.c +++++ b/sysdeps/unix/sysv/linux/sparc/sparc64/sigaction.c ++@@ -22,21 +22,11 @@ ++ #include ++ #include ++ ++-static void __rt_sigreturn_stub (void); +++/* Defined on sigreturn_stub.S. */ +++void __rt_sigreturn_stub (void); ++ ++ #define STUB(act, sigsetsize) \ ++ (((unsigned long) &__rt_sigreturn_stub) - 8), \ ++ (sigsetsize) ++ ++ #include ++- ++-static ++-inhibit_stack_protector ++-void ++-__rt_sigreturn_stub (void) ++-{ ++- __asm__ ("mov %0, %%g1\n\t" ++- "ta 0x6d\n\t" ++- : /* no outputs */ ++- : "i" (__NR_rt_sigreturn)); ++-} ++diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/sigreturn_stub.S b/sysdeps/unix/sysv/linux/sparc/sparc64/sigreturn_stub.S ++new file mode 100644 ++index 0000000000..add4766831 ++--- /dev/null +++++ b/sysdeps/unix/sysv/linux/sparc/sparc64/sigreturn_stub.S ++@@ -0,0 +1,29 @@ +++/* Sigreturn stub function used on sa_restore field. +++ Copyright (C) 2020 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 +++ . */ +++ +++#include +++ +++/* This function must not change the register window or the stack +++ pointer [1]. +++ +++ [1] https://lkml.org/lkml/2016/5/27/465 */ +++ +++ENTRY (__rt_sigreturn_stub) +++ mov __NR_rt_sigreturn, %g1 +++ ta 0x6d +++END (__rt_sigreturn_stub) ++diff --git a/sysdeps/unix/sysv/linux/syscall-names.list b/sysdeps/unix/sysv/linux/syscall-names.list ++index 36e087d8f4..3d89814003 100644 ++--- a/sysdeps/unix/sysv/linux/syscall-names.list +++++ b/sysdeps/unix/sysv/linux/syscall-names.list ++@@ -21,8 +21,8 @@ ++ # This file can list all potential system calls. The names are only ++ # used if the installed kernel headers also provide them. ++ ++-# The list of system calls is current as of Linux 5.4. ++-kernel 5.4 +++# The list of system calls is current as of Linux 5.5. +++kernel 5.5 ++ ++ FAST_atomic_update ++ FAST_cmpxchg ++diff --git a/sysdeps/unix/sysv/linux/syscalls.list b/sysdeps/unix/sysv/linux/syscalls.list ++index 5f1352ad43..52e6dafc86 100644 ++--- a/sysdeps/unix/sysv/linux/syscalls.list +++++ b/sysdeps/unix/sysv/linux/syscalls.list ++@@ -28,25 +28,24 @@ inotify_add_watch EXTRA inotify_add_watch i:isi inotify_add_watch ++ inotify_init EXTRA inotify_init i: inotify_init ++ inotify_init1 EXTRA inotify_init1 i:I inotify_init1 ++ inotify_rm_watch EXTRA inotify_rm_watch i:ii inotify_rm_watch ++-ioperm - ioperm i:iii ioperm +++ioperm - ioperm i:UUi ioperm ++ iopl - iopl i:i iopl ++ klogctl EXTRA syslog i:isi klogctl ++ lchown - lchown i:sii __lchown lchown ++-mincore - mincore i:anV mincore ++-mlock - mlock i:bn mlock +++mincore - mincore i:aUV mincore +++mlock - mlock i:bU mlock ++ mlockall - mlockall i:i mlockall ++-mount EXTRA mount i:sssip __mount mount ++-mremap EXTRA mremap b:ainip __mremap mremap ++-munlock - munlock i:ai munlock +++mount EXTRA mount i:sssUp __mount mount +++mremap EXTRA mremap b:aUUip __mremap mremap +++munlock - munlock i:aU munlock ++ munlockall - munlockall i: munlockall ++ nfsservctl EXTRA nfsservctl i:ipp __compat_nfsservctl nfsservctl@GLIBC_2.0:GLIBC_2.28 ++ pipe - pipe i:f __pipe pipe ++ pipe2 - pipe2 i:fi __pipe2 pipe2 ++ pivot_root EXTRA pivot_root i:ss pivot_root ++-prctl EXTRA prctl i:iiiii __prctl prctl ++ query_module EXTRA query_module i:sipip __compat_query_module query_module@GLIBC_2.0:GLIBC_2.23 ++ quotactl EXTRA quotactl i:isip quotactl ++-remap_file_pages - remap_file_pages i:piiii __remap_file_pages remap_file_pages +++remap_file_pages - remap_file_pages i:pUiUi __remap_file_pages remap_file_pages ++ sched_getp - sched_getparam i:ip __sched_getparam sched_getparam ++ 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 ++@@ -55,8 +54,8 @@ sched_rr_gi - sched_rr_get_interval i:ip __sched_rr_get_interval sched_rr_get_in ++ 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 ++-sendfile - sendfile i:iipi sendfile ++-sendfile64 - sendfile64 i:iipi sendfile64 +++sendfile - sendfile i:iipU sendfile +++sendfile64 - sendfile64 i:iipU sendfile64 ++ setfsgid EXTRA setfsgid i:i setfsgid ++ setfsuid EXTRA setfsuid i:i setfsuid ++ setpgid - setpgid i:ii __setpgid setpgid ++@@ -73,19 +72,19 @@ chown - chown i:sii __libc_chown __chown chown ++ fchownat - fchownat i:isiii fchownat ++ linkat - linkat i:isisi linkat ++ mkdirat - mkdirat i:isi mkdirat ++-readlinkat - readlinkat i:issi readlinkat +++readlinkat - readlinkat i:issU readlinkat ++ symlinkat - symlinkat i:sis symlinkat ++ unlinkat - unlinkat i:isi unlinkat ++ ++-setxattr - setxattr i:sspii setxattr ++-lsetxattr - lsetxattr i:sspii lsetxattr ++-fsetxattr - fsetxattr i:ispii fsetxattr ++-getxattr - getxattr i:sspi getxattr ++-lgetxattr - lgetxattr i:sspi lgetxattr ++-fgetxattr - fgetxattr i:ispi fgetxattr ++-listxattr - listxattr i:ssi listxattr ++-llistxattr - llistxattr i:ssi llistxattr ++-flistxattr - flistxattr i:isi flistxattr +++setxattr - setxattr i:sspUi setxattr +++lsetxattr - lsetxattr i:sspUi lsetxattr +++fsetxattr - fsetxattr i:ispUi fsetxattr +++getxattr - getxattr i:sspU getxattr +++lgetxattr - lgetxattr i:sspU lgetxattr +++fgetxattr - fgetxattr i:ispU fgetxattr +++listxattr - listxattr i:ssU listxattr +++llistxattr - llistxattr i:ssU llistxattr +++flistxattr - flistxattr i:isU flistxattr ++ removexattr - removexattr i:ss removexattr ++ lremovexattr - lremovexattr i:ss lremovexattr ++ fremovexattr - fremovexattr i:is fremovexattr ++@@ -102,8 +101,6 @@ name_to_handle_at EXTRA name_to_handle_at i:isppi name_to_handle_at ++ ++ setns EXTRA setns i:ii setns ++ ++-process_vm_readv EXTRA process_vm_readv i:ipipii process_vm_readv ++-process_vm_writev EXTRA process_vm_writev i:ipipii process_vm_writev ++ memfd_create EXTRA memfd_create i:si memfd_create ++ pkey_alloc EXTRA pkey_alloc i:ii pkey_alloc ++ pkey_free EXTRA pkey_free i:i pkey_free ++diff --git a/sysdeps/unix/sysv/linux/tst-getcwd-smallbuff.c b/sysdeps/unix/sysv/linux/tst-getcwd-smallbuff.c ++new file mode 100644 ++index 0000000000..55362f6060 ++--- /dev/null +++++ b/sysdeps/unix/sysv/linux/tst-getcwd-smallbuff.c ++@@ -0,0 +1,259 @@ +++/* Verify that getcwd returns ERANGE for size 1 byte and does not underflow +++ buffer when the CWD is too long and is also a mount target of /. See bug +++ #28769 or CVE-2021-3999 for more context. +++ Copyright The GNU Toolchain Authors. +++ 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 +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++static char *base; +++#define BASENAME "tst-getcwd-smallbuff" +++#define MOUNT_NAME "mpoint" +++static int sockfd[2]; +++ +++static void +++do_cleanup (void) +++{ +++ support_chdir_toolong_temp_directory (base); +++ TEST_VERIFY_EXIT (rmdir (MOUNT_NAME) == 0); +++ free (base); +++} +++ +++static void +++send_fd (const int sock, const int fd) +++{ +++ struct msghdr msg = {0}; +++ union +++ { +++ struct cmsghdr hdr; +++ char buf[CMSG_SPACE (sizeof (int))]; +++ } cmsgbuf = {0}; +++ struct cmsghdr *cmsg; +++ struct iovec vec; +++ char ch = 'A'; +++ ssize_t n; +++ +++ msg.msg_control = &cmsgbuf.buf; +++ msg.msg_controllen = sizeof (cmsgbuf.buf); +++ +++ cmsg = CMSG_FIRSTHDR (&msg); +++ cmsg->cmsg_len = CMSG_LEN (sizeof (int)); +++ cmsg->cmsg_level = SOL_SOCKET; +++ cmsg->cmsg_type = SCM_RIGHTS; +++ memcpy (CMSG_DATA (cmsg), &fd, sizeof (fd)); +++ +++ vec.iov_base = &ch; +++ vec.iov_len = 1; +++ msg.msg_iov = &vec; +++ msg.msg_iovlen = 1; +++ +++ while ((n = sendmsg (sock, &msg, 0)) == -1 && errno == EINTR); +++ +++ TEST_VERIFY_EXIT (n == 1); +++} +++ +++static int +++recv_fd (const int sock) +++{ +++ struct msghdr msg = {0}; +++ union +++ { +++ struct cmsghdr hdr; +++ char buf[CMSG_SPACE(sizeof(int))]; +++ } cmsgbuf = {0}; +++ struct cmsghdr *cmsg; +++ struct iovec vec; +++ ssize_t n; +++ char ch = '\0'; +++ int fd = -1; +++ +++ vec.iov_base = &ch; +++ vec.iov_len = 1; +++ msg.msg_iov = &vec; +++ msg.msg_iovlen = 1; +++ +++ msg.msg_control = &cmsgbuf.buf; +++ msg.msg_controllen = sizeof (cmsgbuf.buf); +++ +++ while ((n = recvmsg (sock, &msg, 0)) == -1 && errno == EINTR); +++ if (n != 1 || ch != 'A') +++ return -1; +++ +++ cmsg = CMSG_FIRSTHDR (&msg); +++ if (cmsg == NULL) +++ return -1; +++ if (cmsg->cmsg_type != SCM_RIGHTS) +++ return -1; +++ memcpy (&fd, CMSG_DATA (cmsg), sizeof (fd)); +++ if (fd < 0) +++ return -1; +++ return fd; +++} +++ +++static int +++child_func (void * const arg) +++{ +++ xclose (sockfd[0]); +++ const int sock = sockfd[1]; +++ char ch; +++ +++ TEST_VERIFY_EXIT (read (sock, &ch, 1) == 1); +++ TEST_VERIFY_EXIT (ch == '1'); +++ +++ if (mount ("/", MOUNT_NAME, NULL, MS_BIND | MS_REC, NULL)) +++ FAIL_EXIT1 ("mount failed: %m\n"); +++ const int fd = xopen ("mpoint", +++ O_RDONLY | O_PATH | O_DIRECTORY | O_NOFOLLOW, 0); +++ +++ send_fd (sock, fd); +++ xclose (fd); +++ +++ TEST_VERIFY_EXIT (read (sock, &ch, 1) == 1); +++ TEST_VERIFY_EXIT (ch == 'a'); +++ +++ xclose (sock); +++ return 0; +++} +++ +++static void +++update_map (char * const mapping, const char * const map_file) +++{ +++ const size_t map_len = strlen (mapping); +++ +++ const int fd = xopen (map_file, O_WRONLY, 0); +++ xwrite (fd, mapping, map_len); +++ xclose (fd); +++} +++ +++static void +++proc_setgroups_write (const long child_pid, const char * const str) +++{ +++ const size_t str_len = strlen(str); +++ +++ char setgroups_path[sizeof ("/proc//setgroups") + INT_STRLEN_BOUND (long)]; +++ +++ snprintf (setgroups_path, sizeof (setgroups_path), +++ "/proc/%ld/setgroups", child_pid); +++ +++ const int fd = open (setgroups_path, O_WRONLY); +++ +++ if (fd < 0) +++ { +++ TEST_VERIFY_EXIT (errno == ENOENT); +++ FAIL_UNSUPPORTED ("/proc/%ld/setgroups not found\n", child_pid); +++ } +++ +++ xwrite (fd, str, str_len); +++ xclose(fd); +++} +++ +++static char child_stack[1024 * 1024]; +++ +++int +++do_test (void) +++{ +++ base = support_create_and_chdir_toolong_temp_directory (BASENAME); +++ +++ xmkdir (MOUNT_NAME, S_IRWXU); +++ atexit (do_cleanup); +++ +++ /* Check whether user namespaces are supported. */ +++ { +++ pid_t pid = xfork (); +++ if (pid == 0) +++ { +++ if (unshare (CLONE_NEWUSER | CLONE_NEWNS) != 0) +++ _exit (EXIT_UNSUPPORTED); +++ else +++ _exit (0); +++ } +++ int status; +++ xwaitpid (pid, &status, 0); +++ TEST_VERIFY_EXIT (WIFEXITED (status)); +++ if (WEXITSTATUS (status) != 0) +++ return WEXITSTATUS (status); +++ } +++ +++ TEST_VERIFY_EXIT (socketpair (AF_UNIX, SOCK_STREAM, 0, sockfd) == 0); +++ pid_t child_pid = xclone (child_func, NULL, child_stack, +++ sizeof (child_stack), +++ CLONE_NEWUSER | CLONE_NEWNS | SIGCHLD); +++ +++ xclose (sockfd[1]); +++ const int sock = sockfd[0]; +++ +++ char map_path[sizeof ("/proc//uid_map") + INT_STRLEN_BOUND (long)]; +++ char map_buf[sizeof ("0 1") + INT_STRLEN_BOUND (long)]; +++ +++ snprintf (map_path, sizeof (map_path), "/proc/%ld/uid_map", +++ (long) child_pid); +++ snprintf (map_buf, sizeof (map_buf), "0 %ld 1", (long) getuid()); +++ update_map (map_buf, map_path); +++ +++ proc_setgroups_write ((long) child_pid, "deny"); +++ snprintf (map_path, sizeof (map_path), "/proc/%ld/gid_map", +++ (long) child_pid); +++ snprintf (map_buf, sizeof (map_buf), "0 %ld 1", (long) getgid()); +++ update_map (map_buf, map_path); +++ +++ TEST_VERIFY_EXIT (send (sock, "1", 1, MSG_NOSIGNAL) == 1); +++ const int fd = recv_fd (sock); +++ TEST_VERIFY_EXIT (fd >= 0); +++ TEST_VERIFY_EXIT (fchdir (fd) == 0); +++ +++ static char buf[2 * 10 + 1]; +++ memset (buf, 'A', sizeof (buf)); +++ +++ /* Finally, call getcwd and check if it resulted in a buffer underflow. */ +++ char * cwd = getcwd (buf + sizeof (buf) / 2, 1); +++ TEST_VERIFY (cwd == NULL); +++ TEST_VERIFY (errno == ERANGE); +++ +++ for (int i = 0; i < sizeof (buf); i++) +++ if (buf[i] != 'A') +++ { +++ printf ("buf[%d] = %02x\n", i, (unsigned int) buf[i]); +++ support_record_failure (); +++ } +++ +++ TEST_VERIFY_EXIT (send (sock, "a", 1, MSG_NOSIGNAL) == 1); +++ xclose (sock); +++ TEST_VERIFY_EXIT (xwaitpid (child_pid, NULL, 0) == child_pid); +++ +++ return 0; +++} +++ +++#define CLEANUP_HANDLER do_cleanup +++#include ++diff --git a/sysdeps/unix/sysv/linux/x86_64/sysdep.h b/sysdeps/unix/sysv/linux/x86_64/sysdep.h ++index c2eb37e575..c7f740a1df 100644 ++--- a/sysdeps/unix/sysv/linux/x86_64/sysdep.h +++++ b/sysdeps/unix/sysv/linux/x86_64/sysdep.h ++@@ -61,13 +61,31 @@ ++ # define SYSCALL_ERROR_LABEL syscall_error ++ # endif ++ +++/* PSEUDO and T_PSEUDO macros have 2 extra arguments for unsigned long +++ int arguments. */ +++# define PSEUDOS_HAVE_ULONG_INDICES 1 +++ +++# ifndef SYSCALL_ULONG_ARG_1 +++# define SYSCALL_ULONG_ARG_1 0 +++# define SYSCALL_ULONG_ARG_2 0 +++# endif +++ ++ # undef PSEUDO ++-# define PSEUDO(name, syscall_name, args) \ ++- .text; \ ++- ENTRY (name) \ ++- DO_CALL (syscall_name, args); \ ++- cmpq $-4095, %rax; \ +++# if SYSCALL_ULONG_ARG_1 +++# define PSEUDO(name, syscall_name, args, ulong_arg_1, ulong_arg_2) \ +++ .text; \ +++ ENTRY (name) \ +++ DO_CALL (syscall_name, args, ulong_arg_1, ulong_arg_2); \ +++ cmpq $-4095, %rax; \ ++ jae SYSCALL_ERROR_LABEL +++# else +++# define PSEUDO(name, syscall_name, args) \ +++ .text; \ +++ ENTRY (name) \ +++ DO_CALL (syscall_name, args, 0, 0); \ +++ cmpq $-4095, %rax; \ +++ jae SYSCALL_ERROR_LABEL +++# endif ++ ++ # undef PSEUDO_END ++ # define PSEUDO_END(name) \ ++@@ -75,10 +93,17 @@ ++ END (name) ++ ++ # undef PSEUDO_NOERRNO ++-# define PSEUDO_NOERRNO(name, syscall_name, args) \ ++- .text; \ ++- ENTRY (name) \ ++- DO_CALL (syscall_name, args) +++# if SYSCALL_ULONG_ARG_1 +++# define PSEUDO_NOERRNO(name, syscall_name, args, ulong_arg_1, ulong_arg_2) \ +++ .text; \ +++ ENTRY (name) \ +++ DO_CALL (syscall_name, args, ulong_arg_1, ulong_arg_2) +++# else +++# define PSEUDO_NOERRNO(name, syscall_name, args) \ +++ .text; \ +++ ENTRY (name) \ +++ DO_CALL (syscall_name, args, 0, 0) +++# endif ++ ++ # undef PSEUDO_END_NOERRNO ++ # define PSEUDO_END_NOERRNO(name) \ ++@@ -87,11 +112,19 @@ ++ # define ret_NOERRNO ret ++ ++ # undef PSEUDO_ERRVAL ++-# define PSEUDO_ERRVAL(name, syscall_name, args) \ ++- .text; \ ++- ENTRY (name) \ ++- DO_CALL (syscall_name, args); \ +++# if SYSCALL_ULONG_ARG_1 +++# define PSEUDO_ERRVAL(name, syscall_name, args, ulong_arg_1, ulong_arg_2) \ +++ .text; \ +++ ENTRY (name) \ +++ DO_CALL (syscall_name, args, ulong_arg_1, ulong_arg_2); \ +++ negq %rax +++# else +++# define PSEUDO_ERRVAL(name, syscall_name, args) \ +++ .text; \ +++ ENTRY (name) \ +++ DO_CALL (syscall_name, args, 0, 0); \ ++ negq %rax +++# endif ++ ++ # undef PSEUDO_END_ERRVAL ++ # define PSEUDO_END_ERRVAL(name) \ ++@@ -163,8 +196,10 @@ ++ Syscalls of more than 6 arguments are not supported. */ ++ ++ # undef DO_CALL ++-# define DO_CALL(syscall_name, args) \ +++# define DO_CALL(syscall_name, args, ulong_arg_1, ulong_arg_2) \ ++ DOARGS_##args \ +++ ZERO_EXTEND_##ulong_arg_1 \ +++ ZERO_EXTEND_##ulong_arg_2 \ ++ movl $SYS_ify (syscall_name), %eax; \ ++ syscall; ++ ++@@ -176,6 +211,14 @@ ++ # define DOARGS_5 DOARGS_4 ++ # define DOARGS_6 DOARGS_5 ++ +++# define ZERO_EXTEND_0 /* nothing */ +++# define ZERO_EXTEND_1 /* nothing */ +++# define ZERO_EXTEND_2 /* nothing */ +++# define ZERO_EXTEND_3 /* nothing */ +++# define ZERO_EXTEND_4 /* nothing */ +++# define ZERO_EXTEND_5 /* nothing */ +++# define ZERO_EXTEND_6 /* nothing */ +++ ++ #else /* !__ASSEMBLER__ */ ++ /* Define a macro which expands inline into the wrapper code for a system ++ call. */ ++@@ -210,12 +253,15 @@ ++ /* Registers clobbered by syscall. */ ++ # define REGISTERS_CLOBBERED_BY_SYSCALL "cc", "r11", "cx" ++ ++-/* Create a variable 'name' based on type 'X' to avoid explicit types. ++- This is mainly used set use 64-bits arguments in x32. */ ++-#define TYPEFY(X, name) __typeof__ ((X) - (X)) name ++-/* Explicit cast the argument to avoid integer from pointer warning on ++- x32. */ ++-#define ARGIFY(X) ((__typeof__ ((X) - (X))) (X)) +++/* NB: This also works when X is an array. For an array X, type of +++ (X) - (X) is ptrdiff_t, which is signed, since size of ptrdiff_t +++ == size of pointer, cast is a NOP. */ +++#define TYPEFY1(X) __typeof__ ((X) - (X)) +++/* Explicit cast the argument. */ +++#define ARGIFY(X) ((TYPEFY1 (X)) (X)) +++/* Create a variable 'name' based on type of variable 'X' to avoid +++ explicit types. */ +++#define TYPEFY(X, name) __typeof__ (ARGIFY (X)) name ++ ++ #undef INTERNAL_SYSCALL ++ #define INTERNAL_SYSCALL(name, err, nr, args...) \ ++diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/sysdep.h b/sysdeps/unix/sysv/linux/x86_64/x32/sysdep.h ++index 5bf9eed80b..62e6f8fe11 100644 ++--- a/sysdeps/unix/sysv/linux/x86_64/x32/sysdep.h +++++ b/sysdeps/unix/sysv/linux/x86_64/x32/sysdep.h ++@@ -26,4 +26,39 @@ ++ #undef LO_HI_LONG ++ #define LO_HI_LONG(val) (val) ++ +++#ifdef __ASSEMBLER__ +++/* Zero-extend 32-bit unsigned long int arguments to 64 bits. */ +++# undef ZERO_EXTEND_1 +++# define ZERO_EXTEND_1 movl %edi, %edi; +++# undef ZERO_EXTEND_2 +++# define ZERO_EXTEND_2 movl %esi, %esi; +++# undef ZERO_EXTEND_3 +++# define ZERO_EXTEND_3 movl %edx, %edx; +++# if SYSCALL_ULONG_ARG_1 == 4 || SYSCALL_ULONG_ARG_2 == 4 +++# undef DOARGS_4 +++# define DOARGS_4 movl %ecx, %r10d; +++# else +++# undef ZERO_EXTEND_4 +++# define ZERO_EXTEND_4 movl %r10d, %r10d; +++# endif +++# undef ZERO_EXTEND_5 +++# define ZERO_EXTEND_5 movl %r8d, %r8d; +++# undef ZERO_EXTEND_6 +++# define ZERO_EXTEND_6 movl %r9d, %r9d; +++#else /* !__ASSEMBLER__ */ +++# undef ARGIFY +++/* Enforce zero-extension for pointers and array system call arguments. +++ For integer types, extend to int64_t (the full register) using a +++ regular cast, resulting in zero or sign extension based on the +++ signedness of the original type. */ +++# define ARGIFY(X) \ +++ ({ \ +++ _Pragma ("GCC diagnostic push"); \ +++ _Pragma ("GCC diagnostic ignored \"-Wpointer-to-int-cast\""); \ +++ (__builtin_classify_type (X) == 5 \ +++ ? (uintptr_t) (X) : (int64_t) (X)); \ +++ _Pragma ("GCC diagnostic pop"); \ +++ }) +++#endif /* __ASSEMBLER__ */ +++ ++ #endif /* linux/x86_64/x32/sysdep.h */ ++diff --git a/sysdeps/x86/Makefile b/sysdeps/x86/Makefile ++index 95182a508c..b7aec5df2b 100644 ++--- a/sysdeps/x86/Makefile +++++ b/sysdeps/x86/Makefile ++@@ -12,6 +12,42 @@ endif ++ ifeq ($(subdir),setjmp) ++ gen-as-const-headers += jmp_buf-ssp.sym ++ sysdep_routines += __longjmp_cancel +++ifneq ($(enable-cet),no) +++ifneq ($(have-tunables),no) +++tests += tst-setjmp-cet +++tst-setjmp-cet-ENV = GLIBC_TUNABLES=glibc.cpu.x86_ibt=on:glibc.cpu.x86_shstk=on +++endif +++endif +++endif +++ +++ifeq ($(subdir),string) +++sysdep_routines += cacheinfo +++ +++tests += \ +++ tst-memchr-rtm \ +++ tst-memcmp-rtm \ +++ tst-memmove-rtm \ +++ tst-memrchr-rtm \ +++ tst-memset-rtm \ +++ tst-strchr-rtm \ +++ tst-strcpy-rtm \ +++ tst-strlen-rtm \ +++ tst-strncmp-rtm \ +++ tst-strrchr-rtm \ +++ tst-wcsncmp-rtm \ +++# tests +++ +++CFLAGS-tst-memchr-rtm.c += -mrtm +++CFLAGS-tst-memcmp-rtm.c += -mrtm +++CFLAGS-tst-memmove-rtm.c += -mrtm +++CFLAGS-tst-memrchr-rtm.c += -mrtm +++CFLAGS-tst-memset-rtm.c += -mrtm +++CFLAGS-tst-strchr-rtm.c += -mrtm +++CFLAGS-tst-strcpy-rtm.c += -mrtm +++CFLAGS-tst-strlen-rtm.c += -mrtm +++CFLAGS-tst-strncmp-rtm.c += -mrtm -Wno-error +++CFLAGS-tst-strrchr-rtm.c += -mrtm +++CFLAGS-tst-wcsncmp-rtm.c += -mrtm -Wno-error ++ endif ++ ++ ifeq ($(enable-cet),yes) ++diff --git a/sysdeps/x86/cacheinfo.c b/sysdeps/x86/cacheinfo.c ++index e3e8ef27bb..17db517830 100644 ++--- a/sysdeps/x86/cacheinfo.c +++++ b/sysdeps/x86/cacheinfo.c ++@@ -494,6 +494,7 @@ init_cacheinfo (void) ++ int max_cpuid_ex; ++ long int data = -1; ++ long int shared = -1; +++ long int shared_per_thread = -1; ++ unsigned int level; ++ unsigned int threads = 0; ++ const struct cpu_features *cpu_features = __get_cpu_features (); ++@@ -509,7 +510,7 @@ init_cacheinfo (void) ++ /* Try L3 first. */ ++ level = 3; ++ shared = handle_intel (_SC_LEVEL3_CACHE_SIZE, cpu_features); ++- +++ shared_per_thread = shared; ++ /* Number of logical processors sharing L2 cache. */ ++ int threads_l2; ++ ++@@ -521,6 +522,7 @@ init_cacheinfo (void) ++ /* Try L2 otherwise. */ ++ level = 2; ++ shared = core; +++ shared_per_thread = core; ++ threads_l2 = 0; ++ threads_l3 = -1; ++ } ++@@ -688,15 +690,15 @@ intel_bug_no_cache_info: ++ ++ /* Cap usage of highest cache level to the number of supported ++ threads. */ ++- if (shared > 0 && threads > 0) ++- shared /= threads; +++ if (shared_per_thread > 0 && threads > 0) +++ shared_per_thread /= threads; ++ } ++ ++ /* Account for non-inclusive L2 and L3 caches. */ ++ if (!inclusive_cache) ++ { ++- if (threads_l2 > 0) ++- core /= threads_l2; +++ long int core_per_thread = threads_l2 > 0 ? (core / threads_l2) : core; +++ shared_per_thread += core_per_thread; ++ shared += core; ++ } ++ } ++@@ -705,13 +707,17 @@ intel_bug_no_cache_info: ++ data = handle_amd (_SC_LEVEL1_DCACHE_SIZE); ++ long int core = handle_amd (_SC_LEVEL2_CACHE_SIZE); ++ shared = handle_amd (_SC_LEVEL3_CACHE_SIZE); +++ shared_per_thread = shared; ++ ++ /* Get maximum extended function. */ ++ __cpuid (0x80000000, max_cpuid_ex, ebx, ecx, edx); ++ ++ if (shared <= 0) ++- /* No shared L3 cache. All we have is the L2 cache. */ ++- shared = core; +++ { +++ /* No shared L3 cache. All we have is the L2 cache. */ +++ shared = core; +++ shared_per_thread = core; +++ } ++ else ++ { ++ /* Figure out the number of logical threads that share L3. */ ++@@ -722,7 +728,7 @@ intel_bug_no_cache_info: ++ threads = 1 << ((ecx >> 12) & 0x0f); ++ } ++ ++- if (threads == 0) +++ if (threads == 0 || cpu_features->basic.family >= 0x17) ++ { ++ /* If APIC ID width is not available, use logical ++ processor count. */ ++@@ -735,10 +741,25 @@ intel_bug_no_cache_info: ++ /* Cap usage of highest cache level to the number of ++ supported threads. */ ++ if (threads > 0) ++- shared /= threads; +++ shared_per_thread /= threads; ++ ++- /* Account for exclusive L2 and L3 caches. */ ++- shared += core; +++ /* Get shared cache per ccx for Zen architectures. */ +++ if (cpu_features->basic.family >= 0x17) +++ { +++ unsigned int eax; +++ +++ /* Get number of threads share the L3 cache in CCX. */ +++ __cpuid_count (0x8000001D, 0x3, eax, ebx, ecx, edx); +++ +++ unsigned int threads_per_ccx = ((eax >> 14) & 0xfff) + 1; +++ shared_per_thread *= threads_per_ccx; +++ } +++ else +++ { +++ /* Account for exclusive L2 and L3 caches. */ +++ shared += core; +++ shared_per_thread += core; +++ } ++ } ++ ++ #ifndef DISABLE_PREFETCHW ++@@ -766,26 +787,51 @@ intel_bug_no_cache_info: ++ } ++ ++ if (cpu_features->shared_cache_size != 0) ++- shared = cpu_features->shared_cache_size; +++ shared_per_thread = cpu_features->shared_cache_size; ++ ++- if (shared > 0) +++ if (shared_per_thread > 0) ++ { ++- __x86_raw_shared_cache_size_half = shared / 2; ++- __x86_raw_shared_cache_size = shared; +++ __x86_raw_shared_cache_size_half = shared_per_thread / 2; +++ __x86_raw_shared_cache_size = shared_per_thread; ++ /* Round shared cache size to multiple of 256 bytes. */ ++- shared = shared & ~255L; ++- __x86_shared_cache_size_half = shared / 2; ++- __x86_shared_cache_size = shared; +++ shared_per_thread = shared_per_thread & ~255L; +++ __x86_shared_cache_size_half = shared_per_thread / 2; +++ __x86_shared_cache_size = shared_per_thread; ++ } ++ ++- /* The large memcpy micro benchmark in glibc shows that 6 times of ++- shared cache size is the approximate value above which non-temporal ++- store becomes faster on a 8-core processor. This is the 3/4 of the ++- total shared cache size. */ +++ /* The default setting for the non_temporal threshold is [1/8, 1/2] of size +++ of the chip's cache (depending on `cachesize_non_temporal_divisor` which +++ is microarch specific. The default is 1/4). For most Intel processors +++ with an initial release date between 2017 and 2023, a thread's +++ typical share of the cache is from 18-64MB. Using a reasonable size +++ fraction of L3 is meant to estimate the point where non-temporal stores +++ begin out-competing REP MOVSB. As well the point where the fact that +++ non-temporal stores are forced back to main memory would already occurred +++ to the majority of the lines in the copy. Note, concerns about the entire +++ L3 cache being evicted by the copy are mostly alleviated by the fact that +++ modern HW detects streaming patterns and provides proper LRU hints so that +++ the maximum thrashing capped at 1/associativity. */ +++ unsigned long int non_temporal_threshold = shared / 4; +++ +++ /* If the computed non_temporal_threshold <= 3/4 * per-thread L3, we most +++ likely have incorrect/incomplete cache info in which case, default to +++ 3/4 * per-thread L3 to avoid regressions. */ +++ unsigned long int non_temporal_threshold_lowbound +++ = shared_per_thread * 3 / 4; +++ if (non_temporal_threshold < non_temporal_threshold_lowbound) +++ non_temporal_threshold = non_temporal_threshold_lowbound; +++ +++ /* If no ERMS, we use the per-thread L3 chunking. Normal cacheable stores run +++ a higher risk of actually thrashing the cache as they don't have a HW LRU +++ hint. As well, their performance in highly parallel situations is +++ noticeably worse. */ +++ if (!CPU_FEATURES_CPU_P (cpu_features, ERMS)) +++ non_temporal_threshold = non_temporal_threshold_lowbound; +++ ++ __x86_shared_non_temporal_threshold ++ = (cpu_features->non_temporal_threshold != 0 ++ ? cpu_features->non_temporal_threshold ++- : __x86_shared_cache_size * threads * 3 / 4); +++ : non_temporal_threshold); ++ } ++ ++ #endif ++diff --git a/sysdeps/x86/cpu-features.c b/sysdeps/x86/cpu-features.c ++index 81a170a819..e1c22e3e58 100644 ++--- a/sysdeps/x86/cpu-features.c +++++ b/sysdeps/x86/cpu-features.c ++@@ -333,6 +333,9 @@ init_cpu_features (struct cpu_features *cpu_features) ++ ++ get_extended_indices (cpu_features); ++ +++ if (CPU_FEATURES_CPU_P (cpu_features, RTM_ALWAYS_ABORT)) +++ cpu_features->cpuid[index_cpu_RTM].reg_RTM &= ~bit_cpu_RTM; +++ ++ if (family == 0x06) ++ { ++ model += extended_model; ++@@ -394,11 +397,42 @@ init_cpu_features (struct cpu_features *cpu_features) ++ break; ++ } ++ ++- /* Disable TSX on some Haswell processors to avoid TSX on kernels that ++- weren't updated with the latest microcode package (which disables ++- broken feature by default). */ +++ /* Disable TSX on some processors to avoid TSX on kernels that +++ weren't updated with the latest microcode package (which +++ disables broken feature by default). */ ++ switch (model) ++ { +++ case 0x55: +++ if (stepping <= 5) +++ goto disable_tsx; +++ break; +++ case 0x8e: +++ /* NB: Although the errata documents that for model == 0x8e, +++ only 0xb stepping or lower are impacted, the intention of +++ the errata was to disable TSX on all client processors on +++ all steppings. Include 0xc stepping which is an Intel +++ Core i7-8665U, a client mobile processor. */ +++ case 0x9e: +++ if (stepping > 0xc) +++ break; +++ /* Fall through. */ +++ case 0x4e: +++ case 0x5e: +++ { +++ /* Disable Intel TSX and enable RTM_ALWAYS_ABORT for +++ processors listed in: +++ +++https://www.intel.com/content/www/us/en/support/articles/000059422/processors.html +++ */ +++disable_tsx: +++ cpu_features->cpuid[index_cpu_HLE].reg_HLE +++ &= ~bit_cpu_HLE; +++ cpu_features->cpuid[index_cpu_RTM].reg_RTM +++ &= ~bit_cpu_RTM; +++ cpu_features->cpuid[index_cpu_RTM_ALWAYS_ABORT].reg_RTM_ALWAYS_ABORT +++ |= bit_cpu_RTM_ALWAYS_ABORT; +++ } +++ break; ++ case 0x3f: ++ /* Xeon E7 v3 with stepping >= 4 has working TSX. */ ++ if (stepping >= 4) ++@@ -424,8 +458,24 @@ init_cpu_features (struct cpu_features *cpu_features) ++ cpu_features->feature[index_arch_Prefer_No_VZEROUPPER] ++ |= bit_arch_Prefer_No_VZEROUPPER; ++ else ++- cpu_features->feature[index_arch_Prefer_No_AVX512] ++- |= bit_arch_Prefer_No_AVX512; +++ { +++ cpu_features->feature[index_arch_Prefer_No_AVX512] +++ |= bit_arch_Prefer_No_AVX512; +++ +++ /* Avoid RTM abort triggered by VZEROUPPER inside a +++ transactionally executing RTM region. */ +++ if (CPU_FEATURES_CPU_P (cpu_features, RTM)) +++ cpu_features->feature[index_arch_Prefer_No_VZEROUPPER] +++ |= bit_arch_Prefer_No_VZEROUPPER; +++ +++ /* Since to compare 2 32-byte strings, 256-bit EVEX strcmp +++ requires 2 loads, 3 VPCMPs and 2 KORDs while AVX2 strcmp +++ requires 1 load, 2 VPCMPEQs, 1 VPMINU and 1 VPMOVMSKB, +++ AVX2 strcmp is faster than EVEX strcmp. */ +++ if (CPU_FEATURES_ARCH_P (cpu_features, AVX2_Usable)) +++ cpu_features->feature[index_arch_Prefer_AVX2_STRCMP] +++ |= bit_arch_Prefer_AVX2_STRCMP; +++ } ++ } ++ /* This spells out "AuthenticAMD" or "HygonGenuine". */ ++ else if ((ebx == 0x68747541 && ecx == 0x444d4163 && edx == 0x69746e65) ++diff --git a/sysdeps/x86/cpu-features.h b/sysdeps/x86/cpu-features.h ++index aea83e6e31..9fb97907b5 100644 ++--- a/sysdeps/x86/cpu-features.h +++++ b/sysdeps/x86/cpu-features.h ++@@ -499,6 +499,7 @@ extern const struct cpu_features *__get_cpu_features (void) ++ #define bit_cpu_AVX512_4VNNIW (1u << 2) ++ #define bit_cpu_AVX512_4FMAPS (1u << 3) ++ #define bit_cpu_FSRM (1u << 4) +++#define bit_cpu_RTM_ALWAYS_ABORT (1u << 11) ++ #define bit_cpu_PCONFIG (1u << 18) ++ #define bit_cpu_IBT (1u << 20) ++ #define bit_cpu_IBRS_IBPB (1u << 26) ++@@ -667,6 +668,7 @@ extern const struct cpu_features *__get_cpu_features (void) ++ #define index_cpu_AVX512_4VNNIW COMMON_CPUID_INDEX_7 ++ #define index_cpu_AVX512_4FMAPS COMMON_CPUID_INDEX_7 ++ #define index_cpu_FSRM COMMON_CPUID_INDEX_7 +++#define index_cpu_RTM_ALWAYS_ABORT COMMON_CPUID_INDEX_7 ++ #define index_cpu_PCONFIG COMMON_CPUID_INDEX_7 ++ #define index_cpu_IBT COMMON_CPUID_INDEX_7 ++ #define index_cpu_IBRS_IBPB COMMON_CPUID_INDEX_7 ++@@ -835,6 +837,7 @@ extern const struct cpu_features *__get_cpu_features (void) ++ #define reg_AVX512_4VNNIW edx ++ #define reg_AVX512_4FMAPS edx ++ #define reg_FSRM edx +++#define reg_RTM_ALWAYS_ABORT edx ++ #define reg_PCONFIG edx ++ #define reg_IBT edx ++ #define reg_IBRS_IBPB edx ++@@ -897,6 +900,7 @@ extern const struct cpu_features *__get_cpu_features (void) ++ #define bit_arch_Prefer_FSRM (1u << 13) ++ #define bit_arch_Prefer_No_AVX512 (1u << 14) ++ #define bit_arch_MathVec_Prefer_No_AVX512 (1u << 15) +++#define bit_arch_Prefer_AVX2_STRCMP (1u << 16) ++ ++ #define index_arch_Fast_Rep_String FEATURE_INDEX_2 ++ #define index_arch_Fast_Copy_Backward FEATURE_INDEX_2 ++@@ -914,6 +918,7 @@ extern const struct cpu_features *__get_cpu_features (void) ++ #define index_arch_Prefer_No_AVX512 FEATURE_INDEX_2 ++ #define index_arch_MathVec_Prefer_No_AVX512 FEATURE_INDEX_2 ++ #define index_arch_Prefer_FSRM FEATURE_INDEX_2 +++#define index_arch_Prefer_AVX2_STRCMP FEATURE_INDEX_2 ++ ++ /* XCR0 Feature flags. */ ++ #define bit_XMM_state (1u << 1) ++diff --git a/sysdeps/x86/cpu-tunables.c b/sysdeps/x86/cpu-tunables.c ++index 861bd7bcaa..cb83ecc3b2 100644 ++--- a/sysdeps/x86/cpu-tunables.c +++++ b/sysdeps/x86/cpu-tunables.c ++@@ -282,6 +282,9 @@ TUNABLE_CALLBACK (set_hwcaps) (tunable_val_t *valp) ++ CHECK_GLIBC_IFUNC_ARCH_BOTH (n, cpu_features, ++ Fast_Copy_Backward, disable, ++ 18); +++ CHECK_GLIBC_IFUNC_ARCH_NEED_ARCH_BOTH +++ (n, cpu_features, Prefer_AVX2_STRCMP, AVX2_Usable, +++ disable, 18); ++ } ++ break; ++ case 19: ++diff --git a/sysdeps/x86/dl-cet.c b/sysdeps/x86/dl-cet.c ++index ca3b5849bc..8ffaf94a00 100644 ++--- a/sysdeps/x86/dl-cet.c +++++ b/sysdeps/x86/dl-cet.c ++@@ -105,7 +105,11 @@ dl_cet_check (struct link_map *m, const char *program) ++ /* No legacy object check if both IBT and SHSTK are always on. */ ++ if (enable_ibt_type == CET_ALWAYS_ON ++ && enable_shstk_type == CET_ALWAYS_ON) ++- return; +++ { +++ THREAD_SETMEM (THREAD_SELF, header.feature_1, +++ GL(dl_x86_feature_1)[0]); +++ return; +++ } ++ ++ /* Check if IBT is enabled by kernel. */ ++ bool ibt_enabled ++diff --git a/sysdeps/x86/tst-get-cpu-features.c b/sysdeps/x86/tst-get-cpu-features.c ++index 0f55987ae5..bbb5cd356d 100644 ++--- a/sysdeps/x86/tst-get-cpu-features.c +++++ b/sysdeps/x86/tst-get-cpu-features.c ++@@ -176,6 +176,7 @@ do_test (void) ++ CHECK_CPU_FEATURE (AVX512_4VNNIW); ++ CHECK_CPU_FEATURE (AVX512_4FMAPS); ++ CHECK_CPU_FEATURE (FSRM); +++ CHECK_CPU_FEATURE (RTM_ALWAYS_ABORT); ++ CHECK_CPU_FEATURE (PCONFIG); ++ CHECK_CPU_FEATURE (IBT); ++ CHECK_CPU_FEATURE (IBRS_IBPB); ++diff --git a/sysdeps/x86/tst-memchr-rtm.c b/sysdeps/x86/tst-memchr-rtm.c ++new file mode 100644 ++index 0000000000..e47494011e ++--- /dev/null +++++ b/sysdeps/x86/tst-memchr-rtm.c ++@@ -0,0 +1,54 @@ +++/* Test case for memchr inside a transactionally executing RTM region. +++ Copyright (C) 2021 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 +++ . */ +++ +++#include +++ +++#define LOOP 3000 +++#define STRING_SIZE 1024 +++char string1[STRING_SIZE]; +++ +++__attribute__ ((noinline, noclone)) +++static int +++prepare (void) +++{ +++ memset (string1, 'a', STRING_SIZE); +++ string1[100] = 'c'; +++ string1[STRING_SIZE - 100] = 'c'; +++ char *p = memchr (string1, 'c', STRING_SIZE); +++ if (p == &string1[100]) +++ return EXIT_SUCCESS; +++ else +++ return EXIT_FAILURE; +++} +++ +++__attribute__ ((noinline, noclone)) +++static int +++function (void) +++{ +++ char *p = memchr (string1, 'c', STRING_SIZE); +++ if (p == &string1[100]) +++ return 0; +++ else +++ return 1; +++} +++ +++static int +++do_test (void) +++{ +++ return do_test_1 ("memchr", LOOP, prepare, function); +++} ++diff --git a/sysdeps/x86/tst-memcmp-rtm.c b/sysdeps/x86/tst-memcmp-rtm.c ++new file mode 100644 ++index 0000000000..e4c8a623bb ++--- /dev/null +++++ b/sysdeps/x86/tst-memcmp-rtm.c ++@@ -0,0 +1,52 @@ +++/* Test case for memcmp inside a transactionally executing RTM region. +++ Copyright (C) 2021 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 +++ . */ +++ +++#include +++ +++#define LOOP 3000 +++#define STRING_SIZE 1024 +++char string1[STRING_SIZE]; +++char string2[STRING_SIZE]; +++ +++__attribute__ ((noinline, noclone)) +++static int +++prepare (void) +++{ +++ memset (string1, 'a', STRING_SIZE); +++ memset (string2, 'a', STRING_SIZE); +++ if (memcmp (string1, string2, STRING_SIZE) == 0) +++ return EXIT_SUCCESS; +++ else +++ return EXIT_FAILURE; +++} +++ +++__attribute__ ((noinline, noclone)) +++static int +++function (void) +++{ +++ if (memcmp (string1, string2, STRING_SIZE) == 0) +++ return 0; +++ else +++ return 1; +++} +++ +++static int +++do_test (void) +++{ +++ return do_test_1 ("memcmp", LOOP, prepare, function); +++} ++diff --git a/sysdeps/x86/tst-memmove-rtm.c b/sysdeps/x86/tst-memmove-rtm.c ++new file mode 100644 ++index 0000000000..4bf97ef1e3 ++--- /dev/null +++++ b/sysdeps/x86/tst-memmove-rtm.c ++@@ -0,0 +1,53 @@ +++/* Test case for memmove inside a transactionally executing RTM region. +++ Copyright (C) 2021 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 +++ . */ +++ +++#include +++ +++#define LOOP 3000 +++#define STRING_SIZE 1024 +++char string1[STRING_SIZE]; +++char string2[STRING_SIZE]; +++ +++__attribute__ ((noinline, noclone)) +++static int +++prepare (void) +++{ +++ memset (string1, 'a', STRING_SIZE); +++ if (memmove (string2, string1, STRING_SIZE) == string2 +++ && memcmp (string2, string1, STRING_SIZE) == 0) +++ return EXIT_SUCCESS; +++ else +++ return EXIT_FAILURE; +++} +++ +++__attribute__ ((noinline, noclone)) +++static int +++function (void) +++{ +++ if (memmove (string2, string1, STRING_SIZE) == string2 +++ && memcmp (string2, string1, STRING_SIZE) == 0) +++ return 0; +++ else +++ return 1; +++} +++ +++static int +++do_test (void) +++{ +++ return do_test_1 ("memmove", LOOP, prepare, function); +++} ++diff --git a/sysdeps/x86/tst-memrchr-rtm.c b/sysdeps/x86/tst-memrchr-rtm.c ++new file mode 100644 ++index 0000000000..a57a5a8eb9 ++--- /dev/null +++++ b/sysdeps/x86/tst-memrchr-rtm.c ++@@ -0,0 +1,54 @@ +++/* Test case for memrchr inside a transactionally executing RTM region. +++ Copyright (C) 2021 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 +++ . */ +++ +++#include +++ +++#define LOOP 3000 +++#define STRING_SIZE 1024 +++char string1[STRING_SIZE]; +++ +++__attribute__ ((noinline, noclone)) +++static int +++prepare (void) +++{ +++ memset (string1, 'a', STRING_SIZE); +++ string1[100] = 'c'; +++ string1[STRING_SIZE - 100] = 'c'; +++ char *p = memrchr (string1, 'c', STRING_SIZE); +++ if (p == &string1[STRING_SIZE - 100]) +++ return EXIT_SUCCESS; +++ else +++ return EXIT_FAILURE; +++} +++ +++__attribute__ ((noinline, noclone)) +++static int +++function (void) +++{ +++ char *p = memrchr (string1, 'c', STRING_SIZE); +++ if (p == &string1[STRING_SIZE - 100]) +++ return 0; +++ else +++ return 1; +++} +++ +++static int +++do_test (void) +++{ +++ return do_test_1 ("memrchr", LOOP, prepare, function); +++} ++diff --git a/sysdeps/x86/tst-memset-rtm.c b/sysdeps/x86/tst-memset-rtm.c ++new file mode 100644 ++index 0000000000..bf343a4dad ++--- /dev/null +++++ b/sysdeps/x86/tst-memset-rtm.c ++@@ -0,0 +1,45 @@ +++/* Test case for memset inside a transactionally executing RTM region. +++ Copyright (C) 2021 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 +++ . */ +++ +++#include +++ +++#define LOOP 3000 +++#define STRING_SIZE 1024 +++char string1[STRING_SIZE]; +++ +++__attribute__ ((noinline, noclone)) +++static int +++prepare (void) +++{ +++ memset (string1, 'a', STRING_SIZE); +++ return EXIT_SUCCESS; +++} +++ +++__attribute__ ((noinline, noclone)) +++static int +++function (void) +++{ +++ memset (string1, 'a', STRING_SIZE); +++ return 0; +++} +++ +++static int +++do_test (void) +++{ +++ return do_test_1 ("memset", LOOP, prepare, function); +++} ++diff --git a/sysdeps/x86/tst-setjmp-cet.c b/sysdeps/x86/tst-setjmp-cet.c ++new file mode 100644 ++index 0000000000..42c795d2a8 ++--- /dev/null +++++ b/sysdeps/x86/tst-setjmp-cet.c ++@@ -0,0 +1 @@ +++#include ++diff --git a/sysdeps/x86/tst-strchr-rtm.c b/sysdeps/x86/tst-strchr-rtm.c ++new file mode 100644 ++index 0000000000..a82e29c072 ++--- /dev/null +++++ b/sysdeps/x86/tst-strchr-rtm.c ++@@ -0,0 +1,54 @@ +++/* Test case for strchr inside a transactionally executing RTM region. +++ Copyright (C) 2021 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 +++ . */ +++ +++#include +++ +++#define LOOP 3000 +++#define STRING_SIZE 1024 +++char string1[STRING_SIZE]; +++ +++__attribute__ ((noinline, noclone)) +++static int +++prepare (void) +++{ +++ memset (string1, 'a', STRING_SIZE - 1); +++ string1[100] = 'c'; +++ string1[STRING_SIZE - 100] = 'c'; +++ char *p = strchr (string1, 'c'); +++ if (p == &string1[100]) +++ return EXIT_SUCCESS; +++ else +++ return EXIT_FAILURE; +++} +++ +++__attribute__ ((noinline, noclone)) +++static int +++function (void) +++{ +++ char *p = strchr (string1, 'c'); +++ if (p == &string1[100]) +++ return 0; +++ else +++ return 1; +++} +++ +++static int +++do_test (void) +++{ +++ return do_test_1 ("strchr", LOOP, prepare, function); +++} ++diff --git a/sysdeps/x86/tst-strcpy-rtm.c b/sysdeps/x86/tst-strcpy-rtm.c ++new file mode 100644 ++index 0000000000..2b2a583fb4 ++--- /dev/null +++++ b/sysdeps/x86/tst-strcpy-rtm.c ++@@ -0,0 +1,53 @@ +++/* Test case for strcpy inside a transactionally executing RTM region. +++ Copyright (C) 2021 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 +++ . */ +++ +++#include +++ +++#define LOOP 3000 +++#define STRING_SIZE 1024 +++char string1[STRING_SIZE]; +++char string2[STRING_SIZE]; +++ +++__attribute__ ((noinline, noclone)) +++static int +++prepare (void) +++{ +++ memset (string1, 'a', STRING_SIZE - 1); +++ if (strcpy (string2, string1) == string2 +++ && strcmp (string2, string1) == 0) +++ return EXIT_SUCCESS; +++ else +++ return EXIT_FAILURE; +++} +++ +++__attribute__ ((noinline, noclone)) +++static int +++function (void) +++{ +++ if (strcpy (string2, string1) == string2 +++ && strcmp (string2, string1) == 0) +++ return 0; +++ else +++ return 1; +++} +++ +++static int +++do_test (void) +++{ +++ return do_test_1 ("strcpy", LOOP, prepare, function); +++} ++diff --git a/sysdeps/x86/tst-string-rtm.h b/sysdeps/x86/tst-string-rtm.h ++new file mode 100644 ++index 0000000000..6ed9eca017 ++--- /dev/null +++++ b/sysdeps/x86/tst-string-rtm.h ++@@ -0,0 +1,72 @@ +++/* Test string function in a transactionally executing RTM region. +++ Copyright (C) 2021 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 +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++ +++static int +++do_test_1 (const char *name, unsigned int loop, int (*prepare) (void), +++ int (*function) (void)) +++{ +++ if (!CPU_FEATURE_USABLE (RTM)) +++ return EXIT_UNSUPPORTED; +++ +++ int status = prepare (); +++ if (status != EXIT_SUCCESS) +++ return status; +++ +++ unsigned int i; +++ unsigned int naborts = 0; +++ unsigned int failed = 0; +++ for (i = 0; i < loop; i++) +++ { +++ failed |= function (); +++ if (_xbegin() == _XBEGIN_STARTED) +++ { +++ failed |= function (); +++ _xend(); +++ } +++ else +++ { +++ failed |= function (); +++ ++naborts; +++ } +++ } +++ +++ if (failed) +++ FAIL_EXIT1 ("%s() failed", name); +++ +++ if (naborts) +++ { +++ /* NB: Low single digit (<= 5%) noise-level aborts are normal for +++ TSX. */ +++ double rate = 100 * ((double) naborts) / ((double) loop); +++ if (rate > 5) +++ FAIL_EXIT1 ("TSX abort rate: %.2f%% (%d out of %d)", +++ rate, naborts, loop); +++ } +++ +++ return EXIT_SUCCESS; +++} +++ +++static int do_test (void); +++ +++#include ++diff --git a/sysdeps/x86/tst-strlen-rtm.c b/sysdeps/x86/tst-strlen-rtm.c ++new file mode 100644 ++index 0000000000..0dcf14db87 ++--- /dev/null +++++ b/sysdeps/x86/tst-strlen-rtm.c ++@@ -0,0 +1,53 @@ +++/* Test case for strlen inside a transactionally executing RTM region. +++ Copyright (C) 2021 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 +++ . */ +++ +++#include +++ +++#define LOOP 3000 +++#define STRING_SIZE 1024 +++char string1[STRING_SIZE]; +++ +++__attribute__ ((noinline, noclone)) +++static int +++prepare (void) +++{ +++ memset (string1, 'a', STRING_SIZE - 1); +++ string1[STRING_SIZE - 100] = '\0'; +++ size_t len = strlen (string1); +++ if (len == STRING_SIZE - 100) +++ return EXIT_SUCCESS; +++ else +++ return EXIT_FAILURE; +++} +++ +++__attribute__ ((noinline, noclone)) +++static int +++function (void) +++{ +++ size_t len = strlen (string1); +++ if (len == STRING_SIZE - 100) +++ return 0; +++ else +++ return 1; +++} +++ +++static int +++do_test (void) +++{ +++ return do_test_1 ("strlen", LOOP, prepare, function); +++} ++diff --git a/sysdeps/x86/tst-strncmp-rtm.c b/sysdeps/x86/tst-strncmp-rtm.c ++new file mode 100644 ++index 0000000000..aef9866cf2 ++--- /dev/null +++++ b/sysdeps/x86/tst-strncmp-rtm.c ++@@ -0,0 +1,81 @@ +++/* Test case for strncmp inside a transactionally executing RTM region. +++ Copyright (C) 2021 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 +++ . */ +++ +++#include +++#include +++ +++#ifdef WIDE +++# define CHAR wchar_t +++# define MEMSET wmemset +++# define STRNCMP wcsncmp +++# define TEST_NAME "wcsncmp" +++#else /* !WIDE */ +++# define CHAR char +++# define MEMSET memset +++# define STRNCMP strncmp +++# define TEST_NAME "strncmp" +++#endif /* !WIDE */ +++ +++ +++ +++#define LOOP 3000 +++#define STRING_SIZE 1024 +++CHAR string1[STRING_SIZE]; +++CHAR string2[STRING_SIZE]; +++ +++__attribute__ ((noinline, noclone)) +++static int +++prepare (void) +++{ +++ MEMSET (string1, 'a', STRING_SIZE - 1); +++ MEMSET (string2, 'a', STRING_SIZE - 1); +++ if (STRNCMP (string1, string2, STRING_SIZE) == 0) +++ return EXIT_SUCCESS; +++ else +++ return EXIT_FAILURE; +++} +++ +++__attribute__ ((noinline, noclone)) +++static int +++function (void) +++{ +++ if (STRNCMP (string1, string2, STRING_SIZE) == 0) +++ return 0; +++ else +++ return 1; +++} +++ +++__attribute__ ((noinline, noclone)) +++static int +++function_overflow (void) +++{ +++ if (STRNCMP (string1, string2, SIZE_MAX) == 0) +++ return 0; +++ else +++ return 1; +++} +++ +++static int +++do_test (void) +++{ +++ int status = do_test_1 (TEST_NAME, LOOP, prepare, function); +++ if (status != EXIT_SUCCESS) +++ return status; +++ status = do_test_1 (TEST_NAME, LOOP, prepare, function_overflow); +++ return status; +++} ++diff --git a/sysdeps/x86/tst-strrchr-rtm.c b/sysdeps/x86/tst-strrchr-rtm.c ++new file mode 100644 ++index 0000000000..e32bfaf5f5 ++--- /dev/null +++++ b/sysdeps/x86/tst-strrchr-rtm.c ++@@ -0,0 +1,53 @@ +++/* Test case for strrchr inside a transactionally executing RTM region. +++ Copyright (C) 2021 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 +++ . */ +++ +++#include +++ +++#define LOOP 3000 +++#define STRING_SIZE 1024 +++char string1[STRING_SIZE]; +++ +++__attribute__ ((noinline, noclone)) +++static int +++prepare (void) +++{ +++ memset (string1, 'a', STRING_SIZE - 1); +++ string1[STRING_SIZE - 100] = 'c'; +++ char *p = strrchr (string1, 'c'); +++ if (p == &string1[STRING_SIZE - 100]) +++ return EXIT_SUCCESS; +++ else +++ return EXIT_FAILURE; +++} +++ +++__attribute__ ((noinline, noclone)) +++static int +++function (void) +++{ +++ char *p = strrchr (string1, 'c'); +++ if (p == &string1[STRING_SIZE - 100]) +++ return 0; +++ else +++ return 1; +++} +++ +++static int +++do_test (void) +++{ +++ return do_test_1 ("strrchr", LOOP, prepare, function); +++} ++diff --git a/sysdeps/x86/tst-wcsncmp-rtm.c b/sysdeps/x86/tst-wcsncmp-rtm.c ++new file mode 100644 ++index 0000000000..bad3b86378 ++--- /dev/null +++++ b/sysdeps/x86/tst-wcsncmp-rtm.c ++@@ -0,0 +1,21 @@ +++/* Test case for wcsncmp inside a transactionally executing RTM region. +++ Copyright (C) 2022 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 +++ . */ +++ +++#define WIDE 1 +++#include +++#include "tst-strncmp-rtm.c" ++diff --git a/sysdeps/x86_64/Makefile b/sysdeps/x86_64/Makefile ++index d51cf03ac9..b1951adce9 100644 ++--- a/sysdeps/x86_64/Makefile +++++ b/sysdeps/x86_64/Makefile ++@@ -20,6 +20,8 @@ endif ++ ifeq ($(subdir),string) ++ sysdep_routines += cacheinfo strcasecmp_l-nonascii strncase_l-nonascii ++ gen-as-const-headers += locale-defines.sym +++tests += \ +++ tst-rsi-strlen ++ endif ++ ++ ifeq ($(subdir),elf) ++@@ -150,6 +152,11 @@ ifeq ($(subdir),csu) ++ gen-as-const-headers += tlsdesc.sym rtld-offsets.sym ++ endif ++ +++ifeq ($(subdir),wcsmbs) +++tests += \ +++ tst-rsi-wcslen +++endif +++ ++ $(objpfx)x86_64/tst-x86_64mod-1.os: $(objpfx)tst-x86_64mod-1.os ++ $(make-target-directory) ++ rm -f $@ ++diff --git a/sysdeps/x86_64/configure b/sysdeps/x86_64/configure ++old mode 100644 ++new mode 100755 ++index 84f82c2406..fc1840e23f ++--- a/sysdeps/x86_64/configure +++++ b/sysdeps/x86_64/configure ++@@ -107,39 +107,6 @@ if test x"$build_mathvec" = xnotset; then ++ build_mathvec=yes ++ fi ++ ++-if test "$static_pie" = yes; then ++- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for linker static PIE support" >&5 ++-$as_echo_n "checking for linker static PIE support... " >&6; } ++-if ${libc_cv_ld_static_pie+:} false; then : ++- $as_echo_n "(cached) " >&6 ++-else ++- cat > conftest.s <<\EOF ++- .text ++- .global _start ++- .weak foo ++-_start: ++- leaq foo(%rip), %rax ++-EOF ++- libc_cv_pie_option="-Wl,-pie" ++- if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -nostartfiles -nostdlib $no_ssp $libc_cv_pie_option -o conftest conftest.s 1>&5' ++- { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 ++- (eval $ac_try) 2>&5 ++- ac_status=$? ++- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++- test $ac_status = 0; }; }; then ++- libc_cv_ld_static_pie=yes ++- else ++- libc_cv_ld_static_pie=no ++- fi ++-rm -f conftest* ++-fi ++-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_ld_static_pie" >&5 ++-$as_echo "$libc_cv_ld_static_pie" >&6; } ++- if test "$libc_cv_ld_static_pie" != yes; then ++- as_fn_error $? "linker support for static PIE needed" "$LINENO" 5 ++- fi ++-fi ++- ++ $as_echo "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h ++ ++ ++diff --git a/sysdeps/x86_64/configure.ac b/sysdeps/x86_64/configure.ac ++index cdaba0c075..611a7d9ba3 100644 ++--- a/sysdeps/x86_64/configure.ac +++++ b/sysdeps/x86_64/configure.ac ++@@ -53,31 +53,6 @@ if test x"$build_mathvec" = xnotset; then ++ build_mathvec=yes ++ fi ++ ++-dnl Check if linker supports static PIE with the fix for ++-dnl ++-dnl https://sourceware.org/bugzilla/show_bug.cgi?id=21782 ++-dnl ++-if test "$static_pie" = yes; then ++- AC_CACHE_CHECK(for linker static PIE support, libc_cv_ld_static_pie, [dnl ++-cat > conftest.s <<\EOF ++- .text ++- .global _start ++- .weak foo ++-_start: ++- leaq foo(%rip), %rax ++-EOF ++- libc_cv_pie_option="-Wl,-pie" ++- if AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -nostartfiles -nostdlib $no_ssp $libc_cv_pie_option -o conftest conftest.s 1>&AS_MESSAGE_LOG_FD); then ++- libc_cv_ld_static_pie=yes ++- else ++- libc_cv_ld_static_pie=no ++- fi ++-rm -f conftest*]) ++- if test "$libc_cv_ld_static_pie" != yes; then ++- AC_MSG_ERROR([linker support for static PIE needed]) ++- fi ++-fi ++- ++ dnl It is always possible to access static and hidden symbols in an ++ dnl position independent way. ++ AC_DEFINE(PI_STATIC_AND_HIDDEN) ++diff --git a/sysdeps/x86_64/dl-machine.h b/sysdeps/x86_64/dl-machine.h ++index 8e9baffeb4..74029871d8 100644 ++--- a/sysdeps/x86_64/dl-machine.h +++++ b/sysdeps/x86_64/dl-machine.h ++@@ -315,16 +315,22 @@ elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc, ++ { ++ # ifndef RTLD_BOOTSTRAP ++ if (sym_map != map ++- && sym_map->l_type != lt_executable ++ && !sym_map->l_relocated) ++ { ++ const char *strtab ++ = (const char *) D_PTR (map, l_info[DT_STRTAB]); ++- _dl_error_printf ("\ +++ if (sym_map->l_type == lt_executable) +++ _dl_fatal_printf ("\ +++%s: IFUNC symbol '%s' referenced in '%s' is defined in the executable \ +++and creates an unsatisfiable circular dependency.\n", +++ RTLD_PROGNAME, strtab + refsym->st_name, +++ map->l_name); +++ else +++ _dl_error_printf ("\ ++ %s: Relink `%s' with `%s' for IFUNC symbol `%s'\n", ++- RTLD_PROGNAME, map->l_name, ++- sym_map->l_name, ++- strtab + refsym->st_name); +++ RTLD_PROGNAME, map->l_name, +++ sym_map->l_name, +++ strtab + refsym->st_name); ++ } ++ # endif ++ value = ((ElfW(Addr) (*) (void)) value) (); ++diff --git a/sysdeps/x86_64/ffsll.c b/sysdeps/x86_64/ffsll.c ++index 594ee5c681..e056ac4b4f 100644 ++--- a/sysdeps/x86_64/ffsll.c +++++ b/sysdeps/x86_64/ffsll.c ++@@ -27,13 +27,13 @@ int ++ ffsll (long long int x) ++ { ++ long long int cnt; ++- long long int tmp; ++ ++- asm ("bsfq %2,%0\n" /* Count low bits in X and store in %1. */ ++- "cmoveq %1,%0\n" /* If number was zero, use -1 as result. */ ++- : "=&r" (cnt), "=r" (tmp) : "rm" (x), "1" (-1)); +++ asm ("mov $-1,%k0\n" /* Initialize cnt to -1. */ +++ "bsf %1,%0\n" /* Count low bits in x and store in cnt. */ +++ "inc %k0\n" /* Increment cnt by 1. */ +++ : "=&r" (cnt) : "r" (x)); ++ ++- return cnt + 1; +++ return cnt; ++ } ++ ++ #ifndef __ILP32__ ++diff --git a/sysdeps/x86_64/memchr.S b/sysdeps/x86_64/memchr.S ++index a5c879d2af..070e5ef90b 100644 ++--- a/sysdeps/x86_64/memchr.S +++++ b/sysdeps/x86_64/memchr.S ++@@ -21,9 +21,11 @@ ++ #ifdef USE_AS_WMEMCHR ++ # define MEMCHR wmemchr ++ # define PCMPEQ pcmpeqd +++# define CHAR_PER_VEC 4 ++ #else ++ # define MEMCHR memchr ++ # define PCMPEQ pcmpeqb +++# define CHAR_PER_VEC 16 ++ #endif ++ ++ /* fast SSE2 version with using pmaxub and 64 byte loop */ ++@@ -33,15 +35,14 @@ ENTRY(MEMCHR) ++ movd %esi, %xmm1 ++ mov %edi, %ecx ++ +++#ifdef __ILP32__ +++ /* Clear the upper 32 bits. */ +++ movl %edx, %edx +++#endif ++ #ifdef USE_AS_WMEMCHR ++ test %RDX_LP, %RDX_LP ++ jz L(return_null) ++- shl $2, %RDX_LP ++ #else ++-# ifdef __ILP32__ ++- /* Clear the upper 32 bits. */ ++- movl %edx, %edx ++-# endif ++ punpcklbw %xmm1, %xmm1 ++ test %RDX_LP, %RDX_LP ++ jz L(return_null) ++@@ -60,13 +61,16 @@ ENTRY(MEMCHR) ++ test %eax, %eax ++ ++ jnz L(matches_1) ++- sub $16, %rdx +++ sub $CHAR_PER_VEC, %rdx ++ jbe L(return_null) ++ add $16, %rdi ++ and $15, %ecx ++ and $-16, %rdi +++#ifdef USE_AS_WMEMCHR +++ shr $2, %ecx +++#endif ++ add %rcx, %rdx ++- sub $64, %rdx +++ sub $(CHAR_PER_VEC * 4), %rdx ++ jbe L(exit_loop) ++ jmp L(loop_prolog) ++ ++@@ -77,16 +81,21 @@ L(crosscache): ++ movdqa (%rdi), %xmm0 ++ ++ PCMPEQ %xmm1, %xmm0 ++-/* Check if there is a match. */ +++ /* Check if there is a match. */ ++ pmovmskb %xmm0, %eax ++-/* Remove the leading bytes. */ +++ /* Remove the leading bytes. */ ++ sar %cl, %eax ++ test %eax, %eax ++ je L(unaligned_no_match) ++-/* Check which byte is a match. */ +++ /* Check which byte is a match. */ ++ bsf %eax, %eax ++- +++#ifdef USE_AS_WMEMCHR +++ mov %eax, %esi +++ shr $2, %esi +++ sub %rsi, %rdx +++#else ++ sub %rax, %rdx +++#endif ++ jbe L(return_null) ++ add %rdi, %rax ++ add %rcx, %rax ++@@ -94,15 +103,18 @@ L(crosscache): ++ ++ .p2align 4 ++ L(unaligned_no_match): ++- /* "rcx" is less than 16. Calculate "rdx + rcx - 16" by using +++ /* "rcx" is less than 16. Calculate "rdx + rcx - 16" by using ++ "rdx - (16 - rcx)" instead of "(rdx + rcx) - 16" to void ++ possible addition overflow. */ ++ neg %rcx ++ add $16, %rcx +++#ifdef USE_AS_WMEMCHR +++ shr $2, %ecx +++#endif ++ sub %rcx, %rdx ++ jbe L(return_null) ++ add $16, %rdi ++- sub $64, %rdx +++ sub $(CHAR_PER_VEC * 4), %rdx ++ jbe L(exit_loop) ++ ++ .p2align 4 ++@@ -135,7 +147,7 @@ L(loop_prolog): ++ test $0x3f, %rdi ++ jz L(align64_loop) ++ ++- sub $64, %rdx +++ sub $(CHAR_PER_VEC * 4), %rdx ++ jbe L(exit_loop) ++ ++ movdqa (%rdi), %xmm0 ++@@ -167,11 +179,14 @@ L(loop_prolog): ++ mov %rdi, %rcx ++ and $-64, %rdi ++ and $63, %ecx +++#ifdef USE_AS_WMEMCHR +++ shr $2, %ecx +++#endif ++ add %rcx, %rdx ++ ++ .p2align 4 ++ L(align64_loop): ++- sub $64, %rdx +++ sub $(CHAR_PER_VEC * 4), %rdx ++ jbe L(exit_loop) ++ movdqa (%rdi), %xmm0 ++ movdqa 16(%rdi), %xmm2 ++@@ -218,7 +233,7 @@ L(align64_loop): ++ ++ .p2align 4 ++ L(exit_loop): ++- add $32, %edx +++ add $(CHAR_PER_VEC * 2), %edx ++ jle L(exit_loop_32) ++ ++ movdqa (%rdi), %xmm0 ++@@ -238,7 +253,7 @@ L(exit_loop): ++ pmovmskb %xmm3, %eax ++ test %eax, %eax ++ jnz L(matches32_1) ++- sub $16, %edx +++ sub $CHAR_PER_VEC, %edx ++ jle L(return_null) ++ ++ PCMPEQ 48(%rdi), %xmm1 ++@@ -250,13 +265,13 @@ L(exit_loop): ++ ++ .p2align 4 ++ L(exit_loop_32): ++- add $32, %edx +++ add $(CHAR_PER_VEC * 2), %edx ++ movdqa (%rdi), %xmm0 ++ PCMPEQ %xmm1, %xmm0 ++ pmovmskb %xmm0, %eax ++ test %eax, %eax ++ jnz L(matches_1) ++- sub $16, %edx +++ sub $CHAR_PER_VEC, %edx ++ jbe L(return_null) ++ ++ PCMPEQ 16(%rdi), %xmm1 ++@@ -293,7 +308,13 @@ L(matches32): ++ .p2align 4 ++ L(matches_1): ++ bsf %eax, %eax +++#ifdef USE_AS_WMEMCHR +++ mov %eax, %esi +++ shr $2, %esi +++ sub %rsi, %rdx +++#else ++ sub %rax, %rdx +++#endif ++ jbe L(return_null) ++ add %rdi, %rax ++ ret ++@@ -301,7 +322,13 @@ L(matches_1): ++ .p2align 4 ++ L(matches16_1): ++ bsf %eax, %eax +++#ifdef USE_AS_WMEMCHR +++ mov %eax, %esi +++ shr $2, %esi +++ sub %rsi, %rdx +++#else ++ sub %rax, %rdx +++#endif ++ jbe L(return_null) ++ lea 16(%rdi, %rax), %rax ++ ret ++@@ -309,7 +336,13 @@ L(matches16_1): ++ .p2align 4 ++ L(matches32_1): ++ bsf %eax, %eax +++#ifdef USE_AS_WMEMCHR +++ mov %eax, %esi +++ shr $2, %esi +++ sub %rsi, %rdx +++#else ++ sub %rax, %rdx +++#endif ++ jbe L(return_null) ++ lea 32(%rdi, %rax), %rax ++ ret ++@@ -317,7 +350,13 @@ L(matches32_1): ++ .p2align 4 ++ L(matches48_1): ++ bsf %eax, %eax +++#ifdef USE_AS_WMEMCHR +++ mov %eax, %esi +++ shr $2, %esi +++ sub %rsi, %rdx +++#else ++ sub %rax, %rdx +++#endif ++ jbe L(return_null) ++ lea 48(%rdi, %rax), %rax ++ ret ++diff --git a/sysdeps/x86_64/multiarch/Makefile b/sysdeps/x86_64/multiarch/Makefile ++index 395e432c09..da1446d731 100644 ++--- a/sysdeps/x86_64/multiarch/Makefile +++++ b/sysdeps/x86_64/multiarch/Makefile ++@@ -43,7 +43,45 @@ sysdep_routines += strncat-c stpncpy-c strncpy-c \ ++ memmove-avx512-unaligned-erms \ ++ memset-sse2-unaligned-erms \ ++ memset-avx2-unaligned-erms \ ++- memset-avx512-unaligned-erms +++ memset-avx512-unaligned-erms \ +++ memchr-avx2-rtm \ +++ memcmp-avx2-movbe-rtm \ +++ memmove-avx-unaligned-erms-rtm \ +++ memrchr-avx2-rtm \ +++ memset-avx2-unaligned-erms-rtm \ +++ rawmemchr-avx2-rtm \ +++ strchr-avx2-rtm \ +++ strcmp-avx2-rtm \ +++ strchrnul-avx2-rtm \ +++ stpcpy-avx2-rtm \ +++ stpncpy-avx2-rtm \ +++ strcat-avx2-rtm \ +++ strcpy-avx2-rtm \ +++ strlen-avx2-rtm \ +++ strncat-avx2-rtm \ +++ strncmp-avx2-rtm \ +++ strncpy-avx2-rtm \ +++ strnlen-avx2-rtm \ +++ strrchr-avx2-rtm \ +++ memchr-evex \ +++ memcmp-evex-movbe \ +++ memmove-evex-unaligned-erms \ +++ memrchr-evex \ +++ memset-evex-unaligned-erms \ +++ rawmemchr-evex \ +++ stpcpy-evex \ +++ stpncpy-evex \ +++ strcat-evex \ +++ strchr-evex \ +++ strchrnul-evex \ +++ strcmp-evex \ +++ strcpy-evex \ +++ strlen-evex \ +++ strncat-evex \ +++ strncmp-evex \ +++ strncpy-evex \ +++ strnlen-evex \ +++ strrchr-evex ++ CFLAGS-varshift.c += -msse4 ++ CFLAGS-strcspn-c.c += -msse4 ++ CFLAGS-strpbrk-c.c += -msse4 ++@@ -59,8 +97,24 @@ sysdep_routines += wmemcmp-sse4 wmemcmp-ssse3 wmemcmp-c \ ++ wcscpy-ssse3 wcscpy-c \ ++ wcschr-sse2 wcschr-avx2 \ ++ wcsrchr-sse2 wcsrchr-avx2 \ ++- wcsnlen-sse4_1 wcsnlen-c \ ++- wcslen-sse2 wcslen-avx2 wcsnlen-avx2 +++ wcslen-sse2 wcslen-sse4_1 wcslen-avx2 \ +++ wcsnlen-c wcsnlen-sse4_1 wcsnlen-avx2 \ +++ wcschr-avx2-rtm \ +++ wcscmp-avx2-rtm \ +++ wcslen-avx2-rtm \ +++ wcsncmp-avx2-rtm \ +++ wcsnlen-avx2-rtm \ +++ wcsrchr-avx2-rtm \ +++ wmemchr-avx2-rtm \ +++ wmemcmp-avx2-movbe-rtm \ +++ wcschr-evex \ +++ wcscmp-evex \ +++ wcslen-evex \ +++ wcsncmp-evex \ +++ wcsnlen-evex \ +++ wcsrchr-evex \ +++ wmemchr-evex \ +++ wmemcmp-evex-movbe ++ endif ++ ++ ifeq ($(subdir),debug) ++diff --git a/sysdeps/x86_64/multiarch/ifunc-avx2.h b/sysdeps/x86_64/multiarch/ifunc-avx2.h ++index 69f30398ae..925e5b61eb 100644 ++--- a/sysdeps/x86_64/multiarch/ifunc-avx2.h +++++ b/sysdeps/x86_64/multiarch/ifunc-avx2.h ++@@ -21,16 +21,28 @@ ++ ++ extern __typeof (REDIRECT_NAME) OPTIMIZE (sse2) attribute_hidden; ++ extern __typeof (REDIRECT_NAME) OPTIMIZE (avx2) attribute_hidden; +++extern __typeof (REDIRECT_NAME) OPTIMIZE (avx2_rtm) attribute_hidden; +++extern __typeof (REDIRECT_NAME) OPTIMIZE (evex) attribute_hidden; ++ ++ static inline void * ++ IFUNC_SELECTOR (void) ++ { ++ const struct cpu_features* cpu_features = __get_cpu_features (); ++ ++- if (!CPU_FEATURES_ARCH_P (cpu_features, Prefer_No_VZEROUPPER) ++- && CPU_FEATURES_ARCH_P (cpu_features, AVX2_Usable) +++ if (CPU_FEATURES_ARCH_P (cpu_features, AVX2_Usable) +++ && CPU_FEATURES_CPU_P (cpu_features, BMI2) ++ && CPU_FEATURES_ARCH_P (cpu_features, AVX_Fast_Unaligned_Load)) ++- return OPTIMIZE (avx2); +++ { +++ if (CPU_FEATURES_ARCH_P (cpu_features, AVX512VL_Usable) +++ && CPU_FEATURES_ARCH_P (cpu_features, AVX512BW_Usable)) +++ return OPTIMIZE (evex); +++ +++ if (CPU_FEATURES_CPU_P (cpu_features, RTM)) +++ return OPTIMIZE (avx2_rtm); +++ +++ if (!CPU_FEATURES_ARCH_P (cpu_features, Prefer_No_VZEROUPPER)) +++ return OPTIMIZE (avx2); +++ } ++ ++ return OPTIMIZE (sse2); ++ } ++diff --git a/sysdeps/x86_64/multiarch/ifunc-impl-list.c b/sysdeps/x86_64/multiarch/ifunc-impl-list.c ++index ce7eb1eecf..e712b148f5 100644 ++--- a/sysdeps/x86_64/multiarch/ifunc-impl-list.c +++++ b/sysdeps/x86_64/multiarch/ifunc-impl-list.c ++@@ -41,8 +41,19 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, ++ /* Support sysdeps/x86_64/multiarch/memchr.c. */ ++ IFUNC_IMPL (i, name, memchr, ++ IFUNC_IMPL_ADD (array, i, memchr, ++- HAS_ARCH_FEATURE (AVX2_Usable), +++ (HAS_ARCH_FEATURE (AVX2_Usable) +++ && HAS_CPU_FEATURE (BMI2)), ++ __memchr_avx2) +++ IFUNC_IMPL_ADD (array, i, memchr, +++ (HAS_ARCH_FEATURE (AVX2_Usable) +++ && HAS_CPU_FEATURE (BMI2) +++ && HAS_CPU_FEATURE (RTM)), +++ __memchr_avx2_rtm) +++ IFUNC_IMPL_ADD (array, i, memchr, +++ (HAS_ARCH_FEATURE (AVX512VL_Usable) +++ && HAS_ARCH_FEATURE (AVX512BW_Usable) +++ && HAS_CPU_FEATURE (BMI2)), +++ __memchr_evex) ++ IFUNC_IMPL_ADD (array, i, memchr, 1, __memchr_sse2)) ++ ++ /* Support sysdeps/x86_64/multiarch/memcmp.c. */ ++@@ -51,6 +62,16 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, ++ (HAS_ARCH_FEATURE (AVX2_Usable) ++ && HAS_CPU_FEATURE (MOVBE)), ++ __memcmp_avx2_movbe) +++ IFUNC_IMPL_ADD (array, i, memcmp, +++ (HAS_ARCH_FEATURE (AVX2_Usable) +++ && HAS_CPU_FEATURE (MOVBE) +++ && HAS_CPU_FEATURE (RTM)), +++ __memcmp_avx2_movbe_rtm) +++ IFUNC_IMPL_ADD (array, i, memcmp, +++ (HAS_ARCH_FEATURE (AVX512VL_Usable) +++ && HAS_ARCH_FEATURE (AVX512BW_Usable) +++ && HAS_CPU_FEATURE (MOVBE)), +++ __memcmp_evex_movbe) ++ IFUNC_IMPL_ADD (array, i, memcmp, HAS_CPU_FEATURE (SSE4_1), ++ __memcmp_sse4_1) ++ IFUNC_IMPL_ADD (array, i, memcmp, HAS_CPU_FEATURE (SSSE3), ++@@ -64,10 +85,10 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, ++ HAS_ARCH_FEATURE (AVX512F_Usable), ++ __memmove_chk_avx512_no_vzeroupper) ++ IFUNC_IMPL_ADD (array, i, __memmove_chk, ++- HAS_ARCH_FEATURE (AVX512F_Usable), +++ HAS_ARCH_FEATURE (AVX512VL_Usable), ++ __memmove_chk_avx512_unaligned) ++ IFUNC_IMPL_ADD (array, i, __memmove_chk, ++- HAS_ARCH_FEATURE (AVX512F_Usable), +++ HAS_ARCH_FEATURE (AVX512VL_Usable), ++ __memmove_chk_avx512_unaligned_erms) ++ IFUNC_IMPL_ADD (array, i, __memmove_chk, ++ HAS_ARCH_FEATURE (AVX_Usable), ++@@ -75,6 +96,20 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, ++ IFUNC_IMPL_ADD (array, i, __memmove_chk, ++ HAS_ARCH_FEATURE (AVX_Usable), ++ __memmove_chk_avx_unaligned_erms) +++ IFUNC_IMPL_ADD (array, i, __memmove_chk, +++ (HAS_ARCH_FEATURE (AVX_Usable) +++ && HAS_CPU_FEATURE (RTM)), +++ __memmove_chk_avx_unaligned_rtm) +++ IFUNC_IMPL_ADD (array, i, __memmove_chk, +++ (HAS_ARCH_FEATURE (AVX_Usable) +++ && HAS_CPU_FEATURE (RTM)), +++ __memmove_chk_avx_unaligned_erms_rtm) +++ IFUNC_IMPL_ADD (array, i, __memmove_chk, +++ HAS_ARCH_FEATURE (AVX512VL_Usable), +++ __memmove_chk_evex_unaligned) +++ IFUNC_IMPL_ADD (array, i, __memmove_chk, +++ HAS_ARCH_FEATURE (AVX512VL_Usable), +++ __memmove_chk_evex_unaligned_erms) ++ IFUNC_IMPL_ADD (array, i, __memmove_chk, ++ HAS_CPU_FEATURE (SSSE3), ++ __memmove_chk_ssse3_back) ++@@ -97,14 +132,28 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, ++ IFUNC_IMPL_ADD (array, i, memmove, ++ HAS_ARCH_FEATURE (AVX_Usable), ++ __memmove_avx_unaligned_erms) +++ IFUNC_IMPL_ADD (array, i, memmove, +++ (HAS_ARCH_FEATURE (AVX_Usable) +++ && HAS_CPU_FEATURE (RTM)), +++ __memmove_avx_unaligned_rtm) +++ IFUNC_IMPL_ADD (array, i, memmove, +++ (HAS_ARCH_FEATURE (AVX_Usable) +++ && HAS_CPU_FEATURE (RTM)), +++ __memmove_avx_unaligned_erms_rtm) +++ IFUNC_IMPL_ADD (array, i, memmove, +++ HAS_ARCH_FEATURE (AVX512VL_Usable), +++ __memmove_evex_unaligned) +++ IFUNC_IMPL_ADD (array, i, memmove, +++ HAS_ARCH_FEATURE (AVX512VL_Usable), +++ __memmove_evex_unaligned_erms) ++ IFUNC_IMPL_ADD (array, i, memmove, ++ HAS_ARCH_FEATURE (AVX512F_Usable), ++ __memmove_avx512_no_vzeroupper) ++ IFUNC_IMPL_ADD (array, i, memmove, ++- HAS_ARCH_FEATURE (AVX512F_Usable), +++ HAS_ARCH_FEATURE (AVX512VL_Usable), ++ __memmove_avx512_unaligned) ++ IFUNC_IMPL_ADD (array, i, memmove, ++- HAS_ARCH_FEATURE (AVX512F_Usable), +++ HAS_ARCH_FEATURE (AVX512VL_Usable), ++ __memmove_avx512_unaligned_erms) ++ IFUNC_IMPL_ADD (array, i, memmove, HAS_CPU_FEATURE (SSSE3), ++ __memmove_ssse3_back) ++@@ -119,8 +168,20 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, ++ /* Support sysdeps/x86_64/multiarch/memrchr.c. */ ++ IFUNC_IMPL (i, name, memrchr, ++ IFUNC_IMPL_ADD (array, i, memrchr, ++- HAS_ARCH_FEATURE (AVX2_Usable), +++ (HAS_ARCH_FEATURE (AVX2_Usable) +++ && HAS_CPU_FEATURE (BMI2)), ++ __memrchr_avx2) +++ IFUNC_IMPL_ADD (array, i, memrchr, +++ (HAS_ARCH_FEATURE (AVX2_Usable) +++ && HAS_CPU_FEATURE (BMI2) +++ && HAS_CPU_FEATURE (RTM)), +++ __memrchr_avx2_rtm) +++ IFUNC_IMPL_ADD (array, i, memrchr, +++ (HAS_ARCH_FEATURE (AVX512VL_Usable) +++ && HAS_ARCH_FEATURE (AVX512BW_Usable) +++ && HAS_CPU_FEATURE (BMI2)), +++ __memrchr_evex) +++ ++ IFUNC_IMPL_ADD (array, i, memrchr, 1, __memrchr_sse2)) ++ ++ #ifdef SHARED ++@@ -139,10 +200,28 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, ++ HAS_ARCH_FEATURE (AVX2_Usable), ++ __memset_chk_avx2_unaligned_erms) ++ IFUNC_IMPL_ADD (array, i, __memset_chk, ++- HAS_ARCH_FEATURE (AVX512F_Usable), +++ (HAS_ARCH_FEATURE (AVX2_Usable) +++ && HAS_CPU_FEATURE (RTM)), +++ __memset_chk_avx2_unaligned_rtm) +++ IFUNC_IMPL_ADD (array, i, __memset_chk, +++ (HAS_ARCH_FEATURE (AVX2_Usable) +++ && HAS_CPU_FEATURE (RTM)), +++ __memset_chk_avx2_unaligned_erms_rtm) +++ IFUNC_IMPL_ADD (array, i, __memset_chk, +++ (HAS_ARCH_FEATURE (AVX512VL_Usable) +++ && HAS_ARCH_FEATURE (AVX512BW_Usable)), +++ __memset_chk_evex_unaligned) +++ IFUNC_IMPL_ADD (array, i, __memset_chk, +++ (HAS_ARCH_FEATURE (AVX512VL_Usable) +++ && HAS_ARCH_FEATURE (AVX512BW_Usable)), +++ __memset_chk_evex_unaligned_erms) +++ IFUNC_IMPL_ADD (array, i, __memset_chk, +++ (HAS_ARCH_FEATURE (AVX512VL_Usable) +++ && HAS_ARCH_FEATURE (AVX512BW_Usable)), ++ __memset_chk_avx512_unaligned_erms) ++ IFUNC_IMPL_ADD (array, i, __memset_chk, ++- HAS_ARCH_FEATURE (AVX512F_Usable), +++ (HAS_ARCH_FEATURE (AVX512VL_Usable) +++ && HAS_ARCH_FEATURE (AVX512BW_Usable)), ++ __memset_chk_avx512_unaligned) ++ IFUNC_IMPL_ADD (array, i, __memset_chk, ++ HAS_ARCH_FEATURE (AVX512F_Usable), ++@@ -164,10 +243,28 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, ++ HAS_ARCH_FEATURE (AVX2_Usable), ++ __memset_avx2_unaligned_erms) ++ IFUNC_IMPL_ADD (array, i, memset, ++- HAS_ARCH_FEATURE (AVX512F_Usable), +++ (HAS_ARCH_FEATURE (AVX2_Usable) +++ && HAS_CPU_FEATURE (RTM)), +++ __memset_avx2_unaligned_rtm) +++ IFUNC_IMPL_ADD (array, i, memset, +++ (HAS_ARCH_FEATURE (AVX2_Usable) +++ && HAS_CPU_FEATURE (RTM)), +++ __memset_avx2_unaligned_erms_rtm) +++ IFUNC_IMPL_ADD (array, i, memset, +++ (HAS_ARCH_FEATURE (AVX512VL_Usable) +++ && HAS_ARCH_FEATURE (AVX512BW_Usable)), +++ __memset_evex_unaligned) +++ IFUNC_IMPL_ADD (array, i, memset, +++ (HAS_ARCH_FEATURE (AVX512VL_Usable) +++ && HAS_ARCH_FEATURE (AVX512BW_Usable)), +++ __memset_evex_unaligned_erms) +++ IFUNC_IMPL_ADD (array, i, memset, +++ (HAS_ARCH_FEATURE (AVX512VL_Usable) +++ && HAS_ARCH_FEATURE (AVX512BW_Usable)), ++ __memset_avx512_unaligned_erms) ++ IFUNC_IMPL_ADD (array, i, memset, ++- HAS_ARCH_FEATURE (AVX512F_Usable), +++ (HAS_ARCH_FEATURE (AVX512VL_Usable) +++ && HAS_ARCH_FEATURE (AVX512BW_Usable)), ++ __memset_avx512_unaligned) ++ IFUNC_IMPL_ADD (array, i, memset, ++ HAS_ARCH_FEATURE (AVX512F_Usable), ++@@ -177,22 +274,55 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, ++ /* Support sysdeps/x86_64/multiarch/rawmemchr.c. */ ++ IFUNC_IMPL (i, name, rawmemchr, ++ IFUNC_IMPL_ADD (array, i, rawmemchr, ++- HAS_ARCH_FEATURE (AVX2_Usable), +++ (HAS_ARCH_FEATURE (AVX2_Usable) +++ && HAS_CPU_FEATURE (BMI2)), ++ __rawmemchr_avx2) +++ IFUNC_IMPL_ADD (array, i, rawmemchr, +++ (HAS_ARCH_FEATURE (AVX2_Usable) +++ && HAS_CPU_FEATURE (BMI2) +++ && HAS_CPU_FEATURE (RTM)), +++ __rawmemchr_avx2_rtm) +++ IFUNC_IMPL_ADD (array, i, rawmemchr, +++ (HAS_ARCH_FEATURE (AVX512VL_Usable) +++ && HAS_ARCH_FEATURE (AVX512BW_Usable) +++ && HAS_CPU_FEATURE (BMI2)), +++ __rawmemchr_evex) ++ IFUNC_IMPL_ADD (array, i, rawmemchr, 1, __rawmemchr_sse2)) ++ ++ /* Support sysdeps/x86_64/multiarch/strlen.c. */ ++ IFUNC_IMPL (i, name, strlen, ++ IFUNC_IMPL_ADD (array, i, strlen, ++- HAS_ARCH_FEATURE (AVX2_Usable), +++ (HAS_ARCH_FEATURE (AVX2_Usable) +++ && HAS_CPU_FEATURE (BMI2)), ++ __strlen_avx2) +++ IFUNC_IMPL_ADD (array, i, strlen, +++ (HAS_ARCH_FEATURE (AVX2_Usable) +++ && HAS_CPU_FEATURE (BMI2) +++ && HAS_CPU_FEATURE (RTM)), +++ __strlen_avx2_rtm) +++ IFUNC_IMPL_ADD (array, i, strlen, +++ (HAS_ARCH_FEATURE (AVX512VL_Usable) +++ && HAS_ARCH_FEATURE (AVX512BW_Usable) +++ && HAS_CPU_FEATURE (BMI2)), +++ __strlen_evex) ++ IFUNC_IMPL_ADD (array, i, strlen, 1, __strlen_sse2)) ++ ++ /* Support sysdeps/x86_64/multiarch/strnlen.c. */ ++ IFUNC_IMPL (i, name, strnlen, ++ IFUNC_IMPL_ADD (array, i, strnlen, ++- HAS_ARCH_FEATURE (AVX2_Usable), +++ (HAS_ARCH_FEATURE (AVX2_Usable) +++ && HAS_CPU_FEATURE (BMI2)), ++ __strnlen_avx2) +++ IFUNC_IMPL_ADD (array, i, strnlen, +++ (HAS_ARCH_FEATURE (AVX2_Usable) +++ && HAS_CPU_FEATURE (BMI2) +++ && HAS_CPU_FEATURE (RTM)), +++ __strnlen_avx2_rtm) +++ IFUNC_IMPL_ADD (array, i, strnlen, +++ (HAS_ARCH_FEATURE (AVX512VL_Usable) +++ && HAS_ARCH_FEATURE (AVX512BW_Usable) +++ && HAS_CPU_FEATURE (BMI2)), +++ __strnlen_evex) ++ IFUNC_IMPL_ADD (array, i, strnlen, 1, __strnlen_sse2)) ++ ++ /* Support sysdeps/x86_64/multiarch/stpncpy.c. */ ++@@ -201,6 +331,14 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, ++ __stpncpy_ssse3) ++ IFUNC_IMPL_ADD (array, i, stpncpy, HAS_ARCH_FEATURE (AVX2_Usable), ++ __stpncpy_avx2) +++ IFUNC_IMPL_ADD (array, i, stpncpy, +++ (HAS_ARCH_FEATURE (AVX2_Usable) +++ && HAS_CPU_FEATURE (RTM)), +++ __stpncpy_avx2_rtm) +++ IFUNC_IMPL_ADD (array, i, stpncpy, +++ (HAS_ARCH_FEATURE (AVX512VL_Usable) +++ && HAS_ARCH_FEATURE (AVX512BW_Usable)), +++ __stpncpy_evex) ++ IFUNC_IMPL_ADD (array, i, stpncpy, 1, ++ __stpncpy_sse2_unaligned) ++ IFUNC_IMPL_ADD (array, i, stpncpy, 1, __stpncpy_sse2)) ++@@ -211,6 +349,14 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, ++ __stpcpy_ssse3) ++ IFUNC_IMPL_ADD (array, i, stpcpy, HAS_ARCH_FEATURE (AVX2_Usable), ++ __stpcpy_avx2) +++ IFUNC_IMPL_ADD (array, i, stpcpy, +++ (HAS_ARCH_FEATURE (AVX2_Usable) +++ && HAS_CPU_FEATURE (RTM)), +++ __stpcpy_avx2_rtm) +++ IFUNC_IMPL_ADD (array, i, stpcpy, +++ (HAS_ARCH_FEATURE (AVX512VL_Usable) +++ && HAS_ARCH_FEATURE (AVX512BW_Usable)), +++ __stpcpy_evex) ++ IFUNC_IMPL_ADD (array, i, stpcpy, 1, __stpcpy_sse2_unaligned) ++ IFUNC_IMPL_ADD (array, i, stpcpy, 1, __stpcpy_sse2)) ++ ++@@ -245,6 +391,14 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, ++ IFUNC_IMPL (i, name, strcat, ++ IFUNC_IMPL_ADD (array, i, strcat, HAS_ARCH_FEATURE (AVX2_Usable), ++ __strcat_avx2) +++ IFUNC_IMPL_ADD (array, i, strcat, +++ (HAS_ARCH_FEATURE (AVX2_Usable) +++ && HAS_CPU_FEATURE (RTM)), +++ __strcat_avx2_rtm) +++ IFUNC_IMPL_ADD (array, i, strcat, +++ (HAS_ARCH_FEATURE (AVX512VL_Usable) +++ && HAS_ARCH_FEATURE (AVX512BW_Usable)), +++ __strcat_evex) ++ IFUNC_IMPL_ADD (array, i, strcat, HAS_CPU_FEATURE (SSSE3), ++ __strcat_ssse3) ++ IFUNC_IMPL_ADD (array, i, strcat, 1, __strcat_sse2_unaligned) ++@@ -253,23 +407,56 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, ++ /* Support sysdeps/x86_64/multiarch/strchr.c. */ ++ IFUNC_IMPL (i, name, strchr, ++ IFUNC_IMPL_ADD (array, i, strchr, ++- HAS_ARCH_FEATURE (AVX2_Usable), +++ (HAS_ARCH_FEATURE (AVX2_Usable) +++ && HAS_CPU_FEATURE (BMI2)), ++ __strchr_avx2) +++ IFUNC_IMPL_ADD (array, i, strchr, +++ (HAS_ARCH_FEATURE (AVX2_Usable) +++ && HAS_CPU_FEATURE (BMI2) +++ && HAS_CPU_FEATURE (RTM)), +++ __strchr_avx2_rtm) +++ IFUNC_IMPL_ADD (array, i, strchr, +++ (HAS_ARCH_FEATURE (AVX512VL_Usable) +++ && HAS_ARCH_FEATURE (AVX512BW_Usable) +++ && HAS_CPU_FEATURE (BMI2)), +++ __strchr_evex) ++ IFUNC_IMPL_ADD (array, i, strchr, 1, __strchr_sse2_no_bsf) ++ IFUNC_IMPL_ADD (array, i, strchr, 1, __strchr_sse2)) ++ ++ /* Support sysdeps/x86_64/multiarch/strchrnul.c. */ ++ IFUNC_IMPL (i, name, strchrnul, ++ IFUNC_IMPL_ADD (array, i, strchrnul, ++- HAS_ARCH_FEATURE (AVX2_Usable), +++ (HAS_ARCH_FEATURE (AVX2_Usable) +++ && HAS_CPU_FEATURE (BMI2)), ++ __strchrnul_avx2) +++ IFUNC_IMPL_ADD (array, i, strchrnul, +++ (HAS_ARCH_FEATURE (AVX2_Usable) +++ && HAS_CPU_FEATURE (BMI2) +++ && HAS_CPU_FEATURE (RTM)), +++ __strchrnul_avx2_rtm) +++ IFUNC_IMPL_ADD (array, i, strchrnul, +++ (HAS_ARCH_FEATURE (AVX512VL_Usable) +++ && HAS_ARCH_FEATURE (AVX512BW_Usable) +++ && HAS_CPU_FEATURE (BMI2)), +++ __strchrnul_evex) ++ IFUNC_IMPL_ADD (array, i, strchrnul, 1, __strchrnul_sse2)) ++ ++ /* Support sysdeps/x86_64/multiarch/strrchr.c. */ ++ IFUNC_IMPL (i, name, strrchr, ++ IFUNC_IMPL_ADD (array, i, strrchr, ++- HAS_ARCH_FEATURE (AVX2_Usable), +++ (HAS_ARCH_FEATURE (AVX2_Usable) +++ && HAS_CPU_FEATURE (BMI2)), ++ __strrchr_avx2) +++ IFUNC_IMPL_ADD (array, i, strrchr, +++ (HAS_ARCH_FEATURE (AVX2_Usable) +++ && HAS_CPU_FEATURE (BMI2) +++ && HAS_CPU_FEATURE (RTM)), +++ __strrchr_avx2_rtm) +++ IFUNC_IMPL_ADD (array, i, strrchr, +++ (HAS_ARCH_FEATURE (AVX512VL_Usable) +++ && HAS_ARCH_FEATURE (AVX512BW_Usable) +++ && HAS_CPU_FEATURE (BMI2)), +++ __strrchr_evex) ++ IFUNC_IMPL_ADD (array, i, strrchr, 1, __strrchr_sse2)) ++ ++ /* Support sysdeps/x86_64/multiarch/strcmp.c. */ ++@@ -277,6 +464,15 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, ++ IFUNC_IMPL_ADD (array, i, strcmp, ++ HAS_ARCH_FEATURE (AVX2_Usable), ++ __strcmp_avx2) +++ IFUNC_IMPL_ADD (array, i, strcmp, +++ (HAS_ARCH_FEATURE (AVX2_Usable) +++ && HAS_CPU_FEATURE (RTM)), +++ __strcmp_avx2_rtm) +++ IFUNC_IMPL_ADD (array, i, strcmp, +++ (HAS_ARCH_FEATURE (AVX512VL_Usable) +++ && HAS_ARCH_FEATURE (AVX512BW_Usable) +++ && HAS_CPU_FEATURE (BMI2)), +++ __strcmp_evex) ++ IFUNC_IMPL_ADD (array, i, strcmp, HAS_CPU_FEATURE (SSE4_2), ++ __strcmp_sse42) ++ IFUNC_IMPL_ADD (array, i, strcmp, HAS_CPU_FEATURE (SSSE3), ++@@ -288,6 +484,14 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, ++ IFUNC_IMPL (i, name, strcpy, ++ IFUNC_IMPL_ADD (array, i, strcpy, HAS_ARCH_FEATURE (AVX2_Usable), ++ __strcpy_avx2) +++ IFUNC_IMPL_ADD (array, i, strcpy, +++ (HAS_ARCH_FEATURE (AVX2_Usable) +++ && HAS_CPU_FEATURE (RTM)), +++ __strcpy_avx2_rtm) +++ IFUNC_IMPL_ADD (array, i, strcpy, +++ (HAS_ARCH_FEATURE (AVX512VL_Usable) +++ && HAS_ARCH_FEATURE (AVX512BW_Usable)), +++ __strcpy_evex) ++ IFUNC_IMPL_ADD (array, i, strcpy, HAS_CPU_FEATURE (SSSE3), ++ __strcpy_ssse3) ++ IFUNC_IMPL_ADD (array, i, strcpy, 1, __strcpy_sse2_unaligned) ++@@ -331,6 +535,14 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, ++ IFUNC_IMPL (i, name, strncat, ++ IFUNC_IMPL_ADD (array, i, strncat, HAS_ARCH_FEATURE (AVX2_Usable), ++ __strncat_avx2) +++ IFUNC_IMPL_ADD (array, i, strncat, +++ (HAS_ARCH_FEATURE (AVX2_Usable) +++ && HAS_CPU_FEATURE (RTM)), +++ __strncat_avx2_rtm) +++ IFUNC_IMPL_ADD (array, i, strncat, +++ (HAS_ARCH_FEATURE (AVX512VL_Usable) +++ && HAS_ARCH_FEATURE (AVX512BW_Usable)), +++ __strncat_evex) ++ IFUNC_IMPL_ADD (array, i, strncat, HAS_CPU_FEATURE (SSSE3), ++ __strncat_ssse3) ++ IFUNC_IMPL_ADD (array, i, strncat, 1, ++@@ -341,6 +553,14 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, ++ IFUNC_IMPL (i, name, strncpy, ++ IFUNC_IMPL_ADD (array, i, strncpy, HAS_ARCH_FEATURE (AVX2_Usable), ++ __strncpy_avx2) +++ IFUNC_IMPL_ADD (array, i, strncpy, +++ (HAS_ARCH_FEATURE (AVX2_Usable) +++ && HAS_CPU_FEATURE (RTM)), +++ __strncpy_avx2_rtm) +++ IFUNC_IMPL_ADD (array, i, strncpy, +++ (HAS_ARCH_FEATURE (AVX512VL_Usable) +++ && HAS_ARCH_FEATURE (AVX512BW_Usable)), +++ __strncpy_evex) ++ IFUNC_IMPL_ADD (array, i, strncpy, HAS_CPU_FEATURE (SSSE3), ++ __strncpy_ssse3) ++ IFUNC_IMPL_ADD (array, i, strncpy, 1, ++@@ -368,29 +588,73 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, ++ /* Support sysdeps/x86_64/multiarch/wcschr.c. */ ++ IFUNC_IMPL (i, name, wcschr, ++ IFUNC_IMPL_ADD (array, i, wcschr, ++- HAS_ARCH_FEATURE (AVX2_Usable), +++ (HAS_ARCH_FEATURE (AVX2_Usable) +++ && HAS_CPU_FEATURE (BMI2)), ++ __wcschr_avx2) +++ IFUNC_IMPL_ADD (array, i, wcschr, +++ (HAS_ARCH_FEATURE (AVX2_Usable) +++ && HAS_CPU_FEATURE (BMI2) +++ && HAS_CPU_FEATURE (RTM)), +++ __wcschr_avx2_rtm) +++ IFUNC_IMPL_ADD (array, i, wcschr, +++ (HAS_ARCH_FEATURE (AVX512VL_Usable) +++ && HAS_ARCH_FEATURE (AVX512BW_Usable) +++ && HAS_CPU_FEATURE (BMI2)), +++ __wcschr_evex) ++ IFUNC_IMPL_ADD (array, i, wcschr, 1, __wcschr_sse2)) ++ ++ /* Support sysdeps/x86_64/multiarch/wcsrchr.c. */ ++ IFUNC_IMPL (i, name, wcsrchr, ++ IFUNC_IMPL_ADD (array, i, wcsrchr, ++- HAS_ARCH_FEATURE (AVX2_Usable), +++ (HAS_ARCH_FEATURE (AVX2_Usable) +++ && HAS_CPU_FEATURE (BMI2)), ++ __wcsrchr_avx2) +++ IFUNC_IMPL_ADD (array, i, wcsrchr, +++ (HAS_ARCH_FEATURE (AVX2_Usable) +++ && HAS_CPU_FEATURE (BMI2) +++ && HAS_CPU_FEATURE (RTM)), +++ __wcsrchr_avx2_rtm) +++ IFUNC_IMPL_ADD (array, i, wcsrchr, +++ (HAS_ARCH_FEATURE (AVX512VL_Usable) +++ && HAS_ARCH_FEATURE (AVX512BW_Usable) +++ && HAS_CPU_FEATURE (BMI2)), +++ __wcsrchr_evex) ++ IFUNC_IMPL_ADD (array, i, wcsrchr, 1, __wcsrchr_sse2)) ++ ++ /* Support sysdeps/x86_64/multiarch/wcscmp.c. */ ++ IFUNC_IMPL (i, name, wcscmp, ++ IFUNC_IMPL_ADD (array, i, wcscmp, ++- HAS_ARCH_FEATURE (AVX2_Usable), +++ (HAS_ARCH_FEATURE (AVX2_Usable) +++ && HAS_CPU_FEATURE (BMI2)), ++ __wcscmp_avx2) +++ IFUNC_IMPL_ADD (array, i, wcscmp, +++ (HAS_ARCH_FEATURE (AVX2_Usable) +++ && HAS_CPU_FEATURE (BMI2) +++ && HAS_CPU_FEATURE (RTM)), +++ __wcscmp_avx2_rtm) +++ IFUNC_IMPL_ADD (array, i, wcscmp, +++ (HAS_ARCH_FEATURE (AVX512VL_Usable) +++ && HAS_ARCH_FEATURE (AVX512BW_Usable) +++ && HAS_CPU_FEATURE (BMI2)), +++ __wcscmp_evex) ++ IFUNC_IMPL_ADD (array, i, wcscmp, 1, __wcscmp_sse2)) ++ ++ /* Support sysdeps/x86_64/multiarch/wcsncmp.c. */ ++ IFUNC_IMPL (i, name, wcsncmp, ++ IFUNC_IMPL_ADD (array, i, wcsncmp, ++- HAS_ARCH_FEATURE (AVX2_Usable), +++ (HAS_ARCH_FEATURE (AVX2_Usable) +++ && HAS_CPU_FEATURE (BMI2)), ++ __wcsncmp_avx2) +++ IFUNC_IMPL_ADD (array, i, wcsncmp, +++ (HAS_ARCH_FEATURE (AVX2_Usable) +++ && HAS_CPU_FEATURE (BMI2) +++ && HAS_CPU_FEATURE (RTM)), +++ __wcsncmp_avx2_rtm) +++ IFUNC_IMPL_ADD (array, i, wcsncmp, +++ (HAS_ARCH_FEATURE (AVX512VL_Usable) +++ && HAS_ARCH_FEATURE (AVX512BW_Usable) +++ && HAS_CPU_FEATURE (BMI2)), +++ __wcsncmp_evex) ++ IFUNC_IMPL_ADD (array, i, wcsncmp, 1, __wcsncmp_sse2)) ++ ++ /* Support sysdeps/x86_64/multiarch/wcscpy.c. */ ++@@ -402,15 +666,40 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, ++ /* Support sysdeps/x86_64/multiarch/wcslen.c. */ ++ IFUNC_IMPL (i, name, wcslen, ++ IFUNC_IMPL_ADD (array, i, wcslen, ++- HAS_ARCH_FEATURE (AVX2_Usable), +++ (HAS_ARCH_FEATURE (AVX2_Usable) +++ && HAS_CPU_FEATURE (BMI2)), ++ __wcslen_avx2) +++ IFUNC_IMPL_ADD (array, i, wcslen, +++ (HAS_ARCH_FEATURE (AVX2_Usable) +++ && HAS_CPU_FEATURE (BMI2) +++ && HAS_CPU_FEATURE (RTM)), +++ __wcslen_avx2_rtm) +++ IFUNC_IMPL_ADD (array, i, wcslen, +++ (HAS_ARCH_FEATURE (AVX512VL_Usable) +++ && HAS_ARCH_FEATURE (AVX512BW_Usable) +++ && HAS_CPU_FEATURE (BMI2)), +++ __wcslen_evex) +++ IFUNC_IMPL_ADD (array, i, wcslen, +++ CPU_FEATURE_USABLE (SSE4_1), +++ __wcslen_sse4_1) ++ IFUNC_IMPL_ADD (array, i, wcslen, 1, __wcslen_sse2)) ++ ++ /* Support sysdeps/x86_64/multiarch/wcsnlen.c. */ ++ IFUNC_IMPL (i, name, wcsnlen, ++ IFUNC_IMPL_ADD (array, i, wcsnlen, ++- HAS_ARCH_FEATURE (AVX2_Usable), +++ (HAS_ARCH_FEATURE (AVX2_Usable) +++ && HAS_CPU_FEATURE (BMI2)), ++ __wcsnlen_avx2) +++ IFUNC_IMPL_ADD (array, i, wcsnlen, +++ (HAS_ARCH_FEATURE (AVX2_Usable) +++ && HAS_CPU_FEATURE (BMI2) +++ && HAS_CPU_FEATURE (RTM)), +++ __wcsnlen_avx2_rtm) +++ IFUNC_IMPL_ADD (array, i, wcsnlen, +++ (HAS_ARCH_FEATURE (AVX512VL_Usable) +++ && HAS_ARCH_FEATURE (AVX512BW_Usable) +++ && HAS_CPU_FEATURE (BMI2)), +++ __wcsnlen_evex) ++ IFUNC_IMPL_ADD (array, i, wcsnlen, ++ HAS_CPU_FEATURE (SSE4_1), ++ __wcsnlen_sse4_1) ++@@ -419,8 +708,19 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, ++ /* Support sysdeps/x86_64/multiarch/wmemchr.c. */ ++ IFUNC_IMPL (i, name, wmemchr, ++ IFUNC_IMPL_ADD (array, i, wmemchr, ++- HAS_ARCH_FEATURE (AVX2_Usable), +++ (HAS_ARCH_FEATURE (AVX2_Usable) +++ && HAS_CPU_FEATURE (BMI2)), ++ __wmemchr_avx2) +++ IFUNC_IMPL_ADD (array, i, wmemchr, +++ (HAS_ARCH_FEATURE (AVX2_Usable) +++ && HAS_CPU_FEATURE (BMI2) +++ && HAS_CPU_FEATURE (RTM)), +++ __wmemchr_avx2_rtm) +++ IFUNC_IMPL_ADD (array, i, wmemchr, +++ (HAS_ARCH_FEATURE (AVX512VL_Usable) +++ && HAS_ARCH_FEATURE (AVX512BW_Usable) +++ && HAS_CPU_FEATURE (BMI2)), +++ __wmemchr_evex) ++ IFUNC_IMPL_ADD (array, i, wmemchr, 1, __wmemchr_sse2)) ++ ++ /* Support sysdeps/x86_64/multiarch/wmemcmp.c. */ ++@@ -429,6 +729,16 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, ++ (HAS_ARCH_FEATURE (AVX2_Usable) ++ && HAS_CPU_FEATURE (MOVBE)), ++ __wmemcmp_avx2_movbe) +++ IFUNC_IMPL_ADD (array, i, wmemcmp, +++ (HAS_ARCH_FEATURE (AVX2_Usable) +++ && HAS_CPU_FEATURE (MOVBE) +++ && HAS_CPU_FEATURE (RTM)), +++ __wmemcmp_avx2_movbe_rtm) +++ IFUNC_IMPL_ADD (array, i, wmemcmp, +++ (HAS_ARCH_FEATURE (AVX512VL_Usable) +++ && HAS_ARCH_FEATURE (AVX512BW_Usable) +++ && HAS_CPU_FEATURE (MOVBE)), +++ __wmemcmp_evex_movbe) ++ IFUNC_IMPL_ADD (array, i, wmemcmp, HAS_CPU_FEATURE (SSE4_1), ++ __wmemcmp_sse4_1) ++ IFUNC_IMPL_ADD (array, i, wmemcmp, HAS_CPU_FEATURE (SSSE3), ++@@ -443,7 +753,14 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, ++ HAS_ARCH_FEATURE (AVX2_Usable), ++ __wmemset_avx2_unaligned) ++ IFUNC_IMPL_ADD (array, i, wmemset, ++- HAS_ARCH_FEATURE (AVX512F_Usable), +++ (HAS_ARCH_FEATURE (AVX2_Usable) +++ && HAS_CPU_FEATURE (RTM)), +++ __wmemset_avx2_unaligned_rtm) +++ IFUNC_IMPL_ADD (array, i, wmemset, +++ HAS_ARCH_FEATURE (AVX512VL_Usable), +++ __wmemset_evex_unaligned) +++ IFUNC_IMPL_ADD (array, i, wmemset, +++ HAS_ARCH_FEATURE (AVX512VL_Usable), ++ __wmemset_avx512_unaligned)) ++ ++ #ifdef SHARED ++@@ -453,10 +770,10 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, ++ HAS_ARCH_FEATURE (AVX512F_Usable), ++ __memcpy_chk_avx512_no_vzeroupper) ++ IFUNC_IMPL_ADD (array, i, __memcpy_chk, ++- HAS_ARCH_FEATURE (AVX512F_Usable), +++ HAS_ARCH_FEATURE (AVX512VL_Usable), ++ __memcpy_chk_avx512_unaligned) ++ IFUNC_IMPL_ADD (array, i, __memcpy_chk, ++- HAS_ARCH_FEATURE (AVX512F_Usable), +++ HAS_ARCH_FEATURE (AVX512VL_Usable), ++ __memcpy_chk_avx512_unaligned_erms) ++ IFUNC_IMPL_ADD (array, i, __memcpy_chk, ++ HAS_ARCH_FEATURE (AVX_Usable), ++@@ -464,6 +781,20 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, ++ IFUNC_IMPL_ADD (array, i, __memcpy_chk, ++ HAS_ARCH_FEATURE (AVX_Usable), ++ __memcpy_chk_avx_unaligned_erms) +++ IFUNC_IMPL_ADD (array, i, __memcpy_chk, +++ (HAS_ARCH_FEATURE (AVX_Usable) +++ && HAS_CPU_FEATURE (RTM)), +++ __memcpy_chk_avx_unaligned_rtm) +++ IFUNC_IMPL_ADD (array, i, __memcpy_chk, +++ (HAS_ARCH_FEATURE (AVX_Usable) +++ && HAS_CPU_FEATURE (RTM)), +++ __memcpy_chk_avx_unaligned_erms_rtm) +++ IFUNC_IMPL_ADD (array, i, __memcpy_chk, +++ HAS_ARCH_FEATURE (AVX512VL_Usable), +++ __memcpy_chk_evex_unaligned) +++ IFUNC_IMPL_ADD (array, i, __memcpy_chk, +++ HAS_ARCH_FEATURE (AVX512VL_Usable), +++ __memcpy_chk_evex_unaligned_erms) ++ IFUNC_IMPL_ADD (array, i, __memcpy_chk, ++ HAS_CPU_FEATURE (SSSE3), ++ __memcpy_chk_ssse3_back) ++@@ -486,6 +817,20 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, ++ IFUNC_IMPL_ADD (array, i, memcpy, ++ HAS_ARCH_FEATURE (AVX_Usable), ++ __memcpy_avx_unaligned_erms) +++ IFUNC_IMPL_ADD (array, i, memcpy, +++ (HAS_ARCH_FEATURE (AVX_Usable) +++ && HAS_CPU_FEATURE (RTM)), +++ __memcpy_avx_unaligned_rtm) +++ IFUNC_IMPL_ADD (array, i, memcpy, +++ (HAS_ARCH_FEATURE (AVX_Usable) +++ && HAS_CPU_FEATURE (RTM)), +++ __memcpy_avx_unaligned_erms_rtm) +++ IFUNC_IMPL_ADD (array, i, memcpy, +++ HAS_ARCH_FEATURE (AVX512VL_Usable), +++ __memcpy_evex_unaligned) +++ IFUNC_IMPL_ADD (array, i, memcpy, +++ HAS_ARCH_FEATURE (AVX512VL_Usable), +++ __memcpy_evex_unaligned_erms) ++ IFUNC_IMPL_ADD (array, i, memcpy, HAS_CPU_FEATURE (SSSE3), ++ __memcpy_ssse3_back) ++ IFUNC_IMPL_ADD (array, i, memcpy, HAS_CPU_FEATURE (SSSE3), ++@@ -494,10 +839,10 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, ++ HAS_ARCH_FEATURE (AVX512F_Usable), ++ __memcpy_avx512_no_vzeroupper) ++ IFUNC_IMPL_ADD (array, i, memcpy, ++- HAS_ARCH_FEATURE (AVX512F_Usable), +++ HAS_ARCH_FEATURE (AVX512VL_Usable), ++ __memcpy_avx512_unaligned) ++ IFUNC_IMPL_ADD (array, i, memcpy, ++- HAS_ARCH_FEATURE (AVX512F_Usable), +++ HAS_ARCH_FEATURE (AVX512VL_Usable), ++ __memcpy_avx512_unaligned_erms) ++ IFUNC_IMPL_ADD (array, i, memcpy, 1, __memcpy_sse2_unaligned) ++ IFUNC_IMPL_ADD (array, i, memcpy, 1, ++@@ -511,10 +856,10 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, ++ HAS_ARCH_FEATURE (AVX512F_Usable), ++ __mempcpy_chk_avx512_no_vzeroupper) ++ IFUNC_IMPL_ADD (array, i, __mempcpy_chk, ++- HAS_ARCH_FEATURE (AVX512F_Usable), +++ HAS_ARCH_FEATURE (AVX512VL_Usable), ++ __mempcpy_chk_avx512_unaligned) ++ IFUNC_IMPL_ADD (array, i, __mempcpy_chk, ++- HAS_ARCH_FEATURE (AVX512F_Usable), +++ HAS_ARCH_FEATURE (AVX512VL_Usable), ++ __mempcpy_chk_avx512_unaligned_erms) ++ IFUNC_IMPL_ADD (array, i, __mempcpy_chk, ++ HAS_ARCH_FEATURE (AVX_Usable), ++@@ -522,6 +867,20 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, ++ IFUNC_IMPL_ADD (array, i, __mempcpy_chk, ++ HAS_ARCH_FEATURE (AVX_Usable), ++ __mempcpy_chk_avx_unaligned_erms) +++ IFUNC_IMPL_ADD (array, i, __mempcpy_chk, +++ (HAS_ARCH_FEATURE (AVX_Usable) +++ && HAS_CPU_FEATURE (RTM)), +++ __mempcpy_chk_avx_unaligned_rtm) +++ IFUNC_IMPL_ADD (array, i, __mempcpy_chk, +++ (HAS_ARCH_FEATURE (AVX_Usable) +++ && HAS_CPU_FEATURE (RTM)), +++ __mempcpy_chk_avx_unaligned_erms_rtm) +++ IFUNC_IMPL_ADD (array, i, __mempcpy_chk, +++ HAS_ARCH_FEATURE (AVX512VL_Usable), +++ __mempcpy_chk_evex_unaligned) +++ IFUNC_IMPL_ADD (array, i, __mempcpy_chk, +++ HAS_ARCH_FEATURE (AVX512VL_Usable), +++ __mempcpy_chk_evex_unaligned_erms) ++ IFUNC_IMPL_ADD (array, i, __mempcpy_chk, ++ HAS_CPU_FEATURE (SSSE3), ++ __mempcpy_chk_ssse3_back) ++@@ -542,10 +901,10 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, ++ HAS_ARCH_FEATURE (AVX512F_Usable), ++ __mempcpy_avx512_no_vzeroupper) ++ IFUNC_IMPL_ADD (array, i, mempcpy, ++- HAS_ARCH_FEATURE (AVX512F_Usable), +++ HAS_ARCH_FEATURE (AVX512VL_Usable), ++ __mempcpy_avx512_unaligned) ++ IFUNC_IMPL_ADD (array, i, mempcpy, ++- HAS_ARCH_FEATURE (AVX512F_Usable), +++ HAS_ARCH_FEATURE (AVX512VL_Usable), ++ __mempcpy_avx512_unaligned_erms) ++ IFUNC_IMPL_ADD (array, i, mempcpy, ++ HAS_ARCH_FEATURE (AVX_Usable), ++@@ -553,6 +912,20 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, ++ IFUNC_IMPL_ADD (array, i, mempcpy, ++ HAS_ARCH_FEATURE (AVX_Usable), ++ __mempcpy_avx_unaligned_erms) +++ IFUNC_IMPL_ADD (array, i, mempcpy, +++ (HAS_ARCH_FEATURE (AVX_Usable) +++ && HAS_CPU_FEATURE (RTM)), +++ __mempcpy_avx_unaligned_rtm) +++ IFUNC_IMPL_ADD (array, i, mempcpy, +++ (HAS_ARCH_FEATURE (AVX_Usable) +++ && HAS_CPU_FEATURE (RTM)), +++ __mempcpy_avx_unaligned_erms_rtm) +++ IFUNC_IMPL_ADD (array, i, mempcpy, +++ HAS_ARCH_FEATURE (AVX512VL_Usable), +++ __mempcpy_evex_unaligned) +++ IFUNC_IMPL_ADD (array, i, mempcpy, +++ HAS_ARCH_FEATURE (AVX512VL_Usable), +++ __mempcpy_evex_unaligned_erms) ++ IFUNC_IMPL_ADD (array, i, mempcpy, HAS_CPU_FEATURE (SSSE3), ++ __mempcpy_ssse3_back) ++ IFUNC_IMPL_ADD (array, i, mempcpy, HAS_CPU_FEATURE (SSSE3), ++@@ -568,6 +941,14 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, ++ IFUNC_IMPL_ADD (array, i, strncmp, ++ HAS_ARCH_FEATURE (AVX2_Usable), ++ __strncmp_avx2) +++ IFUNC_IMPL_ADD (array, i, strncmp, +++ (HAS_ARCH_FEATURE (AVX2_Usable) +++ && HAS_CPU_FEATURE (RTM)), +++ __strncmp_avx2_rtm) +++ IFUNC_IMPL_ADD (array, i, strncmp, +++ (HAS_ARCH_FEATURE (AVX512VL_Usable) +++ && HAS_ARCH_FEATURE (AVX512BW_Usable)), +++ __strncmp_evex) ++ IFUNC_IMPL_ADD (array, i, strncmp, HAS_CPU_FEATURE (SSE4_2), ++ __strncmp_sse42) ++ IFUNC_IMPL_ADD (array, i, strncmp, HAS_CPU_FEATURE (SSSE3), ++@@ -582,6 +963,9 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, ++ IFUNC_IMPL_ADD (array, i, __wmemset_chk, ++ HAS_ARCH_FEATURE (AVX2_Usable), ++ __wmemset_chk_avx2_unaligned) +++ IFUNC_IMPL_ADD (array, i, __wmemset_chk, +++ HAS_ARCH_FEATURE (AVX512VL_Usable), +++ __wmemset_chk_evex_unaligned) ++ IFUNC_IMPL_ADD (array, i, __wmemset_chk, ++ HAS_ARCH_FEATURE (AVX512F_Usable), ++ __wmemset_chk_avx512_unaligned)) ++diff --git a/sysdeps/x86_64/multiarch/ifunc-memcmp.h b/sysdeps/x86_64/multiarch/ifunc-memcmp.h ++index c14db39cf4..ebbb0c01cf 100644 ++--- a/sysdeps/x86_64/multiarch/ifunc-memcmp.h +++++ b/sysdeps/x86_64/multiarch/ifunc-memcmp.h ++@@ -23,17 +23,28 @@ extern __typeof (REDIRECT_NAME) OPTIMIZE (sse2) attribute_hidden; ++ extern __typeof (REDIRECT_NAME) OPTIMIZE (ssse3) attribute_hidden; ++ extern __typeof (REDIRECT_NAME) OPTIMIZE (sse4_1) attribute_hidden; ++ extern __typeof (REDIRECT_NAME) OPTIMIZE (avx2_movbe) attribute_hidden; +++extern __typeof (REDIRECT_NAME) OPTIMIZE (avx2_movbe_rtm) attribute_hidden; +++extern __typeof (REDIRECT_NAME) OPTIMIZE (evex_movbe) attribute_hidden; ++ ++ static inline void * ++ IFUNC_SELECTOR (void) ++ { ++ const struct cpu_features* cpu_features = __get_cpu_features (); ++ ++- if (!CPU_FEATURES_ARCH_P (cpu_features, Prefer_No_VZEROUPPER) ++- && CPU_FEATURES_ARCH_P (cpu_features, AVX2_Usable) +++ if (CPU_FEATURES_ARCH_P (cpu_features, AVX2_Usable) ++ && CPU_FEATURES_CPU_P (cpu_features, MOVBE) ++ && CPU_FEATURES_ARCH_P (cpu_features, AVX_Fast_Unaligned_Load)) ++- return OPTIMIZE (avx2_movbe); +++ { +++ if (CPU_FEATURES_ARCH_P (cpu_features, AVX512VL_Usable) +++ && CPU_FEATURES_ARCH_P (cpu_features, AVX512BW_Usable)) +++ return OPTIMIZE (evex_movbe); +++ +++ if (CPU_FEATURES_CPU_P (cpu_features, RTM)) +++ return OPTIMIZE (avx2_movbe_rtm); +++ +++ if (!CPU_FEATURES_ARCH_P (cpu_features, Prefer_No_VZEROUPPER)) +++ return OPTIMIZE (avx2_movbe); +++ } ++ ++ if (CPU_FEATURES_CPU_P (cpu_features, SSE4_1)) ++ return OPTIMIZE (sse4_1); ++diff --git a/sysdeps/x86_64/multiarch/ifunc-memmove.h b/sysdeps/x86_64/multiarch/ifunc-memmove.h ++index 81673d2019..dfc5a28487 100644 ++--- a/sysdeps/x86_64/multiarch/ifunc-memmove.h +++++ b/sysdeps/x86_64/multiarch/ifunc-memmove.h ++@@ -29,6 +29,14 @@ extern __typeof (REDIRECT_NAME) OPTIMIZE (ssse3_back) attribute_hidden; ++ extern __typeof (REDIRECT_NAME) OPTIMIZE (avx_unaligned) attribute_hidden; ++ extern __typeof (REDIRECT_NAME) OPTIMIZE (avx_unaligned_erms) ++ attribute_hidden; +++extern __typeof (REDIRECT_NAME) OPTIMIZE (avx_unaligned_rtm) +++ attribute_hidden; +++extern __typeof (REDIRECT_NAME) OPTIMIZE (avx_unaligned_erms_rtm) +++ attribute_hidden; +++extern __typeof (REDIRECT_NAME) OPTIMIZE (evex_unaligned) +++ attribute_hidden; +++extern __typeof (REDIRECT_NAME) OPTIMIZE (evex_unaligned_erms) +++ attribute_hidden; ++ extern __typeof (REDIRECT_NAME) OPTIMIZE (avx512_unaligned) ++ attribute_hidden; ++ extern __typeof (REDIRECT_NAME) OPTIMIZE (avx512_unaligned_erms) ++@@ -48,21 +56,42 @@ IFUNC_SELECTOR (void) ++ if (CPU_FEATURES_ARCH_P (cpu_features, AVX512F_Usable) ++ && !CPU_FEATURES_ARCH_P (cpu_features, Prefer_No_AVX512)) ++ { ++- if (CPU_FEATURES_ARCH_P (cpu_features, Prefer_No_VZEROUPPER)) ++- return OPTIMIZE (avx512_no_vzeroupper); +++ if (CPU_FEATURES_ARCH_P (cpu_features, AVX512VL_Usable)) +++ { +++ if (CPU_FEATURES_CPU_P (cpu_features, ERMS)) +++ return OPTIMIZE (avx512_unaligned_erms); ++ ++- if (CPU_FEATURES_CPU_P (cpu_features, ERMS)) ++- return OPTIMIZE (avx512_unaligned_erms); +++ return OPTIMIZE (avx512_unaligned); +++ } ++ ++- return OPTIMIZE (avx512_unaligned); +++ return OPTIMIZE (avx512_no_vzeroupper); ++ } ++ ++ if (CPU_FEATURES_ARCH_P (cpu_features, AVX_Fast_Unaligned_Load)) ++ { ++- if (CPU_FEATURES_CPU_P (cpu_features, ERMS)) ++- return OPTIMIZE (avx_unaligned_erms); +++ if (CPU_FEATURES_ARCH_P (cpu_features, AVX512VL_Usable)) +++ { +++ if (CPU_FEATURES_CPU_P (cpu_features, ERMS)) +++ return OPTIMIZE (evex_unaligned_erms); +++ +++ return OPTIMIZE (evex_unaligned); +++ } +++ +++ if (CPU_FEATURES_CPU_P (cpu_features, RTM)) +++ { +++ if (CPU_FEATURES_CPU_P (cpu_features, ERMS)) +++ return OPTIMIZE (avx_unaligned_erms_rtm); +++ +++ return OPTIMIZE (avx_unaligned_rtm); +++ } +++ +++ if (!CPU_FEATURES_ARCH_P (cpu_features, Prefer_No_VZEROUPPER)) +++ { +++ if (CPU_FEATURES_CPU_P (cpu_features, ERMS)) +++ return OPTIMIZE (avx_unaligned_erms); ++ ++- return OPTIMIZE (avx_unaligned); +++ return OPTIMIZE (avx_unaligned); +++ } ++ } ++ ++ if (!CPU_FEATURES_CPU_P (cpu_features, SSSE3) ++diff --git a/sysdeps/x86_64/multiarch/ifunc-memset.h b/sysdeps/x86_64/multiarch/ifunc-memset.h ++index d690293385..48fdb24b02 100644 ++--- a/sysdeps/x86_64/multiarch/ifunc-memset.h +++++ b/sysdeps/x86_64/multiarch/ifunc-memset.h ++@@ -27,6 +27,14 @@ extern __typeof (REDIRECT_NAME) OPTIMIZE (sse2_unaligned_erms) ++ extern __typeof (REDIRECT_NAME) OPTIMIZE (avx2_unaligned) attribute_hidden; ++ extern __typeof (REDIRECT_NAME) OPTIMIZE (avx2_unaligned_erms) ++ attribute_hidden; +++extern __typeof (REDIRECT_NAME) OPTIMIZE (avx2_unaligned_rtm) +++ attribute_hidden; +++extern __typeof (REDIRECT_NAME) OPTIMIZE (avx2_unaligned_erms_rtm) +++ attribute_hidden; +++extern __typeof (REDIRECT_NAME) OPTIMIZE (evex_unaligned) +++ attribute_hidden; +++extern __typeof (REDIRECT_NAME) OPTIMIZE (evex_unaligned_erms) +++ attribute_hidden; ++ extern __typeof (REDIRECT_NAME) OPTIMIZE (avx512_unaligned) ++ attribute_hidden; ++ extern __typeof (REDIRECT_NAME) OPTIMIZE (avx512_unaligned_erms) ++@@ -45,21 +53,44 @@ IFUNC_SELECTOR (void) ++ if (CPU_FEATURES_ARCH_P (cpu_features, AVX512F_Usable) ++ && !CPU_FEATURES_ARCH_P (cpu_features, Prefer_No_AVX512)) ++ { ++- if (CPU_FEATURES_ARCH_P (cpu_features, Prefer_No_VZEROUPPER)) ++- return OPTIMIZE (avx512_no_vzeroupper); +++ if (CPU_FEATURES_ARCH_P (cpu_features, AVX512VL_Usable) +++ && CPU_FEATURES_ARCH_P (cpu_features, AVX512BW_Usable)) +++ { +++ if (CPU_FEATURES_CPU_P (cpu_features, ERMS)) +++ return OPTIMIZE (avx512_unaligned_erms); ++ ++- if (CPU_FEATURES_CPU_P (cpu_features, ERMS)) ++- return OPTIMIZE (avx512_unaligned_erms); +++ return OPTIMIZE (avx512_unaligned); +++ } ++ ++- return OPTIMIZE (avx512_unaligned); +++ return OPTIMIZE (avx512_no_vzeroupper); ++ } ++ ++ if (CPU_FEATURES_ARCH_P (cpu_features, AVX2_Usable)) ++ { ++- if (CPU_FEATURES_CPU_P (cpu_features, ERMS)) ++- return OPTIMIZE (avx2_unaligned_erms); ++- else ++- return OPTIMIZE (avx2_unaligned); +++ if (CPU_FEATURES_ARCH_P (cpu_features, AVX512VL_Usable) +++ && CPU_FEATURES_ARCH_P (cpu_features, AVX512BW_Usable)) +++ { +++ if (CPU_FEATURES_CPU_P (cpu_features, ERMS)) +++ return OPTIMIZE (evex_unaligned_erms); +++ +++ return OPTIMIZE (evex_unaligned); +++ } +++ +++ if (CPU_FEATURES_CPU_P (cpu_features, RTM)) +++ { +++ if (CPU_FEATURES_CPU_P (cpu_features, ERMS)) +++ return OPTIMIZE (avx2_unaligned_erms_rtm); +++ +++ return OPTIMIZE (avx2_unaligned_rtm); +++ } +++ +++ if (!CPU_FEATURES_ARCH_P (cpu_features, Prefer_No_VZEROUPPER)) +++ { +++ if (CPU_FEATURES_CPU_P (cpu_features, ERMS)) +++ return OPTIMIZE (avx2_unaligned_erms); +++ +++ return OPTIMIZE (avx2_unaligned); +++ } ++ } ++ ++ if (CPU_FEATURES_CPU_P (cpu_features, ERMS)) ++diff --git a/sysdeps/x86_64/multiarch/ifunc-strcpy.h b/sysdeps/x86_64/multiarch/ifunc-strcpy.h ++index ae4f451803..f38a3b7501 100644 ++--- a/sysdeps/x86_64/multiarch/ifunc-strcpy.h +++++ b/sysdeps/x86_64/multiarch/ifunc-strcpy.h ++@@ -25,16 +25,27 @@ extern __typeof (REDIRECT_NAME) OPTIMIZE (sse2_unaligned) ++ attribute_hidden; ++ extern __typeof (REDIRECT_NAME) OPTIMIZE (ssse3) attribute_hidden; ++ extern __typeof (REDIRECT_NAME) OPTIMIZE (avx2) attribute_hidden; +++extern __typeof (REDIRECT_NAME) OPTIMIZE (avx2_rtm) attribute_hidden; +++extern __typeof (REDIRECT_NAME) OPTIMIZE (evex) attribute_hidden; ++ ++ static inline void * ++ IFUNC_SELECTOR (void) ++ { ++ const struct cpu_features* cpu_features = __get_cpu_features (); ++ ++- if (!CPU_FEATURES_ARCH_P (cpu_features, Prefer_No_VZEROUPPER) ++- && CPU_FEATURES_ARCH_P (cpu_features, AVX2_Usable) +++ if (CPU_FEATURES_ARCH_P (cpu_features, AVX2_Usable) ++ && CPU_FEATURES_ARCH_P (cpu_features, AVX_Fast_Unaligned_Load)) ++- return OPTIMIZE (avx2); +++ { +++ if (CPU_FEATURES_ARCH_P (cpu_features, AVX512VL_Usable) +++ && CPU_FEATURES_ARCH_P (cpu_features, AVX512BW_Usable)) +++ return OPTIMIZE (evex); +++ +++ if (CPU_FEATURES_CPU_P (cpu_features, RTM)) +++ return OPTIMIZE (avx2_rtm); +++ +++ if (!CPU_FEATURES_ARCH_P (cpu_features, Prefer_No_VZEROUPPER)) +++ return OPTIMIZE (avx2); +++ } ++ ++ if (CPU_FEATURES_ARCH_P (cpu_features, Fast_Unaligned_Load)) ++ return OPTIMIZE (sse2_unaligned); ++diff --git a/sysdeps/x86_64/multiarch/ifunc-wcslen.h b/sysdeps/x86_64/multiarch/ifunc-wcslen.h ++new file mode 100644 ++index 0000000000..564cc8cbec ++--- /dev/null +++++ b/sysdeps/x86_64/multiarch/ifunc-wcslen.h ++@@ -0,0 +1,52 @@ +++/* Common definition for ifunc selections for wcslen and wcsnlen +++ All versions must be listed in ifunc-impl-list.c. +++ Copyright (C) 2017-2021 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 +++ . */ +++ +++#include +++ +++extern __typeof (REDIRECT_NAME) OPTIMIZE (sse2) attribute_hidden; +++extern __typeof (REDIRECT_NAME) OPTIMIZE (sse4_1) attribute_hidden; +++extern __typeof (REDIRECT_NAME) OPTIMIZE (avx2) attribute_hidden; +++extern __typeof (REDIRECT_NAME) OPTIMIZE (avx2_rtm) attribute_hidden; +++extern __typeof (REDIRECT_NAME) OPTIMIZE (evex) attribute_hidden; +++ +++static inline void * +++IFUNC_SELECTOR (void) +++{ +++ const struct cpu_features* cpu_features = __get_cpu_features (); +++ +++ if (CPU_FEATURES_ARCH_P (cpu_features, AVX2_Usable) +++ && CPU_FEATURES_CPU_P (cpu_features, BMI2) +++ && CPU_FEATURES_ARCH_P (cpu_features, AVX_Fast_Unaligned_Load)) +++ { +++ if (CPU_FEATURES_ARCH_P (cpu_features, AVX512VL_Usable) +++ && CPU_FEATURES_ARCH_P (cpu_features, AVX512BW_Usable)) +++ return OPTIMIZE (evex); +++ +++ if (CPU_FEATURES_CPU_P (cpu_features, RTM)) +++ return OPTIMIZE (avx2_rtm); +++ +++ if (!CPU_FEATURES_ARCH_P (cpu_features, Prefer_No_VZEROUPPER)) +++ return OPTIMIZE (avx2); +++ } +++ +++ if (CPU_FEATURES_CPU_P (cpu_features, SSE4_1)) +++ return OPTIMIZE (sse4_1); +++ +++ return OPTIMIZE (sse2); +++} ++diff --git a/sysdeps/x86_64/multiarch/ifunc-wmemset.h b/sysdeps/x86_64/multiarch/ifunc-wmemset.h ++index 583f6310a1..0ce29a229d 100644 ++--- a/sysdeps/x86_64/multiarch/ifunc-wmemset.h +++++ b/sysdeps/x86_64/multiarch/ifunc-wmemset.h ++@@ -20,6 +20,9 @@ ++ ++ extern __typeof (REDIRECT_NAME) OPTIMIZE (sse2_unaligned) attribute_hidden; ++ extern __typeof (REDIRECT_NAME) OPTIMIZE (avx2_unaligned) attribute_hidden; +++extern __typeof (REDIRECT_NAME) OPTIMIZE (avx2_unaligned_rtm) +++ attribute_hidden; +++extern __typeof (REDIRECT_NAME) OPTIMIZE (evex_unaligned) attribute_hidden; ++ extern __typeof (REDIRECT_NAME) OPTIMIZE (avx512_unaligned) attribute_hidden; ++ ++ static inline void * ++@@ -27,14 +30,21 @@ IFUNC_SELECTOR (void) ++ { ++ const struct cpu_features* cpu_features = __get_cpu_features (); ++ ++- if (!CPU_FEATURES_ARCH_P (cpu_features, Prefer_No_VZEROUPPER) ++- && CPU_FEATURES_ARCH_P (cpu_features, AVX2_Usable) +++ if (CPU_FEATURES_ARCH_P (cpu_features, AVX2_Usable) ++ && CPU_FEATURES_ARCH_P (cpu_features, AVX_Fast_Unaligned_Load)) ++ { ++- if (CPU_FEATURES_ARCH_P (cpu_features, AVX512F_Usable) ++- && !CPU_FEATURES_ARCH_P (cpu_features, Prefer_No_AVX512)) ++- return OPTIMIZE (avx512_unaligned); ++- else +++ if (CPU_FEATURES_ARCH_P (cpu_features, AVX512VL_Usable)) +++ { +++ if (!CPU_FEATURES_ARCH_P (cpu_features, Prefer_No_AVX512)) +++ return OPTIMIZE (avx512_unaligned); +++ +++ return OPTIMIZE (evex_unaligned); +++ } +++ +++ if (CPU_FEATURES_CPU_P (cpu_features, RTM)) +++ return OPTIMIZE (avx2_unaligned_rtm); +++ +++ if (!CPU_FEATURES_ARCH_P (cpu_features, Prefer_No_VZEROUPPER)) ++ return OPTIMIZE (avx2_unaligned); ++ } ++ ++diff --git a/sysdeps/x86_64/multiarch/memchr-avx2-rtm.S b/sysdeps/x86_64/multiarch/memchr-avx2-rtm.S ++new file mode 100644 ++index 0000000000..87b076c7c4 ++--- /dev/null +++++ b/sysdeps/x86_64/multiarch/memchr-avx2-rtm.S ++@@ -0,0 +1,12 @@ +++#ifndef MEMCHR +++# define MEMCHR __memchr_avx2_rtm +++#endif +++ +++#define ZERO_UPPER_VEC_REGISTERS_RETURN \ +++ ZERO_UPPER_VEC_REGISTERS_RETURN_XTEST +++ +++#define VZEROUPPER_RETURN jmp L(return_vzeroupper) +++ +++#define SECTION(p) p##.avx.rtm +++ +++#include "memchr-avx2.S" ++diff --git a/sysdeps/x86_64/multiarch/memchr-avx2.S b/sysdeps/x86_64/multiarch/memchr-avx2.S ++index e5a9abd211..0987616a1b 100644 ++--- a/sysdeps/x86_64/multiarch/memchr-avx2.S +++++ b/sysdeps/x86_64/multiarch/memchr-avx2.S ++@@ -26,319 +26,407 @@ ++ ++ # ifdef USE_AS_WMEMCHR ++ # define VPCMPEQ vpcmpeqd +++# define VPBROADCAST vpbroadcastd +++# define CHAR_SIZE 4 ++ # else ++ # define VPCMPEQ vpcmpeqb +++# define VPBROADCAST vpbroadcastb +++# define CHAR_SIZE 1 +++# endif +++ +++# ifdef USE_AS_RAWMEMCHR +++# define ERAW_PTR_REG ecx +++# define RRAW_PTR_REG rcx +++# define ALGN_PTR_REG rdi +++# else +++# define ERAW_PTR_REG edi +++# define RRAW_PTR_REG rdi +++# define ALGN_PTR_REG rcx ++ # endif ++ ++ # ifndef VZEROUPPER ++ # define VZEROUPPER vzeroupper ++ # endif ++ +++# ifndef SECTION +++# define SECTION(p) p##.avx +++# endif +++ ++ # define VEC_SIZE 32 +++# define PAGE_SIZE 4096 +++# define CHAR_PER_VEC (VEC_SIZE / CHAR_SIZE) ++ ++- .section .text.avx,"ax",@progbits +++ .section SECTION(.text),"ax",@progbits ++ ENTRY (MEMCHR) ++ # ifndef USE_AS_RAWMEMCHR ++ /* Check for zero length. */ +++# ifdef __ILP32__ +++ /* Clear upper bits. */ +++ and %RDX_LP, %RDX_LP +++# else ++ test %RDX_LP, %RDX_LP +++# endif ++ jz L(null) ++ # endif ++- movl %edi, %ecx ++- /* Broadcast CHAR to YMM0. */ +++ /* Broadcast CHAR to YMMMATCH. */ ++ vmovd %esi, %xmm0 ++-# ifdef USE_AS_WMEMCHR ++- shl $2, %RDX_LP ++- vpbroadcastd %xmm0, %ymm0 ++-# else ++-# ifdef __ILP32__ ++- /* Clear the upper 32 bits. */ ++- movl %edx, %edx ++-# endif ++- vpbroadcastb %xmm0, %ymm0 ++-# endif +++ VPBROADCAST %xmm0, %ymm0 ++ /* Check if we may cross page boundary with one vector load. */ ++- andl $(2 * VEC_SIZE - 1), %ecx ++- cmpl $VEC_SIZE, %ecx ++- ja L(cros_page_boundary) +++ movl %edi, %eax +++ andl $(PAGE_SIZE - 1), %eax +++ cmpl $(PAGE_SIZE - VEC_SIZE), %eax +++ ja L(cross_page_boundary) ++ ++ /* Check the first VEC_SIZE bytes. */ ++- VPCMPEQ (%rdi), %ymm0, %ymm1 +++ VPCMPEQ (%rdi), %ymm0, %ymm1 ++ vpmovmskb %ymm1, %eax ++- testl %eax, %eax ++- ++ # ifndef USE_AS_RAWMEMCHR ++- jnz L(first_vec_x0_check) ++- /* Adjust length and check the end of data. */ ++- subq $VEC_SIZE, %rdx ++- jbe L(zero) ++-# else ++- jnz L(first_vec_x0) +++ /* If length < CHAR_PER_VEC handle special. */ +++ cmpq $CHAR_PER_VEC, %rdx +++ jbe L(first_vec_x0) ++ # endif ++- ++- /* Align data for aligned loads in the loop. */ ++- addq $VEC_SIZE, %rdi ++- andl $(VEC_SIZE - 1), %ecx ++- andq $-VEC_SIZE, %rdi +++ testl %eax, %eax +++ jz L(aligned_more) +++ tzcntl %eax, %eax +++ addq %rdi, %rax +++ VZEROUPPER_RETURN ++ ++ # ifndef USE_AS_RAWMEMCHR ++- /* Adjust length. */ ++- addq %rcx, %rdx +++ .p2align 5 +++L(first_vec_x0): +++ /* Check if first match was before length. */ +++ tzcntl %eax, %eax +++# ifdef USE_AS_WMEMCHR +++ /* NB: Multiply length by 4 to get byte count. */ +++ sall $2, %edx +++# endif +++ xorl %ecx, %ecx +++ cmpl %eax, %edx +++ leaq (%rdi, %rax), %rax +++ cmovle %rcx, %rax +++ VZEROUPPER_RETURN ++ ++- subq $(VEC_SIZE * 4), %rdx ++- jbe L(last_4x_vec_or_less) +++L(null): +++ xorl %eax, %eax +++ ret ++ # endif ++- jmp L(more_4x_vec) ++- ++ .p2align 4 ++-L(cros_page_boundary): ++- andl $(VEC_SIZE - 1), %ecx ++- andq $-VEC_SIZE, %rdi ++- VPCMPEQ (%rdi), %ymm0, %ymm1 +++L(cross_page_boundary): +++ /* Save pointer before aligning as its original value is +++ necessary for computer return address if byte is found or +++ adjusting length if it is not and this is memchr. */ +++ movq %rdi, %rcx +++ /* Align data to VEC_SIZE - 1. ALGN_PTR_REG is rcx for memchr +++ and rdi for rawmemchr. */ +++ orq $(VEC_SIZE - 1), %ALGN_PTR_REG +++ VPCMPEQ -(VEC_SIZE - 1)(%ALGN_PTR_REG), %ymm0, %ymm1 ++ vpmovmskb %ymm1, %eax +++# ifndef USE_AS_RAWMEMCHR +++ /* Calculate length until end of page (length checked for a +++ match). */ +++ leaq 1(%ALGN_PTR_REG), %rsi +++ subq %RRAW_PTR_REG, %rsi +++# ifdef USE_AS_WMEMCHR +++ /* NB: Divide bytes by 4 to get wchar_t count. */ +++ shrl $2, %esi +++# endif +++# endif ++ /* Remove the leading bytes. */ ++- sarl %cl, %eax ++- testl %eax, %eax ++- jz L(aligned_more) ++- tzcntl %eax, %eax +++ sarxl %ERAW_PTR_REG, %eax, %eax ++ # ifndef USE_AS_RAWMEMCHR ++ /* Check the end of data. */ ++- cmpq %rax, %rdx ++- jbe L(zero) +++ cmpq %rsi, %rdx +++ jbe L(first_vec_x0) ++ # endif +++ testl %eax, %eax +++ jz L(cross_page_continue) +++ tzcntl %eax, %eax +++ addq %RRAW_PTR_REG, %rax +++L(return_vzeroupper): +++ ZERO_UPPER_VEC_REGISTERS_RETURN +++ +++ .p2align 4 +++L(first_vec_x1): +++ tzcntl %eax, %eax +++ incq %rdi ++ addq %rdi, %rax ++- addq %rcx, %rax ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ ++ .p2align 4 ++-L(aligned_more): ++-# ifndef USE_AS_RAWMEMCHR ++- /* Calculate "rdx + rcx - VEC_SIZE" with "rdx - (VEC_SIZE - rcx)" ++- instead of "(rdx + rcx) - VEC_SIZE" to void possible addition ++- overflow. */ ++- negq %rcx ++- addq $VEC_SIZE, %rcx +++L(first_vec_x2): +++ tzcntl %eax, %eax +++ addq $(VEC_SIZE + 1), %rdi +++ addq %rdi, %rax +++ VZEROUPPER_RETURN ++ ++- /* Check the end of data. */ ++- subq %rcx, %rdx ++- jbe L(zero) ++-# endif +++ .p2align 4 +++L(first_vec_x3): +++ tzcntl %eax, %eax +++ addq $(VEC_SIZE * 2 + 1), %rdi +++ addq %rdi, %rax +++ VZEROUPPER_RETURN ++ ++- addq $VEC_SIZE, %rdi ++ ++-# ifndef USE_AS_RAWMEMCHR ++- subq $(VEC_SIZE * 4), %rdx ++- jbe L(last_4x_vec_or_less) ++-# endif +++ .p2align 4 +++L(first_vec_x4): +++ tzcntl %eax, %eax +++ addq $(VEC_SIZE * 3 + 1), %rdi +++ addq %rdi, %rax +++ VZEROUPPER_RETURN ++ ++-L(more_4x_vec): +++ .p2align 4 +++L(aligned_more): ++ /* Check the first 4 * VEC_SIZE. Only one VEC_SIZE at a time ++ since data is only aligned to VEC_SIZE. */ ++- VPCMPEQ (%rdi), %ymm0, %ymm1 ++- vpmovmskb %ymm1, %eax ++- testl %eax, %eax ++- jnz L(first_vec_x0) ++ ++- VPCMPEQ VEC_SIZE(%rdi), %ymm0, %ymm1 +++# ifndef USE_AS_RAWMEMCHR +++L(cross_page_continue): +++ /* Align data to VEC_SIZE - 1. */ +++ xorl %ecx, %ecx +++ subl %edi, %ecx +++ orq $(VEC_SIZE - 1), %rdi +++ /* esi is for adjusting length to see if near the end. */ +++ leal (VEC_SIZE * 4 + 1)(%rdi, %rcx), %esi +++# ifdef USE_AS_WMEMCHR +++ /* NB: Divide bytes by 4 to get the wchar_t count. */ +++ sarl $2, %esi +++# endif +++# else +++ orq $(VEC_SIZE - 1), %rdi +++L(cross_page_continue): +++# endif +++ /* Load first VEC regardless. */ +++ VPCMPEQ 1(%rdi), %ymm0, %ymm1 ++ vpmovmskb %ymm1, %eax +++# ifndef USE_AS_RAWMEMCHR +++ /* Adjust length. If near end handle specially. */ +++ subq %rsi, %rdx +++ jbe L(last_4x_vec_or_less) +++# endif ++ testl %eax, %eax ++ jnz L(first_vec_x1) ++ ++- VPCMPEQ (VEC_SIZE * 2)(%rdi), %ymm0, %ymm1 +++ VPCMPEQ (VEC_SIZE + 1)(%rdi), %ymm0, %ymm1 ++ vpmovmskb %ymm1, %eax ++ testl %eax, %eax ++ jnz L(first_vec_x2) ++ ++- VPCMPEQ (VEC_SIZE * 3)(%rdi), %ymm0, %ymm1 +++ VPCMPEQ (VEC_SIZE * 2 + 1)(%rdi), %ymm0, %ymm1 ++ vpmovmskb %ymm1, %eax ++ testl %eax, %eax ++ jnz L(first_vec_x3) ++ ++- addq $(VEC_SIZE * 4), %rdi ++- ++-# ifndef USE_AS_RAWMEMCHR ++- subq $(VEC_SIZE * 4), %rdx ++- jbe L(last_4x_vec_or_less) ++-# endif ++- ++- /* Align data to 4 * VEC_SIZE. */ ++- movq %rdi, %rcx ++- andl $(4 * VEC_SIZE - 1), %ecx ++- andq $-(4 * VEC_SIZE), %rdi +++ VPCMPEQ (VEC_SIZE * 3 + 1)(%rdi), %ymm0, %ymm1 +++ vpmovmskb %ymm1, %eax +++ testl %eax, %eax +++ jnz L(first_vec_x4) ++ ++ # ifndef USE_AS_RAWMEMCHR ++- /* Adjust length. */ +++ /* Check if at last VEC_SIZE * 4 length. */ +++ subq $(CHAR_PER_VEC * 4), %rdx +++ jbe L(last_4x_vec_or_less_cmpeq) +++ /* Align data to VEC_SIZE * 4 - 1 for the loop and readjust +++ length. */ +++ incq %rdi +++ movl %edi, %ecx +++ orq $(VEC_SIZE * 4 - 1), %rdi +++ andl $(VEC_SIZE * 4 - 1), %ecx +++# ifdef USE_AS_WMEMCHR +++ /* NB: Divide bytes by 4 to get the wchar_t count. */ +++ sarl $2, %ecx +++# endif ++ addq %rcx, %rdx +++# else +++ /* Align data to VEC_SIZE * 4 - 1 for loop. */ +++ incq %rdi +++ orq $(VEC_SIZE * 4 - 1), %rdi ++ # endif ++ +++ /* Compare 4 * VEC at a time forward. */ ++ .p2align 4 ++ L(loop_4x_vec): ++- /* Compare 4 * VEC at a time forward. */ ++- VPCMPEQ (%rdi), %ymm0, %ymm1 ++- VPCMPEQ VEC_SIZE(%rdi), %ymm0, %ymm2 ++- VPCMPEQ (VEC_SIZE * 2)(%rdi), %ymm0, %ymm3 ++- VPCMPEQ (VEC_SIZE * 3)(%rdi), %ymm0, %ymm4 ++- +++ VPCMPEQ 1(%rdi), %ymm0, %ymm1 +++ VPCMPEQ (VEC_SIZE + 1)(%rdi), %ymm0, %ymm2 +++ VPCMPEQ (VEC_SIZE * 2 + 1)(%rdi), %ymm0, %ymm3 +++ VPCMPEQ (VEC_SIZE * 3 + 1)(%rdi), %ymm0, %ymm4 ++ vpor %ymm1, %ymm2, %ymm5 ++ vpor %ymm3, %ymm4, %ymm6 ++ vpor %ymm5, %ymm6, %ymm5 ++ ++- vpmovmskb %ymm5, %eax ++- testl %eax, %eax ++- jnz L(4x_vec_end) ++- ++- addq $(VEC_SIZE * 4), %rdi ++- +++ vpmovmskb %ymm5, %ecx ++ # ifdef USE_AS_RAWMEMCHR ++- jmp L(loop_4x_vec) +++ subq $-(VEC_SIZE * 4), %rdi +++ testl %ecx, %ecx +++ jz L(loop_4x_vec) ++ # else ++- subq $(VEC_SIZE * 4), %rdx ++- ja L(loop_4x_vec) +++ testl %ecx, %ecx +++ jnz L(loop_4x_vec_end) ++ ++-L(last_4x_vec_or_less): ++- /* Less than 4 * VEC and aligned to VEC_SIZE. */ ++- addl $(VEC_SIZE * 2), %edx ++- jle L(last_2x_vec) +++ subq $-(VEC_SIZE * 4), %rdi ++ ++- VPCMPEQ (%rdi), %ymm0, %ymm1 ++- vpmovmskb %ymm1, %eax ++- testl %eax, %eax ++- jnz L(first_vec_x0) +++ subq $(CHAR_PER_VEC * 4), %rdx +++ ja L(loop_4x_vec) ++ ++- VPCMPEQ VEC_SIZE(%rdi), %ymm0, %ymm1 +++ /* Fall through into less than 4 remaining vectors of length +++ case. */ +++ VPCMPEQ (VEC_SIZE * 0 + 1)(%rdi), %ymm0, %ymm1 ++ vpmovmskb %ymm1, %eax +++ .p2align 4 +++L(last_4x_vec_or_less): +++# ifdef USE_AS_WMEMCHR +++ /* NB: Multiply length by 4 to get byte count. */ +++ sall $2, %edx +++# endif +++ /* Check if first VEC contained match. */ ++ testl %eax, %eax ++- jnz L(first_vec_x1) +++ jnz L(first_vec_x1_check) ++ ++- VPCMPEQ (VEC_SIZE * 2)(%rdi), %ymm0, %ymm1 ++- vpmovmskb %ymm1, %eax ++- testl %eax, %eax +++ /* If remaining length > VEC_SIZE * 2. */ +++ addl $(VEC_SIZE * 2), %edx +++ jg L(last_4x_vec) ++ ++- jnz L(first_vec_x2_check) ++- subl $VEC_SIZE, %edx ++- jle L(zero) +++L(last_2x_vec): +++ /* If remaining length < VEC_SIZE. */ +++ addl $VEC_SIZE, %edx +++ jle L(zero_end) ++ ++- VPCMPEQ (VEC_SIZE * 3)(%rdi), %ymm0, %ymm1 +++ /* Check VEC2 and compare any match with remaining length. */ +++ VPCMPEQ (VEC_SIZE + 1)(%rdi), %ymm0, %ymm1 ++ vpmovmskb %ymm1, %eax ++- testl %eax, %eax ++- ++- jnz L(first_vec_x3_check) ++- xorl %eax, %eax ++- VZEROUPPER ++- ret +++ tzcntl %eax, %eax +++ cmpl %eax, %edx +++ jbe L(set_zero_end) +++ addq $(VEC_SIZE + 1), %rdi +++ addq %rdi, %rax +++L(zero_end): +++ VZEROUPPER_RETURN ++ ++ .p2align 4 ++-L(last_2x_vec): ++- addl $(VEC_SIZE * 2), %edx ++- VPCMPEQ (%rdi), %ymm0, %ymm1 +++L(loop_4x_vec_end): +++# endif +++ /* rawmemchr will fall through into this if match was found in +++ loop. */ +++ ++ vpmovmskb %ymm1, %eax ++ testl %eax, %eax +++ jnz L(last_vec_x1_return) ++ ++- jnz L(first_vec_x0_check) ++- subl $VEC_SIZE, %edx ++- jle L(zero) ++- ++- VPCMPEQ VEC_SIZE(%rdi), %ymm0, %ymm1 ++- vpmovmskb %ymm1, %eax +++ vpmovmskb %ymm2, %eax ++ testl %eax, %eax ++- jnz L(first_vec_x1_check) ++- xorl %eax, %eax ++- VZEROUPPER ++- ret +++ jnz L(last_vec_x2_return) ++ ++- .p2align 4 ++-L(first_vec_x0_check): ++- tzcntl %eax, %eax ++- /* Check the end of data. */ ++- cmpq %rax, %rdx ++- jbe L(zero) +++ vpmovmskb %ymm3, %eax +++ /* Combine VEC3 matches (eax) with VEC4 matches (ecx). */ +++ salq $32, %rcx +++ orq %rcx, %rax +++ tzcntq %rax, %rax +++# ifdef USE_AS_RAWMEMCHR +++ subq $(VEC_SIZE * 2 - 1), %rdi +++# else +++ subq $-(VEC_SIZE * 2 + 1), %rdi +++# endif ++ addq %rdi, %rax ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN +++# ifndef USE_AS_RAWMEMCHR ++ ++ .p2align 4 ++ L(first_vec_x1_check): ++ tzcntl %eax, %eax ++- /* Check the end of data. */ ++- cmpq %rax, %rdx ++- jbe L(zero) ++- addq $VEC_SIZE, %rax +++ /* Adjust length. */ +++ subl $-(VEC_SIZE * 4), %edx +++ /* Check if match within remaining length. */ +++ cmpl %eax, %edx +++ jbe L(set_zero_end) +++ incq %rdi ++ addq %rdi, %rax ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN +++ .p2align 4 +++L(set_zero_end): +++ xorl %eax, %eax +++ VZEROUPPER_RETURN +++# endif ++ ++ .p2align 4 ++-L(first_vec_x2_check): +++L(last_vec_x1_return): ++ tzcntl %eax, %eax ++- /* Check the end of data. */ ++- cmpq %rax, %rdx ++- jbe L(zero) ++- addq $(VEC_SIZE * 2), %rax +++# ifdef USE_AS_RAWMEMCHR +++ subq $(VEC_SIZE * 4 - 1), %rdi +++# else +++ incq %rdi +++# endif ++ addq %rdi, %rax ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ ++ .p2align 4 ++-L(first_vec_x3_check): +++L(last_vec_x2_return): ++ tzcntl %eax, %eax ++- /* Check the end of data. */ ++- cmpq %rax, %rdx ++- jbe L(zero) ++- addq $(VEC_SIZE * 3), %rax +++# ifdef USE_AS_RAWMEMCHR +++ subq $(VEC_SIZE * 3 - 1), %rdi +++# else +++ subq $-(VEC_SIZE + 1), %rdi +++# endif ++ addq %rdi, %rax ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ +++# ifndef USE_AS_RAWMEMCHR ++ .p2align 4 ++-L(zero): ++- VZEROUPPER ++-L(null): ++- xorl %eax, %eax ++- ret ++-# endif +++L(last_4x_vec_or_less_cmpeq): +++ VPCMPEQ (VEC_SIZE * 4 + 1)(%rdi), %ymm0, %ymm1 +++ vpmovmskb %ymm1, %eax +++# ifdef USE_AS_WMEMCHR +++ /* NB: Multiply length by 4 to get byte count. */ +++ sall $2, %edx +++# endif +++ subq $-(VEC_SIZE * 4), %rdi +++ /* Check first VEC regardless. */ +++ testl %eax, %eax +++ jnz L(first_vec_x1_check) ++ +++ /* If remaining length <= CHAR_PER_VEC * 2. */ +++ addl $(VEC_SIZE * 2), %edx +++ jle L(last_2x_vec) ++ .p2align 4 ++-L(first_vec_x0): ++- tzcntl %eax, %eax ++- addq %rdi, %rax ++- VZEROUPPER ++- ret +++L(last_4x_vec): +++ VPCMPEQ (VEC_SIZE + 1)(%rdi), %ymm0, %ymm1 +++ vpmovmskb %ymm1, %eax +++ testl %eax, %eax +++ jnz L(last_vec_x2_return) ++ ++- .p2align 4 ++-L(first_vec_x1): ++- tzcntl %eax, %eax ++- addq $VEC_SIZE, %rax ++- addq %rdi, %rax ++- VZEROUPPER ++- ret +++ VPCMPEQ (VEC_SIZE * 2 + 1)(%rdi), %ymm0, %ymm1 +++ vpmovmskb %ymm1, %eax ++ ++- .p2align 4 ++-L(first_vec_x2): +++ /* Create mask for possible matches within remaining length. */ +++ movq $-1, %rcx +++ bzhiq %rdx, %rcx, %rcx +++ +++ /* Test matches in data against length match. */ +++ andl %ecx, %eax +++ jnz L(last_vec_x3) +++ +++ /* if remaining length <= VEC_SIZE * 3 (Note this is after +++ remaining length was found to be > VEC_SIZE * 2. */ +++ subl $VEC_SIZE, %edx +++ jbe L(zero_end2) +++ +++ VPCMPEQ (VEC_SIZE * 3 + 1)(%rdi), %ymm0, %ymm1 +++ vpmovmskb %ymm1, %eax +++ /* Shift remaining length mask for last VEC. */ +++ shrq $32, %rcx +++ andl %ecx, %eax +++ jz L(zero_end2) ++ tzcntl %eax, %eax ++- addq $(VEC_SIZE * 2), %rax +++ addq $(VEC_SIZE * 3 + 1), %rdi ++ addq %rdi, %rax ++- VZEROUPPER ++- ret +++L(zero_end2): +++ VZEROUPPER_RETURN ++ ++ .p2align 4 ++-L(4x_vec_end): ++- vpmovmskb %ymm1, %eax ++- testl %eax, %eax ++- jnz L(first_vec_x0) ++- vpmovmskb %ymm2, %eax ++- testl %eax, %eax ++- jnz L(first_vec_x1) ++- vpmovmskb %ymm3, %eax ++- testl %eax, %eax ++- jnz L(first_vec_x2) ++- vpmovmskb %ymm4, %eax ++- testl %eax, %eax ++-L(first_vec_x3): +++L(last_vec_x3): ++ tzcntl %eax, %eax ++- addq $(VEC_SIZE * 3), %rax +++ subq $-(VEC_SIZE * 2 + 1), %rdi ++ addq %rdi, %rax ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN +++# endif ++ ++ END (MEMCHR) ++ #endif ++diff --git a/sysdeps/x86_64/multiarch/memchr-evex.S b/sysdeps/x86_64/multiarch/memchr-evex.S ++new file mode 100644 ++index 0000000000..f3fdad4fda ++--- /dev/null +++++ b/sysdeps/x86_64/multiarch/memchr-evex.S ++@@ -0,0 +1,478 @@ +++/* memchr/wmemchr optimized with 256-bit EVEX instructions. +++ Copyright (C) 2021 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 +++ . */ +++ +++#if IS_IN (libc) +++ +++# include +++ +++# ifndef MEMCHR +++# define MEMCHR __memchr_evex +++# endif +++ +++# ifdef USE_AS_WMEMCHR +++# define VPBROADCAST vpbroadcastd +++# define VPMINU vpminud +++# define VPCMP vpcmpd +++# define VPCMPEQ vpcmpeqd +++# define CHAR_SIZE 4 +++# else +++# define VPBROADCAST vpbroadcastb +++# define VPMINU vpminub +++# define VPCMP vpcmpb +++# define VPCMPEQ vpcmpeqb +++# define CHAR_SIZE 1 +++# endif +++ +++# ifdef USE_AS_RAWMEMCHR +++# define RAW_PTR_REG rcx +++# define ALGN_PTR_REG rdi +++# else +++# define RAW_PTR_REG rdi +++# define ALGN_PTR_REG rcx +++# endif +++ +++# define XMMZERO xmm23 +++# define YMMZERO ymm23 +++# define XMMMATCH xmm16 +++# define YMMMATCH ymm16 +++# define YMM1 ymm17 +++# define YMM2 ymm18 +++# define YMM3 ymm19 +++# define YMM4 ymm20 +++# define YMM5 ymm21 +++# define YMM6 ymm22 +++ +++# define VEC_SIZE 32 +++# define CHAR_PER_VEC (VEC_SIZE / CHAR_SIZE) +++# define PAGE_SIZE 4096 +++ +++ .section .text.evex,"ax",@progbits +++ENTRY (MEMCHR) +++# ifndef USE_AS_RAWMEMCHR +++ /* Check for zero length. */ +++ test %RDX_LP, %RDX_LP +++ jz L(zero) +++ +++# ifdef __ILP32__ +++ /* Clear the upper 32 bits. */ +++ movl %edx, %edx +++# endif +++# endif +++ /* Broadcast CHAR to YMMMATCH. */ +++ VPBROADCAST %esi, %YMMMATCH +++ /* Check if we may cross page boundary with one vector load. */ +++ movl %edi, %eax +++ andl $(PAGE_SIZE - 1), %eax +++ cmpl $(PAGE_SIZE - VEC_SIZE), %eax +++ ja L(cross_page_boundary) +++ +++ /* Check the first VEC_SIZE bytes. */ +++ VPCMP $0, (%rdi), %YMMMATCH, %k0 +++ kmovd %k0, %eax +++# ifndef USE_AS_RAWMEMCHR +++ /* If length < CHAR_PER_VEC handle special. */ +++ cmpq $CHAR_PER_VEC, %rdx +++ jbe L(first_vec_x0) +++# endif +++ testl %eax, %eax +++ jz L(aligned_more) +++ tzcntl %eax, %eax +++# ifdef USE_AS_WMEMCHR +++ /* NB: Multiply bytes by CHAR_SIZE to get the wchar_t count. */ +++ leaq (%rdi, %rax, CHAR_SIZE), %rax +++# else +++ addq %rdi, %rax +++# endif +++ ret +++ +++# ifndef USE_AS_RAWMEMCHR +++L(zero): +++ xorl %eax, %eax +++ ret +++ +++ .p2align 5 +++L(first_vec_x0): +++ /* Check if first match was before length. */ +++ tzcntl %eax, %eax +++ xorl %ecx, %ecx +++ cmpl %eax, %edx +++ leaq (%rdi, %rax, CHAR_SIZE), %rax +++ cmovle %rcx, %rax +++ ret +++# else +++ /* NB: first_vec_x0 is 17 bytes which will leave +++ cross_page_boundary (which is relatively cold) close enough +++ to ideal alignment. So only realign L(cross_page_boundary) if +++ rawmemchr. */ +++ .p2align 4 +++# endif +++L(cross_page_boundary): +++ /* Save pointer before aligning as its original value is +++ necessary for computer return address if byte is found or +++ adjusting length if it is not and this is memchr. */ +++ movq %rdi, %rcx +++ /* Align data to VEC_SIZE. ALGN_PTR_REG is rcx for memchr and rdi +++ for rawmemchr. */ +++ andq $-VEC_SIZE, %ALGN_PTR_REG +++ VPCMP $0, (%ALGN_PTR_REG), %YMMMATCH, %k0 +++ kmovd %k0, %r8d +++# ifdef USE_AS_WMEMCHR +++ /* NB: Divide shift count by 4 since each bit in K0 represent 4 +++ bytes. */ +++ sarl $2, %eax +++# endif +++# ifndef USE_AS_RAWMEMCHR +++ movl $(PAGE_SIZE / CHAR_SIZE), %esi +++ subl %eax, %esi +++# endif +++# ifdef USE_AS_WMEMCHR +++ andl $(CHAR_PER_VEC - 1), %eax +++# endif +++ /* Remove the leading bytes. */ +++ sarxl %eax, %r8d, %eax +++# ifndef USE_AS_RAWMEMCHR +++ /* Check the end of data. */ +++ cmpq %rsi, %rdx +++ jbe L(first_vec_x0) +++# endif +++ testl %eax, %eax +++ jz L(cross_page_continue) +++ tzcntl %eax, %eax +++# ifdef USE_AS_WMEMCHR +++ /* NB: Multiply bytes by CHAR_SIZE to get the wchar_t count. */ +++ leaq (%RAW_PTR_REG, %rax, CHAR_SIZE), %rax +++# else +++ addq %RAW_PTR_REG, %rax +++# endif +++ ret +++ +++ .p2align 4 +++L(first_vec_x1): +++ tzcntl %eax, %eax +++ leaq VEC_SIZE(%rdi, %rax, CHAR_SIZE), %rax +++ ret +++ +++ .p2align 4 +++L(first_vec_x2): +++ tzcntl %eax, %eax +++ leaq (VEC_SIZE * 2)(%rdi, %rax, CHAR_SIZE), %rax +++ ret +++ +++ .p2align 4 +++L(first_vec_x3): +++ tzcntl %eax, %eax +++ leaq (VEC_SIZE * 3)(%rdi, %rax, CHAR_SIZE), %rax +++ ret +++ +++ .p2align 4 +++L(first_vec_x4): +++ tzcntl %eax, %eax +++ leaq (VEC_SIZE * 4)(%rdi, %rax, CHAR_SIZE), %rax +++ ret +++ +++ .p2align 5 +++L(aligned_more): +++ /* Check the first 4 * VEC_SIZE. Only one VEC_SIZE at a time +++ since data is only aligned to VEC_SIZE. */ +++ +++# ifndef USE_AS_RAWMEMCHR +++ /* Align data to VEC_SIZE. */ +++L(cross_page_continue): +++ xorl %ecx, %ecx +++ subl %edi, %ecx +++ andq $-VEC_SIZE, %rdi +++ /* esi is for adjusting length to see if near the end. */ +++ leal (VEC_SIZE * 5)(%rdi, %rcx), %esi +++# ifdef USE_AS_WMEMCHR +++ /* NB: Divide bytes by 4 to get the wchar_t count. */ +++ sarl $2, %esi +++# endif +++# else +++ andq $-VEC_SIZE, %rdi +++L(cross_page_continue): +++# endif +++ /* Load first VEC regardless. */ +++ VPCMP $0, (VEC_SIZE)(%rdi), %YMMMATCH, %k0 +++ kmovd %k0, %eax +++# ifndef USE_AS_RAWMEMCHR +++ /* Adjust length. If near end handle specially. */ +++ subq %rsi, %rdx +++ jbe L(last_4x_vec_or_less) +++# endif +++ testl %eax, %eax +++ jnz L(first_vec_x1) +++ +++ VPCMP $0, (VEC_SIZE * 2)(%rdi), %YMMMATCH, %k0 +++ kmovd %k0, %eax +++ testl %eax, %eax +++ jnz L(first_vec_x2) +++ +++ VPCMP $0, (VEC_SIZE * 3)(%rdi), %YMMMATCH, %k0 +++ kmovd %k0, %eax +++ testl %eax, %eax +++ jnz L(first_vec_x3) +++ +++ VPCMP $0, (VEC_SIZE * 4)(%rdi), %YMMMATCH, %k0 +++ kmovd %k0, %eax +++ testl %eax, %eax +++ jnz L(first_vec_x4) +++ +++ +++# ifndef USE_AS_RAWMEMCHR +++ /* Check if at last CHAR_PER_VEC * 4 length. */ +++ subq $(CHAR_PER_VEC * 4), %rdx +++ jbe L(last_4x_vec_or_less_cmpeq) +++ addq $VEC_SIZE, %rdi +++ +++ /* Align data to VEC_SIZE * 4 for the loop and readjust length. +++ */ +++# ifdef USE_AS_WMEMCHR +++ movl %edi, %ecx +++ andq $-(4 * VEC_SIZE), %rdi +++ andl $(VEC_SIZE * 4 - 1), %ecx +++ /* NB: Divide bytes by 4 to get the wchar_t count. */ +++ sarl $2, %ecx +++ addq %rcx, %rdx +++# else +++ addq %rdi, %rdx +++ andq $-(4 * VEC_SIZE), %rdi +++ subq %rdi, %rdx +++# endif +++# else +++ addq $VEC_SIZE, %rdi +++ andq $-(4 * VEC_SIZE), %rdi +++# endif +++ +++ vpxorq %XMMZERO, %XMMZERO, %XMMZERO +++ +++ /* Compare 4 * VEC at a time forward. */ +++ .p2align 4 +++L(loop_4x_vec): +++ /* It would be possible to save some instructions using 4x VPCMP +++ but bottleneck on port 5 makes it not woth it. */ +++ VPCMP $4, (VEC_SIZE * 4)(%rdi), %YMMMATCH, %k1 +++ /* xor will set bytes match esi to zero. */ +++ vpxorq (VEC_SIZE * 5)(%rdi), %YMMMATCH, %YMM2 +++ vpxorq (VEC_SIZE * 6)(%rdi), %YMMMATCH, %YMM3 +++ VPCMP $0, (VEC_SIZE * 7)(%rdi), %YMMMATCH, %k3 +++ /* Reduce VEC2 / VEC3 with min and VEC1 with zero mask. */ +++ VPMINU %YMM2, %YMM3, %YMM3{%k1}{z} +++ VPCMP $0, %YMM3, %YMMZERO, %k2 +++# ifdef USE_AS_RAWMEMCHR +++ subq $-(VEC_SIZE * 4), %rdi +++ kortestd %k2, %k3 +++ jz L(loop_4x_vec) +++# else +++ kortestd %k2, %k3 +++ jnz L(loop_4x_vec_end) +++ +++ subq $-(VEC_SIZE * 4), %rdi +++ +++ subq $(CHAR_PER_VEC * 4), %rdx +++ ja L(loop_4x_vec) +++ +++ /* Fall through into less than 4 remaining vectors of length case. +++ */ +++ VPCMP $0, (VEC_SIZE * 4)(%rdi), %YMMMATCH, %k0 +++ kmovd %k0, %eax +++ addq $(VEC_SIZE * 3), %rdi +++ .p2align 4 +++L(last_4x_vec_or_less): +++ /* Check if first VEC contained match. */ +++ testl %eax, %eax +++ jnz L(first_vec_x1_check) +++ +++ /* If remaining length > CHAR_PER_VEC * 2. */ +++ addl $(CHAR_PER_VEC * 2), %edx +++ jg L(last_4x_vec) +++ +++L(last_2x_vec): +++ /* If remaining length < CHAR_PER_VEC. */ +++ addl $CHAR_PER_VEC, %edx +++ jle L(zero_end) +++ +++ /* Check VEC2 and compare any match with remaining length. */ +++ VPCMP $0, (VEC_SIZE * 2)(%rdi), %YMMMATCH, %k0 +++ kmovd %k0, %eax +++ tzcntl %eax, %eax +++ cmpl %eax, %edx +++ jbe L(set_zero_end) +++ leaq (VEC_SIZE * 2)(%rdi, %rax, CHAR_SIZE), %rax +++L(zero_end): +++ ret +++ +++ +++ .p2align 4 +++L(first_vec_x1_check): +++ tzcntl %eax, %eax +++ /* Adjust length. */ +++ subl $-(CHAR_PER_VEC * 4), %edx +++ /* Check if match within remaining length. */ +++ cmpl %eax, %edx +++ jbe L(set_zero_end) +++ /* NB: Multiply bytes by CHAR_SIZE to get the wchar_t count. */ +++ leaq VEC_SIZE(%rdi, %rax, CHAR_SIZE), %rax +++ ret +++L(set_zero_end): +++ xorl %eax, %eax +++ ret +++ +++ .p2align 4 +++L(loop_4x_vec_end): +++# endif +++ /* rawmemchr will fall through into this if match was found in +++ loop. */ +++ +++ /* k1 has not of matches with VEC1. */ +++ kmovd %k1, %eax +++# ifdef USE_AS_WMEMCHR +++ subl $((1 << CHAR_PER_VEC) - 1), %eax +++# else +++ incl %eax +++# endif +++ jnz L(last_vec_x1_return) +++ +++ VPCMP $0, %YMM2, %YMMZERO, %k0 +++ kmovd %k0, %eax +++ testl %eax, %eax +++ jnz L(last_vec_x2_return) +++ +++ kmovd %k2, %eax +++ testl %eax, %eax +++ jnz L(last_vec_x3_return) +++ +++ kmovd %k3, %eax +++ tzcntl %eax, %eax +++# ifdef USE_AS_RAWMEMCHR +++ leaq (VEC_SIZE * 3)(%rdi, %rax, CHAR_SIZE), %rax +++# else +++ leaq (VEC_SIZE * 7)(%rdi, %rax, CHAR_SIZE), %rax +++# endif +++ ret +++ +++ .p2align 4 +++L(last_vec_x1_return): +++ tzcntl %eax, %eax +++# ifdef USE_AS_RAWMEMCHR +++# ifdef USE_AS_WMEMCHR +++ /* NB: Multiply bytes by CHAR_SIZE to get the wchar_t count. */ +++ leaq (%rdi, %rax, CHAR_SIZE), %rax +++# else +++ addq %rdi, %rax +++# endif +++# else +++ /* NB: Multiply bytes by CHAR_SIZE to get the wchar_t count. */ +++ leaq (VEC_SIZE * 4)(%rdi, %rax, CHAR_SIZE), %rax +++# endif +++ ret +++ +++ .p2align 4 +++L(last_vec_x2_return): +++ tzcntl %eax, %eax +++# ifdef USE_AS_RAWMEMCHR +++ /* NB: Multiply bytes by CHAR_SIZE to get the wchar_t count. */ +++ leaq VEC_SIZE(%rdi, %rax, CHAR_SIZE), %rax +++# else +++ /* NB: Multiply bytes by CHAR_SIZE to get the wchar_t count. */ +++ leaq (VEC_SIZE * 5)(%rdi, %rax, CHAR_SIZE), %rax +++# endif +++ ret +++ +++ .p2align 4 +++L(last_vec_x3_return): +++ tzcntl %eax, %eax +++# ifdef USE_AS_RAWMEMCHR +++ /* NB: Multiply bytes by CHAR_SIZE to get the wchar_t count. */ +++ leaq (VEC_SIZE * 2)(%rdi, %rax, CHAR_SIZE), %rax +++# else +++ /* NB: Multiply bytes by CHAR_SIZE to get the wchar_t count. */ +++ leaq (VEC_SIZE * 6)(%rdi, %rax, CHAR_SIZE), %rax +++# endif +++ ret +++ +++ +++# ifndef USE_AS_RAWMEMCHR +++L(last_4x_vec_or_less_cmpeq): +++ VPCMP $0, (VEC_SIZE * 5)(%rdi), %YMMMATCH, %k0 +++ kmovd %k0, %eax +++ subq $-(VEC_SIZE * 4), %rdi +++ /* Check first VEC regardless. */ +++ testl %eax, %eax +++ jnz L(first_vec_x1_check) +++ +++ /* If remaining length <= CHAR_PER_VEC * 2. */ +++ addl $(CHAR_PER_VEC * 2), %edx +++ jle L(last_2x_vec) +++ +++ .p2align 4 +++L(last_4x_vec): +++ VPCMP $0, (VEC_SIZE * 2)(%rdi), %YMMMATCH, %k0 +++ kmovd %k0, %eax +++ testl %eax, %eax +++ jnz L(last_vec_x2) +++ +++ +++ VPCMP $0, (VEC_SIZE * 3)(%rdi), %YMMMATCH, %k0 +++ kmovd %k0, %eax +++ /* Create mask for possible matches within remaining length. */ +++# ifdef USE_AS_WMEMCHR +++ movl $((1 << (CHAR_PER_VEC * 2)) - 1), %ecx +++ bzhil %edx, %ecx, %ecx +++# else +++ movq $-1, %rcx +++ bzhiq %rdx, %rcx, %rcx +++# endif +++ /* Test matches in data against length match. */ +++ andl %ecx, %eax +++ jnz L(last_vec_x3) +++ +++ /* if remaining length <= CHAR_PER_VEC * 3 (Note this is after +++ remaining length was found to be > CHAR_PER_VEC * 2. */ +++ subl $CHAR_PER_VEC, %edx +++ jbe L(zero_end2) +++ +++ +++ VPCMP $0, (VEC_SIZE * 4)(%rdi), %YMMMATCH, %k0 +++ kmovd %k0, %eax +++ /* Shift remaining length mask for last VEC. */ +++# ifdef USE_AS_WMEMCHR +++ shrl $CHAR_PER_VEC, %ecx +++# else +++ shrq $CHAR_PER_VEC, %rcx +++# endif +++ andl %ecx, %eax +++ jz L(zero_end2) +++ tzcntl %eax, %eax +++ leaq (VEC_SIZE * 4)(%rdi, %rax, CHAR_SIZE), %rax +++L(zero_end2): +++ ret +++ +++L(last_vec_x2): +++ tzcntl %eax, %eax +++ leaq (VEC_SIZE * 2)(%rdi, %rax, CHAR_SIZE), %rax +++ ret +++ +++ .p2align 4 +++L(last_vec_x3): +++ tzcntl %eax, %eax +++ leaq (VEC_SIZE * 3)(%rdi, %rax, CHAR_SIZE), %rax +++ ret +++# endif +++ +++END (MEMCHR) +++#endif ++diff --git a/sysdeps/x86_64/multiarch/memcmp-avx2-movbe-rtm.S b/sysdeps/x86_64/multiarch/memcmp-avx2-movbe-rtm.S ++new file mode 100644 ++index 0000000000..cf4eff5d4a ++--- /dev/null +++++ b/sysdeps/x86_64/multiarch/memcmp-avx2-movbe-rtm.S ++@@ -0,0 +1,12 @@ +++#ifndef MEMCMP +++# define MEMCMP __memcmp_avx2_movbe_rtm +++#endif +++ +++#define ZERO_UPPER_VEC_REGISTERS_RETURN \ +++ ZERO_UPPER_VEC_REGISTERS_RETURN_XTEST +++ +++#define VZEROUPPER_RETURN jmp L(return_vzeroupper) +++ +++#define SECTION(p) p##.avx.rtm +++ +++#include "memcmp-avx2-movbe.S" ++diff --git a/sysdeps/x86_64/multiarch/memcmp-avx2-movbe.S b/sysdeps/x86_64/multiarch/memcmp-avx2-movbe.S ++index 67fc575b59..87f9478eaf 100644 ++--- a/sysdeps/x86_64/multiarch/memcmp-avx2-movbe.S +++++ b/sysdeps/x86_64/multiarch/memcmp-avx2-movbe.S ++@@ -47,6 +47,10 @@ ++ # define VZEROUPPER vzeroupper ++ # endif ++ +++# ifndef SECTION +++# define SECTION(p) p##.avx +++# endif +++ ++ # define VEC_SIZE 32 ++ # define VEC_MASK ((1 << VEC_SIZE) - 1) ++ ++@@ -55,7 +59,7 @@ ++ memcmp has to use UNSIGNED comparison for elemnts. ++ */ ++ ++- .section .text.avx,"ax",@progbits +++ .section SECTION(.text),"ax",@progbits ++ ENTRY (MEMCMP) ++ # ifdef USE_AS_WMEMCMP ++ shl $2, %RDX_LP ++@@ -123,8 +127,8 @@ ENTRY (MEMCMP) ++ vptest %ymm0, %ymm5 ++ jnc L(4x_vec_end) ++ xorl %eax, %eax ++- VZEROUPPER ++- ret +++L(return_vzeroupper): +++ ZERO_UPPER_VEC_REGISTERS_RETURN ++ ++ .p2align 4 ++ L(last_2x_vec): ++@@ -144,8 +148,7 @@ L(last_vec): ++ vpmovmskb %ymm2, %eax ++ subl $VEC_MASK, %eax ++ jnz L(first_vec) ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ ++ .p2align 4 ++ L(first_vec): ++@@ -164,8 +167,7 @@ L(wmemcmp_return): ++ movzbl (%rsi, %rcx), %edx ++ sub %edx, %eax ++ # endif ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ ++ # ifdef USE_AS_WMEMCMP ++ .p2align 4 ++@@ -367,8 +369,7 @@ L(last_4x_vec): ++ vpmovmskb %ymm2, %eax ++ subl $VEC_MASK, %eax ++ jnz L(first_vec) ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ ++ .p2align 4 ++ L(4x_vec_end): ++@@ -394,8 +395,7 @@ L(4x_vec_end): ++ movzbl (VEC_SIZE * 3)(%rsi, %rcx), %edx ++ sub %edx, %eax ++ # endif ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ ++ .p2align 4 ++ L(first_vec_x1): ++@@ -410,8 +410,7 @@ L(first_vec_x1): ++ movzbl VEC_SIZE(%rsi, %rcx), %edx ++ sub %edx, %eax ++ # endif ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ ++ .p2align 4 ++ L(first_vec_x2): ++@@ -426,7 +425,6 @@ L(first_vec_x2): ++ movzbl (VEC_SIZE * 2)(%rsi, %rcx), %edx ++ sub %edx, %eax ++ # endif ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ END (MEMCMP) ++ #endif ++diff --git a/sysdeps/x86_64/multiarch/memcmp-evex-movbe.S b/sysdeps/x86_64/multiarch/memcmp-evex-movbe.S ++new file mode 100644 ++index 0000000000..9c093972e1 ++--- /dev/null +++++ b/sysdeps/x86_64/multiarch/memcmp-evex-movbe.S ++@@ -0,0 +1,440 @@ +++/* memcmp/wmemcmp optimized with 256-bit EVEX instructions. +++ Copyright (C) 2021 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 +++ . */ +++ +++#if IS_IN (libc) +++ +++/* memcmp/wmemcmp is implemented as: +++ 1. For size from 2 to 7 bytes, load as big endian with movbe and bswap +++ to avoid branches. +++ 2. Use overlapping compare to avoid branch. +++ 3. Use vector compare when size >= 4 bytes for memcmp or size >= 8 +++ bytes for wmemcmp. +++ 4. If size is 8 * VEC_SIZE or less, unroll the loop. +++ 5. Compare 4 * VEC_SIZE at a time with the aligned first memory +++ area. +++ 6. Use 2 vector compares when size is 2 * VEC_SIZE or less. +++ 7. Use 4 vector compares when size is 4 * VEC_SIZE or less. +++ 8. Use 8 vector compares when size is 8 * VEC_SIZE or less. */ +++ +++# include +++ +++# ifndef MEMCMP +++# define MEMCMP __memcmp_evex_movbe +++# endif +++ +++# define VMOVU vmovdqu64 +++ +++# ifdef USE_AS_WMEMCMP +++# define VPCMPEQ vpcmpeqd +++# else +++# define VPCMPEQ vpcmpeqb +++# endif +++ +++# define XMM1 xmm17 +++# define XMM2 xmm18 +++# define YMM1 ymm17 +++# define YMM2 ymm18 +++# define YMM3 ymm19 +++# define YMM4 ymm20 +++# define YMM5 ymm21 +++# define YMM6 ymm22 +++ +++# define VEC_SIZE 32 +++# ifdef USE_AS_WMEMCMP +++# define VEC_MASK 0xff +++# define XMM_MASK 0xf +++# else +++# define VEC_MASK 0xffffffff +++# define XMM_MASK 0xffff +++# endif +++ +++/* Warning! +++ wmemcmp has to use SIGNED comparison for elements. +++ memcmp has to use UNSIGNED comparison for elemnts. +++*/ +++ +++ .section .text.evex,"ax",@progbits +++ENTRY (MEMCMP) +++# ifdef USE_AS_WMEMCMP +++ shl $2, %RDX_LP +++# elif defined __ILP32__ +++ /* Clear the upper 32 bits. */ +++ movl %edx, %edx +++# endif +++ cmp $VEC_SIZE, %RDX_LP +++ jb L(less_vec) +++ +++ /* From VEC to 2 * VEC. No branch when size == VEC_SIZE. */ +++ VMOVU (%rsi), %YMM2 +++ VPCMPEQ (%rdi), %YMM2, %k1 +++ kmovd %k1, %eax +++ subl $VEC_MASK, %eax +++ jnz L(first_vec) +++ +++ cmpq $(VEC_SIZE * 2), %rdx +++ jbe L(last_vec) +++ +++ /* More than 2 * VEC. */ +++ cmpq $(VEC_SIZE * 8), %rdx +++ ja L(more_8x_vec) +++ cmpq $(VEC_SIZE * 4), %rdx +++ jb L(last_4x_vec) +++ +++ /* From 4 * VEC to 8 * VEC, inclusively. */ +++ VMOVU (%rsi), %YMM1 +++ VPCMPEQ (%rdi), %YMM1, %k1 +++ +++ VMOVU VEC_SIZE(%rsi), %YMM2 +++ VPCMPEQ VEC_SIZE(%rdi), %YMM2, %k2 +++ +++ VMOVU (VEC_SIZE * 2)(%rsi), %YMM3 +++ VPCMPEQ (VEC_SIZE * 2)(%rdi), %YMM3, %k3 +++ +++ VMOVU (VEC_SIZE * 3)(%rsi), %YMM4 +++ VPCMPEQ (VEC_SIZE * 3)(%rdi), %YMM4, %k4 +++ +++ kandd %k1, %k2, %k5 +++ kandd %k3, %k4, %k6 +++ kandd %k5, %k6, %k6 +++ +++ kmovd %k6, %eax +++ cmpl $VEC_MASK, %eax +++ jne L(4x_vec_end) +++ +++ leaq -(4 * VEC_SIZE)(%rdi, %rdx), %rdi +++ leaq -(4 * VEC_SIZE)(%rsi, %rdx), %rsi +++ VMOVU (%rsi), %YMM1 +++ VPCMPEQ (%rdi), %YMM1, %k1 +++ +++ VMOVU VEC_SIZE(%rsi), %YMM2 +++ VPCMPEQ VEC_SIZE(%rdi), %YMM2, %k2 +++ kandd %k1, %k2, %k5 +++ +++ VMOVU (VEC_SIZE * 2)(%rsi), %YMM3 +++ VPCMPEQ (VEC_SIZE * 2)(%rdi), %YMM3, %k3 +++ kandd %k3, %k5, %k5 +++ +++ VMOVU (VEC_SIZE * 3)(%rsi), %YMM4 +++ VPCMPEQ (VEC_SIZE * 3)(%rdi), %YMM4, %k4 +++ kandd %k4, %k5, %k5 +++ +++ kmovd %k5, %eax +++ cmpl $VEC_MASK, %eax +++ jne L(4x_vec_end) +++ xorl %eax, %eax +++ ret +++ +++ .p2align 4 +++L(last_2x_vec): +++ /* From VEC to 2 * VEC. No branch when size == VEC_SIZE. */ +++ VMOVU (%rsi), %YMM2 +++ VPCMPEQ (%rdi), %YMM2, %k2 +++ kmovd %k2, %eax +++ subl $VEC_MASK, %eax +++ jnz L(first_vec) +++ +++L(last_vec): +++ /* Use overlapping loads to avoid branches. */ +++ leaq -VEC_SIZE(%rdi, %rdx), %rdi +++ leaq -VEC_SIZE(%rsi, %rdx), %rsi +++ VMOVU (%rsi), %YMM2 +++ VPCMPEQ (%rdi), %YMM2, %k2 +++ kmovd %k2, %eax +++ subl $VEC_MASK, %eax +++ jnz L(first_vec) +++ ret +++ +++ .p2align 4 +++L(first_vec): +++ /* A byte or int32 is different within 16 or 32 bytes. */ +++ tzcntl %eax, %ecx +++# ifdef USE_AS_WMEMCMP +++ xorl %eax, %eax +++ movl (%rdi, %rcx, 4), %edx +++ cmpl (%rsi, %rcx, 4), %edx +++L(wmemcmp_return): +++ setl %al +++ negl %eax +++ orl $1, %eax +++# else +++ movzbl (%rdi, %rcx), %eax +++ movzbl (%rsi, %rcx), %edx +++ sub %edx, %eax +++# endif +++ ret +++ +++# ifdef USE_AS_WMEMCMP +++ .p2align 4 +++L(4): +++ xorl %eax, %eax +++ movl (%rdi), %edx +++ cmpl (%rsi), %edx +++ jne L(wmemcmp_return) +++ ret +++# else +++ .p2align 4 +++L(between_4_7): +++ /* Load as big endian with overlapping movbe to avoid branches. */ +++ movbe (%rdi), %eax +++ movbe (%rsi), %ecx +++ shlq $32, %rax +++ shlq $32, %rcx +++ movbe -4(%rdi, %rdx), %edi +++ movbe -4(%rsi, %rdx), %esi +++ orq %rdi, %rax +++ orq %rsi, %rcx +++ subq %rcx, %rax +++ je L(exit) +++ sbbl %eax, %eax +++ orl $1, %eax +++ ret +++ +++ .p2align 4 +++L(exit): +++ ret +++ +++ .p2align 4 +++L(between_2_3): +++ /* Load as big endian to avoid branches. */ +++ movzwl (%rdi), %eax +++ movzwl (%rsi), %ecx +++ shll $8, %eax +++ shll $8, %ecx +++ bswap %eax +++ bswap %ecx +++ movb -1(%rdi, %rdx), %al +++ movb -1(%rsi, %rdx), %cl +++ /* Subtraction is okay because the upper 8 bits are zero. */ +++ subl %ecx, %eax +++ ret +++ +++ .p2align 4 +++L(1): +++ movzbl (%rdi), %eax +++ movzbl (%rsi), %ecx +++ subl %ecx, %eax +++ ret +++# endif +++ +++ .p2align 4 +++L(zero): +++ xorl %eax, %eax +++ ret +++ +++ .p2align 4 +++L(less_vec): +++# ifdef USE_AS_WMEMCMP +++ /* It can only be 0, 4, 8, 12, 16, 20, 24, 28 bytes. */ +++ cmpb $4, %dl +++ je L(4) +++ jb L(zero) +++# else +++ cmpb $1, %dl +++ je L(1) +++ jb L(zero) +++ cmpb $4, %dl +++ jb L(between_2_3) +++ cmpb $8, %dl +++ jb L(between_4_7) +++# endif +++ cmpb $16, %dl +++ jae L(between_16_31) +++ /* It is between 8 and 15 bytes. */ +++ vmovq (%rdi), %XMM1 +++ vmovq (%rsi), %XMM2 +++ VPCMPEQ %XMM1, %XMM2, %k2 +++ kmovw %k2, %eax +++ subl $XMM_MASK, %eax +++ jnz L(first_vec) +++ /* Use overlapping loads to avoid branches. */ +++ leaq -8(%rdi, %rdx), %rdi +++ leaq -8(%rsi, %rdx), %rsi +++ vmovq (%rdi), %XMM1 +++ vmovq (%rsi), %XMM2 +++ VPCMPEQ %XMM1, %XMM2, %k2 +++ kmovw %k2, %eax +++ subl $XMM_MASK, %eax +++ jnz L(first_vec) +++ ret +++ +++ .p2align 4 +++L(between_16_31): +++ /* From 16 to 31 bytes. No branch when size == 16. */ +++ VMOVU (%rsi), %XMM2 +++ VPCMPEQ (%rdi), %XMM2, %k2 +++ kmovw %k2, %eax +++ subl $XMM_MASK, %eax +++ jnz L(first_vec) +++ +++ /* Use overlapping loads to avoid branches. */ +++ leaq -16(%rdi, %rdx), %rdi +++ leaq -16(%rsi, %rdx), %rsi +++ VMOVU (%rsi), %XMM2 +++ VPCMPEQ (%rdi), %XMM2, %k2 +++ kmovw %k2, %eax +++ subl $XMM_MASK, %eax +++ jnz L(first_vec) +++ ret +++ +++ .p2align 4 +++L(more_8x_vec): +++ /* More than 8 * VEC. Check the first VEC. */ +++ VMOVU (%rsi), %YMM2 +++ VPCMPEQ (%rdi), %YMM2, %k2 +++ kmovd %k2, %eax +++ subl $VEC_MASK, %eax +++ jnz L(first_vec) +++ +++ /* Align the first memory area for aligned loads in the loop. +++ Compute how much the first memory area is misaligned. */ +++ movq %rdi, %rcx +++ andl $(VEC_SIZE - 1), %ecx +++ /* Get the negative of offset for alignment. */ +++ subq $VEC_SIZE, %rcx +++ /* Adjust the second memory area. */ +++ subq %rcx, %rsi +++ /* Adjust the first memory area which should be aligned now. */ +++ subq %rcx, %rdi +++ /* Adjust length. */ +++ addq %rcx, %rdx +++ +++L(loop_4x_vec): +++ /* Compare 4 * VEC at a time forward. */ +++ VMOVU (%rsi), %YMM1 +++ VPCMPEQ (%rdi), %YMM1, %k1 +++ +++ VMOVU VEC_SIZE(%rsi), %YMM2 +++ VPCMPEQ VEC_SIZE(%rdi), %YMM2, %k2 +++ kandd %k2, %k1, %k5 +++ +++ VMOVU (VEC_SIZE * 2)(%rsi), %YMM3 +++ VPCMPEQ (VEC_SIZE * 2)(%rdi), %YMM3, %k3 +++ kandd %k3, %k5, %k5 +++ +++ VMOVU (VEC_SIZE * 3)(%rsi), %YMM4 +++ VPCMPEQ (VEC_SIZE * 3)(%rdi), %YMM4, %k4 +++ kandd %k4, %k5, %k5 +++ +++ kmovd %k5, %eax +++ cmpl $VEC_MASK, %eax +++ jne L(4x_vec_end) +++ +++ addq $(VEC_SIZE * 4), %rdi +++ addq $(VEC_SIZE * 4), %rsi +++ +++ subq $(VEC_SIZE * 4), %rdx +++ cmpq $(VEC_SIZE * 4), %rdx +++ jae L(loop_4x_vec) +++ +++ /* Less than 4 * VEC. */ +++ cmpq $VEC_SIZE, %rdx +++ jbe L(last_vec) +++ cmpq $(VEC_SIZE * 2), %rdx +++ jbe L(last_2x_vec) +++ +++L(last_4x_vec): +++ /* From 2 * VEC to 4 * VEC. */ +++ VMOVU (%rsi), %YMM2 +++ VPCMPEQ (%rdi), %YMM2, %k2 +++ kmovd %k2, %eax +++ subl $VEC_MASK, %eax +++ jnz L(first_vec) +++ +++ addq $VEC_SIZE, %rdi +++ addq $VEC_SIZE, %rsi +++ VMOVU (%rsi), %YMM2 +++ VPCMPEQ (%rdi), %YMM2, %k2 +++ kmovd %k2, %eax +++ subl $VEC_MASK, %eax +++ jnz L(first_vec) +++ +++ /* Use overlapping loads to avoid branches. */ +++ leaq -(3 * VEC_SIZE)(%rdi, %rdx), %rdi +++ leaq -(3 * VEC_SIZE)(%rsi, %rdx), %rsi +++ VMOVU (%rsi), %YMM2 +++ VPCMPEQ (%rdi), %YMM2, %k2 +++ kmovd %k2, %eax +++ subl $VEC_MASK, %eax +++ jnz L(first_vec) +++ +++ addq $VEC_SIZE, %rdi +++ addq $VEC_SIZE, %rsi +++ VMOVU (%rsi), %YMM2 +++ VPCMPEQ (%rdi), %YMM2, %k2 +++ kmovd %k2, %eax +++ subl $VEC_MASK, %eax +++ jnz L(first_vec) +++ ret +++ +++ .p2align 4 +++L(4x_vec_end): +++ kmovd %k1, %eax +++ subl $VEC_MASK, %eax +++ jnz L(first_vec) +++ kmovd %k2, %eax +++ subl $VEC_MASK, %eax +++ jnz L(first_vec_x1) +++ kmovd %k3, %eax +++ subl $VEC_MASK, %eax +++ jnz L(first_vec_x2) +++ kmovd %k4, %eax +++ subl $VEC_MASK, %eax +++ tzcntl %eax, %ecx +++# ifdef USE_AS_WMEMCMP +++ xorl %eax, %eax +++ movl (VEC_SIZE * 3)(%rdi, %rcx, 4), %edx +++ cmpl (VEC_SIZE * 3)(%rsi, %rcx, 4), %edx +++ jmp L(wmemcmp_return) +++# else +++ movzbl (VEC_SIZE * 3)(%rdi, %rcx), %eax +++ movzbl (VEC_SIZE * 3)(%rsi, %rcx), %edx +++ sub %edx, %eax +++# endif +++ ret +++ +++ .p2align 4 +++L(first_vec_x1): +++ tzcntl %eax, %ecx +++# ifdef USE_AS_WMEMCMP +++ xorl %eax, %eax +++ movl VEC_SIZE(%rdi, %rcx, 4), %edx +++ cmpl VEC_SIZE(%rsi, %rcx, 4), %edx +++ jmp L(wmemcmp_return) +++# else +++ movzbl VEC_SIZE(%rdi, %rcx), %eax +++ movzbl VEC_SIZE(%rsi, %rcx), %edx +++ sub %edx, %eax +++# endif +++ ret +++ +++ .p2align 4 +++L(first_vec_x2): +++ tzcntl %eax, %ecx +++# ifdef USE_AS_WMEMCMP +++ xorl %eax, %eax +++ movl (VEC_SIZE * 2)(%rdi, %rcx, 4), %edx +++ cmpl (VEC_SIZE * 2)(%rsi, %rcx, 4), %edx +++ jmp L(wmemcmp_return) +++# else +++ movzbl (VEC_SIZE * 2)(%rdi, %rcx), %eax +++ movzbl (VEC_SIZE * 2)(%rsi, %rcx), %edx +++ sub %edx, %eax +++# endif +++ ret +++END (MEMCMP) +++#endif ++diff --git a/sysdeps/x86_64/multiarch/memmove-avx-unaligned-erms-rtm.S b/sysdeps/x86_64/multiarch/memmove-avx-unaligned-erms-rtm.S ++new file mode 100644 ++index 0000000000..1ec1962e86 ++--- /dev/null +++++ b/sysdeps/x86_64/multiarch/memmove-avx-unaligned-erms-rtm.S ++@@ -0,0 +1,17 @@ +++#if IS_IN (libc) +++# define VEC_SIZE 32 +++# define VEC(i) ymm##i +++# define VMOVNT vmovntdq +++# define VMOVU vmovdqu +++# define VMOVA vmovdqa +++ +++# define ZERO_UPPER_VEC_REGISTERS_RETURN \ +++ ZERO_UPPER_VEC_REGISTERS_RETURN_XTEST +++ +++# define VZEROUPPER_RETURN jmp L(return) +++ +++# define SECTION(p) p##.avx.rtm +++# define MEMMOVE_SYMBOL(p,s) p##_avx_##s##_rtm +++ +++# include "memmove-vec-unaligned-erms.S" +++#endif ++diff --git a/sysdeps/x86_64/multiarch/memmove-avx512-unaligned-erms.S b/sysdeps/x86_64/multiarch/memmove-avx512-unaligned-erms.S ++index aac1515cf6..7dad1ad74c 100644 ++--- a/sysdeps/x86_64/multiarch/memmove-avx512-unaligned-erms.S +++++ b/sysdeps/x86_64/multiarch/memmove-avx512-unaligned-erms.S ++@@ -1,11 +1,25 @@ ++ #if IS_IN (libc) ++ # define VEC_SIZE 64 ++-# define VEC(i) zmm##i +++# define XMM0 xmm16 +++# define XMM1 xmm17 +++# define YMM0 ymm16 +++# define YMM1 ymm17 +++# define VEC0 zmm16 +++# define VEC1 zmm17 +++# define VEC2 zmm18 +++# define VEC3 zmm19 +++# define VEC4 zmm20 +++# define VEC5 zmm21 +++# define VEC6 zmm22 +++# define VEC7 zmm23 +++# define VEC8 zmm24 +++# define VEC(i) VEC##i ++ # define VMOVNT vmovntdq ++ # define VMOVU vmovdqu64 ++ # define VMOVA vmovdqa64 +++# define VZEROUPPER ++ ++-# define SECTION(p) p##.avx512 +++# define SECTION(p) p##.evex512 ++ # define MEMMOVE_SYMBOL(p,s) p##_avx512_##s ++ ++ # include "memmove-vec-unaligned-erms.S" ++diff --git a/sysdeps/x86_64/multiarch/memmove-evex-unaligned-erms.S b/sysdeps/x86_64/multiarch/memmove-evex-unaligned-erms.S ++new file mode 100644 ++index 0000000000..b879007e89 ++--- /dev/null +++++ b/sysdeps/x86_64/multiarch/memmove-evex-unaligned-erms.S ++@@ -0,0 +1,26 @@ +++#if IS_IN (libc) +++# define VEC_SIZE 32 +++# define XMM0 xmm16 +++# define XMM1 xmm17 +++# define YMM0 ymm16 +++# define YMM1 ymm17 +++# define VEC0 ymm16 +++# define VEC1 ymm17 +++# define VEC2 ymm18 +++# define VEC3 ymm19 +++# define VEC4 ymm20 +++# define VEC5 ymm21 +++# define VEC6 ymm22 +++# define VEC7 ymm23 +++# define VEC8 ymm24 +++# define VEC(i) VEC##i +++# define VMOVNT vmovntdq +++# define VMOVU vmovdqu64 +++# define VMOVA vmovdqa64 +++# define VZEROUPPER +++ +++# define SECTION(p) p##.evex +++# define MEMMOVE_SYMBOL(p,s) p##_evex_##s +++ +++# include "memmove-vec-unaligned-erms.S" +++#endif ++diff --git a/sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S b/sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S ++index c763b7d871..d13d23d6ce 100644 ++--- a/sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S +++++ b/sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S ++@@ -48,6 +48,14 @@ ++ # define MEMMOVE_CHK_SYMBOL(p,s) MEMMOVE_SYMBOL(p, s) ++ #endif ++ +++#ifndef XMM0 +++# define XMM0 xmm0 +++#endif +++ +++#ifndef YMM0 +++# define YMM0 ymm0 +++#endif +++ ++ #ifndef VZEROUPPER ++ # if VEC_SIZE > 16 ++ # define VZEROUPPER vzeroupper ++@@ -67,6 +75,13 @@ ++ # define REP_MOVSB_THRESHOLD (2048 * (VEC_SIZE / 16)) ++ #endif ++ +++/* Avoid short distance rep movsb only with non-SSE vector. */ +++#ifndef AVOID_SHORT_DISTANCE_REP_MOVSB +++# define AVOID_SHORT_DISTANCE_REP_MOVSB (VEC_SIZE > 16) +++#else +++# define AVOID_SHORT_DISTANCE_REP_MOVSB 0 +++#endif +++ ++ #ifndef PREFETCH ++ # define PREFETCH(addr) prefetcht0 addr ++ #endif ++@@ -143,11 +158,12 @@ L(last_2x_vec): ++ VMOVU -VEC_SIZE(%rsi,%rdx), %VEC(1) ++ VMOVU %VEC(0), (%rdi) ++ VMOVU %VEC(1), -VEC_SIZE(%rdi,%rdx) ++- VZEROUPPER ++ #if !defined USE_MULTIARCH || !IS_IN (libc) ++ L(nop): ++-#endif ++ ret +++#else +++ VZEROUPPER_RETURN +++#endif ++ #if defined USE_MULTIARCH && IS_IN (libc) ++ END (MEMMOVE_SYMBOL (__memmove, unaligned)) ++ ++@@ -240,11 +256,14 @@ L(last_2x_vec): ++ VMOVU %VEC(0), (%rdi) ++ VMOVU %VEC(1), -VEC_SIZE(%rdi,%rdx) ++ L(return): ++- VZEROUPPER +++#if VEC_SIZE > 16 +++ ZERO_UPPER_VEC_REGISTERS_RETURN +++#else ++ ret +++#endif ++ ++ L(movsb): ++- cmpq __x86_shared_non_temporal_threshold(%rip), %rdx +++ cmp __x86_shared_non_temporal_threshold(%rip), %RDX_LP ++ jae L(more_8x_vec) ++ cmpq %rsi, %rdi ++ jb 1f ++@@ -257,7 +276,21 @@ L(movsb): ++ # error Unsupported REP_MOVSB_THRESHOLD and VEC_SIZE! ++ # endif ++ jb L(more_8x_vec_backward) +++# if AVOID_SHORT_DISTANCE_REP_MOVSB +++ movq %rdi, %rcx +++ subq %rsi, %rcx +++ jmp 2f +++# endif ++ 1: +++# if AVOID_SHORT_DISTANCE_REP_MOVSB +++ movq %rsi, %rcx +++ subq %rdi, %rcx +++2: +++/* Avoid "rep movsb" if RCX, the distance between source and destination, +++ is N*4GB + [1..63] with N >= 0. */ +++ cmpl $63, %ecx +++ jbe L(more_2x_vec) /* Avoid "rep movsb" if ECX <= 63. */ +++# endif ++ mov %RDX_LP, %RCX_LP ++ rep movsb ++ L(nop): ++@@ -291,21 +324,20 @@ L(less_vec): ++ #if VEC_SIZE > 32 ++ L(between_32_63): ++ /* From 32 to 63. No branch when size == 32. */ ++- vmovdqu (%rsi), %ymm0 ++- vmovdqu -32(%rsi,%rdx), %ymm1 ++- vmovdqu %ymm0, (%rdi) ++- vmovdqu %ymm1, -32(%rdi,%rdx) ++- VZEROUPPER ++- ret +++ VMOVU (%rsi), %YMM0 +++ VMOVU -32(%rsi,%rdx), %YMM1 +++ VMOVU %YMM0, (%rdi) +++ VMOVU %YMM1, -32(%rdi,%rdx) +++ VZEROUPPER_RETURN ++ #endif ++ #if VEC_SIZE > 16 ++ /* From 16 to 31. No branch when size == 16. */ ++ L(between_16_31): ++- vmovdqu (%rsi), %xmm0 ++- vmovdqu -16(%rsi,%rdx), %xmm1 ++- vmovdqu %xmm0, (%rdi) ++- vmovdqu %xmm1, -16(%rdi,%rdx) ++- ret +++ VMOVU (%rsi), %XMM0 +++ VMOVU -16(%rsi,%rdx), %XMM1 +++ VMOVU %XMM0, (%rdi) +++ VMOVU %XMM1, -16(%rdi,%rdx) +++ VZEROUPPER_RETURN ++ #endif ++ L(between_8_15): ++ /* From 8 to 15. No branch when size == 8. */ ++@@ -358,8 +390,7 @@ L(more_2x_vec): ++ VMOVU %VEC(5), -(VEC_SIZE * 2)(%rdi,%rdx) ++ VMOVU %VEC(6), -(VEC_SIZE * 3)(%rdi,%rdx) ++ VMOVU %VEC(7), -(VEC_SIZE * 4)(%rdi,%rdx) ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ L(last_4x_vec): ++ /* Copy from 2 * VEC to 4 * VEC. */ ++ VMOVU (%rsi), %VEC(0) ++@@ -370,8 +401,7 @@ L(last_4x_vec): ++ VMOVU %VEC(1), VEC_SIZE(%rdi) ++ VMOVU %VEC(2), -VEC_SIZE(%rdi,%rdx) ++ VMOVU %VEC(3), -(VEC_SIZE * 2)(%rdi,%rdx) ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ ++ L(more_8x_vec): ++ cmpq %rsi, %rdi ++@@ -402,7 +432,7 @@ L(more_8x_vec): ++ addq %r8, %rdx ++ #if (defined USE_MULTIARCH || VEC_SIZE == 16) && IS_IN (libc) ++ /* Check non-temporal store threshold. */ ++- cmpq __x86_shared_non_temporal_threshold(%rip), %rdx +++ cmp __x86_shared_non_temporal_threshold(%rip), %RDX_LP ++ ja L(large_forward) ++ #endif ++ L(loop_4x_vec_forward): ++@@ -427,8 +457,7 @@ L(loop_4x_vec_forward): ++ VMOVU %VEC(8), -(VEC_SIZE * 3)(%rcx) ++ /* Store the first VEC. */ ++ VMOVU %VEC(4), (%r11) ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ ++ L(more_8x_vec_backward): ++ /* Load the first 4 * VEC and last VEC to support overlapping ++@@ -454,7 +483,7 @@ L(more_8x_vec_backward): ++ subq %r8, %rdx ++ #if (defined USE_MULTIARCH || VEC_SIZE == 16) && IS_IN (libc) ++ /* Check non-temporal store threshold. */ ++- cmpq __x86_shared_non_temporal_threshold(%rip), %rdx +++ cmp __x86_shared_non_temporal_threshold(%rip), %RDX_LP ++ ja L(large_backward) ++ #endif ++ L(loop_4x_vec_backward): ++@@ -479,8 +508,7 @@ L(loop_4x_vec_backward): ++ VMOVU %VEC(7), (VEC_SIZE * 3)(%rdi) ++ /* Store the last VEC. */ ++ VMOVU %VEC(8), (%r11) ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ ++ #if (defined USE_MULTIARCH || VEC_SIZE == 16) && IS_IN (libc) ++ L(large_forward): ++@@ -515,8 +543,7 @@ L(loop_large_forward): ++ VMOVU %VEC(8), -(VEC_SIZE * 3)(%rcx) ++ /* Store the first VEC. */ ++ VMOVU %VEC(4), (%r11) ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ ++ L(large_backward): ++ /* Don't use non-temporal store if there is overlap between ++@@ -550,8 +577,7 @@ L(loop_large_backward): ++ VMOVU %VEC(7), (VEC_SIZE * 3)(%rdi) ++ /* Store the last VEC. */ ++ VMOVU %VEC(8), (%r11) ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ #endif ++ END (MEMMOVE_SYMBOL (__memmove, unaligned_erms)) ++ ++diff --git a/sysdeps/x86_64/multiarch/memrchr-avx2-rtm.S b/sysdeps/x86_64/multiarch/memrchr-avx2-rtm.S ++new file mode 100644 ++index 0000000000..cea2d2a72d ++--- /dev/null +++++ b/sysdeps/x86_64/multiarch/memrchr-avx2-rtm.S ++@@ -0,0 +1,12 @@ +++#ifndef MEMRCHR +++# define MEMRCHR __memrchr_avx2_rtm +++#endif +++ +++#define ZERO_UPPER_VEC_REGISTERS_RETURN \ +++ ZERO_UPPER_VEC_REGISTERS_RETURN_XTEST +++ +++#define VZEROUPPER_RETURN jmp L(return_vzeroupper) +++ +++#define SECTION(p) p##.avx.rtm +++ +++#include "memrchr-avx2.S" ++diff --git a/sysdeps/x86_64/multiarch/memrchr-avx2.S b/sysdeps/x86_64/multiarch/memrchr-avx2.S ++index f5437b54de..c8d54c08d6 100644 ++--- a/sysdeps/x86_64/multiarch/memrchr-avx2.S +++++ b/sysdeps/x86_64/multiarch/memrchr-avx2.S ++@@ -20,14 +20,22 @@ ++ ++ # include ++ +++# ifndef MEMRCHR +++# define MEMRCHR __memrchr_avx2 +++# endif +++ ++ # ifndef VZEROUPPER ++ # define VZEROUPPER vzeroupper ++ # endif ++ +++# ifndef SECTION +++# define SECTION(p) p##.avx +++# endif +++ ++ # define VEC_SIZE 32 ++ ++- .section .text.avx,"ax",@progbits ++-ENTRY (__memrchr_avx2) +++ .section SECTION(.text),"ax",@progbits +++ENTRY (MEMRCHR) ++ /* Broadcast CHAR to YMM0. */ ++ vmovd %esi, %xmm0 ++ vpbroadcastb %xmm0, %ymm0 ++@@ -134,8 +142,8 @@ L(loop_4x_vec): ++ vpmovmskb %ymm1, %eax ++ bsrl %eax, %eax ++ addq %rdi, %rax ++- VZEROUPPER ++- ret +++L(return_vzeroupper): +++ ZERO_UPPER_VEC_REGISTERS_RETURN ++ ++ .p2align 4 ++ L(last_4x_vec_or_less): ++@@ -169,8 +177,7 @@ L(last_4x_vec_or_less): ++ addq %rax, %rdx ++ jl L(zero) ++ addq %rdi, %rax ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ ++ .p2align 4 ++ L(last_2x_vec): ++@@ -191,31 +198,27 @@ L(last_2x_vec): ++ jl L(zero) ++ addl $(VEC_SIZE * 2), %eax ++ addq %rdi, %rax ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ ++ .p2align 4 ++ L(last_vec_x0): ++ bsrl %eax, %eax ++ addq %rdi, %rax ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ ++ .p2align 4 ++ L(last_vec_x1): ++ bsrl %eax, %eax ++ addl $VEC_SIZE, %eax ++ addq %rdi, %rax ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ ++ .p2align 4 ++ L(last_vec_x2): ++ bsrl %eax, %eax ++ addl $(VEC_SIZE * 2), %eax ++ addq %rdi, %rax ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ ++ .p2align 4 ++ L(last_vec_x3): ++@@ -232,8 +235,7 @@ L(last_vec_x1_check): ++ jl L(zero) ++ addl $VEC_SIZE, %eax ++ addq %rdi, %rax ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ ++ .p2align 4 ++ L(last_vec_x3_check): ++@@ -243,12 +245,14 @@ L(last_vec_x3_check): ++ jl L(zero) ++ addl $(VEC_SIZE * 3), %eax ++ addq %rdi, %rax ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ ++ .p2align 4 ++ L(zero): ++- VZEROUPPER +++ xorl %eax, %eax +++ VZEROUPPER_RETURN +++ +++ .p2align 4 ++ L(null): ++ xorl %eax, %eax ++ ret ++@@ -273,8 +277,7 @@ L(last_vec_or_less_aligned): ++ ++ bsrl %eax, %eax ++ addq %rdi, %rax ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ ++ .p2align 4 ++ L(last_vec_or_less): ++@@ -315,8 +318,7 @@ L(last_vec_or_less): ++ bsrl %eax, %eax ++ addq %rdi, %rax ++ addq %r8, %rax ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ ++ .p2align 4 ++ L(last_vec_2x_aligned): ++@@ -353,7 +355,6 @@ L(last_vec_2x_aligned): ++ bsrl %eax, %eax ++ addq %rdi, %rax ++ addq %r8, %rax ++- VZEROUPPER ++- ret ++-END (__memrchr_avx2) +++ VZEROUPPER_RETURN +++END (MEMRCHR) ++ #endif ++diff --git a/sysdeps/x86_64/multiarch/memrchr-evex.S b/sysdeps/x86_64/multiarch/memrchr-evex.S ++new file mode 100644 ++index 0000000000..16bf8e02b1 ++--- /dev/null +++++ b/sysdeps/x86_64/multiarch/memrchr-evex.S ++@@ -0,0 +1,337 @@ +++/* memrchr optimized with 256-bit EVEX instructions. +++ Copyright (C) 2021 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 +++ . */ +++ +++#if IS_IN (libc) +++ +++# include +++ +++# define VMOVA vmovdqa64 +++ +++# define YMMMATCH ymm16 +++ +++# define VEC_SIZE 32 +++ +++ .section .text.evex,"ax",@progbits +++ENTRY (__memrchr_evex) +++ /* Broadcast CHAR to YMMMATCH. */ +++ vpbroadcastb %esi, %YMMMATCH +++ +++ sub $VEC_SIZE, %RDX_LP +++ jbe L(last_vec_or_less) +++ +++ add %RDX_LP, %RDI_LP +++ +++ /* Check the last VEC_SIZE bytes. */ +++ vpcmpb $0, (%rdi), %YMMMATCH, %k1 +++ kmovd %k1, %eax +++ testl %eax, %eax +++ jnz L(last_vec_x0) +++ +++ subq $(VEC_SIZE * 4), %rdi +++ movl %edi, %ecx +++ andl $(VEC_SIZE - 1), %ecx +++ jz L(aligned_more) +++ +++ /* Align data for aligned loads in the loop. */ +++ addq $VEC_SIZE, %rdi +++ addq $VEC_SIZE, %rdx +++ andq $-VEC_SIZE, %rdi +++ subq %rcx, %rdx +++ +++ .p2align 4 +++L(aligned_more): +++ subq $(VEC_SIZE * 4), %rdx +++ jbe L(last_4x_vec_or_less) +++ +++ /* Check the last 4 * VEC_SIZE. Only one VEC_SIZE at a time +++ since data is only aligned to VEC_SIZE. */ +++ vpcmpb $0, (VEC_SIZE * 3)(%rdi), %YMMMATCH, %k1 +++ kmovd %k1, %eax +++ testl %eax, %eax +++ jnz L(last_vec_x3) +++ +++ vpcmpb $0, (VEC_SIZE * 2)(%rdi), %YMMMATCH, %k2 +++ kmovd %k2, %eax +++ testl %eax, %eax +++ jnz L(last_vec_x2) +++ +++ vpcmpb $0, VEC_SIZE(%rdi), %YMMMATCH, %k3 +++ kmovd %k3, %eax +++ testl %eax, %eax +++ jnz L(last_vec_x1) +++ +++ vpcmpb $0, (%rdi), %YMMMATCH, %k4 +++ kmovd %k4, %eax +++ testl %eax, %eax +++ jnz L(last_vec_x0) +++ +++ /* Align data to 4 * VEC_SIZE for loop with fewer branches. +++ There are some overlaps with above if data isn't aligned +++ to 4 * VEC_SIZE. */ +++ movl %edi, %ecx +++ andl $(VEC_SIZE * 4 - 1), %ecx +++ jz L(loop_4x_vec) +++ +++ addq $(VEC_SIZE * 4), %rdi +++ addq $(VEC_SIZE * 4), %rdx +++ andq $-(VEC_SIZE * 4), %rdi +++ subq %rcx, %rdx +++ +++ .p2align 4 +++L(loop_4x_vec): +++ /* Compare 4 * VEC at a time forward. */ +++ subq $(VEC_SIZE * 4), %rdi +++ subq $(VEC_SIZE * 4), %rdx +++ jbe L(last_4x_vec_or_less) +++ +++ vpcmpb $0, (%rdi), %YMMMATCH, %k1 +++ vpcmpb $0, VEC_SIZE(%rdi), %YMMMATCH, %k2 +++ kord %k1, %k2, %k5 +++ vpcmpb $0, (VEC_SIZE * 2)(%rdi), %YMMMATCH, %k3 +++ vpcmpb $0, (VEC_SIZE * 3)(%rdi), %YMMMATCH, %k4 +++ +++ kord %k3, %k4, %k6 +++ kortestd %k5, %k6 +++ jz L(loop_4x_vec) +++ +++ /* There is a match. */ +++ kmovd %k4, %eax +++ testl %eax, %eax +++ jnz L(last_vec_x3) +++ +++ kmovd %k3, %eax +++ testl %eax, %eax +++ jnz L(last_vec_x2) +++ +++ kmovd %k2, %eax +++ testl %eax, %eax +++ jnz L(last_vec_x1) +++ +++ kmovd %k1, %eax +++ bsrl %eax, %eax +++ addq %rdi, %rax +++ ret +++ +++ .p2align 4 +++L(last_4x_vec_or_less): +++ addl $(VEC_SIZE * 4), %edx +++ cmpl $(VEC_SIZE * 2), %edx +++ jbe L(last_2x_vec) +++ +++ vpcmpb $0, (VEC_SIZE * 3)(%rdi), %YMMMATCH, %k1 +++ kmovd %k1, %eax +++ testl %eax, %eax +++ jnz L(last_vec_x3) +++ +++ vpcmpb $0, (VEC_SIZE * 2)(%rdi), %YMMMATCH, %k2 +++ kmovd %k2, %eax +++ testl %eax, %eax +++ jnz L(last_vec_x2) +++ +++ vpcmpb $0, VEC_SIZE(%rdi), %YMMMATCH, %k3 +++ kmovd %k3, %eax +++ testl %eax, %eax +++ jnz L(last_vec_x1_check) +++ cmpl $(VEC_SIZE * 3), %edx +++ jbe L(zero) +++ +++ vpcmpb $0, (%rdi), %YMMMATCH, %k4 +++ kmovd %k4, %eax +++ testl %eax, %eax +++ jz L(zero) +++ bsrl %eax, %eax +++ subq $(VEC_SIZE * 4), %rdx +++ addq %rax, %rdx +++ jl L(zero) +++ addq %rdi, %rax +++ ret +++ +++ .p2align 4 +++L(last_2x_vec): +++ vpcmpb $0, (VEC_SIZE * 3)(%rdi), %YMMMATCH, %k1 +++ kmovd %k1, %eax +++ testl %eax, %eax +++ jnz L(last_vec_x3_check) +++ cmpl $VEC_SIZE, %edx +++ jbe L(zero) +++ +++ vpcmpb $0, (VEC_SIZE * 2)(%rdi), %YMMMATCH, %k1 +++ kmovd %k1, %eax +++ testl %eax, %eax +++ jz L(zero) +++ bsrl %eax, %eax +++ subq $(VEC_SIZE * 2), %rdx +++ addq %rax, %rdx +++ jl L(zero) +++ addl $(VEC_SIZE * 2), %eax +++ addq %rdi, %rax +++ ret +++ +++ .p2align 4 +++L(last_vec_x0): +++ bsrl %eax, %eax +++ addq %rdi, %rax +++ ret +++ +++ .p2align 4 +++L(last_vec_x1): +++ bsrl %eax, %eax +++ addl $VEC_SIZE, %eax +++ addq %rdi, %rax +++ ret +++ +++ .p2align 4 +++L(last_vec_x2): +++ bsrl %eax, %eax +++ addl $(VEC_SIZE * 2), %eax +++ addq %rdi, %rax +++ ret +++ +++ .p2align 4 +++L(last_vec_x3): +++ bsrl %eax, %eax +++ addl $(VEC_SIZE * 3), %eax +++ addq %rdi, %rax +++ ret +++ +++ .p2align 4 +++L(last_vec_x1_check): +++ bsrl %eax, %eax +++ subq $(VEC_SIZE * 3), %rdx +++ addq %rax, %rdx +++ jl L(zero) +++ addl $VEC_SIZE, %eax +++ addq %rdi, %rax +++ ret +++ +++ .p2align 4 +++L(last_vec_x3_check): +++ bsrl %eax, %eax +++ subq $VEC_SIZE, %rdx +++ addq %rax, %rdx +++ jl L(zero) +++ addl $(VEC_SIZE * 3), %eax +++ addq %rdi, %rax +++ ret +++ +++ .p2align 4 +++L(zero): +++ xorl %eax, %eax +++ ret +++ +++ .p2align 4 +++L(last_vec_or_less_aligned): +++ movl %edx, %ecx +++ +++ vpcmpb $0, (%rdi), %YMMMATCH, %k1 +++ +++ movl $1, %edx +++ /* Support rdx << 32. */ +++ salq %cl, %rdx +++ subq $1, %rdx +++ +++ kmovd %k1, %eax +++ +++ /* Remove the trailing bytes. */ +++ andl %edx, %eax +++ testl %eax, %eax +++ jz L(zero) +++ +++ bsrl %eax, %eax +++ addq %rdi, %rax +++ ret +++ +++ .p2align 4 +++L(last_vec_or_less): +++ addl $VEC_SIZE, %edx +++ +++ /* Check for zero length. */ +++ testl %edx, %edx +++ jz L(zero) +++ +++ movl %edi, %ecx +++ andl $(VEC_SIZE - 1), %ecx +++ jz L(last_vec_or_less_aligned) +++ +++ movl %ecx, %esi +++ movl %ecx, %r8d +++ addl %edx, %esi +++ andq $-VEC_SIZE, %rdi +++ +++ subl $VEC_SIZE, %esi +++ ja L(last_vec_2x_aligned) +++ +++ /* Check the last VEC. */ +++ vpcmpb $0, (%rdi), %YMMMATCH, %k1 +++ kmovd %k1, %eax +++ +++ /* Remove the leading and trailing bytes. */ +++ sarl %cl, %eax +++ movl %edx, %ecx +++ +++ movl $1, %edx +++ sall %cl, %edx +++ subl $1, %edx +++ +++ andl %edx, %eax +++ testl %eax, %eax +++ jz L(zero) +++ +++ bsrl %eax, %eax +++ addq %rdi, %rax +++ addq %r8, %rax +++ ret +++ +++ .p2align 4 +++L(last_vec_2x_aligned): +++ movl %esi, %ecx +++ +++ /* Check the last VEC. */ +++ vpcmpb $0, VEC_SIZE(%rdi), %YMMMATCH, %k1 +++ +++ movl $1, %edx +++ sall %cl, %edx +++ subl $1, %edx +++ +++ kmovd %k1, %eax +++ +++ /* Remove the trailing bytes. */ +++ andl %edx, %eax +++ +++ testl %eax, %eax +++ jnz L(last_vec_x1) +++ +++ /* Check the second last VEC. */ +++ vpcmpb $0, (%rdi), %YMMMATCH, %k1 +++ +++ movl %r8d, %ecx +++ +++ kmovd %k1, %eax +++ +++ /* Remove the leading bytes. Must use unsigned right shift for +++ bsrl below. */ +++ shrl %cl, %eax +++ testl %eax, %eax +++ jz L(zero) +++ +++ bsrl %eax, %eax +++ addq %rdi, %rax +++ addq %r8, %rax +++ ret +++END (__memrchr_evex) +++#endif ++diff --git a/sysdeps/x86_64/multiarch/memset-avx2-unaligned-erms-rtm.S b/sysdeps/x86_64/multiarch/memset-avx2-unaligned-erms-rtm.S ++new file mode 100644 ++index 0000000000..8ac3e479bb ++--- /dev/null +++++ b/sysdeps/x86_64/multiarch/memset-avx2-unaligned-erms-rtm.S ++@@ -0,0 +1,10 @@ +++#define ZERO_UPPER_VEC_REGISTERS_RETURN \ +++ ZERO_UPPER_VEC_REGISTERS_RETURN_XTEST +++ +++#define VZEROUPPER_RETURN jmp L(return) +++ +++#define SECTION(p) p##.avx.rtm +++#define MEMSET_SYMBOL(p,s) p##_avx2_##s##_rtm +++#define WMEMSET_SYMBOL(p,s) p##_avx2_##s##_rtm +++ +++#include "memset-avx2-unaligned-erms.S" ++diff --git a/sysdeps/x86_64/multiarch/memset-avx2-unaligned-erms.S b/sysdeps/x86_64/multiarch/memset-avx2-unaligned-erms.S ++index 7ab3d89849..ae0860f36a 100644 ++--- a/sysdeps/x86_64/multiarch/memset-avx2-unaligned-erms.S +++++ b/sysdeps/x86_64/multiarch/memset-avx2-unaligned-erms.S ++@@ -14,9 +14,15 @@ ++ movq r, %rax; \ ++ vpbroadcastd %xmm0, %ymm0 ++ ++-# define SECTION(p) p##.avx ++-# define MEMSET_SYMBOL(p,s) p##_avx2_##s ++-# define WMEMSET_SYMBOL(p,s) p##_avx2_##s +++# ifndef SECTION +++# define SECTION(p) p##.avx +++# endif +++# ifndef MEMSET_SYMBOL +++# define MEMSET_SYMBOL(p,s) p##_avx2_##s +++# endif +++# ifndef WMEMSET_SYMBOL +++# define WMEMSET_SYMBOL(p,s) p##_avx2_##s +++# endif ++ ++ # include "memset-vec-unaligned-erms.S" ++ #endif ++diff --git a/sysdeps/x86_64/multiarch/memset-avx512-unaligned-erms.S b/sysdeps/x86_64/multiarch/memset-avx512-unaligned-erms.S ++index 0783979ca5..22e7b187c8 100644 ++--- a/sysdeps/x86_64/multiarch/memset-avx512-unaligned-erms.S +++++ b/sysdeps/x86_64/multiarch/memset-avx512-unaligned-erms.S ++@@ -1,22 +1,22 @@ ++ #if IS_IN (libc) ++ # define VEC_SIZE 64 ++-# define VEC(i) zmm##i +++# define XMM0 xmm16 +++# define YMM0 ymm16 +++# define VEC0 zmm16 +++# define VEC(i) VEC##i ++ # define VMOVU vmovdqu64 ++ # define VMOVA vmovdqa64 +++# define VZEROUPPER ++ ++ # define MEMSET_VDUP_TO_VEC0_AND_SET_RETURN(d, r) \ ++- vmovd d, %xmm0; \ ++ movq r, %rax; \ ++- vpbroadcastb %xmm0, %xmm0; \ ++- vpbroadcastq %xmm0, %zmm0 +++ vpbroadcastb d, %VEC0 ++ ++ # define WMEMSET_VDUP_TO_VEC0_AND_SET_RETURN(d, r) \ ++- vmovd d, %xmm0; \ ++ movq r, %rax; \ ++- vpbroadcastd %xmm0, %xmm0; \ ++- vpbroadcastq %xmm0, %zmm0 +++ vpbroadcastd d, %VEC0 ++ ++-# define SECTION(p) p##.avx512 +++# define SECTION(p) p##.evex512 ++ # define MEMSET_SYMBOL(p,s) p##_avx512_##s ++ # define WMEMSET_SYMBOL(p,s) p##_avx512_##s ++ ++diff --git a/sysdeps/x86_64/multiarch/memset-evex-unaligned-erms.S b/sysdeps/x86_64/multiarch/memset-evex-unaligned-erms.S ++new file mode 100644 ++index 0000000000..ae0a4d6e46 ++--- /dev/null +++++ b/sysdeps/x86_64/multiarch/memset-evex-unaligned-erms.S ++@@ -0,0 +1,24 @@ +++#if IS_IN (libc) +++# define VEC_SIZE 32 +++# define XMM0 xmm16 +++# define YMM0 ymm16 +++# define VEC0 ymm16 +++# define VEC(i) VEC##i +++# define VMOVU vmovdqu64 +++# define VMOVA vmovdqa64 +++# define VZEROUPPER +++ +++# define MEMSET_VDUP_TO_VEC0_AND_SET_RETURN(d, r) \ +++ movq r, %rax; \ +++ vpbroadcastb d, %VEC0 +++ +++# define WMEMSET_VDUP_TO_VEC0_AND_SET_RETURN(d, r) \ +++ movq r, %rax; \ +++ vpbroadcastd d, %VEC0 +++ +++# define SECTION(p) p##.evex +++# define MEMSET_SYMBOL(p,s) p##_evex_##s +++# define WMEMSET_SYMBOL(p,s) p##_evex_##s +++ +++# include "memset-vec-unaligned-erms.S" +++#endif ++diff --git a/sysdeps/x86_64/multiarch/memset-vec-unaligned-erms.S b/sysdeps/x86_64/multiarch/memset-vec-unaligned-erms.S ++index af2299709c..16bed6ec11 100644 ++--- a/sysdeps/x86_64/multiarch/memset-vec-unaligned-erms.S +++++ b/sysdeps/x86_64/multiarch/memset-vec-unaligned-erms.S ++@@ -34,20 +34,25 @@ ++ # define WMEMSET_CHK_SYMBOL(p,s) WMEMSET_SYMBOL(p, s) ++ #endif ++ +++#ifndef XMM0 +++# define XMM0 xmm0 +++#endif +++ +++#ifndef YMM0 +++# define YMM0 ymm0 +++#endif +++ ++ #ifndef VZEROUPPER ++ # if VEC_SIZE > 16 ++ # define VZEROUPPER vzeroupper +++# define VZEROUPPER_SHORT_RETURN vzeroupper; ret ++ # else ++ # define VZEROUPPER ++ # endif ++ #endif ++ ++ #ifndef VZEROUPPER_SHORT_RETURN ++-# if VEC_SIZE > 16 ++-# define VZEROUPPER_SHORT_RETURN vzeroupper ++-# else ++-# define VZEROUPPER_SHORT_RETURN rep ++-# endif +++# define VZEROUPPER_SHORT_RETURN rep; ret ++ #endif ++ ++ #ifndef MOVQ ++@@ -77,7 +82,7 @@ ++ ENTRY (__bzero) ++ mov %RDI_LP, %RAX_LP /* Set return value. */ ++ mov %RSI_LP, %RDX_LP /* Set n. */ ++- pxor %xmm0, %xmm0 +++ pxor %XMM0, %XMM0 ++ jmp L(entry_from_bzero) ++ END (__bzero) ++ weak_alias (__bzero, bzero) ++@@ -119,8 +124,7 @@ L(entry_from_bzero): ++ /* From VEC and to 2 * VEC. No branch when size == VEC_SIZE. */ ++ VMOVU %VEC(0), -VEC_SIZE(%rdi,%rdx) ++ VMOVU %VEC(0), (%rdi) ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ #if defined USE_MULTIARCH && IS_IN (libc) ++ END (MEMSET_SYMBOL (__memset, unaligned)) ++ ++@@ -143,14 +147,12 @@ ENTRY (__memset_erms) ++ ENTRY (MEMSET_SYMBOL (__memset, erms)) ++ # endif ++ L(stosb): ++- /* Issue vzeroupper before rep stosb. */ ++- VZEROUPPER ++ mov %RDX_LP, %RCX_LP ++ movzbl %sil, %eax ++ mov %RDI_LP, %RDX_LP ++ rep stosb ++ mov %RDX_LP, %RAX_LP ++- ret +++ VZEROUPPER_RETURN ++ # if VEC_SIZE == 16 ++ END (__memset_erms) ++ # else ++@@ -177,8 +179,7 @@ ENTRY (MEMSET_SYMBOL (__memset, unaligned_erms)) ++ /* From VEC and to 2 * VEC. No branch when size == VEC_SIZE. */ ++ VMOVU %VEC(0), -VEC_SIZE(%rdi,%rdx) ++ VMOVU %VEC(0), (%rdi) ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ ++ L(stosb_more_2x_vec): ++ cmpq $REP_STOSB_THRESHOLD, %rdx ++@@ -192,8 +193,11 @@ L(more_2x_vec): ++ VMOVU %VEC(0), -VEC_SIZE(%rdi,%rdx) ++ VMOVU %VEC(0), -(VEC_SIZE * 2)(%rdi,%rdx) ++ L(return): ++- VZEROUPPER +++#if VEC_SIZE > 16 +++ ZERO_UPPER_VEC_REGISTERS_RETURN +++#else ++ ret +++#endif ++ ++ L(loop_start): ++ leaq (VEC_SIZE * 4)(%rdi), %rcx ++@@ -219,7 +223,6 @@ L(loop): ++ cmpq %rcx, %rdx ++ jne L(loop) ++ VZEROUPPER_SHORT_RETURN ++- ret ++ L(less_vec): ++ /* Less than 1 VEC. */ ++ # if VEC_SIZE != 16 && VEC_SIZE != 32 && VEC_SIZE != 64 ++@@ -233,7 +236,7 @@ L(less_vec): ++ cmpb $16, %dl ++ jae L(between_16_31) ++ # endif ++- MOVQ %xmm0, %rcx +++ MOVQ %XMM0, %rcx ++ cmpb $8, %dl ++ jae L(between_8_15) ++ cmpb $4, %dl ++@@ -243,40 +246,34 @@ L(less_vec): ++ jb 1f ++ movb %cl, (%rdi) ++ 1: ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ # if VEC_SIZE > 32 ++ /* From 32 to 63. No branch when size == 32. */ ++ L(between_32_63): ++- vmovdqu %ymm0, -32(%rdi,%rdx) ++- vmovdqu %ymm0, (%rdi) ++- VZEROUPPER ++- ret +++ VMOVU %YMM0, -32(%rdi,%rdx) +++ VMOVU %YMM0, (%rdi) +++ VZEROUPPER_RETURN ++ # endif ++ # if VEC_SIZE > 16 ++ /* From 16 to 31. No branch when size == 16. */ ++ L(between_16_31): ++- vmovdqu %xmm0, -16(%rdi,%rdx) ++- vmovdqu %xmm0, (%rdi) ++- VZEROUPPER ++- ret +++ VMOVU %XMM0, -16(%rdi,%rdx) +++ VMOVU %XMM0, (%rdi) +++ VZEROUPPER_RETURN ++ # endif ++ /* From 8 to 15. No branch when size == 8. */ ++ L(between_8_15): ++ movq %rcx, -8(%rdi,%rdx) ++ movq %rcx, (%rdi) ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ L(between_4_7): ++ /* From 4 to 7. No branch when size == 4. */ ++ movl %ecx, -4(%rdi,%rdx) ++ movl %ecx, (%rdi) ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ L(between_2_3): ++ /* From 2 to 3. No branch when size == 2. */ ++ movw %cx, -2(%rdi,%rdx) ++ movw %cx, (%rdi) ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ END (MEMSET_SYMBOL (__memset, unaligned_erms)) ++diff --git a/sysdeps/x86_64/multiarch/rawmemchr-avx2-rtm.S b/sysdeps/x86_64/multiarch/rawmemchr-avx2-rtm.S ++new file mode 100644 ++index 0000000000..acc5f6e2fb ++--- /dev/null +++++ b/sysdeps/x86_64/multiarch/rawmemchr-avx2-rtm.S ++@@ -0,0 +1,4 @@ +++#define MEMCHR __rawmemchr_avx2_rtm +++#define USE_AS_RAWMEMCHR 1 +++ +++#include "memchr-avx2-rtm.S" ++diff --git a/sysdeps/x86_64/multiarch/rawmemchr-evex.S b/sysdeps/x86_64/multiarch/rawmemchr-evex.S ++new file mode 100644 ++index 0000000000..ec942b77ba ++--- /dev/null +++++ b/sysdeps/x86_64/multiarch/rawmemchr-evex.S ++@@ -0,0 +1,4 @@ +++#define MEMCHR __rawmemchr_evex +++#define USE_AS_RAWMEMCHR 1 +++ +++#include "memchr-evex.S" ++diff --git a/sysdeps/x86_64/multiarch/stpcpy-avx2-rtm.S b/sysdeps/x86_64/multiarch/stpcpy-avx2-rtm.S ++new file mode 100644 ++index 0000000000..2b9c07a59f ++--- /dev/null +++++ b/sysdeps/x86_64/multiarch/stpcpy-avx2-rtm.S ++@@ -0,0 +1,3 @@ +++#define USE_AS_STPCPY +++#define STRCPY __stpcpy_avx2_rtm +++#include "strcpy-avx2-rtm.S" ++diff --git a/sysdeps/x86_64/multiarch/stpcpy-evex.S b/sysdeps/x86_64/multiarch/stpcpy-evex.S ++new file mode 100644 ++index 0000000000..7c6f26cd98 ++--- /dev/null +++++ b/sysdeps/x86_64/multiarch/stpcpy-evex.S ++@@ -0,0 +1,3 @@ +++#define USE_AS_STPCPY +++#define STRCPY __stpcpy_evex +++#include "strcpy-evex.S" ++diff --git a/sysdeps/x86_64/multiarch/stpncpy-avx2-rtm.S b/sysdeps/x86_64/multiarch/stpncpy-avx2-rtm.S ++new file mode 100644 ++index 0000000000..60a2ccfe53 ++--- /dev/null +++++ b/sysdeps/x86_64/multiarch/stpncpy-avx2-rtm.S ++@@ -0,0 +1,4 @@ +++#define USE_AS_STPCPY +++#define USE_AS_STRNCPY +++#define STRCPY __stpncpy_avx2_rtm +++#include "strcpy-avx2-rtm.S" ++diff --git a/sysdeps/x86_64/multiarch/stpncpy-evex.S b/sysdeps/x86_64/multiarch/stpncpy-evex.S ++new file mode 100644 ++index 0000000000..1570014d1c ++--- /dev/null +++++ b/sysdeps/x86_64/multiarch/stpncpy-evex.S ++@@ -0,0 +1,4 @@ +++#define USE_AS_STPCPY +++#define USE_AS_STRNCPY +++#define STRCPY __stpncpy_evex +++#include "strcpy-evex.S" ++diff --git a/sysdeps/x86_64/multiarch/strcat-avx2-rtm.S b/sysdeps/x86_64/multiarch/strcat-avx2-rtm.S ++new file mode 100644 ++index 0000000000..637fb557c4 ++--- /dev/null +++++ b/sysdeps/x86_64/multiarch/strcat-avx2-rtm.S ++@@ -0,0 +1,12 @@ +++#ifndef STRCAT +++# define STRCAT __strcat_avx2_rtm +++#endif +++ +++#define ZERO_UPPER_VEC_REGISTERS_RETURN \ +++ ZERO_UPPER_VEC_REGISTERS_RETURN_XTEST +++ +++#define VZEROUPPER_RETURN jmp L(return_vzeroupper) +++ +++#define SECTION(p) p##.avx.rtm +++ +++#include "strcat-avx2.S" ++diff --git a/sysdeps/x86_64/multiarch/strcat-avx2.S b/sysdeps/x86_64/multiarch/strcat-avx2.S ++index a4143bf8f5..1e6d4827ee 100644 ++--- a/sysdeps/x86_64/multiarch/strcat-avx2.S +++++ b/sysdeps/x86_64/multiarch/strcat-avx2.S ++@@ -30,7 +30,11 @@ ++ /* Number of bytes in a vector register */ ++ # define VEC_SIZE 32 ++ ++- .section .text.avx,"ax",@progbits +++# ifndef SECTION +++# define SECTION(p) p##.avx +++# endif +++ +++ .section SECTION(.text),"ax",@progbits ++ ENTRY (STRCAT) ++ mov %rdi, %r9 ++ # ifdef USE_AS_STRNCAT ++diff --git a/sysdeps/x86_64/multiarch/strcat-evex.S b/sysdeps/x86_64/multiarch/strcat-evex.S ++new file mode 100644 ++index 0000000000..97c3d85b6d ++--- /dev/null +++++ b/sysdeps/x86_64/multiarch/strcat-evex.S ++@@ -0,0 +1,283 @@ +++/* strcat with 256-bit EVEX instructions. +++ Copyright (C) 2021 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 +++ . */ +++ +++#if IS_IN (libc) +++ +++# include +++ +++# ifndef STRCAT +++# define STRCAT __strcat_evex +++# endif +++ +++# define VMOVU vmovdqu64 +++# define VMOVA vmovdqa64 +++ +++/* zero register */ +++# define XMMZERO xmm16 +++# define YMMZERO ymm16 +++# define YMM0 ymm17 +++# define YMM1 ymm18 +++ +++# define USE_AS_STRCAT +++ +++/* Number of bytes in a vector register */ +++# define VEC_SIZE 32 +++ +++ .section .text.evex,"ax",@progbits +++ENTRY (STRCAT) +++ mov %rdi, %r9 +++# ifdef USE_AS_STRNCAT +++ mov %rdx, %r8 +++# endif +++ +++ xor %eax, %eax +++ mov %edi, %ecx +++ and $((VEC_SIZE * 4) - 1), %ecx +++ vpxorq %XMMZERO, %XMMZERO, %XMMZERO +++ cmp $(VEC_SIZE * 3), %ecx +++ ja L(fourth_vector_boundary) +++ vpcmpb $0, (%rdi), %YMMZERO, %k0 +++ kmovd %k0, %edx +++ test %edx, %edx +++ jnz L(exit_null_on_first_vector) +++ mov %rdi, %rax +++ and $-VEC_SIZE, %rax +++ jmp L(align_vec_size_start) +++L(fourth_vector_boundary): +++ mov %rdi, %rax +++ and $-VEC_SIZE, %rax +++ vpcmpb $0, (%rax), %YMMZERO, %k0 +++ mov $-1, %r10d +++ sub %rax, %rcx +++ shl %cl, %r10d +++ kmovd %k0, %edx +++ and %r10d, %edx +++ jnz L(exit) +++ +++L(align_vec_size_start): +++ vpcmpb $0, VEC_SIZE(%rax), %YMMZERO, %k0 +++ kmovd %k0, %edx +++ test %edx, %edx +++ jnz L(exit_null_on_second_vector) +++ +++ vpcmpb $0, (VEC_SIZE * 2)(%rax), %YMMZERO, %k1 +++ kmovd %k1, %edx +++ test %edx, %edx +++ jnz L(exit_null_on_third_vector) +++ +++ vpcmpb $0, (VEC_SIZE * 3)(%rax), %YMMZERO, %k2 +++ kmovd %k2, %edx +++ test %edx, %edx +++ jnz L(exit_null_on_fourth_vector) +++ +++ vpcmpb $0, (VEC_SIZE * 4)(%rax), %YMMZERO, %k3 +++ kmovd %k3, %edx +++ test %edx, %edx +++ jnz L(exit_null_on_fifth_vector) +++ +++ vpcmpb $0, (VEC_SIZE * 5)(%rax), %YMMZERO, %k4 +++ add $(VEC_SIZE * 4), %rax +++ kmovd %k4, %edx +++ test %edx, %edx +++ jnz L(exit_null_on_second_vector) +++ +++ vpcmpb $0, (VEC_SIZE * 2)(%rax), %YMMZERO, %k1 +++ kmovd %k1, %edx +++ test %edx, %edx +++ jnz L(exit_null_on_third_vector) +++ +++ vpcmpb $0, (VEC_SIZE * 3)(%rax), %YMMZERO, %k2 +++ kmovd %k2, %edx +++ test %edx, %edx +++ jnz L(exit_null_on_fourth_vector) +++ +++ vpcmpb $0, (VEC_SIZE * 4)(%rax), %YMMZERO, %k3 +++ kmovd %k3, %edx +++ test %edx, %edx +++ jnz L(exit_null_on_fifth_vector) +++ +++ vpcmpb $0, (VEC_SIZE * 5)(%rax), %YMMZERO, %k4 +++ kmovd %k4, %edx +++ add $(VEC_SIZE * 4), %rax +++ test %edx, %edx +++ jnz L(exit_null_on_second_vector) +++ +++ vpcmpb $0, (VEC_SIZE * 2)(%rax), %YMMZERO, %k1 +++ kmovd %k1, %edx +++ test %edx, %edx +++ jnz L(exit_null_on_third_vector) +++ +++ vpcmpb $0, (VEC_SIZE * 3)(%rax), %YMMZERO, %k2 +++ kmovd %k2, %edx +++ test %edx, %edx +++ jnz L(exit_null_on_fourth_vector) +++ +++ vpcmpb $0, (VEC_SIZE * 4)(%rax), %YMMZERO, %k3 +++ kmovd %k3, %edx +++ test %edx, %edx +++ jnz L(exit_null_on_fifth_vector) +++ +++ vpcmpb $0, (VEC_SIZE * 5)(%rax), %YMMZERO, %k4 +++ add $(VEC_SIZE * 4), %rax +++ kmovd %k4, %edx +++ test %edx, %edx +++ jnz L(exit_null_on_second_vector) +++ +++ vpcmpb $0, (VEC_SIZE * 2)(%rax), %YMMZERO, %k1 +++ kmovd %k1, %edx +++ test %edx, %edx +++ jnz L(exit_null_on_third_vector) +++ +++ vpcmpb $0, (VEC_SIZE * 3)(%rax), %YMMZERO, %k2 +++ kmovd %k2, %edx +++ test %edx, %edx +++ jnz L(exit_null_on_fourth_vector) +++ +++ vpcmpb $0, (VEC_SIZE * 4)(%rax), %YMMZERO, %k3 +++ kmovd %k3, %edx +++ test %edx, %edx +++ jnz L(exit_null_on_fifth_vector) +++ +++ test $((VEC_SIZE * 4) - 1), %rax +++ jz L(align_four_vec_loop) +++ +++ vpcmpb $0, (VEC_SIZE * 5)(%rax), %YMMZERO, %k4 +++ add $(VEC_SIZE * 5), %rax +++ kmovd %k4, %edx +++ test %edx, %edx +++ jnz L(exit) +++ +++ test $((VEC_SIZE * 4) - 1), %rax +++ jz L(align_four_vec_loop) +++ +++ vpcmpb $0, VEC_SIZE(%rax), %YMMZERO, %k0 +++ add $VEC_SIZE, %rax +++ kmovd %k0, %edx +++ test %edx, %edx +++ jnz L(exit) +++ +++ test $((VEC_SIZE * 4) - 1), %rax +++ jz L(align_four_vec_loop) +++ +++ vpcmpb $0, VEC_SIZE(%rax), %YMMZERO, %k0 +++ add $VEC_SIZE, %rax +++ kmovd %k0, %edx +++ test %edx, %edx +++ jnz L(exit) +++ +++ test $((VEC_SIZE * 4) - 1), %rax +++ jz L(align_four_vec_loop) +++ +++ vpcmpb $0, VEC_SIZE(%rax), %YMMZERO, %k1 +++ add $VEC_SIZE, %rax +++ kmovd %k1, %edx +++ test %edx, %edx +++ jnz L(exit) +++ +++ add $VEC_SIZE, %rax +++ +++ .p2align 4 +++L(align_four_vec_loop): +++ VMOVA (%rax), %YMM0 +++ VMOVA (VEC_SIZE * 2)(%rax), %YMM1 +++ vpminub VEC_SIZE(%rax), %YMM0, %YMM0 +++ vpminub (VEC_SIZE * 3)(%rax), %YMM1, %YMM1 +++ vpminub %YMM0, %YMM1, %YMM0 +++ /* If K0 != 0, there is a null byte. */ +++ vpcmpb $0, %YMM0, %YMMZERO, %k0 +++ add $(VEC_SIZE * 4), %rax +++ ktestd %k0, %k0 +++ jz L(align_four_vec_loop) +++ +++ vpcmpb $0, -(VEC_SIZE * 4)(%rax), %YMMZERO, %k0 +++ sub $(VEC_SIZE * 5), %rax +++ kmovd %k0, %edx +++ test %edx, %edx +++ jnz L(exit_null_on_second_vector) +++ +++ vpcmpb $0, (VEC_SIZE * 2)(%rax), %YMMZERO, %k1 +++ kmovd %k1, %edx +++ test %edx, %edx +++ jnz L(exit_null_on_third_vector) +++ +++ vpcmpb $0, (VEC_SIZE * 3)(%rax), %YMMZERO, %k2 +++ kmovd %k2, %edx +++ test %edx, %edx +++ jnz L(exit_null_on_fourth_vector) +++ +++ vpcmpb $0, (VEC_SIZE * 4)(%rax), %YMMZERO, %k3 +++ kmovd %k3, %edx +++ sub %rdi, %rax +++ bsf %rdx, %rdx +++ add %rdx, %rax +++ add $(VEC_SIZE * 4), %rax +++ jmp L(StartStrcpyPart) +++ +++ .p2align 4 +++L(exit): +++ sub %rdi, %rax +++L(exit_null_on_first_vector): +++ bsf %rdx, %rdx +++ add %rdx, %rax +++ jmp L(StartStrcpyPart) +++ +++ .p2align 4 +++L(exit_null_on_second_vector): +++ sub %rdi, %rax +++ bsf %rdx, %rdx +++ add %rdx, %rax +++ add $VEC_SIZE, %rax +++ jmp L(StartStrcpyPart) +++ +++ .p2align 4 +++L(exit_null_on_third_vector): +++ sub %rdi, %rax +++ bsf %rdx, %rdx +++ add %rdx, %rax +++ add $(VEC_SIZE * 2), %rax +++ jmp L(StartStrcpyPart) +++ +++ .p2align 4 +++L(exit_null_on_fourth_vector): +++ sub %rdi, %rax +++ bsf %rdx, %rdx +++ add %rdx, %rax +++ add $(VEC_SIZE * 3), %rax +++ jmp L(StartStrcpyPart) +++ +++ .p2align 4 +++L(exit_null_on_fifth_vector): +++ sub %rdi, %rax +++ bsf %rdx, %rdx +++ add %rdx, %rax +++ add $(VEC_SIZE * 4), %rax +++ +++ .p2align 4 +++L(StartStrcpyPart): +++ lea (%r9, %rax), %rdi +++ mov %rsi, %rcx +++ mov %r9, %rax /* save result */ +++ +++# ifdef USE_AS_STRNCAT +++ test %r8, %r8 +++ jz L(ExitZero) +++# define USE_AS_STRNCPY +++# endif +++ +++# include "strcpy-evex.S" +++#endif ++diff --git a/sysdeps/x86_64/multiarch/strchr-avx2-rtm.S b/sysdeps/x86_64/multiarch/strchr-avx2-rtm.S ++new file mode 100644 ++index 0000000000..81f20d1d8e ++--- /dev/null +++++ b/sysdeps/x86_64/multiarch/strchr-avx2-rtm.S ++@@ -0,0 +1,12 @@ +++#ifndef STRCHR +++# define STRCHR __strchr_avx2_rtm +++#endif +++ +++#define ZERO_UPPER_VEC_REGISTERS_RETURN \ +++ ZERO_UPPER_VEC_REGISTERS_RETURN_XTEST +++ +++#define VZEROUPPER_RETURN jmp L(return_vzeroupper) +++ +++#define SECTION(p) p##.avx.rtm +++ +++#include "strchr-avx2.S" ++diff --git a/sysdeps/x86_64/multiarch/strchr-avx2.S b/sysdeps/x86_64/multiarch/strchr-avx2.S ++index 39fc69da7b..0a5217514a 100644 ++--- a/sysdeps/x86_64/multiarch/strchr-avx2.S +++++ b/sysdeps/x86_64/multiarch/strchr-avx2.S ++@@ -38,9 +38,13 @@ ++ # define VZEROUPPER vzeroupper ++ # endif ++ +++# ifndef SECTION +++# define SECTION(p) p##.avx +++# endif +++ ++ # define VEC_SIZE 32 ++ ++- .section .text.avx,"ax",@progbits +++ .section SECTION(.text),"ax",@progbits ++ ENTRY (STRCHR) ++ movl %edi, %ecx ++ /* Broadcast CHAR to YMM0. */ ++@@ -93,8 +97,8 @@ L(cros_page_boundary): ++ cmp (%rax), %CHAR_REG ++ cmovne %rdx, %rax ++ # endif ++- VZEROUPPER ++- ret +++L(return_vzeroupper): +++ ZERO_UPPER_VEC_REGISTERS_RETURN ++ ++ .p2align 4 ++ L(aligned_more): ++@@ -190,8 +194,7 @@ L(first_vec_x0): ++ cmp (%rax), %CHAR_REG ++ cmovne %rdx, %rax ++ # endif ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ ++ .p2align 4 ++ L(first_vec_x1): ++@@ -205,8 +208,7 @@ L(first_vec_x1): ++ cmp (%rax), %CHAR_REG ++ cmovne %rdx, %rax ++ # endif ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ ++ .p2align 4 ++ L(first_vec_x2): ++@@ -220,8 +222,7 @@ L(first_vec_x2): ++ cmp (%rax), %CHAR_REG ++ cmovne %rdx, %rax ++ # endif ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ ++ .p2align 4 ++ L(4x_vec_end): ++@@ -247,8 +248,7 @@ L(first_vec_x3): ++ cmp (%rax), %CHAR_REG ++ cmovne %rdx, %rax ++ # endif ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ ++ END (STRCHR) ++ #endif ++diff --git a/sysdeps/x86_64/multiarch/strchr-evex.S b/sysdeps/x86_64/multiarch/strchr-evex.S ++new file mode 100644 ++index 0000000000..ddc86a7058 ++--- /dev/null +++++ b/sysdeps/x86_64/multiarch/strchr-evex.S ++@@ -0,0 +1,335 @@ +++/* strchr/strchrnul optimized with 256-bit EVEX instructions. +++ Copyright (C) 2021 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 +++ . */ +++ +++#if IS_IN (libc) +++ +++# include +++ +++# ifndef STRCHR +++# define STRCHR __strchr_evex +++# endif +++ +++# define VMOVU vmovdqu64 +++# define VMOVA vmovdqa64 +++ +++# ifdef USE_AS_WCSCHR +++# define VPBROADCAST vpbroadcastd +++# define VPCMP vpcmpd +++# define VPMINU vpminud +++# define CHAR_REG esi +++# define SHIFT_REG r8d +++# else +++# define VPBROADCAST vpbroadcastb +++# define VPCMP vpcmpb +++# define VPMINU vpminub +++# define CHAR_REG sil +++# define SHIFT_REG ecx +++# endif +++ +++# define XMMZERO xmm16 +++ +++# define YMMZERO ymm16 +++# define YMM0 ymm17 +++# define YMM1 ymm18 +++# define YMM2 ymm19 +++# define YMM3 ymm20 +++# define YMM4 ymm21 +++# define YMM5 ymm22 +++# define YMM6 ymm23 +++# define YMM7 ymm24 +++# define YMM8 ymm25 +++ +++# define VEC_SIZE 32 +++# define PAGE_SIZE 4096 +++ +++ .section .text.evex,"ax",@progbits +++ENTRY (STRCHR) +++ movl %edi, %ecx +++# ifndef USE_AS_STRCHRNUL +++ xorl %edx, %edx +++# endif +++ +++ /* Broadcast CHAR to YMM0. */ +++ VPBROADCAST %esi, %YMM0 +++ +++ vpxorq %XMMZERO, %XMMZERO, %XMMZERO +++ +++ /* Check if we cross page boundary with one vector load. */ +++ andl $(PAGE_SIZE - 1), %ecx +++ cmpl $(PAGE_SIZE - VEC_SIZE), %ecx +++ ja L(cross_page_boundary) +++ +++ /* Check the first VEC_SIZE bytes. Search for both CHAR and the +++ null bytes. */ +++ VMOVU (%rdi), %YMM1 +++ +++ /* Leaves only CHARS matching esi as 0. */ +++ vpxorq %YMM1, %YMM0, %YMM2 +++ VPMINU %YMM2, %YMM1, %YMM2 +++ /* Each bit in K0 represents a CHAR or a null byte in YMM1. */ +++ VPCMP $0, %YMMZERO, %YMM2, %k0 +++ ktestd %k0, %k0 +++ jz L(more_vecs) +++ kmovd %k0, %eax +++ tzcntl %eax, %eax +++ /* Found CHAR or the null byte. */ +++# ifdef USE_AS_WCSCHR +++ /* NB: Multiply wchar_t count by 4 to get the number of bytes. */ +++ leaq (%rdi, %rax, 4), %rax +++# else +++ addq %rdi, %rax +++# endif +++# ifndef USE_AS_STRCHRNUL +++ cmp (%rax), %CHAR_REG +++ cmovne %rdx, %rax +++# endif +++ ret +++ +++ .p2align 4 +++L(more_vecs): +++ /* Align data for aligned loads in the loop. */ +++ andq $-VEC_SIZE, %rdi +++L(aligned_more): +++ +++ /* Check the next 4 * VEC_SIZE. Only one VEC_SIZE at a time +++ since data is only aligned to VEC_SIZE. */ +++ VMOVA VEC_SIZE(%rdi), %YMM1 +++ addq $VEC_SIZE, %rdi +++ +++ /* Leaves only CHARS matching esi as 0. */ +++ vpxorq %YMM1, %YMM0, %YMM2 +++ VPMINU %YMM2, %YMM1, %YMM2 +++ /* Each bit in K0 represents a CHAR or a null byte in YMM1. */ +++ VPCMP $0, %YMMZERO, %YMM2, %k0 +++ kmovd %k0, %eax +++ testl %eax, %eax +++ jnz L(first_vec_x0) +++ +++ VMOVA VEC_SIZE(%rdi), %YMM1 +++ /* Leaves only CHARS matching esi as 0. */ +++ vpxorq %YMM1, %YMM0, %YMM2 +++ VPMINU %YMM2, %YMM1, %YMM2 +++ /* Each bit in K0 represents a CHAR or a null byte in YMM1. */ +++ VPCMP $0, %YMMZERO, %YMM2, %k0 +++ kmovd %k0, %eax +++ testl %eax, %eax +++ jnz L(first_vec_x1) +++ +++ VMOVA (VEC_SIZE * 2)(%rdi), %YMM1 +++ /* Leaves only CHARS matching esi as 0. */ +++ vpxorq %YMM1, %YMM0, %YMM2 +++ VPMINU %YMM2, %YMM1, %YMM2 +++ /* Each bit in K0 represents a CHAR or a null byte in YMM1. */ +++ VPCMP $0, %YMMZERO, %YMM2, %k0 +++ kmovd %k0, %eax +++ testl %eax, %eax +++ jnz L(first_vec_x2) +++ +++ VMOVA (VEC_SIZE * 3)(%rdi), %YMM1 +++ /* Leaves only CHARS matching esi as 0. */ +++ vpxorq %YMM1, %YMM0, %YMM2 +++ VPMINU %YMM2, %YMM1, %YMM2 +++ /* Each bit in K0 represents a CHAR or a null byte in YMM1. */ +++ VPCMP $0, %YMMZERO, %YMM2, %k0 +++ ktestd %k0, %k0 +++ jz L(prep_loop_4x) +++ +++ kmovd %k0, %eax +++ tzcntl %eax, %eax +++ /* Found CHAR or the null byte. */ +++# ifdef USE_AS_WCSCHR +++ /* NB: Multiply wchar_t count by 4 to get the number of bytes. */ +++ leaq (VEC_SIZE * 3)(%rdi, %rax, 4), %rax +++# else +++ leaq (VEC_SIZE * 3)(%rdi, %rax), %rax +++# endif +++# ifndef USE_AS_STRCHRNUL +++ cmp (%rax), %CHAR_REG +++ cmovne %rdx, %rax +++# endif +++ ret +++ +++ .p2align 4 +++L(first_vec_x0): +++ tzcntl %eax, %eax +++ /* Found CHAR or the null byte. */ +++# ifdef USE_AS_WCSCHR +++ /* NB: Multiply wchar_t count by 4 to get the number of bytes. */ +++ leaq (%rdi, %rax, 4), %rax +++# else +++ addq %rdi, %rax +++# endif +++# ifndef USE_AS_STRCHRNUL +++ cmp (%rax), %CHAR_REG +++ cmovne %rdx, %rax +++# endif +++ ret +++ +++ .p2align 4 +++L(first_vec_x1): +++ tzcntl %eax, %eax +++ /* Found CHAR or the null byte. */ +++# ifdef USE_AS_WCSCHR +++ /* NB: Multiply wchar_t count by 4 to get the number of bytes. */ +++ leaq VEC_SIZE(%rdi, %rax, 4), %rax +++# else +++ leaq VEC_SIZE(%rdi, %rax), %rax +++# endif +++# ifndef USE_AS_STRCHRNUL +++ cmp (%rax), %CHAR_REG +++ cmovne %rdx, %rax +++# endif +++ ret +++ +++ .p2align 4 +++L(first_vec_x2): +++ tzcntl %eax, %eax +++ /* Found CHAR or the null byte. */ +++# ifdef USE_AS_WCSCHR +++ /* NB: Multiply wchar_t count by 4 to get the number of bytes. */ +++ leaq (VEC_SIZE * 2)(%rdi, %rax, 4), %rax +++# else +++ leaq (VEC_SIZE * 2)(%rdi, %rax), %rax +++# endif +++# ifndef USE_AS_STRCHRNUL +++ cmp (%rax), %CHAR_REG +++ cmovne %rdx, %rax +++# endif +++ ret +++ +++L(prep_loop_4x): +++ /* Align data to 4 * VEC_SIZE. */ +++ andq $-(VEC_SIZE * 4), %rdi +++ +++ .p2align 4 +++L(loop_4x_vec): +++ /* Compare 4 * VEC at a time forward. */ +++ VMOVA (VEC_SIZE * 4)(%rdi), %YMM1 +++ VMOVA (VEC_SIZE * 5)(%rdi), %YMM2 +++ VMOVA (VEC_SIZE * 6)(%rdi), %YMM3 +++ VMOVA (VEC_SIZE * 7)(%rdi), %YMM4 +++ +++ /* Leaves only CHARS matching esi as 0. */ +++ vpxorq %YMM1, %YMM0, %YMM5 +++ vpxorq %YMM2, %YMM0, %YMM6 +++ vpxorq %YMM3, %YMM0, %YMM7 +++ vpxorq %YMM4, %YMM0, %YMM8 +++ +++ VPMINU %YMM5, %YMM1, %YMM5 +++ VPMINU %YMM6, %YMM2, %YMM6 +++ VPMINU %YMM7, %YMM3, %YMM7 +++ VPMINU %YMM8, %YMM4, %YMM8 +++ +++ VPMINU %YMM5, %YMM6, %YMM1 +++ VPMINU %YMM7, %YMM8, %YMM2 +++ +++ VPMINU %YMM1, %YMM2, %YMM1 +++ +++ /* Each bit in K0 represents a CHAR or a null byte. */ +++ VPCMP $0, %YMMZERO, %YMM1, %k0 +++ +++ addq $(VEC_SIZE * 4), %rdi +++ +++ ktestd %k0, %k0 +++ jz L(loop_4x_vec) +++ +++ /* Each bit in K0 represents a CHAR or a null byte in YMM1. */ +++ VPCMP $0, %YMMZERO, %YMM5, %k0 +++ kmovd %k0, %eax +++ testl %eax, %eax +++ jnz L(first_vec_x0) +++ +++ /* Each bit in K1 represents a CHAR or a null byte in YMM2. */ +++ VPCMP $0, %YMMZERO, %YMM6, %k1 +++ kmovd %k1, %eax +++ testl %eax, %eax +++ jnz L(first_vec_x1) +++ +++ /* Each bit in K2 represents a CHAR or a null byte in YMM3. */ +++ VPCMP $0, %YMMZERO, %YMM7, %k2 +++ /* Each bit in K3 represents a CHAR or a null byte in YMM4. */ +++ VPCMP $0, %YMMZERO, %YMM8, %k3 +++ +++# ifdef USE_AS_WCSCHR +++ /* NB: Each bit in K2/K3 represents 4-byte element. */ +++ kshiftlw $8, %k3, %k1 +++# else +++ kshiftlq $32, %k3, %k1 +++# endif +++ +++ /* Each bit in K1 represents a NULL or a mismatch. */ +++ korq %k1, %k2, %k1 +++ kmovq %k1, %rax +++ +++ tzcntq %rax, %rax +++# ifdef USE_AS_WCSCHR +++ /* NB: Multiply wchar_t count by 4 to get the number of bytes. */ +++ leaq (VEC_SIZE * 2)(%rdi, %rax, 4), %rax +++# else +++ leaq (VEC_SIZE * 2)(%rdi, %rax), %rax +++# endif +++# ifndef USE_AS_STRCHRNUL +++ cmp (%rax), %CHAR_REG +++ cmovne %rdx, %rax +++# endif +++ ret +++ +++ /* Cold case for crossing page with first load. */ +++ .p2align 4 +++L(cross_page_boundary): +++ andq $-VEC_SIZE, %rdi +++ andl $(VEC_SIZE - 1), %ecx +++ +++ VMOVA (%rdi), %YMM1 +++ +++ /* Leaves only CHARS matching esi as 0. */ +++ vpxorq %YMM1, %YMM0, %YMM2 +++ VPMINU %YMM2, %YMM1, %YMM2 +++ /* Each bit in K0 represents a CHAR or a null byte in YMM1. */ +++ VPCMP $0, %YMMZERO, %YMM2, %k0 +++ kmovd %k0, %eax +++ testl %eax, %eax +++ +++# ifdef USE_AS_WCSCHR +++ /* NB: Divide shift count by 4 since each bit in K1 represent 4 +++ bytes. */ +++ movl %ecx, %SHIFT_REG +++ sarl $2, %SHIFT_REG +++# endif +++ +++ /* Remove the leading bits. */ +++ sarxl %SHIFT_REG, %eax, %eax +++ testl %eax, %eax +++ +++ jz L(aligned_more) +++ tzcntl %eax, %eax +++ addq %rcx, %rdi +++# ifdef USE_AS_WCSCHR +++ /* NB: Multiply wchar_t count by 4 to get the number of bytes. */ +++ leaq (%rdi, %rax, 4), %rax +++# else +++ addq %rdi, %rax +++# endif +++# ifndef USE_AS_STRCHRNUL +++ cmp (%rax), %CHAR_REG +++ cmovne %rdx, %rax +++# endif +++ ret +++ +++END (STRCHR) +++# endif ++diff --git a/sysdeps/x86_64/multiarch/strchr.c b/sysdeps/x86_64/multiarch/strchr.c ++index f27980dd36..a04ac8eb1d 100644 ++--- a/sysdeps/x86_64/multiarch/strchr.c +++++ b/sysdeps/x86_64/multiarch/strchr.c ++@@ -29,16 +29,28 @@ ++ extern __typeof (REDIRECT_NAME) OPTIMIZE (sse2) attribute_hidden; ++ extern __typeof (REDIRECT_NAME) OPTIMIZE (sse2_no_bsf) attribute_hidden; ++ extern __typeof (REDIRECT_NAME) OPTIMIZE (avx2) attribute_hidden; +++extern __typeof (REDIRECT_NAME) OPTIMIZE (avx2_rtm) attribute_hidden; +++extern __typeof (REDIRECT_NAME) OPTIMIZE (evex) attribute_hidden; ++ ++ static inline void * ++ IFUNC_SELECTOR (void) ++ { ++ const struct cpu_features* cpu_features = __get_cpu_features (); ++ ++- if (!CPU_FEATURES_ARCH_P (cpu_features, Prefer_No_VZEROUPPER) ++- && CPU_FEATURES_ARCH_P (cpu_features, AVX2_Usable) +++ if (CPU_FEATURES_ARCH_P (cpu_features, AVX2_Usable) ++ && CPU_FEATURES_ARCH_P (cpu_features, AVX_Fast_Unaligned_Load)) ++- return OPTIMIZE (avx2); +++ { +++ if (CPU_FEATURES_ARCH_P (cpu_features, AVX512VL_Usable) +++ && CPU_FEATURES_ARCH_P (cpu_features, AVX512BW_Usable) +++ && CPU_FEATURES_CPU_P (cpu_features, BMI2)) +++ return OPTIMIZE (evex); +++ +++ if (CPU_FEATURES_CPU_P (cpu_features, RTM)) +++ return OPTIMIZE (avx2_rtm); +++ +++ if (!CPU_FEATURES_ARCH_P (cpu_features, Prefer_No_VZEROUPPER)) +++ return OPTIMIZE (avx2); +++ } ++ ++ if (CPU_FEATURES_ARCH_P (cpu_features, Slow_BSF)) ++ return OPTIMIZE (sse2_no_bsf); ++diff --git a/sysdeps/x86_64/multiarch/strchrnul-avx2-rtm.S b/sysdeps/x86_64/multiarch/strchrnul-avx2-rtm.S ++new file mode 100644 ++index 0000000000..cdcf818b91 ++--- /dev/null +++++ b/sysdeps/x86_64/multiarch/strchrnul-avx2-rtm.S ++@@ -0,0 +1,3 @@ +++#define STRCHR __strchrnul_avx2_rtm +++#define USE_AS_STRCHRNUL 1 +++#include "strchr-avx2-rtm.S" ++diff --git a/sysdeps/x86_64/multiarch/strchrnul-evex.S b/sysdeps/x86_64/multiarch/strchrnul-evex.S ++new file mode 100644 ++index 0000000000..064fe7ca9e ++--- /dev/null +++++ b/sysdeps/x86_64/multiarch/strchrnul-evex.S ++@@ -0,0 +1,3 @@ +++#define STRCHR __strchrnul_evex +++#define USE_AS_STRCHRNUL 1 +++#include "strchr-evex.S" ++diff --git a/sysdeps/x86_64/multiarch/strcmp-avx2-rtm.S b/sysdeps/x86_64/multiarch/strcmp-avx2-rtm.S ++new file mode 100644 ++index 0000000000..aecd30d97f ++--- /dev/null +++++ b/sysdeps/x86_64/multiarch/strcmp-avx2-rtm.S ++@@ -0,0 +1,12 @@ +++#ifndef STRCMP +++# define STRCMP __strcmp_avx2_rtm +++#endif +++ +++#define ZERO_UPPER_VEC_REGISTERS_RETURN \ +++ ZERO_UPPER_VEC_REGISTERS_RETURN_XTEST +++ +++#define VZEROUPPER_RETURN jmp L(return_vzeroupper) +++ +++#define SECTION(p) p##.avx.rtm +++ +++#include "strcmp-avx2.S" ++diff --git a/sysdeps/x86_64/multiarch/strcmp-avx2.S b/sysdeps/x86_64/multiarch/strcmp-avx2.S ++index 48d03a9f46..4d434fd14e 100644 ++--- a/sysdeps/x86_64/multiarch/strcmp-avx2.S +++++ b/sysdeps/x86_64/multiarch/strcmp-avx2.S ++@@ -55,6 +55,10 @@ ++ # define VZEROUPPER vzeroupper ++ # endif ++ +++# ifndef SECTION +++# define SECTION(p) p##.avx +++# endif +++ ++ /* Warning! ++ wcscmp/wcsncmp have to use SIGNED comparison for elements. ++ strcmp/strncmp have to use UNSIGNED comparison for elements. ++@@ -75,7 +79,7 @@ ++ the maximum offset is reached before a difference is found, zero is ++ returned. */ ++ ++- .section .text.avx,"ax",@progbits +++ .section SECTION(.text),"ax",@progbits ++ ENTRY (STRCMP) ++ # ifdef USE_AS_STRNCMP ++ /* Check for simple cases (0 or 1) in offset. */ ++@@ -83,6 +87,16 @@ ENTRY (STRCMP) ++ je L(char0) ++ jb L(zero) ++ # ifdef USE_AS_WCSCMP +++# ifndef __ILP32__ +++ movq %rdx, %rcx +++ /* Check if length could overflow when multiplied by +++ sizeof(wchar_t). Checking top 8 bits will cover all potential +++ overflow cases as well as redirect cases where its impossible to +++ length to bound a valid memory region. In these cases just use +++ 'wcscmp'. */ +++ shrq $56, %rcx +++ jnz OVERFLOW_STRCMP +++# endif ++ /* Convert units: from wide to byte char. */ ++ shl $2, %RDX_LP ++ # endif ++@@ -127,8 +141,8 @@ L(return): ++ movzbl (%rsi, %rdx), %edx ++ subl %edx, %eax ++ # endif ++- VZEROUPPER ++- ret +++L(return_vzeroupper): +++ ZERO_UPPER_VEC_REGISTERS_RETURN ++ ++ .p2align 4 ++ L(return_vec_size): ++@@ -161,8 +175,7 @@ L(return_vec_size): ++ subl %edx, %eax ++ # endif ++ # endif ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ ++ .p2align 4 ++ L(return_2_vec_size): ++@@ -195,8 +208,7 @@ L(return_2_vec_size): ++ subl %edx, %eax ++ # endif ++ # endif ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ ++ .p2align 4 ++ L(return_3_vec_size): ++@@ -229,8 +241,7 @@ L(return_3_vec_size): ++ subl %edx, %eax ++ # endif ++ # endif ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ ++ .p2align 4 ++ L(next_3_vectors): ++@@ -356,8 +367,7 @@ L(back_to_loop): ++ subl %edx, %eax ++ # endif ++ # endif ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ ++ .p2align 4 ++ L(test_vec): ++@@ -400,8 +410,7 @@ L(test_vec): ++ subl %edx, %eax ++ # endif ++ # endif ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ ++ .p2align 4 ++ L(test_2_vec): ++@@ -444,8 +453,7 @@ L(test_2_vec): ++ subl %edx, %eax ++ # endif ++ # endif ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ ++ .p2align 4 ++ L(test_3_vec): ++@@ -486,8 +494,7 @@ L(test_3_vec): ++ subl %edx, %eax ++ # endif ++ # endif ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ ++ .p2align 4 ++ L(loop_cross_page): ++@@ -556,8 +563,7 @@ L(loop_cross_page): ++ subl %edx, %eax ++ # endif ++ # endif ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ ++ .p2align 4 ++ L(loop_cross_page_2_vec): ++@@ -591,7 +597,14 @@ L(loop_cross_page_2_vec): ++ movl $(PAGE_SIZE / (VEC_SIZE * 4) - 1), %esi ++ ++ testq %rdi, %rdi +++# ifdef USE_AS_STRNCMP +++ /* At this point, if %rdi value is 0, it already tested +++ VEC_SIZE*4+%r10 byte starting from %rax. This label +++ checks whether strncmp maximum offset reached or not. */ +++ je L(string_nbyte_offset_check) +++# else ++ je L(back_to_loop) +++# endif ++ tzcntq %rdi, %rcx ++ addq %r10, %rcx ++ /* Adjust for number of bytes skipped. */ ++@@ -624,8 +637,15 @@ L(loop_cross_page_2_vec): ++ subl %edx, %eax ++ # endif ++ # endif ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN +++ +++# ifdef USE_AS_STRNCMP +++L(string_nbyte_offset_check): +++ leaq (VEC_SIZE * 4)(%r10), %r10 +++ cmpq %r10, %r11 +++ jbe L(zero) +++ jmp L(back_to_loop) +++# endif ++ ++ .p2align 4 ++ L(cross_page_loop): ++@@ -659,8 +679,7 @@ L(cross_page_loop): ++ # ifndef USE_AS_WCSCMP ++ L(different): ++ # endif ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ ++ # ifdef USE_AS_WCSCMP ++ .p2align 4 ++@@ -670,16 +689,14 @@ L(different): ++ setl %al ++ negl %eax ++ orl $1, %eax ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ # endif ++ ++ # ifdef USE_AS_STRNCMP ++ .p2align 4 ++ L(zero): ++ xorl %eax, %eax ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ ++ .p2align 4 ++ L(char0): ++@@ -693,8 +710,7 @@ L(char0): ++ movzbl (%rdi), %eax ++ subl %ecx, %eax ++ # endif ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ # endif ++ ++ .p2align 4 ++@@ -719,8 +735,7 @@ L(last_vector): ++ movzbl (%rsi, %rdx), %edx ++ subl %edx, %eax ++ # endif ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ ++ /* Comparing on page boundary region requires special treatment: ++ It must done one vector at the time, starting with the wider ++@@ -841,7 +856,6 @@ L(cross_page_4bytes): ++ testl %eax, %eax ++ jne L(cross_page_loop) ++ subl %ecx, %eax ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ END (STRCMP) ++ #endif ++diff --git a/sysdeps/x86_64/multiarch/strcmp-evex.S b/sysdeps/x86_64/multiarch/strcmp-evex.S ++new file mode 100644 ++index 0000000000..459eeed09f ++--- /dev/null +++++ b/sysdeps/x86_64/multiarch/strcmp-evex.S ++@@ -0,0 +1,1043 @@ +++/* strcmp/wcscmp/strncmp/wcsncmp optimized with 256-bit EVEX instructions. +++ Copyright (C) 2021 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 +++ . */ +++ +++#if IS_IN (libc) +++ +++# include +++ +++# ifndef STRCMP +++# define STRCMP __strcmp_evex +++# endif +++ +++# define PAGE_SIZE 4096 +++ +++/* VEC_SIZE = Number of bytes in a ymm register */ +++# define VEC_SIZE 32 +++ +++/* Shift for dividing by (VEC_SIZE * 4). */ +++# define DIVIDE_BY_VEC_4_SHIFT 7 +++# if (VEC_SIZE * 4) != (1 << DIVIDE_BY_VEC_4_SHIFT) +++# error (VEC_SIZE * 4) != (1 << DIVIDE_BY_VEC_4_SHIFT) +++# endif +++ +++# define VMOVU vmovdqu64 +++# define VMOVA vmovdqa64 +++ +++# ifdef USE_AS_WCSCMP +++/* Compare packed dwords. */ +++# define VPCMP vpcmpd +++# define SHIFT_REG32 r8d +++# define SHIFT_REG64 r8 +++/* 1 dword char == 4 bytes. */ +++# define SIZE_OF_CHAR 4 +++# else +++/* Compare packed bytes. */ +++# define VPCMP vpcmpb +++# define SHIFT_REG32 ecx +++# define SHIFT_REG64 rcx +++/* 1 byte char == 1 byte. */ +++# define SIZE_OF_CHAR 1 +++# endif +++ +++# define XMMZERO xmm16 +++# define XMM0 xmm17 +++# define XMM1 xmm18 +++ +++# define YMMZERO ymm16 +++# define YMM0 ymm17 +++# define YMM1 ymm18 +++# define YMM2 ymm19 +++# define YMM3 ymm20 +++# define YMM4 ymm21 +++# define YMM5 ymm22 +++# define YMM6 ymm23 +++# define YMM7 ymm24 +++ +++/* Warning! +++ wcscmp/wcsncmp have to use SIGNED comparison for elements. +++ strcmp/strncmp have to use UNSIGNED comparison for elements. +++*/ +++ +++/* The main idea of the string comparison (byte or dword) using 256-bit +++ EVEX instructions consists of comparing (VPCMP) two ymm vectors. The +++ latter can be on either packed bytes or dwords depending on +++ USE_AS_WCSCMP. In order to check the null char, algorithm keeps the +++ matched bytes/dwords, requiring 5 EVEX instructions (3 VPCMP and 2 +++ KORD). In general, the costs of comparing VEC_SIZE bytes (32-bytes) +++ are 3 VPCMP and 2 KORD instructions, together with VMOVU and ktestd +++ instructions. Main loop (away from from page boundary) compares 4 +++ vectors are a time, effectively comparing 4 x VEC_SIZE bytes (128 +++ bytes) on each loop. +++ +++ The routine strncmp/wcsncmp (enabled by defining USE_AS_STRNCMP) logic +++ is the same as strcmp, except that an a maximum offset is tracked. If +++ the maximum offset is reached before a difference is found, zero is +++ returned. */ +++ +++ .section .text.evex,"ax",@progbits +++ENTRY (STRCMP) +++# ifdef USE_AS_STRNCMP +++ /* Check for simple cases (0 or 1) in offset. */ +++ cmp $1, %RDX_LP +++ je L(char0) +++ jb L(zero) +++# ifdef USE_AS_WCSCMP +++ /* Convert units: from wide to byte char. */ +++ shl $2, %RDX_LP +++# endif +++ /* Register %r11 tracks the maximum offset. */ +++ mov %RDX_LP, %R11_LP +++# endif +++ movl %edi, %eax +++ xorl %edx, %edx +++ /* Make %XMMZERO (%YMMZERO) all zeros in this function. */ +++ vpxorq %XMMZERO, %XMMZERO, %XMMZERO +++ orl %esi, %eax +++ andl $(PAGE_SIZE - 1), %eax +++ cmpl $(PAGE_SIZE - (VEC_SIZE * 4)), %eax +++ jg L(cross_page) +++ /* Start comparing 4 vectors. */ +++ VMOVU (%rdi), %YMM0 +++ VMOVU (%rsi), %YMM1 +++ +++ /* Each bit in K0 represents a mismatch in YMM0 and YMM1. */ +++ VPCMP $4, %YMM0, %YMM1, %k0 +++ +++ /* Check for NULL in YMM0. */ +++ VPCMP $0, %YMMZERO, %YMM0, %k1 +++ /* Check for NULL in YMM1. */ +++ VPCMP $0, %YMMZERO, %YMM1, %k2 +++ /* Each bit in K1 represents a NULL in YMM0 or YMM1. */ +++ kord %k1, %k2, %k1 +++ +++ /* Each bit in K1 represents: +++ 1. A mismatch in YMM0 and YMM1. Or +++ 2. A NULL in YMM0 or YMM1. +++ */ +++ kord %k0, %k1, %k1 +++ +++ ktestd %k1, %k1 +++ je L(next_3_vectors) +++ kmovd %k1, %ecx +++ tzcntl %ecx, %edx +++# ifdef USE_AS_WCSCMP +++ /* NB: Multiply wchar_t count by 4 to get the number of bytes. */ +++ sall $2, %edx +++# endif +++# ifdef USE_AS_STRNCMP +++ /* Return 0 if the mismatched index (%rdx) is after the maximum +++ offset (%r11). */ +++ cmpq %r11, %rdx +++ jae L(zero) +++# endif +++# ifdef USE_AS_WCSCMP +++ xorl %eax, %eax +++ movl (%rdi, %rdx), %ecx +++ cmpl (%rsi, %rdx), %ecx +++ je L(return) +++L(wcscmp_return): +++ setl %al +++ negl %eax +++ orl $1, %eax +++L(return): +++# else +++ movzbl (%rdi, %rdx), %eax +++ movzbl (%rsi, %rdx), %edx +++ subl %edx, %eax +++# endif +++ ret +++ +++ .p2align 4 +++L(return_vec_size): +++ kmovd %k1, %ecx +++ tzcntl %ecx, %edx +++# ifdef USE_AS_WCSCMP +++ /* NB: Multiply wchar_t count by 4 to get the number of bytes. */ +++ sall $2, %edx +++# endif +++# ifdef USE_AS_STRNCMP +++ /* Return 0 if the mismatched index (%rdx + VEC_SIZE) is after +++ the maximum offset (%r11). */ +++ addq $VEC_SIZE, %rdx +++ cmpq %r11, %rdx +++ jae L(zero) +++# ifdef USE_AS_WCSCMP +++ xorl %eax, %eax +++ movl (%rdi, %rdx), %ecx +++ cmpl (%rsi, %rdx), %ecx +++ jne L(wcscmp_return) +++# else +++ movzbl (%rdi, %rdx), %eax +++ movzbl (%rsi, %rdx), %edx +++ subl %edx, %eax +++# endif +++# else +++# ifdef USE_AS_WCSCMP +++ xorl %eax, %eax +++ movl VEC_SIZE(%rdi, %rdx), %ecx +++ cmpl VEC_SIZE(%rsi, %rdx), %ecx +++ jne L(wcscmp_return) +++# else +++ movzbl VEC_SIZE(%rdi, %rdx), %eax +++ movzbl VEC_SIZE(%rsi, %rdx), %edx +++ subl %edx, %eax +++# endif +++# endif +++ ret +++ +++ .p2align 4 +++L(return_2_vec_size): +++ kmovd %k1, %ecx +++ tzcntl %ecx, %edx +++# ifdef USE_AS_WCSCMP +++ /* NB: Multiply wchar_t count by 4 to get the number of bytes. */ +++ sall $2, %edx +++# endif +++# ifdef USE_AS_STRNCMP +++ /* Return 0 if the mismatched index (%rdx + 2 * VEC_SIZE) is +++ after the maximum offset (%r11). */ +++ addq $(VEC_SIZE * 2), %rdx +++ cmpq %r11, %rdx +++ jae L(zero) +++# ifdef USE_AS_WCSCMP +++ xorl %eax, %eax +++ movl (%rdi, %rdx), %ecx +++ cmpl (%rsi, %rdx), %ecx +++ jne L(wcscmp_return) +++# else +++ movzbl (%rdi, %rdx), %eax +++ movzbl (%rsi, %rdx), %edx +++ subl %edx, %eax +++# endif +++# else +++# ifdef USE_AS_WCSCMP +++ xorl %eax, %eax +++ movl (VEC_SIZE * 2)(%rdi, %rdx), %ecx +++ cmpl (VEC_SIZE * 2)(%rsi, %rdx), %ecx +++ jne L(wcscmp_return) +++# else +++ movzbl (VEC_SIZE * 2)(%rdi, %rdx), %eax +++ movzbl (VEC_SIZE * 2)(%rsi, %rdx), %edx +++ subl %edx, %eax +++# endif +++# endif +++ ret +++ +++ .p2align 4 +++L(return_3_vec_size): +++ kmovd %k1, %ecx +++ tzcntl %ecx, %edx +++# ifdef USE_AS_WCSCMP +++ /* NB: Multiply wchar_t count by 4 to get the number of bytes. */ +++ sall $2, %edx +++# endif +++# ifdef USE_AS_STRNCMP +++ /* Return 0 if the mismatched index (%rdx + 3 * VEC_SIZE) is +++ after the maximum offset (%r11). */ +++ addq $(VEC_SIZE * 3), %rdx +++ cmpq %r11, %rdx +++ jae L(zero) +++# ifdef USE_AS_WCSCMP +++ xorl %eax, %eax +++ movl (%rdi, %rdx), %ecx +++ cmpl (%rsi, %rdx), %ecx +++ jne L(wcscmp_return) +++# else +++ movzbl (%rdi, %rdx), %eax +++ movzbl (%rsi, %rdx), %edx +++ subl %edx, %eax +++# endif +++# else +++# ifdef USE_AS_WCSCMP +++ xorl %eax, %eax +++ movl (VEC_SIZE * 3)(%rdi, %rdx), %ecx +++ cmpl (VEC_SIZE * 3)(%rsi, %rdx), %ecx +++ jne L(wcscmp_return) +++# else +++ movzbl (VEC_SIZE * 3)(%rdi, %rdx), %eax +++ movzbl (VEC_SIZE * 3)(%rsi, %rdx), %edx +++ subl %edx, %eax +++# endif +++# endif +++ ret +++ +++ .p2align 4 +++L(next_3_vectors): +++ VMOVU VEC_SIZE(%rdi), %YMM0 +++ VMOVU VEC_SIZE(%rsi), %YMM1 +++ /* Each bit in K0 represents a mismatch in YMM0 and YMM1. */ +++ VPCMP $4, %YMM0, %YMM1, %k0 +++ VPCMP $0, %YMMZERO, %YMM0, %k1 +++ VPCMP $0, %YMMZERO, %YMM1, %k2 +++ /* Each bit in K1 represents a NULL in YMM0 or YMM1. */ +++ kord %k1, %k2, %k1 +++ /* Each bit in K1 represents a NULL or a mismatch. */ +++ kord %k0, %k1, %k1 +++ ktestd %k1, %k1 +++ jne L(return_vec_size) +++ +++ VMOVU (VEC_SIZE * 2)(%rdi), %YMM2 +++ VMOVU (VEC_SIZE * 3)(%rdi), %YMM3 +++ VMOVU (VEC_SIZE * 2)(%rsi), %YMM4 +++ VMOVU (VEC_SIZE * 3)(%rsi), %YMM5 +++ +++ /* Each bit in K0 represents a mismatch in YMM2 and YMM4. */ +++ VPCMP $4, %YMM2, %YMM4, %k0 +++ VPCMP $0, %YMMZERO, %YMM2, %k1 +++ VPCMP $0, %YMMZERO, %YMM4, %k2 +++ /* Each bit in K1 represents a NULL in YMM2 or YMM4. */ +++ kord %k1, %k2, %k1 +++ /* Each bit in K1 represents a NULL or a mismatch. */ +++ kord %k0, %k1, %k1 +++ ktestd %k1, %k1 +++ jne L(return_2_vec_size) +++ +++ /* Each bit in K0 represents a mismatch in YMM3 and YMM5. */ +++ VPCMP $4, %YMM3, %YMM5, %k0 +++ VPCMP $0, %YMMZERO, %YMM3, %k1 +++ VPCMP $0, %YMMZERO, %YMM5, %k2 +++ /* Each bit in K1 represents a NULL in YMM3 or YMM5. */ +++ kord %k1, %k2, %k1 +++ /* Each bit in K1 represents a NULL or a mismatch. */ +++ kord %k0, %k1, %k1 +++ ktestd %k1, %k1 +++ jne L(return_3_vec_size) +++L(main_loop_header): +++ leaq (VEC_SIZE * 4)(%rdi), %rdx +++ movl $PAGE_SIZE, %ecx +++ /* Align load via RAX. */ +++ andq $-(VEC_SIZE * 4), %rdx +++ subq %rdi, %rdx +++ leaq (%rdi, %rdx), %rax +++# ifdef USE_AS_STRNCMP +++ /* Starting from this point, the maximum offset, or simply the +++ 'offset', DECREASES by the same amount when base pointers are +++ moved forward. Return 0 when: +++ 1) On match: offset <= the matched vector index. +++ 2) On mistmach, offset is before the mistmatched index. +++ */ +++ subq %rdx, %r11 +++ jbe L(zero) +++# endif +++ addq %rsi, %rdx +++ movq %rdx, %rsi +++ andl $(PAGE_SIZE - 1), %esi +++ /* Number of bytes before page crossing. */ +++ subq %rsi, %rcx +++ /* Number of VEC_SIZE * 4 blocks before page crossing. */ +++ shrq $DIVIDE_BY_VEC_4_SHIFT, %rcx +++ /* ESI: Number of VEC_SIZE * 4 blocks before page crossing. */ +++ movl %ecx, %esi +++ jmp L(loop_start) +++ +++ .p2align 4 +++L(loop): +++# ifdef USE_AS_STRNCMP +++ /* Base pointers are moved forward by 4 * VEC_SIZE. Decrease +++ the maximum offset (%r11) by the same amount. */ +++ subq $(VEC_SIZE * 4), %r11 +++ jbe L(zero) +++# endif +++ addq $(VEC_SIZE * 4), %rax +++ addq $(VEC_SIZE * 4), %rdx +++L(loop_start): +++ testl %esi, %esi +++ leal -1(%esi), %esi +++ je L(loop_cross_page) +++L(back_to_loop): +++ /* Main loop, comparing 4 vectors are a time. */ +++ VMOVA (%rax), %YMM0 +++ VMOVA VEC_SIZE(%rax), %YMM2 +++ VMOVA (VEC_SIZE * 2)(%rax), %YMM4 +++ VMOVA (VEC_SIZE * 3)(%rax), %YMM6 +++ VMOVU (%rdx), %YMM1 +++ VMOVU VEC_SIZE(%rdx), %YMM3 +++ VMOVU (VEC_SIZE * 2)(%rdx), %YMM5 +++ VMOVU (VEC_SIZE * 3)(%rdx), %YMM7 +++ +++ VPCMP $4, %YMM0, %YMM1, %k0 +++ VPCMP $0, %YMMZERO, %YMM0, %k1 +++ VPCMP $0, %YMMZERO, %YMM1, %k2 +++ kord %k1, %k2, %k1 +++ /* Each bit in K4 represents a NULL or a mismatch in YMM0 and +++ YMM1. */ +++ kord %k0, %k1, %k4 +++ +++ VPCMP $4, %YMM2, %YMM3, %k0 +++ VPCMP $0, %YMMZERO, %YMM2, %k1 +++ VPCMP $0, %YMMZERO, %YMM3, %k2 +++ kord %k1, %k2, %k1 +++ /* Each bit in K5 represents a NULL or a mismatch in YMM2 and +++ YMM3. */ +++ kord %k0, %k1, %k5 +++ +++ VPCMP $4, %YMM4, %YMM5, %k0 +++ VPCMP $0, %YMMZERO, %YMM4, %k1 +++ VPCMP $0, %YMMZERO, %YMM5, %k2 +++ kord %k1, %k2, %k1 +++ /* Each bit in K6 represents a NULL or a mismatch in YMM4 and +++ YMM5. */ +++ kord %k0, %k1, %k6 +++ +++ VPCMP $4, %YMM6, %YMM7, %k0 +++ VPCMP $0, %YMMZERO, %YMM6, %k1 +++ VPCMP $0, %YMMZERO, %YMM7, %k2 +++ kord %k1, %k2, %k1 +++ /* Each bit in K7 represents a NULL or a mismatch in YMM6 and +++ YMM7. */ +++ kord %k0, %k1, %k7 +++ +++ kord %k4, %k5, %k0 +++ kord %k6, %k7, %k1 +++ +++ /* Test each mask (32 bits) individually because for VEC_SIZE +++ == 32 is not possible to OR the four masks and keep all bits +++ in a 64-bit integer register, differing from SSE2 strcmp +++ where ORing is possible. */ +++ kortestd %k0, %k1 +++ je L(loop) +++ ktestd %k4, %k4 +++ je L(test_vec) +++ kmovd %k4, %edi +++ tzcntl %edi, %ecx +++# ifdef USE_AS_WCSCMP +++ /* NB: Multiply wchar_t count by 4 to get the number of bytes. */ +++ sall $2, %ecx +++# endif +++# ifdef USE_AS_STRNCMP +++ cmpq %rcx, %r11 +++ jbe L(zero) +++# ifdef USE_AS_WCSCMP +++ movq %rax, %rsi +++ xorl %eax, %eax +++ movl (%rsi, %rcx), %edi +++ cmpl (%rdx, %rcx), %edi +++ jne L(wcscmp_return) +++# else +++ movzbl (%rax, %rcx), %eax +++ movzbl (%rdx, %rcx), %edx +++ subl %edx, %eax +++# endif +++# else +++# ifdef USE_AS_WCSCMP +++ movq %rax, %rsi +++ xorl %eax, %eax +++ movl (%rsi, %rcx), %edi +++ cmpl (%rdx, %rcx), %edi +++ jne L(wcscmp_return) +++# else +++ movzbl (%rax, %rcx), %eax +++ movzbl (%rdx, %rcx), %edx +++ subl %edx, %eax +++# endif +++# endif +++ ret +++ +++ .p2align 4 +++L(test_vec): +++# ifdef USE_AS_STRNCMP +++ /* The first vector matched. Return 0 if the maximum offset +++ (%r11) <= VEC_SIZE. */ +++ cmpq $VEC_SIZE, %r11 +++ jbe L(zero) +++# endif +++ ktestd %k5, %k5 +++ je L(test_2_vec) +++ kmovd %k5, %ecx +++ tzcntl %ecx, %edi +++# ifdef USE_AS_WCSCMP +++ /* NB: Multiply wchar_t count by 4 to get the number of bytes. */ +++ sall $2, %edi +++# endif +++# ifdef USE_AS_STRNCMP +++ addq $VEC_SIZE, %rdi +++ cmpq %rdi, %r11 +++ jbe L(zero) +++# ifdef USE_AS_WCSCMP +++ movq %rax, %rsi +++ xorl %eax, %eax +++ movl (%rsi, %rdi), %ecx +++ cmpl (%rdx, %rdi), %ecx +++ jne L(wcscmp_return) +++# else +++ movzbl (%rax, %rdi), %eax +++ movzbl (%rdx, %rdi), %edx +++ subl %edx, %eax +++# endif +++# else +++# ifdef USE_AS_WCSCMP +++ movq %rax, %rsi +++ xorl %eax, %eax +++ movl VEC_SIZE(%rsi, %rdi), %ecx +++ cmpl VEC_SIZE(%rdx, %rdi), %ecx +++ jne L(wcscmp_return) +++# else +++ movzbl VEC_SIZE(%rax, %rdi), %eax +++ movzbl VEC_SIZE(%rdx, %rdi), %edx +++ subl %edx, %eax +++# endif +++# endif +++ ret +++ +++ .p2align 4 +++L(test_2_vec): +++# ifdef USE_AS_STRNCMP +++ /* The first 2 vectors matched. Return 0 if the maximum offset +++ (%r11) <= 2 * VEC_SIZE. */ +++ cmpq $(VEC_SIZE * 2), %r11 +++ jbe L(zero) +++# endif +++ ktestd %k6, %k6 +++ je L(test_3_vec) +++ kmovd %k6, %ecx +++ tzcntl %ecx, %edi +++# ifdef USE_AS_WCSCMP +++ /* NB: Multiply wchar_t count by 4 to get the number of bytes. */ +++ sall $2, %edi +++# endif +++# ifdef USE_AS_STRNCMP +++ addq $(VEC_SIZE * 2), %rdi +++ cmpq %rdi, %r11 +++ jbe L(zero) +++# ifdef USE_AS_WCSCMP +++ movq %rax, %rsi +++ xorl %eax, %eax +++ movl (%rsi, %rdi), %ecx +++ cmpl (%rdx, %rdi), %ecx +++ jne L(wcscmp_return) +++# else +++ movzbl (%rax, %rdi), %eax +++ movzbl (%rdx, %rdi), %edx +++ subl %edx, %eax +++# endif +++# else +++# ifdef USE_AS_WCSCMP +++ movq %rax, %rsi +++ xorl %eax, %eax +++ movl (VEC_SIZE * 2)(%rsi, %rdi), %ecx +++ cmpl (VEC_SIZE * 2)(%rdx, %rdi), %ecx +++ jne L(wcscmp_return) +++# else +++ movzbl (VEC_SIZE * 2)(%rax, %rdi), %eax +++ movzbl (VEC_SIZE * 2)(%rdx, %rdi), %edx +++ subl %edx, %eax +++# endif +++# endif +++ ret +++ +++ .p2align 4 +++L(test_3_vec): +++# ifdef USE_AS_STRNCMP +++ /* The first 3 vectors matched. Return 0 if the maximum offset +++ (%r11) <= 3 * VEC_SIZE. */ +++ cmpq $(VEC_SIZE * 3), %r11 +++ jbe L(zero) +++# endif +++ kmovd %k7, %esi +++ tzcntl %esi, %ecx +++# ifdef USE_AS_WCSCMP +++ /* NB: Multiply wchar_t count by 4 to get the number of bytes. */ +++ sall $2, %ecx +++# endif +++# ifdef USE_AS_STRNCMP +++ addq $(VEC_SIZE * 3), %rcx +++ cmpq %rcx, %r11 +++ jbe L(zero) +++# ifdef USE_AS_WCSCMP +++ movq %rax, %rsi +++ xorl %eax, %eax +++ movl (%rsi, %rcx), %esi +++ cmpl (%rdx, %rcx), %esi +++ jne L(wcscmp_return) +++# else +++ movzbl (%rax, %rcx), %eax +++ movzbl (%rdx, %rcx), %edx +++ subl %edx, %eax +++# endif +++# else +++# ifdef USE_AS_WCSCMP +++ movq %rax, %rsi +++ xorl %eax, %eax +++ movl (VEC_SIZE * 3)(%rsi, %rcx), %esi +++ cmpl (VEC_SIZE * 3)(%rdx, %rcx), %esi +++ jne L(wcscmp_return) +++# else +++ movzbl (VEC_SIZE * 3)(%rax, %rcx), %eax +++ movzbl (VEC_SIZE * 3)(%rdx, %rcx), %edx +++ subl %edx, %eax +++# endif +++# endif +++ ret +++ +++ .p2align 4 +++L(loop_cross_page): +++ xorl %r10d, %r10d +++ movq %rdx, %rcx +++ /* Align load via RDX. We load the extra ECX bytes which should +++ be ignored. */ +++ andl $((VEC_SIZE * 4) - 1), %ecx +++ /* R10 is -RCX. */ +++ subq %rcx, %r10 +++ +++ /* This works only if VEC_SIZE * 2 == 64. */ +++# if (VEC_SIZE * 2) != 64 +++# error (VEC_SIZE * 2) != 64 +++# endif +++ +++ /* Check if the first VEC_SIZE * 2 bytes should be ignored. */ +++ cmpl $(VEC_SIZE * 2), %ecx +++ jge L(loop_cross_page_2_vec) +++ +++ VMOVU (%rax, %r10), %YMM2 +++ VMOVU VEC_SIZE(%rax, %r10), %YMM3 +++ VMOVU (%rdx, %r10), %YMM4 +++ VMOVU VEC_SIZE(%rdx, %r10), %YMM5 +++ +++ VPCMP $4, %YMM4, %YMM2, %k0 +++ VPCMP $0, %YMMZERO, %YMM2, %k1 +++ VPCMP $0, %YMMZERO, %YMM4, %k2 +++ kord %k1, %k2, %k1 +++ /* Each bit in K1 represents a NULL or a mismatch in YMM2 and +++ YMM4. */ +++ kord %k0, %k1, %k1 +++ +++ VPCMP $4, %YMM5, %YMM3, %k3 +++ VPCMP $0, %YMMZERO, %YMM3, %k4 +++ VPCMP $0, %YMMZERO, %YMM5, %k5 +++ kord %k4, %k5, %k4 +++ /* Each bit in K3 represents a NULL or a mismatch in YMM3 and +++ YMM5. */ +++ kord %k3, %k4, %k3 +++ +++# ifdef USE_AS_WCSCMP +++ /* NB: Each bit in K1/K3 represents 4-byte element. */ +++ kshiftlw $8, %k3, %k2 +++ /* NB: Divide shift count by 4 since each bit in K1 represent 4 +++ bytes. */ +++ movl %ecx, %SHIFT_REG32 +++ sarl $2, %SHIFT_REG32 +++# else +++ kshiftlq $32, %k3, %k2 +++# endif +++ +++ /* Each bit in K1 represents a NULL or a mismatch. */ +++ korq %k1, %k2, %k1 +++ kmovq %k1, %rdi +++ +++ /* Since ECX < VEC_SIZE * 2, simply skip the first ECX bytes. */ +++ shrxq %SHIFT_REG64, %rdi, %rdi +++ testq %rdi, %rdi +++ je L(loop_cross_page_2_vec) +++ tzcntq %rdi, %rcx +++# ifdef USE_AS_WCSCMP +++ /* NB: Multiply wchar_t count by 4 to get the number of bytes. */ +++ sall $2, %ecx +++# endif +++# ifdef USE_AS_STRNCMP +++ cmpq %rcx, %r11 +++ jbe L(zero) +++# ifdef USE_AS_WCSCMP +++ movq %rax, %rsi +++ xorl %eax, %eax +++ movl (%rsi, %rcx), %edi +++ cmpl (%rdx, %rcx), %edi +++ jne L(wcscmp_return) +++# else +++ movzbl (%rax, %rcx), %eax +++ movzbl (%rdx, %rcx), %edx +++ subl %edx, %eax +++# endif +++# else +++# ifdef USE_AS_WCSCMP +++ movq %rax, %rsi +++ xorl %eax, %eax +++ movl (%rsi, %rcx), %edi +++ cmpl (%rdx, %rcx), %edi +++ jne L(wcscmp_return) +++# else +++ movzbl (%rax, %rcx), %eax +++ movzbl (%rdx, %rcx), %edx +++ subl %edx, %eax +++# endif +++# endif +++ ret +++ +++ .p2align 4 +++L(loop_cross_page_2_vec): +++ /* The first VEC_SIZE * 2 bytes match or are ignored. */ +++ VMOVU (VEC_SIZE * 2)(%rax, %r10), %YMM0 +++ VMOVU (VEC_SIZE * 3)(%rax, %r10), %YMM1 +++ VMOVU (VEC_SIZE * 2)(%rdx, %r10), %YMM2 +++ VMOVU (VEC_SIZE * 3)(%rdx, %r10), %YMM3 +++ +++ VPCMP $4, %YMM0, %YMM2, %k0 +++ VPCMP $0, %YMMZERO, %YMM0, %k1 +++ VPCMP $0, %YMMZERO, %YMM2, %k2 +++ kord %k1, %k2, %k1 +++ /* Each bit in K1 represents a NULL or a mismatch in YMM0 and +++ YMM2. */ +++ kord %k0, %k1, %k1 +++ +++ VPCMP $4, %YMM1, %YMM3, %k3 +++ VPCMP $0, %YMMZERO, %YMM1, %k4 +++ VPCMP $0, %YMMZERO, %YMM3, %k5 +++ kord %k4, %k5, %k4 +++ /* Each bit in K3 represents a NULL or a mismatch in YMM1 and +++ YMM3. */ +++ kord %k3, %k4, %k3 +++ +++# ifdef USE_AS_WCSCMP +++ /* NB: Each bit in K1/K3 represents 4-byte element. */ +++ kshiftlw $8, %k3, %k2 +++# else +++ kshiftlq $32, %k3, %k2 +++# endif +++ +++ /* Each bit in K1 represents a NULL or a mismatch. */ +++ korq %k1, %k2, %k1 +++ kmovq %k1, %rdi +++ +++ xorl %r8d, %r8d +++ /* If ECX > VEC_SIZE * 2, skip ECX - (VEC_SIZE * 2) bytes. */ +++ subl $(VEC_SIZE * 2), %ecx +++ jle 1f +++ /* R8 has number of bytes skipped. */ +++ movl %ecx, %r8d +++# ifdef USE_AS_WCSCMP +++ /* NB: Divide shift count by 4 since each bit in K1 represent 4 +++ bytes. */ +++ sarl $2, %ecx +++# endif +++ /* Skip ECX bytes. */ +++ shrq %cl, %rdi +++1: +++ /* Before jumping back to the loop, set ESI to the number of +++ VEC_SIZE * 4 blocks before page crossing. */ +++ movl $(PAGE_SIZE / (VEC_SIZE * 4) - 1), %esi +++ +++ testq %rdi, %rdi +++# ifdef USE_AS_STRNCMP +++ /* At this point, if %rdi value is 0, it already tested +++ VEC_SIZE*4+%r10 byte starting from %rax. This label +++ checks whether strncmp maximum offset reached or not. */ +++ je L(string_nbyte_offset_check) +++# else +++ je L(back_to_loop) +++# endif +++ tzcntq %rdi, %rcx +++# ifdef USE_AS_WCSCMP +++ /* NB: Multiply wchar_t count by 4 to get the number of bytes. */ +++ sall $2, %ecx +++# endif +++ addq %r10, %rcx +++ /* Adjust for number of bytes skipped. */ +++ addq %r8, %rcx +++# ifdef USE_AS_STRNCMP +++ addq $(VEC_SIZE * 2), %rcx +++ subq %rcx, %r11 +++ jbe L(zero) +++# ifdef USE_AS_WCSCMP +++ movq %rax, %rsi +++ xorl %eax, %eax +++ movl (%rsi, %rcx), %edi +++ cmpl (%rdx, %rcx), %edi +++ jne L(wcscmp_return) +++# else +++ movzbl (%rax, %rcx), %eax +++ movzbl (%rdx, %rcx), %edx +++ subl %edx, %eax +++# endif +++# else +++# ifdef USE_AS_WCSCMP +++ movq %rax, %rsi +++ xorl %eax, %eax +++ movl (VEC_SIZE * 2)(%rsi, %rcx), %edi +++ cmpl (VEC_SIZE * 2)(%rdx, %rcx), %edi +++ jne L(wcscmp_return) +++# else +++ movzbl (VEC_SIZE * 2)(%rax, %rcx), %eax +++ movzbl (VEC_SIZE * 2)(%rdx, %rcx), %edx +++ subl %edx, %eax +++# endif +++# endif +++ ret +++ +++# ifdef USE_AS_STRNCMP +++L(string_nbyte_offset_check): +++ leaq (VEC_SIZE * 4)(%r10), %r10 +++ cmpq %r10, %r11 +++ jbe L(zero) +++ jmp L(back_to_loop) +++# endif +++ +++ .p2align 4 +++L(cross_page_loop): +++ /* Check one byte/dword at a time. */ +++# ifdef USE_AS_WCSCMP +++ cmpl %ecx, %eax +++# else +++ subl %ecx, %eax +++# endif +++ jne L(different) +++ addl $SIZE_OF_CHAR, %edx +++ cmpl $(VEC_SIZE * 4), %edx +++ je L(main_loop_header) +++# ifdef USE_AS_STRNCMP +++ cmpq %r11, %rdx +++ jae L(zero) +++# endif +++# ifdef USE_AS_WCSCMP +++ movl (%rdi, %rdx), %eax +++ movl (%rsi, %rdx), %ecx +++# else +++ movzbl (%rdi, %rdx), %eax +++ movzbl (%rsi, %rdx), %ecx +++# endif +++ /* Check null char. */ +++ testl %eax, %eax +++ jne L(cross_page_loop) +++ /* Since %eax == 0, subtract is OK for both SIGNED and UNSIGNED +++ comparisons. */ +++ subl %ecx, %eax +++# ifndef USE_AS_WCSCMP +++L(different): +++# endif +++ ret +++ +++# ifdef USE_AS_WCSCMP +++ .p2align 4 +++L(different): +++ /* Use movl to avoid modifying EFLAGS. */ +++ movl $0, %eax +++ setl %al +++ negl %eax +++ orl $1, %eax +++ ret +++# endif +++ +++# ifdef USE_AS_STRNCMP +++ .p2align 4 +++L(zero): +++ xorl %eax, %eax +++ ret +++ +++ .p2align 4 +++L(char0): +++# ifdef USE_AS_WCSCMP +++ xorl %eax, %eax +++ movl (%rdi), %ecx +++ cmpl (%rsi), %ecx +++ jne L(wcscmp_return) +++# else +++ movzbl (%rsi), %ecx +++ movzbl (%rdi), %eax +++ subl %ecx, %eax +++# endif +++ ret +++# endif +++ +++ .p2align 4 +++L(last_vector): +++ addq %rdx, %rdi +++ addq %rdx, %rsi +++# ifdef USE_AS_STRNCMP +++ subq %rdx, %r11 +++# endif +++ tzcntl %ecx, %edx +++# ifdef USE_AS_WCSCMP +++ /* NB: Multiply wchar_t count by 4 to get the number of bytes. */ +++ sall $2, %edx +++# endif +++# ifdef USE_AS_STRNCMP +++ cmpq %r11, %rdx +++ jae L(zero) +++# endif +++# ifdef USE_AS_WCSCMP +++ xorl %eax, %eax +++ movl (%rdi, %rdx), %ecx +++ cmpl (%rsi, %rdx), %ecx +++ jne L(wcscmp_return) +++# else +++ movzbl (%rdi, %rdx), %eax +++ movzbl (%rsi, %rdx), %edx +++ subl %edx, %eax +++# endif +++ ret +++ +++ /* Comparing on page boundary region requires special treatment: +++ It must done one vector at the time, starting with the wider +++ ymm vector if possible, if not, with xmm. If fetching 16 bytes +++ (xmm) still passes the boundary, byte comparison must be done. +++ */ +++ .p2align 4 +++L(cross_page): +++ /* Try one ymm vector at a time. */ +++ cmpl $(PAGE_SIZE - VEC_SIZE), %eax +++ jg L(cross_page_1_vector) +++L(loop_1_vector): +++ VMOVU (%rdi, %rdx), %YMM0 +++ VMOVU (%rsi, %rdx), %YMM1 +++ +++ /* Each bit in K0 represents a mismatch in YMM0 and YMM1. */ +++ VPCMP $4, %YMM0, %YMM1, %k0 +++ VPCMP $0, %YMMZERO, %YMM0, %k1 +++ VPCMP $0, %YMMZERO, %YMM1, %k2 +++ /* Each bit in K1 represents a NULL in YMM0 or YMM1. */ +++ kord %k1, %k2, %k1 +++ /* Each bit in K1 represents a NULL or a mismatch. */ +++ kord %k0, %k1, %k1 +++ kmovd %k1, %ecx +++ testl %ecx, %ecx +++ jne L(last_vector) +++ +++ addl $VEC_SIZE, %edx +++ +++ addl $VEC_SIZE, %eax +++# ifdef USE_AS_STRNCMP +++ /* Return 0 if the current offset (%rdx) >= the maximum offset +++ (%r11). */ +++ cmpq %r11, %rdx +++ jae L(zero) +++# endif +++ cmpl $(PAGE_SIZE - VEC_SIZE), %eax +++ jle L(loop_1_vector) +++L(cross_page_1_vector): +++ /* Less than 32 bytes to check, try one xmm vector. */ +++ cmpl $(PAGE_SIZE - 16), %eax +++ jg L(cross_page_1_xmm) +++ VMOVU (%rdi, %rdx), %XMM0 +++ VMOVU (%rsi, %rdx), %XMM1 +++ +++ /* Each bit in K0 represents a mismatch in XMM0 and XMM1. */ +++ VPCMP $4, %XMM0, %XMM1, %k0 +++ VPCMP $0, %XMMZERO, %XMM0, %k1 +++ VPCMP $0, %XMMZERO, %XMM1, %k2 +++ /* Each bit in K1 represents a NULL in XMM0 or XMM1. */ +++ korw %k1, %k2, %k1 +++ /* Each bit in K1 represents a NULL or a mismatch. */ +++ korw %k0, %k1, %k1 +++ kmovw %k1, %ecx +++ testl %ecx, %ecx +++ jne L(last_vector) +++ +++ addl $16, %edx +++# ifndef USE_AS_WCSCMP +++ addl $16, %eax +++# endif +++# ifdef USE_AS_STRNCMP +++ /* Return 0 if the current offset (%rdx) >= the maximum offset +++ (%r11). */ +++ cmpq %r11, %rdx +++ jae L(zero) +++# endif +++ +++L(cross_page_1_xmm): +++# ifndef USE_AS_WCSCMP +++ /* Less than 16 bytes to check, try 8 byte vector. NB: No need +++ for wcscmp nor wcsncmp since wide char is 4 bytes. */ +++ cmpl $(PAGE_SIZE - 8), %eax +++ jg L(cross_page_8bytes) +++ vmovq (%rdi, %rdx), %XMM0 +++ vmovq (%rsi, %rdx), %XMM1 +++ +++ /* Each bit in K0 represents a mismatch in XMM0 and XMM1. */ +++ VPCMP $4, %XMM0, %XMM1, %k0 +++ VPCMP $0, %XMMZERO, %XMM0, %k1 +++ VPCMP $0, %XMMZERO, %XMM1, %k2 +++ /* Each bit in K1 represents a NULL in XMM0 or XMM1. */ +++ kord %k1, %k2, %k1 +++ /* Each bit in K1 represents a NULL or a mismatch. */ +++ kord %k0, %k1, %k1 +++ kmovd %k1, %ecx +++ +++# ifdef USE_AS_WCSCMP +++ /* Only last 2 bits are valid. */ +++ andl $0x3, %ecx +++# else +++ /* Only last 8 bits are valid. */ +++ andl $0xff, %ecx +++# endif +++ +++ testl %ecx, %ecx +++ jne L(last_vector) +++ +++ addl $8, %edx +++ addl $8, %eax +++# ifdef USE_AS_STRNCMP +++ /* Return 0 if the current offset (%rdx) >= the maximum offset +++ (%r11). */ +++ cmpq %r11, %rdx +++ jae L(zero) +++# endif +++ +++L(cross_page_8bytes): +++ /* Less than 8 bytes to check, try 4 byte vector. */ +++ cmpl $(PAGE_SIZE - 4), %eax +++ jg L(cross_page_4bytes) +++ vmovd (%rdi, %rdx), %XMM0 +++ vmovd (%rsi, %rdx), %XMM1 +++ +++ /* Each bit in K0 represents a mismatch in XMM0 and XMM1. */ +++ VPCMP $4, %XMM0, %XMM1, %k0 +++ VPCMP $0, %XMMZERO, %XMM0, %k1 +++ VPCMP $0, %XMMZERO, %XMM1, %k2 +++ /* Each bit in K1 represents a NULL in XMM0 or XMM1. */ +++ kord %k1, %k2, %k1 +++ /* Each bit in K1 represents a NULL or a mismatch. */ +++ kord %k0, %k1, %k1 +++ kmovd %k1, %ecx +++ +++# ifdef USE_AS_WCSCMP +++ /* Only the last bit is valid. */ +++ andl $0x1, %ecx +++# else +++ /* Only last 4 bits are valid. */ +++ andl $0xf, %ecx +++# endif +++ +++ testl %ecx, %ecx +++ jne L(last_vector) +++ +++ addl $4, %edx +++# ifdef USE_AS_STRNCMP +++ /* Return 0 if the current offset (%rdx) >= the maximum offset +++ (%r11). */ +++ cmpq %r11, %rdx +++ jae L(zero) +++# endif +++ +++L(cross_page_4bytes): +++# endif +++ /* Less than 4 bytes to check, try one byte/dword at a time. */ +++# ifdef USE_AS_STRNCMP +++ cmpq %r11, %rdx +++ jae L(zero) +++# endif +++# ifdef USE_AS_WCSCMP +++ movl (%rdi, %rdx), %eax +++ movl (%rsi, %rdx), %ecx +++# else +++ movzbl (%rdi, %rdx), %eax +++ movzbl (%rsi, %rdx), %ecx +++# endif +++ testl %eax, %eax +++ jne L(cross_page_loop) +++ subl %ecx, %eax +++ ret +++END (STRCMP) +++#endif ++diff --git a/sysdeps/x86_64/multiarch/strcmp.c b/sysdeps/x86_64/multiarch/strcmp.c ++index 4db7332ac1..358fa90152 100644 ++--- a/sysdeps/x86_64/multiarch/strcmp.c +++++ b/sysdeps/x86_64/multiarch/strcmp.c ++@@ -30,16 +30,29 @@ extern __typeof (REDIRECT_NAME) OPTIMIZE (sse2) attribute_hidden; ++ extern __typeof (REDIRECT_NAME) OPTIMIZE (sse2_unaligned) attribute_hidden; ++ extern __typeof (REDIRECT_NAME) OPTIMIZE (ssse3) attribute_hidden; ++ extern __typeof (REDIRECT_NAME) OPTIMIZE (avx2) attribute_hidden; +++extern __typeof (REDIRECT_NAME) OPTIMIZE (avx2_rtm) attribute_hidden; +++extern __typeof (REDIRECT_NAME) OPTIMIZE (evex) attribute_hidden; ++ ++ static inline void * ++ IFUNC_SELECTOR (void) ++ { ++ const struct cpu_features* cpu_features = __get_cpu_features (); ++ ++- if (!CPU_FEATURES_ARCH_P (cpu_features, Prefer_No_VZEROUPPER) ++- && CPU_FEATURES_ARCH_P (cpu_features, AVX2_Usable) +++ if (CPU_FEATURES_ARCH_P (cpu_features, AVX2_Usable) ++ && CPU_FEATURES_ARCH_P (cpu_features, AVX_Fast_Unaligned_Load)) ++- return OPTIMIZE (avx2); +++ { +++ if (CPU_FEATURES_ARCH_P (cpu_features, AVX512VL_Usable) +++ && CPU_FEATURES_ARCH_P (cpu_features, AVX512BW_Usable) +++ && CPU_FEATURES_CPU_P (cpu_features, BMI2) +++ && !CPU_FEATURES_ARCH_P (cpu_features, Prefer_AVX2_STRCMP)) +++ return OPTIMIZE (evex); +++ +++ if (CPU_FEATURES_CPU_P (cpu_features, RTM)) +++ return OPTIMIZE (avx2_rtm); +++ +++ if (!CPU_FEATURES_ARCH_P (cpu_features, Prefer_No_VZEROUPPER)) +++ return OPTIMIZE (avx2); +++ } ++ ++ if (CPU_FEATURES_ARCH_P (cpu_features, Fast_Unaligned_Load)) ++ return OPTIMIZE (sse2_unaligned); ++diff --git a/sysdeps/x86_64/multiarch/strcpy-avx2-rtm.S b/sysdeps/x86_64/multiarch/strcpy-avx2-rtm.S ++new file mode 100644 ++index 0000000000..c2c581ecf7 ++--- /dev/null +++++ b/sysdeps/x86_64/multiarch/strcpy-avx2-rtm.S ++@@ -0,0 +1,12 @@ +++#ifndef STRCPY +++# define STRCPY __strcpy_avx2_rtm +++#endif +++ +++#define ZERO_UPPER_VEC_REGISTERS_RETURN \ +++ ZERO_UPPER_VEC_REGISTERS_RETURN_XTEST +++ +++#define VZEROUPPER_RETURN jmp L(return_vzeroupper) +++ +++#define SECTION(p) p##.avx.rtm +++ +++#include "strcpy-avx2.S" ++diff --git a/sysdeps/x86_64/multiarch/strcpy-avx2.S b/sysdeps/x86_64/multiarch/strcpy-avx2.S ++index 3f2f9e8170..1ce17253ab 100644 ++--- a/sysdeps/x86_64/multiarch/strcpy-avx2.S +++++ b/sysdeps/x86_64/multiarch/strcpy-avx2.S ++@@ -37,6 +37,10 @@ ++ # define VZEROUPPER vzeroupper ++ # endif ++ +++# ifndef SECTION +++# define SECTION(p) p##.avx +++# endif +++ ++ /* zero register */ ++ #define xmmZ xmm0 ++ #define ymmZ ymm0 ++@@ -46,7 +50,7 @@ ++ ++ # ifndef USE_AS_STRCAT ++ ++- .section .text.avx,"ax",@progbits +++ .section SECTION(.text),"ax",@progbits ++ ENTRY (STRCPY) ++ # ifdef USE_AS_STRNCPY ++ mov %RDX_LP, %R8_LP ++@@ -369,8 +373,8 @@ L(CopyVecSizeExit): ++ lea 1(%rdi), %rdi ++ jnz L(StrncpyFillTailWithZero) ++ # endif ++- VZEROUPPER ++- ret +++L(return_vzeroupper): +++ ZERO_UPPER_VEC_REGISTERS_RETURN ++ ++ .p2align 4 ++ L(CopyTwoVecSize1): ++@@ -553,8 +557,7 @@ L(Exit1): ++ lea 2(%rdi), %rdi ++ jnz L(StrncpyFillTailWithZero) ++ # endif ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ ++ .p2align 4 ++ L(Exit2): ++@@ -569,8 +572,7 @@ L(Exit2): ++ lea 3(%rdi), %rdi ++ jnz L(StrncpyFillTailWithZero) ++ # endif ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ ++ .p2align 4 ++ L(Exit3): ++@@ -584,8 +586,7 @@ L(Exit3): ++ lea 4(%rdi), %rdi ++ jnz L(StrncpyFillTailWithZero) ++ # endif ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ ++ .p2align 4 ++ L(Exit4_7): ++@@ -602,8 +603,7 @@ L(Exit4_7): ++ lea 1(%rdi, %rdx), %rdi ++ jnz L(StrncpyFillTailWithZero) ++ # endif ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ ++ .p2align 4 ++ L(Exit8_15): ++@@ -620,8 +620,7 @@ L(Exit8_15): ++ lea 1(%rdi, %rdx), %rdi ++ jnz L(StrncpyFillTailWithZero) ++ # endif ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ ++ .p2align 4 ++ L(Exit16_31): ++@@ -638,8 +637,7 @@ L(Exit16_31): ++ lea 1(%rdi, %rdx), %rdi ++ jnz L(StrncpyFillTailWithZero) ++ # endif ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ ++ .p2align 4 ++ L(Exit32_63): ++@@ -656,8 +654,7 @@ L(Exit32_63): ++ lea 1(%rdi, %rdx), %rdi ++ jnz L(StrncpyFillTailWithZero) ++ # endif ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ ++ # ifdef USE_AS_STRNCPY ++ ++@@ -671,8 +668,7 @@ L(StrncpyExit1): ++ # ifdef USE_AS_STRCAT ++ movb $0, 1(%rdi) ++ # endif ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ ++ .p2align 4 ++ L(StrncpyExit2): ++@@ -684,8 +680,7 @@ L(StrncpyExit2): ++ # ifdef USE_AS_STRCAT ++ movb $0, 2(%rdi) ++ # endif ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ ++ .p2align 4 ++ L(StrncpyExit3_4): ++@@ -699,8 +694,7 @@ L(StrncpyExit3_4): ++ # ifdef USE_AS_STRCAT ++ movb $0, (%rdi, %r8) ++ # endif ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ ++ .p2align 4 ++ L(StrncpyExit5_8): ++@@ -714,8 +708,7 @@ L(StrncpyExit5_8): ++ # ifdef USE_AS_STRCAT ++ movb $0, (%rdi, %r8) ++ # endif ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ ++ .p2align 4 ++ L(StrncpyExit9_16): ++@@ -729,8 +722,7 @@ L(StrncpyExit9_16): ++ # ifdef USE_AS_STRCAT ++ movb $0, (%rdi, %r8) ++ # endif ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ ++ .p2align 4 ++ L(StrncpyExit17_32): ++@@ -744,8 +736,7 @@ L(StrncpyExit17_32): ++ # ifdef USE_AS_STRCAT ++ movb $0, (%rdi, %r8) ++ # endif ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ ++ .p2align 4 ++ L(StrncpyExit33_64): ++@@ -760,8 +751,7 @@ L(StrncpyExit33_64): ++ # ifdef USE_AS_STRCAT ++ movb $0, (%rdi, %r8) ++ # endif ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ ++ .p2align 4 ++ L(StrncpyExit65): ++@@ -778,50 +768,43 @@ L(StrncpyExit65): ++ # ifdef USE_AS_STRCAT ++ movb $0, 65(%rdi) ++ # endif ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ ++ # ifndef USE_AS_STRCAT ++ ++ .p2align 4 ++ L(Fill1): ++ mov %dl, (%rdi) ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ ++ .p2align 4 ++ L(Fill2): ++ mov %dx, (%rdi) ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ ++ .p2align 4 ++ L(Fill3_4): ++ mov %dx, (%rdi) ++ mov %dx, -2(%rdi, %r8) ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ ++ .p2align 4 ++ L(Fill5_8): ++ mov %edx, (%rdi) ++ mov %edx, -4(%rdi, %r8) ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ ++ .p2align 4 ++ L(Fill9_16): ++ mov %rdx, (%rdi) ++ mov %rdx, -8(%rdi, %r8) ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ ++ .p2align 4 ++ L(Fill17_32): ++ vmovdqu %xmmZ, (%rdi) ++ vmovdqu %xmmZ, -16(%rdi, %r8) ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ ++ .p2align 4 ++ L(CopyVecSizeUnalignedVec2): ++@@ -898,8 +881,7 @@ L(Fill): ++ cmp $1, %r8d ++ ja L(Fill2) ++ je L(Fill1) ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ ++ /* end of ifndef USE_AS_STRCAT */ ++ # endif ++@@ -929,8 +911,7 @@ L(UnalignedFourVecSizeLeaveCase3): ++ # ifdef USE_AS_STRCAT ++ movb $0, (VEC_SIZE * 4)(%rdi) ++ # endif ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ ++ .p2align 4 ++ L(UnalignedFourVecSizeLeaveCase2): ++@@ -1001,16 +982,14 @@ L(StrncpyExit): ++ # ifdef USE_AS_STRCAT ++ movb $0, (%rdi) ++ # endif ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ ++ .p2align 4 ++ L(ExitZero): ++ # ifndef USE_AS_STRCAT ++ mov %rdi, %rax ++ # endif ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ ++ # endif ++ ++diff --git a/sysdeps/x86_64/multiarch/strcpy-evex.S b/sysdeps/x86_64/multiarch/strcpy-evex.S ++new file mode 100644 ++index 0000000000..a343a1a692 ++--- /dev/null +++++ b/sysdeps/x86_64/multiarch/strcpy-evex.S ++@@ -0,0 +1,1003 @@ +++/* strcpy with 256-bit EVEX instructions. +++ Copyright (C) 2021 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 +++ . */ +++ +++#if IS_IN (libc) +++ +++# ifndef USE_AS_STRCAT +++# include +++ +++# ifndef STRCPY +++# define STRCPY __strcpy_evex +++# endif +++ +++# endif +++ +++# define VMOVU vmovdqu64 +++# define VMOVA vmovdqa64 +++ +++/* Number of bytes in a vector register */ +++# ifndef VEC_SIZE +++# define VEC_SIZE 32 +++# endif +++ +++# define XMM2 xmm18 +++# define XMM3 xmm19 +++ +++# define YMM2 ymm18 +++# define YMM3 ymm19 +++# define YMM4 ymm20 +++# define YMM5 ymm21 +++# define YMM6 ymm22 +++# define YMM7 ymm23 +++ +++# ifndef USE_AS_STRCAT +++ +++/* zero register */ +++# define XMMZERO xmm16 +++# define YMMZERO ymm16 +++# define YMM1 ymm17 +++ +++ .section .text.evex,"ax",@progbits +++ENTRY (STRCPY) +++# ifdef USE_AS_STRNCPY +++ mov %RDX_LP, %R8_LP +++ test %R8_LP, %R8_LP +++ jz L(ExitZero) +++# endif +++ mov %rsi, %rcx +++# ifndef USE_AS_STPCPY +++ mov %rdi, %rax /* save result */ +++# endif +++ +++ vpxorq %XMMZERO, %XMMZERO, %XMMZERO +++# endif +++ +++ and $((VEC_SIZE * 4) - 1), %ecx +++ cmp $(VEC_SIZE * 2), %ecx +++ jbe L(SourceStringAlignmentLessTwoVecSize) +++ +++ and $-VEC_SIZE, %rsi +++ and $(VEC_SIZE - 1), %ecx +++ +++ vpcmpb $0, (%rsi), %YMMZERO, %k0 +++ kmovd %k0, %edx +++ shr %cl, %rdx +++ +++# ifdef USE_AS_STRNCPY +++# if defined USE_AS_STPCPY || defined USE_AS_STRCAT +++ mov $VEC_SIZE, %r10 +++ sub %rcx, %r10 +++ cmp %r10, %r8 +++# else +++ mov $(VEC_SIZE + 1), %r10 +++ sub %rcx, %r10 +++ cmp %r10, %r8 +++# endif +++ jbe L(CopyVecSizeTailCase2OrCase3) +++# endif +++ test %edx, %edx +++ jnz L(CopyVecSizeTail) +++ +++ vpcmpb $0, VEC_SIZE(%rsi), %YMMZERO, %k1 +++ kmovd %k1, %edx +++ +++# ifdef USE_AS_STRNCPY +++ add $VEC_SIZE, %r10 +++ cmp %r10, %r8 +++ jbe L(CopyTwoVecSizeCase2OrCase3) +++# endif +++ test %edx, %edx +++ jnz L(CopyTwoVecSize) +++ +++ VMOVU (%rsi, %rcx), %YMM2 /* copy VEC_SIZE bytes */ +++ VMOVU %YMM2, (%rdi) +++ +++/* If source address alignment != destination address alignment */ +++ .p2align 4 +++L(UnalignVecSizeBoth): +++ sub %rcx, %rdi +++# ifdef USE_AS_STRNCPY +++ add %rcx, %r8 +++ sbb %rcx, %rcx +++ or %rcx, %r8 +++# endif +++ mov $VEC_SIZE, %rcx +++ VMOVA (%rsi, %rcx), %YMM2 +++ VMOVU %YMM2, (%rdi, %rcx) +++ VMOVA VEC_SIZE(%rsi, %rcx), %YMM2 +++ vpcmpb $0, %YMM2, %YMMZERO, %k0 +++ kmovd %k0, %edx +++ add $VEC_SIZE, %rcx +++# ifdef USE_AS_STRNCPY +++ sub $(VEC_SIZE * 3), %r8 +++ jbe L(CopyVecSizeCase2OrCase3) +++# endif +++ test %edx, %edx +++# if defined USE_AS_STRNCPY && !defined USE_AS_STRCAT +++ jnz L(CopyVecSizeUnalignedVec2) +++# else +++ jnz L(CopyVecSize) +++# endif +++ +++ VMOVU %YMM2, (%rdi, %rcx) +++ VMOVA VEC_SIZE(%rsi, %rcx), %YMM3 +++ vpcmpb $0, %YMM3, %YMMZERO, %k0 +++ kmovd %k0, %edx +++ add $VEC_SIZE, %rcx +++# ifdef USE_AS_STRNCPY +++ sub $VEC_SIZE, %r8 +++ jbe L(CopyVecSizeCase2OrCase3) +++# endif +++ test %edx, %edx +++# if defined USE_AS_STRNCPY && !defined USE_AS_STRCAT +++ jnz L(CopyVecSizeUnalignedVec3) +++# else +++ jnz L(CopyVecSize) +++# endif +++ +++ VMOVU %YMM3, (%rdi, %rcx) +++ VMOVA VEC_SIZE(%rsi, %rcx), %YMM4 +++ vpcmpb $0, %YMM4, %YMMZERO, %k0 +++ kmovd %k0, %edx +++ add $VEC_SIZE, %rcx +++# ifdef USE_AS_STRNCPY +++ sub $VEC_SIZE, %r8 +++ jbe L(CopyVecSizeCase2OrCase3) +++# endif +++ test %edx, %edx +++# if defined USE_AS_STRNCPY && !defined USE_AS_STRCAT +++ jnz L(CopyVecSizeUnalignedVec4) +++# else +++ jnz L(CopyVecSize) +++# endif +++ +++ VMOVU %YMM4, (%rdi, %rcx) +++ VMOVA VEC_SIZE(%rsi, %rcx), %YMM2 +++ vpcmpb $0, %YMM2, %YMMZERO, %k0 +++ kmovd %k0, %edx +++ add $VEC_SIZE, %rcx +++# ifdef USE_AS_STRNCPY +++ sub $VEC_SIZE, %r8 +++ jbe L(CopyVecSizeCase2OrCase3) +++# endif +++ test %edx, %edx +++# if defined USE_AS_STRNCPY && !defined USE_AS_STRCAT +++ jnz L(CopyVecSizeUnalignedVec2) +++# else +++ jnz L(CopyVecSize) +++# endif +++ +++ VMOVU %YMM2, (%rdi, %rcx) +++ VMOVA VEC_SIZE(%rsi, %rcx), %YMM2 +++ vpcmpb $0, %YMM2, %YMMZERO, %k0 +++ kmovd %k0, %edx +++ add $VEC_SIZE, %rcx +++# ifdef USE_AS_STRNCPY +++ sub $VEC_SIZE, %r8 +++ jbe L(CopyVecSizeCase2OrCase3) +++# endif +++ test %edx, %edx +++# if defined USE_AS_STRNCPY && !defined USE_AS_STRCAT +++ jnz L(CopyVecSizeUnalignedVec2) +++# else +++ jnz L(CopyVecSize) +++# endif +++ +++ VMOVA VEC_SIZE(%rsi, %rcx), %YMM3 +++ VMOVU %YMM2, (%rdi, %rcx) +++ vpcmpb $0, %YMM3, %YMMZERO, %k0 +++ kmovd %k0, %edx +++ add $VEC_SIZE, %rcx +++# ifdef USE_AS_STRNCPY +++ sub $VEC_SIZE, %r8 +++ jbe L(CopyVecSizeCase2OrCase3) +++# endif +++ test %edx, %edx +++# if defined USE_AS_STRNCPY && !defined USE_AS_STRCAT +++ jnz L(CopyVecSizeUnalignedVec3) +++# else +++ jnz L(CopyVecSize) +++# endif +++ +++ VMOVU %YMM3, (%rdi, %rcx) +++ mov %rsi, %rdx +++ lea VEC_SIZE(%rsi, %rcx), %rsi +++ and $-(VEC_SIZE * 4), %rsi +++ sub %rsi, %rdx +++ sub %rdx, %rdi +++# ifdef USE_AS_STRNCPY +++ lea (VEC_SIZE * 8)(%r8, %rdx), %r8 +++# endif +++L(UnalignedFourVecSizeLoop): +++ VMOVA (%rsi), %YMM4 +++ VMOVA VEC_SIZE(%rsi), %YMM5 +++ VMOVA (VEC_SIZE * 2)(%rsi), %YMM6 +++ VMOVA (VEC_SIZE * 3)(%rsi), %YMM7 +++ vpminub %YMM5, %YMM4, %YMM2 +++ vpminub %YMM7, %YMM6, %YMM3 +++ vpminub %YMM2, %YMM3, %YMM2 +++ /* If K7 != 0, there is a null byte. */ +++ vpcmpb $0, %YMM2, %YMMZERO, %k7 +++ kmovd %k7, %edx +++# ifdef USE_AS_STRNCPY +++ sub $(VEC_SIZE * 4), %r8 +++ jbe L(UnalignedLeaveCase2OrCase3) +++# endif +++ test %edx, %edx +++ jnz L(UnalignedFourVecSizeLeave) +++ +++L(UnalignedFourVecSizeLoop_start): +++ add $(VEC_SIZE * 4), %rdi +++ add $(VEC_SIZE * 4), %rsi +++ VMOVU %YMM4, -(VEC_SIZE * 4)(%rdi) +++ VMOVA (%rsi), %YMM4 +++ VMOVU %YMM5, -(VEC_SIZE * 3)(%rdi) +++ VMOVA VEC_SIZE(%rsi), %YMM5 +++ vpminub %YMM5, %YMM4, %YMM2 +++ VMOVU %YMM6, -(VEC_SIZE * 2)(%rdi) +++ VMOVA (VEC_SIZE * 2)(%rsi), %YMM6 +++ VMOVU %YMM7, -VEC_SIZE(%rdi) +++ VMOVA (VEC_SIZE * 3)(%rsi), %YMM7 +++ vpminub %YMM7, %YMM6, %YMM3 +++ vpminub %YMM2, %YMM3, %YMM2 +++ /* If K7 != 0, there is a null byte. */ +++ vpcmpb $0, %YMM2, %YMMZERO, %k7 +++ kmovd %k7, %edx +++# ifdef USE_AS_STRNCPY +++ sub $(VEC_SIZE * 4), %r8 +++ jbe L(UnalignedLeaveCase2OrCase3) +++# endif +++ test %edx, %edx +++ jz L(UnalignedFourVecSizeLoop_start) +++ +++L(UnalignedFourVecSizeLeave): +++ vpcmpb $0, %YMM4, %YMMZERO, %k1 +++ kmovd %k1, %edx +++ test %edx, %edx +++ jnz L(CopyVecSizeUnaligned_0) +++ +++ vpcmpb $0, %YMM5, %YMMZERO, %k2 +++ kmovd %k2, %ecx +++ test %ecx, %ecx +++ jnz L(CopyVecSizeUnaligned_16) +++ +++ vpcmpb $0, %YMM6, %YMMZERO, %k3 +++ kmovd %k3, %edx +++ test %edx, %edx +++ jnz L(CopyVecSizeUnaligned_32) +++ +++ vpcmpb $0, %YMM7, %YMMZERO, %k4 +++ kmovd %k4, %ecx +++ bsf %ecx, %edx +++ VMOVU %YMM4, (%rdi) +++ VMOVU %YMM5, VEC_SIZE(%rdi) +++ VMOVU %YMM6, (VEC_SIZE * 2)(%rdi) +++# if defined USE_AS_STRNCPY && !defined USE_AS_STRCAT +++# ifdef USE_AS_STPCPY +++ lea (VEC_SIZE * 3)(%rdi, %rdx), %rax +++# endif +++ VMOVU %YMM7, (VEC_SIZE * 3)(%rdi) +++ add $(VEC_SIZE - 1), %r8 +++ sub %rdx, %r8 +++ lea ((VEC_SIZE * 3) + 1)(%rdi, %rdx), %rdi +++ jmp L(StrncpyFillTailWithZero) +++# else +++ add $(VEC_SIZE * 3), %rsi +++ add $(VEC_SIZE * 3), %rdi +++ jmp L(CopyVecSizeExit) +++# endif +++ +++/* If source address alignment == destination address alignment */ +++ +++L(SourceStringAlignmentLessTwoVecSize): +++ VMOVU (%rsi), %YMM3 +++ VMOVU VEC_SIZE(%rsi), %YMM2 +++ vpcmpb $0, %YMM3, %YMMZERO, %k0 +++ kmovd %k0, %edx +++ +++# ifdef USE_AS_STRNCPY +++# if defined USE_AS_STPCPY || defined USE_AS_STRCAT +++ cmp $VEC_SIZE, %r8 +++# else +++ cmp $(VEC_SIZE + 1), %r8 +++# endif +++ jbe L(CopyVecSizeTail1Case2OrCase3) +++# endif +++ test %edx, %edx +++ jnz L(CopyVecSizeTail1) +++ +++ VMOVU %YMM3, (%rdi) +++ vpcmpb $0, %YMM2, %YMMZERO, %k0 +++ kmovd %k0, %edx +++ +++# ifdef USE_AS_STRNCPY +++# if defined USE_AS_STPCPY || defined USE_AS_STRCAT +++ cmp $(VEC_SIZE * 2), %r8 +++# else +++ cmp $((VEC_SIZE * 2) + 1), %r8 +++# endif +++ jbe L(CopyTwoVecSize1Case2OrCase3) +++# endif +++ test %edx, %edx +++ jnz L(CopyTwoVecSize1) +++ +++ and $-VEC_SIZE, %rsi +++ and $(VEC_SIZE - 1), %ecx +++ jmp L(UnalignVecSizeBoth) +++ +++/*------End of main part with loops---------------------*/ +++ +++/* Case1 */ +++ +++# if (!defined USE_AS_STRNCPY) || (defined USE_AS_STRCAT) +++ .p2align 4 +++L(CopyVecSize): +++ add %rcx, %rdi +++# endif +++L(CopyVecSizeTail): +++ add %rcx, %rsi +++L(CopyVecSizeTail1): +++ bsf %edx, %edx +++L(CopyVecSizeExit): +++ cmp $32, %edx +++ jae L(Exit32_63) +++ cmp $16, %edx +++ jae L(Exit16_31) +++ cmp $8, %edx +++ jae L(Exit8_15) +++ cmp $4, %edx +++ jae L(Exit4_7) +++ cmp $3, %edx +++ je L(Exit3) +++ cmp $1, %edx +++ ja L(Exit2) +++ je L(Exit1) +++ movb $0, (%rdi) +++# ifdef USE_AS_STPCPY +++ lea (%rdi), %rax +++# endif +++# if defined USE_AS_STRNCPY && !defined USE_AS_STRCAT +++ sub $1, %r8 +++ lea 1(%rdi), %rdi +++ jnz L(StrncpyFillTailWithZero) +++# endif +++ ret +++ +++ .p2align 4 +++L(CopyTwoVecSize1): +++ add $VEC_SIZE, %rsi +++ add $VEC_SIZE, %rdi +++# if defined USE_AS_STRNCPY && !defined USE_AS_STRCAT +++ sub $VEC_SIZE, %r8 +++# endif +++ jmp L(CopyVecSizeTail1) +++ +++ .p2align 4 +++L(CopyTwoVecSize): +++ bsf %edx, %edx +++ add %rcx, %rsi +++ add $VEC_SIZE, %edx +++ sub %ecx, %edx +++ jmp L(CopyVecSizeExit) +++ +++ .p2align 4 +++L(CopyVecSizeUnaligned_0): +++ bsf %edx, %edx +++# if defined USE_AS_STRNCPY && !defined USE_AS_STRCAT +++# ifdef USE_AS_STPCPY +++ lea (%rdi, %rdx), %rax +++# endif +++ VMOVU %YMM4, (%rdi) +++ add $((VEC_SIZE * 4) - 1), %r8 +++ sub %rdx, %r8 +++ lea 1(%rdi, %rdx), %rdi +++ jmp L(StrncpyFillTailWithZero) +++# else +++ jmp L(CopyVecSizeExit) +++# endif +++ +++ .p2align 4 +++L(CopyVecSizeUnaligned_16): +++ bsf %ecx, %edx +++ VMOVU %YMM4, (%rdi) +++# if defined USE_AS_STRNCPY && !defined USE_AS_STRCAT +++# ifdef USE_AS_STPCPY +++ lea VEC_SIZE(%rdi, %rdx), %rax +++# endif +++ VMOVU %YMM5, VEC_SIZE(%rdi) +++ add $((VEC_SIZE * 3) - 1), %r8 +++ sub %rdx, %r8 +++ lea (VEC_SIZE + 1)(%rdi, %rdx), %rdi +++ jmp L(StrncpyFillTailWithZero) +++# else +++ add $VEC_SIZE, %rsi +++ add $VEC_SIZE, %rdi +++ jmp L(CopyVecSizeExit) +++# endif +++ +++ .p2align 4 +++L(CopyVecSizeUnaligned_32): +++ bsf %edx, %edx +++ VMOVU %YMM4, (%rdi) +++ VMOVU %YMM5, VEC_SIZE(%rdi) +++# if defined USE_AS_STRNCPY && !defined USE_AS_STRCAT +++# ifdef USE_AS_STPCPY +++ lea (VEC_SIZE * 2)(%rdi, %rdx), %rax +++# endif +++ VMOVU %YMM6, (VEC_SIZE * 2)(%rdi) +++ add $((VEC_SIZE * 2) - 1), %r8 +++ sub %rdx, %r8 +++ lea ((VEC_SIZE * 2) + 1)(%rdi, %rdx), %rdi +++ jmp L(StrncpyFillTailWithZero) +++# else +++ add $(VEC_SIZE * 2), %rsi +++ add $(VEC_SIZE * 2), %rdi +++ jmp L(CopyVecSizeExit) +++# endif +++ +++# ifdef USE_AS_STRNCPY +++# ifndef USE_AS_STRCAT +++ .p2align 4 +++L(CopyVecSizeUnalignedVec6): +++ VMOVU %YMM6, (%rdi, %rcx) +++ jmp L(CopyVecSizeVecExit) +++ +++ .p2align 4 +++L(CopyVecSizeUnalignedVec5): +++ VMOVU %YMM5, (%rdi, %rcx) +++ jmp L(CopyVecSizeVecExit) +++ +++ .p2align 4 +++L(CopyVecSizeUnalignedVec4): +++ VMOVU %YMM4, (%rdi, %rcx) +++ jmp L(CopyVecSizeVecExit) +++ +++ .p2align 4 +++L(CopyVecSizeUnalignedVec3): +++ VMOVU %YMM3, (%rdi, %rcx) +++ jmp L(CopyVecSizeVecExit) +++# endif +++ +++/* Case2 */ +++ +++ .p2align 4 +++L(CopyVecSizeCase2): +++ add $VEC_SIZE, %r8 +++ add %rcx, %rdi +++ add %rcx, %rsi +++ bsf %edx, %edx +++ cmp %r8d, %edx +++ jb L(CopyVecSizeExit) +++ jmp L(StrncpyExit) +++ +++ .p2align 4 +++L(CopyTwoVecSizeCase2): +++ add %rcx, %rsi +++ bsf %edx, %edx +++ add $VEC_SIZE, %edx +++ sub %ecx, %edx +++ cmp %r8d, %edx +++ jb L(CopyVecSizeExit) +++ jmp L(StrncpyExit) +++ +++L(CopyVecSizeTailCase2): +++ add %rcx, %rsi +++ bsf %edx, %edx +++ cmp %r8d, %edx +++ jb L(CopyVecSizeExit) +++ jmp L(StrncpyExit) +++ +++L(CopyVecSizeTail1Case2): +++ bsf %edx, %edx +++ cmp %r8d, %edx +++ jb L(CopyVecSizeExit) +++ jmp L(StrncpyExit) +++ +++/* Case2 or Case3, Case3 */ +++ +++ .p2align 4 +++L(CopyVecSizeCase2OrCase3): +++ test %rdx, %rdx +++ jnz L(CopyVecSizeCase2) +++L(CopyVecSizeCase3): +++ add $VEC_SIZE, %r8 +++ add %rcx, %rdi +++ add %rcx, %rsi +++ jmp L(StrncpyExit) +++ +++ .p2align 4 +++L(CopyTwoVecSizeCase2OrCase3): +++ test %rdx, %rdx +++ jnz L(CopyTwoVecSizeCase2) +++ add %rcx, %rsi +++ jmp L(StrncpyExit) +++ +++ .p2align 4 +++L(CopyVecSizeTailCase2OrCase3): +++ test %rdx, %rdx +++ jnz L(CopyVecSizeTailCase2) +++ add %rcx, %rsi +++ jmp L(StrncpyExit) +++ +++ .p2align 4 +++L(CopyTwoVecSize1Case2OrCase3): +++ add $VEC_SIZE, %rdi +++ add $VEC_SIZE, %rsi +++ sub $VEC_SIZE, %r8 +++L(CopyVecSizeTail1Case2OrCase3): +++ test %rdx, %rdx +++ jnz L(CopyVecSizeTail1Case2) +++ jmp L(StrncpyExit) +++# endif +++ +++/*------------End labels regarding with copying 1-VEC_SIZE bytes--and 1-(VEC_SIZE*2) bytes----*/ +++ +++ .p2align 4 +++L(Exit1): +++ movzwl (%rsi), %edx +++ mov %dx, (%rdi) +++# ifdef USE_AS_STPCPY +++ lea 1(%rdi), %rax +++# endif +++# if defined USE_AS_STRNCPY && !defined USE_AS_STRCAT +++ sub $2, %r8 +++ lea 2(%rdi), %rdi +++ jnz L(StrncpyFillTailWithZero) +++# endif +++ ret +++ +++ .p2align 4 +++L(Exit2): +++ movzwl (%rsi), %ecx +++ mov %cx, (%rdi) +++ movb $0, 2(%rdi) +++# ifdef USE_AS_STPCPY +++ lea 2(%rdi), %rax +++# endif +++# if defined USE_AS_STRNCPY && !defined USE_AS_STRCAT +++ sub $3, %r8 +++ lea 3(%rdi), %rdi +++ jnz L(StrncpyFillTailWithZero) +++# endif +++ ret +++ +++ .p2align 4 +++L(Exit3): +++ mov (%rsi), %edx +++ mov %edx, (%rdi) +++# ifdef USE_AS_STPCPY +++ lea 3(%rdi), %rax +++# endif +++# if defined USE_AS_STRNCPY && !defined USE_AS_STRCAT +++ sub $4, %r8 +++ lea 4(%rdi), %rdi +++ jnz L(StrncpyFillTailWithZero) +++# endif +++ ret +++ +++ .p2align 4 +++L(Exit4_7): +++ mov (%rsi), %ecx +++ mov %ecx, (%rdi) +++ mov -3(%rsi, %rdx), %ecx +++ mov %ecx, -3(%rdi, %rdx) +++# ifdef USE_AS_STPCPY +++ lea (%rdi, %rdx), %rax +++# endif +++# if defined USE_AS_STRNCPY && !defined USE_AS_STRCAT +++ sub %rdx, %r8 +++ sub $1, %r8 +++ lea 1(%rdi, %rdx), %rdi +++ jnz L(StrncpyFillTailWithZero) +++# endif +++ ret +++ +++ .p2align 4 +++L(Exit8_15): +++ mov (%rsi), %rcx +++ mov -7(%rsi, %rdx), %r9 +++ mov %rcx, (%rdi) +++ mov %r9, -7(%rdi, %rdx) +++# ifdef USE_AS_STPCPY +++ lea (%rdi, %rdx), %rax +++# endif +++# if defined USE_AS_STRNCPY && !defined USE_AS_STRCAT +++ sub %rdx, %r8 +++ sub $1, %r8 +++ lea 1(%rdi, %rdx), %rdi +++ jnz L(StrncpyFillTailWithZero) +++# endif +++ ret +++ +++ .p2align 4 +++L(Exit16_31): +++ VMOVU (%rsi), %XMM2 +++ VMOVU -15(%rsi, %rdx), %XMM3 +++ VMOVU %XMM2, (%rdi) +++ VMOVU %XMM3, -15(%rdi, %rdx) +++# ifdef USE_AS_STPCPY +++ lea (%rdi, %rdx), %rax +++# endif +++# if defined USE_AS_STRNCPY && !defined USE_AS_STRCAT +++ sub %rdx, %r8 +++ sub $1, %r8 +++ lea 1(%rdi, %rdx), %rdi +++ jnz L(StrncpyFillTailWithZero) +++# endif +++ ret +++ +++ .p2align 4 +++L(Exit32_63): +++ VMOVU (%rsi), %YMM2 +++ VMOVU -31(%rsi, %rdx), %YMM3 +++ VMOVU %YMM2, (%rdi) +++ VMOVU %YMM3, -31(%rdi, %rdx) +++# ifdef USE_AS_STPCPY +++ lea (%rdi, %rdx), %rax +++# endif +++# if defined USE_AS_STRNCPY && !defined USE_AS_STRCAT +++ sub %rdx, %r8 +++ sub $1, %r8 +++ lea 1(%rdi, %rdx), %rdi +++ jnz L(StrncpyFillTailWithZero) +++# endif +++ ret +++ +++# ifdef USE_AS_STRNCPY +++ +++ .p2align 4 +++L(StrncpyExit1): +++ movzbl (%rsi), %edx +++ mov %dl, (%rdi) +++# ifdef USE_AS_STPCPY +++ lea 1(%rdi), %rax +++# endif +++# ifdef USE_AS_STRCAT +++ movb $0, 1(%rdi) +++# endif +++ ret +++ +++ .p2align 4 +++L(StrncpyExit2): +++ movzwl (%rsi), %edx +++ mov %dx, (%rdi) +++# ifdef USE_AS_STPCPY +++ lea 2(%rdi), %rax +++# endif +++# ifdef USE_AS_STRCAT +++ movb $0, 2(%rdi) +++# endif +++ ret +++ +++ .p2align 4 +++L(StrncpyExit3_4): +++ movzwl (%rsi), %ecx +++ movzwl -2(%rsi, %r8), %edx +++ mov %cx, (%rdi) +++ mov %dx, -2(%rdi, %r8) +++# ifdef USE_AS_STPCPY +++ lea (%rdi, %r8), %rax +++# endif +++# ifdef USE_AS_STRCAT +++ movb $0, (%rdi, %r8) +++# endif +++ ret +++ +++ .p2align 4 +++L(StrncpyExit5_8): +++ mov (%rsi), %ecx +++ mov -4(%rsi, %r8), %edx +++ mov %ecx, (%rdi) +++ mov %edx, -4(%rdi, %r8) +++# ifdef USE_AS_STPCPY +++ lea (%rdi, %r8), %rax +++# endif +++# ifdef USE_AS_STRCAT +++ movb $0, (%rdi, %r8) +++# endif +++ ret +++ +++ .p2align 4 +++L(StrncpyExit9_16): +++ mov (%rsi), %rcx +++ mov -8(%rsi, %r8), %rdx +++ mov %rcx, (%rdi) +++ mov %rdx, -8(%rdi, %r8) +++# ifdef USE_AS_STPCPY +++ lea (%rdi, %r8), %rax +++# endif +++# ifdef USE_AS_STRCAT +++ movb $0, (%rdi, %r8) +++# endif +++ ret +++ +++ .p2align 4 +++L(StrncpyExit17_32): +++ VMOVU (%rsi), %XMM2 +++ VMOVU -16(%rsi, %r8), %XMM3 +++ VMOVU %XMM2, (%rdi) +++ VMOVU %XMM3, -16(%rdi, %r8) +++# ifdef USE_AS_STPCPY +++ lea (%rdi, %r8), %rax +++# endif +++# ifdef USE_AS_STRCAT +++ movb $0, (%rdi, %r8) +++# endif +++ ret +++ +++ .p2align 4 +++L(StrncpyExit33_64): +++ /* 0/32, 31/16 */ +++ VMOVU (%rsi), %YMM2 +++ VMOVU -VEC_SIZE(%rsi, %r8), %YMM3 +++ VMOVU %YMM2, (%rdi) +++ VMOVU %YMM3, -VEC_SIZE(%rdi, %r8) +++# ifdef USE_AS_STPCPY +++ lea (%rdi, %r8), %rax +++# endif +++# ifdef USE_AS_STRCAT +++ movb $0, (%rdi, %r8) +++# endif +++ ret +++ +++ .p2align 4 +++L(StrncpyExit65): +++ /* 0/32, 32/32, 64/1 */ +++ VMOVU (%rsi), %YMM2 +++ VMOVU 32(%rsi), %YMM3 +++ mov 64(%rsi), %cl +++ VMOVU %YMM2, (%rdi) +++ VMOVU %YMM3, 32(%rdi) +++ mov %cl, 64(%rdi) +++# ifdef USE_AS_STPCPY +++ lea 65(%rdi), %rax +++# endif +++# ifdef USE_AS_STRCAT +++ movb $0, 65(%rdi) +++# endif +++ ret +++ +++# ifndef USE_AS_STRCAT +++ +++ .p2align 4 +++L(Fill1): +++ mov %dl, (%rdi) +++ ret +++ +++ .p2align 4 +++L(Fill2): +++ mov %dx, (%rdi) +++ ret +++ +++ .p2align 4 +++L(Fill3_4): +++ mov %dx, (%rdi) +++ mov %dx, -2(%rdi, %r8) +++ ret +++ +++ .p2align 4 +++L(Fill5_8): +++ mov %edx, (%rdi) +++ mov %edx, -4(%rdi, %r8) +++ ret +++ +++ .p2align 4 +++L(Fill9_16): +++ mov %rdx, (%rdi) +++ mov %rdx, -8(%rdi, %r8) +++ ret +++ +++ .p2align 4 +++L(Fill17_32): +++ VMOVU %XMMZERO, (%rdi) +++ VMOVU %XMMZERO, -16(%rdi, %r8) +++ ret +++ +++ .p2align 4 +++L(CopyVecSizeUnalignedVec2): +++ VMOVU %YMM2, (%rdi, %rcx) +++ +++ .p2align 4 +++L(CopyVecSizeVecExit): +++ bsf %edx, %edx +++ add $(VEC_SIZE - 1), %r8 +++ add %rcx, %rdi +++# ifdef USE_AS_STPCPY +++ lea (%rdi, %rdx), %rax +++# endif +++ sub %rdx, %r8 +++ lea 1(%rdi, %rdx), %rdi +++ +++ .p2align 4 +++L(StrncpyFillTailWithZero): +++ xor %edx, %edx +++ sub $VEC_SIZE, %r8 +++ jbe L(StrncpyFillExit) +++ +++ VMOVU %YMMZERO, (%rdi) +++ add $VEC_SIZE, %rdi +++ +++ mov %rdi, %rsi +++ and $(VEC_SIZE - 1), %esi +++ sub %rsi, %rdi +++ add %rsi, %r8 +++ sub $(VEC_SIZE * 4), %r8 +++ jb L(StrncpyFillLessFourVecSize) +++ +++L(StrncpyFillLoopVmovdqa): +++ VMOVA %YMMZERO, (%rdi) +++ VMOVA %YMMZERO, VEC_SIZE(%rdi) +++ VMOVA %YMMZERO, (VEC_SIZE * 2)(%rdi) +++ VMOVA %YMMZERO, (VEC_SIZE * 3)(%rdi) +++ add $(VEC_SIZE * 4), %rdi +++ sub $(VEC_SIZE * 4), %r8 +++ jae L(StrncpyFillLoopVmovdqa) +++ +++L(StrncpyFillLessFourVecSize): +++ add $(VEC_SIZE * 2), %r8 +++ jl L(StrncpyFillLessTwoVecSize) +++ VMOVA %YMMZERO, (%rdi) +++ VMOVA %YMMZERO, VEC_SIZE(%rdi) +++ add $(VEC_SIZE * 2), %rdi +++ sub $VEC_SIZE, %r8 +++ jl L(StrncpyFillExit) +++ VMOVA %YMMZERO, (%rdi) +++ add $VEC_SIZE, %rdi +++ jmp L(Fill) +++ +++ .p2align 4 +++L(StrncpyFillLessTwoVecSize): +++ add $VEC_SIZE, %r8 +++ jl L(StrncpyFillExit) +++ VMOVA %YMMZERO, (%rdi) +++ add $VEC_SIZE, %rdi +++ jmp L(Fill) +++ +++ .p2align 4 +++L(StrncpyFillExit): +++ add $VEC_SIZE, %r8 +++L(Fill): +++ cmp $17, %r8d +++ jae L(Fill17_32) +++ cmp $9, %r8d +++ jae L(Fill9_16) +++ cmp $5, %r8d +++ jae L(Fill5_8) +++ cmp $3, %r8d +++ jae L(Fill3_4) +++ cmp $1, %r8d +++ ja L(Fill2) +++ je L(Fill1) +++ ret +++ +++/* end of ifndef USE_AS_STRCAT */ +++# endif +++ +++ .p2align 4 +++L(UnalignedLeaveCase2OrCase3): +++ test %rdx, %rdx +++ jnz L(UnalignedFourVecSizeLeaveCase2) +++L(UnalignedFourVecSizeLeaveCase3): +++ lea (VEC_SIZE * 4)(%r8), %rcx +++ and $-VEC_SIZE, %rcx +++ add $(VEC_SIZE * 3), %r8 +++ jl L(CopyVecSizeCase3) +++ VMOVU %YMM4, (%rdi) +++ sub $VEC_SIZE, %r8 +++ jb L(CopyVecSizeCase3) +++ VMOVU %YMM5, VEC_SIZE(%rdi) +++ sub $VEC_SIZE, %r8 +++ jb L(CopyVecSizeCase3) +++ VMOVU %YMM6, (VEC_SIZE * 2)(%rdi) +++ sub $VEC_SIZE, %r8 +++ jb L(CopyVecSizeCase3) +++ VMOVU %YMM7, (VEC_SIZE * 3)(%rdi) +++# ifdef USE_AS_STPCPY +++ lea (VEC_SIZE * 4)(%rdi), %rax +++# endif +++# ifdef USE_AS_STRCAT +++ movb $0, (VEC_SIZE * 4)(%rdi) +++# endif +++ ret +++ +++ .p2align 4 +++L(UnalignedFourVecSizeLeaveCase2): +++ xor %ecx, %ecx +++ vpcmpb $0, %YMM4, %YMMZERO, %k1 +++ kmovd %k1, %edx +++ add $(VEC_SIZE * 3), %r8 +++ jle L(CopyVecSizeCase2OrCase3) +++ test %edx, %edx +++# ifndef USE_AS_STRCAT +++ jnz L(CopyVecSizeUnalignedVec4) +++# else +++ jnz L(CopyVecSize) +++# endif +++ vpcmpb $0, %YMM5, %YMMZERO, %k2 +++ kmovd %k2, %edx +++ VMOVU %YMM4, (%rdi) +++ add $VEC_SIZE, %rcx +++ sub $VEC_SIZE, %r8 +++ jbe L(CopyVecSizeCase2OrCase3) +++ test %edx, %edx +++# ifndef USE_AS_STRCAT +++ jnz L(CopyVecSizeUnalignedVec5) +++# else +++ jnz L(CopyVecSize) +++# endif +++ +++ vpcmpb $0, %YMM6, %YMMZERO, %k3 +++ kmovd %k3, %edx +++ VMOVU %YMM5, VEC_SIZE(%rdi) +++ add $VEC_SIZE, %rcx +++ sub $VEC_SIZE, %r8 +++ jbe L(CopyVecSizeCase2OrCase3) +++ test %edx, %edx +++# ifndef USE_AS_STRCAT +++ jnz L(CopyVecSizeUnalignedVec6) +++# else +++ jnz L(CopyVecSize) +++# endif +++ +++ vpcmpb $0, %YMM7, %YMMZERO, %k4 +++ kmovd %k4, %edx +++ VMOVU %YMM6, (VEC_SIZE * 2)(%rdi) +++ lea VEC_SIZE(%rdi, %rcx), %rdi +++ lea VEC_SIZE(%rsi, %rcx), %rsi +++ bsf %edx, %edx +++ cmp %r8d, %edx +++ jb L(CopyVecSizeExit) +++L(StrncpyExit): +++ cmp $65, %r8d +++ je L(StrncpyExit65) +++ cmp $33, %r8d +++ jae L(StrncpyExit33_64) +++ cmp $17, %r8d +++ jae L(StrncpyExit17_32) +++ cmp $9, %r8d +++ jae L(StrncpyExit9_16) +++ cmp $5, %r8d +++ jae L(StrncpyExit5_8) +++ cmp $3, %r8d +++ jae L(StrncpyExit3_4) +++ cmp $1, %r8d +++ ja L(StrncpyExit2) +++ je L(StrncpyExit1) +++# ifdef USE_AS_STPCPY +++ mov %rdi, %rax +++# endif +++# ifdef USE_AS_STRCAT +++ movb $0, (%rdi) +++# endif +++ ret +++ +++ .p2align 4 +++L(ExitZero): +++# ifndef USE_AS_STRCAT +++ mov %rdi, %rax +++# endif +++ ret +++ +++# endif +++ +++# ifndef USE_AS_STRCAT +++END (STRCPY) +++# else +++END (STRCAT) +++# endif +++#endif ++diff --git a/sysdeps/x86_64/multiarch/strlen-avx2-rtm.S b/sysdeps/x86_64/multiarch/strlen-avx2-rtm.S ++new file mode 100644 ++index 0000000000..75b4b7612c ++--- /dev/null +++++ b/sysdeps/x86_64/multiarch/strlen-avx2-rtm.S ++@@ -0,0 +1,12 @@ +++#ifndef STRLEN +++# define STRLEN __strlen_avx2_rtm +++#endif +++ +++#define ZERO_UPPER_VEC_REGISTERS_RETURN \ +++ ZERO_UPPER_VEC_REGISTERS_RETURN_XTEST +++ +++#define VZEROUPPER_RETURN jmp L(return_vzeroupper) +++ +++#define SECTION(p) p##.avx.rtm +++ +++#include "strlen-avx2.S" ++diff --git a/sysdeps/x86_64/multiarch/strlen-avx2.S b/sysdeps/x86_64/multiarch/strlen-avx2.S ++index 73421ec1b2..8cfb7391b0 100644 ++--- a/sysdeps/x86_64/multiarch/strlen-avx2.S +++++ b/sysdeps/x86_64/multiarch/strlen-avx2.S ++@@ -27,370 +27,528 @@ ++ # ifdef USE_AS_WCSLEN ++ # define VPCMPEQ vpcmpeqd ++ # define VPMINU vpminud +++# define CHAR_SIZE 4 ++ # else ++ # define VPCMPEQ vpcmpeqb ++ # define VPMINU vpminub +++# define CHAR_SIZE 1 ++ # endif ++ ++ # ifndef VZEROUPPER ++ # define VZEROUPPER vzeroupper ++ # endif ++ +++# ifndef SECTION +++# define SECTION(p) p##.avx +++# endif +++ ++ # define VEC_SIZE 32 +++# define PAGE_SIZE 4096 +++# define CHAR_PER_VEC (VEC_SIZE / CHAR_SIZE) ++ ++- .section .text.avx,"ax",@progbits +++ .section SECTION(.text),"ax",@progbits ++ ENTRY (STRLEN) ++ # ifdef USE_AS_STRNLEN ++- /* Check for zero length. */ +++ /* Check zero length. */ +++# ifdef __ILP32__ +++ /* Clear upper bits. */ +++ and %RSI_LP, %RSI_LP +++# else ++ test %RSI_LP, %RSI_LP ++- jz L(zero) ++-# ifdef USE_AS_WCSLEN ++- shl $2, %RSI_LP ++-# elif defined __ILP32__ ++- /* Clear the upper 32 bits. */ ++- movl %esi, %esi ++ # endif +++ jz L(zero) +++ /* Store max len in R8_LP before adjusting if using WCSLEN. */ ++ mov %RSI_LP, %R8_LP ++ # endif ++- movl %edi, %ecx +++ movl %edi, %eax ++ movq %rdi, %rdx ++ vpxor %xmm0, %xmm0, %xmm0 ++- +++ /* Clear high bits from edi. Only keeping bits relevant to page +++ cross check. */ +++ andl $(PAGE_SIZE - 1), %eax ++ /* Check if we may cross page boundary with one vector load. */ ++- andl $(2 * VEC_SIZE - 1), %ecx ++- cmpl $VEC_SIZE, %ecx ++- ja L(cros_page_boundary) +++ cmpl $(PAGE_SIZE - VEC_SIZE), %eax +++ ja L(cross_page_boundary) ++ ++ /* Check the first VEC_SIZE bytes. */ ++- VPCMPEQ (%rdi), %ymm0, %ymm1 +++ VPCMPEQ (%rdi), %ymm0, %ymm1 ++ vpmovmskb %ymm1, %eax ++- testl %eax, %eax ++- ++ # ifdef USE_AS_STRNLEN ++- jnz L(first_vec_x0_check) ++- /* Adjust length and check the end of data. */ ++- subq $VEC_SIZE, %rsi ++- jbe L(max) ++-# else ++- jnz L(first_vec_x0) +++ /* If length < VEC_SIZE handle special. */ +++ cmpq $CHAR_PER_VEC, %rsi +++ jbe L(first_vec_x0) ++ # endif ++- ++- /* Align data for aligned loads in the loop. */ ++- addq $VEC_SIZE, %rdi ++- andl $(VEC_SIZE - 1), %ecx ++- andq $-VEC_SIZE, %rdi +++ /* If empty continue to aligned_more. Otherwise return bit +++ position of first match. */ +++ testl %eax, %eax +++ jz L(aligned_more) +++ tzcntl %eax, %eax +++# ifdef USE_AS_WCSLEN +++ /* NB: Divide bytes by 4 to get wchar_t count. */ +++ shrl $2, %eax +++# endif +++ VZEROUPPER_RETURN ++ ++ # ifdef USE_AS_STRNLEN ++- /* Adjust length. */ ++- addq %rcx, %rsi +++L(zero): +++ xorl %eax, %eax +++ ret ++ ++- subq $(VEC_SIZE * 4), %rsi ++- jbe L(last_4x_vec_or_less) +++ .p2align 4 +++L(first_vec_x0): +++ /* Set bit for max len so that tzcnt will return min of max len +++ and position of first match. */ +++# ifdef USE_AS_WCSLEN +++ /* NB: Multiply length by 4 to get byte count. */ +++ sall $2, %esi +++# endif +++ btsq %rsi, %rax +++ tzcntl %eax, %eax +++# ifdef USE_AS_WCSLEN +++ /* NB: Divide bytes by 4 to get wchar_t count. */ +++ shrl $2, %eax +++# endif +++ VZEROUPPER_RETURN ++ # endif ++- jmp L(more_4x_vec) ++ ++ .p2align 4 ++-L(cros_page_boundary): ++- andl $(VEC_SIZE - 1), %ecx ++- andq $-VEC_SIZE, %rdi ++- VPCMPEQ (%rdi), %ymm0, %ymm1 ++- vpmovmskb %ymm1, %eax ++- /* Remove the leading bytes. */ ++- sarl %cl, %eax ++- testl %eax, %eax ++- jz L(aligned_more) +++L(first_vec_x1): ++ tzcntl %eax, %eax +++ /* Safe to use 32 bit instructions as these are only called for +++ size = [1, 159]. */ ++ # ifdef USE_AS_STRNLEN ++- /* Check the end of data. */ ++- cmpq %rax, %rsi ++- jbe L(max) +++ /* Use ecx which was computed earlier to compute correct value. +++ */ +++# ifdef USE_AS_WCSLEN +++ leal -(VEC_SIZE * 4 + 1)(%rax, %rcx, 4), %eax +++# else +++ subl $(VEC_SIZE * 4 + 1), %ecx +++ addl %ecx, %eax +++# endif +++# else +++ subl %edx, %edi +++ incl %edi +++ addl %edi, %eax ++ # endif ++- addq %rdi, %rax ++- addq %rcx, %rax ++- subq %rdx, %rax ++ # ifdef USE_AS_WCSLEN ++- shrq $2, %rax +++ /* NB: Divide bytes by 4 to get wchar_t count. */ +++ shrl $2, %eax ++ # endif ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ ++ .p2align 4 ++-L(aligned_more): +++L(first_vec_x2): +++ tzcntl %eax, %eax +++ /* Safe to use 32 bit instructions as these are only called for +++ size = [1, 159]. */ ++ # ifdef USE_AS_STRNLEN ++- /* "rcx" is less than VEC_SIZE. Calculate "rdx + rcx - VEC_SIZE" ++- with "rdx - (VEC_SIZE - rcx)" instead of "(rdx + rcx) - VEC_SIZE" ++- to void possible addition overflow. */ ++- negq %rcx ++- addq $VEC_SIZE, %rcx ++- ++- /* Check the end of data. */ ++- subq %rcx, %rsi ++- jbe L(max) +++ /* Use ecx which was computed earlier to compute correct value. +++ */ +++# ifdef USE_AS_WCSLEN +++ leal -(VEC_SIZE * 3 + 1)(%rax, %rcx, 4), %eax +++# else +++ subl $(VEC_SIZE * 3 + 1), %ecx +++ addl %ecx, %eax +++# endif +++# else +++ subl %edx, %edi +++ addl $(VEC_SIZE + 1), %edi +++ addl %edi, %eax ++ # endif +++# ifdef USE_AS_WCSLEN +++ /* NB: Divide bytes by 4 to get wchar_t count. */ +++ shrl $2, %eax +++# endif +++ VZEROUPPER_RETURN ++ ++- addq $VEC_SIZE, %rdi +++ .p2align 4 +++L(first_vec_x3): +++ tzcntl %eax, %eax +++ /* Safe to use 32 bit instructions as these are only called for +++ size = [1, 159]. */ +++# ifdef USE_AS_STRNLEN +++ /* Use ecx which was computed earlier to compute correct value. +++ */ +++# ifdef USE_AS_WCSLEN +++ leal -(VEC_SIZE * 2 + 1)(%rax, %rcx, 4), %eax +++# else +++ subl $(VEC_SIZE * 2 + 1), %ecx +++ addl %ecx, %eax +++# endif +++# else +++ subl %edx, %edi +++ addl $(VEC_SIZE * 2 + 1), %edi +++ addl %edi, %eax +++# endif +++# ifdef USE_AS_WCSLEN +++ /* NB: Divide bytes by 4 to get wchar_t count. */ +++ shrl $2, %eax +++# endif +++ VZEROUPPER_RETURN ++ +++ .p2align 4 +++L(first_vec_x4): +++ tzcntl %eax, %eax +++ /* Safe to use 32 bit instructions as these are only called for +++ size = [1, 159]. */ ++ # ifdef USE_AS_STRNLEN ++- subq $(VEC_SIZE * 4), %rsi ++- jbe L(last_4x_vec_or_less) +++ /* Use ecx which was computed earlier to compute correct value. +++ */ +++# ifdef USE_AS_WCSLEN +++ leal -(VEC_SIZE * 1 + 1)(%rax, %rcx, 4), %eax +++# else +++ subl $(VEC_SIZE + 1), %ecx +++ addl %ecx, %eax +++# endif +++# else +++ subl %edx, %edi +++ addl $(VEC_SIZE * 3 + 1), %edi +++ addl %edi, %eax ++ # endif +++# ifdef USE_AS_WCSLEN +++ /* NB: Divide bytes by 4 to get wchar_t count. */ +++ shrl $2, %eax +++# endif +++ VZEROUPPER_RETURN ++ ++-L(more_4x_vec): +++ .p2align 5 +++L(aligned_more): +++ /* Align data to VEC_SIZE - 1. This is the same number of +++ instructions as using andq with -VEC_SIZE but saves 4 bytes of +++ code on the x4 check. */ +++ orq $(VEC_SIZE - 1), %rdi +++L(cross_page_continue): ++ /* Check the first 4 * VEC_SIZE. Only one VEC_SIZE at a time ++ since data is only aligned to VEC_SIZE. */ ++- VPCMPEQ (%rdi), %ymm0, %ymm1 ++- vpmovmskb %ymm1, %eax ++- testl %eax, %eax ++- jnz L(first_vec_x0) ++- ++- VPCMPEQ VEC_SIZE(%rdi), %ymm0, %ymm1 +++# ifdef USE_AS_STRNLEN +++ /* + 1 because rdi is aligned to VEC_SIZE - 1. + CHAR_SIZE +++ because it simplies the logic in last_4x_vec_or_less. */ +++ leaq (VEC_SIZE * 4 + CHAR_SIZE + 1)(%rdi), %rcx +++ subq %rdx, %rcx +++# ifdef USE_AS_WCSLEN +++ /* NB: Divide bytes by 4 to get the wchar_t count. */ +++ sarl $2, %ecx +++# endif +++# endif +++ /* Load first VEC regardless. */ +++ VPCMPEQ 1(%rdi), %ymm0, %ymm1 +++# ifdef USE_AS_STRNLEN +++ /* Adjust length. If near end handle specially. */ +++ subq %rcx, %rsi +++ jb L(last_4x_vec_or_less) +++# endif ++ vpmovmskb %ymm1, %eax ++ testl %eax, %eax ++ jnz L(first_vec_x1) ++ ++- VPCMPEQ (VEC_SIZE * 2)(%rdi), %ymm0, %ymm1 +++ VPCMPEQ (VEC_SIZE + 1)(%rdi), %ymm0, %ymm1 ++ vpmovmskb %ymm1, %eax ++ testl %eax, %eax ++ jnz L(first_vec_x2) ++ ++- VPCMPEQ (VEC_SIZE * 3)(%rdi), %ymm0, %ymm1 +++ VPCMPEQ (VEC_SIZE * 2 + 1)(%rdi), %ymm0, %ymm1 ++ vpmovmskb %ymm1, %eax ++ testl %eax, %eax ++ jnz L(first_vec_x3) ++ ++- addq $(VEC_SIZE * 4), %rdi ++- ++-# ifdef USE_AS_STRNLEN ++- subq $(VEC_SIZE * 4), %rsi ++- jbe L(last_4x_vec_or_less) ++-# endif ++- ++- /* Align data to 4 * VEC_SIZE. */ ++- movq %rdi, %rcx ++- andl $(4 * VEC_SIZE - 1), %ecx ++- andq $-(4 * VEC_SIZE), %rdi +++ VPCMPEQ (VEC_SIZE * 3 + 1)(%rdi), %ymm0, %ymm1 +++ vpmovmskb %ymm1, %eax +++ testl %eax, %eax +++ jnz L(first_vec_x4) ++ +++ /* Align data to VEC_SIZE * 4 - 1. */ ++ # ifdef USE_AS_STRNLEN ++- /* Adjust length. */ +++ /* Before adjusting length check if at last VEC_SIZE * 4. */ +++ cmpq $(CHAR_PER_VEC * 4 - 1), %rsi +++ jbe L(last_4x_vec_or_less_load) +++ incq %rdi +++ movl %edi, %ecx +++ orq $(VEC_SIZE * 4 - 1), %rdi +++ andl $(VEC_SIZE * 4 - 1), %ecx +++# ifdef USE_AS_WCSLEN +++ /* NB: Divide bytes by 4 to get the wchar_t count. */ +++ sarl $2, %ecx +++# endif +++ /* Readjust length. */ ++ addq %rcx, %rsi +++# else +++ incq %rdi +++ orq $(VEC_SIZE * 4 - 1), %rdi ++ # endif ++- +++ /* Compare 4 * VEC at a time forward. */ ++ .p2align 4 ++ L(loop_4x_vec): ++- /* Compare 4 * VEC at a time forward. */ ++- vmovdqa (%rdi), %ymm1 ++- vmovdqa VEC_SIZE(%rdi), %ymm2 ++- vmovdqa (VEC_SIZE * 2)(%rdi), %ymm3 ++- vmovdqa (VEC_SIZE * 3)(%rdi), %ymm4 ++- VPMINU %ymm1, %ymm2, %ymm5 ++- VPMINU %ymm3, %ymm4, %ymm6 ++- VPMINU %ymm5, %ymm6, %ymm5 ++- +++# ifdef USE_AS_STRNLEN +++ /* Break if at end of length. */ +++ subq $(CHAR_PER_VEC * 4), %rsi +++ jb L(last_4x_vec_or_less_cmpeq) +++# endif +++ /* Save some code size by microfusing VPMINU with the load. +++ Since the matches in ymm2/ymm4 can only be returned if there +++ where no matches in ymm1/ymm3 respectively there is no issue +++ with overlap. */ +++ vmovdqa 1(%rdi), %ymm1 +++ VPMINU (VEC_SIZE + 1)(%rdi), %ymm1, %ymm2 +++ vmovdqa (VEC_SIZE * 2 + 1)(%rdi), %ymm3 +++ VPMINU (VEC_SIZE * 3 + 1)(%rdi), %ymm3, %ymm4 +++ +++ VPMINU %ymm2, %ymm4, %ymm5 ++ VPCMPEQ %ymm5, %ymm0, %ymm5 ++- vpmovmskb %ymm5, %eax ++- testl %eax, %eax ++- jnz L(4x_vec_end) +++ vpmovmskb %ymm5, %ecx ++ ++- addq $(VEC_SIZE * 4), %rdi +++ subq $-(VEC_SIZE * 4), %rdi +++ testl %ecx, %ecx +++ jz L(loop_4x_vec) ++ ++-# ifndef USE_AS_STRNLEN ++- jmp L(loop_4x_vec) ++-# else ++- subq $(VEC_SIZE * 4), %rsi ++- ja L(loop_4x_vec) ++ ++-L(last_4x_vec_or_less): ++- /* Less than 4 * VEC and aligned to VEC_SIZE. */ ++- addl $(VEC_SIZE * 2), %esi ++- jle L(last_2x_vec) ++- ++- VPCMPEQ (%rdi), %ymm0, %ymm1 ++- vpmovmskb %ymm1, %eax ++- testl %eax, %eax ++- jnz L(first_vec_x0) ++- ++- VPCMPEQ VEC_SIZE(%rdi), %ymm0, %ymm1 +++ VPCMPEQ %ymm1, %ymm0, %ymm1 ++ vpmovmskb %ymm1, %eax +++ subq %rdx, %rdi ++ testl %eax, %eax ++- jnz L(first_vec_x1) +++ jnz L(last_vec_return_x0) ++ ++- VPCMPEQ (VEC_SIZE * 2)(%rdi), %ymm0, %ymm1 ++- vpmovmskb %ymm1, %eax +++ VPCMPEQ %ymm2, %ymm0, %ymm2 +++ vpmovmskb %ymm2, %eax ++ testl %eax, %eax +++ jnz L(last_vec_return_x1) ++ ++- jnz L(first_vec_x2_check) ++- subl $VEC_SIZE, %esi ++- jle L(max) +++ /* Combine last 2 VEC. */ +++ VPCMPEQ %ymm3, %ymm0, %ymm3 +++ vpmovmskb %ymm3, %eax +++ /* rcx has combined result from all 4 VEC. It will only be used +++ if the first 3 other VEC all did not contain a match. */ +++ salq $32, %rcx +++ orq %rcx, %rax +++ tzcntq %rax, %rax +++ subq $(VEC_SIZE * 2 - 1), %rdi +++ addq %rdi, %rax +++# ifdef USE_AS_WCSLEN +++ /* NB: Divide bytes by 4 to get wchar_t count. */ +++ shrq $2, %rax +++# endif +++ VZEROUPPER_RETURN ++ ++- VPCMPEQ (VEC_SIZE * 3)(%rdi), %ymm0, %ymm1 ++- vpmovmskb %ymm1, %eax ++- testl %eax, %eax ++ ++- jnz L(first_vec_x3_check) ++- movq %r8, %rax +++# ifdef USE_AS_STRNLEN +++ .p2align 4 +++L(last_4x_vec_or_less_load): +++ /* Depending on entry adjust rdi / prepare first VEC in ymm1. +++ */ +++ subq $-(VEC_SIZE * 4), %rdi +++L(last_4x_vec_or_less_cmpeq): +++ VPCMPEQ 1(%rdi), %ymm0, %ymm1 +++L(last_4x_vec_or_less): ++ # ifdef USE_AS_WCSLEN ++- shrq $2, %rax +++ /* NB: Multiply length by 4 to get byte count. */ +++ sall $2, %esi ++ # endif ++- VZEROUPPER ++- ret ++- ++- .p2align 4 ++-L(last_2x_vec): ++- addl $(VEC_SIZE * 2), %esi ++- VPCMPEQ (%rdi), %ymm0, %ymm1 ++ vpmovmskb %ymm1, %eax +++ /* If remaining length > VEC_SIZE * 2. This works if esi is off +++ by VEC_SIZE * 4. */ +++ testl $(VEC_SIZE * 2), %esi +++ jnz L(last_4x_vec) +++ +++ /* length may have been negative or positive by an offset of +++ VEC_SIZE * 4 depending on where this was called from. This fixes +++ that. */ +++ andl $(VEC_SIZE * 4 - 1), %esi ++ testl %eax, %eax +++ jnz L(last_vec_x1_check) ++ ++- jnz L(first_vec_x0_check) ++ subl $VEC_SIZE, %esi ++- jle L(max) +++ jb L(max) ++ ++- VPCMPEQ VEC_SIZE(%rdi), %ymm0, %ymm1 +++ VPCMPEQ (VEC_SIZE + 1)(%rdi), %ymm0, %ymm1 ++ vpmovmskb %ymm1, %eax ++- testl %eax, %eax ++- jnz L(first_vec_x1_check) ++- movq %r8, %rax ++-# ifdef USE_AS_WCSLEN ++- shrq $2, %rax ++-# endif ++- VZEROUPPER ++- ret ++- ++- .p2align 4 ++-L(first_vec_x0_check): ++ tzcntl %eax, %eax ++ /* Check the end of data. */ ++- cmpq %rax, %rsi ++- jbe L(max) +++ cmpl %eax, %esi +++ jb L(max) +++ subq %rdx, %rdi +++ addl $(VEC_SIZE + 1), %eax ++ addq %rdi, %rax ++- subq %rdx, %rax ++ # ifdef USE_AS_WCSLEN +++ /* NB: Divide bytes by 4 to get wchar_t count. */ ++ shrq $2, %rax ++ # endif ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN +++# endif ++ ++ .p2align 4 ++-L(first_vec_x1_check): +++L(last_vec_return_x0): ++ tzcntl %eax, %eax ++- /* Check the end of data. */ ++- cmpq %rax, %rsi ++- jbe L(max) ++- addq $VEC_SIZE, %rax +++ subq $(VEC_SIZE * 4 - 1), %rdi ++ addq %rdi, %rax ++- subq %rdx, %rax ++-# ifdef USE_AS_WCSLEN +++# ifdef USE_AS_WCSLEN +++ /* NB: Divide bytes by 4 to get wchar_t count. */ ++ shrq $2, %rax ++-# endif ++- VZEROUPPER ++- ret +++# endif +++ VZEROUPPER_RETURN ++ ++ .p2align 4 ++-L(first_vec_x2_check): +++L(last_vec_return_x1): ++ tzcntl %eax, %eax ++- /* Check the end of data. */ ++- cmpq %rax, %rsi ++- jbe L(max) ++- addq $(VEC_SIZE * 2), %rax +++ subq $(VEC_SIZE * 3 - 1), %rdi ++ addq %rdi, %rax ++- subq %rdx, %rax ++-# ifdef USE_AS_WCSLEN +++# ifdef USE_AS_WCSLEN +++ /* NB: Divide bytes by 4 to get wchar_t count. */ ++ shrq $2, %rax ++-# endif ++- VZEROUPPER ++- ret +++# endif +++ VZEROUPPER_RETURN ++ +++# ifdef USE_AS_STRNLEN ++ .p2align 4 ++-L(first_vec_x3_check): +++L(last_vec_x1_check): +++ ++ tzcntl %eax, %eax ++ /* Check the end of data. */ ++- cmpq %rax, %rsi ++- jbe L(max) ++- addq $(VEC_SIZE * 3), %rax +++ cmpl %eax, %esi +++ jb L(max) +++ subq %rdx, %rdi +++ incl %eax ++ addq %rdi, %rax ++- subq %rdx, %rax ++ # ifdef USE_AS_WCSLEN +++ /* NB: Divide bytes by 4 to get wchar_t count. */ ++ shrq $2, %rax ++ # endif ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ ++- .p2align 4 ++ L(max): ++ movq %r8, %rax +++ VZEROUPPER_RETURN +++ +++ .p2align 4 +++L(last_4x_vec): +++ /* Test first 2x VEC normally. */ +++ testl %eax, %eax +++ jnz L(last_vec_x1) +++ +++ VPCMPEQ (VEC_SIZE + 1)(%rdi), %ymm0, %ymm1 +++ vpmovmskb %ymm1, %eax +++ testl %eax, %eax +++ jnz L(last_vec_x2) +++ +++ /* Normalize length. */ +++ andl $(VEC_SIZE * 4 - 1), %esi +++ VPCMPEQ (VEC_SIZE * 2 + 1)(%rdi), %ymm0, %ymm1 +++ vpmovmskb %ymm1, %eax +++ testl %eax, %eax +++ jnz L(last_vec_x3) +++ +++ subl $(VEC_SIZE * 3), %esi +++ jb L(max) +++ +++ VPCMPEQ (VEC_SIZE * 3 + 1)(%rdi), %ymm0, %ymm1 +++ vpmovmskb %ymm1, %eax +++ tzcntl %eax, %eax +++ /* Check the end of data. */ +++ cmpl %eax, %esi +++ jb L(max) +++ subq %rdx, %rdi +++ addl $(VEC_SIZE * 3 + 1), %eax +++ addq %rdi, %rax ++ # ifdef USE_AS_WCSLEN +++ /* NB: Divide bytes by 4 to get wchar_t count. */ ++ shrq $2, %rax ++ # endif ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ ++- .p2align 4 ++-L(zero): ++- xorl %eax, %eax ++- ret ++-# endif ++ ++ .p2align 4 ++-L(first_vec_x0): +++L(last_vec_x1): +++ /* essentially duplicates of first_vec_x1 but use 64 bit +++ instructions. */ ++ tzcntl %eax, %eax +++ subq %rdx, %rdi +++ incl %eax ++ addq %rdi, %rax ++- subq %rdx, %rax ++-# ifdef USE_AS_WCSLEN +++# ifdef USE_AS_WCSLEN +++ /* NB: Divide bytes by 4 to get wchar_t count. */ ++ shrq $2, %rax ++-# endif ++- VZEROUPPER ++- ret +++# endif +++ VZEROUPPER_RETURN ++ ++ .p2align 4 ++-L(first_vec_x1): +++L(last_vec_x2): +++ /* essentially duplicates of first_vec_x1 but use 64 bit +++ instructions. */ ++ tzcntl %eax, %eax ++- addq $VEC_SIZE, %rax +++ subq %rdx, %rdi +++ addl $(VEC_SIZE + 1), %eax ++ addq %rdi, %rax ++- subq %rdx, %rax ++-# ifdef USE_AS_WCSLEN +++# ifdef USE_AS_WCSLEN +++ /* NB: Divide bytes by 4 to get wchar_t count. */ ++ shrq $2, %rax ++-# endif ++- VZEROUPPER ++- ret +++# endif +++ VZEROUPPER_RETURN ++ ++ .p2align 4 ++-L(first_vec_x2): +++L(last_vec_x3): ++ tzcntl %eax, %eax ++- addq $(VEC_SIZE * 2), %rax +++ subl $(VEC_SIZE * 2), %esi +++ /* Check the end of data. */ +++ cmpl %eax, %esi +++ jb L(max_end) +++ subq %rdx, %rdi +++ addl $(VEC_SIZE * 2 + 1), %eax ++ addq %rdi, %rax ++- subq %rdx, %rax ++-# ifdef USE_AS_WCSLEN +++# ifdef USE_AS_WCSLEN +++ /* NB: Divide bytes by 4 to get wchar_t count. */ ++ shrq $2, %rax +++# endif +++ VZEROUPPER_RETURN +++L(max_end): +++ movq %r8, %rax +++ VZEROUPPER_RETURN ++ # endif ++- VZEROUPPER ++- ret ++ +++ /* Cold case for crossing page with first load. */ ++ .p2align 4 ++-L(4x_vec_end): ++- VPCMPEQ %ymm1, %ymm0, %ymm1 +++L(cross_page_boundary): +++ /* Align data to VEC_SIZE - 1. */ +++ orq $(VEC_SIZE - 1), %rdi +++ VPCMPEQ -(VEC_SIZE - 1)(%rdi), %ymm0, %ymm1 ++ vpmovmskb %ymm1, %eax +++ /* Remove the leading bytes. sarxl only uses bits [5:0] of COUNT +++ so no need to manually mod rdx. */ +++ sarxl %edx, %eax, %eax +++# ifdef USE_AS_STRNLEN ++ testl %eax, %eax ++- jnz L(first_vec_x0) ++- VPCMPEQ %ymm2, %ymm0, %ymm2 ++- vpmovmskb %ymm2, %eax ++- testl %eax, %eax ++- jnz L(first_vec_x1) ++- VPCMPEQ %ymm3, %ymm0, %ymm3 ++- vpmovmskb %ymm3, %eax +++ jnz L(cross_page_less_vec) +++ leaq 1(%rdi), %rcx +++ subq %rdx, %rcx +++# ifdef USE_AS_WCSLEN +++ /* NB: Divide bytes by 4 to get wchar_t count. */ +++ shrl $2, %ecx +++# endif +++ /* Check length. */ +++ cmpq %rsi, %rcx +++ jb L(cross_page_continue) +++ movq %r8, %rax +++# else ++ testl %eax, %eax ++- jnz L(first_vec_x2) ++- VPCMPEQ %ymm4, %ymm0, %ymm4 ++- vpmovmskb %ymm4, %eax ++-L(first_vec_x3): +++ jz L(cross_page_continue) ++ tzcntl %eax, %eax ++- addq $(VEC_SIZE * 3), %rax ++- addq %rdi, %rax ++- subq %rdx, %rax ++-# ifdef USE_AS_WCSLEN ++- shrq $2, %rax +++# ifdef USE_AS_WCSLEN +++ /* NB: Divide length by 4 to get wchar_t count. */ +++ shrl $2, %eax +++# endif +++# endif +++L(return_vzeroupper): +++ ZERO_UPPER_VEC_REGISTERS_RETURN +++ +++# ifdef USE_AS_STRNLEN +++ .p2align 4 +++L(cross_page_less_vec): +++ tzcntl %eax, %eax +++# ifdef USE_AS_WCSLEN +++ /* NB: Divide by 4 to convert from byte-count to length. */ +++ shrl $2, %eax +++# endif +++ cmpq %rax, %rsi +++ cmovb %esi, %eax +++ VZEROUPPER_RETURN ++ # endif ++- VZEROUPPER ++- ret ++ ++ END (STRLEN) ++ #endif ++diff --git a/sysdeps/x86_64/multiarch/strlen-evex.S b/sysdeps/x86_64/multiarch/strlen-evex.S ++new file mode 100644 ++index 0000000000..4bf6874b82 ++--- /dev/null +++++ b/sysdeps/x86_64/multiarch/strlen-evex.S ++@@ -0,0 +1,489 @@ +++/* strlen/strnlen/wcslen/wcsnlen optimized with 256-bit EVEX instructions. +++ Copyright (C) 2021 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 +++ . */ +++ +++#if IS_IN (libc) +++ +++# include +++ +++# ifndef STRLEN +++# define STRLEN __strlen_evex +++# endif +++ +++# define VMOVA vmovdqa64 +++ +++# ifdef USE_AS_WCSLEN +++# define VPCMP vpcmpd +++# define VPMINU vpminud +++# define SHIFT_REG ecx +++# define CHAR_SIZE 4 +++# else +++# define VPCMP vpcmpb +++# define VPMINU vpminub +++# define SHIFT_REG edx +++# define CHAR_SIZE 1 +++# endif +++ +++# define XMMZERO xmm16 +++# define YMMZERO ymm16 +++# define YMM1 ymm17 +++# define YMM2 ymm18 +++# define YMM3 ymm19 +++# define YMM4 ymm20 +++# define YMM5 ymm21 +++# define YMM6 ymm22 +++ +++# define VEC_SIZE 32 +++# define PAGE_SIZE 4096 +++# define CHAR_PER_VEC (VEC_SIZE / CHAR_SIZE) +++ +++ .section .text.evex,"ax",@progbits +++ENTRY (STRLEN) +++# ifdef USE_AS_STRNLEN +++ /* Check zero length. */ +++ test %RSI_LP, %RSI_LP +++ jz L(zero) +++# ifdef __ILP32__ +++ /* Clear the upper 32 bits. */ +++ movl %esi, %esi +++# endif +++ mov %RSI_LP, %R8_LP +++# endif +++ movl %edi, %eax +++ vpxorq %XMMZERO, %XMMZERO, %XMMZERO +++ /* Clear high bits from edi. Only keeping bits relevant to page +++ cross check. */ +++ andl $(PAGE_SIZE - 1), %eax +++ /* Check if we may cross page boundary with one vector load. */ +++ cmpl $(PAGE_SIZE - VEC_SIZE), %eax +++ ja L(cross_page_boundary) +++ +++ /* Check the first VEC_SIZE bytes. Each bit in K0 represents a +++ null byte. */ +++ VPCMP $0, (%rdi), %YMMZERO, %k0 +++ kmovd %k0, %eax +++# ifdef USE_AS_STRNLEN +++ /* If length < CHAR_PER_VEC handle special. */ +++ cmpq $CHAR_PER_VEC, %rsi +++ jbe L(first_vec_x0) +++# endif +++ testl %eax, %eax +++ jz L(aligned_more) +++ tzcntl %eax, %eax +++ ret +++# ifdef USE_AS_STRNLEN +++L(zero): +++ xorl %eax, %eax +++ ret +++ +++ .p2align 4 +++L(first_vec_x0): +++ /* Set bit for max len so that tzcnt will return min of max len +++ and position of first match. */ +++ btsq %rsi, %rax +++ tzcntl %eax, %eax +++ ret +++# endif +++ +++ .p2align 4 +++L(first_vec_x1): +++ tzcntl %eax, %eax +++ /* Safe to use 32 bit instructions as these are only called for +++ size = [1, 159]. */ +++# ifdef USE_AS_STRNLEN +++ /* Use ecx which was computed earlier to compute correct value. +++ */ +++ leal -(CHAR_PER_VEC * 4 + 1)(%rcx, %rax), %eax +++# else +++ subl %edx, %edi +++# ifdef USE_AS_WCSLEN +++ /* NB: Divide bytes by 4 to get the wchar_t count. */ +++ sarl $2, %edi +++# endif +++ leal CHAR_PER_VEC(%rdi, %rax), %eax +++# endif +++ ret +++ +++ .p2align 4 +++L(first_vec_x2): +++ tzcntl %eax, %eax +++ /* Safe to use 32 bit instructions as these are only called for +++ size = [1, 159]. */ +++# ifdef USE_AS_STRNLEN +++ /* Use ecx which was computed earlier to compute correct value. +++ */ +++ leal -(CHAR_PER_VEC * 3 + 1)(%rcx, %rax), %eax +++# else +++ subl %edx, %edi +++# ifdef USE_AS_WCSLEN +++ /* NB: Divide bytes by 4 to get the wchar_t count. */ +++ sarl $2, %edi +++# endif +++ leal (CHAR_PER_VEC * 2)(%rdi, %rax), %eax +++# endif +++ ret +++ +++ .p2align 4 +++L(first_vec_x3): +++ tzcntl %eax, %eax +++ /* Safe to use 32 bit instructions as these are only called for +++ size = [1, 159]. */ +++# ifdef USE_AS_STRNLEN +++ /* Use ecx which was computed earlier to compute correct value. +++ */ +++ leal -(CHAR_PER_VEC * 2 + 1)(%rcx, %rax), %eax +++# else +++ subl %edx, %edi +++# ifdef USE_AS_WCSLEN +++ /* NB: Divide bytes by 4 to get the wchar_t count. */ +++ sarl $2, %edi +++# endif +++ leal (CHAR_PER_VEC * 3)(%rdi, %rax), %eax +++# endif +++ ret +++ +++ .p2align 4 +++L(first_vec_x4): +++ tzcntl %eax, %eax +++ /* Safe to use 32 bit instructions as these are only called for +++ size = [1, 159]. */ +++# ifdef USE_AS_STRNLEN +++ /* Use ecx which was computed earlier to compute correct value. +++ */ +++ leal -(CHAR_PER_VEC + 1)(%rcx, %rax), %eax +++# else +++ subl %edx, %edi +++# ifdef USE_AS_WCSLEN +++ /* NB: Divide bytes by 4 to get the wchar_t count. */ +++ sarl $2, %edi +++# endif +++ leal (CHAR_PER_VEC * 4)(%rdi, %rax), %eax +++# endif +++ ret +++ +++ .p2align 5 +++L(aligned_more): +++ movq %rdi, %rdx +++ /* Align data to VEC_SIZE. */ +++ andq $-(VEC_SIZE), %rdi +++L(cross_page_continue): +++ /* Check the first 4 * VEC_SIZE. Only one VEC_SIZE at a time +++ since data is only aligned to VEC_SIZE. */ +++# ifdef USE_AS_STRNLEN +++ /* + CHAR_SIZE because it simplies the logic in +++ last_4x_vec_or_less. */ +++ leaq (VEC_SIZE * 5 + CHAR_SIZE)(%rdi), %rcx +++ subq %rdx, %rcx +++# ifdef USE_AS_WCSLEN +++ /* NB: Divide bytes by 4 to get the wchar_t count. */ +++ sarl $2, %ecx +++# endif +++# endif +++ /* Load first VEC regardless. */ +++ VPCMP $0, VEC_SIZE(%rdi), %YMMZERO, %k0 +++# ifdef USE_AS_STRNLEN +++ /* Adjust length. If near end handle specially. */ +++ subq %rcx, %rsi +++ jb L(last_4x_vec_or_less) +++# endif +++ kmovd %k0, %eax +++ testl %eax, %eax +++ jnz L(first_vec_x1) +++ +++ VPCMP $0, (VEC_SIZE * 2)(%rdi), %YMMZERO, %k0 +++ kmovd %k0, %eax +++ test %eax, %eax +++ jnz L(first_vec_x2) +++ +++ VPCMP $0, (VEC_SIZE * 3)(%rdi), %YMMZERO, %k0 +++ kmovd %k0, %eax +++ testl %eax, %eax +++ jnz L(first_vec_x3) +++ +++ VPCMP $0, (VEC_SIZE * 4)(%rdi), %YMMZERO, %k0 +++ kmovd %k0, %eax +++ testl %eax, %eax +++ jnz L(first_vec_x4) +++ +++ addq $VEC_SIZE, %rdi +++# ifdef USE_AS_STRNLEN +++ /* Check if at last VEC_SIZE * 4 length. */ +++ cmpq $(CHAR_PER_VEC * 4 - 1), %rsi +++ jbe L(last_4x_vec_or_less_load) +++ movl %edi, %ecx +++ andl $(VEC_SIZE * 4 - 1), %ecx +++# ifdef USE_AS_WCSLEN +++ /* NB: Divide bytes by 4 to get the wchar_t count. */ +++ sarl $2, %ecx +++# endif +++ /* Readjust length. */ +++ addq %rcx, %rsi +++# endif +++ /* Align data to VEC_SIZE * 4. */ +++ andq $-(VEC_SIZE * 4), %rdi +++ +++ /* Compare 4 * VEC at a time forward. */ +++ .p2align 4 +++L(loop_4x_vec): +++ /* Load first VEC regardless. */ +++ VMOVA (VEC_SIZE * 4)(%rdi), %YMM1 +++# ifdef USE_AS_STRNLEN +++ /* Break if at end of length. */ +++ subq $(CHAR_PER_VEC * 4), %rsi +++ jb L(last_4x_vec_or_less_cmpeq) +++# endif +++ /* Save some code size by microfusing VPMINU with the load. Since +++ the matches in ymm2/ymm4 can only be returned if there where no +++ matches in ymm1/ymm3 respectively there is no issue with overlap. +++ */ +++ VPMINU (VEC_SIZE * 5)(%rdi), %YMM1, %YMM2 +++ VMOVA (VEC_SIZE * 6)(%rdi), %YMM3 +++ VPMINU (VEC_SIZE * 7)(%rdi), %YMM3, %YMM4 +++ +++ VPCMP $0, %YMM2, %YMMZERO, %k0 +++ VPCMP $0, %YMM4, %YMMZERO, %k1 +++ subq $-(VEC_SIZE * 4), %rdi +++ kortestd %k0, %k1 +++ jz L(loop_4x_vec) +++ +++ /* Check if end was in first half. */ +++ kmovd %k0, %eax +++ subq %rdx, %rdi +++# ifdef USE_AS_WCSLEN +++ shrq $2, %rdi +++# endif +++ testl %eax, %eax +++ jz L(second_vec_return) +++ +++ VPCMP $0, %YMM1, %YMMZERO, %k2 +++ kmovd %k2, %edx +++ /* Combine VEC1 matches (edx) with VEC2 matches (eax). */ +++# ifdef USE_AS_WCSLEN +++ sall $CHAR_PER_VEC, %eax +++ orl %edx, %eax +++ tzcntl %eax, %eax +++# else +++ salq $CHAR_PER_VEC, %rax +++ orq %rdx, %rax +++ tzcntq %rax, %rax +++# endif +++ addq %rdi, %rax +++ ret +++ +++ +++# ifdef USE_AS_STRNLEN +++ +++L(last_4x_vec_or_less_load): +++ /* Depending on entry adjust rdi / prepare first VEC in YMM1. */ +++ VMOVA (VEC_SIZE * 4)(%rdi), %YMM1 +++L(last_4x_vec_or_less_cmpeq): +++ VPCMP $0, %YMM1, %YMMZERO, %k0 +++ addq $(VEC_SIZE * 3), %rdi +++L(last_4x_vec_or_less): +++ kmovd %k0, %eax +++ /* If remaining length > VEC_SIZE * 2. This works if esi is off by +++ VEC_SIZE * 4. */ +++ testl $(CHAR_PER_VEC * 2), %esi +++ jnz L(last_4x_vec) +++ +++ /* length may have been negative or positive by an offset of +++ CHAR_PER_VEC * 4 depending on where this was called from. This +++ fixes that. */ +++ andl $(CHAR_PER_VEC * 4 - 1), %esi +++ testl %eax, %eax +++ jnz L(last_vec_x1_check) +++ +++ /* Check the end of data. */ +++ subl $CHAR_PER_VEC, %esi +++ jb L(max) +++ +++ VPCMP $0, (VEC_SIZE * 2)(%rdi), %YMMZERO, %k0 +++ kmovd %k0, %eax +++ tzcntl %eax, %eax +++ /* Check the end of data. */ +++ cmpl %eax, %esi +++ jb L(max) +++ +++ subq %rdx, %rdi +++# ifdef USE_AS_WCSLEN +++ /* NB: Divide bytes by 4 to get the wchar_t count. */ +++ sarq $2, %rdi +++# endif +++ leaq (CHAR_PER_VEC * 2)(%rdi, %rax), %rax +++ ret +++L(max): +++ movq %r8, %rax +++ ret +++# endif +++ +++ /* Placed here in strnlen so that the jcc L(last_4x_vec_or_less) +++ in the 4x VEC loop can use 2 byte encoding. */ +++ .p2align 4 +++L(second_vec_return): +++ VPCMP $0, %YMM3, %YMMZERO, %k0 +++ /* Combine YMM3 matches (k0) with YMM4 matches (k1). */ +++# ifdef USE_AS_WCSLEN +++ kunpckbw %k0, %k1, %k0 +++ kmovd %k0, %eax +++ tzcntl %eax, %eax +++# else +++ kunpckdq %k0, %k1, %k0 +++ kmovq %k0, %rax +++ tzcntq %rax, %rax +++# endif +++ leaq (CHAR_PER_VEC * 2)(%rdi, %rax), %rax +++ ret +++ +++ +++# ifdef USE_AS_STRNLEN +++L(last_vec_x1_check): +++ tzcntl %eax, %eax +++ /* Check the end of data. */ +++ cmpl %eax, %esi +++ jb L(max) +++ subq %rdx, %rdi +++# ifdef USE_AS_WCSLEN +++ /* NB: Divide bytes by 4 to get the wchar_t count. */ +++ sarq $2, %rdi +++# endif +++ leaq (CHAR_PER_VEC)(%rdi, %rax), %rax +++ ret +++ +++ .p2align 4 +++L(last_4x_vec): +++ /* Test first 2x VEC normally. */ +++ testl %eax, %eax +++ jnz L(last_vec_x1) +++ +++ VPCMP $0, (VEC_SIZE * 2)(%rdi), %YMMZERO, %k0 +++ kmovd %k0, %eax +++ testl %eax, %eax +++ jnz L(last_vec_x2) +++ +++ /* Normalize length. */ +++ andl $(CHAR_PER_VEC * 4 - 1), %esi +++ VPCMP $0, (VEC_SIZE * 3)(%rdi), %YMMZERO, %k0 +++ kmovd %k0, %eax +++ testl %eax, %eax +++ jnz L(last_vec_x3) +++ +++ /* Check the end of data. */ +++ subl $(CHAR_PER_VEC * 3), %esi +++ jb L(max) +++ +++ VPCMP $0, (VEC_SIZE * 4)(%rdi), %YMMZERO, %k0 +++ kmovd %k0, %eax +++ tzcntl %eax, %eax +++ /* Check the end of data. */ +++ cmpl %eax, %esi +++ jb L(max_end) +++ +++ subq %rdx, %rdi +++# ifdef USE_AS_WCSLEN +++ /* NB: Divide bytes by 4 to get the wchar_t count. */ +++ sarq $2, %rdi +++# endif +++ leaq (CHAR_PER_VEC * 4)(%rdi, %rax), %rax +++ ret +++ +++ .p2align 4 +++L(last_vec_x1): +++ tzcntl %eax, %eax +++ subq %rdx, %rdi +++# ifdef USE_AS_WCSLEN +++ /* NB: Divide bytes by 4 to get the wchar_t count. */ +++ sarq $2, %rdi +++# endif +++ leaq (CHAR_PER_VEC)(%rdi, %rax), %rax +++ ret +++ +++ .p2align 4 +++L(last_vec_x2): +++ tzcntl %eax, %eax +++ subq %rdx, %rdi +++# ifdef USE_AS_WCSLEN +++ /* NB: Divide bytes by 4 to get the wchar_t count. */ +++ sarq $2, %rdi +++# endif +++ leaq (CHAR_PER_VEC * 2)(%rdi, %rax), %rax +++ ret +++ +++ .p2align 4 +++L(last_vec_x3): +++ tzcntl %eax, %eax +++ subl $(CHAR_PER_VEC * 2), %esi +++ /* Check the end of data. */ +++ cmpl %eax, %esi +++ jb L(max_end) +++ subq %rdx, %rdi +++# ifdef USE_AS_WCSLEN +++ /* NB: Divide bytes by 4 to get the wchar_t count. */ +++ sarq $2, %rdi +++# endif +++ leaq (CHAR_PER_VEC * 3)(%rdi, %rax), %rax +++ ret +++L(max_end): +++ movq %r8, %rax +++ ret +++# endif +++ +++ /* Cold case for crossing page with first load. */ +++ .p2align 4 +++L(cross_page_boundary): +++ movq %rdi, %rdx +++ /* Align data to VEC_SIZE. */ +++ andq $-VEC_SIZE, %rdi +++ VPCMP $0, (%rdi), %YMMZERO, %k0 +++ kmovd %k0, %eax +++ /* Remove the leading bytes. */ +++# ifdef USE_AS_WCSLEN +++ /* NB: Divide shift count by 4 since each bit in K0 represent 4 +++ bytes. */ +++ movl %edx, %ecx +++ shrl $2, %ecx +++ andl $(CHAR_PER_VEC - 1), %ecx +++# endif +++ /* SHIFT_REG is ecx for USE_AS_WCSLEN and edx otherwise. */ +++ sarxl %SHIFT_REG, %eax, %eax +++ testl %eax, %eax +++# ifndef USE_AS_STRNLEN +++ jz L(cross_page_continue) +++ tzcntl %eax, %eax +++ ret +++# else +++ jnz L(cross_page_less_vec) +++# ifndef USE_AS_WCSLEN +++ movl %edx, %ecx +++ andl $(CHAR_PER_VEC - 1), %ecx +++# endif +++ movl $CHAR_PER_VEC, %eax +++ subl %ecx, %eax +++ /* Check the end of data. */ +++ cmpq %rax, %rsi +++ ja L(cross_page_continue) +++ movl %esi, %eax +++ ret +++L(cross_page_less_vec): +++ tzcntl %eax, %eax +++ /* Select min of length and position of first null. */ +++ cmpq %rax, %rsi +++ cmovb %esi, %eax +++ ret +++# endif +++ +++END (STRLEN) +++#endif ++diff --git a/sysdeps/x86_64/multiarch/strlen-sse2.S b/sysdeps/x86_64/multiarch/strlen-sse2.S ++index 055fbbc690..812af73c13 100644 ++--- a/sysdeps/x86_64/multiarch/strlen-sse2.S +++++ b/sysdeps/x86_64/multiarch/strlen-sse2.S ++@@ -20,4 +20,4 @@ ++ # define strlen __strlen_sse2 ++ #endif ++ ++-#include "../strlen.S" +++#include "strlen-vec.S" ++diff --git a/sysdeps/x86_64/multiarch/strlen-vec.S b/sysdeps/x86_64/multiarch/strlen-vec.S ++new file mode 100644 ++index 0000000000..439e486a43 ++--- /dev/null +++++ b/sysdeps/x86_64/multiarch/strlen-vec.S ++@@ -0,0 +1,270 @@ +++/* SSE2 version of strlen and SSE4.1 version of wcslen. +++ Copyright (C) 2012-2021 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 +++ . */ +++ +++#include +++ +++#ifdef AS_WCSLEN +++# define PMINU pminud +++# define PCMPEQ pcmpeqd +++# define SHIFT_RETURN shrq $2, %rax +++#else +++# define PMINU pminub +++# define PCMPEQ pcmpeqb +++# define SHIFT_RETURN +++#endif +++ +++/* Long lived register in strlen(s), strnlen(s, n) are: +++ +++ %xmm3 - zero +++ %rdi - s +++ %r10 (s+n) & (~(64-1)) +++ %r11 s+n +++*/ +++ +++ +++.text +++ENTRY(strlen) +++ +++/* Test 64 bytes from %rax for zero. Save result as bitmask in %rdx. */ +++#define FIND_ZERO \ +++ PCMPEQ (%rax), %xmm0; \ +++ PCMPEQ 16(%rax), %xmm1; \ +++ PCMPEQ 32(%rax), %xmm2; \ +++ PCMPEQ 48(%rax), %xmm3; \ +++ pmovmskb %xmm0, %esi; \ +++ pmovmskb %xmm1, %edx; \ +++ pmovmskb %xmm2, %r8d; \ +++ pmovmskb %xmm3, %ecx; \ +++ salq $16, %rdx; \ +++ salq $16, %rcx; \ +++ orq %rsi, %rdx; \ +++ orq %r8, %rcx; \ +++ salq $32, %rcx; \ +++ orq %rcx, %rdx; +++ +++#ifdef AS_STRNLEN +++/* Do not read anything when n==0. */ +++ test %RSI_LP, %RSI_LP +++ jne L(n_nonzero) +++ xor %rax, %rax +++ ret +++L(n_nonzero): +++# ifdef AS_WCSLEN +++/* Check for overflow from maxlen * sizeof(wchar_t). If it would +++ overflow the only way this program doesn't have undefined behavior +++ is if there is a null terminator in valid memory so wcslen will +++ suffice. */ +++ mov %RSI_LP, %R10_LP +++ sar $62, %R10_LP +++ test %R10_LP, %R10_LP +++ jnz __wcslen_sse4_1 +++ sal $2, %RSI_LP +++# endif +++ +++ +++/* Initialize long lived registers. */ +++ +++ add %RDI_LP, %RSI_LP +++# ifdef AS_WCSLEN +++/* Check for overflow again from s + maxlen * sizeof(wchar_t). */ +++ jbe __wcslen_sse4_1 +++# endif +++ mov %RSI_LP, %R10_LP +++ and $-64, %R10_LP +++ mov %RSI_LP, %R11_LP +++#endif +++ +++ pxor %xmm0, %xmm0 +++ pxor %xmm1, %xmm1 +++ pxor %xmm2, %xmm2 +++ pxor %xmm3, %xmm3 +++ movq %rdi, %rax +++ movq %rdi, %rcx +++ andq $4095, %rcx +++/* Offsets 4032-4047 will be aligned into 4032 thus fit into page. */ +++ cmpq $4047, %rcx +++/* We cannot unify this branching as it would be ~6 cycles slower. */ +++ ja L(cross_page) +++ +++#ifdef AS_STRNLEN +++/* Test if end is among first 64 bytes. */ +++# define STRNLEN_PROLOG \ +++ mov %r11, %rsi; \ +++ subq %rax, %rsi; \ +++ andq $-64, %rax; \ +++ testq $-64, %rsi; \ +++ je L(strnlen_ret) +++#else +++# define STRNLEN_PROLOG andq $-64, %rax; +++#endif +++ +++/* Ignore bits in mask that come before start of string. */ +++#define PROLOG(lab) \ +++ movq %rdi, %rcx; \ +++ xorq %rax, %rcx; \ +++ STRNLEN_PROLOG; \ +++ sarq %cl, %rdx; \ +++ test %rdx, %rdx; \ +++ je L(lab); \ +++ bsfq %rdx, %rax; \ +++ SHIFT_RETURN; \ +++ ret +++ +++#ifdef AS_STRNLEN +++ andq $-16, %rax +++ FIND_ZERO +++#else +++ /* Test first 16 bytes unaligned. */ +++ movdqu (%rax), %xmm4 +++ PCMPEQ %xmm0, %xmm4 +++ pmovmskb %xmm4, %edx +++ test %edx, %edx +++ je L(next48_bytes) +++ bsf %edx, %eax /* If eax is zeroed 16bit bsf can be used. */ +++ SHIFT_RETURN +++ ret +++ +++L(next48_bytes): +++/* Same as FIND_ZERO except we do not check first 16 bytes. */ +++ andq $-16, %rax +++ PCMPEQ 16(%rax), %xmm1 +++ PCMPEQ 32(%rax), %xmm2 +++ PCMPEQ 48(%rax), %xmm3 +++ pmovmskb %xmm1, %edx +++ pmovmskb %xmm2, %r8d +++ pmovmskb %xmm3, %ecx +++ salq $16, %rdx +++ salq $16, %rcx +++ orq %r8, %rcx +++ salq $32, %rcx +++ orq %rcx, %rdx +++#endif +++ +++ /* When no zero byte is found xmm1-3 are zero so we do not have to +++ zero them. */ +++ PROLOG(loop) +++ +++ .p2align 4 +++L(cross_page): +++ andq $-64, %rax +++ FIND_ZERO +++ PROLOG(loop_init) +++ +++#ifdef AS_STRNLEN +++/* We must do this check to correctly handle strnlen (s, -1). */ +++L(strnlen_ret): +++ bts %rsi, %rdx +++ sarq %cl, %rdx +++ test %rdx, %rdx +++ je L(loop_init) +++ bsfq %rdx, %rax +++ SHIFT_RETURN +++ ret +++#endif +++ .p2align 4 +++L(loop_init): +++ pxor %xmm1, %xmm1 +++ pxor %xmm2, %xmm2 +++ pxor %xmm3, %xmm3 +++#ifdef AS_STRNLEN +++ .p2align 4 +++L(loop): +++ +++ addq $64, %rax +++ cmpq %rax, %r10 +++ je L(exit_end) +++ +++ movdqa (%rax), %xmm0 +++ PMINU 16(%rax), %xmm0 +++ PMINU 32(%rax), %xmm0 +++ PMINU 48(%rax), %xmm0 +++ PCMPEQ %xmm3, %xmm0 +++ pmovmskb %xmm0, %edx +++ testl %edx, %edx +++ jne L(exit) +++ jmp L(loop) +++ +++ .p2align 4 +++L(exit_end): +++ cmp %rax, %r11 +++ je L(first) /* Do not read when end is at page boundary. */ +++ pxor %xmm0, %xmm0 +++ FIND_ZERO +++ +++L(first): +++ bts %r11, %rdx +++ bsfq %rdx, %rdx +++ addq %rdx, %rax +++ subq %rdi, %rax +++ SHIFT_RETURN +++ ret +++ +++ .p2align 4 +++L(exit): +++ pxor %xmm0, %xmm0 +++ FIND_ZERO +++ +++ bsfq %rdx, %rdx +++ addq %rdx, %rax +++ subq %rdi, %rax +++ SHIFT_RETURN +++ ret +++ +++#else +++ +++ /* Main loop. Unrolled twice to improve L2 cache performance on core2. */ +++ .p2align 4 +++L(loop): +++ +++ movdqa 64(%rax), %xmm0 +++ PMINU 80(%rax), %xmm0 +++ PMINU 96(%rax), %xmm0 +++ PMINU 112(%rax), %xmm0 +++ PCMPEQ %xmm3, %xmm0 +++ pmovmskb %xmm0, %edx +++ testl %edx, %edx +++ jne L(exit64) +++ +++ subq $-128, %rax +++ +++ movdqa (%rax), %xmm0 +++ PMINU 16(%rax), %xmm0 +++ PMINU 32(%rax), %xmm0 +++ PMINU 48(%rax), %xmm0 +++ PCMPEQ %xmm3, %xmm0 +++ pmovmskb %xmm0, %edx +++ testl %edx, %edx +++ jne L(exit0) +++ jmp L(loop) +++ +++ .p2align 4 +++L(exit64): +++ addq $64, %rax +++L(exit0): +++ pxor %xmm0, %xmm0 +++ FIND_ZERO +++ +++ bsfq %rdx, %rdx +++ addq %rdx, %rax +++ subq %rdi, %rax +++ SHIFT_RETURN +++ ret +++ +++#endif +++ +++END(strlen) ++diff --git a/sysdeps/x86_64/multiarch/strncat-avx2-rtm.S b/sysdeps/x86_64/multiarch/strncat-avx2-rtm.S ++new file mode 100644 ++index 0000000000..0dcea18dbb ++--- /dev/null +++++ b/sysdeps/x86_64/multiarch/strncat-avx2-rtm.S ++@@ -0,0 +1,3 @@ +++#define USE_AS_STRNCAT +++#define STRCAT __strncat_avx2_rtm +++#include "strcat-avx2-rtm.S" ++diff --git a/sysdeps/x86_64/multiarch/strncat-evex.S b/sysdeps/x86_64/multiarch/strncat-evex.S ++new file mode 100644 ++index 0000000000..8884f02371 ++--- /dev/null +++++ b/sysdeps/x86_64/multiarch/strncat-evex.S ++@@ -0,0 +1,3 @@ +++#define USE_AS_STRNCAT +++#define STRCAT __strncat_evex +++#include "strcat-evex.S" ++diff --git a/sysdeps/x86_64/multiarch/strncmp-avx2-rtm.S b/sysdeps/x86_64/multiarch/strncmp-avx2-rtm.S ++new file mode 100644 ++index 0000000000..68bad365ba ++--- /dev/null +++++ b/sysdeps/x86_64/multiarch/strncmp-avx2-rtm.S ++@@ -0,0 +1,4 @@ +++#define STRCMP __strncmp_avx2_rtm +++#define USE_AS_STRNCMP 1 +++#define OVERFLOW_STRCMP __strcmp_avx2_rtm +++#include "strcmp-avx2-rtm.S" ++diff --git a/sysdeps/x86_64/multiarch/strncmp-avx2.S b/sysdeps/x86_64/multiarch/strncmp-avx2.S ++index 1678bcc235..f138e9f1fd 100644 ++--- a/sysdeps/x86_64/multiarch/strncmp-avx2.S +++++ b/sysdeps/x86_64/multiarch/strncmp-avx2.S ++@@ -1,3 +1,4 @@ ++ #define STRCMP __strncmp_avx2 ++ #define USE_AS_STRNCMP 1 +++#define OVERFLOW_STRCMP __strcmp_avx2 ++ #include "strcmp-avx2.S" ++diff --git a/sysdeps/x86_64/multiarch/strncmp-evex.S b/sysdeps/x86_64/multiarch/strncmp-evex.S ++new file mode 100644 ++index 0000000000..a1d53e8c9f ++--- /dev/null +++++ b/sysdeps/x86_64/multiarch/strncmp-evex.S ++@@ -0,0 +1,3 @@ +++#define STRCMP __strncmp_evex +++#define USE_AS_STRNCMP 1 +++#include "strcmp-evex.S" ++diff --git a/sysdeps/x86_64/multiarch/strncmp.c b/sysdeps/x86_64/multiarch/strncmp.c ++index 6b63b0ac29..dee2a41b02 100644 ++--- a/sysdeps/x86_64/multiarch/strncmp.c +++++ b/sysdeps/x86_64/multiarch/strncmp.c ++@@ -30,16 +30,29 @@ extern __typeof (REDIRECT_NAME) OPTIMIZE (sse2) attribute_hidden; ++ extern __typeof (REDIRECT_NAME) OPTIMIZE (ssse3) attribute_hidden; ++ extern __typeof (REDIRECT_NAME) OPTIMIZE (sse42) attribute_hidden; ++ extern __typeof (REDIRECT_NAME) OPTIMIZE (avx2) attribute_hidden; +++extern __typeof (REDIRECT_NAME) OPTIMIZE (avx2_rtm) attribute_hidden; +++extern __typeof (REDIRECT_NAME) OPTIMIZE (evex) attribute_hidden; ++ ++ static inline void * ++ IFUNC_SELECTOR (void) ++ { ++ const struct cpu_features* cpu_features = __get_cpu_features (); ++ ++- if (!CPU_FEATURES_ARCH_P (cpu_features, Prefer_No_VZEROUPPER) ++- && CPU_FEATURES_ARCH_P (cpu_features, AVX2_Usable) +++ if (CPU_FEATURES_ARCH_P (cpu_features, AVX2_Usable) ++ && CPU_FEATURES_ARCH_P (cpu_features, AVX_Fast_Unaligned_Load)) ++- return OPTIMIZE (avx2); +++ { +++ if (CPU_FEATURES_ARCH_P (cpu_features, AVX512VL_Usable) +++ && CPU_FEATURES_ARCH_P (cpu_features, AVX512BW_Usable) +++ && CPU_FEATURES_CPU_P (cpu_features, BMI2) +++ && !CPU_FEATURES_ARCH_P (cpu_features, Prefer_AVX2_STRCMP)) +++ return OPTIMIZE (evex); +++ +++ if (CPU_FEATURES_CPU_P (cpu_features, RTM)) +++ return OPTIMIZE (avx2_rtm); +++ +++ if (!CPU_FEATURES_ARCH_P (cpu_features, Prefer_No_VZEROUPPER)) +++ return OPTIMIZE (avx2); +++ } ++ ++ if (CPU_FEATURES_CPU_P (cpu_features, SSE4_2) ++ && !CPU_FEATURES_ARCH_P (cpu_features, Slow_SSE4_2)) ++diff --git a/sysdeps/x86_64/multiarch/strncpy-avx2-rtm.S b/sysdeps/x86_64/multiarch/strncpy-avx2-rtm.S ++new file mode 100644 ++index 0000000000..79e7083299 ++--- /dev/null +++++ b/sysdeps/x86_64/multiarch/strncpy-avx2-rtm.S ++@@ -0,0 +1,3 @@ +++#define USE_AS_STRNCPY +++#define STRCPY __strncpy_avx2_rtm +++#include "strcpy-avx2-rtm.S" ++diff --git a/sysdeps/x86_64/multiarch/strncpy-evex.S b/sysdeps/x86_64/multiarch/strncpy-evex.S ++new file mode 100644 ++index 0000000000..40e391f0da ++--- /dev/null +++++ b/sysdeps/x86_64/multiarch/strncpy-evex.S ++@@ -0,0 +1,3 @@ +++#define USE_AS_STRNCPY +++#define STRCPY __strncpy_evex +++#include "strcpy-evex.S" ++diff --git a/sysdeps/x86_64/multiarch/strnlen-avx2-rtm.S b/sysdeps/x86_64/multiarch/strnlen-avx2-rtm.S ++new file mode 100644 ++index 0000000000..04f1626a5c ++--- /dev/null +++++ b/sysdeps/x86_64/multiarch/strnlen-avx2-rtm.S ++@@ -0,0 +1,4 @@ +++#define STRLEN __strnlen_avx2_rtm +++#define USE_AS_STRNLEN 1 +++ +++#include "strlen-avx2-rtm.S" ++diff --git a/sysdeps/x86_64/multiarch/strnlen-evex.S b/sysdeps/x86_64/multiarch/strnlen-evex.S ++new file mode 100644 ++index 0000000000..722022f303 ++--- /dev/null +++++ b/sysdeps/x86_64/multiarch/strnlen-evex.S ++@@ -0,0 +1,4 @@ +++#define STRLEN __strnlen_evex +++#define USE_AS_STRNLEN 1 +++ +++#include "strlen-evex.S" ++diff --git a/sysdeps/x86_64/multiarch/strrchr-avx2-rtm.S b/sysdeps/x86_64/multiarch/strrchr-avx2-rtm.S ++new file mode 100644 ++index 0000000000..5def14ec1c ++--- /dev/null +++++ b/sysdeps/x86_64/multiarch/strrchr-avx2-rtm.S ++@@ -0,0 +1,12 @@ +++#ifndef STRRCHR +++# define STRRCHR __strrchr_avx2_rtm +++#endif +++ +++#define ZERO_UPPER_VEC_REGISTERS_RETURN \ +++ ZERO_UPPER_VEC_REGISTERS_RETURN_XTEST +++ +++#define VZEROUPPER_RETURN jmp L(return_vzeroupper) +++ +++#define SECTION(p) p##.avx.rtm +++ +++#include "strrchr-avx2.S" ++diff --git a/sysdeps/x86_64/multiarch/strrchr-avx2.S b/sysdeps/x86_64/multiarch/strrchr-avx2.S ++index 23077b4c45..bfb860ebba 100644 ++--- a/sysdeps/x86_64/multiarch/strrchr-avx2.S +++++ b/sysdeps/x86_64/multiarch/strrchr-avx2.S ++@@ -36,9 +36,13 @@ ++ # define VZEROUPPER vzeroupper ++ # endif ++ +++# ifndef SECTION +++# define SECTION(p) p##.avx +++# endif +++ ++ # define VEC_SIZE 32 ++ ++- .section .text.avx,"ax",@progbits +++ .section SECTION(.text),"ax",@progbits ++ ENTRY (STRRCHR) ++ movd %esi, %xmm4 ++ movl %edi, %ecx ++@@ -166,8 +170,8 @@ L(return_value): ++ # endif ++ bsrl %eax, %eax ++ leaq -VEC_SIZE(%rdi, %rax), %rax ++- VZEROUPPER ++- ret +++L(return_vzeroupper): +++ ZERO_UPPER_VEC_REGISTERS_RETURN ++ ++ .p2align 4 ++ L(match): ++@@ -198,8 +202,7 @@ L(find_nul): ++ jz L(return_value) ++ bsrl %eax, %eax ++ leaq -VEC_SIZE(%rdi, %rax), %rax ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ ++ .p2align 4 ++ L(char_and_nul): ++@@ -222,14 +225,12 @@ L(char_and_nul_in_first_vec): ++ jz L(return_null) ++ bsrl %eax, %eax ++ leaq -VEC_SIZE(%rdi, %rax), %rax ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ ++ .p2align 4 ++ L(return_null): ++ xorl %eax, %eax ++- VZEROUPPER ++- ret +++ VZEROUPPER_RETURN ++ ++ END (STRRCHR) ++ #endif ++diff --git a/sysdeps/x86_64/multiarch/strrchr-evex.S b/sysdeps/x86_64/multiarch/strrchr-evex.S ++new file mode 100644 ++index 0000000000..f920b5a584 ++--- /dev/null +++++ b/sysdeps/x86_64/multiarch/strrchr-evex.S ++@@ -0,0 +1,265 @@ +++/* strrchr/wcsrchr optimized with 256-bit EVEX instructions. +++ Copyright (C) 2021 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 +++ . */ +++ +++#if IS_IN (libc) +++ +++# include +++ +++# ifndef STRRCHR +++# define STRRCHR __strrchr_evex +++# endif +++ +++# define VMOVU vmovdqu64 +++# define VMOVA vmovdqa64 +++ +++# ifdef USE_AS_WCSRCHR +++# define VPBROADCAST vpbroadcastd +++# define VPCMP vpcmpd +++# define SHIFT_REG r8d +++# else +++# define VPBROADCAST vpbroadcastb +++# define VPCMP vpcmpb +++# define SHIFT_REG ecx +++# endif +++ +++# define XMMZERO xmm16 +++# define YMMZERO ymm16 +++# define YMMMATCH ymm17 +++# define YMM1 ymm18 +++ +++# define VEC_SIZE 32 +++ +++ .section .text.evex,"ax",@progbits +++ENTRY (STRRCHR) +++ movl %edi, %ecx +++ /* Broadcast CHAR to YMMMATCH. */ +++ VPBROADCAST %esi, %YMMMATCH +++ +++ vpxorq %XMMZERO, %XMMZERO, %XMMZERO +++ +++ /* Check if we may cross page boundary with one vector load. */ +++ andl $(2 * VEC_SIZE - 1), %ecx +++ cmpl $VEC_SIZE, %ecx +++ ja L(cros_page_boundary) +++ +++ VMOVU (%rdi), %YMM1 +++ +++ /* Each bit in K0 represents a null byte in YMM1. */ +++ VPCMP $0, %YMMZERO, %YMM1, %k0 +++ /* Each bit in K1 represents a CHAR in YMM1. */ +++ VPCMP $0, %YMMMATCH, %YMM1, %k1 +++ kmovd %k0, %ecx +++ kmovd %k1, %eax +++ +++ addq $VEC_SIZE, %rdi +++ +++ testl %eax, %eax +++ jnz L(first_vec) +++ +++ testl %ecx, %ecx +++ jnz L(return_null) +++ +++ andq $-VEC_SIZE, %rdi +++ xorl %edx, %edx +++ jmp L(aligned_loop) +++ +++ .p2align 4 +++L(first_vec): +++ /* Check if there is a null byte. */ +++ testl %ecx, %ecx +++ jnz L(char_and_nul_in_first_vec) +++ +++ /* Remember the match and keep searching. */ +++ movl %eax, %edx +++ movq %rdi, %rsi +++ andq $-VEC_SIZE, %rdi +++ jmp L(aligned_loop) +++ +++ .p2align 4 +++L(cros_page_boundary): +++ andl $(VEC_SIZE - 1), %ecx +++ andq $-VEC_SIZE, %rdi +++ +++# ifdef USE_AS_WCSRCHR +++ /* NB: Divide shift count by 4 since each bit in K1 represent 4 +++ bytes. */ +++ movl %ecx, %SHIFT_REG +++ sarl $2, %SHIFT_REG +++# endif +++ +++ VMOVA (%rdi), %YMM1 +++ +++ /* Each bit in K0 represents a null byte in YMM1. */ +++ VPCMP $0, %YMMZERO, %YMM1, %k0 +++ /* Each bit in K1 represents a CHAR in YMM1. */ +++ VPCMP $0, %YMMMATCH, %YMM1, %k1 +++ kmovd %k0, %edx +++ kmovd %k1, %eax +++ +++ shrxl %SHIFT_REG, %edx, %edx +++ shrxl %SHIFT_REG, %eax, %eax +++ addq $VEC_SIZE, %rdi +++ +++ /* Check if there is a CHAR. */ +++ testl %eax, %eax +++ jnz L(found_char) +++ +++ testl %edx, %edx +++ jnz L(return_null) +++ +++ jmp L(aligned_loop) +++ +++ .p2align 4 +++L(found_char): +++ testl %edx, %edx +++ jnz L(char_and_nul) +++ +++ /* Remember the match and keep searching. */ +++ movl %eax, %edx +++ leaq (%rdi, %rcx), %rsi +++ +++ .p2align 4 +++L(aligned_loop): +++ VMOVA (%rdi), %YMM1 +++ addq $VEC_SIZE, %rdi +++ +++ /* Each bit in K0 represents a null byte in YMM1. */ +++ VPCMP $0, %YMMZERO, %YMM1, %k0 +++ /* Each bit in K1 represents a CHAR in YMM1. */ +++ VPCMP $0, %YMMMATCH, %YMM1, %k1 +++ kmovd %k0, %ecx +++ kmovd %k1, %eax +++ orl %eax, %ecx +++ jnz L(char_nor_null) +++ +++ VMOVA (%rdi), %YMM1 +++ add $VEC_SIZE, %rdi +++ +++ /* Each bit in K0 represents a null byte in YMM1. */ +++ VPCMP $0, %YMMZERO, %YMM1, %k0 +++ /* Each bit in K1 represents a CHAR in YMM1. */ +++ VPCMP $0, %YMMMATCH, %YMM1, %k1 +++ kmovd %k0, %ecx +++ kmovd %k1, %eax +++ orl %eax, %ecx +++ jnz L(char_nor_null) +++ +++ VMOVA (%rdi), %YMM1 +++ addq $VEC_SIZE, %rdi +++ +++ /* Each bit in K0 represents a null byte in YMM1. */ +++ VPCMP $0, %YMMZERO, %YMM1, %k0 +++ /* Each bit in K1 represents a CHAR in YMM1. */ +++ VPCMP $0, %YMMMATCH, %YMM1, %k1 +++ kmovd %k0, %ecx +++ kmovd %k1, %eax +++ orl %eax, %ecx +++ jnz L(char_nor_null) +++ +++ VMOVA (%rdi), %YMM1 +++ addq $VEC_SIZE, %rdi +++ +++ /* Each bit in K0 represents a null byte in YMM1. */ +++ VPCMP $0, %YMMZERO, %YMM1, %k0 +++ /* Each bit in K1 represents a CHAR in YMM1. */ +++ VPCMP $0, %YMMMATCH, %YMM1, %k1 +++ kmovd %k0, %ecx +++ kmovd %k1, %eax +++ orl %eax, %ecx +++ jz L(aligned_loop) +++ +++ .p2align 4 +++L(char_nor_null): +++ /* Find a CHAR or a null byte in a loop. */ +++ testl %eax, %eax +++ jnz L(match) +++L(return_value): +++ testl %edx, %edx +++ jz L(return_null) +++ movl %edx, %eax +++ movq %rsi, %rdi +++ bsrl %eax, %eax +++# ifdef USE_AS_WCSRCHR +++ /* NB: Multiply wchar_t count by 4 to get the number of bytes. */ +++ leaq -VEC_SIZE(%rdi, %rax, 4), %rax +++# else +++ leaq -VEC_SIZE(%rdi, %rax), %rax +++# endif +++ ret +++ +++ .p2align 4 +++L(match): +++ /* Find a CHAR. Check if there is a null byte. */ +++ kmovd %k0, %ecx +++ testl %ecx, %ecx +++ jnz L(find_nul) +++ +++ /* Remember the match and keep searching. */ +++ movl %eax, %edx +++ movq %rdi, %rsi +++ jmp L(aligned_loop) +++ +++ .p2align 4 +++L(find_nul): +++ /* Mask out any matching bits after the null byte. */ +++ movl %ecx, %r8d +++ subl $1, %r8d +++ xorl %ecx, %r8d +++ andl %r8d, %eax +++ testl %eax, %eax +++ /* If there is no CHAR here, return the remembered one. */ +++ jz L(return_value) +++ bsrl %eax, %eax +++# ifdef USE_AS_WCSRCHR +++ /* NB: Multiply wchar_t count by 4 to get the number of bytes. */ +++ leaq -VEC_SIZE(%rdi, %rax, 4), %rax +++# else +++ leaq -VEC_SIZE(%rdi, %rax), %rax +++# endif +++ ret +++ +++ .p2align 4 +++L(char_and_nul): +++ /* Find both a CHAR and a null byte. */ +++ addq %rcx, %rdi +++ movl %edx, %ecx +++L(char_and_nul_in_first_vec): +++ /* Mask out any matching bits after the null byte. */ +++ movl %ecx, %r8d +++ subl $1, %r8d +++ xorl %ecx, %r8d +++ andl %r8d, %eax +++ testl %eax, %eax +++ /* Return null pointer if the null byte comes first. */ +++ jz L(return_null) +++ bsrl %eax, %eax +++# ifdef USE_AS_WCSRCHR +++ /* NB: Multiply wchar_t count by 4 to get the number of bytes. */ +++ leaq -VEC_SIZE(%rdi, %rax, 4), %rax +++# else +++ leaq -VEC_SIZE(%rdi, %rax), %rax +++# endif +++ ret +++ +++ .p2align 4 +++L(return_null): +++ xorl %eax, %eax +++ ret +++ +++END (STRRCHR) +++#endif ++diff --git a/sysdeps/x86_64/multiarch/wcschr-avx2-rtm.S b/sysdeps/x86_64/multiarch/wcschr-avx2-rtm.S ++new file mode 100644 ++index 0000000000..d49dbbf0b4 ++--- /dev/null +++++ b/sysdeps/x86_64/multiarch/wcschr-avx2-rtm.S ++@@ -0,0 +1,3 @@ +++#define STRCHR __wcschr_avx2_rtm +++#define USE_AS_WCSCHR 1 +++#include "strchr-avx2-rtm.S" ++diff --git a/sysdeps/x86_64/multiarch/wcschr-evex.S b/sysdeps/x86_64/multiarch/wcschr-evex.S ++new file mode 100644 ++index 0000000000..7cb8f1e41a ++--- /dev/null +++++ b/sysdeps/x86_64/multiarch/wcschr-evex.S ++@@ -0,0 +1,3 @@ +++#define STRCHR __wcschr_evex +++#define USE_AS_WCSCHR 1 +++#include "strchr-evex.S" ++diff --git a/sysdeps/x86_64/multiarch/wcscmp-avx2-rtm.S b/sysdeps/x86_64/multiarch/wcscmp-avx2-rtm.S ++new file mode 100644 ++index 0000000000..d6ca2b8064 ++--- /dev/null +++++ b/sysdeps/x86_64/multiarch/wcscmp-avx2-rtm.S ++@@ -0,0 +1,4 @@ +++#define STRCMP __wcscmp_avx2_rtm +++#define USE_AS_WCSCMP 1 +++ +++#include "strcmp-avx2-rtm.S" ++diff --git a/sysdeps/x86_64/multiarch/wcscmp-evex.S b/sysdeps/x86_64/multiarch/wcscmp-evex.S ++new file mode 100644 ++index 0000000000..42e73e51eb ++--- /dev/null +++++ b/sysdeps/x86_64/multiarch/wcscmp-evex.S ++@@ -0,0 +1,4 @@ +++#define STRCMP __wcscmp_evex +++#define USE_AS_WCSCMP 1 +++ +++#include "strcmp-evex.S" ++diff --git a/sysdeps/x86_64/multiarch/wcslen-avx2-rtm.S b/sysdeps/x86_64/multiarch/wcslen-avx2-rtm.S ++new file mode 100644 ++index 0000000000..35658d7365 ++--- /dev/null +++++ b/sysdeps/x86_64/multiarch/wcslen-avx2-rtm.S ++@@ -0,0 +1,4 @@ +++#define STRLEN __wcslen_avx2_rtm +++#define USE_AS_WCSLEN 1 +++ +++#include "strlen-avx2-rtm.S" ++diff --git a/sysdeps/x86_64/multiarch/wcslen-evex.S b/sysdeps/x86_64/multiarch/wcslen-evex.S ++new file mode 100644 ++index 0000000000..bdafa83bd5 ++--- /dev/null +++++ b/sysdeps/x86_64/multiarch/wcslen-evex.S ++@@ -0,0 +1,4 @@ +++#define STRLEN __wcslen_evex +++#define USE_AS_WCSLEN 1 +++ +++#include "strlen-evex.S" ++diff --git a/sysdeps/x86_64/multiarch/wcslen-sse4_1.S b/sysdeps/x86_64/multiarch/wcslen-sse4_1.S ++new file mode 100644 ++index 0000000000..7e62621afc ++--- /dev/null +++++ b/sysdeps/x86_64/multiarch/wcslen-sse4_1.S ++@@ -0,0 +1,4 @@ +++#define AS_WCSLEN +++#define strlen __wcslen_sse4_1 +++ +++#include "strlen-vec.S" ++diff --git a/sysdeps/x86_64/multiarch/wcslen.c b/sysdeps/x86_64/multiarch/wcslen.c ++index bb97438c7f..26b5fdffd6 100644 ++--- a/sysdeps/x86_64/multiarch/wcslen.c +++++ b/sysdeps/x86_64/multiarch/wcslen.c ++@@ -24,7 +24,7 @@ ++ # undef __wcslen ++ ++ # define SYMBOL_NAME wcslen ++-# include "ifunc-avx2.h" +++# include "ifunc-wcslen.h" ++ ++ libc_ifunc_redirected (__redirect_wcslen, __wcslen, IFUNC_SELECTOR ()); ++ weak_alias (__wcslen, wcslen); ++diff --git a/sysdeps/x86_64/multiarch/wcsncmp-avx2-rtm.S b/sysdeps/x86_64/multiarch/wcsncmp-avx2-rtm.S ++new file mode 100644 ++index 0000000000..f467582cbe ++--- /dev/null +++++ b/sysdeps/x86_64/multiarch/wcsncmp-avx2-rtm.S ++@@ -0,0 +1,5 @@ +++#define STRCMP __wcsncmp_avx2_rtm +++#define USE_AS_STRNCMP 1 +++#define USE_AS_WCSCMP 1 +++#define OVERFLOW_STRCMP __wcscmp_avx2_rtm +++#include "strcmp-avx2-rtm.S" ++diff --git a/sysdeps/x86_64/multiarch/wcsncmp-avx2.S b/sysdeps/x86_64/multiarch/wcsncmp-avx2.S ++index 4fa1de4d3f..e9ede522b8 100644 ++--- a/sysdeps/x86_64/multiarch/wcsncmp-avx2.S +++++ b/sysdeps/x86_64/multiarch/wcsncmp-avx2.S ++@@ -1,5 +1,5 @@ ++ #define STRCMP __wcsncmp_avx2 ++ #define USE_AS_STRNCMP 1 ++ #define USE_AS_WCSCMP 1 ++- +++#define OVERFLOW_STRCMP __wcscmp_avx2 ++ #include "strcmp-avx2.S" ++diff --git a/sysdeps/x86_64/multiarch/wcsncmp-evex.S b/sysdeps/x86_64/multiarch/wcsncmp-evex.S ++new file mode 100644 ++index 0000000000..8a8e310713 ++--- /dev/null +++++ b/sysdeps/x86_64/multiarch/wcsncmp-evex.S ++@@ -0,0 +1,5 @@ +++#define STRCMP __wcsncmp_evex +++#define USE_AS_STRNCMP 1 +++#define USE_AS_WCSCMP 1 +++ +++#include "strcmp-evex.S" ++diff --git a/sysdeps/x86_64/multiarch/wcsnlen-avx2-rtm.S b/sysdeps/x86_64/multiarch/wcsnlen-avx2-rtm.S ++new file mode 100644 ++index 0000000000..7437ebee2d ++--- /dev/null +++++ b/sysdeps/x86_64/multiarch/wcsnlen-avx2-rtm.S ++@@ -0,0 +1,5 @@ +++#define STRLEN __wcsnlen_avx2_rtm +++#define USE_AS_WCSLEN 1 +++#define USE_AS_STRNLEN 1 +++ +++#include "strlen-avx2-rtm.S" ++diff --git a/sysdeps/x86_64/multiarch/wcsnlen-evex.S b/sysdeps/x86_64/multiarch/wcsnlen-evex.S ++new file mode 100644 ++index 0000000000..24773bb4e2 ++--- /dev/null +++++ b/sysdeps/x86_64/multiarch/wcsnlen-evex.S ++@@ -0,0 +1,5 @@ +++#define STRLEN __wcsnlen_evex +++#define USE_AS_WCSLEN 1 +++#define USE_AS_STRNLEN 1 +++ +++#include "strlen-evex.S" ++diff --git a/sysdeps/x86_64/multiarch/wcsnlen-sse4_1.S b/sysdeps/x86_64/multiarch/wcsnlen-sse4_1.S ++index a8cab0cb00..5fa51fe07c 100644 ++--- a/sysdeps/x86_64/multiarch/wcsnlen-sse4_1.S +++++ b/sysdeps/x86_64/multiarch/wcsnlen-sse4_1.S ++@@ -2,4 +2,4 @@ ++ #define AS_STRNLEN ++ #define strlen __wcsnlen_sse4_1 ++ ++-#include "../strlen.S" +++#include "strlen-vec.S" ++diff --git a/sysdeps/x86_64/multiarch/wcsnlen.c b/sysdeps/x86_64/multiarch/wcsnlen.c ++index 8c1fc1a574..f15c1b328b 100644 ++--- a/sysdeps/x86_64/multiarch/wcsnlen.c +++++ b/sysdeps/x86_64/multiarch/wcsnlen.c ++@@ -24,27 +24,7 @@ ++ # undef __wcsnlen ++ ++ # define SYMBOL_NAME wcsnlen ++-# include ++- ++-extern __typeof (REDIRECT_NAME) OPTIMIZE (sse2) attribute_hidden; ++-extern __typeof (REDIRECT_NAME) OPTIMIZE (sse4_1) attribute_hidden; ++-extern __typeof (REDIRECT_NAME) OPTIMIZE (avx2) attribute_hidden; ++- ++-static inline void * ++-IFUNC_SELECTOR (void) ++-{ ++- const struct cpu_features* cpu_features = __get_cpu_features (); ++- ++- if (!CPU_FEATURES_ARCH_P (cpu_features, Prefer_No_VZEROUPPER) ++- && CPU_FEATURES_ARCH_P (cpu_features, AVX2_Usable) ++- && CPU_FEATURES_ARCH_P (cpu_features, AVX_Fast_Unaligned_Load)) ++- return OPTIMIZE (avx2); ++- ++- if (CPU_FEATURES_CPU_P (cpu_features, SSE4_1)) ++- return OPTIMIZE (sse4_1); ++- ++- return OPTIMIZE (sse2); ++-} +++# include "ifunc-wcslen.h" ++ ++ libc_ifunc_redirected (__redirect_wcsnlen, __wcsnlen, IFUNC_SELECTOR ()); ++ weak_alias (__wcsnlen, wcsnlen); ++diff --git a/sysdeps/x86_64/multiarch/wcsrchr-avx2-rtm.S b/sysdeps/x86_64/multiarch/wcsrchr-avx2-rtm.S ++new file mode 100644 ++index 0000000000..9bf760833f ++--- /dev/null +++++ b/sysdeps/x86_64/multiarch/wcsrchr-avx2-rtm.S ++@@ -0,0 +1,3 @@ +++#define STRRCHR __wcsrchr_avx2_rtm +++#define USE_AS_WCSRCHR 1 +++#include "strrchr-avx2-rtm.S" ++diff --git a/sysdeps/x86_64/multiarch/wcsrchr-evex.S b/sysdeps/x86_64/multiarch/wcsrchr-evex.S ++new file mode 100644 ++index 0000000000..c64602f7dc ++--- /dev/null +++++ b/sysdeps/x86_64/multiarch/wcsrchr-evex.S ++@@ -0,0 +1,3 @@ +++#define STRRCHR __wcsrchr_evex +++#define USE_AS_WCSRCHR 1 +++#include "strrchr-evex.S" ++diff --git a/sysdeps/x86_64/multiarch/wmemchr-avx2-rtm.S b/sysdeps/x86_64/multiarch/wmemchr-avx2-rtm.S ++new file mode 100644 ++index 0000000000..58ed21db01 ++--- /dev/null +++++ b/sysdeps/x86_64/multiarch/wmemchr-avx2-rtm.S ++@@ -0,0 +1,4 @@ +++#define MEMCHR __wmemchr_avx2_rtm +++#define USE_AS_WMEMCHR 1 +++ +++#include "memchr-avx2-rtm.S" ++diff --git a/sysdeps/x86_64/multiarch/wmemchr-evex.S b/sysdeps/x86_64/multiarch/wmemchr-evex.S ++new file mode 100644 ++index 0000000000..06cd0f9f5a ++--- /dev/null +++++ b/sysdeps/x86_64/multiarch/wmemchr-evex.S ++@@ -0,0 +1,4 @@ +++#define MEMCHR __wmemchr_evex +++#define USE_AS_WMEMCHR 1 +++ +++#include "memchr-evex.S" ++diff --git a/sysdeps/x86_64/multiarch/wmemcmp-avx2-movbe-rtm.S b/sysdeps/x86_64/multiarch/wmemcmp-avx2-movbe-rtm.S ++new file mode 100644 ++index 0000000000..31104d1215 ++--- /dev/null +++++ b/sysdeps/x86_64/multiarch/wmemcmp-avx2-movbe-rtm.S ++@@ -0,0 +1,4 @@ +++#define MEMCMP __wmemcmp_avx2_movbe_rtm +++#define USE_AS_WMEMCMP 1 +++ +++#include "memcmp-avx2-movbe-rtm.S" ++diff --git a/sysdeps/x86_64/multiarch/wmemcmp-evex-movbe.S b/sysdeps/x86_64/multiarch/wmemcmp-evex-movbe.S ++new file mode 100644 ++index 0000000000..4726d74aa1 ++--- /dev/null +++++ b/sysdeps/x86_64/multiarch/wmemcmp-evex-movbe.S ++@@ -0,0 +1,4 @@ +++#define MEMCMP __wmemcmp_evex_movbe +++#define USE_AS_WMEMCMP 1 +++ +++#include "memcmp-evex-movbe.S" ++diff --git a/sysdeps/x86_64/strlen.S b/sysdeps/x86_64/strlen.S ++index 2e226d0d55..8422c15cc8 100644 ++--- a/sysdeps/x86_64/strlen.S +++++ b/sysdeps/x86_64/strlen.S ++@@ -1,5 +1,5 @@ ++-/* SSE2 version of strlen/wcslen. ++- Copyright (C) 2012-2020 Free Software Foundation, Inc. +++/* SSE2 version of strlen. +++ Copyright (C) 2021 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 ++@@ -16,243 +16,6 @@ ++ License along with the GNU C Library; if not, see ++ . */ ++ ++-#include +++#include "multiarch/strlen-vec.S" ++ ++-#ifdef AS_WCSLEN ++-# define PMINU pminud ++-# define PCMPEQ pcmpeqd ++-# define SHIFT_RETURN shrq $2, %rax ++-#else ++-# define PMINU pminub ++-# define PCMPEQ pcmpeqb ++-# define SHIFT_RETURN ++-#endif ++- ++-/* Long lived register in strlen(s), strnlen(s, n) are: ++- ++- %xmm3 - zero ++- %rdi - s ++- %r10 (s+n) & (~(64-1)) ++- %r11 s+n ++-*/ ++- ++- ++-.text ++-ENTRY(strlen) ++- ++-/* Test 64 bytes from %rax for zero. Save result as bitmask in %rdx. */ ++-#define FIND_ZERO \ ++- PCMPEQ (%rax), %xmm0; \ ++- PCMPEQ 16(%rax), %xmm1; \ ++- PCMPEQ 32(%rax), %xmm2; \ ++- PCMPEQ 48(%rax), %xmm3; \ ++- pmovmskb %xmm0, %esi; \ ++- pmovmskb %xmm1, %edx; \ ++- pmovmskb %xmm2, %r8d; \ ++- pmovmskb %xmm3, %ecx; \ ++- salq $16, %rdx; \ ++- salq $16, %rcx; \ ++- orq %rsi, %rdx; \ ++- orq %r8, %rcx; \ ++- salq $32, %rcx; \ ++- orq %rcx, %rdx; ++- ++-#ifdef AS_STRNLEN ++-/* Do not read anything when n==0. */ ++- test %RSI_LP, %RSI_LP ++- jne L(n_nonzero) ++- xor %rax, %rax ++- ret ++-L(n_nonzero): ++-# ifdef AS_WCSLEN ++- shl $2, %RSI_LP ++-# endif ++- ++-/* Initialize long lived registers. */ ++- ++- add %RDI_LP, %RSI_LP ++- mov %RSI_LP, %R10_LP ++- and $-64, %R10_LP ++- mov %RSI_LP, %R11_LP ++-#endif ++- ++- pxor %xmm0, %xmm0 ++- pxor %xmm1, %xmm1 ++- pxor %xmm2, %xmm2 ++- pxor %xmm3, %xmm3 ++- movq %rdi, %rax ++- movq %rdi, %rcx ++- andq $4095, %rcx ++-/* Offsets 4032-4047 will be aligned into 4032 thus fit into page. */ ++- cmpq $4047, %rcx ++-/* We cannot unify this branching as it would be ~6 cycles slower. */ ++- ja L(cross_page) ++- ++-#ifdef AS_STRNLEN ++-/* Test if end is among first 64 bytes. */ ++-# define STRNLEN_PROLOG \ ++- mov %r11, %rsi; \ ++- subq %rax, %rsi; \ ++- andq $-64, %rax; \ ++- testq $-64, %rsi; \ ++- je L(strnlen_ret) ++-#else ++-# define STRNLEN_PROLOG andq $-64, %rax; ++-#endif ++- ++-/* Ignore bits in mask that come before start of string. */ ++-#define PROLOG(lab) \ ++- movq %rdi, %rcx; \ ++- xorq %rax, %rcx; \ ++- STRNLEN_PROLOG; \ ++- sarq %cl, %rdx; \ ++- test %rdx, %rdx; \ ++- je L(lab); \ ++- bsfq %rdx, %rax; \ ++- SHIFT_RETURN; \ ++- ret ++- ++-#ifdef AS_STRNLEN ++- andq $-16, %rax ++- FIND_ZERO ++-#else ++- /* Test first 16 bytes unaligned. */ ++- movdqu (%rax), %xmm4 ++- PCMPEQ %xmm0, %xmm4 ++- pmovmskb %xmm4, %edx ++- test %edx, %edx ++- je L(next48_bytes) ++- bsf %edx, %eax /* If eax is zeroed 16bit bsf can be used. */ ++- SHIFT_RETURN ++- ret ++- ++-L(next48_bytes): ++-/* Same as FIND_ZERO except we do not check first 16 bytes. */ ++- andq $-16, %rax ++- PCMPEQ 16(%rax), %xmm1 ++- PCMPEQ 32(%rax), %xmm2 ++- PCMPEQ 48(%rax), %xmm3 ++- pmovmskb %xmm1, %edx ++- pmovmskb %xmm2, %r8d ++- pmovmskb %xmm3, %ecx ++- salq $16, %rdx ++- salq $16, %rcx ++- orq %r8, %rcx ++- salq $32, %rcx ++- orq %rcx, %rdx ++-#endif ++- ++- /* When no zero byte is found xmm1-3 are zero so we do not have to ++- zero them. */ ++- PROLOG(loop) ++- ++- .p2align 4 ++-L(cross_page): ++- andq $-64, %rax ++- FIND_ZERO ++- PROLOG(loop_init) ++- ++-#ifdef AS_STRNLEN ++-/* We must do this check to correctly handle strnlen (s, -1). */ ++-L(strnlen_ret): ++- bts %rsi, %rdx ++- sarq %cl, %rdx ++- test %rdx, %rdx ++- je L(loop_init) ++- bsfq %rdx, %rax ++- SHIFT_RETURN ++- ret ++-#endif ++- .p2align 4 ++-L(loop_init): ++- pxor %xmm1, %xmm1 ++- pxor %xmm2, %xmm2 ++- pxor %xmm3, %xmm3 ++-#ifdef AS_STRNLEN ++- .p2align 4 ++-L(loop): ++- ++- addq $64, %rax ++- cmpq %rax, %r10 ++- je L(exit_end) ++- ++- movdqa (%rax), %xmm0 ++- PMINU 16(%rax), %xmm0 ++- PMINU 32(%rax), %xmm0 ++- PMINU 48(%rax), %xmm0 ++- PCMPEQ %xmm3, %xmm0 ++- pmovmskb %xmm0, %edx ++- testl %edx, %edx ++- jne L(exit) ++- jmp L(loop) ++- ++- .p2align 4 ++-L(exit_end): ++- cmp %rax, %r11 ++- je L(first) /* Do not read when end is at page boundary. */ ++- pxor %xmm0, %xmm0 ++- FIND_ZERO ++- ++-L(first): ++- bts %r11, %rdx ++- bsfq %rdx, %rdx ++- addq %rdx, %rax ++- subq %rdi, %rax ++- SHIFT_RETURN ++- ret ++- ++- .p2align 4 ++-L(exit): ++- pxor %xmm0, %xmm0 ++- FIND_ZERO ++- ++- bsfq %rdx, %rdx ++- addq %rdx, %rax ++- subq %rdi, %rax ++- SHIFT_RETURN ++- ret ++- ++-#else ++- ++- /* Main loop. Unrolled twice to improve L2 cache performance on core2. */ ++- .p2align 4 ++-L(loop): ++- ++- movdqa 64(%rax), %xmm0 ++- PMINU 80(%rax), %xmm0 ++- PMINU 96(%rax), %xmm0 ++- PMINU 112(%rax), %xmm0 ++- PCMPEQ %xmm3, %xmm0 ++- pmovmskb %xmm0, %edx ++- testl %edx, %edx ++- jne L(exit64) ++- ++- subq $-128, %rax ++- ++- movdqa (%rax), %xmm0 ++- PMINU 16(%rax), %xmm0 ++- PMINU 32(%rax), %xmm0 ++- PMINU 48(%rax), %xmm0 ++- PCMPEQ %xmm3, %xmm0 ++- pmovmskb %xmm0, %edx ++- testl %edx, %edx ++- jne L(exit0) ++- jmp L(loop) ++- ++- .p2align 4 ++-L(exit64): ++- addq $64, %rax ++-L(exit0): ++- pxor %xmm0, %xmm0 ++- FIND_ZERO ++- ++- bsfq %rdx, %rdx ++- addq %rdx, %rax ++- subq %rdi, %rax ++- SHIFT_RETURN ++- ret ++- ++-#endif ++- ++-END(strlen) ++ libc_hidden_builtin_def (strlen) ++diff --git a/sysdeps/x86_64/sysdep.h b/sysdeps/x86_64/sysdep.h ++index 0b73674f68..c8ad778fee 100644 ++--- a/sysdeps/x86_64/sysdep.h +++++ b/sysdeps/x86_64/sysdep.h ++@@ -95,6 +95,28 @@ lose: \ ++ #define R14_LP r14 ++ #define R15_LP r15 ++ +++/* Zero upper vector registers and return with xtest. NB: Use VZEROALL +++ to avoid RTM abort triggered by VZEROUPPER inside transactionally. */ +++#define ZERO_UPPER_VEC_REGISTERS_RETURN_XTEST \ +++ xtest; \ +++ jz 1f; \ +++ vzeroall; \ +++ ret; \ +++1: \ +++ vzeroupper; \ +++ ret +++ +++/* Zero upper vector registers and return. */ +++#ifndef ZERO_UPPER_VEC_REGISTERS_RETURN +++# define ZERO_UPPER_VEC_REGISTERS_RETURN \ +++ VZEROUPPER; \ +++ ret +++#endif +++ +++#ifndef VZEROUPPER_RETURN +++# define VZEROUPPER_RETURN VZEROUPPER; ret +++#endif +++ ++ #else /* __ASSEMBLER__ */ ++ ++ /* Long and pointer size in bytes. */ ++diff --git a/sysdeps/x86_64/tst-rsi-strlen.c b/sysdeps/x86_64/tst-rsi-strlen.c ++new file mode 100644 ++index 0000000000..a80c4f85c2 ++--- /dev/null +++++ b/sysdeps/x86_64/tst-rsi-strlen.c ++@@ -0,0 +1,81 @@ +++/* Test strlen with 0 in the RSI register. +++ Copyright (C) 2021 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 +++ . */ +++ +++#ifdef WIDE +++# define TEST_NAME "wcslen" +++#else +++# define TEST_NAME "strlen" +++#endif /* WIDE */ +++ +++#define TEST_MAIN +++#include +++ +++#ifdef WIDE +++# include +++# define STRLEN wcslen +++# define CHAR wchar_t +++#else +++# define STRLEN strlen +++# define CHAR char +++#endif /* WIDE */ +++ +++IMPL (STRLEN, 1) +++ +++typedef size_t (*proto_t) (const CHAR *); +++ +++typedef struct +++{ +++ void (*fn) (void); +++} parameter_t; +++ +++size_t +++__attribute__ ((weak, noinline, noclone)) +++do_strlen (parameter_t *a, int zero, const CHAR *str) +++{ +++ return CALL (a, str); +++} +++ +++static int +++test_main (void) +++{ +++ test_init (); +++ +++ size_t size = page_size / sizeof (CHAR) - 1; +++ CHAR *buf = (CHAR *) buf2; +++ buf[size] = 0; +++ +++ parameter_t a; +++ +++ int ret = 0; +++ FOR_EACH_IMPL (impl, 0) +++ { +++ a.fn = impl->fn; +++ /* NB: Pass 0 in RSI. */ +++ size_t res = do_strlen (&a, 0, buf); +++ if (res != size) +++ { +++ error (0, 0, "Wrong result in function %s: %zu != %zu", +++ impl->name, res, size); +++ ret = 1; +++ } +++ } +++ +++ return ret ? EXIT_FAILURE : EXIT_SUCCESS; +++} +++ +++#include ++diff --git a/sysdeps/x86_64/tst-rsi-wcslen.c b/sysdeps/x86_64/tst-rsi-wcslen.c ++new file mode 100644 ++index 0000000000..f45a7dfb51 ++--- /dev/null +++++ b/sysdeps/x86_64/tst-rsi-wcslen.c ++@@ -0,0 +1,20 @@ +++/* Test wcslen with 0 in the RSI register. +++ Copyright (C) 2021 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 +++ . */ +++ +++#define WIDE 1 +++#include "tst-rsi-strlen.c" diff --cc debian/patches/hppa/local-inlining.diff index 000000000,000000000..ea892fb54 new file mode 100644 --- /dev/null +++ b/debian/patches/hppa/local-inlining.diff @@@ -1,0 -1,0 +1,18 @@@ ++Increase the maximal overall growth of the compilation unit caused ++by inlining for dl-reloc.c on hppa. This remove some warnings and ++strangely it reduces the size of the final binary. ++ ++--- ++ sysdeps/hppa/Makefile | 1 + ++ 1 file changed, 1 insertion(+) ++ ++--- a/sysdeps/hppa/Makefile +++++ b/sysdeps/hppa/Makefile ++@@ -23,6 +23,7 @@ ++ ++ ifeq ($(subdir),elf) ++ CFLAGS-rtld.c += -mdisable-fpregs +++CFLAGS-dl-reloc.c += --param inline-unit-growth=100 ++ sysdep-dl-routines += dl-symaddr dl-fptr ++ # dl-fptr.c needs a complete rewrite to fix ISO C aliasing violations. ++ CFLAGS-dl-fptr.c = -Wno-error diff --cc debian/patches/hurd-i386/git-SEM_VALUE_MAX.diff index 000000000,000000000..19eda9c73 new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/git-SEM_VALUE_MAX.diff @@@ -1,0 -1,0 +1,19 @@@ ++Commited in 2.32 ++ ++commit 5e77ec7c6e64d67f048caa5d4dd81f10fca3dffc ++Author: Samuel Thibault ++Date: Sun Feb 9 22:44:08 2020 +0000 ++ ++ htl: Add support for semaphore maximum value ++ ++diff --git a/sysdeps/mach/hurd/bits/local_lim.h b/sysdeps/mach/hurd/bits/local_lim.h ++index 348eee74bb..8e781e4965 100644 ++--- a/sysdeps/mach/hurd/bits/local_lim.h +++++ b/sysdeps/mach/hurd/bits/local_lim.h ++@@ -41,3 +41,6 @@ ++ ++ /* The number of threads per process. */ ++ #define _POSIX_THREAD_THREADS_MAX 64 +++ +++/* Maximum value the semaphore can have. */ +++#define SEM_VALUE_MAX (2147483647) diff --cc debian/patches/hurd-i386/git-WAIT.diff index 000000000,000000000..ec4f35ca9 new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/git-WAIT.diff @@@ -1,0 -1,0 +1,42 @@@ ++Committed for 2.33 ++ ++commit c57fe5462ba5eb7331a223bbb7abd8ae273747c1 ++Author: Samuel Thibault ++Date: Mon Nov 23 00:24:03 2020 +0000 ++ ++ hurd S_msg_report_wait: Fix reporting ports ++ ++ This fixes the parameter order of MSG_EXAMINE, thus fixing the detection ++ of e.g. fd ports for nicer output in ps WAIT output. ++ ++commit dba88fb3ed3e70d2ad797f447a2a894b0891a5d7 ++Author: Samuel Thibault ++Date: Mon Nov 23 00:25:26 2020 +0000 ++ ++ hurd S_msg_report_wait: Fix detecting fd ports ++ ++ _hurd_init_dtable stays set to non-NULL, so we have to run through both ++ _hurd_init_dtable and _hurd_dtable. ++ ++diff --git a/hurd/report-wait.c b/hurd/report-wait.c ++index 487a5fb05a..752d0cc1c4 100644 ++--- a/hurd/report-wait.c +++++ b/hurd/report-wait.c ++@@ -77,7 +77,7 @@ describe_port (string_t description, mach_port_t port) ++ if (port == _hurd_init_dtable[i]) ++ return describe_number (description, "fd#", i); ++ } ++- else if (_hurd_dtable) +++ if (_hurd_dtable) ++ { ++ for (i = 0; i < _hurd_dtablesize; ++i) ++ if (_hurd_dtable[i] == NULL) ++@@ -152,7 +152,7 @@ _S_msg_report_wait (mach_port_t msgport, thread_t thread, ++ /* Blocked in a system call. */ ++ if (*msgid == -25 ++ /* mach_msg system call. Examine its parameters. */ ++- && MSG_EXAMINE (&state, msgid, &send_port, &rcv_port, +++ && MSG_EXAMINE (&state, msgid, &rcv_port, &send_port, ++ &option, &timeout) == 0) ++ { ++ char *p; diff --cc debian/patches/hurd-i386/git-barrier-1.diff index 000000000,000000000..4ba9f5590 new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/git-barrier-1.diff @@@ -1,0 -1,0 +1,23 @@@ ++Committed for glibc 2.32 ++ ++commit 29bc8736d1fdb80d2416b3920080dad58b32bf44 ++Author: Samuel Thibault ++Date: Sun Feb 9 23:02:13 2020 +0000 ++ ++ htl: Fix barrier_wait with one thread ++ ++diff --git a/sysdeps/htl/pt-barrier-wait.c b/sysdeps/htl/pt-barrier-wait.c ++index 47ec440b26..146605abd8 100644 ++--- a/sysdeps/htl/pt-barrier-wait.c +++++ b/sysdeps/htl/pt-barrier-wait.c ++@@ -29,7 +29,9 @@ pthread_barrier_wait (pthread_barrier_t *barrier) ++ { ++ barrier->__pending = barrier->__count; ++ ++- if (barrier->__count > 1) +++ if (barrier->__count == 1) +++ __pthread_spin_unlock (&barrier->__lock); +++ else ++ { ++ struct __pthread *wakeup; ++ unsigned n = 0; diff --cc debian/patches/hurd-i386/git-bsd4.3-ioctls.diff index 000000000,000000000..3ceab328c new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/git-bsd4.3-ioctls.diff @@@ -1,0 -1,0 +1,27 @@@ ++Committed for glibc 2.33 ++ ++commit cd41ffeb0bbca641a02e1030e13ab317ce7d645c ++Author: Samuel Thibault ++Date: Thu Aug 27 13:35:58 2020 +0200 ++ ++ hurd: define BSD 4.3 ioctls only under __USE_MISC ++ ++diff --git a/sysdeps/mach/hurd/bits/ioctls.h b/sysdeps/mach/hurd/bits/ioctls.h ++index eed63e759b..1226186ff9 100644 ++--- a/sysdeps/mach/hurd/bits/ioctls.h +++++ b/sysdeps/mach/hurd/bits/ioctls.h ++@@ -321,6 +321,7 @@ enum __ioctl_datum { IOC_8, IOC_16, IOC_32, IOC_64 }; ++ /* Compatibility with 4.3 BSD terminal driver. ++ From 4.4 . */ ++ +++#ifdef __USE_MISC ++ #ifdef USE_OLD_TTY ++ # undef TIOCGETD ++ # define TIOCGETD _IOR('t', 0, int) /* get line discipline */ ++@@ -428,5 +429,6 @@ enum __ioctl_datum { IOC_8, IOC_16, IOC_32, IOC_64 }; ++ # define EXTA 14 ++ # define EXTB 15 ++ #endif /* USE_OLD_TTY */ +++#endif ++ ++ #endif /* bits/ioctls.h */ diff --cc debian/patches/hurd-i386/git-clock-cputime.diff index 000000000,000000000..48f74fdba new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/git-clock-cputime.diff @@@ -1,0 -1,0 +1,110 @@@ ++Committed for glibc 2.33 ++ ++commit 5a619c1f46c49dbb9706beeb74f4a466696394fc ++Author: Samuel Thibault ++Date: Sun Oct 11 13:59:01 2020 +0000 ++ ++ hurd: support clock_gettime(CLOCK_PROCESS/THREAD_CPUTIME_ID) ++ ++ * sysdeps/mach/clock_gettime.c (__clock_gettime): Add support for ++ CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID. ++ ++diff --git a/sysdeps/mach/clock_gettime.c b/sysdeps/mach/clock_gettime.c ++index fbd80536d5..840e06036b 100644 ++--- a/sysdeps/mach/clock_gettime.c +++++ b/sysdeps/mach/clock_gettime.c ++@@ -25,20 +25,80 @@ ++ int ++ __clock_gettime (clockid_t clock_id, struct timespec *ts) ++ { ++- if (clock_id != CLOCK_REALTIME) ++- { ++- errno = EINVAL; ++- return -1; ++- } ++- ++- /* __host_get_time can only fail if passed an invalid host_t. ++- __mach_host_self could theoretically fail (producing an ++- invalid host_t) due to resource exhaustion, but we assume ++- this will never happen. */ ++- time_value_t tv; ++- __host_get_time (__mach_host_self (), &tv); ++- TIME_VALUE_TO_TIMESPEC (&tv, ts); ++- return 0; +++ mach_msg_type_number_t count; +++ error_t err; +++ +++ switch (clock_id) { +++ +++ case CLOCK_REALTIME: +++ { +++ /* __host_get_time can only fail if passed an invalid host_t. +++ __mach_host_self could theoretically fail (producing an +++ invalid host_t) due to resource exhaustion, but we assume +++ this will never happen. */ +++ time_value_t tv; +++ __host_get_time (__mach_host_self (), &tv); +++ TIME_VALUE_TO_TIMESPEC (&tv, ts); +++ return 0; +++ } +++ +++ case CLOCK_PROCESS_CPUTIME_ID: +++ { +++ struct time_value t = { .seconds = 0, .microseconds = 0 }; +++ struct task_basic_info bi; +++ struct task_thread_times_info tti; +++ +++ /* Dead threads CPU time. */ +++ count = TASK_BASIC_INFO_COUNT; +++ err = __task_info (__mach_task_self (), TASK_BASIC_INFO, +++ (task_info_t) &bi, &count); +++ if (err) +++ { +++ __set_errno(err); +++ return -1; +++ } +++ time_value_add (&t, &bi.user_time); +++ time_value_add (&t, &bi.system_time); +++ +++ /* Live threads CPU time. */ +++ count = TASK_EVENTS_INFO_COUNT; +++ err = __task_info (__mach_task_self (), TASK_THREAD_TIMES_INFO, +++ (task_info_t) &tti, &count); +++ if (err) +++ { +++ __set_errno(err); +++ return -1; +++ } +++ time_value_add (&t, &tti.user_time); +++ time_value_add (&t, &tti.system_time); +++ +++ TIME_VALUE_TO_TIMESPEC(&t, ts); +++ return 0; +++ } +++ +++ case CLOCK_THREAD_CPUTIME_ID: +++ { +++ struct thread_basic_info bi; +++ mach_port_t self = __mach_thread_self (); +++ +++ count = THREAD_BASIC_INFO_COUNT; +++ err = __thread_info (self, THREAD_BASIC_INFO, +++ (thread_info_t) &bi, &count); +++ __mach_port_deallocate (__mach_task_self (), self); +++ if (err) +++ { +++ __set_errno(err); +++ return -1; +++ } +++ time_value_add (&bi.user_time, &bi.system_time); +++ +++ TIME_VALUE_TO_TIMESPEC(&bi.user_time, ts); +++ return 0; +++ } +++ } +++ +++ errno = EINVAL; +++ return -1; ++ } ++ libc_hidden_def (__clock_gettime) ++ diff --cc debian/patches/hurd-i386/git-cond_destroy.diff index 000000000,000000000..83f6715e1 new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/git-cond_destroy.diff @@@ -1,0 -1,0 +1,162 @@@ ++Committed for glibc 2.32 ++ ++commit faae4b2bdd692d929037c80c3315f716f02f3b00 ++Author: Samuel Thibault ++Date: Sun Feb 9 19:19:25 2020 +0000 ++ ++ htl: make pthread_cond_destroy return EBUSY on waiters ++ ++diff --git a/sysdeps/htl/pt-cond-destroy.c b/sysdeps/htl/pt-cond-destroy.c ++index 62cc77b0d2..b28e7e1ada 100644 ++--- a/sysdeps/htl/pt-cond-destroy.c +++++ b/sysdeps/htl/pt-cond-destroy.c ++@@ -22,7 +22,14 @@ ++ int ++ __pthread_cond_destroy (pthread_cond_t *cond) ++ { ++- return 0; +++ int ret = 0; +++ +++ __pthread_spin_lock (&cond->__lock); +++ if (cond->__queue) +++ ret = EBUSY; +++ __pthread_spin_unlock (&cond->__lock); +++ +++ return ret; ++ } ++ ++ strong_alias (__pthread_cond_destroy, pthread_cond_destroy); ++ ++commit 8081702460726304af496be52234385094392a6f ++Author: Samuel Thibault ++Date: Mon Jun 1 17:27:48 2020 +0000 ++ ++ htl: Make pthread_cond_destroy wait for threads to be woken ++ ++ This allows to reuse the storage after calling pthread_cond_destroy. ++ ++ * sysdeps/htl/bits/types/struct___pthread_cond.h (__pthread_cond): ++ Replace unused struct __pthread_condimpl *__impl field with unsigned int ++ __wrefs. ++ (__PTHREAD_COND_INITIALIZER): Update accordingly. ++ * sysdeps/htl/pt-cond-timedwait.c (__pthread_cond_timedwait_internal): ++ Register as waiter in __wrefs field. On unregistering, wake any pending ++ pthread_cond_destroy. ++ * sysdeps/htl/pt-cond-destroy.c (__pthread_cond_destroy): Register wake ++ request in __wrefs. ++ * nptl/Makefile (tests): Move tst-cond20 tst-cond21 to... ++ * sysdeps/pthread/Makefile (tests): ... here. ++ * nptl/tst-cond20.c nptl/tst-cond21.c: Move to... ++ * sysdeps/pthread/tst-cond20.c sysdeps/pthread/tst-cond21.c: ... here. ++ ++diff --git a/sysdeps/htl/bits/types/struct___pthread_cond.h b/sysdeps/htl/bits/types/struct___pthread_cond.h ++index 150a37c4c9..c040b171ac 100644 ++--- a/sysdeps/htl/bits/types/struct___pthread_cond.h +++++ b/sysdeps/htl/bits/types/struct___pthread_cond.h ++@@ -27,12 +27,12 @@ struct __pthread_cond ++ __pthread_spinlock_t __lock; ++ struct __pthread *__queue; ++ struct __pthread_condattr *__attr; ++- struct __pthread_condimpl *__impl; +++ unsigned int __wrefs; ++ void *__data; ++ }; ++ ++ /* Initializer for a condition variable. */ ++ #define __PTHREAD_COND_INITIALIZER \ ++- { __PTHREAD_SPIN_LOCK_INITIALIZER, NULL, NULL, NULL, NULL } +++ { __PTHREAD_SPIN_LOCK_INITIALIZER, NULL, NULL, 0, NULL } ++ ++ #endif /* bits/types/struct___pthread_cond.h */ ++diff --git a/sysdeps/htl/pt-cond-destroy.c b/sysdeps/htl/pt-cond-destroy.c ++index 0664f3f6cc..722516a8e2 100644 ++--- a/sysdeps/htl/pt-cond-destroy.c +++++ b/sysdeps/htl/pt-cond-destroy.c ++@@ -22,14 +22,26 @@ ++ int ++ __pthread_cond_destroy (pthread_cond_t *cond) ++ { ++- int ret = 0; +++ /* Set the wake request flag. */ +++ unsigned int wrefs = atomic_fetch_or_acquire (&cond->__wrefs, 1); ++ ++ __pthread_spin_lock (&cond->__lock); ++ if (cond->__queue) ++- ret = EBUSY; +++ { +++ __pthread_spin_unlock (&cond->__lock); +++ return EBUSY; +++ } ++ __pthread_spin_unlock (&cond->__lock); ++ ++- return ret; +++ while (wrefs >> 1 != 0) +++ { +++ __gsync_wait (__mach_task_self (), (vm_offset_t) &cond->__wrefs, wrefs, +++ 0, 0, 0); +++ wrefs = atomic_load_acquire (&cond->__wrefs); +++ } +++ /* The memory the condvar occupies can now be reused. */ +++ +++ return 0; ++ } ++ ++ strong_alias (__pthread_cond_destroy, pthread_cond_destroy); ++diff --git a/sysdeps/htl/pt-cond-timedwait.c b/sysdeps/htl/pt-cond-timedwait.c ++index a0ced9a074..c05944d16d 100644 ++--- a/sysdeps/htl/pt-cond-timedwait.c +++++ b/sysdeps/htl/pt-cond-timedwait.c ++@@ -144,6 +144,10 @@ __pthread_cond_timedwait_internal (pthread_cond_t *cond, ++ /* Release MUTEX before blocking. */ ++ __pthread_mutex_unlock (mutex); ++ +++ /* Increase the waiter reference count. Relaxed MO is sufficient because +++ we only need to synchronize when decrementing the reference count. */ +++ atomic_fetch_add_relaxed (&cond->__wrefs, 2); +++ ++ /* Block the thread. */ ++ if (abstime != NULL) ++ err = __pthread_timedblock (self, abstime, clock_id); ++@@ -178,6 +182,13 @@ __pthread_cond_timedwait_internal (pthread_cond_t *cond, ++ } ++ __pthread_spin_unlock (&cond->__lock); ++ +++ /* If destruction is pending (i.e., the wake-request flag is nonzero) and we +++ are the last waiter (prior value of __wrefs was 1 << 1), then wake any +++ threads waiting in pthread_cond_destroy. Release MO to synchronize with +++ these threads. Don't bother clearing the wake-up request flag. */ +++ if ((atomic_fetch_add_release (&cond->__wrefs, -2)) == 3) +++ __gsync_wake (__mach_task_self (), (vm_offset_t) &cond->__wrefs, 0, 0); +++ ++ if (drain) ++ __pthread_block (self); ++ ++diff --git a/sysdeps/mach/hurd/htl/pt-hurd-cond-timedwait.c b/sysdeps/mach/hurd/htl/pt-hurd-cond-timedwait.c ++index 939ed568ba..4f63955d04 100644 ++--- a/sysdeps/mach/hurd/htl/pt-hurd-cond-timedwait.c +++++ b/sysdeps/mach/hurd/htl/pt-hurd-cond-timedwait.c ++@@ -111,6 +111,10 @@ __pthread_hurd_cond_timedwait_internal (pthread_cond_t *cond, ++ /* Release MUTEX before blocking. */ ++ __pthread_mutex_unlock (mutex); ++ +++ /* Increase the waiter reference count. Relaxed MO is sufficient because +++ we only need to synchronize when decrementing the reference count. */ +++ atomic_fetch_add_relaxed (&cond->__wrefs, 2); +++ ++ /* Block the thread. */ ++ if (abstime != NULL) ++ err = __pthread_timedblock (self, abstime, clock_id); ++@@ -144,6 +148,13 @@ __pthread_hurd_cond_timedwait_internal (pthread_cond_t *cond, ++ __pthread_block (self); ++ } ++ +++ /* If destruction is pending (i.e., the wake-request flag is nonzero) and we +++ are the last waiter (prior value of __wrefs was 1 << 1), then wake any +++ threads waiting in pthread_cond_destroy. Release MO to synchronize with +++ these threads. Don't bother clearing the wake-up request flag. */ +++ if ((atomic_fetch_add_release (&cond->__wrefs, -2)) == 3) +++ __gsync_wake (__mach_task_self (), (vm_offset_t) &cond->__wrefs, 0, 0); +++ ++ /* Clear the hook, now that we are done blocking. */ ++ ss->cancel_hook = NULL; ++ /* Check the cancellation flag; we might have unblocked due to diff --cc debian/patches/hurd-i386/git-cthreads-symbols.diff index 000000000,000000000..b2e729665 new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/git-cthreads-symbols.diff @@@ -1,0 -1,0 +1,38 @@@ ++Commited for 2.33 ++ ++commit f9ba73d056721ff61160a46438fd8ebf11d9aeee ++Author: Samuel Thibault ++Date: Thu Dec 3 10:48:27 2020 +0100 ++ ++ htl: Add missing symbols ++ ++ hurd/hurdsig.c needs to detect whether __pthread_detach and ++ __pthread_create are available, so they need to be exposed. ++ ++--- ++ htl/Versions | 2 ++ ++ hurd/Versions | 2 +- ++ 2 files changed, 3 insertions(+), 1 deletion(-) ++ ++--- a/htl/Versions +++++ b/htl/Versions ++@@ -148,6 +148,8 @@ libpthread { ++ ++ __cthread_detach; ++ __cthread_fork; +++ __pthread_detach; +++ __pthread_create; ++ __cthread_keycreate; ++ __cthread_getspecific; ++ __cthread_setspecific; ++--- a/hurd/Versions +++++ b/hurd/Versions ++@@ -144,7 +144,7 @@ libc { ++ ++ HURD_CTHREADS_0.3 { ++ # weak refs to libthreads functions that libc calls iff libthreads in use ++- __cthread_fork; __cthread_detach; +++ __cthread_fork; __pthread_create; __cthread_detach; __pthread_detach; ++ __pthread_getattr_np; __pthread_attr_getstack; ++ ++ # variables used for detecting cthreads diff --cc debian/patches/hurd-i386/git-cthreads.diff index 000000000,000000000..2c96d3551 new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/git-cthreads.diff @@@ -1,0 -1,0 +1,595 @@@ ++Commited for 2.33 ++ ++commit 9446e02b0d2e94da4ebe9df6e2c5d23adc0f1d7d ++Author: Samuel Thibault ++Date: Sat Nov 14 23:35:35 2020 +0000 ++ ++ hurd: Remove some remnants of cthreads ++ ++ Libc has actually been using mach's lock-internal.h mutex for a long ++ time already. ++ ++Index: glibc-2.31/conform/Makefile ++=================================================================== ++--- glibc-2.31.orig/conform/Makefile +++++ glibc-2.31/conform/Makefile ++@@ -189,14 +189,15 @@ $(linknamespace-symlists-tests): $(objpf ++ ++ linknamespace-libs-isoc = $(common-objpfx)libc.a $(common-objpfx)math/libm.a ++ linknamespace-libs-thr = $(linknamespace-libs-isoc) \ ++- $(common-objpfx)rt/librt.a $(static-thread-library) +++ $(common-objpfx)rt/librt.a \ +++ $(filter-out %_syms.a,$(static-thread-library)) ++ linknamespace-libs-posix = $(linknamespace-libs-thr) \ ++ $(common-objpfx)dlfcn/libdl.a ++ linknamespace-libs-xsi = $(linknamespace-libs-posix) ++ linknamespace-libs-ISO = $(linknamespace-libs-isoc) ++ linknamespace-libs-ISO99 = $(linknamespace-libs-isoc) ++ linknamespace-libs-ISO11 = $(linknamespace-libs-isoc) \ ++- $(static-thread-library) +++ $(filter-out %_syms.a,$(static-thread-library)) ++ linknamespace-libs-XPG4 = $(linknamespace-libs-isoc) ++ linknamespace-libs-XPG42 = $(linknamespace-libs-XPG4) ++ linknamespace-libs-POSIX = $(linknamespace-libs-thr) ++Index: glibc-2.31/htl/libpthread_syms.a ++=================================================================== ++--- glibc-2.31.orig/htl/libpthread_syms.a +++++ glibc-2.31/htl/libpthread_syms.a ++@@ -15,7 +15,9 @@ EXTERN(__mutex_unlock_solid) ++ EXTERN(_cthreads_flockfile) ++ EXTERN(_cthreads_funlockfile) ++ EXTERN(_cthreads_ftrylockfile) ++-/* To get the sigthread stack layout on fork */ +++/* To create the sigthread and get its stack layout on fork */ +++EXTERN(pthread_create) +++EXTERN(pthread_detach) ++ EXTERN(pthread_getattr_np) ++ EXTERN(pthread_attr_getstack) ++ EXTERN(__pthread_enable_asynccancel) ++Index: glibc-2.31/htl/lockfile.c ++=================================================================== ++--- glibc-2.31.orig/htl/lockfile.c +++++ glibc-2.31/htl/lockfile.c ++@@ -16,7 +16,6 @@ ++ License along with the GNU C Library; if not, see ++ . */ ++ ++-#include ++ #include /* Must come before ! */ ++ #include ++ ++Index: glibc-2.31/hurd/dtable.c ++=================================================================== ++--- glibc-2.31.orig/hurd/dtable.c +++++ glibc-2.31/hurd/dtable.c ++@@ -22,7 +22,7 @@ ++ #include ++ #include ++ #include ++-#include /* For `struct mutex'. */ +++#include /* For `struct mutex'. */ ++ #include "set-hooks.h" ++ #include "hurdmalloc.h" /* XXX */ ++ ++Index: glibc-2.31/hurd/hurd.h ++=================================================================== ++--- glibc-2.31.orig/hurd/hurd.h +++++ glibc-2.31/hurd/hurd.h ++@@ -102,7 +102,6 @@ extern error_t _hurd_ports_use (int whic ++ ++ ++ /* Base address and size of the initial stack set up by the exec server. ++- If using cthreads, this stack is deallocated in startup. ++ Not locked. */ ++ ++ extern vm_address_t _hurd_stack_base; ++@@ -122,9 +121,6 @@ extern int _hurd_orphaned; ++ ++ /* This variable is incremented every time the process IDs change. */ ++ extern unsigned int _hurd_pids_changed_stamp; ++- ++-/* This condition is broadcast every time the process IDs change. */ ++-extern struct condition _hurd_pids_changed_sync; ++ ++ /* Unix `data break', for brk and sbrk. ++ If brk and sbrk are not used, this info will not be initialized or used. */ ++Index: glibc-2.31/hurd/hurd/fd.h ++=================================================================== ++--- glibc-2.31.orig/hurd/hurd/fd.h +++++ glibc-2.31/hurd/hurd/fd.h ++@@ -21,8 +21,6 @@ ++ #define _HURD_FD_H 1 ++ #include ++ ++-#include ++- ++ #include ++ #include ++ #include ++@@ -47,9 +45,12 @@ struct hurd_fd ++ ++ /* Current file descriptor table. */ ++ +++#if defined __USE_EXTERN_INLINES && defined _LIBC +++#include ++ extern int _hurd_dtablesize; ++ extern struct hurd_fd **_hurd_dtable; ++ extern struct mutex _hurd_dtable_lock; /* Locks those two variables. */ +++#endif ++ ++ #include ++ ++Index: glibc-2.31/hurd/hurd/id.h ++=================================================================== ++--- glibc-2.31.orig/hurd/hurd/id.h +++++ glibc-2.31/hurd/hurd/id.h ++@@ -24,7 +24,7 @@ ++ #include ++ #include ++ ++-#include /* For `struct mutex'. */ +++#include /* For `struct mutex'. */ ++ ++ /* Structure describing authorization data for the process. */ ++ ++Index: glibc-2.31/hurd/hurd/signal.h ++=================================================================== ++--- glibc-2.31.orig/hurd/hurd/signal.h +++++ glibc-2.31/hurd/hurd/signal.h ++@@ -37,7 +37,6 @@ ++ #include ++ #include ++ ++-#include /* For `struct mutex'. */ ++ #include /* For `jmp_buf'. */ ++ #include ++ struct hurd_signal_preemptor; /* */ ++@@ -122,8 +121,6 @@ struct hurd_sigstate ++ ++ extern struct hurd_sigstate *_hurd_sigstates; ++ ++-extern struct mutex _hurd_siglock; /* Locks _hurd_sigstates. */ ++- ++ /* Get the sigstate of a given thread. If there was no sigstate for ++ the thread, one is created, and the thread gains a reference. If ++ the given thread is MACH_PORT_NULL, return the global sigstate. */ ++@@ -335,7 +332,7 @@ _hurd_setup_sighandler (struct hurd_sigs ++ ++ /* Function run by the signal thread to receive from the signal port. */ ++ ++-extern void _hurd_msgport_receive (void); +++extern void *_hurd_msgport_receive (void *arg); ++ ++ /* Set up STATE with a thread state that, when resumed, is ++ like `longjmp (_hurd_sigthread_fault_env, 1)'. */ ++Index: glibc-2.31/hurd/hurdmalloc.c ++=================================================================== ++--- glibc-2.31.orig/hurd/hurdmalloc.c +++++ glibc-2.31/hurd/hurdmalloc.c ++@@ -4,6 +4,7 @@ ++ #include "hurdmalloc.h" /* XXX see that file */ ++ ++ #include +++#include ++ #define vm_allocate __vm_allocate ++ #define vm_page_size __vm_page_size ++ ++@@ -79,8 +80,6 @@ ++ ++ #include ++ ++-#include ++- ++ #define MCHECK ++ ++ /* ++@@ -221,7 +220,7 @@ malloc (size_t size) ++ i += 1; ++ n <<= 1; ++ } ++- ASSERT(i < NBUCKETS); +++ assert(i < NBUCKETS); ++ fl = &malloc_free_list[i]; ++ spin_lock(&fl->lock); ++ h = fl->head; ++@@ -291,11 +290,11 @@ free (void *base) ++ * Sanity checks. ++ */ ++ if (i < 0 || i >= NBUCKETS) { ++- ASSERT(0 <= i && i < NBUCKETS); +++ assert(0 <= i && i < NBUCKETS); ++ return; ++ } ++ if (fl != &malloc_free_list[i]) { ++- ASSERT(fl == &malloc_free_list[i]); +++ assert(fl == &malloc_free_list[i]); ++ return; ++ } ++ /* ++@@ -340,11 +339,11 @@ realloc (void *old_base, size_t new_size ++ * Sanity checks. ++ */ ++ if (i < 0 || i >= NBUCKETS) { ++- ASSERT(0 <= i && i < NBUCKETS); +++ assert(0 <= i && i < NBUCKETS); ++ return 0; ++ } ++ if (fl != &malloc_free_list[i]) { ++- ASSERT(fl == &malloc_free_list[i]); +++ assert(fl == &malloc_free_list[i]); ++ return 0; ++ } ++ /* ++Index: glibc-2.31/hurd/hurdpid.c ++=================================================================== ++--- glibc-2.31.orig/hurd/hurdpid.c +++++ glibc-2.31/hurd/hurdpid.c ++@@ -37,13 +37,11 @@ text_set_element (_hurd_proc_subinit, in ++ ++ #include ++ #include "set-hooks.h" ++-#include ++ ++ DEFINE_HOOK (_hurd_pgrp_changed_hook, (pid_t)); ++ ++ /* These let user threads synchronize with an operation which changes ids. */ ++ unsigned int _hurd_pids_changed_stamp; ++-struct condition _hurd_pids_changed_sync; ++ ++ kern_return_t ++ _S_msg_proc_newids (mach_port_t me, ++Index: glibc-2.31/hurd/hurdrlimit.c ++=================================================================== ++--- glibc-2.31.orig/hurd/hurdrlimit.c +++++ glibc-2.31/hurd/hurdrlimit.c ++@@ -17,7 +17,7 @@ ++ . */ ++ ++ #include ++-#include +++#include ++ #include ++ ++ /* This must be given an initializer, or the a.out linking rules will ++Index: glibc-2.31/hurd/hurdsig.c ++=================================================================== ++--- glibc-2.31.orig/hurd/hurdsig.c +++++ glibc-2.31/hurd/hurdsig.c ++@@ -19,11 +19,12 @@ ++ #include ++ #include ++ ++-#include /* For `struct mutex'. */ +++#include /* For `struct mutex'. */ ++ #include ++ #include ++ #include ++ #include +++#include ++ ++ #include ++ #include ++@@ -1488,8 +1489,8 @@ _hurdsig_init (const int *intarray, size ++ ++ /* Start the signal thread listening on the message port. */ ++ ++-#pragma weak __cthread_fork ++- if (!__cthread_fork) +++#pragma weak __pthread_create +++ if (!__pthread_create) ++ { ++ err = __thread_create (__mach_task_self (), &_hurd_msgport_thread); ++ assert_perror (err); ++@@ -1514,41 +1515,40 @@ _hurdsig_init (const int *intarray, size ++ } ++ else ++ { ++- /* When cthreads is being used, we need to make the signal thread a ++- proper cthread. Otherwise it cannot use mutex_lock et al, which ++- will be the cthreads versions. Various of the message port RPC +++ pthread_t thread; +++ pthread_attr_t attr; +++ void *addr; +++ size_t size; +++ +++ /* When pthread is being used, we need to make the signal thread a +++ proper pthread. Otherwise it cannot use mutex_lock et al, which +++ will be the pthread versions. Various of the message port RPC ++ handlers need to take locks, so we need to be able to call into ++- cthreads code and meet its assumptions about how our thread and ++- its stack are arranged. Since cthreads puts it there anyway, +++ pthread code and meet its assumptions about how our thread and +++ its stack are arranged. Since pthread puts it there anyway, ++ we'll let the signal thread's per-thread variables be found as for ++- any normal cthread, and just leave the magic __hurd_sigthread_* +++ any normal pthread, and just leave the magic __hurd_sigthread_* ++ values all zero so they'll be ignored. */ ++-#pragma weak __cthread_detach +++ +++#pragma weak __pthread_detach ++ #pragma weak __pthread_getattr_np ++ #pragma weak __pthread_attr_getstack ++- __cthread_t thread = __cthread_fork ( ++- (cthread_fn_t) &_hurd_msgport_receive, 0); ++- __cthread_detach (thread); +++ __pthread_create(&thread, NULL, &_hurd_msgport_receive, NULL); ++ ++- if (__pthread_getattr_np) ++- { ++- /* Record signal thread stack layout for fork() */ ++- pthread_attr_t attr; ++- void *addr; ++- size_t size; ++- ++- __pthread_getattr_np ((pthread_t) thread, &attr); ++- __pthread_attr_getstack (&attr, &addr, &size); ++- __hurd_sigthread_stack_base = (uintptr_t) addr; ++- __hurd_sigthread_stack_end = __hurd_sigthread_stack_base + size; ++- } +++ /* Record signal thread stack layout for fork() */ +++ __pthread_getattr_np (thread, &attr); +++ __pthread_attr_getstack (&attr, &addr, &size); +++ __hurd_sigthread_stack_base = (uintptr_t) addr; +++ __hurd_sigthread_stack_end = __hurd_sigthread_stack_base + size; +++ +++ __pthread_detach(thread); ++ ++ /* XXX We need the thread port for the signal thread further on ++ in this thread (see hurdfault.c:_hurdsigfault_init). ++ Therefore we block until _hurd_msgport_thread is initialized ++ by the newly created thread. This really shouldn't be ++ necessary; we should be able to fetch the thread port for a ++- cthread from here. */ +++ pthread from here. */ ++ while (_hurd_msgport_thread == 0) ++ __swtch_pri (0); ++ } ++Index: glibc-2.31/hurd/hurdsock.c ++=================================================================== ++--- glibc-2.31.orig/hurd/hurdsock.c +++++ glibc-2.31/hurd/hurdsock.c ++@@ -23,7 +23,7 @@ ++ #include ++ #include ++ #include <_itoa.h> ++-#include /* For `struct mutex'. */ +++#include /* For `struct mutex'. */ ++ #include "hurdmalloc.h" /* XXX */ ++ ++ static struct mutex lock; ++Index: glibc-2.31/hurd/hurdstartup.c ++=================================================================== ++--- glibc-2.31.orig/hurd/hurdstartup.c +++++ glibc-2.31/hurd/hurdstartup.c ++@@ -41,15 +41,7 @@ extern void __mach_init (void); ++ initialization so mig-generated stubs work, and then do an exec_startup ++ RPC on our bootstrap port, to which the exec server responds with the ++ information passed in the exec call, as well as our original bootstrap ++- port, and the base address and size of the preallocated stack. ++- ++- If using cthreads, we are given a new stack by cthreads initialization and ++- deallocate the stack set up by the exec server. On the new stack we call ++- `start1' (above) to do the rest of the startup work. Since the stack may ++- disappear out from under us in a machine-dependent way, we use a pile of ++- static variables to communicate the information from exec_startup to start1. ++- This is unfortunate but preferable to machine-dependent frobnication to copy ++- the state from the old stack to the new one. */ +++ port, and the base address and size of the preallocated stack. */ ++ ++ ++ void ++Index: glibc-2.31/hurd/msgportdemux.c ++=================================================================== ++--- glibc-2.31.orig/hurd/msgportdemux.c +++++ glibc-2.31/hurd/msgportdemux.c ++@@ -51,14 +51,14 @@ msgport_server (mach_msg_header_t *inp, ++ } ++ ++ /* This is the code that the signal thread runs. */ ++-void ++-_hurd_msgport_receive (void) +++void * +++_hurd_msgport_receive (void *arg) ++ { ++ /* Get our own sigstate cached so we never again have to take a lock to ++ fetch it. There is much code in hurdsig.c that operates with some ++ sigstate lock held, which will deadlock with _hurd_thread_sigstate. ++ ++- Furthermore, in the cthreads case this is the convenient spot +++ Furthermore, in the pthread case this is the convenient spot ++ to initialize _hurd_msgport_thread (see hurdsig.c:_hurdsig_init). */ ++ ++ _hurd_msgport_thread = _hurd_self_sigstate ()->thread; ++Index: glibc-2.31/mach/lock-intern.h ++=================================================================== ++--- glibc-2.31.orig/mach/lock-intern.h +++++ glibc-2.31/mach/lock-intern.h ++@@ -95,6 +95,15 @@ __spin_lock_locked (__spin_lock_t *__loc ++ #endif ++ ++ /* Name space-clean internal interface to mutex locks. */ +++struct mutex { +++ __spin_lock_t __held; +++ __spin_lock_t __lock; +++ const char *__name; +++ void *__head, *__tail; +++ void *__holder; +++}; +++ +++#define MUTEX_INITIALIZER { __SPIN_LOCK_INITIALIZER } ++ ++ /* Initialize the newly allocated mutex lock LOCK for further use. */ ++ extern void __mutex_init (void *__lock); ++Index: glibc-2.31/mach/mutex-solid.c ++=================================================================== ++--- glibc-2.31.orig/mach/mutex-solid.c +++++ glibc-2.31/mach/mutex-solid.c ++@@ -17,11 +17,10 @@ ++ . */ ++ ++ #include ++-#include ++ ++-/* If cthreads is linked in, it will define these functions itself to do ++- real cthreads mutex locks. This file will only be linked in when ++- cthreads is not used, and `mutexes' are in fact just spin locks (and +++/* If pthread is linked in, it will define these functions itself to do +++ real pthread mutex locks. This file will only be linked in when +++ pthread is not used, and `mutexes' are in fact just spin locks (and ++ some unused storage). */ ++ ++ void ++Index: glibc-2.31/scripts/check-local-headers.sh ++=================================================================== ++--- glibc-2.31.orig/scripts/check-local-headers.sh +++++ glibc-2.31/scripts/check-local-headers.sh ++@@ -33,7 +33,7 @@ exec ${AWK} -v includedir="$includedir" ++ BEGIN { ++ status = 0 ++ exclude = "^" includedir \ ++- "/(.*-.*-.*/|.*-.*/|)(asm[-/]|arch|linux/|selinux/|mach/|mach_debug/|device/|hurd/(((hurd|ioctl)_types|paths)\\.h|ioctls\\.defs|ihash\\.h)|cthreads\\.h|gd|nss3/|nspr4?/|c\\+\\+/|sys/(capability|sdt(|-config))\\.h|libaudit\\.h)" +++ "/(.*-.*-.*/|.*-.*/|)(asm[-/]|arch|linux/|selinux/|mach/|mach_debug/|device/|hurd/(((hurd|ioctl)_types|paths)\\.h|ioctls\\.defs|ihash\\.h)|gd|nss3/|nspr4?/|c\\+\\+/|sys/(capability|sdt(|-config))\\.h|libaudit\\.h)" ++ } ++ /^[^ ]/ && $1 ~ /.*:/ { obj = $1 } ++ { ++Index: glibc-2.31/sysdeps/htl/Makeconfig ++=================================================================== ++--- glibc-2.31.orig/sysdeps/htl/Makeconfig +++++ glibc-2.31/sysdeps/htl/Makeconfig ++@@ -4,7 +4,7 @@ ++ have-thread-library = yes ++ ++ shared-thread-library = $(common-objpfx)htl/libpthread.so ++-static-thread-library = $(common-objpfx)htl/libpthread.a +++static-thread-library = $(..)htl/libpthread_syms.a $(common-objpfx)htl/libpthread.a ++ bounded-thread-library = $(static-thread-library) ++ ++ rpath-dirs += htl ++Index: glibc-2.31/sysdeps/htl/bits/pthread-np.h ++=================================================================== ++--- glibc-2.31.orig/sysdeps/htl/bits/pthread-np.h +++++ glibc-2.31/sysdeps/htl/bits/pthread-np.h ++@@ -17,7 +17,7 @@ ++ . */ ++ ++ /* ++- * Never include this file directly; use or instead. +++ * Never include this file directly; use instead. ++ */ ++ ++ #ifndef _BITS_PTHREAD_NP_H ++Index: glibc-2.31/sysdeps/hurd/include/hurd/signal.h ++=================================================================== ++--- glibc-2.31.orig/sysdeps/hurd/include/hurd/signal.h +++++ glibc-2.31/sysdeps/hurd/include/hurd/signal.h ++@@ -1,3 +1,5 @@ +++extern struct mutex _hurd_siglock; /* Locks _hurd_sigstates. */ +++ ++ #ifndef _HURD_SIGNAL_H ++ extern struct hurd_sigstate *_hurd_self_sigstate (void) __attribute__ ((__const__)); ++ #ifndef _ISOMAC ++Index: glibc-2.31/sysdeps/mach/hurd/brk.c ++=================================================================== ++--- glibc-2.31.orig/sysdeps/mach/hurd/brk.c +++++ glibc-2.31/sysdeps/mach/hurd/brk.c ++@@ -18,7 +18,7 @@ ++ #include ++ #include ++ #include ++-#include /* For `struct mutex'. */ +++#include /* For `struct mutex'. */ ++ #include ++ ++ ++Index: glibc-2.31/sysdeps/mach/hurd/cthreads.c ++=================================================================== ++--- glibc-2.31.orig/sysdeps/mach/hurd/cthreads.c +++++ glibc-2.31/sysdeps/mach/hurd/cthreads.c ++@@ -18,7 +18,7 @@ ++ #include ++ #include ++ #include ++-#include +++#include ++ ++ /* This serves as stub "self" pointer for libc locks when TLS is not initialized ++ yet. */ ++@@ -27,7 +27,7 @@ char __libc_lock_self0[0]; ++ /* Placeholder for key creation routine from Hurd cthreads library. */ ++ int ++ weak_function ++-__cthread_keycreate (cthread_key_t *key) +++__cthread_keycreate (__cthread_key_t *key) ++ { ++ __set_errno (ENOSYS); ++ *key = -1; ++@@ -37,7 +37,7 @@ __cthread_keycreate (cthread_key_t *key) ++ /* Placeholder for key retrieval routine from Hurd cthreads library. */ ++ int ++ weak_function ++-__cthread_getspecific (cthread_key_t key, void **pval) +++__cthread_getspecific (__cthread_key_t key, void **pval) ++ { ++ *pval = NULL; ++ __set_errno (ENOSYS); ++@@ -47,7 +47,7 @@ __cthread_getspecific (cthread_key_t key ++ /* Placeholder for key setting routine from Hurd cthreads library. */ ++ int ++ weak_function ++-__cthread_setspecific (cthread_key_t key, void *val) +++__cthread_setspecific (__cthread_key_t key, void *val) ++ { ++ __set_errno (ENOSYS); ++ return -1; ++Index: glibc-2.31/sysdeps/mach/hurd/fork.c ++=================================================================== ++--- glibc-2.31.orig/sysdeps/mach/hurd/fork.c +++++ glibc-2.31/sysdeps/mach/hurd/fork.c ++@@ -497,7 +497,7 @@ __fork (void) ++ #else ++ if (__hurd_sigthread_stack_end == 0) ++ { ++- /* The signal thread has a stack assigned by cthreads. +++ /* The signal thread has a stack assigned by pthread. ++ The threadvar_stack variables conveniently tell us how ++ to get to the highest address in the stack, just below ++ the per-thread variables. */ ++Index: glibc-2.31/sysdeps/mach/hurd/htl/bits/pthread-np.h ++=================================================================== ++--- glibc-2.31.orig/sysdeps/mach/hurd/htl/bits/pthread-np.h +++++ glibc-2.31/sysdeps/mach/hurd/htl/bits/pthread-np.h ++@@ -17,7 +17,7 @@ ++ . */ ++ ++ /* ++- * Never include this file directly; use or instead. +++ * Never include this file directly; use instead. ++ */ ++ ++ #ifndef _BITS_PTHREAD_NP_H ++Index: glibc-2.31/sysdeps/mach/hurd/i386/Makefile ++=================================================================== ++--- glibc-2.31.orig/sysdeps/mach/hurd/i386/Makefile +++++ glibc-2.31/sysdeps/mach/hurd/i386/Makefile ++@@ -109,6 +109,8 @@ ifeq ($(subdir),elf) ++ # We do use nested functions involving creation of trampolines, notably for ++ # callbacks whose parameters don't permit to get the context parameters. ++ check-execstack-xfail += ld.so libc.so libpthread.so +++# We always create a thread for signals +++test-xfail-tst-single_threaded-pthread-static = yes ++ endif ++ ++ ifeq ($(subdir),stdlib) ++Index: glibc-2.31/sysdeps/mach/hurd/profil.c ++=================================================================== ++--- glibc-2.31.orig/sysdeps/mach/hurd/profil.c +++++ glibc-2.31/sysdeps/mach/hurd/profil.c ++@@ -22,7 +22,7 @@ ++ #include ++ #include ++ #include ++-#include +++#include ++ #include ++ #include ++ diff --cc debian/patches/hurd-i386/git-fexecve.diff index 000000000,000000000..2d2ee9e25 new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/git-fexecve.diff @@@ -1,0 -1,0 +1,42 @@@ ++Committed for glibc 2.32 ++ ++commit 6544999083437dabdadcec18185a1b2169b9637a ++Author: Samuel Thibault ++Date: Thu May 28 23:28:07 2020 +0000 ++ ++ hurd: Fix fexecve ++ ++ * sysdeps/mach/hurd/fexecve.c (fexecve): Re-lookup fd with O_EXEC before ++ calling _hurd_exec_paths. ++ ++diff --git a/sysdeps/mach/hurd/fexecve.c b/sysdeps/mach/hurd/fexecve.c ++index 2b24e46fbf..c6a00ebf1e 100644 ++--- a/sysdeps/mach/hurd/fexecve.c +++++ b/sysdeps/mach/hurd/fexecve.c ++@@ -25,10 +25,23 @@ ++ int ++ fexecve (int fd, char *const argv[], char *const envp[]) ++ { ++- error_t err = HURD_DPORT_USE (fd, _hurd_exec_paths (__mach_task_self (), ++- port, NULL, NULL, ++- argv, envp)); +++ file_t file; +++ error_t err; +++ enum retry_type doretry; +++ char retryname[1024]; +++ +++ err = HURD_DPORT_USE (fd, +++ __dir_lookup (port, "", O_EXEC, 0, &doretry, retryname, &file)); +++ +++ if (! err && (doretry != FS_RETRY_NORMAL || retryname[0] != '\0')) +++ err = EGRATUITOUS; +++ if (err) +++ return __hurd_fail(err); +++ +++ err = _hurd_exec_paths (__mach_task_self (), file, NULL, NULL, argv, envp); ++ if (! err) ++ err = EGRATUITOUS; +++ +++ __mach_port_deallocate (__mach_task_self (), file); ++ return __hurd_fail (err); ++ } diff --cc debian/patches/hurd-i386/git-fix-longjmp.diff index 000000000,000000000..2ceaf86d8 new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/git-fix-longjmp.diff @@@ -1,0 -1,0 +1,90 @@@ ++Committed for glibc 2.32 ++ ++commit 115bcf921a52005b89ff2859ccae4a8fc6d6deed ++Author: Samuel Thibault ++Date: Sat Jul 18 15:08:03 2020 +0200 ++ ++ hurd: Fix longjmp early in initialization ++ ++ When e.g. an LD_PRELOAD fails, _dl_signal_exception/error longjmps, but TLS ++ is not initialized yet, let along signal state. We thus mustn't look at ++ them within __longjmp. ++ ++ * sysdeps/mach/hurd/i386/____longjmp_chk.S,__longjmp.S: Check for ++ initialized value of %gs, and that sigstate is non-NULL. ++ ++diff --git a/sysdeps/mach/hurd/i386/____longjmp_chk.S b/sysdeps/mach/hurd/i386/____longjmp_chk.S ++index 4d3a331728..5131386c60 100644 ++--- a/sysdeps/mach/hurd/i386/____longjmp_chk.S +++++ b/sysdeps/mach/hurd/i386/____longjmp_chk.S ++@@ -60,7 +60,14 @@ ENTRY (____longjmp_chk) ++ PTR_DEMANGLE (%ecx) ++ #endif ++ ++- movl %gs:SIGSTATE_OFFSET,%edi +++ movw %ds, %si +++ movw %gs, %di +++ cmpw %si, %di +++ jz .Lok /* TLS not initialized yet */ +++ +++ movl %gs:SIGSTATE_OFFSET, %edi +++ testl %edi, %edi +++ jnz .Lok /* sigstate not initialized yet */ ++ ++ testl $SS_ONSTACK, (HURD_SIGSTATE__SIGALTSTACK__OFFSET + SIGALTSTACK__SS_FLAGS__OFFSET)(%edi) ++ jnz .Lonstack ++diff --git a/sysdeps/mach/hurd/i386/__longjmp.S b/sysdeps/mach/hurd/i386/__longjmp.S ++index d123c214c9..73bbff9826 100644 ++--- a/sysdeps/mach/hurd/i386/__longjmp.S +++++ b/sysdeps/mach/hurd/i386/__longjmp.S ++@@ -38,7 +38,14 @@ ENTRY (__longjmp) ++ PTR_DEMANGLE (%ecx) ++ #endif ++ ++- movl %gs:SIGSTATE_OFFSET,%edi +++ movw %ds, %si +++ movw %gs, %di +++ cmpw %si, %di +++ jz .Lok /* TLS not initialized yet */ +++ +++ movl %gs:SIGSTATE_OFFSET, %edi +++ testl %edi, %edi +++ jnz .Lok /* sigstate not initialized yet */ ++ ++ testl $SS_ONSTACK, (HURD_SIGSTATE__SIGALTSTACK__OFFSET + SIGALTSTACK__SS_FLAGS__OFFSET)(%edi) ++ jz .Lok ++commit 5baad9a6f948b7822db3392097e7d79e9e018655 ++Author: Samuel Thibault ++Date: Sat Jul 18 15:12:56 2020 +0200 ++ ++ hurd: Fix longjmp check for sigstate ++ ++ * sysdeps/mach/hurd/i386/____longjmp_chk.S,__longjmp.S: Properly check for ++ sigstate being NULL. ++ ++diff --git a/sysdeps/mach/hurd/i386/____longjmp_chk.S b/sysdeps/mach/hurd/i386/____longjmp_chk.S ++index 5131386c60..a746a4f2ba 100644 ++--- a/sysdeps/mach/hurd/i386/____longjmp_chk.S +++++ b/sysdeps/mach/hurd/i386/____longjmp_chk.S ++@@ -67,7 +67,7 @@ ENTRY (____longjmp_chk) ++ ++ movl %gs:SIGSTATE_OFFSET, %edi ++ testl %edi, %edi ++- jnz .Lok /* sigstate not initialized yet */ +++ jz .Lok /* sigstate not initialized yet */ ++ ++ testl $SS_ONSTACK, (HURD_SIGSTATE__SIGALTSTACK__OFFSET + SIGALTSTACK__SS_FLAGS__OFFSET)(%edi) ++ jnz .Lonstack ++diff --git a/sysdeps/mach/hurd/i386/__longjmp.S b/sysdeps/mach/hurd/i386/__longjmp.S ++index 73bbff9826..af788ede0f 100644 ++--- a/sysdeps/mach/hurd/i386/__longjmp.S +++++ b/sysdeps/mach/hurd/i386/__longjmp.S ++@@ -45,7 +45,7 @@ ENTRY (__longjmp) ++ ++ movl %gs:SIGSTATE_OFFSET, %edi ++ testl %edi, %edi ++- jnz .Lok /* sigstate not initialized yet */ +++ jz .Lok /* sigstate not initialized yet */ ++ ++ testl $SS_ONSTACK, (HURD_SIGSTATE__SIGALTSTACK__OFFSET + SIGALTSTACK__SS_FLAGS__OFFSET)(%edi) ++ jz .Lok diff --cc debian/patches/hurd-i386/git-fork-pthread_exit.diff index 000000000,000000000..ae980ac01 new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/git-fork-pthread_exit.diff @@@ -1,0 -1,0 +1,38 @@@ ++Committed for glibc 2.32 ++ ++commit 19a64d9f6eda12cd4b802aac470c645d208a1216 ++Author: Samuel Thibault ++Date: Sun Feb 9 17:01:06 2020 +0100 ++ ++ htl: Fix calling pthread_exit in the child of a fork ++ ++ We need to reset the threads counter, otherwise pthread_exit() would not ++ call exit(0). ++ ++diff --git a/sysdeps/mach/hurd/htl/pt-sysdep.c b/sysdeps/mach/hurd/htl/pt-sysdep.c ++index e306cc81dc..32a290c4ee 100644 ++--- a/sysdeps/mach/hurd/htl/pt-sysdep.c +++++ b/sysdeps/mach/hurd/htl/pt-sysdep.c ++@@ -35,6 +35,13 @@ static void *init_routine (void); ++ want to change it yet. */ ++ void *(*_cthread_init_routine) (void) = &init_routine; ++ +++static void +++reset_pthread_total (void) +++{ +++ /* Only current thread remains */ +++ __pthread_total = 1; +++} +++ ++ /* This function is called from the Hurd-specific startup code. It ++ should return a new stack pointer for the main thread. The caller ++ will switch to this new stack before doing anything serious. */ ++@@ -78,6 +85,8 @@ _init_routine (void *stack) ++ when we return from here) shouldn't be seen as a user thread. */ ++ __pthread_total--; ++ +++ __pthread_atfork (NULL, NULL, reset_pthread_total); +++ ++ /* Make MiG code thread aware. */ ++ __mig_init (thread->stackaddr); ++ diff --cc debian/patches/hurd-i386/git-futex-internal.diff index 000000000,000000000..8e2d32313 new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/git-futex-internal.diff @@@ -1,0 -1,0 +1,55 @@@ ++Commited for 2.33 ++ ++commit 65e43d5ad22ff527fd534679d357245f515bf308 ++Author: Samuel Thibault ++Date: Sun Dec 13 11:06:27 2020 +0000 ++ ++ htl: Add futex-internal.h ++ ++ That provides futex_supports_pshared ++ ++diff --git a/sysdeps/htl/futex-internal.h b/sysdeps/htl/futex-internal.h ++new file mode 100644 ++index 0000000000..2b7a13aff0 ++--- /dev/null +++++ b/sysdeps/htl/futex-internal.h ++@@ -0,0 +1,39 @@ +++/* futex operations for glibc-internal use. Stub version; do not include +++ this file directly. +++ Copyright (C) 2014-2020 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 +++ . */ +++ +++#ifndef STUB_FUTEX_INTERNAL_H +++#define STUB_FUTEX_INTERNAL_H +++ +++#include +++ +++/* Returns EINVAL if PSHARED is neither PTHREAD_PROCESS_PRIVATE nor +++ PTHREAD_PROCESS_SHARED; otherwise, returns 0 if PSHARED is supported, and +++ ENOTSUP if not. */ +++static __always_inline int +++futex_supports_pshared (int pshared) +++{ +++ if (__glibc_likely (pshared == PTHREAD_PROCESS_PRIVATE)) +++ return 0; +++ else if (pshared == PTHREAD_PROCESS_SHARED) +++ return 0; +++ else +++ return EINVAL; +++} +++ +++#endif /* futex-internal.h */ diff --cc debian/patches/hurd-i386/git-holes.diff index 000000000,000000000..141dd587d new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/git-holes.diff @@@ -1,0 -1,0 +1,36 @@@ ++Committed for glibc 2.32 ++ ++commit 3f6e4fc4542b5b881906bf2f83eb4b8359b0dcd4 ++Author: Samuel Thibault ++Date: Thu Jun 4 20:52:19 2020 +0200 ++ ++ support: Fix detecting hole support on >2KB-block filesystems ++ ++ When detecting hole support, we write at 16MiB, and filesystems will ++ typically need two levels of data to record that. On filesystems with ++ 8KB block, the two indirection blocks will require a total of 16KB ++ overhead, thus 32 512-byte sectors. ++ ++ Spotted on GNU/Hurd with a 4KB blocks filesystem, but also happens on Linux ++ with 4KB or 8KB blocks filesystems. ++ ++ * support/support_descriptor_supports_holes.c ++ (support_descriptor_supports_holes): Set block_headroom to 32. ++ ++diff --git a/support/support_descriptor_supports_holes.c b/support/support_descriptor_supports_holes.c ++index fc2aa76f10..d3d5d3a938 100644 ++--- a/support/support_descriptor_supports_holes.c +++++ b/support/support_descriptor_supports_holes.c ++@@ -34,8 +34,10 @@ support_descriptor_supports_holes (int fd) ++ write_offset = 16 * 1024 * 1024, ++ ++ /* Our write may add this number of additional blocks (see ++- block_limit below). */ ++- block_headroom = 8, +++ block_limit below): writing at offset 16M can require two data block +++ indirections, each of which can be as large as 8KB on ext2, thus 32 +++ 512B sectors. */ +++ block_headroom = 32, ++ }; ++ ++ struct stat64 st; diff --cc debian/patches/hurd-i386/git-hurd-version.diff index 000000000,000000000..90f464577 new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/git-hurd-version.diff @@@ -1,0 -1,0 +1,23 @@@ ++Committed for 2.33 ++ ++commit 016c64236dee6e28f09c10ba38f274aad7205f95 ++Author: Samuel Thibault ++Date: Tue Dec 29 03:26:12 2020 +0100 ++ ++ hurd: Accept including hurd/version.h ++ ++ We need it to get the RPC API version. ++ ++diff --git a/scripts/check-local-headers.sh b/scripts/check-local-headers.sh ++index 837b3e9c70..cb66d6e7e3 100755 ++--- a/scripts/check-local-headers.sh +++++ b/scripts/check-local-headers.sh ++@@ -33,7 +33,7 @@ exec ${AWK} -v includedir="$includedir" ' ++ BEGIN { ++ status = 0 ++ exclude = "^" includedir \ ++- "/(.*-.*-.*/|.*-.*/|)(asm[-/]|arch|linux/|selinux/|mach/|mach_debug/|device/|hurd/(((hurd|ioctl)_types|paths)\\.h|ioctls\\.defs|ihash\\.h)|gd|nss3/|nspr4?/|c\\+\\+/|sys/(capability|sdt(|-config))\\.h|libaudit\\.h)" +++ "/(.*-.*-.*/|.*-.*/|)(asm[-/]|arch|linux/|selinux/|mach/|mach_debug/|device/|hurd/(((hurd|ioctl)_types|paths)\\.h|ioctls\\.defs|ihash\\.h|version\\.h)|gd|nss3/|nspr4?/|c\\+\\+/|sys/(capability|sdt(|-config))\\.h|libaudit\\.h)" ++ } ++ /^[^ ]/ && $1 ~ /.*:/ { obj = $1 } ++ { diff --cc debian/patches/hurd-i386/git-hurdsig-SA_SIGINFO.diff index 000000000,000000000..8ad153925 new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/git-hurdsig-SA_SIGINFO.diff @@@ -1,0 -1,0 +1,635 @@@ ++Committed for 2.33 ++ ++From: Jeremie Koenig ++Subject: [PATCH] implement SA_SIGINFO signal handlers. ++ ++ 52baaca Hurd signals: Copy bits/sigaction.h ++ 4232c66 Hurd signals: SA_SIGINFO support ++ 1831cfe Hurd signals: Use POSIX sigcodes ++ ++--- ++ hurd/hurd/signal.h | 5 + ++ hurd/hurdfault.c | 2 ++ hurd/hurdinit.c | 2 ++ hurd/hurdsig.c | 6 - ++ sysdeps/mach/hurd/bits/sigaction.h | 86 +++++++++++++++++++++ ++ sysdeps/mach/hurd/i386/bits/sigcontext.h | 4 ++ sysdeps/mach/hurd/i386/exc2signal.c | 123 +++++++++++++++++++----------- ++ sysdeps/mach/hurd/i386/trampoline.c | 125 ++++++++++++++++++++++++++++--- ++ sysdeps/mach/hurd/kill.c | 2 ++ sysdeps/mach/hurd/setitimer.c | 2 ++ 10 files changed, 293 insertions(+), 64 deletions(-) ++ ++Index: glibc-2.31/hurd/hurd/signal.h ++=================================================================== ++--- glibc-2.31.orig/hurd/hurd/signal.h +++++ glibc-2.31/hurd/hurd/signal.h ++@@ -290,6 +290,11 @@ extern int _hurd_raise_signal (struct hu ++ extern void _hurd_exception2signal (struct hurd_signal_detail *detail, ++ int *signo); ++ +++/* Translate a Mach exception into a signal with a legacy sigcode. */ +++ +++extern void _hurd_exception2signal_legacy (struct hurd_signal_detail *detail, +++ int *signo); +++ ++ ++ /* Make the thread described by SS take the signal described by SIGNO and ++ DETAIL. If the process is traced, this will in fact stop with a SIGNO ++Index: glibc-2.31/hurd/hurdfault.c ++=================================================================== ++--- glibc-2.31.orig/hurd/hurdfault.c +++++ glibc-2.31/hurd/hurdfault.c ++@@ -70,7 +70,7 @@ _hurdsig_fault_catch_exception_raise (ma ++ codes into a signal number and subcode. */ ++ _hurd_exception2signal (&d, &signo); ++ ++- return HURD_PREEMPT_SIGNAL_P (&_hurdsig_fault_preemptor, signo, d.code) +++ return HURD_PREEMPT_SIGNAL_P (&_hurdsig_fault_preemptor, signo, d.exc_subcode) ++ ? 0 : EGREGIOUS; ++ } ++ ++Index: glibc-2.31/hurd/hurdinit.c ++=================================================================== ++--- glibc-2.31.orig/hurd/hurdinit.c +++++ glibc-2.31/hurd/hurdinit.c ++@@ -177,7 +177,7 @@ _hurd_new_proc_init (char **argv, ++ /* This process is "traced", meaning it should stop on signals or exec. ++ We are all set up now to handle signals. Stop ourselves, to inform ++ our parent (presumably a debugger) that the exec has completed. */ ++- __msg_sig_post (_hurd_msgport, SIGTRAP, 0, __mach_task_self ()); +++ __msg_sig_post (_hurd_msgport, SIGTRAP, TRAP_TRACE, __mach_task_self ()); ++ } ++ ++ #include ++Index: glibc-2.31/hurd/hurdsig.c ++=================================================================== ++--- glibc-2.31.orig/hurd/hurdsig.c +++++ glibc-2.31/hurd/hurdsig.c ++@@ -730,7 +730,7 @@ post_signal (struct hurd_sigstate *ss, ++ { /* PE cannot be null. */ ++ do ++ { ++- if (HURD_PREEMPT_SIGNAL_P (pe, signo, detail->code)) +++ if (HURD_PREEMPT_SIGNAL_P (pe, signo, detail->exc_subcode)) ++ { ++ if (pe->preemptor) ++ { ++@@ -1374,7 +1374,7 @@ _S_msg_sig_post (mach_port_t me, ++ if (err = signal_allowed (signo, refport)) ++ return err; ++ ++- d.code = sigcode; +++ d.code = d.exc_subcode = sigcode; ++ d.exc = 0; ++ ++ /* Post the signal to a global receiver thread (or mark it pending in ++@@ -1403,7 +1403,7 @@ _S_msg_sig_post_untraced (mach_port_t me ++ if (err = signal_allowed (signo, refport)) ++ return err; ++ ++- d.code = sigcode; +++ d.code = d.exc_subcode = sigcode; ++ d.exc = 0; ++ ++ /* Post the signal to the designated signal-receiving thread. This will ++Index: glibc-2.31/sysdeps/mach/hurd/bits/sigaction.h ++=================================================================== ++--- /dev/null +++++ glibc-2.31/sysdeps/mach/hurd/bits/sigaction.h ++@@ -0,0 +1,86 @@ +++/* Copyright (C) 1991-2015 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_SIGACTION_H +++#define _BITS_SIGACTION_H 1 +++ +++#ifndef _SIGNAL_H +++# error "Never include directly; use instead." +++#endif +++ +++/* These definitions match those used by the 4.4 BSD kernel. +++ If the operating system has a `sigaction' system call that correctly +++ implements the POSIX.1 behavior, there should be a system-dependent +++ version of this file that defines `struct sigaction' and the `SA_*' +++ constants appropriately. */ +++ +++/* Structure describing the action to be taken when a signal arrives. */ +++struct sigaction +++ { +++ /* Signal handler. */ +++#if defined __USE_POSIX199309 || defined __USE_XOPEN_EXTENDED +++ 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 +++ +++ /* Additional set of signals to be blocked. */ +++ __sigset_t sa_mask; +++ +++ /* Special flags. */ +++ int sa_flags; +++ }; +++ +++/* Bits in `sa_flags'. */ +++#if defined __USE_XOPEN_EXTENDED || defined __USE_MISC +++# define SA_ONSTACK 0x0001 /* Take signal on signal stack. */ +++#endif +++#if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8 +++# define SA_RESTART 0x0002 /* Restart syscall on signal return. */ +++# define SA_NODEFER 0x0010 /* Don't automatically block the signal when +++ its handler is being executed. */ +++# define SA_RESETHAND 0x0004 /* Reset to SIG_DFL on entry to handler. */ +++#endif +++#define SA_NOCLDSTOP 0x0008 /* Don't send SIGCHLD when children stop. */ +++#define SA_SIGINFO 0x0040 /* Signal handler with SA_SIGINFO args */ +++ +++#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. */ +++ +++#endif ++Index: glibc-2.31/sysdeps/mach/hurd/i386/bits/sigcontext.h ++=================================================================== ++--- glibc-2.31.orig/sysdeps/mach/hurd/i386/bits/sigcontext.h +++++ glibc-2.31/sysdeps/mach/hurd/i386/bits/sigcontext.h ++@@ -97,6 +97,10 @@ struct sigcontext ++ #define sc_ps sc_efl ++ ++ +++/* The deprecated sigcode values below are passed as an extra, non-portable +++ argument to regular signal handlers. You should use SA_SIGINFO handlers +++ instead, which use the standard POSIX signal codes. */ +++ ++ /* Codes for SIGFPE. */ ++ #define FPE_INTOVF_TRAP 0x1 /* integer overflow */ ++ #define FPE_INTDIV_FAULT 0x2 /* integer divide by zero */ ++Index: glibc-2.31/sysdeps/mach/hurd/i386/exc2signal.c ++=================================================================== ++--- glibc-2.31.orig/sysdeps/mach/hurd/i386/exc2signal.c +++++ glibc-2.31/sysdeps/mach/hurd/i386/exc2signal.c ++@@ -23,8 +23,8 @@ ++ /* Translate the Mach exception codes, as received in an `exception_raise' RPC, ++ into a signal number and signal subcode. */ ++ ++-void ++-_hurd_exception2signal (struct hurd_signal_detail *detail, int *signo) +++static void +++exception2signal (struct hurd_signal_detail *detail, int *signo, int posix) ++ { ++ detail->error = 0; ++ ++@@ -36,44 +36,62 @@ _hurd_exception2signal (struct hurd_sign ++ break; ++ ++ case EXC_BAD_ACCESS: ++- if (detail->exc_code == KERN_INVALID_ADDRESS ++- || detail->exc_code == KERN_PROTECTION_FAILURE ++- || detail->exc_code == KERN_WRITE_PROTECTION_FAILURE) ++- *signo = SIGSEGV; ++- else ++- *signo = SIGBUS; ++- detail->code = detail->exc_subcode; +++ switch (detail->exc_code) +++ { +++ case KERN_INVALID_ADDRESS: +++ case KERN_MEMORY_FAILURE: +++ *signo = SIGSEGV; +++ detail->code = posix ? SEGV_MAPERR : detail->exc_subcode; +++ break; +++ +++ case KERN_PROTECTION_FAILURE: +++ case KERN_WRITE_PROTECTION_FAILURE: +++ *signo = SIGSEGV; +++ detail->code = posix ? SEGV_ACCERR : detail->exc_subcode; +++ break; +++ +++ default: +++ *signo = SIGBUS; +++ detail->code = posix ? BUS_ADRERR : detail->exc_subcode; +++ break; +++ } ++ detail->error = detail->exc_code; ++ break; ++ ++ case EXC_BAD_INSTRUCTION: ++ *signo = SIGILL; ++- if (detail->exc_code == EXC_I386_INVOP) ++- detail->code = ILL_INVOPR_FAULT; ++- else if (detail->exc_code == EXC_I386_STKFLT) ++- detail->code = ILL_STACK_FAULT; ++- else ++- detail->code = 0; +++ switch (detail->exc_code) +++ { +++ case EXC_I386_INVOP: +++ detail->code = posix ? ILL_ILLOPC : ILL_INVOPR_FAULT; +++ break; +++ +++ case EXC_I386_STKFLT: +++ detail->code = posix ? ILL_BADSTK : ILL_STACK_FAULT; +++ break; +++ +++ default: +++ detail->code = 0; +++ break; +++ } ++ break; ++ ++ case EXC_ARITHMETIC: +++ *signo = SIGFPE; ++ switch (detail->exc_code) ++ { ++ case EXC_I386_DIV: /* integer divide by zero */ ++- *signo = SIGFPE; ++- detail->code = FPE_INTDIV_FAULT; +++ detail->code = posix ? FPE_INTDIV : FPE_INTDIV_FAULT; ++ break; ++ ++ case EXC_I386_INTO: /* integer overflow */ ++- *signo = SIGFPE; ++- detail->code = FPE_INTOVF_TRAP; +++ detail->code = posix ? FPE_INTOVF : FPE_INTOVF_TRAP; ++ break; ++ ++ /* These aren't anywhere documented or used in Mach 3.0. */ ++ case EXC_I386_NOEXT: ++ case EXC_I386_EXTOVR: ++ default: ++- *signo = SIGFPE; ++ detail->code = 0; ++ break; ++ ++@@ -82,51 +100,43 @@ _hurd_exception2signal (struct hurd_sign ++ Give an error code corresponding to the first bit set. */ ++ if (detail->exc_subcode & FPS_IE) ++ { ++- *signo = SIGILL; ++- detail->code = ILL_FPEOPR_FAULT; +++ /* NB: We used to send SIGILL here but we can't distinguish +++ POSIX vs. legacy with respect to what signal we send. */ +++ detail->code = posix ? FPE_FLTINV : 0 /*ILL_FPEOPR_FAULT*/; ++ } ++ else if (detail->exc_subcode & FPS_DE) ++ { ++- *signo = SIGFPE; ++- detail->code = FPE_FLTDNR_FAULT; +++ detail->code = posix ? FPE_FLTUND : FPE_FLTDNR_FAULT; ++ } ++ else if (detail->exc_subcode & FPS_ZE) ++ { ++- *signo = SIGFPE; ++- detail->code = FPE_FLTDIV_FAULT; +++ detail->code = posix ? FPE_FLTDIV : FPE_FLTDIV_FAULT; ++ } ++ else if (detail->exc_subcode & FPS_OE) ++ { ++- *signo = SIGFPE; ++- detail->code = FPE_FLTOVF_FAULT; +++ detail->code = posix ? FPE_FLTOVF : FPE_FLTOVF_FAULT; ++ } ++ else if (detail->exc_subcode & FPS_UE) ++ { ++- *signo = SIGFPE; ++- detail->code = FPE_FLTUND_FAULT; +++ detail->code = posix ? FPE_FLTUND : FPE_FLTUND_FAULT; ++ } ++ else if (detail->exc_subcode & FPS_PE) ++ { ++- *signo = SIGFPE; ++- detail->code = FPE_FLTINX_FAULT; +++ detail->code = posix ? FPE_FLTRES : FPE_FLTINX_FAULT; ++ } ++ else ++ { ++- *signo = SIGFPE; ++ detail->code = 0; ++ } ++ break; ++ ++ /* These two can only be arithmetic exceptions if we ++- are in V86 mode, which sounds like emulation to me. ++- (See Mach 3.0 i386/trap.c.) */ +++ are in V86 mode. (See Mach 3.0 i386/trap.c.) */ ++ case EXC_I386_EMERR: ++- *signo = SIGFPE; ++- detail->code = FPE_EMERR_FAULT; +++ detail->code = posix ? 0 : FPE_EMERR_FAULT; ++ break; ++ case EXC_I386_BOUND: ++- *signo = SIGFPE; ++- detail->code = FPE_EMBND_FAULT; +++ detail->code = posix ? FPE_FLTSUB : FPE_EMBND_FAULT; ++ break; ++ } ++ break; ++@@ -143,7 +153,7 @@ _hurd_exception2signal (struct hurd_sign ++ if (detail->exc_code == EXC_I386_BOUND) ++ { ++ *signo = SIGFPE; ++- detail->code = FPE_SUBRNG_FAULT; +++ detail->code = posix ? FPE_FLTSUB : FPE_SUBRNG_FAULT; ++ } ++ else ++ { ++@@ -154,13 +164,34 @@ _hurd_exception2signal (struct hurd_sign ++ ++ case EXC_BREAKPOINT: ++ *signo = SIGTRAP; ++- if (detail->exc_code == EXC_I386_SGL) ++- detail->code = DBG_SINGLE_TRAP; ++- else if (detail->exc_code == EXC_I386_BPT) ++- detail->code = DBG_BRKPNT_FAULT; ++- else ++- detail->code = 0; +++ switch (detail->exc_code) +++ { +++ case EXC_I386_SGL: +++ detail->code = posix ? TRAP_BRKPT : DBG_SINGLE_TRAP; +++ break; +++ +++ case EXC_I386_BPT: +++ detail->code = posix ? TRAP_BRKPT : DBG_BRKPNT_FAULT; +++ break; +++ +++ default: +++ detail->code = 0; +++ break; +++ } ++ break; ++ } ++ } ++ libc_hidden_def (_hurd_exception2signal) +++ +++void +++_hurd_exception2signal (struct hurd_signal_detail *detail, int *signo) +++{ +++ exception2signal (detail, signo, 1); +++} +++ +++void +++_hurd_exception2signal_legacy (struct hurd_signal_detail *detail, int *signo) +++{ +++ exception2signal (detail, signo, 0); +++} +++ ++Index: glibc-2.31/sysdeps/mach/hurd/i386/trampoline.c ++=================================================================== ++--- glibc-2.31.orig/sysdeps/mach/hurd/i386/trampoline.c +++++ glibc-2.31/sysdeps/mach/hurd/i386/trampoline.c ++@@ -19,13 +19,66 @@ ++ #include ++ #include ++ #include +++#include ++ #include ++ #include ++ #include ++ #include "hurdfault.h" ++ #include +++#include ++ ++ +++/* Fill in a siginfo_t structure for SA_SIGINFO-enabled handlers. */ +++static void fill_siginfo (siginfo_t *si, int signo, +++ const struct hurd_signal_detail *detail, +++ const struct machine_thread_all_state *state) +++{ +++ si->si_signo = signo; +++ si->si_errno = detail->error; +++ si->si_code = detail->code; +++ +++ /* XXX We would need a protocol change for sig_post to include +++ * this information. */ +++ si->si_pid = -1; +++ si->si_uid = -1; +++ +++ /* Address of the faulting instruction or memory access. */ +++ if (detail->exc == EXC_BAD_ACCESS) +++ si->si_addr = (void *) detail->exc_subcode; +++ else +++ si->si_addr = (void *) state->basic.eip; +++ +++ /* XXX On SIGCHLD, this should be the exit status of the child +++ * process. We would need a protocol change for the proc server +++ * to send this information along with the signal. */ +++ si->si_status = 0; +++ +++ si->si_band = 0; /* SIGPOLL is not supported yet. */ +++ si->si_value.sival_int = 0; /* sigqueue() is not supported yet. */ +++} +++ +++/* Fill in a ucontext_t structure SA_SIGINFO-enabled handlers. */ +++static void fill_ucontext (ucontext_t *uc, const struct sigcontext *sc) +++{ +++ uc->uc_flags = 0; +++ uc->uc_link = NULL; +++ uc->uc_sigmask = sc->sc_mask; +++ uc->uc_stack.ss_sp = (__ptr_t) sc->sc_esp; +++ uc->uc_stack.ss_size = 0; +++ uc->uc_stack.ss_flags = 0; +++ +++ /* Registers. */ +++ memcpy (&uc->uc_mcontext.gregs[REG_GS], &sc->sc_gs, +++ (REG_TRAPNO - REG_GS) * sizeof (int)); +++ uc->uc_mcontext.gregs[REG_TRAPNO] = 0; +++ uc->uc_mcontext.gregs[REG_ERR] = 0; +++ memcpy (&uc->uc_mcontext.gregs[REG_EIP], &sc->sc_eip, +++ (NGREG - REG_EIP) * sizeof (int)); +++ +++ /* XXX FPU state. */ +++ memset (&uc->uc_mcontext.fpregs, 0, sizeof (fpregset_t)); +++} +++ ++ struct sigcontext * ++ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, ++ int signo, struct hurd_signal_detail *detail, ++@@ -43,15 +96,38 @@ _hurd_setup_sighandler (struct hurd_sigs ++ struct ++ { ++ int signo; ++- long int sigcode; ++- struct sigcontext *scp; /* Points to ctx, below. */ +++ union +++ { +++ /* Extra arguments for traditional signal handlers */ +++ struct +++ { +++ long int sigcode; +++ struct sigcontext *scp; /* Points to ctx, below. */ +++ } legacy; +++ +++ /* Extra arguments for SA_SIGINFO handlers */ +++ struct +++ { +++ siginfo_t *siginfop; /* Points to siginfo, below. */ +++ ucontext_t *uctxp; /* Points to uctx, below. */ +++ } posix; +++ }; ++ void *sigreturn_addr; ++ void *sigreturn_returns_here; ++ struct sigcontext *return_scp; /* Same; arg to sigreturn. */ +++ +++ /* NB: sigreturn assumes link is next to ctx. */ ++ struct sigcontext ctx; ++ struct hurd_userlink link; +++ ucontext_t ucontext; +++ siginfo_t siginfo; ++ } *stackframe; ++ +++ /* sigaction for preemptors */ +++ static const struct sigaction legacy_sigaction = { +++ .sa_flags = SA_RESTART +++ }; +++ ++ if (ss->context) ++ { ++ /* We have a previous sigcontext that sigreturn was about ++@@ -94,9 +170,13 @@ _hurd_setup_sighandler (struct hurd_sigs ++ the SP on sigreturn. */ ++ state->basic.uesp = state->basic.ecx; ++ ++- /* XXX what if handler != action->handler (for instance, if a signal ++- * preemptor took over) ? */ ++ action = & _hurd_sigstate_actions (ss) [signo]; +++ if ( (action->sa_flags & SA_SIGINFO) +++ && handler != (__sighandler_t) action->sa_sigaction +++ || !(action->sa_flags & SA_SIGINFO) +++ && handler != action->sa_handler) +++ /* A signal preemptor took over, use legacy semantic. */ +++ action = &legacy_sigaction; ++ ++ if ((action->sa_flags & SA_ONSTACK) ++ && !(ss->sigaltstack.ss_flags & (SS_DISABLE|SS_ONSTACK))) ++@@ -140,15 +220,9 @@ _hurd_setup_sighandler (struct hurd_sigs ++ = &stackframe->link.thread.next; ++ ss->active_resources = &stackframe->link; ++ ++- /* Set up the arguments for the signal handler. */ ++- stackframe->signo = signo; ++- stackframe->sigcode = detail->code; ++- stackframe->scp = stackframe->return_scp = scp = &stackframe->ctx; ++- stackframe->sigreturn_addr = &__sigreturn; ++- stackframe->sigreturn_returns_here = firewall; /* Crash on return. */ ++- ++ /* Set up the sigcontext from the current state of the thread. */ ++ +++ scp = &stackframe->ctx; ++ scp->sc_onstack = ss->sigaltstack.ss_flags & SS_ONSTACK ? 1 : 0; ++ ++ /* struct sigcontext is laid out so that starting at sc_gs mimics a ++@@ -162,6 +236,35 @@ _hurd_setup_sighandler (struct hurd_sigs ++ &state->fpu, &scp->sc_i386_float_state, ++ sizeof (state->fpu)); ++ +++ /* Set up the arguments for the signal handler. */ +++ stackframe->signo = signo; +++ if (action->sa_flags & SA_SIGINFO) +++ { +++ stackframe->posix.siginfop = &stackframe->siginfo; +++ stackframe->posix.uctxp = &stackframe->ucontext; +++ fill_siginfo (&stackframe->siginfo, signo, detail, state); +++ fill_ucontext (&stackframe->ucontext, scp); +++ } +++ else +++ { +++ if (detail->exc) +++ { +++ int nsigno; +++ _hurd_exception2signal_legacy (detail, &nsigno); +++ assert (nsigno == signo); +++ } +++ else +++ detail->code = 0; +++ +++ stackframe->legacy.sigcode = detail->code; +++ stackframe->legacy.scp = &stackframe->ctx; +++ } +++ +++ /* Set up the bottom of the stack. */ +++ stackframe->sigreturn_addr = &__sigreturn; +++ stackframe->sigreturn_returns_here = firewall; /* Crash on return. */ +++ stackframe->return_scp = &stackframe->ctx; +++ ++ _hurdsig_end_catch_fault (); ++ ++ if (! ok) ++Index: glibc-2.31/sysdeps/mach/hurd/kill.c ++=================================================================== ++--- glibc-2.31.orig/sysdeps/mach/hurd/kill.c +++++ glibc-2.31/sysdeps/mach/hurd/kill.c ++@@ -64,7 +64,7 @@ __kill (pid_t pid, int sig) ++ { ++ if (msgport != MACH_PORT_NULL) ++ /* Send a signal message to his message port. */ ++- return __msg_sig_post (msgport, sig, 0, refport); +++ return __msg_sig_post (msgport, sig, SI_USER, refport); ++ ++ /* The process has no message port. Perhaps try direct ++ frobnication of the task. */ ++Index: glibc-2.31/sysdeps/mach/hurd/setitimer.c ++=================================================================== ++--- glibc-2.31.orig/sysdeps/mach/hurd/setitimer.c +++++ glibc-2.31/sysdeps/mach/hurd/setitimer.c ++@@ -105,7 +105,7 @@ timer_thread (void) ++ __msg_sig_post_request (_hurd_msgport, ++ _hurd_itimer_port, ++ MACH_MSG_TYPE_MAKE_SEND_ONCE, ++- SIGALRM, 0, __mach_task_self ()); +++ SIGALRM, SI_TIMER, __mach_task_self ()); ++ break; ++ ++ case MACH_RCV_INTERRUPTED: ++Index: glibc-2.31/sysdeps/mach/hurd/i386/sigcontextinfo.h ++=================================================================== ++--- glibc-2.31.orig/sysdeps/mach/hurd/i386/sigcontextinfo.h +++++ glibc-2.31/sysdeps/mach/hurd/i386/sigcontextinfo.h ++@@ -18,11 +18,10 @@ ++ #ifndef _SIGCONTEXTINFO_H ++ #define _SIGCONTEXTINFO_H ++ ++-#define SIGCONTEXT struct sigcontext ++ static inline uintptr_t ++-sigcontext_get_pc (struct sigcontext ctx) +++sigcontext_get_pc (struct ucontext_t *ctx) ++ { ++- return ctx.sc_eip; +++ return ctx->uc_mcontext.gregs[REG_EIP]; ++ } ++ ++ #endif diff --cc debian/patches/hurd-i386/git-intr-msg-unwind.diff index 000000000,000000000..ed160fa9f new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/git-intr-msg-unwind.diff @@@ -1,0 -1,0 +1,28 @@@ ++Committed for glibc 2.32 ++ ++commit 337a7b74faed2c8daf8c91cbb3038dc4984f3207 ++Author: Samuel Thibault ++Date: Sun Jun 7 17:51:21 2020 +0000 ++ ++ hurd: Fix unwinding over interruptible RPC ++ ++ * sysdeps/mach/hurd/i386/intr-msg.h (INTR_MSG_TRAP): Set CFA register to ++ %ecx while %esp is altered. ++ ++diff --git a/sysdeps/mach/hurd/i386/intr-msg.h b/sysdeps/mach/hurd/i386/intr-msg.h ++index 54420fed01..70e6cc6592 100644 ++--- a/sysdeps/mach/hurd/i386/intr-msg.h +++++ b/sysdeps/mach/hurd/i386/intr-msg.h ++@@ -37,10 +37,12 @@ ++ " movl %6, %%eax\n" \ ++ " jmp _hurd_intr_rpc_msg_sp_restored\n" \ ++ "_hurd_intr_rpc_msg_do: movl %%esp, %%ecx\n" \ +++ " .cfi_def_cfa_register %%ecx\n" \ ++ " leal %4, %%esp\n" \ ++ "_hurd_intr_rpc_msg_cx_sp: movl $-25, %%eax\n" \ ++ "_hurd_intr_rpc_msg_do_trap: lcall $7, $0 # status in %0\n" \ ++ "_hurd_intr_rpc_msg_in_trap: movl %%ecx, %%esp\n" \ +++ " .cfi_def_cfa_register %%esp\n" \ ++ "_hurd_intr_rpc_msg_sp_restored:" \ ++ : "=a" (err), "+m" (option), "+m" (timeout), "=m" (*intr_port_p) \ ++ : "m" ((&msg)[-1]), "m" (*cancel_p), "i" (EINTR) \ diff --cc debian/patches/hurd-i386/git-ld-library-path-checks.diff index 000000000,000000000..a8ffb26de new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/git-ld-library-path-checks.diff @@@ -1,0 -1,0 +1,84 @@@ ++Commited for 2.33 ++ ++commit 3dbbd2ff92b1a0a2465461ee049e3e2813b73fa4 ++Author: Samuel Thibault ++Date: Fri Nov 13 19:37:41 2020 +0000 ++ ++ Add {,sysdep-}ld-library-path make variable ++ ++ On GNU/Hurd we not only need $(common-objpfx) in LD_LIBRARY_PATH when loading ++ dynamic objects, but also $(common-objpfx)/mach and $(common-objpfx)/hurd. This ++ adds an ld-library-path variable to be used as LD_LIBRARY_PATH basis in ++ Makefiles, and a sysdep-ld-library-path variable for sysdeps to add some ++ more paths, here mach/ and hurd/. ++ ++diff --git a/Makeconfig b/Makeconfig ++index dfda418aac..8074613b85 100644 ++--- a/Makeconfig +++++ b/Makeconfig ++@@ -769,6 +769,9 @@ built-program-cmd = $(built-program-cmd-before-env) $(run-program-env) \ ++ # the second dependency of the makefile target in which ++ # $(host-built-program-cmd) is used. ++ host-built-program-cmd = $(run-via-rtld-prefix) $(built-program-file) +++# $(ld-library-path) is the common content to be set in LD_LIBRARY_PATH +++# for running static binaries that may load dynamic objects. +++ld-library-path = $(objpfx):$(common-objpfx)$(addprefix :,$(sysdep-ld-library-path)) ++ ++ ifndef LD ++ LD := ld -X ++diff --git a/dlfcn/Makefile b/dlfcn/Makefile ++index 4b7e0387b3..412e7c57d5 100644 ++--- a/dlfcn/Makefile +++++ b/dlfcn/Makefile ++@@ -52,7 +52,7 @@ ifeq (yes,$(build-shared)) ++ tests += tststatic tststatic2 tststatic3 tststatic4 tststatic5 ++ tests-static += tststatic tststatic2 tststatic3 tststatic4 tststatic5 ++ modules-names += modstatic modstatic2 modstatic3 modstatic5 ++-tststatic-ENV = LD_LIBRARY_PATH=$(objpfx):$(common-objpfx):$(common-objpfx)elf +++tststatic-ENV = LD_LIBRARY_PATH=$(ld-library-path):$(common-objpfx)elf ++ tststatic2-ENV = $(tststatic-ENV) ++ tststatic3-ENV = $(tststatic-ENV) ++ tststatic4-ENV = $(tststatic-ENV) ++diff --git a/elf/Makefile b/elf/Makefile ++index 2015383eb2..a494b14519 100644 ++--- a/elf/Makefile +++++ b/elf/Makefile ++@@ -180,7 +180,7 @@ tests-static := $(tests-static-normal) $(tests-static-internal) ++ ifeq (yes,$(build-shared)) ++ tests-static += tst-tls9-static ++ tst-tls9-static-ENV = \ ++- LD_LIBRARY_PATH=$(objpfx):$(common-objpfx):$(common-objpfx)dlfcn +++ LD_LIBRARY_PATH=$(ld-library-path):$(common-objpfx)dlfcn ++ ++ tests += restest1 preloadtest loadfail multiload origtest resolvfail \ ++ constload1 order noload filter \ ++@@ -1671,7 +1671,7 @@ $(objpfx)tst-libc_dlvsym-dso.so: $(libsupport) $(libdl) ++ $(objpfx)tst-libc_dlvsym.out: $(objpfx)tst-libc_dlvsym-dso.so ++ $(objpfx)tst-libc_dlvsym-static: $(common-objpfx)dlfcn/libdl.a ++ tst-libc_dlvsym-static-ENV = \ ++- LD_LIBRARY_PATH=$(objpfx):$(common-objpfx):$(common-objpfx)dlfcn +++ LD_LIBRARY_PATH=$(ld-library-path):$(common-objpfx)dlfcn ++ $(objpfx)tst-libc_dlvsym-static.out: $(objpfx)tst-libc_dlvsym-dso.so ++ ++ $(objpfx)tst-big-note: $(objpfx)tst-big-note-lib.so ++diff --git a/inet/Makefile b/inet/Makefile ++index 7a807fe805..a32c433dc3 100644 ++--- a/inet/Makefile +++++ b/inet/Makefile ++@@ -123,5 +123,5 @@ endif ++ # The test uses dlopen indirectly and would otherwise load system ++ # objects. ++ tst-idna_name_classify-ENV = \ ++- LD_LIBRARY_PATH=$(objpfx):$(common-objpfx):$(common-objpfx)elf +++ LD_LIBRARY_PATH=$(ld-library-path):$(common-objpfx):$(common-objpfx)elf ++ $(objpfx)tst-idna_name_classify.out: $(gen-locales) ++diff --git a/sysdeps/mach/hurd/Makeconfig b/sysdeps/mach/hurd/Makeconfig ++index fe3b7c553e..9adf8f291d 100644 ++--- a/sysdeps/mach/hurd/Makeconfig +++++ b/sysdeps/mach/hurd/Makeconfig ++@@ -5,3 +5,5 @@ static-start-installed-name = crt0.o ++ ++ # GNU libc on the Hurd is always reentrant. ++ libc-reentrant = yes +++ +++sysdep-ld-library-path = $(common-objpfx)/mach:$(common-objpfx)/hurd diff --cc debian/patches/hurd-i386/git-libc-open.diff index 000000000,000000000..c37ae5c8a new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/git-libc-open.diff @@@ -1,0 -1,0 +1,32 @@@ ++Commited for 2.33 ++ ++commit a6c9f54a3471a527ff502f26e3a1c1b03ab39d6e ++Author: Samuel Thibault ++Date: Sun Dec 13 13:29:25 2020 +0000 ++ ++ hurd: Add __libc_open and __libc_close ++ ++ Needed by libpthread for sem_open and sem_close ++ ++diff --git a/hurd/Versions b/hurd/Versions ++index 1aad27d91f..b66d37be07 100644 ++--- a/hurd/Versions +++++ b/hurd/Versions ++@@ -153,6 +153,7 @@ libc { ++ __lll_abstimed_lock; __lll_robust_lock; ++ __lll_robust_abstimed_lock; __lll_robust_trylock; ++ __lll_robust_unlock; +++ __libc_open; __libc_close; ++ ++ # Used by libpthread. ++ _hurd_sigstate_set_global_rcv; ++diff --git a/sysdeps/mach/hurd/close.c b/sysdeps/mach/hurd/close.c ++index b461087447..b6530dfeee 100644 ++--- a/sysdeps/mach/hurd/close.c +++++ b/sysdeps/mach/hurd/close.c ++@@ -35,4 +35,5 @@ __close (int fd) ++ return err ? __hurd_fail (err) : 0; ++ } ++ libc_hidden_def (__close) +++strong_alias (__close, __libc_close) ++ weak_alias (__close, close) diff --cc debian/patches/hurd-i386/git-libpthread-nodelete.diff index 000000000,000000000..93d63489b new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/git-libpthread-nodelete.diff @@@ -1,0 -1,0 +1,25 @@@ ++Commited for 2.32 ++ ++commit e2b9d562d1e024fda6d10f0f272521bf20fa664f ++Author: Samuel Thibault ++Date: Sun Jun 14 15:47:14 2020 +0000 ++ ++ htl: initialize first and prevent from unloading ++ ++ libc does not have codepaths for reverting the load of a libpthread. ++ ++ * htl/Makefile (LDFLAGS-pthread.so): Pass -z nodelete -z initfirst to ++ linker. ++ ++diff --git a/htl/Makefile b/htl/Makefile ++index c424bd512b..326a920fb3 100644 ++--- a/htl/Makefile +++++ b/htl/Makefile ++@@ -205,6 +205,7 @@ $(inst_libdir)/libpthread_syms.a: $(srcdir)/libpthread_syms.a $(+force) ++ libc-link.so = $(common-objpfx)libc.so ++ ++ extra-B-pthread.so = -B$(common-objpfx)htl/ +++LDFLAGS-pthread.so = -Wl,--enable-new-dtags,-z,nodelete,-z,initfirst ++ ++ include ../Rules ++ diff --cc debian/patches/hurd-i386/git-libpthread-testcancel.diff index 000000000,000000000..4445542c4 new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/git-libpthread-testcancel.diff @@@ -1,0 -1,0 +1,38 @@@ ++Commited in 2.32 ++ ++commit 59b7fe99f2593682ba779fe0faa8f1156d48d087 ++Author: Samuel Thibault ++Date: Sun Feb 9 22:23:52 2020 +0000 ++ ++ htl: Add support for libc cancellation points ++ ++Index: glibc-2.31/htl/pt-testcancel.c ++=================================================================== ++--- glibc-2.31.orig/htl/pt-testcancel.c +++++ glibc-2.31/htl/pt-testcancel.c ++@@ -22,7 +22,7 @@ ++ #include ++ ++ void ++-pthread_testcancel (void) +++__pthread_testcancel (void) ++ { ++ struct __pthread *p = _pthread_self (); ++ int cancelled; ++@@ -34,3 +34,4 @@ pthread_testcancel (void) ++ if (cancelled) ++ __pthread_exit (PTHREAD_CANCELED); ++ } +++strong_alias (__pthread_testcancel, pthread_testcancel) ++Index: glibc-2.31/sysdeps/htl/pthreadP.h ++=================================================================== ++--- glibc-2.31.orig/sysdeps/htl/pthreadP.h +++++ glibc-2.31/sysdeps/htl/pthreadP.h ++@@ -68,6 +68,7 @@ int __pthread_attr_setstack (pthread_att ++ int __pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr, ++ size_t __stacksize); ++ int __pthread_attr_getstack (const pthread_attr_t *, void **, size_t *); +++void __pthread_testcancel (void); ++ ++ #if IS_IN (libpthread) ++ hidden_proto (__pthread_create) diff --cc debian/patches/hurd-i386/git-libpthread_plt.diff index 000000000,000000000..9715df039 new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/git-libpthread_plt.diff @@@ -1,0 -1,0 +1,44 @@@ ++Commited for 2.33 ++ ++commit 7c331116971d38e57703af4097ed13ab6bef91d0 ++Author: Samuel Thibault ++Date: Thu Dec 3 12:21:47 2020 +0100 ++ ++ htl: Add hidden def for __pthread_create/detach ++ ++ to avoid a PLT. ++ ++--- ++ htl/pt-create.c | 1 + ++ htl/pt-detach.c | 1 + ++ sysdeps/htl/pthreadP.h | 2 ++ ++ 3 files changed, 4 insertions(+) ++ ++--- a/htl/pt-create.c +++++ b/htl/pt-create.c ++@@ -80,6 +80,7 @@ __pthread_create (pthread_t * thread, co ++ return err; ++ } ++ strong_alias (__pthread_create, pthread_create) +++hidden_def (__pthread_create) ++ ++ /* Internal version of pthread_create. See comment in ++ pt-internal.h. */ ++--- a/htl/pt-detach.c +++++ b/htl/pt-detach.c ++@@ -78,3 +78,4 @@ __pthread_detach (pthread_t thread) ++ return err; ++ } ++ strong_alias (__pthread_detach, pthread_detach) +++hidden_def (__pthread_detach) ++--- a/sysdeps/htl/pthreadP.h +++++ b/sysdeps/htl/pthreadP.h ++@@ -70,6 +70,8 @@ int __pthread_attr_getstack (const pthre ++ struct __pthread_cancelation_handler **___pthread_get_cleanup_stack (void) attribute_hidden; ++ ++ #if IS_IN (libpthread) +++hidden_proto (__pthread_create) +++hidden_proto (__pthread_detach) ++ hidden_proto (__pthread_key_create) ++ hidden_proto (__pthread_getspecific) ++ hidden_proto (__pthread_setspecific) diff --cc debian/patches/hurd-i386/git-libpthread_syms.diff index 000000000,000000000..ba1c25fcd new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/git-libpthread_syms.diff @@@ -1,0 -1,0 +1,141 @@@ ++commited for 2.32 ++ ++commit bc9cf8fbe8eafe375719ad869ab81609cfc3529c ++Author: Samuel Thibault ++Date: Wed Jun 10 20:03:52 2020 +0000 ++ ++ htl: Fix linking static tests by factorizing the symbols list ++ ++ libpthread_syms.a will contain the symbols that libc tries to get from ++ libpthread, to be used by the system, but also by tests. ++ ++ * htl/libpthread.a, htl/libpthread_pic.a: Link libpthread_syms.a and Move EXTERN ++ references to... ++ * htl/libpthread_syms.a: ... new file. Add missing ++ __pthread_enable_asynccancel reference. ++ * htl/Makefile: Install libpthread_syms.a and link it into static tests. ++ ++diff --git a/htl/Makefile b/htl/Makefile ++index 2de98e1774..c424bd512b 100644 ++--- a/htl/Makefile +++++ b/htl/Makefile ++@@ -173,6 +173,7 @@ static-only-routines = pt-atfork ++ extra-libs := libpthread ++ extra-libs-others := $(extra-libs) ++ install-lib := libpthread.so +++install-lib-ldscripts := libpthread_syms.a ++ ++ include ../Makeconfig ++ ++@@ -180,7 +181,7 @@ CFLAGS-lockfile.c = -D_IO_MTSAFE_IO ++ ++ all: # Make this the default target; it will be defined in Rules. ++ ++-subdir_install: $(inst_libdir)/libpthread2.a +++subdir_install: $(inst_libdir)/libpthread2.a $(inst_libdir)/libpthread_syms.a ++ ++ # XXX: If $(inst_libdir)/libpthread2.a is installed and ++ # $(inst_libdir)/libpthread is not, we can have some issues. ++@@ -198,6 +199,9 @@ $(inst_libdir)/libpthread2_pic.a: $(inst_libdir)/libpthread_pic.a ++ mv $< $@ ++ $(INSTALL_DATA) $(srcdir)/libpthread_pic.a $< ++ +++$(inst_libdir)/libpthread_syms.a: $(srcdir)/libpthread_syms.a $(+force) +++ $(do-install) +++ ++ libc-link.so = $(common-objpfx)libc.so ++ ++ extra-B-pthread.so = -B$(common-objpfx)htl/ ++@@ -217,7 +221,7 @@ $(objpfx)tst-unload: $(libdl) ++ $(addprefix $(objpfx), $(tests-reverse)): \ ++ $(objpfx)../libc.so $(objpfx)libpthread.so ++ $(objpfx)../libc.so: $(common-objpfx)libc.so ; ++-$(addprefix $(objpfx),$(tests-static) $(xtests-static)): $(objpfx)libpthread.a +++$(addprefix $(objpfx),$(tests-static) $(xtests-static)): $(srcdir)/libpthread_syms.a $(objpfx)libpthread.a ++ else ++-$(addprefix $(objpfx),$(tests) $(test-srcs)): $(objpfx)libpthread.a +++$(addprefix $(objpfx),$(tests) $(test-srcs)): $(srcdir)/libpthread_syms.a $(objpfx)libpthread.a ++ endif ++diff --git a/htl/libpthread.a b/htl/libpthread.a ++index e5bd2cc229..cfc1893b2b 100644 ++--- a/htl/libpthread.a +++++ b/htl/libpthread.a ++@@ -1,22 +1,2 @@ ++-/* pthread initializer is weak in glibc. It must be included if glibc ++- is to start threading. */ ++-EXTERN(_cthread_init_routine) ++- ++-/* Weak references in glibc that must be filled if glibc is to be ++- thread safe. */ ++-EXTERN(cthread_detach) ++-EXTERN(cthread_fork) ++-EXTERN(cthread_keycreate) ++-EXTERN(cthread_getspecific) ++-EXTERN(cthread_setspecific) ++-EXTERN(__mutex_lock_solid) ++-EXTERN(__mutex_unlock_solid) ++-/* For libio stream locking. */ ++-EXTERN(_cthreads_flockfile) ++-EXTERN(_cthreads_funlockfile) ++-EXTERN(_cthreads_ftrylockfile) ++-/* To get the sigthread stack layout on fork */ ++-EXTERN(pthread_getattr_np) ++-EXTERN(pthread_attr_getstack) ++- +++GROUP(-lpthread_syms) ++ GROUP(-lpthread2 -lrt) ++diff --git a/htl/libpthread_pic.a b/htl/libpthread_pic.a ++index 33346b4b39..8794ac6dab 100644 ++--- a/htl/libpthread_pic.a +++++ b/htl/libpthread_pic.a ++@@ -1,22 +1,2 @@ ++-/* pthread initializer is weak in glibc. It must be included if glibc ++- is to start threading. */ ++-EXTERN(_cthread_init_routine) ++- ++-/* Weak references in glibc that must be filled if glibc is to be ++- thread safe. */ ++-EXTERN(cthread_detach) ++-EXTERN(cthread_fork) ++-EXTERN(cthread_keycreate) ++-EXTERN(cthread_getspecific) ++-EXTERN(cthread_setspecific) ++-EXTERN(__mutex_lock_solid) ++-EXTERN(__mutex_unlock_solid) ++-/* For libio stream locking. */ ++-EXTERN(_cthreads_flockfile) ++-EXTERN(_cthreads_funlockfile) ++-EXTERN(_cthreads_ftrylockfile) ++-/* To get the sigthread stack layout on fork */ ++-EXTERN(pthread_getattr_np) ++-EXTERN(pthread_attr_getstack) ++- +++GROUP(-lpthread_syms) ++ GROUP(-lpthread2_pic) ++diff --git a/htl/libpthread_syms.a b/htl/libpthread_syms.a ++new file mode 100644 ++index 0000000000..3801ec93c8 ++--- /dev/null +++++ b/htl/libpthread_syms.a ++@@ -0,0 +1,21 @@ +++/* pthread initializer is weak in glibc. It must be included if glibc +++ is to start threading. */ +++EXTERN(_cthread_init_routine) +++ +++/* Weak references in glibc that must be filled if glibc is to be +++ thread safe. */ +++EXTERN(cthread_detach) +++EXTERN(cthread_fork) +++EXTERN(cthread_keycreate) +++EXTERN(cthread_getspecific) +++EXTERN(cthread_setspecific) +++EXTERN(__mutex_lock_solid) +++EXTERN(__mutex_unlock_solid) +++/* For libio stream locking. */ +++EXTERN(_cthreads_flockfile) +++EXTERN(_cthreads_funlockfile) +++EXTERN(_cthreads_ftrylockfile) +++/* To get the sigthread stack layout on fork */ +++EXTERN(pthread_getattr_np) +++EXTERN(pthread_attr_getstack) +++EXTERN(__pthread_enable_asynccancel) diff --cc debian/patches/hurd-i386/git-lll-initializer.diff index 000000000,000000000..a95a1411a new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/git-lll-initializer.diff @@@ -1,0 -1,0 +1,91 @@@ ++Commited for 2.33 ++ ++commit 059e60887b3244eb7ec0d764defe515fd525f513 ++Author: Samuel Thibault ++Date: Sun Dec 13 10:16:55 2020 +0000 ++ ++ hurd: Rename LLL_INITIALIZER to LLL_LOCK_INITIALIZER ++ ++ To get coherent with other ports. ++ ++diff --git a/hurd/setauth.c b/hurd/setauth.c ++index 5493db5e5d..b1037172ba 100644 ++--- a/hurd/setauth.c +++++ b/hurd/setauth.c ++@@ -24,7 +24,7 @@ ++ /* Things in the library which want to be run when the auth port changes. */ ++ DEFINE_HOOK (_hurd_reauth_hook, (auth_t new_auth)); ++ ++-static unsigned int reauth_lock = LLL_INITIALIZER; +++static unsigned int reauth_lock = LLL_LOCK_INITIALIZER; ++ ++ /* Set the auth port to NEW, and reauthenticate ++ everything used by the library. */ ++diff --git a/mach/lock-intern.h b/mach/lock-intern.h ++index a68674cef4..62faf98039 100644 ++--- a/mach/lock-intern.h +++++ b/mach/lock-intern.h ++@@ -31,7 +31,7 @@ ++ typedef unsigned int __spin_lock_t; ++ ++ /* Static initializer for spinlocks. */ ++-#define __SPIN_LOCK_INITIALIZER LLL_INITIALIZER +++#define __SPIN_LOCK_INITIALIZER LLL_LOCK_INITIALIZER ++ ++ /* Initialize LOCK. */ ++ ++diff --git a/mach/lowlevellock.h b/mach/lowlevellock.h ++index 6d92adca1c..cf67ccd589 100644 ++--- a/mach/lowlevellock.h +++++ b/mach/lowlevellock.h ++@@ -32,7 +32,7 @@ ++ #endif ++ ++ /* Static initializer for low-level locks. */ ++-#define LLL_INITIALIZER 0 +++#define LLL_LOCK_INITIALIZER 0 ++ ++ /* Wait on address PTR, without blocking if its contents ++ * are different from VAL. */ ++diff --git a/mach/mutex-init.c b/mach/mutex-init.c ++index acacec2fb0..fc898f66d4 100644 ++--- a/mach/mutex-init.c +++++ b/mach/mutex-init.c ++@@ -22,6 +22,6 @@ ++ void ++ __mutex_init (void *lock) ++ { ++- *(int *)lock = LLL_INITIALIZER; +++ *(int *)lock = LLL_LOCK_INITIALIZER; ++ } ++ libc_hidden_def (__mutex_init) ++diff --git a/sysdeps/mach/libc-lock.h b/sysdeps/mach/libc-lock.h ++index e04dcc445d..3993a57b26 100644 ++--- a/sysdeps/mach/libc-lock.h +++++ b/sysdeps/mach/libc-lock.h ++@@ -57,13 +57,13 @@ typedef struct __libc_lock_recursive_opaque__ __libc_lock_recursive_t; ++ CLASS __libc_lock_t NAME; ++ ++ /* Define an initialized lock variable NAME with storage class CLASS. */ ++-#define _LIBC_LOCK_INITIALIZER LLL_INITIALIZER +++#define _LIBC_LOCK_INITIALIZER LLL_LOCK_INITIALIZER ++ #define __libc_lock_define_initialized(CLASS,NAME) \ ++- CLASS __libc_lock_t NAME = LLL_INITIALIZER; +++ CLASS __libc_lock_t NAME = LLL_LOCK_INITIALIZER; ++ ++ /* Initialize the named lock variable, leaving it in a consistent, unlocked ++ state. */ ++-#define __libc_lock_init(NAME) (NAME) = LLL_INITIALIZER +++#define __libc_lock_init(NAME) (NAME) = LLL_LOCK_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 ++@@ -86,7 +86,7 @@ typedef struct __libc_lock_recursive_opaque__ __libc_lock_recursive_t; ++ #define __libc_lock_define_recursive(CLASS,NAME) \ ++ CLASS __libc_lock_recursive_t NAME; ++ ++-#define _LIBC_LOCK_RECURSIVE_INITIALIZER { LLL_INITIALIZER, 0, 0 } +++#define _LIBC_LOCK_RECURSIVE_INITIALIZER { LLL_LOCK_INITIALIZER, 0, 0 } ++ ++ #define __libc_lock_define_initialized_recursive(CLASS,NAME) \ ++ CLASS __libc_lock_recursive_t NAME = _LIBC_LOCK_RECURSIVE_INITIALIZER; diff --cc debian/patches/hurd-i386/git-lll-private.diff index 000000000,000000000..177949ee9 new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/git-lll-private.diff @@@ -1,0 -1,0 +1,22 @@@ ++Commited for 2.33 ++ ++commit bcbabb9e6c14db9f35ed83862e88a6d986fc7a69 ++Author: Samuel Thibault ++Date: Sun Dec 13 13:31:22 2020 +0000 ++ ++ hurd: Add LLL_PRIVATE and LLL_SHARED ++ ++diff --git a/mach/lowlevellock.h b/mach/lowlevellock.h ++index b872d0fe1e..9798d153cf 100644 ++--- a/mach/lowlevellock.h +++++ b/mach/lowlevellock.h ++@@ -34,6 +34,9 @@ ++ /* Static initializer for low-level locks. */ ++ #define LLL_LOCK_INITIALIZER 0 ++ +++#define LLL_PRIVATE 0 +++#define LLL_SHARED SYNC_SHARED +++ ++ /* Interruptible version of __gsync_wait. */ ++ extern kern_return_t __gsync_wait_intr ++ ( diff --cc debian/patches/hurd-i386/git-lll-ptr.diff index 000000000,000000000..565a6ead3 new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/git-lll-ptr.diff @@@ -1,0 -1,0 +1,556 @@@ ++Commited for 2.33 ++ ++commit 3934901a7444329d18b5edc6cb0d91fed35aeaaf ++Author: Samuel Thibault ++Date: Sun Dec 13 10:37:24 2020 +0000 ++ ++ hurd: make lll_* take a variable instead of a ptr ++ ++ To be coherent with other ports, let's make lll_* take a variable, and ++ rename those that keep taking a ptr into __lll_*. ++ ++Index: glibc-2.31/hurd/hurdlock.c ++=================================================================== ++--- glibc-2.31.orig/hurd/hurdlock.c +++++ glibc-2.31/hurd/hurdlock.c ++@@ -48,7 +48,7 @@ __lll_abstimed_wait (void *ptr, int val, ++ const struct timespec *tsp, int flags, int clk) ++ { ++ int mlsec = compute_reltime (tsp, clk); ++- return mlsec < 0 ? KERN_TIMEDOUT : lll_timed_wait (ptr, val, mlsec, flags); +++ return mlsec < 0 ? KERN_TIMEDOUT : __lll_timed_wait (ptr, val, mlsec, flags); ++ } ++ ++ int ++@@ -56,7 +56,7 @@ __lll_abstimed_xwait (void *ptr, int lo, ++ const struct timespec *tsp, int flags, int clk) ++ { ++ int mlsec = compute_reltime (tsp, clk); ++- return mlsec < 0 ? KERN_TIMEDOUT : lll_timed_xwait (ptr, lo, hi, mlsec, +++ return mlsec < 0 ? KERN_TIMEDOUT : __lll_timed_xwait (ptr, lo, hi, mlsec, ++ flags); ++ } ++ ++@@ -64,7 +64,7 @@ int ++ __lll_abstimed_lock (void *ptr, ++ const struct timespec *tsp, int flags, int clk) ++ { ++- if (lll_trylock (ptr) == 0) +++ if (__lll_trylock (ptr) == 0) ++ return 0; ++ ++ while (1) ++@@ -75,7 +75,7 @@ __lll_abstimed_lock (void *ptr, ++ return EINVAL; ++ ++ int mlsec = compute_reltime (tsp, clk); ++- if (mlsec < 0 || lll_timed_wait (ptr, 2, mlsec, flags) == KERN_TIMEDOUT) +++ if (mlsec < 0 || __lll_timed_wait (ptr, 2, mlsec, flags) == KERN_TIMEDOUT) ++ return ETIMEDOUT; ++ } ++ } ++@@ -131,7 +131,7 @@ __lll_robust_lock (void *ptr, int flags) ++ } ++ else ++ { ++- lll_timed_wait (iptr, val, wait_time, flags); +++ __lll_timed_wait (iptr, val, wait_time, flags); ++ if (wait_time < MAX_WAIT_TIME) ++ wait_time <<= 1; ++ } ++@@ -175,7 +175,7 @@ __lll_robust_abstimed_lock (void *ptr, ++ else if (mlsec > wait_time) ++ mlsec = wait_time; ++ ++- int res = lll_timed_wait (iptr, val, mlsec, flags); +++ int res = __lll_timed_wait (iptr, val, mlsec, flags); ++ if (res == KERN_TIMEDOUT) ++ return ETIMEDOUT; ++ else if (wait_time < MAX_WAIT_TIME) ++@@ -211,7 +211,7 @@ __lll_robust_unlock (void *ptr, int flag ++ { ++ if (val & LLL_WAITERS) ++ { ++- lll_set_wake (ptr, 0, flags); +++ __lll_set_wake (ptr, 0, flags); ++ break; ++ } ++ else if (atomic_compare_exchange_weak_release ((unsigned int *)ptr, &val, 0)) ++Index: glibc-2.31/hurd/hurdlock.h ++=================================================================== ++--- glibc-2.31.orig/hurd/hurdlock.h +++++ glibc-2.31/hurd/hurdlock.h ++@@ -31,21 +31,21 @@ struct timespec; ++ ++ /* Wait on 64-bit address PTR, without blocking if its contents ++ are different from the pair . */ ++-#define lll_xwait(ptr, lo, hi, flags) \ +++#define __lll_xwait(ptr, lo, hi, flags) \ ++ __gsync_wait (__mach_task_self (), \ ++ (vm_offset_t)ptr, lo, hi, 0, flags | GSYNC_QUAD) ++ ++-/* Same as 'lll_wait', but only block for MLSEC milliseconds. */ ++-#define lll_timed_wait(ptr, val, mlsec, flags) \ +++/* Same as '__lll_wait', but only block for MLSEC milliseconds. */ +++#define __lll_timed_wait(ptr, val, mlsec, flags) \ ++ __gsync_wait (__mach_task_self (), \ ++ (vm_offset_t)ptr, val, 0, mlsec, flags | GSYNC_TIMED) ++ ++-/* Same as 'lll_xwait', but only block for MLSEC milliseconds. */ ++-#define lll_timed_xwait(ptr, lo, hi, mlsec, flags) \ +++/* Same as '__lll_xwait', but only block for MLSEC milliseconds. */ +++#define __lll_timed_xwait(ptr, lo, hi, mlsec, flags) \ ++ __gsync_wait (__mach_task_self (), (vm_offset_t)ptr, \ ++ lo, hi, mlsec, flags | GSYNC_TIMED | GSYNC_QUAD) ++ ++-/* Same as 'lll_wait', but only block until TSP elapses, +++/* Same as '__lll_wait', but only block until TSP elapses, ++ using clock CLK. */ ++ extern int __lll_abstimed_wait (void *__ptr, int __val, ++ const struct timespec *__tsp, int __flags, int __clk); ++@@ -63,6 +63,8 @@ extern int __lll_abstimed_lock (void *__ ++ /* Acquire the lock at PTR, but return with an error if ++ the process containing the owner thread dies. */ ++ extern int __lll_robust_lock (void *__ptr, int __flags); +++#define lll_robust_lock(var, flags) \ +++ __lll_robust_lock (&(var), flags) ++ ++ /* Same as '__lll_robust_lock', but only block until TSP ++ elapses, using clock CLK. */ ++@@ -72,19 +74,23 @@ extern int __lll_robust_abstimed_lock (v ++ /* Same as '__lll_robust_lock', but return with an error ++ if the lock cannot be acquired without blocking. */ ++ extern int __lll_robust_trylock (void *__ptr); +++#define lll_robust_trylock(var) \ +++ __lll_robust_trylock (&(var)) ++ ++ /* Wake one or more threads waiting on address PTR, ++ setting its value to VAL before doing so. */ ++-#define lll_set_wake(ptr, val, flags) \ +++#define __lll_set_wake(ptr, val, flags) \ ++ __gsync_wake (__mach_task_self (), \ ++ (vm_offset_t)ptr, val, flags | GSYNC_MUTATE) ++ ++ /* Release the robust lock at PTR. */ ++ extern void __lll_robust_unlock (void *__ptr, int __flags); +++#define lll_robust_unlock(var, flags) \ +++ __lll_robust_unlock (&(var), flags) ++ ++ /* Rearrange threads waiting on address SRC to instead wait on ++ DST, waking one of them if WAIT_ONE is non-zero. */ ++-#define lll_requeue(src, dst, wake_one, flags) \ +++#define __lll_requeue(src, dst, wake_one, flags) \ ++ __gsync_requeue (__mach_task_self (), (vm_offset_t)src, \ ++ (vm_offset_t)dst, (boolean_t)wake_one, flags) ++ ++@@ -93,31 +99,31 @@ extern void __lll_robust_unlock (void *_ ++ every one of these calls, defaulting to CLOCK_REALTIME if ++ no argument is passed. */ ++ ++-#define lll_abstimed_wait(ptr, val, tsp, flags, ...) \ +++#define lll_abstimed_wait(var, val, tsp, flags, ...) \ ++ ({ \ ++ const clockid_t __clk[] = { CLOCK_REALTIME, ##__VA_ARGS__ }; \ ++- __lll_abstimed_wait ((ptr), (val), (tsp), (flags), \ +++ __lll_abstimed_wait (&(var), (val), (tsp), (flags), \ ++ __clk[sizeof (__clk) / sizeof (__clk[0]) - 1]); \ ++ }) ++ ++-#define lll_abstimed_xwait(ptr, lo, hi, tsp, flags, ...) \ +++#define lll_abstimed_xwait(var, lo, hi, tsp, flags, ...) \ ++ ({ \ ++ const clockid_t __clk[] = { CLOCK_REALTIME, ##__VA_ARGS__ }; \ ++- __lll_abstimed_xwait ((ptr), (lo), (hi), (tsp), (flags), \ +++ __lll_abstimed_xwait (&(var), (lo), (hi), (tsp), (flags), \ ++ __clk[sizeof (__clk) / sizeof (__clk[0]) - 1]); \ ++ }) ++ ++-#define lll_abstimed_lock(ptr, tsp, flags, ...) \ +++#define lll_abstimed_lock(var, tsp, flags, ...) \ ++ ({ \ ++ const clockid_t __clk[] = { CLOCK_REALTIME, ##__VA_ARGS__ }; \ ++- __lll_abstimed_lock ((ptr), (tsp), (flags), \ +++ __lll_abstimed_lock (&(var), (tsp), (flags), \ ++ __clk[sizeof (__clk) / sizeof (__clk[0]) - 1]); \ ++ }) ++ ++-#define lll_robust_abstimed_lock(ptr, tsp, flags, ...) \ +++#define lll_robust_abstimed_lock(var, tsp, flags, ...) \ ++ ({ \ ++ const clockid_t __clk[] = { CLOCK_REALTIME, ##__VA_ARGS__ }; \ ++- __lll_robust_abstimed_lock ((ptr), (tsp), (flags), \ +++ __lll_robust_abstimed_lock (&(var), (tsp), (flags), \ ++ __clk[sizeof (__clk) / sizeof (__clk[0]) - 1]); \ ++ }) ++ ++Index: glibc-2.31/hurd/hurdpid.c ++=================================================================== ++--- glibc-2.31.orig/hurd/hurdpid.c +++++ glibc-2.31/hurd/hurdpid.c ++@@ -66,7 +66,7 @@ _S_msg_proc_newids (mach_port_t me, ++ ++ /* Notify any waiting user threads that the id change as been completed. */ ++ ++_hurd_pids_changed_stamp; ++- lll_wake (&_hurd_pids_changed_stamp, GSYNC_BROADCAST); +++ lll_wake (_hurd_pids_changed_stamp, GSYNC_BROADCAST); ++ ++ return 0; ++ } ++Index: glibc-2.31/mach/lock-intern.h ++=================================================================== ++--- glibc-2.31.orig/mach/lock-intern.h +++++ glibc-2.31/mach/lock-intern.h ++@@ -57,7 +57,7 @@ extern void __spin_lock (__spin_lock_t * ++ _EXTERN_INLINE void ++ __spin_lock (__spin_lock_t *__lock) ++ { ++- lll_lock (__lock, 0); +++ __lll_lock (__lock, 0); ++ } ++ #endif ++ ++@@ -68,7 +68,7 @@ extern void __spin_unlock (__spin_lock_t ++ _EXTERN_INLINE void ++ __spin_unlock (__spin_lock_t *__lock) ++ { ++- lll_unlock (__lock, 0); +++ __lll_unlock (__lock, 0); ++ } ++ #endif ++ ++@@ -79,7 +79,7 @@ extern int __spin_try_lock (__spin_lock_ ++ _EXTERN_INLINE int ++ __spin_try_lock (__spin_lock_t *__lock) ++ { ++- return (lll_trylock (__lock) == 0); +++ return (__lll_trylock (__lock) == 0); ++ } ++ #endif ++ ++Index: glibc-2.31/mach/lowlevellock.h ++=================================================================== ++--- glibc-2.31.orig/mach/lowlevellock.h +++++ glibc-2.31/mach/lowlevellock.h ++@@ -36,16 +36,20 @@ ++ ++ /* Wait on address PTR, without blocking if its contents ++ * are different from VAL. */ ++-#define lll_wait(ptr, val, flags) \ +++#define __lll_wait(ptr, val, flags) \ ++ __gsync_wait (__mach_task_self (), \ ++ (vm_offset_t)(ptr), (val), 0, 0, (flags)) +++#define lll_wait(var, val, flags) \ +++ __lll_wait (&(var), val, flags) ++ ++ /* Wake one or more threads waiting on address PTR. */ ++-#define lll_wake(ptr, flags) \ +++#define __lll_wake(ptr, flags) \ ++ __gsync_wake (__mach_task_self (), (vm_offset_t)(ptr), 0, (flags)) +++#define lll_wake(var, flags) \ +++ __lll_wake (&(var), flags) ++ ++ /* Acquire the lock at PTR. */ ++-#define lll_lock(ptr, flags) \ +++#define __lll_lock(ptr, flags) \ ++ ({ \ ++ int *__iptr = (int *)(ptr); \ ++ int __flags = (flags); \ ++@@ -55,27 +59,33 @@ ++ { \ ++ if (atomic_exchange_acq (__iptr, 2) == 0) \ ++ break; \ ++- lll_wait (__iptr, 2, __flags); \ +++ __lll_wait (__iptr, 2, __flags); \ ++ } \ ++ (void)0; \ ++ }) +++#define lll_lock(var, flags) \ +++ __lll_lock (&(var), flags) ++ ++ /* Try to acquire the lock at PTR, without blocking. ++ Evaluates to zero on success. */ ++-#define lll_trylock(ptr) \ +++#define __lll_trylock(ptr) \ ++ ({ \ ++ int *__iptr = (int *)(ptr); \ ++ *__iptr == 0 \ ++ && atomic_compare_and_exchange_bool_acq (__iptr, 1, 0) == 0 ? 0 : -1; \ ++ }) +++#define lll_trylock(var) \ +++ __lll_trylock (&(var)) ++ ++ /* Release the lock at PTR. */ ++-#define lll_unlock(ptr, flags) \ +++#define __lll_unlock(ptr, flags) \ ++ ({ \ ++ int *__iptr = (int *)(ptr); \ ++ if (atomic_exchange_rel (__iptr, 0) == 2) \ ++- lll_wake (__iptr, (flags)); \ +++ __lll_wake (__iptr, (flags)); \ ++ (void)0; \ ++ }) +++#define lll_unlock(var, flags) \ +++ __lll_unlock (&(var), flags) ++ ++ #endif ++Index: glibc-2.31/sysdeps/mach/hurd/htl/pt-mutex-lock.c ++=================================================================== ++--- glibc-2.31.orig/sysdeps/mach/hurd/htl/pt-mutex-lock.c +++++ glibc-2.31/sysdeps/mach/hurd/htl/pt-mutex-lock.c ++@@ -33,7 +33,7 @@ __pthread_mutex_lock (pthread_mutex_t *m ++ switch (MTX_TYPE (mtxp)) ++ { ++ case PT_MTX_NORMAL: ++- lll_lock (&mtxp->__lock, flags); +++ lll_lock (mtxp->__lock, flags); ++ break; ++ ++ case PT_MTX_RECURSIVE: ++@@ -47,7 +47,7 @@ __pthread_mutex_lock (pthread_mutex_t *m ++ return ret; ++ } ++ ++- lll_lock (&mtxp->__lock, flags); +++ lll_lock (mtxp->__lock, flags); ++ mtx_set_owner (mtxp, self, flags); ++ mtxp->__cnt = 1; ++ break; ++@@ -57,7 +57,7 @@ __pthread_mutex_lock (pthread_mutex_t *m ++ if (mtx_owned_p (mtxp, self, flags)) ++ return EDEADLK; ++ ++- lll_lock (&mtxp->__lock, flags); +++ lll_lock (mtxp->__lock, flags); ++ mtx_set_owner (mtxp, self, flags); ++ break; ++ ++@@ -65,7 +65,7 @@ __pthread_mutex_lock (pthread_mutex_t *m ++ case PT_MTX_RECURSIVE | PTHREAD_MUTEX_ROBUST: ++ case PT_MTX_ERRORCHECK | PTHREAD_MUTEX_ROBUST: ++ self = _pthread_self (); ++- ROBUST_LOCK (self, mtxp, __lll_robust_lock, flags); +++ ROBUST_LOCK (self, mtxp, lll_robust_lock, flags); ++ break; ++ ++ default: ++Index: glibc-2.31/sysdeps/mach/hurd/htl/pt-mutex-timedlock.c ++=================================================================== ++--- glibc-2.31.orig/sysdeps/mach/hurd/htl/pt-mutex-timedlock.c +++++ glibc-2.31/sysdeps/mach/hurd/htl/pt-mutex-timedlock.c ++@@ -32,7 +32,7 @@ __pthread_mutex_timedlock (pthread_mutex ++ switch (MTX_TYPE (mtxp)) ++ { ++ case PT_MTX_NORMAL: ++- ret = lll_abstimed_lock (&mtxp->__lock, tsp, flags); +++ ret = lll_abstimed_lock (mtxp->__lock, tsp, flags); ++ break; ++ ++ case PT_MTX_RECURSIVE: ++@@ -45,7 +45,7 @@ __pthread_mutex_timedlock (pthread_mutex ++ ++mtxp->__cnt; ++ ret = 0; ++ } ++- else if ((ret = lll_abstimed_lock (&mtxp->__lock, tsp, flags)) == 0) +++ else if ((ret = lll_abstimed_lock (mtxp->__lock, tsp, flags)) == 0) ++ { ++ mtx_set_owner (mtxp, self, flags); ++ mtxp->__cnt = 1; ++@@ -57,7 +57,7 @@ __pthread_mutex_timedlock (pthread_mutex ++ self = _pthread_self (); ++ if (mtx_owned_p (mtxp, self, flags)) ++ ret = EDEADLK; ++- else if ((ret = lll_abstimed_lock (&mtxp->__lock, tsp, flags)) == 0) +++ else if ((ret = lll_abstimed_lock (mtxp->__lock, tsp, flags)) == 0) ++ mtx_set_owner (mtxp, self, flags); ++ ++ break; ++Index: glibc-2.31/sysdeps/mach/hurd/htl/pt-mutex-trylock.c ++=================================================================== ++--- glibc-2.31.orig/sysdeps/mach/hurd/htl/pt-mutex-trylock.c +++++ glibc-2.31/sysdeps/mach/hurd/htl/pt-mutex-trylock.c ++@@ -32,7 +32,7 @@ __pthread_mutex_trylock (pthread_mutex_t ++ switch (MTX_TYPE (mtxp)) ++ { ++ case PT_MTX_NORMAL: ++- ret = lll_trylock (&mtxp->__lock); +++ ret = lll_trylock (mtxp->__lock); ++ if (ret) ++ ret = EBUSY; ++ break; ++@@ -47,7 +47,7 @@ __pthread_mutex_trylock (pthread_mutex_t ++ ++mtxp->__cnt; ++ ret = 0; ++ } ++- else if ((ret = lll_trylock (&mtxp->__lock)) == 0) +++ else if ((ret = lll_trylock (mtxp->__lock)) == 0) ++ { ++ mtx_set_owner (mtxp, self, mtxp->__flags); ++ mtxp->__cnt = 1; ++@@ -59,7 +59,7 @@ __pthread_mutex_trylock (pthread_mutex_t ++ ++ case PT_MTX_ERRORCHECK: ++ self = _pthread_self (); ++- if ((ret = lll_trylock (&mtxp->__lock)) == 0) +++ if ((ret = lll_trylock (mtxp->__lock)) == 0) ++ mtx_set_owner (mtxp, self, mtxp->__flags); ++ else ++ ret = EBUSY; ++@@ -69,7 +69,7 @@ __pthread_mutex_trylock (pthread_mutex_t ++ case PT_MTX_RECURSIVE | PTHREAD_MUTEX_ROBUST: ++ case PT_MTX_ERRORCHECK | PTHREAD_MUTEX_ROBUST: ++ self = _pthread_self (); ++- ROBUST_LOCK (self, mtxp, __lll_robust_trylock); +++ ROBUST_LOCK (self, mtxp, lll_robust_trylock); ++ break; ++ ++ default: ++Index: glibc-2.31/sysdeps/mach/hurd/htl/pt-mutex-unlock.c ++=================================================================== ++--- glibc-2.31.orig/sysdeps/mach/hurd/htl/pt-mutex-unlock.c +++++ glibc-2.31/sysdeps/mach/hurd/htl/pt-mutex-unlock.c ++@@ -32,7 +32,7 @@ __pthread_mutex_unlock (pthread_mutex_t ++ switch (MTX_TYPE (mtxp)) ++ { ++ case PT_MTX_NORMAL: ++- lll_unlock (&mtxp->__lock, flags); +++ lll_unlock (mtxp->__lock, flags); ++ break; ++ ++ case PT_MTX_RECURSIVE: ++@@ -42,7 +42,7 @@ __pthread_mutex_unlock (pthread_mutex_t ++ else if (--mtxp->__cnt == 0) ++ { ++ mtxp->__owner_id = mtxp->__shpid = 0; ++- lll_unlock (&mtxp->__lock, flags); +++ lll_unlock (mtxp->__lock, flags); ++ } ++ ++ break; ++@@ -54,7 +54,7 @@ __pthread_mutex_unlock (pthread_mutex_t ++ else ++ { ++ mtxp->__owner_id = mtxp->__shpid = 0; ++- lll_unlock (&mtxp->__lock, flags); +++ lll_unlock (mtxp->__lock, flags); ++ } ++ ++ break; ++@@ -74,7 +74,7 @@ __pthread_mutex_unlock (pthread_mutex_t ++ * state, mark it as irrecoverable. */ ++ mtxp->__owner_id = ((mtxp->__lock & LLL_DEAD_OWNER) ++ ? NOTRECOVERABLE_ID : 0); ++- __lll_robust_unlock (&mtxp->__lock, flags); +++ lll_robust_unlock (mtxp->__lock, flags); ++ } ++ ++ break; ++Index: glibc-2.31/sysdeps/mach/hurd/htl/pt-mutex.h ++=================================================================== ++--- glibc-2.31.orig/sysdeps/mach/hurd/htl/pt-mutex.h +++++ glibc-2.31/sysdeps/mach/hurd/htl/pt-mutex.h ++@@ -42,7 +42,7 @@ ++ return EDEADLK; \ ++ } \ ++ \ ++- ret = cb (&mtxp->__lock, ##__VA_ARGS__); \ +++ ret = cb (mtxp->__lock, ##__VA_ARGS__); \ ++ if (ret == 0 || ret == EOWNERDEAD) \ ++ { \ ++ if (mtxp->__owner_id == ENOTRECOVERABLE) \ ++Index: glibc-2.31/sysdeps/mach/hurd/setpgid.c ++=================================================================== ++--- glibc-2.31.orig/sysdeps/mach/hurd/setpgid.c +++++ glibc-2.31/sysdeps/mach/hurd/setpgid.c ++@@ -39,7 +39,7 @@ __setpgid (pid_t pid, pid_t pgid) ++ /* Synchronize with the signal thread to make sure we have ++ received and processed proc_newids before returning to the user. */ ++ while (_hurd_pids_changed_stamp == stamp) ++- lll_wait (&_hurd_pids_changed_stamp, stamp, 0); +++ lll_wait (_hurd_pids_changed_stamp, stamp, 0); ++ ++ return 0; ++ ++Index: glibc-2.31/sysdeps/mach/hurd/setsid.c ++=================================================================== ++--- glibc-2.31.orig/sysdeps/mach/hurd/setsid.c +++++ glibc-2.31/sysdeps/mach/hurd/setsid.c ++@@ -56,7 +56,7 @@ __setsid (void) ++ returned by `getpgrp ()' in other threads) has been updated before ++ we return. */ ++ while (_hurd_pids_changed_stamp == stamp) ++- lll_wait (&_hurd_pids_changed_stamp, stamp, 0); +++ lll_wait (_hurd_pids_changed_stamp, stamp, 0); ++ } ++ ++ HURD_CRITICAL_END; ++Index: glibc-2.31/sysdeps/mach/hurd/tls.h ++=================================================================== ++--- glibc-2.31.orig/sysdeps/mach/hurd/tls.h +++++ glibc-2.31/sysdeps/mach/hurd/tls.h ++@@ -61,7 +61,7 @@ ++ #define THREAD_GSCOPE_RESET_FLAG() \ ++ do \ ++ if (atomic_exchange_and_add_rel (&GL(dl_thread_gscope_count), -1) == 1) \ ++- lll_wake (&GL(dl_thread_gscope_count), 0); \ +++ lll_wake (GL(dl_thread_gscope_count), 0); \ ++ while (0) ++ #define THREAD_GSCOPE_WAIT() \ ++ do \ ++@@ -69,7 +69,7 @@ ++ int count; \ ++ atomic_write_barrier (); \ ++ while ((count = GL(dl_thread_gscope_count))) \ ++- lll_wait (&GL(dl_thread_gscope_count), count, 0); \ +++ lll_wait (GL(dl_thread_gscope_count), count, 0); \ ++ } \ ++ while (0) ++ ++Index: glibc-2.31/sysdeps/mach/libc-lock.h ++=================================================================== ++--- glibc-2.31.orig/sysdeps/mach/libc-lock.h +++++ glibc-2.31/sysdeps/mach/libc-lock.h ++@@ -74,14 +74,14 @@ typedef struct __libc_lock_recursive_opa ++ ++ /* Lock the named lock variable. */ ++ #define __libc_lock_lock(NAME) \ ++- ({ lll_lock (&(NAME), 0); 0; }) +++ ({ lll_lock ((NAME), 0); 0; }) ++ ++ /* Lock the named lock variable. */ ++-#define __libc_lock_trylock(NAME) lll_trylock (&(NAME)) +++#define __libc_lock_trylock(NAME) lll_trylock (NAME) ++ ++ /* Unlock the named lock variable. */ ++ #define __libc_lock_unlock(NAME) \ ++- ({ lll_unlock (&(NAME), 0); 0; }) +++ ({ lll_unlock ((NAME), 0); 0; }) ++ ++ #define __libc_lock_define_recursive(CLASS,NAME) \ ++ CLASS __libc_lock_recursive_t NAME; ++@@ -111,7 +111,7 @@ typedef struct __libc_lock_recursive_opa ++ int __r = 0; \ ++ if (__self == __lock->owner) \ ++ ++__lock->cnt; \ ++- else if ((__r = lll_trylock (&__lock->lock)) == 0) \ +++ else if ((__r = lll_trylock (__lock->lock)) == 0) \ ++ __lock->owner = __self, __lock->cnt = 1; \ ++ __r; \ ++ }) ++@@ -122,7 +122,7 @@ typedef struct __libc_lock_recursive_opa ++ void *__self = __libc_lock_owner_self (); \ ++ if (__self != __lock->owner) \ ++ { \ ++- lll_lock (&__lock->lock, 0); \ +++ lll_lock (__lock->lock, 0); \ ++ __lock->owner = __self; \ ++ } \ ++ ++__lock->cnt; \ ++@@ -135,7 +135,7 @@ typedef struct __libc_lock_recursive_opa ++ if (--__lock->cnt == 0) \ ++ { \ ++ __lock->owner = 0; \ ++- lll_unlock (&__lock->lock, 0); \ +++ lll_unlock (__lock->lock, 0); \ ++ } \ ++ }) ++ diff --cc debian/patches/hurd-i386/git-lll-wait-intr.diff index 000000000,000000000..a21155bcf new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/git-lll-wait-intr.diff @@@ -1,0 -1,0 +1,153 @@@ ++Commited for 2.33 ++ ++commit 1c3c8e342a3973fc5e1ddcba7d3e9b68dfe9a25b ++Author: Samuel Thibault ++Date: Sun Dec 13 11:01:52 2020 +0000 ++ ++ hurd: Add __lll_abstimed_wait_intr ++ ++ For semaphores, we need an interruptible version of low-level locks. ++ ++Index: glibc-2.31/hurd/Makefile ++=================================================================== ++--- glibc-2.31.orig/hurd/Makefile +++++ glibc-2.31/hurd/Makefile ++@@ -93,6 +93,7 @@ CFLAGS-RPC_exec_startup_get_info.o = $(n ++ # Make generated headers compatible with all support standards ++ migheaderpipe := | sed -e 's/\/__ino64_t/' -e 's/\/__loff_t/' ++ include ../mach/Machrules +++libhurduser-routines += RPC_gsync_wait_intr ++ include ../Rules ++ ++ # intr-rpc.defs defines the INTR_INTERFACE macro to make the generated RPC ++Index: glibc-2.31/hurd/RPC_gsync_wait_intr.c ++=================================================================== ++--- /dev/null +++++ glibc-2.31/hurd/RPC_gsync_wait_intr.c ++@@ -0,0 +1,4 @@ +++#include "intr-rpc.h" +++#define gsync_wait gsync_wait_intr +++#define __gsync_wait __gsync_wait_intr +++#include "RPC_gsync_wait.c" ++Index: glibc-2.31/hurd/Versions ++=================================================================== ++--- glibc-2.31.orig/hurd/Versions +++++ glibc-2.31/hurd/Versions ++@@ -156,7 +156,7 @@ libc { ++ ++ GLIBC_PRIVATE { ++ # Used by other libs. ++- __lll_abstimed_wait; __lll_abstimed_xwait; +++ __lll_abstimed_wait; __lll_abstimed_wait_intr; __lll_abstimed_xwait; ++ __lll_abstimed_lock; __lll_robust_lock; ++ __lll_robust_abstimed_lock; __lll_robust_trylock; ++ __lll_robust_unlock; ++Index: glibc-2.31/hurd/hurdlock.c ++=================================================================== ++--- glibc-2.31.orig/hurd/hurdlock.c +++++ glibc-2.31/hurd/hurdlock.c ++@@ -51,6 +51,27 @@ __lll_abstimed_wait (void *ptr, int val, ++ return mlsec < 0 ? KERN_TIMEDOUT : __lll_timed_wait (ptr, val, mlsec, flags); ++ } ++ +++#if 1 +++int +++__lll_abstimed_wait_intr (void *ptr, int val, +++ const struct timespec *tsp, int flags, int clk) +++{ +++ if (clk != CLOCK_REALTIME) +++ return EINVAL; +++ +++ int mlsec = compute_reltime (tsp, clk); +++ extern void _S_msg_server(void); +++ extern void __fsys_get_children(void); +++ //return (int) (intptr_t) _S_msg_server; +++ //return (int) (intptr_t) __fsys_get_children; +++ //return (int) (intptr_t) __gsync_wait_intr; +++ //return (int) (intptr_t) _hurd_intr_rpc_mach_msg; +++ //return mlsec < 0 ? KERN_TIMEDOUT : 0; +++ //__lll_timed_wait_intr (ptr, val, mlsec, flags); +++ return mlsec < 0 ? KERN_TIMEDOUT : __lll_timed_wait_intr (ptr, val, mlsec, flags); +++} +++#endif +++ ++ int ++ __lll_abstimed_xwait (void *ptr, int lo, int hi, ++ const struct timespec *tsp, int flags, int clk) ++Index: glibc-2.31/hurd/hurdlock.h ++=================================================================== ++--- glibc-2.31.orig/hurd/hurdlock.h +++++ glibc-2.31/hurd/hurdlock.h ++@@ -40,6 +40,11 @@ struct timespec; ++ __gsync_wait (__mach_task_self (), \ ++ (vm_offset_t)ptr, val, 0, mlsec, flags | GSYNC_TIMED) ++ +++/* Interruptible version. */ +++#define __lll_timed_wait_intr(ptr, val, mlsec, flags) \ +++ __gsync_wait_intr (__mach_task_self (), \ +++ (vm_offset_t)ptr, val, 0, mlsec, flags | GSYNC_TIMED) +++ ++ /* Same as '__lll_xwait', but only block for MLSEC milliseconds. */ ++ #define __lll_timed_xwait(ptr, lo, hi, mlsec, flags) \ ++ __gsync_wait (__mach_task_self (), (vm_offset_t)ptr, \ ++@@ -50,6 +55,10 @@ struct timespec; ++ extern int __lll_abstimed_wait (void *__ptr, int __val, ++ const struct timespec *__tsp, int __flags, int __clk); ++ +++/* Interruptible version. */ +++extern int __lll_abstimed_wait_intr (void *__ptr, int __val, +++ const struct timespec *__tsp, int __flags, int __clk); +++ ++ /* Same as 'lll_xwait', but only block until TSP elapses, ++ using clock CLK. */ ++ extern int __lll_abstimed_xwait (void *__ptr, int __lo, int __hi, ++@@ -106,6 +115,13 @@ extern void __lll_robust_unlock (void *_ ++ __clk[sizeof (__clk) / sizeof (__clk[0]) - 1]); \ ++ }) ++ +++#define lll_abstimed_wait_intr(var, val, tsp, flags, ...) \ +++ ({ \ +++ const clockid_t __clk[] = { CLOCK_REALTIME, ##__VA_ARGS__ }; \ +++ __lll_abstimed_wait_intr (&(var), (val), (tsp), (flags), \ +++ __clk[sizeof (__clk) / sizeof (__clk[0]) - 1]); \ +++ }) +++ ++ #define lll_abstimed_xwait(var, lo, hi, tsp, flags, ...) \ ++ ({ \ ++ const clockid_t __clk[] = { CLOCK_REALTIME, ##__VA_ARGS__ }; \ ++Index: glibc-2.31/mach/lowlevellock.h ++=================================================================== ++--- glibc-2.31.orig/mach/lowlevellock.h +++++ glibc-2.31/mach/lowlevellock.h ++@@ -34,6 +34,17 @@ ++ /* Static initializer for low-level locks. */ ++ #define LLL_LOCK_INITIALIZER 0 ++ +++/* Interruptible version of __gsync_wait. */ +++extern kern_return_t __gsync_wait_intr +++( +++ mach_port_t task, +++ vm_offset_t addr, +++ unsigned val1, +++ unsigned val2, +++ natural_t msec, +++ int flags +++); +++ ++ /* Wait on address PTR, without blocking if its contents ++ * are different from VAL. */ ++ #define __lll_wait(ptr, val, flags) \ ++@@ -42,6 +53,13 @@ ++ #define lll_wait(var, val, flags) \ ++ __lll_wait (&(var), val, flags) ++ +++/* Interruptible version. */ +++#define __lll_wait_intr(ptr, val, flags) \ +++ __gsync_wait_intr (__mach_task_self (), \ +++ (vm_offset_t)(ptr), (val), 0, 0, (flags)) +++#define lll_wait_intr(var, val, flags) \ +++ __lll_wait_intr ((&var), val, flags) +++ ++ /* Wake one or more threads waiting on address PTR. */ ++ #define __lll_wake(ptr, flags) \ ++ __gsync_wake (__mach_task_self (), (vm_offset_t)(ptr), 0, (flags)) diff --cc debian/patches/hurd-i386/git-longjmp-onstack.diff index 000000000,000000000..594e0f296 new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/git-longjmp-onstack.diff @@@ -1,0 -1,0 +1,277 @@@ ++Committed for glibc 2.32 ++ ++commit 02937d825a71636c13b3f4229e5d6c9e54e327d5 ++Author: Samuel Thibault ++Date: Sat Jun 6 20:21:22 2020 +0200 ++ ++ hurd: fix clearing SS_ONSTACK when longjmp-ing from sighandler ++ ++ * sysdeps/i386/htl/Makefile: New file. ++ * sysdeps/i386/htl/tcb-offsets.sym: New file. ++ * sysdeps/mach/hurd/i386/Makefile [setjmp] (gen-as-const-headers): Add ++ signal-defines.sym. ++ * sysdeps/mach/hurd/i386/____longjmp_chk.S: Include tcb-offsets.h. ++ (____longjmp_chk): Harmonize with i386's __longjmp. Clear SS_ONSTACK ++ when jumping off the alternate stack. ++ * sysdeps/mach/hurd/i386/__longjmp.S: New file. ++ ++diff --git a/sysdeps/i386/htl/Makefile b/sysdeps/i386/htl/Makefile ++new file mode 100644 ++index 0000000000..8573ce6990 ++--- /dev/null +++++ b/sysdeps/i386/htl/Makefile ++@@ -0,0 +1,20 @@ +++# Copyright (C) 2020 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 +++# . +++ +++ifeq ($(subdir),csu) +++gen-as-const-headers += tcb-offsets.sym +++endif ++diff --git a/sysdeps/i386/htl/tcb-offsets.sym b/sysdeps/i386/htl/tcb-offsets.sym ++new file mode 100644 ++index 0000000000..7b7c719369 ++--- /dev/null +++++ b/sysdeps/i386/htl/tcb-offsets.sym ++@@ -0,0 +1,8 @@ +++#include +++#include +++#include +++ +++MULTIPLE_THREADS_OFFSET offsetof (tcbhead_t, multiple_threads) +++SYSINFO_OFFSET offsetof (tcbhead_t, sysinfo) +++POINTER_GUARD offsetof (tcbhead_t, pointer_guard) +++SIGSTATE_OFFSET offsetof (tcbhead_t, _hurd_sigstate) ++diff --git a/sysdeps/mach/hurd/i386/Makefile b/sysdeps/mach/hurd/i386/Makefile ++index 068f7d0419..495b927b82 100644 ++--- a/sysdeps/mach/hurd/i386/Makefile +++++ b/sysdeps/mach/hurd/i386/Makefile ++@@ -7,6 +7,10 @@ ifeq ($(subdir),debug) ++ gen-as-const-headers += signal-defines.sym ++ endif ++ +++ifeq ($(subdir),setjmp) +++gen-as-const-headers += signal-defines.sym +++endif +++ ++ ifeq ($(subdir),csu) ++ ifeq (yes,$(build-shared)) ++ sysdep_routines += divdi3 ++diff --git a/sysdeps/mach/hurd/i386/____longjmp_chk.S b/sysdeps/mach/hurd/i386/____longjmp_chk.S ++index 819e5dc875..4d3a331728 100644 ++--- a/sysdeps/mach/hurd/i386/____longjmp_chk.S +++++ b/sysdeps/mach/hurd/i386/____longjmp_chk.S ++@@ -17,6 +17,7 @@ ++ ++ #include ++ #include +++#include ++ #include ++ ++ #include ++@@ -47,65 +48,70 @@ longjmp_msg: ++ ++ .text ++ ENTRY (____longjmp_chk) ++- movl 4(%esp), %ecx /* User's jmp_buf in %ecx. */ +++ movl 4(%esp), %eax /* User's jmp_buf in %eax. */ ++ ++ /* Save the return address now. */ ++- movl (JB_PC*4)(%ecx), %edx +++ movl (JB_PC*4)(%eax), %edx ++ /* Get the stack pointer. */ ++- movl (JB_SP*4)(%ecx), %edi ++- cfi_undefined(%edi) +++ movl (JB_SP*4)(%eax), %ecx +++ cfi_undefined(%ecx) ++ #ifdef PTR_DEMANGLE ++ PTR_DEMANGLE (%edx) ++- PTR_DEMANGLE (%edi) +++ PTR_DEMANGLE (%ecx) ++ #endif ++ ++- cmpl %edi, %esp +++ movl %gs:SIGSTATE_OFFSET,%edi +++ +++ testl $SS_ONSTACK, (HURD_SIGSTATE__SIGALTSTACK__OFFSET + SIGALTSTACK__SS_FLAGS__OFFSET)(%edi) +++ jnz .Lonstack +++ +++ /* We were on the main stack */ +++ +++ cmpl %ecx, %esp ++ /* Jumping to a higher-address frame is always allowed. */ ++ jbe .Lok ++ ++- /* Passing here, we're either about to do something invalid, or we're ++- executing on an alternative signal stack. */ +++ /* Otherwise it's not allowed. */ +++ CALL_FAIL ++ ++- /* TODO: need locking? */ ++- /* struct hurd_sigstate * _hurd_self_sigstate (void) */ ++- call HIDDEN_JUMPTARGET(_hurd_self_sigstate) ++- /* TODO: %eax and %eax->sigaltstack are always valid? */ +++.Lonstack: +++ /* We were on the alternate stack, can't really easily check anything +++ since longjmp may get us out of the alternate stack. */ ++ ++- testl $SS_ONSTACK, (HURD_SIGSTATE__SIGALTSTACK__OFFSET + SIGALTSTACK__SS_FLAGS__OFFSET)(%eax) ++- /* Fail if SS_ONSTACK is not set. */ ++- jz .Lfail +++ cmpl (HURD_SIGSTATE__SIGALTSTACK__OFFSET + SIGALTSTACK__SS_SP__OFFSET)(%edi), %ecx +++ jb .Loks /* We jump below the alternate stack, switch. */ ++ ++- movl (HURD_SIGSTATE__SIGALTSTACK__OFFSET + SIGALTSTACK__SS_SP__OFFSET)(%eax), %ebx ++- addl (HURD_SIGSTATE__SIGALTSTACK__OFFSET + SIGALTSTACK__SS_SIZE__OFFSET)(%eax), %ebx ++- subl %edi, %ebx ++- cmpl (HURD_SIGSTATE__SIGALTSTACK__OFFSET + SIGALTSTACK__SS_SIZE__OFFSET)(%eax), %ebx ++- /* TODO: comment this calculation. */ ++- jae .Lok +++ movl (HURD_SIGSTATE__SIGALTSTACK__OFFSET + SIGALTSTACK__SS_SP__OFFSET)(%edi), %ebx +++ addl (HURD_SIGSTATE__SIGALTSTACK__OFFSET + SIGALTSTACK__SS_SIZE__OFFSET)(%edi), %ebx +++ cmpl %ebx, %ecx +++ jb .Lok /* We jump inside the alternate stack, do not switch. */ ++ ++-.Lfail: CALL_FAIL +++ /* We jump above the alternate stack, switch. */ +++ +++.Loks: /* We jump out of the alternate stack, clear SS_ONSTACK flag. */ +++ andl $~(SS_ONSTACK), (HURD_SIGSTATE__SIGALTSTACK__OFFSET + SIGALTSTACK__SS_FLAGS__OFFSET)(%edi) ++ ++ .Lok: /* We add unwind information for the target here. */ ++- cfi_def_cfa(%ecx, 0) +++ cfi_def_cfa(%eax, 0) ++ cfi_register(%eip, %edx) ++- cfi_register(%esp, %edi) +++ cfi_register(%esp, %ecx) ++ cfi_offset(%ebx, JB_BX*4) ++ cfi_offset(%esi, JB_SI*4) ++ cfi_offset(%edi, JB_DI*4) ++ cfi_offset(%ebp, JB_BP*4) ++- ++- movl 8(%esp), %eax /* Second argument is return value. */ ++- movl %edi, %esp ++- ++ /* Restore registers. */ ++- movl (JB_BX*4)(%ecx), %ebx ++- movl (JB_SI*4)(%ecx), %esi ++- movl (JB_DI*4)(%ecx), %edi ++- movl (JB_BP*4)(%ecx), %ebp +++ movl (JB_BX*4)(%eax), %ebx +++ movl (JB_SI*4)(%eax), %esi +++ movl (JB_DI*4)(%eax), %edi +++ movl (JB_BP*4)(%eax), %ebp ++ cfi_restore(%ebx) ++ cfi_restore(%esi) ++ cfi_restore(%edi) ++ cfi_restore(%ebp) ++ +++ movl 8(%esp), %eax /* Second argument is return value. */ +++ movl %ecx, %esp +++ ++ /* Jump to saved PC. */ ++ jmp *%edx ++ END (____longjmp_chk) ++diff --git a/sysdeps/mach/hurd/i386/__longjmp.S b/sysdeps/mach/hurd/i386/__longjmp.S ++new file mode 100644 ++index 0000000000..d123c214c9 ++--- /dev/null +++++ b/sysdeps/mach/hurd/i386/__longjmp.S ++@@ -0,0 +1,84 @@ +++/* Copyright (C) 2001-2020 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 +++ . */ +++ +++#include +++#include +++#include +++#include +++ +++#include +++/* #include */ +++#define SS_ONSTACK 1 +++ +++ .text +++ENTRY (__longjmp) +++ movl 4(%esp), %eax /* User's jmp_buf in %eax. */ +++ +++ /* Save the return address now. */ +++ movl (JB_PC*4)(%eax), %edx +++ /* Get the stack pointer. */ +++ movl (JB_SP*4)(%eax), %ecx +++ cfi_undefined(%ecx) +++#ifdef PTR_DEMANGLE +++ PTR_DEMANGLE (%edx) +++ PTR_DEMANGLE (%ecx) +++#endif +++ +++ movl %gs:SIGSTATE_OFFSET,%edi +++ +++ testl $SS_ONSTACK, (HURD_SIGSTATE__SIGALTSTACK__OFFSET + SIGALTSTACK__SS_FLAGS__OFFSET)(%edi) +++ jz .Lok +++ +++ /* We were on the alternate stack. */ +++ +++ cmpl (HURD_SIGSTATE__SIGALTSTACK__OFFSET + SIGALTSTACK__SS_SP__OFFSET)(%edi), %ecx +++ jb .Loks /* We jump below the alternate stack, switch. */ +++ +++ movl (HURD_SIGSTATE__SIGALTSTACK__OFFSET + SIGALTSTACK__SS_SP__OFFSET)(%edi), %ebx +++ addl (HURD_SIGSTATE__SIGALTSTACK__OFFSET + SIGALTSTACK__SS_SIZE__OFFSET)(%edi), %ebx +++ cmpl %ebx, %ecx +++ jb .Lok /* We jump inside the alternate stack, do not switch. */ +++ +++ /* We jump above the alternate stack, switch. */ +++ +++.Loks: /* We jump out of the alternate stack, clear SS_ONSTACK flag. */ +++ andl $~(SS_ONSTACK), (HURD_SIGSTATE__SIGALTSTACK__OFFSET + SIGALTSTACK__SS_FLAGS__OFFSET)(%edi) +++ +++.Lok: /* We add unwind information for the target here. */ +++ cfi_def_cfa(%eax, 0) +++ cfi_register(%eip, %edx) +++ cfi_register(%esp, %ecx) +++ cfi_offset(%ebx, JB_BX*4) +++ cfi_offset(%esi, JB_SI*4) +++ cfi_offset(%edi, JB_DI*4) +++ cfi_offset(%ebp, JB_BP*4) +++ /* Restore registers. */ +++ movl (JB_BX*4)(%eax), %ebx +++ movl (JB_SI*4)(%eax), %esi +++ movl (JB_DI*4)(%eax), %edi +++ movl (JB_BP*4)(%eax), %ebp +++ cfi_restore(%ebx) +++ cfi_restore(%esi) +++ cfi_restore(%edi) +++ cfi_restore(%ebp) +++ +++ movl 8(%esp), %eax /* Second argument is return value. */ +++ movl %ecx, %esp +++ +++ /* Jump to saved PC. */ +++ jmp *%edx +++END (__longjmp) diff --cc debian/patches/hurd-i386/git-mmap-EINVAL.diff index 000000000,000000000..82a745b70 new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/git-mmap-EINVAL.diff @@@ -1,0 -1,0 +1,23 @@@ ++Committed for 2.33 ++ ++commit b74233d0092c9ee6a2faee5adb375b3151bdc99c ++Author: Samuel Thibault ++Date: Sat Dec 19 18:57:47 2020 +0100 ++ ++ hurd: Also turn KERN_INVALID_ADDRESS to EINVAL ++ ++ When e.g. mmap is passed an invalid address we would return ++ KERN_INVALID_ADDRESS, while POSIX applications would expect EINVAL. ++ ++diff --git a/hurd/hurd.h b/hurd/hurd.h ++index c6e88a63c2..5fa7be5add 100644 ++--- a/hurd/hurd.h +++++ b/hurd/hurd.h ++@@ -66,6 +66,7 @@ __hurd_fail (error_t err) ++ err = (error_t) ENOMEM; ++ break; ++ +++ case KERN_INVALID_ADDRESS: ++ case KERN_INVALID_ARGUMENT: ++ err = (error_t) EINVAL; ++ break; diff --cc debian/patches/hurd-i386/git-mmap_addr.diff index 000000000,000000000..af883c203 new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/git-mmap_addr.diff @@@ -1,0 -1,0 +1,40 @@@ ++commit b47b07c92d82df497ad4e3abebfdab51be5d0546 ++Author: Samuel Thibault ++Date: Mon Jan 4 20:22:59 2021 +0100 ++ ++ hurd: Fix mmap(!MAP_FIXED) on bogus address ++ ++ In the !MAP_FIXED case, when a bogus address is given mmap should pick up a ++ valide address rather than returning EINVAL: Posix only talks about ++ EINVAL for the MAP_FIXED case. ++ ++ This fixes long-running ghc processes. ++ ++diff --git a/sysdeps/mach/hurd/mmap.c b/sysdeps/mach/hurd/mmap.c ++index ed8faadee8..ea0e61d571 100644 ++--- a/sysdeps/mach/hurd/mmap.c +++++ b/sysdeps/mach/hurd/mmap.c ++@@ -127,9 +127,9 @@ __mmap (void *addr, size_t len, int prot, int flags, int fd, off_t offset) ++ vmprot, VM_PROT_ALL, ++ (flags & MAP_SHARED) ? VM_INHERIT_SHARE : VM_INHERIT_COPY); ++ ++- if (err == KERN_NO_SPACE) +++ if (flags & MAP_FIXED) ++ { ++- if (flags & MAP_FIXED) +++ if (err == KERN_NO_SPACE) ++ { ++ /* XXX this is not atomic as it is in unix! */ ++ /* The region is already allocated; deallocate it first. */ ++@@ -143,7 +143,10 @@ __mmap (void *addr, size_t len, int prot, int flags, int fd, off_t offset) ++ (flags & MAP_SHARED) ? VM_INHERIT_SHARE ++ : VM_INHERIT_COPY); ++ } ++- else if (mapaddr != 0) +++ } +++ else +++ { +++ if (mapaddr != 0 && (err == KERN_NO_SPACE || err == KERN_INVALID_ADDRESS)) ++ err = __vm_map (__mach_task_self (), ++ &mapaddr, (vm_size_t) len, (vm_address_t) 0, ++ 1, memobj, (vm_offset_t) offset, diff --cc debian/patches/hurd-i386/git-posix_openpt.diff index 000000000,000000000..2078bb4c9 new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/git-posix_openpt.diff @@@ -1,0 -1,0 +1,64 @@@ ++https://sourceware.org/ml/libc-alpha/2019-12/msg00799.html ++ ++Committed for 2.33 ++ ++Author: Samuel Thibault ++ ++ Rearrange bsd_getpt vs bsd_openpt and implement posix_openpt on BSD ++ ++ * sysdeps/unix/bsd/getpt.c (__getpt): Add oflag parameter, pass ++ it to the _open call and rename to... ++ (__bsd_openpt): ... new function. ++ [!HAVE_GETPT] (__getpt): Reimplement on top of __bsd_openpt. ++ (__posix_openpt): Replace stub with implementation on top of __bsd_openpt. ++ (posix_openpt): Remove stub warning. ++ ++diff --git a/sysdeps/unix/bsd/getpt.c b/sysdeps/unix/bsd/getpt.c ++index 46207f4e62..0eff0b54a3 100644 ++--- a/sysdeps/unix/bsd/getpt.c +++++ b/sysdeps/unix/bsd/getpt.c ++@@ -41,7 +41,7 @@ const char __libc_ptyname2[] attribute_hidden = PTYNAME2; ++ ++ /* Open a master pseudo terminal and return its file descriptor. */ ++ int ++-__getpt (void) +++__bsd_openpt (int oflag) ++ { ++ char buf[sizeof (_PATH_PTY) + 2]; ++ const char *p, *q; ++@@ -61,7 +61,7 @@ __getpt (void) ++ ++ s[1] = *q; ++ ++- fd = __open (buf, O_RDWR); +++ fd = __open (buf, oflag); ++ if (fd != -1) ++ return fd; ++ ++@@ -74,18 +74,20 @@ __getpt (void) ++ return -1; ++ } ++ ++-#undef __getpt +++#ifndef HAVE_GETPT +++int +++__getpt (void) +++{ +++ return __bsd_openpt (O_RDWR); +++} ++ weak_alias (__getpt, getpt) +++#endif ++ ++ #ifndef HAVE_POSIX_OPENPT ++-/* We cannot define posix_openpt in general for BSD systems. */ ++ int ++ __posix_openpt (int oflag) ++ { ++- __set_errno (ENOSYS); ++- return -1; +++ return __bsd_openpt (oflag); ++ } ++ weak_alias (__posix_openpt, posix_openpt) ++- ++-stub_warning (posix_openpt) ++ #endif diff --cc debian/patches/hurd-i386/git-pselect.diff index 000000000,000000000..b474b1bd6 new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/git-pselect.diff @@@ -1,0 -1,0 +1,178 @@@ ++Committed for glibc 2.32 ++ ++commit f9011787497a276f84ef79ae233992692a626dc7 ++Author: Samuel Thibault ++Date: Wed May 27 23:42:24 2020 +0000 ++ ++ hurd: Fix pselect atomicity ++ ++ In case the signal arrives before the __mach_msg call, we need to catch ++ between the sigprocmask call and the __mach_msg call. Let's just reuse ++ the support for sigsuspend to make the signal send a message that ++ our __mach_msg call will just receive. ++ ++ * hurd/hurdselect.c (_hurd_select): Add sigport and ss variables. When ++ sigmask is not NULL, create a sigport port and register as ++ ss->suspended. Add it to the portset. When we receive a message on it, ++ set error to EINTR. Clean up sigport and portset appropriately. ++ ++ * hurd/hurdsig.c (wake_sigsuspend): Note that pselect also uses it. ++ ++diff --git a/hurd/hurdselect.c b/hurd/hurdselect.c ++index b140dab6c3..69a415c02c 100644 ++--- a/hurd/hurdselect.c +++++ b/hurd/hurdselect.c ++@@ -48,7 +48,7 @@ _hurd_select (int nfds, ++ const struct timespec *timeout, const sigset_t *sigmask) ++ { ++ int i; ++- mach_port_t portset; +++ mach_port_t portset, sigport; ++ int got, ready; ++ error_t err; ++ fd_set rfds, wfds, xfds; ++@@ -66,6 +66,7 @@ _hurd_select (int nfds, ++ int error; ++ } d[nfds]; ++ sigset_t oset; +++ struct hurd_sigstate *ss; ++ ++ union typeword /* Use this to avoid unkosher casts. */ ++ { ++@@ -115,8 +116,30 @@ _hurd_select (int nfds, ++ reply_msgid = IO_SELECT_TIMEOUT_REPLY_MSGID; ++ } ++ ++- if (sigmask && __sigprocmask (SIG_SETMASK, sigmask, &oset)) ++- return -1; +++ if (sigmask) +++ { +++ /* Add a port to the portset for the case when we get the signal even +++ before calling __mach_msg. */ +++ +++ sigport = __mach_reply_port (); +++ +++ ss = _hurd_self_sigstate (); +++ _hurd_sigstate_lock (ss); +++ /* And tell the signal thread to message us when a signal arrives. */ +++ ss->suspended = sigport; +++ _hurd_sigstate_unlock (ss); +++ +++ if (__sigprocmask (SIG_SETMASK, sigmask, &oset)) +++ { +++ _hurd_sigstate_lock (ss); +++ ss->suspended = MACH_PORT_NULL; +++ _hurd_sigstate_unlock (ss); +++ __mach_port_destroy (__mach_task_self (), sigport); +++ return -1; +++ } +++ } +++ else +++ sigport = MACH_PORT_NULL; ++ ++ if (pollfds) ++ { ++@@ -188,6 +211,8 @@ _hurd_select (int nfds, ++ d[i].io_port); ++ __mutex_unlock (&_hurd_dtable_lock); ++ HURD_CRITICAL_END; +++ if (sigmask) +++ __sigprocmask (SIG_SETMASK, &oset, NULL); ++ errno = err; ++ return -1; ++ } ++@@ -277,9 +302,14 @@ _hurd_select (int nfds, ++ /* Send them all io_select request messages. */ ++ ++ if (firstfd == -1) ++- /* But not if there were no ports to deal with at all. ++- We are just a pure timeout. */ ++- portset = __mach_reply_port (); +++ { +++ if (sigport == MACH_PORT_NULL) +++ /* But not if there were no ports to deal with at all. +++ We are just a pure timeout. */ +++ portset = __mach_reply_port (); +++ else +++ portset = sigport; +++ } ++ else ++ { ++ portset = MACH_PORT_NULL; ++@@ -298,7 +328,7 @@ _hurd_select (int nfds, ++ ts, type); ++ if (!err) ++ { ++- if (firstfd == lastfd) +++ if (firstfd == lastfd && sigport == MACH_PORT_NULL) ++ /* When there's a single descriptor, we don't need a ++ portset, so just pretend we have one, but really ++ use the single reply port. */ ++@@ -329,6 +359,16 @@ _hurd_select (int nfds, ++ } ++ _hurd_port_free (&d[i].cell->port, &d[i].ulink, d[i].io_port); ++ } +++ +++ if (got == 0 && sigport != MACH_PORT_NULL) +++ { +++ if (portset == MACH_PORT_NULL) +++ /* Create the portset to receive the signal message on. */ +++ __mach_port_allocate (__mach_task_self (), MACH_PORT_RIGHT_PORT_SET, +++ &portset); +++ /* Put the signal reply port in the port set. */ +++ __mach_port_move_member (__mach_task_self (), sigport, portset); +++ } ++ } ++ ++ /* GOT is the number of replies (or errors), while READY is the number of ++@@ -404,6 +444,16 @@ _hurd_select (int nfds, ++ { MACH_MSG_TYPE_INTEGER_T, sizeof (integer_t) * 8, 1, 1, 0, 0 } ++ }; ++ #endif +++ +++ if (sigport != MACH_PORT_NULL && sigport == msg.head.msgh_local_port) +++ { +++ /* We actually got interrupted by a signal before +++ __mach_msg; poll for further responses and then +++ return quickly. */ +++ err = EINTR; +++ goto poll; +++ } +++ ++ if (msg.head.msgh_id == reply_msgid ++ && msg.head.msgh_size >= sizeof msg.error ++ && !(msg.head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ++@@ -492,7 +542,17 @@ _hurd_select (int nfds, ++ for (i = firstfd; i <= lastfd; ++i) ++ if (d[i].reply_port != MACH_PORT_NULL) ++ __mach_port_destroy (__mach_task_self (), d[i].reply_port); ++- if (firstfd == -1 || (firstfd != lastfd && portset != MACH_PORT_NULL)) +++ +++ if (sigport != MACH_PORT_NULL) +++ { +++ _hurd_sigstate_lock (ss); +++ ss->suspended = MACH_PORT_NULL; +++ _hurd_sigstate_unlock (ss); +++ __mach_port_destroy (__mach_task_self (), sigport); +++ } +++ +++ if ((firstfd == -1 && sigport == MACH_PORT_NULL) +++ || ((firstfd != lastfd || sigport != MACH_PORT_NULL) && portset != MACH_PORT_NULL)) ++ /* Destroy PORTSET, but only if it's not actually the reply port for a ++ single descriptor (in which case it's destroyed in the previous loop; ++ not doing it here is just a bit more efficient). */ ++diff --git a/hurd/hurdsig.c b/hurd/hurdsig.c ++index a2741bb7c8..4d819d9af2 100644 ++--- a/hurd/hurdsig.c +++++ b/hurd/hurdsig.c ++@@ -564,8 +564,8 @@ abort_all_rpcs (int signo, struct machine_thread_all_state *state, int live) ++ } ++ } ++ ++-/* Wake up any sigsuspend call that is blocking SS->thread. SS must be ++- locked. */ +++/* Wake up any sigsuspend or pselect call that is blocking SS->thread. SS must +++ be locked. */ ++ static void ++ wake_sigsuspend (struct hurd_sigstate *ss) ++ { diff --cc debian/patches/hurd-i386/git-pthread_atfork-hidden.diff index 000000000,000000000..cf062f2b6 new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/git-pthread_atfork-hidden.diff @@@ -1,0 -1,0 +1,57 @@@ ++Committed for glibc 2.32 ++ ++commit 15e995a8fb94a00d76da03756579ae6ff645b161 ++Author: Samuel Thibault ++Date: Sun Jun 7 23:29:44 2020 +0000 ++ ++ htl: Fix registration of atfork handlers in modules ++ ++ We really need modules to use their own pthread_atfork so that ++ __dso_handle properly identifies them. ++ ++ * sysdeps/htl/pt-atfork.c (__pthread_atfork): Hide function. ++ (pthread_atfork): Hide alias. ++ * sysdeps/htl/old_pt-atfork.c (pthread_atfork): Rename macro to ++ __pthread_atfork to fix building the compatibility alias. ++ ++diff --git a/sysdeps/htl/old_pt-atfork.c b/sysdeps/htl/old_pt-atfork.c ++index d954b68f63..c7231d1feb 100644 ++--- a/sysdeps/htl/old_pt-atfork.c +++++ b/sysdeps/htl/old_pt-atfork.c ++@@ -19,8 +19,8 @@ ++ #include ++ ++ #if SHLIB_COMPAT(libpthread, GLIBC_2_12, GLIBC_2_23) ++-# define pthread_atfork __dyn_pthread_atfork +++# define __pthread_atfork __dyn_pthread_atfork ++ # include "pt-atfork.c" ++-# undef pthread_atfork +++# undef __pthread_atfork ++ compat_symbol (libpthread, __dyn_pthread_atfork, pthread_atfork, GLIBC_2_12); ++ #endif ++diff --git a/sysdeps/htl/pt-atfork.c b/sysdeps/htl/pt-atfork.c ++index d547dd58e6..db8068e656 100644 ++--- a/sysdeps/htl/pt-atfork.c +++++ b/sysdeps/htl/pt-atfork.c ++@@ -21,11 +21,21 @@ ++ #include ++ #include ++ +++/* Hide the symbol so that no definition but the one locally in the +++ executable or DSO is used. */ ++ int +++#ifndef __pthread_atfork +++/* Don't mark the compatibility function as hidden. */ +++attribute_hidden +++#endif ++ __pthread_atfork (void (*prepare) (void), ++ void (*parent) (void), ++ void (*child) (void)) ++ { ++ return __register_atfork (prepare, parent, child, __dso_handle); ++ } +++#ifndef __pthread_atfork +++extern int pthread_atfork (void (*prepare) (void), void (*parent) (void), +++ void (*child) (void)) attribute_hidden; ++ weak_alias (__pthread_atfork, pthread_atfork) +++#endif diff --cc debian/patches/hurd-i386/git-pthread_get_cleanup_stack.diff index 000000000,000000000..56407697c new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/git-pthread_get_cleanup_stack.diff @@@ -1,0 -1,0 +1,69 @@@ ++Commited in 2.32 ++ ++commit f1cd3407e4c6767e0bbe2ca122b713c6581b8d67 ++Author: Samuel Thibault ++Date: Sun Feb 9 23:13:24 2020 +0000 ++ ++ htl: clean __pthread_get_cleanup_stack hidden proto ++ ++Index: glibc-2.31/htl/pt-cleanup.c ++=================================================================== ++--- glibc-2.31.orig/htl/pt-cleanup.c +++++ glibc-2.31/htl/pt-cleanup.c ++@@ -21,8 +21,8 @@ ++ #include ++ ++ struct __pthread_cancelation_handler ** ++-___pthread_get_cleanup_stack (void) +++__pthread_get_cleanup_stack (void) ++ { ++ return &_pthread_self ()->cancelation_handlers; ++ } ++-strong_alias (___pthread_get_cleanup_stack, __pthread_get_cleanup_stack) +++hidden_def(__pthread_get_cleanup_stack) ++Index: glibc-2.31/htl/pt-exit.c ++=================================================================== ++--- glibc-2.31.orig/htl/pt-exit.c +++++ glibc-2.31/htl/pt-exit.c ++@@ -41,7 +41,7 @@ __pthread_exit (void *status) ++ disabled. */ ++ __pthread_setcancelstate (PTHREAD_CANCEL_DISABLE, &oldstate); ++ ++- for (handlers = ___pthread_get_cleanup_stack (); +++ for (handlers = __pthread_get_cleanup_stack (); ++ *handlers != NULL; ++ *handlers = (*handlers)->__next) ++ (*handlers)->__handler ((*handlers)->__arg); ++Index: glibc-2.31/htl/pt-join.c ++=================================================================== ++--- glibc-2.31.orig/htl/pt-join.c +++++ glibc-2.31/htl/pt-join.c ++@@ -22,8 +22,6 @@ ++ ++ #include ++ ++-#define __pthread_get_cleanup_stack ___pthread_get_cleanup_stack ++- ++ /* Make calling thread wait for termination of thread THREAD. Return ++ the exit status of the thread in *STATUS. */ ++ int ++Index: glibc-2.31/sysdeps/htl/pthreadP.h ++=================================================================== ++--- glibc-2.31.orig/sysdeps/htl/pthreadP.h +++++ glibc-2.31/sysdeps/htl/pthreadP.h ++@@ -67,7 +67,6 @@ int __pthread_attr_setstacksize (pthread ++ int __pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr, ++ size_t __stacksize); ++ int __pthread_attr_getstack (const pthread_attr_t *, void **, size_t *); ++-struct __pthread_cancelation_handler **___pthread_get_cleanup_stack (void) attribute_hidden; ++ ++ #if IS_IN (libpthread) ++ hidden_proto (__pthread_create) ++@@ -76,6 +75,7 @@ hidden_proto (__pthread_key_create) ++ hidden_proto (__pthread_getspecific) ++ hidden_proto (__pthread_setspecific) ++ hidden_proto (_pthread_mutex_init) +++hidden_proto (__pthread_get_cleanup_stack) ++ #endif ++ ++ #define ASSERT_TYPE_SIZE(type, size) \ diff --cc debian/patches/hurd-i386/git-pthread_link_tests.diff index 000000000,000000000..99bf3e35c new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/git-pthread_link_tests.diff @@@ -1,0 -1,0 +1,46 @@@ ++Committed for 2.32 ++ ++commit dd7a8ad7ba25cb2269b306758c7d97d4a95527e6 ++Author: Samuel Thibault ++Date: Mon Jun 8 13:32:08 2020 +0200 ++ ++ pthread: Move back linking rules to nptl and htl ++ ++ d6d74ec16 ('htl: Enable more tests') moved the linking rules from ++ nptl/Makefile and htl/Makefile to the shared sysdeps/pthread/Makefile. But ++ e.g. on powerpc some tests are added in sysdeps/powerpc/Makefile, which is ++ included *after* sysdeps/pthread/Makefile, and thus the tests don't get ++ affected by the rules and fail to link. For now let's just copy over the ++ set of rules in both nptl/Makefile and htl/Makefile. ++ ++ * sysdeps/pthread/Makefile: Move libpthread linking rules to... ++ * htl/Makefile: ... here and... ++ * nptl/Makefile: ... there. ++ ++Index: glibc-2.31/htl/Makefile ++=================================================================== ++--- glibc-2.31.orig/htl/Makefile +++++ glibc-2.31/htl/Makefile ++@@ -204,9 +204,20 @@ extra-B-pthread.so = -B$(common-objpfx)h ++ ++ include ../Rules ++ ++-ifeq (yes,$(build-shared)) +++# Make sure we link with the thread library. +++ifeq ($(build-shared),yes) ++ $(addprefix $(objpfx), \ ++ $(filter-out $(tests-static) $(xtests-static) $(tests-reverse) \ ++ $(tests-nolibpthread), \ ++- $(tests) $(xtests) $(test-srcs))): $(objpfx)libpthread.so +++ $(tests) $(tests-internal) $(xtests) $(test-srcs) $(tests-container))): \ +++ $(objpfx)libpthread.so +++$(objpfx)tst-unload: $(libdl) +++# $(objpfx)../libc.so is used instead of $(common-objpfx)libc.so, +++# since otherwise libpthread.so comes before libc.so when linking. +++$(addprefix $(objpfx), $(tests-reverse)): \ +++ $(objpfx)../libc.so $(objpfx)libpthread.so +++$(objpfx)../libc.so: $(common-objpfx)libc.so ; +++$(addprefix $(objpfx),$(tests-static) $(xtests-static)): $(objpfx)libpthread.a +++else +++$(addprefix $(objpfx),$(tests) $(test-srcs)): $(objpfx)libpthread.a ++ endif diff --cc debian/patches/hurd-i386/git-pthread_self.diff index 000000000,000000000..39c3f3977 new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/git-pthread_self.diff @@@ -1,0 -1,0 +1,33 @@@ ++Committed for glibc 2.32 ++ ++commit ca843defbcbd2dc95b9342189e5dc430e9bcb743 ++Author: Samuel Thibault ++Date: Sat Feb 15 14:31:50 2020 +0000 ++ ++ htl: Only check pthread_self coherency when DEBUG is set ++ ++ htl has been widely tested for a long time now with this coherency ++ checked successfully. ++ ++diff --git a/sysdeps/mach/hurd/htl/pt-sysdep.h b/sysdeps/mach/hurd/htl/pt-sysdep.h ++index c837415a9a..484d024bb0 100644 ++--- a/sysdeps/mach/hurd/htl/pt-sysdep.h +++++ b/sysdeps/mach/hurd/htl/pt-sysdep.h ++@@ -32,6 +32,7 @@ ++ mach_msg_header_t wakeupmsg; ++ ++ extern __thread struct __pthread *___pthread_self; +++#ifdef DEBUG ++ #define _pthread_self() \ ++ ({ \ ++ struct __pthread *thread; \ ++@@ -46,6 +47,9 @@ extern __thread struct __pthread *___pthread_self; ++ ok; })); \ ++ thread; \ ++ }) +++#else +++#define _pthread_self() ___pthread_self +++#endif ++ ++ extern inline void ++ __attribute__ ((__always_inline__)) diff --cc debian/patches/hurd-i386/git-raise.diff index 000000000,000000000..789e44981 new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/git-raise.diff @@@ -1,0 -1,0 +1,42 @@@ ++Committed in 2.32 ++ ++commit 785ec62dbd37b0b236c9a7fcc0ac71a2aeb472de ++Author: Samuel Thibault ++Date: Sun Jun 7 01:35:18 2020 +0200 ++ ++ hurd: Reject raising invalid signals ++ ++ * hurd/hurd-raise.c (_hurd_raise_signal): Return EINVAL if signo <= 0 ++ or signo >= NSI. ++ ++commit fab94894d5c5b25d24010f823515fb53822d6623 ++Author: Samuel Thibault ++Date: Sun Jun 7 01:55:54 2020 +0200 ++ ++ hurd: Fix hang in _hurd_raise_signal from pthread_kill ++ ++ When ss is not NULL, it is assumed to be locked. ++ ++ * hurd/hurd-raise.c (_hurd_raise_signal): Unlock before returning an ++ error if ss is not NULL. ++ ++--- ++ hurd/hurd-raise.c | 7 +++++++ ++ 1 file changed, 7 insertions(+) ++ ++--- a/hurd/hurd-raise.c +++++ b/hurd/hurd-raise.c ++@@ -28,6 +28,13 @@ int ++ _hurd_raise_signal (struct hurd_sigstate *ss, ++ int signo, const struct hurd_signal_detail *detail) ++ { +++ if (signo <= 0 || signo >= NSIG) +++ { +++ if (ss) +++ __spin_unlock (&ss->lock); +++ return EINVAL; +++ } +++ ++ if (ss == NULL) ++ { ++ ss = _hurd_self_sigstate (); diff --cc debian/patches/hurd-i386/git-register-atfork.diff index 000000000,000000000..d30a01d8f new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/git-register-atfork.diff @@@ -1,0 -1,0 +1,332 @@@ ++Committed for glibc 2.32 ++ ++commit 6db1094f7af6ddd7ff37dbba82ff5074871a90d5 ++Author: Samuel Thibault ++Date: Sun Feb 9 17:55:37 2020 +0000 ++ ++ htl: Move __register_atfork from forward to own file ++ ++ Since we need it also in the static linking case. ++ ++diff --git a/htl/Makefile b/htl/Makefile ++index 0dccf25ebc..71b14d5e96 100644 ++--- a/htl/Makefile +++++ b/htl/Makefile ++@@ -163,7 +163,7 @@ headers := \ ++ ++ distribute := ++ ++-routines := forward libc_pthread_init alloca_cutoff pt-atfork +++routines := forward libc_pthread_init alloca_cutoff register-atfork pt-atfork ++ shared-only-routines = forward ++ static-only-routines = pt-atfork ++ ++diff --git a/htl/forward.c b/htl/forward.c ++index b0cc5f574b..dfb7b79327 100644 ++--- a/htl/forward.c +++++ b/htl/forward.c ++@@ -143,141 +143,3 @@ FORWARD (pthread_setcanceltype, (int type, int *oldtype), (type, oldtype), 0) ++ struct __pthread_cancelation_handler *dummy_list; ++ FORWARD2 (__pthread_get_cleanup_stack, struct __pthread_cancelation_handler **, ++ (void), (), return &dummy_list); ++- ++- ++-/* Fork interaction */ ++- ++-struct atfork ++-{ ++- void (*prepare) (void); ++- void (*parent) (void); ++- void (*child) (void); ++- void *dso_handle; ++- struct atfork *prev; ++- struct atfork *next; ++-}; ++- ++-/* TODO: better locking */ ++-__libc_lock_define_initialized (static, atfork_lock); ++-static struct atfork *fork_handlers, *fork_last_handler; ++- ++-static void ++-atfork_pthread_prepare (void) ++-{ ++- struct atfork *handlers, *last_handler; ++- ++- __libc_lock_lock (atfork_lock); ++- handlers = fork_handlers; ++- last_handler = fork_last_handler; ++- __libc_lock_unlock (atfork_lock); ++- ++- if (last_handler == NULL) ++- return; ++- ++- while (1) ++- { ++- if (last_handler->prepare != NULL) ++- last_handler->prepare (); ++- if (last_handler == handlers) ++- break; ++- last_handler = last_handler->prev; ++- } ++-} ++-text_set_element (_hurd_atfork_prepare_hook, atfork_pthread_prepare); ++- ++-static void ++-atfork_pthread_parent (void) ++-{ ++- struct atfork *handlers; ++- ++- __libc_lock_lock (atfork_lock); ++- handlers = fork_handlers; ++- __libc_lock_unlock (atfork_lock); ++- ++- while (handlers != NULL) ++- { ++- if (handlers->parent != NULL) ++- handlers->parent (); ++- handlers = handlers->next; ++- } ++-} ++-text_set_element (_hurd_atfork_parent_hook, atfork_pthread_parent); ++- ++-static void ++-atfork_pthread_child (void) ++-{ ++- struct atfork *handlers; ++- ++- __libc_lock_lock (atfork_lock); ++- handlers = fork_handlers; ++- __libc_lock_unlock (atfork_lock); ++- ++- while (handlers != NULL) ++- { ++- if (handlers->child != NULL) ++- handlers->child (); ++- handlers = handlers->next; ++- } ++-} ++-text_set_element (_hurd_atfork_child_hook, atfork_pthread_child); ++- ++-int ++-__register_atfork (void (*prepare) (void), ++- void (*parent) (void), ++- void (*child) (void), ++- void *dso_handle) ++-{ ++- struct atfork *new = malloc (sizeof (*new)); ++- if (new == NULL) ++- return errno; ++- ++- new->prepare = prepare; ++- new->parent = parent; ++- new->child = child; ++- new->dso_handle = dso_handle; ++- new->prev = NULL; ++- ++- __libc_lock_lock (atfork_lock); ++- new->next = fork_handlers; ++- if (fork_handlers != NULL) ++- fork_handlers->prev = new; ++- fork_handlers = new; ++- if (fork_last_handler == NULL) ++- fork_last_handler = new; ++- __libc_lock_unlock (atfork_lock); ++- ++- return 0; ++-} ++-libc_hidden_def (__register_atfork) ++- ++-void ++-__unregister_atfork (void *dso_handle) ++-{ ++- struct atfork **handlers, *prev = NULL, *next; ++- __libc_lock_lock (atfork_lock); ++- handlers = &fork_handlers; ++- while (*handlers != NULL) ++- { ++- if ((*handlers)->dso_handle == dso_handle) ++- { ++- /* Drop this handler from the list. */ ++- if (*handlers == fork_last_handler) ++- { ++- /* Was last, new last is prev, if any. */ ++- fork_last_handler = prev; ++- } ++- ++- next = (*handlers)->next; ++- if (next != NULL) ++- next->prev = prev; ++- *handlers = next; ++- } ++- else ++- { ++- /* Just proceed to next handler. */ ++- prev = *handlers; ++- handlers = &prev->next; ++- } ++- } ++- __libc_lock_unlock (atfork_lock); ++-} ++diff --git a/htl/register-atfork.c b/htl/register-atfork.c ++new file mode 100644 ++index 0000000000..256b1148ac ++--- /dev/null +++++ b/htl/register-atfork.c ++@@ -0,0 +1,157 @@ +++/* Atfork handling. Hurd pthread version. +++ Copyright (C) 2002-2020 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 +++ . */ +++ +++#include +++#include +++#include +++#include +++ +++struct atfork +++{ +++ void (*prepare) (void); +++ void (*parent) (void); +++ void (*child) (void); +++ void *dso_handle; +++ struct atfork *prev; +++ struct atfork *next; +++}; +++ +++/* TODO: better locking */ +++__libc_lock_define_initialized (static, atfork_lock); +++static struct atfork *fork_handlers, *fork_last_handler; +++ +++static void +++atfork_pthread_prepare (void) +++{ +++ struct atfork *handlers, *last_handler; +++ +++ __libc_lock_lock (atfork_lock); +++ handlers = fork_handlers; +++ last_handler = fork_last_handler; +++ __libc_lock_unlock (atfork_lock); +++ +++ if (last_handler == NULL) +++ return; +++ +++ while (1) +++ { +++ if (last_handler->prepare != NULL) +++ last_handler->prepare (); +++ if (last_handler == handlers) +++ break; +++ last_handler = last_handler->prev; +++ } +++} +++text_set_element (_hurd_atfork_prepare_hook, atfork_pthread_prepare); +++ +++static void +++atfork_pthread_parent (void) +++{ +++ struct atfork *handlers; +++ +++ __libc_lock_lock (atfork_lock); +++ handlers = fork_handlers; +++ __libc_lock_unlock (atfork_lock); +++ +++ while (handlers != NULL) +++ { +++ if (handlers->parent != NULL) +++ handlers->parent (); +++ handlers = handlers->next; +++ } +++} +++text_set_element (_hurd_atfork_parent_hook, atfork_pthread_parent); +++ +++static void +++atfork_pthread_child (void) +++{ +++ struct atfork *handlers; +++ +++ __libc_lock_lock (atfork_lock); +++ handlers = fork_handlers; +++ __libc_lock_unlock (atfork_lock); +++ +++ while (handlers != NULL) +++ { +++ if (handlers->child != NULL) +++ handlers->child (); +++ handlers = handlers->next; +++ } +++} +++text_set_element (_hurd_atfork_child_hook, atfork_pthread_child); +++ +++int +++__register_atfork (void (*prepare) (void), +++ void (*parent) (void), +++ void (*child) (void), +++ void *dso_handle) +++{ +++ struct atfork *new = malloc (sizeof (*new)); +++ if (new == NULL) +++ return errno; +++ +++ new->prepare = prepare; +++ new->parent = parent; +++ new->child = child; +++ new->dso_handle = dso_handle; +++ new->prev = NULL; +++ +++ __libc_lock_lock (atfork_lock); +++ new->next = fork_handlers; +++ if (fork_handlers != NULL) +++ fork_handlers->prev = new; +++ fork_handlers = new; +++ if (fork_last_handler == NULL) +++ fork_last_handler = new; +++ __libc_lock_unlock (atfork_lock); +++ +++ return 0; +++} +++libc_hidden_def (__register_atfork) +++ +++void +++__unregister_atfork (void *dso_handle) +++{ +++ struct atfork **handlers, *prev = NULL, *next; +++ __libc_lock_lock (atfork_lock); +++ handlers = &fork_handlers; +++ while (*handlers != NULL) +++ { +++ if ((*handlers)->dso_handle == dso_handle) +++ { +++ /* Drop this handler from the list. */ +++ if (*handlers == fork_last_handler) +++ { +++ /* Was last, new last is prev, if any. */ +++ fork_last_handler = prev; +++ } +++ +++ next = (*handlers)->next; +++ if (next != NULL) +++ next->prev = prev; +++ *handlers = next; +++ } +++ else +++ { +++ /* Just proceed to next handler. */ +++ prev = *handlers; +++ handlers = &prev->next; +++ } +++ } +++ __libc_lock_unlock (atfork_lock); +++} diff --cc debian/patches/hurd-i386/git-register-atfork2.diff index 000000000,000000000..345ca1295 new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/git-register-atfork2.diff @@@ -1,0 -1,0 +1,38 @@@ ++Committed for glibc 2.32 ++ ++commit 05039737d306b4c065ff65d4f90042f3ec8f6ddf ++Author: Samuel Thibault ++Date: Sun Jun 7 02:57:04 2020 +0200 ++ ++ htl: fix register-atfork ordering ++ ++ * htl/register-atfork.c (__register_atfork): Add new hooks at the end of ++ the list instead of the beginning. ++ ++diff --git a/htl/register-atfork.c b/htl/register-atfork.c ++index 256b1148ac..4581ac5bba 100644 ++--- a/htl/register-atfork.c +++++ b/htl/register-atfork.c ++@@ -109,15 +109,15 @@ __register_atfork (void (*prepare) (void), ++ new->parent = parent; ++ new->child = child; ++ new->dso_handle = dso_handle; ++- new->prev = NULL; +++ new->next = NULL; ++ ++ __libc_lock_lock (atfork_lock); ++- new->next = fork_handlers; ++- if (fork_handlers != NULL) ++- fork_handlers->prev = new; ++- fork_handlers = new; ++- if (fork_last_handler == NULL) ++- fork_last_handler = new; +++ new->prev = fork_last_handler; +++ if (fork_last_handler != NULL) +++ fork_last_handler->next = new; +++ if (fork_handlers == NULL) +++ fork_handlers = new; +++ fork_last_handler = new; ++ __libc_lock_unlock (atfork_lock); ++ ++ return 0; diff --cc debian/patches/hurd-i386/git-sbrk-end.diff index 000000000,000000000..57ac6b669 new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/git-sbrk-end.diff @@@ -1,0 -1,0 +1,149 @@@ ++Committed for glibc 2.33 ++ ++commit 8c6beab4e1c03ac57150241015486e3f497c17cc ++Author: Samuel Thibault ++Date: Wed Aug 5 23:48:58 2020 +0200 ++ ++ hurd: Rework sbrk ++ ++ Making the brk start exactly at the end of the main application binary was ++ requiring to get it through the _end symbol, which does not work any more ++ with recent toolchains, and actually produces in libc.so a confusing ++ external _end symbol that produces odd results, see ++ https://sourceware.org/bugzilla/show_bug.cgi?id=23499 ++ ++ Trying to do so is quite outdated anyway with the tendency for address ++ randomization. ++ ++ Using _end was also allowing to include the main binary data within ++ the RLIMIT_DATA, but this also seems outdated with dynamic library ++ loading, and nowadays' memory consumption via malloc and mmap rather than ++ statically-allocated data. ++ ++ This adds a BRK_START macro in that just tells where we ++ want to start the brk, and thus removes the _end symbol. ++ ++ * sysdeps/mach/hurd/i386/vm_param.h: New file. ++ * sysdeps/mach/hurd/brk.c: Use BRK_START as brk start instead of _end. ++ Also ignore __data_start. ++ * hurd/Versions: Remove _end symbol. ++ * sysdeps/mach/hurd/i386/libc.abilist: Remove _end symbol. ++ ++ ++--- ++ hurd/Versions | 3 --- ++ sysdeps/mach/hurd/brk.c | 16 ++++++------ ++ sysdeps/mach/hurd/i386/libc.abilist | 1 - ++ sysdeps/mach/hurd/i386/vm_param.h | 24 ++++++++++++++++++ ++ 4 files changed, 32 insertions(+), 12 deletions(-) ++ ++diff --git a/hurd/Versions b/hurd/Versions ++index f5e8b8cb32..9b5448ab2f 100644 ++--- a/hurd/Versions +++++ b/hurd/Versions ++@@ -1,8 +1,5 @@ ++ libc { ++ GLIBC_2.0 { ++- # necessary for the Hurd brk implementation ++- _end; ++- ++ # variables used in macros & inline functions ++ __hurd_threadvar_stack_mask; __hurd_threadvar_stack_offset; ++ ++diff --git a/sysdeps/mach/hurd/brk.c b/sysdeps/mach/hurd/brk.c ++index 4fac03fcc3..a6d4880028 100644 ++--- a/sysdeps/mach/hurd/brk.c +++++ b/sysdeps/mach/hurd/brk.c ++@@ -19,6 +19,7 @@ ++ #include ++ #include ++ #include /* For `struct mutex'. */ +++#include ++ ++ ++ /* Initial maximum size of the data segment (this is arbitrary). */ ++@@ -39,9 +40,7 @@ weak_alias (_hurd_brk, ___brk_addr) ++ ++ struct mutex _hurd_brk_lock; ++ ++-extern int __data_start, _end; ++-weak_extern (__data_start) ++-static vm_address_t static_data_start; +++static vm_address_t brk_start; ++ ++ ++ /* Set the end of the process's data space to INADDR. ++@@ -91,7 +90,7 @@ _hurd_set_brk (vm_address_t addr) ++ rlimit = _hurd_rlimits[RLIMIT_DATA].rlim_cur; ++ __mutex_unlock (&_hurd_rlimit_lock); ++ ++- if (addr - static_data_start > rlimit) +++ if (addr - brk_start > rlimit) ++ { ++ /* Need to increase the resource limit. */ ++ errno = ENOMEM; ++@@ -138,17 +137,18 @@ init_brk (void) ++ ++ __mutex_init (&_hurd_brk_lock); ++ ++- static_data_start = (vm_address_t) (&__data_start ?: &_end); +++ brk_start = (vm_address_t) BRK_START; ++ ++ /* If _hurd_brk is already set, don't change it. The assumption is that ++ it was set in a previous run before something like Emacs's unexec was ++ called and dumped all the data up to the break at that point. */ ++- if (_hurd_brk == 0) ++- _hurd_brk = (vm_address_t) &_end; +++ if (_hurd_brk == 0) { +++ _hurd_brk = (vm_address_t) BRK_START; +++ } ++ ++ pagend = round_page (_hurd_brk); ++ ++- _hurd_data_end = round_page (static_data_start + DATA_SIZE); +++ _hurd_data_end = round_page (brk_start + DATA_SIZE); ++ ++ if (pagend < _hurd_data_end) ++ { ++diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist ++index 5f6154d518..72537218ba 100644 ++--- a/sysdeps/mach/hurd/i386/libc.abilist +++++ b/sysdeps/mach/hurd/i386/libc.abilist ++@@ -554,7 +554,6 @@ GLIBC_2.2.6 __xstat64 F ++ GLIBC_2.2.6 _authenticate F ++ GLIBC_2.2.6 _dl_mcount_wrapper F ++ GLIBC_2.2.6 _dl_mcount_wrapper_check F ++-GLIBC_2.2.6 _end D 0x0 ++ GLIBC_2.2.6 _environ D 0x4 ++ GLIBC_2.2.6 _exit F ++ GLIBC_2.2.6 _flushlbf F ++diff --git a/sysdeps/mach/hurd/i386/vm_param.h b/sysdeps/mach/hurd/i386/vm_param.h ++new file mode 100644 ++index 0000000000..96230bc149 ++--- /dev/null +++++ b/sysdeps/mach/hurd/i386/vm_param.h ++@@ -0,0 +1,24 @@ +++/* Copyright (C) 2020 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 +++ . */ +++ +++#ifndef _I386_VM_PARAM_H +++#define _I386_VM_PARAM_H +++ +++/* Arbitrary start of the brk. This is after usual binary and library mappings. */ +++#define BRK_START 0x10000000 +++ +++#endif /* i386/vm_param.h */ diff --cc debian/patches/hurd-i386/git-sched_sets.diff index 000000000,000000000..21ab38b15 new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/git-sched_sets.diff @@@ -1,0 -1,0 +1,98 @@@ ++Committed for glibc 2.33 ++ ++commit ce625044886da0a6e348f4def83f746e28587a0c ++Author: Samuel Thibault ++Date: Wed Aug 5 23:46:14 2020 +0200 ++ ++ hurd: Implement basic sched_get/setscheduler ++ ++ * sysdeps/mach/hurd/sched_gets.c: New file. ++ * sysdeps/mach/hurd/sched_sets.c: New file. ++ ++diff --git a/sysdeps/mach/hurd/sched_gets.c b/sysdeps/mach/hurd/sched_gets.c ++new file mode 100644 ++index 0000000000..9fe31ce79e ++--- /dev/null +++++ b/sysdeps/mach/hurd/sched_gets.c ++@@ -0,0 +1,30 @@ +++/* Copyright (C) 2020 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 +++ . */ +++ +++#include +++#include +++#include +++#include +++ +++ +++/* Retrieve scheduling algorithm for a particular purpose. */ +++int +++__sched_getscheduler (pid_t pid) +++{ +++ return SCHED_OTHER; +++} +++weak_alias (__sched_getscheduler, sched_getscheduler) ++diff --git a/sysdeps/mach/hurd/sched_sets.c b/sysdeps/mach/hurd/sched_sets.c ++new file mode 100644 ++index 0000000000..54d368abf5 ++--- /dev/null +++++ b/sysdeps/mach/hurd/sched_sets.c ++@@ -0,0 +1,45 @@ +++/* Copyright (C) 1996-2020 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 +++ . */ +++ +++#include +++#include +++#include +++#include +++ +++ +++/* Set scheduling algorithm and/or parameters for a process. */ +++int +++__sched_setscheduler (pid_t pid, int policy, const struct sched_param *param) +++{ +++ switch (policy) +++ { +++ case SCHED_OTHER: +++ if (param->sched_priority != 0) +++ return __hurd_fail (EINVAL); +++ break; +++ +++ case SCHED_FIFO: +++ case SCHED_RR: +++ return __hurd_fail (ENOTSUP); +++ +++ default: +++ return EINVAL; +++ } +++ return 0; +++} +++libc_hidden_def (__sched_setscheduler) +++weak_alias (__sched_setscheduler, sched_setscheduler) diff --cc debian/patches/hurd-i386/git-sem-intr.diff index 000000000,000000000..2e26df82f new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/git-sem-intr.diff @@@ -1,0 -1,0 +1,164 @@@ ++Committed for glibc 2.32 ++ ++commit b2cdf72e5c496153050551f0ce704e9ef08ffeac ++Author: Samuel Thibault ++Date: Mon Feb 10 00:52:50 2020 +0000 ++ ++ htl: Make sem_wait/sem_timedwait interruptible ++ ++diff --git a/htl/Makefile b/htl/Makefile ++index 1b33748934..39294c64d1 100644 ++--- a/htl/Makefile +++++ b/htl/Makefile ++@@ -108,6 +108,8 @@ libpthread-routines := pt-attr pt-attr-destroy pt-attr-getdetachstate \ ++ \ ++ pt-block \ ++ pt-timedblock \ +++ pt-block-intr \ +++ pt-timedblock-intr \ ++ pt-wakeup \ ++ pt-docancel \ ++ pt-sysdep \ ++diff --git a/htl/pt-internal.h b/htl/pt-internal.h ++index 8ffe1bd970..918c207c3e 100644 ++--- a/htl/pt-internal.h +++++ b/htl/pt-internal.h ++@@ -270,6 +270,14 @@ extern error_t __pthread_timedblock (struct __pthread *__restrict thread, ++ const struct timespec *__restrict abstime, ++ clockid_t clock_id); ++ +++/* Block THREAD with interrupts. */ +++extern error_t __pthread_block_intr (struct __pthread *thread); +++ +++/* Block THREAD until *ABSTIME is reached, with interrupts. */ +++extern error_t __pthread_timedblock_intr (struct __pthread *__restrict thread, +++ const struct timespec *__restrict abstime, +++ clockid_t clock_id); +++ ++ /* Wakeup THREAD. */ ++ extern void __pthread_wakeup (struct __pthread *thread); ++ ++diff --git a/sysdeps/htl/sem-timedwait.c b/sysdeps/htl/sem-timedwait.c ++index 656da41184..a61acfd43f 100644 ++--- a/sysdeps/htl/sem-timedwait.c +++++ b/sysdeps/htl/sem-timedwait.c ++@@ -30,6 +30,7 @@ __sem_timedwait_internal (sem_t *restrict sem, ++ error_t err; ++ int drain; ++ struct __pthread *self; +++ clockid_t clock_id = CLOCK_REALTIME; ++ ++ __pthread_spin_lock (&sem->__lock); ++ if (sem->__value > 0) ++@@ -54,12 +55,9 @@ __sem_timedwait_internal (sem_t *restrict sem, ++ ++ /* Block the thread. */ ++ if (timeout != NULL) ++- err = __pthread_timedblock (self, timeout, CLOCK_REALTIME); +++ err = __pthread_timedblock_intr (self, timeout, clock_id); ++ else ++- { ++- err = 0; ++- __pthread_block (self); ++- } +++ err = __pthread_block_intr (self); ++ ++ __pthread_spin_lock (&sem->__lock); ++ if (self->prevp == NULL) ++@@ -82,7 +80,7 @@ __sem_timedwait_internal (sem_t *restrict sem, ++ ++ if (err) ++ { ++- assert (err == ETIMEDOUT); +++ assert (err == ETIMEDOUT || err == EINTR); ++ errno = err; ++ return -1; ++ } ++diff --git a/sysdeps/mach/htl/pt-block-intr.c b/sysdeps/mach/htl/pt-block-intr.c ++new file mode 100644 ++index 0000000000..f15beb3a0f ++--- /dev/null +++++ b/sysdeps/mach/htl/pt-block-intr.c ++@@ -0,0 +1,6 @@ +++#include +++#define RETTYPE error_t +++#define RETURN(val) return val +++#define __pthread_block __pthread_block_intr +++#define MSG_OPTIONS MACH_RCV_INTERRUPT +++#include "pt-block.c" ++diff --git a/sysdeps/mach/htl/pt-block.c b/sysdeps/mach/htl/pt-block.c ++index e1500dce33..28bae157d1 100644 ++--- a/sysdeps/mach/htl/pt-block.c +++++ b/sysdeps/mach/htl/pt-block.c ++@@ -24,15 +24,30 @@ ++ ++ #include ++ +++#ifndef MSG_OPTIONS +++# define MSG_OPTIONS 0 +++#endif +++ +++#ifndef RETTYPE +++# define RETTYPE void +++#endif +++ +++#ifndef RETURN +++# define RETURN(val) +++#endif +++ ++ /* Block THREAD. */ ++-void +++RETTYPE ++ __pthread_block (struct __pthread *thread) ++ { ++ mach_msg_header_t msg; ++ error_t err; ++ ++- err = __mach_msg (&msg, MACH_RCV_MSG, 0, sizeof msg, +++ err = __mach_msg (&msg, MACH_RCV_MSG | MSG_OPTIONS, 0, sizeof msg, ++ thread->wakeupmsg.msgh_remote_port, ++ MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL); +++ if ((MSG_OPTIONS & MACH_RCV_INTERRUPT) && err == MACH_RCV_INTERRUPTED) +++ RETURN(EINTR); ++ assert_perror (err); +++ RETURN(0); ++ } ++diff --git a/sysdeps/mach/htl/pt-timedblock-intr.c b/sysdeps/mach/htl/pt-timedblock-intr.c ++new file mode 100644 ++index 0000000000..70e132716b ++--- /dev/null +++++ b/sysdeps/mach/htl/pt-timedblock-intr.c ++@@ -0,0 +1,3 @@ +++#define __pthread_timedblock __pthread_timedblock_intr +++#define MSG_OPTIONS MACH_RCV_INTERRUPT +++#include "pt-timedblock.c" ++diff --git a/sysdeps/mach/htl/pt-timedblock.c b/sysdeps/mach/htl/pt-timedblock.c ++index 63af869c90..ead070e397 100644 ++--- a/sysdeps/mach/htl/pt-timedblock.c +++++ b/sysdeps/mach/htl/pt-timedblock.c ++@@ -26,6 +26,10 @@ ++ ++ #include ++ +++#ifndef MSG_OPTIONS +++# define MSG_OPTIONS 0 +++#endif +++ ++ /* Block THREAD. */ ++ error_t ++ __pthread_timedblock (struct __pthread *thread, ++@@ -54,11 +58,13 @@ __pthread_timedblock (struct __pthread *thread, ++ /* Need to do a carry. */ ++ timeout -= (now.tv_nsec - abstime->tv_nsec + 999999) / 1000000; ++ ++- err = __mach_msg (&msg, MACH_RCV_MSG | MACH_RCV_TIMEOUT, 0, +++ err = __mach_msg (&msg, MACH_RCV_MSG | MACH_RCV_TIMEOUT | MSG_OPTIONS, 0, ++ sizeof msg, thread->wakeupmsg.msgh_remote_port, ++ timeout, MACH_PORT_NULL); ++ if (err == EMACH_RCV_TIMED_OUT) ++ return ETIMEDOUT; +++ if ((MSG_OPTIONS & MACH_RCV_INTERRUPT) && err == MACH_RCV_INTERRUPTED) +++ return EINTR; ++ ++ assert_perror (err); ++ return 0; diff --cc debian/patches/hurd-i386/git-sem-open-init.diff index 000000000,000000000..b0f875f25 new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/git-sem-open-init.diff @@@ -1,0 -1,0 +1,82 @@@ ++Submitted for 2.33 ++ ++commit e453b54b02204e0bc4a36a865ecc0c82058f4f9d ++Author: Samuel Thibault ++Date: Sun Dec 13 15:18:16 2020 +0000 ++ ++ pthread: Move semaphore initialization for open to semaphoreP.h ++ ++ This allows to easily reuse all of the sem_open/sem_close/sem_unlink ++ implementations in the various ports. ++ ++--- ++ nptl/sem_open.c | 12 +----------- ++ nptl/semaphoreP.h | 15 +++++++++++++++ ++ sysdeps/nptl/futex-internal.h | 3 +++ ++ 3 files changed, 19 insertions(+), 11 deletions(-) ++ ++--- a/nptl/sem_open.c +++++ b/nptl/sem_open.c ++@@ -211,17 +211,7 @@ sem_open (const char *name, int oflag, . ++ struct new_sem newsem; ++ } sem; ++ ++-#if __HAVE_64B_ATOMICS ++- sem.newsem.data = value; ++-#else ++- sem.newsem.value = value << SEM_VALUE_SHIFT; ++- sem.newsem.nwaiters = 0; ++-#endif ++- /* pad is used as a mutex on pre-v9 sparc and ignored otherwise. */ ++- sem.newsem.pad = 0; ++- ++- /* This always is a shared semaphore. */ ++- sem.newsem.private = FUTEX_SHARED; +++ __new_sem_open_init (&sem.newsem, value); ++ ++ /* Initialize the remaining bytes as well. */ ++ memset ((char *) &sem.initsem + sizeof (struct new_sem), '\0', ++--- a/nptl/semaphoreP.h +++++ b/nptl/semaphoreP.h ++@@ -17,6 +17,7 @@ ++ . */ ++ ++ #include +++#include ++ #include "pthreadP.h" ++ ++ #define SEM_SHM_PREFIX "sem." ++@@ -42,6 +43,20 @@ extern int __sem_mappings_lock attribute ++ /* Comparison function for search in tree with existing mappings. */ ++ extern int __sem_search (const void *a, const void *b) attribute_hidden; ++ +++static inline void __new_sem_open_init (struct new_sem *sem, unsigned value) +++{ +++#if __HAVE_64B_ATOMICS +++ sem->data = value; +++#else +++ sem->value = value << SEM_VALUE_SHIFT; +++ sem->nwaiters = 0; +++#endif +++ /* pad is used as a mutex on pre-v9 sparc and ignored otherwise. */ +++ sem->pad = 0; +++ +++ /* This always is a shared semaphore. */ +++ sem->private = FUTEX_SHARED; +++} ++ ++ /* Prototypes of functions with multiple interfaces. */ ++ extern int __new_sem_init (sem_t *sem, int pshared, unsigned int value); ++--- a/sysdeps/nptl/futex-internal.h +++++ b/sysdeps/nptl/futex-internal.h ++@@ -23,7 +23,10 @@ ++ #include ++ #include ++ #include +++#include ++ #include +++#include +++#include ++ ++ /* This file defines futex operations used internally in glibc. A futex ++ consists of the so-called futex word in userspace, which is of type diff --cc debian/patches/hurd-i386/git-sem-open.diff index 000000000,000000000..8a026454d new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/git-sem-open.diff @@@ -1,0 -1,0 +1,1096 @@@ ++Submitted for 2.33 ++ ++commit 257e4e7b576d54ab943d73dcda64c9a62c15b907 ++Author: Samuel Thibault ++Date: Sun Dec 13 15:20:32 2020 +0000 ++ ++ htl: Get sem_open/sem_close/sem_unlink support ++ ++ This just moves the existing nptl implementation to reuse as it is in ++ htl. ++ ++Index: glibc-2.31/htl/Makefile ++=================================================================== ++--- glibc-2.31.orig/htl/Makefile +++++ glibc-2.31/htl/Makefile ++@@ -129,8 +129,8 @@ libpthread-routines := pt-attr pt-attr-d ++ pt-getschedparam pt-setschedparam pt-setschedprio \ ++ pt-yield \ ++ \ ++- sem-close sem-destroy sem-getvalue sem-init sem-open \ ++- sem-post sem-timedwait sem-trywait sem-unlink \ +++ sem_close sem-destroy sem-getvalue sem-init sem_open \ +++ sem-post sem-timedwait sem-trywait sem_unlink \ ++ sem-wait sem-waitfast \ ++ \ ++ shm-directory \ ++Index: glibc-2.31/htl/semaphoreP.h ++=================================================================== ++--- /dev/null +++++ glibc-2.31/htl/semaphoreP.h ++@@ -0,0 +1,49 @@ +++/* Copyright (C) 2002-2020 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include "pt-internal.h" +++ +++#define SEM_SHM_PREFIX "sem." +++ +++/* Keeping track of currently used mappings. */ +++struct inuse_sem +++{ +++ dev_t dev; +++ ino_t ino; +++ int refcnt; +++ sem_t *sem; +++ char name[0]; +++}; +++ +++ +++/* The search tree for existing mappings. */ +++extern void *__sem_mappings attribute_hidden; +++ +++/* Lock to protect the search tree. */ +++extern int __sem_mappings_lock attribute_hidden; +++ +++ +++/* Comparison function for search in tree with existing mappings. */ +++extern int __sem_search (const void *a, const void *b) attribute_hidden; +++ +++static inline void __new_sem_open_init (struct new_sem *sem, unsigned value) +++{ +++ /* This always is a shared semaphore. */ +++ *sem = (struct new_sem) __SEMAPHORE_INITIALIZER (1, value); +++} ++Index: glibc-2.31/sysdeps/htl/sem-close.c ++=================================================================== ++--- glibc-2.31.orig/sysdeps/htl/sem-close.c +++++ /dev/null ++@@ -1,31 +0,0 @@ ++-/* Close a named semaphore. Generic version. ++- Copyright (C) 2005-2020 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 ++- . */ ++- ++-#include ++-#include ++- ++-#include ++- ++-int ++-__sem_close (sem_t *sem) ++-{ ++- errno = EOPNOTSUPP; ++- return -1; ++-} ++- ++-strong_alias (__sem_close, sem_close); ++Index: glibc-2.31/sysdeps/htl/sem-open.c ++=================================================================== ++--- glibc-2.31.orig/sysdeps/htl/sem-open.c +++++ /dev/null ++@@ -1,31 +0,0 @@ ++-/* Open a named semaphore. Generic version. ++- Copyright (C) 2005-2020 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 ++- . */ ++- ++-#include ++-#include ++- ++-#include ++- ++-sem_t * ++-__sem_open (const char *name, int open_flags, ...) ++-{ ++- errno = EOPNOTSUPP; ++- return SEM_FAILED; ++-} ++- ++-strong_alias (__sem_open, sem_open); ++Index: glibc-2.31/sysdeps/htl/sem-unlink.c ++=================================================================== ++--- glibc-2.31.orig/sysdeps/htl/sem-unlink.c +++++ /dev/null ++@@ -1,31 +0,0 @@ ++-/* Unlink a named semaphore. Generic version. ++- Copyright (C) 2005-2020 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 ++- . */ ++- ++-#include ++-#include ++- ++-#include ++- ++-int ++-__sem_unlink (const char *name) ++-{ ++- errno = EOPNOTSUPP; ++- return -1; ++-} ++- ++-strong_alias (__sem_unlink, sem_unlink); ++Index: glibc-2.31/nptl/sem_close.c ++=================================================================== ++--- glibc-2.31.orig/nptl/sem_close.c +++++ /dev/null ++@@ -1,81 +0,0 @@ ++-/* Copyright (C) 2002-2020 Free Software Foundation, Inc. ++- This file is part of the GNU C Library. ++- Contributed by Ulrich Drepper , 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, see ++- . */ ++- ++-#include ++-#include ++-#include ++-#include "semaphoreP.h" ++- ++-struct walk_closure ++-{ ++- sem_t *the_sem; ++- struct inuse_sem *rec; ++-}; ++- ++-static void ++-walker (const void *inodep, VISIT which, void *closure0) ++-{ ++- struct walk_closure *closure = closure0; ++- struct inuse_sem *nodep = *(struct inuse_sem **) inodep; ++- ++- if (nodep->sem == closure->the_sem) ++- closure->rec = nodep; ++-} ++- ++- ++-int ++-sem_close (sem_t *sem) ++-{ ++- int result = 0; ++- ++- /* Get the lock. */ ++- lll_lock (__sem_mappings_lock, LLL_PRIVATE); ++- ++- /* Locate the entry for the mapping the caller provided. */ ++- struct inuse_sem *rec; ++- { ++- struct walk_closure closure = { .the_sem = sem, .rec = NULL }; ++- __twalk_r (__sem_mappings, walker, &closure); ++- rec = closure.rec; ++- } ++- if (rec != NULL) ++- { ++- /* Check the reference counter. If it is going to be zero, free ++- all the resources. */ ++- if (--rec->refcnt == 0) ++- { ++- /* Remove the record from the tree. */ ++- (void) __tdelete (rec, &__sem_mappings, __sem_search); ++- ++- result = munmap (rec->sem, sizeof (sem_t)); ++- ++- free (rec); ++- } ++- } ++- else ++- { ++- /* This is no valid semaphore. */ ++- result = -1; ++- __set_errno (EINVAL); ++- } ++- ++- /* Release the lock. */ ++- lll_unlock (__sem_mappings_lock, LLL_PRIVATE); ++- ++- return result; ++-} ++Index: glibc-2.31/nptl/sem_open.c ++=================================================================== ++--- glibc-2.31.orig/nptl/sem_open.c +++++ /dev/null ++@@ -1,320 +0,0 @@ ++-/* Copyright (C) 2002-2020 Free Software Foundation, Inc. ++- This file is part of the GNU C Library. ++- Contributed by Ulrich Drepper , 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, see ++- . */ ++- ++-#include ++-#include ++-#include ++-#include ++-#include ++-#include ++-#include ++-#include ++-#include ++-#include ++-#include ++-#include ++-#include "semaphoreP.h" ++-#include ++-#include ++-#include ++- ++-/* Comparison function for search of existing mapping. */ ++-int ++-attribute_hidden ++-__sem_search (const void *a, const void *b) ++-{ ++- const struct inuse_sem *as = (const struct inuse_sem *) a; ++- const struct inuse_sem *bs = (const struct inuse_sem *) b; ++- ++- if (as->ino != bs->ino) ++- /* Cannot return the difference the type is larger than int. */ ++- return as->ino < bs->ino ? -1 : (as->ino == bs->ino ? 0 : 1); ++- ++- if (as->dev != bs->dev) ++- /* Cannot return the difference the type is larger than int. */ ++- return as->dev < bs->dev ? -1 : (as->dev == bs->dev ? 0 : 1); ++- ++- return strcmp (as->name, bs->name); ++-} ++- ++- ++-/* The search tree for existing mappings. */ ++-void *__sem_mappings attribute_hidden; ++- ++-/* Lock to protect the search tree. */ ++-int __sem_mappings_lock attribute_hidden = LLL_LOCK_INITIALIZER; ++- ++- ++-/* Search for existing mapping and if possible add the one provided. */ ++-static sem_t * ++-check_add_mapping (const char *name, size_t namelen, int fd, sem_t *existing) ++-{ ++- sem_t *result = SEM_FAILED; ++- ++- /* Get the information about the file. */ ++- struct stat64 st; ++- if (__fxstat64 (_STAT_VER, fd, &st) == 0) ++- { ++- /* Get the lock. */ ++- lll_lock (__sem_mappings_lock, LLL_PRIVATE); ++- ++- /* Search for an existing mapping given the information we have. */ ++- struct inuse_sem *fake; ++- fake = (struct inuse_sem *) alloca (sizeof (*fake) + namelen); ++- memcpy (fake->name, name, namelen); ++- fake->dev = st.st_dev; ++- fake->ino = st.st_ino; ++- ++- struct inuse_sem **foundp = __tfind (fake, &__sem_mappings, ++- __sem_search); ++- if (foundp != NULL) ++- { ++- /* There is already a mapping. Use it. */ ++- result = (*foundp)->sem; ++- ++(*foundp)->refcnt; ++- } ++- else ++- { ++- /* We haven't found a mapping. Install ione. */ ++- struct inuse_sem *newp; ++- ++- newp = (struct inuse_sem *) malloc (sizeof (*newp) + namelen); ++- if (newp != NULL) ++- { ++- /* If the caller hasn't provided any map it now. */ ++- if (existing == SEM_FAILED) ++- existing = (sem_t *) mmap (NULL, sizeof (sem_t), ++- PROT_READ | PROT_WRITE, MAP_SHARED, ++- fd, 0); ++- ++- newp->dev = st.st_dev; ++- newp->ino = st.st_ino; ++- newp->refcnt = 1; ++- newp->sem = existing; ++- memcpy (newp->name, name, namelen); ++- ++- /* Insert the new value. */ ++- if (existing != MAP_FAILED ++- && __tsearch (newp, &__sem_mappings, __sem_search) != NULL) ++- /* Successful. */ ++- result = existing; ++- else ++- /* Something went wrong while inserting the new ++- value. We fail completely. */ ++- free (newp); ++- } ++- } ++- ++- /* Release the lock. */ ++- lll_unlock (__sem_mappings_lock, LLL_PRIVATE); ++- } ++- ++- if (result != existing && existing != SEM_FAILED && existing != MAP_FAILED) ++- { ++- /* Do not disturb errno. */ ++- int save = errno; ++- munmap (existing, sizeof (sem_t)); ++- errno = save; ++- } ++- ++- return result; ++-} ++- ++- ++-sem_t * ++-sem_open (const char *name, int oflag, ...) ++-{ ++- int fd; ++- sem_t *result; ++- ++- /* Check that shared futexes are supported. */ ++- int err = futex_supports_pshared (PTHREAD_PROCESS_SHARED); ++- if (err != 0) ++- { ++- __set_errno (err); ++- return SEM_FAILED; ++- } ++- ++- /* Create the name of the final file in local variable SHM_NAME. */ ++- SHM_GET_NAME (EINVAL, SEM_FAILED, SEM_SHM_PREFIX); ++- ++- /* Disable asynchronous cancellation. */ ++-#ifdef __libc_ptf_call ++- int state; ++- __libc_ptf_call (__pthread_setcancelstate, ++- (PTHREAD_CANCEL_DISABLE, &state), 0); ++-#endif ++- ++- /* If the semaphore object has to exist simply open it. */ ++- if ((oflag & O_CREAT) == 0 || (oflag & O_EXCL) == 0) ++- { ++- try_again: ++- fd = __libc_open (shm_name, ++- (oflag & ~(O_CREAT|O_ACCMODE)) | O_NOFOLLOW | O_RDWR); ++- ++- if (fd == -1) ++- { ++- /* If we are supposed to create the file try this next. */ ++- if ((oflag & O_CREAT) != 0 && errno == ENOENT) ++- goto try_create; ++- ++- /* Return. errno is already set. */ ++- } ++- else ++- /* Check whether we already have this semaphore mapped and ++- create one if necessary. */ ++- result = check_add_mapping (name, namelen, fd, SEM_FAILED); ++- } ++- else ++- { ++- /* We have to open a temporary file first since it must have the ++- correct form before we can start using it. */ ++- char *tmpfname; ++- mode_t mode; ++- unsigned int value; ++- va_list ap; ++- ++- try_create: ++- va_start (ap, oflag); ++- ++- mode = va_arg (ap, mode_t); ++- value = va_arg (ap, unsigned int); ++- ++- va_end (ap); ++- ++- if (value > SEM_VALUE_MAX) ++- { ++- __set_errno (EINVAL); ++- result = SEM_FAILED; ++- goto out; ++- } ++- ++- /* Create the initial file content. */ ++- union ++- { ++- sem_t initsem; ++- struct new_sem newsem; ++- } sem; ++- ++- __new_sem_open_init (&sem.newsem, value); ++- ++- /* Initialize the remaining bytes as well. */ ++- memset ((char *) &sem.initsem + sizeof (struct new_sem), '\0', ++- sizeof (sem_t) - sizeof (struct new_sem)); ++- ++- tmpfname = __alloca (shm_dirlen + sizeof SEM_SHM_PREFIX + 6); ++- char *xxxxxx = __mempcpy (tmpfname, shm_dir, shm_dirlen); ++- ++- int retries = 0; ++-#define NRETRIES 50 ++- while (1) ++- { ++- /* Add the suffix for mktemp. */ ++- strcpy (xxxxxx, "XXXXXX"); ++- ++- /* We really want to use mktemp here. We cannot use mkstemp ++- since the file must be opened with a specific mode. The ++- mode cannot later be set since then we cannot apply the ++- file create mask. */ ++- if (__mktemp (tmpfname) == NULL) ++- { ++- result = SEM_FAILED; ++- goto out; ++- } ++- ++- /* Open the file. Make sure we do not overwrite anything. */ ++- fd = __libc_open (tmpfname, O_RDWR | O_CREAT | O_EXCL, mode); ++- if (fd == -1) ++- { ++- if (errno == EEXIST) ++- { ++- if (++retries < NRETRIES) ++- continue; ++- ++- __set_errno (EAGAIN); ++- } ++- ++- result = SEM_FAILED; ++- goto out; ++- } ++- ++- /* We got a file. */ ++- break; ++- } ++- ++- if (TEMP_FAILURE_RETRY (__libc_write (fd, &sem.initsem, sizeof (sem_t))) ++- == sizeof (sem_t) ++- /* Map the sem_t structure from the file. */ ++- && (result = (sem_t *) mmap (NULL, sizeof (sem_t), ++- PROT_READ | PROT_WRITE, MAP_SHARED, ++- fd, 0)) != MAP_FAILED) ++- { ++- /* Create the file. Don't overwrite an existing file. */ ++- if (link (tmpfname, shm_name) != 0) ++- { ++- /* Undo the mapping. */ ++- (void) munmap (result, sizeof (sem_t)); ++- ++- /* Reinitialize 'result'. */ ++- result = SEM_FAILED; ++- ++- /* This failed. If O_EXCL is not set and the problem was ++- that the file exists, try again. */ ++- if ((oflag & O_EXCL) == 0 && errno == EEXIST) ++- { ++- /* Remove the file. */ ++- (void) unlink (tmpfname); ++- ++- /* Close the file. */ ++- (void) __libc_close (fd); ++- ++- goto try_again; ++- } ++- } ++- else ++- /* Insert the mapping into the search tree. This also ++- determines whether another thread sneaked by and already ++- added such a mapping despite the fact that we created it. */ ++- result = check_add_mapping (name, namelen, fd, result); ++- } ++- ++- /* Now remove the temporary name. This should never fail. If ++- it fails we leak a file name. Better fix the kernel. */ ++- (void) unlink (tmpfname); ++- } ++- ++- /* Map the mmap error to the error we need. */ ++- if (MAP_FAILED != (void *) SEM_FAILED && result == MAP_FAILED) ++- result = SEM_FAILED; ++- ++- /* We don't need the file descriptor anymore. */ ++- if (fd != -1) ++- { ++- /* Do not disturb errno. */ ++- int save = errno; ++- __libc_close (fd); ++- errno = save; ++- } ++- ++-out: ++-#ifdef __libc_ptf_call ++- __libc_ptf_call (__pthread_setcancelstate, (state, NULL), 0); ++-#endif ++- ++- return result; ++-} ++Index: glibc-2.31/nptl/sem_unlink.c ++=================================================================== ++--- glibc-2.31.orig/nptl/sem_unlink.c +++++ /dev/null ++@@ -1,38 +0,0 @@ ++-/* Copyright (C) 2002-2020 Free Software Foundation, Inc. ++- This file is part of the GNU C Library. ++- Contributed by Ulrich Drepper , 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, see ++- . */ ++- ++-#include ++-#include ++-#include ++-#include ++-#include ++-#include "semaphoreP.h" ++-#include ++- ++-int ++-sem_unlink (const char *name) ++-{ ++- /* Construct the filename. */ ++- SHM_GET_NAME (ENOENT, -1, SEM_SHM_PREFIX); ++- ++- /* Now try removing it. */ ++- int ret = unlink (shm_name); ++- if (ret < 0 && errno == EPERM) ++- __set_errno (EACCES); ++- return ret; ++-} ++Index: glibc-2.31/sysdeps/pthread/sem_close.c ++=================================================================== ++--- /dev/null +++++ glibc-2.31/sysdeps/pthread/sem_close.c ++@@ -0,0 +1,81 @@ +++/* Copyright (C) 2002-2020 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include "semaphoreP.h" +++ +++struct walk_closure +++{ +++ sem_t *the_sem; +++ struct inuse_sem *rec; +++}; +++ +++static void +++walker (const void *inodep, VISIT which, void *closure0) +++{ +++ struct walk_closure *closure = closure0; +++ struct inuse_sem *nodep = *(struct inuse_sem **) inodep; +++ +++ if (nodep->sem == closure->the_sem) +++ closure->rec = nodep; +++} +++ +++ +++int +++sem_close (sem_t *sem) +++{ +++ int result = 0; +++ +++ /* Get the lock. */ +++ lll_lock (__sem_mappings_lock, LLL_PRIVATE); +++ +++ /* Locate the entry for the mapping the caller provided. */ +++ struct inuse_sem *rec; +++ { +++ struct walk_closure closure = { .the_sem = sem, .rec = NULL }; +++ __twalk_r (__sem_mappings, walker, &closure); +++ rec = closure.rec; +++ } +++ if (rec != NULL) +++ { +++ /* Check the reference counter. If it is going to be zero, free +++ all the resources. */ +++ if (--rec->refcnt == 0) +++ { +++ /* Remove the record from the tree. */ +++ (void) __tdelete (rec, &__sem_mappings, __sem_search); +++ +++ result = munmap (rec->sem, sizeof (sem_t)); +++ +++ free (rec); +++ } +++ } +++ else +++ { +++ /* This is no valid semaphore. */ +++ result = -1; +++ __set_errno (EINVAL); +++ } +++ +++ /* Release the lock. */ +++ lll_unlock (__sem_mappings_lock, LLL_PRIVATE); +++ +++ return result; +++} ++Index: glibc-2.31/sysdeps/pthread/sem_open.c ++=================================================================== ++--- /dev/null +++++ glibc-2.31/sysdeps/pthread/sem_open.c ++@@ -0,0 +1,320 @@ +++/* Copyright (C) 2002-2020 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include "semaphoreP.h" +++#include +++#include +++#include +++ +++/* Comparison function for search of existing mapping. */ +++int +++attribute_hidden +++__sem_search (const void *a, const void *b) +++{ +++ const struct inuse_sem *as = (const struct inuse_sem *) a; +++ const struct inuse_sem *bs = (const struct inuse_sem *) b; +++ +++ if (as->ino != bs->ino) +++ /* Cannot return the difference the type is larger than int. */ +++ return as->ino < bs->ino ? -1 : (as->ino == bs->ino ? 0 : 1); +++ +++ if (as->dev != bs->dev) +++ /* Cannot return the difference the type is larger than int. */ +++ return as->dev < bs->dev ? -1 : (as->dev == bs->dev ? 0 : 1); +++ +++ return strcmp (as->name, bs->name); +++} +++ +++ +++/* The search tree for existing mappings. */ +++void *__sem_mappings attribute_hidden; +++ +++/* Lock to protect the search tree. */ +++int __sem_mappings_lock attribute_hidden = LLL_LOCK_INITIALIZER; +++ +++ +++/* Search for existing mapping and if possible add the one provided. */ +++static sem_t * +++check_add_mapping (const char *name, size_t namelen, int fd, sem_t *existing) +++{ +++ sem_t *result = SEM_FAILED; +++ +++ /* Get the information about the file. */ +++ struct stat64 st; +++ if (__fxstat64 (_STAT_VER, fd, &st) == 0) +++ { +++ /* Get the lock. */ +++ lll_lock (__sem_mappings_lock, LLL_PRIVATE); +++ +++ /* Search for an existing mapping given the information we have. */ +++ struct inuse_sem *fake; +++ fake = (struct inuse_sem *) alloca (sizeof (*fake) + namelen); +++ memcpy (fake->name, name, namelen); +++ fake->dev = st.st_dev; +++ fake->ino = st.st_ino; +++ +++ struct inuse_sem **foundp = __tfind (fake, &__sem_mappings, +++ __sem_search); +++ if (foundp != NULL) +++ { +++ /* There is already a mapping. Use it. */ +++ result = (*foundp)->sem; +++ ++(*foundp)->refcnt; +++ } +++ else +++ { +++ /* We haven't found a mapping. Install ione. */ +++ struct inuse_sem *newp; +++ +++ newp = (struct inuse_sem *) malloc (sizeof (*newp) + namelen); +++ if (newp != NULL) +++ { +++ /* If the caller hasn't provided any map it now. */ +++ if (existing == SEM_FAILED) +++ existing = (sem_t *) mmap (NULL, sizeof (sem_t), +++ PROT_READ | PROT_WRITE, MAP_SHARED, +++ fd, 0); +++ +++ newp->dev = st.st_dev; +++ newp->ino = st.st_ino; +++ newp->refcnt = 1; +++ newp->sem = existing; +++ memcpy (newp->name, name, namelen); +++ +++ /* Insert the new value. */ +++ if (existing != MAP_FAILED +++ && __tsearch (newp, &__sem_mappings, __sem_search) != NULL) +++ /* Successful. */ +++ result = existing; +++ else +++ /* Something went wrong while inserting the new +++ value. We fail completely. */ +++ free (newp); +++ } +++ } +++ +++ /* Release the lock. */ +++ lll_unlock (__sem_mappings_lock, LLL_PRIVATE); +++ } +++ +++ if (result != existing && existing != SEM_FAILED && existing != MAP_FAILED) +++ { +++ /* Do not disturb errno. */ +++ int save = errno; +++ munmap (existing, sizeof (sem_t)); +++ errno = save; +++ } +++ +++ return result; +++} +++ +++ +++sem_t * +++sem_open (const char *name, int oflag, ...) +++{ +++ int fd; +++ sem_t *result; +++ +++ /* Check that shared futexes are supported. */ +++ int err = futex_supports_pshared (PTHREAD_PROCESS_SHARED); +++ if (err != 0) +++ { +++ __set_errno (err); +++ return SEM_FAILED; +++ } +++ +++ /* Create the name of the final file in local variable SHM_NAME. */ +++ SHM_GET_NAME (EINVAL, SEM_FAILED, SEM_SHM_PREFIX); +++ +++ /* Disable asynchronous cancellation. */ +++#ifdef __libc_ptf_call +++ int state; +++ __libc_ptf_call (__pthread_setcancelstate, +++ (PTHREAD_CANCEL_DISABLE, &state), 0); +++#endif +++ +++ /* If the semaphore object has to exist simply open it. */ +++ if ((oflag & O_CREAT) == 0 || (oflag & O_EXCL) == 0) +++ { +++ try_again: +++ fd = __libc_open (shm_name, +++ (oflag & ~(O_CREAT|O_ACCMODE)) | O_NOFOLLOW | O_RDWR); +++ +++ if (fd == -1) +++ { +++ /* If we are supposed to create the file try this next. */ +++ if ((oflag & O_CREAT) != 0 && errno == ENOENT) +++ goto try_create; +++ +++ /* Return. errno is already set. */ +++ } +++ else +++ /* Check whether we already have this semaphore mapped and +++ create one if necessary. */ +++ result = check_add_mapping (name, namelen, fd, SEM_FAILED); +++ } +++ else +++ { +++ /* We have to open a temporary file first since it must have the +++ correct form before we can start using it. */ +++ char *tmpfname; +++ mode_t mode; +++ unsigned int value; +++ va_list ap; +++ +++ try_create: +++ va_start (ap, oflag); +++ +++ mode = va_arg (ap, mode_t); +++ value = va_arg (ap, unsigned int); +++ +++ va_end (ap); +++ +++ if (value > SEM_VALUE_MAX) +++ { +++ __set_errno (EINVAL); +++ result = SEM_FAILED; +++ goto out; +++ } +++ +++ /* Create the initial file content. */ +++ union +++ { +++ sem_t initsem; +++ struct new_sem newsem; +++ } sem; +++ +++ __new_sem_open_init (&sem.newsem, value); +++ +++ /* Initialize the remaining bytes as well. */ +++ memset ((char *) &sem.initsem + sizeof (struct new_sem), '\0', +++ sizeof (sem_t) - sizeof (struct new_sem)); +++ +++ tmpfname = __alloca (shm_dirlen + sizeof SEM_SHM_PREFIX + 6); +++ char *xxxxxx = __mempcpy (tmpfname, shm_dir, shm_dirlen); +++ +++ int retries = 0; +++#define NRETRIES 50 +++ while (1) +++ { +++ /* Add the suffix for mktemp. */ +++ strcpy (xxxxxx, "XXXXXX"); +++ +++ /* We really want to use mktemp here. We cannot use mkstemp +++ since the file must be opened with a specific mode. The +++ mode cannot later be set since then we cannot apply the +++ file create mask. */ +++ if (__mktemp (tmpfname) == NULL) +++ { +++ result = SEM_FAILED; +++ goto out; +++ } +++ +++ /* Open the file. Make sure we do not overwrite anything. */ +++ fd = __libc_open (tmpfname, O_RDWR | O_CREAT | O_EXCL, mode); +++ if (fd == -1) +++ { +++ if (errno == EEXIST) +++ { +++ if (++retries < NRETRIES) +++ continue; +++ +++ __set_errno (EAGAIN); +++ } +++ +++ result = SEM_FAILED; +++ goto out; +++ } +++ +++ /* We got a file. */ +++ break; +++ } +++ +++ if (TEMP_FAILURE_RETRY (__libc_write (fd, &sem.initsem, sizeof (sem_t))) +++ == sizeof (sem_t) +++ /* Map the sem_t structure from the file. */ +++ && (result = (sem_t *) mmap (NULL, sizeof (sem_t), +++ PROT_READ | PROT_WRITE, MAP_SHARED, +++ fd, 0)) != MAP_FAILED) +++ { +++ /* Create the file. Don't overwrite an existing file. */ +++ if (link (tmpfname, shm_name) != 0) +++ { +++ /* Undo the mapping. */ +++ (void) munmap (result, sizeof (sem_t)); +++ +++ /* Reinitialize 'result'. */ +++ result = SEM_FAILED; +++ +++ /* This failed. If O_EXCL is not set and the problem was +++ that the file exists, try again. */ +++ if ((oflag & O_EXCL) == 0 && errno == EEXIST) +++ { +++ /* Remove the file. */ +++ (void) unlink (tmpfname); +++ +++ /* Close the file. */ +++ (void) __libc_close (fd); +++ +++ goto try_again; +++ } +++ } +++ else +++ /* Insert the mapping into the search tree. This also +++ determines whether another thread sneaked by and already +++ added such a mapping despite the fact that we created it. */ +++ result = check_add_mapping (name, namelen, fd, result); +++ } +++ +++ /* Now remove the temporary name. This should never fail. If +++ it fails we leak a file name. Better fix the kernel. */ +++ (void) unlink (tmpfname); +++ } +++ +++ /* Map the mmap error to the error we need. */ +++ if (MAP_FAILED != (void *) SEM_FAILED && result == MAP_FAILED) +++ result = SEM_FAILED; +++ +++ /* We don't need the file descriptor anymore. */ +++ if (fd != -1) +++ { +++ /* Do not disturb errno. */ +++ int save = errno; +++ __libc_close (fd); +++ errno = save; +++ } +++ +++out: +++#ifdef __libc_ptf_call +++ __libc_ptf_call (__pthread_setcancelstate, (state, NULL), 0); +++#endif +++ +++ return result; +++} ++Index: glibc-2.31/sysdeps/pthread/sem_unlink.c ++=================================================================== ++--- /dev/null +++++ glibc-2.31/sysdeps/pthread/sem_unlink.c ++@@ -0,0 +1,38 @@ +++/* Copyright (C) 2002-2020 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include "semaphoreP.h" +++#include +++ +++int +++sem_unlink (const char *name) +++{ +++ /* Construct the filename. */ +++ SHM_GET_NAME (ENOENT, -1, SEM_SHM_PREFIX); +++ +++ /* Now try removing it. */ +++ int ret = unlink (shm_name); +++ if (ret < 0 && errno == EPERM) +++ __set_errno (EACCES); +++ return ret; +++} diff --cc debian/patches/hurd-i386/git-sem-pshared.diff index 000000000,000000000..59ffc30af new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/git-sem-pshared.diff @@@ -1,0 -1,0 +1,588 @@@ ++Commited for 2.33 ++ ++commit 4702ba8c1726ef5b692fbca1255b632b8e81e8c7 ++Author: Samuel Thibault ++Date: Sun Dec 13 15:14:40 2020 +0000 ++ ++ htl: Add pshared semaphore support ++ ++ The implementation is extremely similar to the nptl implementation, but ++ with slight differences in the futex interface. This fixes some of BZ ++ 25521. ++ ++Index: glibc-2.31/htl/Makefile ++=================================================================== ++--- glibc-2.31.orig/htl/Makefile +++++ glibc-2.31/htl/Makefile ++@@ -131,7 +131,7 @@ libpthread-routines := pt-attr pt-attr-d ++ \ ++ sem-close sem-destroy sem-getvalue sem-init sem-open \ ++ sem-post sem-timedwait sem-trywait sem-unlink \ ++- sem-wait \ +++ sem-wait sem-waitfast \ ++ \ ++ shm-directory \ ++ \ ++Index: glibc-2.31/htl/pt-internal.h ++=================================================================== ++--- glibc-2.31.orig/htl/pt-internal.h +++++ glibc-2.31/htl/pt-internal.h ++@@ -323,4 +323,37 @@ extern const struct __pthread_rwlockattr ++ /* Default condition attributes. */ ++ extern const struct __pthread_condattr __pthread_default_condattr; ++ +++/* Semaphore encoding. +++ See nptl implementation for the details. */ +++struct new_sem +++{ +++#if __HAVE_64B_ATOMICS +++ /* The data field holds both value (in the least-significant 32 bits) and +++ nwaiters. */ +++# if __BYTE_ORDER == __LITTLE_ENDIAN +++# define SEM_VALUE_OFFSET 0 +++# elif __BYTE_ORDER == __BIG_ENDIAN +++# define SEM_VALUE_OFFSET 1 +++# else +++# error Unsupported byte order. +++# endif +++# define SEM_NWAITERS_SHIFT 32 +++# define SEM_VALUE_MASK (~(unsigned int)0) +++ uint64_t data; +++ int pshared; +++#define __SEMAPHORE_INITIALIZER(value, pshared) \ +++ { (value), (pshared) } +++#else +++# define SEM_VALUE_SHIFT 1 +++# define SEM_NWAITERS_MASK ((unsigned int)1) +++ unsigned int value; +++ unsigned int nwaiters; +++ int pshared; +++#define __SEMAPHORE_INITIALIZER(value, pshared) \ +++ { (value) << SEM_VALUE_SHIFT, 0, (pshared) } +++#endif +++}; +++ +++extern int __sem_waitfast (struct new_sem *isem, int definitive_result); +++ ++ #endif /* pt-internal.h */ ++Index: glibc-2.31/sysdeps/htl/bits/semaphore.h ++=================================================================== ++--- glibc-2.31.orig/sysdeps/htl/bits/semaphore.h +++++ glibc-2.31/sysdeps/htl/bits/semaphore.h ++@@ -27,21 +27,15 @@ ++ #include ++ ++ /* User visible part of a semaphore. */ ++-struct __semaphore ++-{ ++- __pthread_spinlock_t __lock; ++- struct __pthread *__queue; ++- int __pshared; ++- int __value; ++- void *__data; ++-}; ++ ++-typedef struct __semaphore sem_t; +++#define __SIZEOF_SEM_T 20 ++ ++-#define SEM_FAILED ((void *) 0) +++typedef union +++{ +++ char __size[__SIZEOF_SEM_T]; +++ long int __align; +++} sem_t; ++ ++-/* Initializer for a semaphore. */ ++-#define __SEMAPHORE_INITIALIZER(pshared, value) \ ++- { __PTHREAD_SPIN_LOCK_INITIALIZER, NULL, (pshared), (value), NULL } +++#define SEM_FAILED ((void *) 0) ++ ++ #endif /* bits/semaphore.h */ ++Index: glibc-2.31/sysdeps/htl/sem-destroy.c ++=================================================================== ++--- glibc-2.31.orig/sysdeps/htl/sem-destroy.c +++++ glibc-2.31/sysdeps/htl/sem-destroy.c ++@@ -24,7 +24,15 @@ ++ int ++ __sem_destroy (sem_t *sem) ++ { ++- if (sem->__queue) +++ struct new_sem *isem = (struct new_sem *) sem; +++ if ( +++#if __HAVE_64B_ATOMICS +++ atomic_load_relaxed (&isem->data) >> SEM_NWAITERS_SHIFT +++#else +++ atomic_load_relaxed (&isem->value) & SEM_NWAITERS_MASK +++ || isem->nwaiters +++#endif +++ ) ++ /* There are threads waiting on *SEM. */ ++ { ++ errno = EBUSY; ++Index: glibc-2.31/sysdeps/htl/sem-getvalue.c ++=================================================================== ++--- glibc-2.31.orig/sysdeps/htl/sem-getvalue.c +++++ glibc-2.31/sysdeps/htl/sem-getvalue.c ++@@ -22,9 +22,13 @@ ++ int ++ __sem_getvalue (sem_t *restrict sem, int *restrict value) ++ { ++- __pthread_spin_lock (&sem->__lock); ++- *value = sem->__value; ++- __pthread_spin_unlock (&sem->__lock); +++ struct new_sem *isem = (struct new_sem *) sem; +++ +++#if __HAVE_64B_ATOMICS +++ *value = atomic_load_relaxed (&isem->data) & SEM_VALUE_MASK; +++#else +++ *value = atomic_load_relaxed (&isem->value) >> SEM_VALUE_SHIFT; +++#endif ++ ++ return 0; ++ } ++Index: glibc-2.31/sysdeps/htl/sem-init.c ++=================================================================== ++--- glibc-2.31.orig/sysdeps/htl/sem-init.c +++++ glibc-2.31/sysdeps/htl/sem-init.c ++@@ -24,12 +24,6 @@ ++ int ++ __sem_init (sem_t *sem, int pshared, unsigned value) ++ { ++- if (pshared != 0) ++- { ++- errno = EOPNOTSUPP; ++- return -1; ++- } ++- ++ #ifdef SEM_VALUE_MAX ++ if (value > SEM_VALUE_MAX) ++ { ++@@ -38,7 +32,9 @@ __sem_init (sem_t *sem, int pshared, uns ++ } ++ #endif ++ ++- *sem = (sem_t) __SEMAPHORE_INITIALIZER (pshared, value); +++ struct new_sem *isem = (struct new_sem *) sem; +++ +++ *isem = (struct new_sem) __SEMAPHORE_INITIALIZER (value, pshared); ++ return 0; ++ } ++ ++Index: glibc-2.31/sysdeps/htl/sem-post.c ++=================================================================== ++--- glibc-2.31.orig/sysdeps/htl/sem-post.c +++++ glibc-2.31/sysdeps/htl/sem-post.c ++@@ -19,41 +19,50 @@ ++ #include ++ #include ++ +++#include +++ ++ #include ++ ++ int ++ __sem_post (sem_t *sem) ++ { ++- struct __pthread *wakeup; +++ struct new_sem *isem = (struct new_sem *) sem; +++ int flags = isem->pshared ? GSYNC_SHARED : 0; ++ ++- __pthread_spin_lock (&sem->__lock); ++- if (sem->__value > 0) ++- /* Do a quick up. */ ++- { ++- assert (sem->__queue == NULL); ++- sem->__value++; ++- __pthread_spin_unlock (&sem->__lock); ++- return 0; ++- } +++#if __HAVE_64B_ATOMICS +++ uint64_t d = atomic_load_relaxed (&isem->data); ++ ++- if (sem->__queue == NULL) ++- /* No one waiting. */ +++ do ++ { ++- sem->__value = 1; ++- __pthread_spin_unlock (&sem->__lock); ++- return 0; +++ if ((d & SEM_VALUE_MASK) == SEM_VALUE_MAX) +++ { +++ errno = EOVERFLOW; +++ return -1; +++ } ++ } +++ while (!atomic_compare_exchange_weak_release (&isem->data, &d, d + 1)); ++ ++- /* Wake someone up. */ +++ if ((d >> SEM_NWAITERS_SHIFT) != 0) +++ /* Wake one waiter. */ +++ __lll_wake (((unsigned int *) &isem->data) + SEM_VALUE_OFFSET, flags); +++#else +++ unsigned int v = atomic_load_relaxed (&isem->value); ++ ++- /* First dequeue someone. */ ++- wakeup = sem->__queue; ++- __pthread_dequeue (wakeup); ++- ++- /* Then drop the lock and transfer control. */ ++- __pthread_spin_unlock (&sem->__lock); +++ do +++ { +++ if ((v >> SEM_VALUE_SHIFT) == SEM_VALUE_MAX) +++ { +++ errno = EOVERFLOW; +++ return -1; +++ } +++ } +++ while (!atomic_compare_exchange_weak_release +++ (&isem->value, &v, v + (1 << SEM_VALUE_SHIFT))); ++ ++- __pthread_wakeup (wakeup); +++ if ((v & SEM_NWAITERS_MASK) != 0) +++ /* Wake one waiter. */ +++ __lll_wake (&isem->value, flags); +++#endif ++ ++ return 0; ++ } ++Index: glibc-2.31/sysdeps/htl/sem-trywait.c ++=================================================================== ++--- glibc-2.31.orig/sysdeps/htl/sem-trywait.c +++++ glibc-2.31/sysdeps/htl/sem-trywait.c ++@@ -24,18 +24,13 @@ ++ int ++ __sem_trywait (sem_t *sem) ++ { ++- __pthread_spin_lock (&sem->__lock); ++- if (sem->__value > 0) ++- /* Successful down. */ ++- { ++- sem->__value--; ++- __pthread_spin_unlock (&sem->__lock); ++- return 0; ++- } ++- __pthread_spin_unlock (&sem->__lock); +++ struct new_sem *isem = (struct new_sem *) sem; +++ +++ if (__sem_waitfast (isem, 1) == 0) +++ return 0; ++ ++ errno = EAGAIN; ++ return -1; ++ } ++ ++-strong_alias (__sem_trywait, sem_trywait); +++weak_alias (__sem_trywait, sem_trywait); ++Index: glibc-2.31/sysdeps/htl/sem-timedwait.c ++=================================================================== ++--- glibc-2.31.orig/sysdeps/htl/sem-timedwait.c +++++ glibc-2.31/sysdeps/htl/sem-timedwait.c ++@@ -20,78 +20,180 @@ ++ #include ++ #include ++ #include +++#include +++#include +++#include ++ ++ #include ++ +++#if !__HAVE_64B_ATOMICS +++static void +++__sem_wait_32_finish (struct new_sem *isem); +++#endif +++ +++static void +++__sem_wait_cleanup (void *arg) +++{ +++ struct new_sem *isem = arg; +++ +++#if __HAVE_64B_ATOMICS +++ atomic_fetch_add_relaxed (&isem->data, -((uint64_t) 1 << SEM_NWAITERS_SHIFT)); +++#else +++ __sem_wait_32_finish (isem); +++#endif +++} +++ ++ int ++ __sem_timedwait_internal (sem_t *restrict sem, +++ clockid_t clock_id, ++ const struct timespec *restrict timeout) ++ { ++- error_t err; ++- int drain; ++- struct __pthread *self; ++- clockid_t clock_id = CLOCK_REALTIME; ++- ++- __pthread_spin_lock (&sem->__lock); ++- if (sem->__value > 0) ++- /* Successful down. */ ++- { ++- sem->__value--; ++- __pthread_spin_unlock (&sem->__lock); ++- return 0; ++- } +++ struct new_sem *isem = (struct new_sem *) sem; +++ int err, ret = 0; +++ int flags = isem->pshared ? GSYNC_SHARED : 0; +++ +++ __pthread_testcancel (); +++ +++ if (__sem_waitfast (isem, 0) == 0) +++ return 0; +++ +++ int cancel_oldtype = LIBC_CANCEL_ASYNC(); ++ ++- if (timeout != NULL && ! valid_nanoseconds (timeout->tv_nsec)) +++#if __HAVE_64B_ATOMICS +++ uint64_t d = atomic_fetch_add_relaxed (&sem->data, +++ (uint64_t) 1 << SEM_NWAITERS_SHIFT); +++ +++ pthread_cleanup_push (__sem_wait_cleanup, isem); +++ +++ for (;;) ++ { ++- errno = EINVAL; ++- return -1; +++ if ((d & SEM_VALUE_MASK) == 0) +++ { +++ /* No token, sleep. */ +++ if (timeout) +++ err = __lll_abstimed_wait_intr ( +++ ((unsigned int *) &sem->data) + SEM_VALUE_OFFSET, +++ 0, timeout, flags, clock_id); +++ else +++ err = __lll_wait_intr ( +++ ((unsigned int *) &sem->data) + SEM_VALUE_OFFSET, +++ 0, flags); +++ +++ if (err != 0) +++ { +++ /* Error, interruption or timeout, abort. */ +++ if (err == KERN_TIMEDOUT) +++ err = ETIMEDOUT; +++ if (err == KERN_INTERRUPTED) +++ err = EINTR; +++ ret = __hurd_fail (err); +++ __sem_wait_cleanup (isem); +++ break; +++ } +++ +++ /* Token changed */ +++ d = atomic_load_relaxed (&sem->data); +++ } +++ else +++ { +++ /* Try to acquire and dequeue. */ +++ if (atomic_compare_exchange_weak_acquire (&sem->data, +++ &d, d - 1 - ((uint64_t) 1 << SEM_NWAITERS_SHIFT))) +++ { +++ /* Success */ +++ ret = 0; +++ break; +++ } +++ } ++ } ++ ++- /* Add ourselves to the queue. */ ++- self = _pthread_self (); +++ pthread_cleanup_pop (0); +++#else +++ unsigned int v; +++ +++ atomic_fetch_add_acquire (&isem->nwaiters, 1); ++ ++- __pthread_enqueue (&sem->__queue, self); ++- __pthread_spin_unlock (&sem->__lock); +++ pthread_cleanup_push (__sem_wait_cleanup, isem); ++ ++- /* Block the thread. */ ++- if (timeout != NULL) ++- err = __pthread_timedblock_intr (self, timeout, clock_id); ++- else ++- err = __pthread_block_intr (self); ++- ++- __pthread_spin_lock (&sem->__lock); ++- if (self->prevp == NULL) ++- /* Another thread removed us from the queue, which means a wakeup message ++- has been sent. It was either consumed while we were blocking, or ++- queued after we timed out and before we acquired the semaphore lock, in ++- which case the message queue must be drained. */ ++- drain = err ? 1 : 0; ++- else +++ v = atomic_load_relaxed (&isem->value); +++ do ++ { ++- /* We're still in the queue. Noone attempted to wake us up, i.e. we ++- timed out. */ ++- __pthread_dequeue (self); ++- drain = 0; +++ do +++ { +++ do +++ { +++ if ((v & SEM_NWAITERS_MASK) != 0) +++ break; +++ } +++ while (!atomic_compare_exchange_weak_release (&isem->value, +++ &v, v | SEM_NWAITERS_MASK)); +++ +++ if ((v >> SEM_VALUE_SHIFT) == 0) +++ { +++ /* No token, sleep. */ +++ if (timeout) +++ err = __lll_abstimed_wait_intr (&isem->value, +++ SEM_NWAITERS_MASK, timeout, flags, clock_id); +++ else +++ err = __lll_wait_intr (&isem->value, +++ SEM_NWAITERS_MASK, flags); +++ +++ if (err != 0) +++ { +++ /* Error, interruption or timeout, abort. */ +++ if (err == KERN_TIMEDOUT) +++ err = ETIMEDOUT; +++ if (err == KERN_INTERRUPTED) +++ err = EINTR; +++ ret = __hurd_fail (err); +++ goto error; +++ } +++ +++ /* Token changed */ +++ v = atomic_load_relaxed (&isem->value); +++ } +++ } +++ while ((v >> SEM_VALUE_SHIFT) == 0); ++ } ++- __pthread_spin_unlock (&sem->__lock); +++ while (!atomic_compare_exchange_weak_acquire (&isem->value, +++ &v, v - (1 << SEM_VALUE_SHIFT))); +++ +++error: +++ pthread_cleanup_pop (0); +++ +++ __sem_wait_32_finish (isem); +++#endif ++ ++- if (drain) ++- __pthread_block (self); +++ LIBC_CANCEL_RESET (cancel_oldtype); ++ ++- if (err) +++ return ret; +++} +++ +++#if !__HAVE_64B_ATOMICS +++/* Stop being a registered waiter (non-64b-atomics code only). */ +++static void +++__sem_wait_32_finish (struct new_sem *isem) +++{ +++ unsigned int wguess = atomic_load_relaxed (&isem->nwaiters); +++ if (wguess == 1) +++ atomic_fetch_and_acquire (&isem->value, ~SEM_NWAITERS_MASK); +++ +++ unsigned int wfinal = atomic_fetch_add_release (&isem->nwaiters, -1); +++ if (wfinal > 1 && wguess == 1) ++ { ++- assert (err == ETIMEDOUT || err == EINTR); ++- errno = err; ++- return -1; +++ unsigned int v = atomic_fetch_or_relaxed (&isem->value, +++ SEM_NWAITERS_MASK); +++ v >>= SEM_VALUE_SHIFT; +++ while (v--) +++ __lll_wake (&isem->value, isem->pshared ? GSYNC_SHARED : 0); ++ } ++- ++- return 0; ++ } +++#endif ++ ++ int ++ __sem_timedwait (sem_t *restrict sem, const struct timespec *restrict timeout) ++ { ++- return __sem_timedwait_internal (sem, timeout); +++ return __sem_timedwait_internal (sem, CLOCK_REALTIME, timeout); ++ } ++ ++ weak_alias (__sem_timedwait, sem_timedwait); ++Index: glibc-2.31/sysdeps/htl/sem-wait.c ++=================================================================== ++--- glibc-2.31.orig/sysdeps/htl/sem-wait.c +++++ glibc-2.31/sysdeps/htl/sem-wait.c ++@@ -20,12 +20,13 @@ ++ #include ++ ++ extern int __sem_timedwait_internal (sem_t *restrict sem, +++ clockid_t clock_id, ++ const struct timespec *restrict timeout); ++ ++ int ++ __sem_wait (sem_t *sem) ++ { ++- return __sem_timedwait_internal (sem, 0); +++ return __sem_timedwait_internal (sem, CLOCK_REALTIME, 0); ++ } ++ ++ strong_alias (__sem_wait, sem_wait); ++Index: glibc-2.31/sysdeps/htl/sem-waitfast.c ++=================================================================== ++--- /dev/null +++++ glibc-2.31/sysdeps/htl/sem-waitfast.c ++@@ -0,0 +1,55 @@ +++/* Lock a semaphore if it does not require blocking. Generic version. +++ Copyright (C) 2005-2020 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 +++ . */ +++ +++#include +++#include +++ +++#include +++ +++int +++__sem_waitfast (struct new_sem *isem, int definitive_result) +++{ +++#if __HAVE_64B_ATOMICS +++ uint64_t d = atomic_load_relaxed (&isem->data); +++ +++ do +++ { +++ if ((d & SEM_VALUE_MASK) == 0) +++ break; +++ if (atomic_compare_exchange_weak_acquire (&isem->data, &d, d - 1)) +++ /* Successful down. */ +++ return 0; +++ } +++ while (definitive_result); +++ return -1; +++#else +++ unsigned v = atomic_load_relaxed (&isem->value); +++ +++ do +++ { +++ if ((v >> SEM_VALUE_SHIFT) == 0) +++ break; +++ if (atomic_compare_exchange_weak_acquire (&isem->value, +++ &v, v - (1 << SEM_VALUE_SHIFT))) +++ /* Successful down. */ +++ return 0; +++ } +++ while (definitive_result); +++ return -1; +++#endif +++} diff --cc debian/patches/hurd-i386/git-siginfo_uesp.diff index 000000000,000000000..c102bfcc2 new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/git-siginfo_uesp.diff @@@ -1,0 -1,0 +1,23 @@@ ++Committed for 2.33 ++ ++commit e0aec6c83374286ffac44ee1b0e628894b7102e3 ++Author: Samuel Thibault ++Date: Mon Dec 21 03:15:38 2020 +0100 ++ ++ hurd: Make trampoline fill siginfo ss_sp from sc_uesp ++ ++ Mach actually rather fills the uesp field, not esp. ++ ++diff --git a/sysdeps/mach/hurd/i386/trampoline.c b/sysdeps/mach/hurd/i386/trampoline.c ++index 4a9cab1332..1777d0769d 100644 ++--- a/sysdeps/mach/hurd/i386/trampoline.c +++++ b/sysdeps/mach/hurd/i386/trampoline.c ++@@ -63,7 +63,7 @@ static void fill_ucontext (ucontext_t *uc, const struct sigcontext *sc) ++ uc->uc_flags = 0; ++ uc->uc_link = NULL; ++ uc->uc_sigmask = sc->sc_mask; ++- uc->uc_stack.ss_sp = (__ptr_t) sc->sc_esp; +++ uc->uc_stack.ss_sp = (__ptr_t) sc->sc_uesp; ++ uc->uc_stack.ss_size = 0; ++ uc->uc_stack.ss_flags = 0; ++ diff --cc debian/patches/hurd-i386/git-sigstate_thread_reference.diff index 000000000,000000000..08ac390a0 new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/git-sigstate_thread_reference.diff @@@ -1,0 -1,0 +1,120 @@@ ++Committed for 2.33 ++ ++From: Richard Braun ++Subject: [PATCH] Hurd: make sigstates hold a reference on thread ports ++ ++This change is required in order to correctly release per-thread ++resources. Directly reusing the threading library reference isn't ++possible since the sigstate is also used early in the main thread, ++before threading is initialized. ++ ++* hurd/hurd/signal.h (_hurd_self_sigstate): Drop thread reference after ++calling _hurd_thread_sigstate. ++(_hurd_critical_section_lock): Likewise. ++* hurd/hurdsig.c (_hurd_thread_sigstate): Add a reference on the thread. ++(_hurd_sigstate_delete): Drop thread reference. ++ ++--- ++ hurd/hurd/signal.h | 17 ++++++++++++++--- ++ hurd/hurdsig.c | 17 ++++++++++++++--- ++ 2 files changed, 28 insertions(+), 6 deletions(-) ++ ++--- a/hurd/hurd/signal.h +++++ b/hurd/hurd/signal.h ++@@ -68,7 +68,9 @@ ++ ++ spin_lock_t lock; /* Locks most of the rest of the structure. */ ++ +++ /* The signal state holds a reference on the thread port. */ ++ thread_t thread; +++ ++ struct hurd_sigstate *next; /* Linked-list of thread sigstates. */ ++ ++ sigset_t blocked; /* What signals are blocked. */ ++@@ -122,7 +124,9 @@ ++ ++ extern struct mutex _hurd_siglock; /* Locks _hurd_sigstates. */ ++ ++-/* Get the sigstate of a given thread, taking its lock. */ +++/* Get the sigstate of a given thread. If there was no sigstate for +++ the thread, one is created, and the thread gains a reference. If +++ the given thread is MACH_PORT_NULL, return the global sigstate. */ ++ ++ extern struct hurd_sigstate *_hurd_thread_sigstate (thread_t); ++ ++@@ -165,7 +169,11 @@ ++ _hurd_self_sigstate (void) ++ { ++ if (THREAD_SELF->_hurd_sigstate == NULL) ++- THREAD_SELF->_hurd_sigstate = _hurd_thread_sigstate (__mach_thread_self ()); +++ { +++ thread_t self = __mach_thread_self (); +++ THREAD_SELF->_hurd_sigstate = _hurd_thread_sigstate (self); +++ __mach_port_deallocate (__mach_task_self (), self); +++ } ++ return THREAD_SELF->_hurd_sigstate; ++ } ++ # endif ++@@ -208,11 +216,14 @@ ++ ss = THREAD_SELF->_hurd_sigstate; ++ if (ss == NULL) ++ { +++ thread_t self = __mach_thread_self (); +++ ++ /* The thread variable is unset; this must be the first time we've ++ asked for it. In this case, the critical section flag cannot ++ possible already be set. Look up our sigstate structure the slow ++ way. */ ++- ss = THREAD_SELF->_hurd_sigstate = _hurd_thread_sigstate (__mach_thread_self ()); +++ ss = THREAD_SELF->_hurd_sigstate = _hurd_thread_sigstate (self); +++ __mach_port_deallocate (__mach_task_self (), self); ++ } ++ ++ if (! __spin_try_lock (&ss->critical_section_lock)) ++--- a/hurd/hurdsig.c +++++ b/hurd/hurdsig.c ++@@ -110,6 +110,8 @@ ++ } ++ else ++ { +++ error_t err; +++ ++ /* Use the global actions as a default for new threads. */ ++ struct hurd_sigstate *s = _hurd_global_sigstate; ++ if (s) ++@@ -123,6 +125,11 @@ ++ ++ ss->next = _hurd_sigstates; ++ _hurd_sigstates = ss; +++ +++ err = __mach_port_mod_refs (__mach_task_self (), thread, +++ MACH_PORT_RIGHT_SEND, 1); +++ if (err) +++ __libc_fatal ("hurd: Can't add reference on Mach thread\n"); ++ } ++ } ++ __mutex_unlock (&_hurd_siglock); ++@@ -131,8 +138,7 @@ ++ libc_hidden_def (_hurd_thread_sigstate) ++ ++ /* Destroy a sigstate structure. Called by libpthread just before the ++- * corresponding thread is terminated (the kernel thread port must remain valid ++- * until this function is called.) */ +++ * corresponding thread is terminated. */ ++ void ++ _hurd_sigstate_delete (thread_t thread) ++ { ++@@ -149,7 +155,12 @@ ++ ++ __mutex_unlock (&_hurd_siglock); ++ if (ss) ++- free (ss); +++ { +++ if (ss->thread != MACH_PORT_NULL) +++ __mach_port_deallocate (__mach_task_self (), ss->thread); +++ +++ free (ss); +++ } ++ } ++ ++ /* Make SS a global receiver, with pthread signal semantics. */ diff --cc debian/patches/hurd-i386/git-spin_lock.diff index 000000000,000000000..90024d88f new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/git-spin_lock.diff @@@ -1,0 -1,0 +1,24 @@@ ++Committed for glibc 2.32 ++ ++commit 900778283ac3cfbd274abc55840b5cdae9b7745f ++Author: Samuel Thibault ++Date: Sun Feb 9 16:54:58 2020 +0000 ++ ++ htl: make pthread_spin_lock really spin ++ ++ __spin_lock would actually use gsync_wait to block, which is not what ++ pthread_spin_lock is about. ++ ++diff --git a/sysdeps/mach/htl/bits/spin-lock-inline.h b/sysdeps/mach/htl/bits/spin-lock-inline.h ++index 771292f08f..556bdd4c28 100644 ++--- a/sysdeps/mach/htl/bits/spin-lock-inline.h +++++ b/sysdeps/mach/htl/bits/spin-lock-inline.h ++@@ -67,7 +67,7 @@ __PT_SPIN_INLINE int __pthread_spin_lock (__pthread_spinlock_t *__lock); ++ __PT_SPIN_INLINE int ++ __pthread_spin_lock (__pthread_spinlock_t *__lock) ++ { ++- __spin_lock ((__spin_lock_t *) __lock); +++ __spin_lock_solid ((__spin_lock_t *) __lock); ++ return 0; ++ } ++ diff --cc debian/patches/hurd-i386/git-ss_init.diff index 000000000,000000000..0b728304a new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/git-ss_init.diff @@@ -1,0 -1,0 +1,36 @@@ ++Committed for glibc 2.32 ++ ++commit 61416e19218605a54e94edd9740bbe9d2785af6d ++Author: Samuel Thibault ++Date: Mon May 11 01:30:29 2020 +0200 ++ ++ hurd: Add missing sigstate members initialization ++ ++ * hurd/hurdsig.c (_hurd_thread_sigstate): Initialize ++ critical_section_lock, active_resources, cancel, and cancel_hook fields. ++ ++diff --git a/hurd/hurdsig.c b/hurd/hurdsig.c ++index 1e42246ee6..a2741bb7c8 100644 ++--- a/hurd/hurdsig.c +++++ b/hurd/hurdsig.c ++@@ -85,8 +85,9 @@ _hurd_thread_sigstate (thread_t thread) ++ ss = malloc (sizeof (*ss)); ++ if (ss == NULL) ++ __libc_fatal ("hurd: Can't allocate sigstate\n"); ++- ss->thread = thread; +++ __spin_lock_init (&ss->critical_section_lock); ++ __spin_lock_init (&ss->lock); +++ ss->thread = thread; ++ ++ /* Initialize default state. */ ++ __sigemptyset (&ss->blocked); ++@@ -97,6 +98,9 @@ _hurd_thread_sigstate (thread_t thread) ++ ss->suspended = MACH_PORT_NULL; ++ ss->intr_port = MACH_PORT_NULL; ++ ss->context = NULL; +++ ss->active_resources = NULL; +++ ss->cancel = 0; +++ ss->cancel_hook = NULL; ++ ++ if (thread == MACH_PORT_NULL) ++ { diff --cc debian/patches/hurd-i386/git-strtol-test.diff index 000000000,000000000..2f7e7fc4f new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/git-strtol-test.diff @@@ -1,0 -1,0 +1,47 @@@ ++Committed for glibc 2.32 ++ ++commit 183083c35972611e7786c7ee0c96d7da571631ed ++Author: Carlos O'Donell ++Date: Wed Apr 29 16:31:29 2020 -0400 ++ ++ support: Set errno before testing it. ++ ++ In test-conainer we should set errno to 0 before calling strtol, ++ and check after with TEST_COMPARE. ++ ++ In tst-support_capture_subprocess we should set errno to 0 before ++ checking it after the call to strtol. ++ ++ Tested on x86_64. ++ ++ Reviewed-by: DJ Delorie ++ ++diff --git a/support/test-container.c b/support/test-container.c ++index 08d5195b7e..afc23db148 100644 ++--- a/support/test-container.c +++++ b/support/test-container.c ++@@ -940,7 +940,9 @@ main (int argc, char **argv) ++ else if (nt == 3 && strcmp (the_words[0], "chmod") == 0) ++ { ++ long int m; +++ errno = 0; ++ m = strtol (the_words[1], NULL, 0); +++ TEST_COMPARE (errno, 0); ++ if (chmod (the_words[2], m) < 0) ++ FAIL_EXIT1 ("chmod %s: %s\n", ++ the_words[2], strerror (errno)); ++diff --git a/support/tst-support_capture_subprocess.c b/support/tst-support_capture_subprocess.c ++index 67bbc1e8ae..6094dba49e 100644 ++--- a/support/tst-support_capture_subprocess.c +++++ b/support/tst-support_capture_subprocess.c ++@@ -133,7 +133,9 @@ static int ++ parse_int (const char *str) ++ { ++ char *endptr; ++- long int ret = strtol (str, &endptr, 10); +++ long int ret; +++ errno = 0; +++ ret = strtol (str, &endptr, 10); ++ TEST_COMPARE (errno, 0); ++ TEST_VERIFY (ret >= 0 && ret <= INT_MAX); ++ return ret; diff --cc debian/patches/hurd-i386/git-tiocflush.diff index 000000000,000000000..765d674d1 new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/git-tiocflush.diff @@@ -1,0 -1,0 +1,27 @@@ ++Committed for 2.34 ++ ++commit 36231bee7ab36d59dd121ea85b91411ae86945f3 ++Author: Samuel Thibault ++Date: Mon Feb 1 19:39:48 2021 +0100 ++ ++ hurd TIOCFLUSH: Cope BSD 4.1 semantic ++ ++ BSD 4.1 did not have an argument for TIOCFLUSH, BSD 4.2 added it. There ++ are still a lot of applications out there that pass a NULL argument to ++ TIOCFLUSH, so we should rather cope with it. ++ ++diff --git a/sysdeps/mach/hurd/ioctl.c b/sysdeps/mach/hurd/ioctl.c ++index 662e8ee919..0d5bc176d1 100644 ++--- a/sysdeps/mach/hurd/ioctl.c +++++ b/sysdeps/mach/hurd/ioctl.c ++@@ -113,6 +113,10 @@ __ioctl (int fd, unsigned long int request, ...) ++ /* We don't want to advance ARG since it will be used to copy out ++ too if IOC_OUT is also set. */ ++ void *argptr = arg; +++ int zero = 0; +++ +++ if (request == TIOCFLUSH && !argptr) +++ argptr = &zero; ++ ++ /* Pack an argument into the message buffer. */ ++ void in (unsigned int count, enum __ioctl_datum type) diff --cc debian/patches/hurd-i386/git-trunc-times.diff index 000000000,000000000..fddf0b710 new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/git-trunc-times.diff @@@ -1,0 -1,0 +1,35 @@@ ++Committed for glibc 2.32 ++ ++commit e095db0bc6c53a0b7ac3d915c5feb7678049dc33 ++Author: Samuel Thibault ++Date: Sun Mar 29 19:42:55 2020 +0200 ++ ++ hurd: Make O_TRUNC update mtime/ctime ++ ++ * hurd/lookup-retry.c (__hurd_file_name_lookup_retry): Call ++ __file_utimens after __file_set_size. ++ ++diff --git a/hurd/lookup-retry.c b/hurd/lookup-retry.c ++index c90eda808d..6d8b05e4e6 100644 ++--- a/hurd/lookup-retry.c +++++ b/hurd/lookup-retry.c ++@@ -178,8 +178,17 @@ __hurd_file_name_lookup_retry (error_t (*use_init_port) ++ /* We got a successful translation. Now apply any open-time ++ action flags we were passed. */ ++ ++- if (!err && (flags & O_TRUNC)) /* Asked to truncate the file. */ ++- err = __file_set_size (*result, 0); +++ if (!err && (flags & O_TRUNC)) +++ { +++ /* Asked to truncate the file. */ +++ err = __file_set_size (*result, 0); +++ if (!err) +++ { +++ struct timespec atime = { 0, UTIME_OMIT }; +++ struct timespec mtime = { 0, UTIME_NOW }; +++ __file_utimens (*result, atime, mtime); +++ } +++ } ++ ++ if (err) ++ __mach_port_deallocate (__mach_task_self (), *result); diff --cc debian/patches/hurd-i386/git-tst-udp.diff index 000000000,000000000..4eac6441f new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/git-tst-udp.diff @@@ -1,0 -1,0 +1,85 @@@ ++Committed for glibc 2.32 ++ ++commit cbfc16122e9c4948b3a17224aeb5f8b70f02417d ++Author: Samuel Thibault ++Date: Sat May 16 19:29:50 2020 +0200 ++ ++ sunrpc/tst-udp-*: Fix timeout value ++ ++ Following on 00c3da43a ('sunrpc/tst-udp-timeout: Fix timeout value'). ++ ++ While e.g. 2.5 timeout can be represented exactly with doubles, time stamps ++ may not be represented that exactly, and thus with coarse-grain clocks (e.g. ++ 10ms) we may end up with 2.499-ish values due to rounding errors. ++ ++ * sunrpc/tst-udp-timeout.c (test_udp_server): Add more timeout slack. ++ * sunrpc/tst-udp-nonblocking.c (do_test): Likewise. ++ ++diff --git a/sunrpc/tst-udp-nonblocking.c b/sunrpc/tst-udp-nonblocking.c ++index 189136c9f9..45d6b8919f 100644 ++--- a/sunrpc/tst-udp-nonblocking.c +++++ b/sunrpc/tst-udp-nonblocking.c ++@@ -290,7 +290,7 @@ do_test (void) ++ printf ("info: send/receive took %f seconds\n", ++ after_pings - before_pings); ++ /* Expected timeout is 0.75 seconds. */ ++- TEST_VERIFY (0.75 <= after_pings - before_pings); +++ TEST_VERIFY (0.70 <= after_pings - before_pings); ++ TEST_VERIFY (after_pings - before_pings < 1.2); ++ ++ uint32_t xid; ++diff --git a/sunrpc/tst-udp-timeout.c b/sunrpc/tst-udp-timeout.c ++index 26869f5547..7ca284d84b 100644 ++--- a/sunrpc/tst-udp-timeout.c +++++ b/sunrpc/tst-udp-timeout.c ++@@ -294,10 +294,10 @@ test_udp_server (int port) ++ double after = get_ticks (); ++ if (test_verbose) ++ printf ("info: 21 garbage packets took %f seconds\n", after - before); ++- /* Expected timeout is 0.5 seconds. Add some slack in case process ++- scheduling delays processing the query or response, but do not ++- accept a retry (which would happen at 1.5 seconds). */ ++- TEST_VERIFY (0.5 <= after - before); +++ /* Expected timeout is 0.5 seconds. Add some slack for rounding errors and +++ in case process scheduling delays processing the query or response, but +++ do not accept a retry (which would happen at 1.5 seconds). */ +++ TEST_VERIFY (0.45 <= after - before); ++ TEST_VERIFY (after - before < 1.2); ++ test_call_flush (clnt); ++ ++@@ -316,7 +316,7 @@ test_udp_server (int port) ++ after - before); ++ /* Expected timeout is 1.5 seconds. Do not accept a second retry ++ (which would happen at 3 seconds). */ ++- TEST_VERIFY (1.5 <= after - before); +++ TEST_VERIFY (1.45 <= after - before); ++ TEST_VERIFY (after - before < 2.9); ++ test_call_flush (clnt); ++ ++@@ -331,7 +331,7 @@ test_udp_server (int port) ++ if (test_verbose) ++ printf ("info: 0.75 second timeout took %f seconds\n", ++ after - before); ++- TEST_VERIFY (0.75 <= after - before); +++ TEST_VERIFY (0.70 <= after - before); ++ TEST_VERIFY (after - before < 1.4); ++ test_call_flush (clnt); ++ ++@@ -351,7 +351,7 @@ test_udp_server (int port) ++ printf ("info: test_udp_server: 0.75 second timeout took %f seconds" ++ " (garbage %d)\n", ++ after - before, with_garbage); ++- TEST_VERIFY (0.75 <= after - before); +++ TEST_VERIFY (0.70 <= after - before); ++ TEST_VERIFY (after - before < 1.4); ++ test_call_flush (clnt); ++ ++@@ -369,7 +369,7 @@ test_udp_server (int port) ++ printf ("info: test_udp_server: 2.5 second timeout took %f seconds" ++ " (garbage %d)\n", ++ after - before, with_garbage); ++- TEST_VERIFY (2.5 <= after - before); +++ TEST_VERIFY (2.45 <= after - before); ++ TEST_VERIFY (after - before < 3.0); ++ test_call_flush (clnt); ++ } diff --cc debian/patches/hurd-i386/git-waitid.diff index 000000000,000000000..7acaccf4c new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/git-waitid.diff @@@ -1,0 -1,0 +1,191 @@@ ++Committed for 2.33 ++ ++commit f6abd970284a06380cd9d905f43da104bd49fc95 (HEAD -> master, jolly/master) ++Author: Samuel Thibault ++Date: Mon Dec 28 23:37:04 2020 +0100 ++ ++ hurd: Add WSTOPPED/WCONTINUED/WEXITED/WNOWAIT support [BZ #23091] ++ ++ The new __proc_waitid RPC now expects WEXITED to be passed, allowing to ++ properly implement waitid, and thus define the missing W* macros ++ (according to FreeBSD values). ++ ++Index: glibc-2.31/bits/waitflags.h ++=================================================================== ++--- glibc-2.31.orig/bits/waitflags.h +++++ glibc-2.31/bits/waitflags.h ++@@ -25,3 +25,11 @@ ++ /* 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'. */ +++#if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8 +++# define WSTOPPED WUNTRACED /* Report stopped child. */ +++# define WCONTINUED 4 /* Report continued child. */ +++# define WNOWAIT 8 /* Don't reap, just poll status. */ +++# define WEXITED 16 /* Report dead child. */ +++#endif ++Index: glibc-2.31/sysdeps/mach/hurd/waitid.c ++=================================================================== ++--- /dev/null +++++ glibc-2.31/sysdeps/mach/hurd/waitid.c ++@@ -0,0 +1,124 @@ +++/* Implementation of waitid. Hurd version. +++ Copyright (C) 1997-2020 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Zack Weinberg , 1997. +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public +++ License as published by the Free Software Foundation; either +++ version 2.1 of the License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General Public License 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 +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++int +++__waitid (idtype_t idtype, id_t id, siginfo_t *infop, int options) +++{ +++ struct rusage ignored; +++ error_t err; +++ pid_t pid, child; +++ int sigcode; +++ int status; +++ +++ switch (idtype) +++ { +++ case P_PID: +++ if (id <= 0) +++ goto invalid; +++ pid = (pid_t) id; +++ break; +++ case P_PGID: +++ if (id < 0 || id == 1) +++ goto invalid; +++ pid = (pid_t) -id; +++ break; +++ case P_ALL: +++ pid = -1; +++ break; +++ default: +++ invalid: +++ __set_errno (EINVAL); +++ return -1; +++ } +++ +++ /* Technically we're supposed to return EFAULT if infop is bogus, +++ but that would involve mucking with signals, which is +++ too much hassle. User will have to deal with SIGSEGV/SIGBUS. +++ We just check for a null pointer. */ +++ +++ if (infop == NULL) +++ { +++ __set_errno (EFAULT); +++ return -1; +++ } +++ +++#if HURD_INTERFACE_VERSION >= 20201227 +++ err = __USEPORT (PROC, __proc_waitid (port, pid, options, +++ &status, &sigcode, +++ &ignored, &child)); +++ if (err == MIG_BAD_ID || err == EOPNOTSUPP) +++#endif +++ err = __USEPORT (PROC, __proc_wait (port, pid, options, +++ &status, &sigcode, +++ &ignored, &child)); +++ +++ if (err == EAGAIN) +++ { +++ /* POSIX.1-2008, Technical Corrigendum 1 XSH/TC1-2008/0713 [153] states +++ that if waitid returns because WNOHANG was specified and status is +++ not available for any process specified by idtype and id, then the +++ si_signo and si_pid members of the structure pointed to by infop +++ shall be set to zero. */ +++ infop->si_signo = 0; +++ infop->si_code = 0; +++ return 0; +++ } +++ +++ if (err != 0) +++ return __hurd_fail (err); +++ +++ /* Decode the status field and set infop members... */ +++ infop->si_signo = SIGCHLD; +++ infop->si_pid = child; +++ infop->si_errno = 0; +++ +++ if (WIFEXITED (status)) +++ { +++ infop->si_code = CLD_EXITED; +++ infop->si_status = WEXITSTATUS (status); +++ } +++ else if (WIFSIGNALED (status)) +++ { +++ infop->si_code = WCOREDUMP (status) ? CLD_DUMPED : CLD_KILLED; +++ infop->si_status = WTERMSIG (status); +++ } +++ else if (WIFSTOPPED (status)) +++ { +++ infop->si_code = CLD_STOPPED; +++ infop->si_status = WSTOPSIG (status); +++ } +++ else if (WIFCONTINUED (status)) +++ { +++ infop->si_code = CLD_CONTINUED; +++ infop->si_status = SIGCONT; +++ } +++ +++ return 0; +++} +++weak_alias (__waitid, waitid) +++strong_alias (__waitid, __libc_waitid) ++Index: glibc-2.31/conform/data/sys/wait.h-data ++=================================================================== ++--- glibc-2.31.orig/conform/data/sys/wait.h-data +++++ glibc-2.31/conform/data/sys/wait.h-data ++@@ -8,8 +8,7 @@ constant WUNTRACED ++ ++ macro WEXITSTATUS ++ # if !defined XPG4 && !defined POSIX && !defined POSIX2008 ++-// Bug 23091: hurd: missing waitid support. ++-xfail[i386-gnu]-macro WIFCONTINUED +++macro WIFCONTINUED ++ # endif ++ macro WIFEXITED ++ macro WIFSIGNALED ++@@ -17,15 +16,14 @@ macro WIFSTOPPED ++ macro WSTOPSIG ++ macro WTERMSIG ++ ++-// Bug 23091: hurd: missing waitid support. ++ # if !defined XPG4 && !defined POSIX ++-xfail[i386-gnu]-constant WEXITED ++-xfail[i386-gnu]-constant WSTOPPED +++constant WEXITED +++constant WSTOPPED ++ # ifndef POSIX2008 ++-xfail[i386-gnu]-constant WCONTINUED +++constant WCONTINUED ++ # endif ++ constant WNOHANG ++-xfail[i386-gnu]-constant WNOWAIT +++constant WNOWAIT ++ # endif ++ ++ #if !defined XPG4 && !defined POSIX diff --cc debian/patches/hurd-i386/local-ED.diff index 000000000,000000000..39bf76aa2 new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/local-ED.diff @@@ -1,0 -1,0 +1,29 @@@ ++This is a long funny story, but even if it's standard-compliant, it poses too ++many problems. ++ ++--- ++ sysdeps/mach/hurd/bits/errno.h | 2 ++ ++ 1 file changed, 2 insertions(+) ++ ++--- a/sysdeps/mach/hurd/bits/errno.h +++++ b/sysdeps/mach/hurd/bits/errno.h ++@@ -111,7 +111,9 @@ ++ EILSEQ = 0x4000006a, /* Invalid or incomplete multibyte or wide character */ ++ EBACKGROUND = 0x40000064, /* Inappropriate operation for background process */ ++ EDIED = 0x40000065, /* Translator died */ +++#if 0 ++ ED = 0x40000066, /* ? */ +++#endif ++ EGREGIOUS = 0x40000067, /* You really blew it this time */ ++ EIEIO = 0x40000068, /* Computer bought the farm */ ++ EGRATUITOUS = 0x40000069, /* Gratuitous error */ ++@@ -314,7 +316,9 @@ ++ #define EILSEQ 0x4000006a ++ #define EBACKGROUND 0x40000064 ++ #define EDIED 0x40000065 +++#if 0 ++ #define ED 0x40000066 +++#endif ++ #define EGREGIOUS 0x40000067 ++ #define EIEIO 0x40000068 ++ #define EGRATUITOUS 0x40000069 diff --cc debian/patches/hurd-i386/local-clock_gettime_MONOTONIC.diff index 000000000,000000000..2f05f7e51 new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/local-clock_gettime_MONOTONIC.diff @@@ -1,0 -1,0 +1,84 @@@ ++Use the realtime clock for the monotonic clock. This is of course not a proper ++implementation (which is being done in Mach), but will permit to fix at least ++the iceweasel stack. ++ ++vlc however doesn't build when _POSIX_CLOCK_SELECTION is enabled but ++_POSIX_TIMERS is not, and they refuse to fix that (see #765578), so disable the ++former. ++ ++--- ++ sysdeps/mach/hurd/bits/posix_opt.h | 2 +- ++ sysdeps/unix/clock_gettime.c | 1 + ++ 2 files changed, 2 insertions(+), 1 deletion(-) ++Index: glibc-2.27/sysdeps/mach/clock_gettime.c ++=================================================================== ++--- glibc-2.27.orig/sysdeps/mach/clock_gettime.c +++++ glibc-2.27/sysdeps/mach/clock_gettime.c ++@@ -31,6 +31,10 @@ __clock_gettime (clockid_t clock_id, str ++ switch (clock_id) { ++ ++ case CLOCK_REALTIME: +++ case CLOCK_MONOTONIC: +++ case CLOCK_MONOTONIC_RAW: +++ case CLOCK_REALTIME_COARSE: +++ case CLOCK_MONOTONIC_COARSE: ++ { ++ /* __host_get_time can only fail if passed an invalid host_t. ++ __mach_host_self could theoretically fail (producing an ++Index: glibc-2.27/sysdeps/pthread/timer_create.c ++=================================================================== ++--- glibc-2.27.orig/sysdeps/pthread/timer_create.c +++++ glibc-2.27/sysdeps/pthread/timer_create.c ++@@ -48,7 +48,7 @@ timer_create (clockid_t clock_id, struct ++ return -1; ++ } ++ ++- if (clock_id != CLOCK_REALTIME) +++ if (clock_id != CLOCK_REALTIME && clock_id != CLOCK_MONOTONIC && clock_id != CLOCK_MONOTONIC_RAW && clock_id != CLOCK_REALTIME_COARSE && clock_id != CLOCK_MONOTONIC_COARSE) ++ { ++ __set_errno (EINVAL); ++ return -1; ++Index: glibc-2.27/sysdeps/mach/hurd/bits/posix_opt.h ++=================================================================== ++--- glibc-2.27.orig/sysdeps/mach/hurd/bits/posix_opt.h +++++ glibc-2.27/sysdeps/mach/hurd/bits/posix_opt.h ++@@ -163,10 +163,10 @@ ++ #define _POSIX_THREAD_PROCESS_SHARED -1 ++ ++ /* The monotonic clock might be available. */ ++-#define _POSIX_MONOTONIC_CLOCK 0 +++#define _POSIX_MONOTONIC_CLOCK 200809L ++ ++-/* The clock selection interfaces are available. */ ++-#define _POSIX_CLOCK_SELECTION 200809L +++/* The clock selection interfaces are not really available yet. */ +++#define _POSIX_CLOCK_SELECTION -1 ++ ++ /* Advisory information interfaces could be available in future. */ ++ #define _POSIX_ADVISORY_INFO 0 ++Index: glibc-upstream/sysdeps/posix/clock_getres.c ++=================================================================== ++--- glibc-upstream.orig/sysdeps/posix/clock_getres.c +++++ glibc-upstream/sysdeps/posix/clock_getres.c ++@@ -52,6 +52,10 @@ __clock_getres (clockid_t clock_id, stru ++ switch (clock_id) ++ { ++ case CLOCK_REALTIME: +++ case CLOCK_MONOTONIC: +++ case CLOCK_MONOTONIC_RAW: +++ case CLOCK_REALTIME_COARSE: +++ case CLOCK_MONOTONIC_COARSE: ++ retval = realtime_getres (res); ++ break; ++ ++--- ./sysdeps/mach/clock_nanosleep.c.original 2020-07-21 00:31:35.226113142 +0200 +++++ ./sysdeps/mach/clock_nanosleep.c 2020-07-21 00:31:49.026185761 +0200 ++@@ -62,7 +62,7 @@ ++ __clock_nanosleep (clockid_t clock_id, int flags, const struct timespec *req, ++ struct timespec *rem) ++ { ++- if (clock_id != CLOCK_REALTIME +++ if ((clock_id != CLOCK_REALTIME && clock_id != CLOCK_MONOTONIC && clock_id != CLOCK_MONOTONIC_RAW && clock_id != CLOCK_REALTIME_COARSE && clock_id != CLOCK_MONOTONIC_COARSE) ++ || !valid_nanoseconds (req->tv_nsec) ++ || (flags != 0 && flags != TIMER_ABSTIME)) ++ return EINVAL; diff --cc debian/patches/hurd-i386/local-disable-ioctls.diff index 000000000,000000000..0e8c7170a new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/local-disable-ioctls.diff @@@ -1,0 -1,0 +1,38 @@@ ++struct ortentry and struct ifalias req are actually not defined ++struct arpreq is defined, but can not be passed to an ioctl on the Hurd. ++so let's make packages not believe these are available. ++ ++--- ++ sysdeps/mach/hurd/bits/ioctls.h | 6 ++++++ ++ 1 file changed, 6 insertions(+) ++ ++--- a/sysdeps/mach/hurd/bits/ioctls.h +++++ b/sysdeps/mach/hurd/bits/ioctls.h ++@@ -281,8 +281,10 @@ ++ #define SIOCSPGRP _IOW('s', 8, int) /* set process group */ ++ #define SIOCGPGRP _IOR('s', 9, int) /* get process group */ ++ +++#if 0 ++ #define SIOCADDRT _IOW('r', 10, struct ortentry) /* add route */ ++ #define SIOCDELRT _IOW('r', 11, struct ortentry) /* delete route */ +++#endif ++ ++ #define SIOCSIFADDR _IOW('i', 12, struct ifreq) /* set ifnet address */ ++ #define OSIOCGIFADDR _IOWR('i',13, struct ifreq) /* get ifnet address */ ++@@ -304,12 +306,16 @@ ++ #define SIOCGIFMETRIC _IOWR('i',23, struct ifreq_int) /* get IF metric */ ++ #define SIOCSIFMETRIC _IOW('i',24, struct ifreq_int) /* set IF metric */ ++ #define SIOCDIFADDR _IOW('i',25, struct ifreq) /* delete IF addr */ +++#if 0 ++ #define SIOCAIFADDR _IOW('i',26, struct ifaliasreq) /* add/chg IF alias */ +++#endif ++ +++#if 0 ++ #define SIOCSARP _IOW('i', 30, struct arpreq) /* set arp entry */ ++ #define OSIOCGARP _IOWR('i',31, struct arpreq) /* get arp entry */ ++ #define SIOCGARP _IOWR('i',38, struct arpreq) /* get arp entry */ ++ #define SIOCDARP _IOW('i', 32, struct arpreq) /* delete arp entry */ +++#endif ++ ++ #define SIOCGIFMTU _IOWR('i', 51, struct ifreq_int)/* get IF mtu */ ++ #define SIOCSIFMTU _IOW('i', 52, struct ifreq_int) /* set IF mtu */ diff --cc debian/patches/hurd-i386/local-enable-ldconfig.diff index 000000000,000000000..44348e0e3 new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/local-enable-ldconfig.diff @@@ -1,0 -1,0 +1,44 @@@ ++# DP: Description: Enable ldconfig and such on hurd-i386 ++# DP: Author: Jeff Bailey ++# DP: Related Bugs: #309489 ++# DP: Upstream status: Not submitted ++# DP: Status Details: Upstream disagrees with this patch, but I'm ++# DP: putting it in so that we have expected Debian behaviour on the ++# DP: Hurd. We should review this when the ELF standard supports runpath. ++# DP: Date: 08 Apr 2003 ++ ++--- ++ elf/ldconfig.c | 4 ++++ ++ sysdeps/mach/hurd/configure | 2 ++ ++ sysdeps/mach/hurd/configure.ac | 2 ++ ++ 3 files changed, 8 insertions(+) ++ ++--- a/sysdeps/mach/hurd/configure +++++ b/sysdeps/mach/hurd/configure ++@@ -47,3 +47,5 @@ ++ fi ++ ++ libc_cv_ld_gnu_indirect_function=no +++ +++use_ldconfig=yes ++--- a/sysdeps/mach/hurd/configure.ac +++++ b/sysdeps/mach/hurd/configure.ac ++@@ -30,3 +30,5 @@ ++ dnl ifunc does not work yet for static binaries ++ dnl https://www.gnu.org/software/hurd/open_issues/ifunc.html ++ libc_cv_ld_gnu_indirect_function=no +++ +++use_ldconfig=yes ++--- a/elf/ldconfig.c +++++ b/elf/ldconfig.c ++@@ -59,6 +59,10 @@ ++ ++ #define PACKAGE _libc_intl_domainname ++ +++#ifndef PATH_MAX +++#define PATH_MAX 1024 +++#endif +++ ++ static const struct ++ { ++ const char *name; diff --cc debian/patches/hurd-i386/local-exec_filename.diff index 000000000,000000000..6a844ba6e new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/local-exec_filename.diff @@@ -1,0 -1,0 +1,134 @@@ ++Keep compatibility with experimental implementation ++ ++--- ++ hurd/Makefile | 4 ++-- ++ hurd/Versions | 4 ++++ ++ hurd/hurdexec.c | 29 +++++++++++++++++++++++++++++ ++ sysdeps/mach/hurd/i386/libc.abilist | 1 + ++ sysdeps/mach/hurd/spawni.c | 13 +++++++++++++ ++ 5 files changed, 49 insertions(+), 2 deletions(-) ++ ++--- a/hurd/Makefile +++++ b/hurd/Makefile ++@@ -32,8 +32,8 @@ ++ auth auth_request auth_reply startup \ ++ process process_request \ ++ msg msg_reply msg_request \ ++- exec exec_startup crash interrupt \ ++- fs fsys io io_reply io_request \ +++ exec exec_experimental exec_startup crash interrupt \ +++ fs fs_experimental fsys io io_reply io_request \ ++ term tioctl socket ifsock \ ++ login password pfinet pci \ ++ ) ++--- a/hurd/Versions +++++ b/hurd/Versions ++@@ -123,6 +123,10 @@ ++ # functions used in macros & inline functions ++ __errno_location; ++ } +++ GLIBC_2.21 { +++ # "quasi-internal" functions +++ _hurd_exec_file_name; +++ } ++ GLIBC_2.26 { ++ # "quasi-internal" functions ++ _hurd_exec_paths; ++--- a/hurd/hurdexec.c +++++ b/hurd/hurdexec.c ++@@ -25,9 +25,12 @@ ++ #include ++ #include ++ #include +++#include ++ #include ++ #include ++ +++#include +++ ++ /* Overlay TASK, executing FILE with arguments ARGV and environment ENVP. ++ If TASK == mach_task_self (), some ports are dealloc'd by the exec server. ++ ARGV and ENVP are terminated by NULL pointers. ++@@ -39,6 +42,13 @@ ++ return _hurd_exec_paths (task, file, NULL, NULL, argv, envp); ++ } ++ +++error_t +++__hurd_exec_file_name (task_t task, file_t file, const char *filename, +++ char *const argv[], char *const envp[]) +++{ +++ return _hurd_exec_paths (task, file, filename, filename, argv, envp); +++} +++ ++ link_warning (_hurd_exec, ++ "_hurd_exec is deprecated, use _hurd_exec_paths instead"); ++ ++@@ -393,6 +403,19 @@ ++ /* Fall back for backwards compatibility. This can just be removed ++ when __file_exec goes away. */ ++ if (err == MIG_BAD_ID) +++ err = __file_exec_file_name (file, task, flags, +++ path ? path : "", +++ args, argslen, env, envlen, +++ dtable, MACH_MSG_TYPE_COPY_SEND, dtablesize, +++ ports, MACH_MSG_TYPE_COPY_SEND, +++ _hurd_nports, +++ ints, INIT_INT_MAX, +++ please_dealloc, pdp - please_dealloc, +++ &_hurd_msgport, +++ task == __mach_task_self () ? 1 : 0); +++ /* Fall back for backwards compatibility. This can just be removed +++ when __file_exec goes away. */ +++ if (err == MIG_BAD_ID) ++ err = __file_exec (file, task, flags, ++ args, argslen, env, envlen, ++ dtable, MACH_MSG_TYPE_COPY_SEND, dtablesize, ++@@ -436,3 +459,9 @@ ++ return err; ++ } ++ libc_hidden_def (_hurd_exec_paths) +++extern error_t _hurd_exec_file_name (task_t task, +++ file_t file, +++ const char *filename, +++ char *const argv[], +++ char *const envp[]); +++versioned_symbol (libc, __hurd_exec_file_name, _hurd_exec_file_name, GLIBC_2_21); ++--- a/sysdeps/mach/hurd/spawni.c +++++ b/sysdeps/mach/hurd/spawni.c ++@@ -30,6 +30,7 @@ ++ #include ++ #include ++ #include +++#include ++ #include ++ #include ++ #include "spawn_int.h" ++@@ -770,6 +771,18 @@ ++ dtable, MACH_MSG_TYPE_COPY_SEND, dtablesize, ++ ports, MACH_MSG_TYPE_COPY_SEND, _hurd_nports, ++ ints, INIT_INT_MAX, +++ NULL, 0, NULL, 0); +++ +++ /* Fallback for backwards compatibility. This can just be removed +++ when __file_exec goes away. */ +++ if (err == MIG_BAD_ID) +++ err = __file_exec_file_name +++ (file, task, +++ __sigismember (&_hurdsig_traced, SIGKILL) ? EXEC_SIGTRAP : 0, +++ relpath, args, argslen, env, envlen, +++ dtable, MACH_MSG_TYPE_COPY_SEND, dtablesize, +++ ports, MACH_MSG_TYPE_COPY_SEND, _hurd_nports, +++ ints, INIT_INT_MAX, ++ NULL, 0, NULL, 0); ++ ++ /* Fallback for backwards compatibility. This can just be removed ++--- a/sysdeps/mach/hurd/i386/libc.abilist +++++ b/sysdeps/mach/hurd/i386/libc.abilist ++@@ -1947,6 +1947,7 @@ ++ GLIBC_2.2.6 xprt_unregister F ++ GLIBC_2.21 __mach_host_self_ D 0x4 ++ GLIBC_2.21 __pthread_get_cleanup_stack F +++GLIBC_2.21 _hurd_exec_file_name F ++ GLIBC_2.21 mach_print F ++ GLIBC_2.21 pthread_attr_destroy F ++ GLIBC_2.21 pthread_attr_getdetachstate F diff --cc debian/patches/hurd-i386/local-fix-nss.diff index 000000000,000000000..8b1393da8 new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/local-fix-nss.diff @@@ -1,0 -1,0 +1,45 @@@ ++TODO: ++make the Makefile part newns-support-specific ++make the main Makefile put tests-container in unsupported tests when newns is not supported. ++ ++Index: glibc-2.29/nss/tst-nss-test3.c ++=================================================================== ++--- glibc-2.29.orig/nss/tst-nss-test3.c +++++ glibc-2.29/nss/tst-nss-test3.c ++@@ -16,6 +16,7 @@ ++ License along with the GNU C Library; if not, see ++ . */ ++ +++#include ++ #include ++ #include ++ #include ++@@ -107,11 +108,15 @@ do_test (void) ++ int i; ++ struct group *g = NULL; ++ +++#ifndef CLONE_NEWNS +++ __nss_configure_lookup ("group", "test1"); +++#else ++ /* Previously we used __nss_configure_lookup to isolate the test ++ from the host environment and to get it to lookup from our new ++ test1 NSS service module, but now this test is run in a different ++ root filesystem via the test-container support and we directly ++ configure the use of the test1 NSS service. */ +++#endif ++ ++ setgrent (); ++ ++Index: glibc-2.29/nss/Makefile ++=================================================================== ++--- glibc-2.29.orig/nss/Makefile +++++ glibc-2.29/nss/Makefile ++@@ -59,7 +59,7 @@ tests = test-netdb test-digits-dots ts ++ tst-nss-test5 ++ xtests = bug-erange ++ ++-tests-container = \ +++tests += \ ++ tst-nss-test3 \ ++ tst-nss-files-hosts-long \ ++ tst-nss-db-endpwent \ diff --cc debian/patches/hurd-i386/local-mach_print.diff index 000000000,000000000..76172bc3a new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/local-mach_print.diff @@@ -1,0 -1,0 +1,24 @@@ ++TODO: glibc 2.32 will provide it. Once it is uploaded, rebuild binaries ++which might be referencing the 2.21-versioned symbol, and drop this ++patch. ++ ++--- a/mach/Versions +++++ b/mach/Versions ++@@ -57,6 +57,7 @@ ++ } ++ GLIBC_2.21 { ++ __mach_host_self_; +++ mach_print; ++ } ++ ++ HURD_CTHREADS_0.3 { ++--- a/sysdeps/mach/hurd/i386/libc.abilist +++++ b/sysdeps/mach/hurd/i386/libc.abilist ++@@ -1947,6 +1947,7 @@ ++ GLIBC_2.2.6 xprt_unregister F ++ GLIBC_2.21 __mach_host_self_ D 0x4 ++ GLIBC_2.21 __pthread_get_cleanup_stack F +++GLIBC_2.21 mach_print F ++ GLIBC_2.21 pthread_attr_destroy F ++ GLIBC_2.21 pthread_attr_getdetachstate F ++ GLIBC_2.21 pthread_attr_getinheritsched F diff --cc debian/patches/hurd-i386/local-madvise_warn.diff index 000000000,000000000..d0fad6d6c new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/local-madvise_warn.diff @@@ -1,0 -1,0 +1,19 @@@ ++Do not warn about madvise not being implemented. It does not have any real ++semantic anyway, and that brings some -Werror FTBFS. ++ ++--- a/misc/madvise.c +++++ b/misc/madvise.c ++@@ -32,4 +32,4 @@ __madvise (void *addr, size_t len, int a ++ libc_hidden_def (__madvise) ++ weak_alias (__madvise, madvise) ++ ++-stub_warning (madvise) +++/* stub_warning (madvise) */ ++--- a/posix/posix_madvise.c +++++ b/posix/posix_madvise.c ++@@ -27,4 +27,4 @@ posix_madvise (__ptr_t addr, size_t len, ++ { ++ return ENOSYS; ++ } ++-stub_warning (posix_madvise) +++/* stub_warning (posix_madvise) */ diff --cc debian/patches/hurd-i386/local-no-bootstrap-fs-access.diff index 000000000,000000000..8379eaa1b new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/local-no-bootstrap-fs-access.diff @@@ -1,0 -1,0 +1,21 @@@ ++Calling access at process boot is deemed to fail for the root filesystem ++process. hurd-i386 doesn't use hwcap yet, so it is harmless to disable testing ++for /etc/ld.so.nohwcap. ++ ++TODO: find a process-startup-working way to detect root filesystem case. ++ ++--- ++ dl-hwcaps.c | 2 +- ++ 1 file changed, 1 insertion(+), 1 deletion(-) ++ ++--- a/elf/dl-hwcaps.c.original 2013-07-01 00:02:55.000000000 +0200 +++++ b/elf/dl-hwcaps.c 2013-07-01 00:02:56.000000000 +0200 ++@@ -102,7 +102,7 @@ ++ ++cnt; ++ ++ #ifdef NEED_LD_SO_NOHWCAP ++- if (__access_noerrno ("/etc/ld.so.nohwcap", F_OK) == 0) +++ if (0 && __access_noerrno ("/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)); diff --cc debian/patches/hurd-i386/local-no_unsupported_ioctls.diff index 000000000,000000000..f7df62f67 new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/local-no_unsupported_ioctls.diff @@@ -1,0 -1,0 +1,51 @@@ ++These ioctls are not actually supported (and will probably not be in the ++close future), and are not available on Linux either, so don't expose ++them to application at the risk of them complaining that they don't work ++(e.g. xterm using TIOCLSET). ++ ++--- ++ sysdeps/mach/hurd/bits/ioctls.h | 6 ++++++ ++ 1 file changed, 6 insertions(+) ++ ++--- a/sysdeps/mach/hurd/bits/ioctls.h +++++ b/sysdeps/mach/hurd/bits/ioctls.h ++@@ -272,11 +272,13 @@ enum __ioctl_datum { IOC_8, IOC_16, IOC_ ++ #define FIOSETOWN _IOW('f', 124, int) /* set owner */ ++ #define FIOGETOWN _IOR('f', 123, int) /* get owner */ ++ +++#if 0 ++ /* socket i/o controls */ ++ #define SIOCSHIWAT _IOW('s', 0, int) /* set high watermark */ ++ #define SIOCGHIWAT _IOR('s', 1, int) /* get high watermark */ ++ #define SIOCSLOWAT _IOW('s', 2, int) /* set low watermark */ ++ #define SIOCGLOWAT _IOR('s', 3, int) /* get low watermark */ +++#endif ++ #define SIOCATMARK _IOR('s', 7, int) /* at oob mark? */ ++ #define SIOCSPGRP _IOW('s', 8, int) /* set process group */ ++ #define SIOCGPGRP _IOR('s', 9, int) /* get process group */ ++@@ -336,7 +338,9 @@ enum __ioctl_datum { IOC_8, IOC_16, IOC_ ++ # define OTIOCGETD _IOR('t', 0, int) /* get line discipline */ ++ # define OTIOCSETD _IOW('t', 1, int) /* set line discipline */ ++ #endif +++#if 0 ++ #define TIOCHPCL _IO('t', 2) /* hang up on last close */ +++#endif ++ #define TIOCGETP _IOR('t', 8,struct sgttyb)/* get parameters -- gtty */ ++ #define TIOCSETP _IOW('t', 9,struct sgttyb)/* set parameters -- stty */ ++ #define TIOCSETN _IOW('t',10,struct sgttyb)/* as above, but no flushtty*/ ++@@ -389,6 +393,7 @@ enum __ioctl_datum { IOC_8, IOC_16, IOC_ ++ #define PENDIN 0x20000000 /* tp->t_rawq needs reread */ ++ #define DECCTQ 0x40000000 /* only ^Q starts after ^S */ ++ #define NOFLSH 0x80000000 /* no output flush on signal */ +++#if 0 ++ #define TIOCLBIS _IOW('t', 127, int) /* bis local mode bits */ ++ #define TIOCLBIC _IOW('t', 126, int) /* bic local mode bits */ ++ #define TIOCLSET _IOW('t', 125, int) /* set entire local mode word */ ++@@ -414,6 +419,7 @@ enum __ioctl_datum { IOC_8, IOC_16, IOC_ ++ #define OTTYDISC 0 ++ #define NETLDISC 1 ++ #define NTTYDISC 2 +++#endif ++ ++ /* From 4.4 . */ ++ #ifdef USE_OLD_TTY diff --cc debian/patches/hurd-i386/local-tls-ie-align.diff index 000000000,000000000..41f1ceb92 new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/local-tls-ie-align.diff @@@ -1,0 -1,0 +1,29 @@@ ++The elf/tst-tls-ie* tests try to load modules with 8-byte-aligned TLS data that ++will get allocated in the static TLS area, so we need at least 8-byte alignment. ++8-byte alignment requirement is not that uncommon on i386 anyway. ++ ++And upstream happens to have 32-byte alignment from ++0c76fc3c2b34 ('Linux: Perform rseq registration at C startup and thread ++creation') which just rounds up max_align to 32 anyway. ++ ++Index: glibc-2.31/sysdeps/mach/hurd/tls.h ++=================================================================== ++--- glibc-2.31.orig/sysdeps/mach/hurd/tls.h +++++ glibc-2.31/sysdeps/mach/hurd/tls.h ++@@ -25,6 +25,7 @@ ++ # include ++ # include ++ # include +++# include ++ # include ++ # include ++ # include ++@@ -34,7 +35,7 @@ ++ # 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 MAX(__alignof__ (tcbhead_t), 8) ++ ++ /* This is the size of the TCB. */ ++ # define TLS_TCB_SIZE TLS_INIT_TCB_SIZE /* XXX */ diff --cc debian/patches/hurd-i386/local-usr.diff index 000000000,000000000..063d8ce30 new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/local-usr.diff @@@ -1,0 -1,0 +1,15 @@@ ++Upstream uses prefix= while we use prefix=/usr ++ ++Index: glibc-2.27/sysdeps/mach/hurd/i386/libc.abilist ++=================================================================== ++--- glibc-2.27.orig/sysdeps/mach/hurd/i386/libc.abilist +++++ glibc-2.27/sysdeps/mach/hurd/i386/libc.abilist ++@@ -641,7 +641,7 @@ GLIBC_2.2.6 _libc_intl_domainname D 0x5 ++ GLIBC_2.2.6 _longjmp F ++ GLIBC_2.2.6 _mcleanup F ++ GLIBC_2.2.6 _mcount F ++-GLIBC_2.2.6 _nl_default_dirname D 0xe +++GLIBC_2.2.6 _nl_default_dirname D 0x12 ++ GLIBC_2.2.6 _nl_domain_bindings D 0x4 ++ GLIBC_2.2.6 _nl_msg_cat_cntr D 0x4 ++ GLIBC_2.2.6 _null_auth D 0xc diff --cc debian/patches/hurd-i386/submitted-AF_LINK.diff index 000000000,000000000..e95a987db new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/submitted-AF_LINK.diff @@@ -1,0 -1,0 +1,29 @@@ ++Hurd: comment PF_LINK/AF_LINK defines ++ ++Comment out the PF_LINK and AF_LINK defines, since they are usually associated ++with struct sockaddr_dl, which is not available on Hurd. ++ ++2012-06-22 Pino Toscano ++ ++ * sysdeps/mach/hurd/bits/socket.h (PF_LINK): Comment out. ++ (AF_LINK): Likewise. ++--- a/sysdeps/mach/hurd/bits/socket.h +++++ b/sysdeps/mach/hurd/bits/socket.h ++@@ -97,7 +97,7 @@ enum __socket_type ++ #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_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. */ ++@@ -130,7 +130,7 @@ enum __socket_type ++ #define AF_HYLINK PF_HYLINK ++ #define AF_APPLETALK PF_APPLETALK ++ #define AF_ROUTE PF_ROUTE ++-#define AF_LINK PF_LINK +++/* #define AF_LINK PF_LINK */ ++ #ifdef __USE_MISC ++ # define pseudo_AF_XTP PF_XTP ++ #endif diff --cc debian/patches/hurd-i386/submitted-bind_umask2.diff index 000000000,000000000..190085c48 new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/submitted-bind_umask2.diff @@@ -1,0 -1,0 +1,50 @@@ ++2014-08-27 Samuel Thibault ++ ++ Fix bind when umask is e.g. 0777. ++ ++ * sysdeps/mach/hurd/bind.c (__bind): Pass mode 0666 to __dir_mkfile ++ instead of final mode, so that call __ifsock_getsockaddr can always ++ succeed, before calling __file_chmod to fix the mode according to umask, ++ before calling __dir_link to show the file. ++ ++Part of the original fix was committed, the other hasn't been yet, see Roland's ++"Harumph" reply to ++https://sourceware.org/ml/libc-alpha/2014-08/msg00408.html ++ ++--- ++ bind.c | 17 +++++++++++------ ++ 1 file changed, 11 insertions(+), 6 deletions(-) ++ ++--- a/sysdeps/mach/hurd/bind.c +++++ b/sysdeps/mach/hurd/bind.c ++@@ -48,7 +48,7 @@ __bind (int fd, __CONST_SOCKADDR_ARG ad ++ return -1; ++ ++ /* Create a new, unlinked node in the target directory. */ ++- err = __dir_mkfile (dir, O_CREAT, 0666 & ~_hurd_umask, &node); +++ err = __dir_mkfile (dir, O_CREAT, 0666, &node); ++ ++ if (! err) ++ { ++@@ -76,11 +76,16 @@ __bind (int fd, __CONST_SOCKADDR_ARG ad ++ err = EGRATUITOUS; ++ if (! err) ++ { ++- /* Link the node, now a socket with proper mode, into the ++- target directory. */ ++- err = __dir_link (dir, node, n, 1); ++- if (err == EEXIST) ++- err = EADDRINUSE; +++ /* Fix the access mode before showing the file. */ +++ err = __file_chmod (node, 0666 & ~_hurd_umask); +++ if (! err) +++ { +++ /* Link the node, now a socket with proper mode, into the +++ target directory. */ +++ err = __dir_link (dir, node, n, 1); +++ if (err == EEXIST) +++ err = EADDRINUSE; +++ } ++ if (err) ++ __mach_port_deallocate (__mach_task_self (), aport); ++ } diff --cc debian/patches/hurd-i386/submitted-net.diff index 000000000,000000000..9c6cd8511 new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/submitted-net.diff @@@ -1,0 -1,0 +1,2140 @@@ ++http://sourceware.org/ml/libc-alpha/2009-01/msg00026.html ++ ++Note: disabled on !hurd, because it breaks kfreebsd, as it hides their ++ ++ ++commit b4da06a7e200d0cf8d132a83852e473b7795f691 ++Author: Samuel Thibault ++Date: Sun Jan 10 23:55:28 2010 +0100 ++ ++ Factorize ethernet,if_arp,if_ether,if_ppp,route.h ++ ++ 2010-01-10 Samuel Thibault ++ ++ * sysdeps/mach/hurd/Makefile (sysdep_headers) [subdir=socket]: ++ Remove net/ethernet.h net/if_arp.h net/if_ether.h net/if_ppp.h ++ net/route.h. ++ * sysdeps/gnu/Makefile (sysdep_headers) [subdir=socket]: ++ Add net/ethernet.h net/if_arp.h net/if_ether.h net/if_ppp.h ++ net/route.h. ++ * sysdeps/unix/sysv/linux/Makefile (sysdep_headers) ++ [subdir=socket]: Remove net/ethernet.h net/if_arp.h net/if_ppp.h ++ net/route.h ++ ++ * sysdeps/mach/hurd/net/ethernet.h: Remove file. ++ * sysdeps/unix/sysv/linux/net/ethernet.h: Move file to... ++ * sysdeps/gnu/net/ethernet.h: ... this, and include ++ instead of . ++ ++ * sysdeps/mach/hurd/net/if_ether.h: Move file to... ++ * sysdeps/gnu/net/if_ether.h: ... this. ++ (ETH_FCS_LEN,ETH_P_PUPAT,ETH_P_IEEEPUP,ETH_P_IEEEPUPAT, ++ ETH_P_8021Q,ETH_P_PAUSE,ETH_P_SLOW,ETH_P_WCCP,ETH_P_PPP_DISC, ++ ETH_P_PPP_SES,ETH_P_MPLS_UC,ETH_P_MPLS_MC,ETH_P_ATMMPOA, ++ ETH_P_ATMFATE,ETH_P_PAE,ETH_P_AOE,ETH_P_TIPC,ETH_P_FCOE, ++ ETH_P_EDSA,ETH_P_CAN,ETH_P_MOBITEX,ETH_P_CONTROL,ETH_P_IRDA, ++ ETH_P_ECONET,ETH_P_HDLC,ETH_P_ARCNET,ETH_P_DSA,ETH_P_TRAILER, ++ ETH_P_PHONET): New macros. ++ (ETH_P_ECHO): Remove macro. ++ (ETH_P_PUP): Change value from 0x0400 to 0x0200. ++ (struct ethhdr): Add packed attribute. ++ * sysdeps/unix/sysv/linux/net/if_ether.h: New file, includes ++ . ++ ++ * sysdeps/unix/sysv/linux/net/if_arp.h: Move file to... ++ * sysdeps/gnu/net/if_arp.h: ... this. ++ * sysdeps/mach/hurd/net/if_arp.h: Remove file. ++ ++ * sysdeps/unix/sysv/linux/net/if_ppp.h: Move file to... ++ * sysdeps/gnu/net/if_ppp.h: ... this. ++ * sysdeps/mach/hurd/net/if_ppp.h: Remove file. ++ ++ * sysdeps/unix/sysv/linux/net/route.h: Move file to... ++ * sysdeps/gnu/net/route.h: ... this. ++ * sysdeps/mach/hurd/net/route.h: Remove file. ++ ++No topgit branch, TODO? ++ ++--- ++ sysdeps/gnu/Makefile | 5 ++ sysdeps/gnu/net/ethernet.h | 84 +++++++++++++ ++ sysdeps/gnu/net/if_arp.h | 184 +++++++++++++++++++++++++++++ ++ sysdeps/gnu/net/if_ether.h | 116 ++++++++++++++++++ ++ sysdeps/gnu/net/if_ppp.h | 169 ++++++++++++++++++++++++++ ++ sysdeps/gnu/net/route.h | 145 ++++++++++++++++++++++ ++ sysdeps/gnu/netinet/if_ether.h | 104 ++++++++++++++++ ++ sysdeps/mach/hurd/Makefile | 5 ++ sysdeps/mach/hurd/net/ethernet.h | 76 ----------- ++ sysdeps/mach/hurd/net/if_arp.h | 145 ---------------------- ++ sysdeps/mach/hurd/net/if_ether.h | 85 ------------- ++ sysdeps/mach/hurd/net/if_ppp.h | 169 -------------------------- ++ sysdeps/mach/hurd/net/route.h | 141 ---------------------- ++ sysdeps/unix/sysv/linux/Makefile | 3 ++ sysdeps/unix/sysv/linux/net/ethernet.h | 84 ------------- ++ sysdeps/unix/sysv/linux/net/if_arp.h | 184 ----------------------------- ++ sysdeps/unix/sysv/linux/net/if_ether.h | 7 + ++ sysdeps/unix/sysv/linux/net/if_ppp.h | 169 -------------------------- ++ sysdeps/unix/sysv/linux/net/route.h | 145 ---------------------- ++ sysdeps/unix/sysv/linux/netinet/if_ether.h | 105 ---------------- ++ 20 files changed, 815 insertions(+), 1310 deletions(-) ++ ++Index: glibc-2.27/sysdeps/gnu/Makefile ++=================================================================== ++--- glibc-2.27.orig/sysdeps/gnu/Makefile +++++ glibc-2.27/sysdeps/gnu/Makefile ++@@ -87,3 +87,8 @@ librt-sysdep_routines += rt-unwind-resum ++ librt-shared-only-routines += rt-unwind-resume ++ CFLAGS-rt-unwind-resume.c += -fexceptions -fasynchronous-unwind-tables ++ endif +++ +++ifeq ($(subdir),socket) +++sysdep_headers += net/ethernet.h net/if_arp.h net/if_ether.h \ +++ net/route.h +++endif ++Index: glibc-2.27/sysdeps/gnu/net/ethernet.h ++=================================================================== ++--- /dev/null +++++ glibc-2.27/sysdeps/gnu/net/ethernet.h ++@@ -0,0 +1,84 @@ +++/* Copyright (C) 1997-2020 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 +++ . */ +++ +++/* 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 +++#include +++ +++#include /* IEEE 802.3 Ethernet constants */ +++ +++__BEGIN_DECLS +++ +++/* This is a name for the 48 bit ethernet address available on many +++ systems. */ +++struct ether_addr +++{ +++ uint8_t ether_addr_octet[ETH_ALEN]; +++} __attribute__ ((__packed__)); +++ +++/* 10Mb/s ethernet header */ +++struct ether_header +++{ +++ uint8_t ether_dhost[ETH_ALEN]; /* destination eth addr */ +++ uint8_t ether_shost[ETH_ALEN]; /* source ether addr */ +++ uint16_t ether_type; /* packet type ID field */ +++} __attribute__ ((__packed__)); +++ +++/* Ethernet protocol ID's */ +++#define ETHERTYPE_PUP 0x0200 /* Xerox PUP */ +++#define ETHERTYPE_SPRITE 0x0500 /* Sprite */ +++#define ETHERTYPE_IP 0x0800 /* IP */ +++#define ETHERTYPE_ARP 0x0806 /* Address resolution */ +++#define ETHERTYPE_REVARP 0x8035 /* Reverse ARP */ +++#define ETHERTYPE_AT 0x809B /* AppleTalk protocol */ +++#define ETHERTYPE_AARP 0x80F3 /* AppleTalk ARP */ +++#define ETHERTYPE_VLAN 0x8100 /* IEEE 802.1Q VLAN tagging */ +++#define ETHERTYPE_IPX 0x8137 /* IPX */ +++#define ETHERTYPE_IPV6 0x86dd /* IP protocol version 6 */ +++#define ETHERTYPE_LOOPBACK 0x9000 /* used to test interfaces */ +++ +++ +++#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 */ ++Index: glibc-2.27/sysdeps/gnu/net/if_arp.h ++=================================================================== ++--- /dev/null +++++ glibc-2.27/sysdeps/gnu/net/if_arp.h ++@@ -0,0 +1,183 @@ +++/* Definitions for Address Resolution Protocol. +++ Copyright (C) 1997-2020 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 1997. +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public +++ License as published by the Free Software Foundation; either +++ version 2.1 of the License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General Public License 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 +++ . */ +++ +++/* Based on the 4.4BSD and Linux version of this file. */ +++ +++#ifndef _NET_IF_ARP_H +++#define _NET_IF_ARP_H 1 +++ +++#include +++#include +++#include +++ +++__BEGIN_DECLS +++ +++/* Some internals from deep down in the kernel. */ +++#define MAX_ADDR_LEN 7 +++ +++ +++/* This structure defines an ethernet arp header. */ +++ +++/* ARP protocol opcodes. */ +++#define ARPOP_REQUEST 1 /* ARP request. */ +++#define ARPOP_REPLY 2 /* ARP reply. */ +++#define ARPOP_RREQUEST 3 /* RARP request. */ +++#define ARPOP_RREPLY 4 /* RARP reply. */ +++#define ARPOP_InREQUEST 8 /* InARP request. */ +++#define ARPOP_InREPLY 9 /* InARP reply. */ +++#define ARPOP_NAK 10 /* (ATM)ARP NAK. */ +++ +++/* See RFC 826 for protocol description. ARP packets are variable +++ in size; the arphdr structure defines the fixed-length portion. +++ Protocol type values are the same as those for 10 Mb/s Ethernet. +++ It is followed by the variable-sized fields ar_sha, arp_spa, +++ arp_tha and arp_tpa in that order, according to the lengths +++ specified. Field names used correspond to RFC 826. */ +++ +++struct arphdr +++ { +++ unsigned short int ar_hrd; /* Format of hardware address. */ +++ unsigned short int ar_pro; /* Format of protocol address. */ +++ unsigned char ar_hln; /* Length of hardware address. */ +++ unsigned char ar_pln; /* Length of protocol address. */ +++ unsigned short int ar_op; /* ARP opcode (command). */ +++#if 0 +++ /* Ethernet looks like this : This bit is variable sized +++ however... */ +++ unsigned char __ar_sha[ETH_ALEN]; /* Sender hardware address. */ +++ unsigned char __ar_sip[4]; /* Sender IP address. */ +++ unsigned char __ar_tha[ETH_ALEN]; /* Target hardware address. */ +++ unsigned char __ar_tip[4]; /* Target IP address. */ +++#endif +++ }; +++ +++ +++/* ARP protocol HARDWARE identifiers. */ +++#define ARPHRD_NETROM 0 /* From KA9Q: NET/ROM pseudo. */ +++#define ARPHRD_ETHER 1 /* Ethernet 10/100Mbps. */ +++#define ARPHRD_EETHER 2 /* Experimental Ethernet. */ +++#define ARPHRD_AX25 3 /* AX.25 Level 2. */ +++#define ARPHRD_PRONET 4 /* PROnet token ring. */ +++#define ARPHRD_CHAOS 5 /* Chaosnet. */ +++#define ARPHRD_IEEE802 6 /* IEEE 802.2 Ethernet/TR/TB. */ +++#define ARPHRD_ARCNET 7 /* ARCnet. */ +++#define ARPHRD_APPLETLK 8 /* APPLEtalk. */ +++#define ARPHRD_DLCI 15 /* Frame Relay DLCI. */ +++#define ARPHRD_ATM 19 /* ATM. */ +++#define ARPHRD_METRICOM 23 /* Metricom STRIP (new IANA id). */ +++#define ARPHRD_IEEE1394 24 /* IEEE 1394 IPv4 - RFC 2734. */ +++#define ARPHRD_EUI64 27 /* EUI-64. */ +++#define ARPHRD_INFINIBAND 32 /* InfiniBand. */ +++ +++/* Dummy types for non ARP hardware */ +++#define ARPHRD_SLIP 256 +++#define ARPHRD_CSLIP 257 +++#define ARPHRD_SLIP6 258 +++#define ARPHRD_CSLIP6 259 +++#define ARPHRD_RSRVD 260 /* Notional KISS type. */ +++#define ARPHRD_ADAPT 264 +++#define ARPHRD_ROSE 270 +++#define ARPHRD_X25 271 /* CCITT X.25. */ +++#define ARPHRD_HWX25 272 /* Boards with X.25 in firmware. */ +++#define ARPHRD_PPP 512 +++#define ARPHRD_CISCO 513 /* Cisco HDLC. */ +++#define ARPHRD_HDLC ARPHRD_CISCO +++#define ARPHRD_LAPB 516 /* LAPB. */ +++#define ARPHRD_DDCMP 517 /* Digital's DDCMP. */ +++#define ARPHRD_RAWHDLC 518 /* Raw HDLC. */ +++#define ARPHRD_RAWIP 519 /* Raw IP. */ +++ +++#define ARPHRD_TUNNEL 768 /* IPIP tunnel. */ +++#define ARPHRD_TUNNEL6 769 /* IPIP6 tunnel. */ +++#define ARPHRD_FRAD 770 /* Frame Relay Access Device. */ +++#define ARPHRD_SKIP 771 /* SKIP vif. */ +++#define ARPHRD_LOOPBACK 772 /* Loopback device. */ +++#define ARPHRD_LOCALTLK 773 /* Localtalk device. */ +++#define ARPHRD_FDDI 774 /* Fiber Distributed Data Interface. */ +++#define ARPHRD_BIF 775 /* AP1000 BIF. */ +++#define ARPHRD_SIT 776 /* sit0 device - IPv6-in-IPv4. */ +++#define ARPHRD_IPDDP 777 /* IP-in-DDP tunnel. */ +++#define ARPHRD_IPGRE 778 /* GRE over IP. */ +++#define ARPHRD_PIMREG 779 /* PIMSM register interface. */ +++#define ARPHRD_HIPPI 780 /* High Performance Parallel I'face. */ +++#define ARPHRD_ASH 781 /* (Nexus Electronics) Ash. */ +++#define ARPHRD_ECONET 782 /* Acorn Econet. */ +++#define ARPHRD_IRDA 783 /* Linux-IrDA. */ +++#define ARPHRD_FCPP 784 /* Point to point fibrechanel. */ +++#define ARPHRD_FCAL 785 /* Fibrechanel arbitrated loop. */ +++#define ARPHRD_FCPL 786 /* Fibrechanel public loop. */ +++#define ARPHRD_FCFABRIC 787 /* Fibrechanel fabric. */ +++#define ARPHRD_IEEE802_TR 800 /* Magic type ident for TR. */ +++#define ARPHRD_IEEE80211 801 /* IEEE 802.11. */ +++#define ARPHRD_IEEE80211_PRISM 802 /* IEEE 802.11 + Prism2 header. */ +++#define ARPHRD_IEEE80211_RADIOTAP 803 /* IEEE 802.11 + radiotap header. */ +++#define ARPHRD_IEEE802154 804 /* IEEE 802.15.4 header. */ +++#define ARPHRD_IEEE802154_PHY 805 /* IEEE 802.15.4 PHY header. */ +++ +++#define ARPHRD_VOID 0xFFFF /* Void type, nothing is known. */ +++#define ARPHRD_NONE 0xFFFE /* Zero header length. */ +++ +++ +++/* ARP ioctl request. */ +++struct arpreq +++ { +++ struct sockaddr arp_pa; /* Protocol address. */ +++ struct sockaddr arp_ha; /* Hardware address. */ +++ int arp_flags; /* Flags. */ +++ struct sockaddr arp_netmask; /* Netmask (only for proxy arps). */ +++ char arp_dev[16]; +++ }; +++ +++struct arpreq_old +++ { +++ struct sockaddr arp_pa; /* Protocol address. */ +++ struct sockaddr arp_ha; /* Hardware address. */ +++ int arp_flags; /* Flags. */ +++ struct sockaddr arp_netmask; /* Netmask (only for proxy arps). */ +++ }; +++ +++/* ARP Flag values. */ +++#define ATF_COM 0x02 /* Completed entry (ha valid). */ +++#define ATF_PERM 0x04 /* Permanent entry. */ +++#define ATF_PUBL 0x08 /* Publish entry. */ +++#define ATF_USETRAILERS 0x10 /* Has requested trailers. */ +++#define ATF_NETMASK 0x20 /* Want to use a netmask (only +++ for proxy entries). */ +++#define ATF_DONTPUB 0x40 /* Don't answer this addresses. */ +++#define ATF_MAGIC 0x80 /* Automatically added entry. */ +++ +++ +++/* Support for the user space arp daemon, arpd. */ +++#define ARPD_UPDATE 0x01 +++#define ARPD_LOOKUP 0x02 +++#define ARPD_FLUSH 0x03 +++ +++struct arpd_request +++ { +++ unsigned short int req; /* Request type. */ +++ uint32_t ip; /* IP address of entry. */ +++ unsigned long int dev; /* Device entry is tied to. */ +++ unsigned long int stamp; +++ unsigned long int updated; +++ unsigned char ha[MAX_ADDR_LEN]; /* Hardware address. */ +++ }; +++ +++__END_DECLS +++ +++#endif /* net/if_arp.h */ ++Index: glibc-2.27/sysdeps/gnu/net/if_ether.h ++=================================================================== ++--- /dev/null +++++ glibc-2.27/sysdeps/gnu/net/if_ether.h ++@@ -0,0 +1,115 @@ +++/* Copyright (C) 1997-2020 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 +++ . */ +++ +++#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 */ +++#define ETH_FCS_LEN 4 /* Octets in the 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_PAUSE 0x8808 /* IEEE Pause frames. See 802.3 31B */ +++#define ETH_P_SLOW 0x8809 /* Slow Protocol. See 802.3ad 43B */ +++#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_PAE 0x888E /* Port Access Entity (IEEE 802.1X) */ +++#define ETH_P_AOE 0x88A2 /* ATA over Ethernet */ +++#define ETH_P_TIPC 0x88CA /* TIPC */ +++#define ETH_P_FCOE 0x8906 /* Fibre Channel over Ethernet */ +++#define ETH_P_EDSA 0xDADA /* Ethertype DSA [ NOT AN OFFICIALLY REGISTERED ID ] */ +++ +++/* +++ * 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_CAN 0x000C /* Controller Area Network */ +++#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 :-) */ +++#define ETH_P_DSA 0x001B /* Distributed Switch Arch. */ +++#define ETH_P_TRAILER 0x001C /* Trailer switch tagging */ +++#define ETH_P_PHONET 0x00F5 /* Nokia Phonet frames */ +++ +++/* +++ * 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 int h_proto; /* packet type ID field */ +++} __attribute__((packed)); +++ +++#endif /* net/if_ether.h */ ++Index: glibc-2.27/sysdeps/gnu/net/if_ppp.h ++=================================================================== ++--- /dev/null +++++ glibc-2.27/sysdeps/gnu/net/if_ppp.h ++@@ -0,0 +1,171 @@ +++/* From: if_ppp.h,v 1.3 1995/06/12 11:36:50 paulus Exp */ +++ +++/* +++ * if_ppp.h - Point-to-Point Protocol definitions. +++ * +++ * Copyright (c) 1989 Carnegie Mellon University. +++ * +++ * 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. +++ * +++ */ +++ +++/* +++ * ==FILEVERSION 960926== +++ * +++ * NOTE TO MAINTAINERS: +++ * If you modify this file at all, please set the above date. +++ * if_ppp.h is shipped with a PPP distribution as well as with the kernel; +++ * if everyone increases the FILEVERSION number above, then scripts +++ * can do the right thing when deciding whether to install a new if_ppp.h +++ * file. Don't change the format of that line otherwise, so the +++ * installation script can recognize it. +++ */ +++ +++ +++#ifndef __NET_IF_PPP_H +++#define __NET_IF_PPP_H 1 +++ +++#include +++#include +++#include +++#include +++#include +++ +++__BEGIN_DECLS +++ +++/* +++ * Packet sizes +++ */ +++ +++#define PPP_MTU 1500 /* Default MTU (size of Info field) */ +++#define PPP_MAXMRU 65000 /* Largest MRU we allow */ +++#define PPP_VERSION "2.2.0" +++#define PPP_MAGIC 0x5002 /* Magic value for the ppp structure */ +++#define PROTO_IPX 0x002b /* protocol numbers */ +++#define PROTO_DNA_RT 0x0027 /* DNA Routing */ +++ +++ +++/* +++ * Bit definitions for flags. +++ */ +++ +++#define SC_COMP_PROT 0x00000001 /* protocol compression (output) */ +++#define SC_COMP_AC 0x00000002 /* header compression (output) */ +++#define SC_COMP_TCP 0x00000004 /* TCP (VJ) compression (output) */ +++#define SC_NO_TCP_CCID 0x00000008 /* disable VJ connection-id comp. */ +++#define SC_REJ_COMP_AC 0x00000010 /* reject adrs/ctrl comp. on input */ +++#define SC_REJ_COMP_TCP 0x00000020 /* reject TCP (VJ) comp. on input */ +++#define SC_CCP_OPEN 0x00000040 /* Look at CCP packets */ +++#define SC_CCP_UP 0x00000080 /* May send/recv compressed packets */ +++#define SC_ENABLE_IP 0x00000100 /* IP packets may be exchanged */ +++#define SC_COMP_RUN 0x00001000 /* compressor has been inited */ +++#define SC_DECOMP_RUN 0x00002000 /* decompressor has been inited */ +++#define SC_DEBUG 0x00010000 /* enable debug messages */ +++#define SC_LOG_INPKT 0x00020000 /* log contents of good pkts recvd */ +++#define SC_LOG_OUTPKT 0x00040000 /* log contents of pkts sent */ +++#define SC_LOG_RAWIN 0x00080000 /* log all chars received */ +++#define SC_LOG_FLUSH 0x00100000 /* log all chars flushed */ +++#define SC_MASK 0x0fE0ffff /* bits that user can change */ +++ +++/* state bits */ +++#define SC_ESCAPED 0x80000000 /* saw a PPP_ESCAPE */ +++#define SC_FLUSH 0x40000000 /* flush input until next PPP_FLAG */ +++#define SC_VJ_RESET 0x20000000 /* Need to reset the VJ decompressor */ +++#define SC_XMIT_BUSY 0x10000000 /* ppp_write_wakeup is active */ +++#define SC_RCV_ODDP 0x08000000 /* have rcvd char with odd parity */ +++#define SC_RCV_EVNP 0x04000000 /* have rcvd char with even parity */ +++#define SC_RCV_B7_1 0x02000000 /* have rcvd char with bit 7 = 1 */ +++#define SC_RCV_B7_0 0x01000000 /* have rcvd char with bit 7 = 0 */ +++#define SC_DC_FERROR 0x00800000 /* fatal decomp error detected */ +++#define SC_DC_ERROR 0x00400000 /* non-fatal decomp error detected */ +++ +++/* +++ * Ioctl definitions. +++ */ +++ +++struct npioctl { +++ int protocol; /* PPP protocol, e.g. PPP_IP */ +++ enum NPmode mode; +++}; +++ +++/* Structure describing a CCP configuration option, for PPPIOCSCOMPRESS */ +++struct ppp_option_data { +++ uint8_t *ptr; +++ uint32_t length; +++ int transmit; +++}; +++ +++/* 'struct ifreq' is only available from net/if.h under __USE_MISC. */ +++#ifdef __USE_MISC +++struct ifpppstatsreq { +++ struct ifreq b; +++ struct ppp_stats stats; /* statistic information */ +++}; +++ +++struct ifpppcstatsreq { +++ struct ifreq b; +++ struct ppp_comp_stats stats; +++}; +++ +++#define ifr__name b.ifr_ifrn.ifrn_name +++#define stats_ptr b.ifr_ifru.ifru_data +++#endif +++ +++/* +++ * Ioctl definitions. +++ */ +++ +++#define PPPIOCGFLAGS _IOR('t', 90, int) /* get configuration flags */ +++#define PPPIOCSFLAGS _IOW('t', 89, int) /* set configuration flags */ +++#define PPPIOCGASYNCMAP _IOR('t', 88, int) /* get async map */ +++#define PPPIOCSASYNCMAP _IOW('t', 87, int) /* set async map */ +++#define PPPIOCGUNIT _IOR('t', 86, int) /* get ppp unit number */ +++#define PPPIOCGRASYNCMAP _IOR('t', 85, int) /* get receive async map */ +++#define PPPIOCSRASYNCMAP _IOW('t', 84, int) /* set receive async map */ +++#define PPPIOCGMRU _IOR('t', 83, int) /* get max receive unit */ +++#define PPPIOCSMRU _IOW('t', 82, int) /* set max receive unit */ +++#define PPPIOCSMAXCID _IOW('t', 81, int) /* set VJ max slot ID */ +++#define PPPIOCGXASYNCMAP _IOR('t', 80, ext_accm) /* get extended ACCM */ +++#define PPPIOCSXASYNCMAP _IOW('t', 79, ext_accm) /* set extended ACCM */ +++#define PPPIOCXFERUNIT _IO('t', 78) /* transfer PPP unit */ +++#define PPPIOCSCOMPRESS _IOW('t', 77, struct ppp_option_data) +++#define PPPIOCGNPMODE _IOWR('t', 76, struct npioctl) /* get NP mode */ +++#define PPPIOCSNPMODE _IOW('t', 75, struct npioctl) /* set NP mode */ +++#define PPPIOCGDEBUG _IOR('t', 65, int) /* Read debug level */ +++#define PPPIOCSDEBUG _IOW('t', 64, int) /* Set debug level */ +++#define PPPIOCGIDLE _IOR('t', 63, struct ppp_idle) /* get idle time */ +++ +++#define SIOCGPPPSTATS (SIOCDEVPRIVATE + 0) +++#define SIOCGPPPVER (SIOCDEVPRIVATE + 1) /* NEVER change this!! */ +++#define SIOCGPPPCSTATS (SIOCDEVPRIVATE + 2) +++ +++#if !defined(ifr_mtu) +++#define ifr_mtu ifr_ifru.ifru_metric +++#endif +++ +++__END_DECLS +++ +++#endif /* net/if_ppp.h */ ++Index: glibc-2.27/sysdeps/gnu/net/route.h ++=================================================================== ++--- /dev/null +++++ glibc-2.27/sysdeps/gnu/net/route.h ++@@ -0,0 +1,144 @@ +++/* Copyright (C) 1997-2020 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 +++ . */ +++ +++/* Based on the 4.4BSD and Linux version of this file. */ +++ +++#ifndef _NET_ROUTE_H +++#define _NET_ROUTE_H 1 +++ +++#include +++#include +++#include +++#include +++#include +++ +++ +++/* This structure gets passed by the SIOCADDRT and SIOCDELRT calls. */ +++struct rtentry +++ { +++ unsigned long int rt_pad1; +++ struct sockaddr rt_dst; /* Target address. */ +++ struct sockaddr rt_gateway; /* Gateway addr (RTF_GATEWAY). */ +++ struct sockaddr rt_genmask; /* Target network mask (IP). */ +++ unsigned short int rt_flags; +++ short int rt_pad2; +++ unsigned long int rt_pad3; +++ unsigned char rt_tos; +++ unsigned char rt_class; +++#if __WORDSIZE == 64 +++ short int rt_pad4[3]; +++#else +++ short int rt_pad4; +++#endif +++ short int rt_metric; /* +1 for binary compatibility! */ +++ char *rt_dev; /* Forcing the device at add. */ +++ unsigned long int rt_mtu; /* Per route MTU/Window. */ +++ unsigned long int rt_window; /* Window clamping. */ +++ unsigned short int rt_irtt; /* Initial RTT. */ +++ }; +++/* Compatibility hack. */ +++#define rt_mss rt_mtu +++ +++ +++struct in6_rtmsg +++ { +++ struct in6_addr rtmsg_dst; +++ struct in6_addr rtmsg_src; +++ struct in6_addr rtmsg_gateway; +++ uint32_t rtmsg_type; +++ uint16_t rtmsg_dst_len; +++ uint16_t rtmsg_src_len; +++ uint32_t rtmsg_metric; +++ unsigned long int rtmsg_info; +++ uint32_t rtmsg_flags; +++ int rtmsg_ifindex; +++ }; +++ +++ +++#define RTF_UP 0x0001 /* Route usable. */ +++#define RTF_GATEWAY 0x0002 /* Destination is a gateway. */ +++ +++#define RTF_HOST 0x0004 /* Host entry (net otherwise). */ +++#define RTF_REINSTATE 0x0008 /* Reinstate route after timeout. */ +++#define RTF_DYNAMIC 0x0010 /* Created dyn. (by redirect). */ +++#define RTF_MODIFIED 0x0020 /* Modified dyn. (by redirect). */ +++#define RTF_MTU 0x0040 /* Specific MTU for this route. */ +++#define RTF_MSS RTF_MTU /* Compatibility. */ +++#define RTF_WINDOW 0x0080 /* Per route window clamping. */ +++#define RTF_IRTT 0x0100 /* Initial round trip time. */ +++#define RTF_REJECT 0x0200 /* Reject route. */ +++#define RTF_STATIC 0x0400 /* Manually injected route. */ +++#define RTF_XRESOLVE 0x0800 /* External resolver. */ +++#define RTF_NOFORWARD 0x1000 /* Forwarding inhibited. */ +++#define RTF_THROW 0x2000 /* Go to next class. */ +++#define RTF_NOPMTUDISC 0x4000 /* Do not send packets with DF. */ +++ +++/* for IPv6 */ +++#define RTF_DEFAULT 0x00010000 /* default - learned via ND */ +++#define RTF_ALLONLINK 0x00020000 /* fallback, no routers on link */ +++#define RTF_ADDRCONF 0x00040000 /* addrconf route - RA */ +++ +++#define RTF_LINKRT 0x00100000 /* link specific - device match */ +++#define RTF_NONEXTHOP 0x00200000 /* route with no nexthop */ +++ +++#define RTF_CACHE 0x01000000 /* cache entry */ +++#define RTF_FLOW 0x02000000 /* flow significant route */ +++#define RTF_POLICY 0x04000000 /* policy route */ +++ +++#define RTCF_VALVE 0x00200000 +++#define RTCF_MASQ 0x00400000 +++#define RTCF_NAT 0x00800000 +++#define RTCF_DOREDIRECT 0x01000000 +++#define RTCF_LOG 0x02000000 +++#define RTCF_DIRECTSRC 0x04000000 +++ +++#define RTF_LOCAL 0x80000000 +++#define RTF_INTERFACE 0x40000000 +++#define RTF_MULTICAST 0x20000000 +++#define RTF_BROADCAST 0x10000000 +++#define RTF_NAT 0x08000000 +++ +++#define RTF_ADDRCLASSMASK 0xF8000000 +++#define RT_ADDRCLASS(flags) ((uint32_t) flags >> 23) +++ +++#define RT_TOS(tos) ((tos) & IPTOS_TOS_MASK) +++ +++#define RT_LOCALADDR(flags) ((flags & RTF_ADDRCLASSMASK) \ +++ == (RTF_LOCAL|RTF_INTERFACE)) +++ +++#define RT_CLASS_UNSPEC 0 +++#define RT_CLASS_DEFAULT 253 +++ +++#define RT_CLASS_MAIN 254 +++#define RT_CLASS_LOCAL 255 +++#define RT_CLASS_MAX 255 +++ +++ +++#define RTMSG_ACK NLMSG_ACK +++#define RTMSG_OVERRUN NLMSG_OVERRUN +++ +++#define RTMSG_NEWDEVICE 0x11 +++#define RTMSG_DELDEVICE 0x12 +++#define RTMSG_NEWROUTE 0x21 +++#define RTMSG_DELROUTE 0x22 +++#define RTMSG_NEWRULE 0x31 +++#define RTMSG_DELRULE 0x32 +++#define RTMSG_CONTROL 0x40 +++ +++#define RTMSG_AR_FAILED 0x51 /* Address Resolution failed. */ +++ +++#endif /* net/route.h */ ++Index: glibc-2.27/sysdeps/gnu/netinet/if_ether.h ++=================================================================== ++--- /dev/null +++++ glibc-2.27/sysdeps/gnu/netinet/if_ether.h ++@@ -0,0 +1,103 @@ +++/* Copyright (C) 1996-2020 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 +++ . */ +++ +++#ifndef __NETINET_IF_ETHER_H +++ +++#define __NETINET_IF_ETHER_H 1 +++#include +++#include +++ +++#include +++ +++#ifdef __USE_MISC +++/* +++ * 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 +++#include +++ +++__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 */ +++ uint8_t arp_sha[ETH_ALEN]; /* sender hardware address */ +++ uint8_t arp_spa[4]; /* sender protocol address */ +++ uint8_t arp_tha[ETH_ALEN]; /* target hardware address */ +++ uint8_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 +++ +++/* +++ * 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; */ \ +++ /* uint8_t enaddr[ETH_ALEN]; */ \ +++{ \ +++ (enaddr)[0] = 0x01; \ +++ (enaddr)[1] = 0x00; \ +++ (enaddr)[2] = 0x5e; \ +++ (enaddr)[3] = ((uint8_t *)ipaddr)[1] & 0x7f; \ +++ (enaddr)[4] = ((uint8_t *)ipaddr)[2]; \ +++ (enaddr)[5] = ((uint8_t *)ipaddr)[3]; \ +++} +++ +++__END_DECLS +++#endif /* __USE_MISC */ +++ +++#endif /* netinet/if_ether.h */ ++Index: glibc-2.27/sysdeps/mach/hurd/Makefile ++=================================================================== ++--- glibc-2.27.orig/sysdeps/mach/hurd/Makefile +++++ glibc-2.27/sysdeps/mach/hurd/Makefile ++@@ -202,10 +202,6 @@ ifeq ($(subdir),sunrpc) ++ sysdep_headers += nfs/nfs.h ++ endif ++ ++-ifeq ($(subdir),socket) ++-sysdep_headers += net/ethernet.h net/if_arp.h net/if_ether.h net/route.h ++-endif ++- ++ ifeq ($(subdir),nis) ++ CFLAGS-ypclnt.c += -DUSE_BINDINGDIR=1 ++ endif ++Index: glibc-2.27/sysdeps/mach/hurd/net/ethernet.h ++=================================================================== ++--- glibc-2.27.orig/sysdeps/mach/hurd/net/ethernet.h +++++ /dev/null ++@@ -1,76 +0,0 @@ ++-/* Copyright (C) 1997-2020 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 ++- . */ ++- ++-/* 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 ++-#include ++-#include ++-#include /* IEEE 802.3 Ethernet constants */ ++- ++-__BEGIN_DECLS ++- ++-/* This is a name for the 48 bit ethernet address available on many ++- systems. */ ++-struct ether_addr ++-{ ++- uint8_t ether_addr_octet[ETH_ALEN]; ++-}; ++- ++-/* 10Mb/s ethernet header */ ++-struct ether_header ++-{ ++- uint8_t ether_dhost[ETH_ALEN]; /* destination eth addr */ ++- uint8_t ether_shost[ETH_ALEN]; /* source ether addr */ ++- uint16_t ether_type; /* packet type ID field */ ++-}; ++- ++-/* 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 + ETH_CRC_LEN) /* min packet length */ ++-#define ETHER_MAX_LEN (ETH_FRAME_LEN + ETH_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 */ ++Index: glibc-2.27/sysdeps/mach/hurd/net/if_arp.h ++=================================================================== ++--- glibc-2.27.orig/sysdeps/mach/hurd/net/if_arp.h +++++ /dev/null ++@@ -1,145 +0,0 @@ ++-/* Definitions for Address Resolution Protocol. ++- Copyright (C) 1997-2020 Free Software Foundation, Inc. ++- This file is part of the GNU C Library. ++- Contributed by Ulrich Drepper , 1997. ++- ++- The GNU C Library is free software; you can redistribute it and/or ++- modify it under the terms of the GNU Lesser General Public ++- License as published by the Free Software Foundation; either ++- version 2.1 of the License, or (at your option) any later version. ++- ++- The GNU C Library is distributed in the hope that it will be useful, ++- but WITHOUT ANY WARRANTY; without even the implied warranty of ++- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++- Lesser General Public License 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 ++- . */ ++- ++-/* Based on the 4.4BSD and Linux version of this file. */ ++- ++-#ifndef _NET_IF_ARP_H ++- ++-#define _NET_IF_ARP_H 1 ++-#include ++- ++-#include ++-#include ++-#include ++- ++-__BEGIN_DECLS ++- ++-/* Some internals from deep down in the kernel. */ ++-#define MAX_ADDR_LEN 7 ++- ++- ++-/* This structure defines an ethernet arp header. */ ++- ++-/* ARP protocol opcodes. */ ++-#define ARPOP_REQUEST 1 /* ARP request. */ ++-#define ARPOP_REPLY 2 /* ARP reply. */ ++-#define ARPOP_RREQUEST 3 /* RARP request. */ ++-#define ARPOP_RREPLY 4 /* RARP reply. */ ++- ++-/* See RFC 826 for protocol description. ARP packets are variable ++- in size; the arphdr structure defines the fixed-length portion. ++- Protocol type values are the same as those for 10 Mb/s Ethernet. ++- It is followed by the variable-sized fields ar_sha, arp_spa, ++- arp_tha and arp_tpa in that order, according to the lengths ++- specified. Field names used correspond to RFC 826. */ ++- ++-struct arphdr ++- { ++- unsigned short int ar_hrd; /* Format of hardware address. */ ++- unsigned short int ar_pro; /* Format of protocol address. */ ++- unsigned char ar_hln; /* Length of hardware address. */ ++- unsigned char ar_pln; /* Length of protocol address. */ ++- unsigned short int ar_op; /* ARP opcode (command). */ ++-#if 0 ++- /* Ethernet looks like this : This bit is variable sized ++- however... */ ++- unsigned char __ar_sha[ETH_ALEN]; /* Sender hardware address. */ ++- unsigned char __ar_sip[4]; /* Sender IP address. */ ++- unsigned char __ar_tha[ETH_ALEN]; /* Target hardware address. */ ++- unsigned char __ar_tip[4]; /* Target IP address. */ ++-#endif ++- }; ++- ++- ++-/* ARP protocol HARDWARE identifiers. */ ++-#define ARPHRD_NETROM 0 /* From KA9Q: NET/ROM pseudo. */ ++-#define ARPHRD_ETHER 1 /* Ethernet 10Mbps. */ ++-#define ARPHRD_EETHER 2 /* Experimental Ethernet. */ ++-#define ARPHRD_AX25 3 /* AX.25 Level 2. */ ++-#define ARPHRD_PRONET 4 /* PROnet token ring. */ ++-#define ARPHRD_CHAOS 5 /* Chaosnet. */ ++-#define ARPHRD_IEEE802 6 /* IEEE 802.2 Ethernet/TR/TB. */ ++-#define ARPHRD_ARCNET 7 /* ARCnet. */ ++-#define ARPHRD_APPLETLK 8 /* APPLEtalk. */ ++-#define ARPHRD_DLCI 15 /* Frame Relay DLCI. */ ++-#define ARPHRD_METRICOM 23 /* Metricom STRIP (new IANA id). */ ++- ++-/* Dummy types for non ARP hardware */ ++-#define ARPHRD_SLIP 256 ++-#define ARPHRD_CSLIP 257 ++-#define ARPHRD_SLIP6 258 ++-#define ARPHRD_CSLIP6 259 ++-#define ARPHRD_RSRVD 260 /* Notional KISS type. */ ++-#define ARPHRD_ADAPT 264 ++-#define ARPHRD_ROSE 270 ++-#define ARPHRD_X25 271 /* CCITT X.25. */ ++-#define ARPHRD_PPP 512 ++-#define ARPHRD_HDLC 513 /* (Cisco) HDLC. */ ++-#define ARPHRD_LAPB 516 /* LAPB. */ ++- ++-#define ARPHRD_TUNNEL 768 /* IPIP tunnel. */ ++-#define ARPHRD_TUNNEL6 769 /* IPIP6 tunnel. */ ++-#define ARPHRD_FRAD 770 /* Frame Relay Access Device. */ ++-#define ARPHRD_SKIP 771 /* SKIP vif. */ ++-#define ARPHRD_LOOPBACK 772 /* Loopback device. */ ++-#define ARPHRD_LOCALTLK 773 /* Localtalk device. */ ++-#define ARPHRD_FDDI 774 /* Fiber Distributed Data Interface. */ ++-#define ARPHRD_BIF 775 /* AP1000 BIF. */ ++-#define ARPHRD_SIT 776 /* sit0 device - IPv6-in-IPv4. */ ++- ++- ++-/* ARP ioctl request. */ ++-struct arpreq ++- { ++- struct sockaddr arp_pa; /* Protocol address. */ ++- struct sockaddr arp_ha; /* Hardware address. */ ++- int arp_flags; /* Flags. */ ++- struct sockaddr arp_netmask; /* Netmask (only for proxy arps). */ ++- char arp_dev[16]; ++- }; ++- ++-/* ARP Flag values. */ ++-#define ATF_COM 0x02 /* Completed entry (ha valid). */ ++-#define ATF_PERM 0x04 /* Permanent entry. */ ++-#define ATF_PUBL 0x08 /* Publish entry. */ ++-#define ATF_USETRAILERS 0x10 /* Has requested trailers. */ ++-#define ATF_NETMASK 0x20 /* Want to use a netmask (only ++- for proxy entries). */ ++-#define ATF_DONTPUB 0x40 /* Don't answer this addresses. */ ++-#define ATF_MAGIC 0x80 /* Automatically added entry. */ ++- ++- ++-/* Support for the user space arp daemon, arpd. */ ++-#define ARPD_UPDATE 0x01 ++-#define ARPD_LOOKUP 0x02 ++-#define ARPD_FLUSH 0x03 ++- ++-struct arpd_request ++- { ++- unsigned short int req; /* Request type. */ ++- uint32_t ip; /* IP address of entry. */ ++- unsigned long int dev; /* Device entry is tied to. */ ++- unsigned long int stamp; ++- unsigned long int updated; ++- unsigned char ha[MAX_ADDR_LEN]; /* Hardware address. */ ++- }; ++- ++-__END_DECLS ++- ++-#endif /* net/if_arp.h */ ++Index: glibc-2.27/sysdeps/mach/hurd/net/if_ether.h ++=================================================================== ++--- glibc-2.27.orig/sysdeps/mach/hurd/net/if_ether.h +++++ /dev/null ++@@ -1,84 +0,0 @@ ++-/* Copyright (C) 1997-2020 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 ++- . */ ++- ++-#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_ECHO 0x0200 /* Ethernet Echo packet */ ++-#define ETH_P_PUP 0x0400 /* Xerox PUP 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_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_IPX 0x8137 /* IPX over DIX */ ++-#define ETH_P_IPV6 0x86DD /* IPv6 over bluebook */ ++- ++-/* ++- * 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 */ ++- ++-/* ++- * 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 int h_proto; /* packet type ID field */ ++-}; ++- ++-#endif /* net/if_ether.h */ ++Index: glibc-2.27/sysdeps/mach/hurd/net/route.h ++=================================================================== ++--- glibc-2.27.orig/sysdeps/mach/hurd/net/route.h +++++ /dev/null ++@@ -1,140 +0,0 @@ ++-/* Copyright (C) 1997-2020 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 ++- . */ ++- ++-/* Based on the 4.4BSD and Linux version of this file. */ ++- ++-#ifndef _NET_ROUTE_H ++- ++-#define _NET_ROUTE_H 1 ++-#include ++- ++-#include ++-#include ++-#include ++- ++- ++-/* This structure gets passed by the SIOCADDRT and SIOCDELRT calls. */ ++-struct rtentry ++- { ++- unsigned long int rt_pad1; ++- struct sockaddr rt_dst; /* Target address. */ ++- struct sockaddr rt_gateway; /* Gateway addr (RTF_GATEWAY). */ ++- struct sockaddr rt_genmask; /* Target network mask (IP). */ ++- unsigned short int rt_flags; ++- short int rt_pad2; ++- unsigned long int rt_pad3; ++- unsigned char rt_tos; ++- unsigned char rt_class; ++- short int rt_pad4; ++- short int rt_metric; /* +1 for binary compatibility! */ ++- char *rt_dev; /* Forcing the device at add. */ ++- unsigned long int rt_mtu; /* Per route MTU/Window. */ ++- unsigned long int rt_window; /* Window clamping. */ ++- unsigned short int rt_irtt; /* Initial RTT. */ ++- }; ++-/* Compatibility hack. */ ++-#define rt_mss rt_mtu ++- ++- ++-struct in6_rtmsg ++- { ++- struct in6_addr rtmsg_dst; ++- struct in6_addr rtmsg_src; ++- struct in6_addr rtmsg_gateway; ++- uint32_t rtmsg_type; ++- uint16_t rtmsg_dst_len; ++- uint16_t rtmsg_src_len; ++- uint32_t rtmsg_metric; ++- unsigned long int rtmsg_info; ++- uint32_t rtmsg_flags; ++- int rtmsg_ifindex; ++- }; ++- ++- ++-#define RTF_UP 0x0001 /* Route usable. */ ++-#define RTF_GATEWAY 0x0002 /* Destination is a gateway. */ ++- ++-#define RTF_HOST 0x0004 /* Host entry (net otherwise). */ ++-#define RTF_REINSTATE 0x0008 /* Reinstate route after timeout. */ ++-#define RTF_DYNAMIC 0x0010 /* Created dyn. (by redirect). */ ++-#define RTF_MODIFIED 0x0020 /* Modified dyn. (by redirect). */ ++-#define RTF_MTU 0x0040 /* Specific MTU for this route. */ ++-#define RTF_MSS RTF_MTU /* Compatibility. */ ++-#define RTF_WINDOW 0x0080 /* Per route window clamping. */ ++-#define RTF_IRTT 0x0100 /* Initial round trip time. */ ++-#define RTF_REJECT 0x0200 /* Reject route. */ ++-#define RTF_STATIC 0x0400 /* Manually injected route. */ ++-#define RTF_XRESOLVE 0x0800 /* External resolver. */ ++-#define RTF_NOFORWARD 0x1000 /* Forwarding inhibited. */ ++-#define RTF_THROW 0x2000 /* Go to next class. */ ++-#define RTF_NOPMTUDISC 0x4000 /* Do not send packets with DF. */ ++- ++-/* for IPv6 */ ++-#define RTF_DEFAULT 0x00010000 /* default - learned via ND */ ++-#define RTF_ALLONLINK 0x00020000 /* fallback, no routers on link */ ++-#define RTF_ADDRCONF 0x00040000 /* addrconf route - RA */ ++- ++-#define RTF_LINKRT 0x00100000 /* link specific - device match */ ++-#define RTF_NONEXTHOP 0x00200000 /* route with no nexthop */ ++- ++-#define RTF_CACHE 0x01000000 /* cache entry */ ++-#define RTF_FLOW 0x02000000 /* flow significant route */ ++-#define RTF_POLICY 0x04000000 /* policy route */ ++- ++-#define RTCF_VALVE 0x00200000 ++-#define RTCF_MASQ 0x00400000 ++-#define RTCF_NAT 0x00800000 ++-#define RTCF_DOREDIRECT 0x01000000 ++-#define RTCF_LOG 0x02000000 ++-#define RTCF_DIRECTSRC 0x04000000 ++- ++-#define RTF_LOCAL 0x80000000 ++-#define RTF_INTERFACE 0x40000000 ++-#define RTF_MULTICAST 0x20000000 ++-#define RTF_BROADCAST 0x10000000 ++-#define RTF_NAT 0x08000000 ++- ++-#define RTF_ADDRCLASSMASK 0xF8000000 ++-#define RT_ADDRCLASS(flags) ((uint32_t) flags >> 23) ++- ++-#define RT_TOS(tos) ((tos) & IPTOS_TOS_MASK) ++- ++-#define RT_LOCALADDR(flags) ((flags & RTF_ADDRCLASSMASK) \ ++- == (RTF_LOCAL|RTF_INTERFACE)) ++- ++-#define RT_CLASS_UNSPEC 0 ++-#define RT_CLASS_DEFAULT 253 ++- ++-#define RT_CLASS_MAIN 254 ++-#define RT_CLASS_LOCAL 255 ++-#define RT_CLASS_MAX 255 ++- ++- ++-#define RTMSG_ACK NLMSG_ACK ++-#define RTMSG_OVERRUN NLMSG_OVERRUN ++- ++-#define RTMSG_NEWDEVICE 0x11 ++-#define RTMSG_DELDEVICE 0x12 ++-#define RTMSG_NEWROUTE 0x21 ++-#define RTMSG_DELROUTE 0x22 ++-#define RTMSG_NEWRULE 0x31 ++-#define RTMSG_DELRULE 0x32 ++-#define RTMSG_CONTROL 0x40 ++- ++-#define RTMSG_AR_FAILED 0x51 /* Address Resolution failed. */ ++- ++-#endif /* net/route.h */ ++Index: glibc-2.27/sysdeps/unix/sysv/linux/Makefile ++=================================================================== ++--- glibc-2.27.orig/sysdeps/unix/sysv/linux/Makefile +++++ glibc-2.27/sysdeps/unix/sysv/linux/Makefile ++@@ -118,8 +118,7 @@ $(objpfx)tst-signal-numbers.out: \ ++ endif ++ ++ ifeq ($(subdir),socket) ++-sysdep_headers += net/if_ppp.h net/ppp-comp.h \ ++- net/ppp_defs.h net/if_arp.h net/route.h net/ethernet.h \ +++sysdep_headers += net/ppp-comp.h net/ppp_defs.h \ ++ net/if_slip.h net/if_packet.h net/if_shaper.h \ ++ bits/socket-constants.h ++ sysdep_routines += cmsg_nxthdr ++Index: glibc-2.27/sysdeps/unix/sysv/linux/net/ethernet.h ++=================================================================== ++--- glibc-2.27.orig/sysdeps/unix/sysv/linux/net/ethernet.h +++++ /dev/null ++@@ -1,84 +0,0 @@ ++-/* Copyright (C) 1997-2020 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 ++- . */ ++- ++-/* 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 ++-#include ++- ++-#include /* IEEE 802.3 Ethernet constants */ ++- ++-__BEGIN_DECLS ++- ++-/* This is a name for the 48 bit ethernet address available on many ++- systems. */ ++-struct ether_addr ++-{ ++- uint8_t ether_addr_octet[ETH_ALEN]; ++-} __attribute__ ((__packed__)); ++- ++-/* 10Mb/s ethernet header */ ++-struct ether_header ++-{ ++- uint8_t ether_dhost[ETH_ALEN]; /* destination eth addr */ ++- uint8_t ether_shost[ETH_ALEN]; /* source ether addr */ ++- uint16_t ether_type; /* packet type ID field */ ++-} __attribute__ ((__packed__)); ++- ++-/* Ethernet protocol ID's */ ++-#define ETHERTYPE_PUP 0x0200 /* Xerox PUP */ ++-#define ETHERTYPE_SPRITE 0x0500 /* Sprite */ ++-#define ETHERTYPE_IP 0x0800 /* IP */ ++-#define ETHERTYPE_ARP 0x0806 /* Address resolution */ ++-#define ETHERTYPE_REVARP 0x8035 /* Reverse ARP */ ++-#define ETHERTYPE_AT 0x809B /* AppleTalk protocol */ ++-#define ETHERTYPE_AARP 0x80F3 /* AppleTalk ARP */ ++-#define ETHERTYPE_VLAN 0x8100 /* IEEE 802.1Q VLAN tagging */ ++-#define ETHERTYPE_IPX 0x8137 /* IPX */ ++-#define ETHERTYPE_IPV6 0x86dd /* IP protocol version 6 */ ++-#define ETHERTYPE_LOOPBACK 0x9000 /* used to test interfaces */ ++- ++- ++-#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 */ ++Index: glibc-2.27/sysdeps/unix/sysv/linux/net/if_arp.h ++=================================================================== ++--- glibc-2.27.orig/sysdeps/unix/sysv/linux/net/if_arp.h +++++ /dev/null ++@@ -1,183 +0,0 @@ ++-/* Definitions for Address Resolution Protocol. ++- Copyright (C) 1997-2020 Free Software Foundation, Inc. ++- This file is part of the GNU C Library. ++- Contributed by Ulrich Drepper , 1997. ++- ++- The GNU C Library is free software; you can redistribute it and/or ++- modify it under the terms of the GNU Lesser General Public ++- License as published by the Free Software Foundation; either ++- version 2.1 of the License, or (at your option) any later version. ++- ++- The GNU C Library is distributed in the hope that it will be useful, ++- but WITHOUT ANY WARRANTY; without even the implied warranty of ++- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++- Lesser General Public License 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 ++- . */ ++- ++-/* Based on the 4.4BSD and Linux version of this file. */ ++- ++-#ifndef _NET_IF_ARP_H ++-#define _NET_IF_ARP_H 1 ++- ++-#include ++-#include ++-#include ++- ++-__BEGIN_DECLS ++- ++-/* Some internals from deep down in the kernel. */ ++-#define MAX_ADDR_LEN 7 ++- ++- ++-/* This structure defines an ethernet arp header. */ ++- ++-/* ARP protocol opcodes. */ ++-#define ARPOP_REQUEST 1 /* ARP request. */ ++-#define ARPOP_REPLY 2 /* ARP reply. */ ++-#define ARPOP_RREQUEST 3 /* RARP request. */ ++-#define ARPOP_RREPLY 4 /* RARP reply. */ ++-#define ARPOP_InREQUEST 8 /* InARP request. */ ++-#define ARPOP_InREPLY 9 /* InARP reply. */ ++-#define ARPOP_NAK 10 /* (ATM)ARP NAK. */ ++- ++-/* See RFC 826 for protocol description. ARP packets are variable ++- in size; the arphdr structure defines the fixed-length portion. ++- Protocol type values are the same as those for 10 Mb/s Ethernet. ++- It is followed by the variable-sized fields ar_sha, arp_spa, ++- arp_tha and arp_tpa in that order, according to the lengths ++- specified. Field names used correspond to RFC 826. */ ++- ++-struct arphdr ++- { ++- unsigned short int ar_hrd; /* Format of hardware address. */ ++- unsigned short int ar_pro; /* Format of protocol address. */ ++- unsigned char ar_hln; /* Length of hardware address. */ ++- unsigned char ar_pln; /* Length of protocol address. */ ++- unsigned short int ar_op; /* ARP opcode (command). */ ++-#if 0 ++- /* Ethernet looks like this : This bit is variable sized ++- however... */ ++- unsigned char __ar_sha[ETH_ALEN]; /* Sender hardware address. */ ++- unsigned char __ar_sip[4]; /* Sender IP address. */ ++- unsigned char __ar_tha[ETH_ALEN]; /* Target hardware address. */ ++- unsigned char __ar_tip[4]; /* Target IP address. */ ++-#endif ++- }; ++- ++- ++-/* ARP protocol HARDWARE identifiers. */ ++-#define ARPHRD_NETROM 0 /* From KA9Q: NET/ROM pseudo. */ ++-#define ARPHRD_ETHER 1 /* Ethernet 10/100Mbps. */ ++-#define ARPHRD_EETHER 2 /* Experimental Ethernet. */ ++-#define ARPHRD_AX25 3 /* AX.25 Level 2. */ ++-#define ARPHRD_PRONET 4 /* PROnet token ring. */ ++-#define ARPHRD_CHAOS 5 /* Chaosnet. */ ++-#define ARPHRD_IEEE802 6 /* IEEE 802.2 Ethernet/TR/TB. */ ++-#define ARPHRD_ARCNET 7 /* ARCnet. */ ++-#define ARPHRD_APPLETLK 8 /* APPLEtalk. */ ++-#define ARPHRD_DLCI 15 /* Frame Relay DLCI. */ ++-#define ARPHRD_ATM 19 /* ATM. */ ++-#define ARPHRD_METRICOM 23 /* Metricom STRIP (new IANA id). */ ++-#define ARPHRD_IEEE1394 24 /* IEEE 1394 IPv4 - RFC 2734. */ ++-#define ARPHRD_EUI64 27 /* EUI-64. */ ++-#define ARPHRD_INFINIBAND 32 /* InfiniBand. */ ++- ++-/* Dummy types for non ARP hardware */ ++-#define ARPHRD_SLIP 256 ++-#define ARPHRD_CSLIP 257 ++-#define ARPHRD_SLIP6 258 ++-#define ARPHRD_CSLIP6 259 ++-#define ARPHRD_RSRVD 260 /* Notional KISS type. */ ++-#define ARPHRD_ADAPT 264 ++-#define ARPHRD_ROSE 270 ++-#define ARPHRD_X25 271 /* CCITT X.25. */ ++-#define ARPHRD_HWX25 272 /* Boards with X.25 in firmware. */ ++-#define ARPHRD_PPP 512 ++-#define ARPHRD_CISCO 513 /* Cisco HDLC. */ ++-#define ARPHRD_HDLC ARPHRD_CISCO ++-#define ARPHRD_LAPB 516 /* LAPB. */ ++-#define ARPHRD_DDCMP 517 /* Digital's DDCMP. */ ++-#define ARPHRD_RAWHDLC 518 /* Raw HDLC. */ ++-#define ARPHRD_RAWIP 519 /* Raw IP. */ ++- ++-#define ARPHRD_TUNNEL 768 /* IPIP tunnel. */ ++-#define ARPHRD_TUNNEL6 769 /* IPIP6 tunnel. */ ++-#define ARPHRD_FRAD 770 /* Frame Relay Access Device. */ ++-#define ARPHRD_SKIP 771 /* SKIP vif. */ ++-#define ARPHRD_LOOPBACK 772 /* Loopback device. */ ++-#define ARPHRD_LOCALTLK 773 /* Localtalk device. */ ++-#define ARPHRD_FDDI 774 /* Fiber Distributed Data Interface. */ ++-#define ARPHRD_BIF 775 /* AP1000 BIF. */ ++-#define ARPHRD_SIT 776 /* sit0 device - IPv6-in-IPv4. */ ++-#define ARPHRD_IPDDP 777 /* IP-in-DDP tunnel. */ ++-#define ARPHRD_IPGRE 778 /* GRE over IP. */ ++-#define ARPHRD_PIMREG 779 /* PIMSM register interface. */ ++-#define ARPHRD_HIPPI 780 /* High Performance Parallel I'face. */ ++-#define ARPHRD_ASH 781 /* (Nexus Electronics) Ash. */ ++-#define ARPHRD_ECONET 782 /* Acorn Econet. */ ++-#define ARPHRD_IRDA 783 /* Linux-IrDA. */ ++-#define ARPHRD_FCPP 784 /* Point to point fibrechanel. */ ++-#define ARPHRD_FCAL 785 /* Fibrechanel arbitrated loop. */ ++-#define ARPHRD_FCPL 786 /* Fibrechanel public loop. */ ++-#define ARPHRD_FCFABRIC 787 /* Fibrechanel fabric. */ ++-#define ARPHRD_IEEE802_TR 800 /* Magic type ident for TR. */ ++-#define ARPHRD_IEEE80211 801 /* IEEE 802.11. */ ++-#define ARPHRD_IEEE80211_PRISM 802 /* IEEE 802.11 + Prism2 header. */ ++-#define ARPHRD_IEEE80211_RADIOTAP 803 /* IEEE 802.11 + radiotap header. */ ++-#define ARPHRD_IEEE802154 804 /* IEEE 802.15.4 header. */ ++-#define ARPHRD_IEEE802154_PHY 805 /* IEEE 802.15.4 PHY header. */ ++- ++-#define ARPHRD_VOID 0xFFFF /* Void type, nothing is known. */ ++-#define ARPHRD_NONE 0xFFFE /* Zero header length. */ ++- ++- ++-/* ARP ioctl request. */ ++-struct arpreq ++- { ++- struct sockaddr arp_pa; /* Protocol address. */ ++- struct sockaddr arp_ha; /* Hardware address. */ ++- int arp_flags; /* Flags. */ ++- struct sockaddr arp_netmask; /* Netmask (only for proxy arps). */ ++- char arp_dev[16]; ++- }; ++- ++-struct arpreq_old ++- { ++- struct sockaddr arp_pa; /* Protocol address. */ ++- struct sockaddr arp_ha; /* Hardware address. */ ++- int arp_flags; /* Flags. */ ++- struct sockaddr arp_netmask; /* Netmask (only for proxy arps). */ ++- }; ++- ++-/* ARP Flag values. */ ++-#define ATF_COM 0x02 /* Completed entry (ha valid). */ ++-#define ATF_PERM 0x04 /* Permanent entry. */ ++-#define ATF_PUBL 0x08 /* Publish entry. */ ++-#define ATF_USETRAILERS 0x10 /* Has requested trailers. */ ++-#define ATF_NETMASK 0x20 /* Want to use a netmask (only ++- for proxy entries). */ ++-#define ATF_DONTPUB 0x40 /* Don't answer this addresses. */ ++-#define ATF_MAGIC 0x80 /* Automatically added entry. */ ++- ++- ++-/* Support for the user space arp daemon, arpd. */ ++-#define ARPD_UPDATE 0x01 ++-#define ARPD_LOOKUP 0x02 ++-#define ARPD_FLUSH 0x03 ++- ++-struct arpd_request ++- { ++- unsigned short int req; /* Request type. */ ++- uint32_t ip; /* IP address of entry. */ ++- unsigned long int dev; /* Device entry is tied to. */ ++- unsigned long int stamp; ++- unsigned long int updated; ++- unsigned char ha[MAX_ADDR_LEN]; /* Hardware address. */ ++- }; ++- ++-__END_DECLS ++- ++-#endif /* net/if_arp.h */ ++Index: glibc-2.27/sysdeps/unix/sysv/linux/net/if_ether.h ++=================================================================== ++--- /dev/null +++++ glibc-2.27/sysdeps/unix/sysv/linux/net/if_ether.h ++@@ -0,0 +1,7 @@ +++#ifndef _NET_IF_ETHER_H +++#define _NET_IF_ETHER_H 1 +++ +++/* Get definitions from kernel header file. */ +++#include +++ +++#endif /* net/if_ether.h */ ++Index: glibc-2.27/sysdeps/unix/sysv/linux/net/if_ppp.h ++=================================================================== ++--- glibc-2.27.orig/sysdeps/unix/sysv/linux/net/if_ppp.h +++++ /dev/null ++@@ -1,171 +0,0 @@ ++-/* From: if_ppp.h,v 1.3 1995/06/12 11:36:50 paulus Exp */ ++- ++-/* ++- * if_ppp.h - Point-to-Point Protocol definitions. ++- * ++- * Copyright (c) 1989 Carnegie Mellon University. ++- * ++- * 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. ++- * ++- */ ++- ++-/* ++- * ==FILEVERSION 960926== ++- * ++- * NOTE TO MAINTAINERS: ++- * If you modify this file at all, please set the above date. ++- * if_ppp.h is shipped with a PPP distribution as well as with the kernel; ++- * if everyone increases the FILEVERSION number above, then scripts ++- * can do the right thing when deciding whether to install a new if_ppp.h ++- * file. Don't change the format of that line otherwise, so the ++- * installation script can recognize it. ++- */ ++- ++- ++-#ifndef __NET_IF_PPP_H ++-#define __NET_IF_PPP_H 1 ++- ++-#include ++-#include ++-#include ++-#include ++-#include ++- ++-__BEGIN_DECLS ++- ++-/* ++- * Packet sizes ++- */ ++- ++-#define PPP_MTU 1500 /* Default MTU (size of Info field) */ ++-#define PPP_MAXMRU 65000 /* Largest MRU we allow */ ++-#define PPP_VERSION "2.2.0" ++-#define PPP_MAGIC 0x5002 /* Magic value for the ppp structure */ ++-#define PROTO_IPX 0x002b /* protocol numbers */ ++-#define PROTO_DNA_RT 0x0027 /* DNA Routing */ ++- ++- ++-/* ++- * Bit definitions for flags. ++- */ ++- ++-#define SC_COMP_PROT 0x00000001 /* protocol compression (output) */ ++-#define SC_COMP_AC 0x00000002 /* header compression (output) */ ++-#define SC_COMP_TCP 0x00000004 /* TCP (VJ) compression (output) */ ++-#define SC_NO_TCP_CCID 0x00000008 /* disable VJ connection-id comp. */ ++-#define SC_REJ_COMP_AC 0x00000010 /* reject adrs/ctrl comp. on input */ ++-#define SC_REJ_COMP_TCP 0x00000020 /* reject TCP (VJ) comp. on input */ ++-#define SC_CCP_OPEN 0x00000040 /* Look at CCP packets */ ++-#define SC_CCP_UP 0x00000080 /* May send/recv compressed packets */ ++-#define SC_ENABLE_IP 0x00000100 /* IP packets may be exchanged */ ++-#define SC_COMP_RUN 0x00001000 /* compressor has been inited */ ++-#define SC_DECOMP_RUN 0x00002000 /* decompressor has been inited */ ++-#define SC_DEBUG 0x00010000 /* enable debug messages */ ++-#define SC_LOG_INPKT 0x00020000 /* log contents of good pkts recvd */ ++-#define SC_LOG_OUTPKT 0x00040000 /* log contents of pkts sent */ ++-#define SC_LOG_RAWIN 0x00080000 /* log all chars received */ ++-#define SC_LOG_FLUSH 0x00100000 /* log all chars flushed */ ++-#define SC_MASK 0x0fE0ffff /* bits that user can change */ ++- ++-/* state bits */ ++-#define SC_ESCAPED 0x80000000 /* saw a PPP_ESCAPE */ ++-#define SC_FLUSH 0x40000000 /* flush input until next PPP_FLAG */ ++-#define SC_VJ_RESET 0x20000000 /* Need to reset the VJ decompressor */ ++-#define SC_XMIT_BUSY 0x10000000 /* ppp_write_wakeup is active */ ++-#define SC_RCV_ODDP 0x08000000 /* have rcvd char with odd parity */ ++-#define SC_RCV_EVNP 0x04000000 /* have rcvd char with even parity */ ++-#define SC_RCV_B7_1 0x02000000 /* have rcvd char with bit 7 = 1 */ ++-#define SC_RCV_B7_0 0x01000000 /* have rcvd char with bit 7 = 0 */ ++-#define SC_DC_FERROR 0x00800000 /* fatal decomp error detected */ ++-#define SC_DC_ERROR 0x00400000 /* non-fatal decomp error detected */ ++- ++-/* ++- * Ioctl definitions. ++- */ ++- ++-struct npioctl { ++- int protocol; /* PPP protocol, e.g. PPP_IP */ ++- enum NPmode mode; ++-}; ++- ++-/* Structure describing a CCP configuration option, for PPPIOCSCOMPRESS */ ++-struct ppp_option_data { ++- uint8_t *ptr; ++- uint32_t length; ++- int transmit; ++-}; ++- ++-/* 'struct ifreq' is only available from net/if.h under __USE_MISC. */ ++-#ifdef __USE_MISC ++-struct ifpppstatsreq { ++- struct ifreq b; ++- struct ppp_stats stats; /* statistic information */ ++-}; ++- ++-struct ifpppcstatsreq { ++- struct ifreq b; ++- struct ppp_comp_stats stats; ++-}; ++- ++-#define ifr__name b.ifr_ifrn.ifrn_name ++-#define stats_ptr b.ifr_ifru.ifru_data ++-#endif ++- ++-/* ++- * Ioctl definitions. ++- */ ++- ++-#define PPPIOCGFLAGS _IOR('t', 90, int) /* get configuration flags */ ++-#define PPPIOCSFLAGS _IOW('t', 89, int) /* set configuration flags */ ++-#define PPPIOCGASYNCMAP _IOR('t', 88, int) /* get async map */ ++-#define PPPIOCSASYNCMAP _IOW('t', 87, int) /* set async map */ ++-#define PPPIOCGUNIT _IOR('t', 86, int) /* get ppp unit number */ ++-#define PPPIOCGRASYNCMAP _IOR('t', 85, int) /* get receive async map */ ++-#define PPPIOCSRASYNCMAP _IOW('t', 84, int) /* set receive async map */ ++-#define PPPIOCGMRU _IOR('t', 83, int) /* get max receive unit */ ++-#define PPPIOCSMRU _IOW('t', 82, int) /* set max receive unit */ ++-#define PPPIOCSMAXCID _IOW('t', 81, int) /* set VJ max slot ID */ ++-#define PPPIOCGXASYNCMAP _IOR('t', 80, ext_accm) /* get extended ACCM */ ++-#define PPPIOCSXASYNCMAP _IOW('t', 79, ext_accm) /* set extended ACCM */ ++-#define PPPIOCXFERUNIT _IO('t', 78) /* transfer PPP unit */ ++-#define PPPIOCSCOMPRESS _IOW('t', 77, struct ppp_option_data) ++-#define PPPIOCGNPMODE _IOWR('t', 76, struct npioctl) /* get NP mode */ ++-#define PPPIOCSNPMODE _IOW('t', 75, struct npioctl) /* set NP mode */ ++-#define PPPIOCGDEBUG _IOR('t', 65, int) /* Read debug level */ ++-#define PPPIOCSDEBUG _IOW('t', 64, int) /* Set debug level */ ++-#define PPPIOCGIDLE _IOR('t', 63, struct ppp_idle) /* get idle time */ ++- ++-#define SIOCGPPPSTATS (SIOCDEVPRIVATE + 0) ++-#define SIOCGPPPVER (SIOCDEVPRIVATE + 1) /* NEVER change this!! */ ++-#define SIOCGPPPCSTATS (SIOCDEVPRIVATE + 2) ++- ++-#if !defined(ifr_mtu) ++-#define ifr_mtu ifr_ifru.ifru_metric ++-#endif ++- ++-__END_DECLS ++- ++-#endif /* net/if_ppp.h */ ++Index: glibc-2.27/sysdeps/unix/sysv/linux/net/route.h ++=================================================================== ++--- glibc-2.27.orig/sysdeps/unix/sysv/linux/net/route.h +++++ /dev/null ++@@ -1,144 +0,0 @@ ++-/* Copyright (C) 1997-2020 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 ++- . */ ++- ++-/* Based on the 4.4BSD and Linux version of this file. */ ++- ++-#ifndef _NET_ROUTE_H ++-#define _NET_ROUTE_H 1 ++- ++-#include ++-#include ++-#include ++-#include ++-#include ++- ++- ++-/* This structure gets passed by the SIOCADDRT and SIOCDELRT calls. */ ++-struct rtentry ++- { ++- unsigned long int rt_pad1; ++- struct sockaddr rt_dst; /* Target address. */ ++- struct sockaddr rt_gateway; /* Gateway addr (RTF_GATEWAY). */ ++- struct sockaddr rt_genmask; /* Target network mask (IP). */ ++- unsigned short int rt_flags; ++- short int rt_pad2; ++- unsigned long int rt_pad3; ++- unsigned char rt_tos; ++- unsigned char rt_class; ++-#if __WORDSIZE == 64 ++- short int rt_pad4[3]; ++-#else ++- short int rt_pad4; ++-#endif ++- short int rt_metric; /* +1 for binary compatibility! */ ++- char *rt_dev; /* Forcing the device at add. */ ++- unsigned long int rt_mtu; /* Per route MTU/Window. */ ++- unsigned long int rt_window; /* Window clamping. */ ++- unsigned short int rt_irtt; /* Initial RTT. */ ++- }; ++-/* Compatibility hack. */ ++-#define rt_mss rt_mtu ++- ++- ++-struct in6_rtmsg ++- { ++- struct in6_addr rtmsg_dst; ++- struct in6_addr rtmsg_src; ++- struct in6_addr rtmsg_gateway; ++- uint32_t rtmsg_type; ++- uint16_t rtmsg_dst_len; ++- uint16_t rtmsg_src_len; ++- uint32_t rtmsg_metric; ++- unsigned long int rtmsg_info; ++- uint32_t rtmsg_flags; ++- int rtmsg_ifindex; ++- }; ++- ++- ++-#define RTF_UP 0x0001 /* Route usable. */ ++-#define RTF_GATEWAY 0x0002 /* Destination is a gateway. */ ++- ++-#define RTF_HOST 0x0004 /* Host entry (net otherwise). */ ++-#define RTF_REINSTATE 0x0008 /* Reinstate route after timeout. */ ++-#define RTF_DYNAMIC 0x0010 /* Created dyn. (by redirect). */ ++-#define RTF_MODIFIED 0x0020 /* Modified dyn. (by redirect). */ ++-#define RTF_MTU 0x0040 /* Specific MTU for this route. */ ++-#define RTF_MSS RTF_MTU /* Compatibility. */ ++-#define RTF_WINDOW 0x0080 /* Per route window clamping. */ ++-#define RTF_IRTT 0x0100 /* Initial round trip time. */ ++-#define RTF_REJECT 0x0200 /* Reject route. */ ++-#define RTF_STATIC 0x0400 /* Manually injected route. */ ++-#define RTF_XRESOLVE 0x0800 /* External resolver. */ ++-#define RTF_NOFORWARD 0x1000 /* Forwarding inhibited. */ ++-#define RTF_THROW 0x2000 /* Go to next class. */ ++-#define RTF_NOPMTUDISC 0x4000 /* Do not send packets with DF. */ ++- ++-/* for IPv6 */ ++-#define RTF_DEFAULT 0x00010000 /* default - learned via ND */ ++-#define RTF_ALLONLINK 0x00020000 /* fallback, no routers on link */ ++-#define RTF_ADDRCONF 0x00040000 /* addrconf route - RA */ ++- ++-#define RTF_LINKRT 0x00100000 /* link specific - device match */ ++-#define RTF_NONEXTHOP 0x00200000 /* route with no nexthop */ ++- ++-#define RTF_CACHE 0x01000000 /* cache entry */ ++-#define RTF_FLOW 0x02000000 /* flow significant route */ ++-#define RTF_POLICY 0x04000000 /* policy route */ ++- ++-#define RTCF_VALVE 0x00200000 ++-#define RTCF_MASQ 0x00400000 ++-#define RTCF_NAT 0x00800000 ++-#define RTCF_DOREDIRECT 0x01000000 ++-#define RTCF_LOG 0x02000000 ++-#define RTCF_DIRECTSRC 0x04000000 ++- ++-#define RTF_LOCAL 0x80000000 ++-#define RTF_INTERFACE 0x40000000 ++-#define RTF_MULTICAST 0x20000000 ++-#define RTF_BROADCAST 0x10000000 ++-#define RTF_NAT 0x08000000 ++- ++-#define RTF_ADDRCLASSMASK 0xF8000000 ++-#define RT_ADDRCLASS(flags) ((uint32_t) flags >> 23) ++- ++-#define RT_TOS(tos) ((tos) & IPTOS_TOS_MASK) ++- ++-#define RT_LOCALADDR(flags) ((flags & RTF_ADDRCLASSMASK) \ ++- == (RTF_LOCAL|RTF_INTERFACE)) ++- ++-#define RT_CLASS_UNSPEC 0 ++-#define RT_CLASS_DEFAULT 253 ++- ++-#define RT_CLASS_MAIN 254 ++-#define RT_CLASS_LOCAL 255 ++-#define RT_CLASS_MAX 255 ++- ++- ++-#define RTMSG_ACK NLMSG_ACK ++-#define RTMSG_OVERRUN NLMSG_OVERRUN ++- ++-#define RTMSG_NEWDEVICE 0x11 ++-#define RTMSG_DELDEVICE 0x12 ++-#define RTMSG_NEWROUTE 0x21 ++-#define RTMSG_DELROUTE 0x22 ++-#define RTMSG_NEWRULE 0x31 ++-#define RTMSG_DELRULE 0x32 ++-#define RTMSG_CONTROL 0x40 ++- ++-#define RTMSG_AR_FAILED 0x51 /* Address Resolution failed. */ ++- ++-#endif /* net/route.h */ ++Index: glibc-2.27/sysdeps/unix/sysv/linux/netinet/if_ether.h ++=================================================================== ++--- glibc-2.27.orig/sysdeps/unix/sysv/linux/netinet/if_ether.h +++++ /dev/null ++@@ -1,104 +0,0 @@ ++-/* Copyright (C) 1996-2020 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 ++- . */ ++- ++-#ifndef __NETINET_IF_ETHER_H ++- ++-#define __NETINET_IF_ETHER_H 1 ++-#include ++-#include ++- ++-/* Get definitions from kernel header file. */ ++-#include ++- ++-#ifdef __USE_MISC ++-/* ++- * 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 ++-#include ++- ++-__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 */ ++- uint8_t arp_sha[ETH_ALEN]; /* sender hardware address */ ++- uint8_t arp_spa[4]; /* sender protocol address */ ++- uint8_t arp_tha[ETH_ALEN]; /* target hardware address */ ++- uint8_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 ++- ++-/* ++- * 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; */ \ ++- /* uint8_t enaddr[ETH_ALEN]; */ \ ++-{ \ ++- (enaddr)[0] = 0x01; \ ++- (enaddr)[1] = 0x00; \ ++- (enaddr)[2] = 0x5e; \ ++- (enaddr)[3] = ((uint8_t *)ipaddr)[1] & 0x7f; \ ++- (enaddr)[4] = ((uint8_t *)ipaddr)[2]; \ ++- (enaddr)[5] = ((uint8_t *)ipaddr)[3]; \ ++-} ++- ++-__END_DECLS ++-#endif /* __USE_MISC */ ++- ++-#endif /* netinet/if_ether.h */ diff --cc debian/patches/hurd-i386/submitted-path_mounted.diff index 000000000,000000000..40f850441 new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/submitted-path_mounted.diff @@@ -1,0 -1,0 +1,41 @@@ ++http://sourceware.org/ml/libc-alpha/2013-08/msg00207.html ++ ++From: Justus Winter <4winter@informatik.uni-hamburg.de> ++To: libc-alpha@sourceware.org ++Subject: [PATCH 2/2] Define _PATH_MOUNTED as "/etc/mtab" ++Date: Thu, 15 Aug 2013 10:43:35 +0200 ++ ++Change the definition of _PATH_MOUNTED to "/etc/mtab". This is the ++value used on Linux. ++ ++The change is motivated by the fact that on Debian /etc/mtab is a ++symbolic link to /proc/mounts. This patch adjusts the macro for ++non-linux systems such as Hurd. Changing this using ++sysdeps/mach/hurd/paths.h causes build problems because ++/usr/include/hurd/paths.h is shadowed by this file. This change is ++proposed in the hope that aligning the non-linux targets with the ++glibc for Linux is perceived as a good thing while fixing this problem ++on Debian/Hurd along the way. ++ ++* sysdeps/generic/paths.h (_PATH_MOUNTED): Change value to "/etc/mtab". ++--- ++ sysdeps/generic/paths.h | 2 +- ++ 2 files changed, 4 insertions(+), 1 deletion(-) ++ ++diff --git a/sysdeps/generic/paths.h b/sysdeps/generic/paths.h ++index 893b4c2..6b8f440 100644 ++--- a/sysdeps/generic/paths.h +++++ b/sysdeps/generic/paths.h ++@@ -51,7 +51,7 @@ ++ #define _PATH_MAN "/usr/share/man" ++ #define _PATH_MEM "/dev/mem" ++ #define _PATH_MNTTAB "/etc/fstab" ++-#define _PATH_MOUNTED "/var/run/mtab" +++#define _PATH_MOUNTED "/etc/mtab" ++ #define _PATH_NOLOGIN "/etc/nologin" ++ #define _PATH_PRESERVE "/var/lib" ++ #define _PATH_RWHODIR "/var/spool/rwho" ++-- ++1.7.10.4 ++ ++ diff --cc debian/patches/hurd-i386/sysvshm-lll.diff index 000000000,000000000..41e669196 new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/sysvshm-lll.diff @@@ -1,0 -1,0 +1,15 @@@ ++To be folded into tg-sysvshm.diff once upgraded to 2.33 ++ ++Index: glibc-2.31/hurd/sysvshm.c ++=================================================================== ++--- glibc-2.31.orig/hurd/sysvshm.c +++++ glibc-2.31/hurd/sysvshm.c ++@@ -45,7 +45,7 @@ struct sysvshm_attach ++ static struct sysvshm_attach *attach_list; ++ ++ /* A lock to protect the linked list of shared memory attachments. */ ++-static unsigned int sysvshm_lock = LLL_INITIALIZER; +++static unsigned int sysvshm_lock = LLL_LOCK_INITIALIZER; ++ ++ ++ /* Adds a segment attachment. */ diff --cc debian/patches/hurd-i386/tg-EGREGIOUS-fr.diff index 000000000,000000000..1587985a2 new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/tg-EGREGIOUS-fr.diff @@@ -1,0 -1,0 +1,26 @@@ ++From: Samuel Thibault ++Subject: [PATCH] t/EGREGIOUS-fr ++ ++Fix grammar in french translation for EGREGIOUS ++ ++Signed-off-by: Samuel Thibault ++ ++--- ++ po/fr.po | 2 +- ++ 1 file changed, 1 insertion(+), 1 deletion(-) ++ ++diff --git a/po/fr.po b/po/fr.po ++index 65f9a6a..0065098 100644 ++--- a/po/fr.po +++++ b/po/fr.po ++@@ -6459,7 +6459,7 @@ msgstr " ?" ++ #. TRANS You did @strong{what}? ++ #: sysdeps/gnu/errlist.c:969 ++ msgid "You really blew it this time" ++-msgstr "Vous avez vraiment tout gâcher cette fois-ci" +++msgstr "Vous avez vraiment tout gâché cette fois-ci" ++ ++ #. TRANS Go home and have a glass of warm, dairy-fresh milk. ++ #. TRANS @c Okay. Since you are dying to know, I'll tell you. ++-- ++tg: (7bb5f8a..) t/EGREGIOUS-fr (depends on: baseline) diff --cc debian/patches/hurd-i386/tg-EIEIO-fr.diff index 000000000,000000000..e7b394d1e new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/tg-EIEIO-fr.diff @@@ -1,0 -1,0 +1,24 @@@ ++From: Samuel Thibault ++Subject: [PATCH] Correction traduction « Computer bought the farm » ++ ++* po/fr.po: Fix EIEIO french translation. ++ ++Signed-off-by: Samuel Thibault ++ ++--- ++ po/fr.po | 2 +- ++ 1 file changed, 1 insertion(+), 1 deletion(-) ++ ++Index: glibc-2.21/po/fr.po ++=================================================================== ++--- glibc-2.21.orig/po/fr.po +++++ glibc-2.21/po/fr.po ++@@ -6464,7 +6464,7 @@ msgstr "Vous avez vraiment tout gâcher ++ #. TRANS @c an idiomatic funny way of saying that the computer died. ++ #: sysdeps/gnu/errlist.c:991 ++ msgid "Computer bought the farm" ++-msgstr "L'ordinateur a acheté la ferme" +++msgstr "L'ordinateur a cassé sa pipe" ++ ++ #. TRANS This error code has no purpose. ++ #: sysdeps/gnu/errlist.c:1000 diff --cc debian/patches/hurd-i386/tg-bigmem.diff index 000000000,000000000..111f62860 new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/tg-bigmem.diff @@@ -1,0 -1,0 +1,51 @@@ ++From: Samuel Thibault ++Subject: [PATCH] Allow the kernel to start earlier than VM_MAX_ADDRESS ++ ++VM_MAX_ADDRESS shouldn't be hardcoded in libc, the kernel should be able to ++decide about it dynamically. This fixes glibc into supporting that. It's however ++a bit hackish. ++ ++This kludge will however go out once we have a recent enough gnumach, ++anyway. ++ ++--- ++ sysdeps/mach/hurd/dl-sysdep.c | 26 ++++++++++++++++++++------ ++ 1 file changed, 20 insertions(+), 6 deletions(-) ++ ++--- a/sysdeps/mach/hurd/dl-sysdep.c +++++ b/sysdeps/mach/hurd/dl-sysdep.c ++@@ -87,12 +87,28 @@ static void fmh(void) { ++ max=a; break;} ++ fmha=a+=fmhs;} ++ if (err) assert(err==KERN_NO_SPACE); ++- if (!fmha)fmhs=0;else{ ++- fmhs=max-fmha; ++- err = __vm_map (__mach_task_self (), ++- &fmha, fmhs, 0, 0, MACH_PORT_NULL, 0, 1, ++- VM_PROT_NONE, VM_PROT_NONE, VM_INHERIT_COPY); ++- assert_perror(err);} +++ if (!fmha) +++ fmhs=0; +++ else +++ while (1) { +++ fmhs=max-fmha; +++ if (fmhs == 0) +++ break; +++ err = __vm_map (__mach_task_self (), +++ &fmha, fmhs, 0, 0, MACH_PORT_NULL, 0, 1, +++ VM_PROT_NONE, VM_PROT_NONE, VM_INHERIT_COPY); +++ if (!err) +++ break; +++ if (err != KERN_INVALID_ADDRESS && err != KERN_NO_SPACE) +++ assert_perror(err); +++ vm_address_t new_max = (max - 1) & 0xf0000000U; +++ if (new_max >= max) { +++ fmhs = 0; +++ fmha = 0; +++ break; +++ } +++ max = new_max; +++ } ++ } ++ /* XXX loser kludge for vm_map kernel bug */ ++ #endif diff --cc debian/patches/hurd-i386/tg-bits_atomic.h_multiple_threads.diff index 000000000,000000000..0f421574d new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/tg-bits_atomic.h_multiple_threads.diff @@@ -1,0 -1,0 +1,279 @@@ ++From: Thomas Schwinge ++Subject: [PATCH] bits_atomic.h_multiple_threads ++ ++TODO. bits/atomic.h for GNU Hurd. ++ ++Source: Debian, eglibc-2.10/debian/patches/hurd-i386/local-atomic-no-multiple_threads.diff, r3536. ++Author: Samuel Thibault ++ ++We always at least start the sigthread anyway. For now, let's avoid forking ++the file (which would mean having to maintain it). ++ ++Need to override sysdeps/i386/i486/bits/atomic.h to remove Linuxisms. ++ ++--- ++ sysdeps/i386/atomic-machine.h | 107 +++++++++++++++--------------------------- ++ 1 file changed, 37 insertions(+), 70 deletions(-) ++ ++Index: glibc-2.23/sysdeps/x86/atomic-machine.h ++=================================================================== ++--- glibc-2.23.orig/sysdeps/x86/atomic-machine.h +++++ glibc-2.23/sysdeps/x86/atomic-machine.h ++@@ -66,35 +66,26 @@ typedef uintmax_t uatomic_max_t; ++ ++ #define __arch_c_compare_and_exchange_val_8_acq(mem, newval, oldval) \ ++ ({ __typeof (*mem) ret; \ ++- __asm __volatile ("cmpl $0, %%" SEG_REG ":%P5\n\t" \ ++- "je 0f\n\t" \ ++- "lock\n" \ ++- "0:\tcmpxchgb %b2, %1" \ +++ __asm __volatile ("lock\n" \ +++ "\tcmpxchgb %b2, %1" \ ++ : "=a" (ret), "=m" (*mem) \ ++- : BR_CONSTRAINT (newval), "m" (*mem), "0" (oldval), \ ++- "i" (offsetof (tcbhead_t, multiple_threads))); \ +++ : BR_CONSTRAINT (newval), "m" (*mem), "0" (oldval)); \ ++ ret; }) ++ ++ #define __arch_c_compare_and_exchange_val_16_acq(mem, newval, oldval) \ ++ ({ __typeof (*mem) ret; \ ++- __asm __volatile ("cmpl $0, %%" SEG_REG ":%P5\n\t" \ ++- "je 0f\n\t" \ ++- "lock\n" \ ++- "0:\tcmpxchgw %w2, %1" \ +++ __asm __volatile ("lock\n" \ +++ "\tcmpxchgw %w2, %1" \ ++ : "=a" (ret), "=m" (*mem) \ ++- : BR_CONSTRAINT (newval), "m" (*mem), "0" (oldval), \ ++- "i" (offsetof (tcbhead_t, multiple_threads))); \ +++ : BR_CONSTRAINT (newval), "m" (*mem), "0" (oldval)); \ ++ ret; }) ++ ++ #define __arch_c_compare_and_exchange_val_32_acq(mem, newval, oldval) \ ++ ({ __typeof (*mem) ret; \ ++- __asm __volatile ("cmpl $0, %%" SEG_REG ":%P5\n\t" \ ++- "je 0f\n\t" \ ++- "lock\n" \ ++- "0:\tcmpxchgl %2, %1" \ +++ __asm __volatile ("lock\n" \ +++ "\tcmpxchgl %2, %1" \ ++ : "=a" (ret), "=m" (*mem) \ ++- : BR_CONSTRAINT (newval), "m" (*mem), "0" (oldval), \ ++- "i" (offsetof (tcbhead_t, multiple_threads))); \ +++ : BR_CONSTRAINT (newval), "m" (*mem), "0" (oldval)); \ ++ ret; }) ++ ++ #ifdef __x86_64__ ++@@ -210,24 +195,20 @@ typedef uintmax_t uatomic_max_t; ++ if (sizeof (*mem) == 1) \ ++ __asm __volatile (lock "xaddb %b0, %1" \ ++ : "=q" (__result), "=m" (*mem) \ ++- : "0" (__addval), "m" (*mem), \ ++- "i" (offsetof (tcbhead_t, multiple_threads))); \ +++ : "0" (__addval), "m" (*mem)); \ ++ else if (sizeof (*mem) == 2) \ ++ __asm __volatile (lock "xaddw %w0, %1" \ ++ : "=r" (__result), "=m" (*mem) \ ++- : "0" (__addval), "m" (*mem), \ ++- "i" (offsetof (tcbhead_t, multiple_threads))); \ +++ : "0" (__addval), "m" (*mem)); \ ++ else if (sizeof (*mem) == 4) \ ++ __asm __volatile (lock "xaddl %0, %1" \ ++ : "=r" (__result), "=m" (*mem) \ ++- : "0" (__addval), "m" (*mem), \ ++- "i" (offsetof (tcbhead_t, multiple_threads))); \ +++ : "0" (__addval), "m" (*mem)); \ ++ else if (__HAVE_64B_ATOMICS) \ ++ __asm __volatile (lock "xaddq %q0, %1" \ ++ : "=r" (__result), "=m" (*mem) \ ++ : "0" ((atomic64_t) cast_to_integer (__addval)), \ ++- "m" (*mem), \ ++- "i" (offsetof (tcbhead_t, multiple_threads))); \ +++ "m" (*mem)); \ ++ else \ ++ __result = do_exchange_and_add_val_64_acq (pfx, (mem), __addval); \ ++ __result; }) ++@@ -238,7 +220,7 @@ typedef uintmax_t uatomic_max_t; ++ __sync_fetch_and_add (mem, value) ++ ++ #define __arch_exchange_and_add_cprefix \ ++- "cmpl $0, %%" SEG_REG ":%P4\n\tje 0f\n\tlock\n0:\t" +++ "lock\n\t" ++ ++ #define catomic_exchange_and_add(mem, value) \ ++ __arch_exchange_and_add_body (__arch_exchange_and_add_cprefix, __arch_c, \ ++@@ -254,24 +236,20 @@ typedef uintmax_t uatomic_max_t; ++ else if (sizeof (*mem) == 1) \ ++ __asm __volatile (lock "addb %b1, %0" \ ++ : "=m" (*mem) \ ++- : IBR_CONSTRAINT (value), "m" (*mem), \ ++- "i" (offsetof (tcbhead_t, multiple_threads))); \ +++ : IBR_CONSTRAINT (value), "m" (*mem)); \ ++ else if (sizeof (*mem) == 2) \ ++ __asm __volatile (lock "addw %w1, %0" \ ++ : "=m" (*mem) \ ++- : "ir" (value), "m" (*mem), \ ++- "i" (offsetof (tcbhead_t, multiple_threads))); \ +++ : "ir" (value), "m" (*mem)); \ ++ else if (sizeof (*mem) == 4) \ ++ __asm __volatile (lock "addl %1, %0" \ ++ : "=m" (*mem) \ ++- : "ir" (value), "m" (*mem), \ ++- "i" (offsetof (tcbhead_t, multiple_threads))); \ +++ : "ir" (value), "m" (*mem)); \ ++ else if (__HAVE_64B_ATOMICS) \ ++ __asm __volatile (lock "addq %q1, %0" \ ++ : "=m" (*mem) \ ++ : "ir" ((atomic64_t) cast_to_integer (value)), \ ++- "m" (*mem), \ ++- "i" (offsetof (tcbhead_t, multiple_threads))); \ +++ "m" (*mem)); \ ++ else \ ++ do_add_val_64_acq (apfx, (mem), (value)); \ ++ } while (0) ++@@ -283,7 +262,7 @@ typedef uintmax_t uatomic_max_t; ++ __arch_add_body (LOCK_PREFIX, atomic, __arch, mem, value) ++ ++ #define __arch_add_cprefix \ ++- "cmpl $0, %%" SEG_REG ":%P3\n\tje 0f\n\tlock\n0:\t" +++ "lock\n\t" ++ ++ #define catomic_add(mem, value) \ ++ __arch_add_body (__arch_add_cprefix, atomic, __arch_c, mem, value) ++@@ -332,23 +311,19 @@ typedef uintmax_t uatomic_max_t; ++ if (sizeof (*mem) == 1) \ ++ __asm __volatile (lock "incb %b0" \ ++ : "=m" (*mem) \ ++- : "m" (*mem), \ ++- "i" (offsetof (tcbhead_t, multiple_threads))); \ +++ : "m" (*mem)); \ ++ else if (sizeof (*mem) == 2) \ ++ __asm __volatile (lock "incw %w0" \ ++ : "=m" (*mem) \ ++- : "m" (*mem), \ ++- "i" (offsetof (tcbhead_t, multiple_threads))); \ +++ : "m" (*mem)); \ ++ else if (sizeof (*mem) == 4) \ ++ __asm __volatile (lock "incl %0" \ ++ : "=m" (*mem) \ ++- : "m" (*mem), \ ++- "i" (offsetof (tcbhead_t, multiple_threads))); \ +++ : "m" (*mem)); \ ++ else if (__HAVE_64B_ATOMICS) \ ++ __asm __volatile (lock "incq %q0" \ ++ : "=m" (*mem) \ ++- : "m" (*mem), \ ++- "i" (offsetof (tcbhead_t, multiple_threads))); \ +++ : "m" (*mem)); \ ++ else \ ++ do_add_val_64_acq (pfx, mem, 1); \ ++ } while (0) ++@@ -359,7 +335,7 @@ typedef uintmax_t uatomic_max_t; ++ #define atomic_increment(mem) __arch_increment_body (LOCK_PREFIX, __arch, mem) ++ ++ #define __arch_increment_cprefix \ ++- "cmpl $0, %%" SEG_REG ":%P2\n\tje 0f\n\tlock\n0:\t" +++ "lock\n\t" ++ ++ #define catomic_increment(mem) \ ++ __arch_increment_body (__arch_increment_cprefix, __arch_c, mem) ++@@ -389,23 +365,19 @@ typedef uintmax_t uatomic_max_t; ++ if (sizeof (*mem) == 1) \ ++ __asm __volatile (lock "decb %b0" \ ++ : "=m" (*mem) \ ++- : "m" (*mem), \ ++- "i" (offsetof (tcbhead_t, multiple_threads))); \ +++ : "m" (*mem)); \ ++ else if (sizeof (*mem) == 2) \ ++ __asm __volatile (lock "decw %w0" \ ++ : "=m" (*mem) \ ++- : "m" (*mem), \ ++- "i" (offsetof (tcbhead_t, multiple_threads))); \ +++ : "m" (*mem)); \ ++ else if (sizeof (*mem) == 4) \ ++ __asm __volatile (lock "decl %0" \ ++ : "=m" (*mem) \ ++- : "m" (*mem), \ ++- "i" (offsetof (tcbhead_t, multiple_threads))); \ +++ : "m" (*mem)); \ ++ else if (__HAVE_64B_ATOMICS) \ ++ __asm __volatile (lock "decq %q0" \ ++ : "=m" (*mem) \ ++- : "m" (*mem), \ +++ : "m" (*mem)); \ ++- "i" (offsetof (tcbhead_t, multiple_threads))); \ ++ else \ ++ do_add_val_64_acq (pfx, mem, -1); \ ++ } while (0) ++@@ -416,7 +389,7 @@ typedef uintmax_t uatomic_max_t; ++ #define atomic_decrement(mem) __arch_decrement_body (LOCK_PREFIX, __arch, mem) ++ ++ #define __arch_decrement_cprefix \ ++- "cmpl $0, %%" SEG_REG ":%P2\n\tje 0f\n\tlock\n0:\t" +++ "lock\n\t" ++ ++ #define catomic_decrement(mem) \ ++ __arch_decrement_body (__arch_decrement_cprefix, __arch_c, mem) ++@@ -487,29 +460,25 @@ typedef uintmax_t uatomic_max_t; ++ if (sizeof (*mem) == 1) \ ++ __asm __volatile (lock "andb %b1, %0" \ ++ : "=m" (*mem) \ ++- : IBR_CONSTRAINT (mask), "m" (*mem), \ ++- "i" (offsetof (tcbhead_t, multiple_threads))); \ +++ : IBR_CONSTRAINT (mask), "m" (*mem)); \ ++ else if (sizeof (*mem) == 2) \ ++ __asm __volatile (lock "andw %w1, %0" \ ++ : "=m" (*mem) \ ++- : "ir" (mask), "m" (*mem), \ ++- "i" (offsetof (tcbhead_t, multiple_threads))); \ +++ : "ir" (mask), "m" (*mem)); \ ++ else if (sizeof (*mem) == 4) \ ++ __asm __volatile (lock "andl %1, %0" \ ++ : "=m" (*mem) \ ++- : "ir" (mask), "m" (*mem), \ ++- "i" (offsetof (tcbhead_t, multiple_threads))); \ +++ : "ir" (mask), "m" (*mem)); \ ++ else if (__HAVE_64B_ATOMICS) \ ++ __asm __volatile (lock "andq %q1, %0" \ ++ : "=m" (*mem) \ ++- : "ir" (mask), "m" (*mem), \ ++- "i" (offsetof (tcbhead_t, multiple_threads))); \ +++ : "ir" (mask), "m" (*mem)); \ ++ else \ ++ __atomic_link_error (); \ ++ } while (0) ++ ++ #define __arch_cprefix \ ++- "cmpl $0, %%" SEG_REG ":%P3\n\tje 0f\n\tlock\n0:\t" +++ "lock\n\t" ++ ++ #define atomic_and(mem, mask) __arch_and_body (LOCK_PREFIX, mem, mask) ++ ++@@ -516,23 +486,19 @@ typedef uintmax_t uatomic_max_t; ++ if (sizeof (*mem) == 1) \ ++ __asm __volatile (lock "orb %b1, %0" \ ++ : "=m" (*mem) \ ++- : IBR_CONSTRAINT (mask), "m" (*mem), \ ++- "i" (offsetof (tcbhead_t, multiple_threads))); \ +++ : IBR_CONSTRAINT (mask), "m" (*mem)); \ ++ else if (sizeof (*mem) == 2) \ ++ __asm __volatile (lock "orw %w1, %0" \ ++ : "=m" (*mem) \ ++- : "ir" (mask), "m" (*mem), \ ++- "i" (offsetof (tcbhead_t, multiple_threads))); \ +++ : "ir" (mask), "m" (*mem)); \ ++ else if (sizeof (*mem) == 4) \ ++ __asm __volatile (lock "orl %1, %0" \ ++ : "=m" (*mem) \ ++- : "ir" (mask), "m" (*mem), \ ++- "i" (offsetof (tcbhead_t, multiple_threads))); \ +++ : "ir" (mask), "m" (*mem)); \ ++ else if (__HAVE_64B_ATOMICS) \ ++ __asm __volatile (lock "orq %q1, %0" \ ++ : "=m" (*mem) \ ++- : "ir" (mask), "m" (*mem), \ ++- "i" (offsetof (tcbhead_t, multiple_threads))); \ +++ : "ir" (mask), "m" (*mem)); \ ++ else \ ++ __atomic_link_error (); \ ++ } while (0) diff --cc debian/patches/hurd-i386/tg-bootstrap.diff index 000000000,000000000..86c06f2dc new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/tg-bootstrap.diff @@@ -1,0 -1,0 +1,21 @@@ ++This dependency is missing, but would pose problem on Darwin ++ ++--- ++ sysdeps/mach/Makefile | 2 +- ++ 1 file changed, 1 insertion(+), 1 deletion(-) ++ ++diff --git a/sysdeps/mach/Makefile b/sysdeps/mach/Makefile ++index 7d8c67c316..059d393db9 100644 ++--- a/sysdeps/mach/Makefile +++++ b/sysdeps/mach/Makefile ++@@ -35,7 +35,7 @@ endif ++ # because it's different in Darwin and the conditional crap is ++ # too much trouble. This should suffice for getting the mach/Makefile ++ # rules invoked when they need to be. ++-mach-before-compile := $(mach-objpfx)mach-shortcuts.h \ +++mach-before-compile := $(mach-objpfx)mach-shortcuts.h $(mach-objpfx)mach/mach_interface.h \ ++ $(patsubst %,$(mach-objpfx)mach/mach_%.h,\ ++ port host) ++ ++-- ++tg: (7bb5f8a836..) t/bootstrap (depends on: baseline) diff --cc debian/patches/hurd-i386/tg-eintr.diff index 000000000,000000000..e9aea13b4 new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/tg-eintr.diff @@@ -1,0 -1,0 +1,31 @@@ ++commit 230b85f414291ac955827aba15cfbd103ab6ebdd ++Author: Samuel Thibault ++Date: Thu Jun 9 01:15:10 2016 +0200 ++ ++ Fix pipe() call returning EINTR sometimes ++ ++ because it uses a critical section ++ ++diff --git a/hurd/hurdsock.c b/hurd/hurdsock.c ++index 0f52f37..261f654 100644 ++--- a/hurd/hurdsock.c +++++ b/hurd/hurdsock.c ++@@ -52,6 +52,7 @@ _hurd_socket_server (int domain, int dead) ++ return MACH_PORT_NULL; ++ } ++ +++retry: ++ HURD_CRITICAL_BEGIN; ++ __mutex_lock (&lock); ++ ++@@ -102,6 +103,10 @@ _hurd_socket_server (int domain, int dead) ++ __mutex_unlock (&lock); ++ HURD_CRITICAL_END; ++ +++ if (!server && errno == EINTR) +++ /* Got a signal while inside an RPC of the critical section, retry again */ +++ goto retry; +++ ++ return server; ++ } ++ diff --cc debian/patches/hurd-i386/tg-glibc-2.24-restore-malloc-hook.diff index 000000000,000000000..a1a5a3e3d new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/tg-glibc-2.24-restore-malloc-hook.diff @@@ -1,0 -1,0 +1,15 @@@ ++Restore malloc hooks for mach-defpager until we have mlockall ready. ++ ++Index: glibc-2.24/malloc/malloc.c ++=================================================================== ++--- glibc-2.24.orig/malloc/malloc.c +++++ glibc-2.24/malloc/malloc.c ++@@ -1852,8 +1852,6 @@ static void *memalign_hook_ini (size_t a ++ ++ #if HAVE_MALLOC_INIT_HOOK ++ void weak_variable (*__malloc_initialize_hook) (void) = NULL; ++-compat_symbol (libc, __malloc_initialize_hook, ++- __malloc_initialize_hook, GLIBC_2_0); ++ #endif ++ ++ void weak_variable (*__free_hook) (void *__ptr, diff --cc debian/patches/hurd-i386/tg-hooks.diff index 000000000,000000000..e2d156d01 new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/tg-hooks.diff @@@ -1,0 -1,0 +1,63 @@@ ++From: Samuel Thibault ++Subject: [PATCH] t/hooks ++ ++Add link rules to sort hooks, otherwise they are not properly recorded ++ ++2012-04-21 Samuel Thibault ++ ++ * Makerules (shlib.lds): Add hurd hooks sorting rules. ++ ++Signed-off-by: Samuel Thibault ++ ++--- ++ Makerules | 39 +++++++++++++++++++++++++++++++++++++++ ++ 1 file changed, 39 insertions(+) ++ ++--- a/Makerules +++++ b/Makerules ++@@ -565,6 +565,45 @@ ++ PROVIDE(__start___libc_IO_vtables = .);\ ++ __libc_IO_vtables : { *(__libc_IO_vtables) }\ ++ PROVIDE(__stop___libc_IO_vtables = .);\ +++ PROVIDE(__start__hurd_fd_subinit = .);\ +++ _hurd_fd_subinit : { *(_hurd_fd_subinit) }\ +++ PROVIDE(__stop__hurd_fd_subinit = .);\ +++ PROVIDE(__start__hurd_XXX = .);\ +++ _hurd_XXX : { *(_hurd_XXX) }\ +++ PROVIDE(__stop__hurd_XXX = .);\ +++ PROVIDE(__start__hurd_subinit = .);\ +++ _hurd_subinit : { *(_hurd_subinit) }\ +++ PROVIDE(__stop__hurd_subinit = .);\ +++ PROVIDE(__start__hurd_proc_subinit = .);\ +++ _hurd_proc_subinit : { *(_hurd_proc_subinit) }\ +++ PROVIDE(__stop__hurd_proc_subinit = .);\ +++ PROVIDE(__start__hurd_reauth_hook = .);\ +++ _hurd_reauth_hook : { *(_hurd_reauth_hook) }\ +++ PROVIDE(__stop__hurd_reauth_hook = .);\ +++ PROVIDE(__start__hurd_pgrp_changed_hook = .);\ +++ _hurd_pgrp_changed_hook : { *(_hurd_pgrp_changed_hook) }\ +++ PROVIDE(__stop__hurd_pgrp_changed_hook = .);\ +++ PROVIDE(__start__hurd_preinit_hook = .);\ +++ _hurd_preinit_hook : { *(_hurd_preinit_hook) }\ +++ PROVIDE(__stop__hurd_preinit_hook = .);\ +++ PROVIDE(__start__hurd_fork_prepare_hook = .);\ +++ _hurd_fork_prepare_hook : { *(_hurd_fork_prepare_hook) }\ +++ PROVIDE(__stop__hurd_fork_prepare_hook = .);\ +++ PROVIDE(__start__hurd_fork_setup_hook = .);\ +++ _hurd_fork_setup_hook : { *(_hurd_fork_setup_hook) }\ +++ PROVIDE(__stop__hurd_fork_setup_hook = .);\ +++ PROVIDE(__start__hurd_fork_child_hook = .);\ +++ _hurd_fork_child_hook : { *(_hurd_fork_child_hook) }\ +++ PROVIDE(__stop__hurd_fork_child_hook = .);\ +++ PROVIDE(__start__hurd_fork_parent_hook = .);\ +++ _hurd_fork_parent_hook : { *(_hurd_fork_parent_hook) }\ +++ PROVIDE(__stop__hurd_fork_parent_hook = .);\ +++ PROVIDE(__start__hurd_fork_locks = .);\ +++ _hurd_fork_locks : { *(_hurd_fork_locks) }\ +++ PROVIDE(__stop__hurd_fork_locks = .);\ +++ PROVIDE(__start___pthread_init = .);\ +++ __pthread_init : { *(__pthread_init) }\ +++ PROVIDE(__stop___pthread_init = .);\ ++ /DISCARD/ : { *(.gnu.glibc-stub.*) }@' ++ test -s $@T ++ mv -f $@T $@ diff --cc debian/patches/hurd-i386/tg-ifaddrs_v6.diff index 000000000,000000000..ac0ebd362 new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/tg-ifaddrs_v6.diff @@@ -1,0 -1,0 +1,331 @@@ ++From: Samuel Thibault ++Subject: [PATCH] Workaround to add IPv6 support to getifaddrs ++ ++ifreq only contains sockaddr structures, which are not big enough for ++IPv6 addresses. This takes another, ugly, approach, by parsing fsysopts ++/servers/socket/2 options... ++ ++Signed-off-by: Samuel Thibault ++ ++--- ++ sysdeps/mach/hurd/ifaddrs.c | 310 ++++++++++++++++++++++++++++++++++++++++++++ ++ 1 file changed, 310 insertions(+) ++ ++diff --git a/sysdeps/mach/hurd/ifaddrs.c b/sysdeps/mach/hurd/ifaddrs.c ++new file mode 100644 ++index 0000000000..a07bd97715 ++--- /dev/null +++++ b/sysdeps/mach/hurd/ifaddrs.c ++@@ -0,0 +1,310 @@ +++/* getifaddrs -- get names and addresses of all network interfaces +++ Copyright (C) 2013-2015 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public +++ License as published by the Free Software Foundation; either +++ version 2.1 of the License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General Public License for more details. +++ +++ You should have received a copy of the GNU Lesser General Public +++ License along with the GNU C Library; if not, write to the Free +++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +++ 02111-1307 USA. */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++/* Create a linked list of `struct ifaddrs' structures, one for each +++ network interface on the host machine. If successful, store the +++ list in *IFAP and return 0. On errors, return -1 and set `errno'. */ +++int +++__getifaddrs (struct ifaddrs **ifap) +++{ +++ /* XXX: Hackish. This assumes pfinet parameter style, and that the same +++ pfinet is on /servers/socket/2 and /servers/socket/26. +++ +++ To be replaced by something like a netlink protocol, or fix ifreq into +++ using sockaddr_storage (but break existing compiled programs using it). */ +++ +++ file_t node; +++ char *argz = 0, *cur; +++ size_t argz_len = 0; +++ unsigned naddrs; +++ const char *ifa_name = NULL; +++ char *addr, *cidr_a; +++ int cidr; +++ +++ node = __file_name_lookup (_SERVERS_SOCKET "/2", 0, 0666); +++ +++ if (node == MACH_PORT_NULL) +++ return -1; +++ +++ __file_get_fs_options (node, &argz, &argz_len); +++ +++ __mach_port_deallocate (__mach_task_self (), node); +++ +++ /* XXX: Two hardcoded for lo */ +++ naddrs = 2; +++ +++ for (cur = argz; cur < argz + argz_len; cur = cur + strlen (cur) + 1) +++ { +++ if (!strncmp (cur, "--address=", 10)) +++ naddrs++; +++ else if (!strncmp (cur, "--address6=", 11)) +++ naddrs++; +++ } +++ +++ { +++ struct +++ { +++ struct ifaddrs ia; +++ struct sockaddr_storage addr, netmask, broadaddr; +++ char name[IF_NAMESIZE]; +++ } *storage; +++ int i; +++ struct sockaddr_in *sin; +++ struct sockaddr_in6 *sin6; +++ +++ storage = malloc (naddrs * sizeof storage[0]); +++ if (storage == NULL) +++ { +++ __munmap (argz, argz_len); +++ return -1; +++ } +++ +++ i = 0; +++ +++ /* XXX: Hardcoded lo interface */ +++ ifa_name = "lo"; +++ +++ /* 127.0.0.1/8 */ +++ storage[i].ia.ifa_next = &storage[i + 1].ia; +++ storage[i].ia.ifa_name = strncpy (storage[i].name, ifa_name, sizeof (storage[i].name)); +++ +++ storage[i].ia.ifa_addr = (struct sockaddr *) &storage[i].addr; +++ sin = ((struct sockaddr_in *) &storage[i].addr); +++ sin->sin_family = AF_INET; +++ sin->sin_len = sizeof(*sin); +++ sin->sin_port = 0; +++ sin->sin_addr.s_addr = htonl (INADDR_LOOPBACK); +++ +++ storage[i].ia.ifa_netmask = (struct sockaddr *) &storage[i].netmask; +++ sin = ((struct sockaddr_in *) &storage[i].netmask); +++ sin->sin_family = AF_INET; +++ sin->sin_len = sizeof(*sin); +++ sin->sin_port = 0; +++ sin->sin_addr.s_addr = htonl (IN_CLASSA_NET); +++ +++ storage[i].ia.ifa_broadaddr = (struct sockaddr *) &storage[i].addr; +++ +++ storage[i].ia.ifa_flags = IFF_UP | IFF_LOOPBACK | IFF_RUNNING; +++ +++ storage[i].ia.ifa_data = NULL; /* Nothing here for now. */ +++ +++ i++; +++ +++ /* ::1/128 */ +++ storage[i].ia.ifa_next = &storage[i + 1].ia; +++ storage[i].ia.ifa_name = strncpy (storage[i].name, ifa_name, sizeof (storage[i].name)); +++ +++ storage[i].ia.ifa_addr = (struct sockaddr *) &storage[i].addr; +++ sin6 = ((struct sockaddr_in6 *) &storage[i].addr); +++ sin6->sin6_family = AF_INET6; +++ sin6->sin6_len = sizeof(*sin6); +++ sin6->sin6_port = 0; +++ sin6->sin6_flowinfo = 0; +++ inet_pton (AF_INET6, "::1", &sin6->sin6_addr); +++ sin6->sin6_scope_id = 0; +++ +++ storage[i].ia.ifa_netmask = (struct sockaddr *) &storage[i].netmask; +++ sin6 = ((struct sockaddr_in6 *) &storage[i].netmask); +++ sin6->sin6_family = AF_INET6; +++ sin6->sin6_len = sizeof(*sin6); +++ sin6->sin6_port = 0; +++ sin6->sin6_flowinfo = 0; +++ inet_pton (AF_INET6, "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff", &sin6->sin6_addr); +++ sin6->sin6_scope_id = 0; +++ +++ storage[i].ia.ifa_broadaddr = NULL; +++ +++ storage[i].ia.ifa_flags = IFF_UP | IFF_LOOPBACK | IFF_RUNNING; +++ +++ storage[i].ia.ifa_data = NULL; /* Nothing here for now. */ +++ +++ for (cur = argz; cur < argz + argz_len; cur = cur + strlen (cur) + 1) +++ { +++ if (!strncmp (cur, "--interface=", 12)) +++ { +++ ifa_name = cur + 12; +++ continue; +++ } +++ +++ else if (!strncmp (cur, "--address=", 10)) +++ { +++ i++; +++ /* IPv4 address */ +++ addr = cur + 10; +++ +++ storage[i].ia.ifa_next = &storage[i + 1].ia; +++ storage[i].ia.ifa_name = strncpy (storage[i].name, ifa_name, sizeof (storage[i].name)); +++ +++ storage[i].ia.ifa_addr = (struct sockaddr *) &storage[i].addr; +++ sin = ((struct sockaddr_in *) &storage[i].addr); +++ sin->sin_family = AF_INET; +++ sin->sin_len = sizeof(*sin); +++ sin->sin_port = 0; +++ inet_pton (AF_INET, addr, &sin->sin_addr); +++ +++ storage[i].ia.ifa_netmask = NULL; +++ storage[i].ia.ifa_broadaddr = NULL; +++ +++ storage[i].ia.ifa_flags = IFF_UP | IFF_BROADCAST | IFF_RUNNING | IFF_MULTICAST; +++ storage[i].ia.ifa_data = NULL; /* Nothing here for now. */ +++ } +++ +++ else if (!strncmp (cur, "--netmask=", 10)) +++ { +++ /* IPv4 netmask */ +++ addr = cur + 10; +++ +++ storage[i].ia.ifa_netmask = (struct sockaddr *) &storage[i].netmask; +++ sin = ((struct sockaddr_in *) &storage[i].netmask); +++ sin->sin_family = AF_INET; +++ sin->sin_len = sizeof(*sin); +++ sin->sin_port = 0; +++ inet_pton (AF_INET, addr, &sin->sin_addr); +++ +++ storage[i].ia.ifa_broadaddr = (struct sockaddr *) &storage[i].broadaddr; +++ sin = ((struct sockaddr_in *) &storage[i].broadaddr); +++ sin->sin_family = AF_INET; +++ sin->sin_len = sizeof(*sin); +++ sin->sin_port = 0; +++ sin->sin_addr.s_addr = +++ ((struct sockaddr_in *) &storage[i].addr)->sin_addr.s_addr +++ | ~(((struct sockaddr_in *) &storage[i].netmask)->sin_addr.s_addr); +++ } +++ +++ else if (!strncmp (cur, "--peer=", 7)) +++ { +++ /* IPv4 peer */ +++ addr = cur + 7; +++ +++ storage[i].ia.ifa_dstaddr = (struct sockaddr *) &storage[i].broadaddr; +++ sin = ((struct sockaddr_in *) &storage[i].broadaddr); +++ sin->sin_family = AF_INET; +++ sin->sin_len = sizeof(*sin); +++ sin->sin_port = 0; +++ inet_pton (AF_INET, addr, &sin->sin_addr); +++ +++ storage[i].ia.ifa_flags &= ~IFF_BROADCAST; +++ storage[i].ia.ifa_flags |= IFF_POINTOPOINT; +++ } +++ +++ else if (!strncmp (cur, "--address6=", 11)) +++ { +++ i++; +++ /* IPv6 address */ +++ addr = cur + 11; +++ cidr_a = strchr (addr, '/'); +++ if (!cidr_a) +++ { +++ /* No CIDR length?! Assume 64. */ +++ addr = __strdup (addr); +++ cidr = 64; +++ } +++ else +++ { +++ addr = __strndup (addr, cidr_a - addr); +++ cidr = atoi (cidr_a + 1); +++ } +++ +++ storage[i].ia.ifa_next = &storage[i + 1].ia; +++ storage[i].ia.ifa_name = strncpy (storage[i].name, ifa_name, sizeof (storage[i].name)); +++ +++ storage[i].ia.ifa_addr = (struct sockaddr *) &storage[i].addr; +++ sin6 = ((struct sockaddr_in6 *) &storage[i].addr); +++ sin6->sin6_family = AF_INET6; +++ sin6->sin6_len = sizeof(*sin6); +++ sin6->sin6_port = 0; +++ sin6->sin6_flowinfo = 0; +++ inet_pton (AF_INET6, addr, &sin6->sin6_addr); +++ sin6->sin6_scope_id = 0; +++ +++ storage[i].ia.ifa_netmask = (struct sockaddr *) &storage[i].netmask; +++ sin6 = ((struct sockaddr_in6 *) &storage[i].netmask); +++ sin6->sin6_family = AF_INET6; +++ sin6->sin6_len = sizeof(*sin6); +++ sin6->sin6_port = 0; +++ sin6->sin6_flowinfo = 0; +++ sin6->sin6_addr.s6_addr32[0] = htonl (cidr >= 32 ? 0xffffffffUL : cidr <= 0 ? 0 : ~((1UL << ( 32 - cidr)) - 1)); +++ sin6->sin6_addr.s6_addr32[1] = htonl (cidr >= 64 ? 0xffffffffUL : cidr <= 32 ? 0 : ~((1UL << ( 64 - cidr)) - 1)); +++ sin6->sin6_addr.s6_addr32[2] = htonl (cidr >= 96 ? 0xffffffffUL : cidr <= 64 ? 0 : ~((1UL << ( 96 - cidr)) - 1)); +++ sin6->sin6_addr.s6_addr32[3] = htonl (cidr >= 128 ? 0xffffffffUL : cidr <= 96 ? 0 : ~((1UL << (128 - cidr)) - 1)); +++ sin6->sin6_scope_id = 0; +++ +++ storage[i].ia.ifa_broadaddr = NULL; +++ storage[i].ia.ifa_flags = IFF_UP | IFF_BROADCAST | IFF_RUNNING | IFF_MULTICAST; +++ storage[i].ia.ifa_data = NULL; /* Nothing here for now. */ +++ free (addr); +++ } +++ +++ else if (!strncmp (cur, "--peer6=", 8)) +++ { +++ /* IPv6 peer */ +++ addr = cur + 8; +++ +++ storage[i].ia.ifa_dstaddr = (struct sockaddr *) &storage[i].broadaddr; +++ sin6 = ((struct sockaddr_in6 *) &storage[i].broadaddr); +++ sin6->sin6_family = AF_INET6; +++ sin6->sin6_len = sizeof(*sin6); +++ sin6->sin6_port = 0; +++ sin6->sin6_flowinfo = 0; +++ inet_pton (AF_INET6, addr, &sin6->sin6_addr); +++ sin6->sin6_scope_id = 0; +++ +++ storage[i].ia.ifa_flags &= ~IFF_BROADCAST; +++ storage[i].ia.ifa_flags |= IFF_POINTOPOINT; +++ } +++ } +++ +++ storage[i].ia.ifa_next = NULL; +++ +++ *ifap = &storage[0].ia; +++ } +++ +++ __munmap (argz, argz_len); +++ +++ return 0; +++} +++weak_alias (__getifaddrs, getifaddrs) +++libc_hidden_def (__getifaddrs) +++#ifndef getifaddrs +++libc_hidden_weak (getifaddrs) +++#endif +++ +++void +++__freeifaddrs (struct ifaddrs *ifa) +++{ +++ free (ifa); +++} +++weak_alias (__freeifaddrs, freeifaddrs) +++libc_hidden_def (__freeifaddrs) +++libc_hidden_weak (freeifaddrs) ++-- ++tg: (7bb5f8a836..) t/ifaddrs_v6 (depends on: baseline) diff --cc debian/patches/hurd-i386/tg-libc_rwlock_recursive.diff index 000000000,000000000..c6410d5bc new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/tg-libc_rwlock_recursive.diff @@@ -1,0 -1,0 +1,67 @@@ ++From: Samuel Thibault ++Subject: [PATCH] XXX: make libc_rwlock recursive ++ ++Without making the rwlocks recursive, running fakeroot-tcp gets this: ++ ++#0 0x0106e91c in mach_msg_trap () at /usr/src/glibc-2.24/build-tree/hurd-i386-libc/mach/mach_msg_trap.S:2 ++#1 0x0106f090 in __mach_msg (msg=0x20034a0, option=3, send_size=64, rcv_size=32, rcv_name=421, timeout=0, notify=0) at msg.c:110 ++#2 0x0125a241 in __gsync_wait (task=1, addr=19101080, val1=2, val2=0, msec=0, flags=0) ++ at /usr/src/glibc-2.24/build-tree/hurd-i386-libc/mach/RPC_gsync_wait.c:175 ++#3 0x010b0743 in __dcigettext (domainname=0x8050740 <_libc_intl_domainname@@GLIBC_2.2.6> "libc", ++ msgid1=0x8051d88 "undefined symbol: acl_get_fd", msgid2=0x0, plural=0, n=0, category=5) at dcigettext.c:527 ++#4 0x010af776 in __dcgettext (domainname=0x8050740 <_libc_intl_domainname@@GLIBC_2.2.6> "libc", ++ msgid=0x8051d88 "undefined symbol: acl_get_fd", category=5) at dcgettext.c:47 ++#5 0x0124e427 in __dlerror () at dlerror.c:94 ++#6 0x01035ae3 in load_library_symbols () from /usr/lib/i386-gnu/libfakeroot/libfakeroot-tcp.so ++#7 0x01035cc3 in tmp___fxstat64 () from /usr/lib/i386-gnu/libfakeroot/libfakeroot-tcp.so ++#8 0x01036cd6 in __fxstat64 () from /usr/lib/i386-gnu/libfakeroot/libfakeroot-tcp.so ++#9 0x010ad831 in _nl_load_locale_from_archive (category=category@entry=0, namep=namep@entry=0x200399c) at loadarchive.c:211 ++#10 0x010ac45b in _nl_find_locale (locale_path=0x0, locale_path_len=0, category=category@entry=0, name=0x200399c) at findlocale.c:154 ++#11 0x010abde7 in setlocale (category=0, locale=0x804c2e4 "") at setlocale.c:417 ++#12 0x0804947f in main (argc=2, argv=0x2003ad4) at programs/locale.c:191 ++ ++That's very unfortunate: libfakeroot gets initialized from a section ++where __libc_setlocale_lock is already locked, and thus the dlerror() ++call hangs inside __dcigettext. It happens that Linux doesn't have ++the problem probably because pthread_rwlock_wrlock returns a EDEADLK ++error instead of hanging, and then the first unlock unlocks, and the ++second unlock probably returns an EINVAL. This is all very unsafe, but ++that's fakeroot-tcp's matter (see http://bugs.debian.org/845930 for the ++follow-up)... ++ ++We only use it when constructing the debian installer for -s -r options ++anyway. ++ ++Signed-off-by: Samuel Thibault ++ ++--- ++ sysdeps/mach/libc-lock.h | 18 +++++++++--------- ++ 1 file changed, 9 insertions(+), 9 deletions(-) ++ ++--- a/sysdeps/mach/libc-lock.h +++++ b/sysdeps/mach/libc-lock.h ++@@ -151,15 +151,15 @@ typedef cthread_key_t __libc_key_t; ++ __libc_lock_unlock_recursive (NAME) ++ ++ /* XXX for now */ ++-#define __libc_rwlock_define __libc_lock_define ++-#define __libc_rwlock_define_initialized __libc_lock_define_initialized ++-#define __libc_rwlock_init __libc_lock_init ++-#define __libc_rwlock_fini __libc_lock_fini ++-#define __libc_rwlock_rdlock __libc_lock_lock ++-#define __libc_rwlock_wrlock __libc_lock_lock ++-#define __libc_rwlock_tryrdlock __libc_lock_trylock ++-#define __libc_rwlock_trywrlock __libc_lock_trylock ++-#define __libc_rwlock_unlock __libc_lock_unlock +++#define __libc_rwlock_define __libc_lock_define_recursive +++#define __libc_rwlock_define_initialized __libc_lock_define_initialized_recursive +++#define __libc_rwlock_init __libc_lock_init_recursive +++#define __libc_rwlock_fini __libc_lock_fini_recursive +++#define __libc_rwlock_rdlock __libc_lock_lock_recursive +++#define __libc_rwlock_wrlock __libc_lock_lock_recursive +++#define __libc_rwlock_tryrdlock __libc_lock_trylock_recursive +++#define __libc_rwlock_trywrlock __libc_lock_trylock_recursive +++#define __libc_rwlock_unlock __libc_lock_unlock_recursive ++ ++ struct __libc_cleanup_frame ++ { diff --cc debian/patches/hurd-i386/tg-mach-hurd-link.diff index 000000000,000000000..6ee98edfa new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/tg-mach-hurd-link.diff @@@ -1,0 -1,0 +1,32 @@@ ++From: Samuel Thibault ++Subject: [PATCH] Add -lmachuser -lhurduser to libc.so on GNU/Hurd. ++ ++http://lists.gnu.org/archive/html/bug-hurd/2011-03/msg00112.html ++ ++2011-03-29 Samuel Thibault ++ ++ * Makerules ($(inst_libdir)/libc.so): Add -lmachuser -lhurduser to ++ libc.so on GNU/Hurd. ++ ++It's still unclear what we want to aim for. ++ ++--- ++ Makerules | 3 +++ ++ 1 file changed, 3 insertions(+) ++ ++diff --git a/Makerules b/Makerules ++index 53eabfaba8..b0f5e1b3a0 100644 ++--- a/Makerules +++++ b/Makerules ++@@ -1066,6 +1066,9 @@ $(inst_libdir)/libc.so: $(common-objpfx)format.lds \ ++ '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\ ++ ' AS_NEEDED (' $(rtlddir)/$(rtld-installed-name) ') )' \ ++ ) > $@.new +++ifeq ($(patsubst gnu%,,$(config-os)),) +++ echo 'INPUT ( AS_NEEDED ( -lmachuser -lhurduser ) )' >> $@.new +++endif ++ mv -f $@.new $@ ++ ++ endif ++-- ++tg: (7bb5f8a836..) t/mach-hurd-link (depends on: baseline) diff --cc debian/patches/hurd-i386/tg-sendmsg-SCM_CREDS.diff index 000000000,000000000..3f9c77c08 new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/tg-sendmsg-SCM_CREDS.diff @@@ -1,0 -1,0 +1,267 @@@ ++Subject: [PATCH] hurd: SCM_CREDS support ++ ++Svante Signell ++Samuel Thibault ++ ++ * sysdeps/mach/hurd/sendmsg.c (__libc_sendmsg): On SCM_CREDS ++ control messages, record uids, pass a rendez-vous port in the ++ control message, and call __auth_user_authenticate_request to ++ make auth send credentials on that port. Do not wait for a ++ reply. ++ * sysdeps/mach/hurd/recvmsg.c (contains_uid, contains_gid, ++ check_auth): New functions. ++ (__libc_recvmsg): On SCM_CREDS control messages, call check_auth ++ to check the passed credentials thanks to the answer from the ++ auth server. ++ * hurd/Makefile (user-interfaces): Add auth_request and ++ auth_reply. ++ ++--- ++ hurd/Makefile | 2 +- ++ sysdeps/mach/hurd/recvmsg.c | 137 ++++++++++++++++++++++++++++++++++++++++++++ ++ sysdeps/mach/hurd/sendmsg.c | 34 +++++++++++ ++ 3 files changed, 172 insertions(+), 1 deletion(-) ++ ++diff --git a/sysdeps/mach/hurd/recvmsg.c b/sysdeps/mach/hurd/recvmsg.c ++index 0200b13..b66e5b5 100644 ++--- a/sysdeps/mach/hurd/recvmsg.c +++++ b/sysdeps/mach/hurd/recvmsg.c ++@@ -23,6 +23,123 @@ ++ #include ++ #include ++ +++static unsigned +++contains_uid (unsigned int n, __uid_t uids[n], __uid_t uid) +++{ +++ unsigned i; +++ +++ for (i = 0; i < n; i++) +++ if (uids[i] == uid) +++ return 1; +++ return 0; +++} +++ +++static unsigned +++contains_gid (unsigned int n, __gid_t gids[n], __gid_t gid) +++{ +++ unsigned i; +++ +++ for (i = 0; i < n; i++) +++ if (gids[i] == gid) +++ return 1; +++ return 0; +++} +++ +++/* Check the passed credentials. */ +++static error_t +++check_auth (mach_port_t rendezvous, +++ __pid_t pid, +++ __uid_t uid, __uid_t euid, +++ __gid_t gid, +++ int ngroups, __gid_t groups[ngroups]) +++{ +++ error_t err; +++ size_t neuids = CMGROUP_MAX, nauids = CMGROUP_MAX; +++ size_t negids = CMGROUP_MAX, nagids = CMGROUP_MAX; +++ __uid_t euids_buf[neuids], auids_buf[nauids]; +++ __gid_t egids_buf[negids], agids_buf[nagids]; +++ __uid_t *euids = euids_buf, *auids = auids_buf; +++ __gid_t *egids = egids_buf, *agids = agids_buf; +++ +++ struct procinfo *pi = NULL; +++ mach_msg_type_number_t pi_size = 0; +++ int flags = PI_FETCH_TASKINFO; +++ char *tw = NULL; +++ size_t tw_size = 0; +++ unsigned i; +++ +++ err = __mach_port_mod_refs (mach_task_self (), rendezvous, +++ MACH_PORT_RIGHT_SEND, 1); +++ if (err) +++ goto out; +++ +++ do +++ err = __USEPORT +++ (AUTH, __auth_server_authenticate (port, +++ rendezvous, MACH_MSG_TYPE_COPY_SEND, +++ MACH_PORT_NULL, 0, +++ &euids, &neuids, &auids, &nauids, +++ &egids, &negids, &agids, &nagids)); +++ while (err == EINTR); +++ if (err) +++ goto out; +++ +++ /* Check whether this process indeed has these IDs */ +++ if ( !contains_uid (neuids, euids, uid) +++ && !contains_uid (nauids, auids, uid) +++ || !contains_uid (neuids, euids, euid) +++ && !contains_uid (nauids, auids, euid) +++ || !contains_gid (negids, egids, gid) +++ && !contains_gid (nagids, agids, gid) +++ ) +++ { +++ err = EIO; +++ goto out; +++ } +++ +++ /* Check groups */ +++ for (i = 0; i < ngroups; i++) +++ if ( !contains_gid (negids, egids, groups[i]) +++ && !contains_gid (nagids, agids, groups[i])) +++ { +++ err = EIO; +++ goto out; +++ } +++ +++ /* Check PID */ +++ /* XXX: Using proc_getprocinfo until +++ proc_user_authenticate proc_server_authenticate is implemented +++ */ +++ /* Get procinfo to check the owner. Maybe he faked the pid, but at least we +++ check the owner. */ +++ err = __USEPORT (PROC, __proc_getprocinfo (port, pid, &flags, +++ (procinfo_t *)&pi, +++ &pi_size, &tw, &tw_size)); +++ if (err) +++ goto out; +++ +++ if ( !contains_uid (neuids, euids, pi->owner) +++ && !contains_uid (nauids, auids, pi->owner)) +++ err = EIO; +++ +++out: +++ __mach_port_deallocate (__mach_task_self (), rendezvous); +++ if (euids != euids_buf) +++ __vm_deallocate (__mach_task_self(), (vm_address_t) euids, neuids * sizeof(uid_t)); +++ if (auids != auids_buf) +++ __vm_deallocate (__mach_task_self(), (vm_address_t) auids, nauids * sizeof(uid_t)); +++ if (egids != egids_buf) +++ __vm_deallocate (__mach_task_self(), (vm_address_t) egids, negids * sizeof(uid_t)); +++ if (agids != agids_buf) +++ __vm_deallocate (__mach_task_self(), (vm_address_t) agids, nagids * sizeof(uid_t)); +++ if (tw_size) +++ __vm_deallocate (__mach_task_self(), (vm_address_t) tw, tw_size); +++ if (pi_size) +++ __vm_deallocate (__mach_task_self(), (vm_address_t) pi, pi_size); +++ +++ return err; +++} +++ ++ /* Receive a message as described by MESSAGE from socket FD. ++ Returns the number of bytes read or -1 for errors. */ ++ ssize_t ++@@ -191,6 +308,21 @@ __libc_recvmsg (int fd, struct msghdr *message, int flags) ++ newfds++; ++ } ++ } +++ else if (cmsg->cmsg_level == SOL_SOCKET && cmsg->cmsg_type == SCM_CREDS) +++ { +++ /* SCM_CREDS support. */ +++ /* Check received credentials */ +++ struct cmsgcred *ucredp = (struct cmsgcred *) CMSG_DATA(cmsg); +++ +++ err = check_auth (ports[i], +++ ucredp->cmcred_pid, +++ ucredp->cmcred_uid, ucredp->cmcred_euid, +++ ucredp->cmcred_gid, +++ ucredp->cmcred_ngroups, ucredp->cmcred_groups); +++ if (err) +++ goto cleanup; +++ i++; +++ } ++ } ++ ++ for (i = 0; i < nports; i++) ++@@ -221,6 +353,11 @@ cleanup: ++ __mach_port_deallocate (__mach_task_self (), ports[ii]); ++ } ++ } +++ else if (cmsg->cmsg_level == SOL_SOCKET && cmsg->cmsg_type == SCM_CREDS) +++ { +++ __mach_port_deallocate (__mach_task_self (), ports[ii]); +++ ii++; +++ } ++ } ++ } ++ ++diff --git a/sysdeps/mach/hurd/sendmsg.c b/sysdeps/mach/hurd/sendmsg.c ++index 612581c..51167e8 100644 ++--- a/sysdeps/mach/hurd/sendmsg.c +++++ b/sysdeps/mach/hurd/sendmsg.c ++@@ -19,11 +19,13 @@ ++ #include ++ #include ++ #include +++#include ++ ++ #include ++ #include ++ #include ++ #include +++#include ++ #include "hurd/hurdsocket.h" ++ ++ /* Send a message described MESSAGE on socket FD. ++@@ -111,6 +111,8 @@ __libc_sendmsg (int fd, const struct msghdr *message, int flags) ++ if (cmsg->cmsg_level == SOL_SOCKET && cmsg->cmsg_type == SCM_RIGHTS) ++ nports += (cmsg->cmsg_len - CMSG_ALIGN (sizeof (struct cmsghdr))) ++ / sizeof (int); +++ else if (cmsg->cmsg_level == SOL_SOCKET && cmsg->cmsg_type == SCM_CREDS) +++ nports++; ++ ++ if (nports) ++ ports = __alloca (nports * sizeof (mach_port_t)); ++@@ -145,6 +147,38 @@ __libc_sendmsg (int fd, const struct msghdr *message, int flags) ++ goto out; ++ } ++ } +++ else if (cmsg->cmsg_level == SOL_SOCKET && cmsg->cmsg_type == SCM_CREDS) +++ { +++ /* SCM_CREDS support: send credentials. */ +++ mach_port_t rendezvous = __mach_reply_port (), reply; +++ struct cmsgcred *ucredp; +++ +++ err = __mach_port_insert_right (mach_task_self (), rendezvous, +++ rendezvous, MACH_MSG_TYPE_MAKE_SEND); +++ ports[nports++] = rendezvous; +++ if (err) +++ goto out; +++ +++ ucredp = (struct cmsgcred *) CMSG_DATA(cmsg); +++ /* Fill in credentials data */ +++ ucredp->cmcred_pid = __getpid(); +++ ucredp->cmcred_uid = __getuid(); +++ ucredp->cmcred_euid = __geteuid(); +++ ucredp->cmcred_gid = __getgid(); +++ ucredp->cmcred_ngroups = +++ __getgroups (sizeof (ucredp->cmcred_groups) / sizeof (gid_t), +++ ucredp->cmcred_groups); +++ +++ /* And make auth server authenticate us. */ +++ reply = __mach_reply_port(); +++ err = __USEPORT +++ (AUTH, __auth_user_authenticate_request (port, +++ reply, MACH_MSG_TYPE_MAKE_SEND_ONCE, +++ rendezvous, MACH_MSG_TYPE_MAKE_SEND)); +++ __mach_port_deallocate (__mach_task_self (), reply); +++ if (err) +++ goto out; +++ } ++ } ++ ++ if (addr) ++diff --git a/hurd/Makefile b/hurd/Makefile ++index 4387253..0ee417d 100644 ++--- a/hurd/Makefile +++++ b/hurd/Makefile ++@@ -33,7 +33,7 @@ inline-headers = hurd.h $(addprefix hurd/,fd.h signal.h \ ++ # The RPC interfaces go in a separate library. ++ interface-library := libhurduser ++ user-interfaces := $(addprefix hurd/,\ ++- auth startup \ +++ auth auth_request auth_reply startup \ ++ process process_request \ ++ msg msg_reply msg_request \ ++ exec exec_startup crash interrupt \ ++-- ++tg: (511e7f1..) t/sendmsg-SCM_CREDS (depends on: t/sendmsg-SCM_RIGHTS) diff --cc debian/patches/hurd-i386/tg-sysvshm.diff index 000000000,000000000..a439515f5 new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/tg-sysvshm.diff @@@ -1,0 -1,0 +1,793 @@@ ++From: Marcus Brinkmann ++Subject: [PATCH] Implement SysV shared memory for GNU/Hurd. ++ ++2005-07-11 Marcus Brinkmann ++ ++ * hurd/Makefile (routines): Add sysvshm. ++ (distribute): Add sysvshm.h. ++ * hurd/sysvshm.h: New file. ++ * hurd/sysvshm.c: New file. ++ * sysdeps/mach/hurd/bits/stat.h (S_IMMAP0): New macro. ++ (S_ISPARE): Unset the S_IMMAP0 flag. ++ * sysdeps/mach/hurd/ftok.c: New file. ++ * sysdeps/mach/hurd/shmat.c: New file. ++ * sysdeps/mach/hurd/shmctl.c: New file. ++ * sysdeps/mach/hurd/shmdt.c: New file. ++ * sysdeps/mach/hurd/bits/posix_opt.h: Define _XOPEN_SHM to 1. ++ ++TODO: ++“ ++> + char filename[sizeof (SHM_DIR) - 1 + SHM_NAMEMAX]; ++> + struct stat statbuf; ++> + ++> + sprintf (filename, SHM_DIR SHM_NAMEPRI, id); ++> + /* SysV requires read access for IPC_STAT. */ ++> + fd = __open (filename, O_NORW); ++> + if (fd < 0) ++> + { ++> + if (errno == ENOENT) ++> + errno = EINVAL; ++> + return -1; ++> + } ++ ++Since this is repeated in more than one function, put it into an ++internal subroutine. Then we have only one place doing the ++name-generation logic. ++” ++ ++“ ++> + case IPC_RMID: ++> + res = __unlink (filename); ++> + /* FIXME: Check error (mapping ENOENT to EINVAL). */ ++ ++Fix it. ++” ++ ++--- ++ hurd/Makefile | 1 ++ hurd/sysvshm.c | 97 ++++++++++++++ ++ hurd/sysvshm.h | 47 +++++++ ++ sysdeps/mach/hurd/bits/posix_opt.h | 4 ++ sysdeps/mach/hurd/ftok.c | 43 ++++++ ++ sysdeps/mach/hurd/shmat.c | 79 ++++++++++++ ++ sysdeps/mach/hurd/shmctl.c | 132 ++++++++++++++++++++ ++ sysdeps/mach/hurd/shmdt.c | 51 +++++++ ++ sysdeps/mach/hurd/shmget.c | 242 +++++++++++++++++++++++++++++++++++++ ++ 9 files changed, 694 insertions(+), 2 deletions(-) ++ ++--- a/hurd/Makefile +++++ b/hurd/Makefile ++@@ -55,6 +55,7 @@ ++ ports-get ports-set hurdports hurdmsg \ ++ errno-loc \ ++ hurdlock \ +++ sysvshm \ ++ $(sig) $(dtable) $(inlines) port-cleanup report-wait xattr ++ sig = hurdsig hurdfault siginfo hurd-raise preempt-sig \ ++ trampoline longjmp-ts catch-exc exc2signal hurdkill sigunwind \ ++--- /dev/null +++++ b/hurd/sysvshm.c ++@@ -0,0 +1,97 @@ +++/* 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. */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++/* Description of an shm attachment. */ +++struct sysvshm_attach +++{ +++ /* Linked list. */ +++ struct sysvshm_attach *next; +++ +++ /* Map address. */ +++ void *addr; +++ +++ /* Map size. */ +++ size_t size; +++}; +++ +++/* List of attachments. */ +++static struct sysvshm_attach *attach_list; +++ +++/* A lock to protect the linked list of shared memory attachments. */ +++static unsigned int sysvshm_lock = LLL_INITIALIZER; +++ +++ +++/* Adds a segment attachment. */ +++error_t +++__sysvshm_add (void *addr, size_t size) +++{ +++ struct sysvshm_attach *shm; +++ +++ shm = malloc (sizeof (*shm)); +++ if (!shm) +++ return errno; +++ +++ __mutex_lock (&sysvshm_lock); +++ shm->addr = addr; +++ shm->size = size; +++ shm->next = attach_list; +++ attach_list = shm; +++ __mutex_unlock (&sysvshm_lock); +++ +++ return 0; +++} +++ +++/* Removes a segment attachment. Returns its size if found, or EINVAL +++ otherwise. */ +++error_t +++__sysvshm_remove (void *addr, size_t *size) +++{ +++ struct sysvshm_attach *shm; +++ struct sysvshm_attach **pshm = &attach_list; +++ +++ __mutex_lock (&sysvshm_lock); +++ shm = attach_list; +++ while (shm) +++ { +++ shm = *pshm; +++ if (shm->addr == addr) +++ { +++ *pshm = shm->next; +++ *size = shm->size; +++ __mutex_unlock (&sysvshm_lock); +++ free (shm); +++ return 0; +++ } +++ pshm = &shm->next; +++ shm = shm->next; +++ } +++ __mutex_unlock (&sysvshm_lock); +++ return EINVAL; +++} ++--- /dev/null +++++ b/hurd/sysvshm.h ++@@ -0,0 +1,47 @@ +++/* 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. */ +++ +++#include +++#include +++ +++/* The area (from top to bottom) that is used for private keys. These +++ are all keys that have the second highest bit set. */ +++#define SHM_PRIV_KEY_START INT_MAX +++#define SHM_PRIV_KEY_END ((INT_MAX / 2) + 1) +++ +++#define SHM_PREFIX "sysvshm-" +++#define SHM_DIR _PATH_DEV "shm/" +++ +++/* The maximum number of characters in a shared memory segment file name. +++ 32 is the max number of characters in a 128 bit number in hex. */ +++#if __WORDSIZE > 128 +++#error Need to increase SHM_NAMEMAX. +++#else +++#define SHM_NAMEMAX (sizeof (SHM_PREFIX) - 1 + 32 + 1) +++#endif +++ +++/* Use this with printf and its variants. */ +++#define SHM_NAMEPRI SHM_PREFIX "%0x" +++ +++ +++/* Adds a segment attachment. */ +++error_t __sysvshm_add (void *addr, size_t size); +++ +++/* Removes a segment attachment. Returns its size if found, or EINVAL +++ otherwise. */ +++error_t __sysvshm_remove (void *addr, size_t *size); ++--- /dev/null +++++ b/sysdeps/mach/hurd/ftok.c ++@@ -0,0 +1,41 @@ +++/* Copyright (C) 1995, 1996, 2000, 2005 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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. */ +++ +++#include +++#include +++ +++ +++/* In the Hurd, we use the second-to-most-significant bit as flag for +++ private keys. We use a different order of the components so that +++ the biggest one---the inode number---is affected by this. */ +++ +++key_t +++ftok (const char *pathname, int proj_id) +++{ +++ struct stat64 st; +++ key_t key; +++ +++ if (__xstat64 (_STAT_VER, pathname, &st) < 0) +++ return (key_t) -1; +++ +++ key = ((st.st_dev & 0xff) | ((proj_id & 0xff) << 8) +++ | ((st.st_ino & 0x3fff) << 16)); +++ +++ return key; +++} ++--- /dev/null +++++ b/sysdeps/mach/hurd/shmat.c ++@@ -0,0 +1,82 @@ +++/* SysV shmat for Hurd. +++ Copyright (C) 2005-2015 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 +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++#include "sysvshm.h" +++ +++/* Attach the shared memory segment associated with SHMID to the data +++ segment of the calling process. SHMADDR and SHMFLG determine how +++ and where the segment is attached. */ +++void * +++__shmat (int shmid, const void *shmaddr, int shmflg) +++{ +++ error_t err; +++ char filename[sizeof (SHM_DIR) - 1 + SHM_NAMEMAX]; +++ int fd; +++ void *addr; +++ struct stat statbuf; +++ int res; +++ +++ sprintf (filename, SHM_DIR SHM_NAMEPRI, shmid); +++ fd = __open (filename, (shmflg & SHM_RDONLY) ? O_RDONLY : O_RDWR); +++ if (fd < 0) +++ { +++ if (errno == ENOENT) +++ errno = EINVAL; +++ return (void *) -1; +++ } +++ +++ res = __fstat (fd, &statbuf); +++ if (res < 0) +++ { +++ err = errno; +++ __close (fd); +++ errno = err; +++ return (void *) -1; +++ } +++ +++ addr = __mmap ((void *) shmaddr, statbuf.st_size, +++ PROT_READ | ((shmflg & SHM_RDONLY) ? 0 : PROT_WRITE), +++ MAP_SHARED, fd, 0); +++ __close (fd); +++ if (addr == MAP_FAILED) +++ return (void *) -1; +++ +++ err = __sysvshm_add (addr, statbuf.st_size); +++ if (err) +++ { +++ __munmap (addr, statbuf.st_size); +++ errno = err; +++ return (void *) -1; +++ } +++ +++ return addr; +++} +++ +++weak_alias(__shmat, shmat) ++--- /dev/null +++++ b/sysdeps/mach/hurd/shmctl.c ++@@ -0,0 +1,132 @@ +++/* 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. */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++#include "sysvshm.h" +++ +++/* Provide operations to control over shared memory segments. */ +++int +++__shmctl (int id, int cmd, struct shmid_ds *buf) +++{ +++ error_t err = 0; +++ int fd; +++ int res; +++ char filename[sizeof (SHM_DIR) - 1 + SHM_NAMEMAX]; +++ struct stat statbuf; +++ +++ sprintf (filename, SHM_DIR SHM_NAMEPRI, id); +++ /* SysV requires read access for IPC_STAT. */ +++ fd = __open (filename, O_NORW); +++ if (fd < 0) +++ { +++ if (errno == ENOENT) +++ errno = EINVAL; +++ return -1; +++ } +++ +++ res = __fstat (fd, &statbuf); +++ if (res < 0) +++ { +++ err = errno; +++ __close (fd); +++ errno = err; +++ return -1; +++ } +++ +++ switch (cmd) +++ { +++ case IPC_STAT: +++ +++ buf->shm_perm.__key = id; +++ buf->shm_perm.uid = statbuf.st_uid; +++ buf->shm_perm.gid = statbuf.st_gid; +++ +++ /* We do not support the creator. */ +++ buf->shm_perm.cuid = statbuf.st_uid; +++ buf->shm_perm.cgid = statbuf.st_gid; +++ +++ /* We just want the protection bits. */ +++ buf->shm_perm.mode = statbuf.st_mode & 0777; +++ /* Hopeless. We do not support a sequence number. */ +++ buf->shm_perm.__seq = statbuf.st_ino; +++ buf->shm_segsz = statbuf.st_size; +++ +++ /* Hopeless. We do not support any of these. */ +++ buf->shm_atime = statbuf.st_atime; +++ buf->shm_dtime = statbuf.st_mtime; +++ /* Well, this comes at least close. */ +++ buf->shm_ctime = statbuf.st_ctime; +++ +++ /* We do not support the PID. */ +++ buf->shm_cpid = 0; +++ buf->shm_lpid = 0; +++ +++ if (statbuf.st_mode & S_IMMAP0) +++ buf->shm_nattch = 0; +++ else +++ /* 42 is the answer. Of course this is bogus, but for most +++ applications, this should be fine. */ +++ buf->shm_nattch = 42; +++ +++ break; +++ +++ case IPC_SET: +++ if (statbuf.st_uid != buf->shm_perm.uid +++ || statbuf.st_gid != buf->shm_perm.gid) +++ { +++ res = __fchown (fd, +++ (statbuf.st_uid != buf->shm_perm.uid) +++ ? buf->shm_perm.uid : -1, +++ (statbuf.st_gid != buf->shm_perm.gid) +++ ? buf->shm_perm.gid : -1); +++ if (res < 0) +++ err = errno; +++ } +++ +++ if (!err && statbuf.st_mode & 0777 != buf->shm_perm.mode & 0777) +++ { +++ res = __fchmod (fd, (statbuf.st_mode & ~0777) +++ | (buf->shm_perm.mode & 0777)); +++ if (res < 0) +++ err = errno; +++ } +++ break; +++ +++ case IPC_RMID: +++ res = __unlink (filename); +++ /* FIXME: Check error (mapping ENOENT to EINVAL). */ +++ break; +++ +++ default: +++ err = EINVAL; +++ } +++ +++ __close (fd); +++ errno = err; +++ return err ? -1 : 0; +++} +++ +++weak_alias(__shmctl, shmctl) ++--- /dev/null +++++ b/sysdeps/mach/hurd/shmdt.c ++@@ -0,0 +1,51 @@ +++/* 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. */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++#include "sysvshm.h" +++ +++/* Detach shared memory segment starting at address specified by +++ SHMADDR from the caller's data segment. */ +++int +++__shmdt (const void *shmaddr) +++{ +++ error_t err; +++ size_t size; +++ +++ err = __sysvshm_remove ((void *) shmaddr, &size); +++ if (err) +++ { +++ errno = err; +++ return -1; +++ } +++ +++ __munmap ((void *) shmaddr, size); +++ return 0; +++} +++ +++weak_alias(__shmdt, shmdt) ++--- /dev/null +++++ b/sysdeps/mach/hurd/shmget.c ++@@ -0,0 +1,242 @@ +++/* 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. */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++#include +++ +++#include "sysvshm.h" +++ +++/* Create a new shared memory segment file without linking it into the +++ filesystem. Return the directory and file ports in R_DIR and R_FILE. */ +++static error_t +++create_shm_file (size_t size, int flags, file_t *r_dir, file_t *r_file) +++{ +++ error_t err; +++ file_t dir; +++ file_t file; +++ +++ flags &= 0777; +++ +++ /* Get a port to the directory that will contain the file. */ +++ dir = __file_name_lookup (SHM_DIR, 0, 0); +++ if (dir == MACH_PORT_NULL) +++ return errno; +++ +++ /* Create an unnamed file in the directory. */ +++ err = __dir_mkfile (dir, O_RDWR, flags, &file); +++ if (err) +++ { +++ __mach_port_deallocate (__mach_task_self (), dir); +++ return err; +++ } +++ +++ err = __file_set_size (file, size); +++ if (err) +++ { +++ __mach_port_deallocate (__mach_task_self (), file); +++ __mach_port_deallocate (__mach_task_self (), dir); +++ +++ return err; +++ } +++ +++ *r_dir = dir; +++ *r_file = file; +++ +++ return 0; +++} +++ +++ +++/* Open the shared memory segment *R_KEY and return a file descriptor +++ to it in R_FD. If KEY is IPC_PRIVATE, use a private key and return +++ it in R_KEY. */ +++static error_t +++get_exclusive (int shmflags, size_t size, key_t *r_key, int *r_fd) +++{ +++ error_t err; +++ file_t dir; +++ file_t file; +++ char filename[SHM_NAMEMAX]; +++ key_t key = *r_key; +++ bool is_private; +++ +++ /* Create the shared memory segment. */ +++ err = create_shm_file (size, shmflags, &dir, &file); +++ if (err) +++ return err; +++ +++ if (key == IPC_PRIVATE) +++ { +++ is_private = true; +++ key = SHM_PRIV_KEY_START; +++ +++ /* Try to link the shared memory segment into the filesystem +++ (exclusively). Private segments have negative keys. */ +++ do +++ { +++ sprintf (filename, SHM_NAMEPRI, key); +++ err = __dir_link (dir, file, filename, 1); +++ if (!err) +++ { +++ /* We are done. */ +++ *r_key = key; +++ break; +++ } +++ else if (err == EEXIST) +++ { +++ /* Check if we ran out of keys. If not, try again with new +++ key. */ +++ if (key == SHM_PRIV_KEY_END) +++ err = ENOSPC; +++ else +++ err = 0; +++ +++ key--; +++ } +++ } +++ while (!err); +++ } +++ else +++ { +++ /* Try to link the shared memory segment into the filesystem +++ (exclusively) under the given key. */ +++ sprintf (filename, SHM_NAMEPRI, key); +++ err = __dir_link (dir, file, filename, 1); +++ } +++ +++ __mach_port_deallocate (__mach_task_self (), dir); +++ +++ if (!err) +++ { +++ int fd; +++ +++ /* Get a file descriptor for that port. */ +++ fd = _hurd_intern_fd (file, O_RDWR, 1); /* dealloc on error */ +++ if (fd < 0) +++ err = errno; +++ else +++ *r_fd = fd; +++ } +++ +++ return err; +++} +++ +++ +++/* Open the shared memory segment KEY (creating it if it doesn't yet +++ exist) and return a file descriptor to it in R_FD. */ +++static error_t +++get_shared (int shmflags, size_t size, key_t key, int *r_fd) +++{ +++ error_t err = 0; +++ char filename[sizeof (SHM_DIR) - 1 + SHM_NAMEMAX]; +++ int fd = -1; +++ sprintf (filename, SHM_DIR SHM_NAMEPRI, key); +++ +++ do +++ { +++ fd = __open (filename, O_NORW, shmflags & 0777); +++ +++ if (fd < 0 && errno != ENOENT) +++ /* We give up. */ +++ return errno; +++ else if (fd >= 0) +++ { +++ int res; +++ struct stat statbuf; +++ +++ /* Check the size (we only need to do this if we did not +++ create the shared memory segment file ourselves). */ +++ res = __fstat (fd, &statbuf); +++ if (res < 0) +++ { +++ err = errno; +++ __close (fd); +++ return err; +++ } +++ +++ if (statbuf.st_size < size) +++ { +++ __close (fd); +++ return EINVAL; +++ } +++ } +++ else +++ { +++ /* The memory segment doesn't exist. */ +++ if (shmflags & IPC_CREAT) +++ { +++ /* Try to create it exclusively. */ +++ err = get_exclusive (shmflags, size, &key, &fd); +++ if (err == EEXIST) +++ /* If somebody created it in the meanwhile, just try again. */ +++ err = 0; +++ } +++ else +++ err = ENOENT; +++ } +++ } +++ while (fd < 0 && !err); +++ +++ if (!err) +++ *r_fd = fd; +++ else +++ *r_fd = -1; +++ +++ return err; +++} +++ +++/* Return an identifier for an shared memory segment of at least size +++ SIZE which is associated with KEY. */ +++int +++__shmget (key_t key, size_t size, int shmflags) +++{ +++ error_t err; +++ int fd; +++ +++ if (key == IPC_PRIVATE || shmflags & IPC_EXCL) +++ /* An exclusive shared memory segment must be created. */ +++ err = get_exclusive (shmflags, size, &key, &fd); +++ else +++ err = get_shared (shmflags, size, key, &fd); +++ +++ if (err) +++ { +++ errno = err; +++ return -1; +++ } +++ +++ /* From here, we can't fail. That's important, as otherwise we +++ would need to unlink the file if we created it (in that case, the +++ code above would have to be changed to pass a "created" flag down +++ to the caller). */ +++ +++ __close (fd); +++ +++ return key; +++} +++ +++weak_alias(__shmget, shmget) ++--- a/sysdeps/mach/hurd/bits/posix_opt.h +++++ b/sysdeps/mach/hurd/bits/posix_opt.h ++@@ -68,8 +68,8 @@ ++ /* X/Open thread realtime support is not supported. */ ++ #undef _XOPEN_REALTIME_THREADS ++ ++-/* XPG4.2 shared memory is not supported. */ ++-#undef _XOPEN_SHM +++/* XPG4.2 shared memory is supported. */ +++#define _XOPEN_SHM 1 ++ ++ /* Tell we have POSIX threads. */ ++ #define _POSIX_THREADS 200809L diff --cc debian/patches/hurd-i386/tg-thread-cancel.diff index 000000000,000000000..a0c15c77b new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/tg-thread-cancel.diff @@@ -1,0 -1,0 +1,92 @@@ ++From: Samuel Thibault ++Subject: [PATCH] The critical section lock _can_ be held in these place. ++ ++At least since hurd_thread_cancel can be called by another thread and lock our ++critical lock. ++ ++http://bugs.debian.org/46859 ++ ++“ ++Thomas suggested that there is no need to take the critical section ++lock. I believe that taking the critical section lock is necessary to ++prevent the target thread from entering a signal handler. Roland will ++look into the problem. ++” ++ ++Taking the critical section lock makes these assertions bogus. ++ ++It happens that hurd_thread_cancel is only called from libports and inside ++/hurd/term so this is rare in practice. ++ ++A reproducer can be found here: ++ ++http://lists.gnu.org/archive/html/bug-hurd/2014-05/msg00025.html ++ ++2006-08-05 Samuel Thibault ++ ++ * hurd/thread-cancel.c (hurd_thread_cancel): Do not assert that ++ `&ss->critical_section_lock' is unlocked. ++ * sysdeps/mach/hurd/jmp-unwind.c (_longjmp_unwind): Likewise, and take ++ critical section lock before taking the sigstate lock. ++ * sysdeps/mach/hurd/spawni.c (__spawni): Likewise. ++ ++--- ++ hurd/hurdexec.c | 1 - ++ hurd/thread-cancel.c | 2 -- ++ sysdeps/mach/hurd/jmp-unwind.c | 3 +-- ++ sysdeps/mach/hurd/spawni.c | 1 - ++ 4 files changed, 1 insertion(+), 6 deletions(-) ++ ++--- a/hurd/hurdexec.c +++++ b/hurd/hurdexec.c ++@@ -123,7 +123,6 @@ ++ ++ ss = _hurd_self_sigstate (); ++ ++- assert (! __spin_lock_locked (&ss->critical_section_lock)); ++ __spin_lock (&ss->critical_section_lock); ++ ++ _hurd_sigstate_lock (ss); ++--- a/hurd/thread-cancel.c +++++ b/hurd/thread-cancel.c ++@@ -51,7 +51,6 @@ ++ return 0; ++ } ++ ++- assert (! __spin_lock_locked (&ss->critical_section_lock)); ++ __spin_lock (&ss->critical_section_lock); ++ __spin_lock (&ss->lock); ++ err = __thread_suspend (thread); ++@@ -91,7 +90,6 @@ ++ int cancel; ++ ++ __spin_lock (&ss->lock); ++- assert (! __spin_lock_locked (&ss->critical_section_lock)); ++ cancel = ss->cancel; ++ ss->cancel = 0; ++ __spin_unlock (&ss->lock); ++--- a/sysdeps/mach/hurd/jmp-unwind.c +++++ b/sysdeps/mach/hurd/jmp-unwind.c ++@@ -49,9 +49,8 @@ ++ ++ /* All access to SS->active_resources must take place inside a critical ++ section where signal handlers cannot run. */ ++- __spin_lock (&ss->lock); ++- assert (! __spin_lock_locked (&ss->critical_section_lock)); ++ __spin_lock (&ss->critical_section_lock); +++ __spin_lock (&ss->lock); ++ ++ /* Remove local signal preemptors being unwound past. */ ++ while (ss->preemptors ++--- a/sysdeps/mach/hurd/spawni.c +++++ b/sysdeps/mach/hurd/spawni.c ++@@ -333,7 +333,6 @@ ++ ++ ss = _hurd_self_sigstate (); ++ ++- assert (! __spin_lock_locked (&ss->critical_section_lock)); ++ __spin_lock (&ss->critical_section_lock); ++ ++ _hurd_sigstate_lock (ss); ++--- ++tg: (9a079e2..) t/thread-cancel (depends on: baseline) diff --cc debian/patches/hurd-i386/tg-unlockpt-chroot.diff index 000000000,000000000..a8f0d17ba new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/tg-unlockpt-chroot.diff @@@ -1,0 -1,0 +1,22 @@@ ++From: Samuel Thibault ++Subject: [PATCH] Fix pty path in chroot ++ ++when e.g. using a chroot, the pty path is not so short. ++ ++--- ++ sysdeps/unix/bsd/unlockpt.c | 2 +- ++ 1 file changed, 1 insertion(+), 1 deletion(-) ++ ++Index: eglibc-2.16/sysdeps/unix/bsd/unlockpt.c ++=================================================================== ++--- eglibc-2.16.orig/sysdeps/unix/bsd/unlockpt.c 2012-07-23 00:23:14.000000000 +0200 +++++ eglibc-2.16/sysdeps/unix/bsd/unlockpt.c 2012-07-23 00:24:55.000000000 +0200 ++@@ -27,7 +27,7 @@ ++ int ++ unlockpt (int fd) ++ { ++- char buf[sizeof (_PATH_TTY) + 2]; +++ char buf[1024]; /* XXX */ ++ ++ /* BSD doesn't have a lock, but it does have `revoke'. */ ++ if (__ptsname_r (fd, buf, sizeof (buf))) diff --cc debian/patches/hurd-i386/unsubmitted-clock_t_centiseconds.diff index 000000000,000000000..27db59ec4 new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/unsubmitted-clock_t_centiseconds.diff @@@ -1,0 -1,0 +1,59 @@@ ++Some applications assume centisecond precision, or at most millisecond precision ++(e.g. guile). This is a work-around for them. ++ ++--- ++ getclktck.c | 5 ++--- ++ setitimer.c | 2 +- ++ times.c | 2 +- ++ 4 files changed, 8 insertions(+), 9 deletions(-) ++commit d57f2f9b4bd007846af2fb4217486ea572579010 ++Author: Richard Braun ++Date: Tue Aug 27 11:35:31 2013 +0200 ++ ++ Express CPU time (clock_t of times(2)) in centiseconds ++ ++diff --git a/sysdeps/mach/hurd/getclktck.c b/sysdeps/mach/hurd/getclktck.c ++index 69be2cc..5f7d946 100644 ++--- a/sysdeps/mach/hurd/getclktck.c +++++ b/sysdeps/mach/hurd/getclktck.c ++@@ -18,12 +18,11 @@ ++ ++ #include ++ ++-/* Return frequency of `times'. ++- Since Mach reports CPU times in microseconds, we always use 1 million. */ +++/* Return frequency of `times'. */ ++ int ++ __getclktck (void) ++ { ++- return 1000000; +++ return 100; ++ } ++ ++ /* Before glibc 2.2, the Hurd actually did this differently, so we ++diff --git a/sysdeps/mach/hurd/setitimer.c b/sysdeps/mach/hurd/setitimer.c ++index 39b6b16..4992c89 100644 ++--- a/sysdeps/mach/hurd/setitimer.c +++++ b/sysdeps/mach/hurd/setitimer.c ++@@ -42,7 +42,7 @@ quantize_timeval (struct timeval *tv) ++ static time_t quantum = -1; ++ ++ if (quantum == -1) ++- quantum = 1000000 / __getclktck (); +++ quantum = 100 / __getclktck (); ++ ++ tv->tv_usec = ((tv->tv_usec + (quantum - 1)) / quantum) * quantum; ++ if (tv->tv_usec >= 1000000) ++diff --git a/sysdeps/mach/hurd/times.c b/sysdeps/mach/hurd/times.c ++index 9e13a75..593c33a 100644 ++--- a/sysdeps/mach/hurd/times.c +++++ b/sysdeps/mach/hurd/times.c ++@@ -29,7 +29,7 @@ ++ static inline clock_t ++ clock_from_time_value (const time_value_t *t) ++ { ++- return t->seconds * 1000000 + t->microseconds; +++ return t->seconds * 100 + t->microseconds / 10000; ++ } ++ ++ /* Store the CPU time used by this process and all its diff --cc debian/patches/hurd-i386/unsubmitted-getaux_at_secure.diff index 000000000,000000000..7c7dbaf91 new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/unsubmitted-getaux_at_secure.diff @@@ -1,0 -1,0 +1,27 @@@ ++FIXME: sysdeps/mach/hurd/i386/init-first.c should instead pass an auxv ++to __libc_start_main ++ ++Index: glibc-2.28/misc/getauxval.c ++=================================================================== ++--- glibc-2.28.orig/misc/getauxval.c +++++ glibc-2.28/misc/getauxval.c ++@@ -18,6 +18,7 @@ ++ #include ++ #include ++ #include +++#include ++ ++ ++ unsigned long int ++@@ -27,6 +28,11 @@ __getauxval (unsigned long int type) ++ ElfW(auxv_t) *p; ++ #endif ++ +++#ifdef AT_SECURE +++ if (type == AT_SECURE) +++ return __libc_enable_secure; +++#endif +++ ++ #ifdef AT_HWCAP ++ if (type == AT_HWCAP) ++ return GLRO(dl_hwcap); diff --cc debian/patches/hurd-i386/unsubmitted-mremap.diff index 000000000,000000000..2349b94c1 new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/unsubmitted-mremap.diff @@@ -1,0 -1,0 +1,31 @@@ ++MREMAP is unimplemented on GNU/Hurd for now ++ ++TODO: glibc 2.32 implements it, drop this patch then. ++ ++--- a/bits/mman.h +++++ b/bits/mman.h ++@@ -85,10 +85,12 @@ ++ #define MS_INVALIDATE 2 /* Invalidate the caches. */ ++ ++ /* Flags for `mremap'. */ +++#if 0 ++ #ifdef __USE_GNU ++ # define MREMAP_MAYMOVE 1 /* Mapping address may change. */ ++ # define MREMAP_FIXED 2 /* Fifth argument sets new address. */ ++ #endif +++#endif ++ ++ /* Flags for `mlockall' (can be OR'd together). */ ++ #define MCL_CURRENT 1 /* Lock all currently mapped pages. */ ++--- a/malloc/memusage.c +++++ b/malloc/memusage.c ++@@ -680,6 +680,9 @@ mmap64 (void *start, size_t len, int pro ++ return result; ++ } ++ +++#ifndef MREMAP_FIXED +++#define MREMAP_FIXED 0 +++#endif ++ ++ /* `mremap' replacement. We do not have to keep track of the size since ++ `munmap' will get it as a parameter. */ diff --cc debian/patches/hurd-i386/unsubmitted-prof-eintr.diff index 000000000,000000000..6358389dd new file mode 100644 --- /dev/null +++ b/debian/patches/hurd-i386/unsubmitted-prof-eintr.diff @@@ -1,0 -1,0 +1,22 @@@ ++When profiling ext2fs, the shutdown stops all RPC, which thus interrupts this ++open, and we have to retry here. ++ ++TODO: is open really supposed to expose such EINTR? Should the generic gmon ++loop around EINTR (since there might be signals happening indeed) ++ ++Index: glibc-2.22/gmon/gmon.c ++=================================================================== ++--- glibc-2.22.orig/gmon/gmon.c +++++ glibc-2.22/gmon/gmon.c ++@@ -357,8 +357,11 @@ write_gmon (void) ++ ++ if (fd == -1) ++ { +++ do ++ fd = __open_nocancel ("gmon.out", O_CREAT|O_TRUNC|O_WRONLY|O_NOFOLLOW, ++ 0666); +++ while (fd < 0 && errno == EINTR); +++ ++ if (fd < 0) ++ { ++ char buf[300]; diff --cc debian/patches/i386/local-biarch.diff index 000000000,000000000..7d9e31308 new file mode 100644 --- /dev/null +++ b/debian/patches/i386/local-biarch.diff @@@ -1,0 -1,0 +1,16 @@@ ++# DP: Description: Allow ldconfig to work on i386/x86-64 biarch systems ++# DP: Related bugs: ++# DP: Dpatch author: Daniel Jacobowitz ++# DP: Patch author: Daniel Jacobowitz ++# DP: Upstream status: Debian-Specific ++# DP: Status Details: based on Ubuntu change by Jeff Bailey ++# DP: Date: 2005-10-13 ++ ++--- ++ sysdeps/unix/sysv/linux/i386/dl-cache.h | 1 + ++ 1 file changed, 1 insertion(+) ++ ++--- /dev/null +++++ b/sysdeps/unix/sysv/linux/i386/dl-cache.h ++@@ -0,0 +1 @@ +++#include diff --cc debian/patches/i386/unsubmitted-quiet-ldconfig.diff index 000000000,000000000..0b085fa21 new file mode 100644 --- /dev/null +++ b/debian/patches/i386/unsubmitted-quiet-ldconfig.diff @@@ -1,0 -1,0 +1,16 @@@ ++--- x/sysdeps/unix/sysv/linux/i386/readelflib.c 2012-03-21 14:25:11.000000000 -0600 +++++ x/sysdeps/unix/sysv/linux/i386/readelflib.c 2013-01-23 21:17:58.748565867 -0700 ++@@ -62,8 +62,11 @@ ++ #ifndef SKIP_EM_IA_64 ++ failed: ++ #endif ++- error (0, 0, _("%s is for unknown machine %d.\n"), ++- file_name, elf_header->e_machine); +++ if (opt_verbose) +++ { +++ error (0, 0, _("%s is for unknown machine %d.\n"), +++ file_name, elf_header->e_machine); +++ } ++ return 1; ++ } ++ diff --cc debian/patches/kfreebsd/local-config_h_in.patch index 000000000,000000000..531cad2cb new file mode 100644 --- /dev/null +++ b/debian/patches/kfreebsd/local-config_h_in.patch @@@ -1,0 -1,0 +1,20 @@@ ++2009-05-23 Aurelien Jarno ++ ++ * 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 ++ diff --cc debian/patches/kfreebsd/local-fbtl-depends.diff index 000000000,000000000..e249a3a6c new file mode 100644 --- /dev/null +++ b/debian/patches/kfreebsd/local-fbtl-depends.diff @@@ -1,0 -1,0 +1,18 @@@ ++--- a/nscd/Depend +++++ b/nscd/Depend ++@@ -1,2 +1,3 @@ ++ nptl ++ htl +++fbtl ++--- a/resolv/Depend +++++ b/resolv/Depend ++@@ -1,2 +1,3 @@ ++ nptl ++ htl +++fbtl ++--- a/rt/Depend +++++ b/rt/Depend ++@@ -1,2 +1,3 @@ ++ nptl ++ htl +++fbtl diff --cc debian/patches/kfreebsd/local-fbtl.diff index 000000000,000000000..068c8757c new file mode 100644 --- /dev/null +++ b/debian/patches/kfreebsd/local-fbtl.diff @@@ -1,0 -1,0 +1,74107 @@@ ++--- /dev/null +++++ b/fbtl/ANNOUNCE ++@@ -0,0 +1,92 @@ +++Now that the Linux kernel is once again able to run all the tests we +++have and since glibc 2.3 was released it was time for a new code drop. +++I've uploaded the second code drop for the Native POSIX Thread +++Library: +++ +++ ftp://people.redhat.com/drepper/nptl/nptl-0.2.tar.bz2 +++ +++You need +++ +++- the latest of Linus' kernel from BitKeeper (or 2.5.41 when it +++ is released); +++ +++- glibc 2.3 +++ +++- the very latest in tools such as +++ +++ + gcc either from the current development branch or the gcc 3.2 +++ from Red Hat Linux 8; +++ +++ + binutils preferrably from CVS, from H.J. Lu's latest release for +++ Linux, or from RHL 8. +++ +++ +++Compiling glibc should proceed smoothly. But there are a number of +++tests which fail, mostly because some functionality is missing in +++glibc. Ignore those errors. It is only important that all tests in +++nptl/ are passing. Run +++ +++ make subdirs=nptl check +++ +++to run all thread tests. +++ +++ +++This version features several improvements: +++ +++- all APIs are now implemented; +++ +++- fork handling has been improved; stacks in the child are freed; +++ atfork handlers are removed if they were registered from a module +++ which gets unloaded. +++ +++- pthread_tryjoin_np and pthread_timedjoin_np are implemented +++ +++- TSD handling corrected and optimized. +++ +++- many more tests which also test the underlying kernel implementation. +++ +++- the build infrastructure has been implemented so that the DSO and +++ archives are built in usable form and with correct named. +++ +++- libthread_db has been implemented. This is the library which is +++ needed by all program which need to get access to internals of +++ libpthread (mainly debuggers). +++ +++- the CPU clock functions are implemented +++ +++ +++ +++The white paper hasn't yet been updated. It's still available at +++ +++ http://people.redhat.com/drepper/nptl-design.pdf +++ +++ +++This release should be ready for some serious testing. I know it is +++hard to compile which I why I'm looking into providing binary RPMs. +++They can be used on non-critical systems. I'll only be able to +++provide binaries for RHL8 based systems, though, and the kernel still +++must be installed separately. +++ +++ +++The next steps will include: +++ +++- write more tests and fix the bugs which are discovered this way +++ +++- update the white paper +++ +++- write and run more performance tests +++ +++- port to IA-64 +++ +++ +++Interested parties are once again invited to join the mailing we +++created: +++ +++ +++ phil-list@redhat.com +++ +++Go to +++ +++ https://listman.redhat.com/mailman/listinfo/phil-list +++ +++to subscribe, unsubscribe, or review the archive. ++--- /dev/null +++++ b/fbtl/Banner ++@@ -0,0 +1 @@ +++Native POSIX Threads Library by Ulrich Drepper et al ++--- /dev/null +++++ b/fbtl/ChangeLog ++@@ -0,0 +1,12903 @@ +++2013-06-24 Vladimir Nikulichev +++ +++ [BZ #12310] +++ * pthread_exit.c: Add reference to pthread_create. +++ +++2013-06-22 Joseph Myers +++ +++ * pthread_getattr_default_np.c: Include . +++ +++2013-06-15 Siddhesh Poyarekar +++ +++ * Versions (libpthread): Add GLIBC_2.18. +++ (GLIBC_2.18): Add pthread_setattr_default_np and +++ pthread_getattr_default_np. +++ * allocatestack.c (allocate_stack): Synchronize read from +++ __default_pthread_attr. +++ (__reclaim_stacks): Initialize __default_pthread_attr_lock. +++ * nptl-init.c (__pthread_initialize_minimal_internal): +++ Synchronize write to __default_pthread_attr. +++ * pthreadP.h (__default_pthread_attr_lock): Declare. +++ * pthread_attr_getstacksize (__pthread_attr_getstacksize): +++ Synchronize read from __default_pthread_attr. +++ * pthread_create.c (__pthread_create_2_1): Make a local copy of +++ __default_pthread_attr. Check value of flags in IATTR even if +++ input ATTR is NULL. +++ * pthread_getattr_default_np.c: New file. +++ * pthread_setattr_default_np.c: New file. +++ * sysdeps/pthread/pthread.h [__USE_GNU] +++ (pthread_getattr_default_np, pthread_setattr_default_np): +++ Declare. +++ * tst-default-attr.c: New test case. +++ * Makefile (libpthread-routines): Add +++ pthread_setattr_default_np and pthread_getattr_default_np. +++ (tests): Add tst-default-attr. +++ * vars.c (__default_pthread_attr_lock): Declare and initialize. +++ +++2013-06-13 Siddhesh Poyarekar +++ Carlos O'Donell +++ +++ [BZ #15618] +++ * tst-pthread-attr-affinity: New test case. +++ * Makefile (tests): Add it. +++ * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c +++ (__pthread_attr_getaffinity_new): Copy minimum of source and +++ destination sizes to avoid a buffer overrun. +++ +++2013-06-10 Carlos O'Donell +++ +++ * sysdeps/unix/sysv/linux/i386/lowlevellock.h +++ (lll_futex_wake): Return syscall error. +++ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h +++ (lll_futex_wake): Return syscall error. +++ +++2013-08-06 Ondřej Bílka +++ +++ * sysdeps/pthread/allocalim.h: (__libc_use_alloca): Fix warning. +++ +++2013-06-06 Ondřej Bílka +++ +++ * tst-cond22.c: Fix leading whitespaces. +++ * tst-umask1.c: Likewise. +++ +++2013-06-06 Joseph Myers +++ +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Remove +++ trailing whitespace. +++ * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Likewise. +++ * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise. +++ * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise. +++ * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise. +++ * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise. +++ * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise. +++ * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise. +++ * sysdeps/unix/sysv/linux/sh/pthread_once.S: Likewise. +++ * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise. +++ * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise. +++ * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise. +++ * tst-mutexpp10.c: Likewise. +++ * tst-stackguard1.c: Likewise. +++ +++2013-05-31 Joseph Myers +++ +++ * Makefile ($(objpfx)libpthread.so): Remove dependencies on libc +++ and ld.so. +++ +++2013-05-16 Ryan S. Arnold +++ +++ * pthread_create.c: Add missing #include due to uint64_t or +++ uint32_t usage. +++ * sysdeps/pthread/createthread.c: Likewise. +++ +++2013-05-14 Andreas Jaeger +++ +++ [BZ #10686] +++ * sysdeps/x86_64/tls.h (struct tcbhead_t): Add __private_ss field. +++ * sysdeps/i386/tls.h (struct tcbhead_t): Likewise. +++ +++2013-05-09 Andi Kleen +++ +++ * tst-mutex8.c (do_test): Check for ENABLE_PI. +++ +++2013-04-22 Siddhesh Poyarekar +++ +++ * pthreadP.h (check_sched_policy_attr): New inline function. +++ (check_sched_priority_attr): Likewise. +++ (check_stacksize_attr): Likewise. +++ (__kernel_cpumask_size, __determine_cpumask_size): Declare +++ extern. +++ (check_cpuset_attr): New inline function. +++ * pthread_attr_setschedparam (__pthread_attr_setschedparam): +++ Use check_sched_priority_attr. +++ * pthread_attr_setschedpolicy.c +++ (__pthread_attr_setschedpolicy): Use check_sched_policy_attr. +++ * pthread_attr_setstack.c (__pthread_attr_setstack): Use +++ check_stacksize_attr. +++ * pthread_attr_setstacksize.c (__pthread_attr_setstacksize): +++ Likewise. +++ * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c +++ (__pthread_attr_setaffinity_new): Use check_cpuset_attr. +++ +++2013-04-11 Andreas Schwab +++ +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S +++ (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to +++ directly use absolute timeout. +++ +++2013-04-07 Carlos O'Donell +++ +++ * sysdeps/unix/sysv/linux/sem_post.c: Include atomic.h. +++ +++2013-04-04 Siddhesh Poyarekar +++ +++ [BZ #15337] +++ * sysdeps/unix/sysv/linux/x86_64/cancellation.S +++ [IS_IN_libpthread] +++ [SHARED && defined DO_VERSIONING && !defined NO_HIDDEN]: Mark +++ __pthread_unwind hidden. +++ +++2013-03-28 Roland McGrath +++ +++ * pthread_create.c (start_thread) [!SHARED]: +++ Call __call_tls_dtors only if it's not NULL. +++ +++2013-03-19 Siddhesh Poyarekar +++ +++ * allocatestack.c (allocate_stack): Use __default_pthread_attr +++ instead of __default_stacksize. +++ * nptl-init.c (__pthread_initialize_minimal_internal): +++ Likewise. Initialize guardsize. +++ * pthreadP.h (__default_pthread_attr): Declare. +++ * pthread_attr_getstacksize.c (__pthread_attr_getstacksize): +++ Use __default_pthread_attr instead of __default_stacksize. +++ * pthread_create.c (default_attr): Remove. +++ (__pthread_create_2_1): Use __default_pthread_attr instead of +++ default_attr. +++ * vars.c (__default_stacksize): Remove. +++ (__default_pthread_attr): New static variable to store +++ default thread attributes. +++ +++2013-03-18 Siddhesh Poyarekar +++ +++ * pthread_barrier_init.c (default_attr): Rename to +++ default_barrierattr. +++ (pthread_barrier_init): Adjust for the rename. +++ * pthread_mutex_init.c (default_attr): Rename to +++ default_mutexattr. +++ (__pthread_mutex_init): Adjust for the rename. +++ * pthread_rwlock_init.c (default_attr): Rebane to +++ default_rwlockattr. +++ (__pthread_rwlock_init): Adjust for the rename. +++ +++2013-03-12 Carlos O'Donell +++ +++ * sysdeps/unix/sysv/linux/lowlevellock.c: Include . +++ +++2013-03-04 Roland McGrath +++ +++ * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: +++ Change multiple inclusion guard to _LINUX_I686_DL_SYSDEP_H. +++ Use #include_next. +++ (HAVE_DL_DISCOVER_OSVERSION): Remove definition, now redundant. +++ (RTLD_PRIVATE_ERRNO): Likewise. +++ (NEED_DL_SYSINFO, DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): +++ Move macros and associated declaration to ... +++ * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: ... here. +++ Change multiple include guard to _LINUX_I386_DL_SYSDEP_H. +++ Use #include_next. +++ +++2013-03-01 Carlos O'Donell +++ +++ * Makefile (tests): Revert last change. +++ (tst-pthread-stack-env-ENV): Likewise. +++ * nptl-init.c (set_default_stacksize): Likewise. +++ (__pthread_initialize_minimal_internal): Likewise. +++ * tst-pthread-stack-env.c: Likewise. +++ +++2013-03-01 Siddhesh Poyarekar +++ +++ * tst-oddstacklimit.c: Include stdlib.h. +++ +++ * Makefile (tests): Add tst-pthread-stack-env. +++ (tst-pthread-stack-env-ENV): Set environment for test. +++ * nptl-init.c (set_default_stacksize): New function. +++ (__pthread_initialize_minimal_internal): Accept ARGC, ARGV and +++ ENVP. Initialize __ENVIRON and set __DEFAULT_STACKSIZE. +++ * tst-pthread-stack-env.c: New test case. +++ +++2013-02-21 David S. Miller +++ +++ * sysdeps/unix/sysv/linux/sparc/lowlevellock.h +++ (FUTEX_WAIT_REQUEUE_PI): Define. +++ (FUTEX_CMP_REQUEUE_PI): Likewise. +++ (lll_futex_wait_requeue_pi): Likewise. +++ (lll_futex_timed_wait_requeue_pi): Likewise. +++ (lll_futex_cmp_requeue_pi): Likewise. +++ +++2013-02-21 Carlos O'Donell +++ +++ * sysdeps/unix/sysv/linux/fork.c: Fix comment typo. +++ +++2013-02-18 Siddhesh Poyarekar +++ +++ * sysdeps/pthread/tst-timer.c: Include stdlib.h for declaration +++ of exit. +++ * tst-barrier4.c: Likewise. +++ * tst-robust7.c: Likewise. +++ +++ [BZ #14920] +++ * pthreadP.h (USE_REQUEUE_PI): New macro to check if mutex is +++ PI-aware. +++ * pthread_cond_broadcast.c (__pthread_cond_broadcast): Use +++ PI-aware futex operations if available and mutex is PI-aware. +++ * pthread_cond_signal.c (__pthread_cond_signal): Likewise. +++ * nptl/pthread_cond_timedwait.c (__pthread_cond_timedwait): +++ Likewise. +++ * pthread_cond_wait.c (__condvar_cleanup): Adjust lock if +++ cancellation occurred just after futex returned successfully +++ from a PI operation with the mutex held. +++ (__pthread_cond_wait): Use PI-aware futex operations if +++ available and mutex is PI-aware. +++ * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h +++ (FUTEX_WAIT_REQUEUE_PI): Define. +++ (FUTEX_CMP_REQUEUE_PI): Likewise. +++ (lll_futex_wait_requeue_pi): Likewise. +++ (lll_futex_timed_wait_requeue_pi): Likewise. +++ (lll_futex_cmp_requeue_pi): Likewise. +++ * nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h +++ (FUTEX_WAIT_REQUEUE_PI): Define. +++ (FUTEX_CMP_REQUEUE_PI): Likewise. +++ (lll_futex_wait_requeue_pi): Likewise. +++ (lll_futex_timed_wait_requeue_pi): Likewise. +++ (lll_futex_cmp_requeue_pi): Likewise. +++ * sysdeps/unix/sysv/linux/kernel-features.h: Define +++ __ASSUME_REQUEUE_PI for Linux version higher than 2.6.31. +++ +++2013-02-04 Andreas Schwab +++ +++ [BZ #14142] +++ * tst-cancel14.c: Include . +++ * tst-cancel15.c: Likewise. +++ * tst-mutex9.c: Include , and . +++ * tst-stackguard1.c: Include +++ +++2013-01-16 Andreas Schwab +++ +++ [BZ #14327] +++ * sem_open.c (sem_open): Use __mktemp instead of mktemp. +++ +++2013-01-11 Carlos O'Donell +++ +++ * allocatestack.c (allocate_stack): Add comment. Remove assert +++ on attr. +++ +++2013-01-11 H.J. Lu +++ +++ * Makefile (tst-cancel7-ARGS: Replace $(host-built-program-cmd) +++ with $(host-test-program-cmd). +++ (tst-exec4-ARGS): Likewise. +++ (tst-stackguard1-ARGS): Likewise. +++ ($(objpfx)tst-tls6.out): Don't pass $(elf-objpfx) to tst-tls6.sh. +++ Replace $(rtld-installed-name) with $(test-via-rtld-prefix). +++ * tst-tls6.sh (elf_objpfx): Removed. +++ (rtld_installed_name): Renamed to ... +++ (test_via_rtld_prefix): This. +++ (tst_tls5): Prepend ${test_via_rtld_prefix}. +++ +++2013-01-02 Joseph Myers +++ +++ * All files with FSF copyright notices: Update copyright dates +++ using scripts/update-copyrights. +++ +++2013-01-01 Joseph Myers +++ +++ * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Reformat +++ copyright notice. +++ +++2012-12-28 Andi Kleen +++ +++ * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Convert +++ to prototype. +++ * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): +++ Likewise. +++ +++2012-12-27 David S. Miller +++ +++ * sysdeps/unix/sysv/linux/sparc/lowlevellock.h +++ (lll_futex_timed_wait_bitset): New macro. +++ +++2012-12-27 Siddhesh Poyarekar +++ +++ * sysdeps/unix/sysv/linux/s390/lowlevellock.h (SYS_futex): +++ Remove definition. +++ (lll_futex_timed_wait): Replace assembly code with +++ INTERNAL_SYSCALL. +++ (lll_futex_timed_wait_bitset): Likewise. +++ (lll_futex_wake): Likewise. +++ (lll_futex_requeue): Likewise. +++ (lll_futex_wake_unlock): Likewise. +++ +++2012-12-08 Siddhesh Poyarekar +++ +++ * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): +++ Declare LOCAL_VAR as char. +++ +++2012-12-04 Joseph Myers +++ +++ * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__old_sem_post): +++ Cast result of atomic_increment_val to (void) instead of storing +++ in otherwise-unused variable. +++ +++2012-12-03 Allan McRae +++ +++ * Makefile (LDFLAGS-tst-cond24, LDFLAGS-tst-cond25): Remove. +++ +++2012-11-26 H.J. Lu +++ +++ * unwind.c (__pthread_unwind): Pass address of unwind_cleanup +++ to THREAD_SETMEM. +++ * sysdeps/i386/tls.h: Include . +++ (THREAD_SETMEM): Use cast_to_integer before casting to uint64_t. +++ (THREAD_SETMEM_NC): Likewise. +++ * sysdeps/x86_64/tls.h: Include . +++ (THREAD_SETMEM): Use cast_to_integer before casting to uint64_t. +++ (THREAD_SETMEM_NC): Likewise. +++ +++2012-11-21 Joseph Myers +++ +++ * sysdeps/unix/sysv/linux/sem_post.c (__old_sem_post): Cast result +++ of atomic_increment_val to (void) instead of storing in +++ otherwise-unused variable. +++ +++ * pthread_cond_timedwait.c (__pthread_cond_timedwait) +++ [__NR_clock_gettime]: Cast result of INTERNAL_VSYSCALL to void +++ instead of storing in otherwise-unused variable. +++ +++2012-11-14 Marcus Shawcroft +++ +++ * Makefile (CFLAGS-open.c, CFLAGS-open64.c, CFLAGS-pause.c) +++ (CFLAGS-recv.c, CFLAGS-send.c): Define. +++ +++2012-11-06 Chris Metcalf +++ +++ * tst-sem14.c (TIMEOUT): Set timeout to 10 seconds. +++ * tst-cond24.c (TIMEOUT): Increase from 10 to 20 seconds. +++ +++2012-11-05 Siddhesh Poyarekar +++ +++ * pthread_cond_timedwait.c (__pthread_cond_timedwait): Time out +++ if absolute timeout is negative. +++ [__ASSUME_FUTEX_CLOCK_REALTIME && +++ lll_futex_timed_wait_bitset]: Use lll_futex_timed_wait_bitset. +++ * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock): +++ Likewise. +++ * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock): +++ Likewise. +++ * sysdeps/unix/sysv/linux/lowlevelrobustlock.c +++ (__lll_robust_timedlock_wait): Likewise. +++ * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h +++ (lll_futex_timed_wait_bitset): New macro. +++ * sysdeps/unix/sysv/linux/s390/lowlevellock.h +++ (lll_futex_timed_wait_bitset): Likewise. +++ +++2012-11-03 David S. Miller +++ +++ * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (BUSY_WAIT_NOP): +++ Add missing spaces. +++ (__cpu_relax): Likewise. +++ +++2012-11-02 H.J. Lu +++ +++ * sysdeps/x86_64/tls.h: Don't include . +++ (__128bits): New struct typedef. +++ (tcbhead_t): Replace __m128 with __128bits. +++ +++2012-10-30 Aurelien Jarno +++ Joseph Myers +++ +++ * Makefile (tst-cancel7-ARGS): Use exec in --command argument. +++ +++2012-10-28 David S. Miller +++ +++ * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (BUSY_WAIT_NOP): +++ Define when we have v9 instructions available. +++ * sysdeps/unix/sysv/linux/sparc/sparc64/cpu_relax.S: New file. +++ * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/cpu_relax.S: New +++ file. +++ * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/Makefile: New +++ file. +++ * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Add cpu_relax +++ to libpthread-routines. +++ +++2012-10-25 Roland McGrath +++ +++ * tst-cond-except.c (TEST_FUNCTION): New macro. +++ +++2012-10-25 Joseph Myers +++ +++ * Makefile ($(objpfx)tst-tls6.out): Use $(BASH) not $(SHELL) to +++ run tst-tls6.sh. +++ * tst-tls6.sh: Use /bin/bash not /bin/sh. +++ +++2012-10-25 Roland McGrath +++ +++ * tst-basic2.c (do_test): Return RESULT, not always zero. +++ +++ * tst-cond25.c: Include +++ (waiter): Add casts to uintptr_t between casting integer<->pointer. +++ (timed_waiter): Likewise. +++ (do_test_wait): Likewise. +++ * tst-cond-except.c (thr): Likewise. +++ (do_test): Use prototype definition. +++ +++2012-10-24 Joseph Myers +++ Jim Blandy +++ +++ * Makefile ($(objpfx)tst-tls6.out): Pass $(test-wrapper-env) to +++ tst-tls6.sh. +++ * tst-tls6.sh (test_wrapper_env): New variable. Use it to run +++ programs with LD_PRELOAD set. +++ +++2012-10-24 Roland McGrath +++ +++ * Makefile ($(objpfx)tst-cond11, $(objpfx)tst-cond19): Targets removed. +++ ($(objpfx)tst-sem5, $(objpfx)tst-cancel18): Likewise. +++ ((objpfx)tst-cancelx18, $(objpfx)tst-clock2): Likewise. +++ ($(objpfx)tst-rwlock14): Likewise. +++ +++2012-10-24 Joseph Myers +++ +++ * Makefile (tests): Remove tst-oddstacklimit. +++ (test-srcs): New variable. +++ (tst-oddstacklimit-ENV): Remove. +++ [$(run-built-tests) = yes] (tests): Depend on +++ $(objpfx)tst-oddstacklimit.out. +++ [$(run-built-tests) = yes] ($(objpfx)tst-oddstacklimit.out): New +++ target. +++ * tst-oddstacklimit.c: Do not include "tst-basic1.c". Use +++ setrlimit before executing tst-basic1 test passed to --command. +++ +++2012-10-23 Joseph Myers +++ +++ * Makefile [$(cross-compiling) = no]: Change condition to +++ [$(run-built-tests) = yes]. +++ +++2012-10-23 Jim Blandy +++ Joseph Myers +++ +++ * Makefile (tst-cancel7-ARGS): Use $(host-built-program-cmd). +++ (tst-exec4-ARGS): Likewise. +++ (tst-stackguard1-ARGS): Likewise. +++ +++2012-10-21 Jim Blandy +++ Joseph Myers +++ +++ * Makefile ($(objpfx)tst-cancel-wrappers.out): Pass $(NM) to +++ tst-cancel-wrappers.sh. +++ * tst-cancel-wrappers.sh: Use nm program given as first argument, +++ not hardcoded "nm". +++ +++2012-10-17 Siddhesh Poyarekar +++ +++ * tst-cond25.c (do_test_wait): Don't check for return value from +++ pthread_cancel. +++ +++2012-10-16 Siddhesh Poyarekar +++ +++ [BZ #14652] +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S +++ (__condvar_tw_cleanup): Adjust the mutex data structure if it +++ was locked by FUTEX_WAIT_REQUEUE_PI. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait +++ (__condvar_w_cleanup): Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S +++ (__condvar_cleanup2): Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S +++ (__condvar_cleanup1): Likewise. +++ +++2012-10-10 Carlos O'Donell +++ +++ * sysdeps/pthread/pthread.h [!(defined __GNUC__ && +++ defined __EXCEPTIONS) && defined __USE_GNU] +++ (pthread_cleanup_push_defer_np): Fix formatting. +++ +++2012-10-10 Siddhesh Poyarekar +++ +++ [BZ #14652] +++ * Makefile (tests): New test case tst-cond25. +++ (LDFLAGS-tst-cond25): Link tst-cond25 against librt. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S +++ (__condvar_tw_cleanup): Lock mutex only if we don't already +++ own it. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S +++ (__condvar_w_cleanup): Likewise. +++ * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add TID_MASK. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S +++ (__condvar_cleanup2): Lock mutex only if we don't already +++ own it. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S +++ (__condvar_cleanup1): Likewise. +++ * tst-cond25.c: New test case. +++ +++2012-10-09 Roland McGrath +++ +++ * sysdeps/pthread/configure: Regenerated. +++ * sysdeps/x86_64/configure: Regenerated. +++ +++2012-10-05 David S. Miller +++ +++ [BZ #14568] +++ * sysdeps/sparc/tls.h (DB_THREAD_SELF_INCLUDE): Delete. +++ (DB_THREAD_SELF): Use constants for the register offsets. Correct +++ the case of a 64-bit debugger with a 32-bit inferior. +++ +++2012-10-05 H.J. Lu +++ +++ [BZ #14557] +++ * Makefile (tests-static): Add tst-cancel24-static, +++ tst-cond8-static tst-mutex8-static, tst-mutexpi8-static, +++ tst-sem11-static and tst-sem12-static. +++ (tests): Likewise. +++ (LDLIBS-tst-cancel24-static): New macro. +++ * tst-cancel24-static.cc: New file. +++ * tst-cond8-static.c: Likewise. +++ * tst-mutex8-static.c: Likewise. +++ * tst-mutexpi8-static.c: Likewise. +++ * tst-sem11-static.c: Likewise. +++ * tst-sem12-static.c: Likewise. +++ +++2012-10-05 Siddhesh Poyarekar +++ +++ [BZ #14417] +++ * Makefile (tests): New test case tst-cond24. +++ (LDFLAGS-tst-cond24): Link tst-cond24 against librt. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S +++ (__pthread_cond_timedwait): Unlock mutex before going back to +++ wait in PI case. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S +++ (__pthread_cond_wait): Likewise. Revert handling of EAGAIN +++ return from futex_wait. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S +++ (__pthread_cond_timedwait): Unlock mutex before going back to +++ wait in PI case. Set requeue_pi flag only if wait returned 0. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S +++ (__pthread_cond_wait): Likewise. Revert handling of EAGAIN +++ return from futex_wait. +++ * tst-cond24.c: New test case. +++ +++2012-10-04 Roland McGrath +++ +++ * pthread_create.c (start_thread): Use __madvise, not madvise. +++ +++2012-10-02 H.J. Lu +++ +++ * sysdeps/i386/tls.h: Update copyright years. +++ +++2012-10-02 Siddhesh Poyarekar +++ +++ * pthread_create.c (start_thread): Fix clone flag name in +++ comment to CLONE_CHILD_CLEARTID. +++ * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise. +++ * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise. +++ * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise. +++ * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise. +++ * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise. +++ +++2012-10-01 Siddhesh Poyarekar +++ +++ [BZ #14477] +++ * Makefile (tests): Add tst-cond-except. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S +++ (__pthread_cond_timedwait): Mark instructions where %ebx is +++ incremented in PI case. +++ (.gcc_except_table): Add entry to jump to __condvar_tw_cleanup2 +++ for the marked PI case instructions. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S +++ (__pthread_cond_wait): Mark instructions where %ebx is +++ incremented in PI case. +++ (.gcc_except_table): Add entry to jump to __condvar_w_cleanup2 +++ for the marked PI case instructions. +++ * tst-cond-except.c: New test case. +++ +++2012-09-24 Dmitry V. Levin +++ +++ * tst-tls6.sh: Add "set -e". +++ * Makefile: Do not specify -e option when running testsuite +++ shell scripts. +++ +++ * tst-tls6.sh: Add copyright header. +++ +++2012-09-24 H.J. Lu +++ +++ * sysdeps/x86_64/tls.h (THREAD_SETMEM): Add "()" when casting +++ to uint64_t for 64-bit store. +++ (THREAD_SETMEM_NC): Likewise. +++ +++2012-09-19 H.J. Lu +++ +++ * sysdeps/i386/tls.h (THREAD_SETMEM): Cast to uint64_t for +++ 64-bit store. +++ (THREAD_SETMEM_NC): Likewise. +++ +++2012-09-14 Jeff Law +++ +++ [BZ #14583] +++ * sysdeps/pthread/pthread.h: Fix prototype of __sigsetjmp. +++ +++2012-09-13 H.J. Lu +++ +++ [BZ #14576] +++ * sysdeps/pthread/bits/libc-lockP.h (__rtld_lock_init_recursive): +++ Removed. +++ +++2012-09-07 H.J. Lu +++ +++ * Makefile (LDFLAGS-tst-cancel24): Renamed to ... +++ (LDLIBS-tst-cancel24): This. +++ +++2012-09-06 H.J. Lu +++ +++ [BZ #14545] +++ * Makefile (tests-static): Add tst-cancel21-static. +++ (tests): Likewise. +++ * tst-cancel21-static.c: New file. +++ +++2012-09-01 Joseph Myers +++ +++ * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c +++ [!__ASSUME_POSIX_CPU_TIMERS]: Remove conditional code. +++ [__NR_clock_getres]: Make code unconditional. +++ (pthread_getcpuclockid): Remove code left unreachable by removal +++ of conditionals. +++ +++2012-08-31 Joseph Myers +++ +++ [BZ #14532] +++ * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Use +++ atomic_compare_and_exchange_bool_rel. +++ * tst-sem14.c: New file. +++ * Makefile (tests): Add tst-sem14. +++ +++2012-08-15 Roland McGrath +++ +++ * Makefile (CFLAGS-flockfile.c): Use $(libio-mtsafe) instead +++ of -D_IO_MTSAFE_IO. +++ (CFLAGS-ftrylockfile.c, CFLAGS-funlockfile.c): Likewise. +++ * sysdeps/unix/sysv/linux/Makefile (CFLAGS-fork.c): Likewise. +++ +++2012-08-16 Joseph Myers +++ +++ * pthread_cond_timedwait.c (__pthread_cond_timedwait) +++ [!__ASSUME_POSIX_TIMERS]: Remove conditional code. +++ * pthread_condattr_setclock.c (pthread_condattr_setclock) +++ [!__ASSUME_POSIX_TIMERS]: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S +++ (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise. +++ * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c +++ [!__ASSUME_POSIX_TIMERS]: Likewise. +++ * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S +++ (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise. +++ * sysdeps/unix/sysv/linux/timer_create.c [__NR_timer_create]: Make +++ code unconditional. +++ [!__NR-timer_create]: Remove conditional code. +++ (timer_create) [!__ASSUME_POSIX_TIMERS]: Likewise. +++ * sysdeps/unix/sysv/linux/timer_delete.c [__NR_timer_delete]: Make +++ code unconditional. +++ [!__NR_timer_delete]: Remove conditional code. +++ (timer_delete) [!__ASSUME_POSIX_TIMERS]: Likewise. +++ * sysdeps/unix/sysv/linux/timer_getoverr.c +++ [__NR_timer_getoverrun]: Make code unconditional. +++ [!__NR_timer_getoverrun]: Remove conditional code. +++ (timer_getoverrun) [!__ASSUME_POSIX_TIMERS]: Likewise. +++ * sysdeps/unix/sysv/linux/timer_gettime.c [__NR_timer_gettime]: +++ Make code unconditional. +++ [!__NR_timer_gettime]: Remove conditional code. +++ (timer_gettime) [!__ASSUME_POSIX_TIMERS]: Likewise. +++ * sysdeps/unix/sysv/linux/timer_routines.c [__NR_timer_create]: +++ Make code unconditional. +++ [!__ASSUME_POSIX_TIMERS]: Remove conditional code. +++ * sysdeps/unix/sysv/linux/timer_settime.c [__NR_timer_settime]: +++ Make code unconditional. +++ [!__NR_timer_settime]: Remove conditional code. +++ (timer_settime) [!__ASSUME_POSIX_TIMERS]: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S +++ (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Remove +++ conditional code. +++ +++2012-08-15 Tom de Vries +++ Maxim Kuvyrkov +++ +++ * sysdeps/pthread/bits/libc-lockP.h (__libc_lock_lock) +++ (__libc_lock_trylock): Allow pre-existing definitions. +++ +++2012-08-15 Maxim Kuvyrkov +++ +++ * pthread_spin_lock.c: New file. +++ * pthread_spin_trylock.c: New file. +++ +++2012-08-08 Joseph Myers +++ +++ * allocatestack.c (setxid_signal_thread) [__ASSUME_TGKILL]: Make +++ code unconditional. +++ (setxid_signal_thread) [!__ASSUME_TGKILL]: Remove conditional code. +++ * pthread_cancel.c (pthread_cancel) [__ASSUME_TGKILL]: Make code +++ unconditional. +++ (pthread_cancel) [!__ASSUME_TGKILL]: Remove conditional code. +++ * sysdeps/pthread/createthread.c (do_clone) [__ASSUME_TGKILL]: +++ Make code unconditional. +++ (do_clone) [!__ASSUME_TGKILL]: Remove conditional code. +++ * sysdeps/unix/sysv/linux/pt-raise.c (raise) [__ASSUME_TGKILL || +++ __NR_tgkill]: Make code unconditional. +++ (raise) [__ASSUME_TGKILL]: Likewise. +++ (raise) [!__ASSUME_TGKILL]: Remove conditional code. +++ * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill) +++ [__ASSUME_TGKILL]: Make code unconditional. +++ (__pthread_kill) [!__ASSUME_TGKILL]: Remove conditional code. +++ * sysdeps/unix/sysv/linux/raise.c (raise) [__ASSUME_TGKILL || +++ __NR_tgkill]: Make code unconditional. +++ (raise) [__ASSUME_TGKILL]: Likewise. +++ (raise) [!__ASSUME_TGKILL]: Remove conditional code. +++ +++2012-08-07 Joseph Myers +++ +++ * sysdeps/pthread/createthread.c (create_thread) +++ [!__ASSUME_NO_CLONE_DETACHED]: Remove conditional code. +++ +++2012-08-03 Joseph Myers +++ +++ * nptl-init.c (sigcancel_handler) [__ASSUME_CORRECT_SI_PID]: Make +++ code unconditional. +++ (sighandler_setxid) [__ASSUME_CORRECT_SI_PID]: Likewise. +++ +++2012-07-28 Siddhesh Poyarekar +++ +++ * tst-pthread-getattr.c (MAX_STACK_SIZE): New macro. +++ (pagesize): New static variable. +++ (allocate_and_test): Return MEM. Rename parameter to TARGET. +++ (check_stack_top): New local variables MEM and PAGEMASK. Cap +++ stack size to MAX_STACK_SIZE. Call allocate_and_test for +++ halfway up the stack top page. Verify that the top page was +++ written into. +++ (do_test): Get pagesize using sysconf. +++ +++2012-07-25 Andreas Schwab +++ +++ * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Remove pseudo_end +++ label. +++ * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): +++ Likewise. +++ +++2012-07-25 Siddhesh Poyarekar +++ +++ * tst-pthread-getattr.c: Revert last change. +++ +++2012-07-20 Siddhesh Poyarekar +++ +++ * tst-pthread-getattr.c (MAX_STACK_SIZE): New max cap for stack +++ size. +++ (_MIN): New macro. +++ (allocate_and_test): Return STACKADDR. Access STACKADDR instead +++ of MEM to test. +++ (check_stack_top): Read valued written into STACKADDR in +++ allocate_and_test. Cap stack size to MAX_STACK_SIZE. +++ +++2012-07-19 Siddhesh Poyarekar +++ +++ * nptl-init.c (sighandler_setxid): Fix the comment that +++ describes it. +++ +++2012-06-23 Thomas Schwinge +++ +++ * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S +++ (__lll_robust_timedlock_wait): Simplify CFI directives. +++ +++2012-06-20 Siddhesh Poyarekar +++ +++ [BZ #12416] +++ * Makefile (tests): Add test case. +++ * pthread_getattr_np.c (pthread_getattr_np): Deduct pages below +++ the __libc_stack_end page from stacksize. Truncate stacksize to +++ make it page aligned when it is computed from RLIMIT_STACK. +++ * tst-pthread-getattr.c: New test case. Verify that stackaddr is +++ accessible. +++ +++2012-06-07 Carlos Sánchez de La Lama +++ +++ [BZ #14205] +++ * sysdeps/sparc/sparc32/pthread_spin_lock.S: Do not use v9 +++ branches. +++ +++2012-06-04 Siddhesh Poyarekar +++ Jakub Jelinek +++ +++ [BZ #14188] +++ * sysdeps/pthread/pthread.h +++ [!(defined __GNUC__ && defined __EXCEPTIONS)] +++ (pthread_cleanup_push, pthread_cleanup_push_defer_np): Use +++ __libc_unlikely instead of __builtin_expect. +++ +++2012-05-30 H.J. Lu +++ +++ [BZ #14117] +++ * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Removed. +++ * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise. +++ * sysdeps/unix/sysv/linux/i386/Implies: New file. +++ * sysdeps/unix/sysv/linux/x86_64/Implies: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Renamed +++ to ... +++ * sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h: This. +++ * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Renamed +++ to ... +++ * sysdeps/unix/sysv/linux/x86/bits/semaphore.h: This. +++ +++2012-05-30 Andreas Schwab +++ +++ [BZ #14132] +++ * nptl-init.c (pthread_functions): Remove use of INTUSE and +++ _internal aliases. +++ (__pthread_initialize_minimal_internal): Likewise. +++ * sem_open.c: Likewise. +++ * sem_unlink.c: Likewise. +++ * pthreadP.h: Replace _internal aliases by hidden_proto +++ declarations. +++ * pthread_getspecific.c: Replace _internal alias by hidden_def. +++ * pthread_key_create.c: Likewise. +++ * pthread_mutex_destroy.c: Likewise. +++ * pthread_mutex_init.c: Likewise. +++ * pthread_mutex_lock.c: Likewise. +++ * pthread_mutex_unlock.c: Likewise. +++ * pthread_once.c: Likewise. +++ * pthread_rwlock_rdlock.c: Likewise. +++ * pthread_rwlock_unlock.c: Likewise. +++ * pthread_rwlock_wrlock.c: Likewise. +++ * pthread_setspecific.c: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: +++ Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: +++ Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: +++ Likewise. +++ * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise. +++ * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise. +++ * sysdeps/unix/sysv/linux/s390/pthread_once.c: Likewise. +++ * sysdeps/unix/sysv/linux/sh/pthread_once.S: Likewise. +++ * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise. +++ * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise. +++ * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise. +++ * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: +++ Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: +++ Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: +++ Likewise. +++ +++2012-05-27 Chung-Lin Tang +++ +++ * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO, LOAD_ARGS_1) +++ (LOAD_ARGS_2 ,LOAD_ARGS_3 ,LOAD_ARGS_4): Add CFI restores. +++ +++ * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_lock_wait_private) +++ (__lll_lock_wait, __lll_timedlock_wait, __lll_timedwait_tid): Add CFI +++ directives. +++ * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S +++ (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Likewise. +++ * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S +++ (pthread_barrier_wait): Likewise. +++ * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S +++ (__pthread_cond_broadcast): Likewise. +++ * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S +++ (__pthread_cond_signal): Likewise. +++ * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S +++ (__pthread_cond_timedwait): Likewise. +++ * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S (__pthread_cond_wait): +++ Likewise. +++ * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S +++ (__pthread_rwlock_rdlock): Likewise. +++ * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S +++ (pthread_rwlock_timedrdlock): Likewise. +++ * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S +++ (pthread_rwlock_timedwrlock): Likewise. +++ * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S +++ (__pthread_rwlock_unlock): Likewise. +++ * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S +++ (__pthread_rwlock_wrlock): Likewise. +++ * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post): Likewise. +++ * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise. +++ * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait): +++ Likewise. +++ * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise. +++ +++2012-05-26 Siddhesh Poyarekar +++ +++ [BZ #12416] +++ * nptl/pthread_getattr_np.c (pthread_getattr_np): Use +++ __libc_stack_end rounded to the end of containing page as the +++ real stack end. +++ +++2012-05-25 Rayson Ho +++ +++ * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Low-level SystemTap +++ probes for i386. +++ * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise. +++ +++2012-05-25 Rayson Ho +++ Roland McGrath +++ +++ * DESIGN-systemtap-probes.txt: New file. +++ * pthread_cond_broadcast.c: SystemTap probes. +++ * pthread_cond_init.c: Likewise. +++ * pthread_cond_signal.c: Likewise. +++ * pthread_cond_wait.c: Likewise. +++ * pthread_cond_destroy.c: Likewise. +++ * pthread_create.c: Likewise. +++ * pthread_join.c: Likewise. +++ * pthread_mutex_destroy.c: Likewise. +++ * pthread_mutex_init.c: Likewise. +++ * pthread_mutex_lock.c: Likewise. +++ * pthread_mutex_timedlock.c: Likewise. +++ * pthread_mutex_unlock.c: Likewise. +++ * pthread_rwlock_destroy.c: Likewise. +++ * pthread_rwlock_rdlock.c: Likewise. +++ * pthread_rwlock_unlock.c: Likewise. +++ * pthread_rwlock_wrlock.c: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise. +++ +++2012-05-24 Roland McGrath +++ +++ * pthread_create.c (start_thread): Define pthread_start LIBC_PROBE. +++ +++2012-05-17 Andreas Jaeger +++ +++ * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h +++ (HAVE_DL_DISCOVER_OSVERSION): Don't declare _dl_discover_osversion +++ only for older kernels. +++ +++2012-05-15 Joseph Myers +++ +++ * pthreadP.h [!__NR_set_robust_list] (__NR_set_robust_list): Do +++ not define. +++ +++2012-05-15 H.J. Lu +++ +++ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_lock): Load +++ futex pointer into RDI_LP. Use RSP_LP to operate on stack. +++ (lll_robust_lock): Likewise. +++ (lll_cond_lock): Likewise. +++ (lll_robust_cond_lock): Likewise. +++ (lll_timedlock): Likewise. +++ (lll_robust_timedlock): Likewise. +++ (lll_unlock): Likewise. +++ (lll_robust_unlock): Likewise. +++ +++2012-05-15 H.J. Lu +++ +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use +++ LP_OP(cmp) and RCX_LP on dep_mutex pointer. +++ +++2012-05-15 H.J. Lu +++ +++ * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Use LP_OP(op) +++ on NWAITERS. +++ (__gcc_personality_v0): Replace 8-byte data alignment with +++ LP_SIZE alignment and .quad with ASM_ADDR. +++ +++2012-05-15 H.J. Lu +++ +++ * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Use LP_OP(op) +++ on NWAITERS. +++ (__gcc_personality_v0): Replace 8-byte data alignment with +++ LP_SIZE alignment and .quad with ASM_ADDR. +++ +++2012-05-15 H.J. Lu +++ +++ * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Use LP_OP(cmp) on +++ NWAITERS, which is unsigned long int. +++ +++2012-05-15 H.J. Lu +++ +++ * sysdeps/unix/sysv/linux/x86_64/pthread_once.S +++ (__gcc_personality_v0): Replace 8-byte data alignment with +++ LP_SIZE alignment and .quad with ASM_ADDR. +++ +++2012-05-15 H.J. Lu +++ +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Use +++ LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer. Load +++ __vdso_clock_gettime pointer into RAX_LP. +++ (__gcc_personality_v0): Replace 8-byte data alignment with +++ LP_SIZE alignment and .quad with ASM_ADDR. +++ +++2012-05-15 H.J. Lu +++ +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Use +++ LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer. Load +++ __vdso_clock_gettime pointer into RAX_LP. +++ (__gcc_personality_v0): Replace 8-byte data alignment with +++ LP_SIZE alignment and .quad with ASM_ADDR. +++ +++2012-05-15 H.J. Lu +++ +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Use +++ LP_OP(cmp) and R8_LP on dep_mutex pointer. +++ +++2012-05-15 H.J. Lu +++ +++ * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Use LP_OP(mov) +++ to update pointer in memory. Load pointer into RDI_LP. +++ +++2012-05-15 H.J. Lu +++ +++ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h +++ (LLL_STUB_UNWIND_INFO_START): Align label to LP_SIZE instead +++ of 8. +++ (LLL_STUB_UNWIND_INFO_END): Likewise. +++ (lll_timedlock): Load timeout pointer into RDX_LP. +++ (lll_robust_timedlock): Likewise. +++ +++2012-05-15 Siddhesh Poyarekar +++ Jakub Jelinek +++ +++ [BZ #13613] +++ * Makefile (tests): Add test cases. +++ * descr.h (struct pthread): Add a comment describing multiple_threads. +++ * pthreadP.h (__pthread_multiple_threads): Expand comment to include +++ single-process case. +++ * pthread_cancel.c (pthread_cancel): Enable multiple_threads +++ before setting cancelstate of the thread. +++ * sysdeps/unix/sysv/linux/libc_multiple_threads.c +++ (__libc_multiple_threads): Add explanatory comment. +++ * tst-cancel-self-cancelstate.c: New test case. +++ * tst-cancel-self-canceltype.c: Likewise. +++ * tst-cancel-self-cleanup.c: Supporting file for test cases. +++ * tst-cancel-self-testcancel.c: New test case. +++ * tst-cancel-self.c: Likewise. +++ * vars.c: Expand comment to include single-process case. +++ +++2012-05-14 H.J. Lu +++ +++ * sysdeps/x86_64/tls.h: Don't include . +++ (tcbhead_t): Remove __x86_64__ check. Align rtld_savespace_sse +++ to 32 bytes. +++ +++2012-05-14 H.J. Lu +++ +++ * sysdeps/pthread/pthread.h (__PTHREAD_RWLOCK_INT_FLAGS_SHARED): +++ New. +++ (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Check +++ __PTHREAD_RWLOCK_INT_FLAGS_SHARED instead of __WORDSIZE. +++ +++2012-05-14 H.J. Lu +++ +++ * shlib-versions: Move x86_64-.*-linux.* entry to ... +++ * sysdeps/x86_64/64/shlib-versions: Here. New file. +++ * sysdeps/x86_64/x32/shlib-versions: New file. +++ +++2012-05-14 H.J. Lu +++ +++ * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Define x32 +++ __SIZEOF_PTHREAD_XXX_T. +++ (__pthread_internal_list): Check __x86_64__ instead of __WORDSIZE. +++ (pthread_mutex_t): Likewise. +++ (pthread_rwlock_t): Likewise. +++ (__PTHREAD_RWLOCK_INT_FLAGS_SHARED): New. Defined if __x86_64__ +++ is defined. +++ +++2012-05-11 H.J. Lu +++ +++ * sysdeps/x86_64/x32/tls.h: New file. +++ +++2012-05-11 H.J. Lu +++ +++ * sysdeps/x86_64/tls.h (THREAD_SETMEM): Use uint64_t on 64-bit +++ integer. +++ (THREAD_SETMEM_NC): Likewise. +++ +++2012-05-11 H.J. Lu +++ +++ * sysdeps/x86_64/tls.h (THREAD_SELF): Replace movq/%q0 with +++ mov/%0. +++ +++2012-05-11 H.J. Lu +++ +++ * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h +++ (__cleanup_fct_attribute): Check __x86_64__ instead of +++ __WORDSIZE. +++ +++2012-05-11 H.J. Lu +++ +++ * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER): Check +++ __PTHREAD_MUTEX_HAVE_PREV instead of __WORDSIZE. +++ (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Likewise. +++ (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise. +++ (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise. +++ +++2012-05-11 H.J. Lu +++ +++ * pthread_create.c (start_thread): Check __PTHREAD_MUTEX_HAVE_PREV +++ instead of __WORDSIZE. +++ +++2012-05-10 Thomas Schwinge +++ +++ [BZ #3748] +++ * sysdeps/pthread/bits/libc-lockP.h (__libc_once_get): New macro. +++ +++2012-05-09 Chung-Lin Tang +++ +++ * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S +++ (__pthread_cond_timedwait): Use CFI directives. +++ * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S +++ (__pthread_cond_wait): Likewise. +++ * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise. +++ * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise. +++ +++2012-05-03 David S. Miller +++ +++ * sysdeps/sparc/sparc64/pthread_spin_unlock.S: Fix thinko, we +++ always have to return 0, especially for the pthread_spin_init +++ alias. +++ * sysdeps/sparc/sparc32/pthread_spin_lock.S: Add missing trailing +++ newline. +++ * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: Likewise. +++ * sysdeps/sparc/sparc64/pthread_spin_lock.S: Likewise. +++ +++2012-05-02 David S. Miller +++ +++ * sysdeps/sparc/sparc64/pthread_spin_lock.S: New. +++ * sysdeps/sparc/sparc64/pthread_spin_lock.c: Delete. +++ * sysdeps/sparc/sparc64/pthread_spin_unlock.S: New. +++ * sysdeps/sparc/sparc64/pthread_spin_unlock.c: Delete. +++ * sysdeps/sparc/sparc64/pthread_spin_trylock.S: New. +++ * sysdeps/sparc/sparc64/pthread_spin_trylock.c: Delete. +++ * sysdeps/sparc/sparc64/pthread_spin_init.c: New. +++ * sysdeps/sparc/sparc32/pthread_spin_lock.S: New. +++ * sysdeps/sparc/sparc32/pthread_spin_lock.c: Delete. +++ * sysdeps/sparc/sparc32/pthread_spin_trylock.S: New. +++ * sysdeps/sparc/sparc32/pthread_spin_trylock.c: Delete. +++ * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: New. +++ * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: Delete. +++ * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.S: New. +++ * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: Delete. +++ * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.S: New. +++ * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: Delete. +++ * sysdeps/sparc/sparc32/sparcv9/pthread_spin_init.c: New. +++ +++2012-05-02 Allan McRae +++ +++ * Makefile: (LDFLAGS-tst-tls5): Use $(no-as-needed). +++ (LDFLAGS-tst-cancel24): Likewise. +++ +++2012-05-02 Paul Pluzhnikov +++ +++ * sysdeps/i386/pthread_spin_lock.S: New. +++ * sysdeps/i386/pthread_spin_lock.c: Delete. +++ * sysdeps/x86_64/pthread_spin_lock.S: New. +++ * sysdeps/x86_64/pthread_spin_lock.c: Delete. +++ +++2012-04-28 Andreas Schwab +++ +++ * Makefile ($(objpfx)tst-stack3-mem, $(objpfx)tst-tls6.out): Don't +++ run when cross-compiling. +++ +++2012-04-26 Siddhesh Poyarekar +++ +++ * sysdeps/pthread/unwind-forcedunwind.c: Include gnu/lib-names.h +++ instead of libgcc_s.h. +++ +++2012-04-20 Paul Pluzhnikov +++ +++ * sysdeps/x86_64/tls.h (TLS_GET_FS, TLS_SET_FS): Delete. +++ +++2012-03-27 David S. Miller +++ +++ * tst-cond16.c (do_test): Use a thread stack size which is either +++ PTHREAD_STACK_MIN or the page size, whichever is larger. +++ * tst-cond18.c (do_test): Likewise. +++ +++2012-03-19 H.J. Lu +++ +++ * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Use +++ register char * __asm__("rsp") to get stack frame. +++ +++2012-03-19 H.J. Lu +++ +++ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (SYS_futex): Use +++ __NR_futex directly. +++ +++2012-03-19 H.J. Lu +++ +++ * unwind.c (unwind_stop): Cast _Unwind_GetCFA return to +++ _Unwind_Ptr first. +++ +++2012-03-16 David S. Miller +++ +++ [BZ #13844] +++ * sysdeps/unix/sysv/linux/libc-lowlevellock.c: Include using <..> +++ instead of "...". +++ * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c: +++ Delete, not needed. +++ +++2012-03-15 David S. Miller +++ +++ [BZ #13844] +++ * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c: New file. +++ +++2012-03-09 Paul Eggert +++ +++ [BZ #13673] +++ * pt-crti.S: Replace FSF snail mail address with URL. +++ +++2012-03-09 Joseph Myers +++ +++ * sysdeps/pthread/pthread.h (__need_clockid_t, __need_timespec): +++ Do not define before including . +++ +++2012-03-08 David S. Miller +++ +++ * sysdeps/unix/sysv/linux/sparc/sem_post.c: Update copyright year. +++ +++2012-03-08 Thomas Schwinge +++ +++ * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait): +++ Check for timestamp before the Epoch. +++ +++ * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Fix +++ updating nwaiters. +++ +++ * tst-sem13.c (do_test): Add another test case. +++ * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait): +++ Fix updating nwaiters. +++ +++2012-03-07 Joseph Myers +++ +++ [BZ #10545] +++ * sysdeps/pthread/configure.in (libc_cv_forced_unwind): Change +++ link test to a compile test. +++ (libc_cv_c_cleanup): Likewise. Declare puts rather than including +++ . +++ * sysdeps/pthread/configure: Regenerated. +++ +++2012-03-07 Ulrich Drepper +++ +++ * Makefile (distribute): Remove variable. +++ +++2012-01-23 Thomas Schwinge +++ +++ * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Get rid of +++ superfluous assignment. +++ * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c (sem_timedwait): +++ Likewise. +++ * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c +++ (sem_timedwait): Likewise. +++ +++2012-03-06 Ulrich Drepper +++ +++ * sysdeps/pthread/bits/libc-lock.h: Move information not needed in +++ installed headers to... +++ * sysdeps/pthread/bits/libc-lockP.h: ...here. New file. +++ +++2012-03-06 David S. Miller +++ +++ * sysdeps/unix/sysv/linux/sparc/sem_post.c (__new_sem_post): Use +++ atomic_increment and remove unused local variable. +++ (__old_sem_post): Likewise. +++ +++2012-02-27 David S. Miller +++ +++ * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Don't refer to +++ non-existing __pthread_attr. +++ * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise. +++ +++2012-02-26 Ulrich Drepper +++ +++ * sysdeps/pthread/pthread.h: Define __need_clockid_t for __USE_XOPEN2K. +++ +++ * sysdeps/pthread/pthread.h: Define __need_timespec before including +++ . +++ * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Name pthread_attr_t +++ union. +++ * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise. +++ +++2012-02-21 Joseph Myers +++ +++ [BZ #13695] +++ * Makefile (generated): Remove crti.S, crtn.S, defs.h and +++ pt-initfini.s. +++ [crti.S not in sysdirs] (omit-deps): Do not append. +++ [crti.S not in sysdirs] (CFLAGS-pt-initfini.s): Remove variable. +++ [crti.S not in sysdirs] (pt-initfini.c): Remove vpath directive. +++ [crti.S not in sysdirs] ($(objpfx)crti.S): Remove rule. +++ [crti.S not in sysdirs] ($(objpfx)crtn.S): Likewise. +++ [crti.S not in sysdirs] ($(objpfx)defs.h): Likewise. +++ [crti.S not in sysdirs] ($(objpfx)crti.o): Likewise. +++ [crti.S not in sysdirs] ($(objpfx)crtn.o): Likewise. +++ [crti.S in sysdirs] (extra-objs): Append unconditionally. +++ [crti.S in sysdirs] ($(objpfx)crti.o): Define rule +++ unconditionally. +++ * sysdeps/pthread/pt-initfini.c: Remove file. +++ +++2012-02-16 Richard Henderson +++ +++ * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Remove file. +++ * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Remove file. +++ +++2012-02-15 Kaz Kojima +++ +++ * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Remove file. +++ +++2012-02-16 David S. Miller +++ +++ * sysdeps/sparc/Makefile: Add -fPIC when building pt-crti.S and crtn.S +++ +++2012-02-15 Marek Polacek +++ +++ * sysdeps/unix/sysv/linux/x86_64/Makefile: Remove file. +++ +++2012-02-09 Paul Eggert +++ +++ Replace FSF snail mail address with URLs, as per GNU coding standards. +++ +++2012-02-08 Andreas Schwab +++ +++ * Makefile (extra-objs) [crti.S in sysdirs]: Add pt-crti.o. +++ +++2012-02-08 Joseph Myers +++ +++ Support crti.S and crtn.S provided directly by architectures. +++ * Makefile [crti.S in sysdirs] (omit-deps): Do not append. +++ [crti.S in sysdirs] (CFLAGS-pt-initfini.s): Do not define variable. +++ [crti.S in sysdirs] ($(objpfx)pt-initfini.s): Disable rule. +++ [crti.S in sysdirs] ($(objpfx)crti.S): Likewise. +++ [crti.S in sysdirs] ($(objpfx)crtn.S): Likewise. +++ [crti.S in sysdirs] ($(objpfx)defs.h): Likewise. +++ [crti.S in sysdirs] ($(objpfx)crti.o): Likewise. +++ [crti.S in sysdirs] ($(objpfx)crtn.o): Likewise. +++ [crti.S in sysdirs] (pt-initfini.c): Remove vpath directive. +++ [crti.S in sysdirs] ($(objpfx)crti.o): New rule. +++ * pt-crti.S: New file. +++ * sysdeps/unix/sysv/linux/i386/Makefile: Remove file. +++ +++2012-02-03 Joseph Myers +++ +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use +++ macros for PIC register setup. +++ * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise. +++ +++2012-01-11 Marek Polacek +++ +++ * forward.c (FORWARD_NORETURN): Define macro. +++ (__pthread_unwind): Use FORWARD_NORETURN macro to avoid warning. +++ (__pthread_exit): Likewise. +++ +++2012-01-10 Ulrich Drepper +++ +++ * sysdeps/pthread/pthread.h: Add const attribute to pthread_equal. +++ +++ * pthreadP.h: Add noreturn to __pthread_exit. +++ * sysdeps/pthread/pthread-functions.h: Likewise for ptr___pthread_exit. +++ +++2011-12-30 Adhemerval Zanella +++ +++ * sysdeps/unix/sysv/linux/aio_misc.h (__aio_create_helper_thread): +++ Call pthread_attr_setstacksize() with result of +++ __pthread_get_minstack() to account for application TLS usage. +++ +++2012-01-08 Marek Polacek +++ +++ * sysdeps/unix/sysv/linux/mq_notify.c: Include . +++ +++2012-01-07 Ulrich Drepper +++ +++ [BZ #13553] +++ * pthreadP.h: Use const instead of __const. +++ * semaphore.h: Likewise. +++ * sysdeps/pthread/bits/libc-lock.h: Likewise. +++ * sysdeps/pthread/bits/sigthread.h: Likewise. +++ * sysdeps/pthread/pthread.h: Likewise. +++ +++ * Makefile: Remove elf=yes test, only ELF is supported. +++ +++ * shlib-versions: Remove entries for ports architectures. +++ +++ In case anyone cares, the IA-64 architecture could move to ports. +++ * sysdeps/ia64/*: Removed. +++ * sysdeps/unix/sysv/linux/ia64/*: Removed. +++ +++2011-12-22 Ulrich Drepper +++ +++ * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread): Use +++ __pthread_get_minstack. +++ * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Likewise. +++ +++ [BZ #13088] +++ * sysdeps/unix/sysv/linux/timer_routines.c: Get minimum stack size +++ through __pthread_get_minstack. +++ * nptl-init.c (__pthread_initialize_minimal_internal): Get page size +++ directly from _rtld_global_ro. +++ (__pthread_get_minstack): New function. +++ * pthreadP.h: Declare __pthread_get_minstack. +++ * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_get_minstack. +++ +++2011-12-21 Ulrich Drepper +++ +++ [BZ #13515] +++ * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np): +++ Correct reading name from file. +++ +++2011-12-14 Carlos O'Donell +++ +++ * allocatestack.c (allocate_stack): Return errno on failure. +++ +++2011-12-14 Jeff Law +++ +++ [BZ #5245] +++ * pthread_create.c (__pthread_create_2_1): Translate ENOMEM to EAGAIN. +++ +++2011-11-28 Andreas Schwab +++ +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Handle +++ EAGAIN from FUTEX_WAIT_REQUEUE_PI. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise. +++ +++2011-11-15 Ulrich Drepper +++ +++ * pthread_getattr_np.c (pthread_getattr_np): Set FD_CLOEXEC for +++ /proc/self/maps. +++ +++2011-10-29 Ulrich Drepper +++ +++ [BZ #13358] +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S +++ (__pthread_cond_timedwait): Initialize %r15 correctly also for code +++ path for kernels with FUTEX_CLOCK_REALTIME. +++ Debugged by H.J. Lu . +++ +++2011-10-27 Andreas Schwab +++ +++ [BZ #13344] +++ * sysdeps/pthread/pthread.h: Use __THREADNL instead of __THREAD +++ for memory synchronization functions. +++ * semaphore.h: Likewise. +++ +++2011-10-24 Ulrich Drepper +++ +++ * tst-cancel7.c: Avoid warning. +++ * tst-mutex6.c: Likewise. +++ * tst-mutex9.c: Likewise. +++ * tst-mutexpi6.c: Likewise. +++ +++2011-10-23 Ulrich Drepper +++ +++ * sysdeps/i386/tls.h: Remove #include . +++ +++2011-10-15 Ulrich Drepper +++ +++ * pthread_create.c (start_thread): Call __ctype_init. +++ +++2011-09-15 Andreas Schwab +++ +++ * 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 . +++ * nptl-init.c: Include +++ * allocatestack.c: Likewise. +++ +++2011-09-11 Ulrich Drepper +++ +++ * sysdeps/i386/tls.h: Remove HAVE_TLS_SUPPORT test. +++ * sysdeps/ia64/tls.h: Likewise. +++ * sysdeps/powerpc/tls.h: Likewise. +++ * sysdeps/s390/tls.h: Likewise. +++ * sysdeps/sh/tls.h: Likewise. +++ * sysdeps/sparc/tls.h: Likewise. +++ * sysdeps/x86_64/tls.h: Likewise. +++ +++2011-09-10 Ulrich Drepper +++ +++ * sysdeps/pthread/malloc-machine.h: Define MUTEX_INITIALIZER. +++ +++ * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Don't handle +++ !USE___THREAD. +++ * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise. +++ * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise. +++ * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise. +++ * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise. +++ * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise. +++ * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise. +++ +++ * tst-tls1.c: Support for __thread is now mandatory. +++ * tst-tls2.c: Likewise. +++ * tst-tls3.c: Likewise. +++ * tst-tls3mod.c: Likewise. +++ * tst-tls4.c: Likewise. +++ * tst-tls4moda.c: Likewise. +++ * tst-tls4modb.c: Likewise. +++ * tst-tls5.h: Likewise. +++ +++2011-09-08 Ulrich Drepper +++ +++ [BZ #12403] +++ * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S +++ (pthread_rwlock_timedwrlock): Use correct macro in test. +++ Patch by H.J. Lu . +++ +++2011-09-06 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait): Don't +++ use gettimeofday vsyscall, just call gettimeofday. +++ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: +++ Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: +++ Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise. +++ Simplify __vdso_clock_gettime use. +++ +++2011-09-05 David S. Miller +++ +++ * sysdeps/unix/sysv/linux/sem_timedwait.c (do_futex_timed_wait): +++ New function. +++ (sem_timedwait): Call it to force an exception region around +++ the async cancel enable and the futex operation. +++ * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: Likewise. +++ * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: Likewise. +++ * sysdeps/unix/sysv/linux/sem_wait.c (do_futex_wait): New function. +++ (__new_sem_wait): Call it to force an exception region around +++ the async cancel enable and the futex operation. +++ * sysdeps/unix/sysv/linux/sparc/sem_wait.c: Likewise. +++ * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: Likewise. +++ +++2011-08-31 Andreas Schwab +++ +++ * allocatestack.c (setxid_mark_thread): Ensure that the exiting +++ thread is woken up. +++ +++2011-08-20 David S. Miller +++ +++ * Makefile (tst-cleanup0.out): Fix typo in output redirection. +++ +++2011-08-14 Roland McGrath +++ +++ * sysdeps/i386/pthreaddef.h (TCB_ALIGNMENT): Set to 64, optimal on Atom. +++ * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Likewise. +++ +++2011-08-08 Andreas Schwab +++ +++ * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Maintain aligned +++ stack. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise. +++ +++2011-07-22 Ulrich Drepper +++ +++ * sysdeps/pthread/unwind-forcedunwind.c (_Unwind_Resume): Add read +++ barrier. +++ (__gcc_personality_v0): Likewise. +++ (_Unwind_ForcedUnwind): Likewise. +++ (_Unwind_GetCFA): Likewise. +++ +++2011-07-14 Roland McGrath +++ +++ * allocatestack.c (__reclaim_stacks): Use uintptr_t cast rather than +++ UINTMAX_C. +++ +++2011-06-30 Ulrich Drepper +++ +++ * nptl-init.c (__nptl_set_robust): New function. +++ (pthread_functions): Add reference. +++ * npthreadP.h: Declare __nptl_set_robust. +++ * sysdeps/pthread/pthread-functions.h (pthread_functions): Add +++ ptr_set_robust member. +++ * sysdeps/unix/sysv/linux/fork.c: Call set_robust_list syscall in +++ child if threads are used. +++ +++2011-06-14 Andreas Jaeger +++ +++ * pthread_rwlock_init.c: Include for memset declaration. +++ +++2011-05-11 Ulrich Drepper +++ +++ [BZ #386] +++ * allocatestack.c (allocate_stack): Convert ENOMEM error to EAGAIN. +++ +++2011-04-10 Ulrich Drepper +++ +++ [BZ #12650] +++ * allocatestack.c (get_cached_stack): Deallocate DTV entries before +++ clearing memory. +++ Patch partly by Robert Rex . +++ +++2011-01-19 Roland McGrath +++ +++ * pthread_cond_wait.c (__pthread_cond_wait): Fix comment typo. +++ * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise. +++ * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Likewise. +++ * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise. +++ * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock): Likewise. +++ * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock): Likewise. +++ +++2011-01-16 Andreas Schwab +++ +++ * Makefile (test-extras): Add tst-cleanup4aux. +++ +++2011-01-14 Ulrich Drepper +++ +++ [BZ #10563] +++ * sysdeps/pthread/setxid.h (__SETXID_1): Add cast to assignment. +++ (__SETXID_2): Likewise. +++ (__SETXID_3): Likewise. +++ +++2011-01-13 Ulrich Drepper +++ +++ [BZ #10484] +++ * Versions [libc] (GLIBC_PRIVATE): Export __libc_alloca_cutoff. +++ * alloca_cutoff.c: Add libc_hidden_def. +++ +++2010-10-13 H.J. Lu +++ +++ [BZ #12113] +++ * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Changed to 32. +++ * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Defined with alignment +++ of "struct pthread". +++ +++2010-09-21 Andreas Schwab +++ +++ * sysdeps/pthread/pthread.h (pthread_cleanup_push) +++ [!__EXCEPTIONS]: Mangle local variable not_first_call. +++ (pthread_cleanup_push_defer_np): Likewise. +++ +++2010-09-03 Ulrich Drepper +++ +++ * sysdeps/pthread/allocalim.h (__libc_use_alloca): Expect blocks are +++ small. +++ +++2010-08-10 Dinakar Guniguntala +++ Stefan Hajnoczi +++ +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: If +++ FUTEX_WAKE_OP fails make sure to call FUTEX_WAKE instead. +++ +++2010-08-12 H.J. Lu +++ +++ * sysdeps/unix/sysv/linux/i386/Makefile: New file. +++ +++2010-05-01 Alan Modra +++ +++ * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h +++ (PSEUDO): Use correct cr save. Don't use wrong parm save area +++ to save temps. Correct cfi for possible later frame manipulation. +++ (DOCARGS_1, UNDOCARGS_1): Use the correct parm save area. +++ (DOCARGS_2, UNDOCARGS_2, DOCARGS_3, UNDOCARGS_3): Likewise. +++ (DOCARGS_4, UNDOCARGS_4, DOCARGS_5, UNDOCARGS_5): Likewise. +++ (DOCARGS_6, UNDOCARGS_6): Likewise. +++ (CENABLE, CDISABLE): Add nops for non-shared calls. +++ +++2010-07-06 Andreas Schwab +++ +++ * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np): +++ Fix type mismatch. +++ +++2010-07-03 Ulrich Drepper +++ +++ * tst-abstime.c (do_test): Some more cleanups +++ +++2010-07-02 Ulrich Drepper +++ +++ * tst-abstime.c: Correct testing and add test for sem_timedwait. +++ +++2010-07-01 Andreas Schwab +++ Ulrich Drepper +++ +++ * Makefile (tests): Add tst-abstime. +++ * tst-abstime.c: New file. +++ * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S +++ (__lll_timedlock_wait): Check for timestamp before the Epoch. +++ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S +++ (__lll_timedlock_wait): Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S +++ (__lll_robust_timedlock_wait): Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S +++ (__pthread_cond_timedwait): Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S +++ (pthread_rwlock_timedrdlock): Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S +++ (pthread_rwlock_timedwrlock): Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait): +++ Likewise. +++ +++2010-07-01 Ulrich Drepper +++ +++ * Makefile (tst-_res1): Add tst-_res1mod1 to dependency list. +++ +++2010-06-01 Takashi Yoshii +++ +++ * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Fix incorrect +++ location of ifndef __ASSUME_FUTEX_CLOCK_REALTIME. +++ +++2010-04-09 Ulrich Drepper +++ +++ [BZ #11390] +++ * sysdeps/unix/sysv/linux/pthread_getname.c: New file. +++ * sysdeps/unix/sysv/linux/pthread_setname.c: New file. +++ * nptl/sysdeps/pthread/pthread.h: Declare pthread_getname and +++ pthread_setname. +++ * Makefile (libpthread-routines): Add pthread_getname and +++ pthread_setname. +++ * Versions: Export pthread_getname and pthread_setname for GLIBC_2.12. +++ +++2010-04-05 Thomas Schwinge +++ +++ * sysdeps/pthread/unwind-resume.c: Moved to main tree sysdeps/gnu/. +++ * sysdeps/pthread/rt-unwind-resume.c: Likewise. +++ * sysdeps/pthread/Makefile: Remove csu section and rt section's +++ unwind-resume bits, now in main tree sysdeps/gnu/Makefile instead. +++ +++2010-03-23 Luis Machado +++ +++ * pthread_cond_timedwait.c: Add check for +++ HAVE_CLOCK_GETTIME_VSYSCALL to use VDSO whenever possible. +++ (pthread_cond_timedwait): Use INTERNAL_VSYSCALL instead of +++ INTERNAL_SYSCALL. +++ +++2010-03-09 Ulrich Drepper +++ +++ * pthread_create.c (__pthread_create_2_1): If priorities are incorrect +++ and the call fails wake eventually waiting setxid threads. Don't free +++ stack here if we try starting a thread. +++ * sysdeps/pthread/createthread.c (do_clone): Only wake setxid waiter +++ if the clone call failed. +++ +++2010-03-08 Andreas Schwab +++ +++ * pthread_create.c (__pthread_create_2_1): Don't set setxid_futex. +++ * allocatestack.c (get_cached_stack): Set setxid_futex. +++ (allocate_stack): Likewise. +++ +++2010-03-05 Andreas Schwab +++ Ulrich Drepper +++ +++ * allocatestack.c (setxid_mark_thread): Delay handling of thread if +++ it is creating a thread or it is just being created. +++ * pthread_create.c (start_thread): Wake setxid thread if it is +++ waiting. +++ (__pthread_create_2_1): Initialize setxid_futex. +++ * sysdeps/pthread/createthread.c (do_clone): Wake setxid thread if it +++ is waiting. +++ +++2010-01-15 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: +++ Fix unwind info. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise. +++ +++2010-01-15 Michal Schmidt +++ +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: +++ Fix pthread_cond_timedwait with requeue-PI. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: +++ Fix pthread_cond_wait with requeue-PI. +++ +++2010-01-14 Ulrich Drepper +++ +++ * Versions: Add pthread_mutex_consistent, pthread_mutexattr_getrobust, +++ and pthread_mutexattr_setrobust for GLIBC_2.12. +++ * pthread_mutex_consistent.c: Define alias pthread_mutex_consistent. +++ * pthread_mutexattr_getrobust.c: Define alias +++ pthread_mutexattr_getrobust. +++ * pthread_mutexattr_setrobust.c: Define alias +++ pthread_mutexattr_setrobust. +++ +++2010-01-12 Ulrich Drepper +++ +++ * sysdeps/pthread/pthread.h: Cleanup. Fix up for XPG7. +++ +++2010-01-08 Ulrich Drepper +++ +++ * sysdeps/pthread/pthread.h: Fix pthread_mutex_consistent declaration. +++ +++2009-12-18 Thomas Schwinge +++ +++ * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c (_init): Don't +++ call __gmon_start__. +++ * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c (_init): Likewise. +++ +++2009-12-17 Ulrich Drepper +++ +++ * pthread_rwlock_init.c (__pthread_rwlock_init): Simplify code by +++ using memset. +++ +++2009-12-01 Dinakar Guniguntala +++ +++ * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.h: Define +++ FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: If mutex +++ is a non robust PI mutex, then use FUTEX_CMP_REQUEUE_PI. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: If mutex +++ is a non robust PI mutex, then use FUTEX_WAIT_REQUEUE_PI. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise. +++ +++2009-12-12 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait): +++ Don't update nwaiters after invalid timeout is recognized. +++ +++2009-11-27 Thomas Schwinge +++ +++ * sysdeps/unix/sysv/linux/sh/pt-initfini.c (_init): Don't call +++ __gmon_start__. +++ +++2009-11-27 Andreas Schwab +++ +++ * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Reload +++ THREAD_SELF->cancelhandling after returning from futex call. +++ +++2009-11-24 Ulrich Drepper +++ +++ * tst-sem13.c: New file. +++ * Makefile (tests): Add tst-sem13. +++ +++2009-11-22 Roland McGrath +++ +++ * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: # include "i686/dl-sysdep.h" +++ instead of recapitulating its contents. +++ +++2009-11-18 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Minor +++ optimizations and cleanups. +++ +++2009-11-18 Dinakar Guniguntala +++ +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: +++ Remove redundant code. Fix cfi offsets. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: +++ Fix cfi offsets. +++ +++2009-11-17 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Minimally +++ reduce size of unwind info. +++ +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Convert to use +++ cfi directives. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise. +++ Based on a patch by Dinakar Guniguntala . +++ +++2009-11-03 Andreas Schwab +++ +++ [BZ #4457] +++ * sysdeps/pthread/unwind-resume.c: Include and use +++ LIBGCC_S_SO. +++ * sysdeps/pthread/unwind-forcedunwind.c: Likewise. +++ +++2009-10-30 Ulrich Drepper +++ +++ * tst-sem11.c (main): Rewrite to avoid aliasing problems. +++ +++ [BZ #3270] +++ * allocatestack.c (__nptl_setxid): Perform the operation in multiple +++ steps to avoid races with creation and terminations. +++ * nptl-init.c (sighandler_setxid): Adjust. +++ Patch by Daniel Jacobowitz. +++ +++2009-09-07 Andreas Schwab +++ +++ * sysdeps/pthread/bits/libc-lock.h (BP_SYM): Remove space before paren. +++ +++2009-09-02 Suzuki K P +++ Joseph Myers +++ +++ [BZ #7094] +++ * sysdeps/unix/sysv/linux/timer_create.c (timer_create): +++ Initialize the sigev_notify field for newly created timer to make sure +++ the timer gets deleted from the active timer's list upon timer_delete. +++ +++2009-08-27 Andrew Stubbs +++ +++ * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait): +++ Correct a logic error. +++ +++2009-08-25 Ulrich Drepper +++ +++ * sysdeps/x86_64/tls.h (RTLD_ENABLE_FOREIGN_CALL): Store old value +++ of the field in local variables. +++ (RTLD_FINALIZE_FOREIGN_CALL): Restore rtld_must_xmm_save from local +++ variable and don't unconditionally clear it. +++ +++2009-08-24 Ulrich Drepper +++ +++ * pthread_create.c (start_thread): Hint to the kernel that memory for +++ the stack can be reused. We do not mark all the memory. The part +++ still in use and some reserve are kept. +++ +++2009-08-23 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/bits/posix_opt.h: Clean up namespace. +++ +++2009-08-11 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Add CFI +++ directives. +++ +++2009-08-10 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Add CFI +++ directives. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise. +++ +++2009-08-10 Andreas Schwab +++ +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S +++ (__pthread_cond_signal): Don't clobber register used for syscall +++ number. +++ +++2009-08-08 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait): +++ Optimize code path used when FUTEX_CLOCK_REALTIME is supported. +++ +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S +++ (__pthread_cond_wait): Optimize by avoiding use of callee-safe +++ register. +++ +++2009-08-07 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Little optimizations +++ enabled by the special *_asynccancel functions. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise. +++ +++ * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Include lowlevellock.h. +++ +++2009-08-04 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/x86_64/cancellation.S: New file. +++ * sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S: New file. +++ * sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S: New file. +++ * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Optimize +++ since we can assume the special __*_{en,dis}able_asynccancel +++ functions. +++ (PUSHARGS_*, POPARGS_*, SAVESTK_*, RESTSTK_*): Removed. +++ * sysdeps/x86_64/tcb-offsets.sym: Add cancellation-related bits +++ and PTHREAD_CANCELED. +++ +++2009-07-31 Ulrich Drepper +++ +++ * descr.h: Better definition of *_BITMASK macros for cancellation. +++ +++2009-07-29 Ulrich Drepper +++ +++ * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Define explicitly to 32. +++ +++ * sysdeps/x86_64/tls.h (tcbhead_t): Add room for SSE registers the +++ dynamic linker might have to save. +++ Define RTLD_CHECK_FOREIGN_CALL, RTLD_ENABLE_FOREIGN_CALL, +++ RTLD_PREPARE_FOREIGN_CALL, and RTLD_FINALIZE_FOREIGN_CALL. Pretty +++ printing. +++ +++ * sysdeps/x86_64/tcb-offsets.sym: Add RTLD_SAVESPACE_SSE. +++ +++2009-07-28 Ulrich Drepper +++ +++ * pthread_mutex_lock.c [NO_INCR] (__pthread_mutex_cond_lock_adjust): +++ New function. +++ * pthreadP.h: Declare __pthread_mutex_cond_lock_adjust. +++ * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add ROBUST_BIT. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Don't use +++ requeue_pi for robust mutexes. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise. +++ Don't only skip __pthread_mutex_cond_lock. Call instead +++ __pthread_mutex_cond_lock_adjust. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise. +++ +++ * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Minor +++ optimization of PI mutex handling. +++ +++2009-07-27 Ulrich Drepper +++ +++ [BZ #10418] +++ * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Use _rel +++ instead of of _acq variants of cmpxchg. +++ +++2009-07-23 Ulrich Drepper +++ +++ * sysdeps/x86_64/configure.in: New file. +++ +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix error +++ path when not using absolute timeout futex. +++ +++2009-07-20 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Minor +++ optimizations of last changes. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise. +++ +++2009-07-19 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define +++ FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: If mutex +++ is a PI mutex, then use FUTEX_CMP_REQUEUE_PI. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: If mutex +++ is a PI mutex, then use FUTEX_WAIT_REQUEUE_PI. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise. +++ +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S +++ (__pthread_cond_timedwait): Make more robust. +++ +++2009-07-18 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S +++ (__lll_robust_timedlock_wait): If possible use FUTEX_WAIT_BITSET to +++ directly use absolute timeout. +++ +++ * tst-sem5.c (do_test): Add test for premature timeout. +++ * Makefile: Linu tst-sem5 with librt. +++ +++ * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S +++ (pthread_rwlock_timedwrlock): If possible use FUTEX_WAIT_BITSET to +++ directly use absolute timeout. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S +++ (pthread_rwlock_timedrdlock): Likewise. +++ +++ * tst-cond11.c (run_test): Add test to check that the timeout is +++ long enough. +++ +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S +++ (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to +++ directly use absolute timeout. +++ +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S +++ (__pthread_cond_wait): Convert to using exception handler instead of +++ registered unwind buffer. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S +++ (__pthread_cond_timedwait): Likewise. +++ +++2009-07-17 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait): +++ If possible use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME to directly +++ use absolute timeout. +++ +++ * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Optimize +++ handling of uncontested semaphore. +++ +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S +++ (__condvar_cleanup): Rewrite to use cfi directives instead of +++ hand-coded unwind tables. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_once.S (__pthread_once): +++ Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait): +++ Likewise. +++ +++2009-06-12 Ulrich Drepper +++ +++ * Makefile (libpthread-routines): Add pthread_sigqueue. +++ * Versions: Add pthread_sigqueue for GLIBC_2.11. +++ * sysdeps/pthread/bits/sigthread.h: Declare pthread_sigqueue. +++ * sysdeps/unix/sysv/linux/pthread_sigqueue.c: New file. +++ +++2009-06-11 Ulrich Drepper +++ +++ [BZ #10262] +++ * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S +++ (LOAD_FUTEX_WAIT_ABS): Fix futex parameter in case private futexes +++ cannot be assumed. +++ Patch by Bryan Kadzban . +++ +++2009-05-16 Ulrich Drepper +++ +++ * libc-cancellation.c: Move __libc_cleanup_routine to... +++ * libc-cleanup.c: ...here. New file. +++ * Makefile (routines): Add libc-cleanup. +++ +++ * cancellation.c (__pthread_disable_asynccancel): Remove unnecessary +++ test. +++ * libc-cancellation.c: Use +++ +++ * cancellation.c (__pthread_disable_asynccancel): Correct the bits +++ to test when deciding on the delay. +++ * libc-cancellation.c (__libc_disable_asynccancel): Likewise. +++ * pthread_cancel.c: Close race between deciding on sending a signal +++ and setting the CANCELING_BIT bit. +++ +++ * cancellation.c (__pthread_disable_asynccancel): Don't return if +++ thread is canceled. +++ * libc-cancellation.c (__libc_disable_asynccancel): Likewise. +++ +++2009-04-27 Ulrich Drepper +++ +++ * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND +++ is available. +++ * libc-cancellation.c (__libc_disable_asynccancel): Likewise. +++ * sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND. +++ * sysdeps/i386/tls.h: Likewise. +++ (tcbhead_t): Add __private_tm member. +++ +++2009-04-26 Ulrich Drepper +++ +++ * sem_open.c (sem_open): Rewrite initialization of initsem to +++ avoid warnings. +++ +++ * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init): +++ Avoid warning by using may_alias attribute on ptrhack. +++ +++2009-04-22 Ulrich Drepper +++ +++ [BZ #10090] +++ * pthread_attr_setschedparam.c (__pthread_attr_setschedparam): +++ Check policy and priority for validity. +++ Patch mostly by Zhang Xiliang . +++ +++2009-03-15 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S +++ (__pthread_cond_timedwait): Change to use cfi directives instead of +++ hand-coded unwind sections. +++ +++2009-03-10 Ulrich Drepper +++ +++ * init.c (nptl_freeres): Compile only for SHARED. +++ +++2009-03-09 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define +++ FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and +++ FUTEX_BITSET_MATCH_ANY. +++ +++2009-02-27 Roland McGrath +++ +++ * init.c (__nptl_initial_report_events): Mark __attribute_used__. +++ * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise. +++ +++2009-02-26 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define +++ _POSIX_THREAD_ROBUST_PRIO_INHERIT and +++ _POSIX_THREAD_ROBUST_PRIO_PROTECT. Reset value of macros from +++ 200112L to 200809L. +++ +++2009-02-25 Ulrich Drepper +++ +++ * sysdeps/pthread/pthread.h: The robust mutex functions are in +++ POSIX 2008. +++ +++2009-02-24 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H): +++ Unify name of include protector macro. +++ +++2009-02-14 SUGIOKA Toshinobu +++ +++ * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define +++ LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0). +++ +++2009-01-29 Ulrich Drepper +++ +++ * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function +++ pointer variables. +++ +++ * allocatestack.c (__free_stacks): Renamed from free_stacks. +++ (__free_stack_cache): Removed. Change callers to call __free_stacks. +++ * init.c (nptl_freeres): New function. +++ (pthread_functions): Initialize ptr_freeres to nptl_freeres. +++ * pthreadP.h: Don't declare __free_stack_cache. Declare __free_stacks. +++ * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New +++ variable. +++ (pthread_cancel_init): Depend in libgcc_s_handle for decision to +++ load DSO. Assign last. +++ (__unwind_freeres): New function. +++ +++ * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later +++ for better debugging. No need to use stack_list_add here. +++ +++2009-01-14 Kaz Kojima +++ +++ * sysdeps/unix/sysv/linux/sh/lowlevellock.S +++ (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME +++ instead of computing relative timeout. +++ * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define +++ FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY. +++ +++2009-01-25 Ulrich Drepper +++ +++ * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out. +++ +++2009-01-08 Ulrich Drepper +++ +++ * sysdeps/pthread/list.h (list_add): Initialize new element first. +++ (list_add_tail): Removed. +++ +++2009-01-07 Ulrich Drepper +++ +++ * (in_flight_stack): New variable. +++ (stack_list_del): New function. Use instead of list_del. +++ (stack_list_add): New function. Use instead of list_add when adding to +++ stack_cache and stack_used lists. +++ (__reclaim_stacks): Complete operations on stack_cache and stack_used lists +++ when the fork call interrupted another thread. +++ +++2009-01-04 Ulrich Drepper +++ +++ * init.c (__pthread_initialize_minimal_internal): Optimize test +++ FUTEX_CLOCK_REALTIME a bit. +++ +++2009-01-03 Ulrich Drepper +++ +++ * init.c (__pthread_initialize_minimal_internal): Cheat a bit by +++ only passing five parameters to FUTEX_WAIT_BITSET call. +++ +++ * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S +++ (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME +++ instead of computing relative timeout. +++ +++2009-01-02 Ulrich Drepper +++ +++ * init.c (__pthread_initialize_minimal_internal): Check for +++ FUTEX_CLOCK_REALTIME flag. +++ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait): +++ Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing +++ relative timeout. +++ +++ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define +++ FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY. +++ * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise. +++ * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise. +++ * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise. +++ * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise. +++ +++2008-12-09 Ulrich Drepper +++ +++ * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty +++ loop body instead of ; to avoid gcc warnings. +++ (pthread_cleanup_pop_restore_np): Likewise. +++ Patch by Caolán McNamara . +++ +++2008-12-09 Jakub Jelinek +++ +++ * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the +++ fast path here, for robust/PI/PP mutexes call +++ __pthread_mutex_lock_full. Don't use switch, instead use a series +++ of ifs according to their probability. +++ (__pthread_mutex_lock_full): New function. +++ * pthread_mutex_unlock.c: Include assert.h. +++ (__pthread_mutex_unlock_usercnt): Handle only the +++ fast path here, for robust/PI/PP mutexes call +++ __pthread_mutex_unlock_full. Don't use switch, instead use a series +++ of ifs according to their probability. +++ (__pthread_mutex_unlock_full): New function. +++ * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c +++ (__pthread_mutex_lock_full): Define. +++ +++2008-12-08 Ulrich Drepper +++ +++ * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM +++ implementation. Add necessary padding and. +++ * descr.h (struct pthread): Increase padding for tcbhead_t to 24 +++ words. +++ +++2008-12-04 Kaz Kojima +++ +++ * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET +++ and FUTEX_WAKE_BITSET. +++ +++2008-12-02 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET +++ and FUTEX_WAKE_BITSET. +++ * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise. +++ * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise. +++ * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise. +++ +++2008-11-25 Roland McGrath +++ +++ * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha: +++ Subdirectories moved to ports repository as +++ sysdeps/.../nptl subdirectories. +++ +++2008-11-12 Jakub Jelinek +++ +++ [BZ #7008] +++ * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking +++ of old value. +++ * pthread_cond_init.c (__pthread_cond_init): Fix +++ cond->__data.__nwaiters initialization. +++ * Makefile (tests): Add tst-cond23. +++ * tst-cond23.c: New test. +++ +++2008-11-07 Jakub Jelinek +++ +++ * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define +++ arguments. +++ (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get} +++ arguments. +++ +++2008-11-01 Ulrich Drepper +++ +++ [BZ #6955] +++ * pthread_mutex_lock.c: Add support for private PI mutexes. +++ * pthread_mutex_timedlock.c: Likewise. +++ * pthread_mutex_trylock.c: Likewise. +++ * pthread_mutex_unlock.c: Likewise. +++ Patch mostly by Ben Jackson . +++ +++2008-10-31 Ulrich Drepper +++ +++ [BZ #6843] +++ * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread): +++ Increase stack size for helper thread. +++ +++2008-10-06 Martin Schwidefsky +++ +++ * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline +++ assembly with a clobber list for access registers a0 and a1. +++ +++2008-09-11 Martin Schwidefsky +++ +++ * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier +++ to force runp->refcntr to be read from memory. +++ +++2008-09-08 Richard Guenther +++ +++ * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock, +++ lll_robust_lock, lll_cond_lock, lll_robust_cond_lock, +++ lll_timedlock, lll_robust_timedlock, lll_unlock, +++ lll_robust_unlock): Promote private to int. +++ +++2008-08-15 Ulrich Drepper +++ +++ * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and +++ ARCH_RETRY_MMAP definitions. +++ * allocatestack.c: Remove definition of ARCH_MAP_FLAGS. +++ Define MAP_STACK when not defined. +++ (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS. Remove +++ handling of ARCH_RETRY_MMAP. +++ +++2008-07-30 Ulrich Drepper +++ +++ * tst-align2.c (f): Print message that f is reached. +++ +++2008-04-28 Hiroki Kaminaga +++ +++ [BZ #6740] +++ * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol +++ definition with #ifndef __ASSUME_PRIVATE_FUTEX. +++ +++2008-07-25 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use +++ SOCK_CLOEXEC if possible. +++ +++2008-05-29 Ulrich Drepper +++ +++ * Makefile (tests): Add tst-rwlock2a. +++ * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use. +++ * tst-rwlock2a.c: New file. +++ +++2008-06-12 Ulrich Drepper +++ +++ * sysdeps/pthread/pthread.h: Remove inadvertant checkin. +++ +++2008-05-17 Samuel Thibault +++ +++ * sysdeps/pthread/pthread.h: Fix typo in comment. +++ +++2008-05-28 Ulrich Drepper +++ +++ * sysdeps/pthread/createthread.c (do_clone): Pass accurate length +++ of CPU set to the kernel. +++ +++2008-05-23 Paul Pluzhnikov +++ +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add +++ cfi directives. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise. +++ +++2008-05-22 Paul Pluzhnikov +++ +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add +++ cfi directives. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S: +++ Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: +++ Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: +++ Likewise. +++ +++2008-05-26 Ulrich Drepper +++ +++ * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants. +++ +++2008-05-20 Jakub Jelinek +++ +++ David S. Miller +++ +++ * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file. +++ +++2008-05-10 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access +++ __pshared correctly. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: +++ Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S: +++ Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: +++ Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: +++ Likewise. +++ Reported by Clemens Kolbitsch . +++ +++2008-04-14 David S. Miller +++ +++ * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c +++ (__old_sem_wait): Fix argument to lll_futex_wait(). +++ +++2007-11-26 Daniel Jacobowitz +++ +++ * pthread_create.c: Require pthread_mutex_trylock and +++ pthread_key_delete for libgcc. +++ +++2008-04-08 Jakub Jelinek +++ +++ [BZ #6020] +++ * sysdeps/unix/sysv/linux/sparc/lowlevellock.h +++ (lll_futex_wake_unlock): Add private argument to the pre-v9 macro. +++ Patch by Sunil Amitkumar Janki . +++ +++2008-03-27 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if +++ has defined it. +++ * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise. +++ * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise. +++ * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise. +++ * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise. +++ +++2008-03-18 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead +++ of ASSEMBLER. +++ * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise. +++ * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise. +++ +++2008-03-14 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define +++ HAVE_DL_DISCOVER_OSVERSION. +++ * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise. +++ * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise. +++ +++2008-03-07 Ulrich Drepper +++ +++ [BZ #5778] +++ * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change +++ _POSIX_CHOWN_RESTRICTED value to zero. +++ +++2008-01-31 Roland McGrath +++ +++ * Makefile (omit-deps): Variable removed. +++ +++2008-01-30 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid +++ unnecessary addr32 prefix. +++ +++2008-01-29 Roland McGrath +++ +++ * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables. +++ +++2008-01-22 Kaz Kojima +++ +++ * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field. +++ +++2008-01-21 Kaz Kojima +++ +++ * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use +++ a scratch register. +++ * sysdeps/unix/sysv/linux/sh/lowlevellock.S +++ (__lll_lock_wait_private): Fix typo. +++ * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S +++ (pthread_barrier_wait): Likewise. Adjust XADD use. +++ * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post): +++ Adjust XADD use. +++ * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S +++ (pthread_rwlock_timedrdlock): Return correct return value. +++ * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S +++ (pthread_rwlock_timedwrlock): Likewise. +++ +++2008-01-15 Ulrich Drepper +++ +++ * tst-eintr2.c (do_test): make sure that if mutex_lock in main +++ thread returns the program exits with an error code. +++ +++2008-01-10 Ulrich Drepper +++ +++ * pthread-errnos.sym: Add EOVERFLOW. +++ * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX. +++ * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field. +++ * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise. +++ +++2007-12-14 Ulrich Drepper +++ +++ * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional +++ parameter. Passed it as permission to mmap. +++ * allocatestack.c (allocate_stack): Pass prot as second parameter +++ to ARCH_RETRY_MMAP. +++ +++2007-12-12 Ulrich Drepper +++ +++ * tst-basic7.c: Allocate memory for the stack. +++ +++ [BZ #5465] +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED] +++ (__pthread_cond_timedwait): Don't use VDSO. +++ Patch by Michal Januszewski. +++ +++2007-12-07 Ulrich Drepper +++ +++ [BZ #5455] +++ * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop): +++ Allow label before pthread_cleanup_pop. +++ (pthread_cleanup_pop_restore_np): Likewise. +++ +++2007-12-04 Kaz Kojima +++ +++ * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait): +++ Store 2 before returning ETIMEDOUT. +++ +++2007-11-23 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait): +++ Store 2 before returning ETIMEDOUT. +++ * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise +++ * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise. +++ (__lll_lock_wait_private): Optimize. +++ (__lll_lock_wait): Likewise. +++ +++2007-11-20 Jakub Jelinek +++ +++ * sysdeps/pthread/pthread.h (pthread_cleanup_push, +++ pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up +++ g++ 4.1 and 4.2 -Wstrict-aliasing warnings. +++ +++2007-11-08 Ulrich Drepper +++ +++ [BZ #5240] +++ * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): +++ If we time out, try one last time to lock the futex to avoid +++ losing a wakeup signal. +++ * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise. +++ +++ [BZ #5245] +++ * sysdeps/pthread/createthread.c (do_clone): Translate clone error +++ if necessary. +++ +++2007-11-07 Ulrich Drepper +++ +++ [BZ #5245] +++ * allocatestack.c (allocate_stack): Change ENOMEM error in case +++ mmap failed to EAGAIN. +++ * Makefile (tests): Add tst-basic7. +++ * tst-basic7.c: New file. +++ +++2007-11-05 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork): +++ Use __linkin_atfork. +++ +++2007-11-03 Mike Frysinger +++ +++ * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add +++ missing line continuations. +++ * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT, +++ LOAD_FUTEX_WAKE): Likewise. Also add missing 3rd parameter. +++ +++2007-10-28 Ulrich Drepper +++ +++ [BZ #5220] +++ * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare +++ __active_timer_sigev_thread and __active_timer_sigev_thread_lock. +++ (struct timer): Add next element. +++ * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers, +++ enqueue timer structure into __active_timer_sigev_thread list. +++ * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers, +++ remove timer struct from __active_timer_sigev_thread. +++ * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread): +++ Before using timer structure make sure it is still on the +++ __active_timer_sigev_thread list. Keep lock until done. +++ Define __active_timer_sigev_thread and +++ __active_timer_sigev_thread_lock. +++ +++2007-10-27 Ulrich Drepper +++ +++ * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM. +++ Redefine thread_atfork for use of ATFORK_MEM. +++ * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork. +++ * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New +++ function. +++ * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork): +++ Use atomic operation when removing first element of list. +++ +++2007-10-17 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New +++ routine instead of an alias to __new_sem_post. +++ +++2007-10-15 Jakub Jelinek +++ +++ * init.c (__pthread_initialize_minimal): Initialize word to appease +++ valgrind. +++ +++2007-10-10 Jakub Jelinek +++ +++ * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of +++ libc.so just clear NAME. +++ (__libc_rwlock_fini): Nop inside of libc.so. +++ * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is +++ all zeros. +++ +++2007-09-02 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S +++ (__pthread_cond_wait): Fix unlocking of internal lock after mutex +++ unlocking failed. +++ Patch by Luca Barbieri . +++ +++2007-08-21 Ulrich Drepper +++ +++ [BZ #4938] +++ * allocatestack.c (__reclaim_stacks): Clear the TSD in the +++ reclaimed stack if necessary. +++ * Makefile (tests): Add tst-tsd6. +++ * tst-tsd6.c: New file. +++ +++2007-08-21 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead): +++ Add private argument. +++ +++2007-08-20 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S +++ (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible. +++ +++2007-08-16 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/alpha/lowlevellock.h +++ (__lll_robust_timedlock): Pass private as last argument to +++ __lll_robust_timedlock_wait. +++ (__lll_unlock): Fix a pasto. +++ +++2007-08-15 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem, +++ sparc_old_sem): New structs. +++ * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c +++ (__sem_wait_cleanup): New function. +++ (__new_sem_wait): Use sparc_new_sem structure. Bump and afterwards +++ decrease nwaiters. Register __sem_wait_cleanup as cleanup handler. +++ Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to +++ lll_futex_wait. +++ (__old_sem_wait): New function. +++ * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include +++ nptl/sysdeps/unix/sysv/linux/sparc version. +++ * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: +++ Likewise. +++ * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise. +++ * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c +++ (__new_sem_trywait): Use sparc_old_sem structure. +++ * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c +++ (sem_timedwait): Use sparc_new_sem structure. Bump and afterwards +++ decrease nwaiters. Register __sem_wait_cleanup as cleanup handler. +++ Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to +++ lll_futex_timed_wait. +++ * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post): +++ Use sparc_new_sem structure. Only wake if nwaiters > 0. Pass +++ isem->private ^ FUTEX_PRIVATE_FLAG as last argument to +++ lll_futex_wake. +++ (__old_sem_post): New function. +++ * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file. +++ * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file. +++ * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file. +++ * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file. +++ * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove. +++ * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove. +++ +++2007-08-14 Kaz Kojima +++ +++ * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S +++ (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or +++ FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private. +++ Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private. +++ * sysdeps/unix/sysv/linux/shpthread_cond_signal.S +++ (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or +++ FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private. +++ Use FUTEX_WAKE_OP. +++ * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include +++ kernel-features.h and tcb-offsets.h. +++ (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to +++ lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is +++ process private. +++ * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include +++ tcb-offsets.h. +++ (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE +++ to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is +++ process private. +++ * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef +++ __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX. +++ * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise. +++ * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise. +++ * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise. +++ * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise. +++ * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise. +++ +++2007-08-14 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix. +++ * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c +++ (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to +++ lll_futex_timed_wait. +++ +++ * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock, +++ __lll_robust_unlock): Rewrite as macros instead of inline functions. +++ * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock, +++ __lll_robust_unlock, __lll_wait_tid): Likewise. +++ +++2007-08-13 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag): +++ Fix a pasto. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S +++ (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or +++ FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private. +++ Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S +++ (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or +++ FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include +++ kernel-features.h. +++ (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to +++ lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is +++ process private. Switch DW_CFA_advance_loc1 and some +++ DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S +++ (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to +++ lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is +++ process private. Switch DW_CFA_advance_loc{1,2} and some +++ DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use +++ #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S: +++ Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: +++ Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S +++ (__pthread_cond_broadcast): Compare %r8 instead of +++ dep_mutex-cond_*(%rdi) with $-1. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S +++ (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead +++ of oring. +++ +++2007-08-13 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/i386/i786/Implies: New file. +++ +++2007-08-13 Jakub Jelinek +++ +++ * allocatestack.c: Include kernel-features.h. +++ * pthread_create.c: Likewise. +++ * pthread_mutex_init.c: Likewise. +++ * init.c: Likewise. +++ * pthread_cond_timedwait.c: Likewise. +++ * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise. +++ * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S: +++ Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: +++ Likewise. +++ * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise. +++ * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise. +++ * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise. +++ * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise. +++ +++2007-08-12 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h +++ [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four +++ byte elements. One of them is the new __shared element. +++ [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared, +++ adjust names of other padding elements. +++ * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h +++ [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four +++ byte elements. One of them is the new __shared element. +++ [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared, +++ adjust names of other padding elements. +++ * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t): +++ Renamed __pad1 element to __shared, adjust names of other padding +++ elements. +++ * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h +++ (pthread_rwlock_t): Likewise. +++ * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a +++ typo. +++ +++2007-08-09 Anton Blanchard +++ +++ * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file. +++ +++2007-08-12 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include +++ . +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise. +++ +++2007-08-11 Ulrich Drepper +++ +++ * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define. +++ * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when +++ dealing with robust mutexes. +++ * pthread_mutex_timedlock.c: Likewise. +++ * pthread_mutex_trylock.c: Likewise. +++ * pthread_mutex_unlock.c: Likewise. +++ * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise. +++ +++2007-08-06 Jakub Jelinek +++ +++ * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define. +++ (PTHREAD_MUTEX_TYPE): Mask __kind with 127. +++ (PTHREAD_MUTEX_PSHARED): Define. +++ * pthread_mutex_init.c (__pthread_mutex_init): Set +++ PTHREAD_MUTEX_PSHARED_BIT for pshared or robust +++ mutexes. +++ * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument +++ instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED +++ as second argument to lll_lock. +++ (LLL_MUTEX_TRYLOCK): Take mutex as argument +++ instead of its __data.__lock field. +++ (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its +++ __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument +++ to lll_robust_lock. +++ (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK, +++ LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex) +++ instead of mutex->__data.__kind directly, pass +++ PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait. +++ * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use +++ PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind +++ directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock. +++ (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex) +++ to lll_timedlock, lll_robust_timedlock, lll_unlock and +++ lll_futex_timed_wait. Use PTHREAD_MUTEX_TYPE (mutex) instead +++ of mutex->__data.__kind directly. +++ * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass +++ PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock, +++ lll_robust_timedlock, lll_unlock and lll_futex_timed_wait. Use +++ PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly. +++ * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass +++ PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock +++ and lll_futex_wake. +++ * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass +++ PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake. +++ Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind +++ directly. +++ * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK): +++ Take mutex as argument instead of its __data.__lock field, pass +++ PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock. +++ (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its +++ __data.__lock field. +++ (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its +++ __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument +++ to lll_robust_cond_lock. +++ * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared +++ variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and +++ lll_futex_wake. Don't use lll_futex_requeue if dependent mutex +++ has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind. +++ * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared +++ variable, pass it to lll_lock, lll_unlock, lll_futex_wake and +++ lll_futex_wait. +++ * pthread_cond_signal.c (__pthread_cond_signal): Add pshared +++ variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and +++ lll_futex_wake. +++ * pthread_cond_timedwait.c (__pthread_cond_wait): Add +++ pshared variable, pass it to lll_lock, lll_unlock, +++ lll_futex_timedwait and lll_futex_wake. +++ * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add +++ pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait +++ and lll_futex_wake. +++ * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue, +++ lll_futex_wake_unlock): Add private argument, use __lll_private_flag +++ macro. +++ * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue, +++ lll_futex_wake_unlock): Likewise. +++ * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue): +++ Likewise. +++ * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue, +++ lll_futex_wake_unlock): Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue): +++ Likewise. +++ * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue, +++ lll_futex_wake_unlock): Likewise. +++ (lll_futex_wake): Fix a typo. +++ * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S +++ (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or +++ FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private. +++ Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S +++ (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or +++ FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S +++ (__pthread_cond_timedwait): Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: +++ (__condvar_cleanup, __pthread_cond_wait): Likewise. +++ +++2007-08-05 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO): +++ Don't use CGOTSETUP and CGOTRESTORE macros. +++ (CGOTSETUP, CGOTRESTORE): Remove. +++ (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to +++ @local symbol. +++ +++2007-08-01 Kaz Kojima +++ +++ * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove +++ definitions for private futexes. +++ * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include +++ kernel-features.h and lowlevellock.h. Use private futexes if +++ they are available. +++ (__lll_lock_wait_private, __lll_unlock_wake_private): New. +++ (__lll_mutex_lock_wait): Rename to +++ (__lll_lock_wait): ... this. Don't compile in for libc.so. +++ (__lll_mutex_timedlock_wait): Rename to ... +++ (__lll_timedlock_wait): ... this. Use __NR_gettimeofday. +++ Don't compile in for libc.so. +++ (__lll_mutex_unlock_wake): Rename to ... +++ (__lll_unlock_wake): ... this. Don't compile in for libc.so. +++ (__lll_timedwait_tid): Use __NR_gettimeofday. +++ * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including +++ the header from assembler. Renamed all lll_mutex_* resp. +++ lll_robust_mutex_* macros to lll_* resp. lll_robust_*. +++ Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*. +++ (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): +++ Define. +++ (__lll_lock_wait_private): Add prototype. +++ (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait, +++ __lll_robust_timedlock_wait, __lll_unlock_wake_private, +++ __lll_unlock_wake): Likewise. +++ (lll_lock): Add private argument. Call __lll_lock_wait_private +++ if private is constant LLL_PRIVATE. +++ (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock, +++ lll_timedlock, lll_robust_timedlock): Add private argument. +++ (lll_unlock): Add private argument. Call __lll_unlock_wake_private +++ if private is constant LLL_PRIVATE. +++ (lll_robust_unlock, lll_robust_dead): Add private argument. +++ (lll_lock_t): Remove. +++ (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake, +++ __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait, +++ lll_cond_wake, lll_cond_broadcast): Remove. +++ * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include +++ kernel-features.h and lowlevellock.h. +++ (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove. +++ (LOAD_FUTEX_WAIT): Define. +++ (__lll_robust_mutex_lock_wait): Rename to ... +++ (__lll_robust_lock_wait): ... this. Add private argument. +++ Use LOAD_FUTEX_WAIT macro. +++ (__lll_robust_mutex_timedlock_wait): Rename to ... +++ (__lll_robust_timedlock_wait): ... this. Add private argument. +++ Use __NR_gettimeofday. Use LOAD_FUTEX_WAIT macro. +++ * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include +++ lowlevellock.h. +++ (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove. +++ (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of +++ __lll_mutex_{lock,unlock}_*. +++ * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include +++ lowlevellock.h and pthread-errnos.h. +++ (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, +++ FUTEX_CMP_REQUEUE, EINVAL): Remove. +++ (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of +++ __lll_mutex_{lock,unlock}_*. +++ * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include +++ lowlevellock.h and pthread-errnos.h. +++ (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove. +++ (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of +++ __lll_mutex_{lock,unlock}_*. +++ * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include +++ lowlevellock.h. +++ (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove. +++ (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of +++ __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday. +++ (__condvar_tw_cleanup): Likewise. +++ * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include +++ lowlevellock.h. +++ (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove. +++ (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of +++ __lll_mutex_{lock,unlock}_*. +++ ( __condvar_w_cleanup): Likewise. +++ * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h. +++ (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove. +++ * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include +++ lowlevellock.h. +++ (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove. +++ (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of +++ __lll_mutex_{lock,unlock}_*. +++ * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include +++ lowlevellock.h. +++ (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, +++ FUTEX_PRIVATE_FLAG): Remove. +++ (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of +++ __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday. +++ * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include +++ lowlevellock.h. +++ (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, +++ FUTEX_PRIVATE_FLAG): Remove. +++ (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of +++ __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday. +++ * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include +++ lowlevellock.h. +++ (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove. +++ (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of +++ __lll_mutex_{lock,unlock}_*. +++ * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include +++ lowlevellock.h. +++ (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove. +++ (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of +++ __lll_mutex_{lock,unlock}_*. +++ * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h. +++ (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove. +++ (__new_sem_post): Use standard initial exec code sequences. +++ * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include +++ lowlevellock.h. +++ (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, +++ FUTEX_PRIVATE_FLAG): Remove. +++ (sem_timedwait): Use __NR_gettimeofday. Use standard initial +++ exec code sequences. +++ * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h. +++ (__new_sem_trywait): Use standard initial exec code sequences. +++ * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h. +++ (__new_sem_wait): Use standard initial exec code sequences. +++ +++2007-07-31 Anton Blanchard +++ +++ * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post): +++ Use __asm __volatile (__lll_acq_instr ::: "memory") instead of +++ atomic_full_barrier. +++ +++2007-07-31 Jakub Jelinek +++ +++ * allocatestack.c (stack_cache_lock): Change type to int. +++ (get_cached_stack, allocate_stack, __deallocate_stack, +++ __make_stacks_executable, __find_thread_by_id, __nptl_setxid, +++ __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE +++ as second argument to lll_lock and lll_unlock macros on +++ stack_cache_lock. +++ * pthread_create.c (__find_in_stack_list): Likewise. +++ (start_thread): Similarly with pd->lock. Use lll_robust_dead +++ macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it +++ as second argument. +++ * descr.h (struct pthread): Change lock and setxid_futex field +++ type to int. +++ * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use +++ LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER. +++ * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise. +++ * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0): +++ Likewise. +++ * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise. +++ * pthread_cond_init.c (__pthread_cond_init): Likewise. +++ * pthreadP.h (__attr_list_lock): Change type to int. +++ * pthread_attr_init.c (__attr_list_lock): Likewise. +++ * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass +++ ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to +++ lll_{,un}lock. +++ * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and +++ also for lll_futex_{wake,wait}. +++ * pthread_barrier_init.c (pthread_barrier_init): Make iattr +++ a pointer to const. +++ * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass +++ LLL_SHARED as second argument to lll_{,un}lock. +++ * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise. +++ * pthread_cond_signal.c (__pthread_cond_singal): Likewise. +++ * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise. +++ * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): +++ Likewise. +++ * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE +++ as second argument to lll_{,un}lock macros on pd->lock. +++ * pthread_getschedparam.c (__pthread_getschedparam): Likewise. +++ * pthread_setschedparam.c (__pthread_setschedparam): Likewise. +++ * pthread_setschedprio.c (pthread_setschedprio): Likewise. +++ * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority): +++ Likewise. +++ * sysdeps/pthread/createthread.c (do_clone, create_thread): +++ Likewise. +++ * pthread_once.c (once_lock): Change type to int. +++ (__pthread_once): Pass LLL_PRIVATE as second argument to +++ lll_{,un}lock macros on once_lock. +++ * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use +++ lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass +++ rwlock->__data.__shared as second argument to them and similarly +++ for lll_futex_w*. +++ * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock): +++ Likewise. +++ * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock): +++ Likewise. +++ * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise. +++ * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise. +++ * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise. +++ * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise. +++ * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument +++ to lll_{,un}lock macros on __sem_mappings_lock. +++ * sem_open.c (check_add_mapping): Likewise. +++ (__sem_mappings_lock): Change type to int. +++ * semaphoreP.h (__sem_mappings_lock): Likewise. +++ * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK, +++ LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros +++ instead of lll_*mutex_*, pass LLL_SHARED as last +++ argument. +++ (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock, +++ pass LLL_SHARED as last argument. +++ * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK, +++ LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use +++ lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*, +++ pass LLL_SHARED as last argument. +++ * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use +++ lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass +++ LLL_SHARED as last argument. +++ * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly. +++ * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): +++ Similarly. +++ * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock, +++ __libc_lock_lock_recursive, __libc_lock_unlock, +++ __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second +++ argument to lll_{,un}lock. +++ * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock, +++ _IO_lock_unlock): Likewise. +++ * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use +++ compound literal. +++ * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork): +++ Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on +++ __fork_lock. +++ * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork, +++ free_mem): Likewise. +++ (__fork_lock): Change type to int. +++ * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise. +++ * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass +++ isem->private ^ FUTEX_PRIVATE_FLAG as second argument to +++ lll_futex_wake. +++ * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise. +++ * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise. +++ * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private): +++ New function. +++ (__lll_lock_wait, __lll_timedlock_wait): Add private argument and +++ pass it through to lll_futex_*wait, only compile in when +++ IS_IN_libpthread. +++ * sysdeps/unix/sysv/linux/lowlevelrobustlock.c +++ (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private +++ argument and pass it through to lll_futex_*wait. +++ * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all +++ lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp. +++ lll_robust_*. Renamed all __lll_mutex_* resp. __lll_robust_mutex_* +++ inline functions to __lll_* resp. __lll_robust_*. +++ (LLL_MUTEX_LOCK_INITIALIZER): Remove. +++ (lll_mutex_dead): Add private argument. +++ (__lll_lock_wait_private): New prototype. +++ (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait, +++ __lll_robust_lock_timedwait): Add private argument to prototypes. +++ (__lll_lock): Add private argument, if it is constant LLL_PRIVATE, +++ call __lll_lock_wait_private, otherwise pass private to +++ __lll_lock_wait. +++ (__lll_robust_lock, __lll_cond_lock, __lll_timedlock, +++ __lll_robust_timedlock): Add private argument, pass it to +++ __lll_*wait functions. +++ (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE, +++ call __lll_unlock_wake_private, otherwise pass private to +++ __lll_unlock_wake. +++ (__lll_robust_unlock): Add private argument, pass it to +++ __lll_robust_unlock_wake. +++ (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock, +++ lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private +++ argument, pass it through to __lll_* inline function. +++ (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove. +++ (lll_lock_t): Remove. +++ (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake, +++ __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait, +++ lll_cond_wake, lll_cond_broadcast): Remove. +++ * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise. +++ * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise. +++ * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise. +++ * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise. +++ * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including +++ the header from assembler. Renamed all lll_mutex_* resp. +++ lll_robust_mutex_* macros to lll_* resp. lll_robust_*. +++ (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, +++ FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define. +++ (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED, +++ LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove. +++ (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait, +++ __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake): +++ Remove prototype. +++ (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define. +++ (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER* +++ rather than LLL_MUTEX_LOCK_INITIALIZER* macros. +++ (lll_trylock): Likewise, use __lll_trylock_asm, pass +++ MULTIPLE_THREADS_OFFSET as another asm operand. +++ (lll_lock): Add private argument, use __lll_lock_asm_start, pass +++ MULTIPLE_THREADS_OFFSET as last asm operand, call +++ __lll_lock_wait_private if private is constant LLL_PRIVATE, +++ otherwise pass private as another argument to __lll_lock_wait. +++ (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock, +++ lll_timedlock, lll_robust_timedlock): Add private argument, pass +++ private as another argument to __lll_*lock_wait call. +++ (lll_unlock): Add private argument, use __lll_unlock_asm, pass +++ MULTIPLE_THREADS_OFFSET as another asm operand, call +++ __lll_unlock_wake_private if private is constant LLL_PRIVATE, +++ otherwise pass private as another argument to __lll_unlock_wake. +++ (lll_robust_unlock): Add private argument, pass private as another +++ argument to __lll_unlock_wake. +++ (lll_robust_dead): Add private argument, use __lll_private_flag +++ macro. +++ (lll_islocked): Use LLL_LOCK_INITIALIZER instead of +++ LLL_MUTEX_LOCK_INITIALIZER. +++ (lll_lock_t): Remove. +++ (LLL_LOCK_INITIALIZER_WAITERS): Define. +++ (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake, +++ __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait, +++ lll_cond_wake, lll_cond_broadcast): Remove. +++ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert +++ 2007-05-2{3,9} changes. +++ * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include +++ kernel-features.h and lowlevellock.h. +++ (LOAD_PRIVATE_FUTEX_WAIT): Define. +++ (LOAD_FUTEX_WAIT): Rewritten. +++ (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't +++ define. +++ (__lll_lock_wait_private, __lll_unlock_wake_private): New functions. +++ (__lll_mutex_lock_wait): Rename to ... +++ (__lll_lock_wait): ... this. Take futex addr from %edx instead of +++ %ecx, %ecx is now private argument. Don't compile in for libc.so. +++ (__lll_mutex_timedlock_wait): Rename to ... +++ (__lll_timedlock_wait): ... this. Use __NR_gettimeofday. %esi +++ contains private argument. Don't compile in for libc.so. +++ (__lll_mutex_unlock_wake): Rename to ... +++ (__lll_unlock_wake): ... this. %ecx contains private argument. +++ Don't compile in for libc.so. +++ (__lll_timedwait_tid): Use __NR_gettimeofday. +++ * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include +++ kernel-features.h and lowlevellock.h. +++ (LOAD_FUTEX_WAIT): Define. +++ (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't +++ define. +++ (__lll_robust_mutex_lock_wait): Rename to ... +++ (__lll_robust_lock_wait): ... this. Futex addr is now in %edx +++ argument, %ecx argument contains private. Use LOAD_FUTEX_WAIT +++ macro. +++ (__lll_robust_mutex_timedlock_wait): Rename to ... +++ (__lll_robust_timedlock_wait): ... this. Use __NR_gettimeofday. +++ %esi argument contains private, use LOAD_FUTEX_WAIT macro. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include +++ lowlevellock.h. +++ (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define. +++ (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass +++ PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to +++ __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address +++ to __lll_lock_wait in %edx. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: +++ Include lowlevellock.h and pthread-errnos.h. +++ (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, +++ FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define. +++ (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass +++ cond_lock address in %edx rather than %ecx to __lll_lock_wait, +++ pass LLL_SHARED in %ecx to both __lll_lock_wait and +++ __lll_unlock_wake. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: +++ Include lowlevellock.h and pthread-errnos.h. +++ (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP, +++ FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define. +++ (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass +++ cond_lock address in %edx rather than %ecx to __lll_lock_wait, +++ pass LLL_SHARED in %ecx to both __lll_lock_wait and +++ __lll_unlock_wake. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: +++ Include lowlevellock.h. +++ (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK): +++ Don't define. +++ (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass +++ cond_lock address in %edx rather than %ecx to __lll_lock_wait, +++ pass LLL_SHARED in %ecx to both __lll_lock_wait and +++ __lll_unlock_wake. Use __NR_gettimeofday. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: +++ Include lowlevellock.h. +++ (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define. +++ (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_* +++ to __lll_*, pass cond_lock address in %edx rather than %ecx to +++ __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait +++ and __lll_unlock_wake. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: +++ Include lowlevellock.h. +++ (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define. +++ (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass +++ MUTEX(%ebx) address in %edx rather than %ecx to +++ __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait +++ and __lll_unlock_wake. Move return value from %ecx to %edx +++ register. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: +++ Include lowlevellock.h. +++ (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK): +++ Don't define. +++ (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass +++ MUTEX(%ebp) address in %edx rather than %ecx to +++ __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait +++ and __lll_unlock_wake. Move return value from %ecx to %edx +++ register. Use __NR_gettimeofday. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S: +++ Include lowlevellock.h. +++ (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK): +++ Don't define. +++ (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass +++ MUTEX(%ebp) address in %edx rather than %ecx to +++ __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait +++ and __lll_unlock_wake. Move return value from %ecx to %edx +++ register. Use __NR_gettimeofday. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: +++ Include lowlevellock.h. +++ (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define. +++ (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass +++ MUTEX(%edi) address in %edx rather than %ecx to +++ __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait +++ and __lll_unlock_wake. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: +++ Include lowlevellock.h. +++ (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define. +++ (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass +++ MUTEX(%ebx) address in %edx rather than %ecx to +++ __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait +++ and __lll_unlock_wake. Move return value from %ecx to %edx +++ register. +++ * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include +++ lowlevellock.h. +++ (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't +++ define. +++ * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h. +++ (LOCK, SYS_futex, FUTEX_WAKE): Don't define. +++ * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include +++ lowlevellock.h. +++ (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define. +++ (sem_timedwait): Use __NR_gettimeofday. +++ * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include +++ lowlevellock.h. +++ (LOCK): Don't define. +++ * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include +++ lowlevellock.h. +++ (LOCK, SYS_futex, FUTEX_WAIT): Don't define. +++ * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there +++ are waiters. +++ * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert +++ 2007-05-2{3,9} changes. +++ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include +++ kernel-features.h and lowlevellock.h. +++ (LOAD_PRIVATE_FUTEX_WAIT): Define. +++ (LOAD_FUTEX_WAIT): Rewritten. +++ (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define. +++ (__lll_lock_wait_private, __lll_unlock_wake_private): New functions. +++ (__lll_mutex_lock_wait): Rename to ... +++ (__lll_lock_wait): ... this. %esi is now private argument. +++ Don't compile in for libc.so. +++ (__lll_mutex_timedlock_wait): Rename to ... +++ (__lll_timedlock_wait): ... this. %esi contains private argument. +++ Don't compile in for libc.so. +++ (__lll_mutex_unlock_wake): Rename to ... +++ (__lll_unlock_wake): ... this. %esi contains private argument. +++ Don't compile in for libc.so. +++ * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include +++ kernel-features.h and lowlevellock.h. +++ (LOAD_FUTEX_WAIT): Define. +++ (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define. +++ (__lll_robust_mutex_lock_wait): Rename to ... +++ (__lll_robust_lock_wait): ... this. %esi argument contains private. +++ Use LOAD_FUTEX_WAIT macro. +++ (__lll_robust_mutex_timedlock_wait): Rename to ... +++ (__lll_robust_timedlock_wait): ... this. %esi argument contains +++ private, use LOAD_FUTEX_WAIT macro. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include +++ lowlevellock.h. +++ (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define. +++ (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass +++ PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to +++ __lll_lock_wait and __lll_unlock_wake. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: +++ Include lowlevellock.h and pthread-errnos.h. +++ (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, +++ FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define. +++ (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, +++ pass LLL_SHARED in %esi to both __lll_lock_wait and +++ __lll_unlock_wake. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: +++ Include lowlevellock.h and pthread-errnos.h. +++ (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP, +++ FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define. +++ (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, +++ pass LLL_SHARED in %esi to both __lll_lock_wait and +++ __lll_unlock_wake. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: +++ Include lowlevellock.h. +++ (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define. +++ (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, +++ pass LLL_SHARED in %esi to both __lll_lock_wait and +++ __lll_unlock_wake. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: +++ Include lowlevellock.h. +++ (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define. +++ (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_* +++ to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait +++ and __lll_unlock_wake. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: +++ Include lowlevellock.h. +++ (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK): +++ Don't define. +++ (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, +++ pass PSHARED(%rdi) in %esi to both __lll_lock_wait +++ and __lll_unlock_wake. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: +++ Include lowlevellock.h. +++ (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK): +++ Don't define. +++ (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, +++ pass PSHARED(%rdi) in %esi to both __lll_lock_wait +++ and __lll_unlock_wake. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: +++ Include lowlevellock.h. +++ (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK): +++ Don't define. +++ (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, +++ pass PSHARED(%rdi) in %esi to both __lll_lock_wait +++ and __lll_unlock_wake. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: +++ Include lowlevellock.h. +++ (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK): +++ Don't define. +++ (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, +++ pass PSHARED(%rdi) in %esi to both __lll_lock_wait +++ and __lll_unlock_wake. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: +++ Include lowlevellock.h. +++ (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK): +++ Don't define. +++ (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, +++ pass PSHARED(%rdi) in %ecx to both __lll_lock_wait +++ and __lll_unlock_wake. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include +++ lowlevellock.h. +++ (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't +++ define. +++ * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h. +++ (LOCK, SYS_futex, FUTEX_WAKE): Don't define. +++ * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include +++ lowlevellock.h. +++ (LOCK, SYS_futex, FUTEX_WAIT): Don't define. +++ * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include +++ lowlevellock.h. +++ (LOCK): Don't define. +++ * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include +++ lowlevellock.h. +++ (LOCK, SYS_futex, FUTEX_WAIT): Don't define. +++ * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file. +++ * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file. +++ * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file. +++ * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file. +++ * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c +++ (__lll_lock_wait_private): New function. +++ (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass +++ it to lll_futex_*wait. Don't compile in for libc.so. +++ * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: +++ Remove. +++ * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c +++ (struct sparc_pthread_barrier): Remove. +++ (pthread_barrier_wait): Use union sparc_pthread_barrier instead of +++ struct sparc_pthread_barrier. Pass +++ ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock +++ and lll_futex_wait macros. +++ * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c: +++ Remove. +++ * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c: +++ Include sparc pthread_barrier_wait.c instead of generic one. +++ +++2007-07-30 Jakub Jelinek +++ +++ * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches. +++ +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S +++ (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than +++ %ecx. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S +++ (pthread_rwlock_timedwrlock): Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S +++ (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*. +++ +++2007-07-31 Jakub Jelinek +++ +++ * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field. +++ +++2007-07-26 Jakub Jelinek +++ +++ * tst-locale2.c (useless): Add return statement. +++ +++2007-07-24 Jakub Jelinek +++ +++ * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace +++ lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE). +++ * pthread_create.c (start_thread): Likewise. +++ * init.c (sighandler_setxid): Likewise. +++ * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise. +++ * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise. +++ * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise. +++ * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise. +++ * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise. +++ * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise. +++ * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise. +++ * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise. +++ * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT): +++ Likewise. +++ * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT): +++ Likewise. +++ * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork): +++ Likewise. +++ * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero, +++ __rtld_notify): Likewise. +++ * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise. +++ * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control, +++ __pthread_once): Likewise. +++ * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control, +++ __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*. +++ * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG, +++ LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define. +++ (lll_futex_wait): Add private argument, define as wrapper around +++ lll_futex_timed_wait. +++ (lll_futex_timed_wait, lll_futex_wake): Add private argument, +++ use __lll_private_flag macro. +++ (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock, +++ __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*. +++ * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control, +++ __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*. +++ * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG, +++ LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define. +++ (lll_futex_wait): Add private argument, define as wrapper around +++ lll_futex_timed_wait. +++ (lll_futex_timed_wait, lll_futex_wake): Add private argument, +++ use __lll_private_flag macro. +++ (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid, +++ __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*. +++ * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag): +++ Define. +++ (lll_futex_timed_wait, lll_futex_wake): Use it. +++ (lll_private_futex_wait, lll_private_futex_timed_wait, +++ lll_private_futex_wake): Removed. +++ * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control, +++ __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*. +++ * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG, +++ LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define. +++ (lll_futex_wait): Add private argument, define as wrapper around +++ lll_futex_timed_wait. +++ (lll_futex_timed_wait, lll_futex_wake): Add private argument, +++ use __lll_private_flag macro. +++ (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock, +++ lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg +++ to lll_futex_*. +++ * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h +++ (lll_private_futex_wait, lll_private_futex_timed_wait, +++ lll_private_futex_wake): Removed. +++ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag): +++ Fix !__ASSUME_PRIVATE_FUTEX non-constant private case. +++ (lll_private_futex_wait, lll_private_futex_timed_wait, +++ lll_private_futex_wake): Removed. +++ * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control, +++ __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*. +++ * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG, +++ LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define. +++ (lll_futex_wait): Add private argument, define as wrapper around +++ lll_futex_timed_wait. +++ (lll_futex_timed_wait, lll_futex_wake): Add private argument, +++ use __lll_private_flag macro. +++ (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock, +++ lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg +++ to lll_futex_*. +++ * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag): +++ Define. +++ (lll_futex_timed_wait, lll_futex_wake): Use it. +++ (lll_private_futex_wait, lll_private_futex_timed_wait, +++ lll_private_futex_wake): Removed. +++ +++2007-07-27 Jakub Jelinek +++ +++ * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end +++ of the structure for sparc32. +++ +++2007-07-26 Aurelien Jarno +++ +++ * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag. +++ +++2007-07-23 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix +++ code used when private futexes are assumed. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: +++ Likewise. +++ +++2007-07-23 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h +++ (__lll_private_flag): Define. +++ (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait. +++ (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use +++ __lll_private_flag. +++ (lll_private_futex_wait, lll_private_futex_timedwait, +++ lll_private_futex_wake): Define as wrapper around non-_private +++ macros. +++ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h +++ (__lll_private_flag): Define. +++ (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag. +++ (lll_private_futex_wait, lll_private_futex_timedwait, +++ lll_private_futex_wake): Define as wrapper around non-_private +++ macros. +++ +++2007-07-10 Steven Munroe +++ +++ * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED +++ parameter to lll_futex_wait call. +++ * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise. +++ +++ * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once): +++ Replace lll_futex_wait with lll_private_futex_wait. +++ * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post): +++ Add LLL_SHARED parameter to lll_futex_wake(). +++ +++ * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE +++ LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and +++ lll_private_futex_wake. +++ (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG +++ bit from private parm before syscall. +++ (lll_futex_timed_wait): Likewise. +++ (lll_futex_wake): Likewise. +++ (lll_futex_wake_unlock): Likewise. +++ (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call. +++ (lll_robust_mutex_unlock): Likewise. +++ (lll_mutex_unlock_force): Likewise. +++ (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call. +++ +++2007-07-23 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix +++ compilation when unconditionally using private futexes. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: +++ Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise. +++ +++2007-07-17 Jakub Jelinek +++ +++ * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2): +++ Define. +++ +++2007-07-06 Kaz Kojima +++ +++ * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and +++ kernel-features.h. +++ +++2007-05-16 Roland McGrath +++ +++ * init.c (__nptl_initial_report_events): New variable. +++ (__pthread_initialize_minimal_internal): Initialize pd->report_events +++ to that. +++ +++2007-06-22 Jakub Jelinek +++ +++ * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and +++ cpusetsize if pthread_getaffinity_np failed with ENOSYS. +++ +++2007-06-19 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock +++ implementation. +++ +++2007-06-18 Ulrich Drepper +++ +++ * pthreadP.h: Define PTHREAD_MUTEX_TYPE. +++ * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE. +++ * pthread_mutex_timedlock.c: Likewise. +++ * pthread_mutex_trylock.c: Likewise. +++ * pthread_mutex_unlock.c: Likewise. +++ +++2007-06-17 Andreas Schwab +++ +++ * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard +++ sections. +++ +++2007-06-17 Ulrich Drepper +++ +++ * allocatestack.c (allocate_stack): Make code compile if +++ __ASSUME_PRIVATE_FUTEX is set. +++ +++2007-06-17 Kaz Kojima +++ +++ * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: +++ (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction. +++ * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: +++ (__pthread_rwlock_wrlock): Likewise. +++ * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: +++ (pthread_rwlock_timedrdlock): Likewise. +++ * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: +++ (pthread_rwlock_timedwrlock): Likewise. +++ * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: +++ (__pthread_rwlock_unlock): Likewise. +++ +++2007-06-10 Kaz Kojima +++ +++ * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX. +++ * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h. +++ Split __flags into __flags, __shared, __pad1 and __pad2. +++ * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private +++ futexes if they are available. +++ * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change +++ in libc-lowlevellock.S allow using private futexes. +++ * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define +++ FUTEX_PRIVATE_FLAG. Add additional parameter to lll_futex_wait, +++ lll_futex_timed_wait and lll_futex_wake. Change lll_futex_wait +++ to call lll_futex_timed_wait. Add lll_private_futex_wait, +++ lll_private_futex_timed_wait and lll_private_futex_wake. +++ (lll_robust_mutex_unlock): Fix typo. +++ * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private +++ field in futex command setup. +++ * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use +++ COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS. +++ * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise. +++ * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes +++ if they are available. Remove clear_once_control. +++ * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private +++ futexes if they are available. +++ * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise. +++ * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise. +++ * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise. +++ * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise. +++ * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support. +++ Wake only when there are waiters. +++ * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex +++ support. Indicate that there are waiters. Remove unnecessary +++ extra cancellation test. +++ * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise. Removed +++ left-over duplication of __sem_wait_cleanup. +++ +++2007-06-07 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional +++ parameter to lll_futex_wait, lll_futex_timed_wait, and +++ lll_futex_wake. Change lll_futex_wait to call lll_futex_timed_wait. +++ Add lll_private_futex_wait, lll_private_futex_timed_wait, and +++ lll_private_futex_wake. +++ * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise. +++ * allocatestack.c: Adjust use of lll_futex_* macros. +++ * init.c: Likewise. +++ * lowlevellock.h: Likewise. +++ * pthread_barrier_wait.c: Likewise. +++ * pthread_cond_broadcast.c: Likewise. +++ * pthread_cond_destroy.c: Likewise. +++ * pthread_cond_signal.c: Likewise. +++ * pthread_cond_timedwait.c: Likewise. +++ * pthread_cond_wait.c: Likewise. +++ * pthread_create.c: Likewise. +++ * pthread_mutex_lock.c: Likewise. +++ * pthread_mutex_setprioceiling.c: Likewise. +++ * pthread_mutex_timedlock.c: Likewise. +++ * pthread_mutex_unlock.c: Likewise. +++ * pthread_rwlock_timedrdlock.c: Likewise. +++ * pthread_rwlock_timedwrlock.c: Likewise. +++ * pthread_rwlock_unlock.c: Likewise. +++ * sysdeps/alpha/tls.h: Likewise. +++ * sysdeps/i386/tls.h: Likewise. +++ * sysdeps/ia64/tls.h: Likewise. +++ * sysdeps/powerpc/tls.h: Likewise. +++ * sysdeps/pthread/aio_misc.h: Likewise. +++ * sysdeps/pthread/gai_misc.h: Likewise. +++ * sysdeps/s390/tls.h: Likewise. +++ * sysdeps/sh/tls.h: Likewise. +++ * sysdeps/sparc/tls.h: Likewise. +++ * sysdeps/unix/sysv/linux/fork.c: Likewise. +++ * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise. +++ * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise. +++ * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise. +++ * sysdeps/unix/sysv/linux/sem_post.c: Likewise. +++ * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise. +++ * sysdeps/unix/sysv/linux/sem_wait.c: Likewise. +++ * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise. +++ * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise. +++ * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: +++ Likewise. +++ * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise. +++ * sysdeps/x86_64/tls.h: Likewise. +++ +++2007-05-29 Ulrich Drepper +++ +++ * pthread_getattr_np.c: No need to install a cancellation handler, +++ this is no cancellation point. +++ * pthread_getschedparam.c: Likewise. +++ * pthread_setschedparam.c: Likewise. +++ * pthread_setschedprio.c: Likewise. +++ * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of +++ lll_unlock_wake_cb. +++ * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise. +++ * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise. +++ * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise. +++ * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise. +++ * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise. +++ * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise. +++ * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise. +++ * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise. +++ * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise. +++ +++ * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking +++ whether there are more than one thread makes no sense here since +++ we only call the slow path if the locks are taken. +++ * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise. +++ +++ * sysdeps/unix/sysv/linux/internaltypes.h: Introduce +++ COND_NWAITERS_SHIFT. +++ * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of +++ COND_CLOCK_BITS. +++ * pthread_cond_init.c: Likewise. +++ * pthread_cond_timedwait.c: Likewise. +++ * pthread_cond_wait.c: Likewise. +++ * pthread_condattr_getclock.c: Likewise. +++ * pthread_condattr_setclock.c: Likewise. +++ * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise. +++ +++2007-05-28 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include +++ unistd.h. +++ +++ * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit +++ insn suffix. +++ (THREAD_GSCOPE_GET_FLAG): Remove. +++ * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove. +++ * allocatestack.c (__wait_lookup_done): Revert 2007-05-24 +++ changes. +++ * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag. +++ (THREAD_GSCOPE_GET_FLAG): Remove. +++ (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag +++ instead of THREAD_GSCOPE_GET_FLAG. +++ (THREAD_GSCOPE_SET_FLAG): Likewise. Add atomic_write_barrier after +++ it. +++ * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED, +++ THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT, +++ THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG, +++ THREAD_GSCOPE_WAIT): Define. +++ * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED, +++ THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT, +++ THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG, +++ THREAD_GSCOPE_WAIT): Define. +++ * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED, +++ THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT, +++ THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG, +++ THREAD_GSCOPE_WAIT): Define. +++ * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED, +++ THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT, +++ THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG, +++ THREAD_GSCOPE_WAIT): Define. +++ +++2007-05-24 Richard Henderson +++ +++ * descr.h (struct pthread): Add header.gscope_flag. +++ * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED, +++ THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT, +++ THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG, +++ THREAD_GSCOPE_WAIT): Define. +++ +++2007-05-27 Ulrich Drepper +++ +++ * init.c: Make it compile with older kernel headers. +++ +++ * tst-initializers1.c: Show through exit code which test failed. +++ +++ * pthread_rwlock_init.c: Also initialize __shared field. +++ * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags +++ element in rwlock structure into four byte elements. One of them is +++ the new __shared element. +++ * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]: +++ Likewise. +++ [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to +++ __shared, adjust names of other padding elements. +++ * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise. +++ * sysdeps/pthread/pthread.h: Adjust rwlock initializers. +++ * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED. +++ * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define +++ FUTEX_PRIVATE_FLAG. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main +++ futex to use private operations if possible. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: +++ Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: +++ Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: +++ Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S: +++ Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise. +++ +++2007-05-26 Ulrich Drepper +++ +++ * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define. +++ * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P. +++ * pthread_rwlock_timedrdlock.c: Likewise. +++ * pthread_rwlock_tryrdlock.c: Likewise. +++ +++ * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny +++ optimization. +++ +++ * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break. +++ * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over +++ duplication of __sem_wait_cleanup. +++ +++ * allocatestack.c: Revert last change. +++ * init.c: Likewise. +++ * sysdeps/i386/tls.h: Likewise. +++ * sysdeps/x86_64/tls.h: Likewise. +++ * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to +++ header structure. +++ * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET. +++ +++ * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier): +++ Add private field. +++ * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition. +++ * pthread_barrier_init.c: Set private flag if pshared and private +++ futexes are supported. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use +++ private field in futex command setup. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise. +++ +++2007-05-25 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex +++ support. +++ * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise. +++ +++ * semaphoreP.h: Declare __old_sem_init and __old_sem_wait. +++ * sem_init.c (__new_sem_init): Rewrite to initialize all three +++ fields in the structure. +++ (__old_sem_init): New function. +++ * sem_open.c: Initialize all fields of the structure. +++ * sem_getvalue.c: Adjust for renamed element. +++ * sysdeps/unix/sysv/linux/Makefile [subdir=nptl] +++ (gen-as-const-headers): Add structsem.sym. +++ * sysdeps/unix/sysv/linux/structsem.sym: New file. +++ * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to +++ struct new_sem. Add struct old_sem. +++ * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters. +++ * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise. +++ * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters. +++ * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise. +++ * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise. +++ * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12. +++ * tst-sem10.c: New file. +++ * tst-sem11.c: New file. +++ * tst-sem12.c: New file. +++ * tst-typesizes.c: Test struct new_sem and struct old_sem instead +++ of struct sem. +++ +++2007-05-25 Ulrich Drepper +++ Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait): +++ Move __pthread_enable_asynccancel right before futex syscall. +++ * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait): +++ Likewise. +++ +++2007-05-24 Jakub Jelinek +++ +++ * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX, +++ THREAD_COPY_PRIVATE_FUTEX): Define. +++ * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX, +++ THREAD_COPY_PRIVATE_FUTEX): Define. +++ * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX. +++ * init.c (__pthread_initialize_minimal_internal): Use +++ THREAD_SET_PRIVATE_FUTEX. +++ +++ * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag. +++ (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED, +++ THREAD_GSCOPE_FLAG_WAIT): Define. +++ (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG, +++ THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define. +++ * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use +++ PTR_DEMANGLE. +++ (THREAD_GSCOPE_GET_FLAG): Define. +++ * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define. +++ * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG +++ instead of ->header.gscope_flag directly. +++ +++2007-05-23 Ulrich Drepper +++ +++ * init.c (__pthread_initialize_minimal_internal): Check whether +++ private futexes are available. +++ * allocatestack.c (allocate_stack): Copy private_futex field from +++ current thread into the new stack. +++ * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private +++ futexes if they are available. +++ * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise +++ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change +++ in libc-lowlevellock.S allow using private futexes. +++ * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define +++ FUTEX_PRIVATE_FLAG. +++ * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes +++ if they are available. +++ * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise. +++ * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX. +++ * sysdeps/i386/tcb-offsets.sym: Likewise. +++ * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field. +++ * sysdeps/i386/tls.h (tcbhead_t): Likewise. +++ +++2007-05-21 Ulrich Drepper +++ +++ * sysdeps/pthread/pthread-functions.h (struct pthread_functions): +++ Remove ptr_wait_lookup_done again. +++ * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here. +++ (__pthread_initialize_minimal_internal): Initialize +++ _dl_wait_lookup_done pointer in _rtld_global directly. +++ * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init): +++ Remove code to code _dl_wait_lookup_done. +++ * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not +++ encrypted for now. +++ +++2007-05-21 Jakub Jelinek +++ +++ * tst-robust9.c (do_test): Don't fail if ENABLE_PI and +++ pthread_mutex_init failed with ENOTSUP. +++ +++2007-05-19 Ulrich Drepper +++ +++ * allocatestack.c (__wait_lookup_done): New function. +++ * sysdeps/pthread/pthread-functions.h (struct pthread_functions): +++ Add ptr_wait_lookup_done. +++ * init.c (pthread_functions): Initialize .ptr_wait_lookup_done. +++ * pthreadP.h: Declare __wait_lookup_done. +++ * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag. +++ Define macros to implement reference handling of global scope. +++ * sysdeps/x86_64/tls.h: Likewise. +++ * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init): +++ Initialize GL(dl_wait_lookup_done). +++ +++2007-05-17 Ulrich Drepper +++ +++ [BZ #4512] +++ * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner +++ is detected. +++ * pthread_mutex_timedlock.c: Likewise. +++ * pthread_mutex_trylock.c: Likewise. +++ Patch in part by Atsushi Nemoto . +++ +++ * Makefile (tests): Add tst-robust9 and tst-robustpi9. +++ * tst-robust9.c: New file. +++ * tst-robustpi9.c: New file. +++ +++ * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove +++ unnecessary extra cancellation test. +++ +++2007-05-14 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary +++ extra cancellation test. +++ * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise. +++ +++2007-05-10 Ulrich Drepper +++ +++ * descr.h (struct pthread): Rearrange members to fill hole in +++ 64-bit layout. +++ +++ * sysdeps/unix/sysv/linux/pthread_setaffinity.c +++ (__pthread_setaffinity_new): If syscall was successful and +++ RESET_VGETCPU_CACHE is defined, use it before returning. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file. +++ +++2007-05-10 Jakub Jelinek +++ +++ [BZ #4455] +++ * tst-align2.c: Include stackinfo.h. +++ * tst-getpid1.c: Likewise. +++ +++2007-05-02 Carlos O'Donell +++ +++ [BZ #4455] +++ * tst-align2.c (do_test): Add _STACK_GROWS_UP case. +++ * tst-getpid1.c (do_test): Likewise. +++ +++ [BZ #4456] +++ * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case. +++ (allocate_stack): Likewise. +++ +++2007-05-07 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/lowlevelrobustlock.c +++ (__lll_robust_lock_wait): Fix race caused by reloading of futex value. +++ (__lll_robust_timedlock_wait): Likewise. +++ Reported by Alexey Kuznetsov . +++ +++2007-05-06 Mike Frysinger +++ +++ [BZ #4465] +++ * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1. +++ * tst-cancel4.c (tf_fdatasync): New test. +++ +++2007-04-27 Ulrich Drepper +++ +++ [BZ #4392] +++ * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error +++ check mutexes like normal mutexes. +++ +++ [BZ #4306] +++ * sysdeps/unix/sysv/linux/timer_create.c (timer_create): +++ Initialize the whole sigevent structure to appease valgrind. +++ +++2007-04-25 Ulrich Drepper +++ +++ * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache. +++ * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET. +++ +++2007-04-06 Ulrich Drepper +++ +++ * tst-locale1.c: Avoid warnings. +++ * tst-locale2.c: Likewise. +++ +++2007-03-19 Steven Munroe +++ +++ * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h +++ (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction. +++ +++2007-03-16 Jakub Jelinek +++ +++ * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and +++ __extern_always_inline where appropriate. +++ * sysdeps/pthread/pthread.h: Likewise. +++ +++2007-03-13 Richard Henderson +++ +++ * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two +++ separate cfi regions for the two subsections. +++ +++2007-02-25 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in +++ new thread, don't just decrement it. +++ Patch by Suzuki K P . +++ +++2007-02-21 Ulrich Drepper +++ +++ * sysdeps/pthread/pthread-functions.h: Correct last patch, correct +++ PTHFCT_CALL definition. +++ +++2007-02-18 Ulrich Drepper +++ +++ * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not +++ available, don't use it. +++ +++2007-02-09 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S +++ (__lll_mutex_timedlock_wait): Use correct pointer when we don't +++ call into the kernel to delay. +++ +++2007-01-18 Ulrich Drepper +++ +++ * tst-initializers1.c: We want to test the initializers as seen +++ outside of libc, so undefined _LIBC. +++ +++ * pthread_join.c (cleanup): Avoid warning. +++ +++2007-01-17 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S +++ (__lll_timedwait_tid): Add unwind info. +++ +++ * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the +++ function table, mangle the pointers. +++ * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL. +++ * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init. +++ * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions +++ demangle pointers before use. +++ * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to +++ demangle pointer. +++ * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise. +++ * sysdeps/pthread/setxid.h: Likewise. +++ +++2007-01-12 Ulrich Drepper +++ +++ * tst-rwlock7.c: Show some more information in case of correct +++ behavior. +++ +++2007-01-11 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h +++ (lll_futex_timed_wait): Undo part of last change, don't negate +++ return value. +++ +++2007-01-10 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups. Define +++ FUTEX_CMP_REQUEUE and lll_futex_requeue. +++ +++2006-12-28 David S. Miller +++ +++ * shlib-versions: Fix sparc64 linux target specification. +++ +++2007-01-10 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c: +++ Adjust include path for pthread_barrier_wait.c move. +++ +++2006-12-21 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure +++ tid isn't reread from pd->tid in between ESRCH test and the syscall. +++ +++2006-12-06 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle +++ 6 argument cancellable syscalls. +++ (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define. +++ * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle +++ 6 argument cancellable syscalls. +++ (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define. +++ +++2006-12-09 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/rtld-lowlevel.h +++ (__rtld_mrlock_initialize): Add missing closing parenthesis. +++ +++2006-10-30 Jakub Jelinek +++ +++ * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use +++ __sync_lock_release instead of __sync_lock_release_si. +++ +++2006-10-29 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P): +++ Define. +++ (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld. +++ * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise. +++ * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise. +++ * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise. +++ * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise. +++ * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise. +++ * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise. +++ * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise. +++ * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise. +++ * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise. +++ +++2006-10-27 Ulrich Drepper +++ +++ * sysdeps/pthread/pthread_barrier_wait.c: Move to... +++ * pthread_barrier_wait.c: ...here. +++ * sysdeps/pthread/pthread_cond_broadcast.c: Move to... +++ * pthread_cond_broadcast.c: ...here. +++ * sysdeps/pthread/pthread_cond_signal.c: Move to... +++ * pthread_cond_signal.c: ...here. +++ * sysdeps/pthread/pthread_cond_timedwait.c: Move to... +++ * pthread_cond_timedwait.c: ...here. +++ * sysdeps/pthread/pthread_cond_wait.c: Move to... +++ * pthread_cond_wait.c: ...here. +++ * sysdeps/pthread/pthread_once.c: Move to... +++ * pthread_once.c: ...here. +++ * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to... +++ * pthread_rwlock_rdlock.c: ...here. +++ * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to... +++ * pthread_rwlock_timedrdlock.c: ...here. +++ * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to... +++ * pthread_rwlock_timedwrlock.c: ...here. +++ * sysdeps/pthread/pthread_rwlock_unlock.c: Move to... +++ * pthread_rwlock_unlock.c: ...here. +++ * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to... +++ * pthread_rwlock_wrlock.c: ...here. +++ * sysdeps/pthread/pthread_spin_destroy.c: Move to... +++ * pthread_spin_destroy.c: ...here. +++ * sysdeps/pthread/pthread_spin_init.c: Move to... +++ * pthread_spin_init.c: ...here. +++ * sysdeps/pthread/pthread_spin_unlock.c: Move to... +++ * pthread_spin_unlock.c: ...here. +++ * sysdeps/pthread/pthread_getcpuclockid.c: Move to... +++ * pthread_getcpuclockid.c: ...here. +++ +++ * init.c: USE_TLS support is now always enabled. +++ * tst-tls5.h: Likewise. +++ * sysdeps/alpha/tls.h: Likewise. +++ * sysdeps/i386/tls.h: Likewise. +++ * sysdeps/ia64/tls.h: Likewise. +++ * sysdeps/powerpc/tls.h: Likewise. +++ * sysdeps/s390/tls.h: Likewise. +++ * sysdeps/sh/tls.h: Likewise. +++ * sysdeps/sparc/tls.h: Likewise. +++ * sysdeps/x86_64/tls.h: Likewise. +++ +++2006-10-27 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock, +++ __rtld_mrlock_change): Update oldval if atomic compare and exchange +++ failed. +++ +++ * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P): +++ Define to THREAD_SELF->header.multiple_threads. +++ * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P): +++ Likewise. +++ * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P): +++ Likewise. +++ * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h +++ (SINGLE_THREAD_P): Likewise. +++ * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h +++ (SINGLE_THREAD_P): Likewise. +++ * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h +++ (SINGLE_THREAD_P): Likewise. +++ * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h +++ (SINGLE_THREAD_P): Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P): +++ Likewise. +++ * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h +++ (SINGLE_THREAD_P): Likewise. +++ * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h +++ (SINGLE_THREAD_P): Likewise. +++ * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P): +++ Likewise. +++ +++2006-10-26 Jakub Jelinek +++ +++ * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3 +++ by default rather than 2_3_3. +++ +++2006-10-17 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock, +++ __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use +++ atomic_* instead of catomic_* macros. +++ +++2006-10-12 Ulrich Drepper +++ +++ [BZ #3285] +++ * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX. +++ * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise. +++ * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise. +++ * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise. +++ * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise. +++ * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX. +++ * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise. +++ * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise. +++ * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise. +++ * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise. +++ * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise. +++ * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise. +++ +++2006-10-11 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for +++ cancelable syscalls with six parameters. +++ +++ * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_* +++ operations instead of atomic_*. +++ +++2006-10-09 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file.. +++ +++2006-10-07 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file. +++ * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file. +++ * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: +++ New file. +++ * pthread_attr_setstack.c: Allow overwriting the version number of the +++ new symbol. +++ * pthread_attr_setstacksize.c: Likewise. +++ (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use +++ it. +++ * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add +++ pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6. +++ +++2006-09-24 Ulrich Drepper +++ +++ [BZ #3251] +++ * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning. +++ Patch by Petr Baudis. +++ +++2006-09-18 Jakub Jelinek +++ +++ * tst-kill4.c (do_test): Explicitly set tf thread's stack size. +++ +++ * tst-cancel2.c (tf): Loop as long as something was written. +++ +++2006-09-12 Kaz Kojima +++ +++ * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI +++ mutexes wake all mutexes. +++ * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment +++ WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ. +++ * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise. +++ +++2006-09-12 Ulrich Drepper +++ +++ * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use +++ to guarantee the thread is always canceled. +++ +++2006-09-08 Jakub Jelinek +++ +++ * tst-cond22.c: Include pthread.h instead of pthreadP.h. +++ Include stdlib.h. +++ * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only +++ increase FUTEX if increasing WAKEUP_SEQ. Fix comment typo. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise. +++ +++2006-09-08 Ulrich Drepper +++ +++ [BZ #3123] +++ * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't +++ increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise. +++ * Makefile (tests): Add tst-cond22. +++ * tst-cond22.c: New file. +++ +++2006-09-05 Ulrich Drepper +++ +++ [BZ #3124] +++ * descr.h (struct pthread): Add parent_cancelhandling. +++ * sysdeps/pthread/createthread.c (create_thread): Pass parent +++ cancelhandling value to child. +++ * pthread_create.c (start_thread): If parent thread was canceled +++ reset the SIGCANCEL mask. +++ * Makefile (tests): Add tst-cancel25. +++ * tst-cancel25.c: New file. +++ +++2006-09-05 Jakub Jelinek +++ Ulrich Drepper +++ +++ * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement +++ counterp if it is already zero. +++ * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise.. +++ +++2006-03-04 Jakub Jelinek +++ Roland McGrath +++ +++ * sysdeps/unix/sysv/linux/i386/lowlevellock.h +++ (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END, +++ LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define. +++ (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock, +++ lll_robust_mutex_cond_lock, lll_mutex_timedlock, +++ lll_robust_mutex_timedlock, lll_mutex_unlock, +++ lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them. +++ Add _L_*_ symbols around the subsection. +++ * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info. +++ * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise. +++ +++2006-03-03 Jakub Jelinek +++ Roland McGrath +++ +++ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h +++ (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END, +++ LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define. +++ (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock, +++ lll_robust_mutex_cond_lock, lll_mutex_timedlock, +++ lll_robust_mutex_timedlock, lll_mutex_unlock, +++ lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them. +++ Add _L_*_ symbols around the subsection. +++ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info. +++ * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise. +++ +++2006-08-31 Ulrich Drepper +++ +++ * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last +++ change because it can disturb too much existing code. If real hard +++ reader preference is needed we'll introduce another type. +++ * sysdeps/pthread/pthread_rwlock_timedwrlock.c +++ (pthread_rwlock_timedwrlock): Likewise. +++ * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): +++ Likewise. +++ +++2006-08-30 Ulrich Drepper +++ +++ * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect +++ reader preference. +++ * sysdeps/pthread/pthread_rwlock_timedwrlock.c +++ (pthread_rwlock_timedwrlock): Likewise. +++ * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): +++ Likewise. +++ +++2006-08-25 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread): +++ Only define ifdef SHARED. +++ +++2006-08-23 Ulrich Drepper +++ +++ * allocatestack.c (queue_stack): Move freeing of surplus stacks to... +++ (free_stacks): ...here. +++ (__free_stack_cache): New function. +++ * pthreadP.h: Declare __free_stack_cache. +++ * sysdeps/pthread/pthread-functions.h (pthread_functions): Add +++ ptr_freeres. +++ * init.c (pthread_functions): Initialize ptr_freeres. +++ * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread): +++ New freeres function. +++ +++2006-07-30 Joseph S. Myers +++ +++ [BZ #3018] +++ * Makefile (extra-objs): Add modules to extra-test-objs instead. +++ +++2006-08-20 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define +++ _XOPEN_REALTIME_THREADS. +++ +++2006-08-15 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use +++ HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than +++ HAVE_CLOCK_GETTIME_VSYSCALL. +++ (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here. +++ +++2006-08-14 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/bits/posix_opt.h +++ (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L. +++ * descr.h (struct priority_protection_data): New type. +++ (struct pthread): Add tpp field. +++ * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP, +++ PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP, +++ PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values. +++ * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust +++ TPP mutexes. +++ * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes. +++ * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise. +++ * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise. +++ * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise. +++ * tpp.c: New file. +++ * pthread_setschedparam.c (__pthread_setschedparam): Handle priority +++ boosted by TPP. +++ * pthread_setschedprio.c (pthread_setschedprio): Likewise. +++ * pthread_mutexattr_getprioceiling.c +++ (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is +++ in the SCHED_FIFO priority range. +++ * pthread_mutexattr_setprioceiling.c +++ (pthread_mutexattr_setprioceiling): Fix prioceiling validation. +++ * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail +++ if mutex is not TPP. Ceiling is now in __data.__lock. +++ * pthread_mutex_setprioceiling.c: Include stdbool.h. +++ (pthread_mutex_setprioceiling): Fix prioceiling validation. Ceiling +++ is now in __data.__lock. Add locking. +++ * pthread_create.c (__free_tcb): Free pd->tpp structure. +++ * Makefile (libpthread-routines): Add tpp. +++ (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10. +++ * tst-tpp.h: New file. +++ * tst-mutexpp1.c: New file. +++ * tst-mutexpp6.c: New file. +++ * tst-mutexpp10.c: New file. +++ * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined. +++ * tst-mutex6.c (TEST_FUNCTION): Likewise. +++ +++2006-08-12 Ulrich Drepper +++ +++ [BZ #2843] +++ * pthread_join.c (pthread_join): Account for self being canceled +++ when checking for deadlocks. +++ * tst-join5.c: Cleanups. Allow to be used in tst-join6. +++ (tf1): Don't print anything after pthread_join returns, this would be +++ another cancellation point. +++ (tf2): Likewise. +++ * tst-join6.c: New file. +++ * Makefile (tests): Add tst-join6. +++ +++2006-08-03 Ulrich Drepper +++ +++ [BZ #2892] +++ * pthread_setspecific.c (__pthread_setspecific): Check +++ out-of-range index before checking for unused key. +++ +++ * sysdeps/pthread/gai_misc.h: New file. +++ +++2006-08-01 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/i386/smp.h: New file. Old Linux-specific +++ file. Don't use sysctl. +++ * sysdeps/unix/sysv/linux/smp.h: Always assume SMP. Archs can +++ overwrite the file if this is likely not true. +++ +++2006-07-31 Daniel Jacobowitz +++ +++ * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks. +++ * Makefile (tests): Add tst-getpid3. +++ * tst-getpid3.c: New file. +++ +++2006-07-30 Roland McGrath +++ +++ * Makefile (libpthread-routines): Add ptw-sigsuspend. +++ +++ * sysdeps/unix/sysv/linux/i386/not-cancel.h +++ (pause_not_cancel): New macro. +++ (nanosleep_not_cancel): New macro. +++ (sigsuspend_not_cancel): New macro. +++ * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use +++ nanosleep_not_cancel macro from . +++ * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel +++ macro from . +++ +++2006-07-28 Ulrich Drepper +++ Jakub Jelinek +++ +++ * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0 +++ notification of PI mutex. Add ENQUEUE_MUTEX_PI. +++ * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types. +++ * pthread_mutex_setprioceilining.c: Adjust for mutex type name change. +++ * pthread_mutex_init.c: Add support for priority inheritance mutex. +++ * pthread_mutex_lock.c: Likewise. +++ * pthread_mutex_timedlock.c: Likewise. +++ * pthread_mutex_trylock.c: Likewise. +++ * pthread_mutex_unlock.c: Likewise. +++ * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake +++ all mutexes. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise. +++ * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file. +++ * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add +++ pthread-pi-defines.sym. +++ * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI, +++ FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI. +++ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise. +++ * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise. +++ * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise. +++ * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise. +++ * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise. +++ * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise. +++ * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise. +++ * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define +++ _POSIX_THREAD_PRIO_INHERIT to 200112L. +++ * tst-mutex1.c: Adjust to allow use in PI mutex test. +++ * tst-mutex2.c: Likewise. +++ * tst-mutex3.c: Likewise. +++ * tst-mutex4.c: Likewise. +++ * tst-mutex5.c: Likewise. +++ * tst-mutex6.c: Likewise. +++ * tst-mutex7.c: Likewise. +++ * tst-mutex7a.c: Likewise. +++ * tst-mutex8.c: Likewise. +++ * tst-mutex9.c: Likewise. +++ * tst-robust1.c: Likewise. +++ * tst-robust7.c: Likewise. +++ * tst-robust8.c: Likewise. +++ * tst-mutexpi1.c: New file. +++ * tst-mutexpi2.c: New file. +++ * tst-mutexpi3.c: New file. +++ * tst-mutexpi4.c: New file. +++ * tst-mutexpi5.c: New file. +++ * tst-mutexpi6.c: New file. +++ * tst-mutexpi7.c: New file. +++ * tst-mutexpi7a.c: New file. +++ * tst-mutexpi8.c: New file. +++ * tst-mutexpi9.c: New file. +++ * tst-robust1.c: New file. +++ * tst-robust2.c: New file. +++ * tst-robust3.c: New file. +++ * tst-robust4.c: New file. +++ * tst-robust5.c: New file. +++ * tst-robust6.c: New file. +++ * tst-robust7.c: New file. +++ * tst-robust8.c: New file. +++ * Makefile (tests): Add the new tests. +++ +++ * pthread_create.c (start_thread): Add some casts to avoid warnings. +++ * pthread_mutex_destroy.c: Remove unneeded label. +++ +++2006-07-01 Ulrich Drepper +++ +++ * pthread_mutex_init.c (__pthread_mutex_init): Move some +++ computations to compile time. +++ +++2006-06-04 Ulrich Drepper +++ +++ * sysdeps/pthread/pthread.h: Add pthread_equal inline version. +++ +++2006-05-15 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden. +++ +++2006-05-11 Ulrich Drepper +++ +++ * pthread_key_create.c (__pthread_key_create): Do away with +++ __pthread_keys_lock. +++ +++ * sysdeps/unix/sysv/linux/pthread_setaffinity.c +++ (__kernel_cpumask_size): Mark as hidden. +++ * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise. +++ +++ * sem_open.c (__sem_mappings_lock): Mark as hidden. +++ * semaphoreP.h (__sem_mappings_lock): Likewise. +++ +++2006-05-10 Ulrich Drepper +++ +++ * pthread_atfork.c: Mark __dso_handle as hidden. +++ +++2006-05-09 Ulrich Drepper +++ +++ [BZ #2644] +++ * sysdeps/pthread/unwind-forcedunwind.c: Different solution for +++ the reload problem. Change the one path in pthread_cancel_init +++ which causes the problem. Force gcc to reload. Simplify callers. +++ * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c +++ (_Unwind_GetBSP): Undo last patch. +++ +++2006-05-07 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the +++ function pointer is reloaded after pthread_cancel_init calls. +++ +++ [BZ #2644] +++ * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions +++ pointers are reloaded after pthread_cancel_init calls. +++ +++2006-05-01 Ulrich Drepper +++ +++ * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with +++ __always_inline. +++ +++2006-04-27 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread): +++ Allocate new object which is passed to timer_sigev_thread so that +++ the timer can be deleted before the new thread is scheduled. +++ +++2006-04-26 Roland McGrath +++ +++ * sysdeps/x86_64/tls.h: Include inside [! __ASSEMBLER__]. +++ +++2006-04-08 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion +++ suffix for conditional jumps. +++ * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise. +++ +++ * init.c (sigcancel_handler): Compare with correct PID even if the +++ thread is in the middle of a fork call. +++ (sighandler_setxid): Likewise. +++ Reported by Suzuki K P . +++ +++2006-04-07 Jakub Jelinek +++ +++ * pthreadP.h (FUTEX_TID_MASK): Sync with kernel. +++ +++2006-04-06 Ulrich Drepper +++ +++ * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit +++ fails [Coverity CID 105]. +++ +++2006-04-05 Ulrich Drepper +++ +++ * sysdeps/pthread/pthread.h: Add nonnull attributes. +++ +++2006-04-03 Steven Munroe +++ +++ [BZ #2505] +++ * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]: +++ Define __lll_rel_instr using lwsync. +++ +++2006-03-27 Ulrich Drepper +++ +++ * allocatestack.c (allocate_stack): Always initialize robust_head. +++ * descr.h: Define struct robust_list_head. +++ (struct pthread): Use robust_list_head in robust mutex list definition. +++ Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX. +++ * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define. +++ (__pthread_initialize_minimal_internal): Register robust_list with +++ the kernel. +++ * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names. +++ Declare __set_robust_list_avail. +++ * pthread_create.c (start_thread): Register robust_list of new thread. +++ [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up +++ waiters. +++ * pthread_mutex_destroy.c: For robust mutexes don't look at the +++ number of users, it's unreliable. +++ * pthread_mutex_init.c: Allow use of pshared robust mutexes if +++ set_robust_list syscall is available. +++ * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename. +++ * pthread_mutex_lock.c: Simplify robust mutex code a bit. +++ Set robust_head.list_op_pending before trying to lock a robust mutex. +++ * pthread_mutex_timedlock.c: Likewise. +++ * pthread_mutex_trylock.c: Likewise. +++ * pthread_mutex_unlock.c: Likewise for unlocking. +++ * Makefile (tests): Add tst-robust8. +++ * tst-robust8.c: New file. +++ +++2006-03-08 Andreas Schwab +++ +++ * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h +++ (DL_SYSINFO_IMPLEMENTATION): Add missing newline. +++ +++2006-03-05 Roland McGrath +++ +++ * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes +++ and $config_os doesn't match *linux*. +++ +++2006-03-05 David S. Miller +++ +++ * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: +++ Use __syscall_error. +++ * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise. +++ * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise. +++ * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise. +++ * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise. +++ * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise. +++ * sysdeps/unix/sysv/linux/sparc/Makefile: New file. +++ +++2006-03-02 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups. +++ +++2006-03-01 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S +++ (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the +++ mutex. +++ (__lll_robust_timedlock_wait): Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S +++ (__lll_robust_lock_wait): Likewise. +++ (__lll_robust_timedlock_wait): Likewise. +++ * sysdeps/unix/sysv/linux/lowlevelrobustlock.c +++ (__lll_robust_lock_wait): Likewise. +++ (__lll_robust_timedlock_wait): Likewise. +++ +++2006-03-01 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead, +++ lll_robust_mutex_trylock, lll_robust_mutex_lock, +++ lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock, +++ lll_robust_mutex_unlock): Define. +++ (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes. +++ +++2006-02-28 H.J. Lu +++ +++ * sysdeps/unix/sysv/linux/ia64/clone2.S: Include +++ instead of . +++ +++2006-02-27 Jakub Jelinek +++ +++ * Makefile (libpthread-routines): Add +++ pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling +++ and pthread_mutex_[sg]etprioceiling. +++ * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol, +++ pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling, +++ pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and +++ pthread_mutex_setprioceiling. +++ * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT, +++ PTHREAD_PRIO_PROTECT): New enum values. +++ (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol, +++ pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling, +++ pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New +++ prototypes. +++ * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP, +++ PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values. +++ (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK): +++ Define. +++ (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK, +++ PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT, +++ PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define. +++ (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK +++ and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK. +++ * pthread_mutex_init.c (__pthread_mutex_init): For the time being +++ return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT +++ protocol mutexes. +++ * pthread_mutex_getprioceiling.c: New file. +++ * pthread_mutex_setprioceiling.c: New file. +++ * pthread_mutexattr_getprioceiling.c: New file. +++ * pthread_mutexattr_setprioceiling.c: New file. +++ * pthread_mutexattr_getprotocol.c: New file. +++ * pthread_mutexattr_setprotocol.c: New file. +++ +++2006-02-27 Daniel Jacobowitz +++ +++ * sysdeps/unix/sysv/linux/aio_misc.h: Include . +++ +++2006-02-27 Roland McGrath +++ +++ * sysdeps/pthread/Subdirs: List nptl here too. +++ * configure (libc_add_on_canonical): New variable. +++ +++ * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next. +++ +++ * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of +++ self to get main source tree's file. +++ * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/clone.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise. +++ * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise. +++ * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise. +++ * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise. +++ * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise. +++ * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise. +++ * sysdeps/unix/sysv/linux/sh/clone.S: Likewise. +++ * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise. +++ * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise. +++ +++ * Makefile: Use $(sysdirs) in vpath directive. +++ +++ * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed. +++ (CPPFLAGS-timer_routines.c): Likewise. +++ +++ * Makeconfig (includes): Variable removed. +++ +++2006-02-26 Roland McGrath +++ +++ * sysdeps/generic/pt-raise.c: Moved to ... +++ * pt-raise.c: ... here. +++ * sysdeps/generic/lowlevellock.h: Moved to ... +++ * lowlevellock.h: ... here. +++ +++2006-02-23 Roland McGrath +++ +++ * descr.h (struct pthread): Add final member `end_padding'. +++ (PTHREAD_STRUCT_END_PADDING): Use it. +++ +++2006-02-20 Roland McGrath +++ +++ * sysdeps/mips: Directory removed, saved in ports repository. +++ * sysdeps/unix/sysv/linux/mips: Likewise. +++ +++2006-02-18 Ulrich Drepper +++ +++ * tst-robust1.c: Add second mutex to check that the mutex list is +++ handled correctly. +++ +++2006-02-17 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead, +++ lll_robust_mutex_trylock, lll_robust_mutex_lock, +++ lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock, +++ lll_robust_mutex_unlock): New macros. +++ (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes. +++ * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise. +++ * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise. +++ * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise. +++ * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file. +++ +++2006-02-17 Kaz Kojima +++ +++ * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_* +++ definitions. +++ * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file. +++ +++2006-02-17 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h +++ (lll_robust_mutex_unlock): Avoid unnecessary wakeups. +++ * sysdeps/unix/sysv/linux/i386/lowlevellock.h +++ (lll_robust_mutex_unlock): Likewise. +++ +++2006-02-13 Jakub Jelinek +++ +++ * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): +++ Set robust_list.__next rather than robust_list. +++ * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h +++ (__pthread_list_t): New typedef. +++ (pthread_mutex_t): Replace __next and __prev fields with __list. +++ * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h +++ (__pthread_list_t): New typedef. +++ (pthread_mutex_t): Replace __next and __prev fields with __list. +++ * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h +++ (__pthread_list_t, __pthread_slist_t): New typedefs. +++ (pthread_mutex_t): Replace __next and __prev fields with __list. +++ * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h +++ (__pthread_list_t, __pthread_slist_t): New typedefs. +++ (pthread_mutex_t): Replace __next and __prev fields with __list. +++ * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h +++ (__pthread_list_t, __pthread_slist_t): New typedefs. +++ (pthread_mutex_t): Replace __next and __prev fields with __list. +++ * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h +++ (__pthread_slist_t): New typedef. +++ (pthread_mutex_t): Replace __next field with __list. +++ +++2006-02-15 Ulrich Drepper +++ +++ * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of +++ PTHREAD_MUTEX_OWNERDEAD. +++ (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256. +++ Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK. +++ * Makefile (libpthread-routines): Add lowlevelrobustlock. +++ * pthread_create.c (start_thread): Very much simplify robust_list loop. +++ * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set +++ to PTHREAD_MUTEX_INCONSISTENT. +++ * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes. +++ * pthread_mutex_lock.c: Reimplement robust mutex handling. +++ * pthread_mutex_trylock.c: Likewise. +++ * pthread_mutex_timedlock.c: Likewise. +++ * pthread_mutex_unlock.c: Likewise. +++ * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise. +++ * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add +++ lowlevelrobustlock.sym. +++ * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file. +++ * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_* +++ definitions. +++ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file. +++ * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file. +++ * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file. +++ * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file. +++ +++2006-02-12 Ulrich Drepper +++ +++ * allocatestack.c (allocate_stack): Initialize robust_list. +++ * init.c (__pthread_initialize_minimal_internal): Likewise. +++ * descr.h (struct xid_command): Pretty printing. +++ (struct pthread): Use __pthread_list_t or __pthread_slist_t for +++ robust_list. Adjust macros. +++ * pthread_create.c (start_thread): Adjust robust_list handling. +++ * phtread_mutex_unlock.c: Don't allow unlocking from any thread +++ but the owner for all robust mutex types. +++ * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define +++ __pthread_list_t and __pthread_slist_t. Use them in pthread_mutex_t. +++ * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise. +++ * sysdeps/pthread/pthread.h: Adjust mutex initializers. +++ +++ * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel, +++ openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3. +++ +++2006-02-08 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait, +++ lll_futex_timedwait, lll_wait_tid): Add "memory" clobber. +++ +++2006-01-20 Kaz Kojima +++ +++ * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait): +++ Return status. +++ (lll_futex_timed_wait): Define. +++ +++2006-01-19 Ulrich Drepper +++ +++ * tst-cancel4.c: Test ppoll. +++ +++2006-01-18 Andreas Jaeger +++ +++ [BZ #2167] +++ * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h +++ (pthread_mutex_t): Follow changes for other archs. Based on patch +++ by Jim Gifford . +++ +++2006-01-13 Richard Henderson +++ +++ * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private. +++ +++2006-01-10 Roland McGrath +++ +++ * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree. +++ * sysdeps/i386/jmpbuf-unwind.h: Likewise. +++ * sysdeps/mips/jmpbuf-unwind.h: Likewise. +++ * sysdeps/powerpc/jmpbuf-unwind.h: Likewise. +++ * sysdeps/s390/jmpbuf-unwind.h: Likewise. +++ * sysdeps/sh/jmpbuf-unwind.h: Likewise. +++ * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise. +++ * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise. +++ * sysdeps/x86_64/jmpbuf-unwind.h: Likewise. +++ * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise. +++ +++2006-01-09 Roland McGrath +++ +++ * tst-initializers1-c89.c: New file. +++ * tst-initializers1-c99.c: New file. +++ * tst-initializers1-gnu89.c: New file. +++ * tst-initializers1-gnu99.c: New file. +++ * Makefile (tests): Add them. +++ (CFLAGS-tst-initializers1-c89.c): New variable. +++ (CFLAGS-tst-initializers1-c99.c): New variable. +++ (CFLAGS-tst-initializers1-gnu89.c): New variable. +++ (CFLAGS-tst-initializers1-gnu99.c): New variable. +++ +++ * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t): +++ Use __extension__ on anonymous union definition. +++ * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise. +++ +++2006-01-08 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t): +++ Don't give the union a name because it changes the mangled name. +++ Instead name the struct for __data. +++ * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t): +++ Likewise. +++ * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t): +++ Likewise. +++ +++2006-01-09 Jakub Jelinek +++ +++ * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add +++ stack bias to mc_ftp field. +++ +++2006-01-07 Ulrich Drepper +++ +++ * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc +++ being too clever and reloading the futex value where it shouldn't. +++ +++2006-01-06 Ulrich Drepper +++ +++ * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use +++ correct type. +++ +++2006-01-06 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO): +++ Add cfi directives. +++ +++2006-01-06 Ulrich Drepper +++ +++ * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private. +++ * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private +++ rename in tcbhead_t. +++ +++ * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t): +++ Don't give the union a name because it changes the mangled name. +++ Instead name the struct for __data. +++ * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise. +++ * pthread_create.c (start_thread): Adjust robust mutex free loop. +++ * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust. +++ +++2006-01-05 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait): +++ Return status. +++ (lll_futex_timed_wait): Define. +++ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise. +++ * sysdeps/pthread/aio_misc.h: New file. +++ +++2006-01-03 Joseph S. Myers +++ +++ * Makefile ($(objpfx)$(multidir)): Use mkdir -p. +++ +++2006-01-03 Steven Munroe +++ +++ * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h +++ (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives. +++ * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise. +++ +++2006-01-04 Ulrich Drepper +++ +++ * tst-cancel24.cc: Use C headers instead of C++ headers. +++ +++2006-01-03 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for +++ sparc-linux configured glibc. +++ (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc. +++ (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock, +++ __lll_mutex_cond_lock, __lll_mutex_timedlock): Use +++ atomic_compare_and_exchange_val_24_acq instead of +++ atomic_compare_and_exchange_val_acq. +++ (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel +++ instead of atomic_exchange_rel. +++ * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file. +++ * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New +++ file. +++ * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New +++ file. +++ * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file. +++ * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file. +++ * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file. +++ * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file. +++ * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file. +++ * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c: +++ New file. +++ * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c: +++ New file. +++ * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file. +++ * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file. +++ * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New +++ file. +++ * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New +++ file. +++ * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file. +++ +++2006-01-03 Ulrich Drepper +++ +++ * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in +++ mutex initializers. +++ +++2006-01-02 Jakub Jelinek +++ +++ * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field. +++ (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD, +++ THREAD_COPY_POINTER_GUARD): Define. +++ * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define. +++ * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes. +++ +++2006-01-01 Ulrich Drepper +++ +++ * version.c: Update copyright year. +++ +++2005-12-29 Kaz Kojima +++ +++ * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit +++ .eh_frame section, use cfi_* directives. +++ * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation. +++ +++2005-12-30 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for +++ now. +++ +++2005-12-29 Ulrich Drepper +++ +++ * sysdeps/pthread/sigaction.c: Removed. +++ * sigaction.c: New file. +++ * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c. +++ +++2005-12-28 Ulrich Drepper +++ +++ * Makefile (tests): Add tst-signal7. +++ * tst-signal7.c: New file. +++ +++2005-12-27 Roland McGrath +++ +++ * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function. +++ (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison. +++ * sysdeps/alpha/jmpbuf-unwind.h: Likewise. +++ * sysdeps/i386/jmpbuf-unwind.h: Likewise. +++ * sysdeps/mips/jmpbuf-unwind.h: Likewise. +++ * sysdeps/powerpc/jmpbuf-unwind.h: Likewise. +++ * sysdeps/s390/jmpbuf-unwind.h: Likewise. +++ * sysdeps/sh/jmpbuf-unwind.h: Likewise. +++ * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise. +++ * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise. +++ * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise. +++ +++2005-12-27 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next +++ and __prev field to pthread_mutex_t. +++ * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field +++ to pthread_mutex_t. +++ +++2005-12-26 Ulrich Drepper +++ +++ * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP, +++ PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP, +++ PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP, +++ PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP, +++ PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED, +++ and PTHREAD_MUTEXATTR_FLAG_BITS. +++ * descr.h (struct pthread): Add robust_list field and define +++ ENQUEUE_MUTEX and DEQUEUE_MUTEX macros. +++ * pthread_mutexattr_getrobust.c: New file. +++ * pthread_mutexattr_setrobust.c: New file. +++ * pthread_mutex_consistent.c: New file. +++ * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust, +++ pthread_mutexattr_setrobust, and pthread_mutex_consistent. +++ Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP. +++ Adjust pthread_mutex_t initializers. +++ * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next +++ field to pthread_mutex_t. +++ * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next +++ and __prev field to pthread_mutex_t. +++ * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np, +++ pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np. +++ * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED +++ and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers. +++ * pthread_mutexattr_gettype.c: Likewise. +++ * pthread_mutexattr_setpshared.c: Likewise. +++ * pthread_mutexattr_settype.c: Likewise. +++ * pthread_mutex_init.c: Reject robust+pshared attribute for now. +++ Initialize mutex kind according to robust flag. +++ * pthread_mutex_lock.c: Implement local robust mutex. +++ * pthread_mutex_timedlock.c: Likewise. +++ * pthread_mutex_trylock.c: Likewise. +++ * pthread_mutex_unlock.c: Likewise. +++ * pthread_create.c (start_thread): Mark robust mutexes which remained +++ locked as dead. +++ * tst-robust1.c: New file. +++ * tst-robust2.c: New file. +++ * tst-robust3.c: New file. +++ * tst-robust4.c: New file. +++ * tst-robust5.c: New file. +++ * tst-robust6.c: New file. +++ * tst-robust7.c: New file. +++ * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust, +++ pthread_mutexattr_setrobust, and pthread_mutex_consistent. +++ (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4, +++ tst-robust5, tst-robust6, and tst-robust7. +++ +++ * tst-typesizes.c: New file. +++ * Makefile (tests): Add tst-typesizes. +++ +++ * tst-once3.c: More debug output. +++ +++2005-12-24 Ulrich Drepper +++ +++ * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break +++ missing after last change. +++ +++ * version.c: Update copyright year. +++ +++2005-12-23 Ulrich Drepper +++ +++ * pthread_mutex_destroy.c: Set mutex type to an invalid value. +++ * pthread_mutex_lock.c: Return EINVAL for invalid mutex type. +++ * pthread_mutex_trylock.c: Likewise. +++ * pthread_mutex_timedlock.c: Likewise. +++ * pthread_mutex_unlock.c: Likewise. +++ +++2005-12-22 Roland McGrath +++ +++ * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self, +++ so that #include_next's search location is not reset to the -I.. +++ directory where can be found. +++ +++2005-12-22 Ulrich Drepper +++ +++ [BZ #1913] +++ * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait): +++ Fix unwind info. Remove useless branch prediction prefix. +++ * tst-cancel24.cc: New file. +++ * Makefile: Add rules to build and run tst-cancel24. +++ +++2005-12-21 Roland McGrath +++ +++ * libc-cancellation.c: Use <> rather than "" #includes. +++ * pt-cleanup.c: Likewise. +++ * pthread_create.c: Likewise. +++ * pthread_join.c: Likewise. +++ * pthread_timedjoin.c: Likewise. +++ * pthread_tryjoin.c: Likewise. +++ * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise. +++ * sysdeps/unix/sysv/linux/register-atfork.c: Likewise. +++ * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise. +++ * unwind.c: Likewise. +++ +++2005-12-19 Kaz Kojima +++ +++ * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD. +++ * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard. +++ (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD, +++ THREAD_COPY_POINTER_GUARD): Define. +++ +++2005-12-19 Jakub Jelinek +++ +++ * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's +++ rather than one. +++ (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD, +++ THREAD_COPY_POINTER_GUARD): Define. +++ * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add. +++ * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field. +++ (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD, +++ THREAD_COPY_POINTER_GUARD): Define. +++ * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add. +++ * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD, +++ THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define. +++ * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp): +++ Use PTR_DEMANGLE for B0 if defined. +++ +++2005-12-17 Ulrich Drepper +++ +++ * pthread_create.c (__pthread_create_2_1): Use +++ THREAD_COPY_POINTER_GUARD if available. +++ * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD. +++ * sysdeps/x86_64/tcb-offsets.sym: Likewise. +++ * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard. +++ Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD. +++ * sysdeps/x86_64/tls.h: Likewise. +++ +++2005-12-15 Roland McGrath +++ +++ * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic. +++ +++2005-12-13 Ulrich Drepper +++ +++ * sysdeps/pthread/sigfillset.c: Adjust for files moved out of +++ sysdeps/generic. +++ * errno-loc.c: New file. +++ +++2005-12-12 Roland McGrath +++ +++ * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size +++ adjustments before choosing stack size. Update minimum stack size +++ calculation to match allocate_stack change. +++ +++2005-12-12 Ulrich Drepper +++ +++ * allocatestack.c (allocate_stack): Don't demand that there is an +++ additional full page available on the stack beside guard, TLS, the +++ minimum stack. +++ +++2005-11-24 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h +++ (__cleanup_fct_attribute): Use __regparm__ not regparm. +++ +++ * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When +++ compiling 32-bit code we must define __cleanup_fct_attribute. +++ +++005-11-24 Jakub Jelinek +++ +++ [BZ #1920] +++ * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use +++ __attribute__ instead of __attribute. +++ * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h +++ (__cleanup_fct_attribute): Likewise. +++ +++2005-11-17 Jakub Jelinek +++ +++ * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put +++ a write barrier before writing libgcc_s_getcfa. +++ +++2005-11-06 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/configure: Removed. +++ +++2005-11-05 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of +++ optional init_array/fini_array support. +++ +++2005-10-24 Roland McGrath +++ +++ * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary +++ versioned_symbol use. +++ +++2005-10-16 Roland McGrath +++ +++ * init.c (__pthread_initialize_minimal_internal): Even when using a +++ compile-time default stack size, apply the minimum that allocate_stack +++ will require, and round up to page size. +++ +++2005-10-10 Daniel Jacobowitz +++ +++ * Makefile ($(test-modules)): Remove static pattern rule. +++ +++2005-10-14 Jakub Jelinek +++ Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack +++ alignment in callback function. +++ * Makefile: Add rules to build and run tst-align3. +++ * tst-align3.c: New file. +++ +++2005-10-03 Jakub Jelinek +++ +++ * allocatestack.c (setxid_signal_thread): Add +++ INTERNAL_SYSCALL_DECL (err). +++ +++2005-10-02 Jakub Jelinek +++ +++ * allocatestack.c (setxid_signal_thread): Need to use +++ atomic_compare_and_exchange_bool_acq. +++ +++2005-10-01 Ulrich Drepper +++ Jakub Jelinek +++ +++ * descr.h: Define SETXID_BIT and SETXID_BITMASK. Adjust +++ CANCEL_RESTMASK. +++ (struct pthread): Move specific_used field to avoid padding. +++ Add setxid_futex field. +++ * init.c (sighandler_setxid): Reset setxid flag and release the +++ setxid futex. +++ * allocatestack.c (setxid_signal_thread): New function. Broken +++ out of the bodies of the two loops in __nptl_setxid. For undetached +++ threads check whether they are exiting and if yes, don't send a signal. +++ (__nptl_setxid): Simplify loops by using setxid_signal_thread. +++ * pthread_create.c (start_thread): For undetached threads, check +++ whether setxid bit is set. If yes, wait until signal has been +++ processed. +++ +++ * allocatestack.c (STACK_VARIABLES): Initialize them. +++ * pthread_create.c (__pthread_create_2_1): Initialize pd. +++ +++2004-09-02 Jakub Jelinek +++ +++ * pthread_cond_destroy.c (__pthread_cond_destroy): If there are +++ waiters, awake all waiters on the associated mutex. +++ +++2005-09-22 Roland McGrath +++ +++ * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from +++ ../sysdeps/x86_64/hp-timing.h). +++ +++2005-08-29 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP, +++ FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define. +++ (lll_futex_wake_unlock): Define. +++ * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP, +++ FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define. +++ (lll_futex_wake_unlock): Define. +++ * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP, +++ FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define. +++ (lll_futex_wake_unlock): Define. +++ * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP, +++ FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define. +++ (lll_futex_wake_unlock): Define. +++ * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP, +++ FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define. +++ (lll_futex_wake_unlock): Define. +++ * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use +++ lll_futex_wake_unlock. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S +++ (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define. +++ (__pthread_cond_signal): Use FUTEX_WAKE_OP. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S +++ (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define. +++ (__pthread_cond_signal): Use FUTEX_WAKE_OP. +++ +++2005-09-05 Kaz Kojima +++ +++ * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait): +++ Fix typo in register name. +++ +++2005-08-23 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread): +++ Use __sigfillset. Document that sigfillset does the right thing wrt +++ to SIGSETXID. +++ +++2005-07-11 Jakub Jelinek +++ +++ [BZ #1102] +++ * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER, +++ PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP, +++ PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP, +++ PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER, +++ PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP, +++ PTHREAD_COND_INITIALIZER): Supply zeros for all fields +++ in the structure. +++ * Makefile (tests): Add tst-initializers1. +++ (CFLAGS-tst-initializers1.c): Set. +++ * tst-initializers1.c: New test. +++ +++2005-07-11 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t): +++ Make sure __flags are located at offset 48 from the start of the +++ structure. +++ +++2005-07-02 Roland McGrath +++ +++ * Makeconfig: Comment fix. +++ +++2005-07-05 Jakub Jelinek +++ +++ * descr.h (PTHREAD_STRUCT_END_PADDING): Define. +++ * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING +++ is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes. +++ (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume +++ TLS_PRE_TCB_SIZE is sizeof (struct pthread). +++ (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define. +++ * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET): +++ Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread). +++ * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't +++ assume TLS_PRE_TCB_SIZE is sizeof (struct pthread). +++ +++2005-06-25 Jakub Jelinek +++ +++ * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field. +++ (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define. +++ * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard +++ fields. +++ (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define. +++ * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard +++ field. Put in sysinfo field unconditionally. +++ (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define. +++ * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field. +++ (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define. +++ * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard +++ fields. +++ (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define. +++ * pthread_create.c (__pthread_create_2_1): Use +++ THREAD_COPY_STACK_GUARD macro. +++ * Makefile: Add rules to build and run tst-stackguard1{,-static} +++ tests. +++ * tst-stackguard1.c: New file. +++ * tst-stackguard1-static.c: New file. +++ +++2005-06-14 Alan Modra +++ +++ * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO): +++ Invoke CGOTSETUP and CGOTRESTORE. +++ (CGOTSETUP, CGOTRESTORE): Define. +++ +++2005-05-29 Richard Henderson +++ +++ * tst-cancel4.c (WRITE_BUFFER_SIZE): New. +++ (tf_write, tf_writev): Use it. +++ (do_test): Use socketpair instead of pipe. Set SO_SNDBUF to +++ the system minimum. +++ +++2005-05-23 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h +++ [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of +++ __librt_*_asynccancel@local. +++ +++2005-05-17 Alan Modra +++ +++ * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete +++ all occurrences of JUMPTARGET. Instead append @local to labels. +++ +++2005-05-20 Jakub Jelinek +++ +++ * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to +++ size/alignment of struct pthread rather than tcbhead_t. +++ * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): +++ Likewise. +++ * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): +++ Likewise. +++ * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): +++ Likewise. +++ +++2005-05-19 Richard Henderson +++ +++ * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use +++ __sync_val_compare_and_swap, not explicit _si variant. +++ * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise. +++ +++2005-05-03 Ulrich Drepper +++ +++ [BZ #915] +++ * sysdeps/pthread/pthread.h: Avoid empty initializers. +++ +++2005-05-03 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit +++ .eh_frame section, use cfi_* directives. +++ +++2005-04-27 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead +++ of "" includes. +++ +++2005-04-27 Ulrich Drepper +++ +++ [BZ #1075] +++ * tst-cancel17.c (do_test): Add arbitrary factor to make sure +++ aio_write blocks. +++ +++2005-04-27 Roland McGrath +++ +++ * Makefile (tests): Remove tst-clock2. +++ +++ * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle +++ CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially, +++ translating to the kernel clockid_t for our own process/thread clock. +++ +++ * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file. +++ +++2005-04-15 Jakub Jelinek +++ +++ * old_pthread_cond_init.c: Include . +++ (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is +++ process shared or uses clock other than CLOCK_REALTIME. +++ * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment. +++ +++2005-04-13 David S. Miller +++ +++ * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file. +++ * sysdeps/sparc/sparc64/clone.S: New file. +++ +++2005-04-05 Jakub Jelinek +++ +++ [BZ #1102] +++ * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use +++ __inline instead of inline. +++ * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise. +++ +++2005-03-31 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use +++ functionally equivalent, but shorter instructions. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: +++ Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: +++ Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise. +++ +++2005-03-28 Daniel Jacobowitz +++ +++ * sysdeps/mips/Makefile: New file. +++ * sysdeps/mips/nptl-sysdep.S: New file. +++ * sysdeps/mips/tcb-offsets.sym: New file. +++ * sysdeps/mips/pthread_spin_lock.S: New file. +++ * sysdeps/mips/pthread_spin_trylock.S: New file. +++ * sysdeps/mips/pthreaddef.h: New file. +++ * sysdeps/mips/tls.h: New file. +++ * sysdeps/mips/jmpbuf-unwind.h: New file. +++ * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file. +++ * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file. +++ * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file. +++ * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file. +++ * sysdeps/unix/sysv/linux/mips/fork.c: New file. +++ * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file. +++ * sysdeps/unix/sysv/linux/mips/vfork.S: New file. +++ * sysdeps/unix/sysv/linux/mips/clone.S: New file. +++ * sysdeps/unix/sysv/linux/mips/createthread.c: New file. +++ * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file. +++ +++2005-03-23 Ulrich Drepper +++ +++ [BZ #1112] +++ * pthread_create.c (__pthread_create_2_1): Rename syscall error +++ variable to scerr. +++ +++2005-03-10 Jakub Jelinek +++ +++ * tst-getpid1.c (do_test): Align stack passed to clone{2,}. +++ +++2005-02-25 Roland McGrath +++ +++ * alloca_cutoff.c: Correct license text. +++ * tst-unload.c: Likewise. +++ * sysdeps/pthread/allocalim.h: Likewise. +++ * sysdeps/pthread/pt-initfini.c: Likewise. +++ * sysdeps/pthread/bits/libc-lock.h: Likewise. +++ * sysdeps/pthread/bits/sigthread.h: Likewise. +++ * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise. +++ * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise. +++ +++2005-02-16 Roland McGrath +++ +++ * sysdeps/pthread/pthread-functions.h (struct pthread_functions): +++ Use unsigned int * for ptr_nthreads. +++ +++2005-02-14 Alan Modra +++ +++ [BZ #721] +++ * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit +++ gcc4. +++ +++2005-02-07 Richard Henderson +++ +++ [BZ #787] +++ * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first +++ argument. +++ +++2004-11-03 Marcus Brinkmann +++ +++ * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix +++ order of arguments in invocation of atomic_add_zero. +++ +++2005-01-26 Jakub Jelinek +++ +++ [BZ #737] +++ * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait): +++ Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS, +++ at least gotntpoff relocation and addition. +++ * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait): +++ Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post): +++ Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait): +++ Likewise. +++ +++2005-01-06 Ulrich Drepper +++ +++ * allocatestack.c (init_one_static_tls): Adjust initialization of DTV +++ entry for static tls deallocation fix. +++ * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which +++ also contains information whether the memory pointed to is static +++ TLS or not. +++ * sysdeps/i386/tls.h: Likewise. +++ * sysdeps/ia64/tls.h: Likewise. +++ * sysdeps/powerpc/tls.h: Likewise. +++ * sysdeps/s390/tls.h: Likewise. +++ * sysdeps/sh/tls.h: Likewise. +++ * sysdeps/sparc/tls.h: Likewise. +++ * sysdeps/x86_64/tls.h: Likewise. +++ +++2004-12-27 Ulrich Drepper +++ +++ * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset. +++ +++2004-12-21 Jakub Jelinek +++ +++ * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of +++ %esp. +++ * Makefile (tests): Add tst-align2. +++ * tst-align2.c: New test. +++ * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add +++ -mpreferred-stack-boundary=4. +++ +++2004-12-18 Roland McGrath +++ +++ * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: +++ New file removed withdrawn for the moment. +++ +++2004-12-17 Richard Henderson +++ +++ * sysdeps/unix/sysv/linux/alpha/clone.S: New file. +++ * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New. +++ +++2004-12-16 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file. +++ Increased PTHREAD_STACK_MIN. +++ +++ * tst-context1.c (stacks): Use bigger stack size. +++ +++2004-12-16 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file. +++ * sysdeps/sparc/tcb-offsets.sym: Add TID. +++ +++2004-12-15 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file. +++ * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file. +++ * sysdeps/s390/tcb-offsets.sym (TID): Add. +++ +++2004-12-15 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file. +++ +++2004-12-14 Ulrich Drepper +++ +++ * sysdeps/powerpc/tcb-offsets.sym: Add TID. +++ * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file. +++ +++ * tst-getpid1.c: If child crashes, report this first. Print which +++ signal. +++ +++2004-12-09 Ulrich Drepper +++ +++ * init.c (__pthread_initialize_minimal_internal): Also unblock +++ SIGSETXID. +++ +++2004-12-01 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME, +++ _POSIX_THREAD_CPUTIME): Define to 0. +++ * sysdeps/pthread/timer_create.c (timer_create): Remove unused code +++ handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID. +++ * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk, +++ __timer_signal_thread_tclk): Remove. +++ (init_module): Remove their initialization. +++ (thread_cleanup): Remove their cleanup assertions. +++ * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk, +++ __timer_signal_thread_tclk): Remove. +++ * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed. +++ * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed. +++ * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed. +++ +++2004-12-07 Jakub Jelinek +++ +++ * sysdeps/ia64/tcb-offsets.sym (TID): Add. +++ * sysdeps/unix/sysv/linux/ia64/clone2.S: New file. +++ +++ * Makefile (tests): Add tst-getpid2. +++ * tst-getpid1.c (TEST_CLONE_FLAGS): Define. +++ (do_test): Use it. Use __clone2 instead of clone on ia64. +++ * tst-getpid2.c: New test. +++ +++2004-12-07 Kaz Kojima +++ +++ * sysdeps/unix/sysv/linux/sh/clone.S: New file. +++ +++2004-12-04 Ulrich Drepper +++ +++ * Makefile (tests): Add tst-getpid1. +++ * tst-getpid1.c: New file. +++ * sysdeps/unix/sysv/linux/i386/clone.S: New file. +++ * sysdeps/unix/sysv/linux/x86_64/clone.S: New file. +++ +++2004-12-02 Roland McGrath +++ +++ * Makefile (libpthread-nonshared): Variable removed. +++ ($(objpfx)libpthread_nonshared.a): Target removed. +++ ($(inst_libdir)/libpthread_nonshared.a): Likewise. +++ These are now handled by generic magic from +++ libpthread-static-only-routines being set. +++ +++2004-11-27 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO, +++ _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT, +++ _POSIX_THREAD_PRIO_PROTECT): Define. +++ * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise. +++ * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise. +++ +++2004-11-26 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO, +++ _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE, +++ _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG, +++ _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define. +++ * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise. +++ * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise. +++ +++2004-11-24 Ulrich Drepper +++ +++ * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c. +++ +++ * Makefile (libpthread-routines): Add pthread_setschedprio. +++ * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio. +++ * sysdeps/pthread/pthread.h: Declare pthread_setschedprio. +++ * pthread_setschedprio.c: New file. +++ +++2004-11-20 Jakub Jelinek +++ +++ * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE. +++ * pthread_cancel.c (pthread_create): Likewise. +++ +++ * Makefile (libpthread-routines): Add vars. +++ * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove. +++ * init.c (__default_stacksize, __is_smp): Remove. +++ * vars.c: New file. +++ * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function +++ and define a wrapper macro. +++ (PTHREAD_STATIC_FN_REQUIRE): Define. +++ * allocatestack.c (__find_thread_by_id): Undefine. +++ * pthread_create (__pthread_keys): Remove. +++ (pthread_mutex_lock, pthread_mutex_unlock, pthread_once, +++ pthread_key_create, pthread_setspecific, pthread_getspecific): Add +++ PTHREAD_STATIC_FN_REQUIRE. +++ +++2004-11-18 Kaz Kojima +++ +++ * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias +++ parameter to REGISTER macro. +++ +++2004-11-17 Roland McGrath +++ +++ * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread): +++ Make sure SIGCANCEL is blocked as well. +++ +++2004-11-10 Jakub Jelinek +++ +++ * sysdeps/pthread/setxid.h: New file. +++ * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove. +++ (struct xid_command): Add forward decl. +++ (struct pthread_functions): Change return type of __nptl_setxid hook +++ to int. +++ * pthreadP.h (__nptl_setxid): Change return type to int. +++ * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the +++ calling thread, return its return value and set errno on failure. +++ * descr.h (struct xid_command): Change id type to long array. +++ +++ * Makefile: Add rules to build and test tst-setuid1 and +++ tst-setuid1-static. +++ * tst-setuid1.c: New test. +++ * tst-setuid1-static.c: New test. +++ +++2004-11-10 Jakub Jelinek +++ +++ * Makefile (tests): Add tst-exit3. +++ * tst-exit3.c: New test. +++ +++2004-11-09 Ulrich Drepper +++ +++ * Makefile (tests): Add tst-exit2. +++ * tst-exit2.c: New file. +++ +++2004-11-09 Roland McGrath +++ +++ [BZ #530] +++ * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads +++ here, before calling clone. +++ * pthread_create.c (start_thread): Don't do it here. +++ +++2004-11-02 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/smp.h: Include . +++ +++2004-10-29 Kaz Kojima +++ +++ * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): +++ Set ETIMEDOUT to errno when time is up. Tweak to avoid +++ assembler warning. +++ +++2004-10-28 Jakub Jelinek +++ +++ * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks +++ if sched_priority is not between minprio and maxprio. +++ +++2004-10-25 Kaz Kojima +++ +++ * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S +++ (__pthread_cond_timedwait): Use clock_gettime syscall if exists. +++ +++ * sysdeps/unix/sysv/linux/sh/lowlevellock.S +++ (__lll_mutex_timedlock_wait): Fix a bad branch condition. +++ +++2004-10-24 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use +++ not-cancelable I/O functions. +++ +++2004-10-21 Kaz Kojima +++ +++ * sysdeps/unix/sysv/linux/sh/lowlevellock.S +++ (__lll_mutex_timedlock_wait): If woken but cannot get the lock, +++ make sure 2 is stored in the futex and we looked at the old value. +++ Fix a few other problems to return the correct value. +++ +++2004-10-14 Richard Henderson +++ +++ * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to +++ make gcc4 happy. +++ +++2004-10-06 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead +++ of pthread-functions.h and pthreaddef.h. +++ * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise. +++ +++ * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t): +++ Change __data.__nwaiters from int to unsigned int. +++ +++ * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and +++ sysconf (_SC_THREAD_CPUTIME) returns negative value. +++ +++ * allocatestack.c (__find_thread_by_id): Move attribute_hidden +++ before return type. +++ +++ * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h. +++ (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA. +++ +++2004-10-06 Ulrich Drepper +++ +++ * tst-cancel4.c (tf_msgrcv): Check for failure in msgget. If the +++ test fails, remove message queue. +++ (tf_msgsnd): Likewise. +++ +++2004-10-05 Jakub Jelinek +++ +++ * tst-clock1.c: Change #ifdef to #if defined. +++ * tst-clock2.c: Likewise. +++ * tst-cond11.c: Likewise. +++ +++ * sysdeps/pthread/timer_create.c (timer_create): Use +++ defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of +++ defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for +++ THREAD_CPUTIME. +++ +++2004-10-05 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME, +++ _POSIX_THREAD_CPUTIME): Define to 0. +++ +++2004-10-04 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME +++ and _POSIX_THREAD_CPUTIME to zero. +++ * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise. +++ * tst-barrier2.c: Fix testing for POSIX feature. +++ * tst-clock1.c: Likewise. +++ * tst-clock2.c: Likewise. +++ * tst-cond11.c: Likewise. +++ * tst-cond4.c: Likewise. +++ * tst-cond6.c: Likewise. +++ * tst-flock2.c: Likewise. +++ * tst-mutex4.c: Likewise. +++ * tst-mutex9.c: Likewise. +++ * tst-rwlock12.c: Likewise. +++ * tst-rwlock4.c: Likewise. +++ * tst-signal1.c: Likewise. +++ * tst-spin2.c: Likewise. +++ * sysdeps/pthread/posix-timer.h: Likewise. +++ * sysdeps/pthread/timer_create.c: Likewise. +++ * sysdeps/pthread/timer_routines.c: Likewise. +++ +++2004-10-01 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S +++ (__lll_mutex_timedlock_wait): Address futex correctly. +++ +++ * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S +++ (__lll_mutex_timedlock_wait): If woken but cannot get the lock, +++ make sure 2 is stored in the futex and we looked at the old value. +++ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S +++ (__lll_mutex_timedlock_wait): Likewise. Fix a few other problems +++ which might very well made the code not working at all before. +++ [BZ #417] +++ +++2004-09-28 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't +++ allow SIGSETXID to be sent. +++ * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action +++ for SIGSETXID to be defined. +++ * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure +++ SIGSETXID cannot be blocked. +++ +++ * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t): +++ Add __extension__ to long long types. +++ * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise. +++ +++2004-09-25 Ulrich Drepper +++ +++ * descr.h (struct pthread): Add stopped_start field. +++ * sysdeps/pthread/createthread.c (create_thread): Set +++ start_stopped flag in descriptor for new thread appropriately. +++ * pthread_create.c (start_thread): Only take lock to be stopped on +++ startup if stopped_start flag says so. +++ +++2004-09-24 Ulrich Drepper +++ +++ * pthread_create.c (__pthread_create_2_1): Remember whether thread +++ is created detached and if yes, do not try to free the stack in case +++ the thread creation failed. +++ * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone +++ call fails. Don't depend on INTERNAL_SYSCALL_ERRNO return zero in +++ case there has been no error. [BZ #405] +++ +++ * pthread_create.c (start_thread): Don't wait for scheduler data +++ etc to be set at the beginning of the function. The cancellation +++ infrastructure must have been set up. And enable async +++ cancellation before potentially going to sleep. [BZ #401] +++ +++2004-09-20 Ulrich Drepper +++ +++ * Versions: Remove exports for pthread_set*id_np functions. +++ * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes +++ for now. +++ * Makefile: Don't build pthread_set*id code for now. +++ +++2004-09-19 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for +++ internal use. +++ * allocatestack.c (__nptl_setxid): New function. +++ * descr.h (struct xid_command): Define type. +++ * init.c (pthread_functions): Add ptr__nptl_setxid initialization. +++ (sighandler_setxid): New function. +++ (__pthread_initialize_minimal): Register sighandler_setxid for +++ SIGCANCEL. +++ * pt-allocrtsig.c: Update comment. +++ * pthreadP.h: Define SIGSETXID. Declare __xidcmd variable. +++ Declare __nptl_setxid. +++ * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid. +++ * sysdeps/pthread/pthread.h: Declare pthread_setgid_np, +++ pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np, +++ pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np, +++ and pthread_setresuid_np. +++ * pthread_setgid_np.c: New file. +++ * pthread_setuid_np.c: New file. +++ * pthread_setegid_np.c: New file. +++ * pthread_seteuid_np.c: New file. +++ * pthread_setregid_np.c: New file. +++ * pthread_setreuid_np.c: New file. +++ * pthread_setresgid_np.c: New file. +++ * pthread_setresuid_np.c: New file. +++ * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np, +++ pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np, +++ pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np, +++ and pthread_setresuid_np. +++ * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid, +++ pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid, +++ pthread_setregid, and pthread_setresgid. +++ +++2004-09-18 Ulrich Drepper +++ +++ * allocatestack.c (allocate_stack): Return EAGAIN instead of +++ ENOMEM when out of memory. +++ +++2004-09-10 Roland McGrath +++ +++ [BZ #379] +++ * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED] +++ code, since we don't try to use the broken CLONE_STOPPED any more. +++ * pthread_create.c (start_thread): Likewise. +++ +++2004-09-15 Richard Henderson +++ +++ * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def. +++ +++2004-09-01 David Mosberger +++ +++ * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h +++ (__libc_unwind_longjmp): Delete macro and declare as function. +++ * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention +++ __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for +++ nptl directory. +++ * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file. +++ * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file. +++ * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file. +++ +++2004-09-12 Ulrich Drepper +++ +++ * sysdeps/pthread/pthread.h: Make rwlock prototypes available also +++ for __USE_XOPEN2K. +++ * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock +++ types also for __USE_XOPEN2K. +++ * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise. +++ [BZ #320] +++ +++2004-09-08 Ulrich Drepper +++ +++ * sysdeps/pthread/pthread.h +++ (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++. +++ (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise. +++ (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise. +++ (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise. +++ [BZ #375] +++ +++2004-09-07 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow +++ PSEUDO to be used with . prefix. +++ +++ * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once): +++ Use atomic_increment instead of atomic_exchange_and_add. +++ * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once): +++ Likewise. +++ * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once): +++ Likewise. +++ * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once): +++ Likewise. +++ +++ * allocatestack.c (allocate_stack): Use atomic_increment_val +++ instead of atomic_exchange_and_add. +++ * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise. +++ * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post): +++ Likewise. +++ * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait): +++ Likewise. +++ +++ * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since +++ the initialization function might throw. +++ +++2005-09-05 Richard Henderson +++ +++ * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P): +++ Move definition inside libpthread, libc, librt check. Provide +++ definition for rtld. +++ +++2004-09-02 Ulrich Drepper +++ +++ * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp. +++ * sysdeps/i386/jmpbuf-unwind.h: Likewise +++ * sysdeps/powerpc/jmpbuf-unwind.h: Likewise. +++ * sysdeps/s390/jmpbuf-unwind.h: Likewise. +++ * sysdeps/sh/jmpbuf-unwind.h: Likewise. +++ * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise. +++ * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise. +++ * sysdeps/x86_64/jmpbuf-unwind.h: Likewise. +++ * unwind.c: Use it. +++ +++ * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t): +++ Rename __data.__clock to __data.__nwaiters, make it unsigned int. +++ * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t): +++ Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: +++ Decrement __nwaiters. If pthread_cond_destroy has been called and +++ this is the last waiter, signal pthread_cond_destroy caller and +++ avoid using the pthread_cond_t structure after unlock. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise. +++ Read clock type from the least significant bits of __nwaiters instead +++ of __clock. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise. +++ * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS. +++ +++2004-08-31 Jakub Jelinek +++ +++ [BZ #342] +++ * Makefile (tests): Add tst-cond20 and tst-cond21. +++ * tst-cond20.c: New test. +++ * tst-cond21.c: New test. +++ * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h +++ (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make +++ it unsigned int. +++ * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t): +++ Likewise. +++ * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h +++ (pthread_cond_t): Likewise. +++ * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t): +++ Likewise. +++ * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t): +++ Likewise. +++ * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t): +++ Likewise. +++ * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove. +++ (cond_nwaiters): New. +++ (clock_bits): New. +++ * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY +++ if there are waiters not signalled yet. +++ Wait until all already signalled waiters wake up. +++ * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement +++ __nwaiters. If pthread_cond_destroy has been called and this is the +++ last waiter, signal pthread_cond_destroy caller and avoid using +++ the pthread_cond_t structure after unlock. +++ (__pthread_cond_wait): Increment __nwaiters in the beginning, +++ decrement it when leaving. If pthread_cond_destroy has been called +++ and this is the last waiter, signal pthread_cond_destroy caller. +++ * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait): +++ Likewise. Read clock type from the least significant bits of +++ __nwaiters instead of __clock. +++ * pthread_condattr_setclock.c (pthread_condattr_setclock): Check +++ whether clock ID can be encoded in COND_CLOCK_BITS bits. +++ * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode +++ clock type just from the last COND_CLOCK_BITS bits of value. +++ * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters +++ instead of __clock, just from second bit of condattr's value. +++ +++2004-08-30 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include +++ bits/wordsize.h. Make the header match i386 header when __WORDSIZE +++ != 64. +++ * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise. +++ +++2004-08-15 Roland McGrath +++ +++ * pthread_atfork.c: Update copyright terms including special exception +++ for these trivial files, which are statically linked into executables +++ that use dynamic linking for the significant library code. +++ +++2004-08-09 Jakub Jelinek +++ +++ * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to +++ pthread_rwlock_rdlock. +++ * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock): +++ Decrease __nr_readers_queued after reacquiring lock. +++ * sysdeps/pthread/pthread_rwlock_timedrdlock +++ (pthread_rwlock_timedrdlock): Likewise. +++ Reported by Bob Cook . +++ +++2004-08-11 Jakub Jelinek +++ +++ * tst-rwlock14.c (tf): Read main thread handle from *ARG +++ before pthread_barrier_wait. +++ +++2004-08-07 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: +++ Remove unnecessary exception handling data. +++ +++2004-07-23 Jakub Jelinek +++ +++ [BZ #284] +++ * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t +++ instead of clockid_t. +++ +++2004-07-21 Roland McGrath +++ +++ * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory). +++ +++2004-07-19 Roland McGrath +++ +++ * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available. +++ +++2004-07-02 Roland McGrath +++ +++ * configure: Don't exit. +++ +++2004-07-14 Kaz Kojima +++ +++ * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S +++ (__pthread_cond_timedwait): Check for invalid nanosecond in +++ timeout value. +++ +++2004-07-07 Ulrich Drepper +++ +++ * Makefile: Add rules to build and run tst-fini1. +++ * tst-fini1.c: New file. +++ * tst-fini1mod.c: New file. +++ +++2004-07-05 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION +++ if no cancellation support is needed. +++ * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise. +++ * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise. +++ * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise. +++ * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise. +++ * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise. +++ * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise. +++ * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise. +++ * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise. +++ +++ * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex +++ only if not already defined. +++ +++2004-07-05 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use +++ constraint "m" instead of "0" for futex. +++ +++ * shlib-versions: Add powerpc64-.*-linux.*. +++ +++2004-07-04 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S +++ (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check +++ for valid tv_nsec. +++ * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to +++ 1 billion and 64-bit tv_nsec which is valid when truncated to 32 +++ bits. +++ +++2004-06-29 Roland McGrath +++ +++ * Banner: NPTL no longer has its own version number. +++ * Makefile (nptl-version): Variable removed. +++ * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION +++ using $(version), the glibc version number. +++ +++2004-06-29 Kaz Kojima +++ +++ * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once): +++ Fix branch offset for a PLT entry. +++ * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post): +++ Likewise. +++ * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): +++ Likewise. +++ * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait): +++ Likewise. +++ * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): +++ Likewise. +++ +++2004-06-28 Jakub Jelinek +++ +++ * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define +++ unconditionally. +++ +++2004-06-28 Jakub Jelinek +++ +++ * sysdeps/pthread/pthread_rwlock_timedwrlock.c +++ (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative, +++ instead of tv_sec. +++ * sysdeps/pthread/pthread_rwlock_timedrdlock.c +++ (pthread_rwlock_timedrdlock): Likewise. +++ +++2004-06-22 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue): +++ Set __r7 to val, not mutex. +++ +++2004-06-27 Ulrich Drepper +++ +++ * Makefile: Add rules to build tst-rwlock14. +++ * tst-rwlock14.c: New file. +++ +++2004-06-24 Boris Hu +++ +++ * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation +++ check. +++ * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise. +++ +++2004-06-19 Andreas Jaeger +++ +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix +++ assembler in last patch. +++ +++2004-06-17 Ulrich Drepper +++ +++ * sysdeps/pthread/pthread_cond_timedwait.c +++ (__pthread_cond_timedwait): Also check for negativ nanoseconds. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S +++ (__pthread_cond_timedwait): Check for invalid nanosecond in +++ timeout value. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise. +++ * tst-cond19.c: New file. +++ * Makefile: Add rules to build and run tst-cond19. +++ +++2004-06-15 Steven Munroe +++ +++ * tst-context1.c (GUARD_PATTERN): Defined. +++ (tst_context_t): Define struct containing ucontext_t & guard words. +++ (ctx): Declare as an array of tst_context_t. +++ (fct): Verify uc_link & guard words are still valid. +++ (tf): Initialize guard words in ctx. Adjust ctx refs for new struct. +++ +++2004-06-13 Kaz Kojima +++ +++ * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t): +++ Add __data.__futex field, reshuffle __data.__clock. +++ * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S +++ (__pthread_cond_signal): Increment __futex at the same time as +++ __wakeup_seq or __total_seq. Pass address of __futex instead of +++ address of low 32-bits of __wakeup_seq to futex syscall. +++ * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S +++ (__pthread_cond_wait): Likewise. Pass __futex value from before +++ releasing internal lock to FUTEX_WAIT. +++ * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S +++ (__pthread_cond_timedwait): Likewise. +++ * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S +++ (FUTEX_CMP_REQUEUE): Define. +++ (__pthread_cond_broadcast): Set __futex to 2 * __total_seq. +++ Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE. +++ Pass __futex value from before the unlock and __futex address instead +++ of address of low 32-bits of __wakeup_seq to futex syscall. +++ Fallback to FUTEX_WAKE all on any errors. +++ +++2004-06-08 Jakub Jelinek +++ +++ * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix +++ comment typo. +++ * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise. +++ * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise. +++ * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise. +++ * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared): +++ Likewise. Reported by Bob Cook . +++ +++2004-06-11 Martin Schwidefsky +++ +++ * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap): +++ Add memory clobber to inline assembly. +++ (__lll_mutex_trylock): Likewise. +++ (__lll_mutex_cond_trylock): Likewise. +++ +++2004-06-07 Martin Schwidefsky +++ +++ * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue): +++ Pass val argument as 6th system call argument in %r7. +++ +++2004-05-21 Jakub Jelinek +++ +++ * Makefile (tests): Add tst-cond16. +++ * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add. +++ * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex. +++ * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t): +++ Add __data.__futex field, reshuffle __data.__clock. +++ * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S +++ (__pthread_cond_signal): Increment __futex at the same time as +++ __wakeup_seq or __total_seq. Pass address of __futex instead of +++ address of low 32-bits of __wakeup_seq to futex syscall. +++ * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S +++ (__pthread_cond_wait): Likewise. Pass __futex value from before +++ releasing internal lock to FUTEX_WAIT. +++ * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S +++ (__pthread_cond_timedwait): Likewise. +++ * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S +++ (FUTEX_CMP_REQUEUE): Define. +++ (__pthread_cond_broadcast): Set __futex to 2 * __total_seq. +++ Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE. +++ Pass __futex value from before the unlock and __futex address instead +++ of address of low 32-bits of __wakeup_seq to futex syscall. +++ Fallback to FUTEX_WAKE all on any errors. +++ * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE): +++ Define. +++ (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE +++ internally. Return non-zero if error, zero if success. +++ * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t): +++ Add __data.__futex field, reshuffle __data.__clock. +++ * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE): +++ Define. +++ (lll_futex_requeue): Add val argument, return 1 unconditionally +++ for the time being. +++ * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t): +++ Add __data.__futex field, reshuffle __data.__clock. +++ * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE): +++ Define. +++ (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE +++ internally. Return non-zero if error, zero if success. +++ * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h +++ (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock. +++ * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE): +++ Define. +++ (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE +++ internally. Return non-zero if error, zero if success. +++ * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t): +++ Add __data.__futex field, reshuffle __data.__clock. +++ * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE): +++ Define. +++ (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE +++ internally. Return non-zero if error, zero if success. +++ * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t): +++ Add __data.__futex field, reshuffle __data.__clock. +++ * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t): +++ Add __data.__futex field, reshuffle __data.__clock. +++ * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): +++ Increment __futex at the same time as __wakeup_seq or __total_seq. +++ Pass address of __futex instead of address of low 32-bits of +++ __wakeup_seq to futex syscall. +++ * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise. +++ Pass __futex value from before releasing internal lock +++ to FUTEX_WAIT. +++ * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait): +++ Likewise. Avoid unnecessary shadowing of variables. +++ * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast): +++ Set __futex to 2 * __total_seq. Pass __futex value from before the +++ unlock and __futex address instead of address of low 32-bits of +++ __wakeup_seq to futex_requeue macro, adjust for new return value +++ meaning. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S +++ (__pthread_cond_signal): Increment __futex at the same time as +++ __wakeup_seq or __total_seq. Pass address of __futex instead of +++ address of low 32-bits of __wakeup_seq to futex syscall. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S +++ (__pthread_cond_wait): Likewise. Pass __futex value from before +++ releasing internal lock to FUTEX_WAIT. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S +++ (__pthread_cond_timedwait): Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S +++ (FUTEX_CMP_REQUEUE): Define. +++ (__pthread_cond_broadcast): Set __futex to 2 * __total_seq. +++ Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE. +++ Pass __futex value from before the unlock and __futex address instead +++ of address of low 32-bits of __wakeup_seq to futex syscall. +++ Fallback to FUTEX_WAKE all on any errors. +++ +++2004-06-03 Kaz Kojima +++ +++ * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock): +++ Add nop to align the end of critical section. +++ (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise. +++ +++2004-06-01 Kaz Kojima +++ +++ * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t): +++ Add __broadcast_seq field. +++ * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark +++ all waiters as woken with woken_seq and bump broadcast counter. +++ * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new +++ __broadcast_seq. Increment __woken_seq correctly when cleanuped. +++ * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise. +++ Comment typo fixes. Avoid returning -ETIMEDOUT. +++ +++2004-06-01 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S +++ (__condvar_tw_cleanup): Fix access to saved broadcast_seq value. +++ Reported by Kaz Kojima. +++ +++2004-05-25 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/aio_misc.h: New file. +++ +++2004-05-21 Jakub Jelinek +++ +++ * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare +++ __broadcast_seq with bc_seq after acquiring internal lock instead of +++ before it. +++ +++2004-05-18 Jakub Jelinek +++ +++ * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not +++ compilation. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S +++ (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT. +++ * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h +++ (pthread_cond_t): Add __data.__broadcast_seq field. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S +++ (FRAME_SIZE): Define. +++ (__pthread_cond_timedwait): Use it. Store/check broadcast_seq. +++ Comment typo fixes. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE): +++ Define. +++ (__pthread_cond_wait): Use it. Store/check broadcast_seq. Comment +++ typo fixes. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S +++ (__pthread_cond_broadcast): Increment broadcast_seq. Comment typo +++ fixes. +++ +++2004-05-18 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry. +++ * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t): +++ Add __broadcast_seq field. +++ * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark +++ all waiters as woken with woken_seq and bump broadcast counter. +++ * sysdeps/pthread/pthread_cond_broadcast.c: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new +++ __broadcast_seq field. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise. +++ * sysdeps/pthread/pthread_cond_wait.c: Likewise. +++ * sysdeps/pthread/pthread_cond_timedwait.c: Likewise. +++ * pthread_cond_init.c: Initialize __broadcast_seq field. +++ * Makefile (tests): Add tst-cond17 and tst-cond18. +++ Add .NOTPARALLEL goal. +++ * tst-cond16.c: New file. From Jakub. +++ * tst-cond17.c: New file. From Jakub. +++ * tst-cond18.c: New file. From Jakub. +++ +++2004-05-16 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some +++ unwind info. +++ +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: +++ Parametrize frame size. Correct some unwind info. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise. +++ +++2004-05-04 Jakub Jelinek +++ +++ * tst-stack3.c: Note testing functionality beyond POSIX. +++ +++2004-05-04 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD): +++ Change conditional from ifdef to if. +++ +++2004-04-23 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO, +++ SYSDEP_CANCEL_ERROR): Define. +++ (PSEUDO): Use it. +++ +++2004-05-01 Jakub Jelinek +++ +++ * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE. +++ +++2004-04-20 Jakub Jelinek +++ +++ * sem_unlink.c (sem_unlink): Change EPERM into EACCES. +++ +++2004-04-19 Kaz Kojima +++ +++ * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info. +++ Use HIDDEN_JUMPTARGET to jump to __pthread_unwind. +++ * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame +++ info. Use HIDDEN_JUMPTARGET to jump to __pthread_unwind. +++ +++2004-04-19 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper +++ thread has all signals blocked. +++ +++2004-04-18 Andreas Jaeger +++ +++ * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h +++ (SEM_VALUE_MAX): Add missing brace. +++ +++2004-04-17 Jakub Jelinek +++ +++ * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x +++ in rt subdir. +++ (CFLAGS-tst-mqueue8x.c): Add -fexceptions. +++ * sysdeps/pthread/tst-mqueue8x.c: New test. +++ * tst-cancel4.c: Update comment about message queues. +++ +++ * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer +++ return it_value { 0, 0 }. +++ * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE +++ like SIGEV_SIGNAL. +++ * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove +++ assertion for SIGEV_NONE. +++ (thread_attr_compare): Compare all attributes, not just a partial +++ subset. +++ +++2004-04-17 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h. +++ +++2004-04-17 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX): +++ Just use a plain number. +++ * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise. +++ * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise. +++ * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise. +++ * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise. +++ * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise. +++ * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise. +++ +++2004-04-16 Kaz Kojima +++ +++ * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded +++ frame info. +++ * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise. +++ +++2004-04-15 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h. +++ (timer_helper_thread): Use inline rt_sigtimedwait syscall instead +++ of calling sigwaitinfo. +++ +++2004-04-16 Ulrich Drepper +++ +++ * allocatestack.c (allocate_stack): Set reported_guardsize +++ unconditionally. +++ * pthread_getattr_np.c (pthread_getattr_np): Use +++ reported_guardsize instead of guardsize. +++ * descr.h (struct pthread): Add reported_guardsize field. +++ +++2004-04-13 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning. +++ +++2004-04-12 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/mq-notify.c: New file. +++ +++2004-04-08 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define. +++ * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define. +++ * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define. +++ * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define. +++ * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING): +++ Define. +++ * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h +++ (_POSIX_MESSAGE_PASSING): Define. +++ * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h +++ (_POSIX_MESSAGE_PASSING): Define. +++ * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h +++ (_POSIX_MESSAGE_PASSING): Define. +++ +++2004-04-04 Ulrich Drepper +++ +++ * tst-context1.c (fct): Check whether correct stack is used. +++ +++2004-04-03 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use +++ matching constraints for asm mem parameters. +++ +++ * tst-clock2.c (tf): Don't define unless needed. +++ +++2004-03-30 H.J. Lu +++ +++ * Makefile (link-libc-static): Use $(static-gnulib) instead of +++ $(gnulib). +++ +++2004-03-30 Ulrich Drepper +++ +++ * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd. +++ * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd. +++ * pthreadP.h: Declare __nptl_deallocate_tsd. +++ * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd. +++ Adjust caller. +++ +++ * Makefile (tests): Add tst-tsd5. +++ * tst-tsd5.c: New file. +++ +++2004-03-29 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c +++ (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names +++ is SHLIB_COMPAT check. +++ * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c +++ (__pthread_attr_getaffinity_old): Likewise. +++ * sysdeps/unix/sysv/linux/pthread_getaffinity.c +++ (__pthread_getaffinity_old): Likewise. +++ * sysdeps/unix/sysv/linux/pthread_setaffinity.c +++ (__pthread_setaffinity_old): Likewise. +++ +++2004-03-26 Ulrich Drepper +++ +++ * allocatestack.c (_make_stacks_executable): Call +++ _dl_make_stack_executable first. +++ +++2004-03-24 Roland McGrath +++ +++ * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m" +++ constraint instead of "0". +++ +++2004-03-24 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h +++ (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock. +++ +++ * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize +++ code to avoid warning. +++ +++2004-03-24 Andreas Jaeger +++ +++ * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c +++ (__pthread_attr_setaffinity_old): Remove const. +++ +++2004-03-23 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/smp.h: New file. +++ * sysdeps/unix/sysv/linux/sh/smp.h: New file. +++ * init.c: Define __is_smp. +++ (__pthread_initialize_minimal_internal): Call is_smp_system to +++ initialize __is_smp. +++ * pthreadP.h: Declare __is_smp. +++ Define MAX_ADAPTIVE_COUNT is necessary. +++ * pthread_mutex_init.c: Add comment regarding __spins field. +++ * pthread_mutex_lock.c: Implement adaptive mutex type. +++ * pthread_mutex_timedlock.c: Likewise. +++ * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise. +++ * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t): +++ Add __spins field. +++ * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define +++ lll_mutex_cond_trylock. +++ * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise. +++ Define BUSY_WAIT_NOP. +++ * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise. +++ +++ * tst-mutex5.c: Add support for testing adaptive mutexes. +++ * tst-mutex7.c: Likewise. +++ * tst-mutex5a.c: New file. +++ * tst-mutex7a.c: New file. +++ * Makefile (tests): Add tst-mutex5a and tst-mutex7a. +++ +++ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S +++ (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the +++ vgettimeofday call might destroy the content. +++ +++ * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint +++ @pause in the loop. +++ +++ * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock): +++ No need to restrict type of ret. Make it int. Add comment. +++ +++ * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock): +++ Remove unnecessary setne instruction. +++ +++2004-03-22 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/pthread_getaffinity.c +++ (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX. +++ * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle. +++ If realloc fails, break out of the loop. +++ +++2004-03-20 Andreas Jaeger +++ +++ * sysdeps/unix/sysv/linux/pthread_setaffinity.c +++ (__pthread_setaffinity_old): Fix interface. +++ * sysdeps/unix/sysv/linux/pthread_getaffinity.c +++ (__pthread_getaffinity_old): Likewise. +++ +++ * sysdeps/unix/sysv/linux/pthread_setaffinity.c +++ (__pthread_setaffinity_new): Remove duplicate declaration. +++ +++2004-03-20 Kaz Kojima +++ +++ * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save +++ the return value to a safe register. +++ (CDISABLE): Set the function argument correctly. +++ +++2004-03-17 Kaz Kojima +++ +++ * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define. +++ * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait): +++ Rewrite so that only one locked memory operation per round is needed. +++ * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S +++ (pthread_barrier_wait): After wakeup, release lock only when the +++ last thread stopped using the barrier object. +++ * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S +++ (__pthread_cond_wait): Don't store mutex address if the current +++ value is ~0l. Add correct cleanup support and unwind info. +++ * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise. +++ * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S +++ (__pthread_cond_broadcast): Don't use requeue for pshared condvars. +++ * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment. +++ * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once): +++ Add correct cleanup support and unwind info. +++ * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise. +++ * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind +++ information for syscall wrappers. +++ +++2004-03-18 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add +++ cpusetsize field, remove next. +++ * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second +++ parameter for size of the CPU set. +++ (pthread_setaffinity_np): Likewise. +++ (pthread_attr_getaffinity_np): Likewise. +++ (pthread_attr_setaffinity_np): Likewise. +++ * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement +++ interface change, keep compatibility code. +++ * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise. +++ * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise. +++ * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise. +++ * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare +++ __pthread_getaffinity_np. +++ * Versions: Add version for changed interfaces. +++ * tst-attr3.c: Adjust test for interface change. +++ * pthread_getattr_np.c: Query the kernel about the affinity mask with +++ increasing buffer sizes. +++ * pthread_attr_destroy.c: Remove unused list handling. +++ * pthread_attr_init.c: Likewise. +++ +++2004-03-17 Roland McGrath +++ +++ * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing +++ first argument to clock_getres so we ever enable kernel timers. +++ +++2004-03-15 Ulrich Weigand +++ +++ * init.c (nptl_version): Add __attribute_used__ to nptl_version. +++ +++2004-03-12 Richard Henderson +++ +++ * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate +++ oldvalue from CENABLE to CDISABLE. +++ +++2004-03-12 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX. +++ * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise. +++ * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise. +++ * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise. +++ +++2004-03-11 Richard Henderson +++ +++ * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New. +++ * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID. +++ * sysdeps/unix/sysv/linux/alpha/vfork.S: New file. +++ +++2004-03-11 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl +++ instead of jnl instruction to jump to SYSCALL_ERROR_LABEL. +++ * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise. +++ +++2004-03-11 Jakub Jelinek +++ +++ * forward.c (__pthread_cond_broadcast_2_0, +++ __pthread_cond_destroy_2_0, __pthread_cond_init_2_0, +++ __pthread_cond_signal_2_0, __pthread_cond_wait_2_0, +++ __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0. +++ +++2004-03-11 Kaz Kojima +++ +++ * sysdeps/sh/tcb-offsets.sym: Add PID. +++ * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache. +++ * sysdeps/unix/sysv/linux/sh/vfork.S: New file. +++ +++2004-03-10 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to +++ include , vfork is no cancellation point. +++ * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise. +++ * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise. +++ * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise. +++ +++2004-03-10 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add +++ libc_hidden_def. +++ * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise. +++ * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork): +++ Likewise. +++ * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork): +++ Likewise. +++ * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise. +++ * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise. +++ * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h. +++ * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead +++ of DO_CALL_VIA_BREAK. Work around a gas problem. +++ +++ * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove. +++ * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file. +++ * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file. +++ * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file. +++ * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file. +++ * sysdeps/powerpc/tcb-offsets.sym: Add PID. +++ +++ * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use +++ a local register for saving old PID. Negate PID in parent upon exit. +++ +++ * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include +++ tcb-offsets.h. +++ (__vfork): Negate PID if non-zero and set to INT_MIN if zero +++ before syscall, set to the old value in the parent afterwards. +++ * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file. +++ * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include +++ tcb-offsets.h. +++ (__vfork): Negate PID if non-zero and set to INT_MIN if zero +++ before syscall, set to the old value in the parent afterwards. +++ * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file. +++ * sysdeps/s390/tcb-offsets.sym: Add PID. +++ +++ * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove. +++ * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file. +++ * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file. +++ * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file. +++ * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file. +++ * sysdeps/sparc/tcb-offsets.sym: Add PID. +++ +++2004-03-10 Andreas Schwab +++ +++ * sysdeps/ia64/tcb-offsets.sym: Add PID. +++ * sysdeps/unix/sysv/linux/ia64/vfork.S: New file. +++ * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache. +++ +++2004-03-09 Jakub Jelinek +++ +++ * tst-cancel20.c (do_one_test): Clear in_sh_body first. +++ * tst-cancel21.c (do_one_test): Likewise. +++ Reported by Gordon Jin . +++ +++2004-02-09 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID +++ if non-zero and set to INT_MIN if zero. +++ * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise. +++ * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h. +++ (SAVE_PID, RESTORE_PID): Define. +++ (__vfork): Use it. +++ * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h. +++ Use relative path to avoid including NPTL i386/vfork.S. +++ (SAVE_PID, RESTORE_PID): Define. +++ * sysdeps/unix/sysv/linux/raise.c: Include limits.h. +++ (raise): Handle THREAD_SELF->pid INT_MIN the same as 0. +++ * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and +++ tst-vfork2x. +++ (tests-reverse): Add tst-vfork1x and tst-vfork2x. +++ * tst-vfork1.c: New test. +++ * tst-vfork2.c: New test. +++ * tst-vfork1x.c: New test. +++ * tst-vfork2x.c: New test. +++ +++2004-03-08 Ulrich Drepper +++ +++ * sysdeps/i386/tcb-offsets.sym: Add PID. +++ * sysdeps/x86_64/tcb-offsets.sym: Likewise. +++ * sysdeps/unix/sysv/linux/i386/vfork.S: New file. +++ * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file. +++ +++2004-03-08 Steven Munroe +++ +++ * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs. +++ +++2004-03-08 H.J. Lu +++ +++ * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in +++ _rtld_global_ro. +++ +++2004-03-07 Ulrich Drepper +++ +++ * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in +++ _rtld_global_ro. +++ +++ * tst-once4.c: Remove unnecessary macro definition. +++ +++ * tst-mutex7.c (do_test): Limit thread stack size. +++ * tst-once2.c (do_test): Likewise. +++ * tst-tls3.c (do_test): Likewise. +++ * tst-tls1.c (do_test): Likewise. +++ * tst-signal3.c (do_test): Likewise. +++ * tst-kill6.c (do_test): Likewise. +++ * tst-key4.c (do_test): Likewise. +++ * tst-join4.c (do_test): Likewise. +++ * tst-fork1.c (do_test): Likewise. +++ * tst-context1.c (do_test): Likewise. +++ * tst-cond2.c (do_test): Likewise. +++ * tst-cond10.c (do_test): Likewise. +++ * tst-clock2.c (do_test): Likewise. +++ * tst-cancel10.c (do_test): Likewise. +++ * tst-basic2.c (do_test): Likewise. +++ * tst-barrier4.c (do_test): Likewise. +++ +++2004-03-05 Ulrich Drepper +++ +++ * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate. +++ +++2004-03-01 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S +++ (__pthread_cond_timedwait): Optimize wakeup test. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S +++ (__pthread_cond_wait): Likewise. +++ * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise. +++ * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait): +++ Likewise. +++ +++2004-02-29 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S +++ (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of +++ the atomic instruction needed. +++ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S +++ (__lll_mutex_lock_wait): Likewise. +++ +++2004-02-28 Ulrich Drepper +++ +++ * Makefile (tests): Add tst-cond14 and tst-cond15. +++ * tst-cond14.c: New file. +++ * tst-cond15.c: New file. +++ +++2004-02-27 Ulrich Drepper +++ +++ * sysdeps/pthread/createthread.c (create_thread): Remove use of +++ CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED +++ needs to be implemented differently to be useful. +++ +++2004-02-26 Ulrich Drepper +++ +++ * pthread_attr_setschedparam.c: Don't test priority against limits +++ here. Set ATTR_FLAG_SCHED_SET flag. +++ * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag. +++ * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes +++ from parent thread to child. If attribute is used and scheduling +++ parameters are not inherited, copy parameters from attribute or +++ compute them. Check priority value. +++ * pthread_getschedparam.c: If the parameters aren't known yet get +++ them from the kernel. +++ * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and +++ ATTR_FLAG_POLICY_SET flag for thread. +++ * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET +++ and ATTR_FLAG_POLICY_SET. +++ +++ * sysdeps/pthread/createthread.c: Use tgkill if possible. +++ +++ * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't +++ fail if stack address hasn't been set. Just return 0. +++ +++2004-02-25 Ulrich Drepper +++ +++ * Makefile (tests-nolibpthread): Add tst-unload. Don't link with +++ libpthread for the files in this list. +++ (CFLAGS-tst-unload): Removed. +++ * tst-unload.c (do_test): Don't use complete path for +++ LIBPHREAD_SO. +++ +++ * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and +++ tst-_res1mod2. +++ +++2004-02-22 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S +++ (__lll_mutex_lock_wait): Rewrite so that only one locked memory +++ operation per round is needed. +++ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S +++ (__lll_mutex_lock_wait): Likewise. +++ +++2004-02-20 Ulrich Drepper +++ +++ * tst-cancel9.c (cleanup): Don't print to stderr. +++ +++2004-02-20 Kaz Kojima +++ +++ * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name. +++ +++2004-02-20 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h +++ (__syscall_error_handler2): Call CDISABLE. +++ * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h +++ (__syscall_error_handler2): Call CDISABLE. +++ +++ * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait): +++ Release lock before the loop, don't reacquire it. +++ +++ * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define. +++ +++2004-02-19 Andreas Schwab +++ +++ * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait): +++ Fix last change. +++ +++2004-02-18 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S +++ (pthread_barrier_wait): After wakeup, release lock only when the +++ last thread stopped using the barrier object. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S +++ (pthread_barrier_wait): Likewise. +++ * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait): +++ Likewise. +++ * Makefile (tests): Add tst-barrier4. +++ * tst-barrier4.c: New file. +++ +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S +++ (__pthread_cond_timedwait): Perform timeout test while holding +++ internal lock to prevent wakeup race. +++ Patch by Dinakar Guniguntala . +++ * sysdeps/pthread/pthread_cond_timedwait.c +++ (__pthread_cond_timedwait): Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S +++ (__pthread_cond_timedwait): Likewise. +++ +++2004-02-18 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S +++ (__pthread_rwlock_unlock): Access WRITER as 32-bit value. +++ * Makefile (tests): Add tst-rwlock13. +++ * tst-rwlock13.c: New test. +++ +++2004-02-16 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S +++ (__condvar_tw_cleanup): Little optimization. +++ Patch by Dinakar Guniguntala . +++ +++2004-02-16 Steven Munroe +++ +++ * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with +++ libpthread as "lib" parameter to SHLIB_COMPAT. +++ (__novmx_siglongjmp): Fix typo in function name. +++ (__novmx_longjmp): Fix typo in function name. +++ +++2004-02-13 Ulrich Drepper +++ +++ * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a +++ __builtin_expect. +++ +++ * sysdeps/generic/pt-longjmp.c: Moved to... +++ * sysdeps/pthread/pt-longjmp.c: ...here. New file. +++ +++2004-01-29 Steven Munroe +++ +++ * Makefile (libpthread-routines): Add pt-cleanup. +++ * pt-longjmp.c: Removed. +++ * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file. +++ * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file. +++ * sysdeps/unix/sysv/linux/powerpc/Versions: New file. +++ Version longjmp, siglongjmp for GLIBC_2.3.4. +++ * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File. +++ +++2004-02-13 Ulrich Drepper +++ +++ * sysdeps/pthread/pthread_cond_timedwait.c +++ (__pthread_cond_timedwait): Optimize. Drop internal lock earlier. +++ Reuse code. Add __builtin_expects. +++ +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S +++ (__pthread_cond_timedwait): Get internal lock in case timeout has +++ passed before the futex syscall. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise. +++ +++2004-01-20 Ulrich Drepper +++ +++ * allocatestack.c: Pretty printing. +++ +++ * sysdeps/pthread/createthread.c (create_thread): Don't add +++ CLONE_DETACHED bit if it is not necessary. +++ +++2004-01-16 Ulrich Drepper +++ +++ * pthread_getattr_np.c: Include ldsodefs.h. +++ +++2004-01-16 Richard Henderson +++ +++ * allocatestack.c: Don't declare __libc_stack_end. +++ * init.c (__pthread_initialize_minimal_internal): Likewise. +++ * pthread_getattr_np.c (pthread_getattr_np): Likewise. +++ +++2004-01-15 Richard Henderson +++ +++ * sysdeps/alpha/tls.h (tcbhead_t): Add private. +++ (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE, +++ TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV, +++ GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64. +++ (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove. +++ (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify. +++ (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise. +++ * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64. +++ +++2004-01-14 Ulrich Drepper +++ +++ * init.c (pthread_functions): Make array const. +++ +++2004-01-13 Ulrich Drepper +++ +++ * allocatestack.c (__make_stacks_executable): Change interface. +++ Check parameters. Pass parameter on to libc counterpart. +++ * pthreadP.h: Change declaration. +++ +++2004-01-13 Richard Henderson +++ +++ * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use +++ prototype form. +++ * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): +++ Likewise. +++ +++ * sysdeps/alpha/Makefile: New file. +++ * sysdeps/alpha/tcb-offsets.sym: New file. +++ * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P): +++ Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version. +++ +++ * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based +++ on powerpc version. +++ +++2004-01-08 Jakub Jelinek +++ +++ * Makefile (tests): Add tst-backtrace1. +++ * tst-backtrace1.c: New test. +++ +++2003-12-11 Ulrich Weigand +++ +++ * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread +++ register as second parameter to the REGISTER macro. +++ * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise. +++ * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise. +++ * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise. +++ * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise. +++ * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size +++ of thread register as second parameter to REGISTER macro in 64 case. +++ +++2004-01-03 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed. +++ (CFLAGS-getpid.o): Defined. +++ (CFLAGS-getpid.os): Defined. +++ +++2003-12-31 Ulrich Drepper +++ +++ * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info +++ returned for main thread does not overlap with any other VMA. +++ Patch by Jakub Jelinek. +++ +++2003-12-29 Jakub Jelinek +++ +++ * tst-raise1.c: Include stdio.h. +++ +++2003-12-23 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid +++ setting with __ASSUME_TGKILL || defined __NR_tgkill. +++ If pid is 0, set it to selftid. +++ * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline. +++ Don't set self->pid but self->tid. If self->pid == 0 and self->tid +++ != 0, return self->tid without doing a syscall. +++ * descr.h (struct pthread): Move pid field after tid. +++ +++ * Makefile (tests): Add tst-raise1. +++ * tst-raise1.c: New file. +++ +++2003-12-23 Roland McGrath +++ +++ * tst-oddstacklimit.c: New file. +++ * Makefile (tests): Add it. +++ (tst-oddstacklimit-ENV): New variable. +++ +++ * init.c (__pthread_initialize_minimal_internal): Round stack rlimit +++ value up to page size for __default_stacksize. +++ +++2003-12-21 Ulrich Drepper +++ +++ * Makefile (tests): Add tst-eintr5. +++ * tst-eintr5.c: New file. +++ +++ * eintr.c (eintr_source): Prevent sending signal to self. +++ +++ * tst-eintr2.c (tf1): Improve error message. +++ +++2003-12-20 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define. +++ * sysdeps/unix/sysv/linux/getpid.c: New file. +++ * pthread_cancel.c: Add comment explaining use of PID field. +++ * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise. +++ * pthread_getattr_np.c: Use abs() when comparing PID and TID fields. +++ * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent +++ temporarily to signal the field must not be relied on and updated +++ by getpid(). +++ * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is +++ temporarily negative. +++ * sysdeps/unix/sysv/linux/raise.c: Likewise. +++ +++2003-12-19 Ulrich Drepper +++ +++ * eintr.c (setup_eintr): Add new parameter. Pass to thread function. +++ (eintr_source): If ARG != NULL, use pthread_kill. +++ * tst-eintr1.c: Adjust for this change. +++ * tst-eintr2.c: Likewise. +++ * Makefile (tests): Add tst-eintr3 and tst-eintr4. +++ * tst-eintr3.c: New file. +++ * tst-eintr4.c: New file. +++ +++2003-12-19 Jakub Jelinek +++ +++ * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel +++ if CANCELSTATE_BITMASK is set. +++ * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel): +++ Likewise. +++ +++ * Makefile (tests): Add tst-cancel22 and tst-cancel23. +++ (tests-reverse): Add tst-cancel23. +++ * tst-cancel22.c: New test. +++ * tst-cancel23.c: New test. +++ +++2003-12-18 Ulrich Drepper +++ +++ * tst-eintr1.c: Better error messages. +++ +++ * Makefile (tests): Add tst-eintr2. +++ * tst-eintr2.c: New file. +++ +++2003-12-18 Jakub Jelinek +++ +++ * Makefile (tests): Add tst-cancel21 and tst-cancelx21. +++ (CFLAGS-tst-cancelx21.c): Set. +++ * tst-cancel21.c: New test. +++ * tst-cancelx21.c: New test. +++ +++ * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each +++ comparison operand. +++ (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of +++ _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations. +++ * pt-longjmp.c: Include jmpbuf-unwind.h. +++ (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of +++ _JMPBUF_UNWINDS. Adjust compared pointers. +++ * init.c (__pthread_initialize_minimal_internal): Initialize +++ pd->stackblock_size. +++ * sysdeps/pthread/jmpbuf-unwind.h: Removed. +++ * sysdeps/alpha/jmpbuf-unwind.h: New file. +++ * sysdeps/i386/jmpbuf-unwind.h: New file. +++ * sysdeps/powerpc/jmpbuf-unwind.h: New file. +++ * sysdeps/s390/jmpbuf-unwind.h: New file. +++ * sysdeps/sh/jmpbuf-unwind.h: New file. +++ * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file. +++ * sysdeps/x86_64/jmpbuf-unwind.h: New file. +++ * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h. +++ (_JMPBUF_CFA_UNWINDS): Remove. +++ (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define. +++ +++2003-12-12 Jakub Jelinek +++ +++ * Makefile (tests): Add tst-cancel20 and tst-cancelx20. +++ (CFLAGS-tst-cancelx20.c): Set. +++ * tst-cancel20.c: New test. +++ * tst-cancelx20.c: New test. +++ +++2003-12-17 Ulrich Drepper +++ +++ * init.c (__pthread_initialize_minimal_internal): Don't treat +++ architectures with separate register stack special here when +++ computing default stack size. +++ +++2003-12-17 Roland McGrath +++ +++ * Makefile (tst-cancelx7-ARGS): New variable. +++ Reportd by Greg Schafer . +++ +++2003-12-17 Jakub Jelinek +++ +++ * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem. +++ (generated): Add tst-stack3.mtrace and tst-stack3-mem. +++ (tst-stack3-ENV): Set. +++ ($(objpfx)tst-stack3-mem): New. +++ * tst-stack3.c: New test. +++ +++2003-12-10 David Mosberger +++ +++ * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS): +++ Add unwind directives. Drop unused .regstk directive. +++ (_fini_EPILOG_BEGINS): Add unwind directives. +++ +++2003-12-11 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait): +++ Assume parameter is a pointer. +++ (lll_futex_wake): Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait): +++ Likewise. +++ (lll_futex_wake): Likewise. +++ Reported by Boris Hu. +++ * sysdeps/unix/sysv/linux/unregister-atfork.c +++ (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait. +++ +++ * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit. +++ +++2003-12-10 Ulrich Drepper +++ +++ * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define. +++ * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call +++ __rtld_lock_initialize for ld.so lock. +++ Patch in part by Adam Li . +++ +++2003-12-02 David Mosberger +++ +++ * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned +++ in $(gnulib). Also, remove stale comment. +++ +++2003-11-12 David Mosberger +++ +++ * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take +++ advantage of new syscall stub and optimize accordingly. +++ +++ * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename +++ from SYS_futex, to match expectations of +++ sysdep.h:DO_INLINE_SYSCALL. +++ (lll_futex_clobbers): Remove. +++ (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL. +++ (lll_futex_wake): Likewise. +++ (lll_futex_requeue): Likewise. +++ (__lll_mutex_trylock): Rewrite to a macro, so we can include this +++ file before DO_INLINE_SYSCALL is defined (proposed by Jakub +++ Jelinek). +++ (__lll_mutex_lock): Likewise. +++ (__lll_mutex_cond_lock): Likewise. +++ (__lll_mutex_timed_lock): Likewise. +++ (__lll_mutex_unlock): Likewise. +++ (__lll_mutex_unlock_force): Likewise. +++ +++ * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it +++ comes before the include of . +++ (THREAD_SELF_SYSINFO): New macro. +++ (THREAD_SYSINFO): Likewise. +++ (INIT_SYSINFO): New macro. +++ (TLS_INIT_TP): Call INIT_SYSINFO. +++ +++ * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET. +++ +++ * sysdeps/pthread/createthread.c (create_thread): Use +++ THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code. +++ * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and +++ THREAD_SELF_SYSINFO instead of open code. +++ * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro. +++ (THREAD_SYSINFO): Likewise. +++ +++ * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file. +++ +++ * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem. +++ +++2003-12-06 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array +++ instead of .init. Patch by David Mosberger. +++ +++2003-11-30 Thorsten Kukuk +++ +++ * sysdeps/pthread/configure.in: Remove broken declaration in C +++ cleanup handling check. +++ +++2003-11-30 Andreas Jaeger +++ +++ * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time). +++ * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s): +++ Likewise. +++ +++2003-11-27 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define. +++ * pthread_attr_destroy.c: Include shlib-compat.h. +++ (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR +++ is set in iattr->flags. +++ * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR. +++ +++2003-11-21 Jakub Jelinek +++ +++ * Makefile (distribute): Add tst-cleanup4aux.c. +++ +++ * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c +++ include. +++ +++2003-11-21 Ulrich Drepper +++ +++ * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use +++ pthread_cond_signal. +++ +++ * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't +++ store mutex address if the current value is ~0l. +++ * sysdeps/pthread/pthread_cond_timedwait.c +++ (__pthread_cond_timedwait): Likewise. +++ * sysdeps/pthread/pthread_cond_broadcast.c +++ (__pthread_cond_broadcast): Don't use requeue for pshared +++ condvars. +++ +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S +++ (__pthread_cond_wait): Don't store mutex address if the current +++ value is ~0l. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S +++ (__pthread_cond_timedwait): Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S +++ (__pthread_cond_broadcast): Don't use requeue for pshared +++ condvars. +++ +++ * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex +++ element with ~0l for pshared condvars, with NULL otherwise. +++ +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S +++ (__pthread_cond_wait): Don't store mutex address if the current +++ value is ~0l. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S +++ (__pthread_cond_timedwait): Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S +++ (__pthread_cond_broadcast): Don't use requeue for pshared +++ condvars. +++ +++ * Makefile: Add rules to build and run tst-cond12 and tst-cond13. +++ * tst-cond12.c: New file. +++ * tst-cond13.c: New file. +++ +++2003-11-17 Ulrich Drepper +++ +++ * sysdeps/pthread/configure.in: Make missing forced unwind support +++ fatal. +++ +++2003-11-11 Ulrich Drepper +++ +++ * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread. +++ +++2003-11-06 Ulrich Drepper +++ +++ * Makefile: Add magic to clean up correctly. +++ +++2003-11-05 Jakub Jelinek +++ +++ * unwind.c (FRAME_LEFT): Define. +++ (unwind_stop): Handle old style cleanups here. +++ (__pthread_unwind): Handle old style cleanups only if +++ !HAVE_FORCED_UNWIND. +++ * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4. +++ (CFLAGS-tst-cleanupx4.c): Add -fexceptions. +++ ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o. +++ ($(objpfx)tst-cleanupx4): Likewise. +++ * tst-cleanup4.c: New test. +++ * tst-cleanup4aux.c: New. +++ * tst-cleanupx4.c: New test. +++ +++2003-11-04 Ulrich Drepper +++ +++ * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of +++ lll_mutex_*lock macros to skip atomic operations on some archs. +++ +++2003-11-03 Ulrich Drepper +++ +++ * sysdeps/pthread/tst-timer.c (main): Initialize +++ sigev2.sigev_value as well. +++ +++2003-10-15 Roland McGrath +++ +++ * sysdeps/pthread/configure.in: Barf if visibility attribute support +++ is missing. +++ * sysdeps/pthread/configure: Regenerated. +++ +++2003-10-09 Kaz Kojima +++ +++ * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the +++ locking macros. No distinction between normal and mutex locking +++ anymore. +++ * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking. +++ Merge bits from lowlevelmutex.S we still need. +++ * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove. +++ * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise. +++ * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file. +++ * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for +++ new mutex implementation. +++ * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise. +++ * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise. +++ * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise. +++ * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise. +++ * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise. +++ * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise. +++ * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise. +++ * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise. +++ * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise. +++ * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined +++ symbol for entry point to avoid cancellation. +++ +++2003-10-07 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02 +++ changes. +++ (SAVE_OLDTYPE_0): Fix a typo. +++ +++2003-10-03 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): +++ Check __sigsetjmp return value. Reported by Daniel Jacobowitz. +++ +++2003-10-02 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use +++ correct offset. +++ +++2003-10-02 Jakub Jelinek +++ +++ * Makefile (tests): Add tst-cancel19. +++ * tst-cancel19.c: New test. +++ +++2003-10-02 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and +++ restoring of the old cancellation type. +++ +++2003-09-30 Jakub Jelinek +++ +++ * sysdeps/pthread/malloc-machine.h: Remove misleading comment. +++ +++2003-09-27 Wolfram Gloger +++ +++ * sysdeps/pthread/malloc-machine.h: New file +++ +++2003-09-24 Roland McGrath +++ +++ * allocatestack.c (__make_stacks_executable): Don't ignore return +++ value from _dl_make_stack_executable. +++ +++2003-09-24 Ulrich Drepper +++ +++ * allocatestack.c (__make_stacks_executable): Also change +++ permission of the currently unused stacks. +++ +++ * allocatestack.c (change_stack_perm): Split out from +++ __make_stacks_executable. +++ (allocate_stack): If the required permission changed between the time +++ we started preparing the stack and queueing it, change the permission. +++ (__make_stacks_executable): Call change_stack_perm. +++ +++ * Makefile: Build tst-execstack-mod locally. +++ * tst-execstack-mod.c: New file. +++ +++2003-09-23 Jakub Jelinek +++ +++ * Makefile (tests): Only add tst-execstack if have-z-execstack is yes. +++ +++2003-09-23 Roland McGrath +++ +++ * tst-execstack.c: New file. +++ * Makefile (tests): Add it. +++ ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets. +++ (LDFLAGS-tst-execstack): New variable. +++ +++ * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide +++ whether to use PROT_EXEC for stack mmap. +++ (__make_stacks_executable): New function. +++ * pthreadP.h: Declare it. +++ * init.c (__pthread_initialize_minimal_internal): Set +++ GL(dl_make_stack_executable_hook) to that. +++ +++2003-09-22 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest +++ recommendation from AMD re avoidance of lock prefix. +++ +++2003-09-22 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use +++ lll_futex_timed_wait instead of lll_futex_wait. +++ * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed. +++ * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed. +++ * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed. +++ * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed. +++ * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed. +++ * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed. +++ * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed. +++ * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed. +++ * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h. +++ Completely revamp the locking macros. No distinction between +++ normal and mutex locking anymore. +++ * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise. +++ * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait, +++ __lll_lock_timedwait): Fix prototypes. +++ * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait, +++ __lll_lock_timedwait): Likewise. +++ (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool +++ macros, add __builtin_expect. +++ (lll_mutex_timedlock): Likewise. Fix return value. +++ * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed. +++ * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed. +++ * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed. +++ * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed. +++ * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed. +++ * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed. +++ * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed. +++ * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed. +++ +++2003-09-22 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S +++ (__lll_mutex_lock_wait): Minor optimization to avoid one atomic +++ operation if possible. +++ +++ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks +++ like jumping over the lock prefix. +++ +++2003-09-21 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the +++ locking macros. No distinction between normal and mutex locking +++ anymore. +++ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise. +++ * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise. +++ * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex +++ locking. Merge bits from lowlevelmutex.S we still need. +++ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise. +++ * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed. +++ * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed. +++ * Makefile (routines): Remove libc-lowlevelmutex. +++ (libpthread-rountines): Remove lowlevelmutex. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust +++ for new mutex implementation. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: +++ Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S: +++ Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: +++ Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: +++ Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise. +++ Don't use requeue. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise. +++ * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue. +++ +++2003-09-20 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory +++ in parameters of asm with output parameters. +++ +++ * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change +++ type of DECR parameter to int. +++ * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt. +++ +++2003-09-18 Jakub Jelinek +++ +++ * tst-attr3.c (tf, do_test): Print stack start/end/size and +++ guardsize for each thread. +++ +++2003-09-17 Jakub Jelinek +++ +++ * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage. +++ * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c +++ (pthread_attr_setaffinity_np): Handle cpuset == NULL. +++ +++ * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c +++ (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is +++ NULL. +++ * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np. +++ * pthreadP.h (pthread_getaffinity_np): Add hidden_proto. +++ * sysdeps/unix/sysv/linux/pthread_getaffinity.c +++ (pthread_getaffinity_np): Add hidden_def. +++ +++ * Makefile (tests): Add tst-attr3. +++ * tst-attr3.c: New test. +++ +++ * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove. +++ +++2003-09-15 Jakub Jelinek +++ +++ * sysdeps/i386/Makefile (CFLAGS-pthread_create.c, +++ CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4. +++ +++2003-09-17 Jakub Jelinek +++ +++ * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags). +++ * tst-align.c: Include tst-stack-align.h. +++ (tf, do_test): Use TEST_STACK_ALIGN macro. +++ +++2003-09-17 Ulrich Drepper +++ +++ * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused +++ variable. +++ +++2003-09-16 Ulrich Drepper +++ +++ * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the +++ stack-related values for the initial thread. +++ +++2003-09-15 Jakub Jelinek +++ +++ * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks). +++ +++2003-09-11 Ulrich Drepper +++ +++ * pthread_mutex_lock.c: Minor code rearrangements. +++ +++2003-09-05 Roland McGrath +++ +++ * pthread_create.c (__pthread_pthread_sizeof_descr): Removed. +++ Instead, include ../nptl_db/db_info.c to do its magic. +++ * pthread_key_create.c (__pthread_pthread_keys_max): Removed. +++ (__pthread_pthread_key_2ndlevel_size): Likewise. +++ * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro. +++ * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro. +++ * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro. +++ * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro. +++ * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro. +++ * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro. +++ * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro. +++ * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro. +++ * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed. +++ * sysdeps/generic/td_ta_map_lwp2thr.c: File removed. +++ * sysdeps/i386/td_ta_map_lwp2thr.c: File removed. +++ * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed. +++ * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed. +++ * sysdeps/s390/td_ta_map_lwp2thr.c: File removed. +++ * sysdeps/sh/td_ta_map_lwp2thr.c: File removed. +++ * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed. +++ * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed. +++ +++2003-09-08 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type +++ of pthread_t to be compatible with LT. +++ * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise. +++ +++2003-09-04 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define. +++ +++2003-09-04 Jakub Jelinek +++ +++ * unwind-forcedunwind.c: Move to... +++ * sysdeps/pthread/unwind-forcedunwind.c: ...here. +++ (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined. +++ * sysdeps/pthread/jmpbuf-unwind.h: New file. +++ * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file. +++ * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file. +++ * unwind.c: Include jmpbuf-unwind.h. +++ (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro. +++ +++2003-09-02 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file. +++ * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export +++ pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3. +++ * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file. +++ * sysdeps/unix/sysv/linux/alpha/Versions: New file. +++ * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file. +++ * sysdeps/unix/sysv/linux/sparc/Versions: New file. +++ * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function. +++ (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export +++ as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2. +++ * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New +++ function. +++ (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export +++ as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1. +++ * Makefile (tests): Add tst-stack2. +++ * tst-stack2.c: New test. +++ * tst-stack1.c: Include limits.h and sys/param.h. +++ (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN). +++ +++ * pthread_condattr_setpshared.c: Include errno.h. +++ (pthread_condattr_setpshared): Return EINVAL if pshared +++ is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED. +++ +++ * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also +++ defined symbol for entry point to avoid cancellation. +++ * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): +++ Likewise. +++ * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO): +++ Likewise. +++ * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO): +++ Likewise. +++ * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO): +++ Likewise. +++ * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO): +++ Likewise. +++ * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel, +++ __close_nocancel, __read_nocancel, __write_nocancel, +++ __waitpid_nocancel): Add attribute_hidden. If not in libc.so, +++ libpthread.so or librt.so, define to corresponding function +++ without _nocancel suffix. +++ * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file. +++ * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file. +++ * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file. +++ +++ * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo. +++ +++2003-09-02 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file. +++ * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file. +++ +++ * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code +++ in subsections has a symbol associated with it. +++ +++ * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also +++ defined symbol for entry point to avoid cancellation. +++ * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise. +++ +++2003-09-01 Jakub Jelinek +++ +++ * Makefile (tests): Add tst-tls5. +++ (module-names): Add tst-tls5mod{,a,b,c,d,e,f}. +++ ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes. +++ ($(objpfx)tst-tls5): New. +++ ($(objpfx)tst-tls6.out): Likewise. +++ (tests): Depend on $(objpfx)tst-tls6.out. +++ * tst-tls3.c: Include stdint.h and pthreaddef.h. +++ (do_test): Check pthread_self () return value alignment. +++ * tst-tls3mod.c: Include stdint.h and pthreaddef.h. +++ (tf): Check pthread_self () return value alignment. +++ * tst-tls5.c: New test. +++ * tst-tls5.h: New. +++ * tst-tls5mod.c: New. +++ * tst-tls5moda.c: New. +++ * tst-tls5modb.c: New. +++ * tst-tls5modc.c: New. +++ * tst-tls5modd.c: New. +++ * tst-tls5mode.c: New. +++ * tst-tls5modf.c: New. +++ * tst-tls6.sh: New test. +++ +++ * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add +++ ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0. +++ * init.c (pthread_functions): Initialize them. +++ * forward.c (pthread_cond_timedwait@GLIBC_2.0, +++ pthread_cond_timedwait@@GLIBC_2.3.2): New forwards. +++ * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0, +++ pthread_cond_timedwait@@GLIBC_2.3.2. +++ +++2003-09-01 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file. +++ * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file. +++ * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file. +++ * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file. +++ * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file. +++ * sysdeps/unix/sysv/linux/alpha/Versions: New file. +++ +++ * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file. +++ +++ * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define +++ _POSIX_THREAD_PRIORITY_SCHEDULING. +++ * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise. +++ +++2003-08-31 Ulrich Drepper +++ +++ * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid +++ nested function, use static inline function from libio.h. +++ Code by Richard Henderson. +++ +++ * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as +++ weak. +++ +++2003-08-30 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file. +++ * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file. +++ * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file. +++ * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file. +++ * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file. +++ * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file. +++ * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file. +++ * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file. +++ * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file. +++ * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file. +++ * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file. +++ * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file. +++ * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file. +++ * sysdeps/unix/sysv/linux/sparc/fork.c: New file. +++ * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file. +++ * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file. +++ * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file. +++ * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file. +++ * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file. +++ * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file. +++ * sysdeps/sparc/sparc32/pthreaddef.h: New file. +++ * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file. +++ * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file. +++ * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file. +++ * sysdeps/sparc/sparc64/pthreaddef.h: New file. +++ * sysdeps/sparc/tls.h: New file. +++ * sysdeps/sparc/tcb-offsets.sym: New file. +++ * sysdeps/sparc/Makefile: New file. +++ * sysdeps/sparc/td_ta_map_lwp2thr.c: New file. +++ * init.c [__sparc__] (__NR_set_tid_address): Define. +++ +++2003-08-29 Jakub Jelinek +++ +++ * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock, +++ _IO_release_lock): Define. +++ +++2003-08-29 Jakub Jelinek +++ +++ * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add +++ sigemptyset before sigaddset. Reported by jreiser@BitWagon.com. +++ +++2003-08-27 Ulrich Drepper +++ +++ * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW. +++ (__pthread_cleanup_class): Add missing return types of member +++ functions. +++ +++2003-08-26 Steven Munroe +++ +++ * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h +++ (lll_mutex_unlock_force): Add memory barrier between store and futex +++ syscall. +++ +++2003-08-25 Ulrich Drepper +++ +++ * tst-cancel4.c (do_test): Also unlink tempfname and remove +++ tempmsg in first loop. +++ +++2003-08-18 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define +++ _POSIX_THREAD_PRIORITY_SCHEDULING. +++ * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise. +++ +++2003-08-07 Jakub Jelinek +++ +++ * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED] +++ (__rtld_lock_default_lock_recursive, +++ __rtld_lock_default_unlock_recursive): Define. +++ [_LIBC && SHARED] (__rtld_lock_lock_recursive, +++ __rtld_lock_unlock_recursive): Define using +++ GL(_dl_rtld_*lock_recursive). +++ * init.c (__pthread_initialize_minimal_internal): Initialize +++ _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive. +++ Lock GL(_dl_load_lock) the same number of times as +++ GL(_dl_load_lock) using non-mt implementation was nested. +++ +++ * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto. +++ * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def. +++ +++2003-08-06 Jakub Jelinek +++ +++ * tst-cancel17.c (do_test): Make len2 maximum of page size and +++ PIPE_BUF. +++ +++2003-08-07 Jakub Jelinek +++ +++ * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset. +++ +++2003-08-03 Jakub Jelinek +++ +++ * sysdeps/pthread/createthread.c (do_clone): Move error handling +++ to first syscall error check. Move syscall error check for tkill +++ into __ASSUME_CLONE_STOPPED #ifdef. +++ +++2003-08-02 Ulrich Drepper +++ +++ * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED +++ is not defined, do explicit synchronization. +++ (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED +++ is not defined also unlock pd->lock for non-debugging case in case +++ it is necessary. +++ * pthread_create.c (start_thread): Always get and release pd->lock +++ if __ASSUME_CLONE_STOPPED is not defined. +++ (start_thread_debug): Removed. Adjust users. +++ * allocatestack.c (allocate_stack): Always initialize lock if +++ __ASSUME_CLONE_STOPPED is not defined. +++ * Makefile (tests): Add tst-sched1. +++ * tst-sched1.c: New file. +++ +++ * sysdeps/pthread/createthread.c (do_clone): Only use +++ sched_setschduler and pass correct parameters. +++ +++2003-07-31 Jakub Jelinek +++ +++ * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr, +++ pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to +++ PTHREAD_STACK_MIN in comments. +++ +++2003-07-31 Jakub Jelinek +++ +++ * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait): +++ Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first +++ argument. +++ * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise. +++ * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise. +++ * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h. +++ (__pthread_cleanup_upto): Fix prototype. +++ (_longjmp_unwind): Adjust caller. +++ * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock): +++ Change second argument to const struct pointer. +++ * tst-sem8.c (main): Remove unused s2 and s3 variables. +++ * tst-sem9.c (main): Likewise. +++ * unwind.c: Include string.h for strlen prototype. +++ +++2003-07-31 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S +++ (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined. +++ * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: +++ Define HAVE_CMOV. +++ Patch by Nicholas Miell . +++ +++2003-07-30 Jakub Jelinek +++ +++ * init.c (__pthread_initialize_minimal_internal): Initialize +++ GL(dl_init_static_tls). +++ * pthreadP.h (__pthread_init_static_tls): New prototype. +++ * allocatestack.c (init_one_static_tls, __pthread_init_static_tls): +++ New functions. +++ * Makefile (tests): Add tst-tls4. +++ (modules-names): Add tst-tls4moda and tst-tls4modb. +++ ($(objpfx)tst-tls4): Link against libdl and libpthread. +++ ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and +++ tst-tls4modb.so. +++ * tst-tls4.c: New file. +++ * tst-tls4moda.c: New file. +++ * tst-tls4modb.c: New file. +++ +++2003-06-19 Daniel Jacobowitz +++ +++ * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref +++ before __timer_dealloc. +++ * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching): +++ Don't call list_unlink. +++ +++2003-07-29 Roland McGrath +++ +++ * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules). +++ +++2003-07-25 Jakub Jelinek +++ +++ * tst-cancel17.c (do_test): Check if aio_cancel failed. +++ Don't reuse struct aiocb A if it failed. +++ Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write, +++ not just one byte, as that does not block. +++ +++2003-07-22 Jakub Jelinek +++ +++ * sysdeps/pthread/unwind-resume.c: New file. +++ * sysdeps/pthread/Makefile (routines, shared-only-routines): Add +++ unwind-resume in csu subdir. +++ (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with +++ exceptions. +++ (librt-sysdep_routines, librt-shared-only-routines): Add +++ rt-unwind-resume. +++ * sysdeps/pthread/rt-unwind-resume.c: New file. +++ * unwind-forcedunwind.c: New file. +++ * Makefile (libpthread-routines): Add unwind-forcedunwind. +++ (libpthread-shared-only-routines): Likewise. +++ (CFLAGS-unwind-forcedunwind.c): Compile with exceptions. +++ * pthreadP.h (pthread_cancel_init): New prototype. +++ * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init. +++ +++ * sysdeps/pthread/createthread.c (do_thread, create_thread): Make +++ attr argument const struct pthread_attr *. +++ +++ * res.c (__res_state): Return __resp. +++ * descr.h: Include resolv.h. +++ (struct pthread): Add res field. +++ * pthread_create.c: Include resolv.h. +++ (start_thread): Initialize __resp. +++ * Makefile (tests): Add tst-_res1. +++ (module-names): Add tst-_res1mod1, tst-_res1mod2. +++ ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so. +++ ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and +++ libpthread. +++ * tst-_res1.c: New file. +++ * tst-_res1mod1.c: New file. +++ * tst-_res1mod2.c: New file. +++ +++2003-07-21 Ulrich Drepper +++ +++ * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED. +++ +++ * Makefile: Define various *-no-z-defs variables for test DSOs +++ which has undefined symbols. +++ +++2003-07-21 Steven Munroe +++ +++ * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once): +++ Retry if the stwcx fails to store once_control. +++ +++2003-07-20 Ulrich Drepper +++ +++ * Makefile (libpthread-routines): Add pthread_attr_getaffinity and +++ pthread_attr_setaffinity. +++ * Versions [libpthread] (GLIBC_2.3.3): Likewise. +++ * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file. +++ * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file. +++ * pthread_attr_destroy.c: Free cpuset element if allocated. +++ * pthread_create.c: Pass iattr as additional parameter to +++ create_thread. +++ * sysdeps/pthread/createthread.c: If attribute is provided and +++ a new thread is created with affinity set or scheduling parameters, +++ start thread with CLONE_STOPPED. +++ * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and +++ pthread_attr_setaffinity. +++ * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add +++ cpuset element. +++ +++2003-07-15 Ulrich Drepper +++ +++ * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points. +++ +++2003-07-14 Ulrich Drepper +++ +++ * sysdeps/pthread/configure.in: Require CFI directives also for +++ ppc and s390. +++ +++2003-07-15 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO): +++ Add cfi directives. +++ +++2003-07-12 Kaz Kojima +++ +++ * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and +++ CLEANUP_JMP_BUF. +++ * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more +++ registers as variables. Call __pthread_mutex_unlock_usercnt. +++ * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise. +++ * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID +++ not self pointer in __writer. Compare with TID to determine +++ deadlocks. +++ * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise. +++ * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: +++ Likewise. +++ * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: +++ Likewise. +++ * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support. +++ * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise. +++ * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice +++ macros also when compiling librt. +++ +++2003-07-11 Jakub Jelinek +++ +++ * Makefile (CFLAGS-pthread_once.c): Add -fexceptions +++ -fasynchronous-unwind-tables. +++ * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h +++ (PSEUDO): Add cfi directives. +++ * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): +++ Likewise. +++ * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): +++ Likewise. +++ +++2003-07-08 Jakub Jelinek +++ +++ * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel, +++ __pthread_unregister_cancel): Add prototypes and hidden_proto. +++ * unwind.c (__pthread_unwind_next): Add hidden_def. +++ * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel): +++ Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait): +++ Use HIDDEN_JUMPTARGET to jump to __pthread_unwind. +++ * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait): +++ Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait): +++ Likewise. +++ * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use +++ HIDDEN_JUMPTARGET to call __pthread_register_cancel, +++ __pthread_unregister_cancel and __pthread_unwind_next. +++ +++2003-07-04 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use +++ different symbol for the cancellation syscall wrapper and +++ non-cancellation syscall wrapper. +++ (PSEUDO_END): Define. +++ +++2003-07-05 Richard Henderson +++ +++ * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end. +++ * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait, +++ lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success +++ return actual return value from the syscall, not 0. +++ +++2003-07-07 Ulrich Drepper +++ +++ * descr.h (struct pthread): Add pid field. +++ * allocatestack.c (allocate_stack): Initialize pid field in descriptor. +++ (__reclaim_stacks): Likewise. +++ * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined +++ also check for PID of the signal source. +++ (__pthread_initialize_minimal_internal): Also initialize pid field +++ of initial thread's descriptor. +++ * pthread_cancel.c: Use tgkill instead of tkill if possible. +++ * sysdeps/unix/sysv/linux/fork.c: Likewise. +++ * sysdeps/unix/sysv/linux/pt-raise.c: Likewise. +++ * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise. +++ * sysdeps/unix/sysv/linux/raise.c: Likewise. +++ +++2003-07-05 Ulrich Drepper +++ +++ * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed. +++ Fix use of parameter. +++ (__libc_cleanup_pop): Likewise. +++ +++2003-07-04 Ulrich Drepper +++ +++ * init.c (sigcancel_handler): Change parameters to match handler +++ for SA_SIGACTION. Check signal number and code to recognize +++ invalid invocations. +++ +++2003-07-03 Roland McGrath +++ +++ * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): +++ Apply sizeof (struct pthread) bias to r13 value. +++ +++2003-07-03 Ulrich Drepper +++ +++ * sysdeps/pthread/configure.in: Require CFI directives. +++ +++ * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove +++ definition. +++ * pthreadP.h (__pthread_unwind): Add hidden_proto if used in +++ libpthread compilation. +++ * unwind.c (__pthread_unwind): Add hidden_def. +++ * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind. +++ +++2003-07-01 Ulrich Drepper +++ +++ * libc-cancellation.c (__libc_cleanup_routine): Define. +++ * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define. +++ (__pthread_cleanup_pop): Define. +++ +++2003-07-01 Richard Henderson +++ +++ * sysdeps/alpha/elf/pt-initfini.c: New file. +++ * sysdeps/alpha/pthread_spin_lock.S: New file. +++ * sysdeps/alpha/pthread_spin_trylock.S: New file. +++ * sysdeps/alpha/pthreaddef.h: New file. +++ * sysdeps/alpha/td_ta_map_lwp2thr.c: New file. +++ * sysdeps/alpha/tls.h: New file. +++ * sysdeps/unix/sysv/linux/alpha/Makefile: New file. +++ * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file. +++ * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file. +++ * sysdeps/unix/sysv/linux/alpha/createthread.c: New file. +++ * sysdeps/unix/sysv/linux/alpha/fork.c: New file. +++ * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file. +++ * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file. +++ * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file. +++ * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file. +++ * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file. +++ +++2003-07-01 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct +++ cleanup support and unwind info. +++ +++2003-06-30 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): +++ Use correct cleanup handler registration. Add unwind info. +++ * sysdeps/unix/sysv/linux/unwindbuf.sym: New file. +++ * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h. +++ * tst-once3.c: Add cleanup handler and check it is called. +++ * tst-once4.c: Likewise. +++ * tst-oncex3.c: New file. +++ * tst-oncex4.c: New file. +++ * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4. +++ +++2003-06-29 Ulrich Drepper +++ +++ * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc. +++ +++2003-06-27 Ulrich Drepper +++ +++ * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call. +++ (tf_msgsnd): Likewise. +++ +++ * tst-cancel4.c (tf_msgrcv): Strengthen test against valid +++ premature returns a bit more. +++ +++2003-06-26 Ulrich Drepper +++ +++ * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind +++ definition to the front. +++ +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename +++ the cleanup functions to make the names unique. Fix dwarf opcode +++ un unwind table. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup +++ functions to make the names unique. Fix CFA offset for two blocks. +++ +++2003-06-25 Ulrich Drepper +++ +++ * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add +++ missing closing braces. +++ Patch by Christophe Saout . +++ +++2003-06-24 Roland McGrath +++ +++ * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix. +++ +++2003-06-24 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file. +++ * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file. +++ +++ * pthreadP.h: Declare __find_thread_by_id. +++ * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id. +++ * pthread_clock_gettime.c: Allow using other thread's clock. +++ * pthread_clock_settime.c: Likewise. +++ * sysdeps/pthread/pthread_getcpuclockid.c: Likewise. +++ * Makefile: Add rules to build and run tst-clock2. +++ * tst-clock2.c: New file. +++ +++2003-06-23 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite +++ to use exception-based cleanup handler. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise. +++ +++ * tst-cond8.c (ch): Announce that we are done. +++ +++ * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function. +++ +++ * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR. +++ Also test aio_suspend with timeout value. +++ +++2003-06-22 Ulrich Drepper +++ +++ * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden. +++ * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add +++ attribute_hidden. +++ +++ * pthreadP.h (__pthread_mutex_init_internal): Mark hidden. +++ (__pthread_mutex_lock_internal): Likewise. +++ (__pthread_mutex_unlock_internal): Likewise. +++ (__pthread_mutex_unlock_usercnt): Declare. +++ * pthread_mutex_destroy.c: Always fail if used in any way. +++ * pthread_mutex_init.c: Update comment. +++ * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers. +++ * pthread_mutex_timedlock.c: Adjust __nusers. +++ * pthread_mutex_trylock.c: Adjust __nusers. +++ * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt +++ and public interfaces are wrapper with pass additional parameter. +++ __pthread_mutex_unlock_usercnt does not adjust __nusers if second +++ parameter zero. +++ * tst-mutex8.c: New file. +++ * Makefile (tests): Add tst-mutex8. +++ * sysdeps/pthread/pthread_cond_timedwait.c: Call +++ __pthread_mutex_unlock_usercnt. +++ * sysdeps/pthread/pthread_cond_wait.c: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise. +++ * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR. +++ * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t): +++ Add __nusers. +++ * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise. +++ +++ * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID. +++ * pthread_mutex_timedlock.c: Likewise. +++ * pthread_mutex_trylock.c: Adjust __nusers. +++ * pthread_mutex_unlock.c: Compare with TID not THREAD_ID. +++ * tst-mutex9.c: New file. +++ * Makefile (tests): Add tst-mutex9. +++ * sysdeps/i386/tls.h: Remove THREAD_ID definition. +++ * sysdeps/ia64/tls.h: Likewise. +++ * sysdeps/powerpc/tls.h: Likewise. +++ * sysdeps/s390/tls.h: Likewise. +++ * sysdeps/sh/tls.h: Likewise. +++ * sysdeps/x86_64/tls.h: Likewise. +++ * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t): +++ Change type of __owner. +++ * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise. +++ +++2003-06-19 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to... +++ * sysdeps/unix/sysv/linux/sem_post.c: ...here. +++ +++ * sysdeps/unix/sysv/linux/sem_post.c: Move to... +++ * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1 +++ instead of nr to lll_futex_wake. Only set errno and return -1 +++ if err < 0. +++ +++ * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait, +++ lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success +++ return actual return value from the syscall, not 0. +++ +++2003-06-18 Ulrich Drepper +++ +++ * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type, +++ find a random value. +++ (tf_msgrcv): Likewise. Also don't report msgrcv returns if +++ errno==EIDRM. +++ +++ * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for +++ compat_timer_settime. +++ * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for +++ compat_timer_gettime. +++ * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for +++ compat_timer_getoverrun. +++ * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for +++ compat_timer_delete. +++ +++ * pthread_mutex_destroy.c (__pthread_mutex_destroy): For +++ error-checking mutex detect busy mutexes. +++ +++2003-06-17 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock): +++ Add ax to clobber list. +++ (lll_mutex_cond_lock): Likewise. +++ (lll_mutex_unlock): Likewise. +++ (lll_lock): Likewise. +++ (lll_unlock): Likewise. +++ +++ * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18. +++ * tst-cancel18.c: New file. +++ * tst-cancelx18.c: New file. +++ +++ * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto, +++ and tcdrain. +++ +++ * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x. +++ * tst-cancel17.c: New file. +++ * tst-cancelx17.c: New file. +++ +++ * sysdeps/unix/sysv/linux/sigtimedwait.c: New file. +++ * sysdeps/unix/sysv/linux/sigwait.c: New file. +++ * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file. +++ +++ * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync. +++ +++2003-06-16 Jakub Jelinek +++ +++ * sysdeps/pthread/createthread.c (create_thread): Set +++ header.multiple_threads unconditionally. +++ * allocatestack.c (allocate_stack): Likewise. +++ * descr.h (struct pthread): Add header.multiple_threads +++ unconditionally. +++ * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE): +++ Define for librt. #error if neither libpthread, libc nor librt. +++ * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE): +++ Likewise. +++ * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE, +++ CDISABLE): Likewise. +++ * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE, +++ CDISABLE): Likewise. +++ * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE, +++ CDISABLE): Likewise. +++ * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE, +++ CDISABLE): Likewise. Access header.multiple_threads outside of +++ libc and libpthread. +++ * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE): +++ Likewise. +++ * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads. +++ * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define. +++ +++2003-06-17 Ulrich Drepper +++ +++ * tst-cancel4.c: Add tests for the socket and signal functions, pause. +++ Also test early cancellation before the thread reaches the cancellation +++ point. +++ +++ * Makefile: Compile forward.c with exceptions. +++ +++ * sysdeps/unix/sysv/linux/sleep.c: New file. +++ +++2003-06-16 Ulrich Drepper +++ +++ * Makefile: Add CFLAGS definition to compile function wrappers +++ duplicated from libc with exceptions. +++ * tst-cancel4.c: Also check cancellation handlers. +++ +++ * Makefile: Add rules to build and run tst-cancel16 and +++ tst-cancelx16. Add missing CFLAGS definitions. +++ * tst-cancel16.c: New file. +++ * tst-cancelx16.c: New file. +++ +++2003-06-15 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/i386/dl-sysdep.h +++ (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes. +++ * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h +++ (DL_SYSINFO_IMPLEMENTATION): Likewise. +++ +++ * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt. +++ (LIBC_CANCEL_RESET): Likewise. +++ Declare __librt_enable_asynccancel and __librt_disable_asynccancel. +++ * sysdeps/pthread/Makefile (librt-sysdep_routines): Add +++ librt-cancellation. +++ (CFLAGS-libcrt-cancellation.c): Define. +++ * sysdeps/pthread/librt-cancellation.c: New file. +++ * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice +++ macros also when compiling librt. +++ * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise. +++ * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise. +++ * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise. +++ * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise. +++ * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise. +++ * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise. +++ +++ * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for +++ compat_timer_create. +++ +++2003-06-14 Ulrich Drepper +++ +++ * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline. +++ +++ * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for +++ __register_atfork. +++ * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork): +++ Add libc_hidden_def. +++ +++2003-06-13 Roland McGrath +++ +++ * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS +++ constant from to ps_get_thread_area, not register contents. +++ +++2003-06-11 Ulrich Drepper +++ +++ * allocatestack.c (queue_stack): Always inline. +++ * ptreadhP.h (__do_cancel): Likewise. +++ +++2003-06-10 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix +++ a typo. +++ +++2003-06-10 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S +++ (__pthread_cond_signal): Remove incorrect second addition for +++ cond_lock!=0. +++ +++2003-06-09 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S +++ (__pthread_cond_signal): Use correct futex pointer in +++ __lll_mutex_lock_wait call. +++ +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S +++ (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0. +++ +++2003-06-08 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make +++ cancelable. +++ * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): +++ Likewise. +++ +++ * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove +++ hand-written CFI generation code. Since ENTRY/END also initiated +++ CFI frames this caused two CFI sets to be generated. +++ +++2003-06-07 Ulrich Drepper +++ +++ * cleanup_routine.c: New file. +++ * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine. +++ * sysdeps/pthread/pthread.h: Add support for fully exception-based +++ cleanup handling. +++ * Makefile (libpthread-routines): Add cleanup_routine. +++ Add more CFLAGS variables to compile with exceptions. Add comments +++ why which file needs unwind tables. +++ (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx* +++ tests. +++ * tst-cancelx1.c: New file. +++ * tst-cancelx2.c: New file. +++ * tst-cancelx3.c: New file. +++ * tst-cancelx4.c: New file. +++ * tst-cancelx5.c: New file. +++ * tst-cancelx6.c: New file. +++ * tst-cancelx7.c: New file. +++ * tst-cancelx8.c: New file. +++ * tst-cancelx9.c: New file. +++ * tst-cancelx10.c: New file. +++ * tst-cancelx11.c: New file. +++ * tst-cancelx12.c: New file. +++ * tst-cancelx13.c: New file. +++ * tst-cancelx14.c: New file. +++ * tst-cancelx15.c: New file. +++ * tst-cleanupx0.c: New file. +++ * tst-cleanupx0.expect: New file. +++ * tst-cleanupx1.c: New file. +++ * tst-cleanupx2.c: New file. +++ * tst-cleanupx3.c: New file. +++ +++ * tst-cleanup0.c: Make standard compliant. +++ * tst-cleanup1.c: Likewise. +++ +++ * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support. +++ * sysdeps/unix/sysv/linux/sem_wait.c: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise. +++ * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and +++ CLEANUP_JMP_BUF. +++ * sysdeps/x86_64/tcb-offsets.sym: Likewise. +++ * tst-cancel12.c: New file. +++ * tst-cancel13.c: New file. +++ * tst-cancel14.c: New file. +++ * tst-cancel15.c: New file. +++ * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14, +++ and tst-cancel15. +++ +++ * tst-cancel1.c: Add some comments. +++ +++ * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative +++ timeout correctly. +++ +++2003-06-06 Ulrich Drepper +++ +++ * Makefile (CFLAGS-pthread_cancel.c): Define. +++ +++2003-06-05 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t): +++ Change type of __writer element to int. +++ * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise. +++ * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry. +++ * sysdeps/x86_64/tcb-offsets.sym: Likewise. +++ * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer. +++ Compare with TID to determine deadlocks. +++ * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise. +++ * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise. +++ * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise. +++ * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: +++ Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S: +++ Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: +++ Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: +++ Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise. +++ * Makefile (tests): Add tst-rwlock12. +++ * tst-rwlock12.c: New file. +++ +++2003-06-05 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait, +++ __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid): +++ Remove bogus hidden_proto. +++ * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock): +++ Likewise. +++ * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock, +++ lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise. +++ * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock, +++ ___lll_mutex_timedlock): Likewise. +++ +++2003-06-04 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S +++ (__pthread_cond_signal): Add some code to eventually handle +++ cond_lock!=0. +++ +++2003-06-01 Ulrich Drepper +++ +++ * Makefile (tests): Add tst-exec4. +++ (tst-exec4-ARGS): Define. +++ * tst-exec4.c: New file. +++ +++2003-05-31 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): +++ Also fail if tv_nsec < 0. +++ (__lll_timedwait_tid): Likewise. +++ * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise. +++ * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid): +++ Likewise. +++ * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid): +++ Likewise. +++ * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock): +++ Likewise. +++ * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): +++ Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid): +++ Likewise. +++ * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid): +++ Likewise. +++ +++ * Makefile (tests): Add tst-sem8 and tst-sem9. +++ * tst-sem8.c: New file. +++ * tst-sem9.c: New file. +++ * sem_open.c: Fix creation of in_use record if the file exists but +++ no internal record. +++ +++ * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id +++ definitions. +++ +++ * sysdeps/pthread/timer_create.c (timer_create): In case +++ evp==NULL, assign timer ID to sival_ptr. +++ +++ * descr.h (struct pthread_unwind_buf): Change type of prev element to +++ struct pthread_unwind_buf *. +++ (struct pthread): Likewise for cleanup_jmp_buf element. +++ +++ * cleanup.c (__pthread_register_cancel): Add cast to avoid warning. +++ * cleanup_defer.c (__pthread_register_cancel_defer): Likewise. +++ * unwind.c (__pthread_unwind_next): Likewise. +++ +++2003-05-30 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/ia64/lowlevellock.h +++ (lll_futex_timed_wait): Use int for futex value parameter. +++ (lll_futex_wake): Likewise. +++ (lll_futex_requeue): Likewise. +++ +++ * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait): +++ Replace one memory operation with one register operation. +++ +++ * tst-join4.c (do_test): Fix error message. +++ +++ * tst-rwlock6.c (do_test): Use correct format specifier. +++ +++ * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S +++ (__lll_mutex_lock_wait): Replace one memory operation with one +++ register operation. +++ * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S +++ (__lll_mutex_lock_wait): Likewise. +++ +++ * sysdeps/unix/sysv/linux/ia64/lowlevellock.h +++ (__lll_mutex_cond_lock): Add one to value parameter of +++ __lll_lock_wait to reflect reality in the futex syscall. +++ * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h +++ (lll_mutex_cond_lock): Likewise. +++ +++2003-05-30 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock): +++ New function. +++ (lll_mutex_cond_lock): Define. +++ +++2003-05-29 Ulrich Drepper +++ +++ * Makefile (tests): Add tst-signal6. +++ * tst-signal6.c: New file. +++ +++ * sysdeps/unix/sysv/linux/s390/lowlevellock.h +++ (__lll_mutex_unlock_force): New function +++ (lll_mutex_unlock_force): Use __lll_mutex_unlock_force. +++ +++ * sysdeps/unix/sysv/linux/ia64/lowlevellock.h +++ (__lll_mutex_unlock_force): New function. +++ (lll_mutex_unlock_force): Use __lll_mutex_unlock_force. +++ +++ * tst-rwlock7.c (do_test): Use correct format specifier. +++ +++ * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue): +++ Find break parameter in correct asm argument. +++ +++2003-05-27 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers): +++ Remove out4. +++ (lll_futex_requeue): Fix __o3 constraint, return negative errno if +++ error occured. +++ * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t): +++ Add __mutex. +++ * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE, +++ lll_futex_requeue, lll_mutex_unlock_force): Define. +++ +++2003-05-30 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h +++ (pthread_cond_t): Add __mutex. +++ * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE, +++ lll_futex_requeue, lll_mutex_unlock_force): Define. +++ +++2003-05-28 Kaz Kojima +++ +++ * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX. +++ * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t): +++ Add __mutex field. +++ * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD): +++ Define. +++ (lll_futex_wait, lll_futex_wake): Define. +++ * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file. +++ * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using +++ FUTEX_REQUEUE instead of FUTEX_WAIT. +++ * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise. +++ * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember +++ mutex which was used in condvar structure. Call +++ __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal. +++ * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise. +++ +++ * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't +++ include tcb-offsets.h. Read wakeup value in locked region. +++ Use the value of gbr register as THREAD_ID. +++ * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise. +++ * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise. +++ * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise. +++ +++ * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related +++ macros. +++ +++2003-05-28 Ulrich Drepper +++ +++ * sysdeps/pthread/pthread_cond_broadcast.c +++ (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX. +++ +++2003-05-26 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix +++ typo in register name. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters +++ correctly. Actually use requeue. Little optimization. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store +++ mutex address early. Handle cancellation state as 32-bit value. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise. +++ Remove unnecessary label. +++ +++2003-05-25 Ulrich Drepper +++ +++ * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE +++ instead of FUTEX_WAIT. +++ * sysdeps/pthread/pthread_cond_signal.c: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise. +++ * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was +++ used in condvar structure. Call __pthread_mutex_cond_lock instead +++ of __pthread_mutex_lock_internal. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise. +++ * sysdeps/pthread/pthread_cond_wait.c: Likewise. +++ (__condvar_cleanup): Always call __pthread_mutex_cond_lock. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise. +++ * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines): +++ Add pthread_mutex_cond_lock. +++ * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex. +++ * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file. +++ * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define +++ lll_mutex_cond_lock. +++ * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise. +++ * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t): +++ Add __mutex field. +++ * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise. +++ +++ * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX. +++ * sysdeps/x86_64/tcb-offsets.sym: Likewise. +++ +++ * pthreadP.h: Declare __pthread_mutex_cond_lock. +++ * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined. +++ Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a +++ macro don't define aliases. +++ +++ * cancellation.c: Remove __pthread_enable_asynccancel_2. +++ * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2. +++ * sysdeps/pthread/pthread_cond_timedwait.c: Use +++ __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise. +++ * sysdeps/pthread/pthread_cond_wait.c: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise. +++ +++2003-05-17 Ulrich Drepper +++ +++ * sem_open.c: Fix one endless loop. Implement correct semantics +++ wrt opening the same semaphore more then once. +++ * sem_close.c: Adjust for sem_open change. +++ * semaphoreP.h: Include . Define struct inuse_sem. +++ Declare __sem_mappings, __sem_mappings_lock, __sem_search. +++ * Makefile (tests): Add tst-sem7. +++ * tst-sem7.c: New file. +++ +++2003-05-16 Roland McGrath +++ +++ * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix +++ uninitialized variable braino. +++ +++2003-05-16 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct +++ test for syscall availability. +++ +++ * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set +++ __no_posix_timers to -1 if the syscalls don't exist. +++ +++ * pthread_join.c (pthread_join): Set tid field of the joined +++ thread to -1. This isn't necessary but helps to recognize some +++ error conditions with almost no cost. +++ +++ * allocatestack.c (FREE_P): Also negative values indicate an +++ unused stack. +++ +++ * unwind.c: Include . +++ +++2003-05-14 Ulrich Drepper +++ +++ * Makefile ($(objpfx)$(multidir)): Add rule to create the directory. +++ +++2003-05-14 Jakub Jelinek +++ +++ * Makefile (crti-objs, crtn-objs): New variables. +++ (omit-deps, extra-objs): Add crtn. +++ ($(objpfx)libpthread.so): Depend on both crti and crtn +++ and links to them in multidir. +++ ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules. +++ +++2003-05-12 Steven Munroe +++ +++ * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h +++ (lll_mutex_unlock): Use atomic_exchange_rel. +++ +++2003-05-11 Ulrich Drepper +++ +++ * cond-perf.c (cons): Add missing locking around setting of alldone. +++ +++2003-05-10 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex +++ related macros. +++ * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise. +++ +++2003-05-09 Ulrich Drepper +++ +++ * tst-sem6.c: New file. +++ * Makefile (tests): Add tst-sem6. +++ +++ * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock): +++ Use atomic_exchange_rel instead of atomic_exchange. +++ * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb): +++ Likewise. +++ +++ * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of +++ code for lll_futex_wait and lll_futex_wake in static apps. Use +++ vsyscall is possible. +++ +++ * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file. +++ * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file. +++ * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and +++ pthread_setaffinity_np. +++ * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np +++ and pthread_setaffinity_np. +++ * Makefile (libpthread-routines): Add pthread_getaffinity and +++ pthread_setaffinity. +++ +++ * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined, +++ use it in case mmap to allocate the stack fails. +++ * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define +++ ARCH_MAP_FLAGS here. +++ * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and +++ ARCH_RETRY_MMAP. +++ +++2003-05-08 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork +++ handler implementation. It is now lockless in fork(). +++ * sysdeps/unix/sysv/linux/register-atfork.c: Likewise. +++ * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise. +++ * sysdeps/unix/sysv/linux/fork.h: Don't include . Don't +++ declare the __fork_*_lists. +++ (struct fork_handler): Include pointers to all three functions. +++ Add next, refcntr and need_signal elements. +++ (__fork_handlers): New declaration. +++ (__register_atfork_malloc): Remove declaration. +++ (HAVE_register_atfork_malloc): Remove definition. +++ * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove +++ __pthread_child_handler variable. +++ (__libc_pthread_init): Use __register_atfork instead of explicitly +++ adding to the list. +++ * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait +++ and lll_futex_wake. +++ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise. +++ +++ * unwind.c (unwind_cleanup): Print error message and then abort. This +++ function must never be reached. +++ +++ * cond-perf.c: New file. +++ +++2003-05-05 Ulrich Drepper +++ +++ * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message. +++ +++2003-05-04 Roland McGrath +++ +++ * Makefile ($(objpfx)../libc.so): New target. +++ +++2003-05-02 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h +++ (pthread_condattr_t): Size is only an int, don't use long for +++ alignment. +++ (pthread_mutexattr_t): Likewise. +++ * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise. +++ +++2003-05-01 Ulrich Drepper +++ +++ * sysdeps/i386/tls.h: Define THREAD_ID. +++ * sysdeps/ia64/tls.h: Likewise. +++ * sysdeps/powerpc/tls.h: Likewise. +++ * sysdeps/s390/tls.h: Likewise. +++ * sysdeps/sh/tls.h: Likewise. +++ * sysdeps/x86_64/tls.h: Likewise. +++ * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to +++ record ownership. +++ * pthread_mutex_timedlock.c: Likewise. +++ * pthread_mutex_trylock.c: Likewise. +++ * pthread_mutex_unlock.c: Likewise. +++ * pthread_rwlock_trywrlock.c: Likewise. +++ * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise. +++ * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise. +++ * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise. +++ * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise. +++ +++ * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM +++ flag. +++ +++2003-04-29 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h +++ (__SIZEOF_PTHREAD_COND_T): Define to 48. +++ (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags. +++ * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t): +++ Make __align long long instead of long. +++ (pthread_rwlock_t): Formatting. +++ * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h +++ (pthread_rwlock_t): Formatting. +++ * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h +++ (pthread_cond_t): Make __align long long instead of long. +++ (pthread_rwlock_t): Move __flags field to the same position as in +++ linuxthreads. +++ +++2003-04-30 Ulrich Drepper +++ +++ * tst-rwlock6.c (do_test): Use correct printf format specifiers. +++ * tst-rwlock7.c (do_test): Likewise. +++ +++2003-04-26 Roland McGrath +++ +++ * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds. +++ +++2003-04-22 Jakub Jelinek +++ +++ * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of +++ sizeof (struct pthread). +++ (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of +++ 1 struct pthread. +++ * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define +++ to 0. +++ (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of +++ struct pthread. +++ (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad +++ to 32-bit bytes. +++ (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before +++ tcbp. +++ (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE +++ unneccessarily. +++ (NO_TLS_OFFSET): Define. +++ * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't +++ add TLS_TCB_SIZE unnecessarily. +++ +++2003-04-22 Roland McGrath +++ +++ * Makeconfig (shared-thread-library): Reverse link order to work +++ around linker bug. +++ +++2003-04-22 Ulrich Drepper +++ +++ * semaphore.h: Fix typo in comment. +++ +++2003-04-21 Ulrich Drepper +++ +++ * sysdeps/pthread/sigfillset.c: New file. +++ +++ * init.c (__pthread_initialize_minimal): Don't block SIGTIMER. +++ * pthreadP.h: Make SIGTIMER and SIGCANCEL the same. +++ * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER. +++ * sysdeps/pthread/sigaction.c: Likewise. +++ * sysdeps/pthread/sigprocmask.c: New file. +++ * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as +++ __SIGRTMIN+1. +++ * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread): +++ Block SIGTIMER. Also handle SI_TKILL events and terminate thread +++ in this case. +++ +++2003-04-19 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/i386/dl-sysdep.h +++ (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information. +++ +++ * sysdeps/unix/sysv/linux/unregister-atfork.c +++ (__unregister_atfork): Don't free memory not allocated dynamically. +++ +++ * semaphore.h: Remove __THROW marker from cancellation points. +++ * nptl/sysdeps/pthread/pthread.h: Likewise. +++ +++2003-04-18 Ulrich Drepper +++ +++ * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel, +++ pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with +++ __THROW. +++ +++2003-04-16 Jakub Jelinek +++ +++ * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt. +++ +++2003-04-15 Roland McGrath +++ +++ * forward.c (__pthread_unwind): Tweak to avoid warning. +++ +++2003-04-15 Ulrich Drepper +++ +++ * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top. +++ +++2003-04-14 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't +++ overflow CFA advance instructions. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise. +++ +++2003-04-14 Jakub Jelinek +++ +++ * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX. +++ * sysdeps/i386/pthread_spin_lock.c: Likewise. +++ * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already +++ defined. +++ +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use +++ DW_CFA_advance_loc2 for .Laddl-.Lsubl. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use +++ DW_CFA_advance_loc for .Laddl-.Lsubl. +++ +++2003-04-13 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use +++ position-independent unwind data for static libraries. +++ Add missing unwind info. Add comments. +++ +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise. +++ +++2003-04-12 Ulrich Drepper +++ +++ * Makefile: Make sure all cancellation points are compiled with +++ exception and asynchronous unwind tables. +++ +++ * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug +++ which mishandles loading of global object addresses in PIC. +++ (THREAD_SETMEM_NC): Likewise. +++ +++2003-04-11 Ulrich Drepper +++ +++ * pthread.h: Define new data structure for cleanup buffer. Declare +++ new cleanup handler interfaces. +++ * descr.h: Include if necessary. Define pthread_unwind_buf. +++ (struct pthread): Add cleanup_jmp_buf pointer. Define +++ HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF. +++ * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use +++ it. Declare old cleanup handler installation functions. +++ * cleanup.c: Rewrite. Install handler for unwind-based cleanup +++ handling. +++ * cleanup_defer.c: Likewise. +++ * cleanup_compat.c: New file. Old cleanup code. +++ * cleanup_def_compat.c: New file. Old cleanup code. +++ * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element +++ if own thread descriptor. +++ * unwind.c: New file. +++ * forward.c: Add __pthread_unwind. +++ * init.c (pthread_functions): Add __pthread_unwind. +++ * sysdeps/pthread/pthread-functions.s (struct pthread_functions): +++ Add ptr___pthread_unwind. +++ * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling +++ and unwind function. +++ * Makefile (libpthread-routines): Add cleanup_compat, +++ cleanup_def_compat, and unwind. Define CFLAGS to enable unwind +++ table generation if necessary. +++ * version.c: Record whether unwind support is compiled in. +++ * sysdeps/pthread/configure.in: Add checks for unwind unterfaces. +++ * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup +++ handler interfaces. +++ * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of +++ complication to generate unwind information for syscall wrappers. +++ * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise. +++ * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define +++ __cleanup_fct_attribute. +++ +++ * Makefile: Add rules to build and run tst-cleanup0. +++ * tst-cleanup0.c: New file. +++ * tst-cleanup0.expect: New file. +++ +++ * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust +++ caller. Optimize to avoid often unecessary local variable. +++ +++2003-04-11 Roland McGrath +++ +++ * Makefile ($(objpfx)multidir.mk): New target, generated makefile that +++ sets variable `multidir'; include that. +++ (generated): Add it. +++ ($(objpfx)$(multidir)/crti.o): New target. +++ [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it. +++ +++2003-04-11 Ulrich Drepper +++ +++ * tst-attr2.c (do_test): Add cast to avoid warning. +++ * tst-mutex4.c (do_test): Likewise. +++ +++2003-04-10 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks +++ in child. +++ +++2003-04-09 Ulrich Drepper +++ +++ * Makefile (tests): Add tst-detach1. +++ * tst-detach1.c: New file. +++ +++2003-04-08 Ulrich Drepper +++ +++ * sysdeps/pthread/pthread.h: Remove duplicate +++ pthread_cleanup_{push,pop} definitions. +++ +++ * tst-barrier2.c: Eliminate warnings. +++ * tst-cancel4.c: Likewise. +++ * tst-cond4.c: Likewise. +++ * tst-cond6.c: Likewise. +++ * tst-detach1.c: Likewise. +++ * tst-rwlock4.c: Likewise. +++ * tst-rwlock6.c: Likewise. +++ * tst-rwlock7.c: Likewise. +++ * tst-sem3.c: Likewise. +++ * tst-spin2.c: Likewise. +++ * tst-umask1.c: Likewise. +++ +++2003-04-07 Ulrich Drepper +++ +++ * pthread_detach.c (pthread_detach): Fix test for invalid TID. +++ +++2003-04-06 Ulrich Drepper +++ +++ * descr.h (struct pthread): Move cancelhandling member to the front. +++ +++2003-04-05 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare, +++ malloc_parent, and malloc_child statically. +++ (__register_atfork_malloc): New function. +++ (free_mem): Don't free any of the malloc_* variables on the list. +++ * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc. +++ Define HAVE_register_atfork_malloc. +++ +++2003-04-04 Ulrich Drepper +++ +++ * sysdeps/pthread/createthread.c (create_thread): Add some more +++ comments explaining when to set multiple_threads and when not. +++ +++ * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and +++ THREAD_ATOMIC_BIT_SET if not already defined. +++ * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and +++ THREAD_ATOMIC_BIT_SET: +++ * sysdeps/x86_64/tls.h: Likewise. +++ * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use +++ THREAD_ATOMIC_CMPXCHG_VAL. +++ (_pthread_cleanup_pop_restore): Likewise. +++ * cancellation.c (__pthread_enable_asynccancel): Likewise. +++ (__pthread_enable_asynccancel_2): Likewise. +++ (__pthread_disable_asynccancel): Likewise. +++ * libc-cancellation.c (__libc_enable_asynccancel): Likewise. +++ (__libc_disable_asynccancel): Likewise. +++ * init.c (sigcancel_handler): Likewise. +++ * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise. +++ * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise. +++ +++2003-04-03 Ulrich Drepper +++ +++ * init.c (sigcancel_handler): Don't set EXITING_BIT here. +++ * libc-cancellation.c (__libc_enable_asynccancel): Likewise. +++ * pthreadP.h (__do_cancel): Set EXITING_BIT here. +++ * Makefile (tests): Add tst-cancel11. +++ * tst-cancel11.c: New file. +++ +++2003-04-01 Ulrich Drepper +++ +++ * pthread_create.c (deallocate_tsd): Clear/free memory after the last +++ round, not the first. Use specific_used flag instead of local +++ found_nonzero variable. Use THREAD_[SG]ETMEM where possible. +++ (__free_tcb): Don't call deallocate_tsd here. +++ (start_thread): Call deallocate_tsd here. +++ * pthread_setspecific.c: Set specific_used flag really only when +++ needed. +++ * Makefile (tests): Add tst-tsd3.c and tst-tsd4. +++ * tst-tsd3.c: New file. +++ * tst-tsd4.c: New file. +++ +++2003-03-31 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock): +++ Use atomic_exchange_and_add instead of __lll_add. +++ (__lll_mutex_timedlock): Likewise. +++ Patch by Ian Wienand. +++ +++2003-03-24 Steven Munroe +++ +++ * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h +++ (SINGLE_THREAD_P): Fix typo. +++ * tst-cancel-wrappers.sh: Handle '.'ed symbols. +++ +++2003-03-31 Ulrich Drepper +++ +++ * Makefile (tests): Add tst-align. +++ * tst-align.c: New file. +++ * sysdeps/i386/Makefile: Define CFLAGS-tst-align. +++ +++ * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called +++ function correctly. +++ +++ * tst-tsd2.c: Add casts to avoid warnings. +++ +++2003-03-30 Ulrich Drepper +++ +++ * descr.h (struct pthread): Move most often used elements to the front. +++ +++2003-03-29 Ulrich Drepper +++ +++ * Makefile (libpthread-routines): Add pthread_atfork. +++ (libpthread-static-only-routines): Add pthread_atfork. +++ +++2003-03-28 Kaz Kojima +++ +++ * sysdeps/sh/tls.h: Include nptl/descr.h after the definition +++ of TLS_DTV_AT_TP. +++ (INSTALL_DTV): Add parens. +++ (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC): +++ Use passed descr instead of THREAD_SELF. +++ * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S +++ (__lll_mutex_timedlock_wait): Correct expected value after +++ spurious wakeup. +++ * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: +++ Release lock before waking up the waiters. +++ * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit +++ criteria. Reorderstruct passed to cleanup handler. Fix +++ handling of cancellation and failung pthread_mutex_unlock call. +++ Use __pthread_enable_asynccancel_2 instead of +++ __pthread_enable_asynccancel. +++ * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise. +++ Return result of lock re-get if it fails. +++ * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument +++ for __pthread_cleanup_push. +++ * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix +++ completely broken rwlock implementation. +++ * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise. +++ * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise. +++ * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise. +++ * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise. +++ * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise. +++ * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use +++ versioned_symbol macro. +++ * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro. +++ * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise. +++ +++2003-03-27 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare +++ __timer_helper_thread. Declare __start_helper_thread, __helper_once, +++ and __helper_tid. +++ (struct timer): Remove th and bar field. +++ * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove +++ debugging code. Create only one helper thread. +++ * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill +++ helper thread. +++ * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread): +++ Renamed. Define statically. Use thread info from siginfo. +++ (__helper_once): New variable. +++ (__helper_tid): New variable. +++ (__reset_helper_control): New function. +++ (__start_helper_thread): New function. +++ +++ * pthread_create.c (start_thread): Don't use setjmp inside +++ __builtin_expect to work around gcc bug. +++ +++ * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if +++ timer_delete syscall fails, but not with ENOSYS, set +++ __no_posix_timers. +++ +++ * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS] +++ (timer_settime): Fix typo. +++ * sysdeps/unix/sysv/linux/timer_getoverr.c +++ [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise. +++ +++2003-03-27 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix +++ offset of cleanupbuf.__prev. +++ +++2003-03-26 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name +++ of included file. +++ +++2003-03-26 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP == +++ NULL provide default definition to syscall. +++ +++2003-03-25 Roland McGrath +++ +++ * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined. +++ (timer_id2ptr): Fix typo. +++ +++2003-03-25 Ulrich Drepper +++ +++ * pthreadP.h: Define SIGCANCEL and SIGTIMER. +++ * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition. +++ * sysdeps/ia64/pthreaddef.h: Likewise. +++ * sysdeps/powerpc/pthreaddef.h: Likewise. +++ * sysdeps/s390/pthreaddef.h: Likewise. +++ * sysdeps/sh/pthreaddef.h: Likewise. +++ * sysdeps/x86_64/pthreaddef.h: Likewise. +++ * init.c (__pthread_initialize_minimal): Block SIGTIMER. +++ * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from +++ being changed. +++ * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure +++ SIGTIMER is not unblocked. +++ * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more +++ RT signal taken. +++ * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to +++ be send. +++ * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just +++ pass pointer through as ID. +++ * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed. +++ * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file. +++ * sysdeps/unix/sysv/linux/timer_create.c: New file. +++ * sysdeps/unix/sysv/linux/timer_delete.c: New file. +++ * sysdeps/unix/sysv/linux/timer_getoverr.c: New file. +++ * sysdeps/unix/sysv/linux/timer_gettime.c: New file. +++ * sysdeps/unix/sysv/linux/timer_routines.c: New file. +++ * sysdeps/unix/sysv/linux/timer_settime.c: New file. +++ * sysdeps/unix/sysv/linux/ia64/Versions: New file. +++ * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file. +++ * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file. +++ * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file. +++ * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file. +++ * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file. +++ * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file. +++ * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file. +++ * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file. +++ * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file. +++ * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file. +++ * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file. +++ * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file. +++ * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file. +++ * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file. +++ * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file. +++ * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file. +++ * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file. +++ * sysdeps/unix/sysv/linux/x86_64/Versions: New file. +++ * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file. +++ * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file. +++ * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file. +++ * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file. +++ * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file. +++ * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file. +++ +++ * pthreadP.h: Remove FRAME_LEFT definition. +++ * cleanup.c (_pthread_cleanup_push): Don't check for reference to +++ already left frame. Programs which have this problem are not POSIX +++ compliant. +++ * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise. +++ +++2003-03-24 Ulrich Drepper +++ +++ * sysdeps/pthread/tst-timer.c: Check return values of the +++ functions we test. +++ +++2003-03-23 Roland McGrath +++ +++ * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything. +++ * tst-tls3mod.c: Likewise. +++ * tst-tls1.c: Likewise. +++ * tst-tls2.c: Likewise. +++ +++ * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke +++ undefined behavior. +++ +++ * tst-join5.c (tf1, tf2): Add a cast. +++ +++ * Makeconfig (includes): Append -I$(..)nptl to this variable. +++ +++ * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]: +++ Don't test anything. +++ * tst-cond4.c: Likewise. +++ * tst-cond6.c: Likewise. +++ * tst-flock2.c: Likewise. +++ * tst-mutex4.c: Likewise. +++ * tst-rwlock4.c: Likewise. +++ * tst-signal1.c: Likewise. +++ * tst-spin2.c: Likewise. +++ * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise. +++ +++ * tst-mutex4.c: Use test-skeleton.c. +++ * tst-spin2.c: Likewise. +++ * tst-sysconf.c: Likewise. +++ * tst-barrier2.c: Likewise. +++ * tst-cond4.c: Likewise. +++ * tst-cond6.c: Likewise. +++ * tst-rwlock4.c: Likewise. +++ * tst-unload.c: Likewise. +++ * tst-flock2.c (do_test): Use return instead of exit. +++ +++2003-03-22 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def. +++ +++2003-03-21 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/ia64/lowlevellock.h +++ (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq +++ instead of __lll_compare_and_swap. +++ * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once): +++ Likewise. +++ Removed definition if __lll_compare_and_swap. +++ +++ * cancellation.c: Adjust for new form of compare&exchange macros. +++ * cleanup_defer.c: Likewise. +++ * init.c: Likewise. +++ * libc-cancellation.c: Likewise. +++ * old_pthread_cond_broadcast.c: Likewise. +++ * old_pthread_cond_signal.c: Likewise. +++ * old_pthread_cond_timedwait.c: Likewise. +++ * old_pthread_cond_wait.c: Likewise. +++ * pthread_cancel.c: Likewise. +++ * pthread_create.c: Likewise. +++ * pthread_detach.c: Likewise. +++ * pthread_join.c: Likewise. +++ * pthread_key_delete.c: Likewise. +++ * pthread_setcancelstate.c: Likewise. +++ * pthread_setcanceltype.c: Likewise. +++ * pthread_timedjoin.c: Likewise. +++ * pthread_tryjoin.c: Likewise. +++ * sysdeps/pthread/createthread.c: Likewise. +++ +++2003-03-20 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include . +++ Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set +++ definitions. Replace uses with calls to atomic_* functions. +++ * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise. +++ * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and +++ __lll_test_and_set calls with atomic_exchange_and_add and +++ atomic_exchange calls respectively. +++ * sysdeps/unix/sysv/linux/sem_post.c: Likewise. +++ * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise. +++ * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise. +++ * sysdeps/unix/sysv/linux/sem_wait.c: Likewise. +++ * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise. +++ * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise. +++ * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise. +++ +++ * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add +++ returns the old value. +++ +++2003-03-20 Martin Schwidefsky +++ +++ * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type +++ int for variable OLDVAL and correct inline assembler contraint. +++ * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use +++ type int for variable OLD. +++ +++ * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it +++ only for s390-32. +++ * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h +++ (SINGLE_THREAD_P): Use global variable __local_multiple_threads +++ instead of multiple_threads field in the TCB. +++ +++2003-03-19 Ulrich Drepper +++ +++ * sysdeps/i386/i686/bits/atomic.h: Removed. +++ * sysdeps/i386/i586/bits/atomic.h: Removed. +++ * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc. +++ * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc. +++ * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc. +++ * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc. +++ * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc. +++ * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc. +++ * atomic.h: Removed. Moved to glibc. +++ +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add +++ support for clock selection. +++ +++ * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before +++ signalling waiters. +++ +++2003-03-18 Roland McGrath +++ +++ * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set): +++ Add __lll_rel_instr first. Add memory clobber. +++ (lll_mutex_unlock): Use __lll_test_and_set. +++ From Paul Mackerras . +++ +++ * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define +++ unconditionally. +++ * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h +++ (SINGLE_THREAD_P): Add `header.' prefix. +++ From Paul Mackerras . +++ +++ * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and +++ pthread_timedjoin_np to ... +++ (libpthread: GLIBC_2.3.3): ... here. +++ (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too. +++ +++ * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait): +++ Avoid shadowing VAL variable. +++ +++ * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set): +++ New macro. +++ +++2003-03-18 Ulrich Drepper +++ +++ * Makefile (tests): Add tst-cond11. +++ * tst-cond11.c: New file. +++ +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder +++ struct passed to cleanup handler to eliminate one more +++ instruction. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise. +++ +++ * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h +++ (pthrad_cond_t): Replace __unused field with __clock. +++ +++ * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before +++ waken all waiters in cleanup handler. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise. +++ +++ * pthread_condattr_getclock.c: New file. +++ * pthread_condattr_setclock.c: New file. +++ * sysdeps/pthread/pthread.h: Declare these new functions. +++ * Versions [GLIBC_2.3.3] (libpthread): Add the new functions. +++ * Makefile (libpthread-routines): Add the new functions. +++ * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr): +++ Renamed field to value. Document use of the bits. +++ * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr +++ change. +++ * pthread_condattr_setpshared.c: Likewise. +++ * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field. +++ * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol. +++ * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t): +++ Add __clock field. +++ * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: +++ Implement clock selection. +++ * sysdeps/pthread/pthread_cond_timedwait.c: Likewise. +++ * pthread-errnos.sym: Add ENOSYS. +++ * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define +++ _POSIX_CLOCK_SELECTION. +++ * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise. +++ +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove +++ invalid .size directive. +++ +++2003-03-17 Roland McGrath +++ +++ * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait): +++ Formatting tweaks. +++ +++2003-03-17 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect. +++ Use __lll_add instead of spelling it out. Use protected symbol names. +++ * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect. +++ Use __lll_add. +++ * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap): +++ Renamed from lll_compare_and_swap. Use new name where necessary. +++ (__lll_add): Defined. +++ (__lll_dec_if_positive): Defined. +++ (__lll_test_and_set): Defined. +++ * sysdeps/ia64/pthread_spin_init.c: Removed. +++ * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed. +++ * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed. +++ * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed. +++ * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed. +++ * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed. +++ * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed. +++ * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed. +++ * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate. +++ * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use +++ __sync_lock_release_si. +++ Patch by Jakub Jelinek. +++ +++ * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): +++ Fix timeout handling. +++ (__lll_timedwait_tid): Likewise. +++ (lll_unlock_wake_cb): Wake up other waiters if necessary. +++ Patch by Jakub Jelinek. +++ +++ * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing. +++ +++2003-03-17 Roland McGrath +++ +++ PowerPC port contributed by Paul Mackerras . +++ * sysdeps/pthread/pthread_spin_init.c: New file. +++ * sysdeps/pthread/pthread_spin_unlock.c: New file. +++ * sysdeps/powerpc/Makefile: New file. +++ * sysdeps/powerpc/pthread_spin_lock.c: New file. +++ * sysdeps/powerpc/pthread_spin_trylock.c: New file. +++ * sysdeps/powerpc/pthreaddef.h: New file. +++ * sysdeps/powerpc/tcb-offsets.sym: New file. +++ * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file. +++ * sysdeps/powerpc/tls.h: New file. +++ * sysdeps/powerpc/bits/atomic.h: New file. +++ * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file. +++ * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file. +++ * sysdeps/unix/sysv/linux/lowlevellock.c: New file. +++ +++ * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file. +++ * sysdeps/unix/sysv/linux/sem_post.c: New file. +++ * sysdeps/unix/sysv/linux/sem_timedwait.c: New file. +++ * sysdeps/unix/sysv/linux/sem_trywait.c: New file. +++ * sysdeps/unix/sysv/linux/sem_wait.c: New file. +++ * sysdeps/unix/sysv/linux/powerpc/Makefile: New file. +++ * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file. +++ * sysdeps/unix/sysv/linux/powerpc/fork.c: New file. +++ * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file. +++ * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file. +++ * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file. +++ * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file. +++ * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file. +++ * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file. +++ * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file. +++ +++ * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday, +++ not gettimeofday. +++ * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise. +++ * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise. +++ * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise. +++ * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise. +++ * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise. +++ +++2003-03-17 Ulrich Drepper +++ +++ * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria. +++ * sysdeps/pthread/pthread_cond_timedwait.c: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise. +++ Patch by Ewald Snel . +++ +++2003-03-16 Roland McGrath +++ +++ * tst-fork4.c: Include . +++ * tst-signal2.c: Likewise. +++ * tst-mutex5.c (do_test): exit -> return. +++ * tst-mutex2.c: Include . +++ +++2003-03-16 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S +++ (__lll_mutex_timedlock_wait): Correct expected value after +++ spurious wakeup. Otherwise we would never wait again. +++ +++ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red +++ zone versus inline asm stupidity. Use correct instructions. +++ +++ * tst-rwlock6.c: Add some more status output. +++ +++2003-03-15 Roland McGrath +++ +++ * sysdeps/pthread/configure.in: New file. +++ * sysdeps/pthread/configure: New file (generated). +++ +++2003-03-15 Ulrich Drepper +++ +++ * allocatestack.c (allocate_stack): Store the exact stack size of +++ user allocated stacks. +++ +++2003-03-15 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h +++ (SINGLE_THREAD): Use `header' prefix instead of `header.data'. +++ * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise. +++ * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define. +++ * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P): +++ Use `header.' prefix. +++ * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise. +++ +++2003-03-15 Ulrich Drepper +++ +++ * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use +++ __builtin_frame_address, use stack pointer. +++ +++ * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME +++ instead of __builtin_frame_pointer. +++ +++2003-03-14 Ulrich Drepper +++ +++ * tst-basic1.c (do_test): Add cast to avoid warning. +++ * tst-basic2.c (do_test): Likewise. +++ +++ * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct +++ amount of stack correction. +++ +++ * tst-fork4.c: Use test-skeleton.c. +++ +++2003-03-14 Roland McGrath +++ +++ * init.c: Fix typo "#eli" for "#else". +++ +++2003-03-14 Steven Munroe +++ +++ * allocatestack.c (__stack_user): Use hidden_data_def. +++ * pthread_create.c (__pthread_keys): Likewise. +++ +++ * init.c [__powerpc__] (__NR_set_tid_address): Define it. +++ +++2003-03-14 Roland McGrath +++ +++ * tst-fork4.c: New file. +++ * Makefile (tests): Add it. +++ +++ * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so +++ we always define the padding space. +++ [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC +++ stopped supporting its own extensions fully. +++ [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper +++ struct also called `header', so `header.multiple_threads' is the field +++ name to use on all machines. +++ * allocatestack.c (allocate_stack): Use `header.' prefix. +++ * sysdeps/pthread/createthread.c (create_thread): Likewise. +++ * pthread_create.c (__pthread_create_2_1): Likewise. +++ * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise. +++ (THREAD_SELF): Likewise. +++ * sysdeps/x86_64/tls.h: Likewise. +++ * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h +++ (SINGLE_THREAD_P): Likewise. +++ * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h +++ (SINGLE_THREAD_P): Likewise. +++ * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h +++ (SINGLE_THREAD_P): Likewise. +++ +++ * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18] +++ value directly. +++ +++2003-03-14 Ulrich Drepper +++ +++ * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined. +++ * sysdeps/i386/tls.h: Define CALL_THREAD_FCT. +++ +++ * pthread_create.c (start_thread): setjmp is expected to return 0. +++ +++ * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile. +++ (THREAD_GETMEM_NC): Likewise. +++ +++2003-03-13 Ulrich Drepper +++ +++ * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined +++ and the size of the stack which must be allocated is a multiple, +++ allocate one more page. +++ * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but +++ MULTI_PAGE_ALIASING. +++ +++2003-03-13 Roland McGrath +++ +++ * pthread_create.c (start_thread): Set EXITING_BIT after the +++ event-reporting (and destructors), not before. +++ +++2003-03-13 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait, +++ lll_futex_wake): Declare register variables as long int instead of +++ unsigned long int. Patch by Ian Wienand . +++ Make syscall arguments clobbered by the syscall. +++ (lll_futex_wait): Define using lll_futex_timed_wait. +++ +++ * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13] +++ to void *. +++ +++ * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set +++ PPID if [! NDEBUG]. +++ +++ * allocatestack.c (nptl_ncreated): Only declare if +++ COLORING_INCREMENT != 0. +++ +++ * pthreadP.h (__pthread_enable_asynccancel_2): New prototype. +++ (__libc_enable_asynccancel_2): Remove prototype. +++ +++ * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and +++ ctid to match kernel. +++ +++2003-03-12 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add +++ libc_multiple_threads. +++ * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of +++ __libc_multiple_threads to... +++ * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file. +++ +++ * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary +++ versioning. +++ * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise. +++ +++ * sysdeps/unix/sysv/linux/x86_64/pthread_once.S +++ (__pthread_once_internal): Define. +++ +++ * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h +++ macros instead of .symver directly. +++ * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise. +++ +++ * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h. +++ * sysdeps/x86_64/tcb-offsets.sym: New file. +++ * sysdeps/x86_64/Makefile: New file. +++ +++ * sysdeps/i386/tcb-offsets.sym: Add SELF. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF +++ to access own pthread_t in TCB. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: +++ Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S: +++ Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise. +++ +++2003-03-12 Roland McGrath +++ +++ * pthread-errnos.sym: New file. +++ * Makefile (gen-as-const-headers): New variable, list that file. +++ * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated +++ header instead of defining errno values here. +++ * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S: +++ Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: +++ Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise. +++ * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise. +++ * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise. +++ * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise. +++ * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise. +++ * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise. +++ * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise. +++ * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise. +++ * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise. +++ * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise. +++ * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise. +++ * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise. +++ * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise. +++ * sysdeps/x86_64/pthread_spin_trylock.S: Likewise. +++ * sysdeps/sh/pthread_spin_trylock.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise. +++ +++ * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that +++ CLONE_CHILD_SETTID worked. +++ +++2003-03-12 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New +++ file. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New +++ file. +++ +++ * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h +++ (pthread_cond_t): Add padding. +++ +++ * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file. +++ +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S +++ (__pthread_rwlock_timedwrlock): Add missing opcode suffix. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S +++ (__pthread_rwlock_timedrdlock): Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S +++ (__pthread_rwlock_wrlock): Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S +++ (__pthread_rwlock_rdlock): Likewise. +++ +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file. +++ +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return +++ result of lock re-get if it fails. +++ +++2003-03-11 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax. +++ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise. +++ +++ * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC, +++ THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax. +++ +++ * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack): +++ Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads. +++ * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB] +++ (create_thread): Likewise. +++ Define __pthread_multiple_threads and __libc_multiple_threads_ptr. +++ * init.c (__pthread_initialize_minimal_internal): Initialize +++ __libc_multiple_threads_ptr if necessary. +++ * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare +++ __pthread_multiple_threads and __libc_multiple_threads_ptr. +++ * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define +++ __libc_multiple_threads. +++ (__libc_pthread_init): Return pointer to __libc_pthread_init if +++ necessary. +++ +++ * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant. +++ (THREAD_SETMEM_NC): Likewise. +++ +++ * sysdeps/x86_64/pthread_spin_trylock.c: Removed. +++ * sysdeps/x86_64/pthread_spin_trylock.S: New file. +++ * sysdeps/x86_64/pthread_spin_unlock.c: Removed. +++ * sysdeps/x86_64/pthread_spin_unlock.S: New file. +++ +++ * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock): +++ Eliminate one entire instruction. +++ +++ * cancellation.c (__pthread_enable_asynccancel_2): New function. +++ * pthreadP.h: Declare __pthread_enable_asynccancel_2. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S +++ (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2 +++ instead of __pthread_enable_asynccancel. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S +++ (__pthread_cond_wait): Likewise. +++ * sysdeps/pthread/pthread_cond_timedwait.c +++ (__pthread_cond_timedwait): Likewise. +++ * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise. +++ +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S +++ (__condvar_cleanup): Wake up all waiters in case we got signaled +++ after being woken up but before disabling asynchronous +++ cancellation. +++ * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S +++ (__condvar_cleanup): Likewise. +++ +++ * init.c (__NR_set_tid_address): If already defined, don't redefine. +++ Make it an error if architecture has no #if case. Add x86-64. +++ +++ * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for +++ pt-initfini.s generation. +++ +++ * sysdeps/x86_64/tls.h: Include . +++ (TLS_INIT_TP): Fix typo. +++ +++2003-03-11 Jakub Jelinek +++ +++ * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and +++ 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq. +++ +++ * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h. +++ * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise. +++ * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise. +++ * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise. +++ * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise. +++ * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise. +++ * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise. +++ * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise. +++ +++2003-03-11 Ulrich Drepper +++ +++ * sysdeps/pthread/pthread_cond_timedwait.c +++ (__pthread_cond_timedwait): Return the result of the final +++ locking. If it succeeds, the regular function return value. +++ +++ * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): +++ Return result of the final locking. +++ * version.c (__nptl_main): Work around problems with the strange +++ INTERNAL_SYSCALL macro on ppc32. +++ * init.c (__pthread_initialize_minimal_internal): Unblock +++ SIGCANCEL in case the parent blocked it. +++ Reported by Paul Mackerras . +++ +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file. +++ +++2003-03-11 Jakub Jelinek +++ +++ * sysdeps/pthread/pthread_cond_timedwait.c +++ (__pthread_cond_timedwait): Unlock and fail if +++ __pthread_mutex_unlock_internal failed. +++ +++ * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined. +++ (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP]. +++ Use ARCH_CLONE. +++ * allocatestack.c (ALLOCATE_STACK_PARMS): New macro. +++ [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES, +++ STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS, +++ ALLOCATE_STACK): New macros. +++ (TLS_TPADJ): New macro. +++ (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ. +++ (allocate_stack): Handle TLS_DTV_AT_TP and +++ NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ. +++ * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]: +++ Don't set PD->self. +++ * init.c [__ia64__] (__NR_set_tid_address): Define. +++ +++ * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file. +++ * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file. +++ * sysdeps/unix/sysv/linux/ia64/fork.c: New file. +++ * sysdeps/unix/sysv/linux/ia64/createthread.c: New file. +++ * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file. +++ * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file. +++ * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file. +++ * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file. +++ * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file. +++ * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file. +++ * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file. +++ * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file. +++ * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file. +++ * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file. +++ * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file. +++ * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file. +++ * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file. +++ * sysdeps/ia64/bits/atomic.h: New file. +++ * sysdeps/ia64/Makefile: New file. +++ * sysdeps/ia64/pthread_spin_init.c: New file. +++ * sysdeps/ia64/pthread_spin_lock.c: New file. +++ * sysdeps/ia64/pthread_spin_trylock.c: New file. +++ * sysdeps/ia64/pthread_spin_unlock.c: New file. +++ * sysdeps/ia64/pthreaddef.h: New file. +++ * sysdeps/ia64/tcb-offsets.sym: New file. +++ * sysdeps/ia64/td_ta_map_lwp2thr.c: New file. +++ * sysdeps/ia64/tls.h: New file. +++ +++ * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument +++ to syscall instead of no arguments. +++ +++2003-03-10 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file. +++ * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file. +++ * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file. +++ * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file. +++ +++ * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in +++ unused code. +++ +++ * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file +++ +++ * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add +++ lowlevelbarrier.sym. +++ * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: +++ Include lowlevelbarrier.h and don't define offsets locally. +++ * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise. +++ +++ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h +++ (__lll_mutex_lock_wait): Reverse order of first two parameters. +++ (__lll_mutex_timedlock_wait): Likewise. +++ (lll_mutex_lock): Adjust asm for that. +++ (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered. +++ (lll_lock): Adjust asm for operand order change. +++ * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file. +++ * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file. +++ +++ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait): +++ Reverse order of parameters. +++ (__lll_timedwait_tid): Remove regparms attribute. +++ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file. +++ * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file. +++ +++ * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S +++ (__lll_timedwait_tid): Remove one unnecessary instruction. +++ +++ * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define +++ __lll_mutex_timedlock_wait only for NOT_IN_libc. +++ * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include +++ lowlevelmutex.S. +++ +++ * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define +++ lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only +++ for NOT_IN_libc. +++ * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include +++ lowlevellock.S. +++ +++ * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define +++ LOCK is already defined. Don't define __lll_mutex_timedlock_wait +++ for libc.so. +++ * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only +++ define LOCK here (if UP is not defined). The actual code is in +++ lowlevelmutex.S. +++ +++ * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define +++ LOCK is already defined. Don't define lll_unlock_wake_cb and +++ __lll_timedwait_tid for libc.so. +++ * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only +++ define LOCK here (if UP is not defined). The actual code is in +++ lowlevellock.S. +++ +++ * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore. +++ * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise. +++ * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h +++ instead of lowlevelsem.h. +++ * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise. +++ * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise. +++ * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise. +++ +++ * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add +++ lowlevelrwlock.sym. +++ * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file. +++ * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed. +++ * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed. +++ +++ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix +++ register loading. +++ * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo +++ last changed. D'oh. +++ +++ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file. +++ +++ * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration +++ of __libc_locking_needed. +++ (lll_trylock): Initialize %eax to zero. +++ +++ * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update +++ pthread_cond_t definition. +++ +++2003-03-10 Roland McGrath +++ +++ * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file. +++ * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it. +++ * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed. +++ * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise. +++ +++ * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]: +++ Instead of setting PD->multiple_threads, set globals +++ __pthread_multiple_threads and __libc_multiple_threads. +++ * sysdeps/pthread/createthread.c (create_thread): Likewise. +++ * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it. +++ * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise. +++ +++ * descr.h (struct pthread): Conditionalize first member on +++ [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union +++ containing an anonymous tcbhead_t. Move `list' member out. +++ [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member. +++ * allocatestack.c: Remove use of `header.data.' prefix. +++ * pthread_create.c: Likewise. +++ * init.c (__pthread_initialize_minimal_internal): Likewise. +++ * sysdeps/pthread/createthread.c (create_thread): Likewise. +++ * sysdeps/i386/tls.h (INSTALL_DTV): Add parens. +++ (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix. +++ * sysdeps/x86_64/tls.h: Likewise. +++ * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h +++ (SINGLE_THREAD_P): Likewise. +++ * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h +++ (SINGLE_THREAD_P): Likewise. +++ * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member. +++ * sysdeps/s390/tls.h (tcbhead_t): Likewise. +++ +++2003-03-09 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file. +++ +++ * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file. +++ * sysdeps/unix/sysv/linux/x86_64/fork.c: New file. +++ +++ * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many +++ leftovers from the ia32 code. +++ +++ * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary +++ memory load. +++ (clear_once_control): Don't load %esi. +++ +++ * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor +++ handling. +++ +++ * sysdeps/unix/sysv/linux/x86_64/fork.c: New file. +++ +++ * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to... +++ * sysdeps/unix/sysv/linux/createthread.c: ...here. +++ +++ * Makefile (tests): Add tst-cond10. +++ * tst-cond10.c: New file. +++ +++2003-03-08 Ulrich Drepper +++ +++ * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call. +++ * tst-signal3.c (do_test): Likewise. +++ * tst-sem5.c (do_test): Likewise. +++ * tst-kill6.c (do_test): Likewise. +++ * tst-tls3.c (do_test): Likewise. Include . +++ +++ * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead +++ of inc/dec. +++ * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise. +++ * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise +++ * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S: +++ Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: +++ Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise. +++ +++ * allocatestack.c (allocate_stack): If mprotect() fails free the +++ TLS memory. +++ +++2003-03-07 Ulrich Drepper +++ +++ * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions. +++ +++ * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of +++ lll_wake_tid. This was used only to work around kernel limits in +++ the early days. +++ * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise. +++ * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise. +++ * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise. +++ * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise. +++ +++ * init.c (__static_tls_align_m1): Renamed from __static_tls_align. +++ (__pthread_initialize_minimal_internal): Change initialization of +++ __static_tls_align_m1 appropriately. +++ * pthreadP.h (__static_tls_align_m1): Renamed from +++ __static_tls_align. +++ * allocatestack.c (allocate_stack): Use __static_tls_align_m1 +++ instead of __static_tls_align-1. +++ +++2003-03-04 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/x86_64/Makefile: New file. +++ +++ * pthread_create.c: Define __pthread_keys using nocommon +++ attribute, not by placing it explicitly in bss. +++ Remove DEFINE_DEALLOC definition. Not needed anymore. +++ +++ * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined. +++ Use it in mmap call to allocate stacks. +++ +++ * sysdeps/pthread/createthread.c (create_thread): Fix comment. +++ +++ * pthread_create.c (start_thread): Use THREAD_SETMEM to store +++ result of the thread function. +++ +++2003-03-03 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic +++ version is just fine. +++ +++ * sysdeps/unix/sysv/linux/libc_pthread_init.c +++ (__pthread_child_handler): Renamed from pthread_child_handler, +++ exported, and marked hidden. Change all users. +++ * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not +++ free __pthread_child_handler from child list. +++ +++2003-03-03 Martin Schwidefsky +++ +++ * atomic.h (atomic_exchange_and_add): Return newval, not oldval. +++ +++ * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait): +++ Fix handling of cancellation and failing pthread_mutex_unlock call. +++ * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise. +++ (__pthread_cond_wait): Likewise. +++ +++ * sysdeps/pthread/pthread_rwlock_timedrdlock.c +++ (pthread_rwlock_timedrdlock): Fix clobber of result variable by +++ lll_futex_timed_wait call. +++ * sysdeps/pthread/pthread_rwlock_timedwrlock.c +++ (pthread_rwlock_timedwrlock): Likewise. +++ +++ * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock): +++ Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so. +++ * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments. +++ +++ * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix +++ check of lll_futex_wake return value. +++ +++2003-03-03 Roland McGrath +++ +++ * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl. +++ +++ * sysdeps/pthread/pthread-functions.h (struct pthread_functions): +++ Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf. +++ * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise. +++ +++2003-03-02 Ulrich Drepper +++ +++ * sysdeps/pthread/timer_create.c (timer_create): Return correct +++ error for CPU clocks. +++ +++ * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define +++ _POSIX_MONOTONIC_CLOCK. +++ * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise. +++ +++ * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset +++ recent kernels. +++ +++2003-03-01 Ulrich Drepper +++ +++ * descr.h (struct pthread): Move cleanup field to the front. +++ +++2003-03-01 Roland McGrath +++ +++ * sem_open.c (sem_open): Braino fix. +++ +++2003-03-01 Ulrich Drepper +++ +++ * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline +++ __pthread_cleanup_pop functionality. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise. +++ +++ * descr.h (struct pthread): Move tid field to the front now that +++ it is often used. +++ +++ * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S +++ (__lll_mutex_timedlock_wait): Remove. +++ (__lll_mutex_unlock_wake): Don't save, load, and restore %esi. +++ * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S +++ (__lll_mutex_unlock_wake): Don't save, load, and restore %esi. +++ * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S +++ (lll_unlock_wake_cb): Don't save and restore %esi. +++ (__lll_unlock_wake): Add alignment. Don't save, load, and restore +++ %esi. +++ (__lll_timedwait_tid): Add alignment. +++ * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S +++ (__lll_unlock_wake): Add alignment. Don't save, load, and restore +++ %esi. +++ (__lll_timedwait_tid): Removed. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S +++ (__pthread_cond_broadcast): Don't save, load, and restore %esi. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S +++ (pthread_barrier_wait): Don't save, load, and restore %esi for +++ last thread. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S +++ (__pthread_cond_signal): Don't save, load, and restore %esi. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S +++ (__pthread_rwlock_unlock): Don't save, load, and restore %esi. +++ * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post): +++ Don't save, load, and restore %esi. +++ +++2003-02-27 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: +++ Release lock before waking up the waiters. +++ +++ * tst-exit1.c (do_test): Don't start more than one thread in parallel. +++ +++ * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT. +++ (reader_thread): Likewise. +++ +++ * sysdeps/pthread/pthread_rwlock_unlock.c +++ (__pthread_rwlock_unlock): Release internal lock early. Don't try +++ to wake up readers if there are none. +++ +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: +++ Release internal lock before wake threads. +++ +++2003-02-26 Ulrich Drepper +++ +++ * Makefile (tests): Add tst-rwlock10 and tst-rwlock11. +++ * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be +++ predefined. +++ * tst-rwlock9.c: Likewise. +++ * tst-rwlock10.c: New file. +++ * tst-rwlock11.c: New file. +++ +++ * Makefile (tests): Add tst-dlsym1. +++ * tst-dlsym1.c: New file. +++ +++ * init.c (__pthread_initialize_minimal_internal): Set +++ GL(dl_error_catch_tsd) to __libc_dl_error_tsd. +++ * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd. +++ +++2003-02-24 Ulrich Drepper +++ +++ * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL. +++ +++ * tst-cond2.c: Fix sychronization with child. +++ +++ * tst-rwlock8.c (reader_thread): Remove unused variable. +++ +++ * Makefile: Add rules to build and run tst-tls3. +++ * tst-tls3.c: New file. +++ * tst-tls3mod.c: New file. +++ +++ * Makefile (tests): Add tst-rwlock8 and tst-rwlock9. +++ * tst-rwlock8.c: New file. +++ * tst-rwlock9.c: New file. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix +++ complete broken rwlock implementation. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: +++ Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S: +++ Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise. +++ * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise. +++ * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise. +++ * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise. +++ * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise. +++ * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise. +++ +++2003-02-23 Roland McGrath +++ +++ * Makefile (nptl-version): Change regexp so case sensitivity is ok. +++ +++2003-02-23 Ulrich Drepper +++ +++ * Makefile (tests): Add tst-context1. +++ * tst-context1.c: New file. +++ +++ * Makefile (tests): Add tst-tls1 and tst-tls2. +++ * tst-tls1.c: New file. +++ * tst-tls2.c: New file. +++ +++ * libc-cancellation.c (__libc_enable_asynccancel): Correct test +++ for failed cmpxchg. +++ +++ * pthread_create.c (start_thread): Set EXITING_BIT early. +++ +++ * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile. +++ (THREAD_GETMEM_NC): Likewise. +++ +++2003-02-22 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave +++ off 3 more bytes by using offset-less instructions when possible. +++ +++ * Makefile: Add dependency for $(objpfx)version.d. +++ +++ * eintr.c (eintr_source): Add unnecessary return but the compiler +++ insists. +++ +++ * tst-kill3.c: Include . +++ +++2003-02-21 Roland McGrath +++ +++ * pthread_create.c (start_thread): Call __libc_thread_freeres. +++ +++2003-02-21 Ulrich Drepper +++ +++ * Makefile (tests): Add tst-eintr1. +++ (distribute): Add eintr.c. +++ * tst-eintr1.c: New file. +++ * eintr.c: New file. +++ +++ * pthread_cancel.c (pthread_cancel): Use tkill directly. +++ +++ * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): +++ Disallow sending SIGCANCEL. +++ +++ * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2, +++ tst-kill3, tst-kill4, tst-kill5, tst-kill6. +++ * tst-kill1.c: New file. +++ * tst-kill2.c: New file. +++ * tst-kill3.c: New file. +++ * tst-kill5.c: New file. +++ * tst-kill6.c: New file. +++ * tst-basic7.c: Renamed to... +++ * tst-kill4.c: ...this. +++ +++2003-02-21 Roland McGrath +++ +++ * Makefile (install-lib-ldscripts): New variable. +++ +++2003-02-21 Ulrich Drepper +++ +++ * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P. +++ * pthread_cancel.c: Use INVALID_TD_P. +++ * pthread_detach.c: Likewise. +++ * pthread_getschedparam.c: Likewise. +++ * pthread_setschedparam.c: Likewise. +++ * sysdeps/pthread/pthread_getcpuclockid.c: Likewise. +++ * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise. +++ * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P. +++ * pthread_timedjoin.c: Likewise. +++ +++ * tst-basic7.c: Include . +++ +++ * pthread_join.c (pthread_join): Limited checking for invalid +++ descriptors. +++ * pthread_timedjoin.c (pthread_timedjoin_np): Likewise. +++ +++2003-02-20 Ulrich Drepper +++ +++ * pthread_create.c (deallocate_tsd): Reset found_nonzero at the +++ beginning of the loop. Clear the entire first block of TSD. +++ * Makefile (tests): Add tst-key4. +++ * tst-key4.c: New file. +++ +++2003-02-18 Ulrich Drepper +++ +++ * Makefile (tests): Add tst-basic7. +++ * tst-basic7.c: New file. +++ +++ * pthread_create.c (deallocate_tsd): Mark as internal_function. +++ Add some more __builtin_expect. +++ +++ * pthreadP.h: Define dummy version of DEBUGGING_P. +++ +++2003-02-17 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove +++ _POSIX_THREAD_PRIORITY_SCHEDULING. +++ * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove +++ _XOPEN_REALTIME_THREADS. +++ * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise. +++ +++ * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The +++ kernel returns EINVAL for PID <= 0, work around it. +++ +++ * Makefile (tests): Add tst-signal5. +++ * tst-signal5.c: New file. +++ +++ * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX +++ and LOGIN_NAME_MAX. +++ +++ * tst-cancel1.c (tf): Block all signals. +++ +++ * Makefile (tests): Add tst-basic6. +++ * tst-basic6.c: New file. +++ +++ * tst-basic1.c: Add test for process ID. +++ +++ * Makefile (tests): Add tst-cancel10. +++ * tst-cancel10.c: New file. +++ +++ * Makefile (tests): Add tst-signal4. +++ * tst-signal4.c: New file. +++ +++ * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use +++ __sigismember instead of sigismember. Add __builtin_expect. +++ +++2003-02-16 Ulrich Drepper +++ +++ * tst-attr1.c (do_test): Add tests for pthread_setcanceltype, +++ pthread_setcancelstate, and pthread_rwlock_setpshared. +++ +++ * tst-cancel7.c (do_test): Make sure the pid file exists before +++ canceling the thread. +++ +++ * tst-rwlock6.c: More pthread_rwlock_timedwrlock and +++ pthread_rwlock_timedrdlock tests. +++ * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: +++ Check for invalid tv_nsec field. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S: +++ Likewise. +++ +++ * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect +++ recursive mutex of overflow. +++ +++ * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared. +++ +++ * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid +++ going into an endless loop. +++ * Makefile (tests): Add tst-cancel9. +++ * tst-cancel9.c: New file. +++ +++ * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill. +++ +++2003-02-15 Ulrich Drepper +++ +++ * tst-mutex5.c (do_test): Add more timedlock tests. +++ +++ * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes. +++ * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes. +++ +++ * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't +++ use INLINE_SYSCALL. Error number is returned, not -1. +++ +++ * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb, +++ and __deallocate_stack with internal_function. +++ * pthread_create.c: Adjust definitions appropriately. +++ * allocatestack.c: Likewise. +++ +++ * pthread_join.c: Add one more __builtin_expect. +++ * pthread_timedjoin.c: Likewise. +++ +++ * pthread_getspecific.c (__pthread_getspecific): Clear data->data +++ not data of sequence number does not match. +++ Add one __builtin_expect. +++ +++ * Makefile (tests): Add tst-clock1. +++ * tst-clock1.c: New file. +++ +++ * pthread_setconcurrency.c (pthread_setconcurrency): Fail for +++ negative arguments. +++ * Makefile (tests): Add tst-basic5. +++ * tst-basic5.c: New file. +++ +++2003-02-14 Ulrich Drepper +++ +++ * Makefile (tests): Add tst-basic4. +++ * tst-basic4.c: New file. +++ +++ * pthreadP.h: Add declaraction for __nptl_nthreads. +++ * pthread_create.c: Define __nptl_nthreads +++ (start_thread): Increment __nptl_nthreads at beginning. Decrement +++ after thread is done. If then zero, call exit(0). +++ * sysdeps/pthread/pthread-functions.h (struct pthread_functions): +++ Add ptr_nthreads. Define HAVE_PTR_NTHREADS. +++ * init.c (pthread_functions): Initialize ptr_nthreads. +++ * allocatestack.c (nptl_nthreads): Remove definition and all uses. +++ (__reclaim_stacks): Decrement __nptl_nthreads. +++ * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c): +++ Define. +++ * Makefile (tests): Add tst-basic3. +++ * tst-basic3.c: New file. +++ +++ * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce +++ after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK. +++ * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval. +++ * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT +++ if asynchronous canceling is enabled. +++ * pthread_join.c (pthread_join): When recognizing circular joins, +++ take into account the other thread might be already canceled. +++ * Makefile (tests): Add tst-join5. +++ * tst-join5.c: New file. +++ +++ * Makefile (tests): Add tst-join4. +++ * tst-join4.c: New file. +++ +++2003-02-13 Ulrich Drepper +++ +++ * tst-cond4.c (main): Add test of pthread_attr_getpshared. +++ +++2003-02-13 Martin Schwidefsky +++ +++ * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, +++ THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF. +++ * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid +++ warning. +++ * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include +++ to avoid warning. +++ * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return +++ error if lll_futex_wake failed. +++ +++2003-02-13 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix +++ handling of cancellation and failung pthread_mutex_unlock call. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise. +++ * Makefile (tests): Add tst-cond8 and tst-cond9. +++ * tst-cond8.c: New file. +++ * tst-cond9.c: New file. +++ +++ * tst-cond7.c (do_test): Unlock the mutex before canceling the thread. +++ +++ * sysdeps/pthread/pthread.h: Add missing initializers. Protect +++ non-standard initializers with __USE_GNU. +++ +++ * Makefile (tests): Add tst-cleanup3. +++ * tst-cleanup3.c: New file. +++ +++2003-02-12 Ulrich Drepper +++ +++ * Makefile (tests): Add tst-attr1 and tst-attr2. +++ * tst-attr1.c: New file. +++ * tst-attr2.c: New file. +++ +++ * Makefile: Add rules to build and run tst-atfork2 test. +++ * tst-atfork2.c: New file. +++ * tst-atfork2mod.c: New file. +++ +++ * sysdeps/unix/sysv/linux/unregister-atfork.c +++ (__unregister_atfork): Free the memory allocated for the handlers +++ after removing them from the lists. +++ +++ * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory +++ cleanup function. +++ +++ * tst-atfork1.c (do_test): Wait for the child we forked. +++ Report error in child. +++ +++ * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment. +++ +++ * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c. +++ +++2003-02-10 Ulrich Drepper +++ +++ * Makefile (tests): Add tst-cancel8. +++ * tst-cancel8.c: New file. +++ +++ * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix +++ clearing of control variable. +++ * Makefile (tests): Add tst-once3 and tst-once4. +++ * tst-once3.c: New file. +++ * tst-once4.c: New file. +++ +++2003-02-08 kaz Kojima +++ +++ * sysdeps/sh/Makefile: New file. +++ * sysdeps/sh/bits/atomic.h: New file. +++ * sysdeps/sh/pthread_spin_init.c: New file. +++ * sysdeps/sh/pthread_spin_lock.c: New file. +++ * sysdeps/sh/pthread_spin_trylock.S: New file. +++ * sysdeps/sh/pthread_spin_unlock.S: New file. +++ * sysdeps/sh/pthreaddef.h: New file. +++ * sysdeps/sh/tcb-offsets.sym: New file. +++ * sysdeps/sh/td_ta_map_lwp2thr.c: New file. +++ * sysdeps/sh/tls.h: New file. +++ * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file. +++ * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file. +++ * sysdeps/unix/sysv/linux/sh/createthread.c: New file. +++ * sysdeps/unix/sysv/linux/sh/fork.c: New file. +++ * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file. +++ * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file. +++ * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file. +++ * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file. +++ * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file. +++ * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file. +++ * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file. +++ * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file. +++ * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file. +++ * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file. +++ * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file. +++ * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file. +++ * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file. +++ * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file. +++ * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file. +++ * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file. +++ * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file. +++ * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file. +++ * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file. +++ * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file. +++ * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file. +++ * sysdeps/unix/sysv/linux/sh/sem_post.S: New file. +++ * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file. +++ * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file. +++ * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file. +++ * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file. +++ +++2003-02-08 Ulrich Drepper +++ +++ * tst-cond2.c: Rearrange code to not rely on behavior undefined +++ according to POSIX. +++ +++ * tst-basic2.c (do_test): Lock mutex before creating the thread. +++ +++2003-02-07 Ulrich Drepper +++ +++ * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86. +++ (TLS_GET_FS): New #define. +++ (TLS_SET_FS): New #define. +++ Correct value of __NR_set_thread_area. +++ +++ * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file. +++ +++2003-02-06 Ulrich Drepper +++ +++ * Makefile (tests): Add tst-popen1. +++ * tst-popen1.c: New file. +++ +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong +++ but inactive generalization. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise. +++ Minor optimization, remove one instruction. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise. +++ +++2003-02-04 Martin Schwidefsky +++ +++ * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters. +++ +++2003-01-31 Martin Schwidefsky +++ +++ * init.c (__NR_set_tid_address): Add #ifdef for s390. +++ * sysdeps/pthread/pthread_barrier_wait.c: New file. +++ * sysdeps/pthread/pthread_cond_broadcast.c: New file. +++ * sysdeps/pthread/pthread_cond_signal.c: New file. +++ * sysdeps/pthread/pthread_cond_timedwait.c: New file. +++ * sysdeps/pthread/pthread_cond_wait.c: New file. +++ * sysdeps/pthread/pthread_rwlock_rdlock.c: New file. +++ * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file. +++ * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file. +++ * sysdeps/pthread/pthread_rwlock_unlock.c: New file. +++ * sysdeps/pthread/pthread_rwlock_wrlock.c: New file. +++ * sysdeps/s390/Makefile: New file. +++ * sysdeps/s390/bits/atomic.h: New file. +++ * sysdeps/s390/pthread_spin_init.c: New file. +++ * sysdeps/s390/pthread_spin_lock.c: New file. +++ * sysdeps/s390/pthread_spin_trylock.c: New file. +++ * sysdeps/s390/pthread_spin_unlock.c: New file. +++ * sysdeps/s390/pthreaddef.h: New file. +++ * sysdeps/s390/tcb-offsets.sym: New file. +++ * sysdeps/s390/td_ta_map_lwp2thr.c: New file. +++ * sysdeps/s390/tls.h: New file. +++ * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file. +++ * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file. +++ * sysdeps/unix/sysv/linux/s390/createthread.c: New file. +++ * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file. +++ * sysdeps/unix/sysv/linux/s390/fork.c: New file. +++ * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file. +++ * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file. +++ * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file. +++ * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file. +++ * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file. +++ * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file. +++ * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file. +++ * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file. +++ * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file. +++ * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file. +++ * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file. +++ * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file. +++ * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file. +++ * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file. +++ * sysdeps/unix/sysv/linux/s390/sem_post.c: New file. +++ * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file. +++ * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file. +++ * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file. +++ +++2003-02-04 Ulrich Drepper +++ +++ * atomic.h: Add a couple more default implementations. +++ (atomic_compare_and_exchange_acq): Use +++ __arch_compare_and_exchange_32_acq in return value definition. It +++ always exists. +++ (atomic_bit_set): Renamed from atomic_set_bit. +++ Add missing atomic_ prefixes. +++ +++ * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no +++ thread library is available, use correct value to mark initialized +++ once variable. +++ +++2003-02-03 Ulrich Drepper +++ +++ * allocatestack.c (allocate_stack): Use __getpagesize instead of +++ __sysconf to determine pagesize. +++ +++ * pthread_create.c: Include . +++ * allocatestack.c (allocate_stack): Implement coloring of the +++ allocated stack memory. Rename pagesize to pagesize_m1. It's the +++ size minus one. Adjust users. +++ * sysdeps/i386/i686/Makefile: New file. +++ +++2003-02-02 Ulrich Drepper +++ +++ * allocatestack.c: Improve comment throughout the file. +++ +++ * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S +++ (__lll_lock_wait): Add branch prediction. +++ * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S +++ (__lll_lock_wait): Likewise. +++ (lll_unlock_wake_cb): Removed. +++ +++2003-01-31 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove +++ _POSIX_THREAD_PRIORITY_SCHEDULING. +++ +++2003-01-30 Jakub Jelinek +++ +++ * sysdeps/pthread/pthread-functions.h (struct pthread_functions): +++ Fix return type of ptr___pthread_getspecific. +++ +++2003-01-29 Ulrich Drepper +++ +++ * Makefile (tests): Add tst-umask1. +++ (tst-umask1-ARGS): Define. +++ * tst-umask1.c: New file. +++ +++2003-01-28 Ulrich Drepper +++ +++ * Makefile (libpthread-routines): Remove lowlevelrwlock. Add +++ pthread_rwlock_rdlock, pthread_rwlock_timedrdlock, +++ pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and +++ pthread_rwlock_unlock. +++ * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed +++ * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed +++ * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: +++ New file. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S: +++ New file. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file. +++ * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file. +++ * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S: +++ New file. +++ * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file. +++ * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S: +++ New file. +++ * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file. +++ * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file. +++ * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S: +++ New file. +++ * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file. +++ * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S: +++ New file. +++ * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file. +++ +++ * Makefile (libpthread-routines): Remove lowlevelcond and +++ lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post, +++ pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal, +++ and pthread_cond_broadcast. +++ * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed +++ * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed +++ * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed +++ * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed +++ * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed +++ * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed +++ * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file. +++ * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file. +++ * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file. +++ * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file. +++ * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file. +++ * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file. +++ * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file. +++ * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file. +++ * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file. +++ * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file. +++ * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file. +++ * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file. +++ * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file. +++ * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file. +++ * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file. +++ * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file. +++ * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file. +++ * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file. +++ * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file. +++ * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file. +++ * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file. +++ +++ * sysdeps/unix/sysv/linux/i386/createthread.c: Define +++ PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest +++ of the code is moved to ... +++ * sysdeps/pthread/createthread.c: ...here. New file. +++ +++2003-01-27 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S +++ (__new_sem_post): Clear %eax before returning. +++ Reported by MAEDA Naoaki . +++ +++ * Makefile (tests): Add tst-cleanup2. +++ * tst-cleanup2.c: New file. +++ +++ * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start): +++ Interpret first parameter correctly. +++ +++2003-01-17 Ulrich Drepper +++ +++ * Makefile (headers): Add bits/semaphore.h. +++ +++2003-01-16 Jakub Jelinek +++ +++ * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even +++ if not SHARED. +++ +++2003-01-14 Ulrich Drepper +++ +++ * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore +++ must be used and mapping failed. +++ Reported by Luke Elliott . +++ +++ * Makefile (CFLAGS-pthread_self.os): Define this, not +++ CFLAGS-pthread_self.c. +++ +++2003-01-13 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export +++ lll_unlock_wake_cb. +++ +++ * Makefile (libpthread-routines): Add version. Add rules to build +++ version.os and banner.h. +++ * version.c: New file. +++ +++2003-01-13 Jakub Jelinek +++ +++ * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make +++ the alias unconditional. +++ * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise. +++ +++2003-01-13 Ulrich Drepper +++ +++ * Makefile (CFLAGS-pthread_self.c): New definition. +++ +++2003-01-06 Jakub Jelinek +++ +++ * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add +++ INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros. +++ * sysdeps/unix/sysv/linux/raise.c (raise): Likewise. +++ * init.c (__pthread_initialize_minimal_internal): Likewise. +++ +++2003-01-07 Jakub Jelinek +++ +++ * pthreadP.h (__pthread_cond_timedwait): Add prototype. +++ +++ * sysdeps/unix/sysv/linux/i386/dl-sysdep.h +++ (RTLD_CORRECT_DYNAMIC_WEAK): Remove. +++ (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back. +++ * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h +++ (RTLD_CORRECT_DYNAMIC_WEAK): Remove. +++ (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back. +++ +++2003-01-06 Jakub Jelinek +++ +++ * pthreadP.h (LIBC_CANCEL_HANDLED): Define. +++ * pt-system.c (LIBC_CANCEL_HANDLED): Add. +++ * tst-cancel-wrappers.sh: Remove all exceptions. +++ +++2003-01-05 Ulrich Drepper +++ +++ * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk +++ features. Reported by Marijn Ros . +++ +++ * sysdeps/unix/sysv/linux/jmp-unwind.c: Include . +++ Use __libc_pthread_functions array if SHARED. +++ +++ * pthreadP.h: Move pthread_cond_2_0_t definition to... +++ * sysdeps/unix/sysv/linux/internaltypes.h: ...here. +++ +++ * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define. +++ (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock, +++ __libc_key_create, __libc_getspecific, __libc_setspecific): Use +++ __libc_ptf_call instead of __libc_maybe_call. +++ (PTF): New #define. +++ (__libc_cleanup_region_start): Wrap function name with PTF call. +++ (__libc_cleanup_region_end): Likewise. +++ (__libc_cleanup_end): Likewise. +++ +++ * pthread_getspecific.c: Add __pthread_getspecific_internal alias. +++ * pthread_setspecific.c: Add __pthread_setspecific_internal alias. +++ * pthread_key_create.c: Add __pthread_key_create_internal alias. +++ * pthreadP.h: Add prototypes. +++ +++ * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add +++ __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and +++ __pthread_rwlock_unlock aliases. +++ * pthreadP.h: Add prototypes for new aliases. +++ +++ * pthreadP.h (struct pthead_functions): Moved to... +++ * sysdeps/pthread/pthread-functions.h: ...here. New file. +++ * init.c (pthread_functions): Add initializers for new elements. +++ +++ * cleanup_defer.c: Add __pthread_cleanup_push_defer and +++ __pthread_cleanup_pop_restore aliases. +++ * pthreadP.h: Add prototypes. +++ +++ * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push +++ and _GI_pthread_cleanup_pop to __pthread_cleanup_pop. +++ * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller. +++ * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise. +++ * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise. +++ * pthreadP.h: Adjust prototypes and callers. +++ +++2003-01-04 Ulrich Drepper +++ +++ * Makefile (tests): Add tst-cancel7. +++ (tst-cancel7-ARGS): New variable. +++ * tst-cancel7.c: New file. +++ +++ * old_pthread_cond_broadcast.c: Optimize initialization a bit to work +++ around gcc defficiencies. +++ * old_pthread_cond_signal.c: Likewise. +++ * old_pthread_cond_timedwait.c: Likewise. +++ * old_pthread_cond_wait.c: Likewise. +++ +++ * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element. +++ +++2003-01-03 Ulrich Drepper +++ +++ * Makefile (tests): Add tst-cond7. +++ * tst-cond7.c: New file. +++ +++ * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S +++ (condvar_cleanup): Get condvar address from the right place. +++ +++ * atomic.h: Correct definitions of atomic_full_barrier, +++ atomic_read_barrier, atomic_write_barrier. +++ +++ * old_pthread_cond_broadcast.c: Make memory allocate and initialization +++ race-free. +++ * old_pthread_cond_signal.c: Likewise. +++ * old_pthread_cond_timedwait.c: Likewise. +++ * old_pthread_cond_wait.c: Likewise. +++ +++2003-01-03 Jakub Jelinek +++ +++ * Makefile ($(objpfx)libpthread.so): Depend on ld.so. +++ +++2003-01-03 Ulrich Drepper +++ +++ * pthreadP.h (pthread_cond_2_0_t): New type. +++ (struct pthread_functions): Use new type for 2.0 condvar callbacks. +++ Use new type for the 2.0 condvar function prototypes. +++ * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions. +++ * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar +++ parameter. +++ * old_pthread_cond_destroy.c: Likewise. +++ * old_pthread_cond_broadcast.c: Likewise. Lock appropriately. +++ * old_pthread_cond_signal.c: Likewise. +++ * old_pthread_cond_timedwait.c: Likewise. +++ * old_pthread_cond_wait.c: Likewise. +++ +++ * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S +++ (__pthread_cond_wait): Don't save cancellation mode and seq value +++ in same location. +++ +++ * herrno.c (__h_errno_location): Don't define as weak. +++ +++2003-01-02 Jakub Jelinek +++ +++ * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast, +++ pthread_cond_destroy, pthread_cond_init, pthread_cond_signal +++ and pthread_cond_wait. +++ * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast): +++ Renamed to... +++ (__pthread_cond_broadcast_2_0): ... this. +++ * old_pthread_cond_destroy.c (__old_pthread_cond_destroy): +++ Renamed to... +++ (__pthread_cond_destroy_2_0): ... this. +++ * old_pthread_cond_init.c (__old_pthread_cond_init): +++ Renamed to... +++ (__pthread_cond_init_2_0): ... this. +++ * old_pthread_cond_signal.c (__old_pthread_cond_signal): +++ Renamed to... +++ (__pthread_cond_signal_2_0): ... this. +++ * old_pthread_cond_wait.c (__old_pthread_cond_wait): +++ Renamed to... +++ (__pthread_cond_wait_2_0): ... this. +++ * pthread_cond_destroy.c: Include shlib-compat.h. +++ (pthread_cond_destroy): Change strong_alias into versioned_symbol. +++ * pthread_cond_init.c: Include shlib-compat.h. +++ (pthread_cond_init): Change strong_alias into versioned_symbol. +++ * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_* +++ fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0 +++ fields. +++ (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0, +++ __pthread_cond_init_2_0, __pthread_cond_signal_2_0, +++ __pthread_cond_wait_2_0): New prototypes. +++ (__old_pthread_cond_broadcast, __old_pthread_cond_destroy, +++ __old_pthread_cond_init, __old_pthread_cond_signal, +++ __old_pthread_cond_wait): Removed. +++ * init.c: Include shlib-compat.h. +++ (pthread_functions): Guard ptr___pthread_attr_init_2_0 +++ initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1). +++ Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize +++ ptr___pthread_cond_*_2_0 fields. +++ * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and +++ pthread_cond_*@GLIBC_2.0 compatibility symbols. +++ +++ * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if +++ LIBC_SIGACTION was not yet defined. +++ [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self. +++ [!defined LIBC_SIGACTION] (__sigaction): New function and +++ libc_hidden_weak. +++ [!defined LIBC_SIGACTION] (sigaction): New weak_alias. +++ [defined LIBC_SIGACTION]: #include_next . +++ +++2003-01-02 Jakub Jelinek +++ +++ * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc. +++ +++2003-01-02 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t): +++ New, larger type definition. +++ * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar +++ implementation. +++ * Versions [libpthread]: Add definitions for new pthread_cond_* +++ interfaces for version GLIBC_2.3.2. +++ * pthread_cond_init.c: Update initialization for new type definition. +++ * Makefile (libpthread-routines): Remove pthread_cond_wait, +++ pthread_cond_timedwait, pthread_cond_signal, and +++ pthread_cond_broadcast. Add old_pthread_cond_init, +++ old_pthread_cond_destroy, old_pthread_cond_wait, +++ old_pthread_cond_timedwait, old_pthread_cond_signal, and +++ old_pthread_cond_broadcast. +++ * old_pthread_cond_broadcast.c: New file. +++ * old_pthread_cond_destroy.c: New file. +++ * old_pthread_cond_init.c: New file. +++ * old_pthread_cond_signal.c: New file. +++ * old_pthread_cond_timedwait.c: New file. +++ * old_pthread_cond_wait.c: New file. +++ * pthreadP.h: Add prototypes for the compatibility interfaces. +++ +++ * pthread_cond_destroy.c: Don't include . +++ +++2003-01-01 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid +++ unnecessary zero offset when addressing MUTEX. +++ +++2002-12-31 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for +++ __register_atfork. +++ * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def +++ for __register_atfork. +++ +++2002-12-31 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__ +++ instead of ASSEMBLER test macro. +++ +++ * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin, +++ __libc_current_sigrtmax): Add libc_hidden_def. +++ +++ * sysdeps/pthread/list.h: Remove assert.h include. +++ +++2002-12-31 Ulrich Drepper +++ +++ * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use +++ __pthread_initialize_minimal_internal not +++ __pthread_initialize_minimal. +++ +++2002-12-30 Ulrich Drepper +++ +++ * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark +++ __pthread_initialize_minimal as hidden. +++ +++ * init.c (__pthread_initialize_minimal_internal): Don't mark as +++ constructor. +++ +++2002-12-31 Jakub Jelinek +++ +++ * Makefile ($(inst_libdir)/libpthread.so): Depend on +++ $(common-objpfx)format.lds, include that into the output script. +++ Fix comment. +++ (extra-B-pthread.so): Change linuxthreads/ into nptl/. +++ +++2002-12-28 Andreas Jaeger +++ +++ * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for +++ nsec resolution changes. +++ (xstat64_conv): Likewise. +++ (xstat32_conv): Likewise. +++ * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for +++ struct kernel_stat. +++ * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for +++ structs stat and stat64. +++ * time/time.h (__timespec_defined): Define for __USE_MISC. +++ * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat. +++ +++2002-12-30 Jakub Jelinek +++ +++ * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export +++ argument. +++ (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro. +++ (pthread_exit): Use strong_alias to avoid warnings. +++ * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit +++ and ptr_pthread_attr_init_2_* to ptr___pthread_exit and +++ ptr___pthread_attr_init_2_*. +++ * init.c (pthread_functions): Adjust. +++ +++2002-12-29 Ulrich Drepper +++ +++ * forward.c: Make all functions available by default again. It +++ caused too much trouble. +++ +++ * pt-siglongjmp.c: Removed. +++ +++2002-12-28 Jakub Jelinek +++ +++ * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler. +++ (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove. +++ * sysdeps/i386/Makefile: New file. +++ * sysdeps/i386/tcb-offsets.sym: New file. +++ * sysdeps/pthread/tcb-offsets.h: New file. +++ * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init): +++ Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks. +++ +++ * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move +++ __register_atfork... +++ (GLIBC_2.3.2): ...here. +++ +++2002-12-28 Ulrich Drepper +++ +++ * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and +++ pthread_attr_setstackaddr with __attribute_deprecated__. +++ +++2002-12-27 Jakub Jelinek +++ +++ * pt-system.c (system): Remove cancellation handling. +++ * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the +++ cancellation routines. +++ +++2002-12-28 Ulrich Drepper +++ +++ * descr.h: Include . +++ (struct pthread): Move header.data.list to the back of the struct. +++ * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct. +++ (MULTIPLE_THREADS_OFFSET): Adjust offset. +++ (SYSINFO_OFFSEET): Likewise. +++ +++2002-12-27 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO): +++ Define. +++ (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings. +++ * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO, +++ DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define. +++ (USE_DL_SYSINFO): Undef. +++ +++2002-12-22 Jakub Jelinek +++ +++ * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of +++ $(common-objpfx)libc.so. +++ * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that +++ it is bigger than pipe buffer size even on arches with bigger +++ page size. +++ (tf_usleep): Cast usleep argument to useconds_t to avoid warnings. +++ +++2002-12-25 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement +++ correct errno access for case that USE___THREAD is not defined. +++ +++2002-12-24 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif. +++ Patch by Marijn Ros . +++ +++2002-12-22 Roland McGrath +++ +++ * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%). +++ +++2002-12-20 Ulrich Drepper +++ +++ * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define. +++ +++2002-12-19 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define +++ NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode. +++ * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file. +++ +++ * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead +++ of int $0x80. +++ * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise. +++ * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise. +++ +++ * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using +++ sysenter. +++ * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise. +++ +++ * sysdeps/i386/tls.h: Unconditionally include . +++ +++ * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo +++ in new TCB. +++ * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check +++ that sysinfo is properly initialized. +++ * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO +++ to 1 only for ld.so. +++ +++ * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define +++ RTLD_CORRECT_DYNAMIC_WEAK. +++ +++2002-12-19 Jakub Jelinek +++ +++ * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1): +++ Use return 0 as 6th argument to FORWARD4. +++ * pthread_equal.c: Include pthreadP.h instead of pthread.h. +++ +++2002-12-18 Ulrich Drepper +++ +++ * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member. +++ * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member. +++ Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined. +++ (INIT_SYSINFO): New #define. +++ (TLS_TP_INIT): Use INIT_SYSINFO. +++ * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init): +++ At test to make sure SYSINFO_OFFSET value is correct. +++ * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file. +++ +++2002-12-18 Jakub Jelinek +++ +++ * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias. +++ * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise. +++ * Versions [libc: GLIBC_2.0]: Add pthread_attr_init. +++ [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init, +++ __pthread_rwlock_destroy, __pthread_rwlock_rdlock, +++ __pthread_rwlock_wrlock, __pthread_rwlock_unlock, +++ __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock. +++ +++2002-12-18 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL +++ macro instead of using int $0x80 directly. +++ +++ * sysdeps/pthread/bits/stdio-lock.h: New file. +++ * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file. +++ * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file. +++ * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file. +++ * Makefile (routines): Add libc-lowlevelmutex. +++ +++ * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove +++ __i686.get_pc_thunk.dx. +++ +++2002-12-17 Jakub Jelinek +++ +++ * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig. +++ (tests): Depend on $(objpfx)tst-cancel-wrappers.out. +++ ($(objpfx)tst-cancel-wrappers.out): New rule. +++ * tst-cancel-wrappers.sh: New test. +++ * tst-locale1.c: Include signal.h. +++ (uselocale): Test static linking of __libc_current_sigrt*. +++ +++2002-12-17 Ulrich Drepper +++ +++ * Makefile (tests): Add tst-cancel6. +++ * tst-cancel6.c: New file +++ +++2002-12-17 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P): +++ Define meaningfully for assembler as well. +++ * pthreadP.h (struct pthread_functions): Remove +++ ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0 +++ and ptr_pthread_attr_init_2_1 fields. +++ * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0 +++ and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init. +++ * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument. +++ (FORWARD3): Define using FORWARD4. +++ (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1 +++ versions. +++ * pt-system.c: Remove duplicate stdlib.h include. +++ +++2002-12-16 Ulrich Drepper +++ +++ * sem_init.c: Define sem_init@GLIBC_2.0. +++ * sem_destroy.c: Define sem_destroy@GLIBC_2.0. +++ * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0. +++ +++ * flockfile.c: Moved to... +++ * sysdeps/pthread/flockfile.c: ...here. New file. +++ * funlockfile.c: Moved to... +++ * sysdeps/pthread/funlockfile.c: ...here. New file. +++ * ftrylockfile.c: Moved to... +++ * sysdeps/pthread/ftrylockfile.c: ...here. New file. +++ +++2002-12-16 Jakub Jelinek +++ +++ * libc-cancellation.c: Guard both function with +++ #if !defined NOT_IN_libc. +++ * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the +++ automatically provided pthread wrappers. +++ * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to +++ CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc +++ nor in libpthread. +++ * pt-open.c: Removed. +++ * pt-fcntl.c: Removed. +++ * pt-fsync.c: Removed. +++ * pt-lseek.c: Removed. +++ * pt-msgrcv.c: Removed. +++ * pt-msgsnd.c: Removed. +++ * pt-msync.c: Removed. +++ * pt-nanosleep.c: Removed. +++ * pt-open64.c: Removed. +++ * pt-pause.c: Removed. +++ * pt-pread.c: Removed. +++ * pt-pread64.c: Removed. +++ * pt-pwrite.c: Removed. +++ * pt-pwrite64.c: Removed. +++ * pt-read.c: Removed. +++ * pt-recv.c: Removed. +++ * pt-recvfrom.c: Removed. +++ * pt-recvmsg.c: Removed. +++ * pt-send.c: Removed. +++ * pt-sendto.c: Removed. +++ * pt-sigtimedwait.c: Removed. +++ * pt-sigwait.c: Removed. +++ * pt-wait.c: Removed. +++ * pt-waitpid.c: Removed. +++ * pt-write.c: Removed. +++ * pt-accept.c: Removed. +++ * pt-close.c: Removed. +++ * pt-connect.c: Removed. +++ * pt-lseek64.c: Removed. +++ * pt-sendmsg.c: Removed. +++ * pt-tcdrain.c: Removed. +++ +++2002-12-15 Ulrich Drepper +++ +++ * init.c (__pthread_initialize_minimal_internal): Renamed from +++ __pthread_initialize_minimal. Make old name an alias. This +++ converts a normal relocation into a relative relocation. +++ +++ * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl. +++ +++ * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect, +++ readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev. +++ * Makefile (libpthread-routines): Remove pt-creat, pt-poll, +++ pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend, +++ pt-sigwaitinfo, pt-waitid, and pt-writev. +++ * pt-creat.c: Removed. +++ * pt-poll.c: Removed. +++ * pt-pselect.c: Removed. +++ * pt-readv.c: Removed. +++ * pt-select.c: Removed. +++ * pt-sigpause.c: Removed. +++ * pt-sigsuspend.c: Removed. +++ * pt-sigwaitinfo.c: Removed. +++ * pt-waitid.c: Removed. +++ * pt-writev.c: Removed. +++ +++ * init.c (pthread_functions): New variable. +++ (__pthread_initialize_minimal): Pass pointer to pthread_functions +++ (or NULL) to __libc_pthread_init. +++ * forward.c: Rewrite to use __libc:pthread_functions array to get +++ function addresses. +++ * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init +++ prototype. +++ * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init): +++ Take new parameter. Copy content of variable pointed to by it +++ to __libc_pthread_init. +++ +++ * pthreadP.h (struct pthread_functions): New type. +++ (__libc_pthread_init): Declare. +++ +++ * pthread_attr_destroy.c: Add namespace protected alias. +++ * pthread_attr_getdetachstate.c: Likewise. +++ * pthread_attr_getinheritsched.c: Likewise. +++ * pthread_attr_getschedparam.c: Likewise. +++ * pthread_attr_getschedpolicy.c: Likewise. +++ * pthread_attr_getscope.c: Likewise. +++ * pthread_attr_setdetachstate.c: Likewise. +++ * pthread_attr_setinheritsched.c: Likewise. +++ * pthread_attr_setschedparam.c: Likewise. +++ * pthread_attr_setschedpolicy.c: Likewise. +++ * pthread_attr_setscope.c: Likewise. +++ * pthread_cond_broadcast.c: Likewise. +++ * pthread_cond_destroy.c: Likewise. +++ * pthread_cond_init.c: Likewise. +++ * pthread_cond_signal.c: Likewise. +++ * pthread_cond_wait.c: Likewise. +++ * pthread_condattr_destroy.c: Likewise. +++ * pthread_condattr_init.c: Likewise. +++ * pthread_equal.c: Likewise. +++ * pthread_exit.c: Likewise. +++ * pthread_getschedparam.c: Likewise. +++ * pthread_self.c: Likewise. +++ * pthread_setcancelstate.c: Likewise. +++ * pthread_setschedparam.c: Likewise. +++ * pthread_mutex_destroy.c: Likewise. +++ * pthread_mutex_init.c: Likewise. +++ * pthreadP.h: Add prototypes for the aliases. +++ +++ * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set +++ multiple_threads member in correct TCB to 1. +++ +++ * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define +++ SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread +++ member of thread decriptor, otherwise return unconditionally 1. +++ +++2002-12-14 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the +++ regular Linux version. Remove file. +++ * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file. +++ * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file. +++ * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file. +++ * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file. +++ * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file. +++ * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file. +++ * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file. +++ * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file. +++ * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file. +++ * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file. +++ * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file. +++ * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file. +++ * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file. +++ * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file. +++ * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file. +++ * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file. +++ * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file. +++ * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file. +++ * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file. +++ * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file. +++ * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file. +++ * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file. +++ * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file. +++ * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file. +++ * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file. +++ * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file. +++ * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file. +++ * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file. +++ * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file. +++ * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file. +++ +++2002-12-14 Jakub Jelinek +++ +++ * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file. +++ * sysdeps/unix/sysv/linux/open.c: Removed. +++ * sysdeps/unix/sysv/linux/fsync.c: Removed. +++ * sysdeps/unix/sysv/linux/lseek.c: Removed. +++ * sysdeps/unix/sysv/linux/msync.c: Removed. +++ * sysdeps/unix/sysv/linux/read.c: Removed. +++ * sysdeps/unix/sysv/linux/close.c: Removed. +++ * sysdeps/unix/sysv/linux/creat.c: Removed. +++ * sysdeps/unix/sysv/linux/nanosleep.c: Removed. +++ * sysdeps/unix/sysv/linux/pause.c: Removed. +++ * sysdeps/unix/sysv/linux/select.c: Removed. +++ * sysdeps/unix/sysv/linux/write.c: Removed. +++ +++2002-12-14 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads +++ element in TCB to see whether locking is needed. +++ +++ * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that +++ MULTIPLE_THREADS_OFFSET value is correct. +++ +++ * sysdeps/unix/sysv/linux/close.c: New file. +++ * sysdeps/unix/sysv/linux/connect.S: New file. +++ * sysdeps/unix/sysv/linux/creat.c: New file. +++ * sysdeps/unix/sysv/linux/fsync.c: New file. +++ * sysdeps/unix/sysv/linux/llseek.c: New file. +++ * sysdeps/unix/sysv/linux/lseek.c: New file. +++ * sysdeps/unix/sysv/linux/msgrcv.c: New file. +++ * sysdeps/unix/sysv/linux/msgsnd.c: New file. +++ * sysdeps/unix/sysv/linux/msync.c: New file. +++ * sysdeps/unix/sysv/linux/nanosleep.c: New file. +++ * sysdeps/unix/sysv/linux/open.c: New file. +++ * sysdeps/unix/sysv/linux/open64.c: New file. +++ * sysdeps/unix/sysv/linux/pause.c: New file. +++ * sysdeps/unix/sysv/linux/poll.c: New file. +++ * sysdeps/unix/sysv/linux/pread.c: New file. +++ * sysdeps/unix/sysv/linux/pread64.c: New file. +++ * sysdeps/unix/sysv/linux/pselect.c: New file. +++ * sysdeps/unix/sysv/linux/pwrite.c: New file. +++ * sysdeps/unix/sysv/linux/pwrite64.c: New file. +++ * sysdeps/unix/sysv/linux/readv.c: New file. +++ * sysdeps/unix/sysv/linux/recv.S: New file. +++ * sysdeps/unix/sysv/linux/recvfrom.S: New file. +++ * sysdeps/unix/sysv/linux/recvmsg.S: New file. +++ * sysdeps/unix/sysv/linux/select.c: New file. +++ * sysdeps/unix/sysv/linux/send.S: New file. +++ * sysdeps/unix/sysv/linux/sendmsg.S: New file. +++ * sysdeps/unix/sysv/linux/sendto.S: New file. +++ * sysdeps/unix/sysv/linux/sigpause.c: New file. +++ * sysdeps/unix/sysv/linux/sigsuspend.c: New file. +++ * sysdeps/unix/sysv/linux/sigtimedwait.c: New file. +++ * sysdeps/unix/sysv/linux/sigwait.c: New file. +++ * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file. +++ * sysdeps/unix/sysv/linux/system.c: New file. +++ * sysdeps/unix/sysv/linux/tcdrain.c: New file. +++ * sysdeps/unix/sysv/linux/wait.c: New file. +++ * sysdeps/unix/sysv/linux/waitid.c: New file. +++ * sysdeps/unix/sysv/linux/waitpid.c: New file. +++ * sysdeps/unix/sysv/linux/writev.c: New file. +++ * sysdeps/unix/sysv/linux/i386/fcntl.c: New file. +++ +++ * pt-readv.c: Fix comment. +++ +++2002-12-14 Jakub Jelinek +++ +++ * tst-cleanup1.c: Include stdlib.h. +++ +++ * tst-cancel5.c: New test. +++ * Makefile (tests): Add tst-cancel5. +++ (tst-cancel5): Link against libc.so libpthread.so in that order. +++ +++2002-12-13 Ulrich Drepper +++ +++ * forward.c (test_loaded): Prevent recursive calls. +++ +++ * Makefile (routines): Add libc-cancellation. +++ * libc-cancellation.c: New file. +++ * descr.h (struct pthread): Add multiple_threads field. +++ * allocatestack.c (allocate_stack): Initialize multiple_header field of +++ new thread descriptor to 1. +++ * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): +++ Initialize multiple_thread field after successful thread creation. +++ * cancellation.c (__do_cancel): Move to pthreadP.h. +++ (__pthread_enable_asynccancel): Remove parameter from __do_cancel call. +++ (__pthread_disable_asynccancel): Add internal_function attribute. +++ * init.c (sigcancel_handler): Remove parameter from __do_cancel call. +++ * pthread_setcancelstate.c: Likewise. +++ * pthread_setcanceltype.c: Likewise. +++ * pthread_exit.c: Likewise. +++ * pthreadP.h (CANCELLATION_P): Likewise. +++ (__do_cancel): Define as static inline. +++ (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines. +++ (__libc_enable_asynccancel, __libc_disable_asynccancel): New +++ declarations. +++ * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads +++ fields. Define MULTIPLE_THREADS_OFFSET. +++ * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed +++ declaration. +++ * sysdeps/unix/sysv/linux/accept.S: New file. +++ * sysdeps/unix/sysv/linux/read.c: New file. +++ * sysdeps/unix/sysv/linux/write.c: New file. +++ * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file. +++ * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and +++ initialization of __libc_locking_needed. +++ * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use +++ __libc_locking_needed, use multiple_threads field in TCB. +++ * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise. +++ +++2002-12-12 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486 +++ version. +++ * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise. +++ +++ * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct +++ access to __libc_locking_needed for PIC. +++ +++2002-12-12 Jakub Jelinek +++ +++ * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only +++ declare for libc.so. +++ (__libc_lock_init, __libc_lock_init_recursive): Change into comma +++ expression. +++ (__libc_lock_lock): Put into statement expression. +++ (__libc_lock_unlock): Remove trailing semicolon. +++ * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo. +++ +++2002-12-12 Roland McGrath +++ +++ * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with +++ "m" constraint to refer to __libc_locking_needed. Declare it here. +++ +++2002-12-12 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to... +++ * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this. +++ Initialize __libc_locking_needed. +++ * init.c (__pthread_initialize_minimal): Call __libc_pthread_init +++ instead of __register_pthread_fork_handler. +++ * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed. +++ * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace +++ fork-gen with libc_pthread_init. +++ * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead +++ of __register_pthread_fork_handler. +++ * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead +++ of __register_pthread_fork_handler. +++ * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use +++ __libc_locking_needed to determine whether lock prefix can be avoided. +++ * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise. +++ +++2002-12-11 Ulrich Drepper +++ +++ * Makefile (tests): Add tst-cleanup1. +++ * tst-cleanup1.c: New file. +++ * cancellation.c (__cleanup_thread): Removed. +++ (__do_cancel): Remove call to __cleanup_thread. +++ * pthreadP.h: Remove __cleanup_thread prorotype. +++ +++ * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start): +++ Remember function and argument even if cancellation handler +++ function is not available. +++ (__libc_cleanup_region_end): Execute registered function directly if +++ pthread functions are not available. +++ (__libc_cleanup_end): Likewise. +++ +++ * init.c (__pthread_initialize_minimal): Fix initialization in +++ static lib by preventing gcc from being too clever. +++ +++2002-12-10 Ulrich Drepper +++ +++ * init.c (__pthread_initialize_minimal): Remove unneccesary +++ sigaddset call. +++ +++ * Makefile (tests): We can run tst-locale2 now. +++ +++2002-12-09 Ulrich Drepper +++ +++ * Versions: Remove duplicated sigwait entry. +++ +++2002-12-08 Ulrich Drepper +++ +++ * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only +++ inside libpthread. +++ +++ * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning. +++ +++ * pthreadP.h: Declare __pthread_enable_asynccancel and +++ __pthread_disable_asynccancel. +++ (CANCEL_ASYNC): Use __pthread_enable_asynccancel. +++ (CANCEL_RESET): Use __pthread_disable_asynccancel. +++ * cancellation.c (__pthread_enable_asynccancel): New function. +++ (__pthread_disable_asynccancel): New function. +++ * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change. +++ * pt-close.c: Likewise. +++ * pt-connect.c: Likewise. +++ * pt-creat.c: Likewise. +++ * pt-fcntl.c: Likewise. +++ * pt-fsync.c: Likewise. +++ * pt-lseek.c: Likewise. +++ * pt-lseek64.c: Likewise. +++ * pt-msgrcv.c: Likewise. +++ * pt-msgsnd.c: Likewise. +++ * pt-msync.c: Likewise. +++ * pt-nanosleep.c: Likewise. +++ * pt-open.c: Likewise. +++ * pt-open64.c: Likewise. +++ * pt-pause.c: Likewise. +++ * pt-poll.c: Likewise. +++ * pt-pread.c: Likewise. +++ * pt-pread64.c: Likewise. +++ * pt-pselect.c: Likewise. +++ * pt-pwrite.c: Likewise. +++ * pt-pwrite64.c: Likewise. +++ * pt-read.c: Likewise. +++ * pt-readv.c: Likewise. +++ * pt-recv.c: Likewise. +++ * pt-recvfrom.c: Likewise. +++ * pt-recvmsg.c: Likewise. +++ * pt-select.c: Likewise. +++ * pt-send.c: Likewise. +++ * pt-sendmsg.c: Likewise. +++ * pt-sendto.c: Likewise. +++ * pt-sigpause.c: Likewise. +++ * pt-sigsuspend.c: Likewise. +++ * pt-sigtimedwait.c: Likewise. +++ * pt-sigwait.c: Likewise. +++ * pt-sigwaitinfo.c: Likewise. +++ * pt-system.c: Likewise. +++ * pt-tcdrain.c: Likewise. +++ * pt-wait.c: Likewise. +++ * pt-waitid.c: Likewise. +++ * pt-waitpid.c: Likewise. +++ * pt-write.c: Likewise. +++ * pt-writev.c: Likewise. +++ * pthread_join.c: Likewise. +++ * pthread_timedjoin.c: Likewise. +++ +++ * pt-sigpause.c (sigsuspend): Call __sigsuspend. +++ (__xpg_sigpause): New function. +++ * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause. +++ +++2002-12-07 Ulrich Drepper +++ +++ * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO. +++ +++ * cleanup.c: Move declarations of _GI_pthread_cleanup_push and +++ _GI_pthread_cleanup_pop to pthreadP.h. +++ +++ * ftrylockfile.c: Use _IO_lock_trylock instead of +++ pthread_mutex_trylock. +++ +++ * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype. +++ (CANCEL_RESET): Likewise. +++ (__pthread_setcanceltype_): Declare. +++ (__pthread_mutex_lock_internal): Declare. +++ (__pthread_mutex_unlock_internal): Declare. +++ (__pthread_once_internal): Declare. +++ (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push. +++ (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop. +++ +++ * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock +++ and pthread_mutex_unlock. +++ * pthread_cond_wait.c: Likewise. +++ * pthread_mutex_lock.c: Use INTDEF to define alias if needed. +++ * pthread_mutex_unlock.c: Likewise. +++ +++ * pthread_setcanceltype.c: Add additional alias +++ __pthread_setcanceltype. +++ +++ * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF. +++ * sem_open.c (sem_open): Likewise. +++ Use __libc_open, __libc_write, and __libc_close instead of +++ open, write, and close respectively. +++ +++ * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal): +++ Rewrite as statement expression since it must return a value. +++ +++ * pthread_cancel.c: Use __pthread_kill instead of pthread_kill. +++ * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias +++ __pthread_kill. +++ +++ * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional +++ alias __pthread_once_internal. +++ +++ * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise. +++ +++2002-12-06 Ulrich Drepper +++ +++ * Makefile (tests): Add tst-stdio1 and tst-stdio2. +++ * tst-stdio1.c: New file. +++ * tst-stdio2.c: New file. +++ +++ * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use. +++ +++ * Makefile (tests): Comment out tst-locale2 for now. +++ (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO. +++ +++ * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to +++ -D_IO_MTSAFE_IO. +++ * sysdeps/unix/sysv/linux/fork.c: Include . +++ Use _IO_lock_init instead of explicit assignment. +++ +++ * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros. +++ Define __libc_lock_* and __libc_lock_recursive macros with +++ lowlevellock macros, not pthread mutexes. +++ +++ * flockfile.c: Include . Use _IO_lock_lock instead +++ of pthread_mutex_lock. +++ * funlockfile.c: Include . Use _IO_lock_unlock +++ instead of pthread_mutex_unlock. +++ +++2002-12-06 Roland McGrath +++ +++ * allocatestack.c (__stack_user): Use uninitialized defn. +++ * init.c (__pthread_initialize_minimal): Initialize it here. +++ +++2002-12-05 Roland McGrath +++ +++ * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error +++ string. +++ * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise. +++ +++ * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add +++ missing & here too. +++ +++2002-12-05 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove +++ lowlevellock. +++ * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file. +++ * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file. +++ * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file. +++ * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation +++ for __libc_lock_* macros. +++ * Makefile (routines): Add libc-lowlevellock. +++ +++2002-10-09 Roland McGrath +++ +++ * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro. +++ Under [__PIC__], call the function via the pointer fetched for +++ comparison rather than a call by name that uses the PLT. +++ (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini) +++ (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock) +++ (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock) +++ (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock) +++ (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it. +++ +++2002-12-04 Roland McGrath +++ +++ * forward.c (pthread_self): Use FORWARD3 macro to correct return type. +++ +++ * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db. +++ * sysdeps/generic/td_ta_map_lwp2thr.c: New file. +++ +++ * pthread_create.c (start_thread): Add missing & on __nptl_last_event. +++ +++2002-12-04 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t +++ a completely opaque, non-integer type. +++ * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise. +++ +++2002-12-05 Jakub Jelinek +++ +++ * sysdeps/i386/tls.h: Include stdlib.h. +++ * sysdeps/x86_64/tls.h: Likewise. +++ +++2002-12-04 Ulrich Drepper +++ +++ * Makefile (tests): Add tst-locale2. +++ (tests-static): Likewise. +++ * tst-locale2.c: New file. +++ +++ * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as +++ volatile and add memory clobbers to lock operations. +++ +++2002-12-03 Ulrich Drepper +++ +++ * sysdeps/i386/i686/bits/atomic.h: Use i486 version. +++ * sysdeps/i386/i486/bits/atomic.h: New file. +++ * sysdeps/i386/i586/bits/atomic.h: New file. +++ * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and +++ include i486 version. +++ * sysdeps/i386/i486/pthread_spin_trylock.S: New file. +++ * sysdeps/i386/i586/pthread_spin_trylock.S: New file. +++ Patch by Marijn Ros . +++ +++ * allocatestack.c (get_cached_stack): Don't crash if we first +++ found a stack with a larger size then needed. +++ Reported by Hui Huang . +++ +++ * Makefile (tests): Add tst-sysconf. +++ * tst-sysconf.c: New file. +++ +++ * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine +++ PTHREAD_THREADS_MAX. +++ +++2002-12-02 Roland McGrath +++ +++ * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event): +++ Declare using hidden_proto instead of attribute_hidden, so there are +++ non-.hidden static symbols for gdb to find. +++ (__pthread_keys): Likewise. +++ * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def. +++ * allocatestack.c (__stack_user): Likewise. +++ * pthread_create.c (__pthread_keys): Likewise. +++ (__nptl_threads_events, __nptl_last_event): Make these static instead +++ of hidden. +++ * pthread_key_create.c (__pthread_pthread_keys_max, +++ __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*. +++ +++2002-12-02 Ulrich Drepper +++ +++ * Makefile (tests): Add tst-locale1. If buid-static is yes link +++ statically. +++ * tst-locale1.c: New file. +++ +++ * pthread_cond_timedwait.c: Include . +++ +++ * Makefile (tests): Add tst-fork2 and tst-fork3. +++ * tst-fork2.c: New file. +++ * tst-fork3.c: New file. +++ +++2002-11-28 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file. +++ +++ * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which +++ require it to 200112L. +++ +++ * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov +++ instruction only if HAVE_CMOV is defined. +++ * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV. +++ +++ * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file. +++ +++ * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file. +++ +++ * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file. +++ +++ * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file. +++ +++2002-11-27 Ulrich Drepper +++ +++ * sysdeps/x86_64/bits/atomic.h: New file. +++ +++ * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and +++ 16-bit operations. +++ +++ * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if +++ possible since gettid cannot fail. +++ +++ * sysdeps/x86_64/pthreaddef.h: New file. +++ +++ * sysdeps/i386/pthreaddef.h (gettid): Removed. +++ +++ * sysdeps/x86_64/pthread_spin_init.c: New file. +++ * sysdeps/x86_64/pthread_spin_lock.c: New file. +++ * sysdeps/x86_64/pthread_spin_trylock.c: New file. +++ * sysdeps/x86_64/pthread_spin_unlock.c: New file. +++ +++ * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock): +++ Add missing lock prefix. Minute optimization. +++ +++ * tst-spin2.c (main): Also check successful trylock call. +++ +++ * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct +++ syscall. Fix typo in case INTERNAL_SYSCALL is not used. +++ +++ * sysdeps/i386/pthread_spin_destroy.c: Moved to... +++ * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file. +++ +++ * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code. +++ * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct +++ value in case of an error. Add support for INTERNAL_SYSCALL. +++ +++ * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct +++ value in case of an error. +++ +++ * sysdeps/x86_64/tls.h: New file. +++ +++2002-11-26 Ulrich Drepper +++ +++ * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now +++ takes the array member name and the index as parameters. +++ (THREAD_SETMEM_NC): Likewise. +++ * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface. +++ * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC +++ interfaces. +++ +++ * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element +++ to decide which code to use. +++ (THREAD_SETMEM_NC): Likewise. +++ +++ * allocatestack.c (queue_stack): Don't remove stack from list here. +++ Do it in the caller. Correct condition to prematurely terminate +++ loop to free stacks. +++ (__deallocate_stack): Remove stack from list here. +++ +++2002-11-26 Ulrich Drepper +++ +++ * Makefile (tests): Add tst-stack1. +++ * tst-stack1.c: New file. +++ +++ * allocatestack.c (allocate_stack): Initialize the TCB on a user +++ provided stack. +++ +++ * pthread_attr_getstack.c: Return bottom of the thread area. +++ +++2002-11-25 Ulrich Drepper +++ +++ * Makefile (libpthread-routines): Add pt-allocrtsig and +++ pthread_kill_other_threads. +++ * pt-allocrtsig.c: New file. +++ * pthread_kill_other_threads.c: New file. +++ * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for +++ all three functions. +++ * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove +++ allocrtsig. +++ * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export +++ __libc_current_sigrtmin_private, __libc_current_sigrtmax_private, +++ and __libc_allocate_rtsig_private. +++ * Versions (libpthread): Export pthread_kill_other_threads_np, +++ __libc_current_sigrtmin, and __libc_current_sigrtmax. +++ +++2002-11-24 Ulrich Drepper +++ +++ * allocatestack.c (allocate_stack): stackaddr in attribute points to +++ the end of the stack. Adjust computations. +++ When mprotect call fails dequeue stack and free it. +++ * pthread_attr_setstack.c: Store top of the stack in stackaddr +++ attribute. +++ * pthread_getattr_np.c: Likewise. +++ +++ * descr.h (IS_DETACHED): Add some more parenthesis to prevent +++ surprises. +++ +++2002-11-23 Ulrich Drepper +++ +++ * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before +++ attribute definitions. Patch by Luca Barbieri . +++ +++2002-11-22 Ulrich Drepper +++ +++ * pthread_getspecific.c: Optimize access to first 2nd-level array. +++ * pthread_setspecific.c: Likewise. +++ +++2002-11-21 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags +++ definitions. Get them from the official place. +++ * sysdeps/unix/sysv/linux/i386/fork.c: Likewise. +++ +++ * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags. +++ Use new CLONE_ flags in clone() calls. +++ +++ * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork. +++ * sysdeps/unix/sysv/linux/i386/fork.c: New file. +++ +++ * Versions: Add pthread_* functions for libc. +++ * forward.c: New file. +++ +++ * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add +++ errno-loc. +++ * herrno.c: New file. +++ * res.c: New file. +++ +++ * Makefile (libpthread-routines): Remove sem_post, sem_wait, +++ sem_trywait, and sem_timedwait. Add herrno and res. +++ * sem_init.c: Don't initialize lock and waiters members. +++ * sem_open.c: Likewise. +++ * sem_post.c: Removed. +++ * sem_wait.c: Removed. +++ * sem_trywait.c: Removed. +++ * sem_timedwait.c: Removed. +++ * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite. +++ Includes full implementations of sem_post, sem_wait, sem_trywait, +++ and sem_timedwait. +++ * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust +++ for new implementation. +++ * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock +++ and waiters fields. +++ +++ * tst-sem3.c: Improve error message. +++ * tst-signal3.c: Likewise. +++ +++ * init.c (__pthread_initialize_minimal): Use set_tid_address syscall +++ to tell the kernel about the termination futex and to initialize tid +++ member. Don't initialize main_thread. +++ * descr.h (struct pthread): Remove main_thread member. +++ * cancelllation.c (__do_cancel): Remove code handling main thread. +++ The main thread is not special anymore. +++ +++ * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add +++ size of the stacks to stack_cache_actsize. +++ +++ * pt-readv.c: Add missing "defined". +++ * pt-sigwait.c: Likewise. +++ * pt-writev.c: Likewise. +++ +++2002-11-09 Ulrich Drepper +++ +++ * Versions: Export __connect from libpthread. +++ Patch by Luca Barbieri . +++ +++ * Makefile (libpthread-routines): Add pt-raise. +++ * sysdeps/unix/sysv/linux/raise.c: New file. +++ * sysdeps/unix/sysv/linux/pt-raise.c: New file. +++ * sysdeps/generic/pt-raise.c: New file. +++ +++ * pthread_cond_init.c: Initialize all data elements of the condvar +++ structure. Patch by Luca Barbieri . +++ +++ * pthread_attr_init.c: Actually implement 2.0 compatibility version. +++ * pthread_create.c: Likewise. +++ +++ * Makefile (tests): Add tst-key1, tst-key2, tst-key3. +++ * tst-key1.c: New file. +++ * tst-key2.c: New file. +++ * tst-key3.c: New file. +++ +++ * Versions: Export pthread_detach for version GLIBC_2.0. +++ Reported by Saurabh Desai . +++ +++2002-11-08 Ulrich Drepper +++ +++ * pthread_key_create.c: Terminate search after an unused key was found. +++ Patch by Luca Barbieri . +++ +++ * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero. +++ Patch by Luca Barbieri . +++ +++2002-10-10 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic +++ dynamic lookup for errno in PIC. +++ +++ * allocatestack.c (get_cached_stack): Rearrange code slightly to +++ release the stack lock as soon as possible. +++ Call _dl_allocate_tls_init for TCB from the cache to re-initialize +++ the static TLS block. +++ (allocate_stack): Call _dl_allocate_tls_init for user-provided stack. +++ +++ * cancellation.c: Renamed from cancelation.c. +++ * Makefile: Adjust accordingly. +++ * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P. +++ * cleanup_defer.c: Use CANCELLATION_P. +++ * pthread_testcancel.c: Likewise. +++ * descr.h: Fix spelling in comments. +++ * init.c: Likewise. +++ * pthread_getattr_np.c: Likewise. +++ * pthread_getschedparam.c: Likewise. +++ * pthread_setschedparam.c: Likewise. +++ * Versions: Likewise. +++ +++ * pt-pselect.c: New file. +++ * Makefile (libpthread-routines): Add pt-pselect. +++ * Versions: Add pselect. +++ +++ * tst-cancel4.c: New file. +++ * Makefile (tests): Add tst-cancel4. +++ +++2002-10-09 Ulrich Drepper +++ +++ * pthread_mutex_lock.c: Always record lock ownership. +++ * pthread_mutex_timedlock.c: Likewise. +++ * pthread_mutex_trylock.c: Likewise. +++ +++ * pt-readv.c: New file. +++ * pt-writev.c: New file. +++ * pt-creat.c: New file. +++ * pt-msgrcv.c: New file. +++ * pt-msgsnd.c: New file. +++ * pt-poll.c: New file. +++ * pt-select.c: New file. +++ * pt-sigpause.c: New file. +++ * pt-sigsuspend.c: New file. +++ * pt-sigwait.c: New file. +++ * pt-sigwaitinfo.c: New file. +++ * pt-waitid.c: New file. +++ * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat, +++ pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend, +++ pt-sigwait, pt-sigwaitinfo, and pt-waitid. +++ * Versions: Add all the new functions. +++ +++ * tst-exit1.c: New file. +++ * Makefile (tests): Add tst-exit1. +++ +++ * sem_timedwait.c: Minor optimization for more optimal fastpath. +++ +++2002-10-08 Ulrich Drepper +++ +++ * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW. +++ +++ * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid +++ call. pthread_join is an official cancellation point. +++ * pthread_timedjoin.c: Likewise. +++ +++ * pthread_cond_wait.c: Revert order in which internal lock are dropped +++ and the condvar's mutex are retrieved. +++ * pthread_cond_timedwait.c: Likewise. +++ Reported by dice@saros.East.Sun.COM. +++ +++2002-10-07 Ulrich Drepper +++ +++ * pthreadP.h: Cut out all type definitions and move them... +++ * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file. +++ * pthreadP.h: Include . +++ +++ * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little +++ performance tweaks. +++ +++ * sem_trywait.c: Shuffle #includes around to get right order. +++ * sem_timedwait.c: Likewise. +++ * sem_post.c: Likewise. +++ * sem_wait.c: Likewise. +++ +++ * nptl 0.3 released. +++ +++ * Makefile (tests): Add tst-signal3. +++ * tst-signal3.c: New file. +++ +++2002-10-05 Ulrich Drepper +++ +++ * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that +++ the asms modify the sem object. +++ (__lll_sem_timedwait): Now takes struct sem* as first parameter. +++ +++ * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose +++ the actual members. +++ * pthreadP.h (struct sem): New type. Actual semaphore type. +++ * semaphoreP.h: Include pthreadP.h. +++ * sem_getvalue.c: Adjust to sem_t change. +++ * sem_init.c: Likewise. +++ * sem_open.c: Likewise. +++ * sem_post.c: Likewise. +++ * sem_timedwait.c: Likewise. +++ * sem_trywait.c: Likewise. +++ * sem_wait.c: Likewise. +++ +++2002-10-04 Ulrich Drepper +++ +++ * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3. +++ * tst-basic2.c: New file. +++ * tst-exec1.c: New file. +++ * tst-exec2.c: New file. +++ * tst-exec3.c: New file. +++ +++ * tst-fork1.c: Remove extra */. +++ +++ * nptl 0.2 released. The API for IA-32 is complete. ++--- /dev/null +++++ b/fbtl/DESIGN-barrier.txt ++@@ -0,0 +1,44 @@ +++Barriers pseudocode +++=================== +++ +++ int pthread_barrier_wait(barrier_t *barrier); +++ +++struct barrier_t { +++ +++ unsigned int lock: +++ - internal mutex +++ +++ unsigned int left; +++ - current barrier count, # of threads still needed. +++ +++ unsigned int init_count; +++ - number of threads needed for the barrier to continue. +++ +++ unsigned int curr_event; +++ - generation count +++} +++ +++pthread_barrier_wait(barrier_t *barrier) +++{ +++ unsigned int event; +++ result = 0; +++ +++ lll_lock(barrier->lock); +++ if (!--barrier->left) { +++ barrier->curr_event++; +++ futex_wake(&barrier->curr_event, INT_MAX) +++ +++ result = BARRIER_SERIAL_THREAD; +++ } else { +++ event = barrier->curr_event; +++ lll_unlock(barrier->lock); +++ do { +++ futex_wait(&barrier->curr_event, event) +++ } while (event == barrier->curr_event); +++ } +++ +++ if (atomic_increment_val (barrier->left) == barrier->init_count) +++ lll_unlock(barrier->lock); +++ +++ return result; +++} ++--- /dev/null +++++ b/fbtl/DESIGN-condvar.txt ++@@ -0,0 +1,134 @@ +++Conditional Variable pseudocode. +++================================ +++ +++ int pthread_cond_timedwait (pthread_cond_t *cv, pthread_mutex_t *mutex); +++ int pthread_cond_signal (pthread_cond_t *cv); +++ int pthread_cond_broadcast (pthread_cond_t *cv); +++ +++struct pthread_cond_t { +++ +++ unsigned int cond_lock; +++ +++ internal mutex +++ +++ uint64_t total_seq; +++ +++ Total number of threads using the conditional variable. +++ +++ uint64_t wakeup_seq; +++ +++ sequence number for next wakeup. +++ +++ uint64_t woken_seq; +++ +++ sequence number of last woken thread. +++ +++ uint32_t broadcast_seq; +++ +++} +++ +++ +++struct cv_data { +++ +++ pthread_cond_t *cv; +++ +++ uint32_t bc_seq +++ +++} +++ +++ +++ +++cleanup_handler(cv_data) +++{ +++ cv = cv_data->cv; +++ lll_lock(cv->lock); +++ +++ if (cv_data->bc_seq == cv->broadcast_seq) { +++ ++cv->wakeup_seq; +++ ++cv->woken_seq; +++ } +++ +++ /* make sure no signal gets lost. */ +++ FUTEX_WAKE(cv->wakeup_seq, ALL); +++ +++ lll_unlock(cv->lock); +++} +++ +++ +++cond_timedwait(cv, mutex, timeout): +++{ +++ lll_lock(cv->lock); +++ mutex_unlock(mutex); +++ +++ cleanup_push +++ +++ ++cv->total_seq; +++ val = seq = cv->wakeup_seq; +++ cv_data.bc = cv->broadcast_seq; +++ cv_data.cv = cv; +++ +++ while (1) { +++ +++ lll_unlock(cv->lock); +++ +++ enable_async(&cv_data); +++ +++ ret = FUTEX_WAIT(cv->wakeup_seq, val, timeout); +++ +++ restore_async +++ +++ lll_lock(cv->lock); +++ +++ if (bc != cv->broadcast_seq) +++ goto bc_out; +++ +++ val = cv->wakeup_seq; +++ +++ if (val != seq && cv->woken_seq != val) { +++ ret = 0; +++ break; +++ } +++ +++ if (ret == TIMEDOUT) { +++ ++cv->wakeup_seq; +++ break; +++ } +++ } +++ +++ ++cv->woken_seq; +++ +++ bc_out: +++ lll_unlock(cv->lock); +++ +++ cleanup_pop +++ +++ mutex_lock(mutex); +++ +++ return ret; +++} +++ +++cond_signal(cv) +++{ +++ lll_lock(cv->lock); +++ +++ if (cv->total_seq > cv->wakeup_seq) { +++ ++cv->wakeup_seq; +++ FUTEX_WAKE(cv->wakeup_seq, 1); +++ } +++ +++ lll_unlock(cv->lock); +++} +++ +++cond_broadcast(cv) +++{ +++ lll_lock(cv->lock); +++ +++ if (cv->total_seq > cv->wakeup_seq) { +++ cv->wakeup_seq = cv->total_seq; +++ cv->woken_seq = cv->total_seq; +++ ++cv->broadcast_seq; +++ FUTEX_WAKE(cv->wakeup_seq, ALL); +++ } +++ +++ lll_unlock(cv->lock); +++} ++--- /dev/null +++++ b/fbtl/DESIGN-rwlock.txt ++@@ -0,0 +1,113 @@ +++Reader Writer Locks pseudocode +++============================== +++ +++ pthread_rwlock_rdlock(pthread_rwlock_t *rwlock); +++ pthread_rwlock_unlock(pthread_rwlock_t *rwlock); +++ pthread_rwlock_wrlock(pthread_rwlock_t *rwlock); +++ +++struct pthread_rwlock_t { +++ +++ unsigned int lock: +++ - internal mutex +++ +++ unsigned int writers_preferred; +++ - locking mode: 0 recursive, readers preferred +++ 1 nonrecursive, writers preferred +++ +++ unsigned int readers; +++ - number of read-only references various threads have +++ +++ pthread_t writer; +++ - descriptor of the writer or 0 +++ +++ unsigned int readers_wakeup; +++ - 'all readers should wake up' futex. +++ +++ unsigned int writer_wakeup; +++ - 'one writer should wake up' futex. +++ +++ unsigned int nr_readers_queued; +++ - number of readers queued up. +++ +++ unsigned int nr_writers_queued; +++ - number of writers queued up. +++} +++ +++pthread_rwlock_rdlock(pthread_rwlock_t *rwlock) +++{ +++ lll_lock(rwlock->lock); +++ for (;;) { +++ if (!rwlock->writer && (!rwlock->nr_writers_queued || +++ !rwlock->writers_preferred)) +++ break; +++ +++ rwlock->nr_readers_queued++; +++ val = rwlock->readers_wakeup; +++ lll_unlock(rwlock->lock); +++ +++ futex_wait(&rwlock->readers_wakeup, val) +++ +++ lll_lock(rwlock->lock); +++ rwlock->nr_readers_queued--; +++ } +++ rwlock->readers++; +++ lll_unlock(rwlock->lock); +++} +++ +++pthread_rwlock_tryrdlock(pthread_rwlock_t *rwlock) +++{ +++ int result = EBUSY; +++ lll_lock(rwlock->lock); +++ if (!rwlock->writer && (!rwlock->nr_writers_queued || +++ !rwlock->writers_preferred)) +++ rwlock->readers++; +++ lll_unlock(rwlock->lock); +++ return result; +++} +++ +++pthread_rwlock_wrlock(pthread_rwlock_t *rwlock) +++{ +++ lll_lock(rwlock->lock); +++ for (;;) { +++ if (!rwlock->writer && !rwlock->readers) +++ break; +++ +++ rwlock->nr_writers_queued++; +++ val = rwlock->writer_wakeup; +++ lll_unlock(rwlock->lock); +++ +++ futex_wait(&rwlock->writer_wakeup, val); +++ +++ lll_lock(rwlock->lock); +++ rwlock->nr_writers_queued--; +++ } +++ rwlock->writer = pthread_self(); +++ lll_unlock(rwlock->lock); +++} +++ +++pthread_rwlock_unlock(pthread_rwlock_t *rwlock) +++{ +++ lll_lock(rwlock->lock); +++ +++ if (rwlock->writer) +++ rwlock->writer = 0; +++ else +++ rwlock->readers--; +++ +++ if (!rwlock->readers) { +++ if (rwlock->nr_writers_queued) { +++ ++rwlock->writer_wakeup; +++ lll_unlock(rwlock->lock); +++ futex_wake(&rwlock->writer_wakeup, 1); +++ return; +++ } else +++ if (rwlock->nr_readers_queued) { +++ ++rwlock->readers_wakeup; +++ lll_unlock(rwlock->lock); +++ futex_wake(&rwlock->readers_wakeup, MAX_INT); +++ return; +++ } +++ } +++ +++ lll_unlock(rwlock->lock); +++} ++--- /dev/null +++++ b/fbtl/DESIGN-sem.txt ++@@ -0,0 +1,46 @@ +++Semaphores pseudocode +++============================== +++ +++ int sem_wait(sem_t * sem); +++ int sem_trywait(sem_t * sem); +++ int sem_post(sem_t * sem); +++ int sem_getvalue(sem_t * sem, int * sval); +++ +++struct sem_t { +++ +++ unsigned int count; +++ - current semaphore count, also used as a futex +++} +++ +++sem_wait(sem_t *sem) +++{ +++ for (;;) { +++ +++ if (atomic_decrement_if_positive(sem->count)) +++ break; +++ +++ futex_wait(&sem->count, 0) +++ } +++} +++ +++sem_post(sem_t *sem) +++{ +++ n = atomic_increment(sem->count); +++ // Pass the new value of sem->count +++ futex_wake(&sem->count, n + 1); +++} +++ +++sem_trywait(sem_t *sem) +++{ +++ if (atomic_decrement_if_positive(sem->count)) { +++ return 0; +++ } else { +++ return EAGAIN; +++ } +++} +++ +++sem_getvalue(sem_t *sem, int *sval) +++{ +++ *sval = sem->count; +++ read_barrier(); +++} ++--- /dev/null +++++ b/fbtl/DESIGN-systemtap-probes.txt ++@@ -0,0 +1,89 @@ +++Systemtap is a dynamic tracing/instrumenting tool available on Linux. Probes +++that are not fired at run time have close to zero overhead. +++ +++The following probes are available for NPTL: +++ +++Thread creation & Join Probes +++============================= +++pthread_create - probe for pthread_create +++ arg1 = pointer (pthread_t*) to thread +++ arg2 = pointer (pthread_attr_t*) to attr +++ arg3 = pointer (void *) to start_routine +++ arg4 = arguments to start_routine +++pthread_start - probe for actual thread creation +++ arg1 = struct pthread (members include thread ID, process ID) +++ arg2 = address of start_routine +++ arg3 = pointer to the list of arguments +++pthread_join - probe for pthread_join +++ arg1 = thread ID +++pthread_join_ret - probe for pthread_join return +++ arg1 = thread ID +++ arg2 = return value +++ +++Lock-related Probes +++=================== +++mutex_init - probe for pthread_mutex_init +++ arg1 = address of mutex lock +++mutex_acquired - probe for succ. return of pthread_mutex_lock +++ arg1 = address of mutex lock +++mutex_timedlock_acquired - probe for succ. return of pthread_mutex_timedlock +++ arg1 = address of mutex lock +++mutex_entry - probe for entry to the pthread_mutex_lock function +++ arg1 = address of mutex lock +++mutex_timedlock_entry - probe for entry to the pthread_mutex_timedlock function +++ arg1 = address of mutex lock, arg2 = address of timespec +++mutex_release - probe for pthread_mutex_unlock after the successful release of a +++ mutex lock +++ arg1 = address of mutex lock +++mutex_destroy - probe for pthread_mutex_destroy +++ arg1 = address of mutex lock +++ +++wrlock_entry - probe for entry to the pthread_rwlock_wrlock function +++ arg1 = address of rw lock +++rdlock_entry - probe for entry to the pthread_rwlock_rdlock function +++ arg1 = address of rw lock +++ +++rwlock_destroy - probe for pthread_rwlock_destroy +++ arg1 = address of rw lock +++wrlock_acquire_write - probe for pthread_rwlock_wrlock (after getting the lock) +++ arg1 = address of rw lock +++rdlock_acquire_read - probe for pthread_rwlock_rdlock after successfully getting +++ the lock +++ arg1 = address of rw lock +++rwlock_unlock - probe for pthread_rwlock_unlock +++ arg1 = address of rw lock +++ +++lll_lock_wait - probe in low-level (assembly language) locking code, only fired +++ when futex/FUTEX_WAIT is called (i.e. when trying to acquire a +++ contented lock) +++ arg1 = pointer to futex +++ arg2 = flags passed to the futex system call +++lll_lock_wait_private - probe in low-level (assembly language) locking code, +++ only fired when futex/FUTEX_WAIT is called (i.e. when +++ trying to acquire a contented lock) +++ arg1 = pointer to futex +++ +++lll_futex_wake - probe in low-level (assembly language) locking code, only fired +++ when futex (FUTEX_WAKE) is called +++ arg1 = pointer to futex +++ arg2 = number of processes to wake +++ arg3 = additional flags +++ +++Condition variable Probes +++========================= +++cond_init - probe for pthread_cond_init +++ arg1 = condition +++ arg2 = attr +++cond_destroy - probe for pthread_cond_destroy +++ arg1 = cond +++cond_wait - probe for pthread_cond_wait +++ arg1 = condition +++ arg2 = mutex lock +++cond_timedwait - probe for pthread_cond_timedwait +++ arg1 = condition +++ arg2 = mutex lock +++ arg3 = timespec +++cond_signal - probe for pthread_cond_signal +++ arg1 = condition +++cond_broadcast - probe for pthread_cond_broadcast +++ arg1 = condition ++--- /dev/null +++++ b/fbtl/Makeconfig ++@@ -0,0 +1,32 @@ +++# Copyright (C) 2002-2013 Free Software Foundation, Inc. +++# This file is part of the GNU C Library. +++# Contributed by Ulrich Drepper , 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, see +++# . +++ +++# Makeconfig fragment for NPTL add-on. +++# This gets included at the end of the main glibc Makeconfig. +++ +++have-thread-library = yes +++ +++shared-thread-library = $(common-objpfx)fbtl/libpthread_nonshared.a \ +++ $(common-objpfx)fbtl/libpthread.so +++static-thread-library = $(common-objpfx)fbtl/libpthread.a +++ +++rpath-dirs += fbtl +++ +++# This makes for ptw-*.? object rules in sysd-rules. +++ptw-CPPFLAGS := -DPTW +++sysd-rules-patterns += ptw-%:% ++--- /dev/null +++++ b/fbtl/Makefile ++@@ -0,0 +1,642 @@ +++# Copyright (C) 2002-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 +++# . +++ +++# +++# Sub-makefile for NPTL portion of the library. +++# +++subdir := fbtl +++ +++headers := pthread.h semaphore.h bits/semaphore.h +++ +++extra-libs := libpthread +++extra-libs-others := $(extra-libs) +++install-lib-ldscripts := libpthread.so +++ +++routines = alloca_cutoff forward libc-lowlevellock libc-cancellation \ +++ libc-cleanup +++shared-only-routines = forward +++ +++libpthread-routines = nptl-init vars events version \ +++ pthread_create pthread_exit pthread_detach \ +++ pthread_join pthread_tryjoin pthread_timedjoin \ +++ pthread_self pthread_equal pthread_yield \ +++ pthread_getconcurrency pthread_setconcurrency \ +++ pthread_getschedparam pthread_setschedparam \ +++ pthread_setschedprio \ +++ pthread_attr_init pthread_attr_destroy \ +++ pthread_attr_getdetachstate pthread_attr_setdetachstate \ +++ pthread_attr_getguardsize pthread_attr_setguardsize \ +++ pthread_attr_getschedparam pthread_attr_setschedparam \ +++ pthread_attr_getschedpolicy pthread_attr_setschedpolicy \ +++ pthread_attr_getinheritsched \ +++ pthread_attr_setinheritsched \ +++ pthread_attr_getscope pthread_attr_setscope \ +++ pthread_attr_getstackaddr pthread_attr_setstackaddr \ +++ pthread_attr_getstacksize pthread_attr_setstacksize \ +++ pthread_attr_getstack pthread_attr_setstack \ +++ pthread_getattr_np \ +++ pthread_mutex_init pthread_mutex_destroy \ +++ pthread_mutex_lock pthread_mutex_trylock \ +++ pthread_mutex_timedlock pthread_mutex_unlock \ +++ pthread_mutexattr_init pthread_mutexattr_destroy \ +++ pthread_mutexattr_getpshared \ +++ pthread_mutexattr_setpshared \ +++ pthread_mutexattr_gettype pthread_mutexattr_settype \ +++ pthread_rwlock_init pthread_rwlock_destroy \ +++ pthread_rwlock_rdlock pthread_rwlock_timedrdlock \ +++ pthread_rwlock_wrlock pthread_rwlock_timedwrlock \ +++ pthread_rwlock_tryrdlock pthread_rwlock_trywrlock \ +++ pthread_rwlock_unlock \ +++ pthread_rwlockattr_init pthread_rwlockattr_destroy \ +++ pthread_rwlockattr_getpshared \ +++ pthread_rwlockattr_setpshared \ +++ pthread_rwlockattr_getkind_np \ +++ pthread_rwlockattr_setkind_np \ +++ pthread_cond_init pthread_cond_destroy \ +++ pthread_cond_wait pthread_cond_timedwait \ +++ pthread_cond_signal pthread_cond_broadcast \ +++ old_pthread_cond_init old_pthread_cond_destroy \ +++ old_pthread_cond_wait old_pthread_cond_timedwait \ +++ old_pthread_cond_signal old_pthread_cond_broadcast \ +++ pthread_condattr_init pthread_condattr_destroy \ +++ pthread_condattr_getpshared pthread_condattr_setpshared \ +++ pthread_condattr_getclock pthread_condattr_setclock \ +++ pthread_spin_init pthread_spin_destroy \ +++ pthread_spin_lock pthread_spin_trylock \ +++ pthread_spin_unlock \ +++ pthread_barrier_init pthread_barrier_destroy \ +++ pthread_barrier_wait \ +++ pthread_barrierattr_init pthread_barrierattr_destroy \ +++ pthread_barrierattr_getpshared \ +++ pthread_barrierattr_setpshared \ +++ pthread_key_create pthread_key_delete \ +++ pthread_getspecific pthread_setspecific \ +++ pthread_sigmask pthread_kill \ +++ pthread_cancel pthread_testcancel \ +++ pthread_setcancelstate pthread_setcanceltype \ +++ pthread_once \ +++ old_pthread_atfork pthread_atfork \ +++ pthread_getcpuclockid \ +++ pthread_clock_gettime pthread_clock_settime \ +++ shm-directory \ +++ sem_init sem_destroy \ +++ sem_open sem_close sem_unlink \ +++ sem_getvalue \ +++ sem_wait sem_trywait sem_timedwait sem_post \ +++ cleanup cleanup_defer cleanup_compat \ +++ cleanup_defer_compat unwind \ +++ pt-longjmp pt-cleanup\ +++ cancellation \ +++ lowlevellock \ +++ pt-vfork \ +++ ptw-write ptw-read ptw-close ptw-fcntl ptw-accept \ +++ ptw-connect ptw-recv ptw-recvfrom ptw-recvmsg ptw-send \ +++ ptw-sendmsg ptw-sendto ptw-fsync ptw-lseek ptw-llseek \ +++ ptw-msync ptw-nanosleep ptw-open ptw-open64 ptw-pause \ +++ ptw-pread ptw-pread64 ptw-pwrite ptw-pwrite64 \ +++ ptw-tcdrain ptw-wait ptw-waitpid ptw-msgrcv ptw-msgsnd \ +++ ptw-sigwait ptw-sigsuspend \ +++ pt-raise pt-system \ +++ flockfile ftrylockfile funlockfile \ +++ sigaction \ +++ herrno res pt-allocrtsig \ +++ pthread_kill_other_threads \ +++ pthread_getaffinity pthread_setaffinity \ +++ pthread_attr_getaffinity pthread_attr_setaffinity \ +++ cleanup_routine unwind-forcedunwind \ +++ pthread_setname pthread_getname \ +++ pthread_setattr_default_np pthread_getattr_default_np +++ +++# lowlevelrobustlock +++# pthread_sigqueue +++ +++# post linuxthreads interfaces +++ +++# pthread_mutexattr_getrobust pthread_mutexattr_setrobust \ +++# pthread_mutex_consistent \ +++# pthread_mutexattr_getprotocol \ +++# pthread_mutexattr_setprotocol \ +++# pthread_mutexattr_getprioceiling \ +++# pthread_mutexattr_setprioceiling tpp \ +++# pthread_mutex_getprioceiling \ +++# pthread_mutex_setprioceiling \ +++ +++# commented out also in nptl +++ +++# pthread_setuid pthread_seteuid pthread_setreuid \ +++# pthread_setresuid \ +++# pthread_setgid pthread_setegid pthread_setregid \ +++# pthread_setresgid +++ +++libpthread-shared-only-routines = version pt-allocrtsig unwind-forcedunwind +++libpthread-static-only-routines = pthread_atfork +++ +++# Since cancellation handling is in large parts handled using exceptions +++# we have to compile some files with exception handling enabled, some +++# even with asynchronous unwind tables. +++ +++# nptl-init.c contains sigcancel_handler(). +++CFLAGS-nptl-init.c = -fexceptions -fasynchronous-unwind-tables +++# The unwind code itself, +++CFLAGS-unwind.c = -fexceptions +++CFLAGS-unwind-forcedunwind.c = -fexceptions -fasynchronous-unwind-tables +++ +++# The following three functions must be async-cancel safe. +++CFLAGS-pthread_cancel.c = -fexceptions -fasynchronous-unwind-tables +++CFLAGS-pthread_setcancelstate.c = -fexceptions -fasynchronous-unwind-tables +++CFLAGS-pthread_setcanceltype.c = -fexceptions -fasynchronous-unwind-tables +++ +++# These are internal functions which similar functionality as setcancelstate +++# and setcanceltype. +++CFLAGS-cancellation.c = -fasynchronous-unwind-tables +++CFLAGS-libc-cancellation.c = -fasynchronous-unwind-tables +++ +++# Calling pthread_exit() must cause the registered cancel handlers to +++# be executed. Therefore exceptions have to be thrown through this +++# function. +++CFLAGS-pthread_exit.c = -fexceptions +++ +++# Among others, __pthread_unwind is forwarded. This function must handle +++# exceptions. +++CFLAGS-forward.c = -fexceptions +++ +++# The following are cancellation points. Some of the functions can +++# block and therefore temporarily enable asynchronous cancellation. +++# Those must be compiled asynchronous unwind tables. +++CFLAGS-pthread_testcancel.c = -fexceptions +++CFLAGS-pthread_join.c = -fexceptions -fasynchronous-unwind-tables +++CFLAGS-pthread_timedjoin.c = -fexceptions -fasynchronous-unwind-tables +++CFLAGS-pthread_once.c = $(uses-callbacks) -fexceptions \ +++ -fasynchronous-unwind-tables +++CFLAGS-pthread_cond_wait.c = -fexceptions -fasynchronous-unwind-tables +++CFLAGS-pthread_cond_timedwait.c = -fexceptions -fasynchronous-unwind-tables +++CFLAGS-sem_wait.c = -fexceptions -fasynchronous-unwind-tables +++CFLAGS-sem_timedwait.c = -fexceptions -fasynchronous-unwind-tables +++ +++# These are the function wrappers we have to duplicate here. +++CFLAGS-fcntl.c = -fexceptions -fasynchronous-unwind-tables +++CFLAGS-lockf.c = -fexceptions +++CFLAGS-pread.c = -fexceptions -fasynchronous-unwind-tables +++CFLAGS-pread64.c = -fexceptions -fasynchronous-unwind-tables +++CFLAGS-pwrite.c = -fexceptions -fasynchronous-unwind-tables +++CFLAGS-pwrite64.c = -fexceptions -fasynchronous-unwind-tables +++CFLAGS-wait.c = -fexceptions -fasynchronous-unwind-tables +++CFLAGS-waitpid.c = -fexceptions -fasynchronous-unwind-tables +++CFLAGS-sigwait.c = -fexceptions -fasynchronous-unwind-tables +++CFLAGS-msgrcv.c = -fexceptions -fasynchronous-unwind-tables +++CFLAGS-msgsnd.c = -fexceptions -fasynchronous-unwind-tables +++CFLAGS-tcdrain.c = -fexceptions -fasynchronous-unwind-tables +++CFLAGS-open.c = -fexceptions -fasynchronous-unwind-tables +++CFLAGS-open64.c = -fexceptions -fasynchronous-unwind-tables +++CFLAGS-pause.c = -fexceptions -fasynchronous-unwind-tables +++CFLAGS-recv.c = -fexceptions -fasynchronous-unwind-tables +++CFLAGS-send.c = -fexceptions -fasynchronous-unwind-tables +++ +++CFLAGS-pt-system.c = -fexceptions +++ +++ +++tests = tst-typesizes \ +++ tst-attr1 tst-attr2 tst-attr3 tst-default-attr \ +++ tst-mutex1 tst-mutex2 tst-mutex3 tst-mutex4 tst-mutex5 tst-mutex6 \ +++ tst-mutex7 tst-mutex8 tst-mutex9 tst-mutex5a tst-mutex7a \ +++ tst-spin1 tst-spin2 tst-spin3 \ +++ tst-cond1 tst-cond2 tst-cond3 tst-cond4 tst-cond5 tst-cond6 tst-cond7 \ +++ tst-cond8 tst-cond9 tst-cond10 tst-cond11 tst-cond12 tst-cond13 \ +++ tst-cond14 tst-cond15 tst-cond16 tst-cond17 tst-cond18 tst-cond19 \ +++ tst-cond20 tst-cond21 tst-cond22 tst-cond23 \ +++ tst-rwlock1 tst-rwlock2 tst-rwlock2a tst-rwlock3 tst-rwlock4 \ +++ tst-rwlock5 tst-rwlock6 tst-rwlock7 tst-rwlock8 tst-rwlock9 \ +++ tst-rwlock10 tst-rwlock11 tst-rwlock12 tst-rwlock13 tst-rwlock14 \ +++ tst-once1 tst-once2 tst-once3 tst-once4 \ +++ tst-key1 tst-key2 tst-key3 tst-key4 \ +++ tst-sem1 tst-sem2 tst-sem3 tst-sem4 tst-sem5 tst-sem6 tst-sem7 \ +++ tst-sem8 tst-sem9 tst-sem10 tst-sem11 tst-sem12 tst-sem13 tst-sem14 \ +++ tst-barrier1 tst-barrier2 tst-barrier3 tst-barrier4 \ +++ tst-align tst-align2 tst-align3 \ +++ tst-basic1 tst-basic2 tst-basic3 tst-basic4 tst-basic5 tst-basic6 \ +++ tst-basic7 \ +++ tst-kill1 tst-kill2 tst-kill3 tst-kill4 tst-kill5 tst-kill6 \ +++ tst-raise1 \ +++ tst-join1 tst-join2 tst-join3 tst-join4 tst-join5 tst-join6 \ +++ tst-detach1 \ +++ tst-eintr1 tst-eintr2 tst-eintr3 tst-eintr4 tst-eintr5 \ +++ tst-tsd1 tst-tsd2 tst-tsd3 tst-tsd4 tst-tsd5 tst-tsd6 \ +++ tst-tls1 tst-tls2 \ +++ tst-fork1 tst-fork2 tst-fork3 tst-fork4 \ +++ tst-atfork1 \ +++ tst-cancel1 tst-cancel2 tst-cancel3 tst-cancel4 tst-cancel5 \ +++ tst-cancel6 tst-cancel7 tst-cancel8 tst-cancel9 tst-cancel10 \ +++ tst-cancel11 tst-cancel12 tst-cancel13 tst-cancel14 tst-cancel15 \ +++ tst-cancel16 tst-cancel17 tst-cancel18 tst-cancel19 tst-cancel20 \ +++ tst-cancel21 tst-cancel22 tst-cancel23 tst-cancel24 tst-cancel25 \ +++ tst-cancel-self tst-cancel-self-cancelstate \ +++ tst-cancel-self-canceltype tst-cancel-self-testcancel \ +++ tst-cleanup0 tst-cleanup1 tst-cleanup2 tst-cleanup3 tst-cleanup4 \ +++ tst-flock1 tst-flock2 \ +++ tst-signal1 tst-signal2 tst-signal3 tst-signal4 tst-signal5 \ +++ tst-signal6 tst-signal7 \ +++ tst-exec1 tst-exec2 tst-exec3 tst-exec4 \ +++ tst-exit1 tst-exit2 tst-exit3 \ +++ tst-stdio1 tst-stdio2 \ +++ tst-stack1 tst-stack2 tst-stack3 tst-pthread-getattr \ +++ tst-pthread-attr-affinity \ +++ tst-unload \ +++ tst-dlsym1 \ +++ tst-sysconf \ +++ tst-locale1 tst-locale2 \ +++ tst-umask1 \ +++ tst-popen1 \ +++ tst-clock1 \ +++ tst-context1 \ +++ tst-sched1 \ +++ tst-backtrace1 \ +++ tst-abstime \ +++ tst-vfork1 tst-vfork2 tst-vfork1x tst-vfork2x \ +++ tst-getpid1 tst-getpid2 tst-getpid3 \ +++ tst-initializers1 $(patsubst %,tst-initializers1-%,c89 gnu89 c99 gnu99) +++ +++# These tests do not even compile due to missing pthread_* functions +++# tst-mutexpi1 tst-mutexpi2 tst-mutexpi3 tst-mutexpi4 tst-mutexpi5 \ +++# tst-mutexpi5a tst-mutexpi6 tst-mutexpi7 tst-mutexpi7a tst-mutexpi8 \ +++# tst-mutexpi9 \ +++# tst-cond24 tst-cond25 \ +++# tst-cond-except \ +++# tst-robust1 tst-robust2 tst-robust3 tst-robust4 tst-robust5 \ +++# tst-robust6 tst-robust7 tst-robust8 tst-robust9 \ +++# tst-robustpi1 tst-robustpi2 tst-robustpi3 tst-robustpi4 tst-robustpi5 \ +++# tst-robustpi6 tst-robustpi7 tst-robustpi8 tst-robustpi9 \ +++ +++xtests = tst-setuid1 tst-setuid1-static tst-mutexpp1 tst-mutexpp6 tst-mutexpp10 +++test-srcs = tst-oddstacklimit +++ +++# Files which must not be linked with libpthread. +++tests-nolibpthread = tst-unload +++ +++gen-as-const-headers = pthread-errnos.sym +++ +++LDFLAGS-pthread.so = -Wl,--enable-new-dtags,-z,nodelete,-z,initfirst +++ +++include ../Makeconfig +++ +++tests += tst-cancelx2 tst-cancelx3 tst-cancelx4 tst-cancelx5 \ +++ tst-cancelx6 tst-cancelx7 tst-cancelx8 tst-cancelx9 tst-cancelx10 \ +++ tst-cancelx11 tst-cancelx12 tst-cancelx13 tst-cancelx14 tst-cancelx15 \ +++ tst-cancelx16 tst-cancelx17 tst-cancelx18 tst-cancelx20 tst-cancelx21 \ +++ tst-cleanupx0 tst-cleanupx1 tst-cleanupx2 tst-cleanupx3 tst-cleanupx4 \ +++ tst-oncex3 tst-oncex4 +++ifeq ($(build-shared),yes) +++tests += tst-atfork2 tst-tls3 tst-tls4 tst-tls5 tst-_res1 tst-fini1 \ +++ tst-stackguard1 +++tests-nolibpthread += tst-fini1 +++ifeq ($(have-z-execstack),yes) +++tests += tst-execstack +++endif +++endif +++ +++modules-names = tst-atfork2mod tst-tls3mod tst-tls4moda tst-tls4modb \ +++ tst-tls5mod tst-tls5moda tst-tls5modb tst-tls5modc \ +++ tst-tls5modd tst-tls5mode tst-tls5modf \ +++ tst-_res1mod1 tst-_res1mod2 tst-execstack-mod tst-fini1mod +++extra-test-objs += $(addsuffix .os,$(strip $(modules-names))) tst-cleanup4aux.o +++test-extras += $(modules-names) tst-cleanup4aux +++test-modules = $(addprefix $(objpfx),$(addsuffix .so,$(modules-names))) +++ +++tst-atfork2mod.so-no-z-defs = yes +++tst-tls3mod.so-no-z-defs = yes +++tst-tls5mod.so-no-z-defs = yes +++tst-tls5moda.so-no-z-defs = yes +++tst-tls5modb.so-no-z-defs = yes +++tst-tls5modc.so-no-z-defs = yes +++tst-tls5modd.so-no-z-defs = yes +++tst-tls5mode.so-no-z-defs = yes +++tst-tls5modf.so-no-z-defs = yes +++ +++ifeq ($(build-shared),yes) +++# Build all the modules even when not actually running test programs. +++tests: $(test-modules) +++endif +++ +++ifeq ($(build-shared),yes) +++ +++# Set the `multidir' variable by grabbing the variable from the compiler. +++# We do it once and save the result in a generated makefile. +++-include $(objpfx)multidir.mk +++$(objpfx)multidir.mk: $(common-objpfx)config.make +++ $(make-target-directory) +++ dir=`$(CC) $(CFLAGS) $(CPPFLAGS) -print-multi-directory`; \ +++ echo "multidir := $$dir" > $@T +++ mv -f $@T $@ +++ +++crti-objs := crti.o +++crtn-objs := crtn.o +++ifneq (,$(patsubst .,,$(multidir))) +++generated-dirs := $(firstword $(subst /, , $(multidir))) +++crti-objs += $(multidir)/crti.o +++crtn-objs += $(multidir)/crtn.o +++$(objpfx)$(multidir): +++ mkdir -p $@ +++endif +++extra-objs += $(crti-objs) $(crtn-objs) +++extra-objs += pt-crti.o +++endif +++ +++CFLAGS-flockfile.c = $(libio-mtsafe) +++CFLAGS-ftrylockfile.c = $(libio-mtsafe) +++CFLAGS-funlockfile.c = $(libio-mtsafe) +++ +++link-libc-static := $(common-objpfx)libc.a $(static-gnulib) \ +++ $(common-objpfx)libc.a +++ +++tests-static += tst-locale1 tst-locale2 tst-stackguard1-static \ +++ tst-cancel21-static tst-cancel24-static tst-cond8-static \ +++ tst-mutex8-static tst-sem11-static \ +++ tst-sem12-static +++# This test does not even compile due to missing pthread_* functions +++# tst-mutexpi8-static +++tests += tst-stackguard1-static tst-cancel21-static tst-cancel24-static \ +++ tst-cond8-static tst-mutex8-static \ +++ tst-sem11-static tst-sem12-static +++# This test does not even compile due to missing pthread_* functions +++# tst-mutexpi8-static +++ +++xtests-static += tst-setuid1-static +++ +++# These tests are linked with libc before libpthread +++tests-reverse += tst-cancel5 tst-cancel23 tst-vfork1x tst-vfork2x +++ +++include ../Rules +++ +++ifeq (yes,$(build-shared)) +++# Make sure these things are built in the `make lib' pass so they can be used +++# to run programs during the `make others' pass. +++lib-noranlib: $(addprefix $(objpfx),$(extra-objs)) +++ +++# What we install as libpthread.so for programs to link against is in fact a +++# link script. It contains references for the various libraries we need. +++# The libpthread.so object is not complete since some functions are only +++# defined in libpthread_nonshared.a. +++# We need to use absolute paths since otherwise local copies (if they exist) +++# of the files are taken by the linker. +++install: $(inst_libdir)/libpthread.so +++ +++$(inst_libdir)/libpthread.so: $(common-objpfx)format.lds \ +++ $(objpfx)libpthread.so$(libpthread.so-version) \ +++ $(inst_libdir)/$(patsubst %,$(libtype.oS),\ +++ $(libprefix)pthread) \ +++ $(+force) +++ (echo '/* GNU ld script';\ +++ echo ' Use the shared library, but some functions are only in';\ +++ echo ' the static library, so try that secondarily. */';\ +++ cat $<; \ +++ echo 'GROUP ( $(slibdir)/libpthread.so$(libpthread.so-version)' \ +++ '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)pthread)'\ +++ ')' \ +++ ) > $@.new +++ mv -f $@.new $@ +++endif +++ +++ +++# 'pthread_self' is a simple memory or register load. Setting up the +++# stack frame is more work than the actual operation. Disable the +++# frame creation entirely. This will help applications which call the +++# function frequently to get a thread-specific handle. +++CFLAGS-pthread_self.os += -fomit-frame-pointer +++ +++# Run the cancellation and cleanup tests also for the modern, exception-based +++# implementation. For this we have to pass the -fexceptions parameter. +++CFLAGS-tst-cancelx2.c += -fexceptions +++CFLAGS-tst-cancelx3.c += -fexceptions +++CFLAGS-tst-cancelx4.c += -fexceptions +++CFLAGS-tst-cancelx5.c += -fexceptions +++CFLAGS-tst-cancelx6.c += -fexceptions +++CFLAGS-tst-cancelx7.c += -fexceptions +++CFLAGS-tst-cancelx8.c += -fexceptions +++CFLAGS-tst-cancelx9.c += -fexceptions +++CFLAGS-tst-cancelx10.c += -fexceptions +++CFLAGS-tst-cancelx11.c += -fexceptions +++CFLAGS-tst-cancelx12.c += -fexceptions +++CFLAGS-tst-cancelx13.c += -fexceptions +++CFLAGS-tst-cancelx14.c += -fexceptions +++CFLAGS-tst-cancelx15.c += -fexceptions +++CFLAGS-tst-cancelx16.c += -fexceptions +++CFLAGS-tst-cancelx17.c += -fexceptions +++CFLAGS-tst-cancelx18.c += -fexceptions +++CFLAGS-tst-cancelx20.c += -fexceptions -fasynchronous-unwind-tables +++CFLAGS-tst-cancelx21.c += -fexceptions -fasynchronous-unwind-tables +++CFLAGS-tst-cleanupx0.c += -fexceptions -fasynchronous-unwind-tables +++CFLAGS-tst-cleanupx1.c += -fexceptions -fasynchronous-unwind-tables +++CFLAGS-tst-cleanupx2.c += -fexceptions +++CFLAGS-tst-cleanupx3.c += -fexceptions +++CFLAGS-tst-cleanupx4.c += -fexceptions +++CFLAGS-tst-oncex3.c += -fexceptions +++CFLAGS-tst-oncex4.c += -fexceptions +++ +++ldflags-libgcc_s = -Wl,--as-needed -lgcc_s -Wl,--no-as-needed +++LDFLAGS-tst-cancelx2 += $(ldflags-libgcc_s) +++LDFLAGS-tst-cancelx3 += $(ldflags-libgcc_s) +++LDFLAGS-tst-cancelx4 += $(ldflags-libgcc_s) +++LDFLAGS-tst-cancelx5 += $(ldflags-libgcc_s) +++LDFLAGS-tst-cancelx6 += $(ldflags-libgcc_s) +++LDFLAGS-tst-cancelx7 += $(ldflags-libgcc_s) +++LDFLAGS-tst-cancelx8 += $(ldflags-libgcc_s) +++LDFLAGS-tst-cancelx9 += $(ldflags-libgcc_s) +++LDFLAGS-tst-cancelx10 += $(ldflags-libgcc_s) +++LDFLAGS-tst-cancelx11 += $(ldflags-libgcc_s) +++LDFLAGS-tst-cancelx12 += $(ldflags-libgcc_s) +++LDFLAGS-tst-cancelx13 += $(ldflags-libgcc_s) +++LDFLAGS-tst-cancelx14 += $(ldflags-libgcc_s) +++LDFLAGS-tst-cancelx15 += $(ldflags-libgcc_s) +++LDFLAGS-tst-cancelx16 += $(ldflags-libgcc_s) +++LDFLAGS-tst-cancelx17 += $(ldflags-libgcc_s) +++LDFLAGS-tst-cancelx18 += $(ldflags-libgcc_s) +++LDFLAGS-tst-cancelx20 += $(ldflags-libgcc_s) +++LDFLAGS-tst-cancelx21 += $(ldflags-libgcc_s) +++LDFLAGS-tst-cleanupx0 += $(ldflags-libgcc_s) +++LDFLAGS-tst-cleanupx1 += $(ldflags-libgcc_s) +++LDFLAGS-tst-cleanupx2 += $(ldflags-libgcc_s) +++LDFLAGS-tst-cleanupx3 += $(ldflags-libgcc_s) +++LDFLAGS-tst-cleanupx4 += $(ldflags-libgcc_s) +++LDFLAGS-tst-oncex3 += $(ldflags-libgcc_s) +++LDFLAGS-tst-oncex4 += $(ldflags-libgcc_s) +++ +++CFLAGS-tst-align.c += $(stack-align-test-flags) +++CFLAGS-tst-align3.c += $(stack-align-test-flags) +++CFLAGS-tst-initializers1.c = -W -Wall -Werror +++CFLAGS-tst-initializers1-< = $(CFLAGS-tst-initializers1.c) \ +++ $(patsubst tst-initializers1-%.c,-std=%,$<) +++CFLAGS-tst-initializers1-c89.c = $(CFLAGS-tst-initializers1-<) +++CFLAGS-tst-initializers1-c99.c = $(CFLAGS-tst-initializers1-<) +++CFLAGS-tst-initializers1-gnu89.c = $(CFLAGS-tst-initializers1-<) +++CFLAGS-tst-initializers1-gnu99.c = $(CFLAGS-tst-initializers1-<) +++ +++tst-cancel7-ARGS = --command "exec $(host-test-program-cmd)" +++tst-cancelx7-ARGS = $(tst-cancel7-ARGS) +++tst-umask1-ARGS = $(objpfx)tst-umask1.temp +++ +++$(objpfx)tst-atfork2: $(libdl) $(shared-thread-library) +++LDFLAGS-tst-atfork2 = -rdynamic +++tst-atfork2-ENV = MALLOC_TRACE=$(objpfx)tst-atfork2.mtrace +++$(objpfx)tst-atfork2mod.so: $(shared-thread-library) +++ +++ifeq ($(run-built-tests),yes) +++tests: $(objpfx)tst-stack3-mem +++endif +++tst-stack3-ENV = MALLOC_TRACE=$(objpfx)tst-stack3.mtrace +++$(objpfx)tst-stack3-mem: $(objpfx)tst-stack3.out +++ $(common-objpfx)malloc/mtrace $(objpfx)tst-stack3.mtrace > $@ +++generated += tst-stack3-mem tst-stack3.mtrace +++ +++$(objpfx)tst-cleanup4: $(objpfx)tst-cleanup4aux.o $(shared-thread-library) +++$(objpfx)tst-cleanupx4: $(objpfx)tst-cleanup4aux.o $(shared-thread-library) +++ +++$(objpfx)tst-tls3: $(libdl) $(shared-thread-library) +++LDFLAGS-tst-tls3 = -rdynamic +++$(objpfx)tst-tls3.out: $(objpfx)tst-tls3mod.so +++$(objpfx)tst-tls3mod.so: $(shared-thread-library) +++ +++$(objpfx)tst-tls4: $(libdl) $(shared-thread-library) +++$(objpfx)tst-tls4.out: $(objpfx)tst-tls4moda.so $(objpfx)tst-tls4modb.so +++ +++$(objpfx)tst-tls5: $(objpfx)tst-tls5mod.so $(shared-thread-library) +++LDFLAGS-tst-tls5 = $(no-as-needed) +++LDFLAGS-tst-tls5mod.so = -Wl,-soname,tst-tls5mod.so +++ +++ifeq ($(build-shared),yes) +++ifeq ($(run-built-tests),yes) +++tests: $(objpfx)tst-tls6.out +++endif +++$(objpfx)tst-tls6.out: tst-tls6.sh $(objpfx)tst-tls5 \ +++ $(objpfx)tst-tls5moda.so $(objpfx)tst-tls5modb.so \ +++ $(objpfx)tst-tls5modc.so $(objpfx)tst-tls5modd.so \ +++ $(objpfx)tst-tls5mode.so $(objpfx)tst-tls5modf.so +++ $(BASH) $< $(common-objpfx) '$(test-via-rtld-prefix)' \ +++ '$(test-wrapper-env)' +++endif +++ +++$(objpfx)tst-dlsym1: $(libdl) $(shared-thread-library) +++ +++$(objpfx)tst-fini1: $(shared-thread-library) $(objpfx)tst-fini1mod.so +++ +++ifeq (yes,$(build-shared)) +++librt = $(common-objpfx)rt/librt.so +++else +++librt = $(common-objpfx)rt/librt.a +++endif +++ +++$(objpfx)tst-cancel17: $(librt) +++$(objpfx)tst-cancelx17: $(librt) +++$(objpfx)tst-_res1mod2.so: $(objpfx)tst-_res1mod1.so +++LDFLAGS-tst-_res1mod1.so = -Wl,-soname,tst-_res1mod1.so +++LDFLAGS-tst-_res1mod2.so = -Wl,-soname,tst-_res1mod2.so +++$(objpfx)tst-_res1: $(objpfx)tst-_res1mod1.so $(objpfx)tst-_res1mod2.so \ +++ $(shared-thread-library) +++ +++LDLIBS-tst-cancel24 = $(no-as-needed) -lstdc++ +++LDLIBS-tst-cancel24-static = $(LDLIBS-tst-cancel24) +++ +++extra-B-pthread.so = -B$(common-objpfx)fbtl/ +++$(objpfx)libpthread.so: $(addprefix $(objpfx),$(crti-objs) $(crtn-objs)) +++$(objpfx)libpthread.so: +preinit += $(addprefix $(objpfx),$(crti-objs)) +++$(objpfx)libpthread.so: +postinit += $(addprefix $(objpfx),$(crtn-objs)) +++ +++# Make sure we link with the thread library. +++ifeq ($(build-shared),yes) +++$(addprefix $(objpfx), \ +++ $(filter-out $(tests-static) $(xtests-static) $(tests-reverse) \ +++ $(tests-nolibpthread), \ +++ $(tests) $(xtests) $(test-srcs))): $(objpfx)libpthread.so \ +++ $(objpfx)libpthread_nonshared.a +++$(objpfx)tst-unload: $(common-objpfx)dlfcn/libdl.so +++# $(objpfx)../libc.so is used instead of $(common-objpfx)libc.so, +++# since otherwise libpthread.so comes before libc.so when linking. +++$(addprefix $(objpfx), $(tests-reverse)): \ +++ $(objpfx)../libc.so $(objpfx)libpthread.so \ +++ $(objpfx)libpthread_nonshared.a +++$(objpfx)../libc.so: $(common-objpfx)libc.so ; +++$(addprefix $(objpfx),$(tests-static) $(xtests-static)): $(objpfx)libpthread.a +++ +++$(objpfx)tst-atfork2.out: $(objpfx)tst-atfork2mod.so +++else +++$(addprefix $(objpfx),$(tests) $(test-srcs)): $(objpfx)libpthread.a +++endif +++ +++ifeq ($(build-shared),yes) +++ +++$(objpfx)tst-cleanup0.out: /dev/null $(objpfx)tst-cleanup0 +++ $(make-test-out) 2>&1 | cmp - tst-cleanup0.expect > $@ +++ +++$(objpfx)crti.o: $(objpfx)pt-crti.o +++ ln -f $< $@ +++ +++ifneq ($(multidir),.) +++$(objpfx)$(multidir)/crti.o: $(objpfx)crti.o $(objpfx)$(multidir)/ +++ ln -f $< $@ +++ +++$(objpfx)$(multidir)/crtn.o: $(objpfx)crtn.o $(objpfx)$(multidir)/ +++ ln -f $< $@ +++endif +++ +++generated += libpthread_nonshared.a \ +++ multidir.mk tst-atfork2.mtrace tst-cancel-wrappers.out \ +++ tst-tls6.out +++ +++generated += $(objpfx)tst-atfork2.mtrace \ +++ $(addsuffix .so,$(strip $(modules-names))) +++ +++$(objpfx)version.d: $(objpfx)banner.h +++$(objpfx)version.os: $(objpfx)banner.h +++$(objpfx)banner.h: Banner +++ sed 's/\(.*\)/"\1\\n"/' $< > $@ +++generated += banner.h +++# Give libpthread.so an entry point and make it directly runnable itself. +++LDFLAGS-pthread.so += -e __nptl_main +++endif +++ +++ifeq ($(run-built-tests),yes) +++ifeq (yes,$(build-shared)) +++tests: $(objpfx)tst-cancel-wrappers.out +++$(objpfx)tst-cancel-wrappers.out: tst-cancel-wrappers.sh +++ $(SHELL) $< '$(NM)' \ +++ $(common-objpfx)libc_pic.a \ +++ $(common-objpfx)libc.a \ +++ $(objpfx)libpthread_pic.a \ +++ $(objpfx)libpthread.a > $@ +++endif +++endif +++ +++tst-exec4-ARGS = $(host-test-program-cmd) +++ +++$(objpfx)tst-execstack: $(libdl) +++$(objpfx)tst-execstack.out: $(objpfx)tst-execstack-mod.so +++LDFLAGS-tst-execstack = -Wl,-z,noexecstack +++ +++$(objpfx)tst-fini1mod.so: $(shared-thread-library) +++ +++tst-stackguard1-ARGS = --command "$(host-test-program-cmd) --child" +++tst-stackguard1-static-ARGS = --command "$(objpfx)tst-stackguard1-static --child" +++ +++ifeq ($(run-built-tests),yes) +++tests: $(objpfx)tst-oddstacklimit.out +++ +++$(objpfx)tst-oddstacklimit.out: $(objpfx)tst-oddstacklimit $(objpfx)tst-basic1 +++ $(test-program-prefix) $< --command '$(host-test-program-cmd)' > $@ +++endif +++ +++# The tests here better do not run in parallel +++ifneq ($(filter %tests,$(MAKECMDGOALS)),) +++.NOTPARALLEL: +++endif ++--- /dev/null +++++ b/fbtl/TODO ++@@ -0,0 +1,31 @@ +++- we should probably extend pthread_mutexattr_t with a field to create a +++ single linked list of all instances. This requires changing the +++ pthread_mutexattr_* functions. +++ +++ +++- a new attribute for mutexes: number of times we spin before calling +++sys_futex +++ +++- for adaptive mutexes: when releasing, determine whether somebody spins. +++If yes, for a short time release lock. If someone else locks no wakeup +++syscall needed. +++ +++ +++ +++- test with threaded process terminating and semadj (?) being applied +++ only after all threads are gone +++ +++ +++ +++- semaphore changes: +++ +++ - sem_post should only wake one thread and only when the state of +++ the semaphore changed from 0 to 1 +++ +++ this also requires that sem_wait and sem_timedwait don't drop the +++ post if they get canceled. +++ +++ - possibly add counter field. This requires reviving the +++ differences between old and new semaphose funtions. The old ones +++ stay as they are now. The new once can use an additional field +++ wich is the counter for the number of waiters ++--- /dev/null +++++ b/fbtl/TODO-kernel ++@@ -0,0 +1,20 @@ +++- setuid/setgid must effect process +++ + test syscalls (getuid) afterwards +++ + test core file content +++ +++ + use UID/GID in access(2), chmod(2), chown(2), link(2) +++ +++- nice level is process property +++ +++- rlimit should be process-wide and SIGXCPU should be sent if all threads +++ together exceed the limit +++ +++- getrusage() must return resource utilization for the process +++ +++ +++ +++The following are possible optimizations and in no way required: +++ +++ +++- the scheduler should be thread group-aware, i.e., it has to give time to +++ the thread group not proportional to the number of threads. ++--- /dev/null +++++ b/fbtl/TODO-testing ++@@ -0,0 +1,20 @@ +++pthread_attr_setguardsize +++ +++ test effectiveness +++ +++pthread_attr_[sg]etschedparam +++ +++ what to test? +++ +++pthread_attr_[sg]etstack +++ +++ some more tests needed +++ +++pthread_getcpuclockid +++ +++ check that value is reset -> rt subdir +++ +++pthread_getschedparam +++pthread_setschedparam +++ +++ what to test? ++--- /dev/null +++++ b/fbtl/Versions ++@@ -0,0 +1,251 @@ +++libc { +++ GLIBC_2.0 { +++ pthread_attr_destroy; pthread_attr_init; +++ pthread_attr_getdetachstate; pthread_attr_setdetachstate; +++ pthread_attr_getinheritsched; pthread_attr_setinheritsched; +++ pthread_attr_getschedparam; pthread_attr_setschedparam; +++ pthread_attr_getschedpolicy; pthread_attr_setschedpolicy; +++ pthread_attr_getscope; pthread_attr_setscope; +++ pthread_condattr_destroy; pthread_condattr_init; +++ pthread_cond_broadcast; pthread_cond_destroy; +++ pthread_cond_init; pthread_cond_signal; pthread_cond_wait; +++ pthread_cond_timedwait; +++ pthread_equal; pthread_exit; +++ pthread_getschedparam; pthread_setschedparam; +++ pthread_mutex_destroy; pthread_mutex_init; +++ pthread_mutex_lock; pthread_mutex_unlock; +++ pthread_self; +++ pthread_setcancelstate; pthread_setcanceltype; +++ } +++ GLIBC_2.1 { +++ pthread_attr_init; +++ } +++ GLIBC_2.3.2 { +++ # Changed pthread_cond_t. +++ pthread_cond_init; pthread_cond_destroy; +++ pthread_cond_wait; pthread_cond_signal; +++ pthread_cond_broadcast; pthread_cond_timedwait; +++ } +++ GLIBC_PRIVATE { +++ __libc_alloca_cutoff; +++ # Internal libc interface to libpthread +++ __libc_dl_error_tsd; +++ } +++} +++ +++libpthread { +++ GLIBC_2.0 { +++ pthread_create; pthread_join; pthread_self; pthread_equal; +++ pthread_exit; pthread_detach; +++ +++ pthread_getschedparam; pthread_setschedparam; +++ +++ pthread_attr_init; pthread_attr_destroy; +++ pthread_attr_getdetachstate; pthread_attr_setdetachstate; +++ pthread_attr_getschedparam; pthread_attr_setschedparam; +++ pthread_attr_getschedpolicy; pthread_attr_setschedpolicy; +++ pthread_attr_getinheritsched; pthread_attr_setinheritsched; +++ pthread_attr_getscope; pthread_attr_setscope; +++ +++ pthread_mutex_init; pthread_mutex_destroy; +++ pthread_mutex_lock; pthread_mutex_trylock; pthread_mutex_unlock; +++ +++ pthread_mutexattr_init; pthread_mutexattr_destroy; +++ +++ pthread_cond_init; pthread_cond_destroy; +++ pthread_cond_wait; pthread_cond_timedwait; +++ pthread_cond_signal; pthread_cond_broadcast; +++ +++ pthread_condattr_destroy; pthread_condattr_init; +++ +++ pthread_cancel; pthread_testcancel; +++ pthread_setcancelstate; pthread_setcanceltype; +++ +++ pthread_sigmask; pthread_kill; +++ +++ pthread_key_create; pthread_key_delete; +++ pthread_getspecific; pthread_setspecific; +++ +++ pthread_once; +++ +++ pthread_atfork; +++ +++ flockfile; funlockfile; ftrylockfile; +++ +++ # Non-standard POSIX1.x functions. +++ pthread_mutexattr_getkind_np; pthread_mutexattr_setkind_np; +++ +++ # Protected names for functions used in other shared objects. +++ __pthread_mutex_init; __pthread_mutex_destroy; +++ __pthread_mutex_lock; __pthread_mutex_trylock; __pthread_mutex_unlock; +++ __pthread_mutexattr_init; __pthread_mutexattr_destroy; +++ __pthread_mutexattr_settype; +++ __pthread_key_create; __pthread_getspecific; __pthread_setspecific; +++ __pthread_once; __pthread_atfork; +++ _IO_flockfile; _IO_ftrylockfile; _IO_funlockfile; +++ +++ # Hidden entry point (through macros). +++ #_pthread_cleanup_pop; _pthread_cleanup_pop_restore; _pthread_cleanup_push; +++ #_pthread_cleanup_push_defer; +++ +++ # Semaphores. +++ sem_destroy; sem_getvalue; sem_init; sem_post; sem_trywait; sem_wait; +++ +++ # Special fork handling. +++ fork; __fork; vfork; +++ +++ # Cancellation points. +++ close; __close; fcntl; __fcntl; read; __read; write; __write; accept; +++ connect; __connect; recv; recvfrom; recvmsg; send; __send; sendmsg; sendto; +++ fsync; lseek; __lseek; msync; nanosleep; open; __open; pause; tcdrain; +++ system; wait; __wait; waitpid; +++ +++ # Hidden entry point (through macros). +++ _pthread_cleanup_push; _pthread_cleanup_pop; +++ _pthread_cleanup_push_defer; _pthread_cleanup_pop_restore; +++ +++ pthread_kill_other_threads_np; +++ +++ # The error functions. +++ __errno_location; __h_errno_location; +++ +++ # Functions which previously have been overwritten. +++ sigwait; sigaction; __sigaction; _exit; _Exit; longjmp; siglongjmp; +++ raise; +++ } +++ +++ GLIBC_2.1 { +++ pthread_create; +++ pthread_attr_init; +++ +++ pthread_attr_getguardsize; pthread_attr_setguardsize; +++ pthread_attr_getstackaddr; pthread_attr_setstackaddr; +++ pthread_attr_getstacksize; pthread_attr_setstacksize; +++ +++ pthread_mutexattr_gettype; pthread_mutexattr_settype; +++ +++ pthread_rwlock_init; pthread_rwlock_destroy; +++ pthread_rwlock_rdlock; pthread_rwlock_wrlock; pthread_rwlock_unlock; +++ pthread_rwlock_tryrdlock; pthread_rwlock_trywrlock; +++ +++ pthread_rwlockattr_init; pthread_rwlockattr_destroy; +++ pthread_rwlockattr_getpshared; pthread_rwlockattr_setpshared; +++ pthread_rwlockattr_getkind_np; pthread_rwlockattr_setkind_np; +++ +++ pthread_getconcurrency; pthread_setconcurrency; +++ +++ # Semaphores. +++ sem_destroy; sem_getvalue; sem_init; sem_post; sem_trywait; sem_wait; +++ +++ __libc_current_sigrtmin; __libc_current_sigrtmax; +++ __libc_allocate_rtsig; +++ } +++ +++ GLIBC_2.1.1 { +++ sem_close; sem_open; sem_unlink; +++ } +++ +++ GLIBC_2.1.2 { +++ __vfork; +++ } +++ +++ GLIBC_2.2 { +++ pthread_mutexattr_getpshared; pthread_mutexattr_setpshared; +++ +++ pthread_condattr_getpshared; pthread_condattr_setpshared; +++ +++ # New functions from IEEE Std. 1003.1-2001. +++ pthread_mutex_timedlock; +++ +++ pthread_rwlock_timedrdlock; pthread_rwlock_timedwrlock; +++ +++ pthread_attr_getstack; pthread_attr_setstack; +++ +++ pthread_spin_destroy; pthread_spin_init; pthread_spin_lock; +++ pthread_spin_trylock; pthread_spin_unlock; +++ +++ pthread_barrier_init; pthread_barrier_destroy; pthread_barrier_wait; +++ pthread_barrierattr_destroy; pthread_barrierattr_init; +++ pthread_barrierattr_setpshared; +++ +++ sem_timedwait; +++ +++ pthread_yield; +++ +++ pthread_getcpuclockid; +++ +++ # Cancellation points. +++ lseek64; open64; __open64; pread; pread64; __pread64; pwrite; pwrite64; +++ __pwrite64; +++ +++ # Names used internally. +++ __pthread_rwlock_init; __pthread_rwlock_destroy; +++ __pthread_rwlock_rdlock; __pthread_rwlock_tryrdlock; +++ __pthread_rwlock_wrlock; __pthread_rwlock_trywrlock; +++ __pthread_rwlock_unlock; +++ +++ __res_state; +++ } +++ +++ GLIBC_2.2.3 { +++ # Extensions. +++ pthread_getattr_np; +++ } +++ +++ GLIBC_2.2.6 { +++ # Cancellation wrapper +++ __nanosleep; +++ } +++ +++ GLIBC_2.3.2 { +++ # Changed pthread_cond_t. +++ pthread_cond_init; pthread_cond_destroy; +++ pthread_cond_wait; pthread_cond_timedwait; +++ pthread_cond_signal; pthread_cond_broadcast; +++ } +++ +++ GLIBC_2.3.3 { +++ # 1003.1-2001 function accidentally left out in 2.2. +++ pthread_barrierattr_getpshared; +++ +++ # Unix CS option. +++ pthread_condattr_getclock; pthread_condattr_setclock; +++ +++ # Proposed API extensions. +++ pthread_tryjoin_np; pthread_timedjoin_np; +++ +++ # New cancellation cleanup handling. +++ __pthread_register_cancel; __pthread_unregister_cancel; +++ __pthread_register_cancel_defer; __pthread_unregister_cancel_restore; +++ __pthread_unwind_next; +++ __pthread_cleanup_routine; +++ +++ # affinity interfaces without size parameter +++ # have not been in linuxthreads and +++ # will be overriden by version from GLIBC_2.3.4 +++ pthread_getaffinity_np; pthread_setaffinity_np; +++ pthread_attr_getaffinity_np; pthread_attr_setaffinity_np; +++ } +++ +++ GLIBC_2.3.4 { +++ # New affinity interfaces. +++ pthread_getaffinity_np; pthread_setaffinity_np; +++ pthread_attr_getaffinity_np; pthread_attr_setaffinity_np; +++ } +++ +++ GLIBC_2.12 { +++ pthread_setname_np; pthread_getname_np; +++ }; +++ +++ GLIBC_2.18 { +++ pthread_getattr_default_np; +++ pthread_setattr_default_np; +++ } +++ +++ GLIBC_PRIVATE { +++ __pthread_initialize_minimal; +++ __pthread_clock_gettime; __pthread_clock_settime; +++ __pthread_unwind; __pthread_get_minstack; +++ __shm_directory; +++ } +++} ++--- /dev/null +++++ b/fbtl/alloca_cutoff.c ++@@ -0,0 +1,36 @@ +++/* Determine whether block of given size can be allocated on the stack or not. +++ Copyright (C) 2002-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; see the file COPYING.LIB. If +++ not, see . */ +++ +++#include +++#include +++#include +++#include +++ +++ +++int +++__libc_alloca_cutoff (size_t size) +++{ +++ return size <= (MIN (__MAX_ALLOCA_CUTOFF, +++ THREAD_GETMEM (THREAD_SELF, stackblock_size) / 4 +++ /* The main thread, before the thread library is +++ initialized, has zero in the stackblock_size +++ element. Since it is the main thread we can +++ assume the maximum available stack space. */ +++ ?: __MAX_ALLOCA_CUTOFF * 4)); +++} +++libc_hidden_def (__libc_alloca_cutoff) ++--- /dev/null +++++ b/fbtl/allocatestack.c ++@@ -0,0 +1,1258 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++#if !(defined(NEED_SEPARATE_REGISTER_STACK) || defined(NEED_STACK_SIZE_FOR_PTH_CREATE)) +++ +++/* Most architectures have exactly one stack pointer. Some have more. */ +++# define STACK_VARIABLES void *stackaddr = NULL +++ +++/* How to pass the values to the 'create_thread' function. */ +++# define STACK_VARIABLES_ARGS stackaddr +++ +++/* How to declare function which gets there parameters. */ +++# define STACK_VARIABLES_PARMS void *stackaddr +++ +++/* How to declare allocate_stack. */ +++# define ALLOCATE_STACK_PARMS void **stack +++ +++/* This is how the function is called. We do it this way to allow +++ other variants of the function to have more parameters. */ +++# define ALLOCATE_STACK(attr, pd) allocate_stack (attr, pd, &stackaddr) +++ +++#else +++ +++/* We need two stacks. The kernel will place them but we have to tell +++ the kernel about the size of the reserved address space. */ +++# define STACK_VARIABLES void *stackaddr = NULL; size_t stacksize = 0 +++ +++/* How to pass the values to the 'create_thread' function. */ +++# define STACK_VARIABLES_ARGS stackaddr, stacksize +++ +++/* How to declare function which gets there parameters. */ +++# define STACK_VARIABLES_PARMS void *stackaddr, size_t stacksize +++ +++/* How to declare allocate_stack. */ +++# define ALLOCATE_STACK_PARMS void **stack, size_t *stacksize +++ +++/* This is how the function is called. We do it this way to allow +++ other variants of the function to have more parameters. */ +++# define ALLOCATE_STACK(attr, pd) \ +++ allocate_stack (attr, pd, &stackaddr, &stacksize) +++ +++#endif +++ +++ +++/* Default alignment of stack. */ +++#ifndef STACK_ALIGN +++# define STACK_ALIGN __alignof__ (long double) +++#endif +++ +++/* Default value for minimal stack size after allocating thread +++ descriptor and guard. */ +++#ifndef MINIMAL_REST_STACK +++# define MINIMAL_REST_STACK 4096 +++#endif +++ +++/* +++ Unfortunately, under FreeBSD mmap fails with addr=NULL, flags=MAP_STACK +++ +++ See http://www.freebsd.org/cgi/query-pr.cgi?pr=158755 +++ +++ do not use MAP_STACK at all +++*/ +++ +++#undef MAP_STACK +++ +++ +++/* Newer kernels have the MAP_STACK flag to indicate a mapping is used for +++ a stack. Use it when possible. */ +++#ifndef MAP_STACK +++# define MAP_STACK 0 +++#endif +++ +++/* This yields the pointer that TLS support code calls the thread pointer. */ +++#if TLS_TCB_AT_TP +++# define TLS_TPADJ(pd) (pd) +++#elif TLS_DTV_AT_TP +++# define TLS_TPADJ(pd) ((struct pthread *)((char *) (pd) + TLS_PRE_TCB_SIZE)) +++#endif +++ +++/* Cache handling for not-yet free stacks. */ +++ +++/* Maximum size in kB of cache. */ +++static size_t stack_cache_maxsize = 40 * 1024 * 1024; /* 40MiBi by default. */ +++static size_t stack_cache_actsize; +++ +++/* Mutex protecting this variable. */ +++static int stack_cache_lock = LLL_LOCK_INITIALIZER; +++ +++/* List of queued stack frames. */ +++static LIST_HEAD (stack_cache); +++ +++/* List of the stacks in use. */ +++static LIST_HEAD (stack_used); +++ +++/* We need to record what list operations we are going to do so that, +++ in case of an asynchronous interruption due to a fork() call, we +++ can correct for the work. */ +++static uintptr_t in_flight_stack; +++ +++/* List of the threads with user provided stacks in use. No need to +++ initialize this, since it's done in __pthread_initialize_minimal. */ +++list_t __stack_user __attribute__ ((nocommon)); +++hidden_data_def (__stack_user) +++ +++#if COLORING_INCREMENT != 0 +++/* Number of threads created. */ +++static unsigned int nptl_ncreated; +++#endif +++ +++ +++/* Check whether the stack is still used or not. */ +++#define FREE_P(descr) ((descr)->tid <= KTID_TERMINATED) +++ +++ +++static void +++stack_list_del (list_t *elem) +++{ +++ in_flight_stack = (uintptr_t) elem; +++ +++ atomic_write_barrier (); +++ +++ list_del (elem); +++ +++ atomic_write_barrier (); +++ +++ in_flight_stack = 0; +++} +++ +++ +++static void +++stack_list_add (list_t *elem, list_t *list) +++{ +++ in_flight_stack = (uintptr_t) elem | 1; +++ +++ atomic_write_barrier (); +++ +++ list_add (elem, list); +++ +++ atomic_write_barrier (); +++ +++ in_flight_stack = 0; +++} +++ +++ +++/* We create a double linked list of all cache entries. Double linked +++ because this allows removing entries from the end. */ +++ +++ +++/* Get a stack frame from the cache. We have to match by size since +++ some blocks might be too small or far too large. */ +++static struct pthread * +++get_cached_stack (size_t *sizep, void **memp) +++{ +++ size_t size = *sizep; +++ struct pthread *result = NULL; +++ list_t *entry; +++ +++ lll_lock (stack_cache_lock, LLL_PRIVATE); +++ +++ /* Search the cache for a matching entry. We search for the +++ smallest stack which has at least the required size. Note that +++ in normal situations the size of all allocated stacks is the +++ same. As the very least there are only a few different sizes. +++ Therefore this loop will exit early most of the time with an +++ exact match. */ +++ list_for_each (entry, &stack_cache) +++ { +++ struct pthread *curr; +++ +++ curr = list_entry (entry, struct pthread, list); +++ if (FREE_P (curr) && curr->stackblock_size >= size) +++ { +++ if (curr->stackblock_size == size) +++ { +++ result = curr; +++ break; +++ } +++ +++ if (result == NULL +++ || result->stackblock_size > curr->stackblock_size) +++ result = curr; +++ } +++ } +++ +++ if (__builtin_expect (result == NULL, 0) +++ /* Make sure the size difference is not too excessive. In that +++ case we do not use the block. */ +++ || __builtin_expect (result->stackblock_size > 4 * size, 0)) +++ { +++ /* Release the lock. */ +++ lll_unlock (stack_cache_lock, LLL_PRIVATE); +++ +++ return NULL; +++ } +++ +++ /* Don't allow setxid until cloned. */ +++ result->setxid_futex = -1; +++ +++ /* Dequeue the entry. */ +++ stack_list_del (&result->list); +++ +++ /* And add to the list of stacks in use. */ +++ stack_list_add (&result->list, &stack_used); +++ +++ /* And decrease the cache size. */ +++ stack_cache_actsize -= result->stackblock_size; +++ +++ /* Release the lock early. */ +++ lll_unlock (stack_cache_lock, LLL_PRIVATE); +++ +++ /* Report size and location of the stack to the caller. */ +++ *sizep = result->stackblock_size; +++ *memp = result->stackblock; +++ +++ /* Cancellation handling is back to the default. */ +++ result->cancelhandling = 0; +++ result->cleanup = NULL; +++ +++ /* No pending event. */ +++ result->nextevent = NULL; +++ +++ /* Clear the DTV. */ +++ dtv_t *dtv = GET_DTV (TLS_TPADJ (result)); +++ for (size_t cnt = 0; cnt < dtv[-1].counter; ++cnt) +++ free (dtv[1 + cnt].pointer.to_free); +++ memset (dtv, '\0', (dtv[-1].counter + 1) * sizeof (dtv_t)); +++ +++ /* Re-initialize the TLS. */ +++ _dl_allocate_tls_init (TLS_TPADJ (result)); +++ +++ return result; +++} +++ +++ +++/* Free stacks until cache size is lower than LIMIT. */ +++void +++__free_stacks (size_t limit) +++{ +++ /* We reduce the size of the cache. Remove the last entries until +++ the size is below the limit. */ +++ list_t *entry; +++ list_t *prev; +++ +++ /* Search from the end of the list. */ +++ list_for_each_prev_safe (entry, prev, &stack_cache) +++ { +++ struct pthread *curr; +++ +++ curr = list_entry (entry, struct pthread, list); +++ if (FREE_P (curr)) +++ { +++ /* Unlink the block. */ +++ stack_list_del (entry); +++ +++ /* Account for the freed memory. */ +++ stack_cache_actsize -= curr->stackblock_size; +++ +++ /* Free the memory associated with the ELF TLS. */ +++ _dl_deallocate_tls (TLS_TPADJ (curr), false); +++ +++ /* Remove this block. This should never fail. If it does +++ something is really wrong. */ +++ if (munmap (curr->stackblock, curr->stackblock_size) != 0) +++ abort (); +++ +++ /* Maybe we have freed enough. */ +++ if (stack_cache_actsize <= limit) +++ break; +++ } +++ } +++} +++ +++ +++/* Add a stack frame which is not used anymore to the stack. Must be +++ called with the cache lock held. */ +++static inline void +++__attribute ((always_inline)) +++queue_stack (struct pthread *stack) +++{ +++ /* We unconditionally add the stack to the list. The memory may +++ still be in use but it will not be reused until the kernel marks +++ the stack as not used anymore. */ +++ stack_list_add (&stack->list, &stack_cache); +++ +++ stack_cache_actsize += stack->stackblock_size; +++ if (__glibc_unlikely (stack_cache_actsize > stack_cache_maxsize)) +++ __free_stacks (stack_cache_maxsize); +++} +++ +++ +++static int +++internal_function +++change_stack_perm (struct pthread *pd +++#ifdef NEED_SEPARATE_REGISTER_STACK +++ , size_t pagemask +++#endif +++ ) +++{ +++#ifdef NEED_SEPARATE_REGISTER_STACK +++ void *stack = (pd->stackblock +++ + (((((pd->stackblock_size - pd->guardsize) / 2) +++ & pagemask) + pd->guardsize) & pagemask)); +++ size_t len = pd->stackblock + pd->stackblock_size - stack; +++#elif _STACK_GROWS_DOWN +++ void *stack = pd->stackblock + pd->guardsize; +++ size_t len = pd->stackblock_size - pd->guardsize; +++#elif _STACK_GROWS_UP +++ void *stack = pd->stackblock; +++ size_t len = (uintptr_t) pd - pd->guardsize - (uintptr_t) pd->stackblock; +++#else +++# error "Define either _STACK_GROWS_DOWN or _STACK_GROWS_UP" +++#endif +++ if (mprotect (stack, len, PROT_READ | PROT_WRITE | PROT_EXEC) != 0) +++ return errno; +++ +++ return 0; +++} +++ +++ +++/* Returns a usable stack for a new thread either by allocating a +++ new stack or reusing a cached stack of sufficient size. +++ ATTR must be non-NULL and point to a valid pthread_attr. +++ PDP must be non-NULL. */ +++static int +++allocate_stack (const struct pthread_attr *attr, struct pthread **pdp, +++ ALLOCATE_STACK_PARMS) +++{ +++ struct pthread *pd; +++ size_t size; +++ size_t pagesize_m1 = __getpagesize () - 1; +++ void *stacktop; +++ +++ assert (powerof2 (pagesize_m1 + 1)); +++ assert (TCB_ALIGNMENT >= STACK_ALIGN); +++ +++ /* Get the stack size from the attribute if it is set. Otherwise we +++ use the default we determined at start time. */ +++ if (attr->stacksize != 0) +++ size = attr->stacksize; +++ else +++ { +++ lll_lock (__default_pthread_attr_lock, LLL_PRIVATE); +++ size = __default_pthread_attr.stacksize; +++ lll_unlock (__default_pthread_attr_lock, LLL_PRIVATE); +++ } +++ +++ /* Get memory for the stack. */ +++ if (__glibc_unlikely (attr->flags & ATTR_FLAG_STACKADDR)) +++ { +++ uintptr_t adj; +++ +++ /* If the user also specified the size of the stack make sure it +++ is large enough. */ +++ if (attr->stacksize != 0 +++ && attr->stacksize < (__static_tls_size + MINIMAL_REST_STACK)) +++ return EINVAL; +++ +++ /* Adjust stack size for alignment of the TLS block. */ +++#if TLS_TCB_AT_TP +++ adj = ((uintptr_t) attr->stackaddr - TLS_TCB_SIZE) +++ & __static_tls_align_m1; +++ assert (size > adj + TLS_TCB_SIZE); +++#elif TLS_DTV_AT_TP +++ adj = ((uintptr_t) attr->stackaddr - __static_tls_size) +++ & __static_tls_align_m1; +++ assert (size > adj); +++#endif +++ +++ /* The user provided some memory. Let's hope it matches the +++ size... We do not allocate guard pages if the user provided +++ the stack. It is the user's responsibility to do this if it +++ is wanted. */ +++#if TLS_TCB_AT_TP +++ pd = (struct pthread *) ((uintptr_t) attr->stackaddr +++ - TLS_TCB_SIZE - adj); +++#elif TLS_DTV_AT_TP +++ pd = (struct pthread *) (((uintptr_t) attr->stackaddr +++ - __static_tls_size - adj) +++ - TLS_PRE_TCB_SIZE); +++#endif +++ +++ /* The user provided stack memory needs to be cleared. */ +++ memset (pd, '\0', sizeof (struct pthread)); +++ +++ /* The first TSD block is included in the TCB. */ +++ pd->specific[0] = pd->specific_1stblock; +++ +++ /* Remember the stack-related values. */ +++ pd->stackblock = (char *) attr->stackaddr - size; +++ pd->stackblock_size = size; +++ +++ /* This is a user-provided stack. It will not be queued in the +++ stack cache nor will the memory (except the TLS memory) be freed. */ +++ pd->user_stack = true; +++ +++ /* This is at least the second thread. */ +++ pd->header.multiple_threads = 1; +++#ifndef TLS_MULTIPLE_THREADS_IN_TCB +++ __pthread_multiple_threads = *__libc_multiple_threads_ptr = 1; +++#endif +++ +++#ifndef __ASSUME_PRIVATE_FUTEX +++ /* The thread must know when private futexes are supported. */ +++ pd->header.private_futex = THREAD_GETMEM (THREAD_SELF, +++ header.private_futex); +++#endif +++ +++#ifdef NEED_DL_SYSINFO +++ /* Copy the sysinfo value from the parent. */ +++ THREAD_SYSINFO(pd) = THREAD_SELF_SYSINFO; +++#endif +++ +++ /* Don't allow setxid until cloned. */ +++ pd->setxid_futex = -1; +++ +++ /* Allocate the DTV for this thread. */ +++ if (_dl_allocate_tls (TLS_TPADJ (pd)) == NULL) +++ { +++ /* Something went wrong. */ +++ assert (errno == ENOMEM); +++ return errno; +++ } +++ +++ +++ /* Prepare to modify global data. */ +++ lll_lock (stack_cache_lock, LLL_PRIVATE); +++ +++ /* And add to the list of stacks in use. */ +++ list_add (&pd->list, &__stack_user); +++ +++ lll_unlock (stack_cache_lock, LLL_PRIVATE); +++ } +++ else +++ { +++ /* Allocate some anonymous memory. If possible use the cache. */ +++ size_t guardsize; +++ size_t reqsize; +++ void *mem; +++ const int prot = (PROT_READ | PROT_WRITE +++ | ((GL(dl_stack_flags) & PF_X) ? PROT_EXEC : 0)); +++ +++#if COLORING_INCREMENT != 0 +++ /* Add one more page for stack coloring. Don't do it for stacks +++ with 16 times pagesize or larger. This might just cause +++ unnecessary misalignment. */ +++ if (size <= 16 * pagesize_m1) +++ size += pagesize_m1 + 1; +++#endif +++ +++ /* Adjust the stack size for alignment. */ +++ size &= ~__static_tls_align_m1; +++ assert (size != 0); +++ +++ /* Make sure the size of the stack is enough for the guard and +++ eventually the thread descriptor. */ +++ guardsize = (attr->guardsize + pagesize_m1) & ~pagesize_m1; +++ if (__builtin_expect (size < ((guardsize + __static_tls_size +++ + MINIMAL_REST_STACK + pagesize_m1) +++ & ~pagesize_m1), +++ 0)) +++ /* The stack is too small (or the guard too large). */ +++ return EINVAL; +++ +++ /* Try to get a stack from the cache. */ +++ reqsize = size; +++ pd = get_cached_stack (&size, &mem); +++ if (pd == NULL) +++ { +++ /* To avoid aliasing effects on a larger scale than pages we +++ adjust the allocated stack size if necessary. This way +++ allocations directly following each other will not have +++ aliasing problems. */ +++#if MULTI_PAGE_ALIASING != 0 +++ if ((size % MULTI_PAGE_ALIASING) == 0) +++ size += pagesize_m1 + 1; +++#endif +++ +++ mem = mmap (NULL, size, prot, +++ MAP_PRIVATE | MAP_ANONYMOUS | MAP_STACK, -1, 0); +++ +++ if (__glibc_unlikely (mem == MAP_FAILED)) +++ return errno; +++ +++ /* SIZE is guaranteed to be greater than zero. +++ So we can never get a null pointer back from mmap. */ +++ assert (mem != NULL); +++ +++#if COLORING_INCREMENT != 0 +++ /* Atomically increment NCREATED. */ +++ unsigned int ncreated = atomic_increment_val (&nptl_ncreated); +++ +++ /* We chose the offset for coloring by incrementing it for +++ every new thread by a fixed amount. The offset used +++ module the page size. Even if coloring would be better +++ relative to higher alignment values it makes no sense to +++ do it since the mmap() interface does not allow us to +++ specify any alignment for the returned memory block. */ +++ size_t coloring = (ncreated * COLORING_INCREMENT) & pagesize_m1; +++ +++ /* Make sure the coloring offsets does not disturb the alignment +++ of the TCB and static TLS block. */ +++ if (__glibc_unlikely ((coloring & __static_tls_align_m1) != 0)) +++ coloring = (((coloring + __static_tls_align_m1) +++ & ~(__static_tls_align_m1)) +++ & ~pagesize_m1); +++#else +++ /* Unless specified we do not make any adjustments. */ +++# define coloring 0 +++#endif +++ +++ /* Place the thread descriptor at the end of the stack. */ +++#if TLS_TCB_AT_TP +++ pd = (struct pthread *) ((char *) mem + size - coloring) - 1; +++#elif TLS_DTV_AT_TP +++ pd = (struct pthread *) ((((uintptr_t) mem + size - coloring +++ - __static_tls_size) +++ & ~__static_tls_align_m1) +++ - TLS_PRE_TCB_SIZE); +++#endif +++ +++ /* Remember the stack-related values. */ +++ pd->stackblock = mem; +++ pd->stackblock_size = size; +++ +++ /* We allocated the first block thread-specific data array. +++ This address will not change for the lifetime of this +++ descriptor. */ +++ pd->specific[0] = pd->specific_1stblock; +++ +++ /* This is at least the second thread. */ +++ pd->header.multiple_threads = 1; +++#ifndef TLS_MULTIPLE_THREADS_IN_TCB +++ __pthread_multiple_threads = *__libc_multiple_threads_ptr = 1; +++#endif +++ +++#ifndef __ASSUME_PRIVATE_FUTEX +++ /* The thread must know when private futexes are supported. */ +++ pd->header.private_futex = THREAD_GETMEM (THREAD_SELF, +++ header.private_futex); +++#endif +++ +++#ifdef NEED_DL_SYSINFO +++ /* Copy the sysinfo value from the parent. */ +++ THREAD_SYSINFO(pd) = THREAD_SELF_SYSINFO; +++#endif +++ +++ /* Don't allow setxid until cloned. */ +++ pd->setxid_futex = -1; +++ +++ /* Allocate the DTV for this thread. */ +++ if (_dl_allocate_tls (TLS_TPADJ (pd)) == NULL) +++ { +++ /* Something went wrong. */ +++ assert (errno == ENOMEM); +++ +++ /* Free the stack memory we just allocated. */ +++ (void) munmap (mem, size); +++ +++ return errno; +++ } +++ +++ +++ /* Prepare to modify global data. */ +++ lll_lock (stack_cache_lock, LLL_PRIVATE); +++ +++ /* And add to the list of stacks in use. */ +++ stack_list_add (&pd->list, &stack_used); +++ +++ lll_unlock (stack_cache_lock, LLL_PRIVATE); +++ +++ +++ /* There might have been a race. Another thread might have +++ caused the stacks to get exec permission while this new +++ stack was prepared. Detect if this was possible and +++ change the permission if necessary. */ +++ if (__builtin_expect ((GL(dl_stack_flags) & PF_X) != 0 +++ && (prot & PROT_EXEC) == 0, 0)) +++ { +++ int err = change_stack_perm (pd +++#ifdef NEED_SEPARATE_REGISTER_STACK +++ , ~pagesize_m1 +++#endif +++ ); +++ if (err != 0) +++ { +++ /* Free the stack memory we just allocated. */ +++ (void) munmap (mem, size); +++ +++ return err; +++ } +++ } +++ +++ +++ /* Note that all of the stack and the thread descriptor is +++ zeroed. This means we do not have to initialize fields +++ with initial value zero. This is specifically true for +++ the 'tid' field which is always set back to zero once the +++ stack is not used anymore and for the 'guardsize' field +++ which will be read next. */ +++ } +++ +++ /* Create or resize the guard area if necessary. */ +++ if (__glibc_unlikely (guardsize > pd->guardsize)) +++ { +++#ifdef NEED_SEPARATE_REGISTER_STACK +++ char *guard = mem + (((size - guardsize) / 2) & ~pagesize_m1); +++#elif _STACK_GROWS_DOWN +++ char *guard = mem; +++# elif _STACK_GROWS_UP +++ char *guard = (char *) (((uintptr_t) pd - guardsize) & ~pagesize_m1); +++#endif +++ if (mprotect (guard, guardsize, PROT_NONE) != 0) +++ { +++ mprot_error: +++ lll_lock (stack_cache_lock, LLL_PRIVATE); +++ +++ /* Remove the thread from the list. */ +++ stack_list_del (&pd->list); +++ +++ lll_unlock (stack_cache_lock, LLL_PRIVATE); +++ +++ /* Get rid of the TLS block we allocated. */ +++ _dl_deallocate_tls (TLS_TPADJ (pd), false); +++ +++ /* Free the stack memory regardless of whether the size +++ of the cache is over the limit or not. If this piece +++ of memory caused problems we better do not use it +++ anymore. Uh, and we ignore possible errors. There +++ is nothing we could do. */ +++ (void) munmap (mem, size); +++ +++ return errno; +++ } +++ +++ pd->guardsize = guardsize; +++ } +++ else if (__builtin_expect (pd->guardsize - guardsize > size - reqsize, +++ 0)) +++ { +++ /* The old guard area is too large. */ +++ +++#ifdef NEED_SEPARATE_REGISTER_STACK +++ char *guard = mem + (((size - guardsize) / 2) & ~pagesize_m1); +++ char *oldguard = mem + (((size - pd->guardsize) / 2) & ~pagesize_m1); +++ +++ if (oldguard < guard +++ && mprotect (oldguard, guard - oldguard, prot) != 0) +++ goto mprot_error; +++ +++ if (mprotect (guard + guardsize, +++ oldguard + pd->guardsize - guard - guardsize, +++ prot) != 0) +++ goto mprot_error; +++#elif _STACK_GROWS_DOWN +++ if (mprotect ((char *) mem + guardsize, pd->guardsize - guardsize, +++ prot) != 0) +++ goto mprot_error; +++#elif _STACK_GROWS_UP +++ if (mprotect ((char *) pd - pd->guardsize, +++ pd->guardsize - guardsize, prot) != 0) +++ goto mprot_error; +++#endif +++ +++ pd->guardsize = guardsize; +++ } +++ /* The pthread_getattr_np() calls need to get passed the size +++ requested in the attribute, regardless of how large the +++ actually used guardsize is. */ +++ pd->reported_guardsize = guardsize; +++ } +++ +++ /* Initialize the lock. We have to do this unconditionally since the +++ stillborn thread could be canceled while the lock is taken. */ +++ pd->lock = LLL_LOCK_INITIALIZER; +++ +++ /* The robust mutex lists also need to be initialized +++ unconditionally because the cleanup for the previous stack owner +++ might have happened in the kernel. */ +++ pd->robust_head.futex_offset = (offsetof (pthread_mutex_t, __data.__lock) +++ - offsetof (pthread_mutex_t, +++ __data.__list.__next)); +++ pd->robust_head.list_op_pending = NULL; +++#ifdef __PTHREAD_MUTEX_HAVE_PREV +++ pd->robust_prev = &pd->robust_head; +++#endif +++ pd->robust_head.list = &pd->robust_head; +++ +++ /* We place the thread descriptor at the end of the stack. */ +++ *pdp = pd; +++ +++#if TLS_TCB_AT_TP +++ /* The stack begins before the TCB and the static TLS block. */ +++ stacktop = ((char *) (pd + 1) - __static_tls_size); +++#elif TLS_DTV_AT_TP +++ stacktop = (char *) (pd - 1); +++#endif +++ +++#if defined(NEED_SEPARATE_REGISTER_STACK) || defined(NEED_STACK_SIZE_FOR_PTH_CREATE) +++ *stack = pd->stackblock; +++ *stacksize = stacktop - *stack; +++#elif _STACK_GROWS_DOWN +++ *stack = stacktop; +++#elif _STACK_GROWS_UP +++ *stack = pd->stackblock; +++ assert (*stack > 0); +++#endif +++ +++ return 0; +++} +++ +++ +++void +++internal_function +++__deallocate_stack (struct pthread *pd) +++{ +++ lll_lock (stack_cache_lock, LLL_PRIVATE); +++ +++ /* Remove the thread from the list of threads with user defined +++ stacks. */ +++ stack_list_del (&pd->list); +++ +++ /* Not much to do. Just free the mmap()ed memory. Note that we do +++ not reset the 'used' flag in the 'tid' field. This is done by +++ the kernel. If no thread has been created yet this field is +++ still zero. */ +++ if (__glibc_likely (! pd->user_stack)) +++ (void) queue_stack (pd); +++ else +++ /* Free the memory associated with the ELF TLS. */ +++ _dl_deallocate_tls (TLS_TPADJ (pd), false); +++ +++ lll_unlock (stack_cache_lock, LLL_PRIVATE); +++} +++ +++ +++int +++internal_function +++__make_stacks_executable (void **stack_endp) +++{ +++ /* First the main thread's stack. */ +++ int err = _dl_make_stack_executable (stack_endp); +++ if (err != 0) +++ return err; +++ +++#ifdef NEED_SEPARATE_REGISTER_STACK +++ const size_t pagemask = ~(__getpagesize () - 1); +++#endif +++ +++ lll_lock (stack_cache_lock, LLL_PRIVATE); +++ +++ list_t *runp; +++ list_for_each (runp, &stack_used) +++ { +++ err = change_stack_perm (list_entry (runp, struct pthread, list) +++#ifdef NEED_SEPARATE_REGISTER_STACK +++ , pagemask +++#endif +++ ); +++ if (err != 0) +++ break; +++ } +++ +++ /* Also change the permission for the currently unused stacks. This +++ might be wasted time but better spend it here than adding a check +++ in the fast path. */ +++ if (err == 0) +++ list_for_each (runp, &stack_cache) +++ { +++ err = change_stack_perm (list_entry (runp, struct pthread, list) +++#ifdef NEED_SEPARATE_REGISTER_STACK +++ , pagemask +++#endif +++ ); +++ if (err != 0) +++ break; +++ } +++ +++ lll_unlock (stack_cache_lock, LLL_PRIVATE); +++ +++ return err; +++} +++ +++ +++/* In case of a fork() call the memory allocation in the child will be +++ the same but only one thread is running. All stacks except that of +++ the one running thread are not used anymore. We have to recycle +++ them. */ +++void +++__reclaim_stacks (void) +++{ +++ struct pthread *self = (struct pthread *) THREAD_SELF; +++ +++ /* No locking necessary. The caller is the only stack in use. But +++ we have to be aware that we might have interrupted a list +++ operation. */ +++ +++ if (in_flight_stack != 0) +++ { +++ bool add_p = in_flight_stack & 1; +++ list_t *elem = (list_t *) (in_flight_stack & ~(uintptr_t) 1); +++ +++ if (add_p) +++ { +++ /* We always add at the beginning of the list. So in this +++ case we only need to check the beginning of these lists. */ +++ int check_list (list_t *l) +++ { +++ if (l->next->prev != l) +++ { +++ assert (l->next->prev == elem); +++ +++ elem->next = l->next; +++ elem->prev = l; +++ l->next = elem; +++ +++ return 1; +++ } +++ +++ return 0; +++ } +++ +++ if (check_list (&stack_used) == 0) +++ (void) check_list (&stack_cache); +++ } +++ else +++ { +++ /* We can simply always replay the delete operation. */ +++ elem->next->prev = elem->prev; +++ elem->prev->next = elem->next; +++ } +++ } +++ +++ /* Mark all stacks except the still running one as free. */ +++ list_t *runp; +++ list_for_each (runp, &stack_used) +++ { +++ struct pthread *curp = list_entry (runp, struct pthread, list); +++ if (curp != self) +++ { +++ /* This marks the stack as free. */ +++ curp->tid = 0; +++ +++ /* Account for the size of the stack. */ +++ stack_cache_actsize += curp->stackblock_size; +++ +++ if (curp->specific_used) +++ { +++ /* Clear the thread-specific data. */ +++ memset (curp->specific_1stblock, '\0', +++ sizeof (curp->specific_1stblock)); +++ +++ curp->specific_used = false; +++ +++ for (size_t cnt = 1; cnt < PTHREAD_KEY_1STLEVEL_SIZE; ++cnt) +++ if (curp->specific[cnt] != NULL) +++ { +++ memset (curp->specific[cnt], '\0', +++ sizeof (curp->specific_1stblock)); +++ +++ /* We have allocated the block which we do not +++ free here so re-set the bit. */ +++ curp->specific_used = true; +++ } +++ } +++ } +++ } +++ +++ /* Add the stack of all running threads to the cache. */ +++ list_splice (&stack_used, &stack_cache); +++ +++ /* Remove the entry for the current thread to from the cache list +++ and add it to the list of running threads. Which of the two +++ lists is decided by the user_stack flag. */ +++ stack_list_del (&self->list); +++ +++ /* Re-initialize the lists for all the threads. */ +++ INIT_LIST_HEAD (&stack_used); +++ INIT_LIST_HEAD (&__stack_user); +++ +++ if (__glibc_unlikely (THREAD_GETMEM (self, user_stack))) +++ list_add (&self->list, &__stack_user); +++ else +++ list_add (&self->list, &stack_used); +++ +++ /* There is one thread running. */ +++ __nptl_nthreads = 1; +++ +++ in_flight_stack = 0; +++ +++ /* Initialize locks. */ +++ stack_cache_lock = LLL_LOCK_INITIALIZER; +++ __default_pthread_attr_lock = LLL_LOCK_INITIALIZER; +++} +++ +++ +++#if HP_TIMING_AVAIL +++# undef __find_thread_by_id +++/* Find a thread given the thread ID. */ +++attribute_hidden +++struct pthread * +++__find_thread_by_id (pid_t tid) +++{ +++ struct pthread *result = NULL; +++ +++ lll_lock (stack_cache_lock, LLL_PRIVATE); +++ +++ /* Iterate over the list with system-allocated threads first. */ +++ list_t *runp; +++ list_for_each (runp, &stack_used) +++ { +++ struct pthread *curp; +++ +++ curp = list_entry (runp, struct pthread, list); +++ +++ if (curp->tid == tid) +++ { +++ result = curp; +++ goto out; +++ } +++ } +++ +++ /* Now the list with threads using user-allocated stacks. */ +++ list_for_each (runp, &__stack_user) +++ { +++ struct pthread *curp; +++ +++ curp = list_entry (runp, struct pthread, list); +++ +++ if (curp->tid == tid) +++ { +++ result = curp; +++ goto out; +++ } +++ } +++ +++ out: +++ lll_unlock (stack_cache_lock, LLL_PRIVATE); +++ +++ return result; +++} +++#endif +++ +++ +++static void +++internal_function +++setxid_mark_thread (struct xid_command *cmdp, struct pthread *t) +++{ +++ int ch; +++ +++ /* Wait until this thread is cloned. */ +++ if (t->setxid_futex == -1 +++ && ! atomic_compare_and_exchange_bool_acq (&t->setxid_futex, -2, -1)) +++ do +++ lll_futex_wait (&t->setxid_futex, -2, LLL_PRIVATE); +++ while (t->setxid_futex == -2); +++ +++ /* Don't let the thread exit before the setxid handler runs. */ +++ t->setxid_futex = 0; +++ +++ do +++ { +++ ch = t->cancelhandling; +++ +++ /* If the thread is exiting right now, ignore it. */ +++ if ((ch & EXITING_BITMASK) != 0) +++ { +++ /* Release the futex if there is no other setxid in +++ progress. */ +++ if ((ch & SETXID_BITMASK) == 0) +++ { +++ t->setxid_futex = 1; +++ lll_futex_wake (&t->setxid_futex, 1, LLL_PRIVATE); +++ } +++ return; +++ } +++ } +++ while (atomic_compare_and_exchange_bool_acq (&t->cancelhandling, +++ ch | SETXID_BITMASK, ch)); +++} +++ +++ +++static void +++internal_function +++setxid_unmark_thread (struct xid_command *cmdp, struct pthread *t) +++{ +++ int ch; +++ +++ do +++ { +++ ch = t->cancelhandling; +++ if ((ch & SETXID_BITMASK) == 0) +++ return; +++ } +++ while (atomic_compare_and_exchange_bool_acq (&t->cancelhandling, +++ ch & ~SETXID_BITMASK, ch)); +++ +++ /* Release the futex just in case. */ +++ t->setxid_futex = 1; +++ lll_futex_wake (&t->setxid_futex, 1, LLL_PRIVATE); +++} +++ +++ +++static int +++internal_function +++setxid_signal_thread (struct xid_command *cmdp, struct pthread *t) +++{ +++ if ((t->cancelhandling & SETXID_BITMASK) == 0) +++ return 0; +++ +++#warning setxid fixup needed +++#if 0 +++ int val; +++ pid_t pid = __getpid (); +++ INTERNAL_SYSCALL_DECL (err); +++ val = INTERNAL_SYSCALL (tgkill, err, pid, t->tid, SIGSETXID); +++ +++ /* If this failed, it must have had not started yet or else exited. */ +++ if (!INTERNAL_SYSCALL_ERROR_P (val, err)) +++ { +++ atomic_increment (&cmdp->cntr); +++ return 1; +++ } +++ else +++#endif +++ return 0; +++} +++ +++ +++int +++attribute_hidden +++__nptl_setxid (struct xid_command *cmdp) +++{ +++#warning setxid fixup needed +++#if 0 +++ int signalled; +++ int result; +++ lll_lock (stack_cache_lock, LLL_PRIVATE); +++ +++ __xidcmd = cmdp; +++ cmdp->cntr = 0; +++ +++ struct pthread *self = THREAD_SELF; +++ +++ /* Iterate over the list with system-allocated threads first. */ +++ list_t *runp; +++ list_for_each (runp, &stack_used) +++ { +++ struct pthread *t = list_entry (runp, struct pthread, list); +++ if (t == self) +++ continue; +++ +++ setxid_mark_thread (cmdp, t); +++ } +++ +++ /* Now the list with threads using user-allocated stacks. */ +++ list_for_each (runp, &__stack_user) +++ { +++ struct pthread *t = list_entry (runp, struct pthread, list); +++ if (t == self) +++ continue; +++ +++ setxid_mark_thread (cmdp, t); +++ } +++ +++ /* Iterate until we don't succeed in signalling anyone. That means +++ we have gotten all running threads, and their children will be +++ automatically correct once started. */ +++ do +++ { +++ signalled = 0; +++ +++ list_for_each (runp, &stack_used) +++ { +++ struct pthread *t = list_entry (runp, struct pthread, list); +++ if (t == self) +++ continue; +++ +++ signalled += setxid_signal_thread (cmdp, t); +++ } +++ +++ list_for_each (runp, &__stack_user) +++ { +++ struct pthread *t = list_entry (runp, struct pthread, list); +++ if (t == self) +++ continue; +++ +++ signalled += setxid_signal_thread (cmdp, t); +++ } +++ +++ int cur = cmdp->cntr; +++ while (cur != 0) +++ { +++ lll_futex_wait (&cmdp->cntr, cur, LLL_PRIVATE); +++ cur = cmdp->cntr; +++ } +++ } +++ while (signalled != 0); +++ +++ /* Clean up flags, so that no thread blocks during exit waiting +++ for a signal which will never come. */ +++ list_for_each (runp, &stack_used) +++ { +++ struct pthread *t = list_entry (runp, struct pthread, list); +++ if (t == self) +++ continue; +++ +++ setxid_unmark_thread (cmdp, t); +++ } +++ +++ list_for_each (runp, &__stack_user) +++ { +++ struct pthread *t = list_entry (runp, struct pthread, list); +++ if (t == self) +++ continue; +++ +++ setxid_unmark_thread (cmdp, t); +++ } +++ +++ /* This must be last, otherwise the current thread might not have +++ permissions to send SIGSETXID syscall to the other threads. */ +++ INTERNAL_SYSCALL_DECL (err); +++ result = INTERNAL_SYSCALL_NCS (cmdp->syscall_no, err, 3, +++ cmdp->id[0], cmdp->id[1], cmdp->id[2]); +++ if (INTERNAL_SYSCALL_ERROR_P (result, err)) +++ { +++ __set_errno (INTERNAL_SYSCALL_ERRNO (result, err)); +++ result = -1; +++ } +++ +++ lll_unlock (stack_cache_lock, LLL_PRIVATE); +++ return result; +++#endif +++} +++ +++static inline void __attribute__((always_inline)) +++init_one_static_tls (struct pthread *curp, struct link_map *map) +++{ +++# if TLS_TCB_AT_TP +++ void *dest = (char *) curp - map->l_tls_offset; +++# elif TLS_DTV_AT_TP +++ void *dest = (char *) curp + map->l_tls_offset + TLS_PRE_TCB_SIZE; +++# else +++# error "Either TLS_TCB_AT_TP or TLS_DTV_AT_TP must be defined" +++# endif +++ +++ /* We cannot delay the initialization of the Static TLS area, since +++ it can be accessed with LE or IE, but since the DTV is only used +++ by GD and LD, we can delay its update to avoid a race. */ +++ memset (__mempcpy (dest, map->l_tls_initimage, map->l_tls_initimage_size), +++ '\0', map->l_tls_blocksize - map->l_tls_initimage_size); +++} +++ +++void +++attribute_hidden +++__pthread_init_static_tls (struct link_map *map) +++{ +++ lll_lock (stack_cache_lock, LLL_PRIVATE); +++ +++ /* Iterate over the list with system-allocated threads first. */ +++ list_t *runp; +++ list_for_each (runp, &stack_used) +++ init_one_static_tls (list_entry (runp, struct pthread, list), map); +++ +++ /* Now the list with threads using user-allocated stacks. */ +++ list_for_each (runp, &__stack_user) +++ init_one_static_tls (list_entry (runp, struct pthread, list), map); +++ +++ lll_unlock (stack_cache_lock, LLL_PRIVATE); +++} +++ +++ +++void +++attribute_hidden +++__wait_lookup_done (void) +++{ +++ lll_lock (stack_cache_lock, LLL_PRIVATE); +++ +++ struct pthread *self = THREAD_SELF; +++ +++ /* Iterate over the list with system-allocated threads first. */ +++ list_t *runp; +++ list_for_each (runp, &stack_used) +++ { +++ struct pthread *t = list_entry (runp, struct pthread, list); +++ if (t == self || t->header.gscope_flag == THREAD_GSCOPE_FLAG_UNUSED) +++ continue; +++ +++ int *const gscope_flagp = &t->header.gscope_flag; +++ +++ /* We have to wait until this thread is done with the global +++ scope. First tell the thread that we are waiting and +++ possibly have to be woken. */ +++ if (atomic_compare_and_exchange_bool_acq (gscope_flagp, +++ THREAD_GSCOPE_FLAG_WAIT, +++ THREAD_GSCOPE_FLAG_USED)) +++ continue; +++ +++ do +++ lll_futex_wait (gscope_flagp, THREAD_GSCOPE_FLAG_WAIT, LLL_PRIVATE); +++ while (*gscope_flagp == THREAD_GSCOPE_FLAG_WAIT); +++ } +++ +++ /* Now the list with threads using user-allocated stacks. */ +++ list_for_each (runp, &__stack_user) +++ { +++ struct pthread *t = list_entry (runp, struct pthread, list); +++ if (t == self || t->header.gscope_flag == THREAD_GSCOPE_FLAG_UNUSED) +++ continue; +++ +++ int *const gscope_flagp = &t->header.gscope_flag; +++ +++ /* We have to wait until this thread is done with the global +++ scope. First tell the thread that we are waiting and +++ possibly have to be woken. */ +++ if (atomic_compare_and_exchange_bool_acq (gscope_flagp, +++ THREAD_GSCOPE_FLAG_WAIT, +++ THREAD_GSCOPE_FLAG_USED)) +++ continue; +++ +++ do +++ lll_futex_wait (gscope_flagp, THREAD_GSCOPE_FLAG_WAIT, LLL_PRIVATE); +++ while (*gscope_flagp == THREAD_GSCOPE_FLAG_WAIT); +++ } +++ +++ lll_unlock (stack_cache_lock, LLL_PRIVATE); +++} ++--- /dev/null +++++ b/fbtl/cancellation.c ++@@ -0,0 +1,99 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include "pthreadP.h" +++ +++ +++/* The next two functions are similar to pthread_setcanceltype() but +++ more specialized for the use in the cancelable functions like write(). +++ They do not need to check parameters etc. */ +++int +++attribute_hidden +++__pthread_enable_asynccancel (void) +++{ +++ struct pthread *self = THREAD_SELF; +++ int oldval = THREAD_GETMEM (self, cancelhandling); +++ +++ while (1) +++ { +++ int newval = oldval | CANCELTYPE_BITMASK; +++ +++ if (newval == oldval) +++ break; +++ +++ int curval = THREAD_ATOMIC_CMPXCHG_VAL (self, cancelhandling, newval, +++ oldval); +++ if (__glibc_likely (curval == oldval)) +++ { +++ if (CANCEL_ENABLED_AND_CANCELED_AND_ASYNCHRONOUS (newval)) +++ { +++ THREAD_SETMEM (self, result, PTHREAD_CANCELED); +++ __do_cancel (); +++ } +++ +++ break; +++ } +++ +++ /* Prepare the next round. */ +++ oldval = curval; +++ } +++ +++ return oldval; +++} +++ +++ +++void +++internal_function attribute_hidden +++__pthread_disable_asynccancel (int oldtype) +++{ +++ /* If asynchronous cancellation was enabled before we do not have +++ anything to do. */ +++ if (oldtype & CANCELTYPE_BITMASK) +++ return; +++ +++ struct pthread *self = THREAD_SELF; +++ int newval; +++ +++ int oldval = THREAD_GETMEM (self, cancelhandling); +++ +++ while (1) +++ { +++ newval = oldval & ~CANCELTYPE_BITMASK; +++ +++ int curval = THREAD_ATOMIC_CMPXCHG_VAL (self, cancelhandling, newval, +++ oldval); +++ if (__glibc_likely (curval == oldval)) +++ break; +++ +++ /* Prepare the next round. */ +++ oldval = curval; +++ } +++ +++ /* We cannot return when we are being canceled. Upon return the +++ thread might be things which would have to be undone. The +++ following loop should loop until the cancellation signal is +++ delivered. */ +++ while (__builtin_expect ((newval & (CANCELING_BITMASK | CANCELED_BITMASK)) +++ == CANCELING_BITMASK, 0)) +++ { +++ lll_futex_wait (&self->cancelhandling, newval, LLL_PRIVATE); +++ newval = THREAD_GETMEM (self, cancelhandling); +++ } +++} ++--- /dev/null +++++ b/fbtl/cleanup.c ++@@ -0,0 +1,48 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include "pthreadP.h" +++ +++ +++void +++__cleanup_fct_attribute +++__pthread_register_cancel (__pthread_unwind_buf_t *buf) +++{ +++ struct pthread_unwind_buf *ibuf = (struct pthread_unwind_buf *) buf; +++ struct pthread *self = THREAD_SELF; +++ +++ /* Store old info. */ +++ ibuf->priv.data.prev = THREAD_GETMEM (self, cleanup_jmp_buf); +++ ibuf->priv.data.cleanup = THREAD_GETMEM (self, cleanup); +++ +++ /* Store the new cleanup handler info. */ +++ THREAD_SETMEM (self, cleanup_jmp_buf, (struct pthread_unwind_buf *) buf); +++} +++hidden_def (__pthread_register_cancel) +++ +++ +++void +++__cleanup_fct_attribute +++__pthread_unregister_cancel (__pthread_unwind_buf_t *buf) +++{ +++ struct pthread_unwind_buf *ibuf = (struct pthread_unwind_buf *) buf; +++ +++ THREAD_SETMEM (THREAD_SELF, cleanup_jmp_buf, ibuf->priv.data.prev); +++} +++hidden_def (__pthread_unregister_cancel) ++--- /dev/null +++++ b/fbtl/cleanup_compat.c ++@@ -0,0 +1,50 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include "pthreadP.h" +++ +++ +++void +++_pthread_cleanup_push (struct _pthread_cleanup_buffer *buffer, +++ void (*routine) (void *), void *arg) +++{ +++ struct pthread *self = THREAD_SELF; +++ +++ buffer->__routine = routine; +++ buffer->__arg = arg; +++ buffer->__prev = THREAD_GETMEM (self, cleanup); +++ +++ THREAD_SETMEM (self, cleanup, buffer); +++} +++strong_alias (_pthread_cleanup_push, __pthread_cleanup_push) +++ +++ +++void +++_pthread_cleanup_pop (struct _pthread_cleanup_buffer *buffer, int execute) +++{ +++ struct pthread *self __attribute ((unused)) = THREAD_SELF; +++ +++ THREAD_SETMEM (self, cleanup, buffer->__prev); +++ +++ /* If necessary call the cleanup routine after we removed the +++ current cleanup block from the list. */ +++ if (execute) +++ buffer->__routine (buffer->__arg); +++} +++strong_alias (_pthread_cleanup_pop, __pthread_cleanup_pop) ++--- /dev/null +++++ b/fbtl/cleanup_defer.c ++@@ -0,0 +1,91 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include "pthreadP.h" +++ +++ +++void +++__cleanup_fct_attribute +++__pthread_register_cancel_defer (__pthread_unwind_buf_t *buf) +++{ +++ struct pthread_unwind_buf *ibuf = (struct pthread_unwind_buf *) buf; +++ struct pthread *self = THREAD_SELF; +++ +++ /* Store old info. */ +++ ibuf->priv.data.prev = THREAD_GETMEM (self, cleanup_jmp_buf); +++ ibuf->priv.data.cleanup = THREAD_GETMEM (self, cleanup); +++ +++ int cancelhandling = THREAD_GETMEM (self, cancelhandling); +++ +++ /* Disable asynchronous cancellation for now. */ +++ if (__glibc_unlikely (cancelhandling & CANCELTYPE_BITMASK)) +++ while (1) +++ { +++ int curval = THREAD_ATOMIC_CMPXCHG_VAL (self, cancelhandling, +++ cancelhandling +++ & ~CANCELTYPE_BITMASK, +++ cancelhandling); +++ if (__glibc_likely (curval == cancelhandling)) +++ /* Successfully replaced the value. */ +++ break; +++ +++ /* Prepare for the next round. */ +++ cancelhandling = curval; +++ } +++ +++ ibuf->priv.data.canceltype = (cancelhandling & CANCELTYPE_BITMASK +++ ? PTHREAD_CANCEL_ASYNCHRONOUS +++ : PTHREAD_CANCEL_DEFERRED); +++ +++ /* Store the new cleanup handler info. */ +++ THREAD_SETMEM (self, cleanup_jmp_buf, (struct pthread_unwind_buf *) buf); +++} +++ +++ +++void +++__cleanup_fct_attribute +++__pthread_unregister_cancel_restore (__pthread_unwind_buf_t *buf) +++{ +++ struct pthread *self = THREAD_SELF; +++ struct pthread_unwind_buf *ibuf = (struct pthread_unwind_buf *) buf; +++ +++ THREAD_SETMEM (self, cleanup_jmp_buf, ibuf->priv.data.prev); +++ +++ int cancelhandling; +++ if (ibuf->priv.data.canceltype != PTHREAD_CANCEL_DEFERRED +++ && ((cancelhandling = THREAD_GETMEM (self, cancelhandling)) +++ & CANCELTYPE_BITMASK) == 0) +++ { +++ while (1) +++ { +++ int curval = THREAD_ATOMIC_CMPXCHG_VAL (self, cancelhandling, +++ cancelhandling +++ | CANCELTYPE_BITMASK, +++ cancelhandling); +++ if (__glibc_likely (curval == cancelhandling)) +++ /* Successfully replaced the value. */ +++ break; +++ +++ /* Prepare for the next round. */ +++ cancelhandling = curval; +++ } +++ +++ CANCELLATION_P (self); +++ } +++} ++--- /dev/null +++++ b/fbtl/cleanup_defer_compat.c ++@@ -0,0 +1,94 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include "pthreadP.h" +++ +++ +++void +++_pthread_cleanup_push_defer (struct _pthread_cleanup_buffer *buffer, +++ void (*routine) (void *), void *arg) +++{ +++ struct pthread *self = THREAD_SELF; +++ +++ buffer->__routine = routine; +++ buffer->__arg = arg; +++ buffer->__prev = THREAD_GETMEM (self, cleanup); +++ +++ int cancelhandling = THREAD_GETMEM (self, cancelhandling); +++ +++ /* Disable asynchronous cancellation for now. */ +++ if (__glibc_unlikely (cancelhandling & CANCELTYPE_BITMASK)) +++ while (1) +++ { +++ int curval = THREAD_ATOMIC_CMPXCHG_VAL (self, cancelhandling, +++ cancelhandling +++ & ~CANCELTYPE_BITMASK, +++ cancelhandling); +++ if (__glibc_likely (curval == cancelhandling)) +++ /* Successfully replaced the value. */ +++ break; +++ +++ /* Prepare for the next round. */ +++ cancelhandling = curval; +++ } +++ +++ buffer->__canceltype = (cancelhandling & CANCELTYPE_BITMASK +++ ? PTHREAD_CANCEL_ASYNCHRONOUS +++ : PTHREAD_CANCEL_DEFERRED); +++ +++ THREAD_SETMEM (self, cleanup, buffer); +++} +++strong_alias (_pthread_cleanup_push_defer, __pthread_cleanup_push_defer) +++ +++ +++void +++_pthread_cleanup_pop_restore (struct _pthread_cleanup_buffer *buffer, +++ int execute) +++{ +++ struct pthread *self = THREAD_SELF; +++ +++ THREAD_SETMEM (self, cleanup, buffer->__prev); +++ +++ int cancelhandling; +++ if (__builtin_expect (buffer->__canceltype != PTHREAD_CANCEL_DEFERRED, 0) +++ && ((cancelhandling = THREAD_GETMEM (self, cancelhandling)) +++ & CANCELTYPE_BITMASK) == 0) +++ { +++ while (1) +++ { +++ int curval = THREAD_ATOMIC_CMPXCHG_VAL (self, cancelhandling, +++ cancelhandling +++ | CANCELTYPE_BITMASK, +++ cancelhandling); +++ if (__glibc_likely (curval == cancelhandling)) +++ /* Successfully replaced the value. */ +++ break; +++ +++ /* Prepare for the next round. */ +++ cancelhandling = curval; +++ } +++ +++ CANCELLATION_P (self); +++ } +++ +++ /* If necessary call the cleanup routine after we removed the +++ current cleanup block from the list. */ +++ if (execute) +++ buffer->__routine (buffer->__arg); +++} +++strong_alias (_pthread_cleanup_pop_restore, __pthread_cleanup_pop_restore) ++--- /dev/null +++++ b/fbtl/cleanup_routine.c ++@@ -0,0 +1,27 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++ +++ +++void +++__pthread_cleanup_routine (struct __pthread_cleanup_frame *f) +++{ +++ if (f->__do_it) +++ f->__cancel_routine (f->__cancel_arg); +++} ++--- /dev/null +++++ b/fbtl/cond-perf.c ++@@ -0,0 +1,103 @@ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++static pthread_cond_t cond1 = PTHREAD_COND_INITIALIZER; +++static pthread_mutex_t mut1 = PTHREAD_MUTEX_INITIALIZER; +++ +++static pthread_cond_t cond2 = PTHREAD_COND_INITIALIZER; +++static pthread_mutex_t mut2 = PTHREAD_MUTEX_INITIALIZER; +++ +++static bool last_round; +++static int ntogo; +++static bool alldone; +++ +++ +++static void * +++cons (void *arg) +++{ +++ pthread_mutex_lock (&mut1); +++ +++ do +++ { +++ if (atomic_decrement_and_test (&ntogo)) +++ { +++ pthread_mutex_lock (&mut2); +++ alldone = true; +++ pthread_cond_signal (&cond2); +++ pthread_mutex_unlock (&mut2); +++ } +++ +++ pthread_cond_wait (&cond1, &mut1); +++ } +++ while (! last_round); +++ +++ pthread_mutex_unlock (&mut1); +++ +++ return NULL; +++} +++ +++ +++int +++main (int argc, char *argv[]) +++{ +++ int opt; +++ int err; +++ int nthreads = 10; +++ int nrounds = 100; +++ bool keeplock = false; +++ +++ while ((opt = getopt (argc, argv, "n:r:k")) != -1) +++ switch (opt) +++ { +++ case 'n': +++ nthreads = atol (optarg); +++ break; +++ case 'r': +++ nrounds = atol (optarg); +++ break; +++ case 'k': +++ keeplock = true; +++ break; +++ } +++ +++ ntogo = nthreads; +++ +++ pthread_t th[nthreads]; +++ int i; +++ for (i = 0; __builtin_expect (i < nthreads, 1); ++i) +++ if (__glibc_unlikely ((err = pthread_create (&th[i], NULL, cons, (void *) (long) i)) != 0)) +++ printf ("pthread_create: %s\n", strerror (err)); +++ +++ for (i = 0; __builtin_expect (i < nrounds, 1); ++i) +++ { +++ pthread_mutex_lock (&mut2); +++ while (! alldone) +++ pthread_cond_wait (&cond2, &mut2); +++ pthread_mutex_unlock (&mut2); +++ +++ pthread_mutex_lock (&mut1); +++ if (! keeplock) +++ pthread_mutex_unlock (&mut1); +++ +++ ntogo = nthreads; +++ alldone = false; +++ if (i + 1 >= nrounds) +++ last_round = true; +++ +++ pthread_cond_broadcast (&cond1); +++ +++ if (keeplock) +++ pthread_mutex_unlock (&mut1); +++ } +++ +++ for (i = 0; i < nthreads; ++i) +++ if ((err = pthread_join (th[i], NULL)) != 0) +++ printf ("pthread_create: %s\n", strerror (err)); +++ +++ return 0; +++} ++--- /dev/null +++++ b/fbtl/configure ++@@ -0,0 +1,13 @@ +++# This is a shell script fragment sourced by the main configure script. +++# We're obliged to give here the canonical name that will be used to +++# as a subdirectory to search for in other add-ons' sysdeps trees. +++ +++libc_add_on_canonical=fbtl +++ +++# Only linux configurations support NPTL. +++if test $add_ons_automatic = yes; then +++ case "$config_os" in +++# *linux*) ;; +++ *) libc_add_on= ;; +++ esac +++fi ++--- /dev/null +++++ b/fbtl/descr.h ++@@ -0,0 +1,406 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#ifndef _DESCR_H +++#define _DESCR_H 1 +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#define __need_list_t +++#include +++#include +++#include +++#include +++#include "../fbtl_db/thread_db.h" +++#include +++#include +++#define __need_res_state +++#include +++#include +++#include +++ +++#ifndef TCB_ALIGNMENT +++# define TCB_ALIGNMENT sizeof (double) +++#endif +++ +++ +++/* We keep thread specific data in a special data structure, a two-level +++ array. The top-level array contains pointers to dynamically allocated +++ arrays of a certain number of data pointers. So we can implement a +++ sparse array. Each dynamic second-level array has +++ PTHREAD_KEY_2NDLEVEL_SIZE +++ entries. This value shouldn't be too large. */ +++#define PTHREAD_KEY_2NDLEVEL_SIZE 32 +++ +++/* We need to address PTHREAD_KEYS_MAX key with PTHREAD_KEY_2NDLEVEL_SIZE +++ keys in each subarray. */ +++#define PTHREAD_KEY_1STLEVEL_SIZE \ +++ ((PTHREAD_KEYS_MAX + PTHREAD_KEY_2NDLEVEL_SIZE - 1) \ +++ / PTHREAD_KEY_2NDLEVEL_SIZE) +++ +++ +++ +++ +++/* Internal version of the buffer to store cancellation handler +++ information. */ +++struct pthread_unwind_buf +++{ +++ struct +++ { +++ __jmp_buf jmp_buf; +++ int mask_was_saved; +++ } cancel_jmp_buf[1]; +++ +++ union +++ { +++ /* This is the placeholder of the public version. */ +++ void *pad[4]; +++ +++ struct +++ { +++ /* Pointer to the previous cleanup buffer. */ +++ struct pthread_unwind_buf *prev; +++ +++ /* Backward compatibility: state of the old-style cleanup +++ handler at the time of the previous new-style cleanup handler +++ installment. */ +++ struct _pthread_cleanup_buffer *cleanup; +++ +++ /* Cancellation type before the push call. */ +++ int canceltype; +++ } data; +++ } priv; +++}; +++ +++ +++/* Opcodes and data types for communication with the signal handler to +++ change user/group IDs. */ +++struct xid_command +++{ +++ int syscall_no; +++ long int id[3]; +++ volatile int cntr; +++}; +++ +++ +++/* Data structure used by the kernel to find robust futexes. */ +++struct robust_list_head +++{ +++ void *list; +++ long int futex_offset; +++ void *list_op_pending; +++}; +++ +++ +++/* Data strcture used to handle thread priority protection. */ +++struct priority_protection_data +++{ +++ int priomax; +++ unsigned int priomap[]; +++}; +++ +++ +++/* Thread descriptor data structure. */ +++struct pthread +++{ +++ union +++ { +++#if !TLS_DTV_AT_TP +++ /* This overlaps the TCB as used for TLS without threads (see tls.h). */ +++ tcbhead_t header; +++#else +++ struct +++ { +++ /* multiple_threads is enabled either when the process has spawned at +++ least one thread or when a single-threaded process cancels itself. +++ This enables additional code to introduce locking before doing some +++ compare_and_exchange operations and also enable cancellation points. +++ The concepts of multiple threads and cancellation points ideally +++ should be separate, since it is not necessary for multiple threads to +++ have been created for cancellation points to be enabled, as is the +++ case is when single-threaded process cancels itself. +++ +++ Since enabling multiple_threads enables additional code in +++ cancellation points and compare_and_exchange operations, there is a +++ potential for an unneeded performance hit when it is enabled in a +++ single-threaded, self-canceling process. This is OK though, since a +++ single-threaded process will enable async cancellation only when it +++ looks to cancel itself and is hence going to end anyway. */ +++ int multiple_threads; +++ int gscope_flag; +++# ifndef __ASSUME_PRIVATE_FUTEX +++ int private_futex; +++# endif +++ } header; +++#endif +++ +++ /* This extra padding has no special purpose, and this structure layout +++ is private and subject to change without affecting the official ABI. +++ We just have it here in case it might be convenient for some +++ implementation-specific instrumentation hack or suchlike. */ +++ void *__padding[24]; +++ }; +++ +++ /* This descriptor's link on the `stack_used' or `__stack_user' list. */ +++ list_t list; +++ +++ /* Thread ID - which is also a 'is this thread descriptor (and +++ therefore stack) used' flag. */ +++#if (__BYTE_ORDER == __LITTLE_ENDIAN) || (__WORDSIZE == 32) +++ union { +++ pid_t tid; +++ long ktid; +++ }; +++#else +++#error untested padding layout: +++ union { +++ struct { +++ int __pad_tid; +++ pid_t tid; +++ }; +++ long ktid; +++ }; +++#endif +++ +++ /* Process ID - thread group ID in kernel speak. */ +++ pid_t pid_unused; +++ +++ /* List of robust mutexes the thread is holding. */ +++#ifdef __PTHREAD_MUTEX_HAVE_PREV +++ void *robust_prev; +++ struct robust_list_head robust_head; +++ +++ /* The list above is strange. It is basically a double linked list +++ but the pointer to the next/previous element of the list points +++ in the middle of the object, the __next element. Whenever +++ casting to __pthread_list_t we need to adjust the pointer +++ first. */ +++# define QUEUE_PTR_ADJUST (offsetof (__pthread_list_t, __next)) +++ +++# define ENQUEUE_MUTEX_BOTH(mutex, val) \ +++ do { \ +++ __pthread_list_t *next = (__pthread_list_t *) \ +++ ((((uintptr_t) THREAD_GETMEM (THREAD_SELF, robust_head.list)) & ~1ul) \ +++ - QUEUE_PTR_ADJUST); \ +++ next->__prev = (void *) &mutex->__data.__list.__next; \ +++ mutex->__data.__list.__next = THREAD_GETMEM (THREAD_SELF, \ +++ robust_head.list); \ +++ mutex->__data.__list.__prev = (void *) &THREAD_SELF->robust_head; \ +++ THREAD_SETMEM (THREAD_SELF, robust_head.list, \ +++ (void *) (((uintptr_t) &mutex->__data.__list.__next) \ +++ | val)); \ +++ } while (0) +++# define DEQUEUE_MUTEX(mutex) \ +++ do { \ +++ __pthread_list_t *next = (__pthread_list_t *) \ +++ ((char *) (((uintptr_t) mutex->__data.__list.__next) & ~1ul) \ +++ - QUEUE_PTR_ADJUST); \ +++ next->__prev = mutex->__data.__list.__prev; \ +++ __pthread_list_t *prev = (__pthread_list_t *) \ +++ ((char *) (((uintptr_t) mutex->__data.__list.__prev) & ~1ul) \ +++ - QUEUE_PTR_ADJUST); \ +++ prev->__next = mutex->__data.__list.__next; \ +++ mutex->__data.__list.__prev = NULL; \ +++ mutex->__data.__list.__next = NULL; \ +++ } while (0) +++#else +++ union +++ { +++ __pthread_slist_t robust_list; +++ struct robust_list_head robust_head; +++ }; +++ +++# define ENQUEUE_MUTEX_BOTH(mutex, val) \ +++ do { \ +++ mutex->__data.__list.__next \ +++ = THREAD_GETMEM (THREAD_SELF, robust_list.__next); \ +++ THREAD_SETMEM (THREAD_SELF, robust_list.__next, \ +++ (void *) (((uintptr_t) &mutex->__data.__list) | val)); \ +++ } while (0) +++# define DEQUEUE_MUTEX(mutex) \ +++ do { \ +++ __pthread_slist_t *runp = (__pthread_slist_t *) \ +++ (((uintptr_t) THREAD_GETMEM (THREAD_SELF, robust_list.__next)) & ~1ul); \ +++ if (runp == &mutex->__data.__list) \ +++ THREAD_SETMEM (THREAD_SELF, robust_list.__next, runp->__next); \ +++ else \ +++ { \ +++ __pthread_slist_t *next = (__pthread_slist_t *) \ +++ (((uintptr_t) runp->__next) & ~1ul); \ +++ while (next != &mutex->__data.__list) \ +++ { \ +++ runp = next; \ +++ next = (__pthread_slist_t *) (((uintptr_t) runp->__next) & ~1ul); \ +++ } \ +++ \ +++ runp->__next = next->__next; \ +++ mutex->__data.__list.__next = NULL; \ +++ } \ +++ } while (0) +++#endif +++#define ENQUEUE_MUTEX(mutex) ENQUEUE_MUTEX_BOTH (mutex, 0) +++#define ENQUEUE_MUTEX_PI(mutex) ENQUEUE_MUTEX_BOTH (mutex, 1) +++ +++ /* List of cleanup buffers. */ +++ struct _pthread_cleanup_buffer *cleanup; +++ +++ /* Unwind information. */ +++ struct pthread_unwind_buf *cleanup_jmp_buf; +++#define HAVE_CLEANUP_JMP_BUF +++ +++ /* Flags determining processing of cancellation. */ +++ int cancelhandling; +++ /* Bit set if cancellation is disabled. */ +++#define CANCELSTATE_BIT 0 +++#define CANCELSTATE_BITMASK (0x01 << CANCELSTATE_BIT) +++ /* Bit set if asynchronous cancellation mode is selected. */ +++#define CANCELTYPE_BIT 1 +++#define CANCELTYPE_BITMASK (0x01 << CANCELTYPE_BIT) +++ /* Bit set if canceling has been initiated. */ +++#define CANCELING_BIT 2 +++#define CANCELING_BITMASK (0x01 << CANCELING_BIT) +++ /* Bit set if canceled. */ +++#define CANCELED_BIT 3 +++#define CANCELED_BITMASK (0x01 << CANCELED_BIT) +++ /* Bit set if thread is exiting. */ +++#define EXITING_BIT 4 +++#define EXITING_BITMASK (0x01 << EXITING_BIT) +++ /* Bit set if thread terminated and TCB is freed. */ +++#define TERMINATED_BIT 5 +++#define TERMINATED_BITMASK (0x01 << TERMINATED_BIT) +++ /* Bit set if thread is supposed to change XID. */ +++#define SETXID_BIT 6 +++#define SETXID_BITMASK (0x01 << SETXID_BIT) +++ /* Mask for the rest. Helps the compiler to optimize. */ +++#define CANCEL_RESTMASK 0xffffff80 +++ +++#define CANCEL_ENABLED_AND_CANCELED(value) \ +++ (((value) & (CANCELSTATE_BITMASK | CANCELED_BITMASK | EXITING_BITMASK \ +++ | CANCEL_RESTMASK | TERMINATED_BITMASK)) == CANCELED_BITMASK) +++#define CANCEL_ENABLED_AND_CANCELED_AND_ASYNCHRONOUS(value) \ +++ (((value) & (CANCELSTATE_BITMASK | CANCELTYPE_BITMASK | CANCELED_BITMASK \ +++ | EXITING_BITMASK | CANCEL_RESTMASK | TERMINATED_BITMASK)) \ +++ == (CANCELTYPE_BITMASK | CANCELED_BITMASK)) +++ +++ /* Flags. Including those copied from the thread attribute. */ +++ int flags; +++ +++ /* We allocate one block of references here. This should be enough +++ to avoid allocating any memory dynamically for most applications. */ +++ struct pthread_key_data +++ { +++ /* Sequence number. We use uintptr_t to not require padding on +++ 32- and 64-bit machines. On 64-bit machines it helps to avoid +++ wrapping, too. */ +++ uintptr_t seq; +++ +++ /* Data pointer. */ +++ void *data; +++ } specific_1stblock[PTHREAD_KEY_2NDLEVEL_SIZE]; +++ +++ /* Two-level array for the thread-specific data. */ +++ struct pthread_key_data *specific[PTHREAD_KEY_1STLEVEL_SIZE]; +++ +++ /* Flag which is set when specific data is set. */ +++ bool specific_used; +++ +++ /* True if events must be reported. */ +++ bool report_events; +++ +++ /* True if the user provided the stack. */ +++ bool user_stack; +++ +++ /* True if thread must stop at startup time. */ +++ bool stopped_start; +++ +++ /* The parent's cancel handling at the time of the pthread_create +++ call. This might be needed to undo the effects of a cancellation. */ +++ int parent_cancelhandling; +++ +++ /* Lock to synchronize access to the descriptor. */ +++ int lock; +++ +++ /* Lock for synchronizing setxid calls. */ +++ int setxid_futex; +++ +++#if HP_TIMING_AVAIL +++ /* Offset of the CPU clock at start thread start time. */ +++ hp_timing_t cpuclock_offset; +++#endif +++ +++ /* If the thread waits to join another one the ID of the latter is +++ stored here. +++ +++ In case a thread is detached this field contains a pointer of the +++ TCB if the thread itself. This is something which cannot happen +++ in normal operation. */ +++ struct pthread *joinid; +++ /* Check whether a thread is detached. */ +++#define IS_DETACHED(pd) ((pd)->joinid == (pd)) +++ +++ /* The result of the thread function. */ +++ void *result; +++ +++ /* Scheduling parameters for the new thread. */ +++ struct sched_param schedparam; +++ int schedpolicy; +++ +++ /* Start position of the code to be executed and the argument passed +++ to the function. */ +++ void *(*start_routine) (void *); +++ void *arg; +++ +++ /* Debug state. */ +++ td_eventbuf_t eventbuf; +++ /* Next descriptor with a pending event. */ +++ struct pthread *nextevent; +++ +++ /* Machine-specific unwind info. */ +++ struct _Unwind_Exception exc; +++ +++ /* If nonzero pointer to area allocated for the stack and its +++ size. */ +++ void *stackblock; +++ size_t stackblock_size; +++ /* Size of the included guard area. */ +++ size_t guardsize; +++ /* This is what the user specified and what we will report. */ +++ size_t reported_guardsize; +++ +++ /* Thread Priority Protection data. */ +++ struct priority_protection_data *tpp; +++ +++ /* Resolver state. */ +++ struct __res_state res; +++ +++ /* FPU initial control word */ +++ fpu_control_t fpu_control_init; +++ +++ /* This member must be last. */ +++ char end_padding[]; +++ +++#define PTHREAD_STRUCT_END_PADDING \ +++ (sizeof (struct pthread) - offsetof (struct pthread, end_padding)) +++} __attribute ((aligned (TCB_ALIGNMENT))); +++ +++ +++#endif /* descr.h */ ++--- /dev/null +++++ b/fbtl/eintr.c ++@@ -0,0 +1,88 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++ +++ +++static int the_sig; +++ +++ +++static void +++eintr_handler (int sig) +++{ +++ if (sig != the_sig) +++ { +++ write (STDOUT_FILENO, "eintr_handler: signal number wrong\n", 35); +++ _exit (1); +++ } +++ write (STDOUT_FILENO, ".", 1); +++} +++ +++ +++static void * +++eintr_source (void *arg) +++{ +++ struct timespec ts = { .tv_sec = 0, .tv_nsec = 500000 }; +++ +++ if (arg == NULL) +++ { +++ sigset_t ss; +++ sigemptyset (&ss); +++ sigaddset (&ss, the_sig); +++ pthread_sigmask (SIG_BLOCK, &ss, NULL); +++ } +++ +++ while (1) +++ { +++ if (arg != NULL) +++ pthread_kill (*(pthread_t *) arg, the_sig); +++ else +++ kill (getpid (), the_sig); +++ +++ nanosleep (&ts, NULL); +++ } +++ +++ /* NOTREACHED */ +++ return NULL; +++} +++ +++ +++static void +++setup_eintr (int sig, pthread_t *thp) +++{ +++ struct sigaction sa; +++ sigemptyset (&sa.sa_mask); +++ sa.sa_flags = 0; +++ sa.sa_handler = eintr_handler; +++ if (sigaction (sig, &sa, NULL) != 0) +++ { +++ puts ("setup_eintr: sigaction failed"); +++ exit (1); +++ } +++ the_sig = sig; +++ +++ /* Create the thread which will fire off the signals. */ +++ pthread_t th; +++ if (pthread_create (&th, NULL, eintr_source, thp) != 0) +++ { +++ puts ("setup_eintr: pthread_create failed"); +++ exit (1); +++ } +++} ++--- /dev/null +++++ b/fbtl/errno-loc.c ++@@ -0,0 +1 @@ +++#include "../csu/errno-loc.c" ++--- /dev/null +++++ b/fbtl/events.c ++@@ -0,0 +1,33 @@ +++/* Event functions used while debugging. +++ Copyright (C) 1999-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; see the file COPYING.LIB. If +++ not, see . */ +++ +++/* The functions contained here do nothing, they just return. */ +++ +++#include "pthreadP.h" +++ +++void +++__nptl_create_event (void) +++{ +++} +++hidden_def (__nptl_create_event) +++ +++void +++__nptl_death_event (void) +++{ +++} +++hidden_def (__nptl_death_event) ++--- /dev/null +++++ b/fbtl/forward.c ++@@ -0,0 +1,219 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++ +++#include +++#include +++#include +++ +++ +++/* Pointers to the libc functions. */ +++struct pthread_functions __libc_pthread_functions attribute_hidden; +++int __libc_pthread_functions_init attribute_hidden; +++ +++ +++#define FORWARD2(name, rettype, decl, params, defaction) \ +++rettype \ +++name decl \ +++{ \ +++ if (!__libc_pthread_functions_init) \ +++ defaction; \ +++ \ +++ return PTHFCT_CALL (ptr_##name, params); \ +++} +++ +++/* Same as FORWARD2, only without return. */ +++#define FORWARD_NORETURN(name, rettype, decl, params, defaction) \ +++rettype \ +++name decl \ +++{ \ +++ if (!__libc_pthread_functions_init) \ +++ defaction; \ +++ \ +++ PTHFCT_CALL (ptr_##name, params); \ +++} +++ +++#define FORWARD(name, decl, params, defretval) \ +++ FORWARD2 (name, int, decl, params, return defretval) +++ +++ +++FORWARD (pthread_attr_destroy, (pthread_attr_t *attr), (attr), 0) +++ +++#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_1) +++FORWARD (__pthread_attr_init_2_0, (pthread_attr_t *attr), (attr), 0) +++compat_symbol (libc, __pthread_attr_init_2_0, pthread_attr_init, GLIBC_2_0); +++#endif +++ +++FORWARD (__pthread_attr_init_2_1, (pthread_attr_t *attr), (attr), 0) +++versioned_symbol (libc, __pthread_attr_init_2_1, pthread_attr_init, GLIBC_2_1); +++ +++FORWARD (pthread_attr_getdetachstate, +++ (const pthread_attr_t *attr, int *detachstate), (attr, detachstate), +++ 0) +++FORWARD (pthread_attr_setdetachstate, (pthread_attr_t *attr, int detachstate), +++ (attr, detachstate), 0) +++ +++FORWARD (pthread_attr_getinheritsched, +++ (const pthread_attr_t *attr, int *inherit), (attr, inherit), 0) +++FORWARD (pthread_attr_setinheritsched, (pthread_attr_t *attr, int inherit), +++ (attr, inherit), 0) +++ +++FORWARD (pthread_attr_getschedparam, +++ (const pthread_attr_t *attr, struct sched_param *param), +++ (attr, param), 0) +++FORWARD (pthread_attr_setschedparam, +++ (pthread_attr_t *attr, const struct sched_param *param), +++ (attr, param), 0) +++ +++FORWARD (pthread_attr_getschedpolicy, +++ (const pthread_attr_t *attr, int *policy), (attr, policy), 0) +++FORWARD (pthread_attr_setschedpolicy, (pthread_attr_t *attr, int policy), +++ (attr, policy), 0) +++ +++FORWARD (pthread_attr_getscope, +++ (const pthread_attr_t *attr, int *scope), (attr, scope), 0) +++FORWARD (pthread_attr_setscope, (pthread_attr_t *attr, int scope), +++ (attr, scope), 0) +++ +++ +++FORWARD (pthread_condattr_destroy, (pthread_condattr_t *attr), (attr), 0) +++FORWARD (pthread_condattr_init, (pthread_condattr_t *attr), (attr), 0) +++ +++#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_3_2) +++FORWARD2 (__pthread_cond_broadcast_2_0, int attribute_compat_text_section, +++ (pthread_cond_2_0_t *cond), (cond), return 0) +++compat_symbol (libc, __pthread_cond_broadcast_2_0, pthread_cond_broadcast, +++ GLIBC_2_0); +++#endif +++FORWARD (__pthread_cond_broadcast, (pthread_cond_t *cond), (cond), 0) +++versioned_symbol (libc, __pthread_cond_broadcast, pthread_cond_broadcast, +++ GLIBC_2_3_2); +++ +++#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_3_2) +++FORWARD2 (__pthread_cond_destroy_2_0, int attribute_compat_text_section, +++ (pthread_cond_2_0_t *cond), (cond), return 0) +++compat_symbol (libc, __pthread_cond_destroy_2_0, pthread_cond_destroy, +++ GLIBC_2_0); +++#endif +++FORWARD (__pthread_cond_destroy, (pthread_cond_t *cond), (cond), 0) +++versioned_symbol (libc, __pthread_cond_destroy, pthread_cond_destroy, +++ GLIBC_2_3_2); +++ +++#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_3_2) +++FORWARD2 (__pthread_cond_init_2_0, int attribute_compat_text_section, +++ (pthread_cond_2_0_t *cond, const pthread_condattr_t *cond_attr), +++ (cond, cond_attr), return 0) +++compat_symbol (libc, __pthread_cond_init_2_0, pthread_cond_init, GLIBC_2_0); +++#endif +++FORWARD (__pthread_cond_init, +++ (pthread_cond_t *cond, const pthread_condattr_t *cond_attr), +++ (cond, cond_attr), 0) +++versioned_symbol (libc, __pthread_cond_init, pthread_cond_init, GLIBC_2_3_2); +++ +++#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_3_2) +++FORWARD2 (__pthread_cond_signal_2_0, int attribute_compat_text_section, +++ (pthread_cond_2_0_t *cond), (cond), return 0) +++compat_symbol (libc, __pthread_cond_signal_2_0, pthread_cond_signal, +++ GLIBC_2_0); +++#endif +++FORWARD (__pthread_cond_signal, (pthread_cond_t *cond), (cond), 0) +++versioned_symbol (libc, __pthread_cond_signal, pthread_cond_signal, +++ GLIBC_2_3_2); +++ +++#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_3_2) +++FORWARD2 (__pthread_cond_wait_2_0, int attribute_compat_text_section, +++ (pthread_cond_2_0_t *cond, pthread_mutex_t *mutex), (cond, mutex), +++ return 0) +++compat_symbol (libc, __pthread_cond_wait_2_0, pthread_cond_wait, +++ GLIBC_2_0); +++#endif +++FORWARD (__pthread_cond_wait, (pthread_cond_t *cond, pthread_mutex_t *mutex), +++ (cond, mutex), 0) +++versioned_symbol (libc, __pthread_cond_wait, pthread_cond_wait, +++ GLIBC_2_3_2); +++ +++#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_3_2) +++FORWARD2 (__pthread_cond_timedwait_2_0, int attribute_compat_text_section, +++ (pthread_cond_2_0_t *cond, pthread_mutex_t *mutex, +++ const struct timespec *abstime), (cond, mutex, abstime), +++ return 0) +++compat_symbol (libc, __pthread_cond_timedwait_2_0, pthread_cond_timedwait, +++ GLIBC_2_0); +++#endif +++FORWARD (__pthread_cond_timedwait, +++ (pthread_cond_t *cond, pthread_mutex_t *mutex, +++ const struct timespec *abstime), (cond, mutex, abstime), 0) +++versioned_symbol (libc, __pthread_cond_timedwait, pthread_cond_timedwait, +++ GLIBC_2_3_2); +++ +++ +++FORWARD (pthread_equal, (pthread_t thread1, pthread_t thread2), +++ (thread1, thread2), 1) +++ +++ +++FORWARD_NORETURN (__pthread_exit, void, (void *retval), (retval), +++ exit (EXIT_SUCCESS)) +++strong_alias (__pthread_exit, pthread_exit); +++ +++ +++FORWARD (pthread_getschedparam, +++ (pthread_t target_thread, int *policy, struct sched_param *param), +++ (target_thread, policy, param), 0) +++FORWARD (pthread_setschedparam, +++ (pthread_t target_thread, int policy, +++ const struct sched_param *param), (target_thread, policy, param), 0) +++ +++ +++FORWARD (pthread_mutex_destroy, (pthread_mutex_t *mutex), (mutex), 0) +++ +++FORWARD (pthread_mutex_init, +++ (pthread_mutex_t *mutex, const pthread_mutexattr_t *mutexattr), +++ (mutex, mutexattr), 0) +++ +++FORWARD (pthread_mutex_lock, (pthread_mutex_t *mutex), (mutex), 0) +++ +++FORWARD (pthread_mutex_unlock, (pthread_mutex_t *mutex), (mutex), 0) +++ +++ +++FORWARD2 (pthread_self, pthread_t, (void), (), return 0) +++ +++ +++FORWARD (__pthread_setcancelstate, (int state, int *oldstate), +++ (state, oldstate), 0) +++strong_alias (__pthread_setcancelstate, pthread_setcancelstate) +++ +++FORWARD (pthread_setcanceltype, (int type, int *oldtype), (type, oldtype), 0) +++ +++FORWARD_NORETURN(__pthread_unwind, +++ void attribute_hidden __attribute ((noreturn)) __cleanup_fct_attribute +++ attribute_compat_text_section, +++ (__pthread_unwind_buf_t *buf), (buf), { +++ /* We cannot call abort() here. */ +++#if 1 +++#warning the kill syscall have two arguments, not one ... +++#warning elaborate what to do properly +++ asm("hlt"); +++#else +++ INTERNAL_SYSCALL_DECL (err); +++ INTERNAL_SYSCALL (kill, err, 1, SIGKILL); +++#endif +++ }) ++--- /dev/null +++++ b/fbtl/herrno.c ++@@ -0,0 +1,34 @@ +++/* Copyright (C) 1996-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 +++ . */ +++ +++#include +++#include +++#undef h_errno +++ +++#include +++ +++/* We need to have the error status variable of the resolver +++ accessible in the libc. */ +++extern __thread int __h_errno; +++ +++ +++/* When threaded, h_errno may be a per-thread variable. */ +++int * +++__h_errno_location (void) +++{ +++ return &__h_errno; +++} ++--- /dev/null +++++ b/fbtl/libc-cancellation.c ++@@ -0,0 +1,24 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include "pthreadP.h" +++ +++ +++#define __pthread_enable_asynccancel __libc_enable_asynccancel +++#define __pthread_disable_asynccancel __libc_disable_asynccancel +++#include ++--- /dev/null +++++ b/fbtl/libc-cleanup.c ++@@ -0,0 +1,27 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include "pthreadP.h" +++ +++ +++void +++__libc_cleanup_routine (struct __pthread_cleanup_frame *f) +++{ +++ if (f->__do_it) +++ f->__cancel_routine (f->__cancel_arg); +++} ++--- /dev/null +++++ b/fbtl/lowlevellock.h ++@@ -0,0 +1,83 @@ +++/* Low level locking macros used in NPTL implementation. Stub version. +++ Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++ +++ +++/* Mutex lock counter: +++ bit 31 clear means unlocked; +++ bit 31 set means locked. +++ +++ All code that looks at bit 31 first increases the 'number of +++ interested threads' usage counter, which is in bits 0-30. +++ +++ All negative mutex values indicate that the mutex is still locked. */ +++ +++ +++static inline void +++__generic_mutex_lock (int *mutex) +++{ +++ unsigned int v; +++ +++ /* Bit 31 was clear, we got the mutex. (this is the fastpath). */ +++ if (atomic_bit_test_set (mutex, 31) == 0) +++ return; +++ +++ atomic_increment (mutex); +++ +++ while (1) +++ { +++ if (atomic_bit_test_set (mutex, 31) == 0) +++ { +++ atomic_decrement (mutex); +++ return; +++ } +++ +++ /* We have to wait now. First make sure the futex value we are +++ monitoring is truly negative (i.e. locked). */ +++ v = *mutex; +++ if (v >= 0) +++ continue; +++ +++ lll_futex_wait (mutex, v, +++ // XYZ check mutex flag +++ LLL_SHARED); +++ } +++} +++ +++ +++static inline void +++__generic_mutex_unlock (int *mutex) +++{ +++ /* Adding 0x80000000 to the counter results in 0 if and only if +++ there are not other interested threads - we can return (this is +++ the fastpath). */ +++ if (atomic_add_zero (mutex, 0x80000000)) +++ return; +++ +++ /* There are other threads waiting for this mutex, wake one of them +++ up. */ +++ lll_futex_wake (mutex, 1, +++ // XYZ check mutex flag +++ LLL_SHARED); +++} +++ +++ +++#define lll_mutex_lock(futex) __generic_mutex_lock (&(futex)) +++#define lll_mutex_unlock(futex) __generic_mutex_unlock (&(futex)) ++--- /dev/null +++++ b/fbtl/nptl-init.c ++@@ -0,0 +1,460 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++/* Size and alignment of static TLS block. */ +++size_t __static_tls_size; +++size_t __static_tls_align_m1; +++ +++#warning TODO whole file +++#if 1 +++# define set_robust_list_not_avail() do { } while (0) +++#else +++#ifndef __ASSUME_SET_ROBUST_LIST +++/* Negative if we do not have the system call and we can use it. */ +++int __set_robust_list_avail; +++# define set_robust_list_not_avail() \ +++ __set_robust_list_avail = -1 +++#else +++# define set_robust_list_not_avail() do { } while (0) +++#endif +++ +++#ifndef __ASSUME_FUTEX_CLOCK_REALTIME +++/* Nonzero if we do not have FUTEX_CLOCK_REALTIME. */ +++int __have_futex_clock_realtime; +++# define __set_futex_clock_realtime() \ +++ __have_futex_clock_realtime = 1 +++#else +++#define __set_futex_clock_realtime() do { } while (0) +++#endif +++#endif +++ +++/* Version of the library, used in libthread_db to detect mismatches. */ +++static const char nptl_version[] __attribute_used__ = VERSION; +++ +++ +++#ifdef SHARED +++static +++#else +++extern +++#endif +++void __nptl_set_robust (struct pthread *); +++ +++#ifdef SHARED +++static void nptl_freeres (void); +++ +++ +++static const struct pthread_functions pthread_functions = +++ { +++ .ptr_pthread_attr_destroy = __pthread_attr_destroy, +++# if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_1) +++ .ptr___pthread_attr_init_2_0 = __pthread_attr_init_2_0, +++# endif +++ .ptr___pthread_attr_init_2_1 = __pthread_attr_init_2_1, +++ .ptr_pthread_attr_getdetachstate = __pthread_attr_getdetachstate, +++ .ptr_pthread_attr_setdetachstate = __pthread_attr_setdetachstate, +++ .ptr_pthread_attr_getinheritsched = __pthread_attr_getinheritsched, +++ .ptr_pthread_attr_setinheritsched = __pthread_attr_setinheritsched, +++ .ptr_pthread_attr_getschedparam = __pthread_attr_getschedparam, +++ .ptr_pthread_attr_setschedparam = __pthread_attr_setschedparam, +++ .ptr_pthread_attr_getschedpolicy = __pthread_attr_getschedpolicy, +++ .ptr_pthread_attr_setschedpolicy = __pthread_attr_setschedpolicy, +++ .ptr_pthread_attr_getscope = __pthread_attr_getscope, +++ .ptr_pthread_attr_setscope = __pthread_attr_setscope, +++ .ptr_pthread_condattr_destroy = __pthread_condattr_destroy, +++ .ptr_pthread_condattr_init = __pthread_condattr_init, +++ .ptr___pthread_cond_broadcast = __pthread_cond_broadcast, +++ .ptr___pthread_cond_destroy = __pthread_cond_destroy, +++ .ptr___pthread_cond_init = __pthread_cond_init, +++ .ptr___pthread_cond_signal = __pthread_cond_signal, +++ .ptr___pthread_cond_wait = __pthread_cond_wait, +++ .ptr___pthread_cond_timedwait = __pthread_cond_timedwait, +++# if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_3_2) +++ .ptr___pthread_cond_broadcast_2_0 = __pthread_cond_broadcast_2_0, +++ .ptr___pthread_cond_destroy_2_0 = __pthread_cond_destroy_2_0, +++ .ptr___pthread_cond_init_2_0 = __pthread_cond_init_2_0, +++ .ptr___pthread_cond_signal_2_0 = __pthread_cond_signal_2_0, +++ .ptr___pthread_cond_wait_2_0 = __pthread_cond_wait_2_0, +++ .ptr___pthread_cond_timedwait_2_0 = __pthread_cond_timedwait_2_0, +++# endif +++ .ptr_pthread_equal = __pthread_equal, +++ .ptr___pthread_exit = __pthread_exit, +++ .ptr_pthread_getschedparam = __pthread_getschedparam, +++ .ptr_pthread_setschedparam = __pthread_setschedparam, +++ .ptr_pthread_mutex_destroy = __pthread_mutex_destroy, +++ .ptr_pthread_mutex_init = __pthread_mutex_init, +++ .ptr_pthread_mutex_lock = __pthread_mutex_lock, +++ .ptr_pthread_mutex_unlock = __pthread_mutex_unlock, +++ .ptr_pthread_self = __pthread_self, +++ .ptr___pthread_setcancelstate = __pthread_setcancelstate, +++ .ptr_pthread_setcanceltype = __pthread_setcanceltype, +++ .ptr___pthread_cleanup_upto = __pthread_cleanup_upto, +++ .ptr___pthread_once = __pthread_once, +++ .ptr___pthread_rwlock_rdlock = __pthread_rwlock_rdlock, +++ .ptr___pthread_rwlock_wrlock = __pthread_rwlock_wrlock, +++ .ptr___pthread_rwlock_unlock = __pthread_rwlock_unlock, +++ .ptr___pthread_key_create = __pthread_key_create, +++ .ptr___pthread_getspecific = __pthread_getspecific, +++ .ptr___pthread_setspecific = __pthread_setspecific, +++ .ptr__pthread_cleanup_push_defer = __pthread_cleanup_push_defer, +++ .ptr__pthread_cleanup_pop_restore = __pthread_cleanup_pop_restore, +++ .ptr_nthreads = &__nptl_nthreads, +++ .ptr___pthread_unwind = &__pthread_unwind, +++ .ptr__nptl_deallocate_tsd = __nptl_deallocate_tsd, +++ .ptr__nptl_setxid = __nptl_setxid, +++ /* For now only the stack cache needs to be freed. */ +++ .ptr_freeres = nptl_freeres, +++ .ptr_set_robust = __nptl_set_robust +++ }; +++# define ptr_pthread_functions &pthread_functions +++#else +++# define ptr_pthread_functions NULL +++#endif +++ +++ +++#ifdef SHARED +++/* This function is called indirectly from the freeres code in libc. */ +++static void +++__libc_freeres_fn_section +++nptl_freeres (void) +++{ +++ __unwind_freeres (); +++ __free_stacks (0); +++} +++ +++ +++static +++#endif +++void +++__nptl_set_robust (struct pthread *self) +++{ +++#if 0 +++ INTERNAL_SYSCALL_DECL (err); +++ INTERNAL_SYSCALL (set_robust_list, err, 2, &self->robust_head, +++ sizeof (struct robust_list_head)); +++#endif +++} +++ +++ +++/* For asynchronous cancellation we use a signal. This is the handler. */ +++static void +++sigcancel_handler (int sig, siginfo_t *si, void *ctx) +++{ +++ /* Safety check. It would be possible to call this function for +++ other signals and send a signal from another process. This is not +++ correct and might even be a security problem. Try to catch as +++ many incorrect invocations as possible. */ +++ if (sig != SIGCANCEL +++ || si->si_pid != __getpid() +++#if 1 +++ ) +++#else +++ || si->si_code != SI_TKILL) +++#endif +++ return; +++ +++ struct pthread *self = THREAD_SELF; +++ +++ int oldval = THREAD_GETMEM (self, cancelhandling); +++ while (1) +++ { +++ /* We are canceled now. When canceled by another thread this flag +++ is already set but if the signal is directly send (internally or +++ from another process) is has to be done here. */ +++ int newval = oldval | CANCELING_BITMASK | CANCELED_BITMASK; +++ +++ if (oldval == newval || (oldval & EXITING_BITMASK) != 0) +++ /* Already canceled or exiting. */ +++ break; +++ +++ int curval = THREAD_ATOMIC_CMPXCHG_VAL (self, cancelhandling, newval, +++ oldval); +++ if (curval == oldval) +++ { +++ /* Set the return value. */ +++ THREAD_SETMEM (self, result, PTHREAD_CANCELED); +++ +++ /* Make sure asynchronous cancellation is still enabled. */ +++ if ((newval & CANCELTYPE_BITMASK) != 0) +++ /* Run the registered destructors and terminate the thread. */ +++ __do_cancel (); +++ +++ break; +++ } +++ +++ oldval = curval; +++ } +++} +++ +++ +++struct xid_command *__xidcmd attribute_hidden; +++ +++/* We use the SIGSETXID signal in the setuid, setgid, etc. implementations to +++ tell each thread to call the respective setxid syscall on itself. This is +++ the handler. */ +++static void +++sighandler_setxid (int sig, siginfo_t *si, void *ctx) +++{ +++#if 0 +++ /* Safety check. It would be possible to call this function for +++ other signals and send a signal from another process. This is not +++ correct and might even be a security problem. Try to catch as +++ many incorrect invocations as possible. */ +++ if (sig != SIGSETXID +++ || si->si_pid != pid +++ || si->si_code != SI_TKILL) +++ return; +++ INTERNAL_SYSCALL_DECL (err); +++ INTERNAL_SYSCALL_NCS (__xidcmd->syscall_no, err, 3, __xidcmd->id[0], +++ __xidcmd->id[1], __xidcmd->id[2]); +++#endif +++ /* Reset the SETXID flag. */ +++ struct pthread *self = THREAD_SELF; +++ int flags, newval; +++ do +++ { +++ flags = THREAD_GETMEM (self, cancelhandling); +++ newval = THREAD_ATOMIC_CMPXCHG_VAL (self, cancelhandling, +++ flags & ~SETXID_BITMASK, flags); +++ } +++ while (flags != newval); +++ +++ /* And release the futex. */ +++ self->setxid_futex = 1; +++ lll_futex_wake (&self->setxid_futex, 1, LLL_PRIVATE); +++ +++ if (atomic_decrement_val (&__xidcmd->cntr) == 0) +++ lll_futex_wake ((unsigned int *)&__xidcmd->cntr, 1, LLL_PRIVATE); +++} +++ +++ +++/* When using __thread for this, we do it in libc so as not +++ to give libpthread its own TLS segment just for this. */ +++extern void **__libc_dl_error_tsd (void) __attribute__ ((const)); +++ +++ +++/* This can be set by the debugger before initialization is complete. */ +++static bool __nptl_initial_report_events __attribute_used__; +++ +++void +++__pthread_initialize_minimal_internal (void) +++{ +++ /* Minimal initialization of the thread descriptor. */ +++ struct pthread *pd = THREAD_SELF; +++#if 1 +++ INLINE_SYSCALL(thr_self, 1, &(pd->ktid)); +++#else +++ INTERNAL_SYSCALL_DECL (err); +++ pd->tid = INTERNAL_SYSCALL (set_tid_address, err, 1, &pd->tid); +++#endif +++ THREAD_SETMEM (pd, specific[0], &pd->specific_1stblock[0]); +++ THREAD_SETMEM (pd, user_stack, true); +++ if (LLL_LOCK_INITIALIZER != 0) +++ THREAD_SETMEM (pd, lock, LLL_LOCK_INITIALIZER); +++#if HP_TIMING_AVAIL +++ THREAD_SETMEM (pd, cpuclock_offset, GL(dl_cpuclock_offset)); +++#endif +++ +++ /* Initialize the robust mutex data. */ +++#ifdef __PTHREAD_MUTEX_HAVE_PREV +++ pd->robust_prev = &pd->robust_head; +++#endif +++ pd->robust_head.list = &pd->robust_head; +++#ifdef __NR_set_robust_list +++ pd->robust_head.futex_offset = (offsetof (pthread_mutex_t, __data.__lock) +++ - offsetof (pthread_mutex_t, +++ __data.__list.__next)); +++ int res = INTERNAL_SYSCALL (set_robust_list, err, 2, &pd->robust_head, +++ sizeof (struct robust_list_head)); +++ if (INTERNAL_SYSCALL_ERROR_P (res, err)) +++#endif +++ set_robust_list_not_avail (); +++ +++#if 0 +++#ifndef __ASSUME_PRIVATE_FUTEX +++ /* Private futexes are always used (at least internally) so that +++ doing the test once this early is beneficial. */ +++ { +++ int word = 0; +++ word = INTERNAL_SYSCALL (futex, err, 3, &word, +++ FUTEX_WAKE | FUTEX_PRIVATE_FLAG, 1); +++ if (!INTERNAL_SYSCALL_ERROR_P (word, err)) +++ THREAD_SETMEM (pd, header.private_futex, FUTEX_PRIVATE_FLAG); +++ } +++ +++ /* Private futexes have been introduced earlier than the +++ FUTEX_CLOCK_REALTIME flag. We don't have to run the test if we +++ know the former are not supported. This also means we know the +++ kernel will return ENOSYS for unknown operations. */ +++ if (THREAD_GETMEM (pd, header.private_futex) != 0) +++#endif +++#ifndef __ASSUME_FUTEX_CLOCK_REALTIME +++ { +++ int word = 0; +++ /* NB: the syscall actually takes six parameters. The last is the +++ bit mask. But since we will not actually wait at all the value +++ is irrelevant. Given that passing six parameters is difficult +++ on some architectures we just pass whatever random value the +++ calling convention calls for to the kernel. It causes no harm. */ +++ word = INTERNAL_SYSCALL (futex, err, 5, &word, +++ FUTEX_WAIT_BITSET | FUTEX_CLOCK_REALTIME +++ | FUTEX_PRIVATE_FLAG, 1, NULL, 0); +++ assert (INTERNAL_SYSCALL_ERROR_P (word, err)); +++ if (INTERNAL_SYSCALL_ERRNO (word, err) != ENOSYS) +++ __set_futex_clock_realtime (); +++ } +++#endif +++#endif +++ /* Set initial thread's stack block from 0 up to __libc_stack_end. +++ It will be bigger than it actually is, but for unwind.c/pt-longjmp.c +++ purposes this is good enough. */ +++ THREAD_SETMEM (pd, stackblock_size, (size_t) __libc_stack_end); +++ +++ /* Initialize the list of all running threads with the main thread. */ +++ INIT_LIST_HEAD (&__stack_user); +++ list_add (&pd->list, &__stack_user); +++ +++ /* Before initializing __stack_user, the debugger could not find us and +++ had to set __nptl_initial_report_events. Propagate its setting. */ +++ THREAD_SETMEM (pd, report_events, __nptl_initial_report_events); +++ +++ /* Install the cancellation signal handler. If for some reason we +++ cannot install the handler we do not abort. Maybe we should, but +++ it is only asynchronous cancellation which is affected. */ +++ struct sigaction sa; +++ sa.sa_sigaction = sigcancel_handler; +++ sa.sa_flags = SA_SIGINFO; +++ __sigemptyset (&sa.sa_mask); +++ +++ (void) __libc_sigaction (SIGCANCEL, &sa, NULL); +++ +++ /* Install the handle to change the threads' uid/gid. */ +++ sa.sa_sigaction = sighandler_setxid; +++ sa.sa_flags = SA_SIGINFO | SA_RESTART; +++ +++ (void) __libc_sigaction (SIGSETXID, &sa, NULL); +++ +++ /* The parent process might have left the signals blocked. Just in +++ case, unblock it. We reuse the signal mask in the sigaction +++ structure. It is already cleared. */ +++ __sigaddset (&sa.sa_mask, SIGCANCEL); +++ __sigaddset (&sa.sa_mask, SIGSETXID); +++ INLINE_SYSCALL (sigprocmask, 3, SIG_UNBLOCK, &sa.sa_mask, NULL); +++ +++ /* Get the size of the static and alignment requirements for the TLS +++ block. */ +++ size_t static_tls_align; +++ _dl_get_tls_static_info (&__static_tls_size, &static_tls_align); +++ +++ /* Make sure the size takes all the alignments into account. */ +++ if (STACK_ALIGN > static_tls_align) +++ static_tls_align = STACK_ALIGN; +++ __static_tls_align_m1 = static_tls_align - 1; +++ +++ __static_tls_size = roundup (__static_tls_size, static_tls_align); +++ +++ /* Determine the default allowed stack size. This is the size used +++ in case the user does not specify one. */ +++ struct rlimit limit; +++ if (__getrlimit (RLIMIT_STACK, &limit) != 0 +++ || limit.rlim_cur == RLIM_INFINITY) +++ /* The system limit is not usable. Use an architecture-specific +++ default. */ +++ limit.rlim_cur = ARCH_STACK_DEFAULT_SIZE; +++ else if (limit.rlim_cur < PTHREAD_STACK_MIN) +++ /* The system limit is unusably small. +++ Use the minimal size acceptable. */ +++ limit.rlim_cur = PTHREAD_STACK_MIN; +++ else if (limit.rlim_cur > (4 * ARCH_STACK_DEFAULT_SIZE)) +++ /* The system limit is unusably high. +++ Use the maximal size acceptable. */ +++ limit.rlim_cur = (4 * ARCH_STACK_DEFAULT_SIZE); +++ +++ /* Make sure it meets the minimum size that allocate_stack +++ (allocatestack.c) will demand, which depends on the page size. */ +++ const uintptr_t pagesz = GLRO(dl_pagesize); +++ const size_t minstack = pagesz + __static_tls_size + MINIMAL_REST_STACK; +++ if (limit.rlim_cur < minstack) +++ limit.rlim_cur = minstack; +++ +++ /* Round the resource limit up to page size. */ +++ limit.rlim_cur = ALIGN_UP (limit.rlim_cur, pagesz); +++ lll_lock (__default_pthread_attr_lock, LLL_PRIVATE); +++ __default_pthread_attr.stacksize = limit.rlim_cur; +++ __default_pthread_attr.guardsize = GLRO (dl_pagesize); +++ lll_unlock (__default_pthread_attr_lock, LLL_PRIVATE); +++ +++#ifdef SHARED +++ /* Make __rtld_lock_{,un}lock_recursive use pthread_mutex_{,un}lock, +++ keep the lock count from the ld.so implementation. */ +++ GL(dl_rtld_lock_recursive) = (void *) __pthread_mutex_lock; +++ GL(dl_rtld_unlock_recursive) = (void *) __pthread_mutex_unlock; +++ unsigned int rtld_lock_count = GL(dl_load_lock).mutex.__data.__count; +++ GL(dl_load_lock).mutex.__data.__count = 0; +++ while (rtld_lock_count-- > 0) +++ __pthread_mutex_lock (&GL(dl_load_lock).mutex); +++ +++ GL(dl_make_stack_executable_hook) = &__make_stacks_executable; +++#endif +++ +++ GL(dl_init_static_tls) = &__pthread_init_static_tls; +++ +++ GL(dl_wait_lookup_done) = &__wait_lookup_done; +++ +++ /* Register the fork generation counter with the libc. */ +++#ifndef TLS_MULTIPLE_THREADS_IN_TCB +++ __libc_multiple_threads_ptr = +++#endif +++ __libc_pthread_init (&__fork_generation, __reclaim_stacks, +++ ptr_pthread_functions); +++ +++ /* Determine whether the machine is SMP or not. */ +++ __is_smp = is_smp_system (); +++} +++strong_alias (__pthread_initialize_minimal_internal, +++ __pthread_initialize_minimal) +++ +++ +++size_t +++__pthread_get_minstack (const pthread_attr_t *attr) +++{ +++ struct pthread_attr *iattr = (struct pthread_attr *) attr; +++ +++ return (GLRO(dl_pagesize) + __static_tls_size + PTHREAD_STACK_MIN +++ + iattr->guardsize); +++} ++--- /dev/null +++++ b/fbtl/old_pthread_atfork.c ++@@ -0,0 +1,26 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++ +++#if SHLIB_COMPAT (libpthread, GLIBC_2_0, GLIBC_2_3_2) +++# define __pthread_atfork __dyn_pthread_atfork +++# include "pthread_atfork.c" +++# undef __pthread_atfork +++compat_symbol (libpthread, __dyn_pthread_atfork, pthread_atfork, GLIBC_2_0); +++#endif ++--- /dev/null +++++ b/fbtl/old_pthread_cond_broadcast.c ++@@ -0,0 +1,56 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include "pthreadP.h" +++#include +++#include +++ +++ +++#if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_3_2) +++int +++__pthread_cond_broadcast_2_0 (pthread_cond_2_0_t *cond) +++{ +++ if (cond->cond == NULL) +++ { +++ pthread_cond_t *newcond; +++ +++#if LLL_LOCK_INITIALIZER == 0 +++ newcond = (pthread_cond_t *) calloc (sizeof (pthread_cond_t), 1); +++ if (newcond == NULL) +++ return ENOMEM; +++#else +++ newcond = (pthread_cond_t *) malloc (sizeof (pthread_cond_t)); +++ if (newcond == NULL) +++ return ENOMEM; +++ +++ /* Initialize the condvar. */ +++ (void) pthread_cond_init (newcond, NULL); +++#endif +++ +++ if (atomic_compare_and_exchange_bool_acq (&cond->cond, newcond, NULL)) +++ /* Somebody else just initialized the condvar. */ +++ free (newcond); +++ } +++ +++ return __pthread_cond_broadcast (cond->cond); +++} +++compat_symbol (libpthread, __pthread_cond_broadcast_2_0, +++ pthread_cond_broadcast, GLIBC_2_0); +++#endif ++--- /dev/null +++++ b/fbtl/old_pthread_cond_destroy.c ++@@ -0,0 +1,35 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include "pthreadP.h" +++#include +++ +++ +++#if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_3_2) +++int +++__pthread_cond_destroy_2_0 (pthread_cond_2_0_t *cond) +++{ +++ /* Free the memory which was eventually allocated. */ +++ free (cond->cond); +++ +++ return 0; +++} +++compat_symbol (libpthread, __pthread_cond_destroy_2_0, pthread_cond_destroy, +++ GLIBC_2_0); +++#endif ++--- /dev/null +++++ b/fbtl/old_pthread_cond_init.c ++@@ -0,0 +1,45 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include "pthreadP.h" +++#include +++ +++ +++#if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_3_2) +++int +++__pthread_cond_init_2_0 (pthread_cond_2_0_t *cond, +++ const pthread_condattr_t *cond_attr) +++{ +++ struct pthread_condattr *icond_attr = (struct pthread_condattr *) cond_attr; +++ +++ /* The type of the first argument is actually that of the old, too +++ small pthread_cond_t. We use only the first word of it, as a +++ pointer. */ +++ cond->cond = NULL; +++ +++ /* We can't support PSHARED condvars in the old pthread_cond_* +++ functions and neither clocks other than CLOCK_REALTIME. */ +++ if (icond_attr != NULL && icond_attr->value) +++ return EINVAL; +++ +++ return 0; +++} +++compat_symbol (libpthread, __pthread_cond_init_2_0, pthread_cond_init, +++ GLIBC_2_0); +++#endif ++--- /dev/null +++++ b/fbtl/old_pthread_cond_signal.c ++@@ -0,0 +1,56 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include "pthreadP.h" +++#include +++#include +++ +++ +++#if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_3_2) +++int +++__pthread_cond_signal_2_0 (pthread_cond_2_0_t *cond) +++{ +++ if (cond->cond == NULL) +++ { +++ pthread_cond_t *newcond; +++ +++#if LLL_LOCK_INITIALIZER == 0 +++ newcond = (pthread_cond_t *) calloc (sizeof (pthread_cond_t), 1); +++ if (newcond == NULL) +++ return ENOMEM; +++#else +++ newcond = (pthread_cond_t *) malloc (sizeof (pthread_cond_t)); +++ if (newcond == NULL) +++ return ENOMEM; +++ +++ /* Initialize the condvar. */ +++ (void) pthread_cond_init (newcond, NULL); +++#endif +++ +++ if (atomic_compare_and_exchange_bool_acq (&cond->cond, newcond, NULL)) +++ /* Somebody else just initialized the condvar. */ +++ free (newcond); +++ } +++ +++ return __pthread_cond_signal (cond->cond); +++} +++compat_symbol (libpthread, __pthread_cond_signal_2_0, pthread_cond_signal, +++ GLIBC_2_0); +++#endif ++--- /dev/null +++++ b/fbtl/old_pthread_cond_timedwait.c ++@@ -0,0 +1,57 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include "pthreadP.h" +++#include +++#include +++ +++ +++#if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_3_2) +++int +++__pthread_cond_timedwait_2_0 (pthread_cond_2_0_t *cond, pthread_mutex_t *mutex, +++ const struct timespec *abstime) +++{ +++ if (cond->cond == NULL) +++ { +++ pthread_cond_t *newcond; +++ +++#if LLL_LOCK_INITIALIZER == 0 +++ newcond = (pthread_cond_t *) calloc (sizeof (pthread_cond_t), 1); +++ if (newcond == NULL) +++ return ENOMEM; +++#else +++ newcond = (pthread_cond_t *) malloc (sizeof (pthread_cond_t)); +++ if (newcond == NULL) +++ return ENOMEM; +++ +++ /* Initialize the condvar. */ +++ (void) pthread_cond_init (newcond, NULL); +++#endif +++ +++ if (atomic_compare_and_exchange_bool_acq (&cond->cond, newcond, NULL)) +++ /* Somebody else just initialized the condvar. */ +++ free (newcond); +++ } +++ +++ return __pthread_cond_timedwait (cond->cond, mutex, abstime); +++} +++compat_symbol (libpthread, __pthread_cond_timedwait_2_0, +++ pthread_cond_timedwait, GLIBC_2_0); +++#endif ++--- /dev/null +++++ b/fbtl/old_pthread_cond_wait.c ++@@ -0,0 +1,56 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include "pthreadP.h" +++#include +++#include +++ +++ +++#if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_3_2) +++int +++__pthread_cond_wait_2_0 (pthread_cond_2_0_t *cond, pthread_mutex_t *mutex) +++{ +++ if (cond->cond == NULL) +++ { +++ pthread_cond_t *newcond; +++ +++#if LLL_LOCK_INITIALIZER == 0 +++ newcond = (pthread_cond_t *) calloc (sizeof (pthread_cond_t), 1); +++ if (newcond == NULL) +++ return ENOMEM; +++#else +++ newcond = (pthread_cond_t *) malloc (sizeof (pthread_cond_t)); +++ if (newcond == NULL) +++ return ENOMEM; +++ +++ /* Initialize the condvar. */ +++ (void) pthread_cond_init (newcond, NULL); +++#endif +++ +++ if (atomic_compare_and_exchange_bool_acq (&cond->cond, newcond, NULL)) +++ /* Somebody else just initialized the condvar. */ +++ free (newcond); +++ } +++ +++ return __pthread_cond_wait (cond->cond, mutex); +++} +++compat_symbol (libpthread, __pthread_cond_wait_2_0, pthread_cond_wait, +++ GLIBC_2_0); +++#endif ++--- /dev/null +++++ b/fbtl/perf.c ++@@ -0,0 +1,759 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#define _GNU_SOURCE 1 +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++#ifndef MAX_THREADS +++# define MAX_THREADS 100000 +++#endif +++#ifndef DEFAULT_THREADS +++# define DEFAULT_THREADS 50 +++#endif +++ +++ +++#define OPT_TO_THREAD 300 +++#define OPT_TO_PROCESS 301 +++#define OPT_SYNC_SIGNAL 302 +++#define OPT_SYNC_JOIN 303 +++#define OPT_TOPLEVEL 304 +++ +++ +++static const struct argp_option options[] = +++ { +++ { NULL, 0, NULL, 0, "\ +++This is a test for threads so we allow ther user to selection the number of \ +++threads which are used at any one time. Independently the total number of \ +++rounds can be selected. This is the total number of threads which will have \ +++run when the process terminates:" }, +++ { "threads", 't', "NUMBER", 0, "Number of threads used at once" }, +++ { "starts", 's', "NUMBER", 0, "Total number of working threads" }, +++ { "toplevel", OPT_TOPLEVEL, "NUMBER", 0, +++ "Number of toplevel threads which start the other threads; this \ +++implies --sync-join" }, +++ +++ { NULL, 0, NULL, 0, "\ +++Each thread can do one of two things: sleep or do work. The latter is 100% \ +++CPU bound. The work load is the probability a thread does work. All values \ +++from zero to 100 (inclusive) are valid. How often each thread repeats this \ +++can be determined by the number of rounds. The work cost determines how long \ +++each work session (not sleeping) takes. If it is zero a thread would \ +++effectively nothing. By setting the number of rounds to zero the thread \ +++does no work at all and pure thread creation times can be measured." }, +++ { "workload", 'w', "PERCENT", 0, "Percentage of time spent working" }, +++ { "workcost", 'c', "NUMBER", 0, +++ "Factor in the cost of each round of working" }, +++ { "rounds", 'r', "NUMBER", 0, "Number of rounds each thread runs" }, +++ +++ { NULL, 0, NULL, 0, "\ +++There are a number of different methods how thread creation can be \ +++synchronized. Synchronization is necessary since the number of concurrently \ +++running threads is limited." }, +++ { "sync-signal", OPT_SYNC_SIGNAL, NULL, 0, +++ "Synchronize using a signal (default)" }, +++ { "sync-join", OPT_SYNC_JOIN, NULL, 0, "Synchronize using pthread_join" }, +++ +++ { NULL, 0, NULL, 0, "\ +++One parameter for each threads execution is the size of the stack. If this \ +++parameter is not used the system's default stack size is used. If many \ +++threads are used the stack size should be chosen quite small." }, +++ { "stacksize", 'S', "BYTES", 0, "Size of threads stack" }, +++ { "guardsize", 'g', "BYTES", 0, +++ "Size of stack guard area; must fit into the stack" }, +++ +++ { NULL, 0, NULL, 0, "Signal options:" }, +++ { "to-thread", OPT_TO_THREAD, NULL, 0, "Send signal to main thread" }, +++ { "to-process", OPT_TO_PROCESS, NULL, 0, +++ "Send signal to process (default)" }, +++ +++ { NULL, 0, NULL, 0, "Administrative options:" }, +++ { "progress", 'p', NULL, 0, "Show signs of progress" }, +++ { "timing", 'T', NULL, 0, +++ "Measure time from startup to the last thread finishing" }, +++ { NULL, 0, NULL, 0, NULL } +++ }; +++ +++/* Prototype for option handler. */ +++static error_t parse_opt (int key, char *arg, struct argp_state *state); +++ +++/* Data structure to communicate with argp functions. */ +++static struct argp argp = +++{ +++ options, parse_opt +++}; +++ +++ +++static unsigned long int threads = DEFAULT_THREADS; +++static unsigned long int workload = 75; +++static unsigned long int workcost = 20; +++static unsigned long int rounds = 10; +++static long int starts = 5000; +++static unsigned long int stacksize; +++static long int guardsize = -1; +++static bool progress; +++static bool timing; +++static bool to_thread; +++static unsigned long int toplevel = 1; +++ +++ +++static long int running; +++static pthread_mutex_t running_mutex = PTHREAD_MUTEX_INITIALIZER; +++ +++static pid_t pid; +++static pthread_t tmain; +++ +++static clockid_t cl; +++static struct timespec start_time; +++ +++ +++static pthread_mutex_t sum_mutex = PTHREAD_MUTEX_INITIALIZER; +++unsigned int sum; +++ +++static enum +++ { +++ sync_signal, +++ sync_join +++ } +++sync_method; +++ +++ +++/* We use 64bit values for the times. */ +++typedef unsigned long long int hp_timing_t; +++ +++ +++/* Attributes for all created threads. */ +++static pthread_attr_t attr; +++ +++ +++static void * +++work (void *arg) +++{ +++ unsigned long int i; +++ unsigned int state = (unsigned long int) arg; +++ +++ for (i = 0; i < rounds; ++i) +++ { +++ /* Determine what to do. */ +++ unsigned int rnum; +++ +++ /* Uniform distribution. */ +++ do +++ rnum = rand_r (&state); +++ while (rnum >= UINT_MAX - (UINT_MAX % 100)); +++ +++ rnum %= 100; +++ +++ if (rnum < workload) +++ { +++ int j; +++ int a[4] = { i, rnum, i + rnum, rnum - i }; +++ +++ if (progress) +++ write (STDERR_FILENO, "c", 1); +++ +++ for (j = 0; j < workcost; ++j) +++ { +++ a[0] += a[3] >> 12; +++ a[1] += a[2] >> 20; +++ a[2] += a[1] ^ 0x3423423; +++ a[3] += a[0] - a[1]; +++ } +++ +++ pthread_mutex_lock (&sum_mutex); +++ sum += a[0] + a[1] + a[2] + a[3]; +++ pthread_mutex_unlock (&sum_mutex); +++ } +++ else +++ { +++ /* Just sleep. */ +++ struct timespec tv; +++ +++ tv.tv_sec = 0; +++ tv.tv_nsec = 10000000; +++ +++ if (progress) +++ write (STDERR_FILENO, "w", 1); +++ +++ nanosleep (&tv, NULL); +++ } +++ } +++ +++ return NULL; +++} +++ +++ +++static void * +++thread_function (void *arg) +++{ +++ work (arg); +++ +++ pthread_mutex_lock (&running_mutex); +++ if (--running <= 0 && starts <= 0) +++ { +++ /* We are done. */ +++ if (progress) +++ write (STDERR_FILENO, "\n", 1); +++ +++ if (timing) +++ { +++ struct timespec end_time; +++ +++ if (clock_gettime (cl, &end_time) == 0) +++ { +++ end_time.tv_sec -= start_time.tv_sec; +++ end_time.tv_nsec -= start_time.tv_nsec; +++ if (end_time.tv_nsec < 0) +++ { +++ end_time.tv_nsec += 1000000000; +++ --end_time.tv_sec; +++ } +++ +++ printf ("\nRuntime: %lu.%09lu seconds\n", +++ (unsigned long int) end_time.tv_sec, +++ (unsigned long int) end_time.tv_nsec); +++ } +++ } +++ +++ printf ("Result: %08x\n", sum); +++ +++ exit (0); +++ } +++ pthread_mutex_unlock (&running_mutex); +++ +++ if (sync_method == sync_signal) +++ { +++ if (to_thread) +++ /* This code sends a signal to the main thread. */ +++ pthread_kill (tmain, SIGUSR1); +++ else +++ /* Use this code to test sending a signal to the process. */ +++ kill (pid, SIGUSR1); +++ } +++ +++ if (progress) +++ write (STDERR_FILENO, "f", 1); +++ +++ return NULL; +++} +++ +++ +++struct start_info +++{ +++ unsigned int starts; +++ unsigned int threads; +++}; +++ +++ +++static void * +++start_threads (void *arg) +++{ +++ struct start_info *si = arg; +++ unsigned int starts = si->starts; +++ pthread_t ths[si->threads]; +++ unsigned int state = starts; +++ unsigned int n; +++ unsigned int i = 0; +++ int err; +++ +++ if (progress) +++ write (STDERR_FILENO, "T", 1); +++ +++ memset (ths, '\0', sizeof (pthread_t) * si->threads); +++ +++ while (starts-- > 0) +++ { +++ if (ths[i] != 0) +++ { +++ /* Wait for the threads in the order they were created. */ +++ err = pthread_join (ths[i], NULL); +++ if (err != 0) +++ error (EXIT_FAILURE, err, "cannot join thread"); +++ +++ if (progress) +++ write (STDERR_FILENO, "f", 1); +++ } +++ +++ err = pthread_create (&ths[i], &attr, work, +++ (void *) (long) (rand_r (&state) + starts + i)); +++ +++ if (err != 0) +++ error (EXIT_FAILURE, err, "cannot start thread"); +++ +++ if (progress) +++ write (STDERR_FILENO, "t", 1); +++ +++ if (++i == si->threads) +++ i = 0; +++ } +++ +++ n = i; +++ do +++ { +++ if (ths[i] != 0) +++ { +++ err = pthread_join (ths[i], NULL); +++ if (err != 0) +++ error (EXIT_FAILURE, err, "cannot join thread"); +++ +++ if (progress) +++ write (STDERR_FILENO, "f", 1); +++ } +++ +++ if (++i == si->threads) +++ i = 0; +++ } +++ while (i != n); +++ +++ if (progress) +++ write (STDERR_FILENO, "F", 1); +++ +++ return NULL; +++} +++ +++ +++int +++main (int argc, char *argv[]) +++{ +++ int remaining; +++ sigset_t ss; +++ pthread_t th; +++ pthread_t *ths = NULL; +++ int empty = 0; +++ int last; +++ bool cont = true; +++ +++ /* Parse and process arguments. */ +++ argp_parse (&argp, argc, argv, 0, &remaining, NULL); +++ +++ if (sync_method == sync_join) +++ { +++ ths = (pthread_t *) calloc (threads, sizeof (pthread_t)); +++ if (ths == NULL) +++ error (EXIT_FAILURE, errno, +++ "cannot allocate memory for thread descriptor array"); +++ +++ last = threads; +++ } +++ else +++ { +++ ths = &th; +++ last = 1; +++ } +++ +++ if (toplevel > threads) +++ { +++ printf ("resetting number of toplevel threads to %lu to not surpass number to concurrent threads\n", +++ threads); +++ toplevel = threads; +++ } +++ +++ if (timing) +++ { +++ if (clock_getcpuclockid (0, &cl) != 0 +++ || clock_gettime (cl, &start_time) != 0) +++ timing = false; +++ } +++ +++ /* We need this later. */ +++ pid = getpid (); +++ tmain = pthread_self (); +++ +++ /* We use signal SIGUSR1 for communication between the threads and +++ the main thread. We only want sychronous notification. */ +++ if (sync_method == sync_signal) +++ { +++ sigemptyset (&ss); +++ sigaddset (&ss, SIGUSR1); +++ if (sigprocmask (SIG_BLOCK, &ss, NULL) != 0) +++ error (EXIT_FAILURE, errno, "cannot set signal mask"); +++ } +++ +++ /* Create the thread attributes. */ +++ pthread_attr_init (&attr); +++ +++ /* If the user provided a stack size use it. */ +++ if (stacksize != 0 +++ && pthread_attr_setstacksize (&attr, stacksize) != 0) +++ puts ("could not set stack size; will use default"); +++ /* And stack guard size. */ +++ if (guardsize != -1 +++ && pthread_attr_setguardsize (&attr, guardsize) != 0) +++ puts ("invalid stack guard size; will use default"); +++ +++ /* All threads are created detached if we are not using pthread_join +++ to synchronize. */ +++ if (sync_method != sync_join) +++ pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED); +++ +++ if (sync_method == sync_signal) +++ { +++ while (1) +++ { +++ int err; +++ bool do_wait = false; +++ +++ pthread_mutex_lock (&running_mutex); +++ if (starts-- < 0) +++ cont = false; +++ else +++ do_wait = ++running >= threads && starts > 0; +++ +++ pthread_mutex_unlock (&running_mutex); +++ +++ if (! cont) +++ break; +++ +++ if (progress) +++ write (STDERR_FILENO, "t", 1); +++ +++ err = pthread_create (&ths[empty], &attr, thread_function, +++ (void *) starts); +++ if (err != 0) +++ error (EXIT_FAILURE, err, "cannot start thread %lu", starts); +++ +++ if (++empty == last) +++ empty = 0; +++ +++ if (do_wait) +++ sigwaitinfo (&ss, NULL); +++ } +++ +++ /* Do nothing anymore. On of the threads will terminate the program. */ +++ sigfillset (&ss); +++ sigdelset (&ss, SIGINT); +++ while (1) +++ sigsuspend (&ss); +++ } +++ else +++ { +++ pthread_t ths[toplevel]; +++ struct start_info si[toplevel]; +++ unsigned int i; +++ +++ for (i = 0; i < toplevel; ++i) +++ { +++ unsigned int child_starts = starts / (toplevel - i); +++ unsigned int child_threads = threads / (toplevel - i); +++ int err; +++ +++ si[i].starts = child_starts; +++ si[i].threads = child_threads; +++ +++ err = pthread_create (&ths[i], &attr, start_threads, &si[i]); +++ if (err != 0) +++ error (EXIT_FAILURE, err, "cannot start thread"); +++ +++ starts -= child_starts; +++ threads -= child_threads; +++ } +++ +++ for (i = 0; i < toplevel; ++i) +++ { +++ int err = pthread_join (ths[i], NULL); +++ +++ if (err != 0) +++ error (EXIT_FAILURE, err, "cannot join thread"); +++ } +++ +++ /* We are done. */ +++ if (progress) +++ write (STDERR_FILENO, "\n", 1); +++ +++ if (timing) +++ { +++ struct timespec end_time; +++ +++ if (clock_gettime (cl, &end_time) == 0) +++ { +++ end_time.tv_sec -= start_time.tv_sec; +++ end_time.tv_nsec -= start_time.tv_nsec; +++ if (end_time.tv_nsec < 0) +++ { +++ end_time.tv_nsec += 1000000000; +++ --end_time.tv_sec; +++ } +++ +++ printf ("\nRuntime: %lu.%09lu seconds\n", +++ (unsigned long int) end_time.tv_sec, +++ (unsigned long int) end_time.tv_nsec); +++ } +++ } +++ +++ printf ("Result: %08x\n", sum); +++ +++ exit (0); +++ } +++ +++ /* NOTREACHED */ +++ return 0; +++} +++ +++ +++/* Handle program arguments. */ +++static error_t +++parse_opt (int key, char *arg, struct argp_state *state) +++{ +++ unsigned long int num; +++ long int snum; +++ +++ switch (key) +++ { +++ case 't': +++ num = strtoul (arg, NULL, 0); +++ if (num <= MAX_THREADS) +++ threads = num; +++ else +++ printf ("\ +++number of threads limited to %u; recompile with a higher limit if necessary", +++ MAX_THREADS); +++ break; +++ +++ case 'w': +++ num = strtoul (arg, NULL, 0); +++ if (num <= 100) +++ workload = num; +++ else +++ puts ("workload must be between 0 and 100 percent"); +++ break; +++ +++ case 'c': +++ workcost = strtoul (arg, NULL, 0); +++ break; +++ +++ case 'r': +++ rounds = strtoul (arg, NULL, 0); +++ break; +++ +++ case 's': +++ starts = strtoul (arg, NULL, 0); +++ break; +++ +++ case 'S': +++ num = strtoul (arg, NULL, 0); +++ if (num >= PTHREAD_STACK_MIN) +++ stacksize = num; +++ else +++ printf ("minimum stack size is %d\n", PTHREAD_STACK_MIN); +++ break; +++ +++ case 'g': +++ snum = strtol (arg, NULL, 0); +++ if (snum < 0) +++ printf ("invalid guard size %s\n", arg); +++ else +++ guardsize = snum; +++ break; +++ +++ case 'p': +++ progress = true; +++ break; +++ +++ case 'T': +++ timing = true; +++ break; +++ +++ case OPT_TO_THREAD: +++ to_thread = true; +++ break; +++ +++ case OPT_TO_PROCESS: +++ to_thread = false; +++ break; +++ +++ case OPT_SYNC_SIGNAL: +++ sync_method = sync_signal; +++ break; +++ +++ case OPT_SYNC_JOIN: +++ sync_method = sync_join; +++ break; +++ +++ case OPT_TOPLEVEL: +++ num = strtoul (arg, NULL, 0); +++ if (num < MAX_THREADS) +++ toplevel = num; +++ else +++ printf ("\ +++number of threads limited to %u; recompile with a higher limit if necessary", +++ MAX_THREADS); +++ sync_method = sync_join; +++ break; +++ +++ default: +++ return ARGP_ERR_UNKNOWN; +++ } +++ +++ return 0; +++} +++ +++ +++static hp_timing_t +++get_clockfreq (void) +++{ +++ /* We read the information from the /proc filesystem. It contains at +++ least one line like +++ cpu MHz : 497.840237 +++ or also +++ cpu MHz : 497.841 +++ We search for this line and convert the number in an integer. */ +++ static hp_timing_t result; +++ int fd; +++ +++ /* If this function was called before, we know the result. */ +++ if (result != 0) +++ return result; +++ +++ fd = open ("/proc/cpuinfo", O_RDONLY); +++ if (__glibc_likely (fd != -1)) +++ { +++ /* XXX AFAIK the /proc filesystem can generate "files" only up +++ to a size of 4096 bytes. */ +++ char buf[4096]; +++ ssize_t n; +++ +++ n = read (fd, buf, sizeof buf); +++ if (__builtin_expect (n, 1) > 0) +++ { +++ char *mhz = memmem (buf, n, "cpu MHz", 7); +++ +++ if (__glibc_likely (mhz != NULL)) +++ { +++ char *endp = buf + n; +++ int seen_decpoint = 0; +++ int ndigits = 0; +++ +++ /* Search for the beginning of the string. */ +++ while (mhz < endp && (*mhz < '0' || *mhz > '9') && *mhz != '\n') +++ ++mhz; +++ +++ while (mhz < endp && *mhz != '\n') +++ { +++ if (*mhz >= '0' && *mhz <= '9') +++ { +++ result *= 10; +++ result += *mhz - '0'; +++ if (seen_decpoint) +++ ++ndigits; +++ } +++ else if (*mhz == '.') +++ seen_decpoint = 1; +++ +++ ++mhz; +++ } +++ +++ /* Compensate for missing digits at the end. */ +++ while (ndigits++ < 6) +++ result *= 10; +++ } +++ } +++ +++ close (fd); +++ } +++ +++ return result; +++} +++ +++ +++int +++clock_getcpuclockid (pid_t pid, clockid_t *clock_id) +++{ +++ /* We don't allow any process ID but our own. */ +++ if (pid != 0 && pid != getpid ()) +++ return EPERM; +++ +++#ifdef CLOCK_PROCESS_CPUTIME_ID +++ /* Store the number. */ +++ *clock_id = CLOCK_PROCESS_CPUTIME_ID; +++ +++ return 0; +++#else +++ /* We don't have a timer for that. */ +++ return ENOENT; +++#endif +++} +++ +++ +++#ifdef i386 +++#define HP_TIMING_NOW(Var) __asm__ __volatile__ ("rdtsc" : "=A" (Var)) +++#elif defined __x86_64__ +++# define HP_TIMING_NOW(Var) \ +++ ({ unsigned int _hi, _lo; \ +++ asm volatile ("rdtsc" : "=a" (_lo), "=d" (_hi)); \ +++ (Var) = ((unsigned long long int) _hi << 32) | _lo; }) +++#elif defined __ia64__ +++#define HP_TIMING_NOW(Var) __asm__ __volatile__ ("mov %0=ar.itc" : "=r" (Var) : : "memory") +++#else +++#error "HP_TIMING_NOW missing" +++#endif +++ +++/* Get current value of CLOCK and store it in TP. */ +++int +++clock_gettime (clockid_t clock_id, struct timespec *tp) +++{ +++ int retval = -1; +++ +++ switch (clock_id) +++ { +++ case CLOCK_PROCESS_CPUTIME_ID: +++ { +++ +++ static hp_timing_t freq; +++ hp_timing_t tsc; +++ +++ /* Get the current counter. */ +++ HP_TIMING_NOW (tsc); +++ +++ if (freq == 0) +++ { +++ freq = get_clockfreq (); +++ if (freq == 0) +++ return EINVAL; +++ } +++ +++ /* Compute the seconds. */ +++ tp->tv_sec = tsc / freq; +++ +++ /* And the nanoseconds. This computation should be stable until +++ we get machines with about 16GHz frequency. */ +++ tp->tv_nsec = ((tsc % freq) * UINT64_C (1000000000)) / freq; +++ +++ retval = 0; +++ } +++ break; +++ +++ default: +++ errno = EINVAL; +++ break; +++ } +++ +++ return retval; +++} ++--- /dev/null +++++ b/fbtl/pt-allocrtsig.c ++@@ -0,0 +1,50 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++ +++ +++/* These are defined in libc. We want to have only one definition +++ so we "forward" the calls. */ +++extern int __libc_current_sigrtmin_private (void); +++extern int __libc_current_sigrtmax_private (void); +++extern int __libc_allocate_rtsig_private (int high); +++ +++ +++/* We reserve __SIGRTMIN for use as the cancellation signal and +++ __SIGRTMIN+1 to handle setuid et.al. These signals are used +++ internally. */ +++int +++__libc_current_sigrtmin (void) +++{ +++ return __libc_current_sigrtmin_private (); +++} +++ +++ +++int +++__libc_current_sigrtmax (void) +++{ +++ return __libc_current_sigrtmax_private (); +++} +++ +++ +++int +++__libc_allocate_rtsig (int high) +++{ +++ return __libc_allocate_rtsig_private (high); +++} ++--- /dev/null +++++ b/fbtl/pt-cleanup.c ++@@ -0,0 +1,62 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include "pthreadP.h" +++#include +++ +++void +++__pthread_cleanup_upto (__jmp_buf target, char *targetframe) +++{ +++ struct pthread *self = THREAD_SELF; +++ struct _pthread_cleanup_buffer *cbuf; +++ +++ /* Adjust all pointers used in comparisons, so that top of thread's +++ stack is at the top of address space. Without that, things break +++ if stack is allocated above the main stack. */ +++ uintptr_t adj = (uintptr_t) self->stackblock + self->stackblock_size; +++ uintptr_t targetframe_adj = (uintptr_t) targetframe - adj; +++ +++ for (cbuf = THREAD_GETMEM (self, cleanup); +++ cbuf != NULL && _JMPBUF_UNWINDS_ADJ (target, cbuf, adj); +++ cbuf = cbuf->__prev) +++ { +++#if _STACK_GROWS_DOWN +++ if ((uintptr_t) cbuf - adj <= targetframe_adj) +++ { +++ cbuf = NULL; +++ break; +++ } +++#elif _STACK_GROWS_UP +++ if ((uintptr_t) cbuf - adj >= targetframe_adj) +++ { +++ cbuf = NULL; +++ break; +++ } +++#else +++# error "Define either _STACK_GROWS_DOWN or _STACK_GROWS_UP" +++#endif +++ +++ /* Call the cleanup code. */ +++ cbuf->__routine (cbuf->__arg); +++ } +++ +++ THREAD_SETMEM (self, cleanup, cbuf); +++} +++hidden_def (__pthread_cleanup_upto) ++--- /dev/null +++++ b/fbtl/pt-crti.S ++@@ -0,0 +1,43 @@ +++/* Special .init and .fini section support for libpthread. +++ Copyright (C) 2012-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. +++ +++ 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, see +++ . */ +++ +++/* Arrange for __pthread_initialize_minimal_internal to be called at +++ libpthread startup, instead of conditionally calling +++ __gmon_start__. */ +++ +++#define PREINIT_FUNCTION __pthread_initialize_minimal_internal +++#define PREINIT_FUNCTION_WEAK 0 +++ +++#include ++--- /dev/null +++++ b/fbtl/pt-raise.c ++@@ -0,0 +1,29 @@ +++/* ISO C raise function for libpthread. +++ Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++ +++ +++int +++raise (int sig) +++{ +++ /* This is what POSIX says must happen. */ +++ return pthread_kill (pthread_self (), sig); +++} ++--- /dev/null +++++ b/fbtl/pt-system.c ++@@ -0,0 +1,32 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include "pthreadP.h" +++ +++ +++int +++system (const char *line) +++{ +++ return __libc_system (line); +++} +++ +++/* __libc_system in libc.so handles cancellation. */ +++LIBC_CANCEL_HANDLED (); ++--- /dev/null +++++ b/fbtl/pthread-errnos.sym ++@@ -0,0 +1,13 @@ +++#include +++ +++-- These errno codes are used by some assembly code. +++ +++EAGAIN EAGAIN +++EBUSY EBUSY +++EDEADLK EDEADLK +++EINTR EINTR +++EINVAL EINVAL +++ENOSYS ENOSYS +++EOVERFLOW EOVERFLOW +++ETIMEDOUT ETIMEDOUT +++EWOULDBLOCK EWOULDBLOCK ++--- /dev/null +++++ b/fbtl/pthreadP.h ++@@ -0,0 +1,661 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#ifndef _PTHREADP_H +++#define _PTHREADP_H 1 +++ +++#include +++#include +++#include +++#include +++#include "descr.h" +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++/* Atomic operations on TLS memory. */ +++#ifndef THREAD_ATOMIC_CMPXCHG_VAL +++# define THREAD_ATOMIC_CMPXCHG_VAL(descr, member, new, old) \ +++ atomic_compare_and_exchange_val_acq (&(descr)->member, new, old) +++#endif +++ +++#ifndef THREAD_ATOMIC_BIT_SET +++# define THREAD_ATOMIC_BIT_SET(descr, member, bit) \ +++ atomic_bit_set (&(descr)->member, bit) +++#endif +++ +++ +++/* Adaptive mutex definitions. */ +++#ifndef MAX_ADAPTIVE_COUNT +++# define MAX_ADAPTIVE_COUNT 100 +++#endif +++ +++ +++/* Magic cookie representing robust mutex with dead owner. */ +++#define PTHREAD_MUTEX_INCONSISTENT INT_MAX +++/* Magic cookie representing not recoverable robust mutex. */ +++#define PTHREAD_MUTEX_NOTRECOVERABLE (INT_MAX - 1) +++ +++ +++/* Internal mutex type value. */ +++enum +++{ +++ PTHREAD_MUTEX_KIND_MASK_NP = 3, +++ PTHREAD_MUTEX_ROBUST_NORMAL_NP = 16, +++ PTHREAD_MUTEX_ROBUST_RECURSIVE_NP +++ = PTHREAD_MUTEX_ROBUST_NORMAL_NP | PTHREAD_MUTEX_RECURSIVE_NP, +++ PTHREAD_MUTEX_ROBUST_ERRORCHECK_NP +++ = PTHREAD_MUTEX_ROBUST_NORMAL_NP | PTHREAD_MUTEX_ERRORCHECK_NP, +++ PTHREAD_MUTEX_ROBUST_ADAPTIVE_NP +++ = PTHREAD_MUTEX_ROBUST_NORMAL_NP | PTHREAD_MUTEX_ADAPTIVE_NP, +++ PTHREAD_MUTEX_PRIO_INHERIT_NP = 32, +++ PTHREAD_MUTEX_PI_NORMAL_NP +++ = PTHREAD_MUTEX_PRIO_INHERIT_NP | PTHREAD_MUTEX_NORMAL, +++ PTHREAD_MUTEX_PI_RECURSIVE_NP +++ = PTHREAD_MUTEX_PRIO_INHERIT_NP | PTHREAD_MUTEX_RECURSIVE_NP, +++ PTHREAD_MUTEX_PI_ERRORCHECK_NP +++ = PTHREAD_MUTEX_PRIO_INHERIT_NP | PTHREAD_MUTEX_ERRORCHECK_NP, +++ PTHREAD_MUTEX_PI_ADAPTIVE_NP +++ = PTHREAD_MUTEX_PRIO_INHERIT_NP | PTHREAD_MUTEX_ADAPTIVE_NP, +++ PTHREAD_MUTEX_PI_ROBUST_NORMAL_NP +++ = PTHREAD_MUTEX_PRIO_INHERIT_NP | PTHREAD_MUTEX_ROBUST_NORMAL_NP, +++ PTHREAD_MUTEX_PI_ROBUST_RECURSIVE_NP +++ = PTHREAD_MUTEX_PRIO_INHERIT_NP | PTHREAD_MUTEX_ROBUST_RECURSIVE_NP, +++ PTHREAD_MUTEX_PI_ROBUST_ERRORCHECK_NP +++ = PTHREAD_MUTEX_PRIO_INHERIT_NP | PTHREAD_MUTEX_ROBUST_ERRORCHECK_NP, +++ PTHREAD_MUTEX_PI_ROBUST_ADAPTIVE_NP +++ = PTHREAD_MUTEX_PRIO_INHERIT_NP | PTHREAD_MUTEX_ROBUST_ADAPTIVE_NP, +++ PTHREAD_MUTEX_PRIO_PROTECT_NP = 64, +++ PTHREAD_MUTEX_PP_NORMAL_NP +++ = PTHREAD_MUTEX_PRIO_PROTECT_NP | PTHREAD_MUTEX_NORMAL, +++ PTHREAD_MUTEX_PP_RECURSIVE_NP +++ = PTHREAD_MUTEX_PRIO_PROTECT_NP | PTHREAD_MUTEX_RECURSIVE_NP, +++ PTHREAD_MUTEX_PP_ERRORCHECK_NP +++ = PTHREAD_MUTEX_PRIO_PROTECT_NP | PTHREAD_MUTEX_ERRORCHECK_NP, +++ PTHREAD_MUTEX_PP_ADAPTIVE_NP +++ = PTHREAD_MUTEX_PRIO_PROTECT_NP | PTHREAD_MUTEX_ADAPTIVE_NP +++}; +++#define PTHREAD_MUTEX_PSHARED_BIT 128 +++ +++#define PTHREAD_MUTEX_TYPE(m) \ +++ ((m)->__data.__kind & 127) +++ +++#if LLL_PRIVATE == 0 && LLL_SHARED == 128 +++# define PTHREAD_MUTEX_PSHARED(m) \ +++ ((m)->__data.__kind & 128) +++#else +++# define PTHREAD_MUTEX_PSHARED(m) \ +++ (((m)->__data.__kind & 128) ? LLL_SHARED : LLL_PRIVATE) +++#endif +++ +++/* The kernel when waking robust mutexes on exit never uses +++ FUTEX_PRIVATE_FLAG FUTEX_WAKE. */ +++#define PTHREAD_ROBUST_MUTEX_PSHARED(m) LLL_SHARED +++ +++/* Ceiling in __data.__lock. __data.__lock is signed, so don't +++ use the MSB bit in there, but in the mask also include that bit, +++ so that the compiler can optimize & PTHREAD_MUTEX_PRIO_CEILING_MASK +++ masking if the value is then shifted down by +++ PTHREAD_MUTEX_PRIO_CEILING_SHIFT. */ +++#define PTHREAD_MUTEX_PRIO_CEILING_SHIFT 19 +++#define PTHREAD_MUTEX_PRIO_CEILING_MASK 0xfff80000 +++ +++ +++/* Flags in mutex attr. */ +++#define PTHREAD_MUTEXATTR_PROTOCOL_SHIFT 28 +++#define PTHREAD_MUTEXATTR_PROTOCOL_MASK 0x30000000 +++#define PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT 12 +++#define PTHREAD_MUTEXATTR_PRIO_CEILING_MASK 0x00fff000 +++#define PTHREAD_MUTEXATTR_FLAG_ROBUST 0x40000000 +++#define PTHREAD_MUTEXATTR_FLAG_PSHARED 0x80000000 +++#define PTHREAD_MUTEXATTR_FLAG_BITS \ +++ (PTHREAD_MUTEXATTR_FLAG_ROBUST | PTHREAD_MUTEXATTR_FLAG_PSHARED \ +++ | PTHREAD_MUTEXATTR_PROTOCOL_MASK | PTHREAD_MUTEXATTR_PRIO_CEILING_MASK) +++ +++ +++/* Check whether rwlock prefers readers. */ +++#define PTHREAD_RWLOCK_PREFER_READER_P(rwlock) \ +++ ((rwlock)->__data.__flags == 0) +++ +++ +++/* Bits used in robust mutex implementation. */ +++#define FUTEX_WAITERS 0x80000000 +++#define FUTEX_OWNER_DIED 0x40000000 +++#define FUTEX_TID_MASK 0x3fffffff +++ +++ +++/* Internal variables. */ +++ +++ +++/* Default pthread attributes. */ +++extern struct pthread_attr __default_pthread_attr attribute_hidden; +++extern int __default_pthread_attr_lock attribute_hidden; +++ +++/* Size and alignment of static TLS block. */ +++extern size_t __static_tls_size attribute_hidden; +++extern size_t __static_tls_align_m1 attribute_hidden; +++ +++/* Flag whether the machine is SMP or not. */ +++extern int __is_smp attribute_hidden; +++ +++/* Thread descriptor handling. */ +++extern list_t __stack_user; +++hidden_proto (__stack_user) +++ +++/* Attribute handling. */ +++extern struct pthread_attr *__attr_list attribute_hidden; +++extern int __attr_list_lock attribute_hidden; +++ +++/* First available RT signal. */ +++extern int __current_sigrtmin attribute_hidden; +++/* Last available RT signal. */ +++extern int __current_sigrtmax attribute_hidden; +++ +++/* Concurrency handling. */ +++extern int __concurrency_level attribute_hidden; +++ +++/* Thread-local data key handling. */ +++extern struct pthread_key_struct __pthread_keys[PTHREAD_KEYS_MAX]; +++hidden_proto (__pthread_keys) +++ +++/* Number of threads running. */ +++extern unsigned int __nptl_nthreads attribute_hidden; +++ +++#ifndef __ASSUME_SET_ROBUST_LIST +++/* Negative if we do not have the system call and we can use it. */ +++extern int __set_robust_list_avail attribute_hidden; +++#endif +++ +++/* Thread Priority Protection. */ +++extern int __sched_fifo_min_prio attribute_hidden; +++extern int __sched_fifo_max_prio attribute_hidden; +++extern void __init_sched_fifo_prio (void) attribute_hidden; +++extern int __pthread_tpp_change_priority (int prev_prio, int new_prio) +++ attribute_hidden; +++extern int __pthread_current_priority (void) attribute_hidden; +++ +++/* The library can run in debugging mode where it performs a lot more +++ tests. */ +++extern int __pthread_debug attribute_hidden; +++ +++/** For now disable debugging support. */ +++#if 0 +++# define DEBUGGING_P __builtin_expect (__pthread_debug, 0) +++# define INVALID_TD_P(pd) (DEBUGGING_P && __find_in_stack_list (pd) == NULL) +++# define INVALID_NOT_TERMINATED_TD_P(pd) INVALID_TD_P (pd) +++#else +++# define DEBUGGING_P 0 +++/* 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 <= KTID_TERMINATED, 0) +++# define INVALID_NOT_TERMINATED_TD_P(pd) __builtin_expect ((pd)->tid < KTID_TERMINATED, 0) +++#endif +++ +++ +++/* Cancellation test. */ +++#define CANCELLATION_P(self) \ +++ do { \ +++ int cancelhandling = THREAD_GETMEM (self, cancelhandling); \ +++ if (CANCEL_ENABLED_AND_CANCELED (cancelhandling)) \ +++ { \ +++ THREAD_SETMEM (self, result, PTHREAD_CANCELED); \ +++ __do_cancel (); \ +++ } \ +++ } while (0) +++ +++ +++extern void __pthread_unwind (__pthread_unwind_buf_t *__buf) +++ __cleanup_fct_attribute __attribute ((__noreturn__)) +++#if !defined SHARED && !IS_IN (libpthread) +++ weak_function +++#endif +++ ; +++extern void __pthread_unwind_next (__pthread_unwind_buf_t *__buf) +++ __cleanup_fct_attribute __attribute ((__noreturn__)) +++#ifndef SHARED +++ weak_function +++#endif +++ ; +++extern void __pthread_register_cancel (__pthread_unwind_buf_t *__buf) +++ __cleanup_fct_attribute; +++extern void __pthread_unregister_cancel (__pthread_unwind_buf_t *__buf) +++ __cleanup_fct_attribute; +++#if IS_IN (libpthread) +++hidden_proto (__pthread_unwind) +++hidden_proto (__pthread_unwind_next) +++hidden_proto (__pthread_register_cancel) +++hidden_proto (__pthread_unregister_cancel) +++# ifdef SHARED +++extern void attribute_hidden pthread_cancel_init (void); +++extern void __unwind_freeres (void); +++# endif +++#endif +++ +++ +++/* Called when a thread reacts on a cancellation request. */ +++static inline void +++__attribute ((noreturn, always_inline)) +++__do_cancel (void) +++{ +++ struct pthread *self = THREAD_SELF; +++ +++ /* Make sure we get no more cancellations. */ +++ THREAD_ATOMIC_BIT_SET (self, cancelhandling, EXITING_BIT); +++ +++ __pthread_unwind ((__pthread_unwind_buf_t *) +++ THREAD_GETMEM (self, cleanup_jmp_buf)); +++} +++ +++ +++/* Set cancellation mode to asynchronous. */ +++#define CANCEL_ASYNC() \ +++ __pthread_enable_asynccancel () +++/* Reset to previous cancellation mode. */ +++#define CANCEL_RESET(oldtype) \ +++ __pthread_disable_asynccancel (oldtype) +++ +++#if IS_IN (libc) +++/* Same as CANCEL_ASYNC, but for use in libc.so. */ +++# define LIBC_CANCEL_ASYNC() \ +++ __libc_enable_asynccancel () +++/* Same as CANCEL_RESET, but for use in libc.so. */ +++# define LIBC_CANCEL_RESET(oldtype) \ +++ __libc_disable_asynccancel (oldtype) +++# define LIBC_CANCEL_HANDLED() \ +++ __asm (".globl " __SYMBOL_PREFIX "__libc_enable_asynccancel"); \ +++ __asm (".globl " __SYMBOL_PREFIX "__libc_disable_asynccancel") +++#elif IS_IN (libpthread) +++# define LIBC_CANCEL_ASYNC() CANCEL_ASYNC () +++# define LIBC_CANCEL_RESET(val) CANCEL_RESET (val) +++# define LIBC_CANCEL_HANDLED() \ +++ __asm (".globl " __SYMBOL_PREFIX "__pthread_enable_asynccancel"); \ +++ __asm (".globl " __SYMBOL_PREFIX "__pthread_disable_asynccancel") +++#elif IS_IN (librt) +++# define LIBC_CANCEL_ASYNC() \ +++ __librt_enable_asynccancel () +++# define LIBC_CANCEL_RESET(val) \ +++ __librt_disable_asynccancel (val) +++# define LIBC_CANCEL_HANDLED() \ +++ __asm (".globl " __SYMBOL_PREFIX "__librt_enable_asynccancel"); \ +++ __asm (".globl " __SYMBOL_PREFIX "__librt_disable_asynccancel") +++#else +++# define LIBC_CANCEL_ASYNC() 0 /* Just a dummy value. */ +++# define LIBC_CANCEL_RESET(val) ((void)(val)) /* Nothing, but evaluate it. */ +++# define LIBC_CANCEL_HANDLED() /* Nothing. */ +++#endif +++ +++#ifndef PTHREAD_SIGBASE +++# define PTHREAD_SIGBASE __SIGRTMIN +++#endif +++ +++/* The signal used for asynchronous cancelation. */ +++#define SIGCANCEL PTHREAD_SIGBASE +++ +++ +++/* 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 +++ +++ +++/* Signal used to implement the setuid et.al. functions. */ +++#define SIGSETXID (PTHREAD_SIGBASE + 1) +++ +++/* Used to communicate with signal handler. */ +++extern struct xid_command *__xidcmd attribute_hidden; +++ +++ +++/* Internal prototypes. */ +++ +++/* Thread list handling. */ +++extern struct pthread *__find_in_stack_list (struct pthread *pd) +++ attribute_hidden internal_function; +++ +++/* Deallocate a thread's stack after optionally making sure the thread +++ descriptor is still valid. */ +++extern void __free_tcb (struct pthread *pd) attribute_hidden internal_function; +++ +++/* Free allocated stack. */ +++extern void __deallocate_stack (struct pthread *pd) +++ attribute_hidden internal_function; +++ +++/* Mark all the stacks except for the current one as available. This +++ function also re-initializes the lock for the stack cache. */ +++extern void __reclaim_stacks (void) attribute_hidden; +++ +++/* Make all threads's stacks executable. */ +++extern int __make_stacks_executable (void **stack_endp) +++ internal_function attribute_hidden; +++ +++/* longjmp handling. */ +++extern void __pthread_cleanup_upto (__jmp_buf target, char *targetframe); +++#if IS_IN (libpthread) +++hidden_proto (__pthread_cleanup_upto) +++#endif +++ +++ +++/* Functions with versioned interfaces. */ +++extern int __pthread_create_2_1 (pthread_t *newthread, +++ const pthread_attr_t *attr, +++ void *(*start_routine) (void *), void *arg); +++extern int __pthread_create_2_0 (pthread_t *newthread, +++ const pthread_attr_t *attr, +++ void *(*start_routine) (void *), void *arg); +++extern int __pthread_attr_init_2_1 (pthread_attr_t *attr); +++extern int __pthread_attr_init_2_0 (pthread_attr_t *attr); +++ +++ +++/* Event handlers for libthread_db interface. */ +++extern void __nptl_create_event (void); +++extern void __nptl_death_event (void); +++hidden_proto (__nptl_create_event) +++hidden_proto (__nptl_death_event) +++ +++/* Register the generation counter in the libpthread with the libc. */ +++#ifdef TLS_MULTIPLE_THREADS_IN_TCB +++extern void __libc_pthread_init (unsigned long int *ptr, +++ void (*reclaim) (void), +++ const struct pthread_functions *functions) +++ internal_function; +++#else +++extern int *__libc_pthread_init (unsigned long int *ptr, +++ void (*reclaim) (void), +++ const struct pthread_functions *functions) +++ internal_function; +++ +++/* Variable set to a nonzero value either if more than one thread runs or ran, +++ or if a single-threaded process is trying to cancel itself. See +++ nptl/descr.h for more context on the single-threaded process case. */ +++extern int __pthread_multiple_threads attribute_hidden; +++/* Pointer to the corresponding variable in libc. */ +++extern int *__libc_multiple_threads_ptr attribute_hidden; +++#endif +++ +++/* Find a thread given its TID. */ +++extern struct pthread *__find_thread_by_id (pid_t tid) attribute_hidden +++#ifdef SHARED +++; +++#else +++weak_function; +++#define __find_thread_by_id(tid) \ +++ (__find_thread_by_id ? (__find_thread_by_id) (tid) : (struct pthread *) NULL) +++#endif +++ +++extern void __pthread_init_static_tls (struct link_map *) attribute_hidden; +++ +++extern size_t __pthread_get_minstack (const pthread_attr_t *attr); +++ +++/* Namespace save aliases. */ +++extern int __pthread_getschedparam (pthread_t thread_id, int *policy, +++ struct sched_param *param); +++extern int __pthread_setschedparam (pthread_t thread_id, int policy, +++ const struct sched_param *param); +++extern int __pthread_setcancelstate (int state, int *oldstate); +++extern int __pthread_mutex_init (pthread_mutex_t *__mutex, +++ const pthread_mutexattr_t *__mutexattr); +++extern int __pthread_mutex_destroy (pthread_mutex_t *__mutex); +++extern int __pthread_mutex_trylock (pthread_mutex_t *_mutex); +++extern int __pthread_mutex_lock (pthread_mutex_t *__mutex); +++extern int __pthread_mutex_cond_lock (pthread_mutex_t *__mutex) +++ attribute_hidden internal_function; +++extern void __pthread_mutex_cond_lock_adjust (pthread_mutex_t *__mutex) +++ attribute_hidden internal_function; +++extern int __pthread_mutex_unlock (pthread_mutex_t *__mutex); +++extern int __pthread_mutex_unlock_usercnt (pthread_mutex_t *__mutex, +++ int __decr) +++ attribute_hidden internal_function; +++extern int __pthread_mutexattr_init (pthread_mutexattr_t *attr); +++extern int __pthread_mutexattr_destroy (pthread_mutexattr_t *attr); +++extern int __pthread_mutexattr_settype (pthread_mutexattr_t *attr, int kind); +++extern int __pthread_attr_destroy (pthread_attr_t *attr); +++extern int __pthread_attr_getdetachstate (const pthread_attr_t *attr, +++ int *detachstate); +++extern int __pthread_attr_setdetachstate (pthread_attr_t *attr, +++ int detachstate); +++extern int __pthread_attr_getinheritsched (const pthread_attr_t *attr, +++ int *inherit); +++extern int __pthread_attr_setinheritsched (pthread_attr_t *attr, int inherit); +++extern int __pthread_attr_getschedparam (const pthread_attr_t *attr, +++ struct sched_param *param); +++extern int __pthread_attr_setschedparam (pthread_attr_t *attr, +++ const struct sched_param *param); +++extern int __pthread_attr_getschedpolicy (const pthread_attr_t *attr, +++ int *policy); +++extern int __pthread_attr_setschedpolicy (pthread_attr_t *attr, int policy); +++extern int __pthread_attr_getscope (const pthread_attr_t *attr, int *scope); +++extern int __pthread_attr_setscope (pthread_attr_t *attr, int scope); +++extern int __pthread_attr_getstackaddr (const pthread_attr_t *__restrict +++ __attr, void **__restrict __stackaddr); +++extern int __pthread_attr_setstackaddr (pthread_attr_t *__attr, +++ void *__stackaddr); +++extern int __pthread_attr_getstacksize (const pthread_attr_t *__restrict +++ __attr, +++ size_t *__restrict __stacksize); +++extern int __pthread_attr_setstacksize (pthread_attr_t *__attr, +++ size_t __stacksize); +++extern int __pthread_attr_getstack (const pthread_attr_t *__restrict __attr, +++ void **__restrict __stackaddr, +++ size_t *__restrict __stacksize); +++extern int __pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr, +++ size_t __stacksize); +++extern int __pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock, +++ const pthread_rwlockattr_t *__restrict +++ __attr); +++extern int __pthread_rwlock_destroy (pthread_rwlock_t *__rwlock); +++extern int __pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock); +++extern int __pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock); +++extern int __pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock); +++extern int __pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock); +++extern int __pthread_rwlock_unlock (pthread_rwlock_t *__rwlock); +++extern int __pthread_cond_broadcast (pthread_cond_t *cond); +++extern int __pthread_cond_destroy (pthread_cond_t *cond); +++extern int __pthread_cond_init (pthread_cond_t *cond, +++ const pthread_condattr_t *cond_attr); +++extern int __pthread_cond_signal (pthread_cond_t *cond); +++extern int __pthread_cond_wait (pthread_cond_t *cond, pthread_mutex_t *mutex); +++extern int __pthread_cond_timedwait (pthread_cond_t *cond, +++ pthread_mutex_t *mutex, +++ const struct timespec *abstime); +++extern int __pthread_condattr_destroy (pthread_condattr_t *attr); +++extern int __pthread_condattr_init (pthread_condattr_t *attr); +++extern int __pthread_key_create (pthread_key_t *key, void (*destr) (void *)); +++extern void *__pthread_getspecific (pthread_key_t key); +++extern int __pthread_setspecific (pthread_key_t key, const void *value); +++extern int __pthread_once (pthread_once_t *once_control, +++ void (*init_routine) (void)); +++extern int __pthread_atfork (void (*prepare) (void), void (*parent) (void), +++ void (*child) (void)); +++extern pthread_t __pthread_self (void); +++extern int __pthread_equal (pthread_t thread1, pthread_t thread2); +++extern int __pthread_kill (pthread_t threadid, int signo); +++extern void __pthread_exit (void *value) __attribute__ ((__noreturn__)); +++extern int __pthread_setcanceltype (int type, int *oldtype); +++extern int __pthread_enable_asynccancel (void) attribute_hidden; +++extern void __pthread_disable_asynccancel (int oldtype) +++ internal_function attribute_hidden; +++ +++#if IS_IN (libpthread) +++hidden_proto (__pthread_mutex_init) +++hidden_proto (__pthread_mutex_destroy) +++hidden_proto (__pthread_mutex_lock) +++hidden_proto (__pthread_mutex_unlock) +++hidden_proto (__pthread_rwlock_rdlock) +++hidden_proto (__pthread_rwlock_wrlock) +++hidden_proto (__pthread_rwlock_unlock) +++hidden_proto (__pthread_key_create) +++hidden_proto (__pthread_getspecific) +++hidden_proto (__pthread_setspecific) +++hidden_proto (__pthread_once) +++hidden_proto (__pthread_setcancelstate) +++#endif +++ +++extern int __pthread_cond_broadcast_2_0 (pthread_cond_2_0_t *cond); +++extern int __pthread_cond_destroy_2_0 (pthread_cond_2_0_t *cond); +++extern int __pthread_cond_init_2_0 (pthread_cond_2_0_t *cond, +++ const pthread_condattr_t *cond_attr); +++extern int __pthread_cond_signal_2_0 (pthread_cond_2_0_t *cond); +++extern int __pthread_cond_timedwait_2_0 (pthread_cond_2_0_t *cond, +++ pthread_mutex_t *mutex, +++ const struct timespec *abstime); +++extern int __pthread_cond_wait_2_0 (pthread_cond_2_0_t *cond, +++ pthread_mutex_t *mutex); +++ +++extern int __pthread_getaffinity_np (pthread_t th, size_t cpusetsize, +++ cpu_set_t *cpuset); +++ +++/* The two functions are in libc.so and not exported. */ +++extern int __libc_enable_asynccancel (void) attribute_hidden; +++extern void __libc_disable_asynccancel (int oldtype) +++ internal_function attribute_hidden; +++ +++ +++/* The two functions are in librt.so and not exported. */ +++extern int __librt_enable_asynccancel (void) attribute_hidden; +++extern void __librt_disable_asynccancel (int oldtype) +++ internal_function attribute_hidden; +++ +++#if IS_IN (libpthread) +++/* Special versions which use non-exported functions. */ +++extern void __pthread_cleanup_push (struct _pthread_cleanup_buffer *buffer, +++ void (*routine) (void *), void *arg) +++ attribute_hidden; +++# undef pthread_cleanup_push +++# define pthread_cleanup_push(routine,arg) \ +++ { struct _pthread_cleanup_buffer _buffer; \ +++ __pthread_cleanup_push (&_buffer, (routine), (arg)); +++ +++extern void __pthread_cleanup_pop (struct _pthread_cleanup_buffer *buffer, +++ int execute) attribute_hidden; +++# undef pthread_cleanup_pop +++# define pthread_cleanup_pop(execute) \ +++ __pthread_cleanup_pop (&_buffer, (execute)); } +++#endif +++ +++extern void __pthread_cleanup_push_defer (struct _pthread_cleanup_buffer *buffer, +++ void (*routine) (void *), void *arg); +++extern void __pthread_cleanup_pop_restore (struct _pthread_cleanup_buffer *buffer, +++ int execute); +++ +++/* Old cleanup interfaces, still used in libc.so. */ +++extern void _pthread_cleanup_push (struct _pthread_cleanup_buffer *buffer, +++ void (*routine) (void *), void *arg); +++extern void _pthread_cleanup_pop (struct _pthread_cleanup_buffer *buffer, +++ int execute); +++extern void _pthread_cleanup_push_defer (struct _pthread_cleanup_buffer *buffer, +++ void (*routine) (void *), void *arg); +++extern void _pthread_cleanup_pop_restore (struct _pthread_cleanup_buffer *buffer, +++ int execute); +++ +++extern void __nptl_deallocate_tsd (void) attribute_hidden; +++ +++extern int __nptl_setxid (struct xid_command *cmdp) attribute_hidden; +++#ifndef SHARED +++extern void __nptl_set_robust (struct pthread *self); +++#endif +++ +++extern void __free_stacks (size_t limit) attribute_hidden; +++ +++extern void __wait_lookup_done (void) attribute_hidden; +++ +++#ifdef SHARED +++# define PTHREAD_STATIC_FN_REQUIRE(name) +++#else +++# define PTHREAD_STATIC_FN_REQUIRE(name) __asm (".globl " #name); +++#endif +++ +++/* Test if the mutex is suitable for the FUTEX_WAIT_REQUEUE_PI operation. */ +++#if (defined lll_futex_wait_requeue_pi \ +++ && defined __ASSUME_REQUEUE_PI) +++# define USE_REQUEUE_PI(mut) \ +++ ((mut) && (mut) != (void *) ~0l \ +++ && (((mut)->__data.__kind \ +++ & (PTHREAD_MUTEX_PRIO_INHERIT_NP | PTHREAD_MUTEX_ROBUST_NORMAL_NP)) \ +++ == PTHREAD_MUTEX_PRIO_INHERIT_NP)) +++#else +++# define USE_REQUEUE_PI(mut) 0 +++#endif +++ +++/* Returns 0 if POL is a valid scheduling policy. */ +++static inline int +++check_sched_policy_attr (int pol) +++{ +++ if (pol == SCHED_OTHER || pol == SCHED_FIFO || pol == SCHED_RR) +++ return 0; +++ +++ return EINVAL; +++} +++ +++/* Returns 0 if PR is within the accepted range of priority values for +++ the scheduling policy POL or EINVAL otherwise. */ +++static inline int +++check_sched_priority_attr (int pr, int pol) +++{ +++ int min = __sched_get_priority_min (pol); +++ int max = __sched_get_priority_max (pol); +++ +++ if (min >= 0 && max >= 0 && pr >= min && pr <= max) +++ return 0; +++ +++ return EINVAL; +++} +++ +++/* Returns 0 if ST is a valid stack size for a thread stack and EINVAL +++ otherwise. */ +++static inline int +++check_stacksize_attr (size_t st) +++{ +++ if (st >= PTHREAD_STACK_MIN) +++ return 0; +++ +++ return EINVAL; +++} +++ +++/* Defined in pthread_setaffinity.c. */ +++extern size_t __kernel_cpumask_size attribute_hidden; +++extern int __determine_cpumask_size (pid_t tid); +++ +++/* Returns 0 if CS and SZ are valid values for the cpuset and cpuset size +++ respectively. Otherwise it returns an error number. */ +++static inline int +++check_cpuset_attr (const cpu_set_t *cs, const size_t sz) +++{ +++ if (__kernel_cpumask_size == 0) +++ { +++ int res = __determine_cpumask_size (THREAD_SELF->tid); +++ if (res) +++ return res; +++ } +++ +++ /* Check whether the new bitmask has any bit set beyond the +++ last one the kernel accepts. */ +++ for (size_t cnt = __kernel_cpumask_size; cnt < sz; ++cnt) +++ if (((char *) cs)[cnt] != '\0') +++ /* Found a nonzero byte. This means the user request cannot be +++ fulfilled. */ +++ return EINVAL; +++ +++ return 0; +++} +++ +++#endif /* pthreadP.h */ ++--- /dev/null +++++ b/fbtl/pthread_atfork.c ++@@ -0,0 +1,61 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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. +++ +++ 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, see +++ . */ +++ +++#include "pthreadP.h" +++#include +++ +++/* This is defined by newer gcc version unique for each module. */ +++extern void *__dso_handle __attribute__ ((__weak__, +++ __visibility__ ("hidden"))); +++ +++ +++/* Hide the symbol so that no definition but the one locally in the +++ executable or DSO is used. */ +++int +++#ifndef __pthread_atfork +++/* Don't mark the compatibility function as hidden. */ +++attribute_hidden +++#endif +++__pthread_atfork (void (*prepare) (void), void (*parent) (void), +++ void (*child) (void)) +++{ +++ return __register_atfork (prepare, parent, child, +++ &__dso_handle == NULL ? NULL : __dso_handle); +++} +++#ifndef __pthread_atfork +++extern int pthread_atfork (void (*prepare) (void), void (*parent) (void), +++ void (*child) (void)) attribute_hidden; +++strong_alias (__pthread_atfork, pthread_atfork) +++#endif ++--- /dev/null +++++ b/fbtl/pthread_attr_destroy.c ++@@ -0,0 +1,44 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include "pthreadP.h" +++#include +++ +++int +++__pthread_attr_destroy (pthread_attr_t *attr) +++{ +++ struct pthread_attr *iattr; +++ +++ assert (sizeof (*attr) >= sizeof (struct pthread_attr)); +++ iattr = (struct pthread_attr *) attr; +++ +++#if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_1) +++ /* In old struct pthread_attr, neither next nor cpuset are +++ present. */ +++ if (__builtin_expect ((iattr->flags & ATTR_FLAG_OLDATTR), 0) == 0) +++#endif +++ /* The affinity CPU set might be allocated dynamically. */ +++ free (iattr->cpuset); +++ +++ return 0; +++} +++strong_alias (__pthread_attr_destroy, pthread_attr_destroy) ++--- /dev/null +++++ b/fbtl/pthread_attr_getdetachstate.c ++@@ -0,0 +1,36 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include "pthreadP.h" +++ +++ +++int +++__pthread_attr_getdetachstate (const pthread_attr_t *attr, int *detachstate) +++{ +++ struct pthread_attr *iattr; +++ +++ assert (sizeof (*attr) >= sizeof (struct pthread_attr)); +++ iattr = (struct pthread_attr *) attr; +++ +++ *detachstate = (iattr->flags & ATTR_FLAG_DETACHSTATE +++ ? PTHREAD_CREATE_DETACHED : PTHREAD_CREATE_JOINABLE); +++ +++ return 0; +++} +++strong_alias (__pthread_attr_getdetachstate, pthread_attr_getdetachstate) ++--- /dev/null +++++ b/fbtl/pthread_attr_getguardsize.c ++@@ -0,0 +1,34 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include "pthreadP.h" +++ +++ +++int +++pthread_attr_getguardsize (const pthread_attr_t *attr, size_t *guardsize) +++{ +++ struct pthread_attr *iattr; +++ +++ assert (sizeof (*attr) >= sizeof (struct pthread_attr)); +++ iattr = (struct pthread_attr *) attr; +++ +++ *guardsize = iattr->guardsize; +++ +++ return 0; +++} ++--- /dev/null +++++ b/fbtl/pthread_attr_getinheritsched.c ++@@ -0,0 +1,37 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include "pthreadP.h" +++ +++ +++int +++__pthread_attr_getinheritsched (const pthread_attr_t *attr, int *inherit) +++{ +++ struct pthread_attr *iattr; +++ +++ assert (sizeof (*attr) >= sizeof (struct pthread_attr)); +++ iattr = (struct pthread_attr *) attr; +++ +++ /* Store the current values. */ +++ *inherit = (iattr->flags & ATTR_FLAG_NOTINHERITSCHED +++ ? PTHREAD_EXPLICIT_SCHED : PTHREAD_INHERIT_SCHED); +++ +++ return 0; +++} +++strong_alias (__pthread_attr_getinheritsched, pthread_attr_getinheritsched) ++--- /dev/null +++++ b/fbtl/pthread_attr_getschedparam.c ++@@ -0,0 +1,38 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include "pthreadP.h" +++ +++ +++int +++__pthread_attr_getschedparam (const pthread_attr_t *attr, +++ struct sched_param *param) +++{ +++ struct pthread_attr *iattr; +++ +++ assert (sizeof (*attr) >= sizeof (struct pthread_attr)); +++ iattr = (struct pthread_attr *) attr; +++ +++ /* Copy the current values. */ +++ memcpy (param, &iattr->schedparam, sizeof (struct sched_param)); +++ +++ return 0; +++} +++strong_alias (__pthread_attr_getschedparam, pthread_attr_getschedparam) ++--- /dev/null +++++ b/fbtl/pthread_attr_getschedpolicy.c ++@@ -0,0 +1,36 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include "pthreadP.h" +++ +++ +++int +++__pthread_attr_getschedpolicy (const pthread_attr_t *attr, int *policy) +++{ +++ struct pthread_attr *iattr; +++ +++ assert (sizeof (*attr) >= sizeof (struct pthread_attr)); +++ iattr = (struct pthread_attr *) attr; +++ +++ /* Store the current values. */ +++ *policy = iattr->schedpolicy; +++ +++ return 0; +++} +++strong_alias (__pthread_attr_getschedpolicy, pthread_attr_getschedpolicy) ++--- /dev/null +++++ b/fbtl/pthread_attr_getscope.c ++@@ -0,0 +1,37 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include "pthreadP.h" +++ +++ +++int +++__pthread_attr_getscope (const pthread_attr_t *attr, int *scope) +++{ +++ struct pthread_attr *iattr; +++ +++ assert (sizeof (*attr) >= sizeof (struct pthread_attr)); +++ iattr = (struct pthread_attr *) attr; +++ +++ /* Store the current values. */ +++ *scope = (iattr->flags & ATTR_FLAG_SCOPEPROCESS +++ ? PTHREAD_SCOPE_PROCESS : PTHREAD_SCOPE_SYSTEM); +++ +++ return 0; +++} +++strong_alias (__pthread_attr_getscope, pthread_attr_getscope) ++--- /dev/null +++++ b/fbtl/pthread_attr_getstack.c ++@@ -0,0 +1,38 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include "pthreadP.h" +++ +++ +++int +++__pthread_attr_getstack (const pthread_attr_t *attr, void **stackaddr, +++ size_t *stacksize) +++{ +++ struct pthread_attr *iattr; +++ +++ assert (sizeof (*attr) >= sizeof (struct pthread_attr)); +++ iattr = (struct pthread_attr *) attr; +++ +++ /* Store the result. */ +++ *stackaddr = (char *) iattr->stackaddr - iattr->stacksize; +++ *stacksize = iattr->stacksize; +++ +++ return 0; +++} +++strong_alias (__pthread_attr_getstack, pthread_attr_getstack) ++--- /dev/null +++++ b/fbtl/pthread_attr_getstackaddr.c ++@@ -0,0 +1,42 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include "pthreadP.h" +++ +++ +++int +++__pthread_attr_getstackaddr (const pthread_attr_t *attr, void **stackaddr) +++{ +++ struct pthread_attr *iattr; +++ +++ assert (sizeof (*attr) >= sizeof (struct pthread_attr)); +++ iattr = (struct pthread_attr *) attr; +++ +++ /* Some code assumes this function to work even if no stack address +++ has been set. Let them figure it out for themselves what the +++ value means. Simply store the result. */ +++ *stackaddr = iattr->stackaddr; +++ +++ return 0; +++} +++strong_alias (__pthread_attr_getstackaddr, pthread_attr_getstackaddr) +++ +++link_warning (pthread_attr_getstackaddr, +++ "the use of `pthread_attr_getstackaddr' is deprecated, use `pthread_attr_getstack'") ++--- /dev/null +++++ b/fbtl/pthread_attr_getstacksize.c ++@@ -0,0 +1,45 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include "pthreadP.h" +++ +++ +++int +++__pthread_attr_getstacksize (const pthread_attr_t *attr, size_t *stacksize) +++{ +++ struct pthread_attr *iattr; +++ +++ assert (sizeof (*attr) >= sizeof (struct pthread_attr)); +++ iattr = (struct pthread_attr *) attr; +++ +++ size_t size = iattr->stacksize; +++ +++ /* If the user has not set a stack size we return what the system +++ will use as the default. */ +++ if (size == 0) +++ { +++ lll_lock (__default_pthread_attr_lock, LLL_PRIVATE); +++ size = __default_pthread_attr.stacksize; +++ lll_unlock (__default_pthread_attr_lock, LLL_PRIVATE); +++ } +++ *stacksize = size; +++ +++ return 0; +++} +++strong_alias (__pthread_attr_getstacksize, pthread_attr_getstacksize) ++--- /dev/null +++++ b/fbtl/pthread_attr_init.c ++@@ -0,0 +1,85 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include "pthreadP.h" +++ +++#include +++ +++ +++struct pthread_attr *__attr_list; +++int __attr_list_lock = LLL_LOCK_INITIALIZER; +++ +++ +++int +++__pthread_attr_init_2_1 (pthread_attr_t *attr) +++{ +++ struct pthread_attr *iattr; +++ +++ /* Many elements are initialized to zero so let us do it all at +++ once. This also takes care of clearing the bytes which are not +++ internally used. */ +++ memset (attr, '\0', __SIZEOF_PTHREAD_ATTR_T); +++ +++ assert (sizeof (*attr) >= sizeof (struct pthread_attr)); +++ iattr = (struct pthread_attr *) attr; +++ +++ /* Default guard size specified by the standard. */ +++ iattr->guardsize = __getpagesize (); +++ +++ return 0; +++} +++versioned_symbol (libpthread, __pthread_attr_init_2_1, pthread_attr_init, +++ GLIBC_2_1); +++ +++ +++#if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_1) +++int +++__pthread_attr_init_2_0 (pthread_attr_t *attr) +++{ +++ /* This code is specific to the old LinuxThread code which has a too +++ small pthread_attr_t definition. The struct looked like +++ this: */ +++ struct old_attr +++ { +++ int detachstate; +++ int schedpolicy; +++ struct sched_param schedparam; +++ int inheritsched; +++ int scope; +++ }; +++ struct pthread_attr *iattr; +++ +++ /* Many elements are initialized to zero so let us do it all at +++ once. This also takes care of clearing the bytes which are not +++ internally used. */ +++ memset (attr, '\0', sizeof (struct old_attr)); +++ +++ iattr = (struct pthread_attr *) attr; +++ iattr->flags |= ATTR_FLAG_OLDATTR; +++ +++ /* We cannot enqueue the attribute because that member is not in the +++ old attribute structure. */ +++ return 0; +++} +++compat_symbol (libpthread, __pthread_attr_init_2_0, pthread_attr_init, +++ GLIBC_2_0); +++#endif ++--- /dev/null +++++ b/fbtl/pthread_attr_setdetachstate.c ++@@ -0,0 +1,45 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include "pthreadP.h" +++ +++ +++int +++__pthread_attr_setdetachstate (pthread_attr_t *attr, int detachstate) +++{ +++ struct pthread_attr *iattr; +++ +++ assert (sizeof (*attr) >= sizeof (struct pthread_attr)); +++ iattr = (struct pthread_attr *) attr; +++ +++ /* Catch invalid values. */ +++ if (detachstate != PTHREAD_CREATE_DETACHED +++ && __builtin_expect (detachstate != PTHREAD_CREATE_JOINABLE, 0)) +++ return EINVAL; +++ +++ /* Set the flag. It is nonzero if threads are created detached. */ +++ if (detachstate == PTHREAD_CREATE_DETACHED) +++ iattr->flags |= ATTR_FLAG_DETACHSTATE; +++ else +++ iattr->flags &= ~ATTR_FLAG_DETACHSTATE; +++ +++ return 0; +++} +++strong_alias (__pthread_attr_setdetachstate, pthread_attr_setdetachstate) ++--- /dev/null +++++ b/fbtl/pthread_attr_setguardsize.c ++@@ -0,0 +1,37 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include "pthreadP.h" +++ +++ +++int +++pthread_attr_setguardsize (pthread_attr_t *attr, size_t guardsize) +++{ +++ struct pthread_attr *iattr; +++ +++ assert (sizeof (*attr) >= sizeof (struct pthread_attr)); +++ iattr = (struct pthread_attr *) attr; +++ +++ /* Note that we don't round the value here. The standard requires +++ that subsequent pthread_attr_getguardsize calls return the value +++ set by the user. */ +++ iattr->guardsize = guardsize; +++ +++ return 0; +++} ++--- /dev/null +++++ b/fbtl/pthread_attr_setinheritsched.c ++@@ -0,0 +1,44 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include "pthreadP.h" +++ +++ +++int +++__pthread_attr_setinheritsched (pthread_attr_t *attr, int inherit) +++{ +++ struct pthread_attr *iattr; +++ +++ assert (sizeof (*attr) >= sizeof (struct pthread_attr)); +++ iattr = (struct pthread_attr *) attr; +++ +++ /* Catch invalid values. */ +++ if (inherit != PTHREAD_INHERIT_SCHED && inherit != PTHREAD_EXPLICIT_SCHED) +++ return EINVAL; +++ +++ /* Store the new values. */ +++ if (inherit != PTHREAD_INHERIT_SCHED) +++ iattr->flags |= ATTR_FLAG_NOTINHERITSCHED; +++ else +++ iattr->flags &= ~ATTR_FLAG_NOTINHERITSCHED; +++ +++ return 0; +++} +++strong_alias (__pthread_attr_setinheritsched, pthread_attr_setinheritsched) ++--- /dev/null +++++ b/fbtl/pthread_attr_setschedparam.c ++@@ -0,0 +1,45 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include "pthreadP.h" +++ +++ +++int +++__pthread_attr_setschedparam (pthread_attr_t *attr, +++ const struct sched_param *param) +++{ +++ assert (sizeof (*attr) >= sizeof (struct pthread_attr)); +++ struct pthread_attr *iattr = (struct pthread_attr *) attr; +++ +++ int ret = check_sched_priority_attr (param->sched_priority, +++ iattr->schedpolicy); +++ if (ret) +++ return ret; +++ +++ /* Copy the new values. */ +++ memcpy (&iattr->schedparam, param, sizeof (struct sched_param)); +++ +++ /* Remember we set the value. */ +++ iattr->flags |= ATTR_FLAG_SCHED_SET; +++ +++ return 0; +++} +++strong_alias (__pthread_attr_setschedparam, pthread_attr_setschedparam) ++--- /dev/null +++++ b/fbtl/pthread_attr_setschedpolicy.c ++@@ -0,0 +1,45 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include "pthreadP.h" +++ +++ +++int +++__pthread_attr_setschedpolicy (pthread_attr_t *attr, int policy) +++{ +++ struct pthread_attr *iattr; +++ +++ assert (sizeof (*attr) >= sizeof (struct pthread_attr)); +++ iattr = (struct pthread_attr *) attr; +++ +++ /* Catch invalid values. */ +++ int ret = check_sched_policy_attr (policy); +++ if (ret) +++ return ret; +++ +++ /* Store the new values. */ +++ iattr->schedpolicy = policy; +++ +++ /* Remember we set the value. */ +++ iattr->flags |= ATTR_FLAG_POLICY_SET; +++ +++ return 0; +++} +++strong_alias (__pthread_attr_setschedpolicy, pthread_attr_setschedpolicy) ++--- /dev/null +++++ b/fbtl/pthread_attr_setscope.c ++@@ -0,0 +1,48 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include "pthreadP.h" +++ +++ +++int +++__pthread_attr_setscope (pthread_attr_t *attr, int scope) +++{ +++ struct pthread_attr *iattr; +++ +++ assert (sizeof (*attr) >= sizeof (struct pthread_attr)); +++ iattr = (struct pthread_attr *) attr; +++ +++ /* Catch invalid values. */ +++ switch (scope) +++ { +++ case PTHREAD_SCOPE_SYSTEM: +++ iattr->flags &= ~ATTR_FLAG_SCOPEPROCESS; +++ break; +++ +++ case PTHREAD_SCOPE_PROCESS: +++ return ENOTSUP; +++ +++ default: +++ return EINVAL; +++ } +++ +++ return 0; +++} +++strong_alias (__pthread_attr_setscope, pthread_attr_setscope) ++--- /dev/null +++++ b/fbtl/pthread_attr_setstack.c ++@@ -0,0 +1,92 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include "pthreadP.h" +++ +++ +++#ifndef NEW_VERNUM +++# define NEW_VERNUM GLIBC_2_3_3 +++#endif +++ +++ +++int +++__pthread_attr_setstack (pthread_attr_t *attr, void *stackaddr, +++ size_t stacksize) +++{ +++ struct pthread_attr *iattr; +++ +++ assert (sizeof (*attr) >= sizeof (struct pthread_attr)); +++ iattr = (struct pthread_attr *) attr; +++ +++ /* Catch invalid sizes. */ +++ int ret = check_stacksize_attr (stacksize); +++ if (ret) +++ return ret; +++ +++#ifdef EXTRA_PARAM_CHECKS +++ EXTRA_PARAM_CHECKS; +++#endif +++ +++ iattr->stacksize = stacksize; +++ iattr->stackaddr = (char *) stackaddr + stacksize; +++ iattr->flags |= ATTR_FLAG_STACKADDR; +++ +++ return 0; +++} +++ +++#if PTHREAD_STACK_MIN == 16384 +++strong_alias (__pthread_attr_setstack, pthread_attr_setstack) +++#else +++# include +++versioned_symbol (libpthread, __pthread_attr_setstack, pthread_attr_setstack, +++ NEW_VERNUM); +++ +++# if SHLIB_COMPAT(libpthread, GLIBC_2_2, NEW_VERNUM) +++ +++int +++__old_pthread_attr_setstack (pthread_attr_t *attr, void *stackaddr, +++ size_t stacksize) +++{ +++ struct pthread_attr *iattr; +++ +++ assert (sizeof (*attr) >= sizeof (struct pthread_attr)); +++ iattr = (struct pthread_attr *) attr; +++ +++ /* Catch invalid sizes. */ +++ if (stacksize < 16384) +++ return EINVAL; +++ +++# ifdef EXTRA_PARAM_CHECKS +++ EXTRA_PARAM_CHECKS; +++# endif +++ +++ iattr->stacksize = stacksize; +++ iattr->stackaddr = (char *) stackaddr + stacksize; +++ iattr->flags |= ATTR_FLAG_STACKADDR; +++ +++ return 0; +++} +++ +++compat_symbol (libpthread, __old_pthread_attr_setstack, pthread_attr_setstack, +++ GLIBC_2_2); +++# endif +++ +++#endif ++--- /dev/null +++++ b/fbtl/pthread_attr_setstackaddr.c ++@@ -0,0 +1,44 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include "pthreadP.h" +++ +++ +++int +++__pthread_attr_setstackaddr (pthread_attr_t *attr, void *stackaddr) +++{ +++ struct pthread_attr *iattr; +++ +++#ifdef EXTRA_PARAM_CHECKS +++ EXTRA_PARAM_CHECKS; +++#endif +++ +++ assert (sizeof (*attr) >= sizeof (struct pthread_attr)); +++ iattr = (struct pthread_attr *) attr; +++ +++ iattr->stackaddr = stackaddr; +++ iattr->flags |= ATTR_FLAG_STACKADDR; +++ +++ return 0; +++} +++strong_alias (__pthread_attr_setstackaddr, pthread_attr_setstackaddr) +++ +++link_warning (pthread_attr_setstackaddr, +++ "the use of `pthread_attr_setstackaddr' is deprecated, use `pthread_attr_setstack'") ++--- /dev/null +++++ b/fbtl/pthread_attr_setstacksize.c ++@@ -0,0 +1,81 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include "pthreadP.h" +++ +++#ifndef NEW_VERNUM +++# define NEW_VERNUM GLIBC_2_3_3 +++#endif +++ +++ +++int +++__pthread_attr_setstacksize (pthread_attr_t *attr, size_t stacksize) +++{ +++ struct pthread_attr *iattr; +++ +++ assert (sizeof (*attr) >= sizeof (struct pthread_attr)); +++ iattr = (struct pthread_attr *) attr; +++ +++ /* Catch invalid sizes. */ +++ int ret = check_stacksize_attr (stacksize); +++ if (ret) +++ return ret; +++ +++ iattr->stacksize = stacksize; +++ +++ return 0; +++} +++ +++#if PTHREAD_STACK_MIN == 16384 +++strong_alias (__pthread_attr_setstacksize, pthread_attr_setstacksize) +++#else +++# include +++versioned_symbol (libpthread, __pthread_attr_setstacksize, +++ pthread_attr_setstacksize, NEW_VERNUM); +++ +++# if SHLIB_COMPAT(libpthread, GLIBC_2_1, NEW_VERNUM) +++ +++int +++__old_pthread_attr_setstacksize (pthread_attr_t *attr, size_t stacksize) +++{ +++ struct pthread_attr *iattr; +++ +++ assert (sizeof (*attr) >= sizeof (struct pthread_attr)); +++ iattr = (struct pthread_attr *) attr; +++ +++ /* Catch invalid sizes. */ +++ if (stacksize < 16384) +++ return EINVAL; +++ +++# ifdef STACKSIZE_ADJUST +++ STACKSIZE_ADJUST; +++# endif +++ +++ iattr->stacksize = stacksize; +++ +++ return 0; +++} +++ +++compat_symbol (libpthread, __old_pthread_attr_setstacksize, +++ pthread_attr_setstacksize, GLIBC_2_1); +++# endif +++ +++#endif ++--- /dev/null +++++ b/fbtl/pthread_barrier_destroy.c ++@@ -0,0 +1,42 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include "pthreadP.h" +++#include +++ +++ +++int +++pthread_barrier_destroy (pthread_barrier_t *barrier) +++{ +++ struct pthread_barrier *ibarrier; +++ int result = EBUSY; +++ +++ ibarrier = (struct pthread_barrier *) barrier; +++ +++ lll_lock (ibarrier->lock, ibarrier->private ^ FUTEX_PRIVATE_FLAG); +++ +++ if (__glibc_likely (ibarrier->left == ibarrier->init_count)) +++ /* The barrier is not used anymore. */ +++ result = 0; +++ else +++ /* Still used, return with an error. */ +++ lll_unlock (ibarrier->lock, ibarrier->private ^ FUTEX_PRIVATE_FLAG); +++ +++ return result; +++} ++--- /dev/null +++++ b/fbtl/pthread_barrier_init.c ++@@ -0,0 +1,69 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include "pthreadP.h" +++#include +++#include +++ +++ +++static const struct pthread_barrierattr default_barrierattr = +++ { +++ .pshared = PTHREAD_PROCESS_PRIVATE +++ }; +++ +++ +++int +++pthread_barrier_init (pthread_barrier_t *barrier, +++ const pthread_barrierattr_t *attr, +++ unsigned int count) +++{ +++ struct pthread_barrier *ibarrier; +++ +++ if (__glibc_unlikely (count == 0)) +++ return EINVAL; +++ +++ const struct pthread_barrierattr *iattr +++ = (attr != NULL +++ ? iattr = (struct pthread_barrierattr *) attr +++ : &default_barrierattr); +++ +++ if (iattr->pshared != PTHREAD_PROCESS_PRIVATE +++ && __builtin_expect (iattr->pshared != PTHREAD_PROCESS_SHARED, 0)) +++ /* Invalid attribute. */ +++ return EINVAL; +++ +++ ibarrier = (struct pthread_barrier *) barrier; +++ +++ /* Initialize the individual fields. */ +++ ibarrier->lock = LLL_LOCK_INITIALIZER; +++ ibarrier->left = count; +++ ibarrier->init_count = count; +++ ibarrier->curr_event = 0; +++ +++#ifdef __ASSUME_PRIVATE_FUTEX +++ ibarrier->private = (iattr->pshared != PTHREAD_PROCESS_PRIVATE +++ ? 0 : FUTEX_PRIVATE_FLAG); +++#else +++ ibarrier->private = (iattr->pshared != PTHREAD_PROCESS_PRIVATE +++ ? 0 : THREAD_GETMEM (THREAD_SELF, +++ header.private_futex)); +++#endif +++ +++ return 0; +++} ++--- /dev/null +++++ b/fbtl/pthread_barrier_wait.c ++@@ -0,0 +1,77 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Martin Schwidefsky , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++ +++ +++/* Wait on barrier. */ +++int +++pthread_barrier_wait (pthread_barrier_t *barrier) +++{ +++ struct pthread_barrier *ibarrier = (struct pthread_barrier *) barrier; +++ int result = 0; +++ +++ /* Make sure we are alone. */ +++ lll_lock (ibarrier->lock, ibarrier->private ^ FUTEX_PRIVATE_FLAG); +++ +++ /* One more arrival. */ +++ --ibarrier->left; +++ +++ /* Are these all? */ +++ if (ibarrier->left == 0) +++ { +++ /* Yes. Increment the event counter to avoid invalid wake-ups and +++ tell the current waiters that it is their turn. */ +++ ++ibarrier->curr_event; +++ +++ /* Wake up everybody. */ +++ lll_futex_wake (&ibarrier->curr_event, INT_MAX, +++ ibarrier->private ^ FUTEX_PRIVATE_FLAG); +++ +++ /* This is the thread which finished the serialization. */ +++ result = PTHREAD_BARRIER_SERIAL_THREAD; +++ } +++ else +++ { +++ /* The number of the event we are waiting for. The barrier's event +++ number must be bumped before we continue. */ +++ unsigned int event = ibarrier->curr_event; +++ +++ /* Before suspending, make the barrier available to others. */ +++ lll_unlock (ibarrier->lock, ibarrier->private ^ FUTEX_PRIVATE_FLAG); +++ +++ /* Wait for the event counter of the barrier to change. */ +++ do +++ lll_futex_wait (&ibarrier->curr_event, event, +++ ibarrier->private ^ FUTEX_PRIVATE_FLAG); +++ while (event == ibarrier->curr_event); +++ } +++ +++ /* Make sure the init_count is stored locally or in a register. */ +++ unsigned int init_count = ibarrier->init_count; +++ +++ /* If this was the last woken thread, unlock. */ +++ if (atomic_increment_val (&ibarrier->left) == init_count) +++ /* We are done. */ +++ lll_unlock (ibarrier->lock, ibarrier->private ^ FUTEX_PRIVATE_FLAG); +++ +++ return result; +++} ++--- /dev/null +++++ b/fbtl/pthread_barrierattr_destroy.c ++@@ -0,0 +1,28 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include "pthreadP.h" +++ +++ +++int +++pthread_barrierattr_destroy (pthread_barrierattr_t *attr) +++{ +++ /* Nothing to do. */ +++ +++ return 0; +++} ++--- /dev/null +++++ b/fbtl/pthread_barrierattr_getpshared.c ++@@ -0,0 +1,29 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include "pthreadP.h" +++ +++ +++int +++pthread_barrierattr_getpshared (const pthread_barrierattr_t *attr, +++ int *pshared) +++{ +++ *pshared = ((const struct pthread_barrierattr *) attr)->pshared; +++ +++ return 0; +++} ++--- /dev/null +++++ b/fbtl/pthread_barrierattr_init.c ++@@ -0,0 +1,28 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include "pthreadP.h" +++ +++ +++int +++pthread_barrierattr_init (pthread_barrierattr_t *attr) +++{ +++ ((struct pthread_barrierattr *) attr)->pshared = PTHREAD_PROCESS_PRIVATE; +++ +++ return 0; +++} ++--- /dev/null +++++ b/fbtl/pthread_barrierattr_setpshared.c ++@@ -0,0 +1,37 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include "pthreadP.h" +++ +++ +++int +++pthread_barrierattr_setpshared (pthread_barrierattr_t *attr, int pshared) +++{ +++ struct pthread_barrierattr *iattr; +++ +++ if (pshared != PTHREAD_PROCESS_PRIVATE +++ && __builtin_expect (pshared != PTHREAD_PROCESS_SHARED, 0)) +++ return EINVAL; +++ +++ iattr = (struct pthread_barrierattr *) attr; +++ +++ iattr->pshared = pshared; +++ +++ return 0; +++} ++--- /dev/null +++++ b/fbtl/pthread_cancel.c ++@@ -0,0 +1,101 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include "pthreadP.h" +++#include "atomic.h" +++#include +++#include +++ +++ +++int +++pthread_cancel (pthread_t th) +++{ +++ volatile struct pthread *pd = (volatile struct pthread *) th; +++ +++ /* Make sure the descriptor is valid. */ +++ if (INVALID_TD_P (pd)) +++ /* Not a valid thread handle. */ +++ return ESRCH; +++ +++#ifdef SHARED +++ pthread_cancel_init (); +++#endif +++ int result = 0; +++ int oldval; +++ int newval; +++ do +++ { +++ again: +++ oldval = pd->cancelhandling; +++ newval = oldval | CANCELING_BITMASK | CANCELED_BITMASK; +++ +++ /* Avoid doing unnecessary work. The atomic operation can +++ potentially be expensive if the bug has to be locked and +++ remote cache lines have to be invalidated. */ +++ if (oldval == newval) +++ break; +++ +++ /* If the cancellation is handled asynchronously just send a +++ signal. We avoid this if possible since it's more +++ expensive. */ +++ if (CANCEL_ENABLED_AND_CANCELED_AND_ASYNCHRONOUS (newval)) +++ { +++ /* Mark the cancellation as "in progress". */ +++ if (atomic_compare_and_exchange_bool_acq (&pd->cancelhandling, +++ oldval | CANCELING_BITMASK, +++ oldval)) +++ goto again; +++ +++ /* The cancellation handler will take care of marking the +++ thread as canceled. */ +++#warning TODO recheck +++#if 1 +++ result = INLINE_SYSCALL(thr_kill, 2, pd->tid, SIGCANCEL); +++ +++#else +++ pid_t pid = getpid (); +++ +++ INTERNAL_SYSCALL_DECL (err); +++ int val = INTERNAL_SYSCALL_CALL (tgkill, err, pid, pd->tid, +++ SIGCANCEL); +++ +++ if (INTERNAL_SYSCALL_ERROR_P (val, err)) +++ result = INTERNAL_SYSCALL_ERRNO (val, err); +++#endif +++ break; +++ } +++ +++ /* A single-threaded process should be able to kill itself, since there is +++ nothing in the POSIX specification that says that it cannot. So we set +++ multiple_threads to true so that cancellation points get executed. */ +++ THREAD_SETMEM (THREAD_SELF, header.multiple_threads, 1); +++#ifndef TLS_MULTIPLE_THREADS_IN_TCB +++ __pthread_multiple_threads = *__libc_multiple_threads_ptr = 1; +++#endif +++ } +++ /* Mark the thread as canceled. This has to be done +++ atomically since other bits could be modified as well. */ +++ while (atomic_compare_and_exchange_bool_acq (&pd->cancelhandling, newval, +++ oldval)); +++ +++ return result; +++} +++ +++PTHREAD_STATIC_FN_REQUIRE (pthread_create) ++--- /dev/null +++++ b/fbtl/pthread_clock_gettime.c ++@@ -0,0 +1,68 @@ +++/* Copyright (C) 2001-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; see the file COPYING.LIB. If +++ not, see . */ +++ +++#include +++#include +++#include +++#include +++#include "pthreadP.h" +++ +++ +++#if HP_TIMING_AVAIL +++int +++__pthread_clock_gettime (clockid_t clock_id, hp_timing_t freq, +++ struct timespec *tp) +++{ +++ hp_timing_t tsc; +++ +++ /* Get the current counter. */ +++ HP_TIMING_NOW (tsc); +++ +++ /* This is the ID of the thread we are looking for. */ +++ pid_t tid = ((unsigned int) clock_id) >> CLOCK_IDFIELD_SIZE; +++ +++ /* Compute the offset since the start time of the process. */ +++ if (tid == 0 || tid == THREAD_GETMEM (THREAD_SELF, tid)) +++ /* Our own clock. */ +++ tsc -= THREAD_GETMEM (THREAD_SELF, cpuclock_offset); +++ else +++ { +++ /* This is more complicated. We have to locate the thread based +++ on the ID. This means walking the list of existing +++ threads. */ +++ struct pthread *thread = __find_thread_by_id (tid); +++ if (thread == NULL) +++ { +++ __set_errno (EINVAL); +++ return -1; +++ } +++ +++ /* There is a race here. The thread might terminate and the stack +++ become unusable. But this is the user's problem. */ +++ tsc -= thread->cpuclock_offset; +++ } +++ +++ /* Compute the seconds. */ +++ tp->tv_sec = tsc / freq; +++ +++ /* And the nanoseconds. This computation should be stable until +++ we get machines with about 16GHz frequency. */ +++ tp->tv_nsec = ((tsc % freq) * 1000000000ull) / freq; +++ +++ return 0; +++} +++#endif ++--- /dev/null +++++ b/fbtl/pthread_clock_settime.c ++@@ -0,0 +1,55 @@ +++/* Copyright (C) 2001-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; see the file COPYING.LIB. If +++ not, see . */ +++ +++#include +++#include +++#include +++#include +++#include "pthreadP.h" +++ +++ +++#if HP_TIMING_AVAIL +++int +++__pthread_clock_settime (clockid_t clock_id, hp_timing_t offset) +++{ +++ /* This is the ID of the thread we are looking for. */ +++ pid_t tid = ((unsigned int) clock_id) >> CLOCK_IDFIELD_SIZE; +++ +++ /* Compute the offset since the start time of the process. */ +++ if (tid == 0 || tid == THREAD_GETMEM (THREAD_SELF, tid)) +++ /* Our own clock. */ +++ THREAD_SETMEM (THREAD_SELF, cpuclock_offset, offset); +++ else +++ { +++ /* This is more complicated. We have to locate the thread based +++ on the ID. This means walking the list of existing +++ threads. */ +++ struct pthread *thread = __find_thread_by_id (tid); +++ if (thread == NULL) +++ { +++ __set_errno (EINVAL); +++ return -1; +++ } +++ +++ /* There is a race here. The thread might terminate and the stack +++ become unusable. But this is the user's problem. */ +++ thread->cpuclock_offset = offset; +++ } +++ +++ return 0; +++} +++#endif ++--- /dev/null +++++ b/fbtl/pthread_cond_broadcast.c ++@@ -0,0 +1,97 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Martin Schwidefsky , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++#include +++#include +++ +++ +++int +++__pthread_cond_broadcast (pthread_cond_t *cond) +++{ +++ LIBC_PROBE (cond_broadcast, 1, cond); +++ +++ int pshared = (cond->__data.__mutex == (void *) ~0l) +++ ? LLL_SHARED : LLL_PRIVATE; +++ /* Make sure we are alone. */ +++ lll_lock (cond->__data.__lock, pshared); +++ +++ /* Are there any waiters to be woken? */ +++ if (cond->__data.__total_seq > cond->__data.__wakeup_seq) +++ { +++ /* Yes. Mark them all as woken. */ +++ cond->__data.__wakeup_seq = cond->__data.__total_seq; +++ cond->__data.__woken_seq = cond->__data.__total_seq; +++ cond->__data.__futex = (unsigned int) cond->__data.__total_seq * 2; +++ int futex_val = cond->__data.__futex; +++ /* Signal that a broadcast happened. */ +++ ++cond->__data.__broadcast_seq; +++ +++ /* We are done. */ +++ lll_unlock (cond->__data.__lock, pshared); +++ +++ /* Wake everybody. */ +++ pthread_mutex_t *mut = (pthread_mutex_t *) cond->__data.__mutex; +++ +++ /* Do not use requeue for pshared condvars. */ +++ if (mut == (void *) ~0l +++ || PTHREAD_MUTEX_PSHARED (mut) & PTHREAD_MUTEX_PSHARED_BIT) +++ goto wake_all; +++# warning wake all every time +++#if 0 +++#if (defined lll_futex_cmp_requeue_pi \ +++ && defined __ASSUME_REQUEUE_PI) +++ int pi_flag = PTHREAD_MUTEX_PRIO_INHERIT_NP | PTHREAD_MUTEX_ROBUST_NP; +++ pi_flag &= mut->__data.__kind; +++ +++ if (pi_flag == PTHREAD_MUTEX_PRIO_INHERIT_NP) +++ { +++ if (lll_futex_cmp_requeue_pi (&cond->__data.__futex, 1, INT_MAX, +++ &mut->__data.__lock, futex_val, +++ LLL_PRIVATE) == 0) +++ return 0; +++ } +++ else +++#endif +++ /* lll_futex_requeue returns 0 for success and non-zero +++ for errors. */ +++ if (!__builtin_expect (lll_futex_requeue (&cond->__data.__futex, 1, +++ INT_MAX, &mut->__data.__lock, +++ futex_val, LLL_PRIVATE), 0)) +++ return 0; +++#endif +++wake_all: +++ lll_futex_wake (&cond->__data.__futex, INT_MAX, pshared); +++ return 0; +++ } +++ +++ /* We are done. */ +++ lll_unlock (cond->__data.__lock, pshared); +++ +++ return 0; +++} +++ +++versioned_symbol (libpthread, __pthread_cond_broadcast, pthread_cond_broadcast, +++ GLIBC_2_3_2); ++--- /dev/null +++++ b/fbtl/pthread_cond_destroy.c ++@@ -0,0 +1,86 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include "pthreadP.h" +++#include +++ +++ +++int +++__pthread_cond_destroy (pthread_cond_t *cond) +++{ +++ int pshared = (cond->__data.__mutex == (void *) ~0l) +++ ? LLL_SHARED : LLL_PRIVATE; +++ +++ LIBC_PROBE (cond_destroy, 1, cond); +++ +++ /* Make sure we are alone. */ +++ lll_lock (cond->__data.__lock, pshared); +++ +++ if (cond->__data.__total_seq > cond->__data.__wakeup_seq) +++ { +++ /* If there are still some waiters which have not been +++ woken up, this is an application bug. */ +++ lll_unlock (cond->__data.__lock, pshared); +++ return EBUSY; +++ } +++ +++ /* Tell pthread_cond_*wait that this condvar is being destroyed. */ +++ cond->__data.__total_seq = -1ULL; +++ +++ /* If there are waiters which have been already signalled or +++ broadcasted, but still are using the pthread_cond_t structure, +++ pthread_cond_destroy needs to wait for them. */ +++ unsigned int nwaiters = cond->__data.__nwaiters; +++ +++ if (nwaiters >= (1 << COND_NWAITERS_SHIFT)) +++ { +++ /* Wake everybody on the associated mutex in case there are +++ threads that have been requeued to it. +++ Without this, pthread_cond_destroy could block potentially +++ for a long time or forever, as it would depend on other +++ thread's using the mutex. +++ When all threads waiting on the mutex are woken up, pthread_cond_wait +++ only waits for threads to acquire and release the internal +++ condvar lock. */ +++ if (cond->__data.__mutex != NULL +++ && cond->__data.__mutex != (void *) ~0l) +++ { +++ pthread_mutex_t *mut = (pthread_mutex_t *) cond->__data.__mutex; +++ lll_futex_wake (&mut->__data.__lock, INT_MAX, +++ PTHREAD_MUTEX_PSHARED (mut)); +++ } +++ +++ do +++ { +++ lll_unlock (cond->__data.__lock, pshared); +++ +++ lll_futex_wait (&cond->__data.__nwaiters, nwaiters, pshared); +++ +++ lll_lock (cond->__data.__lock, pshared); +++ +++ nwaiters = cond->__data.__nwaiters; +++ } +++ while (nwaiters >= (1 << COND_NWAITERS_SHIFT)); +++ } +++ +++ return 0; +++} +++versioned_symbol (libpthread, __pthread_cond_destroy, +++ pthread_cond_destroy, GLIBC_2_3_2); ++--- /dev/null +++++ b/fbtl/pthread_cond_init.c ++@@ -0,0 +1,47 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include "pthreadP.h" +++#include +++ +++ +++int +++__pthread_cond_init (pthread_cond_t *cond, const pthread_condattr_t *cond_attr) +++{ +++ struct pthread_condattr *icond_attr = (struct pthread_condattr *) cond_attr; +++ +++ cond->__data.__lock = LLL_LOCK_INITIALIZER; +++ cond->__data.__futex = 0; +++ cond->__data.__nwaiters = (icond_attr != NULL +++ ? ((icond_attr->value >> 1) +++ & ((1 << COND_NWAITERS_SHIFT) - 1)) +++ : CLOCK_REALTIME); +++ cond->__data.__total_seq = 0; +++ cond->__data.__wakeup_seq = 0; +++ cond->__data.__woken_seq = 0; +++ cond->__data.__mutex = (icond_attr == NULL || (icond_attr->value & 1) == 0 +++ ? NULL : (void *) ~0l); +++ cond->__data.__broadcast_seq = 0; +++ +++ LIBC_PROBE (cond_init, 2, cond, cond_attr); +++ +++ return 0; +++} +++versioned_symbol (libpthread, __pthread_cond_init, +++ pthread_cond_init, GLIBC_2_3_2); ++--- /dev/null +++++ b/fbtl/pthread_cond_signal.c ++@@ -0,0 +1,90 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Martin Schwidefsky , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++ +++#include +++#include +++#include +++ +++ +++int +++__pthread_cond_signal (pthread_cond_t *cond) +++{ +++ int pshared = (cond->__data.__mutex == (void *) ~0l) +++ ? LLL_SHARED : LLL_PRIVATE; +++ +++ LIBC_PROBE (cond_signal, 1, cond); +++ +++ /* Make sure we are alone. */ +++ lll_lock (cond->__data.__lock, pshared); +++ +++ /* Are there any waiters to be woken? */ +++ if (cond->__data.__total_seq > cond->__data.__wakeup_seq) +++ { +++ /* Yes. Mark one of them as woken. */ +++ ++cond->__data.__wakeup_seq; +++ ++cond->__data.__futex; +++ +++#warning TODO/rework +++#if 0 +++#if (defined lll_futex_cmp_requeue_pi \ +++ && defined __ASSUME_REQUEUE_PI) +++ int pi_flag = PTHREAD_MUTEX_PRIO_INHERIT_NP | PTHREAD_MUTEX_ROBUST_NP; +++ pthread_mutex_t *mut = cond->__data.__mutex; +++ +++ /* Do not use requeue for pshared condvars. */ +++ if (mut != (void *) ~0l) +++ pi_flag &= mut->__data.__kind; +++ +++ if (__builtin_expect (pi_flag == PTHREAD_MUTEX_PRIO_INHERIT_NP, 0) +++ /* This can only really fail with a ENOSYS, since nobody can modify +++ futex while we have the cond_lock. */ +++ && lll_futex_cmp_requeue_pi (&cond->__data.__futex, 1, 0, +++ &mut->__data.__lock, +++ cond->__data.__futex, pshared) == 0) +++ { +++ lll_unlock (cond->__data.__lock, pshared); +++ return 0; +++ } +++ else +++#endif +++ /* Wake one. */ +++ if (! __builtin_expect (lll_futex_wake_unlock (&cond->__data.__futex, +++ 1, 1, +++ &cond->__data.__lock, +++ pshared), 0)) +++ return 0; +++#endif +++ /* Fallback if neither of them work. */ +++ lll_futex_wake (&cond->__data.__futex, 1, pshared); +++ } +++ +++ /* We are done. */ +++ lll_unlock (cond->__data.__lock, pshared); +++ +++ return 0; +++} +++ +++versioned_symbol (libpthread, __pthread_cond_signal, pthread_cond_signal, +++ GLIBC_2_3_2); ++--- /dev/null +++++ b/fbtl/pthread_cond_timedwait.c ++@@ -0,0 +1,267 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Martin Schwidefsky , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++#include +++ +++#ifndef HAVE_CLOCK_GETTIME_VSYSCALL +++# undef INTERNAL_VSYSCALL +++# define INTERNAL_VSYSCALL INTERNAL_SYSCALL +++# undef INLINE_VSYSCALL +++# define INLINE_VSYSCALL INLINE_SYSCALL +++#else +++# include +++#endif +++ +++/* Cleanup handler, defined in pthread_cond_wait.c. */ +++extern void __condvar_cleanup (void *arg) +++ __attribute__ ((visibility ("hidden"))); +++ +++struct _condvar_cleanup_buffer +++{ +++ int oldtype; +++ pthread_cond_t *cond; +++ pthread_mutex_t *mutex; +++ unsigned int bc_seq; +++}; +++ +++int +++__pthread_cond_timedwait (pthread_cond_t *cond, pthread_mutex_t *mutex, +++ const struct timespec *abstime) +++{ +++ struct _pthread_cleanup_buffer buffer; +++ struct _condvar_cleanup_buffer cbuffer; +++ int result = 0; +++ +++ /* Catch invalid parameters. */ +++ if (abstime->tv_nsec < 0 || abstime->tv_nsec >= 1000000000) +++ return EINVAL; +++ +++ int pshared = (cond->__data.__mutex == (void *) ~0l) +++ ? LLL_SHARED : LLL_PRIVATE; +++ +++#if (defined lll_futex_timed_wait_requeue_pi \ +++ && defined __ASSUME_REQUEUE_PI) +++ int pi_flag = 0; +++#endif +++ +++ /* Make sure we are alone. */ +++ lll_lock (cond->__data.__lock, pshared); +++ +++ /* Now we can release the mutex. */ +++ int err = __pthread_mutex_unlock_usercnt (mutex, 0); +++ if (err) +++ { +++ lll_unlock (cond->__data.__lock, pshared); +++ return err; +++ } +++ +++ /* We have one new user of the condvar. */ +++ ++cond->__data.__total_seq; +++ ++cond->__data.__futex; +++ cond->__data.__nwaiters += 1 << COND_NWAITERS_SHIFT; +++ +++ /* Work around the fact that the kernel rejects negative timeout values +++ despite them being valid. */ +++ if (__glibc_unlikely (abstime->tv_sec < 0)) +++ goto timeout; +++ +++ /* Remember the mutex we are using here. If there is already a +++ different address store this is a bad user bug. Do not store +++ anything for pshared condvars. */ +++ if (cond->__data.__mutex != (void *) ~0l) +++ cond->__data.__mutex = mutex; +++ +++ /* Prepare structure passed to cancellation handler. */ +++ cbuffer.cond = cond; +++ cbuffer.mutex = mutex; +++ +++ /* Before we block we enable cancellation. Therefore we have to +++ install a cancellation handler. */ +++ __pthread_cleanup_push (&buffer, __condvar_cleanup, &cbuffer); +++ +++ /* The current values of the wakeup counter. The "woken" counter +++ must exceed this value. */ +++ unsigned long long int val; +++ unsigned long long int seq; +++ val = seq = cond->__data.__wakeup_seq; +++ /* Remember the broadcast counter. */ +++ cbuffer.bc_seq = cond->__data.__broadcast_seq; +++ +++ while (1) +++ { +++#if (!defined __ASSUME_FUTEX_CLOCK_REALTIME \ +++ || !defined lll_futex_timed_wait_bitset) +++ struct timespec rt; +++ { +++# if 1 /* used to be ifdef __NR_clock_gettime */ +++ INTERNAL_SYSCALL_DECL (err); +++ (void) INTERNAL_VSYSCALL (clock_gettime, err, 2, +++ (cond->__data.__nwaiters +++ & ((1 << COND_NWAITERS_SHIFT) - 1)), +++ &rt); +++ /* Convert the absolute timeout value to a relative timeout. */ +++ rt.tv_sec = abstime->tv_sec - rt.tv_sec; +++ rt.tv_nsec = abstime->tv_nsec - rt.tv_nsec; +++# else +++ /* Get the current time. So far we support only one clock. */ +++ struct timeval tv; +++ (void) __gettimeofday (&tv, NULL); +++ +++ /* Convert the absolute timeout value to a relative timeout. */ +++ rt.tv_sec = abstime->tv_sec - tv.tv_sec; +++ rt.tv_nsec = abstime->tv_nsec - tv.tv_usec * 1000; +++# endif +++ } +++ if (rt.tv_nsec < 0) +++ { +++ rt.tv_nsec += 1000000000; +++ --rt.tv_sec; +++ } +++ /* Did we already time out? */ +++ if (__glibc_unlikely (rt.tv_sec < 0)) +++ { +++ if (cbuffer.bc_seq != cond->__data.__broadcast_seq) +++ goto bc_out; +++ +++ goto timeout; +++ } +++#endif +++ +++ unsigned int futex_val = cond->__data.__futex; +++ +++ /* Prepare to wait. Release the condvar futex. */ +++ lll_unlock (cond->__data.__lock, pshared); +++ +++ /* Enable asynchronous cancellation. Required by the standard. */ +++ cbuffer.oldtype = __pthread_enable_asynccancel (); +++ +++/* REQUEUE_PI was implemented after FUTEX_CLOCK_REALTIME, so it is sufficient +++ to check just the former. */ +++#if (defined lll_futex_timed_wait_requeue_pi \ +++ && defined __ASSUME_REQUEUE_PI) +++ /* If pi_flag remained 1 then it means that we had the lock and the mutex +++ but a spurious waker raced ahead of us. Give back the mutex before +++ going into wait again. */ +++ if (pi_flag) +++ { +++ __pthread_mutex_cond_lock_adjust (mutex); +++ __pthread_mutex_unlock_usercnt (mutex, 0); +++ } +++ pi_flag = USE_REQUEUE_PI (mutex); +++ +++ if (pi_flag) +++ { +++ unsigned int clockbit = (cond->__data.__nwaiters & 1 +++ ? 0 : FUTEX_CLOCK_REALTIME); +++ err = lll_futex_timed_wait_requeue_pi (&cond->__data.__futex, +++ futex_val, abstime, clockbit, +++ &mutex->__data.__lock, +++ pshared); +++ pi_flag = (err == 0); +++ } +++ else +++#endif +++ +++ { +++#if (!defined __ASSUME_FUTEX_CLOCK_REALTIME \ +++ || !defined lll_futex_timed_wait_bitset) +++ /* Wait until woken by signal or broadcast. */ +++ err = lll_futex_timed_wait (&cond->__data.__futex, +++ futex_val, &rt, pshared); +++#else +++ unsigned int clockbit = (cond->__data.__nwaiters & 1 +++ ? 0 : FUTEX_CLOCK_REALTIME); +++ err = lll_futex_timed_wait_bitset (&cond->__data.__futex, futex_val, +++ abstime, clockbit, pshared); +++#endif +++ } +++ +++ /* Disable asynchronous cancellation. */ +++ __pthread_disable_asynccancel (cbuffer.oldtype); +++ +++ /* We are going to look at shared data again, so get the lock. */ +++ lll_lock (cond->__data.__lock, pshared); +++ +++ /* If a broadcast happened, we are done. */ +++ if (cbuffer.bc_seq != cond->__data.__broadcast_seq) +++ goto bc_out; +++ +++ /* Check whether we are eligible for wakeup. */ +++ val = cond->__data.__wakeup_seq; +++ if (val != seq && cond->__data.__woken_seq != val) +++ break; +++ +++ /* Not woken yet. Maybe the time expired? */ +++ if (__glibc_unlikely (err == -ETIMEDOUT)) +++ { +++ timeout: +++ /* Yep. Adjust the counters. */ +++ ++cond->__data.__wakeup_seq; +++ ++cond->__data.__futex; +++ +++ /* The error value. */ +++ result = ETIMEDOUT; +++ break; +++ } +++ } +++ +++ /* Another thread woken up. */ +++ ++cond->__data.__woken_seq; +++ +++ bc_out: +++ +++ cond->__data.__nwaiters -= 1 << COND_NWAITERS_SHIFT; +++ +++ /* If pthread_cond_destroy was called on this variable already, +++ notify the pthread_cond_destroy caller all waiters have left +++ and it can be successfully destroyed. */ +++ if (cond->__data.__total_seq == -1ULL +++ && cond->__data.__nwaiters < (1 << COND_NWAITERS_SHIFT)) +++ lll_futex_wake (&cond->__data.__nwaiters, 1, pshared); +++ +++ /* We are done with the condvar. */ +++ lll_unlock (cond->__data.__lock, pshared); +++ +++ /* The cancellation handling is back to normal, remove the handler. */ +++ __pthread_cleanup_pop (&buffer, 0); +++ +++ /* Get the mutex before returning. */ +++#if (defined lll_futex_timed_wait_requeue_pi \ +++ && defined __ASSUME_REQUEUE_PI) +++ if (pi_flag) +++ { +++ __pthread_mutex_cond_lock_adjust (mutex); +++ err = 0; +++ } +++ else +++#endif +++ err = __pthread_mutex_cond_lock (mutex); +++ +++ return err ?: result; +++} +++ +++versioned_symbol (libpthread, __pthread_cond_timedwait, pthread_cond_timedwait, +++ GLIBC_2_3_2); ++--- /dev/null +++++ b/fbtl/pthread_cond_wait.c ++@@ -0,0 +1,236 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Martin Schwidefsky , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++ +++#include +++#include +++ +++struct _condvar_cleanup_buffer +++{ +++ int oldtype; +++ pthread_cond_t *cond; +++ pthread_mutex_t *mutex; +++ unsigned int bc_seq; +++}; +++ +++ +++void +++__attribute__ ((visibility ("hidden"))) +++__condvar_cleanup (void *arg) +++{ +++ struct _condvar_cleanup_buffer *cbuffer = +++ (struct _condvar_cleanup_buffer *) arg; +++ unsigned int destroying; +++ int pshared = (cbuffer->cond->__data.__mutex == (void *) ~0l) +++ ? LLL_SHARED : LLL_PRIVATE; +++ +++ /* We are going to modify shared data. */ +++ lll_lock (cbuffer->cond->__data.__lock, pshared); +++ +++ if (cbuffer->bc_seq == cbuffer->cond->__data.__broadcast_seq) +++ { +++ /* This thread is not waiting anymore. Adjust the sequence counters +++ appropriately. We do not increment WAKEUP_SEQ if this would +++ bump it over the value of TOTAL_SEQ. This can happen if a thread +++ was woken and then canceled. */ +++ if (cbuffer->cond->__data.__wakeup_seq +++ < cbuffer->cond->__data.__total_seq) +++ { +++ ++cbuffer->cond->__data.__wakeup_seq; +++ ++cbuffer->cond->__data.__futex; +++ } +++ ++cbuffer->cond->__data.__woken_seq; +++ } +++ +++ cbuffer->cond->__data.__nwaiters -= 1 << COND_NWAITERS_SHIFT; +++ +++ /* If pthread_cond_destroy was called on this variable already, +++ notify the pthread_cond_destroy caller all waiters have left +++ and it can be successfully destroyed. */ +++ destroying = 0; +++ if (cbuffer->cond->__data.__total_seq == -1ULL +++ && cbuffer->cond->__data.__nwaiters < (1 << COND_NWAITERS_SHIFT)) +++ { +++ lll_futex_wake (&cbuffer->cond->__data.__nwaiters, 1, pshared); +++ destroying = 1; +++ } +++ +++ /* We are done. */ +++ lll_unlock (cbuffer->cond->__data.__lock, pshared); +++ +++ /* Wake everybody to make sure no condvar signal gets lost. */ +++ if (! destroying) +++ lll_futex_wake (&cbuffer->cond->__data.__futex, INT_MAX, pshared); +++ +++ /* Get the mutex before returning unless asynchronous cancellation +++ is in effect. We don't try to get the mutex if we already own it. */ +++ if (!(USE_REQUEUE_PI (cbuffer->mutex)) +++ || ((cbuffer->mutex->__data.__lock & FUTEX_TID_MASK) +++ != THREAD_GETMEM (THREAD_SELF, tid))) +++ { +++ __pthread_mutex_cond_lock (cbuffer->mutex); +++ } +++ else +++ __pthread_mutex_cond_lock_adjust (cbuffer->mutex); +++} +++ +++ +++int +++__pthread_cond_wait (pthread_cond_t *cond, pthread_mutex_t *mutex) +++{ +++ struct _pthread_cleanup_buffer buffer; +++ struct _condvar_cleanup_buffer cbuffer; +++ int err; +++ int pshared = (cond->__data.__mutex == (void *) ~0l) +++ ? LLL_SHARED : LLL_PRIVATE; +++ +++#if (defined lll_futex_wait_requeue_pi \ +++ && defined __ASSUME_REQUEUE_PI) +++ int pi_flag = 0; +++#endif +++ +++ LIBC_PROBE (cond_wait, 2, cond, mutex); +++ +++ /* Make sure we are alone. */ +++ lll_lock (cond->__data.__lock, pshared); +++ +++ /* Now we can release the mutex. */ +++ err = __pthread_mutex_unlock_usercnt (mutex, 0); +++ if (__glibc_unlikely (err)) +++ { +++ lll_unlock (cond->__data.__lock, pshared); +++ return err; +++ } +++ +++ /* We have one new user of the condvar. */ +++ ++cond->__data.__total_seq; +++ ++cond->__data.__futex; +++ cond->__data.__nwaiters += 1 << COND_NWAITERS_SHIFT; +++ +++ /* Remember the mutex we are using here. If there is already a +++ different address store this is a bad user bug. Do not store +++ anything for pshared condvars. */ +++ if (cond->__data.__mutex != (void *) ~0l) +++ cond->__data.__mutex = mutex; +++ +++ /* Prepare structure passed to cancellation handler. */ +++ cbuffer.cond = cond; +++ cbuffer.mutex = mutex; +++ +++ /* Before we block we enable cancellation. Therefore we have to +++ install a cancellation handler. */ +++ __pthread_cleanup_push (&buffer, __condvar_cleanup, &cbuffer); +++ +++ /* The current values of the wakeup counter. The "woken" counter +++ must exceed this value. */ +++ unsigned long long int val; +++ unsigned long long int seq; +++ val = seq = cond->__data.__wakeup_seq; +++ /* Remember the broadcast counter. */ +++ cbuffer.bc_seq = cond->__data.__broadcast_seq; +++ +++ do +++ { +++ unsigned int futex_val = cond->__data.__futex; +++ /* Prepare to wait. Release the condvar futex. */ +++ lll_unlock (cond->__data.__lock, pshared); +++ +++ /* Enable asynchronous cancellation. Required by the standard. */ +++ cbuffer.oldtype = __pthread_enable_asynccancel (); +++ +++#if (defined lll_futex_wait_requeue_pi \ +++ && defined __ASSUME_REQUEUE_PI) +++ /* If pi_flag remained 1 then it means that we had the lock and the mutex +++ but a spurious waker raced ahead of us. Give back the mutex before +++ going into wait again. */ +++ if (pi_flag) +++ { +++ __pthread_mutex_cond_lock_adjust (mutex); +++ __pthread_mutex_unlock_usercnt (mutex, 0); +++ } +++ pi_flag = USE_REQUEUE_PI (mutex); +++ +++ if (pi_flag) +++ { +++ err = lll_futex_wait_requeue_pi (&cond->__data.__futex, +++ futex_val, &mutex->__data.__lock, +++ pshared); +++ +++ pi_flag = (err == 0); +++ } +++ else +++#endif +++ /* Wait until woken by signal or broadcast. */ +++ lll_futex_wait (&cond->__data.__futex, futex_val, pshared); +++ +++ /* Disable asynchronous cancellation. */ +++ __pthread_disable_asynccancel (cbuffer.oldtype); +++ +++ /* We are going to look at shared data again, so get the lock. */ +++ lll_lock (cond->__data.__lock, pshared); +++ +++ /* If a broadcast happened, we are done. */ +++ if (cbuffer.bc_seq != cond->__data.__broadcast_seq) +++ goto bc_out; +++ +++ /* Check whether we are eligible for wakeup. */ +++ val = cond->__data.__wakeup_seq; +++ } +++ while (val == seq || cond->__data.__woken_seq == val); +++ +++ /* Another thread woken up. */ +++ ++cond->__data.__woken_seq; +++ +++ bc_out: +++ +++ cond->__data.__nwaiters -= 1 << COND_NWAITERS_SHIFT; +++ +++ /* If pthread_cond_destroy was called on this varaible already, +++ notify the pthread_cond_destroy caller all waiters have left +++ and it can be successfully destroyed. */ +++ if (cond->__data.__total_seq == -1ULL +++ && cond->__data.__nwaiters < (1 << COND_NWAITERS_SHIFT)) +++ lll_futex_wake (&cond->__data.__nwaiters, 1, pshared); +++ +++ /* We are done with the condvar. */ +++ lll_unlock (cond->__data.__lock, pshared); +++ +++ /* The cancellation handling is back to normal, remove the handler. */ +++ __pthread_cleanup_pop (&buffer, 0); +++ +++ /* Get the mutex before returning. Not needed for PI. */ +++#if (defined lll_futex_wait_requeue_pi \ +++ && defined __ASSUME_REQUEUE_PI) +++ if (pi_flag) +++ { +++ __pthread_mutex_cond_lock_adjust (mutex); +++ return 0; +++ } +++ else +++#endif +++ return __pthread_mutex_cond_lock (mutex); +++} +++ +++versioned_symbol (libpthread, __pthread_cond_wait, pthread_cond_wait, +++ GLIBC_2_3_2); ++--- /dev/null +++++ b/fbtl/pthread_condattr_destroy.c ++@@ -0,0 +1,28 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include "pthreadP.h" +++ +++ +++int +++__pthread_condattr_destroy (pthread_condattr_t *attr) +++{ +++ /* Nothing to be done. */ +++ return 0; +++} +++strong_alias (__pthread_condattr_destroy, pthread_condattr_destroy) ++--- /dev/null +++++ b/fbtl/pthread_condattr_getclock.c ++@@ -0,0 +1,28 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include "pthreadP.h" +++ +++ +++int +++pthread_condattr_getclock (const pthread_condattr_t *attr, clockid_t *clock_id) +++{ +++ *clock_id = (((((const struct pthread_condattr *) attr)->value) >> 1) +++ & ((1 << COND_NWAITERS_SHIFT) - 1)); +++ return 0; +++} ++--- /dev/null +++++ b/fbtl/pthread_condattr_getpshared.c ++@@ -0,0 +1,28 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include "pthreadP.h" +++ +++ +++int +++pthread_condattr_getpshared (const pthread_condattr_t *attr, int *pshared) +++{ +++ *pshared = ((const struct pthread_condattr *) attr)->value & 1; +++ +++ return 0; +++} ++--- /dev/null +++++ b/fbtl/pthread_condattr_init.c ++@@ -0,0 +1,30 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include "pthreadP.h" +++ +++ +++int +++__pthread_condattr_init (pthread_condattr_t *attr) +++{ +++ memset (attr, '\0', sizeof (*attr)); +++ +++ return 0; +++} +++strong_alias (__pthread_condattr_init, pthread_condattr_init) ++--- /dev/null +++++ b/fbtl/pthread_condattr_setclock.c ++@@ -0,0 +1,46 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include "pthreadP.h" +++#include +++ +++ +++int +++pthread_condattr_setclock (pthread_condattr_t *attr, clockid_t clock_id) +++{ +++ /* Only a few clocks are allowed. */ +++ if (clock_id != CLOCK_MONOTONIC && 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; +++ +++ /* Make sure the value fits in the bits we reserved. */ +++ assert (clock_id < (1 << COND_NWAITERS_SHIFT)); +++ +++ int *valuep = &((struct pthread_condattr *) attr)->value; +++ +++ *valuep = ((*valuep & ~(((1 << COND_NWAITERS_SHIFT) - 1) << 1)) +++ | (clock_id << 1)); +++ +++ return 0; +++} ++--- /dev/null +++++ b/fbtl/pthread_condattr_setpshared.c ++@@ -0,0 +1,34 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++ +++int +++pthread_condattr_setpshared (pthread_condattr_t *attr, int pshared) +++{ +++ if (pshared != PTHREAD_PROCESS_PRIVATE +++ && __builtin_expect (pshared != PTHREAD_PROCESS_SHARED, 0)) +++ return EINVAL; +++ +++ int *valuep = &((struct pthread_condattr *) attr)->value; +++ +++ *valuep = (*valuep & ~1) | (pshared != PTHREAD_PROCESS_PRIVATE); +++ +++ return 0; +++} ++--- /dev/null +++++ b/fbtl/pthread_create.c ++@@ -0,0 +1,669 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include "pthreadP.h" +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++#include +++ +++#include +++ +++ +++/* Local function to start thread and handle cleanup. */ +++static int start_thread (void *arg); +++ +++ +++/* Nozero if debugging mode is enabled. */ +++int __pthread_debug; +++ +++/* Globally enabled events. */ +++static td_thr_events_t __nptl_threads_events __attribute_used__; +++ +++/* Pointer to descriptor with the last event. */ +++static struct pthread *__nptl_last_event __attribute_used__; +++ +++/* Number of threads running. */ +++unsigned int __nptl_nthreads = 1; +++ +++ +++/* Code to allocate and deallocate a stack. */ +++#include "allocatestack.c" +++ +++/* Code to create the thread. */ +++#include +++ +++ +++struct pthread * +++internal_function +++__find_in_stack_list (struct pthread *pd) +++{ +++ list_t *entry; +++ struct pthread *result = NULL; +++ +++ lll_lock (stack_cache_lock, LLL_PRIVATE); +++ +++ list_for_each (entry, &stack_used) +++ { +++ struct pthread *curp; +++ +++ curp = list_entry (entry, struct pthread, list); +++ if (curp == pd) +++ { +++ result = curp; +++ break; +++ } +++ } +++ +++ if (result == NULL) +++ list_for_each (entry, &__stack_user) +++ { +++ struct pthread *curp; +++ +++ curp = list_entry (entry, struct pthread, list); +++ if (curp == pd) +++ { +++ result = curp; +++ break; +++ } +++ } +++ +++ lll_unlock (stack_cache_lock, LLL_PRIVATE); +++ +++ return result; +++} +++ +++ +++/* Deallocate POSIX thread-local-storage. */ +++void +++attribute_hidden +++__nptl_deallocate_tsd (void) +++{ +++ struct pthread *self = THREAD_SELF; +++ +++ /* Maybe no data was ever allocated. This happens often so we have +++ a flag for this. */ +++ if (THREAD_GETMEM (self, specific_used)) +++ { +++ size_t round; +++ size_t cnt; +++ +++ round = 0; +++ do +++ { +++ size_t idx; +++ +++ /* So far no new nonzero data entry. */ +++ THREAD_SETMEM (self, specific_used, false); +++ +++ for (cnt = idx = 0; cnt < PTHREAD_KEY_1STLEVEL_SIZE; ++cnt) +++ { +++ struct pthread_key_data *level2; +++ +++ level2 = THREAD_GETMEM_NC (self, specific, cnt); +++ +++ if (level2 != NULL) +++ { +++ size_t inner; +++ +++ for (inner = 0; inner < PTHREAD_KEY_2NDLEVEL_SIZE; +++ ++inner, ++idx) +++ { +++ void *data = level2[inner].data; +++ +++ if (data != NULL) +++ { +++ /* Always clear the data. */ +++ level2[inner].data = NULL; +++ +++ /* Make sure the data corresponds to a valid +++ key. This test fails if the key was +++ deallocated and also if it was +++ re-allocated. It is the user's +++ responsibility to free the memory in this +++ case. */ +++ if (level2[inner].seq +++ == __pthread_keys[idx].seq +++ /* It is not necessary to register a destructor +++ function. */ +++ && __pthread_keys[idx].destr != NULL) +++ /* Call the user-provided destructor. */ +++ __pthread_keys[idx].destr (data); +++ } +++ } +++ } +++ else +++ idx += PTHREAD_KEY_1STLEVEL_SIZE; +++ } +++ +++ if (THREAD_GETMEM (self, specific_used) == 0) +++ /* No data has been modified. */ +++ goto just_free; +++ } +++ /* We only repeat the process a fixed number of times. */ +++ while (__builtin_expect (++round < PTHREAD_DESTRUCTOR_ITERATIONS, 0)); +++ +++ /* Just clear the memory of the first block for reuse. */ +++ memset (&THREAD_SELF->specific_1stblock, '\0', +++ sizeof (self->specific_1stblock)); +++ +++ just_free: +++ /* Free the memory for the other blocks. */ +++ for (cnt = 1; cnt < PTHREAD_KEY_1STLEVEL_SIZE; ++cnt) +++ { +++ struct pthread_key_data *level2; +++ +++ level2 = THREAD_GETMEM_NC (self, specific, cnt); +++ if (level2 != NULL) +++ { +++ /* The first block is allocated as part of the thread +++ descriptor. */ +++ free (level2); +++ THREAD_SETMEM_NC (self, specific, cnt, NULL); +++ } +++ } +++ +++ THREAD_SETMEM (self, specific_used, false); +++ } +++} +++ +++ +++/* Deallocate a thread's stack after optionally making sure the thread +++ descriptor is still valid. */ +++void +++internal_function +++__free_tcb (struct pthread *pd) +++{ +++ /* The thread is exiting now. */ +++ if (__builtin_expect (atomic_bit_test_set (&pd->cancelhandling, +++ TERMINATED_BIT) == 0, 1)) +++ { +++ /* Remove the descriptor from the list. */ +++ if (DEBUGGING_P && __find_in_stack_list (pd) == NULL) +++ /* Something is really wrong. The descriptor for a still +++ running thread is gone. */ +++ abort (); +++ +++ /* Free TPP data. */ +++ if (__glibc_unlikely (pd->tpp != NULL)) +++ { +++ struct priority_protection_data *tpp = pd->tpp; +++ +++ pd->tpp = NULL; +++ free (tpp); +++ } +++ +++ /* Queue the stack memory block for reuse and exit the process. The +++ kernel will signal via writing to the address returned by +++ QUEUE-STACK when the stack is available. */ +++ __deallocate_stack (pd); +++ } +++} +++ +++ +++static int +++start_thread (void *arg) +++{ +++ struct pthread *pd = (struct pthread *) arg; +++ +++#if HP_TIMING_AVAIL +++ /* Remember the time when the thread was started. */ +++ hp_timing_t now; +++ HP_TIMING_NOW (now); +++ THREAD_SETMEM (pd, cpuclock_offset, now); +++#endif +++ +++#if 1 +++ _FPU_SETCW(pd->fpu_control_init); +++#endif +++ +++ /* Initialize resolver state pointer. */ +++ __resp = &pd->res; +++ +++ /* Initialize pointers to locale data. */ +++ __ctype_init (); +++ +++ /* Allow setxid from now onwards. */ +++ if (__glibc_unlikely (atomic_exchange_acq (&pd->setxid_futex, 0) == -2)) +++ lll_futex_wake (&pd->setxid_futex, 1, LLL_PRIVATE); +++ +++#ifdef __NR_set_robust_list +++# ifndef __ASSUME_SET_ROBUST_LIST +++ if (__set_robust_list_avail >= 0) +++# endif +++ { +++ INTERNAL_SYSCALL_DECL (err); +++ /* This call should never fail because the initial call in init.c +++ succeeded. */ +++ INTERNAL_SYSCALL (set_robust_list, err, 2, &pd->robust_head, +++ sizeof (struct robust_list_head)); +++ } +++#endif +++ +++ /* If the parent was running cancellation handlers while creating +++ the thread the new thread inherited the signal mask. Reset the +++ cancellation signal mask. */ +++ if (__glibc_unlikely (pd->parent_cancelhandling & CANCELING_BITMASK)) +++ { +++ sigset_t mask; +++ __sigemptyset (&mask); +++ __sigaddset (&mask, SIGCANCEL); +++ INLINE_SYSCALL (sigprocmask, 3, SIG_UNBLOCK, &mask, NULL); +++ } +++ +++ /* This is where the try/finally block should be created. For +++ compilers without that support we do use setjmp. */ +++ struct pthread_unwind_buf unwind_buf; +++ +++ /* No previous handlers. */ +++ unwind_buf.priv.data.prev = NULL; +++ unwind_buf.priv.data.cleanup = NULL; +++ +++ int not_first_call; +++ not_first_call = setjmp ((struct __jmp_buf_tag *) unwind_buf.cancel_jmp_buf); +++ if (__glibc_likely (! not_first_call)) +++ { +++ /* Store the new cleanup handler info. */ +++ THREAD_SETMEM (pd, cleanup_jmp_buf, &unwind_buf); +++ +++ if (__glibc_unlikely (pd->stopped_start)) +++ { +++ int oldtype = CANCEL_ASYNC (); +++ +++ /* Get the lock the parent locked to force synchronization. */ +++ lll_lock (pd->lock, LLL_PRIVATE); +++ /* And give it up right away. */ +++ lll_unlock (pd->lock, LLL_PRIVATE); +++ +++ CANCEL_RESET (oldtype); +++ } +++ +++ LIBC_PROBE (pthread_start, 3, (pthread_t) pd, pd->start_routine, pd->arg); +++ +++ /* Run the code the user provided. */ +++#ifdef CALL_THREAD_FCT +++ THREAD_SETMEM (pd, result, CALL_THREAD_FCT (pd)); +++#else +++ THREAD_SETMEM (pd, result, pd->start_routine (pd->arg)); +++#endif +++ } +++ +++ /* Call destructors for the thread_local TLS variables. */ +++#ifndef SHARED +++ if (&__call_tls_dtors != NULL) +++#endif +++ __call_tls_dtors (); +++ +++ /* Run the destructor for the thread-local data. */ +++ __nptl_deallocate_tsd (); +++ +++ /* Clean up any state libc stored in thread-local variables. */ +++ __libc_thread_freeres (); +++ +++ /* If this is the last thread we terminate the process now. We +++ do not notify the debugger, it might just irritate it if there +++ is no thread left. */ +++ if (__glibc_unlikely (atomic_decrement_and_test (&__nptl_nthreads))) +++ /* This was the last thread. */ +++ exit (0); +++ +++ /* Report the death of the thread if this is wanted. */ +++ if (__glibc_unlikely (pd->report_events)) +++ { +++ /* See whether TD_DEATH is in any of the mask. */ +++ const int idx = __td_eventword (TD_DEATH); +++ const uint32_t mask = __td_eventmask (TD_DEATH); +++ +++ if ((mask & (__nptl_threads_events.event_bits[idx] +++ | pd->eventbuf.eventmask.event_bits[idx])) != 0) +++ { +++ /* Yep, we have to signal the death. Add the descriptor to +++ the list but only if it is not already on it. */ +++ if (pd->nextevent == NULL) +++ { +++ pd->eventbuf.eventnum = TD_DEATH; +++ pd->eventbuf.eventdata = pd; +++ +++ do +++ pd->nextevent = __nptl_last_event; +++ while (atomic_compare_and_exchange_bool_acq (&__nptl_last_event, +++ pd, pd->nextevent)); +++ } +++ +++ /* Now call the function to signal the event. */ +++ __nptl_death_event (); +++ } +++ } +++ +++ /* The thread is exiting now. Don't set this bit until after we've hit +++ the event-reporting breakpoint, so that td_thr_get_info on us while at +++ the breakpoint reports TD_THR_RUN state rather than TD_THR_ZOMBIE. */ +++ atomic_bit_set (&pd->cancelhandling, EXITING_BIT); +++ +++#warning robust misc +++#if 0 +++#ifndef __ASSUME_SET_ROBUST_LIST +++ /* If this thread has any robust mutexes locked, handle them now. */ +++# ifdef __PTHREAD_MUTEX_HAVE_PREV +++ void *robust = pd->robust_head.list; +++# else +++ __pthread_slist_t *robust = pd->robust_list.__next; +++# endif +++ /* We let the kernel do the notification if it is able to do so. +++ If we have to do it here there for sure are no PI mutexes involved +++ since the kernel support for them is even more recent. */ +++ if (__set_robust_list_avail < 0 +++ && __builtin_expect (robust != (void *) &pd->robust_head, 0)) +++ { +++ do +++ { +++ struct __pthread_mutex_s *this = (struct __pthread_mutex_s *) +++ ((char *) robust - offsetof (struct __pthread_mutex_s, +++ __list.__next)); +++ robust = *((void **) robust); +++ +++# ifdef __PTHREAD_MUTEX_HAVE_PREV +++ this->__list.__prev = NULL; +++# endif +++ this->__list.__next = NULL; +++ +++ lll_robust_dead (this->__lock, /* XYZ */ LLL_SHARED); +++ } +++ while (robust != (void *) &pd->robust_head); +++ } +++#endif +++#endif +++ +++ /* Mark the memory of the stack as usable to the kernel. We free +++ everything except for the space used for the TCB itself. */ +++ size_t pagesize_m1 = __getpagesize () - 1; +++#ifdef _STACK_GROWS_DOWN +++ char *sp = CURRENT_STACK_FRAME; +++ size_t freesize = (sp - (char *) pd->stackblock) & ~pagesize_m1; +++#else +++# error "to do" +++#endif +++ assert (freesize < pd->stackblock_size); +++ if (freesize > PTHREAD_STACK_MIN) +++ __madvise (pd->stackblock, freesize - PTHREAD_STACK_MIN, MADV_DONTNEED); +++ +++ /* If the thread is detached free the TCB. */ +++ if (IS_DETACHED (pd)) +++ /* Free the TCB. */ +++ __free_tcb (pd); +++ else if (__glibc_unlikely (pd->cancelhandling & SETXID_BITMASK)) +++ { +++ /* Some other thread might call any of the setXid functions and expect +++ us to reply. In this case wait until we did that. */ +++ do +++ lll_futex_wait (&pd->setxid_futex, 0, LLL_PRIVATE); +++ while (pd->cancelhandling & SETXID_BITMASK); +++ +++ /* Reset the value so that the stack can be reused. */ +++ pd->setxid_futex = 0; +++ } +++ +++ /* We cannot call '_exit' here. '_exit' will terminate the process. +++ +++ The 'exit' implementation in the kernel will signal when the +++ process is really dead since 'clone' got passed the CLONE_CHILD_CLEARTID +++ flag. The 'tid' field in the TCB will be set to zero. +++ +++ The exit code is zero since in case all threads exit by calling +++ 'pthread_exit' the exit status must be 0 (zero). */ +++ __exit_thread (); +++ +++ /* NOTREACHED */ +++ return 0; +++} +++ +++ +++int +++__pthread_create_2_1 (pthread_t *newthread, const pthread_attr_t *attr, +++ void *(*start_routine) (void *), void *arg) +++{ +++ STACK_VARIABLES; +++ +++ const struct pthread_attr *iattr = (struct pthread_attr *) attr; +++ struct pthread_attr default_attr; +++ bool free_cpuset = false; +++ if (iattr == NULL) +++ { +++ lll_lock (__default_pthread_attr_lock, LLL_PRIVATE); +++ default_attr = __default_pthread_attr; +++ size_t cpusetsize = default_attr.cpusetsize; +++ if (cpusetsize > 0) +++ { +++ cpu_set_t *cpuset; +++ if (__glibc_likely (__libc_use_alloca (cpusetsize))) +++ cpuset = __alloca (cpusetsize); +++ else +++ { +++ cpuset = malloc (cpusetsize); +++ if (cpuset == NULL) +++ { +++ lll_unlock (__default_pthread_attr_lock, LLL_PRIVATE); +++ return ENOMEM; +++ } +++ free_cpuset = true; +++ } +++ memcpy (cpuset, default_attr.cpuset, cpusetsize); +++ default_attr.cpuset = cpuset; +++ } +++ lll_unlock (__default_pthread_attr_lock, LLL_PRIVATE); +++ iattr = &default_attr; +++ } +++ +++ struct pthread *pd = NULL; +++ int err = ALLOCATE_STACK (iattr, &pd); +++ int retval = 0; +++ +++ if (__glibc_unlikely (err != 0)) +++ /* Something went wrong. Maybe a parameter of the attributes is +++ invalid or we could not allocate memory. Note we have to +++ translate error codes. */ +++ { +++ retval = err == ENOMEM ? EAGAIN : err; +++ goto out; +++ } +++ +++ +++ /* Initialize the TCB. All initializations with zero should be +++ performed in 'get_cached_stack'. This way we avoid doing this if +++ the stack freshly allocated with 'mmap'. */ +++ +++#ifdef TLS_TCB_AT_TP +++ /* Reference to the TCB itself. */ +++ pd->header.self = pd; +++ +++ /* Self-reference for TLS. */ +++ pd->header.tcb = pd; +++#endif +++ +++ /* Store the address of the start routine and the parameter. Since +++ we do not start the function directly the stillborn thread will +++ get the information from its thread descriptor. */ +++ pd->start_routine = start_routine; +++ pd->arg = arg; +++ +++ /* Copy the thread attribute flags. */ +++ struct pthread *self = THREAD_SELF; +++ pd->flags = ((iattr->flags & ~(ATTR_FLAG_SCHED_SET | ATTR_FLAG_POLICY_SET)) +++ | (self->flags & (ATTR_FLAG_SCHED_SET | ATTR_FLAG_POLICY_SET))); +++ +++ /* Initialize the field for the ID of the thread which is waiting +++ for us. This is a self-reference in case the thread is created +++ detached. */ +++ pd->joinid = iattr->flags & ATTR_FLAG_DETACHSTATE ? pd : NULL; +++ +++ /* The debug events are inherited from the parent. */ +++ pd->eventbuf = self->eventbuf; +++ +++ +++ /* Copy the parent's scheduling parameters. The flags will say what +++ is valid and what is not. */ +++ pd->schedpolicy = self->schedpolicy; +++ pd->schedparam = self->schedparam; +++ +++#if 1 +++ _FPU_GETCW(pd->fpu_control_init); +++#endif +++ +++ /* Copy the stack guard canary. */ +++#ifdef THREAD_COPY_STACK_GUARD +++ THREAD_COPY_STACK_GUARD (pd); +++#endif +++ +++ /* Copy the pointer guard value. */ +++#ifdef THREAD_COPY_POINTER_GUARD +++ THREAD_COPY_POINTER_GUARD (pd); +++#endif +++ +++#warning scheduling parameters +++#if 0 +++ /* Determine scheduling parameters for the thread. */ +++ if (__builtin_expect ((iattr->flags & ATTR_FLAG_NOTINHERITSCHED) != 0, 0) +++ && (iattr->flags & (ATTR_FLAG_SCHED_SET | ATTR_FLAG_POLICY_SET)) != 0) +++ { +++ INTERNAL_SYSCALL_DECL (scerr); +++ +++ /* Use the scheduling parameters the user provided. */ +++ if (iattr->flags & ATTR_FLAG_POLICY_SET) +++ pd->schedpolicy = iattr->schedpolicy; +++ else if ((pd->flags & ATTR_FLAG_POLICY_SET) == 0) +++ { +++ pd->schedpolicy = INTERNAL_SYSCALL (sched_getscheduler, scerr, 1, 0); +++ pd->flags |= ATTR_FLAG_POLICY_SET; +++ } +++ +++ if (iattr->flags & ATTR_FLAG_SCHED_SET) +++ memcpy (&pd->schedparam, &iattr->schedparam, +++ sizeof (struct sched_param)); +++ else if ((pd->flags & ATTR_FLAG_SCHED_SET) == 0) +++ { +++ INTERNAL_SYSCALL (sched_getparam, scerr, 2, 0, &pd->schedparam); +++ pd->flags |= ATTR_FLAG_SCHED_SET; +++ } +++ +++ /* Check for valid priorities. */ +++ int minprio = INTERNAL_SYSCALL (sched_get_priority_min, scerr, 1, +++ iattr->schedpolicy); +++ int maxprio = INTERNAL_SYSCALL (sched_get_priority_max, scerr, 1, +++ iattr->schedpolicy); +++ if (pd->schedparam.sched_priority < minprio +++ || pd->schedparam.sched_priority > maxprio) +++ { +++ /* Perhaps a thread wants to change the IDs and if waiting +++ for this stillborn thread. */ +++ if (__builtin_expect (atomic_exchange_acq (&pd->setxid_futex, 0) +++ == -2, 0)) +++ lll_futex_wake (&pd->setxid_futex, 1, LLL_PRIVATE); +++ +++ __deallocate_stack (pd); +++ +++ retval = EINVAL; +++ goto out; +++ } +++ } +++#endif +++ +++ /* Pass the descriptor to the caller. */ +++ *newthread = (pthread_t) pd; +++ +++ LIBC_PROBE (pthread_create, 4, newthread, attr, start_routine, arg); +++ +++ /* Start the thread. */ +++ retval = create_thread (pd, iattr, STACK_VARIABLES_ARGS); +++ +++ out: +++ if (__glibc_unlikely (free_cpuset)) +++ free (default_attr.cpuset); +++ +++ return retval; +++} +++versioned_symbol (libpthread, __pthread_create_2_1, pthread_create, GLIBC_2_1); +++ +++ +++#if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_1) +++int +++__pthread_create_2_0 (newthread, attr, start_routine, arg) +++ pthread_t *newthread; +++ const pthread_attr_t *attr; +++ void *(*start_routine) (void *); +++ void *arg; +++{ +++ /* The ATTR attribute is not really of type `pthread_attr_t *'. It has +++ the old size and access to the new members might crash the program. +++ We convert the struct now. */ +++ struct pthread_attr new_attr; +++ +++ if (attr != NULL) +++ { +++ struct pthread_attr *iattr = (struct pthread_attr *) attr; +++ size_t ps = __getpagesize (); +++ +++ /* Copy values from the user-provided attributes. */ +++ new_attr.schedparam = iattr->schedparam; +++ new_attr.schedpolicy = iattr->schedpolicy; +++ new_attr.flags = iattr->flags; +++ +++ /* Fill in default values for the fields not present in the old +++ implementation. */ +++ new_attr.guardsize = ps; +++ new_attr.stackaddr = NULL; +++ new_attr.stacksize = 0; +++ new_attr.cpuset = NULL; +++ +++ /* We will pass this value on to the real implementation. */ +++ attr = (pthread_attr_t *) &new_attr; +++ } +++ +++ return __pthread_create_2_1 (newthread, attr, start_routine, arg); +++} +++compat_symbol (libpthread, __pthread_create_2_0, pthread_create, +++ GLIBC_2_0); +++#endif +++ +++/* Information for libthread_db. */ +++ +++#include "../fbtl_db/db_info.c" +++ +++/* If pthread_create is present, libgcc_eh.a and libsupc++.a expects some other POSIX thread +++ functions to be present as well. */ +++PTHREAD_STATIC_FN_REQUIRE (pthread_mutex_lock) +++PTHREAD_STATIC_FN_REQUIRE (pthread_mutex_trylock) +++PTHREAD_STATIC_FN_REQUIRE (pthread_mutex_unlock) +++ +++PTHREAD_STATIC_FN_REQUIRE (pthread_once) +++PTHREAD_STATIC_FN_REQUIRE (pthread_cancel) +++ +++PTHREAD_STATIC_FN_REQUIRE (pthread_key_create) +++PTHREAD_STATIC_FN_REQUIRE (pthread_key_delete) +++PTHREAD_STATIC_FN_REQUIRE (pthread_setspecific) +++PTHREAD_STATIC_FN_REQUIRE (pthread_getspecific) ++--- /dev/null +++++ b/fbtl/pthread_detach.c ++@@ -0,0 +1,55 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include "pthreadP.h" +++#include +++ +++ +++int +++pthread_detach (pthread_t th) +++{ +++ struct pthread *pd = (struct pthread *) th; +++ +++ /* Make sure the descriptor is valid. */ +++ if (INVALID_NOT_TERMINATED_TD_P (pd)) +++ /* Not a valid thread handle. */ +++ return ESRCH; +++ +++ int result = 0; +++ +++ /* Mark the thread as detached. */ +++ if (atomic_compare_and_exchange_bool_acq (&pd->joinid, pd, NULL)) +++ { +++ /* There are two possibilities here. First, the thread might +++ already be detached. In this case we return EINVAL. +++ Otherwise there might already be a waiter. The standard does +++ not mention what happens in this case. */ +++ if (IS_DETACHED (pd)) +++ result = EINVAL; +++ } +++ else +++ /* Check whether the thread terminated meanwhile. In this case we +++ will just free the TCB. */ +++ if ((pd->cancelhandling & EXITING_BITMASK) != 0) +++ /* Note that the code in __free_tcb makes sure each thread +++ control block is freed only once. */ +++ __free_tcb (pd); +++ +++ return result; +++} ++--- /dev/null +++++ b/fbtl/pthread_equal.c ++@@ -0,0 +1,27 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include "pthreadP.h" +++ +++ +++int +++__pthread_equal (pthread_t thread1, pthread_t thread2) +++{ +++ return thread1 == thread2; +++} +++strong_alias (__pthread_equal, pthread_equal) ++--- /dev/null +++++ b/fbtl/pthread_exit.c ++@@ -0,0 +1,34 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include "pthreadP.h" +++ +++ +++void +++__pthread_exit (void *value) +++{ +++ THREAD_SETMEM (THREAD_SELF, result, value); +++ +++ __do_cancel (); +++} +++strong_alias (__pthread_exit, pthread_exit) +++ +++/* After a thread terminates, __libc_start_main decrements +++ __nptl_nthreads defined in pthread_create.c. */ +++PTHREAD_STATIC_FN_REQUIRE (pthread_create) ++--- /dev/null +++++ b/fbtl/pthread_getattr_default_np.c ++@@ -0,0 +1,37 @@ +++/* Get the default attributes used by pthread_create in the process. +++ 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 +++ . */ +++ +++#include +++#include +++#include +++#include +++ +++int +++pthread_getattr_default_np (pthread_attr_t *out) +++{ +++ struct pthread_attr *real_out; +++ +++ assert (sizeof (*out) >= sizeof (struct pthread_attr)); +++ real_out = (struct pthread_attr *) out; +++ +++ lll_lock (__default_pthread_attr_lock, LLL_PRIVATE); +++ *real_out = __default_pthread_attr; +++ lll_unlock (__default_pthread_attr_lock, LLL_PRIVATE); +++ +++ return 0; +++} ++--- /dev/null +++++ b/fbtl/pthread_getattr_np.c ++@@ -0,0 +1,198 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include "pthreadP.h" +++#include +++#include +++ +++ +++int +++pthread_getattr_np (pthread_t thread_id, pthread_attr_t *attr) +++{ +++ struct pthread *thread = (struct pthread *) thread_id; +++ struct pthread_attr *iattr = (struct pthread_attr *) attr; +++ int ret = 0; +++ +++ lll_lock (thread->lock, LLL_PRIVATE); +++ +++ /* The thread library is responsible for keeping the values in the +++ thread desriptor up-to-date in case the user changes them. */ +++ memcpy (&iattr->schedparam, &thread->schedparam, +++ sizeof (struct sched_param)); +++ iattr->schedpolicy = thread->schedpolicy; +++ +++ /* Clear the flags work. */ +++ iattr->flags = thread->flags; +++ +++ /* The thread might be detached by now. */ +++ if (IS_DETACHED (thread)) +++ iattr->flags |= ATTR_FLAG_DETACHSTATE; +++ +++ /* This is the guardsize after adjusting it. */ +++ iattr->guardsize = thread->reported_guardsize; +++ +++ /* The sizes are subject to alignment. */ +++ if (__glibc_likely (thread->stackblock != NULL)) +++ { +++ iattr->stacksize = thread->stackblock_size; +++ iattr->stackaddr = (char *) thread->stackblock + iattr->stacksize; +++ } +++ else +++ { +++ /* No stack information available. This must be for the initial +++ thread. Get the info in some magical way. */ +++ +++ /* Stack size limit. */ +++ struct rlimit rl; +++ +++ /* The safest way to get the top of the stack is to read +++ /proc/self/maps and locate the line into which +++ __libc_stack_end falls. */ +++ FILE *fp = fopen ("/proc/self/maps", "rce"); +++ if (fp == NULL) +++ ret = errno; +++ /* We need the limit of the stack in any case. */ +++ else +++ { +++ if (getrlimit (RLIMIT_STACK, &rl) != 0) +++ ret = errno; +++ else +++ { +++ /* We consider the main process stack to have ended with +++ the page containing __libc_stack_end. There is stuff below +++ it in the stack too, like the program arguments, environment +++ variables and auxv info, but we ignore those pages when +++ returning size so that the output is consistent when the +++ stack is marked executable due to a loaded DSO requiring +++ it. */ +++ void *stack_end = (void *) ((uintptr_t) __libc_stack_end +++ & -(uintptr_t) GLRO(dl_pagesize)); +++#if _STACK_GROWS_DOWN +++ stack_end += GLRO(dl_pagesize); +++#endif +++ /* We need no locking. */ +++ __fsetlocking (fp, FSETLOCKING_BYCALLER); +++ +++ /* Until we found an entry (which should always be the case) +++ mark the result as a failure. */ +++ ret = ENOENT; +++ +++ char *line = NULL; +++ size_t linelen = 0; +++ uintptr_t last_to = 0; +++ +++ while (! feof_unlocked (fp)) +++ { +++ if (__getdelim (&line, &linelen, '\n', fp) <= 0) +++ break; +++ +++ uintptr_t from; +++ uintptr_t to; +++ if (sscanf (line, "%" SCNxPTR "-%" SCNxPTR, &from, &to) != 2) +++ continue; +++ if (from <= (uintptr_t) __libc_stack_end +++ && (uintptr_t) __libc_stack_end < to) +++ { +++ /* Found the entry. Now we have the info we need. */ +++ iattr->stackaddr = stack_end; +++ iattr->stacksize = +++ rl.rlim_cur - (size_t) (to - (uintptr_t) stack_end); +++ +++ /* Cut it down to align it to page size since otherwise we +++ risk going beyond rlimit when the kernel rounds up the +++ stack extension request. */ +++ iattr->stacksize = (iattr->stacksize +++ & -(intptr_t) GLRO(dl_pagesize)); +++ +++ /* The limit might be too high. */ +++ if ((size_t) iattr->stacksize +++ > (size_t) iattr->stackaddr - last_to) +++ iattr->stacksize = (size_t) iattr->stackaddr - last_to; +++ +++ /* We succeed and no need to look further. */ +++ ret = 0; +++ break; +++ } +++ last_to = to; +++ } +++ +++ free (line); +++ } +++ +++ fclose (fp); +++ } +++ } +++ +++ iattr->flags |= ATTR_FLAG_STACKADDR; +++ +++ if (ret == 0) +++ { +++ size_t size = 16; +++ cpu_set_t *cpuset = NULL; +++ +++ do +++ { +++ size <<= 1; +++ +++ void *newp = realloc (cpuset, size); +++ if (newp == NULL) +++ { +++ ret = ENOMEM; +++ break; +++ } +++ cpuset = (cpu_set_t *) newp; +++#if 1 +++#warning not yet pthread_getaffinity_np +++ ret = ENOSYS; +++#else +++ ret = __pthread_getaffinity_np (thread_id, size, cpuset); +++#endif +++ } +++ /* Pick some ridiculous upper limit. Is 8 million CPUs enough? */ +++ while (ret == EINVAL && size < 1024 * 1024); +++ +++ if (ret == 0) +++ { +++ iattr->cpuset = cpuset; +++ iattr->cpusetsize = size; +++ } +++ else +++ { +++ free (cpuset); +++ if (ret == ENOSYS) +++ { +++ /* There is no such functionality. */ +++ ret = 0; +++ iattr->cpuset = NULL; +++ iattr->cpusetsize = 0; +++ } +++ } +++ } +++ +++ lll_unlock (thread->lock, LLL_PRIVATE); +++ +++ return ret; +++} ++--- /dev/null +++++ b/fbtl/pthread_getconcurrency.c ++@@ -0,0 +1,26 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include "pthreadP.h" +++ +++ +++int +++pthread_getconcurrency (void) +++{ +++ return __concurrency_level; +++} ++--- /dev/null +++++ b/fbtl/pthread_getcpuclockid.c ++@@ -0,0 +1,54 @@ +++/* Copyright (C) 2000-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; see the file COPYING.LIB. If +++ not, see . */ +++ +++#include +++#include +++#include +++#include +++ +++ +++int +++pthread_getcpuclockid (pthread_t threadid, clockid_t *clockid) +++{ +++ struct pthread *pd = (struct pthread *) threadid; +++ +++ /* Make sure the descriptor is valid. */ +++ if (INVALID_TD_P (pd)) +++ /* Not a valid thread handle. */ +++ return ESRCH; +++ +++#ifdef CLOCK_THREAD_CPUTIME_ID +++ /* We need to store the thread ID in the CLOCKID variable together +++ with a number identifying the clock. We reserve the low 3 bits +++ for the clock ID and the rest for the thread ID. This is +++ problematic if the thread ID is too large. But 29 bits should be +++ fine. +++ +++ If some day more clock IDs are needed the ID part can be +++ enlarged. The IDs are entirely internal. */ +++ if (pd->tid >= 1 << (8 * sizeof (*clockid) - CLOCK_IDFIELD_SIZE)) +++ return ERANGE; +++ +++ /* Store the number. */ +++ *clockid = CLOCK_THREAD_CPUTIME_ID | (pd->tid << CLOCK_IDFIELD_SIZE); +++ +++ return 0; +++#else +++ /* We don't have a timer for that. */ +++ return ENOENT; +++#endif +++} ++--- /dev/null +++++ b/fbtl/pthread_getschedparam.c ++@@ -0,0 +1,72 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include "pthreadP.h" +++#include +++ +++ +++int +++__pthread_getschedparam (pthread_t threadid, int *policy, +++ struct sched_param *param) +++{ +++ struct pthread *pd = (struct pthread *) threadid; +++ +++ /* Make sure the descriptor is valid. */ +++ if (INVALID_TD_P (pd)) +++ /* Not a valid thread handle. */ +++ return ESRCH; +++ +++ int result = 0; +++ +++ lll_lock (pd->lock, LLL_PRIVATE); +++ +++ /* The library is responsible for maintaining the values at all +++ times. If the user uses a interface other than +++ pthread_setschedparam to modify the scheduler setting it is not +++ the library's problem. In case the descriptor's values have +++ not yet been retrieved do it now. */ +++ if ((pd->flags & ATTR_FLAG_SCHED_SET) == 0) +++ { +++ if (__sched_getparam (pd->tid, &pd->schedparam) != 0) +++ result = 1; +++ else +++ pd->flags |= ATTR_FLAG_SCHED_SET; +++ } +++ +++ if ((pd->flags & ATTR_FLAG_POLICY_SET) == 0) +++ { +++ pd->schedpolicy = __sched_getscheduler (pd->tid); +++ if (pd->schedpolicy == -1) +++ result = 1; +++ else +++ pd->flags |= ATTR_FLAG_POLICY_SET; +++ } +++ +++ if (result == 0) +++ { +++ *policy = pd->schedpolicy; +++ memcpy (param, &pd->schedparam, sizeof (struct sched_param)); +++ } +++ +++ lll_unlock (pd->lock, LLL_PRIVATE); +++ +++ return result; +++} +++strong_alias (__pthread_getschedparam, pthread_getschedparam) ++--- /dev/null +++++ b/fbtl/pthread_getspecific.c ++@@ -0,0 +1,67 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include "pthreadP.h" +++ +++ +++void * +++__pthread_getspecific (pthread_key_t key) +++{ +++ struct pthread_key_data *data; +++ +++ /* Special case access to the first 2nd-level block. This is the +++ usual case. */ +++ if (__glibc_likely (key < PTHREAD_KEY_2NDLEVEL_SIZE)) +++ data = &THREAD_SELF->specific_1stblock[key]; +++ else +++ { +++ /* Verify the key is sane. */ +++ if (key >= PTHREAD_KEYS_MAX) +++ /* Not valid. */ +++ return NULL; +++ +++ unsigned int idx1st = key / PTHREAD_KEY_2NDLEVEL_SIZE; +++ unsigned int idx2nd = key % PTHREAD_KEY_2NDLEVEL_SIZE; +++ +++ /* If the sequence number doesn't match or the key cannot be defined +++ for this thread since the second level array is not allocated +++ return NULL, too. */ +++ struct pthread_key_data *level2 = THREAD_GETMEM_NC (THREAD_SELF, +++ specific, idx1st); +++ if (level2 == NULL) +++ /* Not allocated, therefore no data. */ +++ return NULL; +++ +++ /* There is data. */ +++ data = &level2[idx2nd]; +++ } +++ +++ void *result = data->data; +++ if (result != NULL) +++ { +++ uintptr_t seq = data->seq; +++ +++ if (__glibc_unlikely (seq != __pthread_keys[key].seq)) +++ result = data->data = NULL; +++ } +++ +++ return result; +++} +++strong_alias (__pthread_getspecific, pthread_getspecific) +++hidden_def (__pthread_getspecific) ++--- /dev/null +++++ b/fbtl/pthread_join.c ++@@ -0,0 +1,117 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++ +++#include +++#include "pthreadP.h" +++ +++#include +++ +++ +++static void +++cleanup (void *arg) +++{ +++ /* If we already changed the waiter ID, reset it. The call cannot +++ fail for any reason but the thread not having done that yet so +++ there is no reason for a loop. */ +++ (void) atomic_compare_and_exchange_bool_acq ((struct pthread **) arg, NULL, +++ THREAD_SELF); +++} +++ +++ +++int +++pthread_join (pthread_t threadid, void **thread_return) +++{ +++ struct pthread *pd = (struct pthread *) threadid; +++ +++ /* Make sure the descriptor is valid. */ +++ if (INVALID_NOT_TERMINATED_TD_P (pd)) +++ /* Not a valid thread handle. */ +++ return ESRCH; +++ +++ /* Is the thread joinable?. */ +++ if (IS_DETACHED (pd)) +++ /* We cannot wait for the thread. */ +++ return EINVAL; +++ +++ struct pthread *self = THREAD_SELF; +++ int result = 0; +++ +++ LIBC_PROBE (pthread_join, 1, threadid); +++ +++ /* During the wait we change to asynchronous cancellation. If we +++ are canceled the thread we are waiting for must be marked as +++ un-wait-ed for again. */ +++ pthread_cleanup_push (cleanup, &pd->joinid); +++ +++ /* Switch to asynchronous cancellation. */ +++ int oldtype = CANCEL_ASYNC (); +++ +++ if ((pd == self +++ || (self->joinid == pd +++ && (pd->cancelhandling +++ & (CANCELING_BITMASK | CANCELED_BITMASK | EXITING_BITMASK +++ | TERMINATED_BITMASK)) == 0)) +++ && !CANCEL_ENABLED_AND_CANCELED (self->cancelhandling)) +++ /* This is a deadlock situation. The threads are waiting for each +++ other to finish. Note that this is a "may" error. To be 100% +++ sure we catch this error we would have to lock the data +++ structures but it is not necessary. In the unlikely case that +++ two threads are really caught in this situation they will +++ deadlock. It is the programmer's problem to figure this +++ out. */ +++ result = EDEADLK; +++ /* Wait for the thread to finish. If it is already locked something +++ is wrong. There can only be one waiter. */ +++ else if (__builtin_expect (atomic_compare_and_exchange_bool_acq (&pd->joinid, +++ self, +++ NULL), 0)) +++ /* There is already somebody waiting for the thread. */ +++ result = EINVAL; +++ else +++ /* Wait for the child. */ +++ lll_wait_tid (pd->ktid); +++ +++ +++ /* Restore cancellation mode. */ +++ CANCEL_RESET (oldtype); +++ +++ /* Remove the handler. */ +++ pthread_cleanup_pop (0); +++ +++ +++ if (__glibc_likely (result == 0)) +++ { +++ /* We mark the thread as terminated and as joined. */ +++ pd->tid = -1; +++ +++ /* Store the return value if the caller is interested. */ +++ if (thread_return != NULL) +++ *thread_return = pd->result; +++ +++ +++ /* Free the TCB. */ +++ __free_tcb (pd); +++ } +++ +++ LIBC_PROBE (pthread_join_ret, 3, threadid, result, pd->result); +++ +++ return result; +++} ++--- /dev/null +++++ b/fbtl/pthread_key_create.c ++@@ -0,0 +1,51 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include "pthreadP.h" +++#include +++ +++ +++int +++__pthread_key_create (pthread_key_t *key, void (*destr) (void *)) +++{ +++ /* Find a slot in __pthread_kyes which is unused. */ +++ for (size_t cnt = 0; cnt < PTHREAD_KEYS_MAX; ++cnt) +++ { +++ uintptr_t seq = __pthread_keys[cnt].seq; +++ +++ if (KEY_UNUSED (seq) && KEY_USABLE (seq) +++ /* We found an unused slot. Try to allocate it. */ +++ && ! atomic_compare_and_exchange_bool_acq (&__pthread_keys[cnt].seq, +++ seq + 1, seq)) +++ { +++ /* Remember the destructor. */ +++ __pthread_keys[cnt].destr = destr; +++ +++ /* Return the key to the caller. */ +++ *key = cnt; +++ +++ /* The call succeeded. */ +++ return 0; +++ } +++ } +++ +++ return EAGAIN; +++} +++strong_alias (__pthread_key_create, pthread_key_create) +++hidden_def (__pthread_key_create) ++--- /dev/null +++++ b/fbtl/pthread_key_delete.c ++@@ -0,0 +1,41 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include "pthreadP.h" +++#include +++ +++ +++int +++pthread_key_delete (pthread_key_t key) +++{ +++ int result = EINVAL; +++ +++ if (__glibc_likely (key < PTHREAD_KEYS_MAX)) +++ { +++ unsigned int seq = __pthread_keys[key].seq; +++ +++ if (__builtin_expect (! KEY_UNUSED (seq), 1) +++ && ! atomic_compare_and_exchange_bool_acq (&__pthread_keys[key].seq, +++ seq + 1, seq)) +++ /* We deleted a valid key. */ +++ result = 0; +++ } +++ +++ return result; +++} ++--- /dev/null +++++ b/fbtl/pthread_kill_other_threads.c ++@@ -0,0 +1,36 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++ +++ +++#ifdef SHARED +++/* This function does not serve a useful purpose in the thread library +++ implementation anymore. It used to be necessary when then kernel +++ could not shut down "processes" but this is not the case anymore. +++ +++ We could theoretically provide an equivalent implementation but +++ this is not necessary since the kernel already does a much better +++ job than we ever could. */ +++void +++__pthread_kill_other_threads_np (void) +++{ +++} +++compat_symbol (libpthread, __pthread_kill_other_threads_np, +++ pthread_kill_other_threads_np, GLIBC_2_0); +++#endif ++--- /dev/null +++++ b/fbtl/pthread_mutex_consistent.c ++@@ -0,0 +1,35 @@ +++/* Copyright (C) 2005-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++ +++ +++int +++pthread_mutex_consistent (pthread_mutex_t *mutex) +++{ +++ /* Test whether this is a robust mutex with a dead owner. */ +++ if ((mutex->__data.__kind & PTHREAD_MUTEX_ROBUST_NORMAL_NP) == 0 +++ || mutex->__data.__owner != PTHREAD_MUTEX_INCONSISTENT) +++ return EINVAL; +++ +++ mutex->__data.__owner = THREAD_GETMEM (THREAD_SELF, tid); +++ +++ return 0; +++} +++weak_alias (pthread_mutex_consistent, pthread_mutex_consistent_np) ++--- /dev/null +++++ b/fbtl/pthread_mutex_destroy.c ++@@ -0,0 +1,40 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include "pthreadP.h" +++ +++#include +++ +++ +++int +++__pthread_mutex_destroy (pthread_mutex_t *mutex) +++{ +++ LIBC_PROBE (mutex_destroy, 1, mutex); +++ +++ if ((mutex->__data.__kind & PTHREAD_MUTEX_ROBUST_NORMAL_NP) == 0 +++ && mutex->__data.__nusers != 0) +++ return EBUSY; +++ +++ /* Set to an invalid value. */ +++ mutex->__data.__kind = -1; +++ +++ return 0; +++} +++strong_alias (__pthread_mutex_destroy, pthread_mutex_destroy) +++hidden_def (__pthread_mutex_destroy) ++--- /dev/null +++++ b/fbtl/pthread_mutex_getprioceiling.c ++@@ -0,0 +1,35 @@ +++/* Get current priority ceiling of pthread_mutex_t. +++ Copyright (C) 2006-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Jakub Jelinek , 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, see +++ . */ +++ +++#include +++#include +++ +++ +++int +++pthread_mutex_getprioceiling (const pthread_mutex_t *mutex, int *prioceiling) +++{ +++ if (__builtin_expect ((mutex->__data.__kind +++ & PTHREAD_MUTEX_PRIO_PROTECT_NP) == 0, 0)) +++ return EINVAL; +++ +++ *prioceiling = (mutex->__data.__lock & PTHREAD_MUTEX_PRIO_CEILING_MASK) +++ >> PTHREAD_MUTEX_PRIO_CEILING_SHIFT; +++ +++ return 0; +++} ++--- /dev/null +++++ b/fbtl/pthread_mutex_init.c ++@@ -0,0 +1,149 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include "pthreadP.h" +++ +++#include +++ +++static const struct pthread_mutexattr default_mutexattr = +++ { +++ /* Default is a normal mutex, not shared between processes. */ +++ .mutexkind = PTHREAD_MUTEX_NORMAL +++ }; +++ +++ +++#ifndef __ASSUME_FUTEX_LOCK_PI +++static int tpi_supported; +++#endif +++ +++ +++int +++__pthread_mutex_init (pthread_mutex_t *mutex, +++ const pthread_mutexattr_t *mutexattr) +++{ +++ const struct pthread_mutexattr *imutexattr; +++ +++ assert (sizeof (pthread_mutex_t) <= __SIZEOF_PTHREAD_MUTEX_T); +++ +++ imutexattr = ((const struct pthread_mutexattr *) mutexattr +++ ?: &default_mutexattr); +++ +++ /* Sanity checks. */ +++ switch (__builtin_expect (imutexattr->mutexkind +++ & PTHREAD_MUTEXATTR_PROTOCOL_MASK, +++ PTHREAD_PRIO_NONE +++ << PTHREAD_MUTEXATTR_PROTOCOL_SHIFT)) +++ { +++ case PTHREAD_PRIO_NONE << PTHREAD_MUTEXATTR_PROTOCOL_SHIFT: +++ break; +++#if 0 +++ case PTHREAD_PRIO_INHERIT << PTHREAD_MUTEXATTR_PROTOCOL_SHIFT: +++#ifndef __ASSUME_FUTEX_LOCK_PI +++ if (__glibc_unlikely (tpi_supported == 0)) +++ { +++ int lock = 0; +++ INTERNAL_SYSCALL_DECL (err); +++ int ret = INTERNAL_SYSCALL (futex, err, 4, &lock, FUTEX_UNLOCK_PI, +++ 0, 0); +++ assert (INTERNAL_SYSCALL_ERROR_P (ret, err)); +++ tpi_supported = INTERNAL_SYSCALL_ERRNO (ret, err) == ENOSYS ? -1 : 1; +++ } +++ if (__glibc_unlikely (tpi_supported < 0)) +++ return ENOTSUP; +++#endif +++ break; +++ +++ default: +++ /* XXX: For now we don't support robust priority protected mutexes. */ +++ if (imutexattr->mutexkind & PTHREAD_MUTEXATTR_FLAG_ROBUST) +++ return ENOTSUP; +++ break; +++#else +++ default: +++ return ENOTSUP; +++#endif +++ } +++ +++ /* Clear the whole variable. */ +++ memset (mutex, '\0', __SIZEOF_PTHREAD_MUTEX_T); +++ +++ /* Copy the values from the attribute. */ +++ mutex->__data.__kind = imutexattr->mutexkind & ~PTHREAD_MUTEXATTR_FLAG_BITS; +++ +++#warning not supported protocols +++#if 0 +++ if ((imutexattr->mutexkind & PTHREAD_MUTEXATTR_FLAG_ROBUST) != 0) +++ { +++#ifndef __ASSUME_SET_ROBUST_LIST +++ if ((imutexattr->mutexkind & PTHREAD_MUTEXATTR_FLAG_PSHARED) != 0 +++ && __set_robust_list_avail < 0) +++ return ENOTSUP; +++#endif +++ +++ mutex->__data.__kind |= PTHREAD_MUTEX_ROBUST_NORMAL_NP; +++ } +++ +++ switch (imutexattr->mutexkind & PTHREAD_MUTEXATTR_PROTOCOL_MASK) +++ { +++ case PTHREAD_PRIO_INHERIT << PTHREAD_MUTEXATTR_PROTOCOL_SHIFT: +++ mutex->__data.__kind |= PTHREAD_MUTEX_PRIO_INHERIT_NP; +++ break; +++ +++ case PTHREAD_PRIO_PROTECT << PTHREAD_MUTEXATTR_PROTOCOL_SHIFT: +++ mutex->__data.__kind |= PTHREAD_MUTEX_PRIO_PROTECT_NP; +++ +++ int ceiling = (imutexattr->mutexkind +++ & PTHREAD_MUTEXATTR_PRIO_CEILING_MASK) +++ >> PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT; +++ if (! ceiling) +++ { +++ if (__sched_fifo_min_prio == -1) +++ __init_sched_fifo_prio (); +++ if (ceiling < __sched_fifo_min_prio) +++ ceiling = __sched_fifo_min_prio; +++ } +++ mutex->__data.__lock = ceiling << PTHREAD_MUTEX_PRIO_CEILING_SHIFT; +++ break; +++ +++ default: +++ break; +++ } +++#endif +++ /* The kernel when waking robust mutexes on exit never uses +++ FUTEX_PRIVATE_FLAG FUTEX_WAKE. */ +++ if ((imutexattr->mutexkind & (PTHREAD_MUTEXATTR_FLAG_PSHARED +++ | PTHREAD_MUTEXATTR_FLAG_ROBUST)) != 0) +++ mutex->__data.__kind |= PTHREAD_MUTEX_PSHARED_BIT; +++ +++ /* Default values: mutex not used yet. */ +++ // mutex->__count = 0; already done by memset +++ // mutex->__owner = 0; already done by memset +++ // mutex->__nusers = 0; already done by memset +++ // mutex->__spins = 0; already done by memset +++ // mutex->__next = NULL; already done by memset +++ +++ LIBC_PROBE (mutex_init, 1, mutex); +++ +++ return 0; +++} +++strong_alias (__pthread_mutex_init, pthread_mutex_init) +++hidden_def (__pthread_mutex_init) ++--- /dev/null +++++ b/fbtl/pthread_mutex_lock.c ++@@ -0,0 +1,504 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include "pthreadP.h" +++#include +++#include +++ +++ +++#ifndef LLL_MUTEX_LOCK +++# define LLL_MUTEX_LOCK(mutex) \ +++ lll_lock ((mutex)->__data.__lock, PTHREAD_MUTEX_PSHARED (mutex)) +++# define LLL_MUTEX_TRYLOCK(mutex) \ +++ lll_trylock ((mutex)->__data.__lock) +++# define LLL_ROBUST_MUTEX_LOCK(mutex, id) \ +++ lll_robust_lock ((mutex)->__data.__lock, id, \ +++ PTHREAD_ROBUST_MUTEX_PSHARED (mutex)) +++#endif +++ +++ +++static int __pthread_mutex_lock_full (pthread_mutex_t *mutex) +++ __attribute_noinline__; +++ +++ +++int +++__pthread_mutex_lock (pthread_mutex_t *mutex) +++{ +++ assert (sizeof (mutex->__size) >= sizeof (mutex->__data)); +++ +++ unsigned int type = PTHREAD_MUTEX_TYPE (mutex); +++ +++ LIBC_PROBE (mutex_entry, 1, mutex); +++ +++ if (__builtin_expect (type & ~PTHREAD_MUTEX_KIND_MASK_NP, 0)) +++ return __pthread_mutex_lock_full (mutex); +++ +++ pid_t id = THREAD_GETMEM (THREAD_SELF, tid); +++ +++ if (__builtin_expect (type, PTHREAD_MUTEX_TIMED_NP) +++ == PTHREAD_MUTEX_TIMED_NP) +++ { +++ simple: +++ /* Normal mutex. */ +++ LLL_MUTEX_LOCK (mutex); +++ assert (mutex->__data.__owner == 0); +++ } +++ else if (__builtin_expect (type == PTHREAD_MUTEX_RECURSIVE_NP, 1)) +++ { +++ /* Recursive mutex. */ +++ +++ /* Check whether we already hold the mutex. */ +++ if (mutex->__data.__owner == id) +++ { +++ /* Just bump the counter. */ +++ if (__glibc_unlikely (mutex->__data.__count + 1 == 0)) +++ /* Overflow of the counter. */ +++ return EAGAIN; +++ +++ ++mutex->__data.__count; +++ +++ return 0; +++ } +++ +++ /* We have to get the mutex. */ +++ LLL_MUTEX_LOCK (mutex); +++ +++ assert (mutex->__data.__owner == 0); +++ mutex->__data.__count = 1; +++ } +++ else if (__builtin_expect (type == PTHREAD_MUTEX_ADAPTIVE_NP, 1)) +++ { +++ if (! __is_smp) +++ goto simple; +++ +++ if (LLL_MUTEX_TRYLOCK (mutex) != 0) +++ { +++ int cnt = 0; +++ int max_cnt = MIN (MAX_ADAPTIVE_COUNT, +++ mutex->__data.__spins * 2 + 10); +++ do +++ { +++ if (cnt++ >= max_cnt) +++ { +++ LLL_MUTEX_LOCK (mutex); +++ break; +++ } +++ +++#ifdef BUSY_WAIT_NOP +++ BUSY_WAIT_NOP; +++#endif +++ } +++ while (LLL_MUTEX_TRYLOCK (mutex) != 0); +++ +++ mutex->__data.__spins += (cnt - mutex->__data.__spins) / 8; +++ } +++ assert (mutex->__data.__owner == 0); +++ } +++ else +++ { +++ assert (type == PTHREAD_MUTEX_ERRORCHECK_NP); +++ /* Check whether we already hold the mutex. */ +++ if (__glibc_unlikely (mutex->__data.__owner == id)) +++ return EDEADLK; +++ goto simple; +++ } +++ +++ /* Record the ownership. */ +++ mutex->__data.__owner = id; +++#ifndef NO_INCR +++ ++mutex->__data.__nusers; +++#endif +++ +++ LIBC_PROBE (mutex_acquired, 1, mutex); +++ +++ return 0; +++} +++ +++static int +++__pthread_mutex_lock_full (pthread_mutex_t *mutex) +++{ +++#if 1 +++ return EINVAL; +++#else +++ int oldval; +++ pid_t id = THREAD_GETMEM (THREAD_SELF, tid); +++ +++ switch (PTHREAD_MUTEX_TYPE (mutex)) +++ { +++ case PTHREAD_MUTEX_ROBUST_RECURSIVE_NP: +++ case PTHREAD_MUTEX_ROBUST_ERRORCHECK_NP: +++ case PTHREAD_MUTEX_ROBUST_NORMAL_NP: +++ case PTHREAD_MUTEX_ROBUST_ADAPTIVE_NP: +++ THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, +++ &mutex->__data.__list.__next); +++ +++ oldval = mutex->__data.__lock; +++ do +++ { +++ again: +++ if ((oldval & FUTEX_OWNER_DIED) != 0) +++ { +++ /* The previous owner died. Try locking the mutex. */ +++ int newval = id; +++#ifdef NO_INCR +++ newval |= FUTEX_WAITERS; +++#else +++ newval |= (oldval & FUTEX_WAITERS); +++#endif +++ +++ newval +++ = atomic_compare_and_exchange_val_acq (&mutex->__data.__lock, +++ newval, oldval); +++ +++ if (newval != oldval) +++ { +++ oldval = newval; +++ goto again; +++ } +++ +++ /* We got the mutex. */ +++ mutex->__data.__count = 1; +++ /* But it is inconsistent unless marked otherwise. */ +++ mutex->__data.__owner = PTHREAD_MUTEX_INCONSISTENT; +++ +++ ENQUEUE_MUTEX (mutex); +++ THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); +++ +++ /* Note that we deliberately exit here. If we fall +++ through to the end of the function __nusers would be +++ incremented which is not correct because the old +++ owner has to be discounted. If we are not supposed +++ to increment __nusers we actually have to decrement +++ it here. */ +++#ifdef NO_INCR +++ --mutex->__data.__nusers; +++#endif +++ +++ return EOWNERDEAD; +++ } +++ +++ /* Check whether we already hold the mutex. */ +++ if (__glibc_unlikely ((oldval & FUTEX_TID_MASK) == id)) +++ { +++ int kind = PTHREAD_MUTEX_TYPE (mutex); +++ if (kind == PTHREAD_MUTEX_ROBUST_ERRORCHECK_NP) +++ { +++ THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, +++ NULL); +++ return EDEADLK; +++ } +++ +++ if (kind == PTHREAD_MUTEX_ROBUST_RECURSIVE_NP) +++ { +++ THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, +++ NULL); +++ +++ /* Just bump the counter. */ +++ if (__glibc_unlikely (mutex->__data.__count + 1 == 0)) +++ /* Overflow of the counter. */ +++ return EAGAIN; +++ +++ ++mutex->__data.__count; +++ +++ return 0; +++ } +++ } +++ +++ oldval = LLL_ROBUST_MUTEX_LOCK (mutex, id); +++ +++ if (__builtin_expect (mutex->__data.__owner +++ == PTHREAD_MUTEX_NOTRECOVERABLE, 0)) +++ { +++ /* This mutex is now not recoverable. */ +++ mutex->__data.__count = 0; +++ lll_unlock (mutex->__data.__lock, +++ PTHREAD_ROBUST_MUTEX_PSHARED (mutex)); +++ THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); +++ return ENOTRECOVERABLE; +++ } +++ } +++ while ((oldval & FUTEX_OWNER_DIED) != 0); +++ +++ mutex->__data.__count = 1; +++ ENQUEUE_MUTEX (mutex); +++ THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); +++ break; +++ +++ case PTHREAD_MUTEX_PI_RECURSIVE_NP: +++ case PTHREAD_MUTEX_PI_ERRORCHECK_NP: +++ case PTHREAD_MUTEX_PI_NORMAL_NP: +++ case PTHREAD_MUTEX_PI_ADAPTIVE_NP: +++ case PTHREAD_MUTEX_PI_ROBUST_RECURSIVE_NP: +++ case PTHREAD_MUTEX_PI_ROBUST_ERRORCHECK_NP: +++ case PTHREAD_MUTEX_PI_ROBUST_NORMAL_NP: +++ case PTHREAD_MUTEX_PI_ROBUST_ADAPTIVE_NP: +++ { +++ int kind = mutex->__data.__kind & PTHREAD_MUTEX_KIND_MASK_NP; +++ int robust = mutex->__data.__kind & PTHREAD_MUTEX_ROBUST_NORMAL_NP; +++ +++ if (robust) +++ /* Note: robust PI futexes are signaled by setting bit 0. */ +++ THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, +++ (void *) (((uintptr_t) &mutex->__data.__list.__next) +++ | 1)); +++ +++ oldval = mutex->__data.__lock; +++ +++ /* Check whether we already hold the mutex. */ +++ if (__glibc_unlikely ((oldval & FUTEX_TID_MASK) == id)) +++ { +++ if (kind == PTHREAD_MUTEX_ERRORCHECK_NP) +++ { +++ THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); +++ return EDEADLK; +++ } +++ +++ if (kind == PTHREAD_MUTEX_RECURSIVE_NP) +++ { +++ THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); +++ +++ /* Just bump the counter. */ +++ if (__glibc_unlikely (mutex->__data.__count + 1 == 0)) +++ /* Overflow of the counter. */ +++ return EAGAIN; +++ +++ ++mutex->__data.__count; +++ +++ return 0; +++ } +++ } +++ +++ int newval = id; +++#ifdef NO_INCR +++ newval |= FUTEX_WAITERS; +++#endif +++ oldval = atomic_compare_and_exchange_val_acq (&mutex->__data.__lock, +++ newval, 0); +++ +++ if (oldval != 0) +++ { +++ /* The mutex is locked. The kernel will now take care of +++ everything. */ +++ int private = (robust +++ ? PTHREAD_ROBUST_MUTEX_PSHARED (mutex) +++ : PTHREAD_MUTEX_PSHARED (mutex)); +++ INTERNAL_SYSCALL_DECL (__err); +++ int e = INTERNAL_SYSCALL (futex, __err, 4, &mutex->__data.__lock, +++ __lll_private_flag (FUTEX_LOCK_PI, +++ private), 1, 0); +++ +++ if (INTERNAL_SYSCALL_ERROR_P (e, __err) +++ && (INTERNAL_SYSCALL_ERRNO (e, __err) == ESRCH +++ || INTERNAL_SYSCALL_ERRNO (e, __err) == EDEADLK)) +++ { +++ assert (INTERNAL_SYSCALL_ERRNO (e, __err) != EDEADLK +++ || (kind != PTHREAD_MUTEX_ERRORCHECK_NP +++ && kind != PTHREAD_MUTEX_RECURSIVE_NP)); +++ /* ESRCH can happen only for non-robust PI mutexes where +++ the owner of the lock died. */ +++ assert (INTERNAL_SYSCALL_ERRNO (e, __err) != ESRCH || !robust); +++ +++ /* Delay the thread indefinitely. */ +++ while (1) +++ pause_not_cancel (); +++ } +++ +++ oldval = mutex->__data.__lock; +++ +++ assert (robust || (oldval & FUTEX_OWNER_DIED) == 0); +++ } +++ +++ if (__glibc_unlikely (oldval & FUTEX_OWNER_DIED)) +++ { +++ atomic_and (&mutex->__data.__lock, ~FUTEX_OWNER_DIED); +++ +++ /* We got the mutex. */ +++ mutex->__data.__count = 1; +++ /* But it is inconsistent unless marked otherwise. */ +++ mutex->__data.__owner = PTHREAD_MUTEX_INCONSISTENT; +++ +++ ENQUEUE_MUTEX_PI (mutex); +++ THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); +++ +++ /* Note that we deliberately exit here. If we fall +++ through to the end of the function __nusers would be +++ incremented which is not correct because the old owner +++ has to be discounted. If we are not supposed to +++ increment __nusers we actually have to decrement it here. */ +++#ifdef NO_INCR +++ --mutex->__data.__nusers; +++#endif +++ +++ return EOWNERDEAD; +++ } +++ +++ if (robust +++ && __builtin_expect (mutex->__data.__owner +++ == PTHREAD_MUTEX_NOTRECOVERABLE, 0)) +++ { +++ /* This mutex is now not recoverable. */ +++ mutex->__data.__count = 0; +++ +++ INTERNAL_SYSCALL_DECL (__err); +++ INTERNAL_SYSCALL (futex, __err, 4, &mutex->__data.__lock, +++ __lll_private_flag (FUTEX_UNLOCK_PI, +++ PTHREAD_ROBUST_MUTEX_PSHARED (mutex)), +++ 0, 0); +++ +++ THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); +++ return ENOTRECOVERABLE; +++ } +++ +++ mutex->__data.__count = 1; +++ if (robust) +++ { +++ ENQUEUE_MUTEX_PI (mutex); +++ THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); +++ } +++ } +++ break; +++ +++ case PTHREAD_MUTEX_PP_RECURSIVE_NP: +++ case PTHREAD_MUTEX_PP_ERRORCHECK_NP: +++ case PTHREAD_MUTEX_PP_NORMAL_NP: +++ case PTHREAD_MUTEX_PP_ADAPTIVE_NP: +++ { +++ int kind = mutex->__data.__kind & PTHREAD_MUTEX_KIND_MASK_NP; +++ +++ oldval = mutex->__data.__lock; +++ +++ /* Check whether we already hold the mutex. */ +++ if (mutex->__data.__owner == id) +++ { +++ if (kind == PTHREAD_MUTEX_ERRORCHECK_NP) +++ return EDEADLK; +++ +++ if (kind == PTHREAD_MUTEX_RECURSIVE_NP) +++ { +++ /* Just bump the counter. */ +++ if (__glibc_unlikely (mutex->__data.__count + 1 == 0)) +++ /* Overflow of the counter. */ +++ return EAGAIN; +++ +++ ++mutex->__data.__count; +++ +++ return 0; +++ } +++ } +++ +++ int oldprio = -1, ceilval; +++ do +++ { +++ int ceiling = (oldval & PTHREAD_MUTEX_PRIO_CEILING_MASK) +++ >> PTHREAD_MUTEX_PRIO_CEILING_SHIFT; +++ +++ if (__pthread_current_priority () > ceiling) +++ { +++ if (oldprio != -1) +++ __pthread_tpp_change_priority (oldprio, -1); +++ return EINVAL; +++ } +++ +++ int retval = __pthread_tpp_change_priority (oldprio, ceiling); +++ if (retval) +++ return retval; +++ +++ ceilval = ceiling << PTHREAD_MUTEX_PRIO_CEILING_SHIFT; +++ oldprio = ceiling; +++ +++ oldval +++ = atomic_compare_and_exchange_val_acq (&mutex->__data.__lock, +++#ifdef NO_INCR +++ ceilval | 2, +++#else +++ ceilval | 1, +++#endif +++ ceilval); +++ +++ if (oldval == ceilval) +++ break; +++ +++ do +++ { +++ oldval +++ = atomic_compare_and_exchange_val_acq (&mutex->__data.__lock, +++ ceilval | 2, +++ ceilval | 1); +++ +++ if ((oldval & PTHREAD_MUTEX_PRIO_CEILING_MASK) != ceilval) +++ break; +++ +++ if (oldval != ceilval) +++ lll_futex_wait (&mutex->__data.__lock, ceilval | 2, +++ PTHREAD_MUTEX_PSHARED (mutex)); +++ } +++ while (atomic_compare_and_exchange_val_acq (&mutex->__data.__lock, +++ ceilval | 2, ceilval) +++ != ceilval); +++ } +++ while ((oldval & PTHREAD_MUTEX_PRIO_CEILING_MASK) != ceilval); +++ +++ assert (mutex->__data.__owner == 0); +++ mutex->__data.__count = 1; +++ } +++ break; +++ +++ default: +++ /* Correct code cannot set any other type. */ +++ return EINVAL; +++ } +++ +++ /* Record the ownership. */ +++ mutex->__data.__owner = id; +++#ifndef NO_INCR +++ ++mutex->__data.__nusers; +++#endif +++ +++ LIBC_PROBE (mutex_acquired, 1, mutex); +++ +++ return 0; +++#endif +++} +++#ifndef __pthread_mutex_lock +++strong_alias (__pthread_mutex_lock, pthread_mutex_lock) +++hidden_def (__pthread_mutex_lock) +++#endif +++ +++ +++#ifdef NO_INCR +++void +++internal_function +++__pthread_mutex_cond_lock_adjust (pthread_mutex_t *mutex) +++{ +++ assert ((mutex->__data.__kind & PTHREAD_MUTEX_PRIO_INHERIT_NP) != 0); +++ assert ((mutex->__data.__kind & PTHREAD_MUTEX_ROBUST_NORMAL_NP) == 0); +++ assert ((mutex->__data.__kind & PTHREAD_MUTEX_PSHARED_BIT) == 0); +++ +++ /* Record the ownership. */ +++ pid_t id = THREAD_GETMEM (THREAD_SELF, tid); +++ mutex->__data.__owner = id; +++ +++ if (mutex->__data.__kind == PTHREAD_MUTEX_PI_RECURSIVE_NP) +++ ++mutex->__data.__count; +++} +++#endif ++--- /dev/null +++++ b/fbtl/pthread_mutex_setprioceiling.c ++@@ -0,0 +1,116 @@ +++/* Set current priority ceiling of pthread_mutex_t. +++ Copyright (C) 2006-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Jakub Jelinek , 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, see +++ . */ +++ +++#include +++#include +++#include +++ +++ +++int +++pthread_mutex_setprioceiling (pthread_mutex_t *mutex, int prioceiling, +++ int *old_ceiling) +++{ +++ /* The low bits of __kind aren't ever changed after pthread_mutex_init, +++ so we don't need a lock yet. */ +++ if ((mutex->__data.__kind & PTHREAD_MUTEX_PRIO_PROTECT_NP) == 0) +++ return EINVAL; +++ +++ if (__sched_fifo_min_prio == -1) +++ __init_sched_fifo_prio (); +++ +++ if (__builtin_expect (prioceiling < __sched_fifo_min_prio, 0) +++ || __builtin_expect (prioceiling > __sched_fifo_max_prio, 0) +++ || __builtin_expect ((prioceiling +++ & (PTHREAD_MUTEXATTR_PRIO_CEILING_MASK +++ >> PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT)) +++ != prioceiling, 0)) +++ return EINVAL; +++ +++ /* Check whether we already hold the mutex. */ +++ bool locked = false; +++ int kind = PTHREAD_MUTEX_TYPE (mutex); +++ if (mutex->__data.__owner == THREAD_GETMEM (THREAD_SELF, tid)) +++ { +++ if (kind == PTHREAD_MUTEX_PP_ERRORCHECK_NP) +++ return EDEADLK; +++ +++ if (kind == PTHREAD_MUTEX_PP_RECURSIVE_NP) +++ locked = true; +++ } +++ +++ int oldval = mutex->__data.__lock; +++ if (! locked) +++ do +++ { +++ /* Need to lock the mutex, but without obeying the priority +++ protect protocol. */ +++ int ceilval = (oldval & PTHREAD_MUTEX_PRIO_CEILING_MASK); +++ +++ oldval = atomic_compare_and_exchange_val_acq (&mutex->__data.__lock, +++ ceilval | 1, ceilval); +++ if (oldval == ceilval) +++ break; +++ +++ do +++ { +++ oldval +++ = atomic_compare_and_exchange_val_acq (&mutex->__data.__lock, +++ ceilval | 2, +++ ceilval | 1); +++ +++ if ((oldval & PTHREAD_MUTEX_PRIO_CEILING_MASK) != ceilval) +++ break; +++ +++ if (oldval != ceilval) +++ lll_futex_wait (&mutex->__data.__lock, ceilval | 2, +++ PTHREAD_MUTEX_PSHARED (mutex)); +++ } +++ while (atomic_compare_and_exchange_val_acq (&mutex->__data.__lock, +++ ceilval | 2, ceilval) +++ != ceilval); +++ +++ if ((oldval & PTHREAD_MUTEX_PRIO_CEILING_MASK) != ceilval) +++ continue; +++ } +++ while (0); +++ +++ int oldprio = (oldval & PTHREAD_MUTEX_PRIO_CEILING_MASK) +++ >> PTHREAD_MUTEX_PRIO_CEILING_SHIFT; +++ if (locked) +++ { +++ int ret = __pthread_tpp_change_priority (oldprio, prioceiling); +++ if (ret) +++ return ret; +++ } +++ +++ if (old_ceiling != NULL) +++ *old_ceiling = oldprio; +++ +++ int newlock = 0; +++ if (locked) +++ newlock = (mutex->__data.__lock & ~PTHREAD_MUTEX_PRIO_CEILING_MASK); +++ mutex->__data.__lock = newlock +++ | (prioceiling << PTHREAD_MUTEX_PRIO_CEILING_SHIFT); +++ atomic_full_barrier (); +++ +++ lll_futex_wake (&mutex->__data.__lock, INT_MAX, +++ PTHREAD_MUTEX_PSHARED (mutex)); +++ +++ return 0; +++} ++--- /dev/null +++++ b/fbtl/pthread_mutex_timedlock.c ++@@ -0,0 +1,495 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include "pthreadP.h" +++#include +++#include +++ +++#include +++ +++ +++int +++pthread_mutex_timedlock (pthread_mutex_t *mutex, +++ const struct timespec *abstime) +++{ +++ int oldval; +++ pid_t id = THREAD_GETMEM (THREAD_SELF, tid); +++ int result = 0; +++ +++ LIBC_PROBE (mutex_timedlock_entry, 2, mutex, abstime); +++ +++ /* We must not check ABSTIME here. If the thread does not block +++ abstime must not be checked for a valid value. */ +++ +++ switch (__builtin_expect (PTHREAD_MUTEX_TYPE (mutex), +++ PTHREAD_MUTEX_TIMED_NP)) +++ { +++ /* Recursive mutex. */ +++ case PTHREAD_MUTEX_RECURSIVE_NP: +++ /* Check whether we already hold the mutex. */ +++ if (mutex->__data.__owner == id) +++ { +++ /* Just bump the counter. */ +++ if (__glibc_unlikely (mutex->__data.__count + 1 == 0)) +++ /* Overflow of the counter. */ +++ return EAGAIN; +++ +++ ++mutex->__data.__count; +++ +++ goto out; +++ } +++ +++ /* We have to get the mutex. */ +++ result = lll_timedlock (mutex->__data.__lock, abstime, +++ PTHREAD_MUTEX_PSHARED (mutex)); +++ +++ if (result != 0) +++ goto out; +++ +++ /* Only locked once so far. */ +++ mutex->__data.__count = 1; +++ break; +++ +++ /* Error checking mutex. */ +++ case PTHREAD_MUTEX_ERRORCHECK_NP: +++ /* Check whether we already hold the mutex. */ +++ if (__glibc_unlikely (mutex->__data.__owner == id)) +++ return EDEADLK; +++ +++ /* FALLTHROUGH */ +++ +++ case PTHREAD_MUTEX_TIMED_NP: +++ simple: +++ /* Normal mutex. */ +++ result = lll_timedlock (mutex->__data.__lock, abstime, +++ PTHREAD_MUTEX_PSHARED (mutex)); +++ break; +++ +++ case PTHREAD_MUTEX_ADAPTIVE_NP: +++ if (! __is_smp) +++ goto simple; +++ +++ if (lll_trylock (mutex->__data.__lock) != 0) +++ { +++ int cnt = 0; +++ int max_cnt = MIN (MAX_ADAPTIVE_COUNT, +++ mutex->__data.__spins * 2 + 10); +++ do +++ { +++ if (cnt++ >= max_cnt) +++ { +++ result = lll_timedlock (mutex->__data.__lock, abstime, +++ PTHREAD_MUTEX_PSHARED (mutex)); +++ break; +++ } +++ +++#ifdef BUSY_WAIT_NOP +++ BUSY_WAIT_NOP; +++#endif +++ } +++ while (lll_trylock (mutex->__data.__lock) != 0); +++ +++ mutex->__data.__spins += (cnt - mutex->__data.__spins) / 8; +++ } +++ break; +++ +++#if 0 +++ case PTHREAD_MUTEX_ROBUST_RECURSIVE_NP: +++ case PTHREAD_MUTEX_ROBUST_ERRORCHECK_NP: +++ case PTHREAD_MUTEX_ROBUST_NORMAL_NP: +++ case PTHREAD_MUTEX_ROBUST_ADAPTIVE_NP: +++ THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, +++ &mutex->__data.__list.__next); +++ +++ oldval = mutex->__data.__lock; +++ do +++ { +++ again: +++ if ((oldval & FUTEX_OWNER_DIED) != 0) +++ { +++ /* The previous owner died. Try locking the mutex. */ +++ int newval = id | (oldval & FUTEX_WAITERS); +++ +++ newval +++ = atomic_compare_and_exchange_val_acq (&mutex->__data.__lock, +++ newval, oldval); +++ if (newval != oldval) +++ { +++ oldval = newval; +++ goto again; +++ } +++ +++ /* We got the mutex. */ +++ mutex->__data.__count = 1; +++ /* But it is inconsistent unless marked otherwise. */ +++ mutex->__data.__owner = PTHREAD_MUTEX_INCONSISTENT; +++ +++ ENQUEUE_MUTEX (mutex); +++ THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); +++ +++ /* Note that we deliberately exit here. If we fall +++ through to the end of the function __nusers would be +++ incremented which is not correct because the old +++ owner has to be discounted. */ +++ return EOWNERDEAD; +++ } +++ +++ /* Check whether we already hold the mutex. */ +++ if (__glibc_unlikely ((oldval & FUTEX_TID_MASK) == id)) +++ { +++ int kind = PTHREAD_MUTEX_TYPE (mutex); +++ if (kind == PTHREAD_MUTEX_ROBUST_ERRORCHECK_NP) +++ { +++ THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, +++ NULL); +++ return EDEADLK; +++ } +++ +++ if (kind == PTHREAD_MUTEX_ROBUST_RECURSIVE_NP) +++ { +++ THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, +++ NULL); +++ +++ /* Just bump the counter. */ +++ if (__glibc_unlikely (mutex->__data.__count + 1 == 0)) +++ /* Overflow of the counter. */ +++ return EAGAIN; +++ +++ ++mutex->__data.__count; +++ +++ LIBC_PROBE (mutex_timedlock_acquired, 1, mutex); +++ +++ return 0; +++ } +++ } +++ +++ result = lll_robust_timedlock (mutex->__data.__lock, abstime, id, +++ PTHREAD_ROBUST_MUTEX_PSHARED (mutex)); +++ +++ if (__builtin_expect (mutex->__data.__owner +++ == PTHREAD_MUTEX_NOTRECOVERABLE, 0)) +++ { +++ /* This mutex is now not recoverable. */ +++ mutex->__data.__count = 0; +++ lll_unlock (mutex->__data.__lock, +++ PTHREAD_ROBUST_MUTEX_PSHARED (mutex)); +++ THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); +++ return ENOTRECOVERABLE; +++ } +++ +++ if (result == ETIMEDOUT || result == EINVAL) +++ goto out; +++ +++ oldval = result; +++ } +++ while ((oldval & FUTEX_OWNER_DIED) != 0); +++ +++ mutex->__data.__count = 1; +++ ENQUEUE_MUTEX (mutex); +++ THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); +++ break; +++ +++ case PTHREAD_MUTEX_PI_RECURSIVE_NP: +++ case PTHREAD_MUTEX_PI_ERRORCHECK_NP: +++ case PTHREAD_MUTEX_PI_NORMAL_NP: +++ case PTHREAD_MUTEX_PI_ADAPTIVE_NP: +++ case PTHREAD_MUTEX_PI_ROBUST_RECURSIVE_NP: +++ case PTHREAD_MUTEX_PI_ROBUST_ERRORCHECK_NP: +++ case PTHREAD_MUTEX_PI_ROBUST_NORMAL_NP: +++ case PTHREAD_MUTEX_PI_ROBUST_ADAPTIVE_NP: +++ { +++ int kind = mutex->__data.__kind & PTHREAD_MUTEX_KIND_MASK_NP; +++ int robust = mutex->__data.__kind & PTHREAD_MUTEX_ROBUST_NORMAL_NP; +++ +++ if (robust) +++ /* Note: robust PI futexes are signaled by setting bit 0. */ +++ THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, +++ (void *) (((uintptr_t) &mutex->__data.__list.__next) +++ | 1)); +++ +++ oldval = mutex->__data.__lock; +++ +++ /* Check whether we already hold the mutex. */ +++ if (__glibc_unlikely ((oldval & FUTEX_TID_MASK) == id)) +++ { +++ if (kind == PTHREAD_MUTEX_ERRORCHECK_NP) +++ { +++ THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); +++ return EDEADLK; +++ } +++ +++ if (kind == PTHREAD_MUTEX_RECURSIVE_NP) +++ { +++ THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); +++ +++ /* Just bump the counter. */ +++ if (__glibc_unlikely (mutex->__data.__count + 1 == 0)) +++ /* Overflow of the counter. */ +++ return EAGAIN; +++ +++ ++mutex->__data.__count; +++ +++ LIBC_PROBE (mutex_timedlock_acquired, 1, mutex); +++ +++ return 0; +++ } +++ } +++ +++ oldval = atomic_compare_and_exchange_val_acq (&mutex->__data.__lock, +++ id, 0); +++ +++ if (oldval != 0) +++ { +++ /* The mutex is locked. The kernel will now take care of +++ everything. The timeout value must be a relative value. +++ Convert it. */ +++ int private = (robust +++ ? PTHREAD_ROBUST_MUTEX_PSHARED (mutex) +++ : PTHREAD_MUTEX_PSHARED (mutex)); +++ INTERNAL_SYSCALL_DECL (__err); +++ +++ int e = INTERNAL_SYSCALL (futex, __err, 4, &mutex->__data.__lock, +++ __lll_private_flag (FUTEX_LOCK_PI, +++ private), 1, +++ abstime); +++ if (INTERNAL_SYSCALL_ERROR_P (e, __err)) +++ { +++ if (INTERNAL_SYSCALL_ERRNO (e, __err) == ETIMEDOUT) +++ return ETIMEDOUT; +++ +++ if (INTERNAL_SYSCALL_ERRNO (e, __err) == ESRCH +++ || INTERNAL_SYSCALL_ERRNO (e, __err) == EDEADLK) +++ { +++ assert (INTERNAL_SYSCALL_ERRNO (e, __err) != EDEADLK +++ || (kind != PTHREAD_MUTEX_ERRORCHECK_NP +++ && kind != PTHREAD_MUTEX_RECURSIVE_NP)); +++ /* ESRCH can happen only for non-robust PI mutexes where +++ the owner of the lock died. */ +++ assert (INTERNAL_SYSCALL_ERRNO (e, __err) != ESRCH +++ || !robust); +++ +++ /* Delay the thread until the timeout is reached. +++ Then return ETIMEDOUT. */ +++ struct timespec reltime; +++ struct timespec now; +++ +++ INTERNAL_SYSCALL (clock_gettime, __err, 2, CLOCK_REALTIME, +++ &now); +++ reltime.tv_sec = abstime->tv_sec - now.tv_sec; +++ reltime.tv_nsec = abstime->tv_nsec - now.tv_nsec; +++ if (reltime.tv_nsec < 0) +++ { +++ reltime.tv_nsec += 1000000000; +++ --reltime.tv_sec; +++ } +++ if (reltime.tv_sec >= 0) +++ while (nanosleep_not_cancel (&reltime, &reltime) != 0) +++ continue; +++ +++ return ETIMEDOUT; +++ } +++ +++ return INTERNAL_SYSCALL_ERRNO (e, __err); +++ } +++ +++ oldval = mutex->__data.__lock; +++ +++ assert (robust || (oldval & FUTEX_OWNER_DIED) == 0); +++ } +++ +++ if (__glibc_unlikely (oldval & FUTEX_OWNER_DIED)) +++ { +++ atomic_and (&mutex->__data.__lock, ~FUTEX_OWNER_DIED); +++ +++ /* We got the mutex. */ +++ mutex->__data.__count = 1; +++ /* But it is inconsistent unless marked otherwise. */ +++ mutex->__data.__owner = PTHREAD_MUTEX_INCONSISTENT; +++ +++ ENQUEUE_MUTEX_PI (mutex); +++ THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); +++ +++ /* Note that we deliberately exit here. If we fall +++ through to the end of the function __nusers would be +++ incremented which is not correct because the old owner +++ has to be discounted. */ +++ return EOWNERDEAD; +++ } +++ +++ if (robust +++ && __builtin_expect (mutex->__data.__owner +++ == PTHREAD_MUTEX_NOTRECOVERABLE, 0)) +++ { +++ /* This mutex is now not recoverable. */ +++ mutex->__data.__count = 0; +++ +++ INTERNAL_SYSCALL_DECL (__err); +++ INTERNAL_SYSCALL (futex, __err, 4, &mutex->__data.__lock, +++ __lll_private_flag (FUTEX_UNLOCK_PI, +++ PTHREAD_ROBUST_MUTEX_PSHARED (mutex)), +++ 0, 0); +++ +++ THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); +++ return ENOTRECOVERABLE; +++ } +++ +++ mutex->__data.__count = 1; +++ if (robust) +++ { +++ ENQUEUE_MUTEX_PI (mutex); +++ THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); +++ } +++ } +++ break; +++ +++ case PTHREAD_MUTEX_PP_RECURSIVE_NP: +++ case PTHREAD_MUTEX_PP_ERRORCHECK_NP: +++ case PTHREAD_MUTEX_PP_NORMAL_NP: +++ case PTHREAD_MUTEX_PP_ADAPTIVE_NP: +++ { +++ int kind = mutex->__data.__kind & PTHREAD_MUTEX_KIND_MASK_NP; +++ +++ oldval = mutex->__data.__lock; +++ +++ /* Check whether we already hold the mutex. */ +++ if (mutex->__data.__owner == id) +++ { +++ if (kind == PTHREAD_MUTEX_ERRORCHECK_NP) +++ return EDEADLK; +++ +++ if (kind == PTHREAD_MUTEX_RECURSIVE_NP) +++ { +++ /* Just bump the counter. */ +++ if (__glibc_unlikely (mutex->__data.__count + 1 == 0)) +++ /* Overflow of the counter. */ +++ return EAGAIN; +++ +++ ++mutex->__data.__count; +++ +++ LIBC_PROBE (mutex_timedlock_acquired, 1, mutex); +++ +++ return 0; +++ } +++ } +++ +++ int oldprio = -1, ceilval; +++ do +++ { +++ int ceiling = (oldval & PTHREAD_MUTEX_PRIO_CEILING_MASK) +++ >> PTHREAD_MUTEX_PRIO_CEILING_SHIFT; +++ +++ if (__pthread_current_priority () > ceiling) +++ { +++ result = EINVAL; +++ failpp: +++ if (oldprio != -1) +++ __pthread_tpp_change_priority (oldprio, -1); +++ return result; +++ } +++ +++ result = __pthread_tpp_change_priority (oldprio, ceiling); +++ if (result) +++ return result; +++ +++ ceilval = ceiling << PTHREAD_MUTEX_PRIO_CEILING_SHIFT; +++ oldprio = ceiling; +++ +++ oldval +++ = atomic_compare_and_exchange_val_acq (&mutex->__data.__lock, +++ ceilval | 1, ceilval); +++ +++ if (oldval == ceilval) +++ break; +++ +++ do +++ { +++ oldval +++ = atomic_compare_and_exchange_val_acq (&mutex->__data.__lock, +++ ceilval | 2, +++ ceilval | 1); +++ +++ if ((oldval & PTHREAD_MUTEX_PRIO_CEILING_MASK) != ceilval) +++ break; +++ +++ if (oldval != ceilval) +++ { +++ /* Reject invalid timeouts. */ +++ if (abstime->tv_nsec < 0 || abstime->tv_nsec >= 1000000000) +++ { +++ result = EINVAL; +++ goto failpp; +++ } +++ +++ struct timeval tv; +++ struct timespec rt; +++ +++ /* Get the current time. */ +++ (void) __gettimeofday (&tv, NULL); +++ +++ /* Compute relative timeout. */ +++ rt.tv_sec = abstime->tv_sec - tv.tv_sec; +++ rt.tv_nsec = abstime->tv_nsec - tv.tv_usec * 1000; +++ if (rt.tv_nsec < 0) +++ { +++ rt.tv_nsec += 1000000000; +++ --rt.tv_sec; +++ } +++ +++ /* Already timed out? */ +++ if (rt.tv_sec < 0) +++ { +++ result = ETIMEDOUT; +++ goto failpp; +++ } +++ +++ lll_futex_timed_wait (&mutex->__data.__lock, +++ ceilval | 2, &rt, +++ PTHREAD_MUTEX_PSHARED (mutex)); +++ } +++ } +++ while (atomic_compare_and_exchange_val_acq (&mutex->__data.__lock, +++ ceilval | 2, ceilval) +++ != ceilval); +++ } +++ while ((oldval & PTHREAD_MUTEX_PRIO_CEILING_MASK) != ceilval); +++ +++ assert (mutex->__data.__owner == 0); +++ mutex->__data.__count = 1; +++ } +++ break; +++#endif +++ default: +++ /* Correct code cannot set any other type. */ +++ return EINVAL; +++ } +++ +++ if (result == 0) +++ { +++ /* Record the ownership. */ +++ mutex->__data.__owner = id; +++ ++mutex->__data.__nusers; +++ +++ LIBC_PROBE (mutex_timedlock_acquired, 1, mutex); +++ } +++ +++ out: +++ return result; +++} ++--- /dev/null +++++ b/fbtl/pthread_mutex_trylock.c ++@@ -0,0 +1,380 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include "pthreadP.h" +++#include +++ +++ +++int +++__pthread_mutex_trylock (pthread_mutex_t *mutex) +++{ +++ int oldval; +++ pid_t id = THREAD_GETMEM (THREAD_SELF, tid); +++ +++ switch (__builtin_expect (PTHREAD_MUTEX_TYPE (mutex), +++ PTHREAD_MUTEX_TIMED_NP)) +++ { +++ /* Recursive mutex. */ +++ case PTHREAD_MUTEX_RECURSIVE_NP: +++ /* Check whether we already hold the mutex. */ +++ if (mutex->__data.__owner == id) +++ { +++ /* Just bump the counter. */ +++ if (__glibc_unlikely (mutex->__data.__count + 1 == 0)) +++ /* Overflow of the counter. */ +++ return EAGAIN; +++ +++ ++mutex->__data.__count; +++ return 0; +++ } +++ +++ if (lll_trylock (mutex->__data.__lock) == 0) +++ { +++ /* Record the ownership. */ +++ mutex->__data.__owner = id; +++ mutex->__data.__count = 1; +++ ++mutex->__data.__nusers; +++ return 0; +++ } +++ break; +++ +++ case PTHREAD_MUTEX_ERRORCHECK_NP: +++ case PTHREAD_MUTEX_TIMED_NP: +++ case PTHREAD_MUTEX_ADAPTIVE_NP: +++ /* Normal mutex. */ +++ if (lll_trylock (mutex->__data.__lock) != 0) +++ break; +++ +++ /* Record the ownership. */ +++ mutex->__data.__owner = id; +++ ++mutex->__data.__nusers; +++ +++ return 0; +++#if 0 +++ case PTHREAD_MUTEX_ROBUST_RECURSIVE_NP: +++ case PTHREAD_MUTEX_ROBUST_ERRORCHECK_NP: +++ case PTHREAD_MUTEX_ROBUST_NORMAL_NP: +++ case PTHREAD_MUTEX_ROBUST_ADAPTIVE_NP: +++ THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, +++ &mutex->__data.__list.__next); +++ +++ oldval = mutex->__data.__lock; +++ do +++ { +++ again: +++ if ((oldval & FUTEX_OWNER_DIED) != 0) +++ { +++ /* The previous owner died. Try locking the mutex. */ +++ int newval = id | (oldval & FUTEX_WAITERS); +++ +++ newval +++ = atomic_compare_and_exchange_val_acq (&mutex->__data.__lock, +++ newval, oldval); +++ +++ if (newval != oldval) +++ { +++ oldval = newval; +++ goto again; +++ } +++ +++ /* We got the mutex. */ +++ mutex->__data.__count = 1; +++ /* But it is inconsistent unless marked otherwise. */ +++ mutex->__data.__owner = PTHREAD_MUTEX_INCONSISTENT; +++ +++ ENQUEUE_MUTEX (mutex); +++ THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); +++ +++ /* Note that we deliberately exist here. If we fall +++ through to the end of the function __nusers would be +++ incremented which is not correct because the old +++ owner has to be discounted. */ +++ return EOWNERDEAD; +++ } +++ +++ /* Check whether we already hold the mutex. */ +++ if (__glibc_unlikely ((oldval & FUTEX_TID_MASK) == id)) +++ { +++ int kind = PTHREAD_MUTEX_TYPE (mutex); +++ if (kind == PTHREAD_MUTEX_ROBUST_ERRORCHECK_NP) +++ { +++ THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, +++ NULL); +++ return EDEADLK; +++ } +++ +++ if (kind == PTHREAD_MUTEX_ROBUST_RECURSIVE_NP) +++ { +++ THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, +++ NULL); +++ +++ /* Just bump the counter. */ +++ if (__glibc_unlikely (mutex->__data.__count + 1 == 0)) +++ /* Overflow of the counter. */ +++ return EAGAIN; +++ +++ ++mutex->__data.__count; +++ +++ return 0; +++ } +++ } +++ +++ oldval = lll_robust_trylock (mutex->__data.__lock, id); +++ if (oldval != 0 && (oldval & FUTEX_OWNER_DIED) == 0) +++ { +++ THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); +++ +++ return EBUSY; +++ } +++ +++ if (__builtin_expect (mutex->__data.__owner +++ == PTHREAD_MUTEX_NOTRECOVERABLE, 0)) +++ { +++ /* This mutex is now not recoverable. */ +++ mutex->__data.__count = 0; +++ if (oldval == id) +++ lll_unlock (mutex->__data.__lock, +++ PTHREAD_ROBUST_MUTEX_PSHARED (mutex)); +++ THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); +++ return ENOTRECOVERABLE; +++ } +++ } +++ while ((oldval & FUTEX_OWNER_DIED) != 0); +++ +++ ENQUEUE_MUTEX (mutex); +++ THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); +++ +++ mutex->__data.__owner = id; +++ ++mutex->__data.__nusers; +++ mutex->__data.__count = 1; +++ +++ return 0; +++ +++ case PTHREAD_MUTEX_PI_RECURSIVE_NP: +++ case PTHREAD_MUTEX_PI_ERRORCHECK_NP: +++ case PTHREAD_MUTEX_PI_NORMAL_NP: +++ case PTHREAD_MUTEX_PI_ADAPTIVE_NP: +++ case PTHREAD_MUTEX_PI_ROBUST_RECURSIVE_NP: +++ case PTHREAD_MUTEX_PI_ROBUST_ERRORCHECK_NP: +++ case PTHREAD_MUTEX_PI_ROBUST_NORMAL_NP: +++ case PTHREAD_MUTEX_PI_ROBUST_ADAPTIVE_NP: +++ { +++ int kind = mutex->__data.__kind & PTHREAD_MUTEX_KIND_MASK_NP; +++ int robust = mutex->__data.__kind & PTHREAD_MUTEX_ROBUST_NORMAL_NP; +++ +++ if (robust) +++ /* Note: robust PI futexes are signaled by setting bit 0. */ +++ THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, +++ (void *) (((uintptr_t) &mutex->__data.__list.__next) +++ | 1)); +++ +++ oldval = mutex->__data.__lock; +++ +++ /* Check whether we already hold the mutex. */ +++ if (__glibc_unlikely ((oldval & FUTEX_TID_MASK) == id)) +++ { +++ if (kind == PTHREAD_MUTEX_ERRORCHECK_NP) +++ { +++ THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); +++ return EDEADLK; +++ } +++ +++ if (kind == PTHREAD_MUTEX_RECURSIVE_NP) +++ { +++ THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); +++ +++ /* Just bump the counter. */ +++ if (__glibc_unlikely (mutex->__data.__count + 1 == 0)) +++ /* Overflow of the counter. */ +++ return EAGAIN; +++ +++ ++mutex->__data.__count; +++ +++ return 0; +++ } +++ } +++ +++ oldval +++ = atomic_compare_and_exchange_val_acq (&mutex->__data.__lock, +++ id, 0); +++ +++ if (oldval != 0) +++ { +++ if ((oldval & FUTEX_OWNER_DIED) == 0) +++ { +++ THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); +++ +++ return EBUSY; +++ } +++ +++ assert (robust); +++ +++ /* The mutex owner died. The kernel will now take care of +++ everything. */ +++ int private = (robust +++ ? PTHREAD_ROBUST_MUTEX_PSHARED (mutex) +++ : PTHREAD_MUTEX_PSHARED (mutex)); +++ INTERNAL_SYSCALL_DECL (__err); +++ int e = INTERNAL_SYSCALL (futex, __err, 4, &mutex->__data.__lock, +++ __lll_private_flag (FUTEX_TRYLOCK_PI, +++ private), 0, 0); +++ +++ if (INTERNAL_SYSCALL_ERROR_P (e, __err) +++ && INTERNAL_SYSCALL_ERRNO (e, __err) == EWOULDBLOCK) +++ { +++ THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); +++ +++ return EBUSY; +++ } +++ +++ oldval = mutex->__data.__lock; +++ } +++ +++ if (__glibc_unlikely (oldval & FUTEX_OWNER_DIED)) +++ { +++ atomic_and (&mutex->__data.__lock, ~FUTEX_OWNER_DIED); +++ +++ /* We got the mutex. */ +++ mutex->__data.__count = 1; +++ /* But it is inconsistent unless marked otherwise. */ +++ mutex->__data.__owner = PTHREAD_MUTEX_INCONSISTENT; +++ +++ ENQUEUE_MUTEX (mutex); +++ THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); +++ +++ /* Note that we deliberately exit here. If we fall +++ through to the end of the function __nusers would be +++ incremented which is not correct because the old owner +++ has to be discounted. */ +++ return EOWNERDEAD; +++ } +++ +++ if (robust +++ && __builtin_expect (mutex->__data.__owner +++ == PTHREAD_MUTEX_NOTRECOVERABLE, 0)) +++ { +++ /* This mutex is now not recoverable. */ +++ mutex->__data.__count = 0; +++ +++ INTERNAL_SYSCALL_DECL (__err); +++ INTERNAL_SYSCALL (futex, __err, 4, &mutex->__data.__lock, +++ __lll_private_flag (FUTEX_UNLOCK_PI, +++ PTHREAD_ROBUST_MUTEX_PSHARED (mutex)), +++ 0, 0); +++ +++ THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); +++ return ENOTRECOVERABLE; +++ } +++ +++ if (robust) +++ { +++ ENQUEUE_MUTEX_PI (mutex); +++ THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); +++ } +++ +++ mutex->__data.__owner = id; +++ ++mutex->__data.__nusers; +++ mutex->__data.__count = 1; +++ +++ return 0; +++ } +++ +++ case PTHREAD_MUTEX_PP_RECURSIVE_NP: +++ case PTHREAD_MUTEX_PP_ERRORCHECK_NP: +++ case PTHREAD_MUTEX_PP_NORMAL_NP: +++ case PTHREAD_MUTEX_PP_ADAPTIVE_NP: +++ { +++ int kind = mutex->__data.__kind & PTHREAD_MUTEX_KIND_MASK_NP; +++ +++ oldval = mutex->__data.__lock; +++ +++ /* Check whether we already hold the mutex. */ +++ if (mutex->__data.__owner == id) +++ { +++ if (kind == PTHREAD_MUTEX_ERRORCHECK_NP) +++ return EDEADLK; +++ +++ if (kind == PTHREAD_MUTEX_RECURSIVE_NP) +++ { +++ /* Just bump the counter. */ +++ if (__glibc_unlikely (mutex->__data.__count + 1 == 0)) +++ /* Overflow of the counter. */ +++ return EAGAIN; +++ +++ ++mutex->__data.__count; +++ +++ return 0; +++ } +++ } +++ +++ int oldprio = -1, ceilval; +++ do +++ { +++ int ceiling = (oldval & PTHREAD_MUTEX_PRIO_CEILING_MASK) +++ >> PTHREAD_MUTEX_PRIO_CEILING_SHIFT; +++ +++ if (__pthread_current_priority () > ceiling) +++ { +++ if (oldprio != -1) +++ __pthread_tpp_change_priority (oldprio, -1); +++ return EINVAL; +++ } +++ +++ int retval = __pthread_tpp_change_priority (oldprio, ceiling); +++ if (retval) +++ return retval; +++ +++ ceilval = ceiling << PTHREAD_MUTEX_PRIO_CEILING_SHIFT; +++ oldprio = ceiling; +++ +++ oldval +++ = atomic_compare_and_exchange_val_acq (&mutex->__data.__lock, +++ ceilval | 1, ceilval); +++ +++ if (oldval == ceilval) +++ break; +++ } +++ while ((oldval & PTHREAD_MUTEX_PRIO_CEILING_MASK) != ceilval); +++ +++ if (oldval != ceilval) +++ { +++ __pthread_tpp_change_priority (oldprio, -1); +++ break; +++ } +++ +++ assert (mutex->__data.__owner == 0); +++ /* Record the ownership. */ +++ mutex->__data.__owner = id; +++ ++mutex->__data.__nusers; +++ mutex->__data.__count = 1; +++ +++ return 0; +++ } +++ break; +++#endif +++ default: +++ /* Correct code cannot set any other type. */ +++ return EINVAL; +++ } +++ +++ return EBUSY; +++} +++strong_alias (__pthread_mutex_trylock, pthread_mutex_trylock) ++--- /dev/null +++++ b/fbtl/pthread_mutex_unlock.c ++@@ -0,0 +1,312 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include "pthreadP.h" +++#include +++#include +++ +++static int +++internal_function +++__pthread_mutex_unlock_full (pthread_mutex_t *mutex, int decr) +++ __attribute_noinline__; +++ +++int +++internal_function attribute_hidden +++__pthread_mutex_unlock_usercnt (pthread_mutex_t *mutex, int decr) +++{ +++ int type = PTHREAD_MUTEX_TYPE (mutex); +++ if (__builtin_expect (type & ~PTHREAD_MUTEX_KIND_MASK_NP, 0)) +++ return __pthread_mutex_unlock_full (mutex, decr); +++ +++ if (__builtin_expect (type, PTHREAD_MUTEX_TIMED_NP) +++ == PTHREAD_MUTEX_TIMED_NP) +++ { +++ /* Always reset the owner field. */ +++ normal: +++ mutex->__data.__owner = 0; +++ if (decr) +++ /* One less user. */ +++ --mutex->__data.__nusers; +++ +++ /* Unlock. */ +++ lll_unlock (mutex->__data.__lock, PTHREAD_MUTEX_PSHARED (mutex)); +++ +++ LIBC_PROBE (mutex_release, 1, mutex); +++ +++ return 0; +++ } +++ else if (__builtin_expect (type == PTHREAD_MUTEX_RECURSIVE_NP, 1)) +++ { +++ /* Recursive mutex. */ +++ if (mutex->__data.__owner != THREAD_GETMEM (THREAD_SELF, tid)) +++ return EPERM; +++ +++ if (--mutex->__data.__count != 0) +++ /* We still hold the mutex. */ +++ return 0; +++ goto normal; +++ } +++ else if (__builtin_expect (type == PTHREAD_MUTEX_ADAPTIVE_NP, 1)) +++ goto normal; +++ else +++ { +++ /* Error checking mutex. */ +++ assert (type == PTHREAD_MUTEX_ERRORCHECK_NP); +++ if (mutex->__data.__owner != THREAD_GETMEM (THREAD_SELF, tid) +++ || ! lll_islocked (mutex->__data.__lock)) +++ return EPERM; +++ goto normal; +++ } +++} +++ +++ +++static int +++internal_function +++__pthread_mutex_unlock_full (pthread_mutex_t *mutex, int decr) +++{ +++#if 1 +++ return EINVAL; +++#else +++ int newowner = 0; +++ +++ switch (PTHREAD_MUTEX_TYPE (mutex)) +++ { +++ case PTHREAD_MUTEX_ROBUST_RECURSIVE_NP: +++ /* Recursive mutex. */ +++ if ((mutex->__data.__lock & FUTEX_TID_MASK) +++ == THREAD_GETMEM (THREAD_SELF, tid) +++ && __builtin_expect (mutex->__data.__owner +++ == PTHREAD_MUTEX_INCONSISTENT, 0)) +++ { +++ if (--mutex->__data.__count != 0) +++ /* We still hold the mutex. */ +++ return ENOTRECOVERABLE; +++ +++ goto notrecoverable; +++ } +++ +++ if (mutex->__data.__owner != THREAD_GETMEM (THREAD_SELF, tid)) +++ return EPERM; +++ +++ if (--mutex->__data.__count != 0) +++ /* We still hold the mutex. */ +++ return 0; +++ +++ goto robust; +++ +++ case PTHREAD_MUTEX_ROBUST_ERRORCHECK_NP: +++ case PTHREAD_MUTEX_ROBUST_NORMAL_NP: +++ case PTHREAD_MUTEX_ROBUST_ADAPTIVE_NP: +++ if ((mutex->__data.__lock & FUTEX_TID_MASK) +++ != THREAD_GETMEM (THREAD_SELF, tid) +++ || ! lll_islocked (mutex->__data.__lock)) +++ return EPERM; +++ +++ /* If the previous owner died and the caller did not succeed in +++ making the state consistent, mark the mutex as unrecoverable +++ and make all waiters. */ +++ if (__builtin_expect (mutex->__data.__owner +++ == PTHREAD_MUTEX_INCONSISTENT, 0)) +++ notrecoverable: +++ newowner = PTHREAD_MUTEX_NOTRECOVERABLE; +++ +++ robust: +++ /* Remove mutex from the list. */ +++ THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, +++ &mutex->__data.__list.__next); +++ DEQUEUE_MUTEX (mutex); +++ +++ mutex->__data.__owner = newowner; +++ if (decr) +++ /* One less user. */ +++ --mutex->__data.__nusers; +++ +++ /* Unlock. */ +++ lll_robust_unlock (mutex->__data.__lock, +++ PTHREAD_ROBUST_MUTEX_PSHARED (mutex)); +++ +++ THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); +++ break; +++ +++ case PTHREAD_MUTEX_PI_RECURSIVE_NP: +++ /* Recursive mutex. */ +++ if (mutex->__data.__owner != THREAD_GETMEM (THREAD_SELF, tid)) +++ return EPERM; +++ +++ if (--mutex->__data.__count != 0) +++ /* We still hold the mutex. */ +++ return 0; +++ goto continue_pi_non_robust; +++ +++ case PTHREAD_MUTEX_PI_ROBUST_RECURSIVE_NP: +++ /* Recursive mutex. */ +++ if ((mutex->__data.__lock & FUTEX_TID_MASK) +++ == THREAD_GETMEM (THREAD_SELF, tid) +++ && __builtin_expect (mutex->__data.__owner +++ == PTHREAD_MUTEX_INCONSISTENT, 0)) +++ { +++ if (--mutex->__data.__count != 0) +++ /* We still hold the mutex. */ +++ return ENOTRECOVERABLE; +++ +++ goto pi_notrecoverable; +++ } +++ +++ if (mutex->__data.__owner != THREAD_GETMEM (THREAD_SELF, tid)) +++ return EPERM; +++ +++ if (--mutex->__data.__count != 0) +++ /* We still hold the mutex. */ +++ return 0; +++ +++ goto continue_pi_robust; +++ +++ case PTHREAD_MUTEX_PI_ERRORCHECK_NP: +++ case PTHREAD_MUTEX_PI_NORMAL_NP: +++ case PTHREAD_MUTEX_PI_ADAPTIVE_NP: +++ case PTHREAD_MUTEX_PI_ROBUST_ERRORCHECK_NP: +++ case PTHREAD_MUTEX_PI_ROBUST_NORMAL_NP: +++ case PTHREAD_MUTEX_PI_ROBUST_ADAPTIVE_NP: +++ if ((mutex->__data.__lock & FUTEX_TID_MASK) +++ != THREAD_GETMEM (THREAD_SELF, tid) +++ || ! lll_islocked (mutex->__data.__lock)) +++ return EPERM; +++ +++ /* If the previous owner died and the caller did not succeed in +++ making the state consistent, mark the mutex as unrecoverable +++ and make all waiters. */ +++ if ((mutex->__data.__kind & PTHREAD_MUTEX_ROBUST_NORMAL_NP) != 0 +++ && __builtin_expect (mutex->__data.__owner +++ == PTHREAD_MUTEX_INCONSISTENT, 0)) +++ pi_notrecoverable: +++ newowner = PTHREAD_MUTEX_NOTRECOVERABLE; +++ +++ if ((mutex->__data.__kind & PTHREAD_MUTEX_ROBUST_NORMAL_NP) != 0) +++ { +++ continue_pi_robust: +++ /* Remove mutex from the list. +++ Note: robust PI futexes are signaled by setting bit 0. */ +++ THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, +++ (void *) (((uintptr_t) &mutex->__data.__list.__next) +++ | 1)); +++ DEQUEUE_MUTEX (mutex); +++ } +++ +++ continue_pi_non_robust: +++ mutex->__data.__owner = newowner; +++ if (decr) +++ /* One less user. */ +++ --mutex->__data.__nusers; +++ +++ /* Unlock. Load all necessary mutex data before releasing the mutex +++ to not violate the mutex destruction requirements (see +++ lll_unlock). */ +++ int robust = mutex->__data.__kind & PTHREAD_MUTEX_ROBUST_NORMAL_NP; +++ int private = (robust +++ ? PTHREAD_ROBUST_MUTEX_PSHARED (mutex) +++ : PTHREAD_MUTEX_PSHARED (mutex)); +++ /* Unlock the mutex using a CAS unless there are futex waiters or our +++ TID is not the value of __lock anymore, in which case we let the +++ kernel take care of the situation. Use release MO in the CAS to +++ synchronize with acquire MO in lock acquisitions. */ +++ int l = atomic_load_relaxed (&mutex->__data.__lock); +++ do +++ { +++ if (((l & FUTEX_WAITERS) != 0) +++ || (l != THREAD_GETMEM (THREAD_SELF, tid))) +++ { +++ INTERNAL_SYSCALL_DECL (__err); +++ INTERNAL_SYSCALL (futex, __err, 2, &mutex->__data.__lock, +++ __lll_private_flag (FUTEX_UNLOCK_PI, private)); +++ break; +++ } +++ } +++ while (!atomic_compare_exchange_weak_release (&mutex->__data.__lock, +++ &l, 0)); +++ +++ THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); +++ break; +++ +++ case PTHREAD_MUTEX_PP_RECURSIVE_NP: +++ /* Recursive mutex. */ +++ if (mutex->__data.__owner != THREAD_GETMEM (THREAD_SELF, tid)) +++ return EPERM; +++ +++ if (--mutex->__data.__count != 0) +++ /* We still hold the mutex. */ +++ return 0; +++ goto pp; +++ +++ case PTHREAD_MUTEX_PP_ERRORCHECK_NP: +++ /* Error checking mutex. */ +++ if (mutex->__data.__owner != THREAD_GETMEM (THREAD_SELF, tid) +++ || (mutex->__data.__lock & ~ PTHREAD_MUTEX_PRIO_CEILING_MASK) == 0) +++ return EPERM; +++ /* FALLTHROUGH */ +++ +++ case PTHREAD_MUTEX_PP_NORMAL_NP: +++ case PTHREAD_MUTEX_PP_ADAPTIVE_NP: +++ /* Always reset the owner field. */ +++ pp: +++ mutex->__data.__owner = 0; +++ +++ if (decr) +++ /* One less user. */ +++ --mutex->__data.__nusers; +++ +++ /* Unlock. */ +++ int newval, oldval; +++ do +++ { +++ oldval = mutex->__data.__lock; +++ newval = oldval & PTHREAD_MUTEX_PRIO_CEILING_MASK; +++ } +++ while (atomic_compare_and_exchange_bool_rel (&mutex->__data.__lock, +++ newval, oldval)); +++ +++ if ((oldval & ~PTHREAD_MUTEX_PRIO_CEILING_MASK) > 1) +++ lll_futex_wake (&mutex->__data.__lock, 1, +++ PTHREAD_MUTEX_PSHARED (mutex)); +++ +++ int oldprio = newval >> PTHREAD_MUTEX_PRIO_CEILING_SHIFT; +++ +++ LIBC_PROBE (mutex_release, 1, mutex); +++ +++ return __pthread_tpp_change_priority (oldprio, -1); +++ +++ default: +++ /* Correct code cannot set any other type. */ +++ return EINVAL; +++ } +++ +++ LIBC_PROBE (mutex_release, 1, mutex); +++ return 0; +++#endif +++} +++ +++ +++int +++__pthread_mutex_unlock (pthread_mutex_t *mutex) +++{ +++ return __pthread_mutex_unlock_usercnt (mutex, 1); +++} +++strong_alias (__pthread_mutex_unlock, pthread_mutex_unlock) +++hidden_def (__pthread_mutex_unlock) ++--- /dev/null +++++ b/fbtl/pthread_mutexattr_destroy.c ++@@ -0,0 +1,27 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++ +++ +++int +++__pthread_mutexattr_destroy (pthread_mutexattr_t *attr) +++{ +++ return 0; +++} +++strong_alias (__pthread_mutexattr_destroy, pthread_mutexattr_destroy) ++--- /dev/null +++++ b/fbtl/pthread_mutexattr_getprioceiling.c ++@@ -0,0 +1,46 @@ +++/* Get priority ceiling setting from pthread_mutexattr_t. +++ Copyright (C) 2006-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Jakub Jelinek , 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, see +++ . */ +++ +++#include +++ +++ +++int +++pthread_mutexattr_getprioceiling (const pthread_mutexattr_t *attr, +++ int *prioceiling) +++{ +++ const struct pthread_mutexattr *iattr; +++ int ceiling; +++ +++ iattr = (const struct pthread_mutexattr *) attr; +++ +++ ceiling = ((iattr->mutexkind & PTHREAD_MUTEXATTR_PRIO_CEILING_MASK) +++ >> PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT); +++ +++ if (! ceiling) +++ { +++ if (__sched_fifo_min_prio == -1) +++ __init_sched_fifo_prio (); +++ if (ceiling < __sched_fifo_min_prio) +++ ceiling = __sched_fifo_min_prio; +++ } +++ +++ *prioceiling = ceiling; +++ +++ return 0; +++} ++--- /dev/null +++++ b/fbtl/pthread_mutexattr_getprotocol.c ++@@ -0,0 +1,34 @@ +++/* Get priority protocol setting from pthread_mutexattr_t. +++ Copyright (C) 2006-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Jakub Jelinek , 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, see +++ . */ +++ +++#include +++ +++ +++int +++pthread_mutexattr_getprotocol (const pthread_mutexattr_t *attr, int *protocol) +++{ +++ const struct pthread_mutexattr *iattr; +++ +++ iattr = (const struct pthread_mutexattr *) attr; +++ +++ *protocol = ((iattr->mutexkind & PTHREAD_MUTEXATTR_PROTOCOL_MASK) +++ >> PTHREAD_MUTEXATTR_PROTOCOL_SHIFT); +++ +++ return 0; +++} ++--- /dev/null +++++ b/fbtl/pthread_mutexattr_getpshared.c ++@@ -0,0 +1,33 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++ +++ +++int +++pthread_mutexattr_getpshared (const pthread_mutexattr_t *attr, int *pshared) +++{ +++ const struct pthread_mutexattr *iattr; +++ +++ iattr = (const struct pthread_mutexattr *) attr; +++ +++ *pshared = ((iattr->mutexkind & PTHREAD_MUTEXATTR_FLAG_PSHARED) != 0 +++ ? PTHREAD_PROCESS_SHARED : PTHREAD_PROCESS_PRIVATE); +++ +++ return 0; +++} ++--- /dev/null +++++ b/fbtl/pthread_mutexattr_getrobust.c ++@@ -0,0 +1,34 @@ +++/* Copyright (C) 2005-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++ +++ +++int +++pthread_mutexattr_getrobust (const pthread_mutexattr_t *attr, int *robustness) +++{ +++ const struct pthread_mutexattr *iattr; +++ +++ iattr = (const struct pthread_mutexattr *) attr; +++ +++ *robustness = ((iattr->mutexkind & PTHREAD_MUTEXATTR_FLAG_ROBUST) != 0 +++ ? PTHREAD_MUTEX_ROBUST_NP : PTHREAD_MUTEX_STALLED_NP); +++ +++ return 0; +++} +++weak_alias (pthread_mutexattr_getrobust, pthread_mutexattr_getrobust_np) ++--- /dev/null +++++ b/fbtl/pthread_mutexattr_gettype.c ++@@ -0,0 +1,33 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++ +++ +++int +++pthread_mutexattr_gettype (const pthread_mutexattr_t *attr, int *kind) +++{ +++ const struct pthread_mutexattr *iattr; +++ +++ iattr = (const struct pthread_mutexattr *) attr; +++ +++ *kind = iattr->mutexkind & ~PTHREAD_MUTEXATTR_FLAG_BITS; +++ +++ return 0; +++} +++weak_alias (pthread_mutexattr_gettype, pthread_mutexattr_getkind_np) ++--- /dev/null +++++ b/fbtl/pthread_mutexattr_init.c ++@@ -0,0 +1,36 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++ +++ +++int +++__pthread_mutexattr_init (pthread_mutexattr_t *attr) +++{ +++ if (sizeof (struct pthread_mutexattr) != sizeof (pthread_mutexattr_t)) +++ memset (attr, '\0', sizeof (*attr)); +++ +++ /* We use bit 31 to signal whether the mutex is going to be +++ process-shared or not. By default it is zero, i.e., the mutex is +++ not process-shared. */ +++ ((struct pthread_mutexattr *) attr)->mutexkind = PTHREAD_MUTEX_NORMAL; +++ +++ return 0; +++} +++strong_alias (__pthread_mutexattr_init, pthread_mutexattr_init) ++--- /dev/null +++++ b/fbtl/pthread_mutexattr_setprioceiling.c ++@@ -0,0 +1,44 @@ +++/* Change priority ceiling setting in pthread_mutexattr_t. +++ Copyright (C) 2006-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Jakub Jelinek , 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, see +++ . */ +++ +++#include +++#include +++ +++ +++int +++pthread_mutexattr_setprioceiling (pthread_mutexattr_t *attr, int prioceiling) +++{ +++ if (__sched_fifo_min_prio == -1) +++ __init_sched_fifo_prio (); +++ +++ if (__builtin_expect (prioceiling < __sched_fifo_min_prio, 0) +++ || __builtin_expect (prioceiling > __sched_fifo_max_prio, 0) +++ || __builtin_expect ((prioceiling +++ & (PTHREAD_MUTEXATTR_PRIO_CEILING_MASK +++ >> PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT)) +++ != prioceiling, 0)) +++ return EINVAL; +++ +++ struct pthread_mutexattr *iattr = (struct pthread_mutexattr *) attr; +++ +++ iattr->mutexkind = ((iattr->mutexkind & ~PTHREAD_MUTEXATTR_PRIO_CEILING_MASK) +++ | (prioceiling << PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT)); +++ +++ return 0; +++} ++--- /dev/null +++++ b/fbtl/pthread_mutexattr_setprotocol.c ++@@ -0,0 +1,38 @@ +++/* Change priority protocol setting in pthread_mutexattr_t. +++ Copyright (C) 2006-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Jakub Jelinek , 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, see +++ . */ +++ +++#include +++#include +++ +++ +++int +++pthread_mutexattr_setprotocol (pthread_mutexattr_t *attr, int protocol) +++{ +++ if (protocol != PTHREAD_PRIO_NONE +++ && protocol != PTHREAD_PRIO_INHERIT +++ && __builtin_expect (protocol != PTHREAD_PRIO_PROTECT, 0)) +++ return EINVAL; +++ +++ struct pthread_mutexattr *iattr = (struct pthread_mutexattr *) attr; +++ +++ iattr->mutexkind = ((iattr->mutexkind & ~PTHREAD_MUTEXATTR_PROTOCOL_MASK) +++ | (protocol << PTHREAD_MUTEXATTR_PROTOCOL_SHIFT)); +++ +++ return 0; +++} ++--- /dev/null +++++ b/fbtl/pthread_mutexattr_setpshared.c ++@@ -0,0 +1,40 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++ +++ +++int +++pthread_mutexattr_setpshared (pthread_mutexattr_t *attr, int pshared) +++{ +++ struct pthread_mutexattr *iattr; +++ +++ if (pshared != PTHREAD_PROCESS_PRIVATE +++ && __builtin_expect (pshared != PTHREAD_PROCESS_SHARED, 0)) +++ return EINVAL; +++ +++ iattr = (struct pthread_mutexattr *) attr; +++ +++ if (pshared == PTHREAD_PROCESS_PRIVATE) +++ iattr->mutexkind &= ~PTHREAD_MUTEXATTR_FLAG_PSHARED; +++ else +++ iattr->mutexkind |= PTHREAD_MUTEXATTR_FLAG_PSHARED; +++ +++ return 0; +++} ++--- /dev/null +++++ b/fbtl/pthread_mutexattr_setrobust.c ++@@ -0,0 +1,41 @@ +++/* Copyright (C) 2005-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++ +++ +++int +++pthread_mutexattr_setrobust (pthread_mutexattr_t *attr, int robustness) +++{ +++ if (robustness != PTHREAD_MUTEX_STALLED_NP +++ && __builtin_expect (robustness != PTHREAD_MUTEX_ROBUST_NP, 0)) +++ return EINVAL; +++ +++ struct pthread_mutexattr *iattr = (struct pthread_mutexattr *) attr; +++ +++ /* We use bit 30 to signal whether the mutex is going to be +++ robust or not. */ +++ if (robustness == PTHREAD_MUTEX_STALLED_NP) +++ iattr->mutexkind &= ~PTHREAD_MUTEXATTR_FLAG_ROBUST; +++ else +++ iattr->mutexkind |= PTHREAD_MUTEXATTR_FLAG_ROBUST; +++ +++ return 0; +++} +++weak_alias (pthread_mutexattr_setrobust, pthread_mutexattr_setrobust_np) ++--- /dev/null +++++ b/fbtl/pthread_mutexattr_settype.c ++@@ -0,0 +1,38 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++ +++ +++int +++__pthread_mutexattr_settype (pthread_mutexattr_t *attr, int kind) +++{ +++ struct pthread_mutexattr *iattr; +++ +++ if (kind < PTHREAD_MUTEX_NORMAL || kind > PTHREAD_MUTEX_ADAPTIVE_NP) +++ return EINVAL; +++ +++ iattr = (struct pthread_mutexattr *) attr; +++ +++ iattr->mutexkind = (iattr->mutexkind & PTHREAD_MUTEXATTR_FLAG_BITS) | kind; +++ +++ return 0; +++} +++weak_alias (__pthread_mutexattr_settype, pthread_mutexattr_setkind_np) +++strong_alias (__pthread_mutexattr_settype, pthread_mutexattr_settype) ++--- /dev/null +++++ b/fbtl/pthread_once.c ++@@ -0,0 +1,54 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include "pthreadP.h" +++#include +++ +++ +++ +++static int once_lock = LLL_LOCK_INITIALIZER; +++ +++ +++int +++__pthread_once (once_control, init_routine) +++ pthread_once_t *once_control; +++ void (*init_routine) (void); +++{ +++ /* XXX Depending on whether the LOCK_IN_ONCE_T is defined use a +++ global lock variable or one which is part of the pthread_once_t +++ object. */ +++ if (*once_control == PTHREAD_ONCE_INIT) +++ { +++ lll_lock (once_lock, LLL_PRIVATE); +++ +++ /* XXX This implementation is not complete. It doesn't take +++ cancelation and fork into account. */ +++ if (*once_control == PTHREAD_ONCE_INIT) +++ { +++ init_routine (); +++ +++ *once_control = !PTHREAD_ONCE_INIT; +++ } +++ +++ lll_unlock (once_lock, LLL_PRIVATE); +++ } +++ +++ return 0; +++} +++strong_alias (__pthread_once, pthread_once) +++hidden_def (__pthread_once) ++--- /dev/null +++++ b/fbtl/pthread_rwlock_destroy.c ++@@ -0,0 +1,31 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include "pthreadP.h" +++#include +++ +++ +++int +++__pthread_rwlock_destroy (pthread_rwlock_t *rwlock) +++{ +++ LIBC_PROBE (rwlock_destroy, 1, rwlock); +++ +++ /* Nothing to be done. For now. */ +++ return 0; +++} +++strong_alias (__pthread_rwlock_destroy, pthread_rwlock_destroy) ++--- /dev/null +++++ b/fbtl/pthread_rwlock_init.c ++@@ -0,0 +1,72 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include "pthreadP.h" +++#include +++#include +++ +++ +++static const struct pthread_rwlockattr default_rwlockattr = +++ { +++ .lockkind = PTHREAD_RWLOCK_DEFAULT_NP, +++ .pshared = PTHREAD_PROCESS_PRIVATE +++ }; +++ +++ +++int +++__pthread_rwlock_init (pthread_rwlock_t *rwlock, +++ const pthread_rwlockattr_t *attr) +++{ +++ const struct pthread_rwlockattr *iattr; +++ +++ iattr = ((const struct pthread_rwlockattr *) attr) ?: &default_rwlockattr; +++ +++ memset (rwlock, '\0', sizeof (*rwlock)); +++ +++ rwlock->__data.__flags +++ = iattr->lockkind == PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP; +++ +++ /* The __SHARED field is computed to minimize the work that needs to +++ be done while handling the futex. There are two inputs: the +++ availability of private futexes and whether the rwlock is shared +++ or private. Unfortunately the value of a private rwlock is +++ fixed: it must be zero. The PRIVATE_FUTEX flag has the value +++ 0x80 in case private futexes are available and zero otherwise. +++ This leads to the following table: +++ +++ | pshared | result +++ | shared private | shared private | +++ ------------+-----------------+-----------------+ +++ !avail 0 | 0 0 | 0 0 | +++ avail 0x80 | 0x80 0 | 0 0x80 | +++ +++ If the pshared value is in locking functions XORed with avail +++ we get the expected result. */ +++#ifdef __ASSUME_PRIVATE_FUTEX +++ rwlock->__data.__shared = (iattr->pshared == PTHREAD_PROCESS_PRIVATE +++ ? 0 : FUTEX_PRIVATE_FLAG); +++#else +++ rwlock->__data.__shared = (iattr->pshared == PTHREAD_PROCESS_PRIVATE +++ ? 0 +++ : THREAD_GETMEM (THREAD_SELF, +++ header.private_futex)); +++#endif +++ +++ return 0; +++} +++strong_alias (__pthread_rwlock_init, pthread_rwlock_init) ++--- /dev/null +++++ b/fbtl/pthread_rwlock_rdlock.c ++@@ -0,0 +1,99 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Martin Schwidefsky , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++/* Acquire read lock for RWLOCK. */ +++int +++__pthread_rwlock_rdlock (pthread_rwlock_t *rwlock) +++{ +++ int result = 0; +++ +++ LIBC_PROBE (rdlock_entry, 1, rwlock); +++ +++ /* Make sure we are alone. */ +++ lll_lock (rwlock->__data.__lock, rwlock->__data.__shared); +++ +++ while (1) +++ { +++ /* Get the rwlock if there is no writer... */ +++ if (rwlock->__data.__writer == 0 +++ /* ...and if either no writer is waiting or we prefer readers. */ +++ && (!rwlock->__data.__nr_writers_queued +++ || PTHREAD_RWLOCK_PREFER_READER_P (rwlock))) +++ { +++ /* Increment the reader counter. Avoid overflow. */ +++ if (__glibc_unlikely (++rwlock->__data.__nr_readers == 0)) +++ { +++ /* Overflow on number of readers. */ +++ --rwlock->__data.__nr_readers; +++ result = EAGAIN; +++ } +++ else +++ LIBC_PROBE (rdlock_acquire_read, 1, rwlock); +++ +++ break; +++ } +++ +++ /* Make sure we are not holding the rwlock as a writer. This is +++ a deadlock situation we recognize and report. */ +++ if (__builtin_expect (rwlock->__data.__writer +++ == THREAD_GETMEM (THREAD_SELF, tid), 0)) +++ { +++ result = EDEADLK; +++ break; +++ } +++ +++ /* Remember that we are a reader. */ +++ if (__glibc_unlikely (++rwlock->__data.__nr_readers_queued == 0)) +++ { +++ /* Overflow on number of queued readers. */ +++ --rwlock->__data.__nr_readers_queued; +++ result = EAGAIN; +++ break; +++ } +++ +++ int waitval = rwlock->__data.__readers_wakeup; +++ +++ /* Free the lock. */ +++ lll_unlock (rwlock->__data.__lock, rwlock->__data.__shared); +++ +++ /* Wait for the writer to finish. */ +++ lll_futex_wait (&rwlock->__data.__readers_wakeup, waitval, +++ rwlock->__data.__shared); +++ +++ /* Get the lock. */ +++ lll_lock (rwlock->__data.__lock, rwlock->__data.__shared); +++ +++ --rwlock->__data.__nr_readers_queued; +++ } +++ +++ /* We are done, free the lock. */ +++ lll_unlock (rwlock->__data.__lock, rwlock->__data.__shared); +++ +++ return result; +++} +++ +++weak_alias (__pthread_rwlock_rdlock, pthread_rwlock_rdlock) +++hidden_def (__pthread_rwlock_rdlock) ++--- /dev/null +++++ b/fbtl/pthread_rwlock_timedrdlock.c ++@@ -0,0 +1,154 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Martin Schwidefsky , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++ +++/* Try to acquire read lock for RWLOCK or return after specfied time. */ +++int +++pthread_rwlock_timedrdlock (pthread_rwlock_t *rwlock, +++ const struct timespec *abstime) +++{ +++ int result = 0; +++ +++ /* Make sure we are alone. */ +++ lll_lock(rwlock->__data.__lock, rwlock->__data.__shared); +++ +++ while (1) +++ { +++ int err; +++ +++ /* Get the rwlock if there is no writer... */ +++ if (rwlock->__data.__writer == 0 +++ /* ...and if either no writer is waiting or we prefer readers. */ +++ && (!rwlock->__data.__nr_writers_queued +++ || PTHREAD_RWLOCK_PREFER_READER_P (rwlock))) +++ { +++ /* Increment the reader counter. Avoid overflow. */ +++ if (++rwlock->__data.__nr_readers == 0) +++ { +++ /* Overflow on number of readers. */ +++ --rwlock->__data.__nr_readers; +++ result = EAGAIN; +++ } +++ +++ break; +++ } +++ +++ /* Make sure we are not holding the rwlock as a writer. This is +++ a deadlock situation we recognize and report. */ +++ if (__builtin_expect (rwlock->__data.__writer +++ == THREAD_GETMEM (THREAD_SELF, tid), 0)) +++ { +++ result = EDEADLK; +++ break; +++ } +++ +++ /* Make sure the passed in timeout value is valid. Ideally this +++ test would be executed once. But since it must not be +++ performed if we would not block at all simply moving the test +++ to the front is no option. Replicating all the code is +++ costly while this test is not. */ +++ if (__builtin_expect (abstime->tv_nsec >= 1000000000 +++ || abstime->tv_nsec < 0, 0)) +++ { +++ result = EINVAL; +++ break; +++ } +++ +++ /* Work around the fact that the kernel rejects negative timeout values +++ despite them being valid. */ +++ if (__glibc_unlikely (abstime->tv_sec < 0)) +++ { +++ result = ETIMEDOUT; +++ break; +++ } +++ +++#if (!defined __ASSUME_FUTEX_CLOCK_REALTIME \ +++ || !defined lll_futex_timed_wait_bitset) +++ /* Get the current time. So far we support only one clock. */ +++ struct timeval tv; +++ (void) __gettimeofday (&tv, NULL); +++ +++ /* Convert the absolute timeout value to a relative timeout. */ +++ struct timespec rt; +++ rt.tv_sec = abstime->tv_sec - tv.tv_sec; +++ rt.tv_nsec = abstime->tv_nsec - tv.tv_usec * 1000; +++ if (rt.tv_nsec < 0) +++ { +++ rt.tv_nsec += 1000000000; +++ --rt.tv_sec; +++ } +++ /* Did we already time out? */ +++ if (rt.tv_sec < 0) +++ { +++ /* Yep, return with an appropriate error. */ +++ result = ETIMEDOUT; +++ break; +++ } +++#endif +++ +++ /* Remember that we are a reader. */ +++ if (++rwlock->__data.__nr_readers_queued == 0) +++ { +++ /* Overflow on number of queued readers. */ +++ --rwlock->__data.__nr_readers_queued; +++ result = EAGAIN; +++ break; +++ } +++ +++ int waitval = rwlock->__data.__readers_wakeup; +++ +++ /* Free the lock. */ +++ lll_unlock (rwlock->__data.__lock, rwlock->__data.__shared); +++ +++ /* Wait for the writer to finish. */ +++#if (!defined __ASSUME_FUTEX_CLOCK_REALTIME \ +++ || !defined lll_futex_timed_wait_bitset) +++ err = lll_futex_timed_wait (&rwlock->__data.__readers_wakeup, +++ waitval, &rt, rwlock->__data.__shared); +++#else +++ err = lll_futex_timed_wait_bitset (&rwlock->__data.__readers_wakeup, +++ waitval, abstime, +++ FUTEX_CLOCK_REALTIME, +++ rwlock->__data.__shared); +++#endif +++ +++ /* Get the lock. */ +++ lll_lock (rwlock->__data.__lock, rwlock->__data.__shared); +++ +++ --rwlock->__data.__nr_readers_queued; +++ +++ /* Did the futex call time out? */ +++ if (err == -ETIMEDOUT) +++ { +++ /* Yep, report it. */ +++ result = ETIMEDOUT; +++ break; +++ } +++ } +++ +++ /* We are done, free the lock. */ +++ lll_unlock (rwlock->__data.__lock, rwlock->__data.__shared); +++ +++ return result; +++} ++--- /dev/null +++++ b/fbtl/pthread_rwlock_timedwrlock.c ++@@ -0,0 +1,145 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Martin Schwidefsky , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++/* Try to acquire write lock for RWLOCK or return after specfied time. */ +++int +++pthread_rwlock_timedwrlock (pthread_rwlock_t *rwlock, +++ const struct timespec *abstime) +++{ +++ int result = 0; +++ +++ /* Make sure we are alone. */ +++ lll_lock (rwlock->__data.__lock, rwlock->__data.__shared); +++ +++ while (1) +++ { +++ int err; +++ +++ /* Get the rwlock if there is no writer and no reader. */ +++ if (rwlock->__data.__writer == 0 && rwlock->__data.__nr_readers == 0) +++ { +++ /* Mark self as writer. */ +++ rwlock->__data.__writer = THREAD_GETMEM (THREAD_SELF, tid); +++ break; +++ } +++ +++ /* Make sure we are not holding the rwlock as a writer. This is +++ a deadlock situation we recognize and report. */ +++ if (__builtin_expect (rwlock->__data.__writer +++ == THREAD_GETMEM (THREAD_SELF, tid), 0)) +++ { +++ result = EDEADLK; +++ break; +++ } +++ +++ /* Make sure the passed in timeout value is valid. Ideally this +++ test would be executed once. But since it must not be +++ performed if we would not block at all simply moving the test +++ to the front is no option. Replicating all the code is +++ costly while this test is not. */ +++ if (__builtin_expect (abstime->tv_nsec >= 1000000000 +++ || abstime->tv_nsec < 0, 0)) +++ { +++ result = EINVAL; +++ break; +++ } +++ +++ /* Work around the fact that the kernel rejects negative timeout values +++ despite them being valid. */ +++ if (__glibc_unlikely (abstime->tv_sec < 0)) +++ { +++ result = ETIMEDOUT; +++ break; +++ } +++ +++#if (!defined __ASSUME_FUTEX_CLOCK_REALTIME \ +++ || !defined lll_futex_timed_wait_bitset) +++ /* Get the current time. So far we support only one clock. */ +++ struct timeval tv; +++ (void) __gettimeofday (&tv, NULL); +++ +++ /* Convert the absolute timeout value to a relative timeout. */ +++ struct timespec rt; +++ rt.tv_sec = abstime->tv_sec - tv.tv_sec; +++ rt.tv_nsec = abstime->tv_nsec - tv.tv_usec * 1000; +++ if (rt.tv_nsec < 0) +++ { +++ rt.tv_nsec += 1000000000; +++ --rt.tv_sec; +++ } +++ /* Did we already time out? */ +++ if (rt.tv_sec < 0) +++ { +++ result = ETIMEDOUT; +++ break; +++ } +++#endif +++ +++ /* Remember that we are a writer. */ +++ if (++rwlock->__data.__nr_writers_queued == 0) +++ { +++ /* Overflow on number of queued writers. */ +++ --rwlock->__data.__nr_writers_queued; +++ result = EAGAIN; +++ break; +++ } +++ +++ int waitval = rwlock->__data.__writer_wakeup; +++ +++ /* Free the lock. */ +++ lll_unlock (rwlock->__data.__lock, rwlock->__data.__shared); +++ +++ /* Wait for the writer or reader(s) to finish. */ +++#if (!defined __ASSUME_FUTEX_CLOCK_REALTIME \ +++ || !defined lll_futex_timed_wait_bitset) +++ err = lll_futex_timed_wait (&rwlock->__data.__writer_wakeup, +++ waitval, &rt, rwlock->__data.__shared); +++#else +++ err = lll_futex_timed_wait_bitset (&rwlock->__data.__writer_wakeup, +++ waitval, abstime, +++ FUTEX_CLOCK_REALTIME, +++ rwlock->__data.__shared); +++#endif +++ +++ /* Get the lock. */ +++ lll_lock (rwlock->__data.__lock, rwlock->__data.__shared); +++ +++ /* To start over again, remove the thread from the writer list. */ +++ --rwlock->__data.__nr_writers_queued; +++ +++ /* Did the futex call time out? */ +++ if (err == -ETIMEDOUT) +++ { +++ result = ETIMEDOUT; +++ break; +++ } +++ } +++ +++ /* We are done, free the lock. */ +++ lll_unlock (rwlock->__data.__lock, rwlock->__data.__shared); +++ +++ return result; +++} ++--- /dev/null +++++ b/fbtl/pthread_rwlock_tryrdlock.c ++@@ -0,0 +1,48 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include "pthreadP.h" +++#include +++ +++ +++int +++__pthread_rwlock_tryrdlock (pthread_rwlock_t *rwlock) +++{ +++ int result = EBUSY; +++ +++ lll_lock (rwlock->__data.__lock, rwlock->__data.__shared); +++ +++ if (rwlock->__data.__writer == 0 +++ && (rwlock->__data.__nr_writers_queued == 0 +++ || PTHREAD_RWLOCK_PREFER_READER_P (rwlock))) +++ { +++ if (__glibc_unlikely (++rwlock->__data.__nr_readers == 0)) +++ { +++ --rwlock->__data.__nr_readers; +++ result = EAGAIN; +++ } +++ else +++ result = 0; +++ } +++ +++ lll_unlock (rwlock->__data.__lock, rwlock->__data.__shared); +++ +++ return result; +++} +++strong_alias (__pthread_rwlock_tryrdlock, pthread_rwlock_tryrdlock) ++--- /dev/null +++++ b/fbtl/pthread_rwlock_trywrlock.c ++@@ -0,0 +1,41 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include "pthreadP.h" +++#include +++ +++ +++int +++__pthread_rwlock_trywrlock (pthread_rwlock_t *rwlock) +++{ +++ int result = EBUSY; +++ +++ lll_lock (rwlock->__data.__lock, rwlock->__data.__shared); +++ +++ if (rwlock->__data.__writer == 0 && rwlock->__data.__nr_readers == 0) +++ { +++ rwlock->__data.__writer = THREAD_GETMEM (THREAD_SELF, tid); +++ result = 0; +++ } +++ +++ lll_unlock (rwlock->__data.__lock, rwlock->__data.__shared); +++ +++ return result; +++} +++strong_alias (__pthread_rwlock_trywrlock, pthread_rwlock_trywrlock) ++--- /dev/null +++++ b/fbtl/pthread_rwlock_unlock.c ++@@ -0,0 +1,61 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Martin Schwidefsky , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++ +++/* Unlock RWLOCK. */ +++int +++__pthread_rwlock_unlock (pthread_rwlock_t *rwlock) +++{ +++ LIBC_PROBE (rwlock_unlock, 1, rwlock); +++ +++ lll_lock (rwlock->__data.__lock, rwlock->__data.__shared); +++ if (rwlock->__data.__writer) +++ rwlock->__data.__writer = 0; +++ else +++ --rwlock->__data.__nr_readers; +++ if (rwlock->__data.__nr_readers == 0) +++ { +++ if (rwlock->__data.__nr_writers_queued) +++ { +++ ++rwlock->__data.__writer_wakeup; +++ lll_unlock (rwlock->__data.__lock, rwlock->__data.__shared); +++ lll_futex_wake (&rwlock->__data.__writer_wakeup, 1, +++ rwlock->__data.__shared); +++ return 0; +++ } +++ else if (rwlock->__data.__nr_readers_queued) +++ { +++ ++rwlock->__data.__readers_wakeup; +++ lll_unlock (rwlock->__data.__lock, rwlock->__data.__shared); +++ lll_futex_wake (&rwlock->__data.__readers_wakeup, INT_MAX, +++ rwlock->__data.__shared); +++ return 0; +++ } +++ } +++ lll_unlock (rwlock->__data.__lock, rwlock->__data.__shared); +++ return 0; +++} +++ +++weak_alias (__pthread_rwlock_unlock, pthread_rwlock_unlock) +++hidden_def (__pthread_rwlock_unlock) ++--- /dev/null +++++ b/fbtl/pthread_rwlock_wrlock.c ++@@ -0,0 +1,91 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Martin Schwidefsky , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++/* Acquire write lock for RWLOCK. */ +++int +++__pthread_rwlock_wrlock (pthread_rwlock_t *rwlock) +++{ +++ int result = 0; +++ +++ LIBC_PROBE (wrlock_entry, 1, rwlock); +++ +++ /* Make sure we are alone. */ +++ lll_lock (rwlock->__data.__lock, rwlock->__data.__shared); +++ +++ while (1) +++ { +++ /* Get the rwlock if there is no writer and no reader. */ +++ if (rwlock->__data.__writer == 0 && rwlock->__data.__nr_readers == 0) +++ { +++ /* Mark self as writer. */ +++ rwlock->__data.__writer = THREAD_GETMEM (THREAD_SELF, tid); +++ +++ LIBC_PROBE (wrlock_acquire_write, 1, rwlock); +++ break; +++ } +++ +++ /* Make sure we are not holding the rwlock as a writer. This is +++ a deadlock situation we recognize and report. */ +++ if (__builtin_expect (rwlock->__data.__writer +++ == THREAD_GETMEM (THREAD_SELF, tid), 0)) +++ { +++ result = EDEADLK; +++ break; +++ } +++ +++ /* Remember that we are a writer. */ +++ if (++rwlock->__data.__nr_writers_queued == 0) +++ { +++ /* Overflow on number of queued writers. */ +++ --rwlock->__data.__nr_writers_queued; +++ result = EAGAIN; +++ break; +++ } +++ +++ int waitval = rwlock->__data.__writer_wakeup; +++ +++ /* Free the lock. */ +++ lll_unlock (rwlock->__data.__lock, rwlock->__data.__shared); +++ +++ /* Wait for the writer or reader(s) to finish. */ +++ lll_futex_wait (&rwlock->__data.__writer_wakeup, waitval, +++ rwlock->__data.__shared); +++ +++ /* Get the lock. */ +++ lll_lock (rwlock->__data.__lock, rwlock->__data.__shared); +++ +++ /* To start over again, remove the thread from the writer list. */ +++ --rwlock->__data.__nr_writers_queued; +++ } +++ +++ /* We are done, free the lock. */ +++ lll_unlock (rwlock->__data.__lock, rwlock->__data.__shared); +++ +++ return result; +++} +++ +++weak_alias (__pthread_rwlock_wrlock, pthread_rwlock_wrlock) +++hidden_def (__pthread_rwlock_wrlock) ++--- /dev/null +++++ b/fbtl/pthread_rwlockattr_destroy.c ++@@ -0,0 +1,28 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include "pthreadP.h" +++ +++ +++int +++pthread_rwlockattr_destroy (pthread_rwlockattr_t *attr) +++{ +++ /* Nothing to do. For now. */ +++ +++ return 0; +++} ++--- /dev/null +++++ b/fbtl/pthread_rwlockattr_getkind_np.c ++@@ -0,0 +1,28 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include "pthreadP.h" +++ +++ +++int +++pthread_rwlockattr_getkind_np (const pthread_rwlockattr_t *attr, int *pref) +++{ +++ *pref = ((const struct pthread_rwlockattr *) attr)->lockkind; +++ +++ return 0; +++} ++--- /dev/null +++++ b/fbtl/pthread_rwlockattr_getpshared.c ++@@ -0,0 +1,28 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include "pthreadP.h" +++ +++ +++int +++pthread_rwlockattr_getpshared (const pthread_rwlockattr_t *attr, int *pshared) +++{ +++ *pshared = ((const struct pthread_rwlockattr *) attr)->pshared; +++ +++ return 0; +++} ++--- /dev/null +++++ b/fbtl/pthread_rwlockattr_init.c ++@@ -0,0 +1,33 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include "pthreadP.h" +++ +++ +++int +++pthread_rwlockattr_init (pthread_rwlockattr_t *attr) +++{ +++ struct pthread_rwlockattr *iattr; +++ +++ iattr = (struct pthread_rwlockattr *) attr; +++ +++ iattr->lockkind = PTHREAD_RWLOCK_DEFAULT_NP; +++ iattr->pshared = PTHREAD_PROCESS_PRIVATE; +++ +++ return 0; +++} ++--- /dev/null +++++ b/fbtl/pthread_rwlockattr_setkind_np.c ++@@ -0,0 +1,38 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include "pthreadP.h" +++ +++ +++int +++pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *attr, int pref) +++{ +++ struct pthread_rwlockattr *iattr; +++ +++ if (pref != PTHREAD_RWLOCK_PREFER_READER_NP +++ && pref != PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP +++ && __builtin_expect (pref != PTHREAD_RWLOCK_PREFER_WRITER_NP, 0)) +++ return EINVAL; +++ +++ iattr = (struct pthread_rwlockattr *) attr; +++ +++ iattr->lockkind = pref; +++ +++ return 0; +++} ++--- /dev/null +++++ b/fbtl/pthread_rwlockattr_setpshared.c ++@@ -0,0 +1,37 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include "pthreadP.h" +++ +++ +++int +++pthread_rwlockattr_setpshared (pthread_rwlockattr_t *attr, int pshared) +++{ +++ struct pthread_rwlockattr *iattr; +++ +++ if (pshared != PTHREAD_PROCESS_SHARED +++ && __builtin_expect (pshared != PTHREAD_PROCESS_PRIVATE, 0)) +++ return EINVAL; +++ +++ iattr = (struct pthread_rwlockattr *) attr; +++ +++ iattr->pshared = pshared; +++ +++ return 0; +++} ++--- /dev/null +++++ b/fbtl/pthread_self.c ++@@ -0,0 +1,28 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include "pthreadP.h" +++#include +++ +++ +++pthread_t +++__pthread_self (void) +++{ +++ return (pthread_t) THREAD_SELF; +++} +++strong_alias (__pthread_self, pthread_self) ++--- /dev/null +++++ b/fbtl/pthread_setattr_default_np.c ++@@ -0,0 +1,116 @@ +++/* Set the default attributes to be used by pthread_create in the process. +++ 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 +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++ +++int +++pthread_setattr_default_np (const pthread_attr_t *in) +++{ +++ const struct pthread_attr *real_in; +++ struct pthread_attr attrs; +++ int ret; +++ +++ assert (sizeof (*in) >= sizeof (struct pthread_attr)); +++ real_in = (struct pthread_attr *) in; +++ +++#if 1 +++#warning scheduling attributes not yet supported +++#else +++ +++ /* Catch invalid values. */ +++ int policy = real_in->schedpolicy; +++ ret = check_sched_policy_attr (policy); +++ if (ret) +++ return ret; +++ +++ const struct sched_param *param = &real_in->schedparam; +++ if (param->sched_priority > 0) +++ { +++ ret = check_sched_priority_attr (param->sched_priority, policy); +++ if (ret) +++ return ret; +++ } +++ +++ ret = check_cpuset_attr (real_in->cpuset, real_in->cpusetsize); +++ if (ret) +++ return ret; +++#endif +++ +++ /* stacksize == 0 is fine. It means that we don't change the current +++ value. */ +++ if (real_in->stacksize != 0) +++ { +++ ret = check_stacksize_attr (real_in->stacksize); +++ if (ret) +++ return ret; +++ } +++ +++ /* Having a default stack address is wrong. */ +++ if (real_in->flags & ATTR_FLAG_STACKADDR) +++ return EINVAL; +++ +++ attrs = *real_in; +++ +++ /* Now take the lock because we start writing into +++ __default_pthread_attr. */ +++ lll_lock (__default_pthread_attr_lock, LLL_PRIVATE); +++ +++ /* Free the cpuset if the input is 0. Otherwise copy in the cpuset +++ contents. */ +++ size_t cpusetsize = attrs.cpusetsize; +++ if (cpusetsize == 0) +++ { +++ free (__default_pthread_attr.cpuset); +++ __default_pthread_attr.cpuset = NULL; +++ } +++ else if (cpusetsize == __default_pthread_attr.cpusetsize) +++ { +++ attrs.cpuset = __default_pthread_attr.cpuset; +++ memcpy (attrs.cpuset, real_in->cpuset, cpusetsize); +++ } +++ else +++ { +++ /* This may look wrong at first sight, but it isn't. We're freeing +++ __default_pthread_attr.cpuset and allocating to attrs.cpuset because +++ we'll copy over all of attr to __default_pthread_attr later. */ +++ cpu_set_t *newp = realloc (__default_pthread_attr.cpuset, +++ cpusetsize); +++ +++ if (newp == NULL) +++ { +++ ret = ENOMEM; +++ goto out; +++ } +++ +++ attrs.cpuset = newp; +++ memcpy (attrs.cpuset, real_in->cpuset, cpusetsize); +++ } +++ +++ /* We don't want to accidentally set the default stacksize to zero. */ +++ if (attrs.stacksize == 0) +++ attrs.stacksize = __default_pthread_attr.stacksize; +++ __default_pthread_attr = attrs; +++ +++ out: +++ lll_unlock (__default_pthread_attr_lock, LLL_PRIVATE); +++ return ret; +++} ++--- /dev/null +++++ b/fbtl/pthread_setcancelstate.c ++@@ -0,0 +1,71 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include "pthreadP.h" +++#include +++ +++ +++int +++__pthread_setcancelstate (int state, int *oldstate) +++{ +++ volatile struct pthread *self; +++ +++ if (state < PTHREAD_CANCEL_ENABLE || state > PTHREAD_CANCEL_DISABLE) +++ return EINVAL; +++ +++ self = THREAD_SELF; +++ +++ int oldval = THREAD_GETMEM (self, cancelhandling); +++ while (1) +++ { +++ int newval = (state == PTHREAD_CANCEL_DISABLE +++ ? oldval | CANCELSTATE_BITMASK +++ : oldval & ~CANCELSTATE_BITMASK); +++ +++ /* Store the old value. */ +++ if (oldstate != NULL) +++ *oldstate = ((oldval & CANCELSTATE_BITMASK) +++ ? PTHREAD_CANCEL_DISABLE : PTHREAD_CANCEL_ENABLE); +++ +++ /* Avoid doing unnecessary work. The atomic operation can +++ potentially be expensive if the memory has to be locked and +++ remote cache lines have to be invalidated. */ +++ if (oldval == newval) +++ break; +++ +++ /* Update the cancel handling word. This has to be done +++ atomically since other bits could be modified as well. */ +++ int curval = THREAD_ATOMIC_CMPXCHG_VAL (self, cancelhandling, newval, +++ oldval); +++ if (__glibc_likely (curval == oldval)) +++ { +++ if (CANCEL_ENABLED_AND_CANCELED_AND_ASYNCHRONOUS (newval)) +++ __do_cancel (); +++ +++ break; +++ } +++ +++ /* Prepare for the next round. */ +++ oldval = curval; +++ } +++ +++ return 0; +++} +++strong_alias (__pthread_setcancelstate, pthread_setcancelstate) +++hidden_def (__pthread_setcancelstate) ++--- /dev/null +++++ b/fbtl/pthread_setcanceltype.c ++@@ -0,0 +1,73 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include "pthreadP.h" +++#include +++ +++ +++int +++__pthread_setcanceltype (int type, int *oldtype) +++{ +++ volatile struct pthread *self; +++ +++ if (type < PTHREAD_CANCEL_DEFERRED || type > PTHREAD_CANCEL_ASYNCHRONOUS) +++ return EINVAL; +++ +++ self = THREAD_SELF; +++ +++ int oldval = THREAD_GETMEM (self, cancelhandling); +++ while (1) +++ { +++ int newval = (type == PTHREAD_CANCEL_ASYNCHRONOUS +++ ? oldval | CANCELTYPE_BITMASK +++ : oldval & ~CANCELTYPE_BITMASK); +++ +++ /* Store the old value. */ +++ if (oldtype != NULL) +++ *oldtype = ((oldval & CANCELTYPE_BITMASK) +++ ? PTHREAD_CANCEL_ASYNCHRONOUS : PTHREAD_CANCEL_DEFERRED); +++ +++ /* Avoid doing unnecessary work. The atomic operation can +++ potentially be expensive if the memory has to be locked and +++ remote cache lines have to be invalidated. */ +++ if (oldval == newval) +++ break; +++ +++ /* Update the cancel handling word. This has to be done +++ atomically since other bits could be modified as well. */ +++ int curval = THREAD_ATOMIC_CMPXCHG_VAL (self, cancelhandling, newval, +++ oldval); +++ if (__glibc_likely (curval == oldval)) +++ { +++ if (CANCEL_ENABLED_AND_CANCELED_AND_ASYNCHRONOUS (newval)) +++ { +++ THREAD_SETMEM (self, result, PTHREAD_CANCELED); +++ __do_cancel (); +++ } +++ +++ break; +++ } +++ +++ /* Prepare for the next round. */ +++ oldval = curval; +++ } +++ +++ return 0; +++} +++strong_alias (__pthread_setcanceltype, pthread_setcanceltype) ++--- /dev/null +++++ b/fbtl/pthread_setconcurrency.c ++@@ -0,0 +1,39 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include "pthreadP.h" +++ +++ +++/* Global definition. Needed in pthread_getconcurrency as well. */ +++int __concurrency_level; +++ +++ +++int +++pthread_setconcurrency (int level) +++{ +++ if (level < 0) +++ return EINVAL; +++ +++ __concurrency_level = level; +++ +++ /* XXX For ports which actually need to handle the concurrency level +++ some more code is probably needed here. */ +++ +++ return 0; +++} ++--- /dev/null +++++ b/fbtl/pthread_setegid.c ++@@ -0,0 +1,3 @@ +++#define SINGLE_THREAD +++#define setegid pthread_setegid_np +++#include ++--- /dev/null +++++ b/fbtl/pthread_seteuid.c ++@@ -0,0 +1,3 @@ +++#define SINGLE_THREAD +++#define seteuid pthread_seteuid_np +++#include ++--- /dev/null +++++ b/fbtl/pthread_setgid.c ++@@ -0,0 +1,3 @@ +++#define SINGLE_THREAD +++#define __setgid pthread_setgid_np +++#include ++--- /dev/null +++++ b/fbtl/pthread_setregid.c ++@@ -0,0 +1,3 @@ +++#define SINGLE_THREAD +++#define __setregid pthread_setregid_np +++#include ++--- /dev/null +++++ b/fbtl/pthread_setresgid.c ++@@ -0,0 +1,3 @@ +++#define SINGLE_THREAD +++#define __setresgid pthread_setresgid_np +++#include ++--- /dev/null +++++ b/fbtl/pthread_setresuid.c ++@@ -0,0 +1,3 @@ +++#define SINGLE_THREAD +++#define __setresuid pthread_setresuid_np +++#include ++--- /dev/null +++++ b/fbtl/pthread_setreuid.c ++@@ -0,0 +1,3 @@ +++#define SINGLE_THREAD +++#define __setreuid pthread_setreuid_np +++#include ++--- /dev/null +++++ b/fbtl/pthread_setschedparam.c ++@@ -0,0 +1,71 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include "pthreadP.h" +++#include +++ +++ +++int +++__pthread_setschedparam (pthread_t threadid, int policy, +++ const struct sched_param *param) +++{ +++ struct pthread *pd = (struct pthread *) threadid; +++ +++ /* Make sure the descriptor is valid. */ +++ if (INVALID_TD_P (pd)) +++ /* Not a valid thread handle. */ +++ return ESRCH; +++ +++ int result = 0; +++ +++ lll_lock (pd->lock, LLL_PRIVATE); +++ +++ struct sched_param p; +++ const struct sched_param *orig_param = param; +++ +++ /* If the thread should have higher priority because of some +++ PTHREAD_PRIO_PROTECT mutexes it holds, adjust the priority. */ +++ if (__builtin_expect (pd->tpp != NULL, 0) +++ && pd->tpp->priomax > param->sched_priority) +++ { +++ p = *param; +++ p.sched_priority = pd->tpp->priomax; +++ param = &p; +++ } +++ +++ /* Try to set the scheduler information. */ +++ if (__builtin_expect (__sched_setscheduler (pd->tid, policy, +++ param) == -1, 0)) +++ result = errno; +++ else +++ { +++ /* We succeeded changing the kernel information. Reflect this +++ change in the thread descriptor. */ +++ pd->schedpolicy = policy; +++ memcpy (&pd->schedparam, orig_param, sizeof (struct sched_param)); +++ pd->flags |= ATTR_FLAG_SCHED_SET | ATTR_FLAG_POLICY_SET; +++ } +++ +++ lll_unlock (pd->lock, LLL_PRIVATE); +++ +++ return result; +++} +++strong_alias (__pthread_setschedparam, pthread_setschedparam) ++--- /dev/null +++++ b/fbtl/pthread_setschedprio.c ++@@ -0,0 +1,63 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include "pthreadP.h" +++#include +++ +++ +++int +++pthread_setschedprio (pthread_t threadid, int prio) +++{ +++ struct pthread *pd = (struct pthread *) threadid; +++ +++ /* Make sure the descriptor is valid. */ +++ if (INVALID_TD_P (pd)) +++ /* Not a valid thread handle. */ +++ return ESRCH; +++ +++ int result = 0; +++ struct sched_param param; +++ param.sched_priority = prio; +++ +++ lll_lock (pd->lock, LLL_PRIVATE); +++ +++ /* If the thread should have higher priority because of some +++ PTHREAD_PRIO_PROTECT mutexes it holds, adjust the priority. */ +++ if (__builtin_expect (pd->tpp != NULL, 0) && pd->tpp->priomax > prio) +++ param.sched_priority = pd->tpp->priomax; +++ +++ /* Try to set the scheduler information. */ +++ if (__glibc_unlikely (sched_setparam (pd->tid, ¶m) == -1)) +++ result = errno; +++ else +++ { +++ /* We succeeded changing the kernel information. Reflect this +++ change in the thread descriptor. */ +++ param.sched_priority = prio; +++ memcpy (&pd->schedparam, ¶m, sizeof (struct sched_param)); +++ pd->flags |= ATTR_FLAG_SCHED_SET; +++ } +++ +++ lll_unlock (pd->lock, LLL_PRIVATE); +++ +++ return result; +++} ++--- /dev/null +++++ b/fbtl/pthread_setspecific.c ++@@ -0,0 +1,93 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include "pthreadP.h" +++ +++ +++int +++__pthread_setspecific (pthread_key_t key, const void *value) +++{ +++ struct pthread *self; +++ unsigned int idx1st; +++ unsigned int idx2nd; +++ struct pthread_key_data *level2; +++ unsigned int seq; +++ +++ self = THREAD_SELF; +++ +++ /* Special case access to the first 2nd-level block. This is the +++ usual case. */ +++ if (__glibc_likely (key < PTHREAD_KEY_2NDLEVEL_SIZE)) +++ { +++ /* Verify the key is sane. */ +++ if (KEY_UNUSED ((seq = __pthread_keys[key].seq))) +++ /* Not valid. */ +++ return EINVAL; +++ +++ level2 = &self->specific_1stblock[key]; +++ +++ /* Remember that we stored at least one set of data. */ +++ if (value != NULL) +++ THREAD_SETMEM (self, specific_used, true); +++ } +++ else +++ { +++ if (key >= PTHREAD_KEYS_MAX +++ || KEY_UNUSED ((seq = __pthread_keys[key].seq))) +++ /* Not valid. */ +++ return EINVAL; +++ +++ idx1st = key / PTHREAD_KEY_2NDLEVEL_SIZE; +++ idx2nd = key % PTHREAD_KEY_2NDLEVEL_SIZE; +++ +++ /* This is the second level array. Allocate it if necessary. */ +++ level2 = THREAD_GETMEM_NC (self, specific, idx1st); +++ if (level2 == NULL) +++ { +++ if (value == NULL) +++ /* We don't have to do anything. The value would in any case +++ be NULL. We can save the memory allocation. */ +++ return 0; +++ +++ level2 +++ = (struct pthread_key_data *) calloc (PTHREAD_KEY_2NDLEVEL_SIZE, +++ sizeof (*level2)); +++ if (level2 == NULL) +++ return ENOMEM; +++ +++ THREAD_SETMEM_NC (self, specific, idx1st, level2); +++ } +++ +++ /* Pointer to the right array element. */ +++ level2 = &level2[idx2nd]; +++ +++ /* Remember that we stored at least one set of data. */ +++ THREAD_SETMEM (self, specific_used, true); +++ } +++ +++ /* Store the data and the sequence number so that we can recognize +++ stale data. */ +++ level2->seq = seq; +++ level2->data = (void *) value; +++ +++ return 0; +++} +++strong_alias (__pthread_setspecific, pthread_setspecific) +++hidden_def (__pthread_setspecific) ++--- /dev/null +++++ b/fbtl/pthread_setuid.c ++@@ -0,0 +1,3 @@ +++#define SINGLE_THREAD +++#define __setuid pthread_setuid_np +++#include ++--- /dev/null +++++ b/fbtl/pthread_spin_destroy.c ++@@ -0,0 +1,27 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include "pthreadP.h" +++ +++ +++int +++pthread_spin_destroy (pthread_spinlock_t *lock) +++{ +++ /* Nothing to do. */ +++ return 0; +++} ++--- /dev/null +++++ b/fbtl/pthread_spin_init.c ++@@ -0,0 +1,27 @@ +++/* pthread_spin_init -- initialize a spin lock. Generic version. +++ Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Paul Mackerras , 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, see +++ . */ +++ +++#include "pthreadP.h" +++ +++int +++pthread_spin_init (pthread_spinlock_t *lock, int pshared) +++{ +++ *lock = 0; +++ return 0; +++} ++--- /dev/null +++++ b/fbtl/pthread_spin_lock.c ++@@ -0,0 +1,69 @@ +++/* pthread_spin_lock -- lock a spin lock. Generic version. +++ Copyright (C) 2012-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 +++ . */ +++ +++#include +++#include "pthreadP.h" +++ +++/* A machine-specific version can define SPIN_LOCK_READS_BETWEEN_CMPXCHG +++ to the number of plain reads that it's optimal to spin on between uses +++ of atomic_compare_and_exchange_val_acq. If spinning forever is optimal +++ then use -1. If no plain reads here would ever be optimal, use 0. */ +++#ifndef SPIN_LOCK_READS_BETWEEN_CMPXCHG +++# warning machine-dependent file should define SPIN_LOCK_READS_BETWEEN_CMPXCHG +++# define SPIN_LOCK_READS_BETWEEN_CMPXCHG 1000 +++#endif +++ +++int +++pthread_spin_lock (pthread_spinlock_t *lock) +++{ +++ /* atomic_exchange usually takes less instructions than +++ atomic_compare_and_exchange. On the other hand, +++ atomic_compare_and_exchange potentially generates less bus traffic +++ when the lock is locked. +++ We assume that the first try mostly will be successful, and we use +++ atomic_exchange. For the subsequent tries we use +++ atomic_compare_and_exchange. */ +++ if (atomic_exchange_acq (lock, 1) == 0) +++ return 0; +++ +++ do +++ { +++ /* The lock is contended and we need to wait. Going straight back +++ to cmpxchg is not a good idea on many targets as that will force +++ expensive memory synchronizations among processors and penalize other +++ running threads. +++ On the other hand, we do want to update memory state on the local core +++ once in a while to avoid spinning indefinitely until some event that +++ will happen to update local memory as a side-effect. */ +++ if (SPIN_LOCK_READS_BETWEEN_CMPXCHG >= 0) +++ { +++ int wait = SPIN_LOCK_READS_BETWEEN_CMPXCHG; +++ +++ while (*lock != 0 && wait > 0) +++ --wait; +++ } +++ else +++ { +++ while (*lock != 0) +++ ; +++ } +++ } +++ while (atomic_compare_and_exchange_val_acq (lock, 1, 0) != 0); +++ +++ return 0; +++} ++--- /dev/null +++++ b/fbtl/pthread_spin_trylock.c ++@@ -0,0 +1,27 @@ +++/* pthread_spin_trylock -- trylock a spin lock. Generic version. +++ Copyright (C) 2012-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 +++ . */ +++ +++#include +++#include +++#include "pthreadP.h" +++ +++int +++pthread_spin_trylock (pthread_spinlock_t *lock) +++{ +++ return atomic_exchange_acq (lock, 1) ? EBUSY : 0; +++} ++--- /dev/null +++++ b/fbtl/pthread_spin_unlock.c ++@@ -0,0 +1,29 @@ +++/* pthread_spin_unlock -- unlock a spin lock. Generic version. +++ Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Paul Mackerras , 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, see +++ . */ +++ +++#include "pthreadP.h" +++#include +++ +++int +++pthread_spin_unlock (pthread_spinlock_t *lock) +++{ +++ atomic_full_barrier (); +++ *lock = 0; +++ return 0; +++} ++--- /dev/null +++++ b/fbtl/pthread_testcancel.c ++@@ -0,0 +1,27 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include "pthreadP.h" +++ +++ +++void +++pthread_testcancel (void) +++{ +++ CANCELLATION_P (THREAD_SELF); +++} ++--- /dev/null +++++ b/fbtl/pthread_timedjoin.c ++@@ -0,0 +1,104 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include "pthreadP.h" +++ +++ +++static void +++cleanup (void *arg) +++{ +++ *(void **) arg = NULL; +++} +++ +++ +++int +++pthread_timedjoin_np (pthread_t threadid, void **thread_return, +++ const struct timespec *abstime) +++{ +++ struct pthread *self; +++ struct pthread *pd = (struct pthread *) threadid; +++ int result; +++ +++ /* Make sure the descriptor is valid. */ +++ if (INVALID_NOT_TERMINATED_TD_P (pd)) +++ /* Not a valid thread handle. */ +++ return ESRCH; +++ +++ /* Is the thread joinable?. */ +++ if (IS_DETACHED (pd)) +++ /* We cannot wait for the thread. */ +++ return EINVAL; +++ +++ self = THREAD_SELF; +++ if (pd == self || self->joinid == pd) +++ /* This is a deadlock situation. The threads are waiting for each +++ other to finish. Note that this is a "may" error. To be 100% +++ sure we catch this error we would have to lock the data +++ structures but it is not necessary. In the unlikely case that +++ two threads are really caught in this situation they will +++ deadlock. It is the programmer's problem to figure this +++ out. */ +++ return EDEADLK; +++ +++ /* Wait for the thread to finish. If it is already locked something +++ is wrong. There can only be one waiter. */ +++ if (__builtin_expect (atomic_compare_and_exchange_bool_acq (&pd->joinid, +++ self, NULL), 0)) +++ /* There is already somebody waiting for the thread. */ +++ return EINVAL; +++ +++ +++ /* During the wait we change to asynchronous cancellation. If we +++ are cancelled the thread we are waiting for must be marked as +++ un-wait-ed for again. */ +++ pthread_cleanup_push (cleanup, &pd->joinid); +++ +++ /* Switch to asynchronous cancellation. */ +++ int oldtype = CANCEL_ASYNC (); +++ +++ +++ /* Wait for the child. */ +++ result = lll_timedwait_tid (pd->ktid, abstime); +++ +++ +++ /* Restore cancellation mode. */ +++ CANCEL_RESET (oldtype); +++ +++ /* Remove the handler. */ +++ pthread_cleanup_pop (0); +++ +++ +++ /* We might have timed out. */ +++ if (result == 0) +++ { +++ /* Store the return value if the caller is interested. */ +++ if (thread_return != NULL) +++ *thread_return = pd->result; +++ +++ +++ /* Free the TCB. */ +++ __free_tcb (pd); +++ } +++ else +++ pd->joinid = NULL; +++ +++ return result; +++} ++--- /dev/null +++++ b/fbtl/pthread_tryjoin.c ++@@ -0,0 +1,72 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++ +++#include +++#include "pthreadP.h" +++ +++ +++int +++pthread_tryjoin_np (pthread_t threadid, void **thread_return) +++{ +++ struct pthread *self; +++ struct pthread *pd = (struct pthread *) threadid; +++ +++ /* Make sure the descriptor is valid. */ +++ if (DEBUGGING_P && __find_in_stack_list (pd) == NULL) +++ /* Not a valid thread handle. */ +++ return ESRCH; +++ +++ /* Is the thread joinable?. */ +++ if (IS_DETACHED (pd)) +++ /* We cannot wait for the thread. */ +++ return EINVAL; +++ +++ self = THREAD_SELF; +++ if (pd == self || self->joinid == pd) +++ /* This is a deadlock situation. The threads are waiting for each +++ other to finish. Note that this is a "may" error. To be 100% +++ sure we catch this error we would have to lock the data +++ structures but it is not necessary. In the unlikely case that +++ two threads are really caught in this situation they will +++ deadlock. It is the programmer's problem to figure this +++ out. */ +++ return EDEADLK; +++ +++ /* Return right away if the thread hasn't terminated yet. */ +++ if (pd->tid != KTID_TERMINATED) +++ return EBUSY; +++ +++ /* Wait for the thread to finish. If it is already locked something +++ is wrong. There can only be one waiter. */ +++ if (atomic_compare_and_exchange_bool_acq (&pd->joinid, self, NULL)) +++ /* There is already somebody waiting for the thread. */ +++ return EINVAL; +++ +++ /* Store the return value if the caller is interested. */ +++ if (thread_return != NULL) +++ *thread_return = pd->result; +++ +++ +++ /* Free the TCB. */ +++ __free_tcb (pd); +++ +++ return 0; +++} ++--- /dev/null +++++ b/fbtl/res.c ++@@ -0,0 +1,26 @@ +++/* Copyright (C) 2002-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 +++ . */ +++ +++#include +++#include +++#include +++ +++struct __res_state * +++__res_state (void) +++{ +++ return __resp; +++} ++--- /dev/null +++++ b/fbtl/sem_close.c ++@@ -0,0 +1,79 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include "semaphoreP.h" +++ +++ +++/* Global variables to parametrize the walk function. This works +++ since we always have to use locks. And we have to use the twalk +++ function since the entries are not sorted wrt the mapping +++ address. */ +++static sem_t *the_sem; +++static struct inuse_sem *rec; +++ +++static void +++walker (const void *inodep, const VISIT which, const int depth) +++{ +++ struct inuse_sem *nodep = *(struct inuse_sem **) inodep; +++ +++ if (nodep->sem == the_sem) +++ rec = nodep; +++} +++ +++ +++int +++sem_close (sem_t *sem) +++{ +++ int result = 0; +++ +++ /* Get the lock. */ +++ lll_lock (__sem_mappings_lock, LLL_PRIVATE); +++ +++ /* Locate the entry for the mapping the caller provided. */ +++ rec = NULL; +++ the_sem = sem; +++ __twalk (__sem_mappings, walker); +++ if (rec != NULL) +++ { +++ /* Check the reference counter. If it is going to be zero, free +++ all the resources. */ +++ if (--rec->refcnt == 0) +++ { +++ /* Remove the record from the tree. */ +++ (void) __tdelete (rec, &__sem_mappings, __sem_search); +++ +++ result = munmap (rec->sem, sizeof (sem_t)); +++ +++ free (rec); +++ } +++ } +++ else +++ { +++ /* This is no valid semaphore. */ +++ result = -1; +++ __set_errno (EINVAL); +++ } +++ +++ /* Release the lock. */ +++ lll_unlock (__sem_mappings_lock, LLL_PRIVATE); +++ +++ return result; +++} ++--- /dev/null +++++ b/fbtl/sem_destroy.c ++@@ -0,0 +1,36 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include "semaphoreP.h" +++ +++ +++int +++__new_sem_destroy (sem_t *sem) +++{ +++ /* XXX Check for valid parameter. */ +++ +++ /* Nothing to do. */ +++ return 0; +++} +++versioned_symbol (libpthread, __new_sem_destroy, sem_destroy, GLIBC_2_1); +++#if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_1) +++strong_alias (__new_sem_destroy, __old_sem_destroy) +++compat_symbol (libpthread, __old_sem_destroy, sem_destroy, GLIBC_2_0); +++#endif ++--- /dev/null +++++ b/fbtl/sem_getvalue.c ++@@ -0,0 +1,39 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include "semaphoreP.h" +++ +++ +++int +++__new_sem_getvalue (sem_t *sem, int *sval) +++{ +++ struct new_sem *isem = (struct new_sem *) sem; +++ +++ /* XXX Check for valid SEM parameter. */ +++ +++ *sval = isem->value; +++ +++ return 0; +++} +++versioned_symbol (libpthread, __new_sem_getvalue, sem_getvalue, GLIBC_2_1); +++#if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_1) +++strong_alias (__new_sem_getvalue, __old_sem_getvalue) +++compat_symbol (libpthread, __old_sem_getvalue, sem_getvalue, GLIBC_2_0); +++#endif ++--- /dev/null +++++ b/fbtl/sem_init.c ++@@ -0,0 +1,81 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include "semaphoreP.h" +++#include +++ +++ +++int +++__new_sem_init (sem_t *sem, int pshared, unsigned int value) +++{ +++ /* Parameter sanity check. */ +++ if (__glibc_unlikely (value > SEM_VALUE_MAX)) +++ { +++ __set_errno (EINVAL); +++ return -1; +++ } +++ +++ /* Map to the internal type. */ +++ struct new_sem *isem = (struct new_sem *) sem; +++ +++ /* Use the values the user provided. */ +++ isem->value = value; +++#ifdef __ASSUME_PRIVATE_FUTEX +++ isem->private = pshared ? 0 : FUTEX_PRIVATE_FLAG; +++#else +++ isem->private = pshared ? 0 : THREAD_GETMEM (THREAD_SELF, +++ header.private_futex); +++#endif +++ +++ isem->nwaiters = 0; +++ +++ return 0; +++} +++versioned_symbol (libpthread, __new_sem_init, sem_init, GLIBC_2_1); +++ +++ +++ +++#if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_1) +++int +++attribute_compat_text_section +++__old_sem_init (sem_t *sem, int pshared, unsigned int value) +++{ +++ /* Parameter sanity check. */ +++ if (__glibc_unlikely (value > SEM_VALUE_MAX)) +++ { +++ __set_errno (EINVAL); +++ return -1; +++ } +++ +++ /* Map to the internal type. */ +++ struct old_sem *isem = (struct old_sem *) sem; +++ +++ /* Use the value the user provided. */ +++ isem->value = value; +++ +++ /* We cannot store the PSHARED attribute. So we always use the +++ operations needed for shared semaphores. */ +++ +++ return 0; +++} +++compat_symbol (libpthread, __old_sem_init, sem_init, GLIBC_2_0); +++#endif ++--- /dev/null +++++ b/fbtl/sem_open.c ++@@ -0,0 +1,300 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include "semaphoreP.h" +++#include +++ +++ +++/* Comparison function for search of existing mapping. */ +++int +++attribute_hidden +++__sem_search (const void *a, const void *b) +++{ +++ const struct inuse_sem *as = (const struct inuse_sem *) a; +++ const struct inuse_sem *bs = (const struct inuse_sem *) b; +++ +++ if (as->ino != bs->ino) +++ /* Cannot return the difference the type is larger than int. */ +++ return as->ino < bs->ino ? -1 : (as->ino == bs->ino ? 0 : 1); +++ +++ if (as->dev != bs->dev) +++ /* Cannot return the difference the type is larger than int. */ +++ return as->dev < bs->dev ? -1 : (as->dev == bs->dev ? 0 : 1); +++ +++ return strcmp (as->name, bs->name); +++} +++ +++ +++/* The search tree for existing mappings. */ +++void *__sem_mappings attribute_hidden; +++ +++/* Lock to protect the search tree. */ +++int __sem_mappings_lock attribute_hidden = LLL_LOCK_INITIALIZER; +++ +++ +++/* Search for existing mapping and if possible add the one provided. */ +++static sem_t * +++check_add_mapping (const char *name, size_t namelen, int fd, sem_t *existing) +++{ +++ sem_t *result = SEM_FAILED; +++ +++ /* Get the information about the file. */ +++ struct stat64 st; +++ if (__fxstat64 (_STAT_VER, fd, &st) == 0) +++ { +++ /* Get the lock. */ +++ lll_lock (__sem_mappings_lock, LLL_PRIVATE); +++ +++ /* Search for an existing mapping given the information we have. */ +++ struct inuse_sem *fake; +++ fake = (struct inuse_sem *) alloca (sizeof (*fake) + namelen); +++ memcpy (fake->name, name, namelen); +++ fake->dev = st.st_dev; +++ fake->ino = st.st_ino; +++ +++ struct inuse_sem **foundp = __tfind (fake, &__sem_mappings, +++ __sem_search); +++ if (foundp != NULL) +++ { +++ /* There is already a mapping. Use it. */ +++ result = (*foundp)->sem; +++ ++(*foundp)->refcnt; +++ } +++ else +++ { +++ /* We haven't found a mapping. Install ione. */ +++ struct inuse_sem *newp; +++ +++ newp = (struct inuse_sem *) malloc (sizeof (*newp) + namelen); +++ if (newp != NULL) +++ { +++ /* If the caller hasn't provided any map it now. */ +++ if (existing == SEM_FAILED) +++ existing = (sem_t *) mmap (NULL, sizeof (sem_t), +++ PROT_READ | PROT_WRITE, MAP_SHARED, +++ fd, 0); +++ +++ newp->dev = st.st_dev; +++ newp->ino = st.st_ino; +++ newp->refcnt = 1; +++ newp->sem = existing; +++ memcpy (newp->name, name, namelen); +++ +++ /* Insert the new value. */ +++ if (existing != MAP_FAILED +++ && __tsearch (newp, &__sem_mappings, __sem_search) != NULL) +++ /* Successful. */ +++ result = existing; +++ else +++ /* Something went wrong while inserting the new +++ value. We fail completely. */ +++ free (newp); +++ } +++ } +++ +++ /* Release the lock. */ +++ lll_unlock (__sem_mappings_lock, LLL_PRIVATE); +++ } +++ +++ if (result != existing && existing != SEM_FAILED && existing != MAP_FAILED) +++ { +++ /* Do not disturb errno. */ +++ int saved_errno = errno; +++ munmap(existing, sizeof (sem_t)); +++ errno = saved_errno; +++ } +++ +++ return result; +++} +++ +++ +++sem_t * +++sem_open (const char *name, int oflag, ...) +++{ +++ int fd; +++ sem_t *result; +++ +++ /* Create the name of the final file in local variable SHM_NAME. */ +++ SHM_GET_NAME (EINVAL, SEM_FAILED, SEM_SHM_PREFIX); +++ +++ /* If the semaphore object has to exist simply open it. */ +++ if ((oflag & O_CREAT) == 0 || (oflag & O_EXCL) == 0) +++ { +++ try_again: +++ fd = __libc_open (shm_name, +++ (oflag & ~(O_CREAT|O_ACCMODE)) | O_NOFOLLOW | O_RDWR); +++ +++ if (fd == -1) +++ { +++ /* If we are supposed to create the file try this next. */ +++ if ((oflag & O_CREAT) != 0 && errno == ENOENT) +++ goto try_create; +++ +++ /* Return. errno is already set. */ +++ } +++ else +++ /* Check whether we already have this semaphore mapped and +++ create one if necessary. */ +++ result = check_add_mapping (name, namelen, fd, SEM_FAILED); +++ } +++ else +++ { +++ /* We have to open a temporary file first since it must have the +++ correct form before we can start using it. */ +++ char *tmpfname; +++ mode_t mode; +++ unsigned int value; +++ va_list ap; +++ +++ try_create: +++ va_start (ap, oflag); +++ +++#if 0 +++ mode = va_arg (ap, mode_t); +++#else +++ mode = va_arg (ap, int); +++#endif +++ value = va_arg (ap, unsigned int); +++ +++ va_end (ap); +++ +++ if (value > SEM_VALUE_MAX) +++ { +++ __set_errno (EINVAL); +++ return SEM_FAILED; +++ } +++ +++ /* Create the initial file content. */ +++ union +++ { +++ sem_t initsem; +++ struct new_sem newsem; +++ } sem; +++ +++ sem.newsem.value = value; +++ sem.newsem.private = 0; +++ sem.newsem.nwaiters = 0; +++ +++ /* Initialize the remaining bytes as well. */ +++ memset ((char *) &sem.initsem + sizeof (struct new_sem), '\0', +++ sizeof (sem_t) - sizeof (struct new_sem)); +++ +++ tmpfname = (char *) alloca (shm_dirlen + sizeof SEM_SHM_PREFIX + 6); +++ char *xxxxxx = __mempcpy (tmpfname, shm_dir, shm_dirlen); +++ +++ int retries = 0; +++#define NRETRIES 50 +++ while (1) +++ { +++ /* Add the suffix for mktemp. */ +++ strcpy (xxxxxx, "XXXXXX"); +++ +++ /* We really want to use mktemp here. We cannot use mkstemp +++ since the file must be opened with a specific mode. The +++ mode cannot later be set since then we cannot apply the +++ file create mask. */ +++ if (__mktemp (tmpfname) == NULL) +++ return SEM_FAILED; +++ +++ /* Open the file. Make sure we do not overwrite anything. */ +++ fd = __libc_open (tmpfname, O_RDWR | O_CREAT | O_EXCL, mode); +++ if (fd == -1) +++ { +++ if (errno == EEXIST) +++ { +++ if (++retries < NRETRIES) +++ continue; +++ +++ __set_errno (EAGAIN); +++ } +++ +++ return SEM_FAILED; +++ } +++ +++ /* We got a file. */ +++ break; +++ } +++ +++ if (TEMP_FAILURE_RETRY (__libc_write (fd, &sem.initsem, sizeof (sem_t))) +++ == sizeof (sem_t) +++ /* Map the sem_t structure from the file. */ +++ && (result = (sem_t *) mmap (NULL, sizeof (sem_t), +++ PROT_READ | PROT_WRITE, MAP_SHARED, +++ fd, 0)) != MAP_FAILED) +++ { +++ /* Create the file. Don't overwrite an existing file. */ +++ if (link (tmpfname, shm_name) != 0) +++ { +++ /* Undo the mapping. */ +++ (void) munmap (result, sizeof (sem_t)); +++ +++ /* Reinitialize 'result'. */ +++ result = SEM_FAILED; +++ +++ /* This failed. If O_EXCL is not set and the problem was +++ that the file exists, try again. */ +++ if ((oflag & O_EXCL) == 0 && errno == EEXIST) +++ { +++ /* Remove the file. */ +++ (void) unlink (tmpfname); +++ +++ /* Close the file. */ +++ (void) __libc_close (fd); +++ +++ goto try_again; +++ } +++ } +++ else +++ /* Insert the mapping into the search tree. This also +++ determines whether another thread sneaked by and already +++ added such a mapping despite the fact that we created it. */ +++ result = check_add_mapping (name, namelen, fd, result); +++ } +++ +++ /* Now remove the temporary name. This should never fail. If +++ it fails we leak a file name. Better fix the kernel. */ +++ (void) unlink (tmpfname); +++ } +++ +++ /* Map the mmap error to the error we need. */ +++ if (MAP_FAILED != (void *) SEM_FAILED && result == MAP_FAILED) +++ result = SEM_FAILED; +++ +++ /* We don't need the file descriptor anymore. */ +++ if (fd != -1) +++ { +++ /* Do not disturb errno. */ +++ int save = errno; +++ __libc_close (fd); +++ errno = save; +++ } +++ +++ return result; +++} ++--- /dev/null +++++ b/fbtl/sem_unlink.c ++@@ -0,0 +1,38 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include "semaphoreP.h" +++#include +++ +++int +++sem_unlink (const char *name) +++{ +++ /* Construct the filename. */ +++ SHM_GET_NAME (ENOENT, -1, SEM_SHM_PREFIX); +++ +++ /* Now try removing it. */ +++ int ret = unlink (shm_name); +++ if (ret < 0 && errno == EPERM) +++ __set_errno (EACCES); +++ return ret; +++} ++--- /dev/null +++++ b/fbtl/semaphore.h ++@@ -0,0 +1,78 @@ +++/* Copyright (C) 2002-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 +++ . */ +++ +++#ifndef _SEMAPHORE_H +++#define _SEMAPHORE_H 1 +++ +++#include +++#include +++#ifdef __USE_XOPEN2K +++# define __need_timespec +++# include +++#endif +++ +++/* Get the definition for sem_t. */ +++#include +++ +++ +++__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 flags 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. +++ +++ This function is a cancellation point and therefore not marked with +++ __THROW. */ +++extern int sem_wait (sem_t *__sem); +++ +++#ifdef __USE_XOPEN2K +++/* Similar to `sem_wait' but wait only until ABSTIME. +++ +++ This function is a cancellation point and therefore not marked with +++ __THROW. */ +++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) __THROWNL; +++ +++/* Post SEM. */ +++extern int sem_post (sem_t *__sem) __THROWNL; +++ +++/* 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 */ ++--- /dev/null +++++ b/fbtl/semaphoreP.h ++@@ -0,0 +1,54 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include "pthreadP.h" +++ +++#define SEM_SHM_PREFIX "sem." +++ +++/* Keeping track of currently used mappings. */ +++struct inuse_sem +++{ +++ dev_t dev; +++ ino_t ino; +++ int refcnt; +++ sem_t *sem; +++ char name[0]; +++}; +++ +++ +++/* The search tree for existing mappings. */ +++extern void *__sem_mappings attribute_hidden; +++ +++/* Lock to protect the search tree. */ +++extern int __sem_mappings_lock attribute_hidden; +++ +++ +++/* Comparison function for search in tree with existing mappings. */ +++extern int __sem_search (const void *a, const void *b) attribute_hidden; +++ +++ +++/* Prototypes of functions with multiple interfaces. */ +++extern int __new_sem_init (sem_t *sem, int pshared, unsigned int value); +++extern int __old_sem_init (sem_t *sem, int pshared, unsigned int value); +++extern int __new_sem_destroy (sem_t *sem); +++extern int __new_sem_post (sem_t *sem); +++extern int __new_sem_wait (sem_t *sem); +++extern int __old_sem_wait (sem_t *sem); +++extern int __new_sem_trywait (sem_t *sem); +++extern int __new_sem_getvalue (sem_t *sem, int *sval); ++--- /dev/null +++++ b/fbtl/shlib-versions ++@@ -0,0 +1 @@ +++libpthread=0 GLIBC_2.3 ++--- /dev/null +++++ b/fbtl/sigaction.c ++@@ -0,0 +1,43 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++ +++/* This is no complete implementation. The file is meant to be +++ included in the real implementation to provide the wrapper around +++ __libc_sigaction. */ +++ +++#include +++ +++/* We use the libc implementation but we tell it to not allow +++ SIGCANCEL or SIGTIMER to be handled. */ +++#define LIBC_SIGACTION 1 +++ +++ +++int +++__sigaction (int sig, const struct sigaction *act, struct sigaction *oact) +++{ +++ if (__glibc_unlikely (sig == SIGCANCEL || sig == SIGSETXID)) +++ { +++ __set_errno (EINVAL); +++ return -1; +++ } +++ +++ return __libc_sigaction (sig, act, oact); +++} +++libc_hidden_weak (__sigaction) +++weak_alias (__sigaction, sigaction) ++--- /dev/null +++++ b/fbtl/sockperf.c ++@@ -0,0 +1,594 @@ +++#define _GNU_SOURCE +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++#define size_x 320 +++#define size_y 240 +++ +++ +++#define PATH "/tmp/s.sockperf" +++ +++ +++struct thread_param +++{ +++ unsigned int from; +++ unsigned int to; +++ unsigned int nserv; +++}; +++ +++struct coord +++{ +++ unsigned int x; +++ unsigned int y; +++ complex double z; +++}; +++ +++ +++/* We use 64bit values for the times. */ +++typedef unsigned long long int hp_timing_t; +++ +++ +++static unsigned int nclients = 2; +++static unsigned int nservers = 2; +++ +++static bool timing; +++static int points; +++ +++ +++static complex double top_left = -0.7 + 0.2i; +++static complex double bottom_right = -0.5 - 0.0i; +++ +++ +++static int colors[256]; +++static gdImagePtr image; +++static pthread_mutex_t image_lock; +++ +++static int sock; +++ +++ +++static void * +++client (void *arg) +++{ +++ struct thread_param *param = arg; +++ unsigned int cnt; +++ unsigned int nserv = param->nserv; +++ int clisock[nserv]; +++ struct pollfd servpoll[nserv]; +++ struct sockaddr_un servaddr; +++ socklen_t servlen; +++ struct coord c; +++ +++ bool new_coord (void) +++ { +++ if (cnt >= param->to) +++ return false; +++ +++ unsigned int row = cnt / size_x; +++ unsigned int col = cnt % size_x; +++ +++ c.x = col; +++ c.y = row; +++ c.z = (top_left +++ + ((col +++ * (creal (bottom_right) - creal (top_left))) / size_x) +++ + (_Complex_I * (row * (cimag (bottom_right) - cimag (top_left))) +++ / size_y)); +++ +++ ++cnt; +++ +++ return true; +++ } +++ +++ +++ for (cnt = 0; cnt < nserv; ++cnt) +++ { +++ servpoll[cnt].fd = socket (AF_UNIX, SOCK_STREAM, 0); +++ if (clisock < 0) +++ { +++ puts ("cannot create socket in client"); +++ return NULL; +++ } +++ +++ memset (&servaddr, '\0', sizeof (servaddr)); +++ servaddr.sun_family = AF_UNIX; +++ strncpy (servaddr.sun_path, PATH, sizeof (servaddr.sun_path)); +++ servlen = offsetof (struct sockaddr_un, sun_path) + strlen (PATH) + 1; +++ +++ +++ int err; +++ while (1) +++ { +++ err = TEMP_FAILURE_RETRY (connect (servpoll[cnt].fd, &servaddr, +++ servlen)); +++ if (err != -1 || errno != ECONNREFUSED) +++ break; +++ +++ pthread_yield (); +++ } +++ +++ if (err == -1) +++ { +++ printf ("cannot connect: %m (%d)\n", errno); +++ exit (1); +++ } +++ +++ servpoll[cnt].events = POLLOUT; +++ servpoll[cnt].revents = 0; +++ } +++ +++ cnt = param->from; +++ +++ new_coord (); +++ bool z_valid = true; +++ +++ while (1) +++ { +++ int i; +++ int n = poll (servpoll, nserv, -1); +++ if (n == -1) +++ { +++ puts ("poll returned error"); +++ break; +++ } +++ +++ bool cont = false; +++ for (i = 0; i < nserv && n > 0; ++i) +++ if (servpoll[i].revents != 0) +++ { +++ if (servpoll[i].revents == POLLIN) +++ { +++ unsigned int vals[3]; +++ if (TEMP_FAILURE_RETRY (read (servpoll[i].fd, &vals, +++ sizeof (vals))) +++ != sizeof (vals)) +++ { +++ puts ("read error in client"); +++ return NULL; +++ } +++ +++ pthread_mutex_lock (&image_lock); +++ +++ gdImageSetPixel (image, vals[0], vals[1], vals[2]); +++ ++points; +++ +++ pthread_mutex_unlock (&image_lock); +++ +++ servpoll[i].events = POLLOUT; +++ } +++ else +++ { +++ if (servpoll[i].revents != POLLOUT) +++ printf ("revents: %hd != POLLOUT ???\n", +++ servpoll[i].revents); +++ +++ if (z_valid) +++ { +++ if (TEMP_FAILURE_RETRY (write (servpoll[i].fd, &c, +++ sizeof (c))) != sizeof (c)) +++ { +++ puts ("write error in client"); +++ return NULL; +++ } +++ cont = true; +++ servpoll[i].events = POLLIN; +++ +++ z_valid = new_coord (); +++ if (! z_valid) +++ /* No more to do. Clear the event fields. */ +++ for (i = 0; i < nserv; ++i) +++ if (servpoll[i].events == POLLOUT) +++ servpoll[i].events = servpoll[i].revents = 0; +++ } +++ else +++ servpoll[i].events = servpoll[i].revents = 0; +++ } +++ +++ --n; +++ } +++ else if (servpoll[i].events != 0) +++ cont = true; +++ +++ if (! cont && ! z_valid) +++ break; +++ } +++ +++ c.x = 0xffffffff; +++ c.y = 0xffffffff; +++ for (cnt = 0; cnt < nserv; ++cnt) +++ { +++ TEMP_FAILURE_RETRY (write (servpoll[cnt].fd, &c, sizeof (c))); +++ close (servpoll[cnt].fd); +++ } +++ +++ return NULL; +++} +++ +++ +++static void * +++server (void *arg) +++{ +++ struct sockaddr_un cliaddr; +++ socklen_t clilen; +++ int clisock = TEMP_FAILURE_RETRY (accept (sock, &cliaddr, &clilen)); +++ +++ if (clisock == -1) +++ { +++ puts ("accept failed"); +++ return NULL; +++ } +++ +++ while (1) +++ { +++ struct coord c; +++ +++ if (TEMP_FAILURE_RETRY (read (clisock, &c, sizeof (c))) != sizeof (c)) +++ { +++ printf ("server read failed: %m (%d)\n", errno); +++ break; +++ } +++ +++ if (c.x == 0xffffffff && c.y == 0xffffffff) +++ break; +++ +++ unsigned int rnds = 0; +++ complex double z = c.z; +++ while (cabs (z) < 4.0) +++ { +++ z = z * z - 1; +++ if (++rnds == 255) +++ break; +++ } +++ +++ unsigned int vals[3] = { c.x, c.y, rnds }; +++ if (TEMP_FAILURE_RETRY (write (clisock, vals, sizeof (vals))) +++ != sizeof (vals)) +++ { +++ puts ("server write error"); +++ return NULL; +++ } +++ } +++ +++ close (clisock); +++ +++ return NULL; +++} +++ +++ +++static const char *outfilename = "test.png"; +++ +++ +++static const struct argp_option options[] = +++ { +++ { "clients", 'c', "NUMBER", 0, "Number of client threads" }, +++ { "servers", 's', "NUMBER", 0, "Number of server threads per client" }, +++ { "timing", 'T', NULL, 0, +++ "Measure time from startup to the last thread finishing" }, +++ { NULL, 0, NULL, 0, NULL } +++ }; +++ +++/* Prototype for option handler. */ +++static error_t parse_opt (int key, char *arg, struct argp_state *state); +++ +++/* Data structure to communicate with argp functions. */ +++static struct argp argp = +++{ +++ options, parse_opt +++}; +++ +++ +++int +++main (int argc, char *argv[]) +++{ +++ int cnt; +++ FILE *outfile; +++ struct sockaddr_un servaddr; +++ socklen_t servlen; +++ int remaining; +++ +++ /* Parse and process arguments. */ +++ argp_parse (&argp, argc, argv, 0, &remaining, NULL); +++ +++ +++ pthread_t servth[nservers * nclients]; +++ pthread_t clntth[nclients]; +++ struct thread_param clntparam[nclients]; +++ +++ +++ image = gdImageCreate (size_x, size_y); +++ if (image == NULL) +++ { +++ puts ("gdImageCreate failed"); +++ return 1; +++ } +++ +++ for (cnt = 0; cnt < 255; ++cnt) +++ colors[cnt] = gdImageColorAllocate (image, 256 - cnt, 256 - cnt, +++ 256 - cnt); +++ /* Black. */ +++ colors[cnt] = gdImageColorAllocate (image, 0, 0, 0); +++ +++ +++ sock = socket (AF_UNIX, SOCK_STREAM, 0); +++ if (sock < 0) +++ error (EXIT_FAILURE, errno, "cannot create socket"); +++ +++ memset (&servaddr, '\0', sizeof (servaddr)); +++ servaddr.sun_family = AF_UNIX; +++ strncpy (servaddr.sun_path, PATH, sizeof (servaddr.sun_path)); +++ servlen = offsetof (struct sockaddr_un, sun_path) + strlen (PATH) + 1; +++ +++ if (bind (sock, &servaddr, servlen) == -1) +++ error (EXIT_FAILURE, errno, "bind failed"); +++ +++ listen (sock, SOMAXCONN); +++ +++ pthread_mutex_init (&image_lock, NULL); +++ +++ +++ struct sigaction sa; +++ sa.sa_handler = SIG_IGN; +++ sigemptyset (&sa.sa_mask); +++ sa.sa_flags = 0; +++ +++ clockid_t cl; +++ struct timespec start_time; +++ if (timing) +++ { +++ if (clock_getcpuclockid (0, &cl) != 0 +++ || clock_gettime (cl, &start_time) != 0) +++ timing = false; +++ } +++ +++ /* Start the servers. */ +++ for (cnt = 0; cnt < nservers * nclients; ++cnt) +++ { +++ if (pthread_create (&servth[cnt], NULL, server, NULL) != 0) +++ { +++ puts ("pthread_create for server failed"); +++ exit (1); +++ } +++ } +++ +++ for (cnt = 0; cnt < nclients; ++cnt) +++ { +++ clntparam[cnt].from = cnt * (size_x * size_y) / nclients; +++ clntparam[cnt].to = MIN ((cnt + 1) * (size_x * size_y) / nclients, +++ size_x * size_y); +++ clntparam[cnt].nserv = nservers; +++ +++ if (pthread_create (&clntth[cnt], NULL, client, &clntparam[cnt]) != 0) +++ { +++ puts ("pthread_create for client failed"); +++ exit (1); +++ } +++ } +++ +++ +++ /* Wait for the clients. */ +++ for (cnt = 0; cnt < nclients; ++cnt) +++ if (pthread_join (clntth[cnt], NULL) != 0) +++ { +++ puts ("client pthread_join failed"); +++ exit (1); +++ } +++ +++ /* Wait for the servers. */ +++ for (cnt = 0; cnt < nclients * nservers; ++cnt) +++ if (pthread_join (servth[cnt], NULL) != 0) +++ { +++ puts ("server pthread_join failed"); +++ exit (1); +++ } +++ +++ +++ if (timing) +++ { +++ struct timespec end_time; +++ +++ if (clock_gettime (cl, &end_time) == 0) +++ { +++ end_time.tv_sec -= start_time.tv_sec; +++ end_time.tv_nsec -= start_time.tv_nsec; +++ if (end_time.tv_nsec < 0) +++ { +++ end_time.tv_nsec += 1000000000; +++ --end_time.tv_sec; +++ } +++ +++ printf ("\nRuntime: %lu.%09lu seconds\n%d points computed\n", +++ (unsigned long int) end_time.tv_sec, +++ (unsigned long int) end_time.tv_nsec, +++ points); +++ } +++ } +++ +++ +++ outfile = fopen (outfilename, "w"); +++ if (outfile == NULL) +++ error (EXIT_FAILURE, errno, "cannot open output file '%s'", outfilename); +++ +++ gdImagePng (image, outfile); +++ +++ fclose (outfile); +++ +++ unlink (PATH); +++ +++ return 0; +++} +++ +++ +++/* Handle program arguments. */ +++static error_t +++parse_opt (int key, char *arg, struct argp_state *state) +++{ +++ switch (key) +++ { +++ case 'c': +++ nclients = strtoul (arg, NULL, 0); +++ break; +++ +++ case 's': +++ nservers = strtoul (arg, NULL, 0); +++ break; +++ +++ case 'T': +++ timing = true; +++ break; +++ +++ default: +++ return ARGP_ERR_UNKNOWN; +++ } +++ +++ return 0; +++} +++ +++ +++static hp_timing_t +++get_clockfreq (void) +++{ +++ /* We read the information from the /proc filesystem. It contains at +++ least one line like +++ cpu MHz : 497.840237 +++ or also +++ cpu MHz : 497.841 +++ We search for this line and convert the number in an integer. */ +++ static hp_timing_t result; +++ int fd; +++ +++ /* If this function was called before, we know the result. */ +++ if (result != 0) +++ return result; +++ +++ fd = open ("/proc/cpuinfo", O_RDONLY); +++ if (__glibc_likely (fd != -1)) +++ { +++ /* XXX AFAIK the /proc filesystem can generate "files" only up +++ to a size of 4096 bytes. */ +++ char buf[4096]; +++ ssize_t n; +++ +++ n = read (fd, buf, sizeof buf); +++ if (__builtin_expect (n, 1) > 0) +++ { +++ char *mhz = memmem (buf, n, "cpu MHz", 7); +++ +++ if (__glibc_likely (mhz != NULL)) +++ { +++ char *endp = buf + n; +++ int seen_decpoint = 0; +++ int ndigits = 0; +++ +++ /* Search for the beginning of the string. */ +++ while (mhz < endp && (*mhz < '0' || *mhz > '9') && *mhz != '\n') +++ ++mhz; +++ +++ while (mhz < endp && *mhz != '\n') +++ { +++ if (*mhz >= '0' && *mhz <= '9') +++ { +++ result *= 10; +++ result += *mhz - '0'; +++ if (seen_decpoint) +++ ++ndigits; +++ } +++ else if (*mhz == '.') +++ seen_decpoint = 1; +++ +++ ++mhz; +++ } +++ +++ /* Compensate for missing digits at the end. */ +++ while (ndigits++ < 6) +++ result *= 10; +++ } +++ } +++ +++ close (fd); +++ } +++ +++ return result; +++} +++ +++ +++int +++clock_getcpuclockid (pid_t pid, clockid_t *clock_id) +++{ +++ /* We don't allow any process ID but our own. */ +++ if (pid != 0 && pid != getpid ()) +++ return EPERM; +++ +++#ifdef CLOCK_PROCESS_CPUTIME_ID +++ /* Store the number. */ +++ *clock_id = CLOCK_PROCESS_CPUTIME_ID; +++ +++ return 0; +++#else +++ /* We don't have a timer for that. */ +++ return ENOENT; +++#endif +++} +++ +++ +++#define HP_TIMING_NOW(Var) __asm__ __volatile__ ("rdtsc" : "=A" (Var)) +++ +++/* Get current value of CLOCK and store it in TP. */ +++int +++clock_gettime (clockid_t clock_id, struct timespec *tp) +++{ +++ int retval = -1; +++ +++ switch (clock_id) +++ { +++ case CLOCK_PROCESS_CPUTIME_ID: +++ { +++ +++ static hp_timing_t freq; +++ hp_timing_t tsc; +++ +++ /* Get the current counter. */ +++ HP_TIMING_NOW (tsc); +++ +++ if (freq == 0) +++ { +++ freq = get_clockfreq (); +++ if (freq == 0) +++ return EINVAL; +++ } +++ +++ /* Compute the seconds. */ +++ tp->tv_sec = tsc / freq; +++ +++ /* And the nanoseconds. This computation should be stable until +++ we get machines with about 16GHz frequency. */ +++ tp->tv_nsec = ((tsc % freq) * UINT64_C (1000000000)) / freq; +++ +++ retval = 0; +++ } +++ break; +++ +++ default: +++ errno = EINVAL; +++ break; +++ } +++ +++ return retval; +++} ++--- /dev/null +++++ b/fbtl/sysdeps/i386/Makefile ++@@ -0,0 +1,26 @@ +++# Copyright (C) 2002-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 +++# . +++ +++ifeq ($(subdir),csu) +++gen-as-const-headers += tcb-offsets.sym +++endif +++ +++ifeq ($(subdir),fbtl) +++CFLAGS-pthread_create.c += -mpreferred-stack-boundary=4 +++CFLAGS-tst-align.c += -mpreferred-stack-boundary=4 +++CFLAGS-tst-align2.c += -mpreferred-stack-boundary=4 +++endif ++--- /dev/null +++++ b/fbtl/sysdeps/i386/i486/pthread_spin_trylock.S ++@@ -0,0 +1,46 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++ +++ +++#ifdef UP +++# define LOCK +++#else +++# define LOCK lock +++#endif +++ +++ .globl pthread_spin_trylock +++ .type pthread_spin_trylock,@function +++ .align 16 +++pthread_spin_trylock: +++ movl 4(%esp), %edx +++ movl $1, %eax +++ xorl %ecx, %ecx +++ LOCK +++ cmpxchgl %ecx, (%edx) +++ movl $EBUSY, %eax +++#ifdef HAVE_CMOV +++ cmovel %ecx, %eax +++#else +++ jne 0f +++ movl %ecx, %eax +++0: +++#endif +++ ret +++ .size pthread_spin_trylock,.-pthread_spin_trylock ++--- /dev/null +++++ b/fbtl/sysdeps/i386/i586/pthread_spin_trylock.S ++@@ -0,0 +1,19 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include "../i486/pthread_spin_trylock.S" ++--- /dev/null +++++ b/fbtl/sysdeps/i386/i686/Makefile ++@@ -0,0 +1,31 @@ +++# Copyright (C) 2003-2013 Free Software Foundation, Inc. +++# This file is part of the GNU C Library. +++# Contributed by Ulrich Drepper , 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, see +++# . +++ +++ifeq ($(subdir),fbtl) +++# It turns out that stack coloring is in general not good on P4s. Some +++# applications will benefit. We will probably have a configuration option +++# at some point. Enabling coloring can be done with +++# +++# -DCOLORING_INCREMENT=128 +++# +++# What is useful is to avoid the 64k aliasing problem which reliably +++# happens if all stacks use sizes which are a multiple of 64k. Tell +++# the stack allocator to disturb this by allocation one more page if +++# necessary. +++CFLAGS-pthread_create.c += -DMULTI_PAGE_ALIASING=65536 +++endif ++--- /dev/null +++++ b/fbtl/sysdeps/i386/i686/pthread_spin_trylock.S ++@@ -0,0 +1,20 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#define HAVE_CMOV 1 +++#include "../i486/pthread_spin_trylock.S" ++--- /dev/null +++++ b/fbtl/sysdeps/i386/i686/tls.h ++@@ -0,0 +1,35 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#ifndef _TLS_H +++ +++/* Additional definitions for on i686 and up. */ +++ +++ +++/* Macros to load from and store into segment registers. We can use +++ the 32-bit instructions. */ +++#define TLS_GET_GS() \ +++ ({ int __seg; __asm ("movl %%gs, %0" : "=q" (__seg)); __seg; }) +++#define TLS_SET_GS(val) \ +++ __asm ("movl %0, %%gs" :: "q" (val)) +++ +++ +++/* Get the full set of definitions. */ +++#include "../tls.h" +++ +++#endif /* tls.h */ ++--- /dev/null +++++ b/fbtl/sysdeps/i386/pthread_spin_init.c ++@@ -0,0 +1,19 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++/* Not needed. pthread_spin_init is an alias for pthread_spin_unlock. */ ++--- /dev/null +++++ b/fbtl/sysdeps/i386/pthread_spin_lock.S ++@@ -0,0 +1,37 @@ +++/* Copyright (C) 2012-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 +++ . */ +++ +++#include +++ +++ .globl pthread_spin_lock +++ .type pthread_spin_lock,@function +++ .align 16 +++pthread_spin_lock: +++ mov 4(%esp), %eax +++1: LOCK +++ decl 0(%eax) +++ jne 2f +++ xor %eax, %eax +++ ret +++ +++ .align 16 +++2: rep +++ nop +++ cmpl $0, 0(%eax) +++ jg 1b +++ jmp 2b +++ .size pthread_spin_lock,.-pthread_spin_lock ++--- /dev/null +++++ b/fbtl/sysdeps/i386/pthread_spin_unlock.S ++@@ -0,0 +1,31 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++ .globl pthread_spin_unlock +++ .type pthread_spin_unlock,@function +++ .align 16 +++pthread_spin_unlock: +++ movl 4(%esp), %eax +++ movl $1, (%eax) +++ xorl %eax, %eax +++ ret +++ .size pthread_spin_unlock,.-pthread_spin_unlock +++ +++ /* The implementation of pthread_spin_init is identical. */ +++ .globl pthread_spin_init +++pthread_spin_init = pthread_spin_unlock ++--- /dev/null +++++ b/fbtl/sysdeps/i386/pthreaddef.h ++@@ -0,0 +1,40 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++/* Default stack size. */ +++#define ARCH_STACK_DEFAULT_SIZE (2 * 1024 * 1024) +++ +++/* Required stack pointer alignment at beginning. SSE requires 16 +++ bytes. */ +++#define STACK_ALIGN 16 +++ +++/* Minimal stack size after allocating thread descriptor and guard size. */ +++#define MINIMAL_REST_STACK 2048 +++ +++/* Alignment requirement for TCB. +++ +++ Some processors such as Intel Atom pay a big penalty on every +++ access using a segment override if that segment's base is not +++ aligned to the size of a cache line. (See Intel 64 and IA-32 +++ Architectures Optimization Reference Manual, section 13.3.3.3, +++ "Segment Base".) On such machines, a cache line is 64 bytes. */ +++#define TCB_ALIGNMENT 64 +++ +++ +++/* Location of current stack frame. */ +++#define CURRENT_STACK_FRAME __builtin_frame_address (0) ++--- /dev/null +++++ b/fbtl/sysdeps/i386/tcb-offsets.sym ++@@ -0,0 +1,16 @@ +++#include +++#include +++ +++RESULT offsetof (struct pthread, result) +++TID offsetof (struct pthread, tid) +++CANCELHANDLING offsetof (struct pthread, cancelhandling) +++CLEANUP_JMP_BUF offsetof (struct pthread, cleanup_jmp_buf) +++MULTIPLE_THREADS_OFFSET offsetof (tcbhead_t, multiple_threads) +++SYSINFO_OFFSET offsetof (tcbhead_t, sysinfo) +++CLEANUP offsetof (struct pthread, cleanup) +++CLEANUP_PREV offsetof (struct _pthread_cleanup_buffer, __prev) +++MUTEX_FUTEX offsetof (pthread_mutex_t, __data.__lock) +++POINTER_GUARD offsetof (tcbhead_t, pointer_guard) +++#ifndef __ASSUME_PRIVATE_FUTEX +++PRIVATE_FUTEX offsetof (tcbhead_t, private_futex) +++#endif ++--- /dev/null +++++ b/fbtl/sysdeps/i386/tls.h ++@@ -0,0 +1,459 @@ +++/* Definition for thread-local data handling. nptl/i386 version. +++ Copyright (C) 2002-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 +++ . */ +++ +++#ifndef _TLS_H +++#define _TLS_H 1 +++ +++#include +++#ifndef __ASSEMBLER__ +++# include +++# include +++# include +++# include +++# include +++# include +++# include +++# include +++ +++typedef struct +++{ +++ void *tcb; /* Pointer to the TCB. Not necessarily the +++ thread descriptor used by libpthread. */ +++ dtv_t *dtv; +++ void *self; /* Pointer to the thread descriptor. */ +++ int multiple_threads; +++ uintptr_t sysinfo; +++ uintptr_t stack_guard; +++ uintptr_t pointer_guard; +++ int gscope_flag; +++#ifndef __ASSUME_PRIVATE_FUTEX +++ int private_futex; +++#else +++ int __glibc_reserved1; +++#endif +++ /* Reservation of some values for the TM ABI. */ +++ void *__private_tm[4]; +++ /* GCC split stack support. */ +++ void *__private_ss; +++} tcbhead_t; +++ +++# define TLS_MULTIPLE_THREADS_IN_TCB 1 +++ +++#else /* __ASSEMBLER__ */ +++# include +++#endif +++ +++ +++/* Alignment requirement for the stack. For IA-32 this is governed by +++ the SSE memory functions. */ +++#define STACK_ALIGN 16 +++ +++#ifndef __ASSEMBLER__ +++/* Get system call information. */ +++# include +++ +++/* The old way: using LDT. */ +++ +++/* Structure passed to `modify_ldt', 'set_thread_area', and 'clone' calls. */ +++struct user_desc +++{ +++ unsigned int entry_number; +++ unsigned long int base_addr; +++ unsigned int limit; +++ unsigned int seg_32bit:1; +++ unsigned int contents:2; +++ unsigned int read_exec_only:1; +++ unsigned int limit_in_pages:1; +++ unsigned int seg_not_present:1; +++ unsigned int useable:1; +++ unsigned int empty:25; +++}; +++ +++/* Initializing bit fields is slow. We speed it up by using a union. */ +++union user_desc_init +++{ +++ struct user_desc desc; +++ unsigned int vals[4]; +++}; +++ +++ +++/* This is the size of the initial TCB. Can't be just sizeof (tcbhead_t), +++ because NPTL getpid, __libc_alloca_cutoff etc. need (almost) the whole +++ struct pthread even when not linked with -lpthread. */ +++# define TLS_INIT_TCB_SIZE sizeof (struct pthread) +++ +++/* Alignment requirements for the initial TCB. */ +++# define TLS_INIT_TCB_ALIGN __alignof__ (struct pthread) +++ +++/* This is the size of the TCB. */ +++# define TLS_TCB_SIZE sizeof (struct pthread) +++ +++/* Alignment requirements for the TCB. */ +++# define TLS_TCB_ALIGN __alignof__ (struct pthread) +++ +++/* The TCB can have any size and the memory following the address the +++ thread pointer points to is unspecified. Allocate the TCB there. */ +++# define TLS_TCB_AT_TP 1 +++# define TLS_DTV_AT_TP 0 +++ +++/* Get the thread descriptor definition. */ +++# include +++ +++ +++/* Install the dtv pointer. The pointer passed is to the element with +++ index -1 which contain the length. */ +++# define INSTALL_DTV(descr, dtvp) \ +++ ((tcbhead_t *) (descr))->dtv = (dtvp) + 1 +++ +++/* Install new dtv for current thread. */ +++# define INSTALL_NEW_DTV(dtvp) \ +++ ({ struct pthread *__pd; \ +++ THREAD_SETMEM (__pd, header.dtv, (dtvp)); }) +++ +++/* Return dtv of given thread descriptor. */ +++# define GET_DTV(descr) \ +++ (((tcbhead_t *) (descr))->dtv) +++ +++#define THREAD_SELF_SYSINFO THREAD_GETMEM (THREAD_SELF, header.sysinfo) +++#define THREAD_SYSINFO(pd) ((pd)->header.sysinfo) +++ +++/* Macros to load from and store into segment registers. */ +++# ifndef TLS_GET_GS +++# define TLS_GET_GS() \ +++ ({ int __seg; __asm ("movw %%gs, %w0" : "=q" (__seg)); __seg & 0xffff; }) +++# endif +++# ifndef TLS_SET_GS +++# define TLS_SET_GS(val) \ +++ __asm ("movw %w0, %%gs" :: "q" (val)) +++# endif +++ +++ +++# ifndef __NR_set_thread_area +++# define __NR_set_thread_area 243 +++# endif +++# ifndef TLS_FLAG_WRITABLE +++# define TLS_FLAG_WRITABLE 0x00000001 +++# endif +++ +++// XXX Enable for the real world. +++#if 0 +++# ifndef __ASSUME_SET_THREAD_AREA +++# error "we need set_thread_area" +++# endif +++#endif +++ +++# ifdef __PIC__ +++# define TLS_EBX_ARG "r" +++# define TLS_LOAD_EBX "xchgl %3, %%ebx\n\t" +++# else +++# define TLS_EBX_ARG "b" +++# define TLS_LOAD_EBX +++# endif +++ +++#if defined NEED_DL_SYSINFO +++# define INIT_SYSINFO \ +++ _head->sysinfo = GLRO(dl_sysinfo) +++#else +++# define INIT_SYSINFO +++#endif +++ +++#ifndef LOCK_PREFIX +++# ifdef UP +++# define LOCK_PREFIX /* nothing */ +++# else +++# define LOCK_PREFIX "lock;" +++# endif +++#endif +++ +++/* 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(thrdescr) \ +++ ({ void *_thrdescr = (thrdescr); \ +++ tcbhead_t *_head = _thrdescr; \ +++ union user_desc_init _segdescr; \ +++ int _result; \ +++ \ +++ _head->tcb = _thrdescr; \ +++ /* For now the thread descriptor is at the same address. */ \ +++ _head->self = _thrdescr; \ +++ /* New syscall handling support. */ \ +++ INIT_SYSINFO; \ +++ \ +++ /* The 'entry_number' field. Let the kernel pick a value. */ \ +++ _segdescr.vals[0] = -1; \ +++ /* The 'base_addr' field. Pointer to the TCB. */ \ +++ _segdescr.vals[1] = (unsigned long int) _thrdescr; \ +++ /* The 'limit' field. We use 4GB which is 0xfffff pages. */ \ +++ _segdescr.vals[2] = 0xfffff; \ +++ /* Collapsed value of the bitfield: \ +++ .seg_32bit = 1 \ +++ .contents = 0 \ +++ .read_exec_only = 0 \ +++ .limit_in_pages = 1 \ +++ .seg_not_present = 0 \ +++ .useable = 1 */ \ +++ _segdescr.vals[3] = 0x51; \ +++ \ +++ /* Install the TLS. */ \ +++ asm volatile (TLS_LOAD_EBX \ +++ "int $0x80\n\t" \ +++ TLS_LOAD_EBX \ +++ : "=a" (_result), "=m" (_segdescr.desc.entry_number) \ +++ : "0" (__NR_set_thread_area), \ +++ TLS_EBX_ARG (&_segdescr.desc), "m" (_segdescr.desc)); \ +++ \ +++ if (_result == 0) \ +++ /* We know the index in the GDT, now load the segment register. \ +++ The use of the GDT is described by the value 3 in the lower \ +++ three bits of the segment descriptor value. \ +++ \ +++ Note that we have to do this even if the numeric value of \ +++ the descriptor does not change. Loading the segment register \ +++ causes the segment information from the GDT to be loaded \ +++ which is necessary since we have changed it. */ \ +++ TLS_SET_GS (_segdescr.desc.entry_number * 8 + 3); \ +++ \ +++ _result == 0 ? NULL \ +++ : "set_thread_area failed when setting up thread-local storage\n"; }) +++ +++ +++/* Return the address of the dtv for the current thread. */ +++# define THREAD_DTV() \ +++ ({ struct pthread *__pd; \ +++ THREAD_GETMEM (__pd, header.dtv); }) +++ +++ +++/* Return the thread descriptor for the current thread. +++ +++ The contained asm must *not* be marked volatile since otherwise +++ assignments like +++ pthread_descr self = thread_self(); +++ do not get optimized away. */ +++# define THREAD_SELF \ +++ ({ struct pthread *__self; \ +++ asm ("movl %%gs:%c1,%0" : "=r" (__self) \ +++ : "i" (offsetof (struct pthread, header.self))); \ +++ __self;}) +++ +++/* Magic for libthread_db to know how to do THREAD_SELF. */ +++# define DB_THREAD_SELF \ +++ REGISTER_THREAD_AREA (32, offsetof (struct user_regs_struct, xgs), 3) \ +++ REGISTER_THREAD_AREA (64, 26 * 8, 3) /* x86-64's user_regs_struct->gs */ +++ +++ +++/* Read member of the thread descriptor directly. */ +++# define THREAD_GETMEM(descr, member) \ +++ ({ __typeof (descr->member) __value; \ +++ if (sizeof (__value) == 1) \ +++ asm volatile ("movb %%gs:%P2,%b0" \ +++ : "=q" (__value) \ +++ : "0" (0), "i" (offsetof (struct pthread, member))); \ +++ else if (sizeof (__value) == 4) \ +++ asm volatile ("movl %%gs:%P1,%0" \ +++ : "=r" (__value) \ +++ : "i" (offsetof (struct pthread, member))); \ +++ else \ +++ { \ +++ if (sizeof (__value) != 8) \ +++ /* There should not be any value with a size other than 1, \ +++ 4 or 8. */ \ +++ abort (); \ +++ \ +++ asm volatile ("movl %%gs:%P1,%%eax\n\t" \ +++ "movl %%gs:%P2,%%edx" \ +++ : "=A" (__value) \ +++ : "i" (offsetof (struct pthread, member)), \ +++ "i" (offsetof (struct pthread, member) + 4)); \ +++ } \ +++ __value; }) +++ +++ +++/* Same as THREAD_GETMEM, but the member offset can be non-constant. */ +++# define THREAD_GETMEM_NC(descr, member, idx) \ +++ ({ __typeof (descr->member[0]) __value; \ +++ if (sizeof (__value) == 1) \ +++ asm volatile ("movb %%gs:%P2(%3),%b0" \ +++ : "=q" (__value) \ +++ : "0" (0), "i" (offsetof (struct pthread, member[0])), \ +++ "r" (idx)); \ +++ else if (sizeof (__value) == 4) \ +++ asm volatile ("movl %%gs:%P1(,%2,4),%0" \ +++ : "=r" (__value) \ +++ : "i" (offsetof (struct pthread, member[0])), \ +++ "r" (idx)); \ +++ else \ +++ { \ +++ if (sizeof (__value) != 8) \ +++ /* There should not be any value with a size other than 1, \ +++ 4 or 8. */ \ +++ abort (); \ +++ \ +++ asm volatile ("movl %%gs:%P1(,%2,8),%%eax\n\t" \ +++ "movl %%gs:4+%P1(,%2,8),%%edx" \ +++ : "=&A" (__value) \ +++ : "i" (offsetof (struct pthread, member[0])), \ +++ "r" (idx)); \ +++ } \ +++ __value; }) +++ +++ +++/* Same as THREAD_SETMEM, but the member offset can be non-constant. */ +++# define THREAD_SETMEM(descr, member, value) \ +++ ({ if (sizeof (descr->member) == 1) \ +++ asm volatile ("movb %b0,%%gs:%P1" : \ +++ : "iq" (value), \ +++ "i" (offsetof (struct pthread, member))); \ +++ else if (sizeof (descr->member) == 4) \ +++ asm volatile ("movl %0,%%gs:%P1" : \ +++ : "ir" (value), \ +++ "i" (offsetof (struct pthread, member))); \ +++ else \ +++ { \ +++ if (sizeof (descr->member) != 8) \ +++ /* There should not be any value with a size other than 1, \ +++ 4 or 8. */ \ +++ abort (); \ +++ \ +++ asm volatile ("movl %%eax,%%gs:%P1\n\t" \ +++ "movl %%edx,%%gs:%P2" : \ +++ : "A" ((uint64_t) cast_to_integer (value)), \ +++ "i" (offsetof (struct pthread, member)), \ +++ "i" (offsetof (struct pthread, member) + 4)); \ +++ }}) +++ +++ +++/* Set member of the thread descriptor directly. */ +++# define THREAD_SETMEM_NC(descr, member, idx, value) \ +++ ({ if (sizeof (descr->member[0]) == 1) \ +++ asm volatile ("movb %b0,%%gs:%P1(%2)" : \ +++ : "iq" (value), \ +++ "i" (offsetof (struct pthread, member)), \ +++ "r" (idx)); \ +++ else if (sizeof (descr->member[0]) == 4) \ +++ asm volatile ("movl %0,%%gs:%P1(,%2,4)" : \ +++ : "ir" (value), \ +++ "i" (offsetof (struct pthread, member)), \ +++ "r" (idx)); \ +++ else \ +++ { \ +++ if (sizeof (descr->member[0]) != 8) \ +++ /* There should not be any value with a size other than 1, \ +++ 4 or 8. */ \ +++ abort (); \ +++ \ +++ asm volatile ("movl %%eax,%%gs:%P1(,%2,8)\n\t" \ +++ "movl %%edx,%%gs:4+%P1(,%2,8)" : \ +++ : "A" ((uint64_t) cast_to_integer (value)), \ +++ "i" (offsetof (struct pthread, member)), \ +++ "r" (idx)); \ +++ }}) +++ +++ +++/* Atomic compare and exchange on TLS, returning old value. */ +++#define THREAD_ATOMIC_CMPXCHG_VAL(descr, member, newval, oldval) \ +++ ({ __typeof (descr->member) __ret; \ +++ __typeof (oldval) __old = (oldval); \ +++ if (sizeof (descr->member) == 4) \ +++ asm volatile (LOCK_PREFIX "cmpxchgl %2, %%gs:%P3" \ +++ : "=a" (__ret) \ +++ : "0" (__old), "r" (newval), \ +++ "i" (offsetof (struct pthread, member))); \ +++ else \ +++ /* Not necessary for other sizes in the moment. */ \ +++ abort (); \ +++ __ret; }) +++ +++ +++/* Atomic logical and. */ +++#define THREAD_ATOMIC_AND(descr, member, val) \ +++ (void) ({ if (sizeof ((descr)->member) == 4) \ +++ asm volatile (LOCK_PREFIX "andl %1, %%gs:%P0" \ +++ :: "i" (offsetof (struct pthread, member)), \ +++ "ir" (val)); \ +++ else \ +++ /* Not necessary for other sizes in the moment. */ \ +++ abort (); }) +++ +++ +++/* Atomic set bit. */ +++#define THREAD_ATOMIC_BIT_SET(descr, member, bit) \ +++ (void) ({ if (sizeof ((descr)->member) == 4) \ +++ asm volatile (LOCK_PREFIX "orl %1, %%gs:%P0" \ +++ :: "i" (offsetof (struct pthread, member)), \ +++ "ir" (1 << (bit))); \ +++ else \ +++ /* Not necessary for other sizes in the moment. */ \ +++ abort (); }) +++ +++ +++/* Call the user-provided thread function. */ +++#define CALL_THREAD_FCT(descr) \ +++ ({ void *__res; \ +++ int __ignore1, __ignore2; \ +++ asm volatile ("pushl %%eax\n\t" \ +++ "pushl %%eax\n\t" \ +++ "pushl %%eax\n\t" \ +++ "pushl %%gs:%P4\n\t" \ +++ "call *%%gs:%P3\n\t" \ +++ "addl $16, %%esp" \ +++ : "=a" (__res), "=c" (__ignore1), "=d" (__ignore2) \ +++ : "i" (offsetof (struct pthread, start_routine)), \ +++ "i" (offsetof (struct pthread, arg))); \ +++ __res; }) +++ +++ +++/* Set the stack guard field in TCB head. */ +++#define THREAD_SET_STACK_GUARD(value) \ +++ THREAD_SETMEM (THREAD_SELF, header.stack_guard, value) +++#define THREAD_COPY_STACK_GUARD(descr) \ +++ ((descr)->header.stack_guard \ +++ = THREAD_GETMEM (THREAD_SELF, header.stack_guard)) +++ +++ +++/* Set the pointer guard field in the TCB head. */ +++#define THREAD_SET_POINTER_GUARD(value) \ +++ THREAD_SETMEM (THREAD_SELF, header.pointer_guard, value) +++#define THREAD_COPY_POINTER_GUARD(descr) \ +++ ((descr)->header.pointer_guard \ +++ = THREAD_GETMEM (THREAD_SELF, header.pointer_guard)) +++ +++ +++/* Get and set the global scope generation counter in the TCB head. */ +++#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; \ +++ asm volatile ("xchgl %0, %%gs:%P1" \ +++ : "=r" (__res) \ +++ : "i" (offsetof (struct pthread, header.gscope_flag)), \ +++ "0" (THREAD_GSCOPE_FLAG_UNUSED)); \ +++ if (__res == THREAD_GSCOPE_FLAG_WAIT) \ +++ lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1, LLL_PRIVATE); \ +++ } \ +++ while (0) +++#define THREAD_GSCOPE_SET_FLAG() \ +++ THREAD_SETMEM (THREAD_SELF, header.gscope_flag, THREAD_GSCOPE_FLAG_USED) +++#define THREAD_GSCOPE_WAIT() \ +++ GL(dl_wait_lookup_done) () +++ +++#endif /* __ASSEMBLER__ */ +++ +++#endif /* tls.h */ ++--- /dev/null +++++ b/fbtl/sysdeps/pthread/Makefile ++@@ -0,0 +1,39 @@ +++# Copyright (C) 2002-2013 Free Software Foundation, Inc. +++# This file is part of the GNU C Library. +++# Contributed by Ulrich Drepper , 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, see +++# . +++ +++ifeq ($(subdir),fbtl) +++libpthread-sysdep_routines += errno-loc +++endif +++ +++ifeq ($(subdir),rt) +++librt-sysdep_routines += timer_routines librt-cancellation +++CFLAGS-librt-cancellation.c += -fexceptions -fasynchronous-unwind-tables +++ +++ifeq (yes,$(build-shared)) +++$(objpfx)tst-timer: $(objpfx)librt.so $(shared-thread-library) +++else +++$(objpfx)tst-timer: $(objpfx)librt.a $(static-thread-library) +++endif +++ +++tests += tst-mqueue8x +++CFLAGS-tst-mqueue8x.c += -fexceptions +++endif +++ +++ifeq ($(subdir),posix) +++CFLAGS-confstr.c += -DLIBPTHREAD_VERSION='"FBTL $(version)"' +++endif ++--- /dev/null +++++ b/fbtl/sysdeps/pthread/Subdirs ++@@ -0,0 +1,2 @@ +++fbtl +++fbtl_db ++--- /dev/null +++++ b/fbtl/sysdeps/pthread/aio_misc.h ++@@ -0,0 +1,74 @@ +++/* Copyright (C) 2006-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 +++ . */ +++ +++/* We define a special synchronization primitive for AIO. POSIX +++ conditional variables would be ideal but the pthread_cond_*wait +++ operations do not return on EINTR. This is a requirement for +++ correct aio_suspend and lio_listio implementations. */ +++ +++#include +++#include +++#include +++ +++#define DONT_NEED_AIO_MISC_COND 1 +++ +++#define AIO_MISC_NOTIFY(waitlist) \ +++ do { \ +++ if (*waitlist->counterp > 0 && --*waitlist->counterp == 0) \ +++ lll_futex_wake (waitlist->counterp, 1, LLL_PRIVATE); \ +++ } while (0) +++ +++#define AIO_MISC_WAIT(result, futex, timeout, cancel) \ +++ do { \ +++ volatile int *futexaddr = &futex; \ +++ int oldval = futex; \ +++ \ +++ if (oldval != 0) \ +++ { \ +++ pthread_mutex_unlock (&__aio_requests_mutex); \ +++ \ +++ int oldtype; \ +++ if (cancel) \ +++ oldtype = LIBC_CANCEL_ASYNC (); \ +++ \ +++ int status; \ +++ do \ +++ { \ +++ status = lll_futex_timed_wait (futexaddr, oldval, timeout, \ +++ LLL_PRIVATE); \ +++ if (status != EWOULDBLOCK) \ +++ break; \ +++ \ +++ oldval = *futexaddr; \ +++ } \ +++ while (oldval != 0); \ +++ \ +++ if (cancel) \ +++ LIBC_CANCEL_RESET (oldtype); \ +++ \ +++ if (status == EINTR) \ +++ result = EINTR; \ +++ else if (status == ETIMEDOUT) \ +++ result = EAGAIN; \ +++ else \ +++ assert (status == 0 || status == EWOULDBLOCK); \ +++ \ +++ pthread_mutex_lock (&__aio_requests_mutex); \ +++ } \ +++ } while (0) +++ +++#include_next ++--- /dev/null +++++ b/fbtl/sysdeps/pthread/allocalim.h ++@@ -0,0 +1,29 @@ +++/* Determine whether block of given size can be allocated on the stack or not. +++ Copyright (C) 2002-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; see the file COPYING.LIB. If +++ not, see . */ +++ +++#include +++#include +++ +++ +++extern __always_inline +++int +++__libc_use_alloca (size_t size) +++{ +++ return (__builtin_expect (size <= PTHREAD_STACK_MIN / 4, 1) +++ || __builtin_expect (__libc_alloca_cutoff (size), 1)); +++} ++--- /dev/null +++++ b/fbtl/sysdeps/pthread/bits/sigthread.h ++@@ -0,0 +1,43 @@ +++/* Signal handling function for threaded programs. +++ Copyright (C) 1998-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; see the file COPYING.LIB. If +++ not, see . */ +++ +++#ifndef _BITS_SIGTHREAD_H +++#define _BITS_SIGTHREAD_H 1 +++ +++#if !defined _SIGNAL_H && !defined _PTHREAD_H +++# error "Never include this file directly. Use 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; +++ +++#ifdef __USE_GNU +++/* Queue signal and data to a thread. */ +++extern int pthread_sigqueue (pthread_t __threadid, int __signo, +++ const union sigval __value) __THROW; +++#endif +++ +++#endif /* bits/sigthread.h */ ++--- /dev/null +++++ b/fbtl/sysdeps/pthread/createthread.c ++@@ -0,0 +1,298 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++#include "kernel-features.h" +++ +++ +++#define CLONE_SIGNAL (CLONE_SIGHAND | CLONE_THREAD) +++ +++/* Unless otherwise specified, the thread "register" is going to be +++ initialized with a pointer to the TCB. */ +++#ifndef TLS_VALUE +++# define TLS_VALUE pd +++#endif +++ +++#ifndef ARCH_CLONE +++# define ARCH_CLONE __clone +++#endif +++ +++ +++#ifndef TLS_MULTIPLE_THREADS_IN_TCB +++/* Pointer to the corresponding variable in libc. */ +++int *__libc_multiple_threads_ptr attribute_hidden; +++#endif +++ +++ +++struct rtprio; +++struct thr_param { +++ int (*start_func)(void *); /* thread entry function. */ +++ void *arg; /* argument for entry function. */ +++ char *stack_base; /* stack base address. */ +++ size_t stack_size; /* stack size. */ +++ char *tls_base; /* tls base address. */ +++ size_t tls_size; /* tls size. */ +++ long *child_tid; /* address to store new TID. */ +++ long *parent_tid; /* parent accesses the new TID here. */ +++ int flags; /* thread flags. */ +++ struct rtprio *rtp; /* Real-time scheduling priority */ +++ void *spare[3]; /* TODO: cpu affinity mask etc. */ +++}; +++ +++ +++static int +++do_clone (struct pthread *pd, const struct pthread_attr *attr, +++ int clone_flags, int (*fct) (void *), STACK_VARIABLES_PARMS, +++ int stopped) +++{ +++#ifdef PREPARE_CREATE +++ PREPARE_CREATE; +++#endif +++ +++ struct thr_param p; +++ +++ if (__glibc_unlikely (stopped != 0)) +++ /* We make sure the thread does not run far by forcing it to get a +++ lock. We lock it here too so that the new thread cannot continue +++ until we tell it to. */ +++ lll_lock (pd->lock, LLL_PRIVATE); +++ +++ /* One more thread. We cannot have the thread do this itself, since it +++ might exist but not have been scheduled yet by the time we've returned +++ and need to check the value to behave correctly. We must do it before +++ creating the thread, in case it does get scheduled first and then +++ might mistakenly think it was the only thread. In the failure case, +++ we momentarily store a false value; this doesn't matter because there +++ is no kosher thing a signal handler interrupting us right here can do +++ that cares whether the thread count is correct. */ +++ atomic_increment (&__nptl_nthreads); +++#if 0 +++ int rc = ARCH_CLONE (fct, STACK_VARIABLES_ARGS, clone_flags, +++ pd, &pd->tid, TLS_VALUE, &pd->tid); +++ +++#else +++ memset(&p, 0, sizeof(p)); +++ p.start_func = fct; +++ p.arg = pd; +++ p.stack_base = stackaddr; /* first in STACK_VARIABLES_ARGS */ +++ p.stack_size = stacksize; /* second in STACK_VARIABLES_ARGS */ +++ p.tls_base = (char*)pd; +++ p.child_tid = &(pd->ktid); +++ +++ int rc = INLINE_SYSCALL(thr_new, 2, &p, sizeof(p)); +++ +++ if (rc) +++ { +++ errno = rc; +++ rc = -1;; +++ } +++#endif +++ +++ +++ if (__glibc_unlikely (rc == -1)) +++ { +++ atomic_decrement (&__nptl_nthreads); /* Oops, we lied for a second. */ +++ pd->ktid = 0; +++ +++ /* Perhaps a thread wants to change the IDs and if waiting +++ for this stillborn thread. */ +++ if (__builtin_expect (atomic_exchange_acq (&pd->setxid_futex, 0) +++ == -2, 0)) +++ lll_futex_wake (&pd->setxid_futex, 1, LLL_PRIVATE); +++ +++ /* Free the resources. */ +++ __deallocate_stack (pd); +++ +++ /* We have to translate error codes. */ +++ return errno == ENOMEM ? EAGAIN : errno; +++ } +++#warning set scheduling parameters +++#if 0 +++ /* Now we have the possibility to set scheduling parameters etc. */ +++ if (__glibc_unlikely (stopped != 0)) +++ { +++ INTERNAL_SYSCALL_DECL (err); +++ int res = 0; +++ +++ /* Set the affinity mask if necessary. */ +++ if (attr->cpuset != NULL) +++ { +++ res = INTERNAL_SYSCALL (sched_setaffinity, err, 3, pd->tid, +++ attr->cpusetsize, attr->cpuset); +++ +++ if (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (res, err))) +++ { +++ /* The operation failed. We have to kill the thread. First +++ send it the cancellation signal. */ +++ INTERNAL_SYSCALL_DECL (err2); +++ err_out: +++ (void) INTERNAL_SYSCALL (tgkill, err2, 3, +++ THREAD_GETMEM (THREAD_SELF, pid), +++ pd->tid, SIGCANCEL); +++ +++ /* We do not free the stack here because the canceled thread +++ itself will do this. */ +++ +++ return (INTERNAL_SYSCALL_ERROR_P (res, err) +++ ? INTERNAL_SYSCALL_ERRNO (res, err) +++ : 0); +++ } +++ } +++ +++ /* Set the scheduling parameters. */ +++ if ((attr->flags & ATTR_FLAG_NOTINHERITSCHED) != 0) +++ { +++ res = INTERNAL_SYSCALL (sched_setscheduler, err, 3, pd->tid, +++ pd->schedpolicy, &pd->schedparam); +++ +++ if (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (res, err))) +++ goto err_out; +++ } +++ } +++#endif +++ +++ /* We now have for sure more than one thread. The main thread might +++ not yet have the flag set. No need to set the global variable +++ again if this is what we use. */ +++ THREAD_SETMEM (THREAD_SELF, header.multiple_threads, 1); +++ +++ return 0; +++} +++ +++ +++static int +++create_thread (struct pthread *pd, const struct pthread_attr *attr, +++ STACK_VARIABLES_PARMS) +++{ +++#ifdef TLS_TCB_AT_TP +++ assert (pd->header.tcb != NULL); +++#endif +++ +++ /* We rely heavily on various flags the CLONE function understands: +++ +++ CLONE_VM, CLONE_FS, CLONE_FILES +++ These flags select semantics with shared address space and +++ file descriptors according to what POSIX requires. +++ +++ CLONE_SIGNAL +++ This flag selects the POSIX signal semantics. +++ +++ CLONE_SETTLS +++ The sixth parameter to CLONE determines the TLS area for the +++ new thread. +++ +++ CLONE_PARENT_SETTID +++ The kernels writes the thread ID of the newly created thread +++ into the location pointed to by the fifth parameters to CLONE. +++ +++ Note that it would be semantically equivalent to use +++ CLONE_CHILD_SETTID but it is be more expensive in the kernel. +++ +++ CLONE_CHILD_CLEARTID +++ The kernels clears the thread ID of a thread that has called +++ sys_exit() in the location pointed to by the seventh parameter +++ to CLONE. +++ +++ The termination signal is chosen to be zero which means no signal +++ is sent. */ +++#if 1 +++#define clone_flags 123456 +++#warning clone +++#else +++ int clone_flags = (CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGNAL +++ | CLONE_SETTLS | CLONE_PARENT_SETTID +++ | CLONE_CHILD_CLEARTID | CLONE_SYSVSEM +++ | 0); +++#endif +++ +++ if (__glibc_unlikely (THREAD_GETMEM (THREAD_SELF, report_events))) +++ { +++ /* The parent thread is supposed to report events. Check whether +++ the TD_CREATE event is needed, too. */ +++ const int _idx = __td_eventword (TD_CREATE); +++ const uint32_t _mask = __td_eventmask (TD_CREATE); +++ +++ if ((_mask & (__nptl_threads_events.event_bits[_idx] +++ | pd->eventbuf.eventmask.event_bits[_idx])) != 0) +++ { +++ /* We always must have the thread start stopped. */ +++ pd->stopped_start = true; +++ +++ /* Create the thread. We always create the thread stopped +++ so that it does not get far before we tell the debugger. */ +++ int res = do_clone (pd, attr, clone_flags, start_thread, +++ STACK_VARIABLES_ARGS, 1); +++ if (res == 0) +++ { +++ /* Now fill in the information about the new thread in +++ the newly created thread's data structure. We cannot let +++ the new thread do this since we don't know whether it was +++ already scheduled when we send the event. */ +++ pd->eventbuf.eventnum = TD_CREATE; +++ pd->eventbuf.eventdata = pd; +++ +++ /* Enqueue the descriptor. */ +++ do +++ pd->nextevent = __nptl_last_event; +++ while (atomic_compare_and_exchange_bool_acq (&__nptl_last_event, +++ pd, pd->nextevent) +++ != 0); +++ +++ /* Now call the function which signals the event. */ +++ __nptl_create_event (); +++ +++ /* And finally restart the new thread. */ +++ lll_unlock (pd->lock, LLL_PRIVATE); +++ } +++ +++ return res; +++ } +++ } +++ +++#ifdef NEED_DL_SYSINFO +++ assert (THREAD_SELF_SYSINFO == THREAD_SYSINFO (pd)); +++#endif +++ +++ /* Determine whether the newly created threads has to be started +++ stopped since we have to set the scheduling parameters or set the +++ affinity. */ +++ bool stopped = false; +++ if (attr != NULL && (attr->cpuset != NULL +++ || (attr->flags & ATTR_FLAG_NOTINHERITSCHED) != 0)) +++ stopped = true; +++ pd->stopped_start = stopped; +++ pd->parent_cancelhandling = THREAD_GETMEM (THREAD_SELF, cancelhandling); +++ +++ /* Actually create the thread. */ +++ int res = do_clone (pd, attr, clone_flags, start_thread, +++ STACK_VARIABLES_ARGS, stopped); +++ +++ if (res == 0 && stopped) +++ /* And finally restart the new thread. */ +++ lll_unlock (pd->lock, LLL_PRIVATE); +++ +++ return res; +++} ++--- /dev/null +++++ b/fbtl/sysdeps/pthread/flockfile.c ++@@ -0,0 +1,32 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++ +++ +++void +++__flockfile (stream) +++ FILE *stream; +++{ +++ _IO_lock_lock (*stream->_lock); +++} +++strong_alias (__flockfile, _IO_flockfile) +++weak_alias (__flockfile, flockfile) ++--- /dev/null +++++ b/fbtl/sysdeps/pthread/ftrylockfile.c ++@@ -0,0 +1,32 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++ +++ +++int +++__ftrylockfile (stream) +++ FILE *stream; +++{ +++ return _IO_lock_trylock (*stream->_lock); +++} +++strong_alias (__ftrylockfile, _IO_ftrylockfile) +++weak_alias (__ftrylockfile, ftrylockfile) ++--- /dev/null +++++ b/fbtl/sysdeps/pthread/funlockfile.c ++@@ -0,0 +1,32 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++ +++ +++void +++__funlockfile (stream) +++ FILE *stream; +++{ +++ _IO_lock_unlock (*stream->_lock); +++} +++strong_alias (__funlockfile, _IO_funlockfile) +++weak_alias (__funlockfile, funlockfile) ++--- /dev/null +++++ b/fbtl/sysdeps/pthread/gai_misc.h ++@@ -0,0 +1,121 @@ +++/* Copyright (C) 2006-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 +++ . */ +++ +++/* We define a special synchronization primitive for AIO. POSIX +++ conditional variables would be ideal but the pthread_cond_*wait +++ operations do not return on EINTR. This is a requirement for +++ correct aio_suspend and lio_listio implementations. */ +++ +++#include +++#include +++#include +++#include +++ +++#define DONT_NEED_GAI_MISC_COND 1 +++ +++#define GAI_MISC_NOTIFY(waitlist) \ +++ do { \ +++ if (*waitlist->counterp > 0 && --*waitlist->counterp == 0) \ +++ lll_futex_wake ((unsigned int *) waitlist->counterp, 1, LLL_PRIVATE); \ +++ } while (0) +++ +++#define GAI_MISC_WAIT(result, futex, timeout, cancel) \ +++ do { \ +++ volatile int *futexaddr = &futex; \ +++ int oldval = futex; \ +++ \ +++ if (oldval != 0) \ +++ { \ +++ pthread_mutex_unlock (&__gai_requests_mutex); \ +++ \ +++ int oldtype; \ +++ if (cancel) \ +++ oldtype = LIBC_CANCEL_ASYNC (); \ +++ \ +++ int status; \ +++ do \ +++ { \ +++ status = lll_futex_timed_wait ((unsigned int *) futexaddr, oldval,\ +++ timeout, LLL_PRIVATE); \ +++ if (status != EWOULDBLOCK) \ +++ break; \ +++ \ +++ oldval = *futexaddr; \ +++ } \ +++ while (oldval != 0); \ +++ \ +++ if (cancel) \ +++ LIBC_CANCEL_RESET (oldtype); \ +++ \ +++ if (status == EINTR) \ +++ result = EINTR; \ +++ else if (status == ETIMEDOUT) \ +++ result = EAGAIN; \ +++ else \ +++ assert (status == 0 || status == EWOULDBLOCK); \ +++ \ +++ pthread_mutex_lock (&__gai_requests_mutex); \ +++ } \ +++ } while (0) +++ +++ +++#define gai_start_notify_thread __gai_start_notify_thread +++#define gai_create_helper_thread __gai_create_helper_thread +++ +++extern inline void +++__gai_start_notify_thread (void) +++{ +++ sigset_t ss; +++ sigemptyset (&ss); +++ INTERNAL_SYSCALL_DECL (err); +++ INTERNAL_SYSCALL (rt_sigprocmask, err, 4, SIG_SETMASK, &ss, NULL, _NSIG / 8); +++} +++ +++extern inline int +++__gai_create_helper_thread (pthread_t *threadp, void *(*tf) (void *), +++ void *arg) +++{ +++ pthread_attr_t attr; +++ +++ /* Make sure the thread is created detached. */ +++ pthread_attr_init (&attr); +++ pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED); +++ +++ /* The helper thread needs only very little resources. */ +++ (void) pthread_attr_setstacksize (&attr, +++ __pthread_get_minstack (&attr) +++ + 4 * PTHREAD_STACK_MIN); +++ +++ /* Block all signals in the helper thread. To do this thoroughly we +++ temporarily have to block all signals here. */ +++ sigset_t ss; +++ sigset_t oss; +++ sigfillset (&ss); +++ INTERNAL_SYSCALL_DECL (err); +++ INTERNAL_SYSCALL (rt_sigprocmask, err, 4, SIG_SETMASK, &ss, &oss, _NSIG / 8); +++ +++ int ret = pthread_create (threadp, &attr, tf, arg); +++ +++ /* Restore the signal mask. */ +++ INTERNAL_SYSCALL (rt_sigprocmask, err, 4, SIG_SETMASK, &oss, NULL, +++ _NSIG / 8); +++ +++ (void) pthread_attr_destroy (&attr); +++ return ret; +++} +++ +++#include_next ++--- /dev/null +++++ b/fbtl/sysdeps/pthread/libc-lock.h ++@@ -0,0 +1,187 @@ +++/* libc-internal interface for mutex locks. NPTL version. +++ Copyright (C) 1996-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; see the file COPYING.LIB. If +++ not, see . */ +++ +++#ifndef _LIBC_LOCK_H +++#define _LIBC_LOCK_H 1 +++ +++#include +++#define __need_NULL +++#include +++ +++ +++/* Mutex type. */ +++#if defined _LIBC || defined _IO_MTSAFE_IO +++# if (!IS_IN (libc) && !IS_IN (libpthread)) || !defined _LIBC +++typedef struct { pthread_mutex_t mutex; } __libc_lock_recursive_t; +++# else +++typedef struct { int lock; int cnt; void *owner; } __libc_lock_recursive_t; +++# endif +++#else +++typedef struct __libc_lock_recursive_opaque__ __libc_lock_recursive_t; +++#endif +++ +++/* Define a lock variable NAME with storage class CLASS. The lock must be +++ initialized with __libc_lock_init before it can be used (or define it +++ with __libc_lock_define_initialized, below). Use `extern' for CLASS to +++ declare a lock defined in another module. In public structure +++ definitions you must use a pointer to the lock structure (i.e., NAME +++ begins with a `*'), because its storage size will not be known outside +++ of libc. */ +++#define __libc_lock_define_recursive(CLASS,NAME) \ +++ CLASS __libc_lock_recursive_t NAME; +++ +++/* Define an initialized recursive lock variable NAME with storage +++ class CLASS. */ +++#if defined _LIBC && (IS_IN (libc) || IS_IN (libpthread)) +++# define __libc_lock_define_initialized_recursive(CLASS, NAME) \ +++ CLASS __libc_lock_recursive_t NAME = _LIBC_LOCK_RECURSIVE_INITIALIZER; +++# define _LIBC_LOCK_RECURSIVE_INITIALIZER \ +++ { LLL_LOCK_INITIALIZER, 0, NULL } +++#else +++# define __libc_lock_define_initialized_recursive(CLASS,NAME) \ +++ CLASS __libc_lock_recursive_t NAME = _LIBC_LOCK_RECURSIVE_INITIALIZER; +++# define _LIBC_LOCK_RECURSIVE_INITIALIZER \ +++ {PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP} +++#endif +++ +++/* Initialize a recursive mutex. */ +++#if defined _LIBC && (IS_IN (libc) || IS_IN (libpthread)) +++# define __libc_lock_init_recursive(NAME) \ +++ ((void) ((NAME) = (__libc_lock_recursive_t) _LIBC_LOCK_RECURSIVE_INITIALIZER)) +++#else +++# define __libc_lock_init_recursive(NAME) \ +++ do { \ +++ if (__pthread_mutex_init != NULL) \ +++ { \ +++ pthread_mutexattr_t __attr; \ +++ __pthread_mutexattr_init (&__attr); \ +++ __pthread_mutexattr_settype (&__attr, PTHREAD_MUTEX_RECURSIVE_NP); \ +++ __pthread_mutex_init (&(NAME).mutex, &__attr); \ +++ __pthread_mutexattr_destroy (&__attr); \ +++ } \ +++ } while (0) +++#endif +++ +++/* Finalize recursive named lock. */ +++#if defined _LIBC && (IS_IN (libc) || IS_IN (libpthread)) +++# define __libc_lock_fini_recursive(NAME) ((void) 0) +++#else +++# define __libc_lock_fini_recursive(NAME) \ +++ __libc_maybe_call (__pthread_mutex_destroy, (&(NAME).mutex), 0) +++#endif +++ +++/* Lock the recursive named lock variable. */ +++#if defined _LIBC && (IS_IN (libc) || IS_IN (libpthread)) +++# define __libc_lock_lock_recursive(NAME) \ +++ do { \ +++ void *self = THREAD_SELF; \ +++ if ((NAME).owner != self) \ +++ { \ +++ lll_lock ((NAME).lock, LLL_PRIVATE); \ +++ (NAME).owner = self; \ +++ } \ +++ ++(NAME).cnt; \ +++ } while (0) +++#else +++# define __libc_lock_lock_recursive(NAME) \ +++ __libc_maybe_call (__pthread_mutex_lock, (&(NAME).mutex), 0) +++#endif +++ +++/* Try to lock the recursive named lock variable. */ +++#if defined _LIBC && (IS_IN (libc) || IS_IN (libpthread)) +++# define __libc_lock_trylock_recursive(NAME) \ +++ ({ \ +++ int result = 0; \ +++ void *self = THREAD_SELF; \ +++ if ((NAME).owner != self) \ +++ { \ +++ if (lll_trylock ((NAME).lock) == 0) \ +++ { \ +++ (NAME).owner = self; \ +++ (NAME).cnt = 1; \ +++ } \ +++ else \ +++ result = EBUSY; \ +++ } \ +++ else \ +++ ++(NAME).cnt; \ +++ result; \ +++ }) +++#else +++# define __libc_lock_trylock_recursive(NAME) \ +++ __libc_maybe_call (__pthread_mutex_trylock, (&(NAME).mutex), 0) +++#endif +++ +++/* Unlock the recursive named lock variable. */ +++#if defined _LIBC && (IS_IN (libc) || IS_IN (libpthread)) +++/* We do no error checking here. */ +++# define __libc_lock_unlock_recursive(NAME) \ +++ do { \ +++ if (--(NAME).cnt == 0) \ +++ { \ +++ (NAME).owner = NULL; \ +++ lll_unlock ((NAME).lock, LLL_PRIVATE); \ +++ } \ +++ } while (0) +++#else +++# define __libc_lock_unlock_recursive(NAME) \ +++ __libc_maybe_call (__pthread_mutex_unlock, (&(NAME).mutex), 0) +++#endif +++ +++/* Note that for I/O cleanup handling we are using the old-style +++ cancel handling. It does not have to be integrated with C++ since +++ no C++ code is called in the middle. The old-style handling is +++ faster and the support is not going away. */ +++extern void _pthread_cleanup_push_defer (struct _pthread_cleanup_buffer *buffer, +++ void (*routine) (void *), void *arg); +++extern void _pthread_cleanup_pop_restore (struct _pthread_cleanup_buffer *buffer, +++ int execute); +++ +++/* Start critical region with cleanup. */ +++#define __libc_cleanup_region_start(DOIT, FCT, ARG) \ +++ { struct _pthread_cleanup_buffer _buffer; \ +++ int _avail; \ +++ if (DOIT) { \ +++ _avail = PTFAVAIL (_pthread_cleanup_push_defer); \ +++ if (_avail) { \ +++ __libc_ptf_call_always (_pthread_cleanup_push_defer, (&_buffer, FCT, \ +++ ARG)); \ +++ } else { \ +++ _buffer.__routine = (FCT); \ +++ _buffer.__arg = (ARG); \ +++ } \ +++ } else { \ +++ _avail = 0; \ +++ } +++ +++/* End critical region with cleanup. */ +++#define __libc_cleanup_region_end(DOIT) \ +++ if (_avail) { \ +++ __libc_ptf_call_always (_pthread_cleanup_pop_restore, (&_buffer, DOIT));\ +++ } else if (DOIT) \ +++ _buffer.__routine (_buffer.__arg); \ +++ } +++ +++ +++/* Hide the definitions which are only supposed to be used inside libc in +++ a separate file. This file is not present in the installation! */ +++#ifdef _LIBC +++# include "libc-lockP.h" +++#endif +++ +++#endif /* libc-lock.h */ ++--- /dev/null +++++ b/fbtl/sysdeps/pthread/libc-lockP.h ++@@ -0,0 +1,438 @@ +++/* Private libc-internal interface for mutex locks. NPTL version. +++ Copyright (C) 1996-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; see the file COPYING.LIB. If +++ not, see . */ +++ +++#ifndef _LIBC_LOCKP_H +++#define _LIBC_LOCKP_H 1 +++ +++#include +++#define __need_NULL +++#include +++ +++ +++/* Fortunately Linux now has a mean to do locking which is realtime +++ safe without the aid of the thread library. We also need no fancy +++ options like error checking mutexes etc. We only need simple +++ locks, maybe recursive. This can be easily and cheaply implemented +++ using futexes. We will use them everywhere except in ld.so since +++ ld.so might be used on old kernels with a different libc.so. */ +++#include +++#include +++#include +++ +++#if IS_IN (libpthread) +++/* This gets us the declarations of the __pthread_* internal names, +++ and hidden_proto for them. */ +++# include +++#endif +++ +++/* Mutex type. */ +++#if !IS_IN (libc) && !IS_IN (libpthread) +++typedef pthread_mutex_t __libc_lock_t; +++#else +++typedef int __libc_lock_t; +++#endif +++typedef struct { pthread_mutex_t mutex; } __rtld_lock_recursive_t; +++typedef pthread_rwlock_t __libc_rwlock_t; +++ +++/* Type for key to thread-specific data. */ +++typedef pthread_key_t __libc_key_t; +++ +++/* Define a lock variable NAME with storage class CLASS. The lock must be +++ initialized with __libc_lock_init before it can be used (or define it +++ with __libc_lock_define_initialized, below). Use `extern' for CLASS to +++ declare a lock defined in another module. In public structure +++ definitions you must use a pointer to the lock structure (i.e., NAME +++ begins with a `*'), because its storage size will not be known outside +++ of libc. */ +++#define __libc_lock_define(CLASS,NAME) \ +++ CLASS __libc_lock_t NAME; +++#define __libc_rwlock_define(CLASS,NAME) \ +++ CLASS __libc_rwlock_t NAME; +++#define __rtld_lock_define_recursive(CLASS,NAME) \ +++ CLASS __rtld_lock_recursive_t NAME; +++ +++/* Define an initialized lock variable NAME with storage class CLASS. +++ +++ For the C library we take a deeper look at the initializer. For +++ this implementation all fields are initialized to zero. Therefore +++ we don't initialize the variable which allows putting it into the +++ BSS section. (Except on PA-RISC and other odd architectures, where +++ initialized locks must be set to one due to the lack of normal +++ atomic operations.) */ +++ +++#define _LIBC_LOCK_INITIALIZER LLL_LOCK_INITIALIZER +++#if IS_IN (libc) || IS_IN (libpthread) +++# if LLL_LOCK_INITIALIZER == 0 +++# define __libc_lock_define_initialized(CLASS,NAME) \ +++ CLASS __libc_lock_t NAME; +++# else +++# define __libc_lock_define_initialized(CLASS,NAME) \ +++ CLASS __libc_lock_t NAME = LLL_LOCK_INITIALIZER; +++# endif +++#else +++# define __libc_lock_define_initialized(CLASS,NAME) \ +++ CLASS __libc_lock_t NAME; +++#endif +++ +++#define __libc_rwlock_define_initialized(CLASS,NAME) \ +++ CLASS __libc_rwlock_t NAME = PTHREAD_RWLOCK_INITIALIZER; +++ +++#define __rtld_lock_define_initialized_recursive(CLASS,NAME) \ +++ CLASS __rtld_lock_recursive_t NAME = _RTLD_LOCK_RECURSIVE_INITIALIZER; +++#define _RTLD_LOCK_RECURSIVE_INITIALIZER \ +++ {PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP} +++ +++#define __rtld_lock_initialize(NAME) \ +++ (void) ((NAME) = (__rtld_lock_recursive_t) _RTLD_LOCK_RECURSIVE_INITIALIZER) +++ +++/* If we check for a weakly referenced symbol and then perform a +++ normal jump to it te code generated for some platforms in case of +++ PIC is unnecessarily slow. What would happen is that the function +++ is first referenced as data and then it is called indirectly +++ through the PLT. We can make this a direct jump. */ +++#ifdef __PIC__ +++# define __libc_maybe_call(FUNC, ARGS, ELSE) \ +++ (__extension__ ({ __typeof (FUNC) *_fn = (FUNC); \ +++ _fn != NULL ? (*_fn) ARGS : ELSE; })) +++#else +++# define __libc_maybe_call(FUNC, ARGS, ELSE) \ +++ (FUNC != NULL ? FUNC ARGS : ELSE) +++#endif +++ +++/* Call thread functions through the function pointer table. */ +++#if defined SHARED && IS_IN (libc) +++# define PTFAVAIL(NAME) __libc_pthread_functions_init +++# define __libc_ptf_call(FUNC, ARGS, ELSE) \ +++ (__libc_pthread_functions_init ? PTHFCT_CALL (ptr_##FUNC, ARGS) : ELSE) +++# define __libc_ptf_call_always(FUNC, ARGS) \ +++ PTHFCT_CALL (ptr_##FUNC, ARGS) +++#elif IS_IN (libpthread) +++# define PTFAVAIL(NAME) 1 +++# define __libc_ptf_call(FUNC, ARGS, ELSE) \ +++ FUNC ARGS +++# define __libc_ptf_call_always(FUNC, ARGS) \ +++ FUNC ARGS +++#else +++# define PTFAVAIL(NAME) (NAME != NULL) +++# define __libc_ptf_call(FUNC, ARGS, ELSE) \ +++ __libc_maybe_call (FUNC, ARGS, ELSE) +++# define __libc_ptf_call_always(FUNC, ARGS) \ +++ FUNC ARGS +++#endif +++ +++ +++/* Initialize the named lock variable, leaving it in a consistent, unlocked +++ state. */ +++#if IS_IN (libc) || IS_IN (libpthread) +++# define __libc_lock_init(NAME) \ +++ ((void) ((NAME) = LLL_LOCK_INITIALIZER)) +++#else +++# define __libc_lock_init(NAME) \ +++ __libc_maybe_call (__pthread_mutex_init, (&(NAME), NULL), 0) +++#endif +++#if defined SHARED && IS_IN (libc) +++/* ((NAME) = (__libc_rwlock_t) PTHREAD_RWLOCK_INITIALIZER) is inefficient. */ +++# define __libc_rwlock_init(NAME) \ +++ ((void) __builtin_memset (&(NAME), '\0', sizeof (NAME))) +++#else +++# define __libc_rwlock_init(NAME) \ +++ __libc_maybe_call (__pthread_rwlock_init, (&(NAME), NULL), 0) +++#endif +++ +++/* 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. */ +++#if IS_IN (libc) || IS_IN (libpthread) +++# define __libc_lock_fini(NAME) ((void) 0) +++#else +++# define __libc_lock_fini(NAME) \ +++ __libc_maybe_call (__pthread_mutex_destroy, (&(NAME)), 0) +++#endif +++#if defined SHARED && IS_IN (libc) +++# define __libc_rwlock_fini(NAME) ((void) 0) +++#else +++# define __libc_rwlock_fini(NAME) \ +++ __libc_maybe_call (__pthread_rwlock_destroy, (&(NAME)), 0) +++#endif +++ +++/* Lock the named lock variable. */ +++#if IS_IN (libc) || IS_IN (libpthread) +++# ifndef __libc_lock_lock +++# define __libc_lock_lock(NAME) \ +++ ({ lll_lock (NAME, LLL_PRIVATE); 0; }) +++# endif +++#else +++# undef __libc_lock_lock +++# define __libc_lock_lock(NAME) \ +++ __libc_maybe_call (__pthread_mutex_lock, (&(NAME)), 0) +++#endif +++#define __libc_rwlock_rdlock(NAME) \ +++ __libc_ptf_call (__pthread_rwlock_rdlock, (&(NAME)), 0) +++#define __libc_rwlock_wrlock(NAME) \ +++ __libc_ptf_call (__pthread_rwlock_wrlock, (&(NAME)), 0) +++ +++/* Try to lock the named lock variable. */ +++#if IS_IN (libc) || IS_IN (libpthread) +++# ifndef __libc_lock_trylock +++# define __libc_lock_trylock(NAME) \ +++ lll_trylock (NAME) +++# endif +++#else +++# undef __libc_lock_trylock +++# define __libc_lock_trylock(NAME) \ +++ __libc_maybe_call (__pthread_mutex_trylock, (&(NAME)), 0) +++#endif +++#define __libc_rwlock_tryrdlock(NAME) \ +++ __libc_maybe_call (__pthread_rwlock_tryrdlock, (&(NAME)), 0) +++#define __libc_rwlock_trywrlock(NAME) \ +++ __libc_maybe_call (__pthread_rwlock_trywrlock, (&(NAME)), 0) +++ +++#define __rtld_lock_trylock_recursive(NAME) \ +++ __libc_maybe_call (__pthread_mutex_trylock, (&(NAME).mutex), 0) +++ +++/* Unlock the named lock variable. */ +++#if IS_IN (libc) || IS_IN (libpthread) +++# define __libc_lock_unlock(NAME) \ +++ lll_unlock (NAME, LLL_PRIVATE) +++#else +++# define __libc_lock_unlock(NAME) \ +++ __libc_maybe_call (__pthread_mutex_unlock, (&(NAME)), 0) +++#endif +++#define __libc_rwlock_unlock(NAME) \ +++ __libc_ptf_call (__pthread_rwlock_unlock, (&(NAME)), 0) +++ +++#ifdef SHARED +++# define __rtld_lock_default_lock_recursive(lock) \ +++ ++((pthread_mutex_t *)(lock))->__data.__count; +++ +++# define __rtld_lock_default_unlock_recursive(lock) \ +++ --((pthread_mutex_t *)(lock))->__data.__count; +++ +++# define __rtld_lock_lock_recursive(NAME) \ +++ GL(dl_rtld_lock_recursive) (&(NAME).mutex) +++ +++# define __rtld_lock_unlock_recursive(NAME) \ +++ GL(dl_rtld_unlock_recursive) (&(NAME).mutex) +++#else +++# define __rtld_lock_lock_recursive(NAME) \ +++ __libc_maybe_call (__pthread_mutex_lock, (&(NAME).mutex), 0) +++ +++# define __rtld_lock_unlock_recursive(NAME) \ +++ __libc_maybe_call (__pthread_mutex_unlock, (&(NAME).mutex), 0) +++#endif +++ +++/* Define once control variable. */ +++#if PTHREAD_ONCE_INIT == 0 +++/* Special case for static variables where we can avoid the initialization +++ if it is zero. */ +++# define __libc_once_define(CLASS, NAME) \ +++ CLASS pthread_once_t NAME +++#else +++# define __libc_once_define(CLASS, NAME) \ +++ CLASS pthread_once_t NAME = PTHREAD_ONCE_INIT +++#endif +++ +++/* Call handler iff the first call. */ +++#define __libc_once(ONCE_CONTROL, INIT_FUNCTION) \ +++ do { \ +++ if (PTFAVAIL (__pthread_once)) \ +++ __libc_ptf_call_always (__pthread_once, (&(ONCE_CONTROL), \ +++ INIT_FUNCTION)); \ +++ else if ((ONCE_CONTROL) == PTHREAD_ONCE_INIT) { \ +++ INIT_FUNCTION (); \ +++ (ONCE_CONTROL) |= 2; \ +++ } \ +++ } while (0) +++ +++/* Get once control variable. */ +++#define __libc_once_get(ONCE_CONTROL) ((ONCE_CONTROL) != PTHREAD_ONCE_INIT) +++ +++/* Note that for I/O cleanup handling we are using the old-style +++ cancel handling. It does not have to be integrated with C++ snce +++ no C++ code is called in the middle. The old-style handling is +++ faster and the support is not going away. */ +++extern void _pthread_cleanup_push (struct _pthread_cleanup_buffer *buffer, +++ void (*routine) (void *), void *arg); +++extern void _pthread_cleanup_pop (struct _pthread_cleanup_buffer *buffer, +++ int execute); +++extern void _pthread_cleanup_push_defer (struct _pthread_cleanup_buffer *buffer, +++ void (*routine) (void *), void *arg); +++extern void _pthread_cleanup_pop_restore (struct _pthread_cleanup_buffer *buffer, +++ int execute); +++ +++/* Sometimes we have to exit the block in the middle. */ +++#define __libc_cleanup_end(DOIT) \ +++ if (_avail) { \ +++ __libc_ptf_call_always (_pthread_cleanup_pop_restore, (&_buffer, DOIT));\ +++ } else if (DOIT) \ +++ _buffer.__routine (_buffer.__arg) +++ +++ +++/* Normal cleanup handling, based on C cleanup attribute. */ +++__extern_inline void +++__libc_cleanup_routine (struct __pthread_cleanup_frame *f) +++{ +++ if (f->__do_it) +++ f->__cancel_routine (f->__cancel_arg); +++} +++ +++#define __libc_cleanup_push(fct, arg) \ +++ do { \ +++ struct __pthread_cleanup_frame __clframe \ +++ __attribute__ ((__cleanup__ (__libc_cleanup_routine))) \ +++ = { .__cancel_routine = (fct), .__cancel_arg = (arg), \ +++ .__do_it = 1 }; +++ +++#define __libc_cleanup_pop(execute) \ +++ __clframe.__do_it = (execute); \ +++ } while (0) +++ +++ +++/* Create thread-specific key. */ +++#define __libc_key_create(KEY, DESTRUCTOR) \ +++ __libc_ptf_call (__pthread_key_create, (KEY, DESTRUCTOR), 1) +++ +++/* Get thread-specific data. */ +++#define __libc_getspecific(KEY) \ +++ __libc_ptf_call (__pthread_getspecific, (KEY), NULL) +++ +++/* Set thread-specific data. */ +++#define __libc_setspecific(KEY, VALUE) \ +++ __libc_ptf_call (__pthread_setspecific, (KEY, VALUE), 0) +++ +++ +++/* Register handlers to execute before and after `fork'. Note that the +++ last parameter is NULL. The handlers registered by the libc are +++ never removed so this is OK. */ +++#define __libc_atfork(PREPARE, PARENT, CHILD) \ +++ __register_atfork (PREPARE, PARENT, CHILD, NULL) +++extern int __register_atfork (void (*__prepare) (void), +++ void (*__parent) (void), +++ void (*__child) (void), +++ void *__dso_handle); +++ +++/* Functions that are used by this file and are internal to the GNU C +++ library. */ +++ +++extern int __pthread_mutex_init (pthread_mutex_t *__mutex, +++ const pthread_mutexattr_t *__mutex_attr); +++ +++extern int __pthread_mutex_destroy (pthread_mutex_t *__mutex); +++ +++extern int __pthread_mutex_trylock (pthread_mutex_t *__mutex); +++ +++extern int __pthread_mutex_lock (pthread_mutex_t *__mutex); +++ +++extern int __pthread_mutex_unlock (pthread_mutex_t *__mutex); +++ +++extern int __pthread_mutexattr_init (pthread_mutexattr_t *__attr); +++ +++extern int __pthread_mutexattr_destroy (pthread_mutexattr_t *__attr); +++ +++extern int __pthread_mutexattr_settype (pthread_mutexattr_t *__attr, +++ int __kind); +++ +++extern int __pthread_rwlock_init (pthread_rwlock_t *__rwlock, +++ const pthread_rwlockattr_t *__attr); +++ +++extern int __pthread_rwlock_destroy (pthread_rwlock_t *__rwlock); +++ +++extern int __pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock); +++ +++extern int __pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock); +++ +++extern int __pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock); +++ +++extern int __pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock); +++ +++extern int __pthread_rwlock_unlock (pthread_rwlock_t *__rwlock); +++ +++extern int __pthread_key_create (pthread_key_t *__key, +++ void (*__destr_function) (void *)); +++ +++extern int __pthread_setspecific (pthread_key_t __key, +++ const void *__pointer); +++ +++extern void *__pthread_getspecific (pthread_key_t __key); +++ +++extern int __pthread_once (pthread_once_t *__once_control, +++ void (*__init_routine) (void)); +++ +++extern int __pthread_atfork (void (*__prepare) (void), +++ void (*__parent) (void), +++ void (*__child) (void)); +++ +++extern int __pthread_setcancelstate (int state, int *oldstate); +++ +++ +++/* Make the pthread functions weak so that we can elide them from +++ single-threaded processes. */ +++#ifndef __NO_WEAK_PTHREAD_ALIASES +++# ifdef weak_extern +++weak_extern (__pthread_mutex_init) +++weak_extern (__pthread_mutex_destroy) +++weak_extern (__pthread_mutex_lock) +++weak_extern (__pthread_mutex_trylock) +++weak_extern (__pthread_mutex_unlock) +++weak_extern (__pthread_mutexattr_init) +++weak_extern (__pthread_mutexattr_destroy) +++weak_extern (__pthread_mutexattr_settype) +++weak_extern (__pthread_rwlock_init) +++weak_extern (__pthread_rwlock_destroy) +++weak_extern (__pthread_rwlock_rdlock) +++weak_extern (__pthread_rwlock_tryrdlock) +++weak_extern (__pthread_rwlock_wrlock) +++weak_extern (__pthread_rwlock_trywrlock) +++weak_extern (__pthread_rwlock_unlock) +++weak_extern (__pthread_key_create) +++weak_extern (__pthread_setspecific) +++weak_extern (__pthread_getspecific) +++weak_extern (__pthread_once) +++weak_extern (__pthread_initialize) +++weak_extern (__pthread_atfork) +++weak_extern (__pthread_setcancelstate) +++weak_extern (_pthread_cleanup_push_defer) +++weak_extern (_pthread_cleanup_pop_restore) +++# else +++# pragma weak __pthread_mutex_init +++# pragma weak __pthread_mutex_destroy +++# pragma weak __pthread_mutex_lock +++# pragma weak __pthread_mutex_trylock +++# pragma weak __pthread_mutex_unlock +++# pragma weak __pthread_mutexattr_init +++# pragma weak __pthread_mutexattr_destroy +++# pragma weak __pthread_mutexattr_settype +++# pragma weak __pthread_rwlock_destroy +++# pragma weak __pthread_rwlock_rdlock +++# pragma weak __pthread_rwlock_tryrdlock +++# pragma weak __pthread_rwlock_wrlock +++# pragma weak __pthread_rwlock_trywrlock +++# pragma weak __pthread_rwlock_unlock +++# pragma weak __pthread_key_create +++# pragma weak __pthread_setspecific +++# pragma weak __pthread_getspecific +++# pragma weak __pthread_once +++# pragma weak __pthread_initialize +++# pragma weak __pthread_atfork +++# pragma weak __pthread_setcancelstate +++# pragma weak _pthread_cleanup_push_defer +++# pragma weak _pthread_cleanup_pop_restore +++# endif +++#endif +++ +++#endif /* libc-lockP.h */ ++--- /dev/null +++++ b/fbtl/sysdeps/pthread/librt-cancellation.c ++@@ -0,0 +1,24 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include "pthreadP.h" +++ +++ +++#define __pthread_enable_asynccancel __librt_enable_asynccancel +++#define __pthread_disable_asynccancel __librt_disable_asynccancel +++#include ++--- /dev/null +++++ b/fbtl/sysdeps/pthread/list.h ++@@ -0,0 +1,117 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#ifndef _LIST_H +++ +++#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 +++ +++/* Define a variable with the head and tail of the list. */ +++# define LIST_HEAD(name) \ +++ list_t name = { &(name), &(name) } +++ +++/* Initialize a new list head. */ +++# define INIT_LIST_HEAD(ptr) \ +++ (ptr)->next = (ptr)->prev = (ptr) +++ +++ +++/* Add new element at the head of the list. */ +++static inline void +++list_add (list_t *newp, list_t *head) +++{ +++ newp->next = head->next; +++ newp->prev = head; +++ head->next->prev = newp; +++ atomic_write_barrier (); +++ head->next = newp; +++} +++ +++ +++/* Remove element from list. */ +++static inline void +++list_del (list_t *elem) +++{ +++ elem->next->prev = elem->prev; +++ elem->prev->next = elem->next; +++} +++ +++ +++/* Join two lists. */ +++static inline void +++list_splice (list_t *add, list_t *head) +++{ +++ /* Do nothing if the list which gets added is empty. */ +++ if (add != add->next) +++ { +++ add->next->prev = head; +++ add->prev->next = head->next; +++ head->next->prev = add->prev; +++ head->next = add->next; +++ } +++} +++ +++ +++/* Get typed element from list at a given position. */ +++# 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) \ +++ for (pos = (head)->next; pos != (head); pos = pos->next) +++ +++ +++/* Iterate forward over the elements of the list. */ +++# 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) \ +++ for (pos = (head)->prev, p = pos->prev; \ +++ pos != (head); \ +++ pos = p, p = pos->prev) +++ +++#endif /* _LIST_H */ +++ +++#endif /* list.h */ ++--- /dev/null +++++ b/fbtl/sysdeps/pthread/malloc-machine.h ++@@ -0,0 +1,28 @@ +++/* Basic platform-independent macro definitions for mutexes, +++ thread-specific data and parameters for malloc. +++ Copyright (C) 2003-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 +++ . */ +++ +++#ifndef _MALLOC_MACHINE_H +++#define _MALLOC_MACHINE_H +++ +++#include +++#include +++ +++#include +++ +++#endif /* !defined(_MALLOC_MACHINE_H) */ ++--- /dev/null +++++ b/fbtl/sysdeps/pthread/posix-timer.h ++@@ -0,0 +1,196 @@ +++/* Definitions for POSIX timer implementation on top of NPTL. +++ Copyright (C) 2000-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Kaz Kylheku . +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public License as +++ published by the Free Software Foundation; either version 2.1 of the +++ License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General 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, see . */ +++ +++#include +++#include +++ +++/* Double linked list. */ +++struct list_links +++{ +++ struct list_links *next; +++ struct list_links *prev; +++}; +++ +++ +++/* Forward declaration. */ +++struct timer_node; +++ +++ +++/* Definitions for an internal thread of the POSIX timer implementation. */ +++struct thread_node +++{ +++ struct list_links links; +++ pthread_attr_t attr; +++ pthread_t id; +++ unsigned int exists; +++ struct list_links timer_queue; +++ pthread_cond_t cond; +++ struct timer_node *current_timer; +++ pthread_t captured; +++ clockid_t clock_id; +++}; +++ +++ +++/* Internal representation of a timer. */ +++struct timer_node +++{ +++ struct list_links links; +++ struct sigevent event; +++ clockid_t clock; +++ struct itimerspec value; +++ struct timespec expirytime; +++ pthread_attr_t attr; +++ unsigned int abstime; +++ unsigned int armed; +++ enum { +++ TIMER_FREE, TIMER_INUSE, TIMER_DELETED +++ } inuse; +++ struct thread_node *thread; +++ pid_t creator_pid; +++ int refcount; +++ int overrun_count; +++}; +++ +++ +++/* The limit is not published if we are compiled with kernel timer support. +++ But we still compiled in this implementation with its limit unless built +++ to require the kernel support. */ +++#ifndef TIMER_MAX +++# define TIMER_MAX 256 +++#endif +++ +++/* Static array with the structures for all the timers. */ +++extern struct timer_node __timer_array[TIMER_MAX]; +++ +++/* Global lock to protect operation on the lists. */ +++extern pthread_mutex_t __timer_mutex; +++ +++/* Variable to protext initialization. */ +++extern pthread_once_t __timer_init_once_control; +++ +++/* Nonzero if initialization of timer implementation failed. */ +++extern int __timer_init_failed; +++ +++/* Node for the thread used to deliver signals. */ +++extern struct thread_node __timer_signal_thread_rclk; +++ +++ +++/* Return pointer to timer structure corresponding to ID. */ +++#define timer_id2ptr(timerid) ((struct timer_node *) timerid) +++#define timer_ptr2id(timerid) ((void *) timerid) +++ +++/* Check whether timer is valid; global mutex must be held. */ +++static inline int +++timer_valid (struct timer_node *timer) +++{ +++ return timer && timer->inuse == TIMER_INUSE; +++} +++ +++/* Timer refcount functions; need global mutex. */ +++extern void __timer_dealloc (struct timer_node *timer); +++ +++static inline void +++timer_addref (struct timer_node *timer) +++{ +++ timer->refcount++; +++} +++ +++static inline void +++timer_delref (struct timer_node *timer) +++{ +++ if (--timer->refcount == 0) +++ __timer_dealloc (timer); +++} +++ +++/* Timespec helper routines. */ +++static inline int +++__attribute ((always_inline)) +++timespec_compare (const struct timespec *left, const struct timespec *right) +++{ +++ if (left->tv_sec < right->tv_sec) +++ return -1; +++ if (left->tv_sec > right->tv_sec) +++ return 1; +++ +++ if (left->tv_nsec < right->tv_nsec) +++ return -1; +++ if (left->tv_nsec > right->tv_nsec) +++ return 1; +++ +++ return 0; +++} +++ +++static inline void +++timespec_add (struct timespec *sum, const struct timespec *left, +++ const struct timespec *right) +++{ +++ sum->tv_sec = left->tv_sec + right->tv_sec; +++ sum->tv_nsec = left->tv_nsec + right->tv_nsec; +++ +++ if (sum->tv_nsec >= 1000000000) +++ { +++ ++sum->tv_sec; +++ sum->tv_nsec -= 1000000000; +++ } +++} +++ +++static inline void +++timespec_sub (struct timespec *diff, const struct timespec *left, +++ const struct timespec *right) +++{ +++ diff->tv_sec = left->tv_sec - right->tv_sec; +++ diff->tv_nsec = left->tv_nsec - right->tv_nsec; +++ +++ if (diff->tv_nsec < 0) +++ { +++ --diff->tv_sec; +++ diff->tv_nsec += 1000000000; +++ } +++} +++ +++ +++/* We need one of the list functions in the other modules. */ +++static inline void +++list_unlink_ip (struct list_links *list) +++{ +++ struct list_links *lnext = list->next, *lprev = list->prev; +++ +++ lnext->prev = lprev; +++ lprev->next = lnext; +++ +++ /* The suffix ip means idempotent; list_unlink_ip can be called +++ * two or more times on the same node. +++ */ +++ +++ list->next = list; +++ list->prev = list; +++} +++ +++ +++/* Functions in the helper file. */ +++extern void __timer_mutex_cancel_handler (void *arg); +++extern void __timer_init_once (void); +++extern struct timer_node *__timer_alloc (void); +++extern int __timer_thread_start (struct thread_node *thread); +++extern struct thread_node *__timer_thread_find_matching (const pthread_attr_t *desired_attr, clockid_t); +++extern struct thread_node *__timer_thread_alloc (const pthread_attr_t *desired_attr, clockid_t); +++extern void __timer_thread_dealloc (struct thread_node *thread); +++extern int __timer_thread_queue_timer (struct thread_node *thread, +++ struct timer_node *insert); +++extern void __timer_thread_wakeup (struct thread_node *thread); ++--- /dev/null +++++ b/fbtl/sysdeps/pthread/pt-longjmp.c ++@@ -0,0 +1,28 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include "pthreadP.h" +++ +++void +++longjmp (jmp_buf env, int val) +++{ +++ __libc_longjmp (env, val); +++} +++weak_alias (longjmp, siglongjmp) ++--- /dev/null +++++ b/fbtl/sysdeps/pthread/pthread-functions.h ++@@ -0,0 +1,117 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#ifndef _PTHREAD_FUNCTIONS_H +++#define _PTHREAD_FUNCTIONS_H 1 +++ +++#include +++#include +++#include +++#include +++ +++struct xid_command; +++ +++/* Data type shared with libc. The libc uses it to pass on calls to +++ the thread functions. */ +++struct pthread_functions +++{ +++ int (*ptr_pthread_attr_destroy) (pthread_attr_t *); +++ int (*ptr___pthread_attr_init_2_0) (pthread_attr_t *); +++ int (*ptr___pthread_attr_init_2_1) (pthread_attr_t *); +++ int (*ptr_pthread_attr_getdetachstate) (const pthread_attr_t *, int *); +++ int (*ptr_pthread_attr_setdetachstate) (pthread_attr_t *, int); +++ int (*ptr_pthread_attr_getinheritsched) (const pthread_attr_t *, int *); +++ int (*ptr_pthread_attr_setinheritsched) (pthread_attr_t *, int); +++ int (*ptr_pthread_attr_getschedparam) (const pthread_attr_t *, +++ struct sched_param *); +++ int (*ptr_pthread_attr_setschedparam) (pthread_attr_t *, +++ const struct sched_param *); +++ int (*ptr_pthread_attr_getschedpolicy) (const pthread_attr_t *, int *); +++ int (*ptr_pthread_attr_setschedpolicy) (pthread_attr_t *, int); +++ int (*ptr_pthread_attr_getscope) (const pthread_attr_t *, int *); +++ int (*ptr_pthread_attr_setscope) (pthread_attr_t *, int); +++ int (*ptr_pthread_condattr_destroy) (pthread_condattr_t *); +++ int (*ptr_pthread_condattr_init) (pthread_condattr_t *); +++ int (*ptr___pthread_cond_broadcast) (pthread_cond_t *); +++ int (*ptr___pthread_cond_destroy) (pthread_cond_t *); +++ int (*ptr___pthread_cond_init) (pthread_cond_t *, +++ const pthread_condattr_t *); +++ int (*ptr___pthread_cond_signal) (pthread_cond_t *); +++ int (*ptr___pthread_cond_wait) (pthread_cond_t *, pthread_mutex_t *); +++ int (*ptr___pthread_cond_timedwait) (pthread_cond_t *, pthread_mutex_t *, +++ const struct timespec *); +++ int (*ptr___pthread_cond_broadcast_2_0) (pthread_cond_2_0_t *); +++ int (*ptr___pthread_cond_destroy_2_0) (pthread_cond_2_0_t *); +++ int (*ptr___pthread_cond_init_2_0) (pthread_cond_2_0_t *, +++ const pthread_condattr_t *); +++ int (*ptr___pthread_cond_signal_2_0) (pthread_cond_2_0_t *); +++ int (*ptr___pthread_cond_wait_2_0) (pthread_cond_2_0_t *, pthread_mutex_t *); +++ int (*ptr___pthread_cond_timedwait_2_0) (pthread_cond_2_0_t *, +++ pthread_mutex_t *, +++ const struct timespec *); +++ int (*ptr_pthread_equal) (pthread_t, pthread_t); +++ void (*ptr___pthread_exit) (void *) __attribute__ ((__noreturn__)); +++ int (*ptr_pthread_getschedparam) (pthread_t, int *, struct sched_param *); +++ int (*ptr_pthread_setschedparam) (pthread_t, int, +++ const struct sched_param *); +++ int (*ptr_pthread_mutex_destroy) (pthread_mutex_t *); +++ int (*ptr_pthread_mutex_init) (pthread_mutex_t *, +++ const pthread_mutexattr_t *); +++ int (*ptr_pthread_mutex_lock) (pthread_mutex_t *); +++ int (*ptr_pthread_mutex_unlock) (pthread_mutex_t *); +++ pthread_t (*ptr_pthread_self) (void); +++ int (*ptr___pthread_setcancelstate) (int, int *); +++ int (*ptr_pthread_setcanceltype) (int, int *); +++ void (*ptr___pthread_cleanup_upto) (__jmp_buf, char *); +++ int (*ptr___pthread_once) (pthread_once_t *, void (*) (void)); +++ int (*ptr___pthread_rwlock_rdlock) (pthread_rwlock_t *); +++ int (*ptr___pthread_rwlock_wrlock) (pthread_rwlock_t *); +++ int (*ptr___pthread_rwlock_unlock) (pthread_rwlock_t *); +++ int (*ptr___pthread_key_create) (pthread_key_t *, void (*) (void *)); +++ void *(*ptr___pthread_getspecific) (pthread_key_t); +++ int (*ptr___pthread_setspecific) (pthread_key_t, const void *); +++ void (*ptr__pthread_cleanup_push_defer) (struct _pthread_cleanup_buffer *, +++ void (*) (void *), void *); +++ void (*ptr__pthread_cleanup_pop_restore) (struct _pthread_cleanup_buffer *, +++ int); +++#define HAVE_PTR_NTHREADS +++ unsigned int *ptr_nthreads; +++ void (*ptr___pthread_unwind) (__pthread_unwind_buf_t *) +++ __attribute ((noreturn)) __cleanup_fct_attribute; +++ void (*ptr__nptl_deallocate_tsd) (void); +++ int (*ptr__nptl_setxid) (struct xid_command *); +++ void (*ptr_freeres) (void); +++ void (*ptr_set_robust) (struct pthread *); +++}; +++ +++/* Variable in libc.so. */ +++extern struct pthread_functions __libc_pthread_functions attribute_hidden; +++extern int __libc_pthread_functions_init attribute_hidden; +++ +++#ifdef PTR_DEMANGLE +++# define PTHFCT_CALL(fct, params) \ +++ ({ __typeof (__libc_pthread_functions.fct) __p; \ +++ __p = __libc_pthread_functions.fct; \ +++ PTR_DEMANGLE (__p); \ +++ __p params; }) +++#else +++# define PTHFCT_CALL(fct, params) \ +++ __libc_pthread_functions.fct params +++#endif +++ +++#endif /* pthread-functions.h */ ++--- /dev/null +++++ b/fbtl/sysdeps/pthread/pthread.h ++@@ -0,0 +1,1177 @@ +++/* Copyright (C) 2002-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 +++ . */ +++ +++#ifndef _PTHREAD_H +++#define _PTHREAD_H 1 +++ +++#include +++#include +++#include +++#include +++ +++#include +++#include +++#include +++ +++ +++/* Detach state. */ +++enum +++{ +++ PTHREAD_CREATE_JOINABLE, +++#define PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_JOINABLE +++ PTHREAD_CREATE_DETACHED +++#define PTHREAD_CREATE_DETACHED PTHREAD_CREATE_DETACHED +++}; +++ +++ +++/* Mutex types. */ +++enum +++{ +++ PTHREAD_MUTEX_TIMED_NP, +++ PTHREAD_MUTEX_RECURSIVE_NP, +++ PTHREAD_MUTEX_ERRORCHECK_NP, +++ PTHREAD_MUTEX_ADAPTIVE_NP +++#if defined __USE_UNIX98 || defined __USE_XOPEN2K8 +++ , +++ PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP, +++ PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP, +++ PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP, +++ PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL +++#endif +++#ifdef __USE_GNU +++ /* For compatibility. */ +++ , PTHREAD_MUTEX_FAST_NP = PTHREAD_MUTEX_TIMED_NP +++#endif +++}; +++ +++ +++#ifdef _LIBC /* not yet supported, so do not expose outside libc */ +++ +++#ifdef __USE_XOPEN2K +++/* Robust mutex or not flags. */ +++enum +++{ +++ PTHREAD_MUTEX_STALLED, +++ PTHREAD_MUTEX_STALLED_NP = PTHREAD_MUTEX_STALLED, +++ PTHREAD_MUTEX_ROBUST, +++ PTHREAD_MUTEX_ROBUST_NP = PTHREAD_MUTEX_ROBUST +++}; +++#endif +++ +++ +++#if defined __USE_POSIX199506 || defined __USE_UNIX98 +++/* Mutex protocols. */ +++enum +++{ +++ PTHREAD_PRIO_NONE, +++ PTHREAD_PRIO_INHERIT, +++ PTHREAD_PRIO_PROTECT +++}; +++#endif +++ +++#endif /* not yet supported, so do not expose outside libc */ +++ +++/* Mutex initializers. */ +++#ifdef __PTHREAD_MUTEX_HAVE_PREV +++# define PTHREAD_MUTEX_INITIALIZER \ +++ { { 0, 0, 0, 0, 0, 0, { 0, 0 } } } +++# ifdef __USE_GNU +++# define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP \ +++ { { 0, 0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP, 0, { 0, 0 } } } +++# define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP \ +++ { { 0, 0, 0, 0, PTHREAD_MUTEX_ERRORCHECK_NP, 0, { 0, 0 } } } +++# define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP \ +++ { { 0, 0, 0, 0, PTHREAD_MUTEX_ADAPTIVE_NP, 0, { 0, 0 } } } +++# endif +++#else +++# define PTHREAD_MUTEX_INITIALIZER \ +++ { { 0, 0, 0, 0, 0, { 0 } } } +++# ifdef __USE_GNU +++# define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP \ +++ { { 0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP, 0, { 0 } } } +++# define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP \ +++ { { 0, 0, 0, PTHREAD_MUTEX_ERRORCHECK_NP, 0, { 0 } } } +++# define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP \ +++ { { 0, 0, 0, PTHREAD_MUTEX_ADAPTIVE_NP, 0, { 0 } } } +++# endif +++#endif +++ +++ +++/* Read-write lock types. */ +++#if defined __USE_UNIX98 || defined __USE_XOPEN2K +++enum +++{ +++ PTHREAD_RWLOCK_PREFER_READER_NP, +++ PTHREAD_RWLOCK_PREFER_WRITER_NP, +++ PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, +++ PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_READER_NP +++}; +++ +++/* Define __PTHREAD_RWLOCK_INT_FLAGS_SHARED to 1 if pthread_rwlock_t +++ has the shared field. All 64-bit architectures have the shared field +++ in pthread_rwlock_t. */ +++#ifndef __PTHREAD_RWLOCK_INT_FLAGS_SHARED +++# if __WORDSIZE == 64 +++# define __PTHREAD_RWLOCK_INT_FLAGS_SHARED 1 +++# endif +++#endif +++ +++/* Read-write lock initializers. */ +++# define PTHREAD_RWLOCK_INITIALIZER \ +++ { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } } +++# ifdef __USE_GNU +++# ifdef __PTHREAD_RWLOCK_INT_FLAGS_SHARED +++# define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \ +++ { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ +++ PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP } } +++# else +++# if __BYTE_ORDER == __LITTLE_ENDIAN +++# define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \ +++ { { 0, 0, 0, 0, 0, 0, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, \ +++ 0, 0, 0, 0 } } +++# else +++# define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \ +++ { { 0, 0, 0, 0, 0, 0, 0, 0, 0, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP,\ +++ 0 } } +++# endif +++# endif +++# endif +++#endif /* Unix98 or XOpen2K */ +++ +++ +++/* Scheduler inheritance. */ +++enum +++{ +++ PTHREAD_INHERIT_SCHED, +++#define PTHREAD_INHERIT_SCHED PTHREAD_INHERIT_SCHED +++ PTHREAD_EXPLICIT_SCHED +++#define PTHREAD_EXPLICIT_SCHED PTHREAD_EXPLICIT_SCHED +++}; +++ +++ +++/* Scope handling. */ +++enum +++{ +++ PTHREAD_SCOPE_SYSTEM, +++#define PTHREAD_SCOPE_SYSTEM PTHREAD_SCOPE_SYSTEM +++ PTHREAD_SCOPE_PROCESS +++#define PTHREAD_SCOPE_PROCESS PTHREAD_SCOPE_PROCESS +++}; +++ +++ +++/* Process shared or private flag. */ +++enum +++{ +++ PTHREAD_PROCESS_PRIVATE, +++#define PTHREAD_PROCESS_PRIVATE PTHREAD_PROCESS_PRIVATE +++ PTHREAD_PROCESS_SHARED +++#define PTHREAD_PROCESS_SHARED PTHREAD_PROCESS_SHARED +++}; +++ +++ +++ +++/* Conditional variable handling. */ +++#define PTHREAD_COND_INITIALIZER { { 0, 0, 0, 0, 0, (void *) 0, 0, 0 } } +++ +++ +++/* Cleanup buffers */ +++struct _pthread_cleanup_buffer +++{ +++ void (*__routine) (void *); /* Function to call. */ +++ void *__arg; /* Its argument. */ +++ int __canceltype; /* Saved cancellation type. */ +++ struct _pthread_cleanup_buffer *__prev; /* Chaining of cleanup functions. */ +++}; +++ +++/* Cancellation */ +++enum +++{ +++ PTHREAD_CANCEL_ENABLE, +++#define PTHREAD_CANCEL_ENABLE PTHREAD_CANCEL_ENABLE +++ PTHREAD_CANCEL_DISABLE +++#define PTHREAD_CANCEL_DISABLE PTHREAD_CANCEL_DISABLE +++}; +++enum +++{ +++ PTHREAD_CANCEL_DEFERRED, +++#define PTHREAD_CANCEL_DEFERRED PTHREAD_CANCEL_DEFERRED +++ PTHREAD_CANCEL_ASYNCHRONOUS +++#define PTHREAD_CANCEL_ASYNCHRONOUS PTHREAD_CANCEL_ASYNCHRONOUS +++}; +++#define PTHREAD_CANCELED ((void *) -1) +++ +++ +++/* Single execution handling. */ +++#define PTHREAD_ONCE_INIT 0 +++ +++ +++#ifdef __USE_XOPEN2K +++/* Value returned by 'pthread_barrier_wait' for one of the threads after +++ the required number of threads have called this function. +++ -1 is distinct from 0 and all errno constants */ +++# define PTHREAD_BARRIER_SERIAL_THREAD -1 +++#endif +++ +++ +++__BEGIN_DECLS +++ +++/* Create a new thread, starting with execution of START-ROUTINE +++ getting passed ARG. Creation attributed come from ATTR. The new +++ handle is stored in *NEWTHREAD. */ +++extern int pthread_create (pthread_t *__restrict __newthread, +++ const pthread_attr_t *__restrict __attr, +++ void *(*__start_routine) (void *), +++ void *__restrict __arg) __THROWNL __nonnull ((1, 3)); +++ +++/* Terminate calling thread. +++ +++ The registered cleanup handlers are called via exception handling +++ so we cannot mark this function with __THROW.*/ +++extern void pthread_exit (void *__retval) __attribute__ ((__noreturn__)); +++ +++/* Make calling thread wait for termination of the thread TH. The +++ exit status of the thread is stored in *THREAD_RETURN, if THREAD_RETURN +++ is not NULL. +++ +++ This function is a cancellation point and therefore not marked with +++ __THROW. */ +++extern int pthread_join (pthread_t __th, void **__thread_return); +++ +++#ifdef __USE_GNU +++/* Check whether thread TH has terminated. If yes return the status of +++ the thread in *THREAD_RETURN, if THREAD_RETURN is not NULL. */ +++extern int pthread_tryjoin_np (pthread_t __th, void **__thread_return) __THROW; +++ +++/* Make calling thread wait for termination of the thread TH, but only +++ until TIMEOUT. The exit status of the thread is stored in +++ *THREAD_RETURN, if THREAD_RETURN is not NULL. +++ +++ This function is a cancellation point and therefore not marked with +++ __THROW. */ +++extern int pthread_timedjoin_np (pthread_t __th, void **__thread_return, +++ const struct timespec *__abstime); +++#endif +++ +++/* Indicate that the thread TH is never to be joined with PTHREAD_JOIN. +++ The resources of TH will therefore be freed immediately when it +++ terminates, instead of waiting for another thread to perform PTHREAD_JOIN +++ on it. */ +++extern int pthread_detach (pthread_t __th) __THROW; +++ +++ +++/* Obtain the identifier of the current thread. */ +++extern pthread_t pthread_self (void) __THROW __attribute__ ((__const__)); +++ +++/* Compare two thread identifiers. */ +++extern int pthread_equal (pthread_t __thread1, pthread_t __thread2) +++ __THROW __attribute__ ((__const__)); +++ +++ +++/* Thread attribute handling. */ +++ +++/* Initialize thread attribute *ATTR with default attributes +++ (detachstate is PTHREAD_JOINABLE, scheduling policy is SCHED_OTHER, +++ no user-provided stack). */ +++extern int pthread_attr_init (pthread_attr_t *__attr) __THROW __nonnull ((1)); +++ +++/* Destroy thread attribute *ATTR. */ +++extern int pthread_attr_destroy (pthread_attr_t *__attr) +++ __THROW __nonnull ((1)); +++ +++/* Get detach state attribute. */ +++extern int pthread_attr_getdetachstate (const pthread_attr_t *__attr, +++ int *__detachstate) +++ __THROW __nonnull ((1, 2)); +++ +++/* Set detach state attribute. */ +++extern int pthread_attr_setdetachstate (pthread_attr_t *__attr, +++ int __detachstate) +++ __THROW __nonnull ((1)); +++ +++ +++/* Get the size of the guard area created for stack overflow protection. */ +++extern int pthread_attr_getguardsize (const pthread_attr_t *__attr, +++ size_t *__guardsize) +++ __THROW __nonnull ((1, 2)); +++ +++/* Set the size of the guard area created for stack overflow protection. */ +++extern int pthread_attr_setguardsize (pthread_attr_t *__attr, +++ size_t __guardsize) +++ __THROW __nonnull ((1)); +++ +++ +++/* Return in *PARAM the scheduling parameters of *ATTR. */ +++extern int pthread_attr_getschedparam (const pthread_attr_t *__restrict __attr, +++ struct sched_param *__restrict __param) +++ __THROW __nonnull ((1, 2)); +++ +++/* Set scheduling parameters (priority, etc) in *ATTR according to PARAM. */ +++extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr, +++ const struct sched_param *__restrict +++ __param) __THROW __nonnull ((1, 2)); +++ +++/* Return in *POLICY the scheduling policy of *ATTR. */ +++extern int pthread_attr_getschedpolicy (const pthread_attr_t *__restrict +++ __attr, int *__restrict __policy) +++ __THROW __nonnull ((1, 2)); +++ +++/* Set scheduling policy in *ATTR according to POLICY. */ +++extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy) +++ __THROW __nonnull ((1)); +++ +++/* Return in *INHERIT the scheduling inheritance mode of *ATTR. */ +++extern int pthread_attr_getinheritsched (const pthread_attr_t *__restrict +++ __attr, int *__restrict __inherit) +++ __THROW __nonnull ((1, 2)); +++ +++/* Set scheduling inheritance mode in *ATTR according to INHERIT. */ +++extern int pthread_attr_setinheritsched (pthread_attr_t *__attr, +++ int __inherit) +++ __THROW __nonnull ((1)); +++ +++ +++/* Return in *SCOPE the scheduling contention scope of *ATTR. */ +++extern int pthread_attr_getscope (const pthread_attr_t *__restrict __attr, +++ int *__restrict __scope) +++ __THROW __nonnull ((1, 2)); +++ +++/* Set scheduling contention scope in *ATTR according to SCOPE. */ +++extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope) +++ __THROW __nonnull ((1)); +++ +++/* Return the previously set address for the stack. */ +++extern int pthread_attr_getstackaddr (const pthread_attr_t *__restrict +++ __attr, void **__restrict __stackaddr) +++ __THROW __nonnull ((1, 2)) __attribute_deprecated__; +++ +++/* 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 +++ be higher or lower than all the address in the memory block. The +++ minimal size of the block must be PTHREAD_STACK_MIN. */ +++extern int pthread_attr_setstackaddr (pthread_attr_t *__attr, +++ void *__stackaddr) +++ __THROW __nonnull ((1)) __attribute_deprecated__; +++ +++/* Return the currently used minimal stack size. */ +++extern int pthread_attr_getstacksize (const pthread_attr_t *__restrict +++ __attr, size_t *__restrict __stacksize) +++ __THROW __nonnull ((1, 2)); +++ +++/* Add information about the minimum stack size needed for the thread +++ to be started. This size must never be less than PTHREAD_STACK_MIN +++ and must also not exceed the system limits. */ +++extern int pthread_attr_setstacksize (pthread_attr_t *__attr, +++ size_t __stacksize) +++ __THROW __nonnull ((1)); +++ +++#ifdef __USE_XOPEN2K +++/* Return the previously set address for the stack. */ +++extern int pthread_attr_getstack (const pthread_attr_t *__restrict __attr, +++ void **__restrict __stackaddr, +++ size_t *__restrict __stacksize) +++ __THROW __nonnull ((1, 2, 3)); +++ +++/* The following two interfaces are intended to replace the last two. They +++ require setting the address as well as the size since only setting the +++ address will make the implementation on some architectures impossible. */ +++extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr, +++ size_t __stacksize) __THROW __nonnull ((1)); +++#endif +++ +++#ifdef __USE_GNU +++ +++/* Thread created with attribute ATTR will be limited to run only on +++ the processors represented in CPUSET. */ +++extern int pthread_attr_setaffinity_np (pthread_attr_t *__attr, +++ size_t __cpusetsize, +++ const cpu_set_t *__cpuset) +++ __THROW __nonnull ((1, 3)); +++ +++/* Get bit set in CPUSET representing the processors threads created with +++ ATTR can run on. */ +++extern int pthread_attr_getaffinity_np (const pthread_attr_t *__attr, +++ size_t __cpusetsize, +++ cpu_set_t *__cpuset) +++ __THROW __nonnull ((1, 3)); +++ +++#ifdef _LIBC /* not yet supported, so do not expose outside libc */ +++ +++/* Get the default attributes used by pthread_create in this process. */ +++extern int pthread_getattr_default_np (pthread_attr_t *__attr) +++ __THROW __nonnull ((1)); +++ +++/* Set the default attributes to be used by pthread_create in this +++ process. */ +++extern int pthread_setattr_default_np (const pthread_attr_t *__attr) +++ __THROW __nonnull ((1)); +++ +++#endif /* not yet supported, so do not expose outside libc */ +++ +++/* Initialize thread attribute *ATTR with attributes corresponding to the +++ already running thread TH. It shall be called on uninitialized ATTR +++ and destroyed with pthread_attr_destroy when no longer needed. */ +++extern int pthread_getattr_np (pthread_t __th, pthread_attr_t *__attr) +++ __THROW __nonnull ((2)); +++#endif +++ +++ +++/* Functions for scheduling control. */ +++ +++/* Set the scheduling parameters for TARGET_THREAD according to POLICY +++ and *PARAM. */ +++extern int pthread_setschedparam (pthread_t __target_thread, int __policy, +++ const struct sched_param *__param) +++ __THROW __nonnull ((3)); +++ +++/* Return in *POLICY and *PARAM the scheduling parameters for TARGET_THREAD. */ +++extern int pthread_getschedparam (pthread_t __target_thread, +++ int *__restrict __policy, +++ struct sched_param *__restrict __param) +++ __THROW __nonnull ((2, 3)); +++ +++ +++#ifdef _LIBC /* not yet supported, so do not expose outside libc */ +++ +++/* Set the scheduling priority for TARGET_THREAD. */ +++extern int pthread_setschedprio (pthread_t __target_thread, int __prio) +++ __THROW; +++#endif /* not yet supported, so do not expose outside libc */ +++ +++ +++#ifdef __USE_GNU +++/* Get thread name visible in the kernel and its interfaces. */ +++extern int pthread_getname_np (pthread_t __target_thread, char *__buf, +++ size_t __buflen) +++ __THROW __nonnull ((2)); +++ +++/* Set thread name visible in the kernel and its interfaces. */ +++extern int pthread_setname_np (pthread_t __target_thread, const char *__name) +++ __THROW __nonnull ((2)); +++#endif +++ +++ +++#ifdef __USE_UNIX98 +++/* Determine level of concurrency. */ +++extern int pthread_getconcurrency (void) __THROW; +++ +++/* Set new concurrency level to LEVEL. */ +++extern int pthread_setconcurrency (int __level) __THROW; +++#endif +++ +++#ifdef __USE_GNU +++/* Yield the processor to another thread or process. +++ This function is similar to the POSIX `sched_yield' function but +++ might be differently implemented in the case of a m-on-n thread +++ implementation. */ +++extern int pthread_yield (void) __THROW; +++ +++/* Limit specified thread TH to run only on the processors represented +++ in CPUSET. */ +++extern int pthread_setaffinity_np (pthread_t __th, size_t __cpusetsize, +++ const cpu_set_t *__cpuset) +++ __THROW __nonnull ((3)); +++ +++/* Get bit set in CPUSET representing the processors TH can run on. */ +++extern int pthread_getaffinity_np (pthread_t __th, size_t __cpusetsize, +++ cpu_set_t *__cpuset) +++ __THROW __nonnull ((3)); +++ +++#endif +++ +++ +++/* Functions for handling initialization. */ +++ +++/* Guarantee that the initialization function INIT_ROUTINE will be called +++ only once, even if pthread_once is executed several times with the +++ same ONCE_CONTROL argument. ONCE_CONTROL must point to a static or +++ extern variable initialized to PTHREAD_ONCE_INIT. +++ +++ The initialization functions might throw exception which is why +++ this function is not marked with __THROW. */ +++extern int pthread_once (pthread_once_t *__once_control, +++ void (*__init_routine) (void)) __nonnull ((1, 2)); +++ +++ +++/* Functions for handling cancellation. +++ +++ Note that these functions are explicitly not marked to not throw an +++ exception in C++ code. If cancellation is implemented by unwinding +++ this is necessary to have the compiler generate the unwind information. */ +++ +++/* Set cancelability state of current thread to STATE, returning old +++ state in *OLDSTATE if OLDSTATE is not NULL. */ +++extern int pthread_setcancelstate (int __state, int *__oldstate); +++ +++/* Set cancellation state of current thread to TYPE, returning the old +++ type in *OLDTYPE if OLDTYPE is not NULL. */ +++extern int pthread_setcanceltype (int __type, int *__oldtype); +++ +++/* Cancel THREAD immediately or at the next possibility. */ +++extern int pthread_cancel (pthread_t __th); +++ +++/* Test for pending cancellation for the current thread and terminate +++ the thread as per pthread_exit(PTHREAD_CANCELED) if it has been +++ cancelled. */ +++extern void pthread_testcancel (void); +++ +++ +++/* Cancellation handling with integration into exception handling. */ +++ +++typedef struct +++{ +++ struct +++ { +++ __jmp_buf __cancel_jmp_buf; +++ int __mask_was_saved; +++ } __cancel_jmp_buf[1]; +++ void *__pad[4]; +++} __pthread_unwind_buf_t __attribute__ ((__aligned__)); +++ +++/* No special attributes by default. */ +++#ifndef __cleanup_fct_attribute +++# define __cleanup_fct_attribute +++#endif +++ +++ +++/* Structure to hold the cleanup handler information. */ +++struct __pthread_cleanup_frame +++{ +++ void (*__cancel_routine) (void *); +++ void *__cancel_arg; +++ int __do_it; +++ int __cancel_type; +++}; +++ +++#if defined __GNUC__ && defined __EXCEPTIONS +++# ifdef __cplusplus +++/* Class to handle cancellation handler invocation. */ +++class __pthread_cleanup_class +++{ +++ void (*__cancel_routine) (void *); +++ void *__cancel_arg; +++ int __do_it; +++ int __cancel_type; +++ +++ public: +++ __pthread_cleanup_class (void (*__fct) (void *), void *__arg) +++ : __cancel_routine (__fct), __cancel_arg (__arg), __do_it (1) { } +++ ~__pthread_cleanup_class () { if (__do_it) __cancel_routine (__cancel_arg); } +++ void __setdoit (int __newval) { __do_it = __newval; } +++ void __defer () { pthread_setcanceltype (PTHREAD_CANCEL_DEFERRED, +++ &__cancel_type); } +++ void __restore () const { pthread_setcanceltype (__cancel_type, 0); } +++}; +++ +++/* Install a cleanup handler: ROUTINE will be called with arguments ARG +++ when the thread is canceled or calls pthread_exit. ROUTINE will also +++ be called with arguments ARG when the matching pthread_cleanup_pop +++ is executed with non-zero EXECUTE argument. +++ +++ pthread_cleanup_push and pthread_cleanup_pop are macros and must always +++ be used in matching pairs at the same nesting level of braces. */ +++# define pthread_cleanup_push(routine, arg) \ +++ do { \ +++ __pthread_cleanup_class __clframe (routine, arg) +++ +++/* Remove a cleanup handler installed by the matching pthread_cleanup_push. +++ If EXECUTE is non-zero, the handler function is called. */ +++# define pthread_cleanup_pop(execute) \ +++ __clframe.__setdoit (execute); \ +++ } while (0) +++ +++# ifdef __USE_GNU +++/* Install a cleanup handler as pthread_cleanup_push does, but also +++ saves the current cancellation type and sets it to deferred +++ cancellation. */ +++# define pthread_cleanup_push_defer_np(routine, arg) \ +++ do { \ +++ __pthread_cleanup_class __clframe (routine, arg); \ +++ __clframe.__defer () +++ +++/* Remove a cleanup handler as pthread_cleanup_pop does, but also +++ restores the cancellation type that was in effect when the matching +++ pthread_cleanup_push_defer was called. */ +++# define pthread_cleanup_pop_restore_np(execute) \ +++ __clframe.__restore (); \ +++ __clframe.__setdoit (execute); \ +++ } while (0) +++# endif +++# else +++/* Function called to call the cleanup handler. As an extern inline +++ function the compiler is free to decide inlining the change when +++ needed or fall back on the copy which must exist somewhere +++ else. */ +++__extern_inline void +++__pthread_cleanup_routine (struct __pthread_cleanup_frame *__frame) +++{ +++ if (__frame->__do_it) +++ __frame->__cancel_routine (__frame->__cancel_arg); +++} +++ +++/* Install a cleanup handler: ROUTINE will be called with arguments ARG +++ when the thread is canceled or calls pthread_exit. ROUTINE will also +++ be called with arguments ARG when the matching pthread_cleanup_pop +++ is executed with non-zero EXECUTE argument. +++ +++ pthread_cleanup_push and pthread_cleanup_pop are macros and must always +++ be used in matching pairs at the same nesting level of braces. */ +++# define pthread_cleanup_push(routine, arg) \ +++ do { \ +++ struct __pthread_cleanup_frame __clframe \ +++ __attribute__ ((__cleanup__ (__pthread_cleanup_routine))) \ +++ = { .__cancel_routine = (routine), .__cancel_arg = (arg), \ +++ .__do_it = 1 }; +++ +++/* Remove a cleanup handler installed by the matching pthread_cleanup_push. +++ If EXECUTE is non-zero, the handler function is called. */ +++# define pthread_cleanup_pop(execute) \ +++ __clframe.__do_it = (execute); \ +++ } while (0) +++ +++# ifdef __USE_GNU +++/* Install a cleanup handler as pthread_cleanup_push does, but also +++ saves the current cancellation type and sets it to deferred +++ cancellation. */ +++# define pthread_cleanup_push_defer_np(routine, arg) \ +++ do { \ +++ struct __pthread_cleanup_frame __clframe \ +++ __attribute__ ((__cleanup__ (__pthread_cleanup_routine))) \ +++ = { .__cancel_routine = (routine), .__cancel_arg = (arg), \ +++ .__do_it = 1 }; \ +++ (void) pthread_setcanceltype (PTHREAD_CANCEL_DEFERRED, \ +++ &__clframe.__cancel_type) +++ +++/* Remove a cleanup handler as pthread_cleanup_pop does, but also +++ restores the cancellation type that was in effect when the matching +++ pthread_cleanup_push_defer was called. */ +++# define pthread_cleanup_pop_restore_np(execute) \ +++ (void) pthread_setcanceltype (__clframe.__cancel_type, NULL); \ +++ __clframe.__do_it = (execute); \ +++ } while (0) +++# endif +++# endif +++#else +++/* Install a cleanup handler: ROUTINE will be called with arguments ARG +++ when the thread is canceled or calls pthread_exit. ROUTINE will also +++ be called with arguments ARG when the matching pthread_cleanup_pop +++ is executed with non-zero EXECUTE argument. +++ +++ pthread_cleanup_push and pthread_cleanup_pop are macros and must always +++ be used in matching pairs at the same nesting level of braces. */ +++# define pthread_cleanup_push(routine, arg) \ +++ do { \ +++ __pthread_unwind_buf_t __cancel_buf; \ +++ void (*__cancel_routine) (void *) = (routine); \ +++ void *__cancel_arg = (arg); \ +++ int __not_first_call = __sigsetjmp ((struct __jmp_buf_tag *) (void *) \ +++ __cancel_buf.__cancel_jmp_buf, 0); \ +++ if (__glibc_unlikely (__not_first_call)) \ +++ { \ +++ __cancel_routine (__cancel_arg); \ +++ __pthread_unwind_next (&__cancel_buf); \ +++ /* NOTREACHED */ \ +++ } \ +++ \ +++ __pthread_register_cancel (&__cancel_buf); \ +++ do { +++extern void __pthread_register_cancel (__pthread_unwind_buf_t *__buf) +++ __cleanup_fct_attribute; +++ +++/* Remove a cleanup handler installed by the matching pthread_cleanup_push. +++ If EXECUTE is non-zero, the handler function is called. */ +++# define pthread_cleanup_pop(execute) \ +++ do { } while (0);/* Empty to allow label before pthread_cleanup_pop. */\ +++ } while (0); \ +++ __pthread_unregister_cancel (&__cancel_buf); \ +++ if (execute) \ +++ __cancel_routine (__cancel_arg); \ +++ } while (0) +++extern void __pthread_unregister_cancel (__pthread_unwind_buf_t *__buf) +++ __cleanup_fct_attribute; +++ +++# ifdef __USE_GNU +++/* Install a cleanup handler as pthread_cleanup_push does, but also +++ saves the current cancellation type and sets it to deferred +++ cancellation. */ +++# define pthread_cleanup_push_defer_np(routine, arg) \ +++ do { \ +++ __pthread_unwind_buf_t __cancel_buf; \ +++ void (*__cancel_routine) (void *) = (routine); \ +++ void *__cancel_arg = (arg); \ +++ int __not_first_call = __sigsetjmp ((struct __jmp_buf_tag *) (void *) \ +++ __cancel_buf.__cancel_jmp_buf, 0); \ +++ if (__glibc_unlikely (__not_first_call)) \ +++ { \ +++ __cancel_routine (__cancel_arg); \ +++ __pthread_unwind_next (&__cancel_buf); \ +++ /* NOTREACHED */ \ +++ } \ +++ \ +++ __pthread_register_cancel_defer (&__cancel_buf); \ +++ do { +++extern void __pthread_register_cancel_defer (__pthread_unwind_buf_t *__buf) +++ __cleanup_fct_attribute; +++ +++/* Remove a cleanup handler as pthread_cleanup_pop does, but also +++ restores the cancellation type that was in effect when the matching +++ pthread_cleanup_push_defer was called. */ +++# define pthread_cleanup_pop_restore_np(execute) \ +++ do { } while (0);/* Empty to allow label before pthread_cleanup_pop. */\ +++ } while (0); \ +++ __pthread_unregister_cancel_restore (&__cancel_buf); \ +++ if (execute) \ +++ __cancel_routine (__cancel_arg); \ +++ } while (0) +++extern void __pthread_unregister_cancel_restore (__pthread_unwind_buf_t *__buf) +++ __cleanup_fct_attribute; +++# endif +++ +++/* Internal interface to initiate cleanup. */ +++extern void __pthread_unwind_next (__pthread_unwind_buf_t *__buf) +++ __cleanup_fct_attribute __attribute__ ((__noreturn__)) +++# ifndef SHARED +++ __attribute__ ((__weak__)) +++# endif +++ ; +++#endif +++ +++/* Function used in the macros. */ +++struct __jmp_buf_tag; +++extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) __THROWNL; +++ +++ +++/* Mutex handling. */ +++ +++/* Initialize a mutex. */ +++extern int pthread_mutex_init (pthread_mutex_t *__mutex, +++ const pthread_mutexattr_t *__mutexattr) +++ __THROW __nonnull ((1)); +++ +++/* Destroy a mutex. */ +++extern int pthread_mutex_destroy (pthread_mutex_t *__mutex) +++ __THROW __nonnull ((1)); +++ +++/* Try locking a mutex. */ +++extern int pthread_mutex_trylock (pthread_mutex_t *__mutex) +++ __THROWNL __nonnull ((1)); +++ +++/* Lock a mutex. */ +++extern int pthread_mutex_lock (pthread_mutex_t *__mutex) +++ __THROWNL __nonnull ((1)); +++ +++#ifdef __USE_XOPEN2K +++/* Wait until lock becomes available, or specified time passes. */ +++extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex, +++ const struct timespec *__restrict +++ __abstime) __THROWNL __nonnull ((1, 2)); +++#endif +++ +++/* Unlock a mutex. */ +++extern int pthread_mutex_unlock (pthread_mutex_t *__mutex) +++ __THROWNL __nonnull ((1)); +++ +++#ifdef _LIBC /* not yet supported, so do not expose outside libc */ +++ +++/* Get the priority ceiling of MUTEX. */ +++extern int pthread_mutex_getprioceiling (const pthread_mutex_t * +++ __restrict __mutex, +++ int *__restrict __prioceiling) +++ __THROW __nonnull ((1, 2)); +++ +++/* Set the priority ceiling of MUTEX to PRIOCEILING, return old +++ priority ceiling value in *OLD_CEILING. */ +++extern int pthread_mutex_setprioceiling (pthread_mutex_t *__restrict __mutex, +++ int __prioceiling, +++ int *__restrict __old_ceiling) +++ __THROW __nonnull ((1, 3)); +++ +++ +++#ifdef __USE_XOPEN2K8 +++/* Declare the state protected by MUTEX as consistent. */ +++extern int pthread_mutex_consistent (pthread_mutex_t *__mutex) +++ __THROW __nonnull ((1)); +++# ifdef __USE_GNU +++extern int pthread_mutex_consistent_np (pthread_mutex_t *__mutex) +++ __THROW __nonnull ((1)); +++# endif +++#endif +++ +++#endif /* not yet supported, so do not expose outside libc */ +++ +++/* Functions for handling mutex attributes. */ +++ +++/* Initialize mutex attribute object ATTR with default attributes +++ (kind is PTHREAD_MUTEX_TIMED_NP). */ +++extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr) +++ __THROW __nonnull ((1)); +++ +++/* Destroy mutex attribute object ATTR. */ +++extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr) +++ __THROW __nonnull ((1)); +++ +++/* Get the process-shared flag of the mutex attribute ATTR. */ +++extern int pthread_mutexattr_getpshared (const pthread_mutexattr_t * +++ __restrict __attr, +++ int *__restrict __pshared) +++ __THROW __nonnull ((1, 2)); +++ +++/* Set the process-shared flag of the mutex attribute ATTR. */ +++extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr, +++ int __pshared) +++ __THROW __nonnull ((1)); +++ +++#if defined __USE_UNIX98 || defined __USE_XOPEN2K8 +++/* Return in *KIND the mutex kind attribute in *ATTR. */ +++extern int pthread_mutexattr_gettype (const pthread_mutexattr_t *__restrict +++ __attr, int *__restrict __kind) +++ __THROW __nonnull ((1, 2)); +++ +++/* Set the mutex kind attribute in *ATTR to KIND (either PTHREAD_MUTEX_NORMAL, +++ PTHREAD_MUTEX_RECURSIVE, PTHREAD_MUTEX_ERRORCHECK, or +++ PTHREAD_MUTEX_DEFAULT). */ +++extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind) +++ __THROW __nonnull ((1)); +++#endif +++ +++#ifdef _LIBC /* not yet supported, so do not expose outside libc */ +++ +++/* Return in *PROTOCOL the mutex protocol attribute in *ATTR. */ +++extern int pthread_mutexattr_getprotocol (const pthread_mutexattr_t * +++ __restrict __attr, +++ int *__restrict __protocol) +++ __THROW __nonnull ((1, 2)); +++ +++/* Set the mutex protocol attribute in *ATTR to PROTOCOL (either +++ PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT, or PTHREAD_PRIO_PROTECT). */ +++extern int pthread_mutexattr_setprotocol (pthread_mutexattr_t *__attr, +++ int __protocol) +++ __THROW __nonnull ((1)); +++ +++/* Return in *PRIOCEILING the mutex prioceiling attribute in *ATTR. */ +++extern int pthread_mutexattr_getprioceiling (const pthread_mutexattr_t * +++ __restrict __attr, +++ int *__restrict __prioceiling) +++ __THROW __nonnull ((1, 2)); +++ +++/* Set the mutex prioceiling attribute in *ATTR to PRIOCEILING. */ +++extern int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *__attr, +++ int __prioceiling) +++ __THROW __nonnull ((1)); +++ +++#ifdef __USE_XOPEN2K +++/* Get the robustness flag of the mutex attribute ATTR. */ +++extern int pthread_mutexattr_getrobust (const pthread_mutexattr_t *__attr, +++ int *__robustness) +++ __THROW __nonnull ((1, 2)); +++# ifdef __USE_GNU +++extern int pthread_mutexattr_getrobust_np (const pthread_mutexattr_t *__attr, +++ int *__robustness) +++ __THROW __nonnull ((1, 2)); +++# endif +++ +++/* Set the robustness flag of the mutex attribute ATTR. */ +++extern int pthread_mutexattr_setrobust (pthread_mutexattr_t *__attr, +++ int __robustness) +++ __THROW __nonnull ((1)); +++# ifdef __USE_GNU +++extern int pthread_mutexattr_setrobust_np (pthread_mutexattr_t *__attr, +++ int __robustness) +++ __THROW __nonnull ((1)); +++# endif +++#endif +++ +++#endif /* not yet supported, so do not expose outside libc */ +++ +++#if defined __USE_UNIX98 || defined __USE_XOPEN2K +++/* Functions for handling read-write locks. */ +++ +++/* Initialize read-write lock RWLOCK using attributes ATTR, or use +++ the default values if later is NULL. */ +++extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock, +++ const pthread_rwlockattr_t *__restrict +++ __attr) __THROW __nonnull ((1)); +++ +++/* Destroy read-write lock RWLOCK. */ +++extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock) +++ __THROW __nonnull ((1)); +++ +++/* Acquire read lock for RWLOCK. */ +++extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock) +++ __THROWNL __nonnull ((1)); +++ +++/* Try to acquire read lock for RWLOCK. */ +++extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock) +++ __THROWNL __nonnull ((1)); +++ +++# ifdef __USE_XOPEN2K +++/* Try to acquire read lock for RWLOCK or return after specfied time. */ +++extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock, +++ const struct timespec *__restrict +++ __abstime) __THROWNL __nonnull ((1, 2)); +++# endif +++ +++/* Acquire write lock for RWLOCK. */ +++extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock) +++ __THROWNL __nonnull ((1)); +++ +++/* Try to acquire write lock for RWLOCK. */ +++extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock) +++ __THROWNL __nonnull ((1)); +++ +++# ifdef __USE_XOPEN2K +++/* Try to acquire write lock for RWLOCK or return after specfied time. */ +++extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock, +++ const struct timespec *__restrict +++ __abstime) __THROWNL __nonnull ((1, 2)); +++# endif +++ +++/* Unlock RWLOCK. */ +++extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock) +++ __THROWNL __nonnull ((1)); +++ +++ +++/* Functions for handling read-write lock attributes. */ +++ +++/* Initialize attribute object ATTR with default values. */ +++extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr) +++ __THROW __nonnull ((1)); +++ +++/* Destroy attribute object ATTR. */ +++extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr) +++ __THROW __nonnull ((1)); +++ +++/* Return current setting of process-shared attribute of ATTR in PSHARED. */ +++extern int pthread_rwlockattr_getpshared (const pthread_rwlockattr_t * +++ __restrict __attr, +++ int *__restrict __pshared) +++ __THROW __nonnull ((1, 2)); +++ +++/* Set process-shared attribute of ATTR to PSHARED. */ +++extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr, +++ int __pshared) +++ __THROW __nonnull ((1)); +++ +++/* Return current setting of reader/writer preference. */ +++extern int pthread_rwlockattr_getkind_np (const pthread_rwlockattr_t * +++ __restrict __attr, +++ int *__restrict __pref) +++ __THROW __nonnull ((1, 2)); +++ +++/* Set reader/write preference. */ +++extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr, +++ int __pref) __THROW __nonnull ((1)); +++#endif +++ +++ +++/* Functions for handling conditional variables. */ +++ +++/* Initialize condition variable COND using attributes ATTR, or use +++ the default values if later is NULL. */ +++extern int pthread_cond_init (pthread_cond_t *__restrict __cond, +++ const pthread_condattr_t *__restrict __cond_attr) +++ __THROW __nonnull ((1)); +++ +++/* Destroy condition variable COND. */ +++extern int pthread_cond_destroy (pthread_cond_t *__cond) +++ __THROW __nonnull ((1)); +++ +++/* Wake up one thread waiting for condition variable COND. */ +++extern int pthread_cond_signal (pthread_cond_t *__cond) +++ __THROWNL __nonnull ((1)); +++ +++/* Wake up all threads waiting for condition variables COND. */ +++extern int pthread_cond_broadcast (pthread_cond_t *__cond) +++ __THROWNL __nonnull ((1)); +++ +++/* Wait for condition variable COND to be signaled or broadcast. +++ MUTEX is assumed to be locked before. +++ +++ This function is a cancellation point and therefore not marked with +++ __THROW. */ +++extern int pthread_cond_wait (pthread_cond_t *__restrict __cond, +++ pthread_mutex_t *__restrict __mutex) +++ __nonnull ((1, 2)); +++ +++/* Wait for condition variable COND to be signaled or broadcast until +++ ABSTIME. MUTEX is assumed to be locked before. ABSTIME is an +++ absolute time specification; zero is the beginning of the epoch +++ (00:00:00 GMT, January 1, 1970). +++ +++ This function is a cancellation point and therefore not marked with +++ __THROW. */ +++extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond, +++ pthread_mutex_t *__restrict __mutex, +++ const struct timespec *__restrict __abstime) +++ __nonnull ((1, 2, 3)); +++ +++/* Functions for handling condition variable attributes. */ +++ +++/* Initialize condition variable attribute ATTR. */ +++extern int pthread_condattr_init (pthread_condattr_t *__attr) +++ __THROW __nonnull ((1)); +++ +++/* Destroy condition variable attribute ATTR. */ +++extern int pthread_condattr_destroy (pthread_condattr_t *__attr) +++ __THROW __nonnull ((1)); +++ +++/* Get the process-shared flag of the condition variable attribute ATTR. */ +++extern int pthread_condattr_getpshared (const pthread_condattr_t * +++ __restrict __attr, +++ int *__restrict __pshared) +++ __THROW __nonnull ((1, 2)); +++ +++/* Set the process-shared flag of the condition variable attribute ATTR. */ +++extern int pthread_condattr_setpshared (pthread_condattr_t *__attr, +++ int __pshared) __THROW __nonnull ((1)); +++ +++#ifdef __USE_XOPEN2K +++/* Get the clock selected for the conditon variable attribute ATTR. */ +++extern int pthread_condattr_getclock (const pthread_condattr_t * +++ __restrict __attr, +++ __clockid_t *__restrict __clock_id) +++ __THROW __nonnull ((1, 2)); +++ +++/* Set the clock selected for the conditon variable attribute ATTR. */ +++extern int pthread_condattr_setclock (pthread_condattr_t *__attr, +++ __clockid_t __clock_id) +++ __THROW __nonnull ((1)); +++#endif +++ +++ +++#ifdef __USE_XOPEN2K +++/* Functions to handle spinlocks. */ +++ +++/* Initialize the spinlock LOCK. If PSHARED is nonzero the spinlock can +++ be shared between different processes. */ +++extern int pthread_spin_init (pthread_spinlock_t *__lock, int __pshared) +++ __THROW __nonnull ((1)); +++ +++/* Destroy the spinlock LOCK. */ +++extern int pthread_spin_destroy (pthread_spinlock_t *__lock) +++ __THROW __nonnull ((1)); +++ +++/* Wait until spinlock LOCK is retrieved. */ +++extern int pthread_spin_lock (pthread_spinlock_t *__lock) +++ __THROWNL __nonnull ((1)); +++ +++/* Try to lock spinlock LOCK. */ +++extern int pthread_spin_trylock (pthread_spinlock_t *__lock) +++ __THROWNL __nonnull ((1)); +++ +++/* Release spinlock LOCK. */ +++extern int pthread_spin_unlock (pthread_spinlock_t *__lock) +++ __THROWNL __nonnull ((1)); +++ +++ +++/* Functions to handle barriers. */ +++ +++/* Initialize BARRIER with the attributes in ATTR. The barrier is +++ opened when COUNT waiters arrived. */ +++extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier, +++ const pthread_barrierattr_t *__restrict +++ __attr, unsigned int __count) +++ __THROW __nonnull ((1)); +++ +++/* Destroy a previously dynamically initialized barrier BARRIER. */ +++extern int pthread_barrier_destroy (pthread_barrier_t *__barrier) +++ __THROW __nonnull ((1)); +++ +++/* Wait on barrier BARRIER. */ +++extern int pthread_barrier_wait (pthread_barrier_t *__barrier) +++ __THROWNL __nonnull ((1)); +++ +++ +++/* Initialize barrier attribute ATTR. */ +++extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr) +++ __THROW __nonnull ((1)); +++ +++/* Destroy previously dynamically initialized barrier attribute ATTR. */ +++extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr) +++ __THROW __nonnull ((1)); +++ +++/* Get the process-shared flag of the barrier attribute ATTR. */ +++extern int pthread_barrierattr_getpshared (const pthread_barrierattr_t * +++ __restrict __attr, +++ int *__restrict __pshared) +++ __THROW __nonnull ((1, 2)); +++ +++/* Set the process-shared flag of the barrier attribute ATTR. */ +++extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr, +++ int __pshared) +++ __THROW __nonnull ((1)); +++#endif +++ +++ +++/* Functions for handling thread-specific data. */ +++ +++/* Create a key value identifying a location in the thread-specific +++ data area. Each thread maintains a distinct thread-specific data +++ area. DESTR_FUNCTION, if non-NULL, is called with the value +++ associated to that key when the key is destroyed. +++ DESTR_FUNCTION is not called if the value associated is NULL when +++ the key is destroyed. */ +++extern int pthread_key_create (pthread_key_t *__key, +++ void (*__destr_function) (void *)) +++ __THROW __nonnull ((1)); +++ +++/* Destroy KEY. */ +++extern int pthread_key_delete (pthread_key_t __key) __THROW; +++ +++/* Return current value of the thread-specific data slot identified by KEY. */ +++extern void *pthread_getspecific (pthread_key_t __key) __THROW; +++ +++/* Store POINTER in the thread-specific data slot identified by KEY. */ +++extern int pthread_setspecific (pthread_key_t __key, +++ const void *__pointer) __THROW ; +++ +++ +++#ifdef __USE_XOPEN2K +++/* Get ID of CPU-time clock for thread THREAD_ID. */ +++extern int pthread_getcpuclockid (pthread_t __thread_id, +++ __clockid_t *__clock_id) +++ __THROW __nonnull ((2)); +++#endif +++ +++ +++/* Install handlers to be called when a new process is created with FORK. +++ The PREPARE handler is called in the parent process just before performing +++ FORK. The PARENT handler is called in the parent process just after FORK. +++ The CHILD handler is called in the child process. Each of the three +++ handlers can be NULL, meaning that no handler needs to be called at that +++ point. +++ PTHREAD_ATFORK can be called several times, in which case the PREPARE +++ handlers are called in LIFO order (last added with PTHREAD_ATFORK, +++ first called before FORK), and the PARENT and CHILD handlers are called +++ in FIFO (first added, first called). */ +++ +++extern int pthread_atfork (void (*__prepare) (void), +++ void (*__parent) (void), +++ void (*__child) (void)) __THROW; +++ +++ +++#ifdef __USE_EXTERN_INLINES +++/* Optimizations. */ +++__extern_inline int +++__NTH (pthread_equal (pthread_t __thread1, pthread_t __thread2)) +++{ +++ return __thread1 == __thread2; +++} +++#endif +++ +++__END_DECLS +++ +++#endif /* pthread.h */ ++--- /dev/null +++++ b/fbtl/sysdeps/pthread/pthread_sigmask.c ++@@ -0,0 +1,57 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++ +++ +++int +++pthread_sigmask (how, newmask, oldmask) +++ int how; +++ const sigset_t *newmask; +++ sigset_t *oldmask; +++{ +++ sigset_t local_newmask; +++ +++ /* The only thing we have to make sure here is that SIGCANCEL and +++ SIGSETXID is not blocked. */ +++ if (newmask != NULL +++ && (__builtin_expect (__sigismember (newmask, SIGCANCEL), 0) +++ || __builtin_expect (__sigismember (newmask, SIGSETXID), 0))) +++ { +++ local_newmask = *newmask; +++ __sigdelset (&local_newmask, SIGCANCEL); +++ __sigdelset (&local_newmask, SIGSETXID); +++ newmask = &local_newmask; +++ } +++ +++#ifdef INTERNAL_SYSCALL +++ /* We know that realtime signals are available if NPTL is used. */ +++ INTERNAL_SYSCALL_DECL (err); +++ int result = INTERNAL_SYSCALL (rt_sigprocmask, err, 4, how, newmask, +++ oldmask, _NSIG / 8); +++ +++ return (INTERNAL_SYSCALL_ERROR_P (result, err) +++ ? INTERNAL_SYSCALL_ERRNO (result, err) +++ : 0); +++#else +++ return sigprocmask (how, newmask, oldmask) == -1 ? errno : 0; +++#endif +++} ++--- /dev/null +++++ b/fbtl/sysdeps/pthread/setxid.h ++@@ -0,0 +1,62 @@ +++/* Copyright (C) 2004-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 +++ . */ +++ +++#include +++#include +++ +++#define __SETXID_1(cmd, arg1) \ +++ cmd.id[0] = (long int) arg1 +++#define __SETXID_2(cmd, arg1, arg2) \ +++ __SETXID_1 (cmd, arg1); cmd.id[1] = (long int) arg2 +++#define __SETXID_3(cmd, arg1, arg2, arg3) \ +++ __SETXID_2 (cmd, arg1, arg2); cmd.id[2] = (long int) arg3 +++ +++#ifdef SINGLE_THREAD +++# define INLINE_SETXID_SYSCALL(name, nr, args...) \ +++ INLINE_SYSCALL (name, nr, args) +++#elif defined SHARED +++# define INLINE_SETXID_SYSCALL(name, nr, args...) \ +++ ({ \ +++ int __result; \ +++ if (__builtin_expect (__libc_pthread_functions_init, 0)) \ +++ { \ +++ struct xid_command __cmd; \ +++ __cmd.syscall_no = __NR_##name; \ +++ __SETXID_##nr (__cmd, args); \ +++ __result = PTHFCT_CALL (ptr__nptl_setxid, (&__cmd)); \ +++ } \ +++ else \ +++ __result = INLINE_SYSCALL (name, nr, args); \ +++ __result; \ +++ }) +++#else +++# define INLINE_SETXID_SYSCALL(name, nr, args...) \ +++ ({ \ +++ extern __typeof (__nptl_setxid) __nptl_setxid __attribute__((weak));\ +++ int __result; \ +++ if (__glibc_unlikely (__nptl_setxid != NULL)) \ +++ { \ +++ struct xid_command __cmd; \ +++ __cmd.syscall_no = __NR_##name; \ +++ __SETXID_##nr (__cmd, args); \ +++ __result =__nptl_setxid (&__cmd); \ +++ } \ +++ else \ +++ __result = INLINE_SYSCALL (name, nr, args); \ +++ __result; \ +++ }) +++#endif ++--- /dev/null +++++ b/fbtl/sysdeps/pthread/shm-directory.h ++@@ -0,0 +1,31 @@ +++/* Header for directory for shm/sem files. NPTL version. +++ Copyright (C) 2014-2015 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 +++ . */ +++ +++#ifndef _SHM_DIRECTORY_H +++ +++#include +++ +++/* For NPTL the __shm_directory function lives in libpthread. +++ We don't want PLT calls from there. But it's also used from +++ librt, so it cannot just be declared hidden. */ +++ +++#if IS_IN (libpthread) +++hidden_proto (__shm_directory) +++#endif +++ +++#endif /* shm-directory.h */ ++--- /dev/null +++++ b/fbtl/sysdeps/pthread/sigfillset.c ++@@ -0,0 +1,20 @@ +++/* Copyright (C) 2003-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 +++ . */ +++ +++#include +++ +++#include ++--- /dev/null +++++ b/fbtl/sysdeps/pthread/sigprocmask.c ++@@ -0,0 +1,19 @@ +++/* Copyright (C) 1997-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 +++ . */ +++ +++#include +++#include ++--- /dev/null +++++ b/fbtl/sysdeps/pthread/stdio-lock.h ++@@ -0,0 +1,110 @@ +++/* Thread package specific definitions of stream lock type. NPTL version. +++ Copyright (C) 2000-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 +++ . */ +++ +++#ifndef _STDIO_LOCK_H +++#define _STDIO_LOCK_H 1 +++ +++#include +++#include +++ +++ +++/* The locking here is very inexpensive, even for inlining. */ +++#define _IO_lock_inexpensive 1 +++ +++typedef struct { int lock; int cnt; void *owner; } _IO_lock_t; +++ +++#define _IO_lock_initializer { LLL_LOCK_INITIALIZER, 0, NULL } +++ +++#define _IO_lock_init(_name) \ +++ ((void) ((_name) = (_IO_lock_t) _IO_lock_initializer)) +++ +++#define _IO_lock_fini(_name) \ +++ ((void) 0) +++ +++#define _IO_lock_lock(_name) \ +++ do { \ +++ void *__self = THREAD_SELF; \ +++ if ((_name).owner != __self) \ +++ { \ +++ lll_lock ((_name).lock, LLL_PRIVATE); \ +++ (_name).owner = __self; \ +++ } \ +++ ++(_name).cnt; \ +++ } while (0) +++ +++#define _IO_lock_trylock(_name) \ +++ ({ \ +++ int __result = 0; \ +++ void *__self = THREAD_SELF; \ +++ if ((_name).owner != __self) \ +++ { \ +++ if (lll_trylock ((_name).lock) == 0) \ +++ { \ +++ (_name).owner = __self; \ +++ (_name).cnt = 1; \ +++ } \ +++ else \ +++ __result = EBUSY; \ +++ } \ +++ else \ +++ ++(_name).cnt; \ +++ __result; \ +++ }) +++ +++#define _IO_lock_unlock(_name) \ +++ do { \ +++ if (--(_name).cnt == 0) \ +++ { \ +++ (_name).owner = NULL; \ +++ lll_unlock ((_name).lock, LLL_PRIVATE); \ +++ } \ +++ } while (0) +++ +++ +++ +++#define _IO_cleanup_region_start(_fct, _fp) \ +++ __libc_cleanup_region_start (((_fp)->_flags & _IO_USER_LOCK) == 0, _fct, _fp) +++#define _IO_cleanup_region_start_noarg(_fct) \ +++ __libc_cleanup_region_start (1, _fct, NULL) +++#define _IO_cleanup_region_end(_doit) \ +++ __libc_cleanup_region_end (_doit) +++ +++#if defined _LIBC && IS_IN (libc) +++ +++# ifdef __EXCEPTIONS +++# define _IO_acquire_lock(_fp) \ +++ do { \ +++ _IO_FILE *_IO_acquire_lock_file \ +++ __attribute__((cleanup (_IO_acquire_lock_fct))) \ +++ = (_fp); \ +++ _IO_flockfile (_IO_acquire_lock_file); +++# define _IO_acquire_lock_clear_flags2(_fp) \ +++ do { \ +++ _IO_FILE *_IO_acquire_lock_file \ +++ __attribute__((cleanup (_IO_acquire_lock_clear_flags2_fct))) \ +++ = (_fp); \ +++ _IO_flockfile (_IO_acquire_lock_file); +++# else +++# define _IO_acquire_lock(_fp) _IO_acquire_lock_needs_exceptions_enabled +++# define _IO_acquire_lock_clear_flags2(_fp) _IO_acquire_lock (_fp) +++# endif +++# define _IO_release_lock(_fp) ; } while (0) +++ +++#endif +++ +++#endif /* stdio-lock.h */ ++--- /dev/null +++++ b/fbtl/sysdeps/pthread/tcb-offsets.h ++@@ -0,0 +1 @@ +++/* This is overridden by generated tcb-offsets.h on arches which need it. */ ++--- /dev/null +++++ b/fbtl/sysdeps/pthread/timer_create.c ++@@ -0,0 +1,169 @@ +++/* Copyright (C) 2000-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Kaz Kylheku . +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public License as +++ published by the Free Software Foundation; either version 2.1 of the +++ License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General 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, see . */ +++ +++#include +++#include +++#include +++#include +++#include +++ +++#include "posix-timer.h" +++ +++ +++/* Create new per-process timer using CLOCK. */ +++int +++timer_create (clock_id, evp, timerid) +++ clockid_t clock_id; +++ struct sigevent *evp; +++ timer_t *timerid; +++{ +++ int retval = -1; +++ struct timer_node *newtimer = NULL; +++ struct thread_node *thread = NULL; +++ +++ if (0 +++#if defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 +++ || clock_id == CLOCK_PROCESS_CPUTIME_ID +++#endif +++#if defined _POSIX_THREAD_CPUTIME && _POSIX_THREAD_CPUTIME >= 0 +++ || clock_id == CLOCK_THREAD_CPUTIME_ID +++#endif +++ ) +++ { +++ /* We don't allow timers for CPU clocks. At least not in the +++ moment. */ +++ __set_errno (ENOTSUP); +++ return -1; +++ } +++ +++ if (clock_id != CLOCK_REALTIME) +++ { +++ __set_errno (EINVAL); +++ return -1; +++ } +++ +++ pthread_once (&__timer_init_once_control, __timer_init_once); +++ +++ if (__timer_init_failed) +++ { +++ __set_errno (ENOMEM); +++ return -1; +++ } +++ +++ pthread_mutex_lock (&__timer_mutex); +++ +++ newtimer = __timer_alloc (); +++ if (__glibc_unlikely (newtimer == NULL)) +++ { +++ __set_errno (EAGAIN); +++ goto unlock_bail; +++ } +++ +++ if (evp != NULL) +++ newtimer->event = *evp; +++ else +++ { +++ newtimer->event.sigev_notify = SIGEV_SIGNAL; +++ newtimer->event.sigev_signo = SIGALRM; +++ newtimer->event.sigev_value.sival_ptr = timer_ptr2id (newtimer); +++ newtimer->event.sigev_notify_function = 0; +++ } +++ +++ newtimer->event.sigev_notify_attributes = &newtimer->attr; +++ newtimer->creator_pid = getpid (); +++ +++ switch (__builtin_expect (newtimer->event.sigev_notify, SIGEV_SIGNAL)) +++ { +++ case SIGEV_NONE: +++ case SIGEV_SIGNAL: +++ /* We have a global thread for delivering timed signals. +++ If it is not running, try to start it up. */ +++ thread = &__timer_signal_thread_rclk; +++ if (! thread->exists) +++ { +++ if (__builtin_expect (__timer_thread_start (thread), +++ 1) < 0) +++ { +++ __set_errno (EAGAIN); +++ goto unlock_bail; +++ } +++ } +++ break; +++ +++ case SIGEV_THREAD: +++ /* Copy over thread attributes or set up default ones. */ +++ if (evp->sigev_notify_attributes) +++ newtimer->attr = *(pthread_attr_t *) evp->sigev_notify_attributes; +++ else +++ pthread_attr_init (&newtimer->attr); +++ +++ /* Ensure thread attributes call for deatched thread. */ +++ pthread_attr_setdetachstate (&newtimer->attr, PTHREAD_CREATE_DETACHED); +++ +++ /* Try to find existing thread having the right attributes. */ +++ thread = __timer_thread_find_matching (&newtimer->attr, clock_id); +++ +++ /* If no existing thread has these attributes, try to allocate one. */ +++ if (thread == NULL) +++ thread = __timer_thread_alloc (&newtimer->attr, clock_id); +++ +++ /* Out of luck; no threads are available. */ +++ if (__glibc_unlikely (thread == NULL)) +++ { +++ __set_errno (EAGAIN); +++ goto unlock_bail; +++ } +++ +++ /* If the thread is not running already, try to start it. */ +++ if (! thread->exists +++ && __builtin_expect (! __timer_thread_start (thread), 0)) +++ { +++ __set_errno (EAGAIN); +++ goto unlock_bail; +++ } +++ break; +++ +++ default: +++ __set_errno (EINVAL); +++ goto unlock_bail; +++ } +++ +++ newtimer->clock = clock_id; +++ newtimer->abstime = 0; +++ newtimer->armed = 0; +++ newtimer->thread = thread; +++ +++ *timerid = timer_ptr2id (newtimer); +++ retval = 0; +++ +++ if (__builtin_expect (retval, 0) == -1) +++ { +++ unlock_bail: +++ if (thread != NULL) +++ __timer_thread_dealloc (thread); +++ if (newtimer != NULL) +++ { +++ timer_delref (newtimer); +++ __timer_dealloc (newtimer); +++ } +++ } +++ +++ pthread_mutex_unlock (&__timer_mutex); +++ +++ return retval; +++} ++--- /dev/null +++++ b/fbtl/sysdeps/pthread/timer_delete.c ++@@ -0,0 +1,69 @@ +++/* Copyright (C) 2000-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Kaz Kylheku . +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public License as +++ published by the Free Software Foundation; either version 2.1 of the +++ License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General 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, see . */ +++ +++#include +++#include +++#include +++#include +++ +++#include "posix-timer.h" +++ +++ +++/* Delete timer TIMERID. */ +++int +++timer_delete (timerid) +++ timer_t timerid; +++{ +++ struct timer_node *timer; +++ int retval = -1; +++ +++ pthread_mutex_lock (&__timer_mutex); +++ +++ timer = timer_id2ptr (timerid); +++ if (! timer_valid (timer)) +++ /* Invalid timer ID or the timer is not in use. */ +++ __set_errno (EINVAL); +++ else +++ { +++ if (timer->armed && timer->thread != NULL) +++ { +++ struct thread_node *thread = timer->thread; +++ assert (thread != NULL); +++ +++ /* If thread is cancelled while waiting for handler to terminate, +++ the mutex is unlocked and timer_delete is aborted. */ +++ pthread_cleanup_push (__timer_mutex_cancel_handler, &__timer_mutex); +++ +++ /* If timer is currently being serviced, wait for it to finish. */ +++ while (thread->current_timer == timer) +++ pthread_cond_wait (&thread->cond, &__timer_mutex); +++ +++ pthread_cleanup_pop (0); +++ } +++ +++ /* Remove timer from whatever queue it may be on and deallocate it. */ +++ timer->inuse = TIMER_DELETED; +++ list_unlink_ip (&timer->links); +++ timer_delref (timer); +++ retval = 0; +++ } +++ +++ pthread_mutex_unlock (&__timer_mutex); +++ +++ return retval; +++} ++--- /dev/null +++++ b/fbtl/sysdeps/pthread/timer_getoverr.c ++@@ -0,0 +1,44 @@ +++/* Copyright (C) 2000-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Kaz Kylheku . +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public License as +++ published by the Free Software Foundation; either version 2.1 of the +++ License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General 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, see . */ +++ +++#include +++#include +++#include +++ +++#include "posix-timer.h" +++ +++ +++/* Get expiration overrun for timer TIMERID. */ +++int +++timer_getoverrun (timerid) +++ timer_t timerid; +++{ +++ struct timer_node *timer; +++ int retval = -1; +++ +++ pthread_mutex_lock (&__timer_mutex); +++ +++ if (! timer_valid (timer = timer_id2ptr (timerid))) +++ __set_errno (EINVAL); +++ else +++ retval = timer->overrun_count; +++ +++ pthread_mutex_unlock (&__timer_mutex); +++ +++ return retval; +++} ++--- /dev/null +++++ b/fbtl/sysdeps/pthread/timer_gettime.c ++@@ -0,0 +1,76 @@ +++/* Copyright (C) 2000-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Kaz Kylheku . +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public License as +++ published by the Free Software Foundation; either version 2.1 of the +++ License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General 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, see . */ +++ +++#include +++#include +++#include +++ +++#include "posix-timer.h" +++ +++ +++/* Get current value of timer TIMERID and store it in VLAUE. */ +++int +++timer_gettime (timerid, value) +++ timer_t timerid; +++ struct itimerspec *value; +++{ +++ struct timer_node *timer; +++ struct timespec now, expiry; +++ int retval = -1, armed = 0, valid; +++ clock_t clock = 0; +++ +++ pthread_mutex_lock (&__timer_mutex); +++ +++ timer = timer_id2ptr (timerid); +++ valid = timer_valid (timer); +++ +++ if (valid) { +++ armed = timer->armed; +++ expiry = timer->expirytime; +++ clock = timer->clock; +++ value->it_interval = timer->value.it_interval; +++ } +++ +++ pthread_mutex_unlock (&__timer_mutex); +++ +++ if (valid) +++ { +++ if (armed) +++ { +++ clock_gettime (clock, &now); +++ if (timespec_compare (&now, &expiry) < 0) +++ timespec_sub (&value->it_value, &expiry, &now); +++ else +++ { +++ value->it_value.tv_sec = 0; +++ value->it_value.tv_nsec = 0; +++ } +++ } +++ else +++ { +++ value->it_value.tv_sec = 0; +++ value->it_value.tv_nsec = 0; +++ } +++ +++ retval = 0; +++ } +++ else +++ __set_errno (EINVAL); +++ +++ return retval; +++} ++--- /dev/null +++++ b/fbtl/sysdeps/pthread/timer_routines.c ++@@ -0,0 +1,577 @@ +++/* Helper code for POSIX timer implementation on NPTL. +++ Copyright (C) 2000-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Kaz Kylheku . +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public License as +++ published by the Free Software Foundation; either version 2.1 of the +++ License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General 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, see . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++#include "posix-timer.h" +++#include +++ +++ +++/* Number of threads used. */ +++#define THREAD_MAXNODES 16 +++ +++/* Array containing the descriptors for the used threads. */ +++static struct thread_node thread_array[THREAD_MAXNODES]; +++ +++/* Static array with the structures for all the timers. */ +++struct timer_node __timer_array[TIMER_MAX]; +++ +++/* Global lock to protect operation on the lists. */ +++pthread_mutex_t __timer_mutex = PTHREAD_MUTEX_INITIALIZER; +++ +++/* Variable to protext initialization. */ +++pthread_once_t __timer_init_once_control = PTHREAD_ONCE_INIT; +++ +++/* Nonzero if initialization of timer implementation failed. */ +++int __timer_init_failed; +++ +++/* Node for the thread used to deliver signals. */ +++struct thread_node __timer_signal_thread_rclk; +++ +++/* Lists to keep free and used timers and threads. */ +++struct list_links timer_free_list; +++struct list_links thread_free_list; +++struct list_links thread_active_list; +++ +++ +++#ifdef __NR_rt_sigqueueinfo +++extern int __syscall_rt_sigqueueinfo (int, int, siginfo_t *); +++#endif +++ +++ +++/* List handling functions. */ +++static inline void +++list_init (struct list_links *list) +++{ +++ list->next = list->prev = list; +++} +++ +++static inline void +++list_append (struct list_links *list, struct list_links *newp) +++{ +++ newp->prev = list->prev; +++ newp->next = list; +++ list->prev->next = newp; +++ list->prev = newp; +++} +++ +++static inline void +++list_insbefore (struct list_links *list, struct list_links *newp) +++{ +++ list_append (list, newp); +++} +++ +++/* +++ * Like list_unlink_ip, except that calling it on a node that +++ * is already unlinked is disastrous rather than a noop. +++ */ +++ +++static inline void +++list_unlink (struct list_links *list) +++{ +++ struct list_links *lnext = list->next, *lprev = list->prev; +++ +++ lnext->prev = lprev; +++ lprev->next = lnext; +++} +++ +++static inline struct list_links * +++list_first (struct list_links *list) +++{ +++ return list->next; +++} +++ +++static inline struct list_links * +++list_null (struct list_links *list) +++{ +++ return list; +++} +++ +++static inline struct list_links * +++list_next (struct list_links *list) +++{ +++ return list->next; +++} +++ +++static inline int +++list_isempty (struct list_links *list) +++{ +++ return list->next == list; +++} +++ +++ +++/* Functions build on top of the list functions. */ +++static inline struct thread_node * +++thread_links2ptr (struct list_links *list) +++{ +++ return (struct thread_node *) ((char *) list +++ - offsetof (struct thread_node, links)); +++} +++ +++static inline struct timer_node * +++timer_links2ptr (struct list_links *list) +++{ +++ return (struct timer_node *) ((char *) list +++ - offsetof (struct timer_node, links)); +++} +++ +++ +++/* Initialize a newly allocated thread structure. */ +++static void +++thread_init (struct thread_node *thread, const pthread_attr_t *attr, clockid_t clock_id) +++{ +++ if (attr != NULL) +++ thread->attr = *attr; +++ else +++ { +++ pthread_attr_init (&thread->attr); +++ pthread_attr_setdetachstate (&thread->attr, PTHREAD_CREATE_DETACHED); +++ } +++ +++ thread->exists = 0; +++ list_init (&thread->timer_queue); +++ pthread_cond_init (&thread->cond, 0); +++ thread->current_timer = 0; +++ thread->captured = pthread_self (); +++ thread->clock_id = clock_id; +++} +++ +++ +++/* Initialize the global lists, and acquire global resources. Error +++ reporting is done by storing a non-zero value to the global variable +++ timer_init_failed. */ +++static void +++init_module (void) +++{ +++ int i; +++ +++ list_init (&timer_free_list); +++ list_init (&thread_free_list); +++ list_init (&thread_active_list); +++ +++ for (i = 0; i < TIMER_MAX; ++i) +++ { +++ list_append (&timer_free_list, &__timer_array[i].links); +++ __timer_array[i].inuse = TIMER_FREE; +++ } +++ +++ for (i = 0; i < THREAD_MAXNODES; ++i) +++ list_append (&thread_free_list, &thread_array[i].links); +++ +++ thread_init (&__timer_signal_thread_rclk, 0, CLOCK_REALTIME); +++} +++ +++ +++/* This is a handler executed in a child process after a fork() +++ occurs. It reinitializes the module, resetting all of the data +++ structures to their initial state. The mutex is initialized in +++ case it was locked in the parent process. */ +++static void +++reinit_after_fork (void) +++{ +++ init_module (); +++ pthread_mutex_init (&__timer_mutex, 0); +++} +++ +++ +++/* Called once form pthread_once in timer_init. This initializes the +++ module and ensures that reinit_after_fork will be executed in any +++ child process. */ +++void +++__timer_init_once (void) +++{ +++ init_module (); +++ pthread_atfork (0, 0, reinit_after_fork); +++} +++ +++ +++/* Deinitialize a thread that is about to be deallocated. */ +++static void +++thread_deinit (struct thread_node *thread) +++{ +++ assert (list_isempty (&thread->timer_queue)); +++ pthread_cond_destroy (&thread->cond); +++} +++ +++ +++/* Allocate a thread structure from the global free list. Global +++ mutex lock must be held by caller. The thread is moved to +++ the active list. */ +++struct thread_node * +++__timer_thread_alloc (const pthread_attr_t *desired_attr, clockid_t clock_id) +++{ +++ struct list_links *node = list_first (&thread_free_list); +++ +++ if (node != list_null (&thread_free_list)) +++ { +++ struct thread_node *thread = thread_links2ptr (node); +++ list_unlink (node); +++ thread_init (thread, desired_attr, clock_id); +++ list_append (&thread_active_list, node); +++ return thread; +++ } +++ +++ return 0; +++} +++ +++ +++/* Return a thread structure to the global free list. Global lock +++ must be held by caller. */ +++void +++__timer_thread_dealloc (struct thread_node *thread) +++{ +++ thread_deinit (thread); +++ list_unlink (&thread->links); +++ list_append (&thread_free_list, &thread->links); +++} +++ +++ +++/* Each of our threads which terminates executes this cleanup +++ handler. We never terminate threads ourselves; if a thread gets here +++ it means that the evil application has killed it. If the thread has +++ timers, these require servicing and so we must hire a replacement +++ thread right away. We must also unblock another thread that may +++ have been waiting for this thread to finish servicing a timer (see +++ timer_delete()). */ +++ +++static void +++thread_cleanup (void *val) +++{ +++ if (val != NULL) +++ { +++ struct thread_node *thread = val; +++ +++ /* How did the signal thread get killed? */ +++ assert (thread != &__timer_signal_thread_rclk); +++ +++ pthread_mutex_lock (&__timer_mutex); +++ +++ thread->exists = 0; +++ +++ /* We are no longer processing a timer event. */ +++ thread->current_timer = 0; +++ +++ if (list_isempty (&thread->timer_queue)) +++ __timer_thread_dealloc (thread); +++ else +++ (void) __timer_thread_start (thread); +++ +++ pthread_mutex_unlock (&__timer_mutex); +++ +++ /* Unblock potentially blocked timer_delete(). */ +++ pthread_cond_broadcast (&thread->cond); +++ } +++} +++ +++ +++/* Handle a timer which is supposed to go off now. */ +++static void +++thread_expire_timer (struct thread_node *self, struct timer_node *timer) +++{ +++ self->current_timer = timer; /* Lets timer_delete know timer is running. */ +++ +++ pthread_mutex_unlock (&__timer_mutex); +++ +++ switch (__builtin_expect (timer->event.sigev_notify, SIGEV_SIGNAL)) +++ { +++ case SIGEV_NONE: +++ break; +++ +++ case SIGEV_SIGNAL: +++#ifdef __NR_rt_sigqueueinfo +++ { +++ siginfo_t info; +++ +++ /* First, clear the siginfo_t structure, so that we don't pass our +++ stack content to other tasks. */ +++ memset (&info, 0, sizeof (siginfo_t)); +++ /* We must pass the information about the data in a siginfo_t +++ value. */ +++ info.si_signo = timer->event.sigev_signo; +++ info.si_code = SI_TIMER; +++ info.si_pid = timer->creator_pid; +++ info.si_uid = getuid (); +++ info.si_value = timer->event.sigev_value; +++ +++ INLINE_SYSCALL (rt_sigqueueinfo, 3, info.si_pid, info.si_signo, &info); +++ } +++#else +++ if (pthread_kill (self->captured, timer->event.sigev_signo) != 0) +++ { +++ if (pthread_kill (self->id, timer->event.sigev_signo) != 0) +++ abort (); +++ } +++#endif +++ break; +++ +++ case SIGEV_THREAD: +++ timer->event.sigev_notify_function (timer->event.sigev_value); +++ break; +++ +++ default: +++ assert (! "unknown event"); +++ break; +++ } +++ +++ pthread_mutex_lock (&__timer_mutex); +++ +++ self->current_timer = 0; +++ +++ pthread_cond_broadcast (&self->cond); +++} +++ +++ +++/* Thread function; executed by each timer thread. The job of this +++ function is to wait on the thread's timer queue and expire the +++ timers in chronological order as close to their scheduled time as +++ possible. */ +++static void +++__attribute__ ((noreturn)) +++thread_func (void *arg) +++{ +++ struct thread_node *self = arg; +++ +++ /* Register cleanup handler, in case rogue application terminates +++ this thread. (This cannot happen to __timer_signal_thread, which +++ doesn't invoke application callbacks). */ +++ +++ pthread_cleanup_push (thread_cleanup, self); +++ +++ pthread_mutex_lock (&__timer_mutex); +++ +++ while (1) +++ { +++ struct list_links *first; +++ struct timer_node *timer = NULL; +++ +++ /* While the timer queue is not empty, inspect the first node. */ +++ first = list_first (&self->timer_queue); +++ if (first != list_null (&self->timer_queue)) +++ { +++ struct timespec now; +++ +++ timer = timer_links2ptr (first); +++ +++ /* This assumes that the elements of the list of one thread +++ are all for the same clock. */ +++ clock_gettime (timer->clock, &now); +++ +++ while (1) +++ { +++ /* If the timer is due or overdue, remove it from the queue. +++ If it's a periodic timer, re-compute its new time and +++ requeue it. Either way, perform the timer expiry. */ +++ if (timespec_compare (&now, &timer->expirytime) < 0) +++ break; +++ +++ list_unlink_ip (first); +++ +++ if (__builtin_expect (timer->value.it_interval.tv_sec, 0) != 0 +++ || timer->value.it_interval.tv_nsec != 0) +++ { +++ timer->overrun_count = 0; +++ timespec_add (&timer->expirytime, &timer->expirytime, +++ &timer->value.it_interval); +++ while (timespec_compare (&timer->expirytime, &now) < 0) +++ { +++ timespec_add (&timer->expirytime, &timer->expirytime, +++ &timer->value.it_interval); +++ if (timer->overrun_count < DELAYTIMER_MAX) +++ ++timer->overrun_count; +++ } +++ __timer_thread_queue_timer (self, timer); +++ } +++ +++ thread_expire_timer (self, timer); +++ +++ first = list_first (&self->timer_queue); +++ if (first == list_null (&self->timer_queue)) +++ break; +++ +++ timer = timer_links2ptr (first); +++ } +++ } +++ +++ /* If the queue is not empty, wait until the expiry time of the +++ first node. Otherwise wait indefinitely. Insertions at the +++ head of the queue must wake up the thread by broadcasting +++ this condition variable. */ +++ if (timer != NULL) +++ pthread_cond_timedwait (&self->cond, &__timer_mutex, +++ &timer->expirytime); +++ else +++ pthread_cond_wait (&self->cond, &__timer_mutex); +++ } +++ /* This macro will never be executed since the while loop loops +++ forever - but we have to add it for proper nesting. */ +++ pthread_cleanup_pop (1); +++} +++ +++ +++/* Enqueue a timer in wakeup order in the thread's timer queue. +++ Returns 1 if the timer was inserted at the head of the queue, +++ causing the queue's next wakeup time to change. */ +++ +++int +++__timer_thread_queue_timer (struct thread_node *thread, +++ struct timer_node *insert) +++{ +++ struct list_links *iter; +++ int athead = 1; +++ +++ for (iter = list_first (&thread->timer_queue); +++ iter != list_null (&thread->timer_queue); +++ iter = list_next (iter)) +++ { +++ struct timer_node *timer = timer_links2ptr (iter); +++ +++ if (timespec_compare (&insert->expirytime, &timer->expirytime) < 0) +++ break; +++ athead = 0; +++ } +++ +++ list_insbefore (iter, &insert->links); +++ return athead; +++} +++ +++ +++/* Start a thread and associate it with the given thread node. Global +++ lock must be held by caller. */ +++int +++__timer_thread_start (struct thread_node *thread) +++{ +++ int retval = 1; +++ +++ assert (!thread->exists); +++ thread->exists = 1; +++ +++ if (pthread_create (&thread->id, &thread->attr, +++ (void *(*) (void *)) thread_func, thread) != 0) +++ { +++ thread->exists = 0; +++ retval = -1; +++ } +++ +++ return retval; +++} +++ +++ +++void +++__timer_thread_wakeup (struct thread_node *thread) +++{ +++ pthread_cond_broadcast (&thread->cond); +++} +++ +++ +++/* Compare two pthread_attr_t thread attributes for exact equality. +++ Returns 1 if they are equal, otherwise zero if they are not equal +++ or contain illegal values. This version is NPTL-specific for +++ performance reason. One could use the access functions to get the +++ values of all the fields of the attribute structure. */ +++static int +++thread_attr_compare (const pthread_attr_t *left, const pthread_attr_t *right) +++{ +++ struct pthread_attr *ileft = (struct pthread_attr *) left; +++ struct pthread_attr *iright = (struct pthread_attr *) right; +++ +++ return (ileft->flags == iright->flags +++ && ileft->schedpolicy == iright->schedpolicy +++ && (ileft->schedparam.sched_priority +++ == iright->schedparam.sched_priority) +++ && ileft->guardsize == iright->guardsize +++ && ileft->stackaddr == iright->stackaddr +++ && ileft->stacksize == iright->stacksize +++ && ((ileft->cpuset == NULL && iright->cpuset == NULL) +++ || (ileft->cpuset != NULL && iright->cpuset != NULL +++ && ileft->cpusetsize == iright->cpusetsize +++ && memcmp (ileft->cpuset, iright->cpuset, +++ ileft->cpusetsize) == 0))); +++} +++ +++ +++/* Search the list of active threads and find one which has matching +++ attributes. Global mutex lock must be held by caller. */ +++struct thread_node * +++__timer_thread_find_matching (const pthread_attr_t *desired_attr, +++ clockid_t desired_clock_id) +++{ +++ struct list_links *iter = list_first (&thread_active_list); +++ +++ while (iter != list_null (&thread_active_list)) +++ { +++ struct thread_node *candidate = thread_links2ptr (iter); +++ +++ if (thread_attr_compare (desired_attr, &candidate->attr) +++ && desired_clock_id == candidate->clock_id) +++ return candidate; +++ +++ iter = list_next (iter); +++ } +++ +++ return NULL; +++} +++ +++ +++/* Grab a free timer structure from the global free list. The global +++ lock must be held by the caller. */ +++struct timer_node * +++__timer_alloc (void) +++{ +++ struct list_links *node = list_first (&timer_free_list); +++ +++ if (node != list_null (&timer_free_list)) +++ { +++ struct timer_node *timer = timer_links2ptr (node); +++ list_unlink_ip (node); +++ timer->inuse = TIMER_INUSE; +++ timer->refcount = 1; +++ return timer; +++ } +++ +++ return NULL; +++} +++ +++ +++/* Return a timer structure to the global free list. The global lock +++ must be held by the caller. */ +++void +++__timer_dealloc (struct timer_node *timer) +++{ +++ assert (timer->refcount == 0); +++ timer->thread = NULL; /* Break association between timer and thread. */ +++ timer->inuse = TIMER_FREE; +++ list_append (&timer_free_list, &timer->links); +++} +++ +++ +++/* Thread cancellation handler which unlocks a mutex. */ +++void +++__timer_mutex_cancel_handler (void *arg) +++{ +++ pthread_mutex_unlock (arg); +++} ++--- /dev/null +++++ b/fbtl/sysdeps/pthread/timer_settime.c ++@@ -0,0 +1,136 @@ +++/* Copyright (C) 2000-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Kaz Kylheku . +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public License as +++ published by the Free Software Foundation; either version 2.1 of the +++ License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General 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, see . */ +++ +++#include +++#include +++#include +++ +++#include "posix-timer.h" +++ +++ +++/* Set timer TIMERID to VALUE, returning old value in OVLAUE. */ +++int +++timer_settime (timerid, flags, value, ovalue) +++ timer_t timerid; +++ int flags; +++ const struct itimerspec *value; +++ struct itimerspec *ovalue; +++{ +++ struct timer_node *timer; +++ struct thread_node *thread = NULL; +++ struct timespec now; +++ int have_now = 0, need_wakeup = 0; +++ int retval = -1; +++ +++ timer = timer_id2ptr (timerid); +++ if (timer == NULL) +++ { +++ __set_errno (EINVAL); +++ goto bail; +++ } +++ +++ if (value->it_interval.tv_nsec < 0 +++ || value->it_interval.tv_nsec >= 1000000000 +++ || value->it_value.tv_nsec < 0 +++ || value->it_value.tv_nsec >= 1000000000) +++ { +++ __set_errno (EINVAL); +++ goto bail; +++ } +++ +++ /* Will need to know current time since this is a relative timer; +++ might as well make the system call outside of the lock now! */ +++ +++ if ((flags & TIMER_ABSTIME) == 0) +++ { +++ clock_gettime (timer->clock, &now); +++ have_now = 1; +++ } +++ +++ pthread_mutex_lock (&__timer_mutex); +++ timer_addref (timer); +++ +++ /* One final check of timer validity; this one is possible only +++ until we have the mutex, because it accesses the inuse flag. */ +++ +++ if (! timer_valid(timer)) +++ { +++ __set_errno (EINVAL); +++ goto unlock_bail; +++ } +++ +++ if (ovalue != NULL) +++ { +++ ovalue->it_interval = timer->value.it_interval; +++ +++ if (timer->armed) +++ { +++ if (! have_now) +++ { +++ pthread_mutex_unlock (&__timer_mutex); +++ clock_gettime (timer->clock, &now); +++ have_now = 1; +++ pthread_mutex_lock (&__timer_mutex); +++ timer_addref (timer); +++ } +++ +++ timespec_sub (&ovalue->it_value, &timer->expirytime, &now); +++ } +++ else +++ { +++ ovalue->it_value.tv_sec = 0; +++ ovalue->it_value.tv_nsec = 0; +++ } +++ } +++ +++ timer->value = *value; +++ +++ list_unlink_ip (&timer->links); +++ timer->armed = 0; +++ +++ thread = timer->thread; +++ +++ /* A value of { 0, 0 } causes the timer to be stopped. */ +++ if (value->it_value.tv_sec != 0 +++ || __builtin_expect (value->it_value.tv_nsec != 0, 1)) +++ { +++ if ((flags & TIMER_ABSTIME) != 0) +++ /* The user specified the expiration time. */ +++ timer->expirytime = value->it_value; +++ else +++ timespec_add (&timer->expirytime, &now, &value->it_value); +++ +++ /* Only need to wake up the thread if timer is inserted +++ at the head of the queue. */ +++ if (thread != NULL) +++ need_wakeup = __timer_thread_queue_timer (thread, timer); +++ timer->armed = 1; +++ } +++ +++ retval = 0; +++ +++unlock_bail: +++ timer_delref (timer); +++ pthread_mutex_unlock (&__timer_mutex); +++ +++bail: +++ if (thread != NULL && need_wakeup) +++ __timer_thread_wakeup (thread); +++ +++ return retval; +++} ++--- /dev/null +++++ b/fbtl/sysdeps/pthread/tst-mqueue8x.c ++@@ -0,0 +1 @@ +++#include ++--- /dev/null +++++ b/fbtl/sysdeps/pthread/tst-timer.c ++@@ -0,0 +1,159 @@ +++/* Tests for POSIX timer implementation. +++ Copyright (C) 2000-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Kaz Kylheku . +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public License as +++ published by the Free Software Foundation; either version 2.1 of the +++ License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General 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, see . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++static void +++notify_func1 (union sigval sigval) +++{ +++ puts ("notify_func1"); +++} +++ +++ +++static void +++notify_func2 (union sigval sigval) +++{ +++ puts ("notify_func2"); +++} +++ +++ +++static void +++signal_func (int sig) +++{ +++ static const char text[] = "signal_func\n"; +++ signal (sig, signal_func); +++ write (STDOUT_FILENO, text, sizeof text - 1); +++} +++ +++static void +++intr_sleep (int sec) +++{ +++ struct timespec ts; +++ +++ ts.tv_sec = sec; +++ ts.tv_nsec = 0; +++ +++ while (nanosleep (&ts, &ts) == -1 && errno == EINTR) +++ ; +++} +++ +++#define ZSIGALRM 14 +++ +++ +++int +++main (void) +++{ +++ struct timespec ts; +++ timer_t timer_sig, timer_thr1, timer_thr2; +++ int retval; +++ struct sigevent sigev1 = +++ { +++ .sigev_notify = SIGEV_SIGNAL, +++ .sigev_signo = ZSIGALRM +++ }; +++ struct sigevent sigev2; +++ struct itimerspec itimer1 = { { 0, 200000000 }, { 0, 200000000 } }; +++ struct itimerspec itimer2 = { { 0, 100000000 }, { 0, 500000000 } }; +++ struct itimerspec itimer3 = { { 0, 150000000 }, { 0, 300000000 } }; +++ struct itimerspec old; +++ +++ retval = clock_gettime (CLOCK_REALTIME, &ts); +++ +++ sigev2.sigev_notify = SIGEV_THREAD; +++ sigev2.sigev_notify_function = notify_func1; +++ sigev2.sigev_notify_attributes = NULL; +++ /* It is unnecessary to do the following but to set a good example +++ we do it anyhow. */ +++ sigev2.sigev_value.sival_ptr = NULL; +++ +++ setvbuf (stdout, 0, _IOLBF, 0); +++ +++ printf ("clock_gettime returned %d, timespec = { %ld, %ld }\n", +++ retval, ts.tv_sec, ts.tv_nsec); +++ +++ retval = clock_getres (CLOCK_REALTIME, &ts); +++ +++ printf ("clock_getres returned %d, timespec = { %ld, %ld }\n", +++ retval, ts.tv_sec, ts.tv_nsec); +++ +++ if (timer_create (CLOCK_REALTIME, &sigev1, &timer_sig) != 0) +++ { +++ printf ("timer_create for timer_sig failed: %m\n"); +++ exit (1); +++ } +++ if (timer_create (CLOCK_REALTIME, &sigev2, &timer_thr1) != 0) +++ { +++ printf ("timer_create for timer_thr1 failed: %m\n"); +++ exit (1); +++ } +++ sigev2.sigev_notify_function = notify_func2; +++ if (timer_create (CLOCK_REALTIME, &sigev2, &timer_thr2) != 0) +++ { +++ printf ("timer_create for timer_thr2 failed: %m\n"); +++ exit (1); +++ } +++ +++ if (timer_settime (timer_thr1, 0, &itimer2, &old) != 0) +++ { +++ printf ("timer_settime for timer_thr1 failed: %m\n"); +++ exit (1); +++ } +++ if (timer_settime (timer_thr2, 0, &itimer3, &old) != 0) +++ { +++ printf ("timer_settime for timer_thr2 failed: %m\n"); +++ exit (1); +++ } +++ +++ signal (ZSIGALRM, signal_func); +++ +++ if (timer_settime (timer_sig, 0, &itimer1, &old) != 0) +++ { +++ printf ("timer_settime for timer_sig failed: %m\n"); +++ exit (1); +++ } +++ +++ intr_sleep (3); +++ +++ if (timer_delete (timer_sig) != 0) +++ { +++ printf ("timer_delete for timer_sig failed: %m\n"); +++ exit (1); +++ } +++ if (timer_delete (timer_thr1) != 0) +++ { +++ printf ("timer_delete for timer_thr1 failed: %m\n"); +++ exit (1); +++ } +++ +++ intr_sleep (3); +++ +++ if (timer_delete (timer_thr2) != 0) +++ { +++ printf ("timer_delete for timer_thr2 failed: %m\n"); +++ exit (1); +++ } +++ +++ return 0; +++} ++--- /dev/null +++++ b/fbtl/sysdeps/pthread/unwind-forcedunwind.c ++@@ -0,0 +1,151 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Jakub Jelinek . +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public License as +++ published by the Free Software Foundation; either version 2.1 of the +++ License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General 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, see . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++ +++static void *libgcc_s_handle; +++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 _Unwind_Reason_Code (*libgcc_s_forcedunwind) +++ (struct _Unwind_Exception *, _Unwind_Stop_Fn, void *); +++static _Unwind_Word (*libgcc_s_getcfa) (struct _Unwind_Context *); +++ +++void +++__attribute_noinline__ +++pthread_cancel_init (void) +++{ +++ void *resume; +++ void *personality; +++ void *forcedunwind; +++ void *getcfa; +++ void *handle; +++ +++ if (__glibc_likely (libgcc_s_handle != NULL)) +++ { +++ /* Force gcc to reload all values. */ +++ asm volatile ("" ::: "memory"); +++ return; +++ } +++ +++ handle = __libc_dlopen (LIBGCC_S_SO); +++ +++ if (handle == NULL +++ || (resume = __libc_dlsym (handle, "_Unwind_Resume")) == NULL +++ || (personality = __libc_dlsym (handle, "__gcc_personality_v0")) == NULL +++ || (forcedunwind = __libc_dlsym (handle, "_Unwind_ForcedUnwind")) +++ == NULL +++ || (getcfa = __libc_dlsym (handle, "_Unwind_GetCFA")) == NULL +++#ifdef ARCH_CANCEL_INIT +++ || ARCH_CANCEL_INIT (handle) +++#endif +++ ) +++ __libc_fatal (LIBGCC_S_SO " must be installed for pthread_cancel to work\n"); +++ +++ PTR_MANGLE (resume); +++ libgcc_s_resume = resume; +++ PTR_MANGLE (personality); +++ libgcc_s_personality = personality; +++ PTR_MANGLE (forcedunwind); +++ libgcc_s_forcedunwind = forcedunwind; +++ PTR_MANGLE (getcfa); +++ libgcc_s_getcfa = getcfa; +++ /* Make sure libgcc_s_handle is written last. Otherwise, +++ pthread_cancel_init might return early even when the pointer the +++ caller is interested in is not initialized yet. */ +++ atomic_write_barrier (); +++ libgcc_s_handle = handle; +++} +++ +++void +++__libc_freeres_fn_section +++__unwind_freeres (void) +++{ +++ void *handle = libgcc_s_handle; +++ if (handle != NULL) +++ { +++ libgcc_s_handle = NULL; +++ __libc_dlclose (handle); +++ } +++} +++ +++void +++_Unwind_Resume (struct _Unwind_Exception *exc) +++{ +++ if (__glibc_unlikely (libgcc_s_handle == NULL)) +++ pthread_cancel_init (); +++ else +++ atomic_read_barrier (); +++ +++ void (*resume) (struct _Unwind_Exception *exc) = libgcc_s_resume; +++ PTR_DEMANGLE (resume); +++ 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 (__glibc_unlikely (libgcc_s_handle == NULL)) +++ pthread_cancel_init (); +++ else +++ atomic_read_barrier (); +++ +++ _Unwind_Reason_Code (*personality) +++ (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *, +++ struct _Unwind_Context *) = libgcc_s_personality; +++ PTR_DEMANGLE (personality); +++ return personality (version, actions, exception_class, ue_header, context); +++} +++ +++_Unwind_Reason_Code +++_Unwind_ForcedUnwind (struct _Unwind_Exception *exc, _Unwind_Stop_Fn stop, +++ void *stop_argument) +++{ +++ if (__glibc_unlikely (libgcc_s_handle == NULL)) +++ pthread_cancel_init (); +++ else +++ atomic_read_barrier (); +++ +++ _Unwind_Reason_Code (*forcedunwind) +++ (struct _Unwind_Exception *, _Unwind_Stop_Fn, void *) +++ = libgcc_s_forcedunwind; +++ PTR_DEMANGLE (forcedunwind); +++ return forcedunwind (exc, stop, stop_argument); +++} +++ +++_Unwind_Word +++_Unwind_GetCFA (struct _Unwind_Context *context) +++{ +++ if (__glibc_unlikely (libgcc_s_handle == NULL)) +++ pthread_cancel_init (); +++ else +++ atomic_read_barrier (); +++ +++ _Unwind_Word (*getcfa) (struct _Unwind_Context *) = libgcc_s_getcfa; +++ PTR_DEMANGLE (getcfa); +++ return getcfa (context); +++} ++--- /dev/null +++++ b/fbtl/sysdeps/x86_64/Makefile ++@@ -0,0 +1,27 @@ +++# Copyright (C) 2002-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 +++# . +++ +++ifeq ($(subdir),csu) +++gen-as-const-headers += tcb-offsets.sym +++endif +++ +++ifeq ($(subdir),fbtl) +++# P4s have problems with 4M aliasing. We disturb the allocation of stacks +++# just enough so the subsequent allocations do not use stack address +++# (mod 4M) == 0. +++CFLAGS-pthread_create.c += -DMULTI_PAGE_ALIASING=65536 +++endif ++--- /dev/null +++++ b/fbtl/sysdeps/x86_64/pthread_spin_init.c ++@@ -0,0 +1 @@ +++#include "../i386/pthread_spin_init.c" ++--- /dev/null +++++ b/fbtl/sysdeps/x86_64/pthread_spin_lock.S ++@@ -0,0 +1,36 @@ +++/* Copyright (C) 2012-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 +++ . */ +++ +++#include +++ +++ .globl pthread_spin_lock +++ .type pthread_spin_lock,@function +++ .align 16 +++pthread_spin_lock: +++1: LOCK +++ decl 0(%rdi) +++ jne 2f +++ xor %eax, %eax +++ ret +++ +++ .align 16 +++2: rep +++ nop +++ cmpl $0, 0(%rdi) +++ jg 1b +++ jmp 2b +++ .size pthread_spin_lock,.-pthread_spin_lock ++--- /dev/null +++++ b/fbtl/sysdeps/x86_64/pthread_spin_trylock.S ++@@ -0,0 +1,39 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++ +++ +++#ifdef UP +++# define LOCK +++#else +++# define LOCK lock +++#endif +++ +++ .globl pthread_spin_trylock +++ .type pthread_spin_trylock,@function +++ .align 16 +++pthread_spin_trylock: +++ movl $1, %eax +++ xorl %ecx, %ecx +++ LOCK +++ cmpxchgl %ecx, (%rdi) +++ movl $EBUSY, %eax +++ cmovel %ecx, %eax +++ retq +++ .size pthread_spin_trylock,.-pthread_spin_trylock ++--- /dev/null +++++ b/fbtl/sysdeps/x86_64/pthread_spin_unlock.S ++@@ -0,0 +1,30 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++ .globl pthread_spin_unlock +++ .type pthread_spin_unlock,@function +++ .align 16 +++pthread_spin_unlock: +++ movl $1, (%rdi) +++ xorl %eax, %eax +++ retq +++ .size pthread_spin_unlock,.-pthread_spin_unlock +++ +++ /* The implementation of pthread_spin_init is identical. */ +++ .globl pthread_spin_init +++pthread_spin_init = pthread_spin_unlock ++--- /dev/null +++++ b/fbtl/sysdeps/x86_64/pthreaddef.h ++@@ -0,0 +1,44 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++/* Default stack size. */ +++#define ARCH_STACK_DEFAULT_SIZE (2 * 1024 * 1024) +++ +++/* Required stack pointer alignment at beginning. SSE requires 16 +++ bytes. */ +++#define STACK_ALIGN 16 +++ +++/* Minimal stack size after allocating thread descriptor and guard size. */ +++#define MINIMAL_REST_STACK 2048 +++ +++/* Alignment requirement for TCB. +++ +++ We need to store post-AVX vector registers in the TCB and we want the +++ storage to be aligned to at least 32 bytes. +++ +++ Some processors such as Intel Atom pay a big penalty on every +++ access using a segment override if that segment's base is not +++ aligned to the size of a cache line. (See Intel 64 and IA-32 +++ Architectures Optimization Reference Manual, section 13.3.3.3, +++ "Segment Base".) On such machines, a cache line is 64 bytes. */ +++#define TCB_ALIGNMENT 64 +++ +++ +++/* Location of current stack frame. The frame pointer is not usable. */ +++#define CURRENT_STACK_FRAME \ +++ ({ register char *frame __asm__("rsp"); frame; }) ++--- /dev/null +++++ b/fbtl/sysdeps/x86_64/tcb-offsets.sym ++@@ -0,0 +1,26 @@ +++#include +++#include +++ +++RESULT offsetof (struct pthread, result) +++TID offsetof (struct pthread, tid) +++CANCELHANDLING offsetof (struct pthread, cancelhandling) +++CLEANUP_JMP_BUF offsetof (struct pthread, cleanup_jmp_buf) +++CLEANUP offsetof (struct pthread, cleanup) +++CLEANUP_PREV offsetof (struct _pthread_cleanup_buffer, __prev) +++MUTEX_FUTEX offsetof (pthread_mutex_t, __data.__lock) +++MULTIPLE_THREADS_OFFSET offsetof (tcbhead_t, multiple_threads) +++POINTER_GUARD offsetof (tcbhead_t, pointer_guard) +++VGETCPU_CACHE_OFFSET offsetof (tcbhead_t, vgetcpu_cache) +++#ifndef __ASSUME_PRIVATE_FUTEX +++PRIVATE_FUTEX offsetof (tcbhead_t, private_futex) +++#endif +++ +++-- Not strictly offsets, but these values are also used in the TCB. +++TCB_CANCELSTATE_BITMASK CANCELSTATE_BITMASK +++TCB_CANCELTYPE_BITMASK CANCELTYPE_BITMASK +++TCB_CANCELING_BITMASK CANCELING_BITMASK +++TCB_CANCELED_BITMASK CANCELED_BITMASK +++TCB_EXITING_BITMASK EXITING_BITMASK +++TCB_CANCEL_RESTMASK CANCEL_RESTMASK +++TCB_TERMINATED_BITMASK TERMINATED_BITMASK +++TCB_PTHREAD_CANCELED PTHREAD_CANCELED ++--- /dev/null +++++ b/fbtl/sysdeps/x86_64/tls.h ++@@ -0,0 +1,379 @@ +++/* Definition for thread-local data handling. nptl/x86_64 version. +++ Copyright (C) 2002-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 +++ . */ +++ +++#ifndef _TLS_H +++#define _TLS_H 1 +++ +++#ifndef __ASSEMBLER__ +++# include /* For ARCH_SET_FS. */ +++# include +++# include +++# include +++# include +++# include +++# include +++# include +++# include +++ +++/* Replacement type for __m128 since this file is included by ld.so, +++ which is compiled with -mno-sse. It must not change the alignment +++ of rtld_savespace_sse. */ +++typedef struct +++{ +++ int i[4]; +++} __128bits; +++ +++ +++ +++typedef struct +++{ +++ void *tcb; /* Pointer to the TCB. Not necessarily the +++ thread descriptor used by libpthread. */ +++ dtv_t *dtv; +++ void *self; /* Pointer to the thread descriptor. */ +++ int multiple_threads; +++ int gscope_flag; +++ uintptr_t sysinfo; +++ uintptr_t stack_guard; +++ uintptr_t pointer_guard; +++ unsigned long int vgetcpu_cache[2]; +++# ifndef __ASSUME_PRIVATE_FUTEX +++ int private_futex; +++# else +++ int __glibc_reserved1; +++# endif +++ int __glibc_unused1; +++ /* Reservation of some values for the TM ABI. */ +++ void *__private_tm[4]; +++ /* GCC split stack support. */ +++ void *__private_ss; +++ long int __glibc_reserved2; +++ /* Must be kept even if it is no longer used by glibc since programs, +++ like AddressSanitizer, depend on the size of tcbhead_t. */ +++ __128bits __glibc_unused2[8][4] __attribute__ ((aligned (32))); +++ +++ void *__padding[8]; +++} tcbhead_t; +++ +++#else /* __ASSEMBLER__ */ +++# include +++#endif +++ +++ +++/* Alignment requirement for the stack. */ +++#define STACK_ALIGN 16 +++ +++ +++#ifndef __ASSEMBLER__ +++/* Get system call information. */ +++# include +++ +++ +++#ifndef LOCK_PREFIX +++# ifdef UP +++# define LOCK_PREFIX /* nothing */ +++# else +++# define LOCK_PREFIX "lock;" +++# endif +++#endif +++ +++/* This is the size of the initial TCB. Can't be just sizeof (tcbhead_t), +++ because NPTL getpid, __libc_alloca_cutoff etc. need (almost) the whole +++ struct pthread even when not linked with -lpthread. */ +++# define TLS_INIT_TCB_SIZE sizeof (struct pthread) +++ +++/* Alignment requirements for the initial TCB. */ +++# define TLS_INIT_TCB_ALIGN __alignof__ (struct pthread) +++ +++/* This is the size of the TCB. */ +++# define TLS_TCB_SIZE sizeof (struct pthread) +++ +++/* Alignment requirements for the TCB. */ +++# define TLS_TCB_ALIGN __alignof__ (struct pthread) +++ +++/* The TCB can have any size and the memory following the address the +++ thread pointer points to is unspecified. Allocate the TCB there. */ +++# define TLS_TCB_AT_TP 1 +++# define TLS_DTV_AT_TP 0 +++ +++/* Get the thread descriptor definition. */ +++# include +++ +++ +++/* Install the dtv pointer. The pointer passed is to the element with +++ index -1 which contain the length. */ +++# define INSTALL_DTV(descr, dtvp) \ +++ ((tcbhead_t *) (descr))->dtv = (dtvp) + 1 +++ +++/* Install new dtv for current thread. */ +++# define INSTALL_NEW_DTV(dtvp) \ +++ ({ struct pthread *__pd; \ +++ THREAD_SETMEM (__pd, header.dtv, (dtvp)); }) +++ +++/* Return dtv of given thread descriptor. */ +++# define GET_DTV(descr) \ +++ (((tcbhead_t *) (descr))->dtv) +++ +++ +++/* 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. +++ +++ We have to make the syscall for both uses of the macro since the +++ address might be (and probably is) different. */ +++# define TLS_INIT_TP(thrdescr) \ +++ ({ void *_thrdescr = (thrdescr); \ +++ tcbhead_t *_head = _thrdescr; \ +++ int _result; \ +++ \ +++ _head->tcb = _thrdescr; \ +++ /* For now the thread descriptor is at the same address. */ \ +++ _head->self = _thrdescr; \ +++ \ +++ /* It is a simple syscall to set the %fs value for the thread. */ \ +++ asm volatile ("syscall" \ +++ : "=a" (_result) \ +++ : "0" ((unsigned long int) __NR_arch_prctl), \ +++ "D" ((unsigned long int) ARCH_SET_FS), \ +++ "S" (_thrdescr) \ +++ : "memory", "cc", "r11", "cx"); \ +++ \ +++ _result ? "cannot set %fs base address for thread-local storage" : 0; \ +++ }) +++ +++ +++/* Return the address of the dtv for the current thread. */ +++# define THREAD_DTV() \ +++ ({ struct pthread *__pd; \ +++ THREAD_GETMEM (__pd, header.dtv); }) +++ +++ +++/* Return the thread descriptor for the current thread. +++ +++ The contained asm must *not* be marked volatile since otherwise +++ assignments like +++ pthread_descr self = thread_self(); +++ do not get optimized away. */ +++# define THREAD_SELF \ +++ ({ struct pthread *__self; \ +++ asm ("mov %%fs:%c1,%0" : "=r" (__self) \ +++ : "i" (offsetof (struct pthread, header.self))); \ +++ __self;}) +++ +++/* Magic for libthread_db to know how to do THREAD_SELF. */ +++# define DB_THREAD_SELF_INCLUDE /* For the FS constant. */ +++# define DB_THREAD_SELF CONST_THREAD_AREA (64, FS) +++ +++/* Read member of the thread descriptor directly. */ +++# define THREAD_GETMEM(descr, member) \ +++ ({ __typeof (descr->member) __value; \ +++ if (sizeof (__value) == 1) \ +++ asm volatile ("movb %%fs:%P2,%b0" \ +++ : "=q" (__value) \ +++ : "0" (0), "i" (offsetof (struct pthread, member))); \ +++ else if (sizeof (__value) == 4) \ +++ asm volatile ("movl %%fs:%P1,%0" \ +++ : "=r" (__value) \ +++ : "i" (offsetof (struct pthread, member))); \ +++ else \ +++ { \ +++ if (sizeof (__value) != 8) \ +++ /* There should not be any value with a size other than 1, \ +++ 4 or 8. */ \ +++ abort (); \ +++ \ +++ asm volatile ("movq %%fs:%P1,%q0" \ +++ : "=r" (__value) \ +++ : "i" (offsetof (struct pthread, member))); \ +++ } \ +++ __value; }) +++ +++ +++/* Same as THREAD_GETMEM, but the member offset can be non-constant. */ +++# define THREAD_GETMEM_NC(descr, member, idx) \ +++ ({ __typeof (descr->member[0]) __value; \ +++ if (sizeof (__value) == 1) \ +++ asm volatile ("movb %%fs:%P2(%q3),%b0" \ +++ : "=q" (__value) \ +++ : "0" (0), "i" (offsetof (struct pthread, member[0])), \ +++ "r" (idx)); \ +++ else if (sizeof (__value) == 4) \ +++ asm volatile ("movl %%fs:%P1(,%q2,4),%0" \ +++ : "=r" (__value) \ +++ : "i" (offsetof (struct pthread, member[0])), "r" (idx));\ +++ else \ +++ { \ +++ if (sizeof (__value) != 8) \ +++ /* There should not be any value with a size other than 1, \ +++ 4 or 8. */ \ +++ abort (); \ +++ \ +++ asm volatile ("movq %%fs:%P1(,%q2,8),%q0" \ +++ : "=r" (__value) \ +++ : "i" (offsetof (struct pthread, member[0])), \ +++ "r" (idx)); \ +++ } \ +++ __value; }) +++ +++ +++/* Loading addresses of objects on x86-64 needs to be treated special +++ when generating PIC code. */ +++#ifdef __pic__ +++# define IMM_MODE "nr" +++#else +++# define IMM_MODE "ir" +++#endif +++ +++ +++/* Same as THREAD_SETMEM, but the member offset can be non-constant. */ +++# define THREAD_SETMEM(descr, member, value) \ +++ ({ if (sizeof (descr->member) == 1) \ +++ asm volatile ("movb %b0,%%fs:%P1" : \ +++ : "iq" (value), \ +++ "i" (offsetof (struct pthread, member))); \ +++ else if (sizeof (descr->member) == 4) \ +++ asm volatile ("movl %0,%%fs:%P1" : \ +++ : IMM_MODE (value), \ +++ "i" (offsetof (struct pthread, member))); \ +++ else \ +++ { \ +++ if (sizeof (descr->member) != 8) \ +++ /* There should not be any value with a size other than 1, \ +++ 4 or 8. */ \ +++ abort (); \ +++ \ +++ asm volatile ("movq %q0,%%fs:%P1" : \ +++ : IMM_MODE ((uint64_t) cast_to_integer (value)), \ +++ "i" (offsetof (struct pthread, member))); \ +++ }}) +++ +++ +++/* Set member of the thread descriptor directly. */ +++# define THREAD_SETMEM_NC(descr, member, idx, value) \ +++ ({ if (sizeof (descr->member[0]) == 1) \ +++ asm volatile ("movb %b0,%%fs:%P1(%q2)" : \ +++ : "iq" (value), \ +++ "i" (offsetof (struct pthread, member[0])), \ +++ "r" (idx)); \ +++ else if (sizeof (descr->member[0]) == 4) \ +++ asm volatile ("movl %0,%%fs:%P1(,%q2,4)" : \ +++ : IMM_MODE (value), \ +++ "i" (offsetof (struct pthread, member[0])), \ +++ "r" (idx)); \ +++ else \ +++ { \ +++ if (sizeof (descr->member[0]) != 8) \ +++ /* There should not be any value with a size other than 1, \ +++ 4 or 8. */ \ +++ abort (); \ +++ \ +++ asm volatile ("movq %q0,%%fs:%P1(,%q2,8)" : \ +++ : IMM_MODE ((uint64_t) cast_to_integer (value)), \ +++ "i" (offsetof (struct pthread, member[0])), \ +++ "r" (idx)); \ +++ }}) +++ +++ +++/* Atomic compare and exchange on TLS, returning old value. */ +++# define THREAD_ATOMIC_CMPXCHG_VAL(descr, member, newval, oldval) \ +++ ({ __typeof (descr->member) __ret; \ +++ __typeof (oldval) __old = (oldval); \ +++ if (sizeof (descr->member) == 4) \ +++ asm volatile (LOCK_PREFIX "cmpxchgl %2, %%fs:%P3" \ +++ : "=a" (__ret) \ +++ : "0" (__old), "r" (newval), \ +++ "i" (offsetof (struct pthread, member))); \ +++ else \ +++ /* Not necessary for other sizes in the moment. */ \ +++ abort (); \ +++ __ret; }) +++ +++ +++/* Atomic logical and. */ +++# define THREAD_ATOMIC_AND(descr, member, val) \ +++ (void) ({ if (sizeof ((descr)->member) == 4) \ +++ asm volatile (LOCK_PREFIX "andl %1, %%fs:%P0" \ +++ :: "i" (offsetof (struct pthread, member)), \ +++ "ir" (val)); \ +++ else \ +++ /* Not necessary for other sizes in the moment. */ \ +++ abort (); }) +++ +++ +++/* Atomic set bit. */ +++# define THREAD_ATOMIC_BIT_SET(descr, member, bit) \ +++ (void) ({ if (sizeof ((descr)->member) == 4) \ +++ asm volatile (LOCK_PREFIX "orl %1, %%fs:%P0" \ +++ :: "i" (offsetof (struct pthread, member)), \ +++ "ir" (1 << (bit))); \ +++ else \ +++ /* Not necessary for other sizes in the moment. */ \ +++ abort (); }) +++ +++ +++# define CALL_THREAD_FCT(descr) \ +++ ({ void *__res; \ +++ asm volatile ("movq %%fs:%P2, %%rdi\n\t" \ +++ "callq *%%fs:%P1" \ +++ : "=a" (__res) \ +++ : "i" (offsetof (struct pthread, start_routine)), \ +++ "i" (offsetof (struct pthread, arg)) \ +++ : "di", "si", "cx", "dx", "r8", "r9", "r10", "r11", \ +++ "memory", "cc"); \ +++ __res; }) +++ +++ +++/* Set the stack guard field in TCB head. */ +++# define THREAD_SET_STACK_GUARD(value) \ +++ THREAD_SETMEM (THREAD_SELF, header.stack_guard, value) +++# define THREAD_COPY_STACK_GUARD(descr) \ +++ ((descr)->header.stack_guard \ +++ = THREAD_GETMEM (THREAD_SELF, header.stack_guard)) +++ +++ +++/* Set the pointer guard field in the TCB head. */ +++# define THREAD_SET_POINTER_GUARD(value) \ +++ THREAD_SETMEM (THREAD_SELF, header.pointer_guard, value) +++# define THREAD_COPY_POINTER_GUARD(descr) \ +++ ((descr)->header.pointer_guard \ +++ = THREAD_GETMEM (THREAD_SELF, header.pointer_guard)) +++ +++ +++/* Get and set the global scope generation counter in the TCB head. */ +++# 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; \ +++ asm volatile ("xchgl %0, %%fs:%P1" \ +++ : "=r" (__res) \ +++ : "i" (offsetof (struct pthread, header.gscope_flag)), \ +++ "0" (THREAD_GSCOPE_FLAG_UNUSED)); \ +++ if (__res == THREAD_GSCOPE_FLAG_WAIT) \ +++ lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1, LLL_PRIVATE); \ +++ } \ +++ while (0) +++# define THREAD_GSCOPE_SET_FLAG() \ +++ THREAD_SETMEM (THREAD_SELF, header.gscope_flag, THREAD_GSCOPE_FLAG_USED) +++# define THREAD_GSCOPE_WAIT() \ +++ GL(dl_wait_lookup_done) () +++ +++#endif /* __ASSEMBLER__ */ +++ +++#endif /* tls.h */ ++--- /dev/null +++++ b/fbtl/tpp.c ++@@ -0,0 +1,171 @@ +++/* Thread Priority Protect helpers. +++ Copyright (C) 2006-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Jakub Jelinek , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++int __sched_fifo_min_prio = -1; +++int __sched_fifo_max_prio = -1; +++ +++void +++__init_sched_fifo_prio (void) +++{ +++ __sched_fifo_max_prio = sched_get_priority_max (SCHED_FIFO); +++ atomic_write_barrier (); +++ __sched_fifo_min_prio = sched_get_priority_min (SCHED_FIFO); +++} +++ +++int +++__pthread_tpp_change_priority (int previous_prio, int new_prio) +++{ +++ struct pthread *self = THREAD_SELF; +++ struct priority_protection_data *tpp = THREAD_GETMEM (self, tpp); +++ +++ if (tpp == NULL) +++ { +++ if (__sched_fifo_min_prio == -1) +++ __init_sched_fifo_prio (); +++ +++ size_t size = sizeof *tpp; +++ size += (__sched_fifo_max_prio - __sched_fifo_min_prio + 1) +++ * sizeof (tpp->priomap[0]); +++ tpp = calloc (size, 1); +++ if (tpp == NULL) +++ return ENOMEM; +++ tpp->priomax = __sched_fifo_min_prio - 1; +++ THREAD_SETMEM (self, tpp, tpp); +++ } +++ +++ assert (new_prio == -1 +++ || (new_prio >= __sched_fifo_min_prio +++ && new_prio <= __sched_fifo_max_prio)); +++ assert (previous_prio == -1 +++ || (previous_prio >= __sched_fifo_min_prio +++ && previous_prio <= __sched_fifo_max_prio)); +++ +++ int priomax = tpp->priomax; +++ int newpriomax = priomax; +++ if (new_prio != -1) +++ { +++ if (tpp->priomap[new_prio - __sched_fifo_min_prio] + 1 == 0) +++ return EAGAIN; +++ ++tpp->priomap[new_prio - __sched_fifo_min_prio]; +++ if (new_prio > priomax) +++ newpriomax = new_prio; +++ } +++ +++ if (previous_prio != -1) +++ { +++ if (--tpp->priomap[previous_prio - __sched_fifo_min_prio] == 0 +++ && priomax == previous_prio +++ && previous_prio > new_prio) +++ { +++ int i; +++ for (i = previous_prio - 1; i >= __sched_fifo_min_prio; --i) +++ if (tpp->priomap[i - __sched_fifo_min_prio]) +++ break; +++ newpriomax = i; +++ } +++ } +++ +++ if (priomax == newpriomax) +++ return 0; +++ +++ lll_lock (self->lock, LLL_PRIVATE); +++ +++ tpp->priomax = newpriomax; +++ +++ int result = 0; +++ +++ if ((self->flags & ATTR_FLAG_SCHED_SET) == 0) +++ { +++ if (__sched_getparam (self->tid, &self->schedparam) != 0) +++ result = errno; +++ else +++ self->flags |= ATTR_FLAG_SCHED_SET; +++ } +++ +++ if ((self->flags & ATTR_FLAG_POLICY_SET) == 0) +++ { +++ self->schedpolicy = __sched_getscheduler (self->tid); +++ if (self->schedpolicy == -1) +++ result = errno; +++ else +++ self->flags |= ATTR_FLAG_POLICY_SET; +++ } +++ +++ if (result == 0) +++ { +++ struct sched_param sp = self->schedparam; +++ if (sp.sched_priority < newpriomax || sp.sched_priority < priomax) +++ { +++ if (sp.sched_priority < newpriomax) +++ sp.sched_priority = newpriomax; +++ +++ if (__sched_setscheduler (self->tid, self->schedpolicy, &sp) < 0) +++ result = errno; +++ } +++ } +++ +++ lll_unlock (self->lock, LLL_PRIVATE); +++ +++ return result; +++} +++ +++int +++__pthread_current_priority (void) +++{ +++ struct pthread *self = THREAD_SELF; +++ if ((self->flags & (ATTR_FLAG_POLICY_SET | ATTR_FLAG_SCHED_SET)) +++ == (ATTR_FLAG_POLICY_SET | ATTR_FLAG_SCHED_SET)) +++ return self->schedparam.sched_priority; +++ +++ int result = 0; +++ +++ lll_lock (self->lock, LLL_PRIVATE); +++ +++ if ((self->flags & ATTR_FLAG_SCHED_SET) == 0) +++ { +++ if (__sched_getparam (self->tid, &self->schedparam) != 0) +++ result = -1; +++ else +++ self->flags |= ATTR_FLAG_SCHED_SET; +++ } +++ +++ if ((self->flags & ATTR_FLAG_POLICY_SET) == 0) +++ { +++ self->schedpolicy = __sched_getscheduler (self->tid); +++ if (self->schedpolicy == -1) +++ result = -1; +++ else +++ self->flags |= ATTR_FLAG_POLICY_SET; +++ } +++ +++ if (result != -1) +++ result = self->schedparam.sched_priority; +++ +++ lll_unlock (self->lock, LLL_PRIVATE); +++ +++ return result; +++} ++--- /dev/null +++++ b/fbtl/tst-_res1.c ++@@ -0,0 +1,68 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Jakub Jelinek , 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, see +++ . */ +++ +++/* Test whether _res in glibc 2.1.x and earlier (before __res_state() +++ was introduced) works. Portable programs should never do the +++ dirty things below. */ +++ +++#include +++#include +++#include +++#include +++ +++void *tf (void *resp) +++{ +++ if (resp == &_res || resp == __res_state ()) +++ abort (); +++ _res.retry = 24; +++ return NULL; +++} +++ +++void do_test (struct __res_state *resp) +++{ +++ if (resp != &_res || resp != __res_state ()) +++ abort (); +++ if (_res.retry != 12) +++ abort (); +++} +++ +++int main (void) +++{ +++#undef _res +++ extern struct __res_state _res; +++ pthread_t th; +++ +++ _res.retry = 12; +++ if (pthread_create (&th, NULL, tf, &_res) != 0) +++ { +++ puts ("create failed"); +++ exit (1); +++ } +++ +++ do_test (&_res); +++ +++ if (pthread_join (th, NULL) != 0) +++ { +++ puts ("join failed"); +++ exit (1); +++ } +++ +++ do_test (&_res); +++ +++ exit (0); +++} ++--- /dev/null +++++ b/fbtl/tst-_res1mod1.c ++@@ -0,0 +1,22 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Jakub Jelinek , 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, see +++ . */ +++ +++#include +++#undef _res +++ +++struct __res_state _res; ++--- /dev/null +++++ b/fbtl/tst-_res1mod2.c ++@@ -0,0 +1 @@ +++/* Nothing. */ ++--- /dev/null +++++ b/fbtl/tst-abstime.c ++@@ -0,0 +1,97 @@ +++/* Copyright (C) 2010-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Andreas Schwab , 2010. +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public +++ License as published by the Free Software Foundation; either +++ version 2.1 of the License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General Public License 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 +++ . */ +++ +++#include +++#include +++#include +++#include +++ +++static pthread_cond_t c = PTHREAD_COND_INITIALIZER; +++static pthread_mutex_t m1 = PTHREAD_MUTEX_INITIALIZER; +++static pthread_mutex_t m2 = PTHREAD_MUTEX_INITIALIZER; +++static pthread_rwlock_t rw1 = PTHREAD_RWLOCK_INITIALIZER; +++static pthread_rwlock_t rw2 = PTHREAD_RWLOCK_INITIALIZER; +++static sem_t sem; +++ +++static void * +++th (void *arg) +++{ +++ long int res = 0; +++ int r; +++ struct timespec t = { -2, 0 }; +++ +++ r = pthread_mutex_timedlock (&m1, &t); +++ if (r != ETIMEDOUT) +++ { +++ puts ("pthread_mutex_timedlock did not return ETIMEDOUT"); +++ res = 1; +++ } +++ r = pthread_rwlock_timedrdlock (&rw1, &t); +++ if (r != ETIMEDOUT) +++ { +++ puts ("pthread_rwlock_timedrdlock did not return ETIMEDOUT"); +++ res = 1; +++ } +++ r = pthread_rwlock_timedwrlock (&rw2, &t); +++ if (r != ETIMEDOUT) +++ { +++ puts ("pthread_rwlock_timedwrlock did not return ETIMEDOUT"); +++ res = 1; +++ } +++ return (void *) res; +++} +++ +++static int +++do_test (void) +++{ +++ int res = 0; +++ int r; +++ struct timespec t = { -2, 0 }; +++ pthread_t pth; +++ +++ sem_init (&sem, 0, 0); +++ r = sem_timedwait (&sem, &t); +++ if (r != -1 || errno != ETIMEDOUT) +++ { +++ puts ("sem_timedwait did not fail with ETIMEDOUT"); +++ res = 1; +++ } +++ +++ pthread_mutex_lock (&m1); +++ pthread_rwlock_wrlock (&rw1); +++ pthread_rwlock_rdlock (&rw2); +++ pthread_mutex_lock (&m2); +++ if (pthread_create (&pth, 0, th, 0) != 0) +++ { +++ puts ("cannot create thread"); +++ return 1; +++ } +++ r = pthread_cond_timedwait (&c, &m2, &t); +++ if (r != ETIMEDOUT) +++ { +++ puts ("pthread_cond_timedwait did not return ETIMEDOUT"); +++ res = 1; +++ } +++ void *thres; +++ pthread_join (pth, &thres); +++ return res | (thres != NULL); +++} +++ +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-align.c ++@@ -0,0 +1,70 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++ +++static void * +++tf (void *arg) +++{ +++ bool ok = true; +++ +++ puts ("in thread"); +++ +++ if (TEST_STACK_ALIGN ()) +++ ok = false; +++ +++ return ok ? NULL : (void *) -1l; +++} +++ +++static int +++do_test (void) +++{ +++ bool ok = true; +++ +++ puts ("in main"); +++ +++ if (TEST_STACK_ALIGN ()) +++ ok = false; +++ +++ pthread_t th; +++ if (pthread_create (&th, NULL, tf, NULL) != 0) +++ { +++ puts ("create failed"); +++ return 1; +++ } +++ +++ void *res; +++ if (pthread_join (th, &res) != 0) +++ { +++ puts ("join failed"); +++ return 1; +++ } +++ +++ if (res != NULL) +++ ok = false; +++ +++ return ok ? 0 : 1; +++} +++ +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-align2.c ++@@ -0,0 +1,95 @@ +++/* Copyright (C) 2004-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 +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++static int +++f (void *arg) +++{ +++ bool ok = true; +++ +++ puts ("in f"); +++ +++ if (TEST_STACK_ALIGN ()) +++ ok = false; +++ +++ return ok ? 0 : 1; +++} +++ +++static int +++do_test (void) +++{ +++ bool ok = true; +++ +++ puts ("in main"); +++ +++ if (TEST_STACK_ALIGN ()) +++ ok = false; +++ +++#ifdef __ia64__ +++ extern int __clone2 (int (*__fn) (void *__arg), void *__child_stack_base, +++ size_t __child_stack_size, int __flags, +++ void *__arg, ...); +++ char st[256 * 1024]; +++ pid_t p = __clone2 (f, st, sizeof (st), 0, 0); +++#else +++ char st[128 * 1024] __attribute__ ((aligned)); +++# if _STACK_GROWS_DOWN +++ pid_t p = clone (f, st + sizeof (st), 0, 0); +++# elif _STACK_GROWS_UP +++ pid_t p = clone (f, st, 0, 0); +++# else +++# error "Define either _STACK_GROWS_DOWN or _STACK_GROWS_UP" +++# endif +++#endif +++ if (p == -1) +++ { +++ printf("clone failed: %m\n"); +++ return 1; +++ } +++ +++ int e; +++ if (waitpid (p, &e, __WCLONE) != p) +++ { +++ puts ("waitpid failed"); +++ kill (p, SIGKILL); +++ return 1; +++ } +++ if (!WIFEXITED (e)) +++ { +++ if (WIFSIGNALED (e)) +++ printf ("died from signal %s\n", strsignal (WTERMSIG (e))); +++ else +++ puts ("did not terminate correctly"); +++ return 1; +++ } +++ if (WEXITSTATUS (e) != 0) +++ ok = false; +++ +++ return ok ? 0 : 1; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-align3.c ++@@ -0,0 +1,56 @@ +++/* Copyright (C) 2005-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Jakub Jelinek , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++ +++static bool ok = true; +++static pthread_once_t once = PTHREAD_ONCE_INIT; +++ +++static void +++once_test (void) +++{ +++ puts ("in once_test"); +++ +++ if (TEST_STACK_ALIGN ()) +++ ok = false; +++} +++ +++static int +++do_test (void) +++{ +++ puts ("in main"); +++ +++ if (TEST_STACK_ALIGN ()) +++ ok = false; +++ +++ if (pthread_once (&once, once_test)) +++ { +++ puts ("pthread once failed"); +++ return 1; +++ } +++ +++ return ok ? 0 : 1; +++} +++ +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-atfork1.c ++@@ -0,0 +1,120 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++static int val; +++ +++ +++static void +++prepare1 (void) +++{ +++ val *= 2; +++} +++ +++static void +++prepare2 (void) +++{ +++ ++val; +++} +++ +++static void +++parent1 (void) +++{ +++ val += 4; +++} +++ +++static void +++parent2 (void) +++{ +++ val *= 4; +++} +++ +++static void +++child1 (void) +++{ +++ val += 8; +++} +++ +++static void +++child2 (void) +++{ +++ val *= 8; +++} +++ +++ +++static int +++do_test (void) +++{ +++ pid_t pid; +++ int status = 0; +++ +++ if (pthread_atfork (prepare1, parent1, child1) != 0) +++ { +++ puts ("1st atfork failed"); +++ exit (1); +++ } +++ if (pthread_atfork (prepare2, parent2, child2) != 0) +++ { +++ puts ("2nd atfork failed"); +++ exit (1); +++ } +++ +++ pid = fork (); +++ if (pid == -1) +++ { +++ puts ("fork failed"); +++ exit (1); +++ } +++ +++ if (pid != 0) +++ { +++ /* Parent. */ +++ if (val != 24) +++ { +++ printf ("expected val=%d, got %d\n", 24, val); +++ exit (1); +++ } +++ +++ if (TEMP_FAILURE_RETRY (waitpid (pid, &status, 0)) != pid) +++ { +++ puts ("waitpid failed"); +++ exit (1); +++ } +++ } +++ else +++ { +++ /* Child. */ +++ if (val != 80) +++ { +++ printf ("expected val=%d, got %d\n", 80, val); +++ exit (2); +++ } +++ } +++ +++ return status; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-atfork2.c ++@@ -0,0 +1,158 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++/* Must be exported. */ +++int val; +++ +++static void +++prepare (void) +++{ +++ val *= 2; +++} +++ +++static void +++parent (void) +++{ +++ val += 4; +++} +++ +++static void +++child (void) +++{ +++ val += 8; +++} +++ +++ +++static int +++do_test (void) +++{ +++ mtrace (); +++ +++ if (pthread_atfork (prepare, parent, child) != 0) +++ { +++ puts ("do_test: atfork failed"); +++ exit (1); +++ } +++ +++ void *h = dlopen ("tst-atfork2mod.so", RTLD_LAZY); +++ if (h == NULL) +++ { +++ printf ("dlopen failed: %s\n", dlerror ()); +++ exit (1); +++ } +++ +++ /* First trial of fork. */ +++ pid_t pid = fork (); +++ if (pid == -1) +++ { +++ puts ("1st fork failed"); +++ exit (1); +++ } +++ +++ if (pid == 0) +++ { +++ /* Child. */ +++ if (val != 80) +++ { +++ printf ("1st: expected val=%d, got %d\n", 80, val); +++ exit (2); +++ } +++ +++ exit (0); +++ } +++ +++ /* Parent. */ +++ if (val != 24) +++ { +++ printf ("1st: expected val=%d, got %d\n", 24, val); +++ exit (1); +++ } +++ +++ int status; +++ if (TEMP_FAILURE_RETRY (waitpid (pid, &status, 0)) != pid) +++ { +++ puts ("1st waitpid failed"); +++ exit (1); +++ } +++ +++ if (status != 0) +++ exit (status); +++ +++ puts ("unloading now"); +++ +++ /* Unload the module. */ +++ if (dlclose (h) != 0) +++ { +++ puts ("dlclose failed"); +++ exit (1); +++ } +++ +++ puts ("2nd fork"); +++ +++ /* Second fork trial. */ +++ val = 1; +++ pid = fork (); +++ if (pid == -1) +++ { +++ puts ("2nd fork failed"); +++ exit (1); +++ } +++ +++ if (pid == 0) +++ { +++ /* Child. */ +++ if (val != 10) +++ { +++ printf ("2nd: expected val=%d, got %d\n", 10, val); +++ exit (3); +++ } +++ +++ exit (0); +++ } +++ +++ /* Parent. */ +++ if (val != 6) +++ { +++ printf ("2nd: expected val=%d, got %d\n", 6, val); +++ exit (1); +++ } +++ +++ if (TEMP_FAILURE_RETRY (waitpid (pid, &status, 0)) != pid) +++ { +++ puts ("2nd waitpid failed"); +++ exit (1); +++ } +++ +++ if (status != 0) +++ exit (status); +++ +++ return 0; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-atfork2mod.c ++@@ -0,0 +1,57 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++ +++ +++extern int val; +++ +++ +++static void +++prepare (void) +++{ +++ ++val; +++} +++ +++static void +++parent (void) +++{ +++ val *= 4; +++} +++ +++static void +++child (void) +++{ +++ val *= 8; +++} +++ +++static void +++__attribute__ ((constructor)) +++init (void) +++{ +++ extern void *__dso_handle; +++ printf ("dsohandle = %p\n", __dso_handle); +++ +++ if (pthread_atfork (prepare, parent, child) != 0) +++ { +++ puts ("init: atfork failed"); +++ exit (1); +++ } +++} ++--- /dev/null +++++ b/fbtl/tst-attr1.c ++@@ -0,0 +1,305 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++ +++ +++int +++do_test (void) +++{ +++ int i; +++ pthread_attr_t a; +++ +++ if (pthread_attr_init (&a) != 0) +++ { +++ puts ("attr_init failed"); +++ exit (1); +++ } +++ +++ pthread_mutexattr_t ma; +++ +++ if (pthread_mutexattr_init (&ma) != 0) +++ { +++ puts ("mutexattr_init failed"); +++ exit (1); +++ } +++ +++ pthread_rwlockattr_t rwa; +++ +++ if (pthread_rwlockattr_init (&rwa) != 0) +++ { +++ puts ("rwlockattr_init failed"); +++ exit (1); +++ } +++ +++ /* XXX Remove if default value is clear. */ +++ pthread_attr_setinheritsched (&a, PTHREAD_INHERIT_SCHED); +++ pthread_attr_setschedpolicy (&a, SCHED_OTHER); +++ pthread_attr_setscope (&a, PTHREAD_SCOPE_SYSTEM); +++ +++ for (i = 0; i < 10000; ++i) +++ { +++ long int r = random (); +++ +++ if (r != PTHREAD_CREATE_DETACHED && r != PTHREAD_CREATE_JOINABLE) +++ { +++ int e = pthread_attr_setdetachstate (&a, r); +++ +++ if (e == 0) +++ { +++ printf ("attr_setdetachstate with value %ld succeeded\n", r); +++ exit (1); +++ } +++ if (e != EINVAL) +++ { +++ puts ("attr_setdetachstate didn't return EINVAL"); +++ exit (1); +++ } +++ +++ int s; +++ if (pthread_attr_getdetachstate (&a, &s) != 0) +++ { +++ puts ("attr_getdetachstate failed"); +++ exit (1); +++ } +++ +++ if (s != PTHREAD_CREATE_JOINABLE) +++ { +++ printf ("\ +++detach state changed to %d by invalid setdetachstate call\n", s); +++ exit (1); +++ } +++ } +++ +++ if (r != PTHREAD_INHERIT_SCHED && r != PTHREAD_EXPLICIT_SCHED) +++ { +++ int e = pthread_attr_setinheritsched (&a, r); +++ +++ if (e == 0) +++ { +++ printf ("attr_setinheritsched with value %ld succeeded\n", r); +++ exit (1); +++ } +++ if (e != EINVAL) +++ { +++ puts ("attr_setinheritsched didn't return EINVAL"); +++ exit (1); +++ } +++ +++ int s; +++ if (pthread_attr_getinheritsched (&a, &s) != 0) +++ { +++ puts ("attr_getinheritsched failed"); +++ exit (1); +++ } +++ +++ if (s != PTHREAD_INHERIT_SCHED) +++ { +++ printf ("\ +++inheritsched changed to %d by invalid setinheritsched call\n", s); +++ exit (1); +++ } +++ } +++ +++ if (r != SCHED_OTHER && r != SCHED_RR && r != SCHED_FIFO) +++ { +++ int e = pthread_attr_setschedpolicy (&a, r); +++ +++ if (e == 0) +++ { +++ printf ("attr_setschedpolicy with value %ld succeeded\n", r); +++ exit (1); +++ } +++ if (e != EINVAL) +++ { +++ puts ("attr_setschedpolicy didn't return EINVAL"); +++ exit (1); +++ } +++ +++ int s; +++ if (pthread_attr_getschedpolicy (&a, &s) != 0) +++ { +++ puts ("attr_getschedpolicy failed"); +++ exit (1); +++ } +++ +++ if (s != SCHED_OTHER) +++ { +++ printf ("\ +++schedpolicy changed to %d by invalid setschedpolicy call\n", s); +++ exit (1); +++ } +++ } +++ +++ if (r != PTHREAD_SCOPE_SYSTEM && r != PTHREAD_SCOPE_PROCESS) +++ { +++ int e = pthread_attr_setscope (&a, r); +++ +++ if (e == 0) +++ { +++ printf ("attr_setscope with value %ld succeeded\n", r); +++ exit (1); +++ } +++ if (e != EINVAL) +++ { +++ puts ("attr_setscope didn't return EINVAL"); +++ exit (1); +++ } +++ +++ int s; +++ if (pthread_attr_getscope (&a, &s) != 0) +++ { +++ puts ("attr_getscope failed"); +++ exit (1); +++ } +++ +++ if (s != PTHREAD_SCOPE_SYSTEM) +++ { +++ printf ("\ +++contentionscope changed to %d by invalid setscope call\n", s); +++ exit (1); +++ } +++ } +++ +++ if (r != PTHREAD_PROCESS_PRIVATE && r != PTHREAD_PROCESS_SHARED) +++ { +++ int e = pthread_mutexattr_setpshared (&ma, r); +++ +++ if (e == 0) +++ { +++ printf ("mutexattr_setpshared with value %ld succeeded\n", r); +++ exit (1); +++ } +++ if (e != EINVAL) +++ { +++ puts ("mutexattr_setpshared didn't return EINVAL"); +++ exit (1); +++ } +++ +++ int s; +++ if (pthread_mutexattr_getpshared (&ma, &s) != 0) +++ { +++ puts ("mutexattr_getpshared failed"); +++ exit (1); +++ } +++ +++ if (s != PTHREAD_PROCESS_PRIVATE) +++ { +++ printf ("\ +++pshared changed to %d by invalid mutexattr_setpshared call\n", s); +++ exit (1); +++ } +++ +++ e = pthread_rwlockattr_setpshared (&rwa, r); +++ +++ if (e == 0) +++ { +++ printf ("rwlockattr_setpshared with value %ld succeeded\n", r); +++ exit (1); +++ } +++ if (e != EINVAL) +++ { +++ puts ("rwlockattr_setpshared didn't return EINVAL"); +++ exit (1); +++ } +++ +++ if (pthread_rwlockattr_getpshared (&rwa, &s) != 0) +++ { +++ puts ("rwlockattr_getpshared failed"); +++ exit (1); +++ } +++ +++ if (s != PTHREAD_PROCESS_PRIVATE) +++ { +++ printf ("\ +++pshared changed to %d by invalid rwlockattr_setpshared call\n", s); +++ exit (1); +++ } +++ } +++ +++ if (r != PTHREAD_CANCEL_ENABLE && r != PTHREAD_CANCEL_DISABLE) +++ { +++ int e = pthread_setcancelstate (r, NULL); +++ +++ if (e == 0) +++ { +++ printf ("setcancelstate with value %ld succeeded\n", r); +++ exit (1); +++ } +++ +++ if (e != EINVAL) +++ { +++ puts ("setcancelstate didn't return EINVAL"); +++ exit (1); +++ } +++ +++ int s; +++ if (pthread_setcancelstate (PTHREAD_CANCEL_ENABLE, &s) != 0) +++ { +++ puts ("setcancelstate failed for PTHREAD_CANCEL_ENABLE"); +++ exit (1); +++ } +++ +++ if (s != PTHREAD_CANCEL_ENABLE) +++ { +++ puts ("invalid setcancelstate changed state"); +++ exit (1); +++ } +++ } +++ +++ if (r != PTHREAD_CANCEL_DEFERRED && r != PTHREAD_CANCEL_ASYNCHRONOUS) +++ { +++ int e = pthread_setcanceltype (r, NULL); +++ +++ if (e == 0) +++ { +++ printf ("setcanceltype with value %ld succeeded\n", r); +++ exit (1); +++ } +++ +++ if (e != EINVAL) +++ { +++ puts ("setcanceltype didn't return EINVAL"); +++ exit (1); +++ } +++ +++ int s; +++ if (pthread_setcanceltype (PTHREAD_CANCEL_DEFERRED, &s) != 0) +++ { +++ puts ("setcanceltype failed for PTHREAD_CANCEL_DEFERRED"); +++ exit (1); +++ } +++ +++ if (s != PTHREAD_CANCEL_DEFERRED) +++ { +++ puts ("invalid setcanceltype changed state"); +++ exit (1); +++ } +++ } +++ } +++ +++ return 0; +++} +++ +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-attr2.c ++@@ -0,0 +1,316 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++ +++ +++int +++do_test (void) +++{ +++ pthread_attr_t a; +++ +++ if (pthread_attr_init (&a) != 0) +++ { +++ puts ("attr_init failed"); +++ exit (1); +++ } +++ +++ /* Check default value of detach state. */ +++ int s; +++ if (pthread_attr_getdetachstate (&a, &s) != 0) +++ { +++ puts ("1st attr_getdestachstate failed"); +++ exit (1); +++ } +++ if (s != PTHREAD_CREATE_JOINABLE) +++ { +++ printf ("\ +++default detach state wrong: %d, expected %d (PTHREAD_CREATE_JOINABLE)\n", +++ s, PTHREAD_CREATE_JOINABLE); +++ exit (1); +++ } +++ +++ int e = pthread_attr_setdetachstate (&a, PTHREAD_CREATE_DETACHED); +++ if (e != 0) +++ { +++ puts ("1st attr_setdetachstate failed"); +++ exit (1); +++ } +++ if (pthread_attr_getdetachstate (&a, &s) != 0) +++ { +++ puts ("2nd attr_getdestachstate failed"); +++ exit (1); +++ } +++ if (s != PTHREAD_CREATE_DETACHED) +++ { +++ puts ("PTHREAD_CREATE_DETACHED set, but not given back"); +++ exit (1); +++ } +++ +++ e = pthread_attr_setdetachstate (&a, PTHREAD_CREATE_JOINABLE); +++ if (e != 0) +++ { +++ puts ("2nd attr_setdetachstate failed"); +++ exit (1); +++ } +++ if (pthread_attr_getdetachstate (&a, &s) != 0) +++ { +++ puts ("3rd attr_getdestachstate failed"); +++ exit (1); +++ } +++ if (s != PTHREAD_CREATE_JOINABLE) +++ { +++ puts ("PTHREAD_CREATE_JOINABLE set, but not given back"); +++ exit (1); +++ } +++ +++ +++ size_t g; +++ if (pthread_attr_getguardsize (&a, &g) != 0) +++ { +++ puts ("1st attr_getguardsize failed"); +++ exit (1); +++ } +++ if (g != (size_t) sysconf (_SC_PAGESIZE)) +++ { +++ printf ("default guardsize %zu, expected %ld (PAGESIZE)\n", +++ g, sysconf (_SC_PAGESIZE)); +++ exit (1); +++ } +++ +++ e = pthread_attr_setguardsize (&a, 0); +++ if (e != 0) +++ { +++ puts ("1st attr_setguardsize failed"); +++ exit (1); +++ } +++ if (pthread_attr_getguardsize (&a, &g) != 0) +++ { +++ puts ("2nd attr_getguardsize failed"); +++ exit (1); +++ } +++ if (g != 0) +++ { +++ printf ("guardsize set to zero but %zu returned\n", g); +++ exit (1); +++ } +++ +++ e = pthread_attr_setguardsize (&a, 1); +++ if (e != 0) +++ { +++ puts ("2nd attr_setguardsize failed"); +++ exit (1); +++ } +++ if (pthread_attr_getguardsize (&a, &g) != 0) +++ { +++ puts ("3rd attr_getguardsize failed"); +++ exit (1); +++ } +++ if (g != 1) +++ { +++ printf ("guardsize set to 1 but %zu returned\n", g); +++ exit (1); +++ } +++ +++ +++ if (pthread_attr_getinheritsched (&a, &s) != 0) +++ { +++ puts ("1st attr_getinheritsched failed"); +++ exit (1); +++ } +++ /* XXX What is the correct default value. */ +++ if (s != PTHREAD_INHERIT_SCHED && s != PTHREAD_EXPLICIT_SCHED) +++ { +++ puts ("incorrect default value for inheritsched"); +++ exit (1); +++ } +++ +++ e = pthread_attr_setinheritsched (&a, PTHREAD_EXPLICIT_SCHED); +++ if (e != 0) +++ { +++ puts ("1st attr_setinheritsched failed"); +++ exit (1); +++ } +++ if (pthread_attr_getinheritsched (&a, &s) != 0) +++ { +++ puts ("2nd attr_getinheritsched failed"); +++ exit (1); +++ } +++ if (s != PTHREAD_EXPLICIT_SCHED) +++ { +++ printf ("inheritsched set to PTHREAD_EXPLICIT_SCHED, but got %d\n", s); +++ exit (1); +++ } +++ +++ e = pthread_attr_setinheritsched (&a, PTHREAD_INHERIT_SCHED); +++ if (e != 0) +++ { +++ puts ("2nd attr_setinheritsched failed"); +++ exit (1); +++ } +++ if (pthread_attr_getinheritsched (&a, &s) != 0) +++ { +++ puts ("3rd attr_getinheritsched failed"); +++ exit (1); +++ } +++ if (s != PTHREAD_INHERIT_SCHED) +++ { +++ printf ("inheritsched set to PTHREAD_INHERIT_SCHED, but got %d\n", s); +++ exit (1); +++ } +++ +++ +++ if (pthread_attr_getschedpolicy (&a, &s) != 0) +++ { +++ puts ("1st attr_getschedpolicy failed"); +++ exit (1); +++ } +++ /* XXX What is the correct default value. */ +++ if (s != SCHED_OTHER && s != SCHED_FIFO && s != SCHED_RR) +++ { +++ puts ("incorrect default value for schedpolicy"); +++ exit (1); +++ } +++ +++ e = pthread_attr_setschedpolicy (&a, SCHED_RR); +++ if (e != 0) +++ { +++ puts ("1st attr_setschedpolicy failed"); +++ exit (1); +++ } +++ if (pthread_attr_getschedpolicy (&a, &s) != 0) +++ { +++ puts ("2nd attr_getschedpolicy failed"); +++ exit (1); +++ } +++ if (s != SCHED_RR) +++ { +++ printf ("schedpolicy set to SCHED_RR, but got %d\n", s); +++ exit (1); +++ } +++ +++ e = pthread_attr_setschedpolicy (&a, SCHED_FIFO); +++ if (e != 0) +++ { +++ puts ("2nd attr_setschedpolicy failed"); +++ exit (1); +++ } +++ if (pthread_attr_getschedpolicy (&a, &s) != 0) +++ { +++ puts ("3rd attr_getschedpolicy failed"); +++ exit (1); +++ } +++ if (s != SCHED_FIFO) +++ { +++ printf ("schedpolicy set to SCHED_FIFO, but got %d\n", s); +++ exit (1); +++ } +++ +++ e = pthread_attr_setschedpolicy (&a, SCHED_OTHER); +++ if (e != 0) +++ { +++ puts ("3rd attr_setschedpolicy failed"); +++ exit (1); +++ } +++ if (pthread_attr_getschedpolicy (&a, &s) != 0) +++ { +++ puts ("4th attr_getschedpolicy failed"); +++ exit (1); +++ } +++ if (s != SCHED_OTHER) +++ { +++ printf ("schedpolicy set to SCHED_OTHER, but got %d\n", s); +++ exit (1); +++ } +++ +++ +++ if (pthread_attr_getscope (&a, &s) != 0) +++ { +++ puts ("1st attr_getscope failed"); +++ exit (1); +++ } +++ /* XXX What is the correct default value. */ +++ if (s != PTHREAD_SCOPE_SYSTEM && s != PTHREAD_SCOPE_PROCESS) +++ { +++ puts ("incorrect default value for contentionscope"); +++ exit (1); +++ } +++ +++ e = pthread_attr_setscope (&a, PTHREAD_SCOPE_PROCESS); +++ if (e != ENOTSUP) +++ { +++ if (e != 0) +++ { +++ puts ("1st attr_setscope failed"); +++ exit (1); +++ } +++ if (pthread_attr_getscope (&a, &s) != 0) +++ { +++ puts ("2nd attr_getscope failed"); +++ exit (1); +++ } +++ if (s != PTHREAD_SCOPE_PROCESS) +++ { +++ printf ("\ +++contentionscope set to PTHREAD_SCOPE_PROCESS, but got %d\n", s); +++ exit (1); +++ } +++ } +++ +++ e = pthread_attr_setscope (&a, PTHREAD_SCOPE_SYSTEM); +++ if (e != 0) +++ { +++ puts ("2nd attr_setscope failed"); +++ exit (1); +++ } +++ if (pthread_attr_getscope (&a, &s) != 0) +++ { +++ puts ("3rd attr_getscope failed"); +++ exit (1); +++ } +++ if (s != PTHREAD_SCOPE_SYSTEM) +++ { +++ printf ("contentionscope set to PTHREAD_SCOPE_SYSTEM, but got %d\n", s); +++ exit (1); +++ } +++ +++ char buf[1]; +++ e = pthread_attr_setstack (&a, buf, 1); +++ if (e != EINVAL) +++ { +++ puts ("setstack with size 1 did not produce EINVAL"); +++ exit (1); +++ } +++ +++ e = pthread_attr_setstacksize (&a, 1); +++ if (e != EINVAL) +++ { +++ puts ("setstacksize with size 1 did not produce EINVAL"); +++ exit (1); +++ } +++ +++ return 0; +++} +++ +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-attr3.c ++@@ -0,0 +1,421 @@ +++/* pthread_getattr_np test. +++ Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Jakub Jelinek , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++#include +++ +++static void * +++tf (void *arg) +++{ +++ pthread_attr_t a, *ap, a2; +++ int err; +++ void *result = NULL; +++ +++ if (arg == NULL) +++ { +++ ap = &a2; +++ err = pthread_attr_init (ap); +++ if (err) +++ { +++ error (0, err, "pthread_attr_init failed"); +++ return tf; +++ } +++ } +++ else +++ ap = (pthread_attr_t *) arg; +++ +++ err = pthread_getattr_np (pthread_self (), &a); +++ if (err) +++ { +++ error (0, err, "pthread_getattr_np failed"); +++ result = tf; +++ } +++ +++ int detachstate1, detachstate2; +++ err = pthread_attr_getdetachstate (&a, &detachstate1); +++ if (err) +++ { +++ error (0, err, "pthread_attr_getdetachstate failed"); +++ result = tf; +++ } +++ else +++ { +++ err = pthread_attr_getdetachstate (ap, &detachstate2); +++ if (err) +++ { +++ error (0, err, "pthread_attr_getdetachstate failed"); +++ result = tf; +++ } +++ else if (detachstate1 != detachstate2) +++ { +++ error (0, 0, "detachstate differs %d != %d", +++ detachstate1, detachstate2); +++ result = tf; +++ } +++ } +++ +++ void *stackaddr; +++ size_t stacksize; +++ err = pthread_attr_getstack (&a, &stackaddr, &stacksize); +++ if (err) +++ { +++ error (0, err, "pthread_attr_getstack failed"); +++ result = tf; +++ } +++ else if ((void *) &a < stackaddr +++ || (void *) &a >= stackaddr + stacksize) +++ { +++ error (0, 0, "pthread_attr_getstack returned range does not cover thread's stack"); +++ result = tf; +++ } +++ else +++ printf ("thread stack %p-%p (0x%zx)\n", stackaddr, stackaddr + stacksize, +++ stacksize); +++ +++ size_t guardsize1, guardsize2; +++ err = pthread_attr_getguardsize (&a, &guardsize1); +++ if (err) +++ { +++ error (0, err, "pthread_attr_getguardsize failed"); +++ result = tf; +++ } +++ else +++ { +++ err = pthread_attr_getguardsize (ap, &guardsize2); +++ if (err) +++ { +++ error (0, err, "pthread_attr_getguardsize failed"); +++ result = tf; +++ } +++ else if (guardsize1 != guardsize2) +++ { +++ error (0, 0, "guardsize differs %zd != %zd", +++ guardsize1, guardsize2); +++ result = tf; +++ } +++ else +++ printf ("thread guardsize %zd\n", guardsize1); +++ } +++ +++ int scope1, scope2; +++ err = pthread_attr_getscope (&a, &scope1); +++ if (err) +++ { +++ error (0, err, "pthread_attr_getscope failed"); +++ result = tf; +++ } +++ else +++ { +++ err = pthread_attr_getscope (ap, &scope2); +++ if (err) +++ { +++ error (0, err, "pthread_attr_getscope failed"); +++ result = tf; +++ } +++ else if (scope1 != scope2) +++ { +++ error (0, 0, "scope differs %d != %d", +++ scope1, scope2); +++ result = tf; +++ } +++ } +++ +++ int inheritsched1, inheritsched2; +++ err = pthread_attr_getinheritsched (&a, &inheritsched1); +++ if (err) +++ { +++ error (0, err, "pthread_attr_getinheritsched failed"); +++ result = tf; +++ } +++ else +++ { +++ err = pthread_attr_getinheritsched (ap, &inheritsched2); +++ if (err) +++ { +++ error (0, err, "pthread_attr_getinheritsched failed"); +++ result = tf; +++ } +++ else if (inheritsched1 != inheritsched2) +++ { +++ error (0, 0, "inheritsched differs %d != %d", +++ inheritsched1, inheritsched2); +++ result = tf; +++ } +++ } +++ +++ cpu_set_t c1, c2; +++ err = pthread_getaffinity_np (pthread_self (), sizeof (c1), &c1); +++ if (err == 0) +++ { +++ err = pthread_attr_getaffinity_np (&a, sizeof (c2), &c2); +++ if (err) +++ { +++ error (0, err, "pthread_attr_getaffinity_np failed"); +++ result = tf; +++ } +++ else if (memcmp (&c1, &c2, sizeof (c1))) +++ { +++ error (0, 0, "pthread_attr_getaffinity_np returned different CPU mask than pthread_getattr_np"); +++ result = tf; +++ } +++ } +++ +++ err = pthread_attr_destroy (&a); +++ if (err) +++ { +++ error (0, err, "pthread_attr_destroy failed"); +++ result = tf; +++ } +++ +++ if (ap == &a2) +++ { +++ err = pthread_attr_destroy (ap); +++ if (err) +++ { +++ error (0, err, "pthread_attr_destroy failed"); +++ result = tf; +++ } +++ } +++ +++ return result; +++} +++ +++ +++static int +++do_test (void) +++{ +++ int result = 0; +++ pthread_attr_t a; +++ cpu_set_t c1, c2; +++ +++ int err = pthread_attr_init (&a); +++ if (err) +++ { +++ error (0, err, "pthread_attr_init failed"); +++ result = 1; +++ } +++ +++ err = pthread_attr_getaffinity_np (&a, sizeof (c1), &c1); +++ if (err && err != ENOSYS) +++ { +++ error (0, err, "pthread_attr_getaffinity_np failed"); +++ result = 1; +++ } +++ +++ err = pthread_attr_destroy (&a); +++ if (err) +++ { +++ error (0, err, "pthread_attr_destroy failed"); +++ result = 1; +++ } +++ +++ err = pthread_getattr_np (pthread_self (), &a); +++ if (err) +++ { +++ error (0, err, "pthread_getattr_np failed"); +++ result = 1; +++ } +++ +++ int detachstate; +++ err = pthread_attr_getdetachstate (&a, &detachstate); +++ if (err) +++ { +++ error (0, err, "pthread_attr_getdetachstate failed"); +++ result = 1; +++ } +++ else if (detachstate != PTHREAD_CREATE_JOINABLE) +++ { +++ error (0, 0, "initial thread not joinable"); +++ result = 1; +++ } +++ +++ void *stackaddr; +++ size_t stacksize; +++ err = pthread_attr_getstack (&a, &stackaddr, &stacksize); +++ if (err) +++ { +++ error (0, err, "pthread_attr_getstack failed"); +++ result = 1; +++ } +++ else if ((void *) &a < stackaddr +++ || (void *) &a >= stackaddr + stacksize) +++ { +++ error (0, 0, "pthread_attr_getstack returned range does not cover main's stack"); +++ result = 1; +++ } +++ else +++ printf ("initial thread stack %p-%p (0x%zx)\n", stackaddr, +++ stackaddr + stacksize, stacksize); +++ +++ size_t guardsize; +++ err = pthread_attr_getguardsize (&a, &guardsize); +++ if (err) +++ { +++ error (0, err, "pthread_attr_getguardsize failed"); +++ result = 1; +++ } +++ else if (guardsize != 0) +++ { +++ error (0, 0, "pthread_attr_getguardsize returned %zd != 0", +++ guardsize); +++ result = 1; +++ } +++ +++ int scope; +++ err = pthread_attr_getscope (&a, &scope); +++ if (err) +++ { +++ error (0, err, "pthread_attr_getscope failed"); +++ result = 1; +++ } +++ else if (scope != PTHREAD_SCOPE_SYSTEM) +++ { +++ error (0, 0, "pthread_attr_getscope returned %d != PTHREAD_SCOPE_SYSTEM", +++ scope); +++ result = 1; +++ } +++ +++ int inheritsched; +++ err = pthread_attr_getinheritsched (&a, &inheritsched); +++ if (err) +++ { +++ error (0, err, "pthread_attr_getinheritsched failed"); +++ result = 1; +++ } +++ else if (inheritsched != PTHREAD_INHERIT_SCHED) +++ { +++ error (0, 0, "pthread_attr_getinheritsched returned %d != PTHREAD_INHERIT_SCHED", +++ inheritsched); +++ result = 1; +++ } +++ +++ err = pthread_getaffinity_np (pthread_self (), sizeof (c1), &c1); +++ if (err == 0) +++ { +++ err = pthread_attr_getaffinity_np (&a, sizeof (c2), &c2); +++ if (err) +++ { +++ error (0, err, "pthread_attr_getaffinity_np failed"); +++ result = 1; +++ } +++ else if (memcmp (&c1, &c2, sizeof (c1))) +++ { +++ error (0, 0, "pthread_attr_getaffinity_np returned different CPU mask than pthread_getattr_np"); +++ result = 1; +++ } +++ } +++ +++ err = pthread_attr_destroy (&a); +++ if (err) +++ { +++ error (0, err, "pthread_attr_destroy failed"); +++ result = 1; +++ } +++ +++ pthread_t th; +++ err = pthread_create (&th, NULL, tf, NULL); +++ if (err) +++ { +++ error (0, err, "pthread_create #1 failed"); +++ result = 1; +++ } +++ else +++ { +++ void *ret; +++ err = pthread_join (th, &ret); +++ if (err) +++ { +++ error (0, err, "pthread_join #1 failed"); +++ result = 1; +++ } +++ else if (ret != NULL) +++ result = 1; +++ } +++ +++ err = pthread_attr_init (&a); +++ if (err) +++ { +++ error (0, err, "pthread_attr_init failed"); +++ result = 1; +++ } +++ +++ err = pthread_create (&th, &a, tf, &a); +++ if (err) +++ { +++ error (0, err, "pthread_create #2 failed"); +++ result = 1; +++ } +++ else +++ { +++ void *ret; +++ err = pthread_join (th, &ret); +++ if (err) +++ { +++ error (0, err, "pthread_join #2 failed"); +++ result = 1; +++ } +++ else if (ret != NULL) +++ result = 1; +++ } +++ +++ err = pthread_attr_setguardsize (&a, 16 * sysconf (_SC_PAGESIZE)); +++ if (err) +++ { +++ error (0, err, "pthread_attr_setguardsize failed"); +++ result = 1; +++ } +++ +++ err = pthread_create (&th, &a, tf, &a); +++ if (err) +++ { +++ error (0, err, "pthread_create #3 failed"); +++ result = 1; +++ } +++ else +++ { +++ void *ret; +++ err = pthread_join (th, &ret); +++ if (err) +++ { +++ error (0, err, "pthread_join #3 failed"); +++ result = 1; +++ } +++ else if (ret != NULL) +++ result = 1; +++ } +++ +++ err = pthread_attr_destroy (&a); +++ if (err) +++ { +++ error (0, err, "pthread_attr_destroy failed"); +++ result = 1; +++ } +++ +++ return result; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-backtrace1.c ++@@ -0,0 +1,85 @@ +++/* Copyright (C) 2004-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Jakub Jelinek , 2004. +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public +++ License as published by the Free Software Foundation; either +++ version 2.1 of the License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General Public License 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 +++ . */ +++ +++#include +++#include +++#include +++ +++#define BT_SIZE 64 +++void *bt_array[BT_SIZE]; +++int bt_cnt; +++ +++int +++do_bt (void) +++{ +++ bt_cnt = backtrace (bt_array, BT_SIZE); +++ return 56; +++} +++ +++int +++call_do_bt (void) +++{ +++ return do_bt () + 1; +++} +++ +++void * +++tf (void *arg) +++{ +++ if (call_do_bt () != 57) +++ return (void *) 1L; +++ return NULL; +++} +++ +++int +++do_test (void) +++{ +++ pthread_t th; +++ if (pthread_create (&th, NULL, tf, NULL)) +++ { +++ puts ("create failed"); +++ return 1; +++ } +++ +++ void *res; +++ if (pthread_join (th, &res)) +++ { +++ puts ("join failed"); +++ return 1; +++ } +++ +++ if (res != NULL) +++ { +++ puts ("thread failed"); +++ return 1; +++ } +++ +++ char **text = backtrace_symbols (bt_array, bt_cnt); +++ if (text == NULL) +++ { +++ puts ("backtrace_symbols failed"); +++ return 1; +++ } +++ +++ for (int i = 0; i < bt_cnt; ++i) +++ puts (text[i]); +++ +++ return 0; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-barrier1.c ++@@ -0,0 +1,70 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++ +++ +++static int +++do_test (void) +++{ +++ pthread_barrier_t b; +++ int e; +++ int cnt; +++ +++ e = pthread_barrier_init (&b, NULL, 0); +++ if (e == 0) +++ { +++ puts ("barrier_init with count 0 succeeded"); +++ return 1; +++ } +++ if (e != EINVAL) +++ { +++ puts ("barrier_init with count 0 didn't return EINVAL"); +++ return 1; +++ } +++ +++ if (pthread_barrier_init (&b, NULL, 1) != 0) +++ { +++ puts ("real barrier_init failed"); +++ return 1; +++ } +++ +++ for (cnt = 0; cnt < 10; ++cnt) +++ { +++ e = pthread_barrier_wait (&b); +++ +++ if (e != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("barrier_wait didn't return PTHREAD_BARRIER_SERIAL_THREAD"); +++ return 1; +++ } +++ } +++ +++ if (pthread_barrier_destroy (&b) != 0) +++ { +++ puts ("barrier_destroy failed"); +++ return 1; +++ } +++ +++ return 0; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-barrier2.c ++@@ -0,0 +1,184 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++static int +++do_test (void) +++{ +++ size_t ps = sysconf (_SC_PAGESIZE); +++ char tmpfname[] = "/tmp/tst-barrier2.XXXXXX"; +++ char data[ps]; +++ void *mem; +++ int fd; +++ pthread_barrier_t *b; +++ pthread_barrierattr_t a; +++ pid_t pid; +++ int serials = 0; +++ int cnt; +++ int status; +++ int p; +++ +++ fd = mkstemp (tmpfname); +++ if (fd == -1) +++ { +++ printf ("cannot open temporary file: %m\n"); +++ return 1; +++ } +++ +++ /* Make sure it is always removed. */ +++ unlink (tmpfname); +++ +++ /* Create one page of data. */ +++ memset (data, '\0', ps); +++ +++ /* Write the data to the file. */ +++ if (write (fd, data, ps) != (ssize_t) ps) +++ { +++ puts ("short write"); +++ return 1; +++ } +++ +++ mem = mmap (NULL, ps, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); +++ if (mem == MAP_FAILED) +++ { +++ printf ("mmap failed: %m\n"); +++ return 1; +++ } +++ +++ b = (pthread_barrier_t *) (((uintptr_t) mem + __alignof (pthread_barrier_t)) +++ & ~(__alignof (pthread_barrier_t) - 1)); +++ +++ if (pthread_barrierattr_init (&a) != 0) +++ { +++ puts ("barrierattr_init failed"); +++ return 1; +++ } +++ +++ if (pthread_barrierattr_getpshared (&a, &p) != 0) +++ { +++ puts ("1st barrierattr_getpshared failed"); +++ return 1; +++ } +++ +++ if (p != PTHREAD_PROCESS_PRIVATE) +++ { +++ puts ("default pshared value wrong"); +++ return 1; +++ } +++ +++ if (pthread_barrierattr_setpshared (&a, PTHREAD_PROCESS_SHARED) != 0) +++ { +++ puts ("barrierattr_setpshared failed"); +++ return 1; +++ } +++ +++ if (pthread_barrierattr_getpshared (&a, &p) != 0) +++ { +++ puts ("2nd barrierattr_getpshared failed"); +++ return 1; +++ } +++ +++ if (p != PTHREAD_PROCESS_SHARED) +++ { +++ puts ("pshared value after setpshared call wrong"); +++ return 1; +++ } +++ +++ if (pthread_barrier_init (b, &a, 2) != 0) +++ { +++ puts ("barrier_init failed"); +++ return 1; +++ } +++ +++ if (pthread_barrierattr_destroy (&a) != 0) +++ { +++ puts ("barrierattr_destroy failed"); +++ return 1; +++ } +++ +++ puts ("going to fork now"); +++ pid = fork (); +++ if (pid == -1) +++ { +++ puts ("fork failed"); +++ return 1; +++ } +++ +++ /* Just to be sure we don't hang forever. */ +++ alarm (4); +++ +++#define N 30 +++ for (cnt = 0; cnt < N; ++cnt) +++ { +++ int e; +++ +++ e = pthread_barrier_wait (b); +++ if (e == PTHREAD_BARRIER_SERIAL_THREAD) +++ ++serials; +++ else if (e != 0) +++ { +++ printf ("%s: barrier_wait returned value %d != 0 and PTHREAD_BARRIER_SERIAL_THREAD\n", +++ pid == 0 ? "child" : "parent", e); +++ return 1; +++ } +++ } +++ +++ alarm (0); +++ +++ printf ("%s: was %d times the serial thread\n", +++ pid == 0 ? "child" : "parent", serials); +++ +++ if (pid == 0) +++ /* The child. Pass the number of times we had the serializing +++ thread back to the parent. */ +++ exit (serials); +++ +++ if (waitpid (pid, &status, 0) != pid) +++ { +++ puts ("waitpid failed"); +++ return 1; +++ } +++ +++ if (!WIFEXITED (status)) +++ { +++ puts ("child exited abnormally"); +++ return 1; +++ } +++ +++ if (WEXITSTATUS (status) + serials != N) +++ { +++ printf ("total number of serials is %d, expected %d\n", +++ WEXITSTATUS (status) + serials, N); +++ return 1; +++ } +++ +++ return 0; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-barrier3.c ++@@ -0,0 +1,153 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++/* Test of POSIX barriers. */ +++ +++#include +++#include +++#include +++#include +++ +++#define NTHREADS 20 +++ +++#define ROUNDS 20 +++ +++static pthread_barrier_t barriers[NTHREADS]; +++ +++static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER; +++static int counters[NTHREADS]; +++static int serial[NTHREADS]; +++ +++static void * +++worker (void *arg) +++{ +++ void *result = NULL; +++ int nr = (long int) arg; +++ int i; +++ +++ for (i = 0; i < ROUNDS; ++i) +++ { +++ int j; +++ int retval; +++ +++ if (nr == 0) +++ { +++ memset (counters, '\0', sizeof (counters)); +++ memset (serial, '\0', sizeof (serial)); +++ } +++ +++ retval = pthread_barrier_wait (&barriers[NTHREADS - 1]); +++ if (retval != 0 && retval != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("thread %d failed to wait for all the others\n", nr); +++ result = (void *) 1; +++ } +++ +++ for (j = nr; j < NTHREADS; ++j) +++ { +++ /* Increment the counter for this round. */ +++ pthread_mutex_lock (&lock); +++ ++counters[j]; +++ pthread_mutex_unlock (&lock); +++ +++ /* Wait for the rest. */ +++ retval = pthread_barrier_wait (&barriers[j]); +++ +++ /* Test the result. */ +++ if (nr == 0 && counters[j] != j + 1) +++ { +++ printf ("barrier in round %d released but count is %d\n", +++ j, counters[j]); +++ result = (void *) 1; +++ } +++ +++ if (retval != 0) +++ { +++ if (retval != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("thread %d in round %d has nonzero return value != PTHREAD_BARRIER_SERIAL_THREAD\n", +++ nr, j); +++ result = (void *) 1; +++ } +++ else +++ { +++ pthread_mutex_lock (&lock); +++ ++serial[j]; +++ pthread_mutex_unlock (&lock); +++ } +++ } +++ +++ /* Wait for the rest again. */ +++ retval = pthread_barrier_wait (&barriers[j]); +++ +++ /* Now we can check whether exactly one thread was serializing. */ +++ if (nr == 0 && serial[j] != 1) +++ { +++ printf ("not exactly one serial thread in round %d\n", j); +++ result = (void *) 1; +++ } +++ } +++ } +++ +++ return result; +++} +++ +++ +++#define TEST_FUNCTION do_test () +++#define TIMEOUT 60 +++static int +++do_test (void) +++{ +++ pthread_t threads[NTHREADS]; +++ int i; +++ void *res; +++ int result = 0; +++ +++ /* Initialized the barrier variables. */ +++ for (i = 0; i < NTHREADS; ++i) +++ if (pthread_barrier_init (&barriers[i], NULL, i + 1) != 0) +++ { +++ printf ("Failed to initialize barrier %d\n", i); +++ exit (1); +++ } +++ +++ /* Start the threads. */ +++ for (i = 0; i < NTHREADS; ++i) +++ if (pthread_create (&threads[i], NULL, worker, (void *) (long int) i) != 0) +++ { +++ printf ("Failed to start thread %d\n", i); +++ exit (1); +++ } +++ +++ /* And wait for them. */ +++ for (i = 0; i < NTHREADS; ++i) +++ if (pthread_join (threads[i], &res) != 0 || res != NULL) +++ { +++ printf ("thread %d returned a failure\n", i); +++ result = 1; +++ } +++ else +++ printf ("joined threads %d\n", i); +++ +++ if (result == 0) +++ puts ("all OK"); +++ +++ return result; +++} +++ +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-barrier4.c ++@@ -0,0 +1,121 @@ +++/* Copyright (C) 2004-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 2004. +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public +++ License as published by the Free Software Foundation; either +++ version 2.1 of the License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General Public License 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 +++ . */ +++ +++/* This is a test for behavior not guaranteed by POSIX. */ +++#include +++#include +++#include +++#include +++ +++ +++static pthread_barrier_t b1; +++static pthread_barrier_t b2; +++ +++ +++#define N 20 +++ +++static void * +++tf (void *arg) +++{ +++ int round = 0; +++ +++ while (round++ < 30) +++ { +++ if (pthread_barrier_wait (&b1) == PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ pthread_barrier_destroy (&b1); +++ if (pthread_barrier_init (&b1, NULL, N) != 0) +++ { +++ puts ("tf: 1st barrier_init failed"); +++ exit (1); +++ } +++ } +++ +++ if (pthread_barrier_wait (&b2) == PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ pthread_barrier_destroy (&b2); +++ if (pthread_barrier_init (&b2, NULL, N) != 0) +++ { +++ puts ("tf: 2nd barrier_init failed"); +++ exit (1); +++ } +++ } +++ } +++ +++ return NULL; +++} +++ +++ +++static int +++do_test (void) +++{ +++ pthread_attr_t at; +++ int cnt; +++ +++ if (pthread_attr_init (&at) != 0) +++ { +++ puts ("attr_init failed"); +++ return 1; +++ } +++ +++ if (pthread_attr_setstacksize (&at, 1 * 1024 * 1024) != 0) +++ { +++ puts ("attr_setstacksize failed"); +++ return 1; +++ } +++ +++ if (pthread_barrier_init (&b1, NULL, N) != 0) +++ { +++ puts ("1st barrier_init failed"); +++ return 1; +++ } +++ +++ if (pthread_barrier_init (&b2, NULL, N) != 0) +++ { +++ puts ("2nd barrier_init failed"); +++ return 1; +++ } +++ +++ pthread_t th[N - 1]; +++ for (cnt = 0; cnt < N - 1; ++cnt) +++ if (pthread_create (&th[cnt], &at, tf, NULL) != 0) +++ { +++ puts ("pthread_create failed"); +++ return 1; +++ } +++ +++ if (pthread_attr_destroy (&at) != 0) +++ { +++ puts ("attr_destroy failed"); +++ return 1; +++ } +++ +++ tf (NULL); +++ +++ for (cnt = 0; cnt < N - 1; ++cnt) +++ if (pthread_join (th[cnt], NULL) != 0) +++ { +++ puts ("pthread_join failed"); +++ return 1; +++ } +++ +++ return 0; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-basic1.c ++@@ -0,0 +1,81 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++ +++ +++static pid_t pid; +++ +++static void * +++tf (void *a) +++{ +++ if (getpid () != pid) +++ { +++ write (2, "pid mismatch\n", 13); +++ _exit (1); +++ } +++ +++ return a; +++} +++ +++ +++int +++do_test (void) +++{ +++ pid = getpid (); +++ +++#define N 2 +++ pthread_t t[N]; +++ int i; +++ +++ for (i = 0; i < N; ++i) +++ if (pthread_create (&t[i], NULL, tf, (void *) (long int) (i + 1)) != 0) +++ { +++ write (2, "create failed\n", 14); +++ _exit (1); +++ } +++ else +++ printf ("created thread %d\n", i); +++ +++ for (i = 0; i < N; ++i) +++ { +++ void *r; +++ int e; +++ if ((e = pthread_join (t[i], &r)) != 0) +++ { +++ printf ("join failed: %d\n", e); +++ _exit (1); +++ } +++ else if (r != (void *) (long int) (i + 1)) +++ { +++ write (2, "result wrong\n", 13); +++ _exit (1); +++ } +++ else +++ printf ("joined thread %d\n", i); +++ } +++ +++ return 0; +++} +++ +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-basic2.c ++@@ -0,0 +1,120 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++ +++ +++#define N 20 +++ +++static pthread_t th[N]; +++static pthread_mutex_t lock[N]; +++ +++ +++static void *tf (void *a) +++{ +++ uintptr_t idx = (uintptr_t) a; +++ +++ pthread_mutex_lock (&lock[idx]); +++ +++ return pthread_equal (pthread_self (), th[idx]) ? NULL : (void *) 1l; +++} +++ +++ +++int +++do_test (void) +++{ +++ if (pthread_equal (pthread_self (), pthread_self ()) == 0) +++ { +++ puts ("pthread_equal (pthread_self (), pthread_self ()) failed"); +++ exit (1); +++ } +++ +++ pthread_attr_t at; +++ +++ if (pthread_attr_init (&at) != 0) +++ { +++ puts ("attr_init failed"); +++ return 1; +++ } +++ +++ if (pthread_attr_setstacksize (&at, 1 * 1024 * 1024) != 0) +++ { +++ puts ("attr_setstacksize failed"); +++ return 1; +++ } +++ +++ int i; +++ for (i = 0; i < N; ++i) +++ { +++ if (pthread_mutex_init (&lock[i], NULL) != 0) +++ { +++ puts ("mutex_init failed"); +++ exit (1); +++ } +++ +++ if (pthread_mutex_lock (&lock[i]) != 0) +++ { +++ puts ("mutex_lock failed"); +++ exit (1); +++ } +++ +++ if (pthread_create (&th[i], &at, tf, (void *) (long int) i) != 0) +++ { +++ puts ("create failed"); +++ exit (1); +++ } +++ +++ if (pthread_mutex_unlock (&lock[i]) != 0) +++ { +++ puts ("mutex_unlock failed"); +++ exit (1); +++ } +++ +++ printf ("created thread %d\n", i); +++ } +++ +++ if (pthread_attr_destroy (&at) != 0) +++ { +++ puts ("attr_destroy failed"); +++ return 1; +++ } +++ +++ int result = 0; +++ for (i = 0; i < N; ++i) +++ { +++ void *r; +++ int e; +++ if ((e = pthread_join (th[i], &r)) != 0) +++ { +++ printf ("join failed: %d\n", e); +++ _exit (1); +++ } +++ else if (r != NULL) +++ result = 1; +++ } +++ +++ return result; +++} +++ +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-basic3.c ++@@ -0,0 +1,86 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++ +++ +++static int nrunning = 1; +++ +++ +++static void +++final_test (void) +++{ +++ puts ("final_test has been called"); +++ +++#define THE_SIGNAL SIGUSR1 +++ kill (getpid (), SIGUSR1); +++} +++ +++ +++static void * +++tf (void *a) +++{ +++ if (pthread_join ((pthread_t) a, NULL) != 0) +++ { +++ printf ("join failed while %d are running\n", nrunning); +++ _exit (1); +++ } +++ +++ printf ("%2d left\n", --nrunning); +++ +++ return NULL; +++} +++ +++ +++int +++do_test (void) +++{ +++#define N 20 +++ pthread_t t[N]; +++ pthread_t last = pthread_self (); +++ int i; +++ +++ atexit (final_test); +++ +++ printf ("starting %d + 1 threads\n", N); +++ for (i = 0; i < N; ++i) +++ { +++ if (pthread_create (&t[i], NULL, tf, (void *) last) != 0) +++ { +++ puts ("create failed"); +++ _exit (1); +++ } +++ +++ ++nrunning; +++ +++ last = t[i]; +++ } +++ +++ printf ("%2d left\n", --nrunning); +++ +++ pthread_exit (NULL); +++} +++ +++ +++#define EXPECTED_SIGNAL THE_SIGNAL +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-basic4.c ++@@ -0,0 +1,100 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++static void +++final_test (void) +++{ +++ puts ("final_test has been called"); +++ +++#define THE_SIGNAL SIGUSR1 +++ kill (getpid (), SIGUSR1); +++} +++ +++ +++static void * +++tf (void *a) +++{ +++ pid_t pid = fork (); +++ if (pid == -1) +++ { +++ puts ("fork failed"); +++ exit (1); +++ } +++ +++ if (pid == 0) +++ { +++ atexit (final_test); +++ +++ pthread_exit (NULL); +++ } +++ +++ int r; +++ int e = TEMP_FAILURE_RETRY (waitpid (pid, &r, 0)); +++ if (e != pid) +++ { +++ puts ("waitpid failed"); +++ exit (1); +++ } +++ +++ if (! WIFSIGNALED (r)) +++ { +++ puts ("child not signled"); +++ exit (1); +++ } +++ +++ if (WTERMSIG (r) != THE_SIGNAL) +++ { +++ puts ("child's termination signal wrong"); +++ exit (1); +++ } +++ +++ return NULL; +++} +++ +++ +++int +++do_test (void) +++{ +++ pthread_t th; +++ +++ if (pthread_create (&th, NULL, tf, NULL) != 0) +++ { +++ puts ("create failed"); +++ _exit (1); +++ } +++ +++ if (pthread_join (th, NULL) != 0) +++ { +++ puts ("join failed"); +++ exit (1); +++ } +++ +++ return 0; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-basic5.c ++@@ -0,0 +1,73 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++ +++ +++ +++int +++do_test (void) +++{ +++ int c = pthread_getconcurrency (); +++ if (c != 0) +++ { +++ puts ("initial concurrencylevel wrong"); +++ exit (1); +++ } +++ +++ if (pthread_setconcurrency (1) != 0) +++ { +++ puts ("setconcurrency failed"); +++ exit (1); +++ } +++ +++ c = pthread_getconcurrency (); +++ if (c != 1) +++ { +++ puts ("getconcurrency didn't return the value previous set"); +++ exit (1); +++ } +++ +++ int e = pthread_setconcurrency (-1); +++ if (e == 0) +++ { +++ puts ("setconcurrency of negative value didn't failed"); +++ exit (1); +++ } +++ if (e != EINVAL) +++ { +++ puts ("setconcurrency didn't return EINVAL for negative value"); +++ exit (1); +++ } +++ +++ c = pthread_getconcurrency (); +++ if (c != 1) +++ { +++ puts ("invalid getconcurrency changed level"); +++ exit (1); +++ } +++ +++ return 0; +++} +++ +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-basic6.c ++@@ -0,0 +1,131 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++ +++ +++static char *p; +++ +++static pthread_barrier_t b; +++#define BT \ +++ e = pthread_barrier_wait (&b); \ +++ if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) \ +++ { \ +++ puts ("barrier_wait failed"); \ +++ exit (1); \ +++ } +++ +++ +++static void * +++tf (void *a) +++{ +++ int e; +++ +++ BT; +++ +++ char *p2 = getcwd (NULL, 0); +++ if (p2 == NULL) +++ { +++ puts ("2nd getcwd failed"); +++ exit (1); +++ } +++ +++ if (strcmp (p, p2) != 0) +++ { +++ printf ("initial cwd mismatch: \"%s\" vs \"%s\"\n", p, p2); +++ exit (1); +++ } +++ +++ free (p); +++ free (p2); +++ +++ if (chdir ("..") != 0) +++ { +++ puts ("chdir failed"); +++ exit (1); +++ } +++ +++ p = getcwd (NULL, 0); +++ if (p == NULL) +++ { +++ puts ("getcwd failed"); +++ exit (1); +++ } +++ +++ return a; +++} +++ +++ +++int +++do_test (void) +++{ +++ if (pthread_barrier_init (&b, NULL, 2) != 0) +++ { +++ puts ("barrier_init failed"); +++ exit (1); +++ } +++ +++ pthread_t th; +++ if (pthread_create (&th, NULL, tf, NULL) != 0) +++ { +++ puts ("create failed"); +++ exit (1); +++ } +++ +++ p = getcwd (NULL, 0); +++ if (p == NULL) +++ { +++ puts ("getcwd failed"); +++ exit (1); +++ } +++ +++ int e; +++ BT; +++ +++ if (pthread_join (th, NULL) != 0) +++ { +++ puts ("join failed"); +++ exit (1); +++ } +++ +++ char *p2 = getcwd (NULL, 0); +++ if (p2 == NULL) +++ { +++ puts ("2nd getcwd failed"); +++ exit (1); +++ } +++ +++ if (strcmp (p, p2) != 0) +++ { +++ printf ("cwd after chdir mismatch: \"%s\" vs \"%s\"\n", p, p2); +++ exit (1); +++ } +++ +++ free (p); +++ free (p2); +++ +++ return 0; +++} +++ +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-basic7.c ++@@ -0,0 +1,74 @@ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++static void use_stack (size_t needed); +++ +++void (*use_stack_ptr) (size_t) = use_stack; +++ +++static void +++use_stack (size_t needed) +++{ +++ size_t sz = sysconf (_SC_PAGESIZE); +++ char *buf = alloca (sz); +++ memset (buf, '\0', sz); +++ +++ if (needed > sz) +++ use_stack_ptr (needed - sz); +++} +++ +++static void +++use_up_memory (void) +++{ +++ struct rlimit rl; +++ getrlimit (RLIMIT_AS, &rl); +++ rl.rlim_cur = 10 * 1024 * 1024; +++ setrlimit (RLIMIT_AS, &rl); +++ +++ char *c; +++ int PAGESIZE = getpagesize (); +++ while (1) +++ { +++ c = mmap (NULL, PAGESIZE, PROT_NONE, MAP_ANON | MAP_PRIVATE, -1, 0); +++ if (c == MAP_FAILED) +++ break; +++ } +++} +++ +++static void * +++child (void *arg) +++{ +++ sleep (1); +++ return arg; +++} +++ +++static int +++do_test (void) +++{ +++ int err; +++ pthread_t tid; +++ +++ /* Allocate the memory needed for the stack. */ +++ use_stack_ptr (PTHREAD_STACK_MIN); +++ +++ use_up_memory (); +++ +++ err = pthread_create (&tid, NULL, child, NULL); +++ if (err != 0) +++ { +++ printf ("pthread_create returns %d: %s\n", err, +++ err == EAGAIN ? "OK" : "FAIL"); +++ return err != EAGAIN; +++ } +++ +++ /* We did not fail to allocate memory despite the preparation. Oh well. */ +++ return 0; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-cancel-self-cancelstate.c ++@@ -0,0 +1,65 @@ +++/* Copyright (C) 2012-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 +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include "tst-cancel-self-cleanup.c" +++ +++ +++static int +++do_test (void) +++{ +++ int ret = 0; +++ volatile int should_fail = 1; +++ +++ pthread_cleanup_push (cleanup, &should_fail); +++ +++ if ((ret = pthread_setcancelstate (PTHREAD_CANCEL_DISABLE, NULL)) != 0) +++ { +++ printf ("setcancelstate(disable) failed: %s\n", strerror (ret)); +++ exit (1); +++ } +++ +++ if ((ret = pthread_cancel (pthread_self ())) != 0) +++ { +++ printf ("cancel failed: %s\n", strerror (ret)); +++ exit (1); +++ } +++ +++ usleep (100); +++ should_fail = 0; +++ +++ if ((ret = pthread_setcancelstate (PTHREAD_CANCEL_ENABLE, NULL)) != 0) +++ { +++ printf ("setcancelstate(enable) failed: %s\n", strerror (ret)); +++ exit (1); +++ } +++ +++ /* The write syscall within this printf should give us our cancellation +++ point. */ +++ printf ("Could not cancel self.\n"); +++ pthread_cleanup_pop (0); +++ +++ return 1; +++} +++ +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-cancel-self-canceltype.c ++@@ -0,0 +1,53 @@ +++/* Copyright (C) 2012-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 +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include "tst-cancel-self-cleanup.c" +++ +++ +++static int +++do_test (void) +++{ +++ int ret = 0, should_fail = 0; +++ +++ pthread_cleanup_push (cleanup, &should_fail); +++ +++ if ((ret = pthread_setcanceltype (PTHREAD_CANCEL_ASYNCHRONOUS, NULL)) != 0) +++ { +++ printf ("setcanceltype failed: %s\n", strerror (ret)); +++ exit (1); +++ } +++ +++ if ((ret = pthread_cancel (pthread_self ())) != 0) +++ { +++ printf ("cancel failed: %s\n", strerror (ret)); +++ exit (1); +++ } +++ +++ /* Wait to be canceled. Don't give any cancellation points to play with. */ +++ while (1); +++ pthread_cleanup_pop (0); +++ +++ return 1; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-cancel-self-cleanup.c ++@@ -0,0 +1,23 @@ +++/* Copyright (C) 2012-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 +++ . */ +++ +++static void +++cleanup (void *cleanup_should_fail) +++{ +++ printf ("Main thread got cancelled and is being cleaned up now\n"); +++ exit (*(int *)cleanup_should_fail); +++} ++--- /dev/null +++++ b/fbtl/tst-cancel-self-testcancel.c ++@@ -0,0 +1,48 @@ +++/* Copyright (C) 2012-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 +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include "tst-cancel-self-cleanup.c" +++ +++ +++static int +++do_test (void) +++{ +++ int ret = 0, should_fail = 0; +++ +++ pthread_cleanup_push (cleanup, &should_fail); +++ if ((ret = pthread_cancel (pthread_self ())) != 0) +++ { +++ printf ("cancel failed: %s\n", strerror (ret)); +++ exit (1); +++ } +++ +++ pthread_testcancel (); +++ +++ printf ("Could not cancel self.\n"); +++ pthread_cleanup_pop (0); +++ +++ return 1; +++} +++ +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-cancel-self.c ++@@ -0,0 +1,48 @@ +++/* Copyright (C) 2012-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 +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include "tst-cancel-self-cleanup.c" +++ +++ +++static int +++do_test (void) +++{ +++ int ret = 0, should_fail = 0; +++ +++ pthread_cleanup_push (cleanup, &should_fail); +++ if ((ret = pthread_cancel (pthread_self ())) != 0) +++ { +++ printf ("cancel failed: %s\n", strerror (ret)); +++ exit (1); +++ } +++ +++ /* The write syscall within this printf should give us our cancellation +++ point. */ +++ printf ("Could not cancel self.\n"); +++ pthread_cleanup_pop (0); +++ +++ return 1; +++} +++ +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-cancel-wrappers.sh ++@@ -0,0 +1,92 @@ +++#! /bin/sh +++# Test whether all cancelable functions are cancelable. +++# Copyright (C) 2002-2013 Free Software Foundation, Inc. +++# This file is part of the GNU C Library. +++# Contributed by Jakub Jelinek , 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, see +++# . +++ +++NM="$1"; shift +++while [ $# -gt 0 ]; do +++ ( $NM -P $1; echo 'end[end]:' ) | gawk ' BEGIN { +++C["accept"]=1 +++C["close"]=1 +++C["connect"]=1 +++C["creat"]=1 +++C["fcntl"]=1 +++C["fdatasync"]=1 +++C["fsync"]=1 +++C["msgrcv"]=1 +++C["msgsnd"]=1 +++C["msync"]=1 +++C["nanosleep"]=1 +++C["open"]=1 +++C["open64"]=1 +++C["pause"]=1 +++C["poll"]=1 +++C["pread"]=1 +++C["pread64"]=1 +++C["pselect"]=1 +++C["pwrite"]=1 +++C["pwrite64"]=1 +++C["read"]=1 +++C["readv"]=1 +++C["recv"]=1 +++C["recvfrom"]=1 +++C["recvmsg"]=1 +++C["select"]=1 +++C["send"]=1 +++C["sendmsg"]=1 +++C["sendto"]=1 +++C["sigpause"]=1 +++C["sigsuspend"]=1 +++C["sigwait"]=1 +++C["sigwaitinfo"]=1 +++C["tcdrain"]=1 +++C["wait"]=1 +++C["waitid"]=1 +++C["waitpid"]=1 +++C["write"]=1 +++C["writev"]=1 +++C["__xpg_sigpause"]=1 +++} +++/:$/ { +++ if (seen) +++ { +++ if (!seen_enable || !seen_disable) +++ { +++ printf "in '$1'(%s) %s'\''s cancellation missing\n", object, seen +++ ret = 1 +++ } +++ } +++ seen="" +++ seen_enable="" +++ seen_disable="" +++ object=gensub(/^.*\[(.*)\]:$/,"\\1","",$0) +++ next +++} +++{ +++ if (C[$1] && $2 ~ /^[TW]$/) +++ seen=$1 +++ else if ($1 ~ /^([.]|)__(libc|pthread)_enable_asynccancel$/ && $2 == "U") +++ seen_enable=1 +++ else if ($1 ~ /^([.]|)__(libc|pthread)_disable_asynccancel$/ && $2 == "U") +++ seen_disable=1 +++} +++END { +++ exit ret +++}' || exit +++ shift +++done ++--- /dev/null +++++ b/fbtl/tst-cancel1.c ++@@ -0,0 +1,162 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++ +++ +++static pthread_mutex_t m1 = PTHREAD_MUTEX_INITIALIZER; +++static pthread_mutex_t m2 = PTHREAD_MUTEX_INITIALIZER; +++ +++static int cntr; +++ +++ +++static void +++cleanup (void *arg) +++{ +++ if (arg != (void *) 42l) +++ cntr = 42; +++ else +++ cntr = 1; +++} +++ +++ +++static void * +++tf (void *arg) +++{ +++ /* Ignore all signals. This must not have any effect on delivering +++ the cancellation signal. */ +++ sigset_t ss; +++ +++ sigfillset (&ss); +++ +++ if (pthread_sigmask (SIG_BLOCK, &ss, NULL) != 0) +++ { +++ puts ("pthread_sigmask failed"); +++ exit (1); +++ } +++ +++ pthread_cleanup_push (cleanup, (void *) 42l); +++ +++ int err = pthread_setcanceltype (PTHREAD_CANCEL_ASYNCHRONOUS, NULL); +++ if (err != 0) +++ { +++ printf ("setcanceltype failed: %s\n", strerror (err)); +++ exit (1); +++ } +++ /* The following code is not standard compliant: the mutex functions +++ must not be called with asynchronous cancellation enabled. */ +++ +++ err = pthread_mutex_unlock (&m2); +++ if (err != 0) +++ { +++ printf ("child: mutex_unlock failed: %s\n", strerror (err)); +++ exit (1); +++ } +++ +++ err = pthread_mutex_lock (&m1); +++ if (err != 0) +++ { +++ printf ("child: 1st mutex_lock failed: %s\n", strerror (err)); +++ exit (1); +++ } +++ +++ /* We should never come here. */ +++ +++ pthread_cleanup_pop (0); +++ +++ return NULL; +++} +++ +++ +++static int +++do_test (void) +++{ +++ int err; +++ pthread_t th; +++ int result = 0; +++ void *retval; +++ +++ /* Get the mutexes. */ +++ err = pthread_mutex_lock (&m1); +++ if (err != 0) +++ { +++ printf ("parent: 1st mutex_lock failed: %s\n", strerror (err)); +++ return 1; +++ } +++ err = pthread_mutex_lock (&m2); +++ if (err != 0) +++ { +++ printf ("parent: 2nd mutex_lock failed: %s\n", strerror (err)); +++ return 1; +++ } +++ +++ err = pthread_create (&th, NULL, tf, NULL); +++ if (err != 0) +++ { +++ printf ("create failed: %s\n", strerror (err)); +++ return 1; +++ } +++ +++ err = pthread_mutex_lock (&m2); +++ if (err != 0) +++ { +++ printf ("parent: 3rd mutex_lock failed: %s\n", strerror (err)); +++ return 1; +++ } +++ +++ err = pthread_cancel (th); +++ if (err != 0) +++ { +++ printf ("cancel failed: %s\n", strerror (err)); +++ return 1; +++ } +++ +++ err = pthread_join (th, &retval); +++ if (err != 0) +++ { +++ printf ("join failed: %s\n", strerror (err)); +++ return 1; +++ } +++ +++ if (retval != PTHREAD_CANCELED) +++ { +++ printf ("wrong return value: %p\n", retval); +++ result = 1; +++ } +++ +++ if (cntr == 42) +++ { +++ puts ("cleanup handler called with wrong argument"); +++ result = 1; +++ } +++ else if (cntr != 1) +++ { +++ puts ("cleanup handling not called"); +++ result = 1; +++ } +++ +++ return result; +++} +++ +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-cancel10.c ++@@ -0,0 +1,125 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++ +++ +++static void +++cleanup (void *arg) +++{ +++ /* Just for fun. */ +++ if (pthread_cancel (pthread_self ()) != 0) +++ { +++ puts ("cleanup: cancel failed"); +++ exit (1); +++ } +++ +++ printf ("cleanup for %ld\n", (long int) arg); +++} +++ +++ +++static void * +++tf (void *arg) +++{ +++ long int n = (long int) arg; +++ +++ pthread_cleanup_push (cleanup, arg); +++ +++ if (pthread_setcanceltype ((n & 1) == 0 +++ ? PTHREAD_CANCEL_DEFERRED +++ : PTHREAD_CANCEL_ASYNCHRONOUS, NULL) != 0) +++ { +++ puts ("setcanceltype failed"); +++ exit (1); +++ } +++ +++ if (pthread_cancel (pthread_self ()) != 0) +++ { +++ puts ("cancel failed"); +++ exit (1); +++ } +++ +++ pthread_testcancel (); +++ +++ /* We should never come here. */ +++ +++ pthread_cleanup_pop (0); +++ +++ return NULL; +++} +++ +++ +++static int +++do_test (void) +++{ +++ pthread_attr_t at; +++ +++ if (pthread_attr_init (&at) != 0) +++ { +++ puts ("attr_init failed"); +++ return 1; +++ } +++ +++ if (pthread_attr_setstacksize (&at, 1 * 1024 * 1024) != 0) +++ { +++ puts ("attr_setstacksize failed"); +++ return 1; +++ } +++ +++#define N 20 +++ int i; +++ pthread_t th[N]; +++ +++ for (i = 0; i < N; ++i) +++ if (pthread_create (&th[i], &at, tf, (void *) (long int) i) != 0) +++ { +++ puts ("create failed"); +++ exit (1); +++ } +++ +++ if (pthread_attr_destroy (&at) != 0) +++ { +++ puts ("attr_destroy failed"); +++ return 1; +++ } +++ +++ for (i = 0; i < N; ++i) +++ { +++ void *r; +++ if (pthread_join (th[i], &r) != 0) +++ { +++ puts ("join failed"); +++ exit (1); +++ } +++ +++ if (r != PTHREAD_CANCELED) +++ { +++ puts ("thread not canceled"); +++ exit (1); +++ } +++ } +++ +++ return 0; +++} +++ +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-cancel11.c ++@@ -0,0 +1,122 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++static pthread_barrier_t bar; +++static int fd[2]; +++ +++ +++static void +++cleanup (void *arg) +++{ +++ static int ncall; +++ +++ if (++ncall != 1) +++ { +++ puts ("second call to cleanup"); +++ exit (1); +++ } +++ +++ printf ("cleanup call #%d\n", ncall); +++} +++ +++ +++static void * +++tf (void *arg) +++{ +++ pthread_cleanup_push (cleanup, NULL); +++ +++ int e = pthread_barrier_wait (&bar); +++ if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("tf: 1st barrier_wait failed"); +++ exit (1); +++ } +++ +++ /* This call should block and be cancelable. */ +++ char buf[20]; +++ read (fd[0], buf, sizeof (buf)); +++ +++ pthread_cleanup_pop (0); +++ +++ return NULL; +++} +++ +++ +++static int +++do_test (void) +++{ +++ pthread_t th; +++ +++ if (pthread_barrier_init (&bar, NULL, 2) != 0) +++ { +++ puts ("barrier_init failed"); +++ exit (1); +++ } +++ +++ if (pipe (fd) != 0) +++ { +++ puts ("pipe failed"); +++ exit (1); +++ } +++ +++ if (pthread_create (&th, NULL, tf, NULL) != 0) +++ { +++ puts ("create failed"); +++ exit (1); +++ } +++ +++ int e = pthread_barrier_wait (&bar); +++ if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("1st barrier_wait failed"); +++ exit (1); +++ } +++ +++ if (pthread_cancel (th) != 0) +++ { +++ puts ("1st cancel failed"); +++ exit (1); +++ } +++ +++ void *r; +++ if (pthread_join (th, &r) != 0) +++ { +++ puts ("join failed"); +++ exit (1); +++ } +++ +++ if (r != PTHREAD_CANCELED) +++ { +++ puts ("thread not canceled"); +++ exit (1); +++ } +++ +++ return 0; +++} +++ +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-cancel12.c ++@@ -0,0 +1,126 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++static pthread_barrier_t bar; +++static sem_t sem; +++ +++ +++static void +++cleanup (void *arg) +++{ +++ static int ncall; +++ +++ if (++ncall != 1) +++ { +++ puts ("second call to cleanup"); +++ exit (1); +++ } +++ +++ printf ("cleanup call #%d\n", ncall); +++} +++ +++ +++static void * +++tf (void *arg) +++{ +++ pthread_cleanup_push (cleanup, NULL); +++ +++ int e = pthread_barrier_wait (&bar); +++ if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("tf: 1st barrier_wait failed"); +++ exit (1); +++ } +++ +++ /* This call should block and be cancelable. */ +++ sem_wait (&sem); +++ +++ pthread_cleanup_pop (0); +++ +++ puts ("sem_wait returned"); +++ +++ return NULL; +++} +++ +++ +++static int +++do_test (void) +++{ +++ pthread_t th; +++ +++ if (pthread_barrier_init (&bar, NULL, 2) != 0) +++ { +++ puts ("barrier_init failed"); +++ exit (1); +++ } +++ +++ if (sem_init (&sem, 0, 1) != 0) +++ { +++ puts ("sem_init failed"); +++ exit (1); +++ } +++ +++ if (pthread_create (&th, NULL, tf, NULL) != 0) +++ { +++ puts ("create failed"); +++ exit (1); +++ } +++ +++ /* Check whether cancellation is honored even before sem_wait does +++ anything. */ +++ if (pthread_cancel (th) != 0) +++ { +++ puts ("1st cancel failed"); +++ exit (1); +++ } +++ +++ int e = pthread_barrier_wait (&bar); +++ if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("1st barrier_wait failed"); +++ exit (1); +++ } +++ +++ void *r; +++ if (pthread_join (th, &r) != 0) +++ { +++ puts ("join failed"); +++ exit (1); +++ } +++ +++ if (r != PTHREAD_CANCELED) +++ { +++ puts ("thread not canceled"); +++ exit (1); +++ } +++ +++ return 0; +++} +++ +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-cancel13.c ++@@ -0,0 +1,128 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++static pthread_barrier_t bar; +++static sem_t sem; +++ +++ +++static void +++cleanup (void *arg) +++{ +++ static int ncall; +++ +++ if (++ncall != 1) +++ { +++ puts ("second call to cleanup"); +++ exit (1); +++ } +++ +++ printf ("cleanup call #%d\n", ncall); +++} +++ +++ +++static void * +++tf (void *arg) +++{ +++ pthread_cleanup_push (cleanup, NULL); +++ +++ int e = pthread_barrier_wait (&bar); +++ if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("tf: 1st barrier_wait failed"); +++ exit (1); +++ } +++ +++ /* This call should block and be cancelable. */ +++ sem_wait (&sem); +++ +++ pthread_cleanup_pop (0); +++ +++ puts ("sem_wait returned"); +++ +++ return NULL; +++} +++ +++ +++static int +++do_test (void) +++{ +++ pthread_t th; +++ +++ if (pthread_barrier_init (&bar, NULL, 2) != 0) +++ { +++ puts ("barrier_init failed"); +++ exit (1); +++ } +++ +++ if (sem_init (&sem, 0, 0) != 0) +++ { +++ puts ("sem_init failed"); +++ exit (1); +++ } +++ +++ if (pthread_create (&th, NULL, tf, NULL) != 0) +++ { +++ puts ("create failed"); +++ exit (1); +++ } +++ +++ int e = pthread_barrier_wait (&bar); +++ if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("1st barrier_wait failed"); +++ exit (1); +++ } +++ +++ /* Give the child a chance to go to sleep in sem_wait. */ +++ sleep (1); +++ +++ /* Check whether cancellation is honored when waiting in sem_wait. */ +++ if (pthread_cancel (th) != 0) +++ { +++ puts ("1st cancel failed"); +++ exit (1); +++ } +++ +++ void *r; +++ if (pthread_join (th, &r) != 0) +++ { +++ puts ("join failed"); +++ exit (1); +++ } +++ +++ if (r != PTHREAD_CANCELED) +++ { +++ puts ("thread not canceled"); +++ exit (1); +++ } +++ +++ return 0; +++} +++ +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-cancel14.c ++@@ -0,0 +1,136 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++static pthread_barrier_t bar; +++static sem_t sem; +++ +++ +++static void +++cleanup (void *arg) +++{ +++ static int ncall; +++ +++ if (++ncall != 1) +++ { +++ puts ("second call to cleanup"); +++ exit (1); +++ } +++ +++ printf ("cleanup call #%d\n", ncall); +++} +++ +++ +++static void * +++tf (void *arg) +++{ +++ pthread_cleanup_push (cleanup, NULL); +++ +++ int e = pthread_barrier_wait (&bar); +++ if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("tf: 1st barrier_wait failed"); +++ exit (1); +++ } +++ +++ struct timeval tv; +++ (void) gettimeofday (&tv, NULL); +++ +++ struct timespec ts; +++ TIMEVAL_TO_TIMESPEC (&tv, &ts); +++ +++ /* Timeout in 5 seconds. */ +++ ts.tv_sec += 5; +++ +++ /* This call should block and be cancelable. */ +++ sem_timedwait (&sem, &ts); +++ +++ pthread_cleanup_pop (0); +++ +++ puts ("sem_timedwait returned"); +++ +++ return NULL; +++} +++ +++ +++static int +++do_test (void) +++{ +++ pthread_t th; +++ +++ if (pthread_barrier_init (&bar, NULL, 2) != 0) +++ { +++ puts ("barrier_init failed"); +++ exit (1); +++ } +++ +++ if (sem_init (&sem, 0, 1) != 0) +++ { +++ puts ("sem_init failed"); +++ exit (1); +++ } +++ +++ if (pthread_create (&th, NULL, tf, NULL) != 0) +++ { +++ puts ("create failed"); +++ exit (1); +++ } +++ +++ /* Check whether cancellation is honored even before sem_timedwait does +++ anything. */ +++ if (pthread_cancel (th) != 0) +++ { +++ puts ("1st cancel failed"); +++ exit (1); +++ } +++ +++ int e = pthread_barrier_wait (&bar); +++ if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("1st barrier_wait failed"); +++ exit (1); +++ } +++ +++ void *r; +++ if (pthread_join (th, &r) != 0) +++ { +++ puts ("join failed"); +++ exit (1); +++ } +++ +++ if (r != PTHREAD_CANCELED) +++ { +++ puts ("thread not canceled"); +++ exit (1); +++ } +++ +++ return 0; +++} +++ +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-cancel15.c ++@@ -0,0 +1,141 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++static pthread_barrier_t bar; +++static sem_t sem; +++ +++ +++static void +++cleanup (void *arg) +++{ +++ static int ncall; +++ +++ if (++ncall != 1) +++ { +++ puts ("second call to cleanup"); +++ exit (1); +++ } +++ +++ printf ("cleanup call #%d\n", ncall); +++} +++ +++ +++static void * +++tf (void *arg) +++{ +++ int e; +++ +++ pthread_cleanup_push (cleanup, NULL); +++ +++ e = pthread_barrier_wait (&bar); +++ if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("tf: 1st barrier_wait failed"); +++ exit (1); +++ } +++ +++ struct timeval tv; +++ (void) gettimeofday (&tv, NULL); +++ +++ struct timespec ts; +++ TIMEVAL_TO_TIMESPEC (&tv, &ts); +++ +++ /* Timeout in 5 seconds. */ +++ ts.tv_sec += 5; +++ +++ /* This call should block and be cancelable. */ +++ errno = 0; +++ e = sem_timedwait (&sem, &ts); +++ +++ pthread_cleanup_pop (0); +++ +++ printf ("sem_timedwait returned, e = %d, errno = %d\n", e, errno); +++ +++ return NULL; +++} +++ +++ +++static int +++do_test (void) +++{ +++ pthread_t th; +++ +++ if (pthread_barrier_init (&bar, NULL, 2) != 0) +++ { +++ puts ("barrier_init failed"); +++ exit (1); +++ } +++ +++ if (sem_init (&sem, 0, 0) != 0) +++ { +++ puts ("sem_init failed"); +++ exit (1); +++ } +++ +++ if (pthread_create (&th, NULL, tf, NULL) != 0) +++ { +++ puts ("create failed"); +++ exit (1); +++ } +++ +++ int e = pthread_barrier_wait (&bar); +++ if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("1st barrier_wait failed"); +++ exit (1); +++ } +++ +++ /* Give the child a chance to go to sleep in sem_wait. */ +++ sleep (1); +++ +++ /* Check whether cancellation is honored when waiting in sem_timedwait. */ +++ if (pthread_cancel (th) != 0) +++ { +++ puts ("1st cancel failed"); +++ exit (1); +++ } +++ +++ void *r; +++ if (pthread_join (th, &r) != 0) +++ { +++ puts ("join failed"); +++ exit (1); +++ } +++ +++ if (r != PTHREAD_CANCELED) +++ { +++ puts ("thread not canceled"); +++ exit (1); +++ } +++ +++ return 0; +++} +++ +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-cancel16.c ++@@ -0,0 +1,230 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++static pthread_barrier_t b2; +++static int fd; +++static int called; +++ +++ +++static void +++cl (void *arg) +++{ +++ called = 1; +++} +++ +++ +++static void * +++tf (void *arg) +++{ +++ int r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("child thread: barrier_wait failed"); +++ exit (1); +++ } +++ +++ pthread_cleanup_push (cl, NULL); +++ +++ /* This call should never return. */ +++ (void) lockf (fd, F_LOCK, 0); +++ +++ pthread_cleanup_pop (0); +++ +++ return NULL; +++} +++ +++ +++static int +++do_test (void) +++{ +++ char fname[] = "/tmp/cancel16XXXXXX"; +++ fd = mkstemp (fname); +++ if (fd == -1) +++ { +++ puts ("mkstemp failed"); +++ return 1; +++ } +++ unlink (fname); +++ +++ char mem[sizeof (pthread_barrier_t)]; +++ memset (mem, '\0', sizeof (mem)); +++ if (TEMP_FAILURE_RETRY (pwrite (fd, mem, sizeof (mem), 0)) != sizeof (mem)) +++ { +++ puts ("pwrite failed"); +++ return 1; +++ } +++ +++ void *p = mmap (NULL, sizeof (mem), PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); +++ if (p == MAP_FAILED) +++ { +++ puts ("mmap failed"); +++ return 1; +++ } +++ pthread_barrier_t *b = (pthread_barrier_t *) p; +++ +++ pthread_barrierattr_t ba; +++ if (pthread_barrierattr_init (&ba) != 0) +++ { +++ puts ("barrierattr_init failed"); +++ return 1; +++ } +++ if (pthread_barrierattr_setpshared (&ba, 1) != 0) +++ { +++ puts ("barrierattr_setshared failed"); +++ return 1; +++ } +++ +++ if (pthread_barrier_init (b, &ba, 2) != 0) +++ { +++ puts ("1st barrier_init failed"); +++ return 1; +++ } +++ if (pthread_barrierattr_destroy (&ba) != 0) +++ { +++ puts ("barrier_destroy failed"); +++ return 1; +++ } +++ +++ pid_t pid = fork (); +++ if (pid == 0) +++ { +++ /* Child. Lock the file and wait. */ +++ if (lockf (fd, F_LOCK, 0) != 0) +++ { +++ puts ("child process: lockf failed"); +++ _exit (1); +++ } +++ +++ int r = pthread_barrier_wait (b); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("child process: 1st barrier_wait failed"); +++ _exit (1); +++ } +++ +++ /* Make sure the process dies. */ +++ alarm (5); +++ +++ r = pthread_barrier_wait (b); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("child process: 2nd barrier_wait failed"); +++ _exit (1); +++ } +++ +++ _exit (0); +++ } +++ if (pid == -1) +++ { +++ puts ("fork failed"); +++ return 1; +++ } +++ +++ int r = pthread_barrier_wait (b); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("main: 1st barrier_wait failed"); +++ _exit (1); +++ } +++ +++ if (pthread_barrier_init (&b2, NULL, 2) != 0) +++ { +++ puts ("2nd barrier_init failed"); +++ return 1; +++ } +++ +++ pthread_t th; +++ if (pthread_create (&th, NULL, tf, NULL) != 0) +++ { +++ puts ("create failed"); +++ return 1; +++ } +++ +++ r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("main: 2nd barrier_wait failed"); +++ return 1; +++ } +++ +++ /* Delay. */ +++ sleep (1); +++ +++ if (pthread_cancel (th) != 0) +++ { +++ puts ("cancel failed"); +++ return 1; +++ } +++ +++ void *result; +++ if (pthread_join (th, &result) != 0) +++ { +++ puts ("join failed"); +++ return 1; +++ } +++ if (result != PTHREAD_CANCELED) +++ { +++ puts ("thread not canceled"); +++ return 1; +++ } +++ if (called == 0) +++ { +++ puts ("cleanup handler not called"); +++ return 1; +++ } +++ +++ r = pthread_barrier_wait (b); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("main: 3rd barrier_wait failed"); +++ return 1; +++ } +++ +++ int status; +++ if (TEMP_FAILURE_RETRY (waitpid (pid, &status, 0)) != pid) +++ { +++ puts ("waitpid failed"); +++ return 1; +++ } +++ if (WEXITSTATUS (status) != 0) +++ { +++ printf ("child process exits with %d\n", WEXITSTATUS (status)); +++ return 1; +++ } +++ +++ if (lockf (fd, F_LOCK, 0) != 0) +++ { +++ puts ("main: lockf failed"); +++ return 1; +++ } +++ +++ return 0; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-cancel17.c ++@@ -0,0 +1,340 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++static pthread_barrier_t b; +++ +++ +++/* Cleanup handling test. */ +++static int cl_called; +++ +++static void +++cl (void *arg) +++{ +++ ++cl_called; +++} +++ +++ +++static void * +++tf (void *arg) +++{ +++ int r = pthread_barrier_wait (&b); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("tf: barrier_wait failed"); +++ exit (1); +++ } +++ +++ pthread_cleanup_push (cl, NULL); +++ +++ const struct aiocb *l[1] = { arg }; +++ +++ TEMP_FAILURE_RETRY (aio_suspend (l, 1, NULL)); +++ +++ pthread_cleanup_pop (0); +++ +++ puts ("tf: aio_suspend returned"); +++ +++ exit (1); +++} +++ +++ +++static void * +++tf2 (void *arg) +++{ +++ int r = pthread_barrier_wait (&b); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("tf2: barrier_wait failed"); +++ exit (1); +++ } +++ +++ pthread_cleanup_push (cl, NULL); +++ +++ const struct aiocb *l[1] = { arg }; +++ struct timespec ts = { .tv_sec = 1000, .tv_nsec = 0 }; +++ +++ TEMP_FAILURE_RETRY (aio_suspend (l, 1, &ts)); +++ +++ pthread_cleanup_pop (0); +++ +++ puts ("tf2: aio_suspend returned"); +++ +++ exit (1); +++} +++ +++ +++static int +++do_test (void) +++{ +++ int fds[2]; +++ if (pipe (fds) != 0) +++ { +++ puts ("pipe failed"); +++ return 1; +++ } +++ +++ struct aiocb a, a2, *ap; +++ char mem[1]; +++ memset (&a, '\0', sizeof (a)); +++ a.aio_fildes = fds[0]; +++ a.aio_buf = mem; +++ a.aio_nbytes = sizeof (mem); +++ if (aio_read (&a) != 0) +++ { +++ puts ("aio_read failed"); +++ return 1; +++ } +++ +++ if (pthread_barrier_init (&b, NULL, 2) != 0) +++ { +++ puts ("barrier_init failed"); +++ return 1; +++ } +++ +++ pthread_t th; +++ if (pthread_create (&th, NULL, tf, &a) != 0) +++ { +++ puts ("1st create failed"); +++ return 1; +++ } +++ +++ int r = pthread_barrier_wait (&b); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("barrier_wait failed"); +++ exit (1); +++ } +++ +++ struct timespec ts = { .tv_sec = 0, .tv_nsec = 100000000 }; +++ while (nanosleep (&ts, &ts) != 0) +++ continue; +++ +++ puts ("going to cancel tf in-time"); +++ if (pthread_cancel (th) != 0) +++ { +++ puts ("1st cancel failed"); +++ return 1; +++ } +++ +++ void *status; +++ if (pthread_join (th, &status) != 0) +++ { +++ puts ("1st join failed"); +++ return 1; +++ } +++ if (status != PTHREAD_CANCELED) +++ { +++ puts ("1st thread not canceled"); +++ return 1; +++ } +++ +++ if (cl_called == 0) +++ { +++ puts ("tf cleanup handler not called"); +++ return 1; +++ } +++ if (cl_called > 1) +++ { +++ puts ("tf cleanup handler called more than once"); +++ return 1; +++ } +++ +++ cl_called = 0; +++ +++ if (pthread_create (&th, NULL, tf2, &a) != 0) +++ { +++ puts ("2nd create failed"); +++ return 1; +++ } +++ +++ r = pthread_barrier_wait (&b); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("2nd barrier_wait failed"); +++ exit (1); +++ } +++ +++ ts.tv_sec = 0; +++ ts.tv_nsec = 100000000; +++ while (nanosleep (&ts, &ts) != 0) +++ continue; +++ +++ puts ("going to cancel tf2 in-time"); +++ if (pthread_cancel (th) != 0) +++ { +++ puts ("2nd cancel failed"); +++ return 1; +++ } +++ +++ if (pthread_join (th, &status) != 0) +++ { +++ puts ("2nd join failed"); +++ return 1; +++ } +++ if (status != PTHREAD_CANCELED) +++ { +++ puts ("2nd thread not canceled"); +++ return 1; +++ } +++ +++ if (cl_called == 0) +++ { +++ puts ("tf2 cleanup handler not called"); +++ return 1; +++ } +++ if (cl_called > 1) +++ { +++ puts ("tf2 cleanup handler called more than once"); +++ return 1; +++ } +++ +++ puts ("in-time cancellation succeeded"); +++ +++ ap = &a; +++ if (aio_cancel (fds[0], &a) != AIO_CANCELED) +++ { +++ puts ("aio_cancel failed"); +++ /* If aio_cancel failed, we cannot reuse aiocb a. */ +++ ap = &a2; +++ } +++ +++ +++ cl_called = 0; +++ +++ size_t len2 = fpathconf (fds[1], _PC_PIPE_BUF); +++ size_t page_size = sysconf (_SC_PAGESIZE); +++ len2 = 20 * (len2 < page_size ? page_size : len2) + sizeof (mem) + 1; +++ char *mem2 = malloc (len2); +++ if (mem2 == NULL) +++ { +++ puts ("could not allocate memory for pipe write"); +++ return 1; +++ } +++ +++ memset (ap, '\0', sizeof (*ap)); +++ ap->aio_fildes = fds[1]; +++ ap->aio_buf = mem2; +++ ap->aio_nbytes = len2; +++ if (aio_write (ap) != 0) +++ { +++ puts ("aio_write failed"); +++ return 1; +++ } +++ +++ if (pthread_create (&th, NULL, tf, ap) != 0) +++ { +++ puts ("3rd create failed"); +++ return 1; +++ } +++ +++ puts ("going to cancel tf early"); +++ if (pthread_cancel (th) != 0) +++ { +++ puts ("3rd cancel failed"); +++ return 1; +++ } +++ +++ r = pthread_barrier_wait (&b); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("3rd barrier_wait failed"); +++ exit (1); +++ } +++ +++ if (pthread_join (th, &status) != 0) +++ { +++ puts ("3rd join failed"); +++ return 1; +++ } +++ if (status != PTHREAD_CANCELED) +++ { +++ puts ("3rd thread not canceled"); +++ return 1; +++ } +++ +++ if (cl_called == 0) +++ { +++ puts ("tf cleanup handler not called"); +++ return 1; +++ } +++ if (cl_called > 1) +++ { +++ puts ("tf cleanup handler called more than once"); +++ return 1; +++ } +++ +++ cl_called = 0; +++ +++ if (pthread_create (&th, NULL, tf2, ap) != 0) +++ { +++ puts ("4th create failed"); +++ return 1; +++ } +++ +++ puts ("going to cancel tf2 early"); +++ if (pthread_cancel (th) != 0) +++ { +++ puts ("4th cancel failed"); +++ return 1; +++ } +++ +++ r = pthread_barrier_wait (&b); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("4th barrier_wait failed"); +++ exit (1); +++ } +++ +++ if (pthread_join (th, &status) != 0) +++ { +++ puts ("4th join failed"); +++ return 1; +++ } +++ if (status != PTHREAD_CANCELED) +++ { +++ puts ("4th thread not canceled"); +++ return 1; +++ } +++ +++ if (cl_called == 0) +++ { +++ puts ("tf2 cleanup handler not called"); +++ return 1; +++ } +++ if (cl_called > 1) +++ { +++ puts ("tf2 cleanup handler called more than once"); +++ return 1; +++ } +++ +++ puts ("early cancellation succeeded"); +++ +++ return 0; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-cancel18.c ++@@ -0,0 +1,173 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++static pthread_barrier_t b; +++ +++ +++/* Cleanup handling test. */ +++static int cl_called; +++ +++static void +++cl (void *arg) +++{ +++ ++cl_called; +++} +++ +++ +++static void * +++tf (void *arg) +++{ +++ int r = pthread_barrier_wait (&b); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("barrier_wait failed"); +++ exit (1); +++ } +++ +++ pthread_cleanup_push (cl, NULL); +++ +++ struct timespec ts = { .tv_sec = arg == NULL ? 10000000 : 0, .tv_nsec = 0 }; +++ TEMP_FAILURE_RETRY (clock_nanosleep (CLOCK_REALTIME, 0, &ts, &ts)); +++ +++ pthread_cleanup_pop (0); +++ +++ puts ("clock_nanosleep returned"); +++ +++ exit (1); +++} +++ +++ +++static int +++do_test (void) +++{ +++ if (pthread_barrier_init (&b, NULL, 2) != 0) +++ { +++ puts ("barrier_init failed"); +++ return 1; +++ } +++ +++ pthread_t th; +++ if (pthread_create (&th, NULL, tf, NULL) != 0) +++ { +++ puts ("1st create failed"); +++ return 1; +++ } +++ +++ int r = pthread_barrier_wait (&b); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("barrier_wait failed"); +++ exit (1); +++ } +++ +++ struct timespec ts = { .tv_sec = 0, .tv_nsec = 100000000 }; +++ while (nanosleep (&ts, &ts) != 0) +++ continue; +++ +++ puts ("going to cancel in-time"); +++ if (pthread_cancel (th) != 0) +++ { +++ puts ("1st cancel failed"); +++ return 1; +++ } +++ +++ void *status; +++ if (pthread_join (th, &status) != 0) +++ { +++ puts ("1st join failed"); +++ return 1; +++ } +++ if (status != PTHREAD_CANCELED) +++ { +++ puts ("1st thread not canceled"); +++ return 1; +++ } +++ +++ if (cl_called == 0) +++ { +++ puts ("cleanup handler not called"); +++ return 1; +++ } +++ if (cl_called > 1) +++ { +++ puts ("cleanup handler called more than once"); +++ return 1; +++ } +++ +++ puts ("in-time cancellation succeeded"); +++ +++ +++ cl_called = 0; +++ +++ if (pthread_create (&th, NULL, tf, NULL) != 0) +++ { +++ puts ("2nd create failed"); +++ return 1; +++ } +++ +++ puts ("going to cancel early"); +++ if (pthread_cancel (th) != 0) +++ { +++ puts ("2nd cancel failed"); +++ return 1; +++ } +++ +++ r = pthread_barrier_wait (&b); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("barrier_wait failed"); +++ exit (1); +++ } +++ +++ if (pthread_join (th, &status) != 0) +++ { +++ puts ("2nd join failed"); +++ return 1; +++ } +++ if (status != PTHREAD_CANCELED) +++ { +++ puts ("2nd thread not canceled"); +++ return 1; +++ } +++ +++ if (cl_called == 0) +++ { +++ printf ("cleanup handler not called\n"); +++ return 1; +++ } +++ if (cl_called > 1) +++ { +++ printf ("cleanup handler called more than once\n"); +++ return 1; +++ } +++ +++ puts ("early cancellation succeeded"); +++ +++ return 0; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-cancel19.c ++@@ -0,0 +1,286 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Jakub Jelinek , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++static void * +++tf (void *arg) +++{ +++ return NULL; +++} +++ +++static void +++handler (int sig) +++{ +++} +++ +++static void __attribute__ ((noinline)) +++clobber_lots_of_regs (void) +++{ +++#define X1(n) long r##n = 10##n; __asm __volatile ("" : "+r" (r##n)); +++#define X2(n) X1(n##0) X1(n##1) X1(n##2) X1(n##3) X1(n##4) +++#define X3(n) X2(n##0) X2(n##1) X2(n##2) X2(n##3) X2(n##4) +++ X3(0) X3(1) X3(2) X3(3) X3(4) +++#undef X1 +++#define X1(n) __asm __volatile ("" : : "r" (r##n)); +++ X3(0) X3(1) X3(2) X3(3) X3(4) +++#undef X1 +++#undef X2 +++#undef X3 +++} +++ +++static int +++do_test (void) +++{ +++ pthread_t th; +++ int old, rc; +++ int ret = 0; +++ int fd[2]; +++ +++ rc = pipe (fd); +++ if (rc < 0) +++ error (EXIT_FAILURE, errno, "couldn't create pipe"); +++ +++ rc = pthread_create (&th, NULL, tf, NULL); +++ if (rc) +++ error (EXIT_FAILURE, rc, "couldn't create thread"); +++ +++ rc = pthread_setcanceltype (PTHREAD_CANCEL_DEFERRED, &old); +++ if (rc) +++ { +++ error (0, rc, "1st pthread_setcanceltype failed"); +++ ret = 1; +++ } +++ if (old != PTHREAD_CANCEL_DEFERRED && old != PTHREAD_CANCEL_ASYNCHRONOUS) +++ { +++ error (0, 0, "1st pthread_setcanceltype returned invalid value %d", +++ old); +++ ret = 1; +++ } +++ +++ clobber_lots_of_regs (); +++ close (fd[0]); +++ +++ rc = pthread_setcanceltype (PTHREAD_CANCEL_ASYNCHRONOUS, &old); +++ if (rc) +++ { +++ error (0, rc, "pthread_setcanceltype after close failed"); +++ ret = 1; +++ } +++ if (old != PTHREAD_CANCEL_DEFERRED) +++ { +++ error (0, 0, "pthread_setcanceltype after close returned invalid value %d", +++ old); +++ ret = 1; +++ } +++ +++ clobber_lots_of_regs (); +++ close (fd[1]); +++ +++ rc = pthread_setcanceltype (PTHREAD_CANCEL_DEFERRED, &old); +++ if (rc) +++ { +++ error (0, rc, "pthread_setcanceltype after 2nd close failed"); +++ ret = 1; +++ } +++ if (old != PTHREAD_CANCEL_ASYNCHRONOUS) +++ { +++ error (0, 0, "pthread_setcanceltype after 2nd close returned invalid value %d", +++ old); +++ ret = 1; +++ } +++ +++ struct sigaction sa = { .sa_handler = handler, .sa_flags = 0 }; +++ sigemptyset (&sa.sa_mask); +++ sigaction (SIGALRM, &sa, NULL); +++ +++ struct itimerval it; +++ it.it_value.tv_sec = 1; +++ it.it_value.tv_usec = 0; +++ it.it_interval = it.it_value; +++ setitimer (ITIMER_REAL, &it, NULL); +++ +++ clobber_lots_of_regs (); +++ pause (); +++ +++ memset (&it, 0, sizeof (it)); +++ setitimer (ITIMER_REAL, &it, NULL); +++ +++ rc = pthread_setcanceltype (PTHREAD_CANCEL_ASYNCHRONOUS, &old); +++ if (rc) +++ { +++ error (0, rc, "pthread_setcanceltype after pause failed"); +++ ret = 1; +++ } +++ if (old != PTHREAD_CANCEL_DEFERRED) +++ { +++ error (0, 0, "pthread_setcanceltype after pause returned invalid value %d", +++ old); +++ ret = 1; +++ } +++ +++ it.it_value.tv_sec = 1; +++ it.it_value.tv_usec = 0; +++ it.it_interval = it.it_value; +++ setitimer (ITIMER_REAL, &it, NULL); +++ +++ clobber_lots_of_regs (); +++ pause (); +++ +++ memset (&it, 0, sizeof (it)); +++ setitimer (ITIMER_REAL, &it, NULL); +++ +++ rc = pthread_setcanceltype (PTHREAD_CANCEL_DEFERRED, &old); +++ if (rc) +++ { +++ error (0, rc, "pthread_setcanceltype after 2nd pause failed"); +++ ret = 1; +++ } +++ if (old != PTHREAD_CANCEL_ASYNCHRONOUS) +++ { +++ error (0, 0, "pthread_setcanceltype after 2nd pause returned invalid value %d", +++ old); +++ ret = 1; +++ } +++ +++ char fname[] = "/tmp/tst-cancel19-dir-XXXXXX\0foo/bar"; +++ char *enddir = strchr (fname, '\0'); +++ if (mkdtemp (fname) == NULL) +++ { +++ error (0, errno, "mkdtemp failed"); +++ ret = 1; +++ } +++ *enddir = '/'; +++ +++ clobber_lots_of_regs (); +++ creat (fname, 0400); +++ +++ rc = pthread_setcanceltype (PTHREAD_CANCEL_ASYNCHRONOUS, &old); +++ if (rc) +++ { +++ error (0, rc, "pthread_setcanceltype after creat failed"); +++ ret = 1; +++ } +++ if (old != PTHREAD_CANCEL_DEFERRED) +++ { +++ error (0, 0, "pthread_setcanceltype after creat returned invalid value %d", +++ old); +++ ret = 1; +++ } +++ +++ clobber_lots_of_regs (); +++ creat (fname, 0400); +++ +++ rc = pthread_setcanceltype (PTHREAD_CANCEL_DEFERRED, &old); +++ if (rc) +++ { +++ error (0, rc, "pthread_setcanceltype after 2nd creat failed"); +++ ret = 1; +++ } +++ if (old != PTHREAD_CANCEL_ASYNCHRONOUS) +++ { +++ error (0, 0, "pthread_setcanceltype after 2nd creat returned invalid value %d", +++ old); +++ ret = 1; +++ } +++ +++ clobber_lots_of_regs (); +++ open (fname, O_CREAT, 0400); +++ +++ rc = pthread_setcanceltype (PTHREAD_CANCEL_ASYNCHRONOUS, &old); +++ if (rc) +++ { +++ error (0, rc, "pthread_setcanceltype after open failed"); +++ ret = 1; +++ } +++ if (old != PTHREAD_CANCEL_DEFERRED) +++ { +++ error (0, 0, "pthread_setcanceltype after open returned invalid value %d", +++ old); +++ ret = 1; +++ } +++ +++ clobber_lots_of_regs (); +++ open (fname, O_CREAT, 0400); +++ +++ rc = pthread_setcanceltype (PTHREAD_CANCEL_DEFERRED, &old); +++ if (rc) +++ { +++ error (0, rc, "pthread_setcanceltype after 2nd open failed"); +++ ret = 1; +++ } +++ if (old != PTHREAD_CANCEL_ASYNCHRONOUS) +++ { +++ error (0, 0, "pthread_setcanceltype after 2nd open returned invalid value %d", +++ old); +++ ret = 1; +++ } +++ +++ *enddir = '\0'; +++ rmdir (fname); +++ +++ clobber_lots_of_regs (); +++ select (-1, NULL, NULL, NULL, NULL); +++ +++ rc = pthread_setcanceltype (PTHREAD_CANCEL_ASYNCHRONOUS, &old); +++ if (rc) +++ { +++ error (0, rc, "pthread_setcanceltype after select failed"); +++ ret = 1; +++ } +++ if (old != PTHREAD_CANCEL_DEFERRED) +++ { +++ error (0, 0, "pthread_setcanceltype after select returned invalid value %d", +++ old); +++ ret = 1; +++ } +++ +++ clobber_lots_of_regs (); +++ select (-1, NULL, NULL, NULL, NULL); +++ +++ rc = pthread_setcanceltype (PTHREAD_CANCEL_DEFERRED, &old); +++ if (rc) +++ { +++ error (0, rc, "pthread_setcanceltype after 2nd select failed"); +++ ret = 1; +++ } +++ if (old != PTHREAD_CANCEL_ASYNCHRONOUS) +++ { +++ error (0, 0, "pthread_setcanceltype after 2nd select returned invalid value %d", +++ old); +++ ret = 1; +++ } +++ +++ pthread_join (th, NULL); +++ +++ return ret; +++} +++ +++#define TIMEOUT 20 +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-cancel2.c ++@@ -0,0 +1,95 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++ +++ +++static int fd[2]; +++ +++ +++static void * +++tf (void *arg) +++{ +++ /* The buffer size must be larger than the pipe size so that the +++ write blocks. */ +++ char buf[100000]; +++ +++ while (write (fd[1], buf, sizeof (buf)) > 0); +++ +++ return (void *) 42l; +++} +++ +++ +++static int +++do_test (void) +++{ +++ pthread_t th; +++ void *r; +++ struct sigaction sa; +++ +++ sa.sa_handler = SIG_IGN; +++ sigemptyset (&sa.sa_mask); +++ sa.sa_flags = 0; +++ +++ if (sigaction (SIGPIPE, &sa, NULL) != 0) +++ { +++ puts ("sigaction failed"); +++ return 1; +++ } +++ +++ if (pipe (fd) != 0) +++ { +++ puts ("pipe failed"); +++ return 1; +++ } +++ +++ if (pthread_create (&th, NULL, tf, NULL) != 0) +++ { +++ puts ("create failed"); +++ return 1; +++ } +++ +++ if (pthread_cancel (th) != 0) +++ { +++ puts ("cancel failed"); +++ return 1; +++ } +++ +++ /* This will cause the write in the child to return. */ +++ close (fd[0]); +++ +++ if (pthread_join (th, &r) != 0) +++ { +++ puts ("join failed"); +++ return 1; +++ } +++ +++ if (r != PTHREAD_CANCELED) +++ { +++ printf ("result is wrong: expected %p, got %p\n", PTHREAD_CANCELED, r); +++ return 1; +++ } +++ +++ return 0; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-cancel20.c ++@@ -0,0 +1,263 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Jakub Jelinek , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++static int fd[4]; +++static pthread_barrier_t b; +++volatile int in_sh_body; +++unsigned long cleanups; +++ +++static void +++cl (void *arg) +++{ +++ cleanups = (cleanups << 4) | (long) arg; +++} +++ +++ +++static void __attribute__((noinline)) +++sh_body (void) +++{ +++ char c; +++ +++ pthread_cleanup_push (cl, (void *) 1L); +++ +++ in_sh_body = 1; +++ if (read (fd[2], &c, 1) == 1) +++ { +++ puts ("read succeeded"); +++ exit (1); +++ } +++ +++ pthread_cleanup_pop (0); +++} +++ +++ +++static void +++sh (int sig) +++{ +++ pthread_cleanup_push (cl, (void *) 2L); +++ sh_body (); +++ in_sh_body = 0; +++ +++ pthread_cleanup_pop (0); +++} +++ +++ +++static void __attribute__((noinline)) +++tf_body (void) +++{ +++ char c; +++ +++ pthread_cleanup_push (cl, (void *) 3L); +++ +++ int r = pthread_barrier_wait (&b); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("child thread: barrier_wait failed"); +++ exit (1); +++ } +++ +++ if (read (fd[0], &c, 1) == 1) +++ { +++ puts ("read succeeded"); +++ exit (1); +++ } +++ +++ read (fd[0], &c, 1); +++ +++ pthread_cleanup_pop (0); +++} +++ +++ +++static void * +++tf (void *arg) +++{ +++ pthread_cleanup_push (cl, (void *) 4L); +++ tf_body (); +++ pthread_cleanup_pop (0); +++ return NULL; +++} +++ +++ +++static int +++do_one_test (void) +++{ +++ in_sh_body = 0; +++ cleanups = 0; +++ if (pipe (fd) != 0 || pipe (fd + 2) != 0) +++ { +++ puts ("pipe failed"); +++ return 1; +++ } +++ +++ pthread_t th; +++ if (pthread_create (&th, NULL, tf, NULL) != 0) +++ { +++ puts ("create failed"); +++ return 1; +++ } +++ +++ int r = pthread_barrier_wait (&b); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("parent thread: barrier_wait failed"); +++ return 1; +++ } +++ +++ sleep (1); +++ +++ r = pthread_kill (th, SIGHUP); +++ if (r) +++ { +++ errno = r; +++ printf ("pthread_kill failed %m\n"); +++ return 1; +++ } +++ +++ while (in_sh_body == 0) +++ sleep (1); +++ +++ if (pthread_cancel (th) != 0) +++ { +++ puts ("cancel failed"); +++ return 1; +++ } +++ +++ /* This will cause the read in the child to return. */ +++ close (fd[0]); +++ close (fd[1]); +++ close (fd[2]); +++ close (fd[3]); +++ +++ void *ret; +++ if (pthread_join (th, &ret) != 0) +++ { +++ puts ("join failed"); +++ return 1; +++ } +++ +++ if (ret != PTHREAD_CANCELED) +++ { +++ puts ("result is wrong"); +++ return 1; +++ } +++ +++ if (cleanups != 0x1234L) +++ { +++ printf ("called cleanups %lx\n", cleanups); +++ return 1; +++ } +++ +++ return 0; +++} +++ +++ +++static int +++do_test (void) +++{ +++ stack_t ss; +++ ss.ss_sp = malloc (2 * SIGSTKSZ); +++ if (ss.ss_sp == NULL) +++ { +++ puts ("failed to allocate alternate stack"); +++ return 1; +++ } +++ ss.ss_flags = 0; +++ ss.ss_size = 2 * SIGSTKSZ; +++ if (sigaltstack (&ss, NULL) < 0) +++ { +++ printf ("sigaltstack failed %m\n"); +++ return 1; +++ } +++ +++ if (pthread_barrier_init (&b, NULL, 2) != 0) +++ { +++ puts ("barrier_init failed"); +++ return 1; +++ } +++ +++ struct sigaction sa; +++ sa.sa_handler = sh; +++ sigemptyset (&sa.sa_mask); +++ sa.sa_flags = 0; +++ +++ if (sigaction (SIGHUP, &sa, NULL) != 0) +++ { +++ puts ("sigaction failed"); +++ return 1; +++ } +++ +++ puts ("sa_flags = 0 test"); +++ if (do_one_test ()) +++ return 1; +++ +++ sa.sa_handler = sh; +++ sigemptyset (&sa.sa_mask); +++ sa.sa_flags = SA_ONSTACK; +++ +++ if (sigaction (SIGHUP, &sa, NULL) != 0) +++ { +++ puts ("sigaction failed"); +++ return 1; +++ } +++ +++ puts ("sa_flags = SA_ONSTACK test"); +++ if (do_one_test ()) +++ return 1; +++ +++ sa.sa_sigaction = (void (*)(int, siginfo_t *, void *)) sh; +++ sigemptyset (&sa.sa_mask); +++ sa.sa_flags = SA_SIGINFO; +++ +++ if (sigaction (SIGHUP, &sa, NULL) != 0) +++ { +++ puts ("sigaction failed"); +++ return 1; +++ } +++ +++ puts ("sa_flags = SA_SIGINFO test"); +++ if (do_one_test ()) +++ return 1; +++ +++ sa.sa_sigaction = (void (*)(int, siginfo_t *, void *)) sh; +++ sigemptyset (&sa.sa_mask); +++ sa.sa_flags = SA_SIGINFO | SA_ONSTACK; +++ +++ if (sigaction (SIGHUP, &sa, NULL) != 0) +++ { +++ puts ("sigaction failed"); +++ return 1; +++ } +++ +++ puts ("sa_flags = SA_SIGINFO|SA_ONSTACK test"); +++ if (do_one_test ()) +++ return 1; +++ +++ return 0; +++} +++ +++#define TIMEOUT 40 +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-cancel21-static.c ++@@ -0,0 +1 @@ +++#include "tst-cancel21.c" ++--- /dev/null +++++ b/fbtl/tst-cancel21.c ++@@ -0,0 +1,293 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Jakub Jelinek , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++static int fd[4]; +++static pthread_barrier_t b; +++volatile int in_sh_body; +++unsigned long cleanups; +++ +++static void +++cl (void *arg) +++{ +++ cleanups = (cleanups << 4) | (long) arg; +++} +++ +++ +++static void __attribute__((noinline)) +++sh_body (void) +++{ +++ char c; +++ +++ pthread_cleanup_push (cl, (void *) 1L); +++ +++ in_sh_body = 1; +++ if (read (fd[2], &c, 1) == 1) +++ { +++ puts ("read succeeded"); +++ exit (1); +++ } +++ +++ pthread_cleanup_pop (0); +++} +++ +++ +++static void +++sh (int sig) +++{ +++ pthread_cleanup_push (cl, (void *) 2L); +++ sh_body (); +++ in_sh_body = 0; +++ +++ pthread_cleanup_pop (0); +++} +++ +++ +++static void __attribute__((noinline)) +++tf_body (void) +++{ +++ char c; +++ +++ pthread_cleanup_push (cl, (void *) 3L); +++ +++ int r = pthread_barrier_wait (&b); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("child thread: barrier_wait failed"); +++ exit (1); +++ } +++ +++ if (read (fd[0], &c, 1) == 1) +++ { +++ puts ("read succeeded"); +++ exit (1); +++ } +++ +++ read (fd[0], &c, 1); +++ +++ pthread_cleanup_pop (0); +++} +++ +++ +++static void * +++tf (void *arg) +++{ +++ pthread_t th = (pthread_t) arg; +++ +++ int r = pthread_barrier_wait (&b); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("parent thread: barrier_wait failed"); +++ exit (1); +++ } +++ +++ sleep (1); +++ +++ r = pthread_kill (th, SIGHUP); +++ if (r) +++ { +++ errno = r; +++ printf ("pthread_kill failed %m\n"); +++ exit (1); +++ } +++ +++ while (in_sh_body == 0) +++ sleep (1); +++ +++ if (pthread_cancel (th) != 0) +++ { +++ puts ("cancel failed"); +++ exit (1); +++ } +++ +++ /* This will cause the read in the initial thread to return. */ +++ close (fd[0]); +++ close (fd[1]); +++ close (fd[2]); +++ close (fd[3]); +++ +++ void *ret; +++ if (pthread_join (th, &ret) != 0) +++ { +++ puts ("join failed"); +++ exit (1); +++ } +++ +++ if (ret != PTHREAD_CANCELED) +++ { +++ puts ("result is wrong"); +++ exit (1); +++ } +++ +++ if (cleanups != 0x1234L) +++ { +++ printf ("called cleanups %lx\n", cleanups); +++ exit (1); +++ } +++ +++ if (pthread_barrier_destroy (&b)) +++ { +++ puts ("barrier destroy failed"); +++ exit (1); +++ } +++ +++ exit (0); +++} +++ +++ +++static int +++do_one_test (void) +++{ +++ in_sh_body = 0; +++ +++ pid_t pid = fork (); +++ +++ if (pid == -1) +++ { +++ printf ("fork failed: %m\n"); +++ return 1; +++ } +++ +++ if (pid) +++ { +++ int status; +++ if (waitpid (pid, &status, 0) < 0) +++ { +++ printf ("waitpid failed %m\n"); +++ return 1; +++ } +++ +++ return !WIFEXITED (status) || WEXITSTATUS (status); +++ } +++ +++ if (pthread_barrier_init (&b, NULL, 2) != 0) +++ { +++ puts ("barrier_init failed"); +++ exit (1); +++ } +++ +++ cleanups = 0; +++ if (pipe (fd) != 0 || pipe (fd + 2) != 0) +++ { +++ puts ("pipe failed"); +++ exit (1); +++ } +++ +++ pthread_t th; +++ if (pthread_create (&th, NULL, tf, (void *) pthread_self ()) != 0) +++ { +++ puts ("create failed"); +++ exit (1); +++ } +++ +++ pthread_cleanup_push (cl, (void *) 4L); +++ tf_body (); +++ pthread_cleanup_pop (0); +++ exit (1); +++} +++ +++ +++static int +++do_test (void) +++{ +++ stack_t ss; +++ ss.ss_sp = malloc (2 * SIGSTKSZ); +++ if (ss.ss_sp == NULL) +++ { +++ puts ("failed to allocate alternate stack"); +++ return 1; +++ } +++ ss.ss_flags = 0; +++ ss.ss_size = 2 * SIGSTKSZ; +++ if (sigaltstack (&ss, NULL) < 0) +++ { +++ printf ("sigaltstack failed %m\n"); +++ return 1; +++ } +++ +++ struct sigaction sa; +++ sa.sa_handler = sh; +++ sigemptyset (&sa.sa_mask); +++ sa.sa_flags = 0; +++ +++ if (sigaction (SIGHUP, &sa, NULL) != 0) +++ { +++ puts ("sigaction failed"); +++ return 1; +++ } +++ +++ puts ("sa_flags = 0 test"); +++ if (do_one_test ()) +++ return 1; +++ +++ sa.sa_handler = sh; +++ sigemptyset (&sa.sa_mask); +++ sa.sa_flags = SA_ONSTACK; +++ +++ if (sigaction (SIGHUP, &sa, NULL) != 0) +++ { +++ puts ("sigaction failed"); +++ return 1; +++ } +++ +++ puts ("sa_flags = SA_ONSTACK test"); +++ if (do_one_test ()) +++ return 1; +++ +++ sa.sa_sigaction = (void (*)(int, siginfo_t *, void *)) sh; +++ sigemptyset (&sa.sa_mask); +++ sa.sa_flags = SA_SIGINFO; +++ +++ if (sigaction (SIGHUP, &sa, NULL) != 0) +++ { +++ puts ("sigaction failed"); +++ return 1; +++ } +++ +++ puts ("sa_flags = SA_SIGINFO test"); +++ if (do_one_test ()) +++ return 1; +++ +++ sa.sa_sigaction = (void (*)(int, siginfo_t *, void *)) sh; +++ sigemptyset (&sa.sa_mask); +++ sa.sa_flags = SA_SIGINFO | SA_ONSTACK; +++ +++ if (sigaction (SIGHUP, &sa, NULL) != 0) +++ { +++ puts ("sigaction failed"); +++ return 1; +++ } +++ +++ puts ("sa_flags = SA_SIGINFO|SA_ONSTACK test"); +++ if (do_one_test ()) +++ return 1; +++ +++ return 0; +++} +++ +++#define TIMEOUT 40 +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-cancel22.c ++@@ -0,0 +1,120 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Jakub Jelinek , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++ +++pthread_barrier_t b; +++int seen; +++ +++static void * +++tf (void *arg) +++{ +++ int old; +++ int r = pthread_setcancelstate (PTHREAD_CANCEL_DISABLE, &old); +++ if (r != 0) +++ { +++ puts ("setcancelstate failed"); +++ exit (1); +++ } +++ +++ r = pthread_barrier_wait (&b); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("barrier_wait failed"); +++ exit (1); +++ } +++ +++ for (int i = 0; i < 10; ++i) +++ { +++ struct timespec ts = { .tv_sec = 0, .tv_nsec = 100000000 }; +++ TEMP_FAILURE_RETRY (nanosleep (&ts, &ts)); +++ } +++ +++ seen = 1; +++ pthread_setcancelstate (old, NULL); +++ +++ struct timespec ts = { .tv_sec = 0, .tv_nsec = 100000000 }; +++ TEMP_FAILURE_RETRY (nanosleep (&ts, &ts)); +++ +++ exit (1); +++} +++ +++ +++static int +++do_test (void) +++{ +++ if (pthread_barrier_init (&b, NULL, 2) != 0) +++ { +++ puts ("barrier init failed"); +++ return 1; +++ } +++ +++ pthread_t th; +++ if (pthread_create (&th, NULL, tf, NULL) != 0) +++ { +++ puts ("thread creation failed"); +++ return 1; +++ } +++ +++ int r = pthread_barrier_wait (&b); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("barrier_wait failed"); +++ return 1; +++ } +++ +++ if (pthread_cancel (th) != 0) +++ { +++ puts ("cancel failed"); +++ return 1; +++ } +++ +++ void *status; +++ if (pthread_join (th, &status) != 0) +++ { +++ puts ("join failed"); +++ return 1; +++ } +++ if (status != PTHREAD_CANCELED) +++ { +++ puts ("thread not canceled"); +++ return 1; +++ } +++ +++ if (pthread_barrier_destroy (&b) != 0) +++ { +++ puts ("barrier_destroy failed"); +++ return 1; +++ } +++ +++ if (seen != 1) +++ { +++ puts ("thread cancelled when PTHREAD_CANCEL_DISABLED"); +++ return 1; +++ } +++ +++ return 0; +++} +++ +++#define TIMEOUT 5 +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-cancel23.c ++@@ -0,0 +1 @@ +++#include "tst-cancel22.c" ++--- /dev/null +++++ b/fbtl/tst-cancel24-static.cc ++@@ -0,0 +1 @@ +++#include "tst-cancel24.cc" ++--- /dev/null +++++ b/fbtl/tst-cancel24.cc ++@@ -0,0 +1,113 @@ +++#include +++#include +++#include +++#include +++#include +++ +++ +++static volatile bool destr_called; +++static volatile bool except_caught; +++ +++static pthread_barrier_t b; +++ +++ +++struct monitor +++{ +++ // gcc is broken and would generate a warning without this dummy +++ // constructor. +++ monitor () { } +++ ~monitor() { destr_called = true; } +++}; +++ +++ +++static void * +++tf (void *arg) +++{ +++ sem_t *s = static_cast (arg); +++ +++ try +++ { +++ monitor m; +++ +++ pthread_barrier_wait (&b); +++ +++ while (1) +++ sem_wait (s); +++ } +++ catch (...) +++ { +++ except_caught = true; +++ throw; +++ } +++ +++ return NULL; +++} +++ +++ +++static int +++do_test () +++{ +++ if (pthread_barrier_init (&b, NULL, 2) != 0) +++ { +++ puts ("barrier_init failed"); +++ return 1; +++ } +++ +++ sem_t s; +++ if (sem_init (&s, 0, 0) != 0) +++ { +++ puts ("sem_init failed"); +++ return 1; +++ } +++ +++ pthread_t th; +++ if (pthread_create (&th, NULL, tf, &s) != 0) +++ { +++ puts ("pthread_create failed"); +++ return 1; +++ } +++ +++ pthread_barrier_wait (&b); +++ +++ /* There is unfortunately no better method to try to assure the +++ child thread reached the sem_wait call and is actually waiting +++ than to sleep here. */ +++ sleep (1); +++ +++ if (pthread_cancel (th) != 0) +++ { +++ puts ("cancel failed"); +++ return 1; +++ } +++ +++ void *res; +++ if (pthread_join (th, &res) != 0) +++ { +++ puts ("join failed"); +++ return 1; +++ } +++ +++ if (res != PTHREAD_CANCELED) +++ { +++ puts ("thread was not canceled"); +++ return 1; +++ } +++ +++ if (! except_caught) +++ { +++ puts ("exception not caught"); +++ return 1; +++ } +++ +++ if (! destr_called) +++ { +++ puts ("destructor not called"); +++ return 1; +++ } +++ +++ return 0; +++} +++ +++#define TEST_FUNCTION do_test () +++#define TIMEOUT 3 +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-cancel25.c ++@@ -0,0 +1,171 @@ +++#include +++#include +++#include +++#include +++ +++ +++static pthread_barrier_t b; +++static pthread_t th2; +++ +++ +++static void * +++tf2 (void *arg) +++{ +++ sigset_t mask; +++ if (pthread_sigmask (SIG_SETMASK, NULL, &mask) != 0) +++ { +++ puts ("pthread_sigmask failed"); +++ exit (1); +++ } +++ if (sigismember (&mask, SIGCANCEL)) +++ { +++ puts ("SIGCANCEL blocked in new thread"); +++ exit (1); +++ } +++ +++ /* Sync with the main thread so that we do not test anything else. */ +++ int e = pthread_barrier_wait (&b); +++ if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("barrier_wait failed"); +++ exit (1); +++ } +++ +++ while (1) +++ { +++ /* Just a cancelable call. */ +++ struct timespec ts = { 10000, 0 }; +++ nanosleep (&ts, 0); +++ } +++ +++ return NULL; +++} +++ +++ +++static void +++unwhand (void *arg) +++{ +++ if (pthread_create (&th2, NULL, tf2, NULL) != 0) +++ { +++ puts ("unwhand: create failed"); +++ exit (1); +++ } +++} +++ +++ +++static void * +++tf (void *arg) +++{ +++ pthread_cleanup_push (unwhand, NULL); +++ +++ /* Sync with the main thread so that we do not test anything else. */ +++ int e = pthread_barrier_wait (&b); +++ if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("barrier_wait failed"); +++ exit (1); +++ } +++ +++ while (1) +++ { +++ /* Just a cancelable call. */ +++ struct timespec ts = { 10000, 0 }; +++ nanosleep (&ts, 0); +++ } +++ +++ pthread_cleanup_pop (0); +++ +++ return NULL; +++} +++ +++ +++static int +++do_test (void) +++{ +++ if (pthread_barrier_init (&b, NULL, 2) != 0) +++ { +++ puts ("barrier_init failed"); +++ return 1; +++ } +++ +++ pthread_t th1; +++ if (pthread_create (&th1, NULL, tf, NULL) != 0) +++ { +++ puts ("create failed"); +++ return 1; +++ } +++ +++ int e = pthread_barrier_wait (&b); +++ if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("barrier_wait failed"); +++ return 1; +++ } +++ +++ /* Make sure tf1 enters nanosleep. */ +++ struct timespec ts = { 0, 500000000 }; +++ while (nanosleep (&ts, &ts) != 0) +++ ; +++ +++ if (pthread_cancel (th1) != 0) +++ { +++ puts ("1st cancel failed"); +++ return 1; +++ } +++ +++ void *res; +++ if (pthread_join (th1, &res) != 0) +++ { +++ puts ("1st join failed"); +++ return 1; +++ } +++ if (res != PTHREAD_CANCELED) +++ { +++ puts ("1st thread not canceled"); +++ return 1; +++ } +++ +++ e = pthread_barrier_wait (&b); +++ if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("barrier_wait failed"); +++ return 1; +++ } +++ +++ /* Make sure tf2 enters nanosleep. */ +++ ts.tv_sec = 0; +++ ts.tv_nsec = 500000000; +++ while (nanosleep (&ts, &ts) != 0) +++ ; +++ +++ puts ("calling pthread_cancel the second time"); +++ if (pthread_cancel (th2) != 0) +++ { +++ puts ("2nd cancel failed"); +++ return 1; +++ } +++ +++ puts ("calling pthread_join the second time"); +++ if (pthread_join (th2, &res) != 0) +++ { +++ puts ("2nd join failed"); +++ return 1; +++ } +++ if (res != PTHREAD_CANCELED) +++ { +++ puts ("2nd thread not canceled"); +++ return 1; +++ } +++ +++ if (pthread_barrier_destroy (&b) != 0) +++ { +++ puts ("barrier_destroy failed"); +++ return 0; +++ } +++ +++ return 0; +++} +++ +++#define TEST_FUNCTION do_test () +++#define TIMEOUT 4 +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-cancel3.c ++@@ -0,0 +1,97 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++ +++ +++static int fd[2]; +++ +++ +++static void * +++tf (void *arg) +++{ +++ char buf[100]; +++ +++ if (read (fd[0], buf, sizeof (buf)) == sizeof (buf)) +++ { +++ puts ("read succeeded"); +++ return (void *) 1l; +++ } +++ +++ return NULL; +++} +++ +++ +++static int +++do_test (void) +++{ +++ pthread_t th; +++ void *r; +++ struct sigaction sa; +++ +++ sa.sa_handler = SIG_IGN; +++ sigemptyset (&sa.sa_mask); +++ sa.sa_flags = 0; +++ +++ if (sigaction (SIGPIPE, &sa, NULL) != 0) +++ { +++ puts ("sigaction failed"); +++ return 1; +++ } +++ +++ if (pipe (fd) != 0) +++ { +++ puts ("pipe failed"); +++ return 1; +++ } +++ +++ if (pthread_create (&th, NULL, tf, NULL) != 0) +++ { +++ puts ("create failed"); +++ return 1; +++ } +++ +++ if (pthread_cancel (th) != 0) +++ { +++ puts ("cancel failed"); +++ return 1; +++ } +++ +++ /* This will cause the read in the child to return. */ +++ close (fd[0]); +++ +++ if (pthread_join (th, &r) != 0) +++ { +++ puts ("join failed"); +++ return 1; +++ } +++ +++ if (r != PTHREAD_CANCELED) +++ { +++ puts ("result is wrong"); +++ return 1; +++ } +++ +++ return 0; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-cancel4.c ++@@ -0,0 +1,2375 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++/* NOTE: this tests functionality beyond POSIX. POSIX does not allow +++ exit to be called more than once. */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++#include "pthreadP.h" +++ +++ +++/* Since STREAMS are not supported in the standard Linux kernel and +++ there we don't advertise STREAMS as supported is no need to test +++ the STREAMS related functions. This affects +++ getmsg() getpmsg() putmsg() +++ putpmsg() +++ +++ lockf() and fcntl() are tested in tst-cancel16. +++ +++ pthread_join() is tested in tst-join5. +++ +++ pthread_testcancel()'s only purpose is to allow cancellation. This +++ is tested in several places. +++ +++ sem_wait() and sem_timedwait() are checked in tst-cancel1[2345] tests. +++ +++ mq_send(), mq_timedsend(), mq_receive() and mq_timedreceive() are checked +++ in tst-mqueue8{,x} tests. +++ +++ aio_suspend() is tested in tst-cancel17. +++ +++ clock_nanosleep() is tested in tst-cancel18. +++*/ +++ +++/* Pipe descriptors. */ +++static int fds[2]; +++ +++/* Temporary file descriptor, to be closed after each round. */ +++static int tempfd = -1; +++static int tempfd2 = -1; +++/* Name of temporary file to be removed after each round. */ +++static char *tempfname; +++/* Temporary message queue. */ +++static int tempmsg = -1; +++ +++/* Often used barrier for two threads. */ +++static pthread_barrier_t b2; +++ +++ +++#ifndef IPC_ADDVAL +++# define IPC_ADDVAL 0 +++#endif +++ +++#define WRITE_BUFFER_SIZE 4096 +++ +++/* Cleanup handling test. */ +++static int cl_called; +++ +++static void +++cl (void *arg) +++{ +++ ++cl_called; +++} +++ +++ +++ +++static void * +++tf_read (void *arg) +++{ +++ int fd; +++ int r; +++ +++ if (arg == NULL) +++ fd = fds[0]; +++ else +++ { +++ char fname[] = "/tmp/tst-cancel4-fd-XXXXXX"; +++ tempfd = fd = mkstemp (fname); +++ if (fd == -1) +++ printf ("%s: mkstemp failed\n", __FUNCTION__); +++ unlink (fname); +++ +++ r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ } +++ +++ r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ ssize_t s; +++ pthread_cleanup_push (cl, NULL); +++ +++ char buf[100]; +++ s = read (fd, buf, sizeof (buf)); +++ +++ pthread_cleanup_pop (0); +++ +++ printf ("%s: read returns with %zd\n", __FUNCTION__, s); +++ +++ exit (1); +++} +++ +++ +++static void * +++tf_readv (void *arg) +++{ +++ int fd; +++ int r; +++ +++ if (arg == NULL) +++ fd = fds[0]; +++ else +++ { +++ char fname[] = "/tmp/tst-cancel4-fd-XXXXXX"; +++ tempfd = fd = mkstemp (fname); +++ if (fd == -1) +++ printf ("%s: mkstemp failed\n", __FUNCTION__); +++ unlink (fname); +++ +++ r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ } +++ +++ r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ ssize_t s; +++ pthread_cleanup_push (cl, NULL); +++ +++ char buf[100]; +++ struct iovec iov[1] = { [0] = { .iov_base = buf, .iov_len = sizeof (buf) } }; +++ s = readv (fd, iov, 1); +++ +++ pthread_cleanup_pop (0); +++ +++ printf ("%s: readv returns with %zd\n", __FUNCTION__, s); +++ +++ exit (1); +++} +++ +++ +++static void * +++tf_write (void *arg) +++{ +++ int fd; +++ int r; +++ +++ if (arg == NULL) +++ fd = fds[1]; +++ else +++ { +++ char fname[] = "/tmp/tst-cancel4-fd-XXXXXX"; +++ tempfd = fd = mkstemp (fname); +++ if (fd == -1) +++ printf ("%s: mkstemp failed\n", __FUNCTION__); +++ unlink (fname); +++ +++ r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ } +++ +++ r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ ssize_t s; +++ pthread_cleanup_push (cl, NULL); +++ +++ char buf[WRITE_BUFFER_SIZE]; +++ memset (buf, '\0', sizeof (buf)); +++ s = write (fd, buf, sizeof (buf)); +++ +++ pthread_cleanup_pop (0); +++ +++ printf ("%s: write returns with %zd\n", __FUNCTION__, s); +++ +++ exit (1); +++} +++ +++ +++static void * +++tf_writev (void *arg) +++{ +++ int fd; +++ int r; +++ +++ if (arg == NULL) +++ fd = fds[1]; +++ else +++ { +++ char fname[] = "/tmp/tst-cancel4-fd-XXXXXX"; +++ tempfd = fd = mkstemp (fname); +++ if (fd == -1) +++ printf ("%s: mkstemp failed\n", __FUNCTION__); +++ unlink (fname); +++ +++ r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ } +++ +++ r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ ssize_t s; +++ pthread_cleanup_push (cl, NULL); +++ +++ char buf[WRITE_BUFFER_SIZE]; +++ memset (buf, '\0', sizeof (buf)); +++ struct iovec iov[1] = { [0] = { .iov_base = buf, .iov_len = sizeof (buf) } }; +++ s = writev (fd, iov, 1); +++ +++ pthread_cleanup_pop (0); +++ +++ printf ("%s: writev returns with %zd\n", __FUNCTION__, s); +++ +++ exit (1); +++} +++ +++ +++static void * +++tf_sleep (void *arg) +++{ +++ int r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ if (arg != NULL) +++ { +++ r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ } +++ +++ pthread_cleanup_push (cl, NULL); +++ +++ sleep (arg == NULL ? 1000000 : 0); +++ +++ pthread_cleanup_pop (0); +++ +++ printf ("%s: sleep returns\n", __FUNCTION__); +++ +++ exit (1); +++} +++ +++ +++static void * +++tf_usleep (void *arg) +++{ +++ int r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ if (arg != NULL) +++ { +++ r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: 2nd barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ } +++ +++ pthread_cleanup_push (cl, NULL); +++ +++ usleep (arg == NULL ? (useconds_t) ULONG_MAX : 0); +++ +++ pthread_cleanup_pop (0); +++ +++ printf ("%s: usleep returns\n", __FUNCTION__); +++ +++ exit (1); +++} +++ +++ +++static void * +++tf_nanosleep (void *arg) +++{ +++ int r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ if (arg != NULL) +++ { +++ r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ } +++ +++ pthread_cleanup_push (cl, NULL); +++ +++ struct timespec ts = { .tv_sec = arg == NULL ? 10000000 : 0, .tv_nsec = 0 }; +++ TEMP_FAILURE_RETRY (nanosleep (&ts, &ts)); +++ +++ pthread_cleanup_pop (0); +++ +++ printf ("%s: nanosleep returns\n", __FUNCTION__); +++ +++ exit (1); +++} +++ +++ +++static void * +++tf_select (void *arg) +++{ +++ int fd; +++ int r; +++ +++ if (arg == NULL) +++ fd = fds[0]; +++ else +++ { +++ char fname[] = "/tmp/tst-cancel4-fd-XXXXXX"; +++ tempfd = fd = mkstemp (fname); +++ if (fd == -1) +++ printf ("%s: mkstemp failed\n", __FUNCTION__); +++ unlink (fname); +++ +++ r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ } +++ +++ r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ fd_set rfs; +++ FD_ZERO (&rfs); +++ FD_SET (fd, &rfs); +++ +++ int s; +++ pthread_cleanup_push (cl, NULL); +++ +++ s = select (fd + 1, &rfs, NULL, NULL, NULL); +++ +++ pthread_cleanup_pop (0); +++ +++ printf ("%s: select returns with %d (%s)\n", __FUNCTION__, s, +++ strerror (errno)); +++ +++ exit (1); +++} +++ +++ +++static void * +++tf_pselect (void *arg) +++{ +++ int fd; +++ int r; +++ +++ if (arg == NULL) +++ fd = fds[0]; +++ else +++ { +++ char fname[] = "/tmp/tst-cancel4-fd-XXXXXX"; +++ tempfd = fd = mkstemp (fname); +++ if (fd == -1) +++ printf ("%s: mkstemp failed\n", __FUNCTION__); +++ unlink (fname); +++ +++ r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ } +++ +++ r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ fd_set rfs; +++ FD_ZERO (&rfs); +++ FD_SET (fd, &rfs); +++ +++ int s; +++ pthread_cleanup_push (cl, NULL); +++ +++ s = pselect (fd + 1, &rfs, NULL, NULL, NULL, NULL); +++ +++ pthread_cleanup_pop (0); +++ +++ printf ("%s: pselect returns with %d (%s)\n", __FUNCTION__, s, +++ strerror (errno)); +++ +++ exit (1); +++} +++ +++ +++static void * +++tf_poll (void *arg) +++{ +++ int fd; +++ int r; +++ +++ if (arg == NULL) +++ fd = fds[0]; +++ else +++ { +++ char fname[] = "/tmp/tst-cancel4-fd-XXXXXX"; +++ tempfd = fd = mkstemp (fname); +++ if (fd == -1) +++ printf ("%s: mkstemp failed\n", __FUNCTION__); +++ unlink (fname); +++ +++ r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ } +++ +++ r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ struct pollfd rfs[1] = { [0] = { .fd = fd, .events = POLLIN } }; +++ +++ int s; +++ pthread_cleanup_push (cl, NULL); +++ +++ s = poll (rfs, 1, -1); +++ +++ pthread_cleanup_pop (0); +++ +++ printf ("%s: poll returns with %d (%s)\n", __FUNCTION__, s, +++ strerror (errno)); +++ +++ exit (1); +++} +++ +++ +++static void * +++tf_ppoll (void *arg) +++{ +++ int fd; +++ int r; +++ +++ if (arg == NULL) +++ fd = fds[0]; +++ else +++ { +++ char fname[] = "/tmp/tst-cancel4-fd-XXXXXX"; +++ tempfd = fd = mkstemp (fname); +++ if (fd == -1) +++ printf ("%s: mkstemp failed\n", __FUNCTION__); +++ unlink (fname); +++ +++ r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ } +++ +++ r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ struct pollfd rfs[1] = { [0] = { .fd = fd, .events = POLLIN } }; +++ +++ int s; +++ pthread_cleanup_push (cl, NULL); +++ +++ s = ppoll (rfs, 1, NULL, NULL); +++ +++ pthread_cleanup_pop (0); +++ +++ printf ("%s: ppoll returns with %d (%s)\n", __FUNCTION__, s, +++ strerror (errno)); +++ +++ exit (1); +++} +++ +++ +++static void * +++tf_wait (void *arg) +++{ +++ pid_t pid = fork (); +++ if (pid == -1) +++ { +++ puts ("fork failed"); +++ exit (1); +++ } +++ +++ if (pid == 0) +++ { +++ /* Make the program disappear after a while. */ +++ if (arg == NULL) +++ sleep (10); +++ exit (0); +++ } +++ +++ int r; +++ if (arg != NULL) +++ { +++ struct timespec ts = { .tv_sec = 0, .tv_nsec = 100000000 }; +++ while (nanosleep (&ts, &ts) != 0) +++ continue; +++ +++ r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ } +++ +++ r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ int s; +++ pthread_cleanup_push (cl, NULL); +++ +++ s = wait (NULL); +++ +++ pthread_cleanup_pop (0); +++ +++ printf ("%s: wait returns with %d (%s)\n", __FUNCTION__, s, +++ strerror (errno)); +++ +++ exit (1); +++} +++ +++ +++static void * +++tf_waitpid (void *arg) +++{ +++ +++ pid_t pid = fork (); +++ if (pid == -1) +++ { +++ puts ("fork failed"); +++ exit (1); +++ } +++ +++ if (pid == 0) +++ { +++ /* Make the program disappear after a while. */ +++ if (arg == NULL) +++ sleep (10); +++ exit (0); +++ } +++ +++ int r; +++ if (arg != NULL) +++ { +++ struct timespec ts = { .tv_sec = 0, .tv_nsec = 100000000 }; +++ while (nanosleep (&ts, &ts) != 0) +++ continue; +++ +++ r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ } +++ +++ r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ int s; +++ pthread_cleanup_push (cl, NULL); +++ +++ s = waitpid (-1, NULL, 0); +++ +++ pthread_cleanup_pop (0); +++ +++ printf ("%s: waitpid returns with %d (%s)\n", __FUNCTION__, s, +++ strerror (errno)); +++ +++ exit (1); +++} +++ +++ +++static void * +++tf_waitid (void *arg) +++{ +++ pid_t pid = fork (); +++ if (pid == -1) +++ { +++ puts ("fork failed"); +++ exit (1); +++ } +++ +++ if (pid == 0) +++ { +++ /* Make the program disappear after a while. */ +++ if (arg == NULL) +++ sleep (10); +++ exit (0); +++ } +++ +++ int r; +++ if (arg != NULL) +++ { +++ struct timespec ts = { .tv_sec = 0, .tv_nsec = 100000000 }; +++ while (nanosleep (&ts, &ts) != 0) +++ continue; +++ +++ r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ } +++ +++ r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ int s; +++ pthread_cleanup_push (cl, NULL); +++ +++#ifndef WEXITED +++# define WEXITED 0 +++#endif +++ siginfo_t si; +++ s = waitid (P_PID, pid, &si, WEXITED); +++ +++ pthread_cleanup_pop (0); +++ +++ printf ("%s: waitid returns with %d (%s)\n", __FUNCTION__, s, +++ strerror (errno)); +++ +++ exit (1); +++} +++ +++ +++static void * +++tf_sigpause (void *arg) +++{ +++ int r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ if (arg != NULL) +++ { +++ r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: 2nd barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ } +++ +++ pthread_cleanup_push (cl, NULL); +++ +++ /* Just for fun block the cancellation signal. We need to use +++ __xpg_sigpause since otherwise we will get the BSD version. */ +++ __xpg_sigpause (SIGCANCEL); +++ +++ pthread_cleanup_pop (0); +++ +++ printf ("%s: sigpause returned\n", __FUNCTION__); +++ +++ exit (1); +++} +++ +++ +++static void * +++tf_sigsuspend (void *arg) +++{ +++ int r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ if (arg != NULL) +++ { +++ r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: 2nd barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ } +++ +++ pthread_cleanup_push (cl, NULL); +++ +++ /* Just for fun block all signals. */ +++ sigset_t mask; +++ sigfillset (&mask); +++ sigsuspend (&mask); +++ +++ pthread_cleanup_pop (0); +++ +++ printf ("%s: sigsuspend returned\n", __FUNCTION__); +++ +++ exit (1); +++} +++ +++ +++static void * +++tf_sigwait (void *arg) +++{ +++ int r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ if (arg != NULL) +++ { +++ r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: 2nd barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ } +++ +++ /* Block SIGUSR1. */ +++ sigset_t mask; +++ sigemptyset (&mask); +++ sigaddset (&mask, SIGUSR1); +++ if (pthread_sigmask (SIG_BLOCK, &mask, NULL) != 0) +++ { +++ printf ("%s: pthread_sigmask failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ int sig; +++ pthread_cleanup_push (cl, NULL); +++ +++ /* Wait for SIGUSR1. */ +++ sigwait (&mask, &sig); +++ +++ pthread_cleanup_pop (0); +++ +++ printf ("%s: sigwait returned with signal %d\n", __FUNCTION__, sig); +++ +++ exit (1); +++} +++ +++ +++static void * +++tf_sigwaitinfo (void *arg) +++{ +++ int r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ if (arg != NULL) +++ { +++ r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: 2nd barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ } +++ +++ /* Block SIGUSR1. */ +++ sigset_t mask; +++ sigemptyset (&mask); +++ sigaddset (&mask, SIGUSR1); +++ if (pthread_sigmask (SIG_BLOCK, &mask, NULL) != 0) +++ { +++ printf ("%s: pthread_sigmask failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ siginfo_t info; +++ pthread_cleanup_push (cl, NULL); +++ +++ /* Wait for SIGUSR1. */ +++ sigwaitinfo (&mask, &info); +++ +++ pthread_cleanup_pop (0); +++ +++ printf ("%s: sigwaitinfo returned with signal %d\n", __FUNCTION__, +++ info.si_signo); +++ +++ exit (1); +++} +++ +++ +++static void * +++tf_sigtimedwait (void *arg) +++{ +++ int r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ if (arg != NULL) +++ { +++ r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: 2nd barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ } +++ +++ /* Block SIGUSR1. */ +++ sigset_t mask; +++ sigemptyset (&mask); +++ sigaddset (&mask, SIGUSR1); +++ if (pthread_sigmask (SIG_BLOCK, &mask, NULL) != 0) +++ { +++ printf ("%s: pthread_sigmask failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ /* Wait for SIGUSR1. */ +++ siginfo_t info; +++ struct timespec ts = { .tv_sec = 60, .tv_nsec = 0 }; +++ pthread_cleanup_push (cl, NULL); +++ +++ sigtimedwait (&mask, &info, &ts); +++ +++ pthread_cleanup_pop (0); +++ +++ printf ("%s: sigtimedwait returned with signal %d\n", __FUNCTION__, +++ info.si_signo); +++ +++ exit (1); +++} +++ +++ +++static void * +++tf_pause (void *arg) +++{ +++ int r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ if (arg != NULL) +++ { +++ r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: 2nd barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ } +++ +++ pthread_cleanup_push (cl, NULL); +++ +++ pause (); +++ +++ pthread_cleanup_pop (0); +++ +++ printf ("%s: pause returned\n", __FUNCTION__); +++ +++ exit (1); +++} +++ +++ +++static void * +++tf_accept (void *arg) +++{ +++ struct sockaddr_un sun; +++ /* To test a non-blocking accept call we make the call file by using +++ a datagrame socket. */ +++ int pf = arg == NULL ? SOCK_STREAM : SOCK_DGRAM; +++ +++ tempfd = socket (AF_UNIX, pf, 0); +++ if (tempfd == -1) +++ { +++ printf ("%s: socket call failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ int tries = 0; +++ do +++ { +++ if (++tries > 10) +++ { +++ printf ("%s: too many unsuccessful bind calls\n", __FUNCTION__); +++ } +++ +++ strcpy (sun.sun_path, "/tmp/tst-cancel4-socket-1-XXXXXX"); +++ if (mktemp (sun.sun_path) == NULL) +++ { +++ printf ("%s: cannot generate temp file name\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ sun.sun_family = AF_UNIX; +++ } +++ while (bind (tempfd, (struct sockaddr *) &sun, +++ offsetof (struct sockaddr_un, sun_path) +++ + strlen (sun.sun_path) + 1) != 0); +++ +++ unlink (sun.sun_path); +++ +++ listen (tempfd, 5); +++ +++ socklen_t len = sizeof (sun); +++ +++ int r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ if (arg != NULL) +++ { +++ r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: 2nd barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ } +++ +++ pthread_cleanup_push (cl, NULL); +++ +++ accept (tempfd, (struct sockaddr *) &sun, &len); +++ +++ pthread_cleanup_pop (0); +++ +++ printf ("%s: accept returned\n", __FUNCTION__); +++ +++ exit (1); +++} +++ +++ +++static void * +++tf_send (void *arg) +++{ +++ struct sockaddr_un sun; +++ +++ tempfd = socket (AF_UNIX, SOCK_STREAM, 0); +++ if (tempfd == -1) +++ { +++ printf ("%s: first socket call failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ int tries = 0; +++ do +++ { +++ if (++tries > 10) +++ { +++ printf ("%s: too many unsuccessful bind calls\n", __FUNCTION__); +++ } +++ +++ strcpy (sun.sun_path, "/tmp/tst-cancel4-socket-2-XXXXXX"); +++ if (mktemp (sun.sun_path) == NULL) +++ { +++ printf ("%s: cannot generate temp file name\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ sun.sun_family = AF_UNIX; +++ } +++ while (bind (tempfd, (struct sockaddr *) &sun, +++ offsetof (struct sockaddr_un, sun_path) +++ + strlen (sun.sun_path) + 1) != 0); +++ +++ listen (tempfd, 5); +++ +++ tempfd2 = socket (AF_UNIX, SOCK_STREAM, 0); +++ if (tempfd2 == -1) +++ { +++ printf ("%s: second socket call failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ if (connect (tempfd2, (struct sockaddr *) &sun, sizeof (sun)) != 0) +++ { +++ printf ("%s: connect failed\n", __FUNCTION__); +++ exit(1); +++ } +++ +++ unlink (sun.sun_path); +++ +++ int r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ if (arg != NULL) +++ { +++ r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: 2nd barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ } +++ +++ pthread_cleanup_push (cl, NULL); +++ +++ /* Very large block, so that the send call blocks. */ +++ char mem[700000]; +++ +++ send (tempfd2, mem, arg == NULL ? sizeof (mem) : 1, 0); +++ +++ pthread_cleanup_pop (0); +++ +++ printf ("%s: send returned\n", __FUNCTION__); +++ +++ exit (1); +++} +++ +++ +++static void * +++tf_recv (void *arg) +++{ +++ struct sockaddr_un sun; +++ +++ tempfd = socket (AF_UNIX, SOCK_STREAM, 0); +++ if (tempfd == -1) +++ { +++ printf ("%s: first socket call failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ int tries = 0; +++ do +++ { +++ if (++tries > 10) +++ { +++ printf ("%s: too many unsuccessful bind calls\n", __FUNCTION__); +++ } +++ +++ strcpy (sun.sun_path, "/tmp/tst-cancel4-socket-3-XXXXXX"); +++ if (mktemp (sun.sun_path) == NULL) +++ { +++ printf ("%s: cannot generate temp file name\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ sun.sun_family = AF_UNIX; +++ } +++ while (bind (tempfd, (struct sockaddr *) &sun, +++ offsetof (struct sockaddr_un, sun_path) +++ + strlen (sun.sun_path) + 1) != 0); +++ +++ listen (tempfd, 5); +++ +++ tempfd2 = socket (AF_UNIX, SOCK_STREAM, 0); +++ if (tempfd2 == -1) +++ { +++ printf ("%s: second socket call failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ if (connect (tempfd2, (struct sockaddr *) &sun, sizeof (sun)) != 0) +++ { +++ printf ("%s: connect failed\n", __FUNCTION__); +++ exit(1); +++ } +++ +++ unlink (sun.sun_path); +++ +++ int r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ if (arg != NULL) +++ { +++ r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: 2nd barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ } +++ +++ pthread_cleanup_push (cl, NULL); +++ +++ char mem[70]; +++ +++ recv (tempfd2, mem, arg == NULL ? sizeof (mem) : 0, 0); +++ +++ pthread_cleanup_pop (0); +++ +++ printf ("%s: recv returned\n", __FUNCTION__); +++ +++ exit (1); +++} +++ +++ +++static void * +++tf_recvfrom (void *arg) +++{ +++ struct sockaddr_un sun; +++ +++ tempfd = socket (AF_UNIX, SOCK_DGRAM, 0); +++ if (tempfd == -1) +++ { +++ printf ("%s: first socket call failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ int tries = 0; +++ do +++ { +++ if (++tries > 10) +++ { +++ printf ("%s: too many unsuccessful bind calls\n", __FUNCTION__); +++ } +++ +++ strcpy (sun.sun_path, "/tmp/tst-cancel4-socket-4-XXXXXX"); +++ if (mktemp (sun.sun_path) == NULL) +++ { +++ printf ("%s: cannot generate temp file name\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ sun.sun_family = AF_UNIX; +++ } +++ while (bind (tempfd, (struct sockaddr *) &sun, +++ offsetof (struct sockaddr_un, sun_path) +++ + strlen (sun.sun_path) + 1) != 0); +++ +++ tempfname = strdup (sun.sun_path); +++ +++ tempfd2 = socket (AF_UNIX, SOCK_DGRAM, 0); +++ if (tempfd2 == -1) +++ { +++ printf ("%s: second socket call failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ int r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ if (arg != NULL) +++ { +++ r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: 2nd barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ } +++ +++ pthread_cleanup_push (cl, NULL); +++ +++ char mem[70]; +++ socklen_t len = sizeof (sun); +++ +++ recvfrom (tempfd2, mem, arg == NULL ? sizeof (mem) : 0, 0, +++ (struct sockaddr *) &sun, &len); +++ +++ pthread_cleanup_pop (0); +++ +++ printf ("%s: recvfrom returned\n", __FUNCTION__); +++ +++ exit (1); +++} +++ +++ +++static void * +++tf_recvmsg (void *arg) +++{ +++ struct sockaddr_un sun; +++ +++ tempfd = socket (AF_UNIX, SOCK_DGRAM, 0); +++ if (tempfd == -1) +++ { +++ printf ("%s: first socket call failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ int tries = 0; +++ do +++ { +++ if (++tries > 10) +++ { +++ printf ("%s: too many unsuccessful bind calls\n", __FUNCTION__); +++ } +++ +++ strcpy (sun.sun_path, "/tmp/tst-cancel4-socket-5-XXXXXX"); +++ if (mktemp (sun.sun_path) == NULL) +++ { +++ printf ("%s: cannot generate temp file name\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ sun.sun_family = AF_UNIX; +++ } +++ while (bind (tempfd, (struct sockaddr *) &sun, +++ offsetof (struct sockaddr_un, sun_path) +++ + strlen (sun.sun_path) + 1) != 0); +++ +++ tempfname = strdup (sun.sun_path); +++ +++ tempfd2 = socket (AF_UNIX, SOCK_DGRAM, 0); +++ if (tempfd2 == -1) +++ { +++ printf ("%s: second socket call failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ int r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ if (arg != NULL) +++ { +++ r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: 2nd barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ } +++ +++ pthread_cleanup_push (cl, NULL); +++ +++ char mem[70]; +++ struct iovec iov[1]; +++ iov[0].iov_base = mem; +++ iov[0].iov_len = arg == NULL ? sizeof (mem) : 0; +++ +++ struct msghdr m; +++ m.msg_name = &sun; +++ m.msg_namelen = sizeof (sun); +++ m.msg_iov = iov; +++ m.msg_iovlen = 1; +++ m.msg_control = NULL; +++ m.msg_controllen = 0; +++ +++ recvmsg (tempfd2, &m, 0); +++ +++ pthread_cleanup_pop (0); +++ +++ printf ("%s: recvmsg returned\n", __FUNCTION__); +++ +++ exit (1); +++} +++ +++ +++static void * +++tf_open (void *arg) +++{ +++ if (arg == NULL) +++ // XXX If somebody can provide a portable test case in which open() +++ // blocks we can enable this test to run in both rounds. +++ abort (); +++ +++ int r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: 2nd barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ pthread_cleanup_push (cl, NULL); +++ +++ open ("Makefile", O_RDONLY); +++ +++ pthread_cleanup_pop (0); +++ +++ printf ("%s: open returned\n", __FUNCTION__); +++ +++ exit (1); +++} +++ +++ +++static void * +++tf_close (void *arg) +++{ +++ if (arg == NULL) +++ // XXX If somebody can provide a portable test case in which close() +++ // blocks we can enable this test to run in both rounds. +++ abort (); +++ +++ char fname[] = "/tmp/tst-cancel-fd-XXXXXX"; +++ tempfd = mkstemp (fname); +++ if (tempfd == -1) +++ { +++ printf ("%s: mkstemp failed\n", __FUNCTION__); +++ exit (1); +++ } +++ unlink (fname); +++ +++ int r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: 2nd barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ pthread_cleanup_push (cl, NULL); +++ +++ close (tempfd); +++ +++ pthread_cleanup_pop (0); +++ +++ printf ("%s: close returned\n", __FUNCTION__); +++ +++ exit (1); +++} +++ +++ +++static void * +++tf_pread (void *arg) +++{ +++ if (arg == NULL) +++ // XXX If somebody can provide a portable test case in which pread() +++ // blocks we can enable this test to run in both rounds. +++ abort (); +++ +++ tempfd = open ("Makefile", O_RDONLY); +++ if (tempfd == -1) +++ { +++ printf ("%s: cannot open Makefile\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ int r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: 2nd barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ pthread_cleanup_push (cl, NULL); +++ +++ char mem[10]; +++ pread (tempfd, mem, sizeof (mem), 0); +++ +++ pthread_cleanup_pop (0); +++ +++ printf ("%s: pread returned\n", __FUNCTION__); +++ +++ exit (1); +++} +++ +++ +++static void * +++tf_pwrite (void *arg) +++{ +++ if (arg == NULL) +++ // XXX If somebody can provide a portable test case in which pwrite() +++ // blocks we can enable this test to run in both rounds. +++ abort (); +++ +++ char fname[] = "/tmp/tst-cancel4-fd-XXXXXX"; +++ tempfd = mkstemp (fname); +++ if (tempfd == -1) +++ { +++ printf ("%s: mkstemp failed\n", __FUNCTION__); +++ exit (1); +++ } +++ unlink (fname); +++ +++ int r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: 2nd barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ pthread_cleanup_push (cl, NULL); +++ +++ char mem[10]; +++ pwrite (tempfd, mem, sizeof (mem), 0); +++ +++ pthread_cleanup_pop (0); +++ +++ printf ("%s: pwrite returned\n", __FUNCTION__); +++ +++ exit (1); +++} +++ +++ +++static void * +++tf_fsync (void *arg) +++{ +++ if (arg == NULL) +++ // XXX If somebody can provide a portable test case in which fsync() +++ // blocks we can enable this test to run in both rounds. +++ abort (); +++ +++ tempfd = open ("Makefile", O_RDONLY); +++ if (tempfd == -1) +++ { +++ printf ("%s: cannot open Makefile\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ int r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: 2nd barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ pthread_cleanup_push (cl, NULL); +++ +++ fsync (tempfd); +++ +++ pthread_cleanup_pop (0); +++ +++ printf ("%s: fsync returned\n", __FUNCTION__); +++ +++ exit (1); +++} +++ +++ +++static void * +++tf_fdatasync (void *arg) +++{ +++ if (arg == NULL) +++ // XXX If somebody can provide a portable test case in which fdatasync() +++ // blocks we can enable this test to run in both rounds. +++ abort (); +++ +++ tempfd = open ("Makefile", O_RDONLY); +++ if (tempfd == -1) +++ { +++ printf ("%s: cannot open Makefile\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ int r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: 2nd barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ pthread_cleanup_push (cl, NULL); +++ +++ fdatasync (tempfd); +++ +++ pthread_cleanup_pop (0); +++ +++ printf ("%s: fdatasync returned\n", __FUNCTION__); +++ +++ exit (1); +++} +++ +++ +++static void * +++tf_msync (void *arg) +++{ +++ if (arg == NULL) +++ // XXX If somebody can provide a portable test case in which msync() +++ // blocks we can enable this test to run in both rounds. +++ abort (); +++ +++ tempfd = open ("Makefile", O_RDONLY); +++ if (tempfd == -1) +++ { +++ printf ("%s: cannot open Makefile\n", __FUNCTION__); +++ exit (1); +++ } +++ void *p = mmap (NULL, 10, PROT_READ, MAP_SHARED, tempfd, 0); +++ if (p == MAP_FAILED) +++ { +++ printf ("%s: mmap failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ int r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: 2nd barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ pthread_cleanup_push (cl, NULL); +++ +++ msync (p, 10, 0); +++ +++ pthread_cleanup_pop (0); +++ +++ printf ("%s: msync returned\n", __FUNCTION__); +++ +++ exit (1); +++} +++ +++ +++static void * +++tf_sendto (void *arg) +++{ +++ if (arg == NULL) +++ // XXX If somebody can provide a portable test case in which sendto() +++ // blocks we can enable this test to run in both rounds. +++ abort (); +++ +++ struct sockaddr_un sun; +++ +++ tempfd = socket (AF_UNIX, SOCK_DGRAM, 0); +++ if (tempfd == -1) +++ { +++ printf ("%s: first socket call failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ int tries = 0; +++ do +++ { +++ if (++tries > 10) +++ { +++ printf ("%s: too many unsuccessful bind calls\n", __FUNCTION__); +++ } +++ +++ strcpy (sun.sun_path, "/tmp/tst-cancel4-socket-6-XXXXXX"); +++ if (mktemp (sun.sun_path) == NULL) +++ { +++ printf ("%s: cannot generate temp file name\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ sun.sun_family = AF_UNIX; +++ } +++ while (bind (tempfd, (struct sockaddr *) &sun, +++ offsetof (struct sockaddr_un, sun_path) +++ + strlen (sun.sun_path) + 1) != 0); +++ tempfname = strdup (sun.sun_path); +++ +++ tempfd2 = socket (AF_UNIX, SOCK_DGRAM, 0); +++ if (tempfd2 == -1) +++ { +++ printf ("%s: second socket call failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ int r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: 2nd barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ pthread_cleanup_push (cl, NULL); +++ +++ char mem[1]; +++ +++ sendto (tempfd2, mem, arg == NULL ? sizeof (mem) : 1, 0, +++ (struct sockaddr *) &sun, +++ offsetof (struct sockaddr_un, sun_path) + strlen (sun.sun_path) + 1); +++ +++ pthread_cleanup_pop (0); +++ +++ printf ("%s: sendto returned\n", __FUNCTION__); +++ +++ exit (1); +++} +++ +++ +++static void * +++tf_sendmsg (void *arg) +++{ +++ if (arg == NULL) +++ // XXX If somebody can provide a portable test case in which sendmsg() +++ // blocks we can enable this test to run in both rounds. +++ abort (); +++ +++ struct sockaddr_un sun; +++ +++ tempfd = socket (AF_UNIX, SOCK_DGRAM, 0); +++ if (tempfd == -1) +++ { +++ printf ("%s: first socket call failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ int tries = 0; +++ do +++ { +++ if (++tries > 10) +++ { +++ printf ("%s: too many unsuccessful bind calls\n", __FUNCTION__); +++ } +++ +++ strcpy (sun.sun_path, "/tmp/tst-cancel4-socket-7-XXXXXX"); +++ if (mktemp (sun.sun_path) == NULL) +++ { +++ printf ("%s: cannot generate temp file name\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ sun.sun_family = AF_UNIX; +++ } +++ while (bind (tempfd, (struct sockaddr *) &sun, +++ offsetof (struct sockaddr_un, sun_path) +++ + strlen (sun.sun_path) + 1) != 0); +++ tempfname = strdup (sun.sun_path); +++ +++ tempfd2 = socket (AF_UNIX, SOCK_DGRAM, 0); +++ if (tempfd2 == -1) +++ { +++ printf ("%s: second socket call failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ int r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: 2nd barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ pthread_cleanup_push (cl, NULL); +++ +++ char mem[1]; +++ struct iovec iov[1]; +++ iov[0].iov_base = mem; +++ iov[0].iov_len = 1; +++ +++ struct msghdr m; +++ m.msg_name = &sun; +++ m.msg_namelen = (offsetof (struct sockaddr_un, sun_path) +++ + strlen (sun.sun_path) + 1); +++ m.msg_iov = iov; +++ m.msg_iovlen = 1; +++ m.msg_control = NULL; +++ m.msg_controllen = 0; +++ +++ sendmsg (tempfd2, &m, 0); +++ +++ pthread_cleanup_pop (0); +++ +++ printf ("%s: sendmsg returned\n", __FUNCTION__); +++ +++ exit (1); +++} +++ +++ +++static void * +++tf_creat (void *arg) +++{ +++ if (arg == NULL) +++ // XXX If somebody can provide a portable test case in which sendmsg() +++ // blocks we can enable this test to run in both rounds. +++ abort (); +++ +++ int r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: 2nd barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ pthread_cleanup_push (cl, NULL); +++ +++ creat ("tmp/tst-cancel-4-should-not-exist", 0666); +++ +++ pthread_cleanup_pop (0); +++ +++ printf ("%s: creat returned\n", __FUNCTION__); +++ +++ exit (1); +++} +++ +++ +++static void * +++tf_connect (void *arg) +++{ +++ if (arg == NULL) +++ // XXX If somebody can provide a portable test case in which connect() +++ // blocks we can enable this test to run in both rounds. +++ abort (); +++ +++ struct sockaddr_un sun; +++ +++ tempfd = socket (AF_UNIX, SOCK_STREAM, 0); +++ if (tempfd == -1) +++ { +++ printf ("%s: first socket call failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ int tries = 0; +++ do +++ { +++ if (++tries > 10) +++ { +++ printf ("%s: too many unsuccessful bind calls\n", __FUNCTION__); +++ } +++ +++ strcpy (sun.sun_path, "/tmp/tst-cancel4-socket-2-XXXXXX"); +++ if (mktemp (sun.sun_path) == NULL) +++ { +++ printf ("%s: cannot generate temp file name\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ sun.sun_family = AF_UNIX; +++ } +++ while (bind (tempfd, (struct sockaddr *) &sun, +++ offsetof (struct sockaddr_un, sun_path) +++ + strlen (sun.sun_path) + 1) != 0); +++ tempfname = strdup (sun.sun_path); +++ +++ listen (tempfd, 5); +++ +++ tempfd2 = socket (AF_UNIX, SOCK_STREAM, 0); +++ if (tempfd2 == -1) +++ { +++ printf ("%s: second socket call failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ int r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ if (arg != NULL) +++ { +++ r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: 2nd barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ } +++ +++ pthread_cleanup_push (cl, NULL); +++ +++ connect (tempfd2, (struct sockaddr *) &sun, sizeof (sun)); +++ +++ pthread_cleanup_pop (0); +++ +++ printf ("%s: connect returned\n", __FUNCTION__); +++ +++ exit (1); +++} +++ +++ +++static void * +++tf_tcdrain (void *arg) +++{ +++ if (arg == NULL) +++ // XXX If somebody can provide a portable test case in which tcdrain() +++ // blocks we can enable this test to run in both rounds. +++ abort (); +++ +++ int r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ if (arg != NULL) +++ { +++ r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: 2nd barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ } +++ +++ pthread_cleanup_push (cl, NULL); +++ +++ /* Regardless of stderr being a terminal, the tcdrain call should be +++ canceled. */ +++ tcdrain (STDERR_FILENO); +++ +++ pthread_cleanup_pop (0); +++ +++ printf ("%s: tcdrain returned\n", __FUNCTION__); +++ +++ exit (1); +++} +++ +++ +++static void * +++tf_msgrcv (void *arg) +++{ +++ tempmsg = msgget (IPC_PRIVATE, 0666 | IPC_CREAT); +++ if (tempmsg == -1) +++ { +++ printf ("%s: msgget failed: %s\n", __FUNCTION__, strerror (errno)); +++ exit (1); +++ } +++ +++ int r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ if (arg != NULL) +++ { +++ r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: 2nd barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ } +++ +++ ssize_t s; +++ +++ pthread_cleanup_push (cl, NULL); +++ +++ struct +++ { +++ long int type; +++ char mem[10]; +++ } m; +++ int randnr; +++ /* We need a positive random number. */ +++ do +++ randnr = random () % 64000; +++ while (randnr <= 0); +++ do +++ { +++ errno = 0; +++ s = msgrcv (tempmsg, (struct msgbuf *) &m, 10, randnr, 0); +++ } +++ while (errno == EIDRM || errno == EINTR); +++ +++ pthread_cleanup_pop (0); +++ +++ printf ("%s: msgrcv returned %zd with errno = %m\n", __FUNCTION__, s); +++ +++ msgctl (tempmsg, IPC_RMID, NULL); +++ +++ exit (1); +++} +++ +++ +++static void * +++tf_msgsnd (void *arg) +++{ +++ if (arg == NULL) +++ // XXX If somebody can provide a portable test case in which msgsnd() +++ // blocks we can enable this test to run in both rounds. +++ abort (); +++ +++ tempmsg = msgget (IPC_PRIVATE, 0666 | IPC_CREAT); +++ if (tempmsg == -1) +++ { +++ printf ("%s: msgget failed: %s\n", __FUNCTION__, strerror (errno)); +++ exit (1); +++ } +++ +++ int r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: 2nd barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ pthread_cleanup_push (cl, NULL); +++ +++ struct +++ { +++ long int type; +++ char mem[1]; +++ } m; +++ /* We need a positive random number. */ +++ do +++ m.type = random () % 64000; +++ while (m.type <= 0); +++ msgsnd (tempmsg, (struct msgbuf *) &m, sizeof (m.mem), 0); +++ +++ pthread_cleanup_pop (0); +++ +++ printf ("%s: msgsnd returned\n", __FUNCTION__); +++ +++ msgctl (tempmsg, IPC_RMID, NULL); +++ +++ exit (1); +++} +++ +++ +++static struct +++{ +++ const char *name; +++ void *(*tf) (void *); +++ int nb; +++ int only_early; +++} tests[] = +++{ +++#define ADD_TEST(name, nbar, early) { #name, tf_##name, nbar, early } +++ ADD_TEST (read, 2, 0), +++ ADD_TEST (readv, 2, 0), +++ ADD_TEST (select, 2, 0), +++ ADD_TEST (pselect, 2, 0), +++ ADD_TEST (poll, 2, 0), +++ ADD_TEST (ppoll, 2, 0), +++ ADD_TEST (write, 2, 0), +++ ADD_TEST (writev, 2, 0), +++ ADD_TEST (sleep, 2, 0), +++ ADD_TEST (usleep, 2, 0), +++ ADD_TEST (nanosleep, 2, 0), +++ ADD_TEST (wait, 2, 0), +++ ADD_TEST (waitid, 2, 0), +++ ADD_TEST (waitpid, 2, 0), +++ ADD_TEST (sigpause, 2, 0), +++ ADD_TEST (sigsuspend, 2, 0), +++ ADD_TEST (sigwait, 2, 0), +++ ADD_TEST (sigwaitinfo, 2, 0), +++ ADD_TEST (sigtimedwait, 2, 0), +++ ADD_TEST (pause, 2, 0), +++ ADD_TEST (accept, 2, 0), +++ ADD_TEST (send, 2, 0), +++ ADD_TEST (recv, 2, 0), +++ ADD_TEST (recvfrom, 2, 0), +++ ADD_TEST (recvmsg, 2, 0), +++ ADD_TEST (open, 2, 1), +++ ADD_TEST (close, 2, 1), +++ ADD_TEST (pread, 2, 1), +++ ADD_TEST (pwrite, 2, 1), +++ ADD_TEST (fsync, 2, 1), +++ ADD_TEST (fdatasync, 2, 1), +++ ADD_TEST (msync, 2, 1), +++ ADD_TEST (sendto, 2, 1), +++ ADD_TEST (sendmsg, 2, 1), +++ ADD_TEST (creat, 2, 1), +++ ADD_TEST (connect, 2, 1), +++ ADD_TEST (tcdrain, 2, 1), +++ ADD_TEST (msgrcv, 2, 0), +++ ADD_TEST (msgsnd, 2, 1), +++}; +++#define ntest_tf (sizeof (tests) / sizeof (tests[0])) +++ +++ +++static int +++do_test (void) +++{ +++ int val; +++ socklen_t len; +++ +++#ifdef __FreeBSD_kernel__ +++ if (socketpair (AF_UNIX, SOCK_STREAM, 0, fds) != 0) +++#else +++ if (socketpair (AF_UNIX, SOCK_STREAM, PF_UNIX, fds) != 0) +++#endif +++ { +++ perror ("socketpair"); +++ exit (1); +++ } +++ +++ val = 1; +++ len = sizeof(val); +++ setsockopt (fds[1], SOL_SOCKET, SO_SNDBUF, &val, sizeof(val)); +++ if (getsockopt (fds[1], SOL_SOCKET, SO_SNDBUF, &val, &len) < 0) +++ { +++ perror ("getsockopt"); +++ exit (1); +++ } +++ if (val >= WRITE_BUFFER_SIZE) +++ { +++ puts ("minimum write buffer size too large"); +++ exit (1); +++ } +++ setsockopt (fds[1], SOL_SOCKET, SO_SNDBUF, &val, sizeof(val)); +++ +++ int result = 0; +++ size_t cnt; +++ for (cnt = 0; cnt < ntest_tf; ++cnt) +++ { +++ if (tests[cnt].only_early) +++ continue; +++ +++ if (pthread_barrier_init (&b2, NULL, tests[cnt].nb) != 0) +++ { +++ puts ("b2 init failed"); +++ exit (1); +++ } +++ +++ /* Reset the counter for the cleanup handler. */ +++ cl_called = 0; +++ +++ pthread_t th; +++ if (pthread_create (&th, NULL, tests[cnt].tf, NULL) != 0) +++ { +++ printf ("create for '%s' test failed\n", tests[cnt].name); +++ result = 1; +++ continue; +++ } +++ +++ int r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: barrier_wait failed\n", __FUNCTION__); +++ result = 1; +++ continue; +++ } +++ +++ struct timespec ts = { .tv_sec = 0, .tv_nsec = 100000000 }; +++ while (nanosleep (&ts, &ts) != 0) +++ continue; +++ +++ if (pthread_cancel (th) != 0) +++ { +++ printf ("cancel for '%s' failed\n", tests[cnt].name); +++ result = 1; +++ continue; +++ } +++ +++ void *status; +++ if (pthread_join (th, &status) != 0) +++ { +++ printf ("join for '%s' failed\n", tests[cnt].name); +++ result = 1; +++ continue; +++ } +++ if (status != PTHREAD_CANCELED) +++ { +++ printf ("thread for '%s' not canceled\n", tests[cnt].name); +++ result = 1; +++ continue; +++ } +++ +++ if (pthread_barrier_destroy (&b2) != 0) +++ { +++ puts ("barrier_destroy failed"); +++ result = 1; +++ continue; +++ } +++ +++ if (cl_called == 0) +++ { +++ printf ("cleanup handler not called for '%s'\n", tests[cnt].name); +++ result = 1; +++ continue; +++ } +++ if (cl_called > 1) +++ { +++ printf ("cleanup handler called more than once for '%s'\n", +++ tests[cnt].name); +++ result = 1; +++ continue; +++ } +++ +++ printf ("in-time cancel test of '%s' successful\n", tests[cnt].name); +++ +++ if (tempfd != -1) +++ { +++ close (tempfd); +++ tempfd = -1; +++ } +++ if (tempfd2 != -1) +++ { +++ close (tempfd2); +++ tempfd2 = -1; +++ } +++ if (tempfname != NULL) +++ { +++ unlink (tempfname); +++ free (tempfname); +++ tempfname = NULL; +++ } +++ if (tempmsg != -1) +++ { +++ msgctl (tempmsg, IPC_RMID, NULL); +++ tempmsg = -1; +++ } +++ } +++ +++ for (cnt = 0; cnt < ntest_tf; ++cnt) +++ { +++ if (pthread_barrier_init (&b2, NULL, tests[cnt].nb) != 0) +++ { +++ puts ("b2 init failed"); +++ exit (1); +++ } +++ +++ /* Reset the counter for the cleanup handler. */ +++ cl_called = 0; +++ +++ pthread_t th; +++ if (pthread_create (&th, NULL, tests[cnt].tf, (void *) 1l) != 0) +++ { +++ printf ("create for '%s' test failed\n", tests[cnt].name); +++ result = 1; +++ continue; +++ } +++ +++ int r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: barrier_wait failed\n", __FUNCTION__); +++ result = 1; +++ continue; +++ } +++ +++ if (pthread_cancel (th) != 0) +++ { +++ printf ("cancel for '%s' failed\n", tests[cnt].name); +++ result = 1; +++ continue; +++ } +++ +++ r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: barrier_wait failed\n", __FUNCTION__); +++ result = 1; +++ continue; +++ } +++ +++ void *status; +++ if (pthread_join (th, &status) != 0) +++ { +++ printf ("join for '%s' failed\n", tests[cnt].name); +++ result = 1; +++ continue; +++ } +++ if (status != PTHREAD_CANCELED) +++ { +++ printf ("thread for '%s' not canceled\n", tests[cnt].name); +++ result = 1; +++ continue; +++ } +++ +++ if (pthread_barrier_destroy (&b2) != 0) +++ { +++ puts ("barrier_destroy failed"); +++ result = 1; +++ continue; +++ } +++ +++ if (cl_called == 0) +++ { +++ printf ("cleanup handler not called for '%s'\n", tests[cnt].name); +++ result = 1; +++ continue; +++ } +++ if (cl_called > 1) +++ { +++ printf ("cleanup handler called more than once for '%s'\n", +++ tests[cnt].name); +++ result = 1; +++ continue; +++ } +++ +++ printf ("early cancel test of '%s' successful\n", tests[cnt].name); +++ +++ if (tempfd != -1) +++ { +++ close (tempfd); +++ tempfd = -1; +++ } +++ if (tempfd2 != -1) +++ { +++ close (tempfd2); +++ tempfd2 = -1; +++ } +++ if (tempfname != NULL) +++ { +++ unlink (tempfname); +++ free (tempfname); +++ tempfname = NULL; +++ } +++ if (tempmsg != -1) +++ { +++ msgctl (tempmsg, IPC_RMID, NULL); +++ tempmsg = -1; +++ } +++ } +++ +++ return result; +++} +++ +++#define TIMEOUT 60 +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-cancel5.c ++@@ -0,0 +1 @@ +++#include "tst-cancel4.c" ++--- /dev/null +++++ b/fbtl/tst-cancel6.c ++@@ -0,0 +1,78 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++ +++ +++static void * +++tf (void *arg) +++{ +++ char buf[100]; +++ fgets (buf, sizeof (buf), arg); +++ /* This call should never return. */ +++ return NULL; +++} +++ +++ +++static int +++do_test (void) +++{ +++ int fd[2]; +++ if (pipe (fd) != 0) +++ { +++ puts ("pipe failed"); +++ return 1; +++ } +++ +++ FILE *fp = fdopen (fd[0], "r"); +++ if (fp == NULL) +++ { +++ puts ("fdopen failed"); +++ return 1; +++ } +++ +++ pthread_t th; +++ if (pthread_create (&th, NULL, tf, fp) != 0) +++ { +++ puts ("pthread_create failed"); +++ return 1; +++ } +++ +++ sleep (1); +++ +++ if (pthread_cancel (th) != 0) +++ { +++ puts ("pthread_cancel failed"); +++ return 1; +++ } +++ +++ void *r; +++ if (pthread_join (th, &r) != 0) +++ { +++ puts ("pthread_join failed"); +++ return 1; +++ } +++ +++ return r != PTHREAD_CANCELED; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-cancel7.c ++@@ -0,0 +1,210 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Jakub Jelinek , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++const char *command; +++const char *pidfile; +++char pidfilename[] = "/tmp/tst-cancel7-XXXXXX"; +++ +++static void * +++tf (void *arg) +++{ +++ const char *args = " --direct --pidfile "; +++ char *cmd = alloca (strlen (command) + strlen (args) +++ + strlen (pidfilename) + 1); +++ +++ strcpy (stpcpy (stpcpy (cmd, command), args), pidfilename); +++ system (cmd); +++ /* This call should never return. */ +++ return NULL; +++} +++ +++ +++static void +++sl (void) +++{ +++ FILE *f = fopen (pidfile, "w"); +++ if (f == NULL) +++ exit (1); +++ +++ fprintf (f, "%lld\n", (long long) getpid ()); +++ fflush (f); +++ +++ struct flock fl = +++ { +++ .l_type = F_WRLCK, +++ .l_start = 0, +++ .l_whence = SEEK_SET, +++ .l_len = 1 +++ }; +++ if (fcntl (fileno (f), F_SETLK, &fl) != 0) +++ exit (1); +++ +++ sigset_t ss; +++ sigfillset (&ss); +++ sigsuspend (&ss); +++ exit (0); +++} +++ +++ +++static void +++do_prepare (int argc, char *argv[]) +++{ +++ if (command == NULL) +++ command = argv[0]; +++ +++ if (pidfile) +++ sl (); +++ +++ int fd = mkstemp (pidfilename); +++ if (fd == -1) +++ { +++ puts ("mkstemp failed"); +++ exit (1); +++ } +++ +++ write (fd, " ", 1); +++ close (fd); +++} +++ +++ +++static int +++do_test (void) +++{ +++ pthread_t th; +++ if (pthread_create (&th, NULL, tf, NULL) != 0) +++ { +++ puts ("pthread_create failed"); +++ return 1; +++ } +++ +++ do +++ sleep (1); +++ while (access (pidfilename, R_OK) != 0); +++ +++ if (pthread_cancel (th) != 0) +++ { +++ puts ("pthread_cancel failed"); +++ return 1; +++ } +++ +++ void *r; +++ if (pthread_join (th, &r) != 0) +++ { +++ puts ("pthread_join failed"); +++ return 1; +++ } +++ +++ sleep (1); +++ +++ FILE *f = fopen (pidfilename, "r+"); +++ if (f == NULL) +++ { +++ puts ("no pidfile"); +++ return 1; +++ } +++ +++ long long ll; +++ if (fscanf (f, "%lld\n", &ll) != 1) +++ { +++ puts ("could not read pid"); +++ unlink (pidfilename); +++ return 1; +++ } +++ +++ struct flock fl = +++ { +++ .l_type = F_WRLCK, +++ .l_start = 0, +++ .l_whence = SEEK_SET, +++ .l_len = 1 +++ }; +++ if (fcntl (fileno (f), F_GETLK, &fl) != 0) +++ { +++ puts ("F_GETLK failed"); +++ unlink (pidfilename); +++ return 1; +++ } +++ +++ if (fl.l_type != F_UNLCK) +++ { +++ printf ("child %lld still running\n", (long long) fl.l_pid); +++ if (fl.l_pid == ll) +++ kill (fl.l_pid, SIGKILL); +++ +++ unlink (pidfilename); +++ return 1; +++ } +++ +++ fclose (f); +++ +++ unlink (pidfilename); +++ +++ return r != PTHREAD_CANCELED; +++} +++ +++static void +++do_cleanup (void) +++{ +++ FILE *f = fopen (pidfilename, "r+"); +++ long long ll; +++ +++ if (f != NULL && fscanf (f, "%lld\n", &ll) == 1) +++ { +++ struct flock fl = +++ { +++ .l_type = F_WRLCK, +++ .l_start = 0, +++ .l_whence = SEEK_SET, +++ .l_len = 1 +++ }; +++ if (fcntl (fileno (f), F_GETLK, &fl) == 0 && fl.l_type != F_UNLCK +++ && fl.l_pid == ll) +++ kill (fl.l_pid, SIGKILL); +++ +++ fclose (f); +++ } +++ +++ unlink (pidfilename); +++} +++ +++#define OPT_COMMAND 10000 +++#define OPT_PIDFILE 10001 +++#define CMDLINE_OPTIONS \ +++ { "command", required_argument, NULL, OPT_COMMAND }, \ +++ { "pidfile", required_argument, NULL, OPT_PIDFILE }, +++#define CMDLINE_PROCESS \ +++ case OPT_COMMAND: \ +++ command = optarg; \ +++ break; \ +++ case OPT_PIDFILE: \ +++ pidfile = optarg; \ +++ break; +++#define CLEANUP_HANDLER do_cleanup () +++#define PREPARE(argc, argv) do_prepare (argc, argv) +++#define TEST_FUNCTION do_test () +++#define TIMEOUT 5 +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-cancel8.c ++@@ -0,0 +1,142 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++ +++ +++static pthread_barrier_t bar; +++ +++static int global; +++ +++ +++static void +++cleanup (void *arg) +++{ +++ global = 1; +++} +++ +++ +++static void * +++tf (void *arg) +++{ +++ /* Enable cancellation, but defer it. */ +++ if (pthread_setcancelstate (PTHREAD_CANCEL_ENABLE, NULL) != 0) +++ { +++ puts ("setcancelstate failed"); +++ exit (1); +++ } +++ if (pthread_setcanceltype (PTHREAD_CANCEL_DEFERRED, NULL) != 0) +++ { +++ puts ("setcanceltype failed"); +++ exit (1); +++ } +++ +++ /* Add cleanup handler. */ +++ pthread_cleanup_push (cleanup, NULL); +++ +++ /* Synchronize with the main thread. */ +++ int r = pthread_barrier_wait (&bar); +++ if (r != 0 && r!= PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("tf: first barrier_wait failed"); +++ exit (1); +++ } +++ +++ /* And again. Once this is done the main thread should have canceled +++ this thread. */ +++ r = pthread_barrier_wait (&bar); +++ if (r != 0 && r!= PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("tf: second barrier_wait failed"); +++ exit (1); +++ } +++ +++ /* Remove the cleanup handler without executing it. */ +++ pthread_cleanup_pop (0); +++ +++ /* Now react on the cancellation. */ +++ pthread_testcancel (); +++ +++ /* This call should never return. */ +++ return NULL; +++} +++ +++ +++static int +++do_test (void) +++{ +++ if (pthread_barrier_init (&bar, NULL, 2) != 0) +++ { +++ puts ("barrier_init failed"); +++ exit (1); +++ } +++ +++ pthread_t th; +++ if (pthread_create (&th, NULL, tf, NULL) != 0) +++ { +++ puts ("pthread_create failed"); +++ return 1; +++ } +++ +++ int r = pthread_barrier_wait (&bar); +++ if (r != 0 && r!= PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("first barrier_wait failed"); +++ exit (1); +++ } +++ +++ if (pthread_cancel (th) != 0) +++ { +++ puts ("pthread_cancel failed"); +++ return 1; +++ } +++ +++ r = pthread_barrier_wait (&bar); +++ if (r != 0 && r!= PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("second barrier_wait failed"); +++ exit (1); +++ } +++ +++ void *result; +++ if (pthread_join (th, &result) != 0) +++ { +++ puts ("pthread_join failed"); +++ return 1; +++ } +++ +++ if (result != PTHREAD_CANCELED) +++ { +++ puts ("thread was not canceled"); +++ exit (1); +++ } +++ +++ if (global != 0) +++ { +++ puts ("cancellation handler has been called"); +++ exit (1); +++ } +++ +++ return 0; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-cancel9.c ++@@ -0,0 +1,125 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++static pthread_barrier_t b; +++ +++ +++static void +++cleanup (void *arg) +++{ +++ fputs ("in cleanup\n", stdout); +++} +++ +++ +++static void * +++tf (void *arg) +++{ +++ int fd = open ("/dev/null", O_RDWR); +++ if (fd == -1) +++ { +++ puts ("cannot open /dev/null"); +++ exit (1); +++ } +++ FILE *fp = fdopen (fd, "w"); +++ if (fp == NULL) +++ { +++ puts ("fdopen failed"); +++ exit (1); +++ } +++ +++ pthread_cleanup_push (cleanup, NULL); +++ +++ int e = pthread_barrier_wait (&b); +++ if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("barrier_wait failed"); +++ exit (1); +++ } +++ +++ while (1) +++ /* fprintf() uses write() which is a cancallation point. */ +++ fprintf (fp, "foo"); +++ +++ pthread_cleanup_pop (0); +++ +++ return NULL; +++} +++ +++ +++static int +++do_test (void) +++{ +++ if (pthread_barrier_init (&b, NULL, 2) != 0) +++ { +++ puts ("barrier_init failed"); +++ exit (1); +++ } +++ +++ pthread_t th; +++ if (pthread_create (&th, NULL, tf, NULL) != 0) +++ { +++ puts ("create failed"); +++ return 1; +++ } +++ +++ int e = pthread_barrier_wait (&b); +++ if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("barrier_wait failed"); +++ exit (1); +++ } +++ +++ sleep (1); +++ +++ puts ("cancel now"); +++ +++ if (pthread_cancel (th) != 0) +++ { +++ puts ("cancel failed"); +++ exit (1); +++ } +++ +++ puts ("waiting for the child"); +++ +++ void *r; +++ if (pthread_join (th, &r) != 0) +++ { +++ puts ("join failed"); +++ exit (1); +++ } +++ +++ if (r != PTHREAD_CANCELED) +++ { +++ puts ("thread wasn't canceled"); +++ exit (1); +++ } +++ +++ return 0; +++} +++ +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-cancelx1.c ++@@ -0,0 +1 @@ +++#include "tst-cancel1.c" ++--- /dev/null +++++ b/fbtl/tst-cancelx10.c ++@@ -0,0 +1 @@ +++#include "tst-cancel10.c" ++--- /dev/null +++++ b/fbtl/tst-cancelx11.c ++@@ -0,0 +1 @@ +++#include "tst-cancel11.c" ++--- /dev/null +++++ b/fbtl/tst-cancelx12.c ++@@ -0,0 +1 @@ +++#include "tst-cancel12.c" ++--- /dev/null +++++ b/fbtl/tst-cancelx13.c ++@@ -0,0 +1 @@ +++#include "tst-cancel13.c" ++--- /dev/null +++++ b/fbtl/tst-cancelx14.c ++@@ -0,0 +1 @@ +++#include "tst-cancel14.c" ++--- /dev/null +++++ b/fbtl/tst-cancelx15.c ++@@ -0,0 +1 @@ +++#include "tst-cancel15.c" ++--- /dev/null +++++ b/fbtl/tst-cancelx16.c ++@@ -0,0 +1 @@ +++#include "tst-cancel16.c" ++--- /dev/null +++++ b/fbtl/tst-cancelx17.c ++@@ -0,0 +1 @@ +++#include "tst-cancel17.c" ++--- /dev/null +++++ b/fbtl/tst-cancelx18.c ++@@ -0,0 +1 @@ +++#include "tst-cancel18.c" ++--- /dev/null +++++ b/fbtl/tst-cancelx2.c ++@@ -0,0 +1 @@ +++#include "tst-cancel2.c" ++--- /dev/null +++++ b/fbtl/tst-cancelx20.c ++@@ -0,0 +1 @@ +++#include "tst-cancel20.c" ++--- /dev/null +++++ b/fbtl/tst-cancelx21.c ++@@ -0,0 +1 @@ +++#include "tst-cancel21.c" ++--- /dev/null +++++ b/fbtl/tst-cancelx3.c ++@@ -0,0 +1 @@ +++#include "tst-cancel3.c" ++--- /dev/null +++++ b/fbtl/tst-cancelx4.c ++@@ -0,0 +1 @@ +++#include "tst-cancel4.c" ++--- /dev/null +++++ b/fbtl/tst-cancelx5.c ++@@ -0,0 +1 @@ +++#include "tst-cancel5.c" ++--- /dev/null +++++ b/fbtl/tst-cancelx6.c ++@@ -0,0 +1 @@ +++#include "tst-cancel6.c" ++--- /dev/null +++++ b/fbtl/tst-cancelx7.c ++@@ -0,0 +1 @@ +++#include "tst-cancel7.c" ++--- /dev/null +++++ b/fbtl/tst-cancelx8.c ++@@ -0,0 +1 @@ +++#include "tst-cancel8.c" ++--- /dev/null +++++ b/fbtl/tst-cancelx9.c ++@@ -0,0 +1 @@ +++#include "tst-cancel9.c" ++--- /dev/null +++++ b/fbtl/tst-cleanup0.c ++@@ -0,0 +1,75 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++ +++ +++static int global; +++ +++ +++static void +++ch (void *arg) +++{ +++ int val = (long int) arg; +++ +++ printf ("ch (%d)\n", val); +++ +++ global *= val; +++ global += val; +++} +++ +++ +++static void +++endfct (void) +++{ +++ /* We force exit right here. */ +++ _exit (global); +++} +++ +++ +++static int +++do_test (void) +++{ +++ atexit (endfct); +++ +++ pthread_cancel (pthread_self ()); +++ +++ pthread_cleanup_push (ch, (void *) 1l); +++ +++ pthread_cleanup_push (ch, (void *) 2l); +++ +++ pthread_cleanup_push (ch, (void *) 3l); +++ +++ pthread_setcanceltype (PTHREAD_CANCEL_ASYNCHRONOUS, NULL); +++ +++ pthread_cleanup_pop (1); +++ +++ pthread_cleanup_pop (1); +++ +++ pthread_cleanup_pop (1); +++ +++ return 100; +++} +++ +++ +++#define EXPECTED_STATUS 9 +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-cleanup0.expect ++@@ -0,0 +1,3 @@ +++ch (3) +++ch (2) +++ch (1) ++--- /dev/null +++++ b/fbtl/tst-cleanup1.c ++@@ -0,0 +1,99 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++ +++ +++static int global; +++ +++ +++static void +++ch (void *arg) +++{ +++ int val = (long int) arg; +++ +++ printf ("ch (%d)\n", val); +++ +++ global *= val; +++ global += val; +++} +++ +++ +++static void * +++tf (void *a) +++{ +++ pthread_cancel (pthread_self ()); +++ +++ pthread_cleanup_push (ch, (void *) 1l); +++ +++ pthread_cleanup_push (ch, (void *) 2l); +++ +++ pthread_cleanup_push (ch, (void *) 3l); +++ +++ pthread_setcanceltype (PTHREAD_CANCEL_ASYNCHRONOUS, NULL); +++ +++ pthread_cleanup_pop (1); +++ +++ pthread_cleanup_pop (1); +++ +++ pthread_cleanup_pop (1); +++ +++ return NULL; +++} +++ +++ +++int +++do_test (void) +++{ +++ pthread_t th; +++ +++ if (pthread_create (&th, NULL, tf, NULL) != 0) +++ { +++ write (2, "create failed\n", 14); +++ _exit (1); +++ } +++ +++ void *r; +++ int e; +++ if ((e = pthread_join (th, &r)) != 0) +++ { +++ printf ("join failed: %d\n", e); +++ _exit (1); +++ } +++ +++ if (r != PTHREAD_CANCELED) +++ { +++ puts ("thread not canceled"); +++ exit (1); +++ } +++ +++ if (global != 9) +++ { +++ printf ("global = %d, expected 9\n", global); +++ exit (1); +++ } +++ +++ return 0; +++} +++ +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-cleanup2.c ++@@ -0,0 +1,62 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Bao Duong , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++ +++static sigjmp_buf jmpbuf; +++ +++static void +++sig_handler (int signo) +++{ +++ siglongjmp (jmpbuf, 1); +++} +++ +++static int +++do_test (void) +++{ +++ char *p = NULL; +++ struct sigaction sa; +++ +++ sa.sa_handler = sig_handler; +++ sigemptyset (&sa.sa_mask); +++ sa.sa_flags = SA_SIGINFO; +++ +++ if (sigaction (SIGSEGV, &sa, 0)) +++ { +++ perror ("installing SIGSEGV handler\n"); +++ exit (1); +++ } +++ +++ puts ("Attempting to sprintf to null ptr"); +++ if (setjmp (jmpbuf)) +++ { +++ puts ("Exiting main..."); +++ return 0; +++ } +++ +++ sprintf (p, "This should segv\n"); +++ +++ return 1; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-cleanup3.c ++@@ -0,0 +1,97 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++ +++ +++static int global; +++ +++ +++static void +++ch (void *arg) +++{ +++ int val = (long int) arg; +++ +++ printf ("ch (%d)\n", val); +++ +++ global *= val; +++ global += val; +++} +++ +++ +++static void * +++tf (void *a) +++{ +++ pthread_cleanup_push (ch, (void *) 1l); +++ +++ pthread_cleanup_push (ch, (void *) 2l); +++ +++ pthread_cleanup_push (ch, (void *) 3l); +++ +++ pthread_exit ((void *) 1l); +++ +++ pthread_cleanup_pop (1); +++ +++ pthread_cleanup_pop (1); +++ +++ pthread_cleanup_pop (1); +++ +++ return NULL; +++} +++ +++ +++int +++do_test (void) +++{ +++ pthread_t th; +++ +++ if (pthread_create (&th, NULL, tf, NULL) != 0) +++ { +++ write (2, "create failed\n", 14); +++ _exit (1); +++ } +++ +++ void *r; +++ int e; +++ if ((e = pthread_join (th, &r)) != 0) +++ { +++ printf ("join failed: %d\n", e); +++ _exit (1); +++ } +++ +++ if (r != (void *) 1l) +++ { +++ puts ("thread not canceled"); +++ exit (1); +++ } +++ +++ if (global != 9) +++ { +++ printf ("global = %d, expected 9\n", global); +++ exit (1); +++ } +++ +++ return 0; +++} +++ +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-cleanup4.c ++@@ -0,0 +1,197 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Jakub Jelinek , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++ +++/* LinuxThreads pthread_cleanup_{push,pop} helpers. */ +++extern void _pthread_cleanup_push (struct _pthread_cleanup_buffer *__buffer, +++ void (*__routine) (void *), +++ void *__arg); +++extern void _pthread_cleanup_pop (struct _pthread_cleanup_buffer *__buffer, +++ int __execute); +++ +++static int fds[2]; +++static pthread_barrier_t b2; +++static int global; +++ +++/* Defined in tst-cleanup4aux.c, never compiled with -fexceptions. */ +++extern void fn5 (void); +++extern void fn7 (void); +++extern void fn9 (void); +++ +++void +++clh (void *arg) +++{ +++ int val = (long int) arg; +++ +++ printf ("clh (%d)\n", val); +++ +++ global *= val; +++ global += val; +++} +++ +++ +++static __attribute__((noinline)) void +++fn_read (void) +++{ +++ int r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ char c; +++ read (fds[0], &c, 1); +++} +++ +++ +++__attribute__((noinline)) void +++fn0 (void) +++{ +++ pthread_cleanup_push (clh, (void *) 1l); +++ +++ fn_read (); +++ +++ pthread_cleanup_pop (1); +++} +++ +++ +++__attribute__((noinline)) void +++fn1 (void) +++{ +++ /* This is the old LinuxThreads pthread_cleanup_{push,pop}. */ +++ struct _pthread_cleanup_buffer b; +++ _pthread_cleanup_push (&b, clh, (void *) 2l); +++ +++ fn0 (); +++ +++ _pthread_cleanup_pop (&b, 1); +++} +++ +++ +++static __attribute__((noinline)) void +++fn2 (void) +++{ +++ pthread_cleanup_push (clh, (void *) 3l); +++ +++ fn1 (); +++ +++ pthread_cleanup_pop (1); +++} +++ +++ +++static void * +++tf (void *a) +++{ +++ switch ((long) a) +++ { +++ case 0: +++ fn2 (); +++ break; +++ case 1: +++ fn5 (); +++ break; +++ case 2: +++ fn7 (); +++ break; +++ case 3: +++ fn9 (); +++ break; +++ } +++ +++ return NULL; +++} +++ +++ +++int +++do_test (void) +++{ +++ int result = 0; +++ +++ if (pipe (fds) != 0) +++ { +++ puts ("pipe failed"); +++ exit (1); +++ } +++ +++ if (pthread_barrier_init (&b2, NULL, 2) != 0) +++ { +++ puts ("b2 init failed"); +++ exit (1); +++ } +++ +++ const int expect[] = +++ { +++ 15, /* 1 2 3 */ +++ 276, /* 1 4 5 6 */ +++ 120, /* 1 7 8 */ +++ 460 /* 1 2 9 10 */ +++ }; +++ +++ long i; +++ for (i = 0; i < 4; ++i) +++ { +++ global = 0; +++ +++ printf ("test %ld\n", i); +++ +++ pthread_t th; +++ if (pthread_create (&th, NULL, tf, (void *) i) != 0) +++ { +++ puts ("create failed"); +++ exit (1); +++ } +++ +++ int e = pthread_barrier_wait (&b2); +++ if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: barrier_wait failed\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ pthread_cancel (th); +++ +++ void *r; +++ if ((e = pthread_join (th, &r)) != 0) +++ { +++ printf ("join failed: %d\n", e); +++ _exit (1); +++ } +++ +++ if (r != PTHREAD_CANCELED) +++ { +++ puts ("thread not canceled"); +++ exit (1); +++ } +++ +++ if (global != expect[i]) +++ { +++ printf ("global = %d, expected %d\n", global, expect[i]); +++ result = 1; +++ } +++ } +++ +++ return result; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-cleanup4aux.c ++@@ -0,0 +1,120 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Jakub Jelinek , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++ +++extern void _pthread_cleanup_push (struct _pthread_cleanup_buffer *__buffer, +++ void (*__routine) (void *), +++ void *__arg); +++extern void _pthread_cleanup_pop (struct _pthread_cleanup_buffer *__buffer, +++ int __execute); +++ +++extern void clh (void *arg); +++extern void fn0 (void); +++extern void fn1 (void); +++extern void fn5 (void); +++extern void fn7 (void); +++extern void fn9 (void); +++ +++ +++static __attribute__((noinline)) void +++fn3 (void) +++{ +++ /* This is the old LinuxThreads pthread_cleanup_{push,pop}. */ +++ struct _pthread_cleanup_buffer b; +++ _pthread_cleanup_push (&b, clh, (void *) 4l); +++ +++ fn0 (); +++ +++ _pthread_cleanup_pop (&b, 1); +++} +++ +++ +++static __attribute__((noinline)) void +++fn4 (void) +++{ +++ pthread_cleanup_push (clh, (void *) 5l); +++ +++ fn3 (); +++ +++ pthread_cleanup_pop (1); +++} +++ +++ +++void +++fn5 (void) +++{ +++ /* This is the old LinuxThreads pthread_cleanup_{push,pop}. */ +++ struct _pthread_cleanup_buffer b; +++ _pthread_cleanup_push (&b, clh, (void *) 6l); +++ +++ fn4 (); +++ +++ _pthread_cleanup_pop (&b, 1); +++} +++ +++ +++static __attribute__((noinline)) void +++fn6 (void) +++{ +++ pthread_cleanup_push (clh, (void *) 7l); +++ +++ fn0 (); +++ +++ pthread_cleanup_pop (1); +++} +++ +++ +++void +++fn7 (void) +++{ +++ /* This is the old LinuxThreads pthread_cleanup_{push,pop}. */ +++ struct _pthread_cleanup_buffer b; +++ _pthread_cleanup_push (&b, clh, (void *) 8l); +++ +++ fn6 (); +++ +++ _pthread_cleanup_pop (&b, 1); +++} +++ +++ +++static __attribute__((noinline)) void +++fn8 (void) +++{ +++ pthread_cleanup_push (clh, (void *) 9l); +++ +++ fn1 (); +++ +++ pthread_cleanup_pop (1); +++} +++ +++ +++void +++fn9 (void) +++{ +++ /* This is the old LinuxThreads pthread_cleanup_{push,pop}. */ +++ struct _pthread_cleanup_buffer b; +++ _pthread_cleanup_push (&b, clh, (void *) 10l); +++ +++ fn8 (); +++ +++ _pthread_cleanup_pop (&b, 1); +++} ++--- /dev/null +++++ b/fbtl/tst-cleanupx0.c ++@@ -0,0 +1 @@ +++#include "tst-cleanup0.c" ++--- /dev/null +++++ b/fbtl/tst-cleanupx0.expect ++@@ -0,0 +1,3 @@ +++ch (3) +++ch (2) +++ch (1) ++--- /dev/null +++++ b/fbtl/tst-cleanupx1.c ++@@ -0,0 +1 @@ +++#include "tst-cleanup1.c" ++--- /dev/null +++++ b/fbtl/tst-cleanupx2.c ++@@ -0,0 +1 @@ +++#include "tst-cleanup2.c" ++--- /dev/null +++++ b/fbtl/tst-cleanupx3.c ++@@ -0,0 +1 @@ +++#include "tst-cleanup3.c" ++--- /dev/null +++++ b/fbtl/tst-cleanupx4.c ++@@ -0,0 +1 @@ +++#include "tst-cleanup4.c" ++--- /dev/null +++++ b/fbtl/tst-clock1.c ++@@ -0,0 +1,50 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++ +++ +++int +++do_test (void) +++{ +++#if defined _POSIX_THREAD_CPUTIME && _POSIX_THREAD_CPUTIME >= 0 +++ clockid_t cl; +++ /* This is really only a linking-test here. */ +++ int e = pthread_getcpuclockid (pthread_self (), &cl); +++ if (e != 0) +++ { +++# if _POSIX_THREAD_CPUTIME == 0 +++ if (sysconf (_SC_THREAD_CPUTIME) >= 0) +++# endif +++ { +++ puts ("cpuclock advertized, but cannot get ID"); +++ exit (1); +++ } +++ } +++#endif +++ +++ return 0; +++} +++ +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-clock2.c ++@@ -0,0 +1,201 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++#if defined _POSIX_THREAD_CPUTIME && _POSIX_THREAD_CPUTIME >= 0 +++static pthread_barrier_t b2; +++static pthread_barrier_t bN; +++ +++ +++static void * +++tf (void *arg) +++{ +++ int e = pthread_barrier_wait (&b2); +++ if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("barrier_wait failed"); +++ exit (1); +++ } +++ +++ e = pthread_barrier_wait (&bN); +++ if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("barrier_wait failed"); +++ exit (1); +++ } +++ +++ return NULL; +++} +++#endif +++ +++ +++int +++do_test (void) +++{ +++#if defined _POSIX_THREAD_CPUTIME && _POSIX_THREAD_CPUTIME >= 0 +++# define N 10 +++ +++# if _POSIX_THREAD_CPUTIME == 0 +++ if (sysconf (_SC_THREAD_CPUTIME) < 0) +++ { +++ puts ("_POSIX_THREAD_CPUTIME option not available"); +++ return 0; +++ } +++# endif +++ +++ if (pthread_barrier_init (&b2, NULL, 2) != 0 +++ || pthread_barrier_init (&bN, NULL, N + 1) != 0) +++ { +++ puts ("barrier_init failed"); +++ return 1; +++ } +++ +++ struct timespec ts = { .tv_sec = 0, .tv_nsec = 100000000 }; +++ TEMP_FAILURE_RETRY (nanosleep (&ts, &ts)); +++ +++ pthread_t th[N + 1]; +++ clockid_t cl[N + 1]; +++# ifndef CLOCK_THREAD_CPUTIME_ID +++ if (pthread_getcpuclockid (pthread_self (), &cl[0]) != 0) +++ { +++ puts ("own pthread_getcpuclockid failed"); +++ return 1; +++ } +++# else +++ cl[0] = CLOCK_THREAD_CPUTIME_ID; +++# endif +++ +++ pthread_attr_t at; +++ +++ if (pthread_attr_init (&at) != 0) +++ { +++ puts ("attr_init failed"); +++ return 1; +++ } +++ +++ if (pthread_attr_setstacksize (&at, 1 * 1024 * 1024) != 0) +++ { +++ puts ("attr_setstacksize failed"); +++ return 1; +++ } +++ +++ int i; +++ int e; +++ for (i = 0; i < N; ++i) +++ { +++ if (pthread_create (&th[i], &at, tf, NULL) != 0) +++ { +++ puts ("create failed"); +++ return 1; +++ } +++ +++ e = pthread_barrier_wait (&b2); +++ if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("barrier_wait failed"); +++ return 1; +++ } +++ +++ ts.tv_sec = 0; +++ ts.tv_nsec = 100000000; +++ TEMP_FAILURE_RETRY (nanosleep (&ts, &ts)); +++ +++ if (pthread_getcpuclockid (th[i], &cl[i + 1]) != 0) +++ { +++ puts ("pthread_getcpuclockid failed"); +++ return 1; +++ } +++ } +++ +++ if (pthread_attr_destroy (&at) != 0) +++ { +++ puts ("attr_destroy failed"); +++ return 1; +++ } +++ +++ struct timespec t[N + 1]; +++ for (i = 0; i < N + 1; ++i) +++ if (clock_gettime (cl[i], &t[i]) != 0) +++ { +++ printf ("clock_gettime round %d failed\n", i); +++ return 1; +++ } +++ +++ for (i = 0; i < N; ++i) +++ { +++ struct timespec diff; +++ +++ diff.tv_sec = t[i].tv_sec - t[i + 1].tv_sec; +++ diff.tv_nsec = t[i].tv_nsec - t[i + 1].tv_nsec; +++ if (diff.tv_nsec < 0) +++ { +++ diff.tv_nsec += 1000000000; +++ --diff.tv_sec; +++ } +++ +++ if (diff.tv_sec < 0 || (diff.tv_sec == 0 && diff.tv_nsec < 100000000)) +++ { +++ printf ("\ +++difference between thread %d and %d too small (%ld.%09ld)\n", +++ i, i + 1, (long int) diff.tv_sec, (long int) diff.tv_nsec); +++ return 1; +++ } +++ +++ printf ("diff %d->%d: %ld.%09ld\n", +++ i, i + 1, (long int) diff.tv_sec, (long int) diff.tv_nsec); +++ } +++ +++ ts.tv_sec = 0; +++ ts.tv_nsec = 0; +++ for (i = 0; i < N + 1; ++i) +++ if (clock_settime (cl[i], &ts) != 0) +++ { +++ printf ("clock_settime(%d) round %d failed\n", cl[i], i); +++ return 1; +++ } +++ +++ for (i = 0; i < N + 1; ++i) +++ { +++ if (clock_gettime (cl[i], &ts) != 0) +++ { +++ puts ("clock_gettime failed"); +++ return 1; +++ } +++ +++ if (ts.tv_sec > t[i].tv_sec +++ || (ts.tv_sec == t[i].tv_sec && ts.tv_nsec > t[i].tv_nsec)) +++ { +++ puts ("clock_settime didn't reset clock"); +++ return 1; +++ } +++ } +++#endif +++ +++ return 0; +++} +++ +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-cond-except.c ++@@ -0,0 +1,110 @@ +++/* Verify that exception table for pthread_cond_wait is correct. +++ Copyright (C) 2012-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 +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++ +++pthread_mutex_t mutex; +++pthread_cond_t cond; +++ +++#define CHECK_RETURN_VAL_OR_FAIL(ret,str) \ +++ ({ if ((ret) != 0) \ +++ { \ +++ printf ("%s failed: %s\n", (str), strerror (ret)); \ +++ ret = 1; \ +++ goto out; \ +++ } \ +++ }) +++ +++ +++void +++clean (void *arg) +++{ +++ puts ("clean: Unlocking mutex..."); +++ pthread_mutex_unlock ((pthread_mutex_t *) arg); +++ puts ("clean: Mutex unlocked..."); +++} +++ +++void * +++thr (void *arg) +++{ +++ int ret = 0; +++ pthread_mutexattr_t mutexAttr; +++ ret = pthread_mutexattr_init (&mutexAttr); +++ CHECK_RETURN_VAL_OR_FAIL (ret, "pthread_mutexattr_init"); +++ +++ ret = pthread_mutexattr_setprotocol (&mutexAttr, PTHREAD_PRIO_INHERIT); +++ CHECK_RETURN_VAL_OR_FAIL (ret, "pthread_mutexattr_setprotocol"); +++ +++ ret = pthread_mutex_init (&mutex, &mutexAttr); +++ CHECK_RETURN_VAL_OR_FAIL (ret, "pthread_mutex_init"); +++ +++ ret = pthread_cond_init (&cond, 0); +++ CHECK_RETURN_VAL_OR_FAIL (ret, "pthread_cond_init"); +++ +++ puts ("th: Init done, entering wait..."); +++ +++ pthread_cleanup_push (clean, (void *) &mutex); +++ ret = pthread_mutex_lock (&mutex); +++ CHECK_RETURN_VAL_OR_FAIL (ret, "pthread_mutex_lock"); +++ while (1) +++ { +++ ret = pthread_cond_wait (&cond, &mutex); +++ CHECK_RETURN_VAL_OR_FAIL (ret, "pthread_cond_wait"); +++ } +++ pthread_cleanup_pop (1); +++ +++out: +++ return (void *) (uintptr_t) ret; +++} +++ +++int +++do_test (void) +++{ +++ pthread_t thread; +++ int ret = 0; +++ void *thr_ret = 0; +++ ret = pthread_create (&thread, 0, thr, &thr_ret); +++ CHECK_RETURN_VAL_OR_FAIL (ret, "pthread_create"); +++ +++ puts ("main: Thread created, waiting a bit..."); +++ sleep (2); +++ +++ puts ("main: Cancelling thread..."); +++ ret = pthread_cancel (thread); +++ CHECK_RETURN_VAL_OR_FAIL (ret, "pthread_cancel"); +++ +++ puts ("main: Joining th..."); +++ ret = pthread_join (thread, NULL); +++ CHECK_RETURN_VAL_OR_FAIL (ret, "pthread_join"); +++ +++ if (thr_ret != NULL) +++ return 1; +++ +++ puts ("main: Joined thread, done!"); +++ +++out: +++ return ret; +++} +++ +++#define TEST_FUNCTION do_test () +++#define TIMEOUT 5 +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-cond1.c ++@@ -0,0 +1,93 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++ +++ +++static pthread_cond_t cond = PTHREAD_COND_INITIALIZER; +++static pthread_mutex_t mut = PTHREAD_MUTEX_INITIALIZER; +++ +++ +++static void * +++tf (void *p) +++{ +++ int err; +++ +++ err = pthread_mutex_lock (&mut); +++ if (err != 0) +++ error (EXIT_FAILURE, err, "child: cannot get mutex"); +++ +++ puts ("child: got mutex; signalling"); +++ +++ pthread_cond_signal (&cond); +++ +++ puts ("child: unlock"); +++ +++ err = pthread_mutex_unlock (&mut); +++ if (err != 0) +++ error (EXIT_FAILURE, err, "child: cannot unlock"); +++ +++ puts ("child: done"); +++ +++ return NULL; +++} +++ +++ +++static int +++do_test (void) +++{ +++ pthread_t th; +++ int err; +++ +++ printf ("&cond = %p\n&mut = %p\n", &cond, &mut); +++ +++ puts ("parent: get mutex"); +++ +++ err = pthread_mutex_lock (&mut); +++ if (err != 0) +++ error (EXIT_FAILURE, err, "parent: cannot get mutex"); +++ +++ puts ("parent: create child"); +++ +++ err = pthread_create (&th, NULL, tf, NULL); +++ if (err != 0) +++ error (EXIT_FAILURE, err, "parent: cannot create thread"); +++ +++ puts ("parent: wait for condition"); +++ +++ err = pthread_cond_wait (&cond, &mut); +++ if (err != 0) +++ error (EXIT_FAILURE, err, "parent: cannot wait fir signal"); +++ +++ puts ("parent: got signal"); +++ +++ err = pthread_join (th, NULL); +++ if (err != 0) +++ error (EXIT_FAILURE, err, "parent: failed to join"); +++ +++ puts ("done"); +++ +++ return 0; +++} +++ +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-cond10.c ++@@ -0,0 +1,172 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++ +++ +++#define N 10 +++#define ROUNDS 100 +++ +++static pthread_cond_t cond = PTHREAD_COND_INITIALIZER; +++static pthread_mutex_t mut = PTHREAD_MUTEX_INITIALIZER; +++static pthread_barrier_t bN1; +++static pthread_barrier_t b2; +++ +++ +++static void * +++tf (void *p) +++{ +++ if (pthread_mutex_lock (&mut) != 0) +++ { +++ puts ("child: 1st mutex_lock failed"); +++ exit (1); +++ } +++ +++ int e = pthread_barrier_wait (&b2); +++ if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("child: 1st barrier_wait failed"); +++ exit (1); +++ } +++ +++ if (pthread_cond_wait (&cond, &mut) != 0) +++ { +++ puts ("child: cond_wait failed"); +++ exit (1); +++ } +++ +++ if (pthread_mutex_unlock (&mut) != 0) +++ { +++ puts ("child: mutex_unlock failed"); +++ exit (1); +++ } +++ +++ e = pthread_barrier_wait (&bN1); +++ if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("child: 2nd barrier_wait failed"); +++ exit (1); +++ } +++ +++ return NULL; +++} +++ +++ +++static int +++do_test (void) +++{ +++ if (pthread_barrier_init (&bN1, NULL, N + 1) != 0) +++ { +++ puts ("barrier_init failed"); +++ exit (1); +++ } +++ +++ if (pthread_barrier_init (&b2, NULL, 2) != 0) +++ { +++ puts ("barrier_init failed"); +++ exit (1); +++ } +++ +++ pthread_attr_t at; +++ +++ if (pthread_attr_init (&at) != 0) +++ { +++ puts ("attr_init failed"); +++ return 1; +++ } +++ +++ if (pthread_attr_setstacksize (&at, 1 * 1024 * 1024) != 0) +++ { +++ puts ("attr_setstacksize failed"); +++ return 1; +++ } +++ +++ int r; +++ for (r = 0; r < ROUNDS; ++r) +++ { +++ printf ("round %d\n", r + 1); +++ +++ int i; +++ pthread_t th[N]; +++ for (i = 0; i < N; ++i) +++ { +++ if (pthread_create (&th[i], &at, tf, NULL) != 0) +++ { +++ puts ("create failed"); +++ exit (1); +++ } +++ +++ int e = pthread_barrier_wait (&b2); +++ if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("parent: 1st barrier_wait failed"); +++ exit (1); +++ } +++ } +++ +++ if (pthread_mutex_lock (&mut) != 0) +++ { +++ puts ("parent: mutex_lock failed"); +++ exit (1); +++ } +++ if (pthread_mutex_unlock (&mut) != 0) +++ { +++ puts ("parent: mutex_unlock failed"); +++ exit (1); +++ } +++ +++ /* N single signal calls. Without locking. This tests that no +++ signal gets lost. */ +++ for (i = 0; i < N; ++i) +++ if (pthread_cond_signal (&cond) != 0) +++ { +++ puts ("cond_signal failed"); +++ exit (1); +++ } +++ +++ int e = pthread_barrier_wait (&bN1); +++ if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("parent: 2nd barrier_wait failed"); +++ exit (1); +++ } +++ +++ for (i = 0; i < N; ++i) +++ if (pthread_join (th[i], NULL) != 0) +++ { +++ puts ("join failed"); +++ exit (1); +++ } +++ } +++ +++ if (pthread_attr_destroy (&at) != 0) +++ { +++ puts ("attr_destroy failed"); +++ return 1; +++ } +++ +++ return 0; +++} +++ +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-cond11.c ++@@ -0,0 +1,204 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++ +++ +++#if defined _POSIX_CLOCK_SELECTION && _POSIX_CLOCK_SELECTION >= 0 +++static int +++run_test (clockid_t cl) +++{ +++ pthread_condattr_t condattr; +++ pthread_cond_t cond; +++ pthread_mutexattr_t mutattr; +++ pthread_mutex_t mut; +++ +++ printf ("clock = %d\n", (int) cl); +++ +++ if (pthread_condattr_init (&condattr) != 0) +++ { +++ puts ("condattr_init failed"); +++ return 1; +++ } +++ +++ if (pthread_condattr_setclock (&condattr, cl) != 0) +++ { +++ puts ("condattr_setclock failed"); +++ return 1; +++ } +++ +++ clockid_t cl2; +++ if (pthread_condattr_getclock (&condattr, &cl2) != 0) +++ { +++ puts ("condattr_getclock failed"); +++ return 1; +++ } +++ if (cl != cl2) +++ { +++ printf ("condattr_getclock returned wrong value: %d, expected %d\n", +++ (int) cl2, (int) cl); +++ return 1; +++ } +++ +++ if (pthread_cond_init (&cond, &condattr) != 0) +++ { +++ puts ("cond_init failed"); +++ return 1; +++ } +++ +++ if (pthread_condattr_destroy (&condattr) != 0) +++ { +++ puts ("condattr_destroy failed"); +++ return 1; +++ } +++ +++ if (pthread_mutexattr_init (&mutattr) != 0) +++ { +++ puts ("mutexattr_init failed"); +++ return 1; +++ } +++ +++ if (pthread_mutexattr_settype (&mutattr, PTHREAD_MUTEX_ERRORCHECK) != 0) +++ { +++ puts ("mutexattr_settype failed"); +++ return 1; +++ } +++ +++ if (pthread_mutex_init (&mut, &mutattr) != 0) +++ { +++ puts ("mutex_init failed"); +++ return 1; +++ } +++ +++ if (pthread_mutexattr_destroy (&mutattr) != 0) +++ { +++ puts ("mutexattr_destroy failed"); +++ return 1; +++ } +++ +++ if (pthread_mutex_lock (&mut) != 0) +++ { +++ puts ("mutex_lock failed"); +++ return 1; +++ } +++ +++ if (pthread_mutex_lock (&mut) != EDEADLK) +++ { +++ puts ("2nd mutex_lock did not return EDEADLK"); +++ return 1; +++ } +++ +++ struct timespec ts; +++ if (clock_gettime (cl, &ts) != 0) +++ { +++ puts ("clock_gettime failed"); +++ return 1; +++ } +++ +++ /* Wait one second. */ +++ ++ts.tv_sec; +++ +++ int e = pthread_cond_timedwait (&cond, &mut, &ts); +++ if (e == 0) +++ { +++ puts ("cond_timedwait succeeded"); +++ return 1; +++ } +++ else if (e != ETIMEDOUT) +++ { +++ puts ("cond_timedwait did not return ETIMEDOUT"); +++ return 1; +++ } +++ +++ struct timespec ts2; +++ if (clock_gettime (cl, &ts2) != 0) +++ { +++ puts ("second clock_gettime failed"); +++ return 1; +++ } +++ +++ if (ts2.tv_sec < ts.tv_sec +++ || (ts2.tv_sec == ts.tv_sec && ts2.tv_nsec < ts.tv_nsec)) +++ { +++ puts ("timeout too short"); +++ return 1; +++ } +++ +++ if (pthread_mutex_unlock (&mut) != 0) +++ { +++ puts ("mutex_unlock failed"); +++ return 1; +++ } +++ +++ if (pthread_mutex_destroy (&mut) != 0) +++ { +++ puts ("mutex_destroy failed"); +++ return 1; +++ } +++ +++ if (pthread_cond_destroy (&cond) != 0) +++ { +++ puts ("cond_destroy failed"); +++ return 1; +++ } +++ +++ return 0; +++} +++#endif +++ +++ +++static int +++do_test (void) +++{ +++#if !defined _POSIX_CLOCK_SELECTION || _POSIX_CLOCK_SELECTION == -1 +++ +++ puts ("_POSIX_CLOCK_SELECTION not supported, test skipped"); +++ return 0; +++ +++#else +++ +++ int res = run_test (CLOCK_REALTIME); +++ +++# if defined _POSIX_MONOTONIC_CLOCK && _POSIX_MONOTONIC_CLOCK >= 0 +++# if _POSIX_MONOTONIC_CLOCK == 0 +++ int e = sysconf (_SC_MONOTONIC_CLOCK); +++ if (e < 0) +++ puts ("CLOCK_MONOTONIC not supported"); +++ else if (e == 0) +++ { +++ puts ("sysconf (_SC_MONOTONIC_CLOCK) must not return 0"); +++ res = 1; +++ } +++ else +++# endif +++ res |= run_test (CLOCK_MONOTONIC); +++# else +++ puts ("_POSIX_MONOTONIC_CLOCK not defined"); +++# endif +++ +++ return res; +++#endif +++} +++ +++#define TIMEOUT 3 +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-cond12.c ++@@ -0,0 +1,195 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++static char fname[] = "/tmp/tst-cond12-XXXXXX"; +++static int fd; +++ +++ +++static void prepare (void); +++#define PREPARE(argc, argv) prepare () +++ +++static int do_test (void); +++#define TEST_FUNCTION do_test () +++ +++#include "../test-skeleton.c" +++ +++ +++static void +++prepare (void) +++{ +++ fd = mkstemp (fname); +++ if (fd == -1) +++ { +++ printf ("mkstemp failed: %m\n"); +++ exit (1); +++ } +++ add_temp_file (fname); +++ if (ftruncate (fd, 1000) < 0) +++ { +++ printf ("ftruncate failed: %m\n"); +++ exit (1); +++ } +++} +++ +++ +++static int +++do_test (void) +++{ +++ struct +++ { +++ pthread_mutex_t m; +++ pthread_cond_t c; +++ int var; +++ } *p = mmap (NULL, sizeof (*p), PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); +++ if (p == MAP_FAILED) +++ { +++ printf ("initial mmap failed: %m\n"); +++ return 1; +++ } +++ +++ pthread_mutexattr_t ma; +++ if (pthread_mutexattr_init (&ma) != 0) +++ { +++ puts ("mutexattr_init failed"); +++ return 1; +++ } +++ if (pthread_mutexattr_setpshared (&ma, 1) != 0) +++ { +++ puts ("mutexattr_setpshared failed"); +++ return 1; +++ } +++ if (pthread_mutex_init (&p->m, &ma) != 0) +++ { +++ puts ("mutex_init failed"); +++ return 1; +++ } +++ if (pthread_mutexattr_destroy (&ma) != 0) +++ { +++ puts ("mutexattr_destroy failed"); +++ return 1; +++ } +++ +++ pthread_condattr_t ca; +++ if (pthread_condattr_init (&ca) != 0) +++ { +++ puts ("condattr_init failed"); +++ return 1; +++ } +++ if (pthread_condattr_setpshared (&ca, 1) != 0) +++ { +++ puts ("condattr_setpshared failed"); +++ return 1; +++ } +++ if (pthread_cond_init (&p->c, &ca) != 0) +++ { +++ puts ("mutex_init failed"); +++ return 1; +++ } +++ if (pthread_condattr_destroy (&ca) != 0) +++ { +++ puts ("condattr_destroy failed"); +++ return 1; +++ } +++ +++ if (pthread_mutex_lock (&p->m) != 0) +++ { +++ puts ("initial mutex_lock failed"); +++ return 1; +++ } +++ +++ p->var = 42; +++ +++ pid_t pid = fork (); +++ if (pid == -1) +++ { +++ printf ("fork failed: %m\n"); +++ return 1; +++ } +++ +++ if (pid == 0) +++ { +++ void *oldp = p; +++ p = mmap (NULL, sizeof (*p), PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); +++ +++ if (p == oldp) +++ { +++ puts ("child: mapped to same address"); +++ kill (getppid (), SIGKILL); +++ exit (1); +++ } +++ +++ munmap (oldp, sizeof (*p)); +++ +++ if (pthread_mutex_lock (&p->m) != 0) +++ { +++ puts ("child: mutex_lock failed"); +++ kill (getppid (), SIGKILL); +++ exit (1); +++ } +++ +++ p->var = 0; +++ +++#ifndef USE_COND_SIGNAL +++ if (pthread_cond_broadcast (&p->c) != 0) +++ { +++ puts ("child: cond_broadcast failed"); +++ kill (getppid (), SIGKILL); +++ exit (1); +++ } +++#else +++ if (pthread_cond_signal (&p->c) != 0) +++ { +++ puts ("child: cond_signal failed"); +++ kill (getppid (), SIGKILL); +++ exit (1); +++ } +++#endif +++ +++ if (pthread_mutex_unlock (&p->m) != 0) +++ { +++ puts ("child: mutex_unlock failed"); +++ kill (getppid (), SIGKILL); +++ exit (1); +++ } +++ +++ exit (0); +++ } +++ +++ do +++ pthread_cond_wait (&p->c, &p->m); +++ while (p->var != 0); +++ +++ if (TEMP_FAILURE_RETRY (waitpid (pid, NULL, 0)) != pid) +++ { +++ printf ("waitpid failed: %m\n"); +++ kill (pid, SIGKILL); +++ return 1; +++ } +++ +++ return 0; +++} ++--- /dev/null +++++ b/fbtl/tst-cond13.c ++@@ -0,0 +1,2 @@ +++#define USE_COND_SIGNAL 1 +++#include "tst-cond12.c" ++--- /dev/null +++++ b/fbtl/tst-cond14.c ++@@ -0,0 +1,117 @@ +++/* Copyright (C) 2004-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 2004. +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public +++ License as published by the Free Software Foundation; either +++ version 2.1 of the License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General Public License 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 +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++ +++ +++static pthread_cond_t cond = PTHREAD_COND_INITIALIZER; +++static pthread_mutex_t mut = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP; +++static pthread_mutex_t mut2 = PTHREAD_MUTEX_INITIALIZER; +++ +++static void * +++tf (void *p) +++{ +++ if (pthread_mutex_lock (&mut) != 0) +++ { +++ printf ("%s: 1st mutex_lock failed\n", __func__); +++ exit (1); +++ } +++ if (pthread_mutex_lock (&mut) != 0) +++ { +++ printf ("%s: 2nd mutex_lock failed\n", __func__); +++ exit (1); +++ } +++ if (pthread_mutex_lock (&mut) != 0) +++ { +++ printf ("%s: 3rd mutex_lock failed\n", __func__); +++ exit (1); +++ } +++ +++ if (pthread_mutex_unlock (&mut2) != 0) +++ { +++ printf ("%s: mutex_unlock failed\n", __func__); +++ exit (1); +++ } +++ +++ if (pthread_cond_wait (&cond, &mut) != 0) +++ { +++ printf ("%s: cond_wait failed\n", __func__); +++ exit (1); +++ } +++ +++ puts ("child: done"); +++ +++ return NULL; +++} +++ +++ +++static int +++do_test (void) +++{ +++ if (pthread_mutex_lock (&mut2) != 0) +++ { +++ puts ("1st mutex_lock failed"); +++ return 1; +++ } +++ +++ puts ("parent: create child"); +++ +++ pthread_t th; +++ int err = pthread_create (&th, NULL, tf, NULL); +++ if (err != 0) +++ { +++ printf ("parent: cannot create thread: %s\n", strerror (err)); +++ return 1; +++ } +++ +++ /* We have to synchronize with the child. */ +++ if (pthread_mutex_lock (&mut2) != 0) +++ { +++ puts ("2nd mutex_lock failed"); +++ return 1; +++ } +++ +++ /* Give the child to reach to pthread_cond_wait. */ +++ sleep (1); +++ +++ if (pthread_cond_signal (&cond) != 0) +++ { +++ puts ("cond_signal failed"); +++ return 1; +++ } +++ +++ err = pthread_join (th, NULL); +++ if (err != 0) +++ { +++ printf ("parent: failed to join: %s\n", strerror (err)); +++ return 1; +++ } +++ +++ puts ("done"); +++ +++ return 0; +++} +++ +++ +++#define TEST_FUNCTION do_test () +++#define TIMEOUT 3 +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-cond15.c ++@@ -0,0 +1,159 @@ +++/* Copyright (C) 2004-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 2004. +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public +++ License as published by the Free Software Foundation; either +++ version 2.1 of the License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General Public License 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 +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++static pthread_cond_t cond = PTHREAD_COND_INITIALIZER; +++static pthread_mutex_t mut = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP; +++static pthread_mutex_t mut2 = PTHREAD_MUTEX_INITIALIZER; +++ +++static void * +++tf (void *p) +++{ +++ if (pthread_mutex_lock (&mut) != 0) +++ { +++ printf ("%s: 1st mutex_lock failed\n", __func__); +++ exit (1); +++ } +++ if (pthread_mutex_lock (&mut) != 0) +++ { +++ printf ("%s: 2nd mutex_lock failed\n", __func__); +++ exit (1); +++ } +++ if (pthread_mutex_lock (&mut) != 0) +++ { +++ printf ("%s: 3rd mutex_lock failed\n", __func__); +++ exit (1); +++ } +++ +++ if (pthread_mutex_unlock (&mut2) != 0) +++ { +++ printf ("%s: mutex_unlock failed\n", __func__); +++ exit (1); +++ } +++ +++ struct timeval tv; +++ gettimeofday (&tv, NULL); +++ struct timespec ts; +++ TIMEVAL_TO_TIMESPEC (&tv, &ts); +++ ts.tv_sec += p == NULL ? 100 : 1; +++ +++ int err = pthread_cond_timedwait (&cond, &mut, &ts); +++ if ((err != 0 && p == NULL) || (err != ETIMEDOUT && p != NULL)) +++ { +++ printf ("%s: cond_wait failed\n", __func__); +++ exit (1); +++ } +++ +++ if (pthread_mutex_unlock (&mut) != 0) +++ { +++ printf ("%s: 1st mutex_unlock failed\n", __func__); +++ exit (1); +++ } +++ if (pthread_mutex_unlock (&mut) != 0) +++ { +++ printf ("%s: 2nd mutex_unlock failed\n", __func__); +++ exit (1); +++ } +++ if (pthread_mutex_unlock (&mut) != 0) +++ { +++ printf ("%s: 3rd mutex_unlock failed\n", __func__); +++ exit (1); +++ } +++ +++ puts ("child: done"); +++ +++ return NULL; +++} +++ +++ +++static int +++do_test (void) +++{ +++ if (pthread_mutex_lock (&mut2) != 0) +++ { +++ puts ("1st mutex_lock failed"); +++ return 1; +++ } +++ +++ puts ("parent: create 1st child"); +++ +++ pthread_t th; +++ int err = pthread_create (&th, NULL, tf, NULL); +++ if (err != 0) +++ { +++ printf ("parent: cannot 1st create thread: %s\n", strerror (err)); +++ return 1; +++ } +++ +++ /* We have to synchronize with the child. */ +++ if (pthread_mutex_lock (&mut2) != 0) +++ { +++ puts ("2nd mutex_lock failed"); +++ return 1; +++ } +++ +++ /* Give the child to reach to pthread_cond_wait. */ +++ sleep (1); +++ +++ if (pthread_cond_signal (&cond) != 0) +++ { +++ puts ("cond_signal failed"); +++ return 1; +++ } +++ +++ err = pthread_join (th, NULL); +++ if (err != 0) +++ { +++ printf ("parent: failed to join: %s\n", strerror (err)); +++ return 1; +++ } +++ +++ +++ puts ("parent: create 2nd child"); +++ +++ err = pthread_create (&th, NULL, tf, (void *) 1l); +++ if (err != 0) +++ { +++ printf ("parent: cannot 2nd create thread: %s\n", strerror (err)); +++ return 1; +++ } +++ +++ err = pthread_join (th, NULL); +++ if (err != 0) +++ { +++ printf ("parent: failed to join: %s\n", strerror (err)); +++ return 1; +++ } +++ +++ puts ("done"); +++ +++ return 0; +++} +++ +++ +++#define TEST_FUNCTION do_test () +++#define TIMEOUT 6 +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-cond16.c ++@@ -0,0 +1,110 @@ +++/* Copyright (C) 2004-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Jakub Jelinek , 2004. +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public +++ License as published by the Free Software Foundation; either +++ version 2.1 of the License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General Public License 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 +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++ +++pthread_cond_t cv = PTHREAD_COND_INITIALIZER; +++pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER; +++bool n, exiting; +++FILE *f; +++int count; +++ +++void * +++tf (void *dummy) +++{ +++ bool loop = true; +++ +++ while (loop) +++ { +++ pthread_mutex_lock (&lock); +++ while (n && !exiting) +++ pthread_cond_wait (&cv, &lock); +++ n = true; +++ pthread_mutex_unlock (&lock); +++ +++ fputs (".", f); +++ +++ pthread_mutex_lock (&lock); +++ n = false; +++ if (exiting) +++ loop = false; +++#ifdef UNLOCK_AFTER_BROADCAST +++ pthread_cond_broadcast (&cv); +++ pthread_mutex_unlock (&lock); +++#else +++ pthread_mutex_unlock (&lock); +++ pthread_cond_broadcast (&cv); +++#endif +++ } +++ +++ return NULL; +++} +++ +++int +++do_test (void) +++{ +++ f = fopen ("/dev/null", "w"); +++ if (f == NULL) +++ { +++ printf ("couldn't open /dev/null, %m\n"); +++ return 1; +++ } +++ +++ count = sysconf (_SC_NPROCESSORS_ONLN); +++ if (count <= 0) +++ count = 1; +++ count *= 4; +++ +++ pthread_t th[count]; +++ pthread_attr_t attr; +++ int i, ret, sz; +++ pthread_attr_init (&attr); +++ sz = __getpagesize (); +++ if (sz < PTHREAD_STACK_MIN) +++ sz = PTHREAD_STACK_MIN; +++ pthread_attr_setstacksize (&attr, sz); +++ for (i = 0; i < count; ++i) +++ if ((ret = pthread_create (&th[i], &attr, tf, NULL)) != 0) +++ { +++ errno = ret; +++ printf ("pthread_create %d failed: %m\n", i); +++ return 1; +++ } +++ +++ struct timespec ts = { .tv_sec = 20, .tv_nsec = 0 }; +++ while (nanosleep (&ts, &ts) != 0); +++ +++ pthread_mutex_lock (&lock); +++ exiting = true; +++ pthread_mutex_unlock (&lock); +++ +++ for (i = 0; i < count; ++i) +++ pthread_join (th[i], NULL); +++ +++ fclose (f); +++ return 0; +++} +++ +++#define TEST_FUNCTION do_test () +++#define TIMEOUT 40 +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-cond17.c ++@@ -0,0 +1,2 @@ +++#define UNLOCK_AFTER_BROADCAST 1 +++#include "tst-cond16.c" ++--- /dev/null +++++ b/fbtl/tst-cond18.c ++@@ -0,0 +1,122 @@ +++/* Copyright (C) 2004-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Jakub Jelinek , 2004. +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public +++ License as published by the Free Software Foundation; either +++ version 2.1 of the License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General Public License 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 +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++pthread_cond_t cv = PTHREAD_COND_INITIALIZER; +++pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER; +++bool exiting; +++int fd, count, spins, nn; +++ +++void * +++tf (void *id) +++{ +++ pthread_mutex_lock (&lock); +++ +++ if ((long) id == 0) +++ { +++ while (!exiting) +++ { +++ if ((spins++ % 1000) == 0) +++ write (fd, ".", 1); +++ pthread_mutex_unlock (&lock); +++ +++ pthread_mutex_lock (&lock); +++ int njobs = rand () % (count + 1); +++ nn = njobs; +++ if ((rand () % 30) == 0) +++ pthread_cond_broadcast (&cv); +++ else +++ while (njobs--) +++ pthread_cond_signal (&cv); +++ } +++ +++ pthread_cond_broadcast (&cv); +++ } +++ else +++ { +++ while (!exiting) +++ { +++ while (!nn && !exiting) +++ pthread_cond_wait (&cv, &lock); +++ --nn; +++ pthread_mutex_unlock (&lock); +++ +++ pthread_mutex_lock (&lock); +++ } +++ } +++ +++ pthread_mutex_unlock (&lock); +++ return NULL; +++} +++ +++int +++do_test (void) +++{ +++ fd = open ("/dev/null", O_WRONLY); +++ if (fd < 0) +++ { +++ printf ("couldn't open /dev/null, %m\n"); +++ return 1; +++ } +++ +++ count = sysconf (_SC_NPROCESSORS_ONLN); +++ if (count <= 0) +++ count = 1; +++ count *= 8; +++ +++ pthread_t th[count + 1]; +++ pthread_attr_t attr; +++ int i, ret, sz; +++ pthread_attr_init (&attr); +++ sz = __getpagesize (); +++ if (sz < PTHREAD_STACK_MIN) +++ sz = PTHREAD_STACK_MIN; +++ pthread_attr_setstacksize (&attr, sz); +++ +++ for (i = 0; i <= count; ++i) +++ if ((ret = pthread_create (&th[i], &attr, tf, (void *) (long) i)) != 0) +++ { +++ errno = ret; +++ printf ("pthread_create %d failed: %m\n", i); +++ return 1; +++ } +++ +++ struct timespec ts = { .tv_sec = 20, .tv_nsec = 0 }; +++ while (nanosleep (&ts, &ts) != 0); +++ +++ pthread_mutex_lock (&lock); +++ exiting = true; +++ pthread_mutex_unlock (&lock); +++ +++ for (i = 0; i < count; ++i) +++ pthread_join (th[i], NULL); +++ +++ close (fd); +++ return 0; +++} +++ +++#define TEST_FUNCTION do_test () +++#define TIMEOUT 40 +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-cond19.c ++@@ -0,0 +1,75 @@ +++/* Copyright (C) 2004-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 2004. +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public +++ License as published by the Free Software Foundation; either +++ version 2.1 of the License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General Public License 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 +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++ +++ +++static pthread_cond_t cond = PTHREAD_COND_INITIALIZER; +++static pthread_mutex_t mut = PTHREAD_MUTEX_INITIALIZER; +++ +++ +++static int +++do_test (void) +++{ +++ int result = 0; +++ struct timespec ts; +++ +++ if (clock_gettime (CLOCK_REALTIME, &ts) != 0) +++ { +++ puts ("clock_gettime failed"); +++ return 1; +++ } +++ +++ ts.tv_nsec = -1; +++ +++ int e = pthread_cond_timedwait (&cond, &mut, &ts); +++ if (e == 0) +++ { +++ puts ("first cond_timedwait did not fail"); +++ result = 1; +++ } +++ else if (e != EINVAL) +++ { +++ puts ("first cond_timedwait did not return EINVAL"); +++ result = 1; +++ } +++ +++ ts.tv_nsec = 2000000000; +++ +++ e = pthread_cond_timedwait (&cond, &mut, &ts); +++ if (e == 0) +++ { +++ puts ("second cond_timedwait did not fail"); +++ result = 1; +++ } +++ else if (e != EINVAL) +++ { +++ puts ("second cond_timedwait did not return EINVAL"); +++ result = 1; +++ } +++ +++ return result; +++} +++ +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-cond2.c ++@@ -0,0 +1,162 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++ +++ +++static pthread_mutex_t mut = PTHREAD_MUTEX_INITIALIZER; +++static pthread_cond_t cond = PTHREAD_COND_INITIALIZER; +++ +++static pthread_barrier_t bar; +++ +++ +++static void * +++tf (void *a) +++{ +++ int i = (long int) a; +++ int err; +++ +++ printf ("child %d: lock\n", i); +++ +++ err = pthread_mutex_lock (&mut); +++ if (err != 0) +++ error (EXIT_FAILURE, err, "locking in child failed"); +++ +++ printf ("child %d: sync\n", i); +++ +++ int e = pthread_barrier_wait (&bar); +++ if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("child: barrier_wait failed"); +++ exit (1); +++ } +++ +++ printf ("child %d: wait\n", i); +++ +++ err = pthread_cond_wait (&cond, &mut); +++ if (err != 0) +++ error (EXIT_FAILURE, err, "child %d: failed to wait", i); +++ +++ printf ("child %d: woken up\n", i); +++ +++ err = pthread_mutex_unlock (&mut); +++ if (err != 0) +++ error (EXIT_FAILURE, err, "child %d: unlock[2] failed", i); +++ +++ printf ("child %d: done\n", i); +++ +++ return NULL; +++} +++ +++ +++#define N 10 +++ +++ +++static int +++do_test (void) +++{ +++ pthread_t th[N]; +++ int i; +++ int err; +++ +++ printf ("&cond = %p\n&mut = %p\n", &cond, &mut); +++ +++ if (pthread_barrier_init (&bar, NULL, 2) != 0) +++ { +++ puts ("barrier_init failed"); +++ exit (1); +++ } +++ +++ pthread_attr_t at; +++ +++ if (pthread_attr_init (&at) != 0) +++ { +++ puts ("attr_init failed"); +++ return 1; +++ } +++ +++ if (pthread_attr_setstacksize (&at, 1 * 1024 * 1024) != 0) +++ { +++ puts ("attr_setstacksize failed"); +++ return 1; +++ } +++ +++ for (i = 0; i < N; ++i) +++ { +++ printf ("create thread %d\n", i); +++ +++ err = pthread_create (&th[i], &at, tf, (void *) (long int) i); +++ if (err != 0) +++ error (EXIT_FAILURE, err, "cannot create thread %d", i); +++ +++ printf ("wait for child %d\n", i); +++ +++ /* Wait for the child to start up and get the mutex for the +++ conditional variable. */ +++ int e = pthread_barrier_wait (&bar); +++ if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("barrier_wait failed"); +++ exit (1); +++ } +++ } +++ +++ if (pthread_attr_destroy (&at) != 0) +++ { +++ puts ("attr_destroy failed"); +++ return 1; +++ } +++ +++ puts ("get lock outselves"); +++ +++ err = pthread_mutex_lock (&mut); +++ if (err != 0) +++ error (EXIT_FAILURE, err, "mut locking failed"); +++ +++ puts ("broadcast"); +++ +++ /* Wake up all threads. */ +++ err = pthread_cond_broadcast (&cond); +++ if (err != 0) +++ error (EXIT_FAILURE, err, "parent: broadcast failed"); +++ +++ err = pthread_mutex_unlock (&mut); +++ if (err != 0) +++ error (EXIT_FAILURE, err, "mut unlocking failed"); +++ +++ /* Join all threads. */ +++ for (i = 0; i < N; ++i) +++ { +++ printf ("join thread %d\n", i); +++ +++ err = pthread_join (th[i], NULL); +++ if (err != 0) +++ error (EXIT_FAILURE, err, "join of child %d failed", i); +++ } +++ +++ puts ("done"); +++ +++ return 0; +++} +++ +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-cond20.c ++@@ -0,0 +1,169 @@ +++/* Copyright (C) 2004-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Jakub Jelinek , 2004. +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public +++ License as published by the Free Software Foundation; either +++ version 2.1 of the License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General Public License 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 +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++ +++#define N 10 +++#define ROUNDS 1000 +++static pthread_cond_t cond = PTHREAD_COND_INITIALIZER; +++static pthread_cond_t cond2 = PTHREAD_COND_INITIALIZER; +++static pthread_mutex_t mut = PTHREAD_MUTEX_INITIALIZER; +++static pthread_barrier_t b; +++static int count; +++ +++static void * +++tf (void *p) +++{ +++ int i; +++ for (i = 0; i < ROUNDS; ++i) +++ { +++ pthread_mutex_lock (&mut); +++ +++ if (++count == N) +++ pthread_cond_signal (&cond2); +++ +++#ifdef TIMED +++ struct timeval tv; +++ gettimeofday (&tv, NULL); +++ struct timespec ts; +++ /* Wait three seconds. */ +++ ts.tv_sec = tv.tv_sec + 3; +++ ts.tv_nsec = tv.tv_usec * 1000; +++ pthread_cond_timedwait (&cond, &mut, &ts); +++#else +++ pthread_cond_wait (&cond, &mut); +++#endif +++ +++ pthread_mutex_unlock (&mut); +++ +++ int err = pthread_barrier_wait (&b); +++ if (err != 0 && err != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("child: barrier_wait failed"); +++ exit (1); +++ } +++ +++ err = pthread_barrier_wait (&b); +++ if (err != 0 && err != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("child: barrier_wait failed"); +++ exit (1); +++ } +++ } +++ +++ return NULL; +++} +++ +++ +++static int +++do_test (void) +++{ +++ if (pthread_barrier_init (&b, NULL, N + 1) != 0) +++ { +++ puts ("barrier_init failed"); +++ return 1; +++ } +++ +++ pthread_mutex_lock (&mut); +++ +++ int i, j, err; +++ pthread_t th[N]; +++ for (i = 0; i < N; ++i) +++ if ((err = pthread_create (&th[i], NULL, tf, NULL)) != 0) +++ { +++ printf ("cannot create thread %d: %s\n", i, strerror (err)); +++ return 1; +++ } +++ +++ for (i = 0; i < ROUNDS; ++i) +++ { +++ pthread_cond_wait (&cond2, &mut); +++ +++ if (i & 1) +++ pthread_mutex_unlock (&mut); +++ +++ if (i & 2) +++ pthread_cond_broadcast (&cond); +++ else if (i & 4) +++ for (j = 0; j < N; ++j) +++ pthread_cond_signal (&cond); +++ else +++ { +++ for (j = 0; j < (i / 8) % N; ++j) +++ pthread_cond_signal (&cond); +++ pthread_cond_broadcast (&cond); +++ } +++ +++ if ((i & 1) == 0) +++ pthread_mutex_unlock (&mut); +++ +++ err = pthread_cond_destroy (&cond); +++ if (err) +++ { +++ printf ("pthread_cond_destroy failed: %s\n", strerror (err)); +++ return 1; +++ } +++ +++ /* Now clobber the cond variable which has been successfully +++ destroyed above. */ +++ memset (&cond, (char) i, sizeof (cond)); +++ +++ err = pthread_barrier_wait (&b); +++ if (err != 0 && err != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("parent: barrier_wait failed"); +++ return 1; +++ } +++ +++ pthread_mutex_lock (&mut); +++ +++ err = pthread_barrier_wait (&b); +++ if (err != 0 && err != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("parent: barrier_wait failed"); +++ return 1; +++ } +++ +++ count = 0; +++ err = pthread_cond_init (&cond, NULL); +++ if (err) +++ { +++ printf ("pthread_cond_init failed: %s\n", strerror (err)); +++ return 1; +++ } +++ } +++ +++ for (i = 0; i < N; ++i) +++ if ((err = pthread_join (th[i], NULL)) != 0) +++ { +++ printf ("failed to join thread %d: %s\n", i, strerror (err)); +++ return 1; +++ } +++ +++ puts ("done"); +++ +++ return 0; +++} +++ +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-cond21.c ++@@ -0,0 +1,3 @@ +++#include +++#define TIMED 1 +++#include "tst-cond20.c" ++--- /dev/null +++++ b/fbtl/tst-cond22.c ++@@ -0,0 +1,160 @@ +++#include +++#include +++#include +++ +++ +++static pthread_barrier_t b; +++static pthread_cond_t c = PTHREAD_COND_INITIALIZER; +++static pthread_mutex_t m = PTHREAD_MUTEX_INITIALIZER; +++ +++ +++static void +++cl (void *arg) +++{ +++ pthread_mutex_unlock (&m); +++} +++ +++ +++static void * +++tf (void *arg) +++{ +++ if (pthread_mutex_lock (&m) != 0) +++ { +++ printf ("%s: mutex_lock failed\n", __func__); +++ exit (1); +++ } +++ int e = pthread_barrier_wait (&b); +++ if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: barrier_wait failed\n", __func__); +++ exit (1); +++ } +++ pthread_cleanup_push (cl, NULL); +++ /* We have to loop here because the cancellation might come after +++ the cond_wait call left the cancelable area and is then waiting +++ on the mutex. In this case the beginning of the second cond_wait +++ call will cause the cancellation to happen. */ +++ do +++ if (pthread_cond_wait (&c, &m) != 0) +++ { +++ printf ("%s: cond_wait failed\n", __func__); +++ exit (1); +++ } +++ while (arg == NULL); +++ pthread_cleanup_pop (0); +++ if (pthread_mutex_unlock (&m) != 0) +++ { +++ printf ("%s: mutex_unlock failed\n", __func__); +++ exit (1); +++ } +++ return NULL; +++} +++ +++ +++static int +++do_test (void) +++{ +++ int status = 0; +++ +++ if (pthread_barrier_init (&b, NULL, 2) != 0) +++ { +++ puts ("barrier_init failed"); +++ return 1; +++ } +++ +++ pthread_t th; +++ if (pthread_create (&th, NULL, tf, NULL) != 0) +++ { +++ puts ("1st create failed"); +++ return 1; +++ } +++ int e = pthread_barrier_wait (&b); +++ if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("1st barrier_wait failed"); +++ return 1; +++ } +++ if (pthread_mutex_lock (&m) != 0) +++ { +++ puts ("1st mutex_lock failed"); +++ return 1; +++ } +++ if (pthread_cond_signal (&c) != 0) +++ { +++ puts ("1st cond_signal failed"); +++ return 1; +++ } +++ if (pthread_cancel (th) != 0) +++ { +++ puts ("cancel failed"); +++ return 1; +++ } +++ if (pthread_mutex_unlock (&m) != 0) +++ { +++ puts ("1st mutex_unlock failed"); +++ return 1; +++ } +++ void *res; +++ if (pthread_join (th, &res) != 0) +++ { +++ puts ("1st join failed"); +++ return 1; +++ } +++ if (res != PTHREAD_CANCELED) +++ { +++ puts ("first thread not canceled"); +++ status = 1; +++ } +++ +++ printf ("cond = { %d, %x, %lld, %lld, %lld, %p, %u, %u }\n", +++ c.__data.__lock, c.__data.__futex, c.__data.__total_seq, +++ c.__data.__wakeup_seq, c.__data.__woken_seq, c.__data.__mutex, +++ c.__data.__nwaiters, c.__data.__broadcast_seq); +++ +++ if (pthread_create (&th, NULL, tf, (void *) 1l) != 0) +++ { +++ puts ("2nd create failed"); +++ return 1; +++ } +++ e = pthread_barrier_wait (&b); +++ if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("2nd barrier_wait failed"); +++ return 1; +++ } +++ if (pthread_mutex_lock (&m) != 0) +++ { +++ puts ("2nd mutex_lock failed"); +++ return 1; +++ } +++ if (pthread_cond_signal (&c) != 0) +++ { +++ puts ("2nd cond_signal failed"); +++ return 1; +++ } +++ if (pthread_mutex_unlock (&m) != 0) +++ { +++ puts ("2nd mutex_unlock failed"); +++ return 1; +++ } +++ if (pthread_join (th, &res) != 0) +++ { +++ puts ("2nd join failed"); +++ return 1; +++ } +++ if (res != NULL) +++ { +++ puts ("2nd thread canceled"); +++ status = 1; +++ } +++ +++ printf ("cond = { %d, %x, %lld, %lld, %lld, %p, %u, %u }\n", +++ c.__data.__lock, c.__data.__futex, c.__data.__total_seq, +++ c.__data.__wakeup_seq, c.__data.__woken_seq, c.__data.__mutex, +++ c.__data.__nwaiters, c.__data.__broadcast_seq); +++ +++ return status; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-cond23.c ++@@ -0,0 +1,183 @@ +++/* Copyright (C) 2008-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Jakub Jelinek , 2008. +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public +++ License as published by the Free Software Foundation; either +++ version 2.1 of the License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General Public License 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 +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++ +++ +++#if defined _POSIX_CLOCK_SELECTION && _POSIX_CLOCK_SELECTION >= 0 +++static int +++check (pthread_condattr_t *condattr, int pshared, clockid_t cl) +++{ +++ clockid_t cl2; +++ if (pthread_condattr_getclock (condattr, &cl2) != 0) +++ { +++ puts ("condattr_getclock failed"); +++ return 1; +++ } +++ if (cl != cl2) +++ { +++ printf ("condattr_getclock returned wrong value: %d, expected %d\n", +++ (int) cl2, (int) cl); +++ return 1; +++ } +++ +++ int p; +++ if (pthread_condattr_getpshared (condattr, &p) != 0) +++ { +++ puts ("condattr_getpshared failed"); +++ return 1; +++ } +++ else if (p != pshared) +++ { +++ printf ("condattr_getpshared returned wrong value: %d, expected %d\n", +++ p, pshared); +++ return 1; +++ } +++ +++ return 0; +++} +++ +++static int +++run_test (clockid_t cl) +++{ +++ pthread_condattr_t condattr; +++ +++ printf ("clock = %d\n", (int) cl); +++ +++ if (pthread_condattr_init (&condattr) != 0) +++ { +++ puts ("condattr_init failed"); +++ return 1; +++ } +++ +++ if (check (&condattr, PTHREAD_PROCESS_PRIVATE, CLOCK_REALTIME)) +++ return 1; +++ +++ if (pthread_condattr_setpshared (&condattr, PTHREAD_PROCESS_SHARED) != 0) +++ { +++ puts ("1st condattr_setpshared failed"); +++ return 1; +++ } +++ +++ if (check (&condattr, PTHREAD_PROCESS_SHARED, CLOCK_REALTIME)) +++ return 1; +++ +++ if (pthread_condattr_setclock (&condattr, cl) != 0) +++ { +++ puts ("1st condattr_setclock failed"); +++ return 1; +++ } +++ +++ if (check (&condattr, PTHREAD_PROCESS_SHARED, cl)) +++ return 1; +++ +++ if (pthread_condattr_setpshared (&condattr, PTHREAD_PROCESS_PRIVATE) != 0) +++ { +++ puts ("2nd condattr_setpshared failed"); +++ return 1; +++ } +++ +++ if (check (&condattr, PTHREAD_PROCESS_PRIVATE, cl)) +++ return 1; +++ +++ if (pthread_condattr_setclock (&condattr, CLOCK_REALTIME) != 0) +++ { +++ puts ("2nd condattr_setclock failed"); +++ return 1; +++ } +++ +++ if (check (&condattr, PTHREAD_PROCESS_PRIVATE, CLOCK_REALTIME)) +++ return 1; +++ +++ if (pthread_condattr_setclock (&condattr, cl) != 0) +++ { +++ puts ("3rd condattr_setclock failed"); +++ return 1; +++ } +++ +++ if (check (&condattr, PTHREAD_PROCESS_PRIVATE, cl)) +++ return 1; +++ +++ if (pthread_condattr_setpshared (&condattr, PTHREAD_PROCESS_SHARED) != 0) +++ { +++ puts ("3rd condattr_setpshared failed"); +++ return 1; +++ } +++ +++ if (check (&condattr, PTHREAD_PROCESS_SHARED, cl)) +++ return 1; +++ +++ if (pthread_condattr_setclock (&condattr, CLOCK_REALTIME) != 0) +++ { +++ puts ("4th condattr_setclock failed"); +++ return 1; +++ } +++ +++ if (check (&condattr, PTHREAD_PROCESS_SHARED, CLOCK_REALTIME)) +++ return 1; +++ +++ if (pthread_condattr_destroy (&condattr) != 0) +++ { +++ puts ("condattr_destroy failed"); +++ return 1; +++ } +++ +++ return 0; +++} +++#endif +++ +++ +++static int +++do_test (void) +++{ +++#if !defined _POSIX_CLOCK_SELECTION || _POSIX_CLOCK_SELECTION == -1 +++ +++ puts ("_POSIX_CLOCK_SELECTION not supported, test skipped"); +++ return 0; +++ +++#else +++ +++ int res = run_test (CLOCK_REALTIME); +++ +++# if defined _POSIX_MONOTONIC_CLOCK && _POSIX_MONOTONIC_CLOCK >= 0 +++# if _POSIX_MONOTONIC_CLOCK == 0 +++ int e = sysconf (_SC_MONOTONIC_CLOCK); +++ if (e < 0) +++ puts ("CLOCK_MONOTONIC not supported"); +++ else if (e == 0) +++ { +++ puts ("sysconf (_SC_MONOTONIC_CLOCK) must not return 0"); +++ res = 1; +++ } +++ else +++# endif +++ res |= run_test (CLOCK_MONOTONIC); +++# else +++ puts ("_POSIX_MONOTONIC_CLOCK not defined"); +++# endif +++ +++ return res; +++#endif +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-cond24.c ++@@ -0,0 +1,249 @@ +++/* Verify that condition variables synchronized by PI mutexes don't hang. +++ Copyright (C) 2012-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 +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++#define THREADS_NUM 5 +++#define MAXITER 50000 +++ +++static pthread_mutex_t mutex; +++static pthread_mutexattr_t mutex_attr; +++static pthread_cond_t cond; +++static pthread_t threads[THREADS_NUM]; +++static int pending = 0; +++ +++typedef void * (*threadfunc) (void *); +++ +++void * +++thread_fun_timed (void *arg) +++{ +++ int *ret = arg; +++ int rv, i; +++ +++ printf ("Started thread_fun_timed[%d]\n", *ret); +++ +++ for (i = 0; i < MAXITER / THREADS_NUM; i++) +++ { +++ rv = pthread_mutex_lock (&mutex); +++ if (rv) +++ { +++ printf ("pthread_mutex_lock: %s(%d)\n", strerror (rv), rv); +++ *ret = 1; +++ goto out; +++ } +++ +++ while (!pending) +++ { +++ struct timespec ts; +++ clock_gettime(CLOCK_REALTIME, &ts); +++ ts.tv_sec += 20; +++ rv = pthread_cond_timedwait (&cond, &mutex, &ts); +++ +++ /* There should be no timeout either. */ +++ if (rv) +++ { +++ printf ("pthread_cond_wait: %s(%d)\n", strerror (rv), rv); +++ *ret = 1; +++ goto out; +++ } +++ } +++ +++ pending--; +++ +++ rv = pthread_mutex_unlock (&mutex); +++ if (rv) +++ { +++ printf ("pthread_mutex_unlock: %s(%d)\n", strerror (rv), rv); +++ *ret = 1; +++ goto out; +++ } +++ } +++ +++ *ret = 0; +++ +++out: +++ return ret; +++} +++ +++void * +++thread_fun (void *arg) +++{ +++ int *ret = arg; +++ int rv, i; +++ +++ printf ("Started thread_fun[%d]\n", *ret); +++ +++ for (i = 0; i < MAXITER / THREADS_NUM; i++) +++ { +++ rv = pthread_mutex_lock (&mutex); +++ if (rv) +++ { +++ printf ("pthread_mutex_lock: %s(%d)\n", strerror (rv), rv); +++ *ret = 1; +++ goto out; +++ } +++ +++ while (!pending) +++ { +++ rv = pthread_cond_wait (&cond, &mutex); +++ +++ if (rv) +++ { +++ printf ("pthread_cond_wait: %s(%d)\n", strerror (rv), rv); +++ *ret = 1; +++ goto out; +++ } +++ } +++ +++ pending--; +++ +++ rv = pthread_mutex_unlock (&mutex); +++ if (rv) +++ { +++ printf ("pthread_mutex_unlock: %s(%d)\n", strerror (rv), rv); +++ *ret = 1; +++ goto out; +++ } +++ } +++ +++ *ret = 0; +++ +++out: +++ return ret; +++} +++ +++static int +++do_test_wait (threadfunc f) +++{ +++ int i; +++ int rv; +++ int counter = 0; +++ int retval[THREADS_NUM]; +++ +++ puts ("Starting test"); +++ +++ rv = pthread_mutexattr_init (&mutex_attr); +++ if (rv) +++ { +++ printf ("pthread_mutexattr_init: %s(%d)\n", strerror (rv), rv); +++ return 1; +++ } +++ +++ rv = pthread_mutexattr_setprotocol (&mutex_attr, PTHREAD_PRIO_INHERIT); +++ if (rv) +++ { +++ printf ("pthread_mutexattr_setprotocol: %s(%d)\n", strerror (rv), rv); +++ return 1; +++ } +++ +++ rv = pthread_mutex_init (&mutex, &mutex_attr); +++ if (rv) +++ { +++ printf ("pthread_mutex_init: %s(%d)\n", strerror (rv), rv); +++ return 1; +++ } +++ +++ rv = pthread_cond_init (&cond, NULL); +++ if (rv) +++ { +++ printf ("pthread_cond_init: %s(%d)\n", strerror (rv), rv); +++ return 1; +++ } +++ +++ for (i = 0; i < THREADS_NUM; i++) +++ { +++ retval[i] = i; +++ rv = pthread_create (&threads[i], NULL, f, &retval[i]); +++ if (rv) +++ { +++ printf ("pthread_create: %s(%d)\n", strerror (rv), rv); +++ return 1; +++ } +++ } +++ +++ for (; counter < MAXITER; counter++) +++ { +++ rv = pthread_mutex_lock (&mutex); +++ if (rv) +++ { +++ printf ("pthread_mutex_lock: %s(%d)\n", strerror (rv), rv); +++ return 1; +++ } +++ +++ if (!(counter % 100)) +++ printf ("counter: %d\n", counter); +++ pending += 1; +++ +++ rv = pthread_cond_signal (&cond); +++ if (rv) +++ { +++ printf ("pthread_cond_signal: %s(%d)\n", strerror (rv), rv); +++ return 1; +++ } +++ +++ rv = pthread_mutex_unlock (&mutex); +++ if (rv) +++ { +++ printf ("pthread_mutex_unlock: %s(%d)\n", strerror (rv), rv); +++ return 1; +++ } +++ } +++ +++ for (i = 0; i < THREADS_NUM; i++) +++ { +++ void *ret; +++ rv = pthread_join (threads[i], &ret); +++ if (rv) +++ { +++ printf ("pthread_join: %s(%d)\n", strerror (rv), rv); +++ return 1; +++ } +++ if (ret && *(int *)ret) +++ { +++ printf ("Thread %d returned with an error\n", i); +++ return 1; +++ } +++ } +++ +++ return 0; +++} +++ +++static int +++do_test (void) +++{ +++ puts ("Testing pthread_cond_wait"); +++ int ret = do_test_wait (thread_fun); +++ if (ret) +++ return ret; +++ +++ puts ("Testing pthread_cond_timedwait"); +++ return do_test_wait (thread_fun_timed); +++} +++ +++#define TIMEOUT 20 +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-cond25.c ++@@ -0,0 +1,281 @@ +++/* Verify that condition variables synchronized by PI mutexes don't hang on +++ on cancellation. +++ Copyright (C) 2012-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 +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++#define NUM 5 +++#define ITERS 10000 +++#define COUNT 100 +++ +++typedef void *(*thr_func) (void *); +++ +++pthread_mutex_t mutex; +++pthread_cond_t cond; +++ +++void cleanup (void *u) +++{ +++ /* pthread_cond_wait should always return with the mutex locked. */ +++ if (pthread_mutex_unlock (&mutex)) +++ abort (); +++} +++ +++void * +++signaller (void *u) +++{ +++ int i, ret = 0; +++ void *tret = NULL; +++ +++ for (i = 0; i < ITERS; i++) +++ { +++ if ((ret = pthread_mutex_lock (&mutex)) != 0) +++ { +++ tret = (void *)1; +++ printf ("signaller:mutex_lock failed: %s\n", strerror (ret)); +++ goto out; +++ } +++ if ((ret = pthread_cond_signal (&cond)) != 0) +++ { +++ tret = (void *)1; +++ printf ("signaller:signal failed: %s\n", strerror (ret)); +++ goto unlock_out; +++ } +++ if ((ret = pthread_mutex_unlock (&mutex)) != 0) +++ { +++ tret = (void *)1; +++ printf ("signaller:mutex_unlock failed: %s\n", strerror (ret)); +++ goto out; +++ } +++ pthread_testcancel (); +++ } +++ +++out: +++ return tret; +++ +++unlock_out: +++ if ((ret = pthread_mutex_unlock (&mutex)) != 0) +++ printf ("signaller:mutex_unlock[2] failed: %s\n", strerror (ret)); +++ goto out; +++} +++ +++void * +++waiter (void *u) +++{ +++ int i, ret = 0; +++ void *tret = NULL; +++ int seq = (uintptr_t) u; +++ +++ for (i = 0; i < ITERS / NUM; i++) +++ { +++ if ((ret = pthread_mutex_lock (&mutex)) != 0) +++ { +++ tret = (void *) (uintptr_t) 1; +++ printf ("waiter[%u]:mutex_lock failed: %s\n", seq, strerror (ret)); +++ goto out; +++ } +++ pthread_cleanup_push (cleanup, NULL); +++ +++ if ((ret = pthread_cond_wait (&cond, &mutex)) != 0) +++ { +++ tret = (void *) (uintptr_t) 1; +++ printf ("waiter[%u]:wait failed: %s\n", seq, strerror (ret)); +++ goto unlock_out; +++ } +++ +++ if ((ret = pthread_mutex_unlock (&mutex)) != 0) +++ { +++ tret = (void *) (uintptr_t) 1; +++ printf ("waiter[%u]:mutex_unlock failed: %s\n", seq, strerror (ret)); +++ goto out; +++ } +++ pthread_cleanup_pop (0); +++ } +++ +++out: +++ puts ("waiter tests done"); +++ return tret; +++ +++unlock_out: +++ if ((ret = pthread_mutex_unlock (&mutex)) != 0) +++ printf ("waiter:mutex_unlock[2] failed: %s\n", strerror (ret)); +++ goto out; +++} +++ +++void * +++timed_waiter (void *u) +++{ +++ int i, ret; +++ void *tret = NULL; +++ int seq = (uintptr_t) u; +++ +++ for (i = 0; i < ITERS / NUM; i++) +++ { +++ struct timespec ts; +++ +++ if ((ret = clock_gettime(CLOCK_REALTIME, &ts)) != 0) +++ { +++ tret = (void *) (uintptr_t) 1; +++ printf ("%u:clock_gettime failed: %s\n", seq, strerror (errno)); +++ goto out; +++ } +++ ts.tv_sec += 20; +++ +++ if ((ret = pthread_mutex_lock (&mutex)) != 0) +++ { +++ tret = (void *) (uintptr_t) 1; +++ printf ("waiter[%u]:mutex_lock failed: %s\n", seq, strerror (ret)); +++ goto out; +++ } +++ pthread_cleanup_push (cleanup, NULL); +++ +++ /* We should not time out either. */ +++ if ((ret = pthread_cond_timedwait (&cond, &mutex, &ts)) != 0) +++ { +++ tret = (void *) (uintptr_t) 1; +++ printf ("waiter[%u]:timedwait failed: %s\n", seq, strerror (ret)); +++ goto unlock_out; +++ } +++ if ((ret = pthread_mutex_unlock (&mutex)) != 0) +++ { +++ tret = (void *) (uintptr_t) 1; +++ printf ("waiter[%u]:mutex_unlock failed: %s\n", seq, strerror (ret)); +++ goto out; +++ } +++ pthread_cleanup_pop (0); +++ } +++ +++out: +++ puts ("timed_waiter tests done"); +++ return tret; +++ +++unlock_out: +++ if ((ret = pthread_mutex_unlock (&mutex)) != 0) +++ printf ("waiter[%u]:mutex_unlock[2] failed: %s\n", seq, strerror (ret)); +++ goto out; +++} +++ +++int +++do_test_wait (thr_func f) +++{ +++ pthread_t w[NUM]; +++ pthread_t s; +++ pthread_mutexattr_t attr; +++ int i, j, ret = 0; +++ void *thr_ret; +++ +++ for (i = 0; i < COUNT; i++) +++ { +++ if ((ret = pthread_mutexattr_init (&attr)) != 0) +++ { +++ printf ("mutexattr_init failed: %s\n", strerror (ret)); +++ goto out; +++ } +++ +++ if ((ret = pthread_mutexattr_setprotocol (&attr, +++ PTHREAD_PRIO_INHERIT)) != 0) +++ { +++ printf ("mutexattr_setprotocol failed: %s\n", strerror (ret)); +++ goto out; +++ } +++ +++ if ((ret = pthread_cond_init (&cond, NULL)) != 0) +++ { +++ printf ("cond_init failed: %s\n", strerror (ret)); +++ goto out; +++ } +++ +++ if ((ret = pthread_mutex_init (&mutex, &attr)) != 0) +++ { +++ printf ("mutex_init failed: %s\n", strerror (ret)); +++ goto out; +++ } +++ +++ for (j = 0; j < NUM; j++) +++ if ((ret = pthread_create (&w[j], NULL, +++ f, (void *) (uintptr_t) j)) != 0) +++ { +++ printf ("waiter[%d]: create failed: %s\n", j, strerror (ret)); +++ goto out; +++ } +++ +++ if ((ret = pthread_create (&s, NULL, signaller, NULL)) != 0) +++ { +++ printf ("signaller: create failed: %s\n", strerror (ret)); +++ goto out; +++ } +++ +++ for (j = 0; j < NUM; j++) +++ { +++ pthread_cancel (w[j]); +++ +++ if ((ret = pthread_join (w[j], &thr_ret)) != 0) +++ { +++ printf ("waiter[%d]: join failed: %s\n", j, strerror (ret)); +++ goto out; +++ } +++ +++ if (thr_ret != NULL && thr_ret != PTHREAD_CANCELED) +++ { +++ ret = 1; +++ goto out; +++ } +++ } +++ +++ /* The signalling thread could have ended before it was cancelled. */ +++ pthread_cancel (s); +++ +++ if ((ret = pthread_join (s, &thr_ret)) != 0) +++ { +++ printf ("signaller: join failed: %s\n", strerror (ret)); +++ goto out; +++ } +++ +++ if (thr_ret != NULL && thr_ret != PTHREAD_CANCELED) +++ { +++ ret = 1; +++ goto out; +++ } +++ } +++ +++out: +++ return ret; +++} +++ +++int +++do_test (int argc, char **argv) +++{ +++ int ret = do_test_wait (waiter); +++ +++ if (ret) +++ return ret; +++ +++ return do_test_wait (timed_waiter); +++} +++ +++#define TIMEOUT 5 +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-cond3.c ++@@ -0,0 +1,111 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++ +++static int do_test (void); +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" +++ +++/* Note that this test requires more than the standard. It is +++ required that there are no spurious wakeups if only more readers +++ are added. This is a reasonable demand. */ +++ +++ +++static pthread_cond_t cond = PTHREAD_COND_INITIALIZER; +++static pthread_mutex_t mut = PTHREAD_MUTEX_INITIALIZER; +++ +++ +++#define N 10 +++ +++ +++static void * +++tf (void *arg) +++{ +++ int i = (long int) arg; +++ int err; +++ +++ /* Get the mutex. */ +++ err = pthread_mutex_lock (&mut); +++ if (err != 0) +++ { +++ printf ("child %d mutex_lock failed: %s\n", i, strerror (err)); +++ exit (1); +++ } +++ +++ /* This call should never return. */ +++ xpthread_cond_wait (&cond, &mut); +++ puts ("error: pthread_cond_wait in tf returned"); +++ +++ /* We should never get here. */ +++ exit (1); +++ +++ return NULL; +++} +++ +++ +++static int +++do_test (void) +++{ +++ int err; +++ int i; +++ +++ for (i = 0; i < N; ++i) +++ { +++ pthread_t th; +++ +++ if (i != 0) +++ { +++ /* Release the mutex. */ +++ err = pthread_mutex_unlock (&mut); +++ if (err != 0) +++ { +++ printf ("mutex_unlock %d failed: %s\n", i, strerror (err)); +++ return 1; +++ } +++ } +++ +++ err = pthread_create (&th, NULL, tf, (void *) (long int) i); +++ if (err != 0) +++ { +++ printf ("create %d failed: %s\n", i, strerror (err)); +++ return 1; +++ } +++ +++ /* Get the mutex. */ +++ err = pthread_mutex_lock (&mut); +++ if (err != 0) +++ { +++ printf ("mutex_lock %d failed: %s\n", i, strerror (err)); +++ return 1; +++ } +++ } +++ +++ delayed_exit (1); +++ +++ /* This call should never return. */ +++ xpthread_cond_wait (&cond, &mut); +++ +++ puts ("error: pthread_cond_wait in do_test returned"); +++ return 1; +++} ++--- /dev/null +++++ b/fbtl/tst-cond4.c ++@@ -0,0 +1,262 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++int *condition; +++ +++static int +++do_test (void) +++{ +++ size_t ps = sysconf (_SC_PAGESIZE); +++ char tmpfname[] = "/tmp/tst-cond4.XXXXXX"; +++ char data[ps]; +++ void *mem; +++ int fd; +++ pthread_mutexattr_t ma; +++ pthread_mutex_t *mut1; +++ pthread_mutex_t *mut2; +++ pthread_condattr_t ca; +++ pthread_cond_t *cond; +++ pid_t pid; +++ int result = 0; +++ int p; +++ +++ fd = mkstemp (tmpfname); +++ if (fd == -1) +++ { +++ printf ("cannot open temporary file: %m\n"); +++ return 1; +++ } +++ +++ /* Make sure it is always removed. */ +++ unlink (tmpfname); +++ +++ /* Create one page of data. */ +++ memset (data, '\0', ps); +++ +++ /* Write the data to the file. */ +++ if (write (fd, data, ps) != (ssize_t) ps) +++ { +++ puts ("short write"); +++ return 1; +++ } +++ +++ mem = mmap (NULL, ps, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); +++ if (mem == MAP_FAILED) +++ { +++ printf ("mmap failed: %m\n"); +++ return 1; +++ } +++ +++ mut1 = (pthread_mutex_t *) (((uintptr_t) mem +++ + __alignof (pthread_mutex_t)) +++ & ~(__alignof (pthread_mutex_t) - 1)); +++ mut2 = mut1 + 1; +++ +++ cond = (pthread_cond_t *) (((uintptr_t) (mut2 + 1) +++ + __alignof (pthread_cond_t)) +++ & ~(__alignof (pthread_cond_t) - 1)); +++ +++ condition = (int *) (((uintptr_t) (cond + 1) + __alignof (int)) +++ & ~(__alignof (int) - 1)); +++ +++ if (pthread_mutexattr_init (&ma) != 0) +++ { +++ puts ("mutexattr_init failed"); +++ return 1; +++ } +++ +++ if (pthread_mutexattr_getpshared (&ma, &p) != 0) +++ { +++ puts ("1st mutexattr_getpshared failed"); +++ return 1; +++ } +++ +++ if (p != PTHREAD_PROCESS_PRIVATE) +++ { +++ puts ("default pshared value wrong"); +++ return 1; +++ } +++ +++ if (pthread_mutexattr_setpshared (&ma, PTHREAD_PROCESS_SHARED) != 0) +++ { +++ puts ("mutexattr_setpshared failed"); +++ return 1; +++ } +++ +++ if (pthread_mutexattr_getpshared (&ma, &p) != 0) +++ { +++ puts ("2nd mutexattr_getpshared failed"); +++ return 1; +++ } +++ +++ if (p != PTHREAD_PROCESS_SHARED) +++ { +++ puts ("pshared value after setpshared call wrong"); +++ return 1; +++ } +++ +++ if (pthread_mutex_init (mut1, &ma) != 0) +++ { +++ puts ("1st mutex_init failed"); +++ return 1; +++ } +++ +++ if (pthread_mutex_init (mut2, &ma) != 0) +++ { +++ puts ("2nd mutex_init failed"); +++ return 1; +++ } +++ +++ if (pthread_condattr_init (&ca) != 0) +++ { +++ puts ("condattr_init failed"); +++ return 1; +++ } +++ +++ if (pthread_condattr_getpshared (&ca, &p) != 0) +++ { +++ puts ("1st condattr_getpshared failed"); +++ return 1; +++ } +++ +++ if (p != PTHREAD_PROCESS_PRIVATE) +++ { +++ puts ("default value for pshared in condattr wrong"); +++ return 1; +++ } +++ +++ if (pthread_condattr_setpshared (&ca, PTHREAD_PROCESS_SHARED) != 0) +++ { +++ puts ("condattr_setpshared failed"); +++ return 1; +++ } +++ +++ if (pthread_condattr_getpshared (&ca, &p) != 0) +++ { +++ puts ("2nd condattr_getpshared failed"); +++ return 1; +++ } +++ +++ if (p != PTHREAD_PROCESS_SHARED) +++ { +++ puts ("pshared condattr still not set"); +++ return 1; +++ } +++ +++ if (pthread_cond_init (cond, &ca) != 0) +++ { +++ puts ("cond_init failed"); +++ return 1; +++ } +++ +++ if (pthread_mutex_lock (mut1) != 0) +++ { +++ puts ("parent: 1st mutex_lock failed"); +++ return 1; +++ } +++ +++ puts ("going to fork now"); +++ pid = fork (); +++ if (pid == -1) +++ { +++ puts ("fork failed"); +++ return 1; +++ } +++ else if (pid == 0) +++ { +++ if (pthread_mutex_lock (mut2) != 0) +++ { +++ puts ("child: mutex_lock failed"); +++ return 1; +++ } +++ +++ if (pthread_mutex_unlock (mut1) != 0) +++ { +++ puts ("child: 1st mutex_unlock failed"); +++ return 1; +++ } +++ +++ do +++ if (pthread_cond_wait (cond, mut2) != 0) +++ { +++ puts ("child: cond_wait failed"); +++ return 1; +++ } +++ while (*condition == 0); +++ +++ if (pthread_mutex_unlock (mut2) != 0) +++ { +++ puts ("child: 2nd mutex_unlock failed"); +++ return 1; +++ } +++ +++ puts ("child done"); +++ } +++ else +++ { +++ int status; +++ +++ if (pthread_mutex_lock (mut1) != 0) +++ { +++ puts ("parent: 2nd mutex_lock failed"); +++ return 1; +++ } +++ +++ if (pthread_mutex_lock (mut2) != 0) +++ { +++ puts ("parent: 3rd mutex_lock failed"); +++ return 1; +++ } +++ +++ if (pthread_cond_signal (cond) != 0) +++ { +++ puts ("parent: cond_signal failed"); +++ return 1; +++ } +++ +++ *condition = 1; +++ +++ if (pthread_mutex_unlock (mut2) != 0) +++ { +++ puts ("parent: mutex_unlock failed"); +++ return 1; +++ } +++ +++ puts ("waiting for child"); +++ +++ waitpid (pid, &status, 0); +++ result |= status; +++ +++ puts ("parent done"); +++ } +++ +++ return result; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-cond5.c ++@@ -0,0 +1,105 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++static pthread_mutex_t mut; +++static pthread_cond_t cond = PTHREAD_COND_INITIALIZER; +++ +++ +++static int +++do_test (void) +++{ +++ pthread_mutexattr_t ma; +++ int err; +++ struct timespec ts; +++ struct timeval tv; +++ +++ if (pthread_mutexattr_init (&ma) != 0) +++ { +++ puts ("mutexattr_init failed"); +++ exit (1); +++ } +++ +++ if (pthread_mutexattr_settype (&ma, PTHREAD_MUTEX_ERRORCHECK) != 0) +++ { +++ puts ("mutexattr_settype failed"); +++ exit (1); +++ } +++ +++ if (pthread_mutex_init (&mut, &ma) != 0) +++ { +++ puts ("mutex_init failed"); +++ exit (1); +++ } +++ +++ /* Get the mutex. */ +++ if (pthread_mutex_lock (&mut) != 0) +++ { +++ puts ("mutex_lock failed"); +++ exit (1); +++ } +++ +++ /* Waiting for the condition will fail. But we want the timeout here. */ +++ if (gettimeofday (&tv, NULL) != 0) +++ { +++ puts ("gettimeofday failed"); +++ exit (1); +++ } +++ +++ TIMEVAL_TO_TIMESPEC (&tv, &ts); +++ ts.tv_nsec += 500000000; +++ if (ts.tv_nsec >= 1000000000) +++ { +++ ts.tv_nsec -= 1000000000; +++ ++ts.tv_sec; +++ } +++ err = pthread_cond_timedwait (&cond, &mut, &ts); +++ if (err == 0) +++ { +++ /* This could in theory happen but here without any signal and +++ additional waiter it should not. */ +++ puts ("cond_timedwait succeeded"); +++ exit (1); +++ } +++ else if (err != ETIMEDOUT) +++ { +++ printf ("cond_timedwait returned with %s\n", strerror (err)); +++ exit (1); +++ } +++ +++ err = pthread_mutex_unlock (&mut); +++ if (err != 0) +++ { +++ printf ("mutex_unlock failed: %s\n", strerror (err)); +++ exit (1); +++ } +++ +++ return 0; +++} +++ +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-cond6.c ++@@ -0,0 +1,232 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++int *condition; +++ +++static int +++do_test (void) +++{ +++ size_t ps = sysconf (_SC_PAGESIZE); +++ char tmpfname[] = "/tmp/tst-cond6.XXXXXX"; +++ char data[ps]; +++ void *mem; +++ int fd; +++ pthread_mutexattr_t ma; +++ pthread_mutex_t *mut1; +++ pthread_mutex_t *mut2; +++ pthread_condattr_t ca; +++ pthread_cond_t *cond; +++ pid_t pid; +++ int result = 0; +++ +++ fd = mkstemp (tmpfname); +++ if (fd == -1) +++ { +++ printf ("cannot open temporary file: %m\n"); +++ exit (1); +++ } +++ +++ /* Make sure it is always removed. */ +++ unlink (tmpfname); +++ +++ /* Create one page of data. */ +++ memset (data, '\0', ps); +++ +++ /* Write the data to the file. */ +++ if (write (fd, data, ps) != (ssize_t) ps) +++ { +++ puts ("short write"); +++ exit (1); +++ } +++ +++ mem = mmap (NULL, ps, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); +++ if (mem == MAP_FAILED) +++ { +++ printf ("mmap failed: %m\n"); +++ exit (1); +++ } +++ +++ mut1 = (pthread_mutex_t *) (((uintptr_t) mem +++ + __alignof (pthread_mutex_t)) +++ & ~(__alignof (pthread_mutex_t) - 1)); +++ mut2 = mut1 + 1; +++ +++ cond = (pthread_cond_t *) (((uintptr_t) (mut2 + 1) +++ + __alignof (pthread_cond_t)) +++ & ~(__alignof (pthread_cond_t) - 1)); +++ +++ condition = (int *) (((uintptr_t) (cond + 1) + __alignof (int)) +++ & ~(__alignof (int) - 1)); +++ +++ if (pthread_mutexattr_init (&ma) != 0) +++ { +++ puts ("mutexattr_init failed"); +++ exit (1); +++ } +++ +++ if (pthread_mutexattr_setpshared (&ma, PTHREAD_PROCESS_SHARED) != 0) +++ { +++ puts ("mutexattr_setpshared failed"); +++ exit (1); +++ } +++ +++ if (pthread_mutex_init (mut1, &ma) != 0) +++ { +++ puts ("1st mutex_init failed"); +++ exit (1); +++ } +++ +++ if (pthread_mutex_init (mut2, &ma) != 0) +++ { +++ puts ("2nd mutex_init failed"); +++ exit (1); +++ } +++ +++ if (pthread_condattr_init (&ca) != 0) +++ { +++ puts ("condattr_init failed"); +++ exit (1); +++ } +++ +++ if (pthread_condattr_setpshared (&ca, PTHREAD_PROCESS_SHARED) != 0) +++ { +++ puts ("condattr_setpshared failed"); +++ exit (1); +++ } +++ +++ if (pthread_cond_init (cond, &ca) != 0) +++ { +++ puts ("cond_init failed"); +++ exit (1); +++ } +++ +++ if (pthread_mutex_lock (mut1) != 0) +++ { +++ puts ("parent: 1st mutex_lock failed"); +++ exit (1); +++ } +++ +++ puts ("going to fork now"); +++ pid = fork (); +++ if (pid == -1) +++ { +++ puts ("fork failed"); +++ exit (1); +++ } +++ else if (pid == 0) +++ { +++ struct timespec ts; +++ struct timeval tv; +++ +++ if (pthread_mutex_lock (mut2) != 0) +++ { +++ puts ("child: mutex_lock failed"); +++ exit (1); +++ } +++ +++ if (pthread_mutex_unlock (mut1) != 0) +++ { +++ puts ("child: 1st mutex_unlock failed"); +++ exit (1); +++ } +++ +++ if (gettimeofday (&tv, NULL) != 0) +++ { +++ puts ("gettimeofday failed"); +++ exit (1); +++ } +++ +++ TIMEVAL_TO_TIMESPEC (&tv, &ts); +++ ts.tv_nsec += 500000000; +++ if (ts.tv_nsec >= 1000000000) +++ { +++ ts.tv_nsec -= 1000000000; +++ ++ts.tv_sec; +++ } +++ +++ do +++ if (pthread_cond_timedwait (cond, mut2, &ts) != 0) +++ { +++ puts ("child: cond_wait failed"); +++ exit (1); +++ } +++ while (*condition == 0); +++ +++ if (pthread_mutex_unlock (mut2) != 0) +++ { +++ puts ("child: 2nd mutex_unlock failed"); +++ exit (1); +++ } +++ +++ puts ("child done"); +++ } +++ else +++ { +++ int status; +++ +++ if (pthread_mutex_lock (mut1) != 0) +++ { +++ puts ("parent: 2nd mutex_lock failed"); +++ exit (1); +++ } +++ +++ if (pthread_mutex_lock (mut2) != 0) +++ { +++ puts ("parent: 3rd mutex_lock failed"); +++ exit (1); +++ } +++ +++ if (pthread_cond_signal (cond) != 0) +++ { +++ puts ("parent: cond_signal failed"); +++ exit (1); +++ } +++ +++ *condition = 1; +++ +++ if (pthread_mutex_unlock (mut2) != 0) +++ { +++ puts ("parent: mutex_unlock failed"); +++ exit (1); +++ } +++ +++ puts ("waiting for child"); +++ +++ waitpid (pid, &status, 0); +++ result |= status; +++ +++ puts ("parent done"); +++ } +++ +++ return result; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-cond7.c ++@@ -0,0 +1,167 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Jakub Jelinek , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++typedef struct +++ { +++ pthread_cond_t cond; +++ pthread_mutex_t lock; +++ pthread_t h; +++ } T; +++ +++ +++static volatile bool done; +++ +++ +++static void * +++tf (void *arg) +++{ +++ puts ("child created"); +++ +++ if (pthread_setcancelstate (PTHREAD_CANCEL_ENABLE, NULL) != 0 +++ || pthread_setcanceltype (PTHREAD_CANCEL_DEFERRED, NULL) != 0) +++ { +++ puts ("cannot set cancellation options"); +++ exit (1); +++ } +++ +++ T *t = (T *) arg; +++ +++ if (pthread_mutex_lock (&t->lock) != 0) +++ { +++ puts ("child: lock failed"); +++ exit (1); +++ } +++ +++ done = true; +++ +++ if (pthread_cond_signal (&t->cond) != 0) +++ { +++ puts ("child: cond_signal failed"); +++ exit (1); +++ } +++ +++ if (pthread_cond_wait (&t->cond, &t->lock) != 0) +++ { +++ puts ("child: cond_wait failed"); +++ exit (1); +++ } +++ +++ if (pthread_mutex_unlock (&t->lock) != 0) +++ { +++ puts ("child: unlock failed"); +++ exit (1); +++ } +++ +++ return NULL; +++} +++ +++ +++static int +++do_test (void) +++{ +++ int i; +++#define N 100 +++ T *t[N]; +++ for (i = 0; i < N; ++i) +++ { +++ printf ("round %d\n", i); +++ +++ t[i] = (T *) malloc (sizeof (T)); +++ if (t[i] == NULL) +++ { +++ puts ("out of memory"); +++ exit (1); +++ } +++ +++ if (pthread_mutex_init (&t[i]->lock, NULL) != 0 +++ || pthread_cond_init (&t[i]->cond, NULL) != 0) +++ { +++ puts ("an _init function failed"); +++ exit (1); +++ } +++ +++ if (pthread_mutex_lock (&t[i]->lock) != 0) +++ { +++ puts ("initial mutex_lock failed"); +++ exit (1); +++ } +++ +++ done = false; +++ +++ if (pthread_create (&t[i]->h, NULL, tf, t[i]) != 0) +++ { +++ puts ("pthread_create failed"); +++ exit (1); +++ } +++ +++ do +++ if (pthread_cond_wait (&t[i]->cond, &t[i]->lock) != 0) +++ { +++ puts ("cond_wait failed"); +++ exit (1); +++ } +++ while (! done); +++ +++ /* Release the lock since the cancel handler will get it. */ +++ if (pthread_mutex_unlock (&t[i]->lock) != 0) +++ { +++ puts ("mutex_unlock failed"); +++ exit (1); +++ } +++ +++ if (pthread_cancel (t[i]->h) != 0) +++ { +++ puts ("cancel failed"); +++ exit (1); +++ } +++ +++ puts ("parent: joining now"); +++ +++ void *result; +++ if (pthread_join (t[i]->h, &result) != 0) +++ { +++ puts ("join failed"); +++ exit (1); +++ } +++ +++ if (result != PTHREAD_CANCELED) +++ { +++ puts ("result != PTHREAD_CANCELED"); +++ exit (1); +++ } +++ } +++ +++ for (i = 0; i < N; ++i) +++ free (t[i]); +++ +++ return 0; +++} +++ +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-cond8-static.c ++@@ -0,0 +1 @@ +++#include "tst-cond8.c" ++--- /dev/null +++++ b/fbtl/tst-cond8.c ++@@ -0,0 +1,276 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++static pthread_cond_t cond = PTHREAD_COND_INITIALIZER; +++static pthread_mutex_t mut = PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP; +++ +++static pthread_barrier_t bar; +++ +++ +++static void +++ch (void *arg) +++{ +++ int e = pthread_mutex_lock (&mut); +++ if (e == 0) +++ { +++ puts ("mutex not locked at all by cond_wait"); +++ exit (1); +++ } +++ +++ if (e != EDEADLK) +++ { +++ puts ("no deadlock error signaled"); +++ exit (1); +++ } +++ +++ if (pthread_mutex_unlock (&mut) != 0) +++ { +++ puts ("ch: cannot unlock mutex"); +++ exit (1); +++ } +++ +++ puts ("ch done"); +++} +++ +++ +++static void * +++tf1 (void *p) +++{ +++ int err; +++ +++ if (pthread_setcancelstate (PTHREAD_CANCEL_ENABLE, NULL) != 0 +++ || pthread_setcanceltype (PTHREAD_CANCEL_DEFERRED, NULL) != 0) +++ { +++ puts ("cannot set cancellation options"); +++ exit (1); +++ } +++ +++ err = pthread_mutex_lock (&mut); +++ if (err != 0) +++ { +++ puts ("child: cannot get mutex"); +++ exit (1); +++ } +++ +++ err = pthread_barrier_wait (&bar); +++ if (err != 0 && err != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("barrier_wait returned %d\n", err); +++ exit (1); +++ } +++ +++ puts ("child: got mutex; waiting"); +++ +++ pthread_cleanup_push (ch, NULL); +++ +++ pthread_cond_wait (&cond, &mut); +++ +++ pthread_cleanup_pop (0); +++ +++ puts ("child: cond_wait should not have returned"); +++ +++ return NULL; +++} +++ +++ +++static void * +++tf2 (void *p) +++{ +++ int err; +++ +++ if (pthread_setcancelstate (PTHREAD_CANCEL_ENABLE, NULL) != 0 +++ || pthread_setcanceltype (PTHREAD_CANCEL_DEFERRED, NULL) != 0) +++ { +++ puts ("cannot set cancellation options"); +++ exit (1); +++ } +++ +++ err = pthread_mutex_lock (&mut); +++ if (err != 0) +++ { +++ puts ("child: cannot get mutex"); +++ exit (1); +++ } +++ +++ err = pthread_barrier_wait (&bar); +++ if (err != 0 && err != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("barrier_wait returned %d\n", err); +++ exit (1); +++ } +++ +++ puts ("child: got mutex; waiting"); +++ +++ pthread_cleanup_push (ch, NULL); +++ +++ /* Current time. */ +++ struct timeval tv; +++ (void) gettimeofday (&tv, NULL); +++ /* +1000 seconds in correct format. */ +++ struct timespec ts; +++ TIMEVAL_TO_TIMESPEC (&tv, &ts); +++ ts.tv_sec += 1000; +++ +++ pthread_cond_timedwait (&cond, &mut, &ts); +++ +++ pthread_cleanup_pop (0); +++ +++ puts ("child: cond_wait should not have returned"); +++ +++ return NULL; +++} +++ +++ +++static int +++do_test (void) +++{ +++ pthread_t th; +++ int err; +++ +++ printf ("&cond = %p\n&mut = %p\n", &cond, &mut); +++ +++ puts ("parent: get mutex"); +++ +++ err = pthread_barrier_init (&bar, NULL, 2); +++ if (err != 0) +++ { +++ puts ("parent: cannot init barrier"); +++ exit (1); +++ } +++ +++ puts ("parent: create child"); +++ +++ err = pthread_create (&th, NULL, tf1, NULL); +++ if (err != 0) +++ { +++ puts ("parent: cannot create thread"); +++ exit (1); +++ } +++ +++ puts ("parent: wait for child to lock mutex"); +++ +++ err = pthread_barrier_wait (&bar); +++ if (err != 0 && err != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("parent: cannot wait for barrier"); +++ exit (1); +++ } +++ +++ err = pthread_mutex_lock (&mut); +++ if (err != 0) +++ { +++ puts ("parent: mutex_lock failed"); +++ exit (1); +++ } +++ +++ err = pthread_mutex_unlock (&mut); +++ if (err != 0) +++ { +++ puts ("parent: mutex_unlock failed"); +++ exit (1); +++ } +++ +++ if (pthread_cancel (th) != 0) +++ { +++ puts ("cannot cancel thread"); +++ exit (1); +++ } +++ +++ void *r; +++ err = pthread_join (th, &r); +++ if (err != 0) +++ { +++ puts ("parent: failed to join"); +++ exit (1); +++ } +++ +++ if (r != PTHREAD_CANCELED) +++ { +++ puts ("child hasn't been canceled"); +++ exit (1); +++ } +++ +++ +++ +++ puts ("parent: create 2nd child"); +++ +++ err = pthread_create (&th, NULL, tf2, NULL); +++ if (err != 0) +++ { +++ puts ("parent: cannot create thread"); +++ exit (1); +++ } +++ +++ puts ("parent: wait for child to lock mutex"); +++ +++ err = pthread_barrier_wait (&bar); +++ if (err != 0 && err != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("parent: cannot wait for barrier"); +++ exit (1); +++ } +++ +++ err = pthread_mutex_lock (&mut); +++ if (err != 0) +++ { +++ puts ("parent: mutex_lock failed"); +++ exit (1); +++ } +++ +++ err = pthread_mutex_unlock (&mut); +++ if (err != 0) +++ { +++ puts ("parent: mutex_unlock failed"); +++ exit (1); +++ } +++ +++ if (pthread_cancel (th) != 0) +++ { +++ puts ("cannot cancel thread"); +++ exit (1); +++ } +++ +++ err = pthread_join (th, &r); +++ if (err != 0) +++ { +++ puts ("parent: failed to join"); +++ exit (1); +++ } +++ +++ if (r != PTHREAD_CANCELED) +++ { +++ puts ("child hasn't been canceled"); +++ exit (1); +++ } +++ +++ puts ("done"); +++ +++ return 0; +++} +++ +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-cond9.c ++@@ -0,0 +1,149 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++static pthread_cond_t cond = PTHREAD_COND_INITIALIZER; +++static pthread_mutex_t mut = PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP; +++ +++ +++static void * +++tf (void *arg) +++{ +++ int err = pthread_cond_wait (&cond, &mut); +++ if (err == 0) +++ { +++ puts ("cond_wait did not fail"); +++ exit (1); +++ } +++ +++ if (err != EPERM) +++ { +++ printf ("cond_wait didn't return EPERM but %d\n", err); +++ exit (1); +++ } +++ +++ +++ /* Current time. */ +++ struct timeval tv; +++ (void) gettimeofday (&tv, NULL); +++ /* +1000 seconds in correct format. */ +++ struct timespec ts; +++ TIMEVAL_TO_TIMESPEC (&tv, &ts); +++ ts.tv_sec += 1000; +++ +++ err = pthread_cond_timedwait (&cond, &mut, &ts); +++ if (err == 0) +++ { +++ puts ("cond_timedwait did not fail"); +++ exit (1); +++ } +++ +++ if (err != EPERM) +++ { +++ printf ("cond_timedwait didn't return EPERM but %d\n", err); +++ exit (1); +++ } +++ +++ return (void *) 1l; +++} +++ +++ +++static int +++do_test (void) +++{ +++ pthread_t th; +++ int err; +++ +++ printf ("&cond = %p\n&mut = %p\n", &cond, &mut); +++ +++ err = pthread_cond_wait (&cond, &mut); +++ if (err == 0) +++ { +++ puts ("cond_wait did not fail"); +++ exit (1); +++ } +++ +++ if (err != EPERM) +++ { +++ printf ("cond_wait didn't return EPERM but %d\n", err); +++ exit (1); +++ } +++ +++ +++ /* Current time. */ +++ struct timeval tv; +++ (void) gettimeofday (&tv, NULL); +++ /* +1000 seconds in correct format. */ +++ struct timespec ts; +++ TIMEVAL_TO_TIMESPEC (&tv, &ts); +++ ts.tv_sec += 1000; +++ +++ err = pthread_cond_timedwait (&cond, &mut, &ts); +++ if (err == 0) +++ { +++ puts ("cond_timedwait did not fail"); +++ exit (1); +++ } +++ +++ if (err != EPERM) +++ { +++ printf ("cond_timedwait didn't return EPERM but %d\n", err); +++ exit (1); +++ } +++ +++ if (pthread_mutex_lock (&mut) != 0) +++ { +++ puts ("parent: mutex_lock failed"); +++ exit (1); +++ } +++ +++ puts ("creating thread"); +++ +++ if (pthread_create (&th, NULL, tf, NULL) != 0) +++ { +++ puts ("create failed"); +++ exit (1); +++ } +++ +++ void *r; +++ if (pthread_join (th, &r) != 0) +++ { +++ puts ("join failed"); +++ exit (1); +++ } +++ if (r != (void *) 1l) +++ { +++ puts ("thread has wrong return value"); +++ exit (1); +++ } +++ +++ puts ("done"); +++ +++ return 0; +++} +++ +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-context1.c ++@@ -0,0 +1,205 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++#define N 4 +++#if __WORDSIZE == 64 +++#define GUARD_PATTERN 0xdeadbeafdeadbeaf +++#else +++#define GUARD_PATTERN 0xdeadbeaf +++#endif +++ +++typedef struct { +++ ucontext_t uctx; +++ unsigned long guard[3]; +++ } tst_context_t; +++ +++static char stacks[N][2 * PTHREAD_STACK_MIN]; +++static tst_context_t ctx[N][2]; +++static volatile int failures; +++ +++ +++static void +++fct (long int n) +++{ +++ char on_stack[1]; +++ +++ /* Just to use the thread local descriptor. */ +++ printf ("%ld: in %s now, on_stack = %p\n", n, __FUNCTION__, on_stack); +++ errno = 0; +++ +++ if (ctx[n][1].uctx.uc_link != &ctx[n][0].uctx) +++ { +++ printf ("context[%ld][1] uc_link damaged, = %p\n", n, +++ ctx[n][1].uctx.uc_link); +++ exit (1); +++ } +++ +++ if ((ctx[n][0].guard[0] != GUARD_PATTERN) +++ || (ctx[n][0].guard[1] != GUARD_PATTERN) +++ || (ctx[n][0].guard[2] != GUARD_PATTERN)) +++ { +++ printf ("%ld: %s context[0] overflow detected!\n", n, __FUNCTION__); +++ ++failures; +++ } +++ +++ if ((ctx[n][1].guard[0] != GUARD_PATTERN) +++ || (ctx[n][1].guard[1] != GUARD_PATTERN) +++ || (ctx[n][1].guard[2] != GUARD_PATTERN)) +++ { +++ printf ("%ld: %s context[1] overflow detected!\n", n, __FUNCTION__); +++ ++failures; +++ } +++ +++ if (n < 0 || n >= N) +++ { +++ printf ("%ld out of range\n", n); +++ exit (1); +++ } +++ +++ if (on_stack < stacks[n] || on_stack >= stacks[n] + sizeof (stacks[0])) +++ { +++ printf ("%ld: on_stack not on appropriate stack\n", n); +++ exit (1); +++ } +++} +++ +++ +++static void * +++tf (void *arg) +++{ +++ int n = (int) (long int) arg; +++ +++ ctx[n][0].guard[0] = GUARD_PATTERN; +++ ctx[n][0].guard[1] = GUARD_PATTERN; +++ ctx[n][0].guard[2] = GUARD_PATTERN; +++ +++ ctx[n][1].guard[0] = GUARD_PATTERN; +++ ctx[n][1].guard[1] = GUARD_PATTERN; +++ ctx[n][1].guard[2] = GUARD_PATTERN; +++ +++ if (getcontext (&ctx[n][1].uctx) != 0) +++ { +++ printf ("%d: cannot get context: %m\n", n); +++ exit (1); +++ } +++ +++ printf ("%d: %s: before makecontext\n", n, __FUNCTION__); +++ +++ ctx[n][1].uctx.uc_stack.ss_sp = stacks[n]; +++ ctx[n][1].uctx.uc_stack.ss_size = sizeof (stacks[n]); +++ ctx[n][1].uctx.uc_link = &ctx[n][0].uctx; +++ makecontext (&ctx[n][1].uctx, (void (*) (void)) fct, 1, (long int) n); +++ +++ printf ("%d: %s: before swapcontext\n", n, __FUNCTION__); +++ +++ if (swapcontext (&ctx[n][0].uctx, &ctx[n][1].uctx) != 0) +++ { +++ ++failures; +++ printf ("%d: %s: swapcontext failed\n", n, __FUNCTION__); +++ } +++ else +++ printf ("%d: back in %s\n", n, __FUNCTION__); +++ +++ return NULL; +++} +++ +++ +++static volatile int global; +++ +++ +++static int +++do_test (void) +++{ +++ int n; +++ pthread_t th[N]; +++ ucontext_t mctx; +++ +++ puts ("making contexts"); +++ if (getcontext (&mctx) != 0) +++ { +++ if (errno == ENOSYS) +++ { +++ puts ("context handling not supported"); +++ exit (0); +++ } +++ +++ printf ("%s: getcontext: %m\n", __FUNCTION__); +++ exit (1); +++ } +++ +++ /* Play some tricks with this context. */ +++ if (++global == 1) +++ if (setcontext (&mctx) != 0) +++ { +++ puts ("setcontext failed"); +++ exit (1); +++ } +++ if (global != 2) +++ { +++ puts ("global not incremented twice"); +++ exit (1); +++ } +++ puts ("global OK"); +++ +++ pthread_attr_t at; +++ +++ if (pthread_attr_init (&at) != 0) +++ { +++ puts ("attr_init failed"); +++ return 1; +++ } +++ +++ if (pthread_attr_setstacksize (&at, 1 * 1024 * 1024) != 0) +++ { +++ puts ("attr_setstacksize failed"); +++ return 1; +++ } +++ +++ for (n = 0; n < N; ++n) +++ if (pthread_create (&th[n], &at, tf, (void *) (long int) n) != 0) +++ { +++ puts ("create failed"); +++ exit (1); +++ } +++ +++ if (pthread_attr_destroy (&at) != 0) +++ { +++ puts ("attr_destroy failed"); +++ return 1; +++ } +++ +++ for (n = 0; n < N; ++n) +++ if (pthread_join (th[n], NULL) != 0) +++ { +++ puts ("join failed"); +++ exit (1); +++ } +++ +++ return failures; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-default-attr.c ++@@ -0,0 +1,385 @@ +++/* Verify that pthread_[gs]etattr_default_np work correctly. +++ +++ 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 +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++#define RETURN_IF_FAIL(f, ...) \ +++ ({ \ +++ int ret = f (__VA_ARGS__); \ +++ if (ret != 0) \ +++ { \ +++ printf ("%s:%d: %s returned %d (errno = %d)\n", __FILE__, __LINE__, \ +++ #f, ret, errno); \ +++ return ret; \ +++ } \ +++ }) +++ +++static int (*verify_result) (pthread_attr_t *); +++static size_t stacksize = 1024 * 1024; +++static size_t guardsize; +++static bool do_join = true; +++static int running = 0; +++static int detach_failed = 0; +++static pthread_mutex_t m = PTHREAD_MUTEX_INITIALIZER; +++static pthread_cond_t c = PTHREAD_COND_INITIALIZER; +++ +++static void * +++thr (void *unused __attribute__ ((unused))) +++{ +++ pthread_attr_t attr; +++ int ret; +++ +++ memset (&attr, 0xab, sizeof attr); +++ /* To verify that the pthread_setattr_default_np worked. */ +++ if ((ret = pthread_getattr_default_np (&attr)) != 0) +++ { +++ printf ("pthread_getattr_default_np failed: %s\n", strerror (ret)); +++ goto out; +++ } +++ +++ if ((ret = (*verify_result) (&attr)) != 0) +++ goto out; +++ +++ memset (&attr, 0xab, sizeof attr); +++ /* To verify that the attributes actually got applied. */ +++ if ((ret = pthread_getattr_np (pthread_self (), &attr)) != 0) +++ { +++ printf ("pthread_getattr_default_np failed: %s\n", strerror (ret)); +++ goto out; +++ } +++ +++ ret = (*verify_result) (&attr); +++ +++out: +++ if (!do_join) +++ { +++ pthread_mutex_lock (&m); +++ running--; +++ pthread_cond_signal (&c); +++ pthread_mutex_unlock (&m); +++ +++ detach_failed |= ret; +++ } +++ +++ return (void *) (uintptr_t) ret; +++} +++ +++static int +++run_threads (const pthread_attr_t *attr) +++{ +++ pthread_t t; +++ void *tret = NULL; +++ +++ RETURN_IF_FAIL (pthread_setattr_default_np, attr); +++ +++ /* Run twice to ensure that the attributes do not get overwritten in the +++ first run somehow. */ +++ for (int i = 0; i < 2; i++) +++ { +++ RETURN_IF_FAIL (pthread_create, &t, NULL, thr, NULL); +++ if (do_join) +++ RETURN_IF_FAIL (pthread_join, t, &tret); +++ else +++ { +++ pthread_mutex_lock (&m); +++ running++; +++ pthread_mutex_unlock (&m); +++ } +++ +++ if (tret != NULL) +++ { +++ puts ("Thread failed"); +++ return 1; +++ } +++ } +++ +++ /* Stay in sync for detached threads and get their status. */ +++ while (!do_join) +++ { +++ pthread_mutex_lock (&m); +++ if (running == 0) +++ { +++ pthread_mutex_unlock (&m); +++ break; +++ } +++ pthread_cond_wait (&c, &m); +++ pthread_mutex_unlock (&m); +++ } +++ +++ return 0; +++} +++ +++static int +++verify_detach_result (pthread_attr_t *attr) +++{ +++ int state; +++ +++ RETURN_IF_FAIL (pthread_attr_getdetachstate, attr, &state); +++ +++ if (state != PTHREAD_CREATE_DETACHED) +++ { +++ puts ("failed to set detach state"); +++ return 1; +++ } +++ +++ return 0; +++} +++ +++static int +++do_detach_test (void) +++{ +++ pthread_attr_t attr; +++ +++ do_join = false; +++ RETURN_IF_FAIL (pthread_attr_init, &attr); +++ RETURN_IF_FAIL (pthread_attr_setdetachstate, &attr, PTHREAD_CREATE_DETACHED); +++ +++ RETURN_IF_FAIL (run_threads, &attr); +++ return detach_failed; +++} +++ +++static int +++verify_affinity_result (pthread_attr_t *attr) +++{ +++ cpu_set_t cpuset; +++ +++ RETURN_IF_FAIL (pthread_attr_getaffinity_np, attr, sizeof (cpuset), &cpuset); +++ if (!CPU_ISSET (0, &cpuset)) +++ { +++ puts ("failed to set cpu affinity"); +++ return 1; +++ } +++ +++ return 0; +++} +++ +++static int +++do_affinity_test (void) +++{ +++ pthread_attr_t attr; +++ +++ RETURN_IF_FAIL (pthread_attr_init, &attr); +++ +++ /* Processor affinity. Like scheduling policy, this could fail if the user +++ does not have the necessary privileges. So we only spew a warning if +++ pthread_create fails with EPERM. A computer has at least one CPU. */ +++ cpu_set_t cpuset; +++ CPU_ZERO (&cpuset); +++ CPU_SET (0, &cpuset); +++ RETURN_IF_FAIL (pthread_attr_setaffinity_np, &attr, sizeof (cpuset), &cpuset); +++ +++ int ret = run_threads (&attr); +++ +++ if (ret == EPERM) +++ { +++ printf ("Skipping CPU Affinity test: %s\n", strerror (ret)); +++ return 0; +++ } +++ else if (ret != 0) +++ return ret; +++ +++ return 0; +++} +++ +++static int +++verify_sched_result (pthread_attr_t *attr) +++{ +++ int inherited, policy; +++ struct sched_param param; +++ +++ RETURN_IF_FAIL (pthread_attr_getinheritsched, attr, &inherited); +++ if (inherited != PTHREAD_EXPLICIT_SCHED) +++ { +++ puts ("failed to set EXPLICIT_SCHED (%d != %d)"); +++ return 1; +++ } +++ +++ RETURN_IF_FAIL (pthread_attr_getschedpolicy, attr, &policy); +++ if (policy != SCHED_RR) +++ { +++ printf ("failed to set SCHED_RR (%d != %d)\n", policy, SCHED_RR); +++ return 1; +++ } +++ +++ RETURN_IF_FAIL (pthread_attr_getschedparam, attr, ¶m); +++ if (param.sched_priority != 42) +++ { +++ printf ("failed to set sched_priority (%d != %d)\n", +++ param.sched_priority, 42); +++ return 1; +++ } +++ +++ return 0; +++} +++ +++static int +++do_sched_test (void) +++{ +++ pthread_attr_t attr; +++ +++ RETURN_IF_FAIL (pthread_attr_init, &attr); +++ +++ /* Scheduling policy. Note that we don't always test these since it's +++ possible that the user the tests run as don't have the appropriate +++ privileges. */ +++ RETURN_IF_FAIL (pthread_attr_setinheritsched, &attr, PTHREAD_EXPLICIT_SCHED); +++ RETURN_IF_FAIL (pthread_attr_setschedpolicy, &attr, SCHED_RR); +++ +++ struct sched_param param; +++ param.sched_priority = 42; +++ RETURN_IF_FAIL (pthread_attr_setschedparam, &attr, ¶m); +++ +++ int ret = run_threads (&attr); +++ +++ if (ret == EPERM) +++ { +++ printf ("Skipping Scheduler Attributes test: %s\n", strerror (ret)); +++ return 0; +++ } +++ else if (ret != 0) +++ return ret; +++ +++ return 0; +++} +++ +++static int +++verify_guardsize_result (pthread_attr_t *attr) +++{ +++ size_t guard; +++ +++ RETURN_IF_FAIL (pthread_attr_getguardsize, attr, &guard); +++ +++ if (guardsize != guard) +++ { +++ printf ("failed to set guardsize (%zu, %zu)\n", guardsize, guard); +++ return 1; +++ } +++ +++ return 0; +++} +++ +++static int +++do_guardsize_test (void) +++{ +++ long int pagesize = sysconf (_SC_PAGESIZE); +++ pthread_attr_t attr; +++ +++ if (pagesize < 0) +++ { +++ printf ("sysconf failed: %s\n", strerror (errno)); +++ return 1; +++ } +++ +++ RETURN_IF_FAIL (pthread_getattr_default_np, &attr); +++ +++ /* Increase default guardsize by a page. */ +++ RETURN_IF_FAIL (pthread_attr_getguardsize, &attr, &guardsize); +++ guardsize += pagesize; +++ RETURN_IF_FAIL (pthread_attr_setguardsize, &attr, guardsize); +++ RETURN_IF_FAIL (run_threads, &attr); +++ +++ return 0; +++} +++ +++static int +++verify_stacksize_result (pthread_attr_t *attr) +++{ +++ size_t stack; +++ +++ RETURN_IF_FAIL (pthread_attr_getstacksize, attr, &stack); +++ +++ if (stacksize != stack) +++ { +++ printf ("failed to set default stacksize (%zu, %zu)\n", stacksize, stack); +++ return 1; +++ } +++ +++ return 0; +++} +++ +++static int +++do_stacksize_test (void) +++{ +++ long int pagesize = sysconf (_SC_PAGESIZE); +++ pthread_attr_t attr; +++ +++ if (pagesize < 0) +++ { +++ printf ("sysconf failed: %s\n", strerror (errno)); +++ return 1; +++ } +++ +++ /* Perturb the size by a page so that we're not aligned on the 64K boundary. +++ pthread_create does this perturbation on x86 to avoid causing the 64k +++ aliasing conflict. We want to prevent pthread_create from doing that +++ since it is not consistent for all architectures. */ +++ stacksize += pagesize; +++ +++ RETURN_IF_FAIL (pthread_attr_init, &attr); +++ +++ /* Run twice to ensure that we don't give a false positive. */ +++ RETURN_IF_FAIL (pthread_attr_setstacksize, &attr, stacksize); +++ RETURN_IF_FAIL (run_threads, &attr); +++ stacksize *= 2; +++ RETURN_IF_FAIL (pthread_attr_setstacksize, &attr, stacksize); +++ RETURN_IF_FAIL (run_threads, &attr); +++ return 0; +++} +++ +++/* We test each attribute separately because sched and affinity tests may need +++ additional user privileges that may not be available during the test run. +++ Each attribute test is a set of two functions, viz. a function to set the +++ default attribute (do_foo_test) and another to verify its result +++ (verify_foo_result). Each test spawns a thread and checks (1) if the +++ attribute values were applied correctly and (2) if the change in the default +++ value reflected. */ +++static int +++do_test (void) +++{ +++ puts ("stacksize test"); +++ verify_result = verify_stacksize_result; +++ RETURN_IF_FAIL (do_stacksize_test); +++ +++ puts ("guardsize test"); +++ verify_result = verify_guardsize_result; +++ RETURN_IF_FAIL (do_guardsize_test); +++ +++ puts ("sched test"); +++ verify_result = verify_sched_result; +++ RETURN_IF_FAIL (do_sched_test); +++ +++ puts ("affinity test"); +++ verify_result = verify_affinity_result; +++ RETURN_IF_FAIL (do_affinity_test); +++ +++ puts ("detach test"); +++ verify_result = verify_detach_result; +++ RETURN_IF_FAIL (do_detach_test); +++ +++ return 0; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-detach1.c ++@@ -0,0 +1,55 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++ +++ +++static void * +++tf (void *arg) +++{ +++ return NULL; +++} +++ +++ +++static int +++do_test (void) +++{ +++ pthread_t th; +++ if (pthread_create (&th, NULL, tf, (void *) pthread_self ()) != 0) +++ { +++ puts ("create failed"); +++ exit (1); +++ } +++ +++ /* Give the child a chance to finish. */ +++ sleep (1); +++ +++ if (pthread_detach (th) != 0) +++ { +++ puts ("detach failed"); +++ exit (1); +++ } +++ +++ return 0; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-dlsym1.c ++@@ -0,0 +1,66 @@ +++/* Test case by Hui Huang . */ +++#include +++#include +++#include +++#include +++ +++ +++static void * +++start_routine (void *args) +++{ +++ int i; +++ void **addrs = (void **) args; +++ for (i = 0; i < 10000; ++i) +++ addrs[i % 1024] = dlsym (NULL, "does_not_exist"); +++ +++ return addrs; +++} +++ +++ +++static int +++do_test (void) +++{ +++ pthread_t tid1, tid2, tid3; +++ +++ void *addrs1[1024]; +++ void *addrs2[1024]; +++ void *addrs3[1024]; +++ +++ if (pthread_create (&tid1, NULL, start_routine, addrs1) != 0) +++ { +++ puts ("1st create failed"); +++ exit (1); +++ } +++ if (pthread_create (&tid2, NULL, start_routine, addrs2) != 0) +++ { +++ puts ("2nd create failed"); +++ exit (1); +++ } +++ if (pthread_create (&tid3, NULL, start_routine, addrs3) != 0) +++ { +++ puts ("3rd create failed"); +++ exit (1); +++ } +++ +++ if (pthread_join (tid1, NULL) != 0) +++ { +++ puts ("1st join failed"); +++ exit (1); +++ } +++ if (pthread_join (tid2, NULL) != 0) +++ { +++ puts ("2nd join failed"); +++ exit (1); +++ } +++ if (pthread_join (tid3, NULL) != 0) +++ { +++ puts ("2rd join failed"); +++ exit (1); +++ } +++ +++ return 0; +++} +++ +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-eintr1.c ++@@ -0,0 +1,104 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++ +++static int do_test (void); +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" +++ +++#include "eintr.c" +++ +++ +++static void * +++tf2 (void *arg) +++{ +++ return arg; +++} +++ +++ +++static void * +++tf1 (void *arg) +++{ +++ while (1) +++ { +++ pthread_t th; +++ +++ int e = pthread_create (&th, NULL, tf2, NULL); +++ if (e != 0) +++ { +++ if (e == EINTR) +++ { +++ puts ("pthread_create returned EINTR"); +++ exit (1); +++ } +++ +++ char buf[100]; +++ printf ("tf1: pthread_create failed: %s\n", +++ strerror_r (e, buf, sizeof (buf))); +++ exit (1); +++ } +++ +++ e = pthread_join (th, NULL); +++ if (e != 0) +++ { +++ if (e == EINTR) +++ { +++ puts ("pthread_join returned EINTR"); +++ exit (1); +++ } +++ +++ char buf[100]; +++ printf ("tf1: pthread_join failed: %s\n", +++ strerror_r (e, buf, sizeof (buf))); +++ exit (1); +++ } +++ } +++} +++ +++ +++static int +++do_test (void) +++{ +++ setup_eintr (SIGUSR1, NULL); +++ +++ int i; +++ for (i = 0; i < 10; ++i) +++ { +++ pthread_t th; +++ int e = pthread_create (&th, NULL, tf1, NULL); +++ if (e != 0) +++ { +++ char buf[100]; +++ printf ("main: pthread_create failed: %s\n", +++ strerror_r (e, buf, sizeof (buf))); +++ exit (1); +++ } +++ } +++ +++ delayed_exit (3); +++ /* This call must never return. */ +++ (void) tf1 (NULL); +++ return 1; +++} ++--- /dev/null +++++ b/fbtl/tst-eintr2.c ++@@ -0,0 +1,118 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++static int do_test (void); +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" +++ +++#include "eintr.c" +++ +++ +++static pthread_mutex_t m1 = PTHREAD_MUTEX_INITIALIZER; +++static pthread_mutex_t m2 = PTHREAD_MUTEX_INITIALIZER; +++ +++ +++static void * +++tf1 (void *arg) +++{ +++ struct timespec ts; +++ struct timeval tv; +++ +++ gettimeofday (&tv, NULL); +++ TIMEVAL_TO_TIMESPEC (&tv, &ts); +++ ts.tv_sec += 10000; +++ +++ /* This call must never return. */ +++ int e = pthread_mutex_timedlock (&m1, &ts); +++ char buf[100]; +++ printf ("tf1: mutex_timedlock returned: %s\n", +++ strerror_r (e, buf, sizeof (buf))); +++ +++ exit (1); +++} +++ +++ +++static void * +++tf2 (void *arg) +++{ +++ while (1) +++ { +++ int e = pthread_mutex_lock (&m2); +++ if (e != 0) +++ { +++ puts ("tf2: mutex_lock failed"); +++ exit (1); +++ } +++ e = pthread_mutex_unlock (&m2); +++ if (e != 0) +++ { +++ puts ("tf2: mutex_unlock failed"); +++ exit (1); +++ } +++ struct timespec ts = { .tv_sec = 0, .tv_nsec = 10000000 }; +++ nanosleep (&ts, NULL); +++ } +++} +++ +++ +++static int +++do_test (void) +++{ +++ if (pthread_mutex_lock (&m1) != 0) +++ { +++ puts ("mutex_lock failed"); +++ exit (1); +++ } +++ +++ setup_eintr (SIGUSR1, NULL); +++ +++ pthread_t th; +++ char buf[100]; +++ int e = pthread_create (&th, NULL, tf1, NULL); +++ if (e != 0) +++ { +++ printf ("main: 1st pthread_create failed: %s\n", +++ strerror_r (e, buf, sizeof (buf))); +++ exit (1); +++ } +++ +++ e = pthread_create (&th, NULL, tf2, NULL); +++ if (e != 0) +++ { +++ printf ("main: 2nd pthread_create failed: %s\n", +++ strerror_r (e, buf, sizeof (buf))); +++ exit (1); +++ } +++ +++ delayed_exit (3); +++ /* This call must never return. */ +++ e = pthread_mutex_lock (&m1); +++ printf ("main: mutex_lock returned: %s\n", +++ strerror_r (e, buf, sizeof (buf))); +++ +++ return 1; +++} ++--- /dev/null +++++ b/fbtl/tst-eintr3.c ++@@ -0,0 +1,69 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++ +++static int do_test (void); +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" +++ +++#include "eintr.c" +++ +++ +++static void * +++tf (void *arg) +++{ +++ pthread_mutex_t m = PTHREAD_MUTEX_INITIALIZER; +++ pthread_mutex_lock (&m); +++ /* This call must not return. */ +++ pthread_mutex_lock (&m); +++ +++ puts ("tf: mutex_lock returned"); +++ exit (1); +++} +++ +++ +++static int +++do_test (void) +++{ +++ pthread_t self = pthread_self (); +++ +++ setup_eintr (SIGUSR1, &self); +++ +++ pthread_t th; +++ char buf[100]; +++ int e = pthread_create (&th, NULL, tf, NULL); +++ if (e != 0) +++ { +++ printf ("main: pthread_create failed: %s\n", +++ strerror_r (e, buf, sizeof (buf))); +++ exit (1); +++ } +++ +++ delayed_exit (1); +++ /* This call must never return. */ +++ xpthread_join (th); +++ puts ("error: pthread_join returned"); +++ return 1; +++} ++--- /dev/null +++++ b/fbtl/tst-eintr4.c ++@@ -0,0 +1,53 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++ +++static int do_test (void); +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" +++ +++#include "eintr.c" +++ +++ +++static int +++do_test (void) +++{ +++ pthread_t self = pthread_self (); +++ +++ setup_eintr (SIGUSR1, &self); +++ +++ pthread_barrier_t b; +++ if (pthread_barrier_init (&b, NULL, 2) != 0) +++ { +++ puts ("barrier_init failed"); +++ exit (1); +++ } +++ +++ delayed_exit (1); +++ /* This call must never return. */ +++ xpthread_barrier_wait (&b); +++ puts ("error: pthread_barrier_wait returned"); +++ return 1; +++} ++--- /dev/null +++++ b/fbtl/tst-eintr5.c ++@@ -0,0 +1,79 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++static int do_test (void); +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" +++ +++#include "eintr.c" +++ +++ +++static pthread_mutex_t m = PTHREAD_MUTEX_INITIALIZER; +++static pthread_cond_t c = PTHREAD_COND_INITIALIZER; +++ +++ +++static void * +++tf (void *arg) +++{ +++ struct timespec ts; +++ struct timeval tv; +++ +++ gettimeofday (&tv, NULL); +++ TIMEVAL_TO_TIMESPEC (&tv, &ts); +++ ts.tv_sec += 10000; +++ +++ /* This call must never return. */ +++ int e = pthread_cond_timedwait (&c, &m, &ts); +++ char buf[100]; +++ printf ("tf: cond_timedwait returned: %s\n", +++ strerror_r (e, buf, sizeof (buf))); +++ +++ exit (1); +++} +++ +++ +++static int +++do_test (void) +++{ +++ setup_eintr (SIGUSR1, NULL); +++ +++ pthread_t th; +++ char buf[100]; +++ int e = pthread_create (&th, NULL, tf, NULL); +++ if (e != 0) +++ { +++ printf ("main: pthread_create failed: %s\n", +++ strerror_r (e, buf, sizeof (buf))); +++ exit (1); +++ } +++ +++ delayed_exit (3); +++ /* This call must never return. */ +++ xpthread_cond_wait (&c, &m); +++ puts ("error: pthread_cond_wait returned"); +++ return 1; +++} ++--- /dev/null +++++ b/fbtl/tst-exec1.c ++@@ -0,0 +1,159 @@ +++/* Simple exec test, only a thread in the parent. +++ Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++static void * +++tf (void *arg) +++{ +++ pthread_t th = (pthread_t) arg; +++ +++ if (pthread_join (th, NULL) == 0) +++ { +++ puts ("thread in parent joined!?"); +++ exit (1); +++ } +++ +++ puts ("join in thread in parent returned!?"); +++ exit (1); +++} +++ +++ +++static int +++do_test (void) +++{ +++ int fd[2]; +++ if (pipe (fd) != 0) +++ { +++ puts ("pipe failed"); +++ exit (1); +++ } +++ +++ /* Not interested in knowing when the pipe is closed. */ +++ if (sigignore (SIGPIPE) != 0) +++ { +++ puts ("sigignore failed"); +++ exit (1); +++ } +++ +++ posix_spawn_file_actions_t a; +++ if (posix_spawn_file_actions_init (&a) != 0) +++ { +++ puts ("spawn_file_actions_init failed"); +++ exit (1); +++ } +++ +++ if (posix_spawn_file_actions_adddup2 (&a, fd[1], STDOUT_FILENO) != 0) +++ { +++ puts ("spawn_file_actions_adddup2 failed"); +++ exit (1); +++ } +++ +++ if (posix_spawn_file_actions_addclose (&a, fd[0]) != 0) +++ { +++ puts ("spawn_file_actions_addclose"); +++ exit (1); +++ } +++ +++ pthread_t th; +++ if (pthread_create (&th, NULL, tf, (void *) pthread_self ()) != 0) +++ { +++ puts ("create failed"); +++ exit (1); +++ } +++ +++ pid_t pid; +++ char *argv[] = { (char *) _PATH_BSHELL, (char *) "-c", (char *) "echo $$", +++ NULL }; +++ if (posix_spawn (&pid, _PATH_BSHELL, &a, NULL, argv, NULL) != 0) +++ { +++ puts ("spawn failed"); +++ exit (1); +++ } +++ +++ close (fd[1]); +++ +++ char buf[200]; +++ ssize_t n; +++ bool seen_pid = false; +++ while (TEMP_FAILURE_RETRY ((n = read (fd[0], buf, sizeof (buf)))) > 0) +++ { +++ /* We only expect to read the PID. */ +++ char *endp; +++ long int rpid = strtol (buf, &endp, 10); +++ +++ if (*endp != '\n') +++ { +++ printf ("didn't parse whole line: \"%s\"\n", buf); +++ exit (1); +++ } +++ if (endp == buf) +++ { +++ puts ("read empty line"); +++ exit (1); +++ } +++ +++ if (rpid != pid) +++ { +++ printf ("found \"%s\", expected PID %ld\n", buf, (long int) pid); +++ exit (1); +++ } +++ +++ if (seen_pid) +++ { +++ puts ("found more than one PID line"); +++ exit (1); +++ } +++ +++ seen_pid = true; +++ } +++ +++ close (fd[0]); +++ +++ int status; +++ int err = waitpid (pid, &status, 0); +++ if (err != pid) +++ { +++ puts ("waitpid failed"); +++ exit (1); +++ } +++ +++ if (!seen_pid) +++ { +++ puts ("didn't get PID"); +++ exit (1); +++ } +++ +++ puts ("read correct PID"); +++ +++ return 0; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-exec2.c ++@@ -0,0 +1,154 @@ +++/* Thread with running thread calls exec. +++ Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++static void * +++tf (void *arg) +++{ +++ pthread_t th = (pthread_t) arg; +++ +++ if (pthread_join (th, NULL) == 0) +++ { +++ puts ("thread in parent joined!?"); +++ exit (1); +++ } +++ +++ puts ("join in thread in parent returned!?"); +++ exit (1); +++} +++ +++ +++static int +++do_test (void) +++{ +++ int fd[2]; +++ if (pipe (fd) != 0) +++ { +++ puts ("pipe failed"); +++ exit (1); +++ } +++ +++ /* Not interested in knowing when the pipe is closed. */ +++ if (sigignore (SIGPIPE) != 0) +++ { +++ puts ("sigignore failed"); +++ exit (1); +++ } +++ +++ pid_t pid = fork (); +++ if (pid == -1) +++ { +++ puts ("fork failed"); +++ exit (1); +++ } +++ +++ if (pid == 0) +++ { +++ /* Use the fd for stdout. This is kind of ugly because it +++ substitutes the fd of stdout but we know what we are doing +++ here... */ +++ if (dup2 (fd[1], STDOUT_FILENO) != STDOUT_FILENO) +++ { +++ puts ("dup2 failed"); +++ exit (1); +++ } +++ +++ close (fd[0]); +++ +++ pthread_t th; +++ if (pthread_create (&th, NULL, tf, (void *) pthread_self ()) != 0) +++ { +++ puts ("create failed"); +++ exit (1); +++ } +++ +++ execl (_PATH_BSHELL, _PATH_BSHELL, "-c", "echo $$", NULL); +++ +++ puts ("execl failed"); +++ exit (1); +++ } +++ +++ close (fd[1]); +++ +++ char buf[200]; +++ ssize_t n; +++ bool seen_pid = false; +++ while (TEMP_FAILURE_RETRY ((n = read (fd[0], buf, sizeof (buf)))) > 0) +++ { +++ /* We only expect to read the PID. */ +++ char *endp; +++ long int rpid = strtol (buf, &endp, 10); +++ +++ if (*endp != '\n') +++ { +++ printf ("didn't parse whole line: \"%s\"\n", buf); +++ exit (1); +++ } +++ if (endp == buf) +++ { +++ puts ("read empty line"); +++ exit (1); +++ } +++ +++ if (rpid != pid) +++ { +++ printf ("found \"%s\", expected PID %ld\n", buf, (long int) pid); +++ exit (1); +++ } +++ +++ if (seen_pid) +++ { +++ puts ("found more than one PID line"); +++ exit (1); +++ } +++ seen_pid = true; +++ } +++ +++ close (fd[0]); +++ +++ int status; +++ int err = waitpid (pid, &status, 0); +++ if (err != pid) +++ { +++ puts ("waitpid failed"); +++ exit (1); +++ } +++ +++ if (!seen_pid) +++ { +++ puts ("didn't get PID"); +++ exit (1); +++ } +++ +++ return 0; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-exec3.c ++@@ -0,0 +1,152 @@ +++/* Thread calls exec. +++ Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++static void * +++tf (void *arg) +++{ +++ execl (_PATH_BSHELL, _PATH_BSHELL, "-c", "echo $$", NULL); +++ +++ puts ("execl failed"); +++ exit (1); +++} +++ +++ +++static int +++do_test (void) +++{ +++ int fd[2]; +++ if (pipe (fd) != 0) +++ { +++ puts ("pipe failed"); +++ exit (1); +++ } +++ +++ /* Not interested in knowing when the pipe is closed. */ +++ if (sigignore (SIGPIPE) != 0) +++ { +++ puts ("sigignore failed"); +++ exit (1); +++ } +++ +++ pid_t pid = fork (); +++ if (pid == -1) +++ { +++ puts ("fork failed"); +++ exit (1); +++ } +++ +++ if (pid == 0) +++ { +++ /* Use the fd for stdout. This is kind of ugly because it +++ substitutes the fd of stdout but we know what we are doing +++ here... */ +++ if (dup2 (fd[1], STDOUT_FILENO) != STDOUT_FILENO) +++ { +++ puts ("dup2 failed"); +++ exit (1); +++ } +++ +++ close (fd[0]); +++ +++ pthread_t th; +++ if (pthread_create (&th, NULL, tf, NULL) != 0) +++ { +++ puts ("create failed"); +++ exit (1); +++ } +++ +++ if (pthread_join (th, NULL) == 0) +++ { +++ puts ("join succeeded!?"); +++ exit (1); +++ } +++ +++ puts ("join returned!?"); +++ exit (1); +++ } +++ +++ close (fd[1]); +++ +++ char buf[200]; +++ ssize_t n; +++ bool seen_pid = false; +++ while (TEMP_FAILURE_RETRY ((n = read (fd[0], buf, sizeof (buf)))) > 0) +++ { +++ /* We only expect to read the PID. */ +++ char *endp; +++ long int rpid = strtol (buf, &endp, 10); +++ +++ if (*endp != '\n') +++ { +++ printf ("didn't parse whole line: \"%s\"\n", buf); +++ exit (1); +++ } +++ if (endp == buf) +++ { +++ puts ("read empty line"); +++ exit (1); +++ } +++ +++ if (rpid != pid) +++ { +++ printf ("found \"%s\", expected PID %ld\n", buf, (long int) pid); +++ exit (1); +++ } +++ +++ if (seen_pid) +++ { +++ puts ("found more than one PID line"); +++ exit (1); +++ } +++ seen_pid = true; +++ } +++ +++ close (fd[0]); +++ +++ int status; +++ int err = waitpid (pid, &status, 0); +++ if (err != pid) +++ { +++ puts ("waitpid failed"); +++ exit (1); +++ } +++ +++ if (!seen_pid) +++ { +++ puts ("didn't get PID"); +++ exit (1); +++ } +++ +++ return 0; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-exec4.c ++@@ -0,0 +1,115 @@ +++/* Signal handler and mask set in thread which calls exec. +++ Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++ +++ +++static void * +++tf (void *arg) +++{ +++ /* Ignore SIGUSR1 and block SIGUSR2. */ +++ if (sigignore (SIGUSR1) != 0) +++ { +++ puts ("sigignore failed"); +++ exit (1); +++ } +++ +++ sigset_t ss; +++ sigemptyset (&ss); +++ sigaddset (&ss, SIGUSR2); +++ if (pthread_sigmask (SIG_BLOCK, &ss, NULL) != 0) +++ { +++ puts ("1st run: sigmask failed"); +++ exit (1); +++ } +++ +++ char **oldargv = (char **) arg; +++ size_t n = 1; +++ while (oldargv[n] != NULL) +++ ++n; +++ +++ char **argv = (char **) alloca ((n + 1) * sizeof (char *)); +++ for (n = 0; oldargv[n + 1] != NULL; ++n) +++ argv[n] = oldargv[n + 1]; +++ argv[n++] = (char *) "--direct"; +++ argv[n] = NULL; +++ +++ execv (argv[0], argv); +++ +++ puts ("execv failed"); +++ +++ exit (1); +++} +++ +++ +++static int +++do_test (int argc, char *argv[]) +++{ +++ if (argc == 1) +++ { +++ /* This is the second call. Perform the test. */ +++ struct sigaction sa; +++ +++ if (sigaction (SIGUSR1, NULL, &sa) != 0) +++ { +++ puts ("2nd run: sigaction failed"); +++ return 1; +++ } +++ if (sa.sa_handler != SIG_IGN) +++ { +++ puts ("SIGUSR1 not ignored"); +++ return 1; +++ } +++ +++ sigset_t ss; +++ if (pthread_sigmask (SIG_SETMASK, NULL, &ss) != 0) +++ { +++ puts ("2nd run: sigmask failed"); +++ return 1; +++ } +++ if (! sigismember (&ss, SIGUSR2)) +++ { +++ puts ("SIGUSR2 not blocked"); +++ return 1; +++ } +++ +++ return 0; +++ } +++ +++ pthread_t th; +++ if (pthread_create (&th, NULL, tf, argv) != 0) +++ { +++ puts ("create failed"); +++ exit (1); +++ } +++ +++ /* This call should never return. */ +++ pthread_join (th, NULL); +++ +++ puts ("join returned"); +++ +++ return 1; +++} +++ +++#define TEST_FUNCTION do_test (argc, argv) +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-execstack-mod.c ++@@ -0,0 +1 @@ +++#include "../elf/tst-execstack-mod.c" ++--- /dev/null +++++ b/fbtl/tst-execstack.c ++@@ -0,0 +1,2 @@ +++#define USE_PTHREADS 1 +++#include "../elf/tst-execstack.c" ++--- /dev/null +++++ b/fbtl/tst-exit1.c ++@@ -0,0 +1,78 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++/* NOTE: this tests functionality beyond POSIX. POSIX does not allow +++ exit to be called more than once. */ +++ +++#include +++#include +++#include +++ +++static pthread_barrier_t b; +++ +++ +++static void * +++tf (void *arg) +++{ +++ int r = pthread_barrier_wait (&b); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("barrier_wait failed"); +++ exit (1); +++ } +++ +++ exit (0); +++} +++ +++ +++static int +++do_test (void) +++{ +++ if (pthread_barrier_init (&b, NULL, 2) != 0) +++ { +++ puts ("barrier_init failed"); +++ exit (1); +++ } +++ +++ pthread_t th; +++ if (pthread_create (&th, NULL, tf, NULL) != 0) +++ { +++ puts ("create failed"); +++ exit (1); +++ } +++ +++ int r = pthread_barrier_wait (&b); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("barrier_wait failed"); +++ exit (1); +++ } +++ +++ /* Do nothing. */ +++ if (pthread_join (th, NULL) == 0) +++ { +++ puts ("join succeeded!?"); +++ exit (1); +++ } +++ +++ puts ("join returned!?"); +++ exit (1); +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-exit2.c ++@@ -0,0 +1,42 @@ +++#include +++#include +++#include +++#include +++#include +++ +++static int do_test (void); +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" +++ +++static void * +++tf (void *arg) +++{ +++ while (1) +++ sleep (100); +++ +++ /* NOTREACHED */ +++ return NULL; +++} +++ +++ +++static int +++do_test (void) +++{ +++ pthread_t th; +++ +++ int e = pthread_create (&th, NULL, tf, NULL); +++ if (e != 0) +++ { +++ printf ("create failed: %s\n", strerror (e)); +++ return 1; +++ } +++ +++ delayed_exit (1); +++ +++ /* Terminate only this thread. */ +++ pthread_exit (NULL); +++ +++ /* NOTREACHED */ +++ return 1; +++} ++--- /dev/null +++++ b/fbtl/tst-exit3.c ++@@ -0,0 +1,83 @@ +++#include +++#include +++#include +++#include +++#include +++#include +++ +++static int do_test (void); +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" +++ +++static pthread_barrier_t b; +++ +++ +++static void * +++tf2 (void *arg) +++{ +++ while (1) +++ sleep (100); +++ +++ /* NOTREACHED */ +++ return NULL; +++} +++ +++ +++static void * +++tf (void *arg) +++{ +++ pthread_t th; +++ +++ int e = pthread_barrier_wait (&b); +++ if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("barrier_wait failed"); +++ exit (1); +++ } +++ +++ e = pthread_create (&th, NULL, tf2, NULL); +++ if (e != 0) +++ { +++ printf ("create failed: %s\n", strerror (e)); +++ exit (1); +++ } +++ +++ /* Terminate only this thread. */ +++ return NULL; +++} +++ +++ +++static int +++do_test (void) +++{ +++ pthread_t th; +++ +++ if (pthread_barrier_init (&b, NULL, 2) != 0) +++ { +++ puts ("barrier_init failed"); +++ exit (1); +++ } +++ +++ int e = pthread_create (&th, NULL, tf, NULL); +++ if (e != 0) +++ { +++ printf ("create failed: %s\n", strerror (e)); +++ exit (1); +++ } +++ +++ e = pthread_barrier_wait (&b); +++ if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("barrier_wait failed"); +++ exit (1); +++ } +++ +++ delayed_exit (3); +++ +++ /* Terminate only this thread. */ +++ pthread_exit (NULL); +++ +++ /* NOTREACHED */ +++ return 1; +++} ++--- /dev/null +++++ b/fbtl/tst-fini1.c ++@@ -0,0 +1,34 @@ +++/* Copyright (C) 2004-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 2004. +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public +++ License as published by the Free Software Foundation; either +++ version 2.1 of the License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General Public License 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 +++ . */ +++ +++#include +++ +++extern void m (void); +++ +++int +++main (void) +++{ +++ alarm (5); +++ +++ m (); +++ +++ /* The destructor is supposed to run now. Make sure that if it is +++ not we will notice it by using 42 as the exit code. In case the +++ destructor is run it will terminate with status zero. */ +++ return 42; +++} ++--- /dev/null +++++ b/fbtl/tst-fini1mod.c ++@@ -0,0 +1,71 @@ +++/* Copyright (C) 2004-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 2004. +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public +++ License as published by the Free Software Foundation; either +++ version 2.1 of the License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General Public License 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 +++ . */ +++ +++#include +++#include +++#include +++#include +++ +++ +++static void * +++tf (void *arg) +++{ +++ int fds[2]; +++ if (pipe (fds) != 0) +++ { +++ puts ("pipe failed"); +++ exit (1); +++ } +++ +++ char buf[10]; +++ read (fds[0], buf, sizeof (buf)); +++ +++ puts ("read returned"); +++ exit (1); +++} +++ +++static pthread_t th; +++ +++static void +++__attribute ((destructor)) +++dest (void) +++{ +++ if (pthread_cancel (th) != 0) +++ { +++ puts ("cancel failed"); +++ _exit (1); +++ } +++ void *r; +++ if (pthread_join (th, &r) != 0) +++ { +++ puts ("join failed"); +++ _exit (1); +++ } +++ /* Exit successfully. */ +++ _exit (0); +++} +++ +++void +++m (void) +++{ +++ if (pthread_create (&th, NULL, tf, NULL) != 0) +++ { +++ puts ("create failed"); +++ _exit (1); +++ } +++} ++--- /dev/null +++++ b/fbtl/tst-flock1.c ++@@ -0,0 +1,92 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++ +++ +++static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER; +++ +++static int fd; +++ +++ +++static void * +++tf (void *arg) +++{ +++ if (flock (fd, LOCK_SH | LOCK_NB) != 0) +++ { +++ puts ("second flock failed"); +++ exit (1); +++ } +++ +++ pthread_mutex_unlock (&lock); +++ +++ return NULL; +++} +++ +++ +++static int +++do_test (void) +++{ +++ char tmp[] = "/tmp/tst-flock1-XXXXXX"; +++ +++ fd = mkstemp (tmp); +++ if (fd == -1) +++ { +++ puts ("mkstemp failed"); +++ exit (1); +++ } +++ +++ unlink (tmp); +++ +++ write (fd, "foobar xyzzy", 12); +++ +++ if (flock (fd, LOCK_EX | LOCK_NB) != 0) +++ { +++ puts ("first flock failed"); +++ exit (1); +++ } +++ +++ pthread_mutex_lock (&lock); +++ +++ pthread_t th; +++ if (pthread_create (&th, NULL, tf, NULL) != 0) +++ { +++ puts ("pthread_create failed"); +++ exit (1); +++ } +++ +++ pthread_mutex_lock (&lock); +++ +++ void *result; +++ if (pthread_join (th, &result) != 0) +++ { +++ puts ("pthread_join failed"); +++ exit (1); +++ } +++ +++ close (fd); +++ +++ return result != NULL; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-flock2.c ++@@ -0,0 +1,259 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER; +++static pthread_mutex_t lock2 = PTHREAD_MUTEX_INITIALIZER; +++static int fd; +++ +++ +++static void * +++tf (void *arg) +++{ +++ struct flock fl = +++ { +++ .l_type = F_WRLCK, +++ .l_start = 0, +++ .l_whence = SEEK_SET, +++ .l_len = 10 +++ }; +++ if (TEMP_FAILURE_RETRY (fcntl (fd, F_SETLKW, &fl)) != 0) +++ { +++ puts ("fourth fcntl failed"); +++ exit (1); +++ } +++ +++ pthread_mutex_unlock (&lock); +++ +++ pthread_mutex_lock (&lock2); +++ +++ return NULL; +++} +++ +++ +++static int +++do_test (void) +++{ +++ char tmp[] = "/tmp/tst-flock2-XXXXXX"; +++ +++ fd = mkstemp (tmp); +++ if (fd == -1) +++ { +++ puts ("mkstemp failed"); +++ return 1; +++ } +++ +++ unlink (tmp); +++ +++ int i; +++ for (i = 0; i < 20; ++i) +++ write (fd, "foobar xyzzy", 12); +++ +++ pthread_barrier_t *b; +++ b = mmap (NULL, sizeof (pthread_barrier_t), PROT_READ | PROT_WRITE, +++ MAP_SHARED, fd, 0); +++ if (b == MAP_FAILED) +++ { +++ puts ("mmap failed"); +++ return 1; +++ } +++ +++ pthread_barrierattr_t ba; +++ if (pthread_barrierattr_init (&ba) != 0) +++ { +++ puts ("barrierattr_init failed"); +++ return 1; +++ } +++ +++ if (pthread_barrierattr_setpshared (&ba, PTHREAD_PROCESS_SHARED) != 0) +++ { +++ puts ("barrierattr_setpshared failed"); +++ return 1; +++ } +++ +++ if (pthread_barrier_init (b, &ba, 2) != 0) +++ { +++ puts ("barrier_init failed"); +++ return 1; +++ } +++ +++ if (pthread_barrierattr_destroy (&ba) != 0) +++ { +++ puts ("barrierattr_destroy failed"); +++ return 1; +++ } +++ +++ struct flock fl = +++ { +++ .l_type = F_WRLCK, +++ .l_start = 0, +++ .l_whence = SEEK_SET, +++ .l_len = 10 +++ }; +++ if (TEMP_FAILURE_RETRY (fcntl (fd, F_SETLKW, &fl)) != 0) +++ { +++ puts ("first fcntl failed"); +++ return 1; +++ } +++ +++ pid_t pid = fork (); +++ if (pid == -1) +++ { +++ puts ("fork failed"); +++ return 1; +++ } +++ +++ if (pid == 0) +++ { +++ /* Make sure the child does not stay around indefinitely. */ +++ alarm (10); +++ +++ /* Try to get the lock. */ +++ if (TEMP_FAILURE_RETRY (fcntl (fd, F_SETLK, &fl)) == 0) +++ { +++ puts ("child: second flock succeeded"); +++ return 1; +++ } +++ } +++ +++ pthread_barrier_wait (b); +++ +++ if (pid != 0) +++ { +++ fl.l_type = F_UNLCK; +++ if (TEMP_FAILURE_RETRY (fcntl (fd, F_SETLKW, &fl)) != 0) +++ { +++ puts ("third fcntl failed"); +++ return 1; +++ } +++ } +++ +++ pthread_barrier_wait (b); +++ +++ pthread_t th; +++ if (pid == 0) +++ { +++ if (pthread_mutex_lock (&lock) != 0) +++ { +++ puts ("1st locking of lock failed"); +++ return 1; +++ } +++ +++ if (pthread_mutex_lock (&lock2) != 0) +++ { +++ puts ("1st locking of lock2 failed"); +++ return 1; +++ } +++ +++ if (pthread_create (&th, NULL, tf, NULL) != 0) +++ { +++ puts ("pthread_create failed"); +++ return 1; +++ } +++ +++ if (pthread_mutex_lock (&lock) != 0) +++ { +++ puts ("2nd locking of lock failed"); +++ return 1; +++ } +++ +++ puts ("child locked file"); +++ } +++ +++ pthread_barrier_wait (b); +++ +++ if (pid != 0) +++ { +++ fl.l_type = F_WRLCK; +++ if (TEMP_FAILURE_RETRY (fcntl (fd, F_SETLK, &fl)) == 0) +++ { +++ puts ("fifth fcntl succeeded"); +++ return 1; +++ } +++ +++ puts ("file locked by child"); +++ } +++ +++ pthread_barrier_wait (b); +++ +++ if (pid == 0) +++ { +++ if (pthread_mutex_unlock (&lock2) != 0) +++ { +++ puts ("unlock of lock2 failed"); +++ return 1; +++ } +++ +++ if (pthread_join (th, NULL) != 0) +++ { +++ puts ("join failed"); +++ return 1; +++ } +++ +++ puts ("child's thread terminated"); +++ } +++ +++ pthread_barrier_wait (b); +++ +++ if (pid != 0) +++ { +++ fl.l_type = F_WRLCK; +++ if (TEMP_FAILURE_RETRY (fcntl (fd, F_SETLK, &fl)) == 0) +++ { +++ puts ("fifth fcntl succeeded"); +++ return 1; +++ } +++ +++ puts ("file still locked"); +++ } +++ +++ pthread_barrier_wait (b); +++ +++ if (pid == 0) +++ { +++ _exit (0); +++ } +++ +++ int status; +++ if (TEMP_FAILURE_RETRY (waitpid (pid, &status, 0)) != pid) +++ { +++ puts ("waitpid failed"); +++ return 1; +++ } +++ puts ("child terminated"); +++ +++ if (TEMP_FAILURE_RETRY (fcntl (fd, F_SETLKW, &fl)) != 0) +++ { +++ puts ("sixth fcntl failed"); +++ return 1; +++ } +++ +++ return status; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-fork1.c ++@@ -0,0 +1,119 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Roland McGrath , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++static void * +++thread_function (void * arg) +++{ +++ int i = (intptr_t) arg; +++ int status; +++ pid_t pid; +++ pid_t pid2; +++ +++ pid = fork (); +++ switch (pid) +++ { +++ case 0: +++ printf ("%ld for %d\n", (long int) getpid (), i); +++ struct timespec ts = { .tv_sec = 0, .tv_nsec = 100000000 * i }; +++ nanosleep (&ts, NULL); +++ _exit (i); +++ break; +++ case -1: +++ printf ("fork: %m\n"); +++ return (void *) 1l; +++ break; +++ } +++ +++ pid2 = TEMP_FAILURE_RETRY (waitpid (pid, &status, 0)); +++ if (pid2 != pid) +++ { +++ printf ("waitpid returned %ld, expected %ld\n", +++ (long int) pid2, (long int) pid); +++ return (void *) 1l; +++ } +++ +++ printf ("%ld with %d, expected %d\n", +++ (long int) pid, WEXITSTATUS (status), i); +++ +++ return WEXITSTATUS (status) == i ? NULL : (void *) 1l; +++} +++ +++#define N 5 +++static const int t[N] = { 7, 6, 5, 4, 3 }; +++ +++int +++main (void) +++{ +++ pthread_t th[N]; +++ int i; +++ int result = 0; +++ pthread_attr_t at; +++ +++ if (pthread_attr_init (&at) != 0) +++ { +++ puts ("attr_init failed"); +++ return 1; +++ } +++ +++ if (pthread_attr_setstacksize (&at, 1 * 1024 * 1024) != 0) +++ { +++ puts ("attr_setstacksize failed"); +++ return 1; +++ } +++ +++ for (i = 0; i < N; ++i) +++ if (pthread_create (&th[i], NULL, thread_function, +++ (void *) (intptr_t) t[i]) != 0) +++ { +++ printf ("creation of thread %d failed\n", i); +++ exit (1); +++ } +++ +++ if (pthread_attr_destroy (&at) != 0) +++ { +++ puts ("attr_destroy failed"); +++ return 1; +++ } +++ +++ for (i = 0; i < N; ++i) +++ { +++ void *v; +++ if (pthread_join (th[i], &v) != 0) +++ { +++ printf ("join of thread %d failed\n", i); +++ result = 1; +++ } +++ else if (v != NULL) +++ { +++ printf ("join %d successful, but child failed\n", i); +++ result = 1; +++ } +++ else +++ printf ("join %d successful\n", i); +++ } +++ +++ return result; +++} ++--- /dev/null +++++ b/fbtl/tst-fork2.c ++@@ -0,0 +1,89 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Roland McGrath , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++static pid_t initial_pid; +++ +++ +++static void * +++tf (void *arg) +++{ +++ if (getppid () != initial_pid) +++ { +++ printf ("getppid in thread returned %ld, expected %ld\n", +++ (long int) getppid (), (long int) initial_pid); +++ return (void *) -1; +++ } +++ +++ return NULL; +++} +++ +++ +++int +++main (void) +++{ +++ initial_pid = getpid (); +++ +++ pid_t child = fork (); +++ if (child == 0) +++ { +++ if (getppid () != initial_pid) +++ { +++ printf ("first getppid returned %ld, expected %ld\n", +++ (long int) getppid (), (long int) initial_pid); +++ exit (1); +++ } +++ +++ pthread_t th; +++ if (pthread_create (&th, NULL, tf, NULL) != 0) +++ { +++ puts ("pthread_create failed"); +++ exit (1); +++ } +++ +++ void *result; +++ if (pthread_join (th, &result) != 0) +++ { +++ puts ("pthread_join failed"); +++ exit (1); +++ } +++ +++ exit (result == NULL ? 0 : 1); +++ } +++ else if (child == -1) +++ { +++ puts ("initial fork failed"); +++ return 1; +++ } +++ +++ int status; +++ if (TEMP_FAILURE_RETRY (waitpid (child, &status, 0)) != child) +++ { +++ printf ("waitpid failed: %m\n"); +++ return 1; +++ } +++ +++ return status; +++} ++--- /dev/null +++++ b/fbtl/tst-fork3.c ++@@ -0,0 +1,106 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Roland McGrath , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++static pid_t initial_pid; +++ +++ +++static void * +++tf2 (void *arg) +++{ +++ if (getppid () != initial_pid) +++ { +++ printf ("getppid in thread returned %ld, expected %ld\n", +++ (long int) getppid (), (long int) initial_pid); +++ return (void *) -1; +++ } +++ +++ return NULL; +++} +++ +++ +++static void * +++tf1 (void *arg) +++{ +++ pid_t child = fork (); +++ if (child == 0) +++ { +++ if (getppid () != initial_pid) +++ { +++ printf ("first getppid returned %ld, expected %ld\n", +++ (long int) getppid (), (long int) initial_pid); +++ exit (1); +++ } +++ +++ pthread_t th2; +++ if (pthread_create (&th2, NULL, tf2, NULL) != 0) +++ { +++ puts ("child: pthread_create failed"); +++ exit (1); +++ } +++ +++ void *result; +++ if (pthread_join (th2, &result) != 0) +++ { +++ puts ("pthread_join failed"); +++ exit (1); +++ } +++ +++ exit (result == NULL ? 0 : 1); +++ } +++ else if (child == -1) +++ { +++ puts ("initial fork failed"); +++ exit (1); +++ } +++ +++ int status; +++ if (TEMP_FAILURE_RETRY (waitpid (child, &status, 0)) != child) +++ { +++ printf ("waitpid failed: %m\n"); +++ exit (1); +++ } +++ +++ exit (status); +++} +++ +++ +++int +++main (void) +++{ +++ initial_pid = getpid (); +++ +++ pthread_t th1; +++ if (pthread_create (&th1, NULL, tf1, NULL) != 0) +++ { +++ puts ("parent: pthread_create failed"); +++ exit (1); +++ } +++ +++ /* This call should never return. */ +++ pthread_join (th1, NULL); +++ +++ return 1; +++} ++--- /dev/null +++++ b/fbtl/tst-fork4.c ++@@ -0,0 +1,64 @@ +++/* Test of fork updating child universe's pthread structures. +++ Copyright (C) 2003-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 +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++static int +++do_test (void) +++{ +++ pthread_t me = pthread_self (); +++ +++ pid_t pid = fork (); +++ +++ if (pid < 0) +++ { +++ printf ("fork: %m\n"); +++ return 1; +++ } +++ +++ if (pid == 0) +++ { +++ int err = pthread_kill (me, SIGTERM); +++ printf ("pthread_kill returned: %s\n", strerror (err)); +++ return 3; +++ } +++ +++ int status; +++ errno = 0; +++ if (wait (&status) != pid) +++ printf ("wait failed: %m\n"); +++ else if (WIFSIGNALED (status) && WTERMSIG (status) == SIGTERM) +++ { +++ printf ("child correctly died with SIGTERM\n"); +++ return 0; +++ } +++ else +++ printf ("child died with bad status %#x\n", status); +++ +++ return 1; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-getpid1.c ++@@ -0,0 +1,122 @@ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++#ifndef TEST_CLONE_FLAGS +++#define TEST_CLONE_FLAGS 0 +++#endif +++ +++static int sig; +++ +++static int +++f (void *a) +++{ +++ puts ("in f"); +++ union sigval sival; +++ sival.sival_int = getpid (); +++ printf ("pid = %d\n", sival.sival_int); +++ if (sigqueue (getppid (), sig, sival) != 0) +++ return 1; +++ return 0; +++} +++ +++ +++static int +++do_test (void) +++{ +++ int mypid = getpid (); +++ +++ sig = SIGRTMIN; +++ sigset_t ss; +++ sigemptyset (&ss); +++ sigaddset (&ss, sig); +++ if (sigprocmask (SIG_BLOCK, &ss, NULL) != 0) +++ { +++ printf ("sigprocmask failed: %m\n"); +++ return 1; +++ } +++ +++#ifdef __ia64__ +++ extern int __clone2 (int (*__fn) (void *__arg), void *__child_stack_base, +++ size_t __child_stack_size, int __flags, +++ void *__arg, ...); +++ char st[256 * 1024] __attribute__ ((aligned)); +++ pid_t p = __clone2 (f, st, sizeof (st), TEST_CLONE_FLAGS, 0); +++#else +++ char st[128 * 1024] __attribute__ ((aligned)); +++# if _STACK_GROWS_DOWN +++ pid_t p = clone (f, st + sizeof (st), TEST_CLONE_FLAGS, 0); +++# elif _STACK_GROWS_UP +++ pid_t p = clone (f, st, TEST_CLONE_FLAGS, 0); +++# else +++# error "Define either _STACK_GROWS_DOWN or _STACK_GROWS_UP" +++# endif +++#endif +++ if (p == -1) +++ { +++ printf("clone failed: %m\n"); +++ return 1; +++ } +++ printf ("new thread: %d\n", (int) p); +++ +++ siginfo_t si; +++ do +++ if (sigwaitinfo (&ss, &si) < 0) +++ { +++ printf("sigwaitinfo failed: %m\n"); +++ kill (p, SIGKILL); +++ return 1; +++ } +++ while (si.si_signo != sig || si.si_code != SI_QUEUE); +++ +++ int e; +++ if (waitpid (p, &e, __WCLONE) != p) +++ { +++ puts ("waitpid failed"); +++ kill (p, SIGKILL); +++ return 1; +++ } +++ if (!WIFEXITED (e)) +++ { +++ if (WIFSIGNALED (e)) +++ printf ("died from signal %s\n", strsignal (WTERMSIG (e))); +++ else +++ puts ("did not terminate correctly"); +++ return 1; +++ } +++ if (WEXITSTATUS (e) != 0) +++ { +++ printf ("exit code %d\n", WEXITSTATUS (e)); +++ return 1; +++ } +++ +++ if (si.si_int != (int) p) +++ { +++ printf ("expected PID %d, got si_int %d\n", (int) p, si.si_int); +++ kill (p, SIGKILL); +++ return 1; +++ } +++ +++ if (si.si_pid != p) +++ { +++ printf ("expected PID %d, got si_pid %d\n", (int) p, (int) si.si_pid); +++ kill (p, SIGKILL); +++ return 1; +++ } +++ +++ if (getpid () != mypid) +++ { +++ puts ("my PID changed"); +++ return 1; +++ } +++ +++ return 0; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-getpid2.c ++@@ -0,0 +1,2 @@ +++#define TEST_CLONE_FLAGS CLONE_VM +++#include "tst-getpid1.c" ++--- /dev/null +++++ b/fbtl/tst-getpid3.c ++@@ -0,0 +1,114 @@ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++static pid_t pid; +++ +++static void * +++pid_thread (void *arg) +++{ +++ if (pid != getpid ()) +++ { +++ printf ("pid wrong in thread: should be %d, is %d\n", +++ (int) pid, (int) getpid ()); +++ return (void *) 1L; +++ } +++ +++ return NULL; +++} +++ +++static int +++do_test (void) +++{ +++ pid = getpid (); +++ +++ pthread_t thr; +++ int ret = pthread_create (&thr, NULL, pid_thread, NULL); +++ if (ret) +++ { +++ printf ("pthread_create failed: %d\n", ret); +++ return 1; +++ } +++ +++ void *thr_ret; +++ ret = pthread_join (thr, &thr_ret); +++ if (ret) +++ { +++ printf ("pthread_create failed: %d\n", ret); +++ return 1; +++ } +++ else if (thr_ret) +++ { +++ printf ("thread getpid failed\n"); +++ return 1; +++ } +++ +++ pid_t child = fork (); +++ if (child == -1) +++ { +++ printf ("fork failed: %m\n"); +++ return 1; +++ } +++ else if (child == 0) +++ { +++ if (pid == getpid ()) +++ { +++ puts ("pid did not change after fork"); +++ exit (1); +++ } +++ +++ pid = getpid (); +++ ret = pthread_create (&thr, NULL, pid_thread, NULL); +++ if (ret) +++ { +++ printf ("pthread_create failed: %d\n", ret); +++ return 1; +++ } +++ +++ ret = pthread_join (thr, &thr_ret); +++ if (ret) +++ { +++ printf ("pthread_create failed: %d\n", ret); +++ return 1; +++ } +++ else if (thr_ret) +++ { +++ printf ("thread getpid failed\n"); +++ return 1; +++ } +++ +++ return 0; +++ } +++ +++ int status; +++ if (TEMP_FAILURE_RETRY (waitpid (child, &status, 0)) != child) +++ { +++ puts ("waitpid failed"); +++ kill (child, SIGKILL); +++ return 1; +++ } +++ +++ if (!WIFEXITED (status)) +++ { +++ if (WIFSIGNALED (status)) +++ printf ("died from signal %s\n", strsignal (WTERMSIG (status))); +++ else +++ puts ("did not terminate correctly"); +++ return 1; +++ } +++ if (WEXITSTATUS (status) != 0) +++ { +++ printf ("exit code %d\n", WEXITSTATUS (status)); +++ return 1; +++ } +++ +++ return 0; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-initializers1-c89.c ++@@ -0,0 +1 @@ +++#include "tst-initializers1.c" ++--- /dev/null +++++ b/fbtl/tst-initializers1-c99.c ++@@ -0,0 +1 @@ +++#include "tst-initializers1.c" ++--- /dev/null +++++ b/fbtl/tst-initializers1-gnu89.c ++@@ -0,0 +1 @@ +++#include "tst-initializers1.c" ++--- /dev/null +++++ b/fbtl/tst-initializers1-gnu99.c ++@@ -0,0 +1 @@ +++#include "tst-initializers1.c" ++--- /dev/null +++++ b/fbtl/tst-initializers1.c ++@@ -0,0 +1,57 @@ +++/* Copyright (C) 2005-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Jakub Jelinek , 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, see +++ . */ +++ +++/* We test the code undef conditions outside of glibc. */ +++#undef _LIBC +++ +++#include +++ +++pthread_mutex_t mtx_normal = PTHREAD_MUTEX_INITIALIZER; +++pthread_mutex_t mtx_recursive = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP; +++pthread_mutex_t mtx_errorchk = PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP; +++pthread_mutex_t mtx_adaptive = PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP; +++pthread_rwlock_t rwl_normal = PTHREAD_RWLOCK_INITIALIZER; +++pthread_rwlock_t rwl_writer +++ = PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP; +++pthread_cond_t cond = PTHREAD_COND_INITIALIZER; +++ +++int +++main (void) +++{ +++ if (mtx_normal.__data.__kind != PTHREAD_MUTEX_TIMED_NP) +++ return 1; +++ if (mtx_recursive.__data.__kind != PTHREAD_MUTEX_RECURSIVE_NP) +++ return 2; +++ if (mtx_errorchk.__data.__kind != PTHREAD_MUTEX_ERRORCHECK_NP) +++ return 3; +++ if (mtx_adaptive.__data.__kind != PTHREAD_MUTEX_ADAPTIVE_NP) +++ return 4; +++ if (rwl_normal.__data.__flags != PTHREAD_RWLOCK_PREFER_READER_NP) +++ return 5; +++ if (rwl_writer.__data.__flags +++ != PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP) +++ return 6; +++ /* __libc_rwlock_init definition for libc.so +++ relies on PTHREAD_RWLOCK_INITIALIZER being all zeros. If +++ that ever changes, needs updating. */ +++ size_t i; +++ for (i = 0; i < sizeof (rwl_normal); i++) +++ if (((char *) &rwl_normal)[i] != '\0') +++ return 7; +++ return 0; +++} ++--- /dev/null +++++ b/fbtl/tst-join1.c ++@@ -0,0 +1,82 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++ +++ +++static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER; +++ +++ +++static void * +++tf (void *arg) +++{ +++ pthread_t mh = (pthread_t) arg; +++ void *result; +++ +++ if (pthread_mutex_unlock (&lock) != 0) +++ { +++ puts ("unlock failed"); +++ exit (1); +++ } +++ +++ if (pthread_join (mh, &result) != 0) +++ { +++ puts ("join failed"); +++ exit (1); +++ } +++ +++ if (result != (void *) 42l) +++ { +++ printf ("result wrong: expected %p, got %p\n", (void *) 42, result); +++ exit (1); +++ } +++ +++ exit (0); +++} +++ +++ +++static int +++do_test (void) +++{ +++ pthread_t th; +++ +++ if (pthread_mutex_lock (&lock) != 0) +++ { +++ puts ("1st lock failed"); +++ exit (1); +++ } +++ +++ if (pthread_create (&th, NULL, tf, (void *) pthread_self ()) != 0) +++ { +++ puts ("create failed"); +++ exit (1); +++ } +++ +++ if (pthread_mutex_lock (&lock) != 0) +++ { +++ puts ("2nd lock failed"); +++ exit (1); +++ } +++ +++ pthread_exit ((void *) 42); +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-join2.c ++@@ -0,0 +1,103 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER; +++ +++ +++static void * +++tf (void *arg) +++{ +++ if (pthread_mutex_lock (&lock) != 0) +++ { +++ puts ("child: mutex_lock failed"); +++ return NULL; +++ } +++ +++ return (void *) 42l; +++} +++ +++ +++static int +++do_test (void) +++{ +++ pthread_t th; +++ +++ if (pthread_mutex_lock (&lock) != 0) +++ { +++ puts ("mutex_lock failed"); +++ exit (1); +++ } +++ +++ if (pthread_create (&th, NULL, tf, NULL) != 0) +++ { +++ puts ("mutex_create failed"); +++ exit (1); +++ } +++ +++ void *status; +++ int val = pthread_tryjoin_np (th, &status); +++ if (val == 0) +++ { +++ puts ("1st tryjoin succeeded"); +++ exit (1); +++ } +++ else if (val != EBUSY) +++ { +++ puts ("1st tryjoin didn't return EBUSY"); +++ exit (1); +++ } +++ +++ if (pthread_mutex_unlock (&lock) != 0) +++ { +++ puts ("mutex_unlock failed"); +++ exit (1); +++ } +++ +++ while ((val = pthread_tryjoin_np (th, &status)) != 0) +++ { +++ if (val != EBUSY) +++ { +++ printf ("tryjoin returned %s (%d), expected only 0 or EBUSY\n", +++ strerror (val), val); +++ exit (1); +++ } +++ +++ /* Delay minimally. */ +++ struct timespec ts = { .tv_sec = 0, .tv_nsec = 10000000 }; +++ nanosleep (&ts, NULL); +++ } +++ +++ if (status != (void *) 42l) +++ { +++ printf ("return value %p, expected %p\n", status, (void *) 42l); +++ exit (1); +++ } +++ +++ return 0; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-join3.c ++@@ -0,0 +1,122 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER; +++ +++ +++static void * +++tf (void *arg) +++{ +++ if (pthread_mutex_lock (&lock) != 0) +++ { +++ puts ("child: mutex_lock failed"); +++ return NULL; +++ } +++ +++ return (void *) 42l; +++} +++ +++ +++static int +++do_test (void) +++{ +++ pthread_t th; +++ +++ if (pthread_mutex_lock (&lock) != 0) +++ { +++ puts ("mutex_lock failed"); +++ exit (1); +++ } +++ +++ if (pthread_create (&th, NULL, tf, NULL) != 0) +++ { +++ puts ("mutex_create failed"); +++ exit (1); +++ } +++ +++ void *status; +++ struct timespec ts; +++ struct timeval tv; +++ (void) gettimeofday (&tv, NULL); +++ TIMEVAL_TO_TIMESPEC (&tv, &ts); +++ ts.tv_nsec += 200000000; +++ if (ts.tv_nsec >= 1000000000) +++ { +++ ts.tv_nsec -= 1000000000; +++ ++ts.tv_sec; +++ } +++ int val = pthread_timedjoin_np (th, &status, &ts); +++ if (val == 0) +++ { +++ puts ("1st timedjoin succeeded"); +++ exit (1); +++ } +++ else if (val != ETIMEDOUT) +++ { +++ puts ("1st timedjoin didn't return ETIMEDOUT"); +++ exit (1); +++ } +++ +++ if (pthread_mutex_unlock (&lock) != 0) +++ { +++ puts ("mutex_unlock failed"); +++ exit (1); +++ } +++ +++ while (1) +++ { +++ (void) gettimeofday (&tv, NULL); +++ TIMEVAL_TO_TIMESPEC (&tv, &ts); +++ ts.tv_nsec += 200000000; +++ if (ts.tv_nsec >= 1000000000) +++ { +++ ts.tv_nsec -= 1000000000; +++ ++ts.tv_sec; +++ } +++ +++ val = pthread_timedjoin_np (th, &status, &ts); +++ if (val == 0) +++ break; +++ +++ if (val != ETIMEDOUT) +++ { +++ printf ("timedjoin returned %s (%d), expected only 0 or ETIMEDOUT\n", +++ strerror (val), val); +++ exit (1); +++ } +++ } +++ +++ if (status != (void *) 42l) +++ { +++ printf ("return value %p, expected %p\n", status, (void *) 42l); +++ exit (1); +++ } +++ +++ return 0; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-join4.c ++@@ -0,0 +1,124 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++ +++ +++static pthread_barrier_t bar; +++ +++ +++static void * +++tf (void *arg) +++{ +++ if (pthread_barrier_wait (&bar) != 0) +++ { +++ puts ("tf: barrier_wait failed"); +++ exit (1); +++ } +++ +++ return (void *) 1l; +++} +++ +++ +++static int +++do_test (void) +++{ +++ if (pthread_barrier_init (&bar, NULL, 3) != 0) +++ { +++ puts ("barrier_init failed"); +++ exit (1); +++ } +++ +++ pthread_attr_t a; +++ +++ if (pthread_attr_init (&a) != 0) +++ { +++ puts ("attr_init failed"); +++ exit (1); +++ } +++ +++ if (pthread_attr_setstacksize (&a, 1 * 1024 * 1024) != 0) +++ { +++ puts ("attr_setstacksize failed"); +++ return 1; +++ } +++ +++ pthread_t th[2]; +++ +++ if (pthread_create (&th[0], &a, tf, NULL) != 0) +++ { +++ puts ("1st create failed"); +++ exit (1); +++ } +++ +++ if (pthread_attr_setdetachstate (&a, PTHREAD_CREATE_DETACHED) != 0) +++ { +++ puts ("attr_setdetachstate failed"); +++ exit (1); +++ } +++ +++ if (pthread_create (&th[1], &a, tf, NULL) != 0) +++ { +++ puts ("1st create failed"); +++ exit (1); +++ } +++ +++ if (pthread_attr_destroy (&a) != 0) +++ { +++ puts ("attr_destroy failed"); +++ exit (1); +++ } +++ +++ if (pthread_detach (th[0]) != 0) +++ { +++ puts ("could not detach 1st thread"); +++ exit (1); +++ } +++ +++ int err = pthread_detach (th[0]); +++ if (err == 0) +++ { +++ puts ("second detach of 1st thread succeeded"); +++ exit (1); +++ } +++ if (err != EINVAL) +++ { +++ printf ("second detach of 1st thread returned %d, not EINVAL\n", err); +++ exit (1); +++ } +++ +++ err = pthread_detach (th[1]); +++ if (err == 0) +++ { +++ puts ("detach of 2nd thread succeeded"); +++ exit (1); +++ } +++ if (err != EINVAL) +++ { +++ printf ("detach of 2nd thread returned %d, not EINVAL\n", err); +++ exit (1); +++ } +++ +++ exit (0); +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-join5.c ++@@ -0,0 +1,210 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++#if !defined(__NR_nanosleep) && defined(SYS_nanosleep) +++# define __NR_nanosleep SYS_nanosleep +++#endif +++ +++#define wait_code() \ +++ do { \ +++ struct timespec ts = { .tv_sec = 0, .tv_nsec = 200000000 }; \ +++ while (syscall (__NR_nanosleep, &ts, &ts) < 0) \ +++ /* nothing */; \ +++ } while (0) +++ +++ +++#ifdef WAIT_IN_CHILD +++static pthread_barrier_t b; +++#endif +++ +++ +++static void * +++tf1 (void *arg) +++{ +++#ifdef WAIT_IN_CHILD +++ int e = pthread_barrier_wait (&b); +++ if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: barrier_wait failed\n", __func__); +++ exit (1); +++ } +++ +++ wait_code (); +++#endif +++ +++ pthread_join ((pthread_t) arg, NULL); +++ +++ exit (42); +++} +++ +++ +++static void * +++tf2 (void *arg) +++{ +++#ifdef WAIT_IN_CHILD +++ int e = pthread_barrier_wait (&b); +++ if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: barrier_wait failed\n", __func__); +++ exit (1); +++ } +++ +++ wait_code (); +++#endif +++ pthread_join ((pthread_t) arg, NULL); +++ +++ exit (43); +++} +++ +++ +++static int +++do_test (void) +++{ +++#ifdef WAIT_IN_CHILD +++ if (pthread_barrier_init (&b, NULL, 2) != 0) +++ { +++ puts ("barrier_init failed"); +++ return 1; +++ } +++#endif +++ +++ pthread_t th; +++ +++ int err = pthread_join (pthread_self (), NULL); +++ if (err == 0) +++ { +++ puts ("1st circular join succeeded"); +++ return 1; +++ } +++ if (err != EDEADLK) +++ { +++ printf ("1st circular join %d, not EDEADLK\n", err); +++ return 1; +++ } +++ +++ if (pthread_create (&th, NULL, tf1, (void *) pthread_self ()) != 0) +++ { +++ puts ("1st create failed"); +++ return 1; +++ } +++ +++#ifndef WAIT_IN_CHILD +++ wait_code (); +++#endif +++ +++ if (pthread_cancel (th) != 0) +++ { +++ puts ("cannot cancel 1st thread"); +++ return 1; +++ } +++ +++#ifdef WAIT_IN_CHILD +++ int e = pthread_barrier_wait (&b); +++ if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: barrier_wait failed\n", __func__); +++ return 1; +++ } +++#endif +++ +++ void *r; +++ err = pthread_join (th, &r); +++ if (err != 0) +++ { +++ printf ("cannot join 1st thread: %d\n", err); +++ return 1; +++ } +++ if (r != PTHREAD_CANCELED) +++ { +++ puts ("1st thread not canceled"); +++ return 1; +++ } +++ +++ err = pthread_join (pthread_self (), NULL); +++ if (err == 0) +++ { +++ puts ("2nd circular join succeeded"); +++ return 1; +++ } +++ if (err != EDEADLK) +++ { +++ printf ("2nd circular join %d, not EDEADLK\n", err); +++ return 1; +++ } +++ +++ if (pthread_create (&th, NULL, tf2, (void *) pthread_self ()) != 0) +++ { +++ puts ("2nd create failed"); +++ return 1; +++ } +++ +++#ifndef WAIT_IN_CHILD +++ wait_code (); +++#endif +++ +++ if (pthread_cancel (th) != 0) +++ { +++ puts ("cannot cancel 2nd thread"); +++ return 1; +++ } +++ +++#ifdef WAIT_IN_CHILD +++ e = pthread_barrier_wait (&b); +++ if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%s: barrier_wait failed\n", __func__); +++ return 1; +++ } +++#endif +++ +++ if (pthread_join (th, &r) != 0) +++ { +++ puts ("cannot join 2nd thread"); +++ return 1; +++ } +++ if (r != PTHREAD_CANCELED) +++ { +++ puts ("2nd thread not canceled"); +++ return 1; +++ } +++ +++ err = pthread_join (pthread_self (), NULL); +++ if (err == 0) +++ { +++ puts ("3rd circular join succeeded"); +++ return 1; +++ } +++ if (err != EDEADLK) +++ { +++ printf ("3rd circular join %d, not EDEADLK\n", err); +++ return 1; +++ } +++ +++ return 0; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-join6.c ++@@ -0,0 +1,2 @@ +++#define WAIT_IN_CHILD 1 +++#include "tst-join5.c" ++--- /dev/null +++++ b/fbtl/tst-key1.c ++@@ -0,0 +1,88 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++ +++ +++int +++do_test (void) +++{ +++ int max; +++#ifdef PTHREAD_KEYS_MAX +++ max = PTHREAD_KEYS_MAX; +++#else +++ max = _POSIX_THREAD_KEYS_MAX; +++#endif +++ pthread_key_t *keys = alloca (max * sizeof (pthread_key_t)); +++ +++ int i; +++ for (i = 0; i < max; ++i) +++ if (pthread_key_create (&keys[i], NULL) != 0) +++ { +++ write (2, "key_create failed\n", 18); +++ _exit (1); +++ } +++ else +++ { +++ printf ("created key %d\n", i); +++ +++ if (pthread_setspecific (keys[i], (const void *) (i + 100l)) != 0) +++ { +++ write (2, "setspecific failed\n", 19); +++ _exit (1); +++ } +++ } +++ +++ for (i = 0; i < max; ++i) +++ { +++ if (pthread_getspecific (keys[i]) != (void *) (i + 100l)) +++ { +++ write (2, "getspecific failed\n", 19); +++ _exit (1); +++ } +++ +++ if (pthread_key_delete (keys[i]) != 0) +++ { +++ write (2, "key_delete failed\n", 18); +++ _exit (1); +++ } +++ } +++ +++ /* Now it must be once again possible to allocate keys. */ +++ if (pthread_key_create (&keys[0], NULL) != 0) +++ { +++ write (2, "2nd key_create failed\n", 22); +++ _exit (1); +++ } +++ +++ if (pthread_key_delete (keys[0]) != 0) +++ { +++ write (2, "2nd key_delete failed\n", 22); +++ _exit (1); +++ } +++ +++ return 0; +++} +++ +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-key2.c ++@@ -0,0 +1,114 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++ +++#define N 2 +++ +++ +++static int cnt0; +++static void +++f0 (void *p) +++{ +++ ++cnt0; +++} +++ +++ +++static int cnt1; +++static void +++f1 (void *p) +++{ +++ ++cnt1; +++} +++ +++ +++static void (*fcts[N]) (void *) = +++{ +++ f0, +++ f1 +++}; +++ +++ +++static void * +++tf (void *arg) +++{ +++ pthread_key_t *key = (pthread_key_t *) arg; +++ +++ if (pthread_setspecific (*key, (void *) -1l) != 0) +++ { +++ write (2, "setspecific failed\n", 19); +++ _exit (1); +++ } +++ +++ return NULL; +++} +++ +++ +++int +++do_test (void) +++{ +++ pthread_key_t keys[N]; +++ +++ int i; +++ for (i = 0; i < N; ++i) +++ if (pthread_key_create (&keys[i], fcts[i]) != 0) +++ { +++ write (2, "key_create failed\n", 18); +++ _exit (1); +++ } +++ +++ pthread_t th; +++ if (pthread_create (&th, NULL, tf, &keys[1]) != 0) +++ { +++ write (2, "create failed\n", 14); +++ _exit (1); +++ } +++ +++ if (pthread_join (th, NULL) != 0) +++ { +++ write (2, "join failed\n", 12); +++ _exit (1); +++ } +++ +++ if (cnt0 != 0) +++ { +++ write (2, "cnt0 != 0\n", 10); +++ _exit (1); +++ } +++ +++ if (cnt1 != 1) +++ { +++ write (2, "cnt1 != 1\n", 10); +++ _exit (1); +++ } +++ +++ for (i = 0; i < N; ++i) +++ if (pthread_key_delete (keys[i]) != 0) +++ { +++ write (2, "key_delete failed\n", 18); +++ _exit (1); +++ } +++ +++ return 0; +++} +++ +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-key3.c ++@@ -0,0 +1,155 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++ +++#define N 2 +++ +++ +++static int cnt0; +++static void +++f0 (void *p) +++{ +++ ++cnt0; +++} +++ +++ +++static int cnt1; +++static void +++f1 (void *p) +++{ +++ ++cnt1; +++} +++ +++ +++static void (*fcts[N]) (void *) = +++{ +++ f0, +++ f1 +++}; +++ +++ +++static pthread_barrier_t b; +++ +++ +++static void * +++tf (void *arg) +++{ +++ pthread_key_t *key = (pthread_key_t *) arg; +++ +++ if (pthread_setspecific (*key, (void *) -1l) != 0) +++ { +++ write (2, "setspecific failed\n", 19); +++ _exit (1); +++ } +++ +++ pthread_barrier_wait (&b); +++ +++ const struct timespec t = { .tv_sec = 1000, .tv_nsec = 0 }; +++ while (1) +++ nanosleep (&t, NULL); +++ +++ /* NOTREACHED */ +++ return NULL; +++} +++ +++ +++int +++do_test (void) +++{ +++ pthread_key_t keys[N]; +++ +++ int i; +++ for (i = 0; i < N; ++i) +++ if (pthread_key_create (&keys[i], fcts[i]) != 0) +++ { +++ write (2, "key_create failed\n", 18); +++ _exit (1); +++ } +++ +++ if (pthread_barrier_init (&b, NULL, 2) != 0) +++ { +++ write (2, "barrier_init failed\n", 20); +++ _exit (1); +++ } +++ +++ pthread_t th; +++ if (pthread_create (&th, NULL, tf, &keys[1]) != 0) +++ { +++ write (2, "create failed\n", 14); +++ _exit (1); +++ } +++ +++ pthread_barrier_wait (&b); +++ +++ if (pthread_cancel (th) != 0) +++ { +++ write (2, "cancel failed\n", 14); +++ _exit (1); +++ } +++ +++ void *status; +++ if (pthread_join (th, &status) != 0) +++ { +++ write (2, "join failed\n", 12); +++ _exit (1); +++ } +++ +++ if (status != PTHREAD_CANCELED) +++ { +++ write (2, "thread not canceled\n", 20); +++ _exit (1); +++ } +++ +++ /* Note that the TSD destructors not necessarily have to have +++ finished by the time pthread_join returns. At least according to +++ POSIX. We implement the stronger requirement that they indeed +++ have run and therefore these tests succeed. */ +++ if (cnt0 != 0) +++ { +++ write (2, "cnt0 != 0\n", 10); +++ _exit (1); +++ } +++ +++ if (cnt1 != 1) +++ { +++ write (2, "cnt1 != 1\n", 10); +++ _exit (1); +++ } +++ +++ for (i = 0; i < N; ++i) +++ if (pthread_key_delete (keys[i]) != 0) +++ { +++ write (2, "key_delete failed\n", 18); +++ _exit (1); +++ } +++ +++ if (pthread_barrier_destroy (&b) != 0) +++ { +++ write (2, "barrier_destroy failed\n", 23); +++ _exit (1); +++ } +++ +++ return 0; +++} +++ +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-key4.c ++@@ -0,0 +1,136 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++ +++ +++#ifdef PTHREAD_KEYS_MAX +++const int max = PTHREAD_KEYS_MAX; +++#else +++const int max = _POSIX_THREAD_KEYS_MAX; +++#endif +++static pthread_key_t *keys; +++ +++ +++static void * +++tf1 (void *arg) +++{ +++ int i; +++ for (i = 0; i < max; ++i) +++ if (pthread_setspecific (keys[i], (void *) (long int) (i + 1)) != 0) +++ { +++ puts ("setspecific failed"); +++ exit (1); +++ } +++ +++ return NULL; +++} +++ +++ +++static void * +++tf2 (void *arg) +++{ +++ int i; +++ for (i = 0; i < max; ++i) +++ if (pthread_getspecific (keys[i]) != NULL) +++ { +++ printf ("getspecific for key %d not NULL\n", i); +++ exit (1); +++ } +++ +++ return NULL; +++} +++ +++ +++static int +++do_test (void) +++{ +++ keys = alloca (max * sizeof (pthread_key_t)); +++ +++ int i; +++ for (i = 0; i < max; ++i) +++ if (pthread_key_create (&keys[i], NULL) != 0) +++ { +++ puts ("key_create failed"); +++ exit (1); +++ } +++ +++ pthread_attr_t a; +++ +++ if (pthread_attr_init (&a) != 0) +++ { +++ puts ("attr_init failed"); +++ exit (1); +++ } +++ +++ if (pthread_attr_setstacksize (&a, 1 * 1024 * 1024) != 0) +++ { +++ puts ("attr_setstacksize failed"); +++ return 1; +++ } +++ +++ for (i = 0; i < 10; ++i) +++ { +++ int j; +++#define N 2 +++ pthread_t th[N]; +++ for (j = 0; j < N; ++j) +++ if (pthread_create (&th[j], NULL, tf1, NULL) != 0) +++ { +++ puts ("1st create failed"); +++ exit (1); +++ } +++ +++ for (j = 0; j < N; ++j) +++ if (pthread_join (th[j], NULL) != 0) +++ { +++ puts ("1st join failed"); +++ exit (1); +++ } +++ +++ for (j = 0; j < N; ++j) +++ if (pthread_create (&th[j], NULL, tf2, NULL) != 0) +++ { +++ puts ("2nd create failed"); +++ exit (1); +++ } +++ +++ for (j = 0; j < N; ++j) +++ if (pthread_join (th[j], NULL) != 0) +++ { +++ puts ("2nd join failed"); +++ exit (1); +++ } +++ } +++ +++ if (pthread_attr_destroy (&a) != 0) +++ { +++ puts ("attr_destroy failed"); +++ exit (1); +++ } +++ +++ return 0; +++} +++ +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-kill1.c ++@@ -0,0 +1,99 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++ +++ +++static pthread_cond_t c = PTHREAD_COND_INITIALIZER; +++static pthread_mutex_t m = PTHREAD_MUTEX_INITIALIZER; +++static pthread_barrier_t b; +++ +++static void * +++tf (void *a) +++{ +++ if (pthread_mutex_lock (&m) != 0) +++ { +++ puts ("child: mutex_lock failed"); +++ exit (1); +++ } +++ +++ int e = pthread_barrier_wait (&b); +++ if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("child: barrier_wait failed"); +++ exit (1); +++ } +++ +++ /* This call should never return. */ +++ pthread_cond_wait (&c, &m); +++ +++ return NULL; +++} +++ +++ +++int +++do_test (void) +++{ +++ pthread_t th; +++ +++ if (pthread_barrier_init (&b, NULL, 2) != 0) +++ { +++ puts ("barrier_init failed"); +++ exit (1); +++ } +++ +++ if (pthread_create (&th, NULL, tf, NULL) != 0) +++ { +++ puts ("create failed"); +++ exit (1); +++ } +++ +++ int e = pthread_barrier_wait (&b); +++ if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("barrier_wait failed"); +++ exit (1); +++ } +++ +++ if (pthread_mutex_lock (&m) != 0) +++ { +++ puts ("mutex_lock failed"); +++ exit (1); +++ } +++ +++ /* Send the thread a signal which it doesn't catch and which will +++ cause the process to terminate. */ +++ if (pthread_kill (th, SIGUSR1) != 0) +++ { +++ puts ("kill failed"); +++ exit (1); +++ } +++ +++ /* This call should never return. */ +++ pthread_join (th, NULL); +++ +++ return 0; +++} +++ +++ +++#define EXPECTED_SIGNAL SIGUSR1 +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-kill2.c ++@@ -0,0 +1,138 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++static pthread_cond_t c = PTHREAD_COND_INITIALIZER; +++static pthread_mutex_t m = PTHREAD_MUTEX_INITIALIZER; +++static pthread_barrier_t b; +++ +++static void * +++tf (void *a) +++{ +++ /* Block SIGUSR1. */ +++ sigset_t ss; +++ +++ sigemptyset (&ss); +++ sigaddset (&ss, SIGUSR1); +++ if (pthread_sigmask (SIG_BLOCK, &ss, NULL) != 0) +++ { +++ puts ("child: sigmask failed"); +++ exit (1); +++ } +++ +++ if (pthread_mutex_lock (&m) != 0) +++ { +++ puts ("child: mutex_lock failed"); +++ exit (1); +++ } +++ +++ int e = pthread_barrier_wait (&b); +++ if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("child: barrier_wait failed"); +++ exit (1); +++ } +++ +++ /* Compute timeout. */ +++ struct timeval tv; +++ (void) gettimeofday (&tv, NULL); +++ struct timespec ts; +++ TIMEVAL_TO_TIMESPEC (&tv, &ts); +++ /* Timeout: 1sec. */ +++ ts.tv_sec += 1; +++ +++ /* This call should never return. */ +++ if (pthread_cond_timedwait (&c, &m, &ts) != ETIMEDOUT) +++ { +++ puts ("cond_timedwait didn't time out"); +++ exit (1); +++ } +++ +++ return NULL; +++} +++ +++ +++int +++do_test (void) +++{ +++ pthread_t th; +++ +++ if (pthread_barrier_init (&b, NULL, 2) != 0) +++ { +++ puts ("barrier_init failed"); +++ exit (1); +++ } +++ +++ if (pthread_create (&th, NULL, tf, NULL) != 0) +++ { +++ puts ("create failed"); +++ exit (1); +++ } +++ +++ int e = pthread_barrier_wait (&b); +++ if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("barrier_wait failed"); +++ exit (1); +++ } +++ +++ if (pthread_mutex_lock (&m) != 0) +++ { +++ puts ("mutex_lock failed"); +++ exit (1); +++ } +++ +++ /* Send the thread a signal which it has blocked. */ +++ if (pthread_kill (th, SIGUSR1) != 0) +++ { +++ puts ("kill failed"); +++ exit (1); +++ } +++ +++ if (pthread_mutex_unlock (&m) != 0) +++ { +++ puts ("mutex_unlock failed"); +++ exit (1); +++ } +++ +++ void *r; +++ if (pthread_join (th, &r) != 0) +++ { +++ puts ("join failed"); +++ exit (1); +++ } +++ if (r != NULL) +++ { +++ puts ("return value wrong"); +++ exit (1); +++ } +++ +++ return 0; +++} +++ +++ +++#define TIMEOUT 5 +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-kill3.c ++@@ -0,0 +1,158 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++static pthread_cond_t c = PTHREAD_COND_INITIALIZER; +++static pthread_mutex_t m = PTHREAD_MUTEX_INITIALIZER; +++static pthread_barrier_t b; +++ +++ +++static void +++handler (int sig) +++{ +++ write (1, "handler called\n", 15); +++ _exit (1); +++} +++ +++ +++static void * +++tf (void *a) +++{ +++ /* Block SIGUSR1. */ +++ sigset_t ss; +++ +++ sigemptyset (&ss); +++ sigaddset (&ss, SIGUSR1); +++ if (pthread_sigmask (SIG_BLOCK, &ss, NULL) != 0) +++ { +++ puts ("child: sigmask failed"); +++ exit (1); +++ } +++ +++ if (pthread_mutex_lock (&m) != 0) +++ { +++ puts ("child: mutex_lock failed"); +++ exit (1); +++ } +++ +++ int e = pthread_barrier_wait (&b); +++ if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("child: barrier_wait failed"); +++ exit (1); +++ } +++ +++ /* Compute timeout. */ +++ struct timeval tv; +++ (void) gettimeofday (&tv, NULL); +++ struct timespec ts; +++ TIMEVAL_TO_TIMESPEC (&tv, &ts); +++ /* Timeout: 1sec. */ +++ ts.tv_sec += 1; +++ +++ /* This call should never return. */ +++ if (pthread_cond_timedwait (&c, &m, &ts) != ETIMEDOUT) +++ { +++ puts ("cond_timedwait didn't time out"); +++ exit (1); +++ } +++ +++ return NULL; +++} +++ +++ +++int +++do_test (void) +++{ +++ pthread_t th; +++ +++ struct sigaction sa; +++ sigemptyset (&sa.sa_mask); +++ sa.sa_flags = 0; +++ sa.sa_handler = handler; +++ if (sigaction (SIGUSR1, &sa, NULL) != 0) +++ { +++ puts ("sigaction failed"); +++ exit (1); +++ } +++ +++ if (pthread_barrier_init (&b, NULL, 2) != 0) +++ { +++ puts ("barrier_init failed"); +++ exit (1); +++ } +++ +++ if (pthread_create (&th, NULL, tf, NULL) != 0) +++ { +++ puts ("create failed"); +++ exit (1); +++ } +++ +++ int e = pthread_barrier_wait (&b); +++ if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("barrier_wait failed"); +++ exit (1); +++ } +++ +++ if (pthread_mutex_lock (&m) != 0) +++ { +++ puts ("mutex_lock failed"); +++ exit (1); +++ } +++ +++ /* Send the thread a signal which it has blocked. */ +++ if (pthread_kill (th, SIGUSR1) != 0) +++ { +++ puts ("kill failed"); +++ exit (1); +++ } +++ +++ if (pthread_mutex_unlock (&m) != 0) +++ { +++ puts ("mutex_unlock failed"); +++ exit (1); +++ } +++ +++ void *r; +++ if (pthread_join (th, &r) != 0) +++ { +++ puts ("join failed"); +++ exit (1); +++ } +++ if (r != NULL) +++ { +++ puts ("return value wrong"); +++ exit (1); +++ } +++ +++ return 0; +++} +++ +++ +++#define TIMEOUT 5 +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-kill4.c ++@@ -0,0 +1,90 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++static void * +++tf (void *a) +++{ +++ return NULL; +++} +++ +++ +++int +++do_test (void) +++{ +++ pthread_attr_t at; +++ if (pthread_attr_init (&at) != 0) +++ { +++ puts ("attr_create failed"); +++ exit (1); +++ } +++ +++ /* Limit thread stack size, because if it is too large, pthread_join +++ will free it immediately rather than put it into stack cache. */ +++ if (pthread_attr_setstacksize (&at, 2 * 1024 * 1024) != 0) +++ { +++ puts ("setstacksize failed"); +++ exit (1); +++ } +++ +++ pthread_t th; +++ if (pthread_create (&th, &at, tf, NULL) != 0) +++ { +++ puts ("create failed"); +++ exit (1); +++ } +++ +++ pthread_attr_destroy (&at); +++ +++ if (pthread_join (th, NULL) != 0) +++ { +++ puts ("join failed"); +++ exit (1); +++ } +++ +++ /* The following only works because we assume here something about +++ the implementation. Namely, that the memory allocated for the +++ thread descriptor is not going away, that the TID field is +++ cleared and therefore the signal is sent to process 0, and that +++ we can savely assume there is no other process with this ID at +++ that time. */ +++ int e = pthread_kill (th, 0); +++ if (e == 0) +++ { +++ puts ("pthread_kill succeeded"); +++ exit (1); +++ } +++ if (e != ESRCH) +++ { +++ puts ("pthread_kill didn't return ESRCH"); +++ exit (1); +++ } +++ +++ return 0; +++} +++ +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-kill5.c ++@@ -0,0 +1,48 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++ +++ +++int +++do_test (void) +++{ +++ /* XXX This test might require architecture and system specific changes. +++ There is no guarantee that this signal number is invalid. */ +++ int e = pthread_kill (pthread_self (), SIGRTMAX + 10); +++ if (e == 0) +++ { +++ puts ("kill didn't failed"); +++ exit (1); +++ } +++ if (e != EINVAL) +++ { +++ puts ("error not EINVAL"); +++ exit (1); +++ } +++ +++ return 0; +++} +++ +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-kill6.c ++@@ -0,0 +1,161 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++static pthread_t receiver; +++static sem_t sem; +++static pthread_barrier_t b; +++ +++static void +++handler (int sig) +++{ +++ if (sig != SIGUSR1) +++ { +++ write (STDOUT_FILENO, "wrong signal\n", 13); +++ _exit (1); +++ } +++ +++ if (pthread_self () != receiver) +++ { +++ write (STDOUT_FILENO, "not the intended receiver\n", 26); +++ _exit (1); +++ } +++ +++ if (sem_post (&sem) != 0) +++ { +++ write (STDOUT_FILENO, "sem_post failed\n", 16); +++ _exit (1); +++ } +++} +++ +++ +++static void * +++tf (void *a) +++{ +++ int e = pthread_barrier_wait (&b); +++ if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("child: barrier_wait failed"); +++ exit (1); +++ } +++ +++ return NULL; +++} +++ +++ +++int +++do_test (void) +++{ +++ struct sigaction sa; +++ sigemptyset (&sa.sa_mask); +++ sa.sa_flags = 0; +++ sa.sa_handler = handler; +++ if (sigaction (SIGUSR1, &sa, NULL) != 0) +++ { +++ puts ("sigaction failed"); +++ exit (1); +++ } +++ +++#define N 20 +++ +++ if (pthread_barrier_init (&b, NULL, N + 1) != 0) +++ { +++ puts ("barrier_init failed"); +++ exit (1); +++ } +++ +++ pthread_attr_t a; +++ +++ if (pthread_attr_init (&a) != 0) +++ { +++ puts ("attr_init failed"); +++ exit (1); +++ } +++ +++ if (pthread_attr_setstacksize (&a, 1 * 1024 * 1024) != 0) +++ { +++ puts ("attr_setstacksize failed"); +++ return 1; +++ } +++ +++ pthread_t th[N]; +++ int i; +++ for (i = 0; i < N; ++i) +++ if (pthread_create (&th[i], &a, tf, NULL) != 0) +++ { +++ puts ("create failed"); +++ exit (1); +++ } +++ +++ if (pthread_attr_destroy (&a) != 0) +++ { +++ puts ("attr_destroy failed"); +++ exit (1); +++ } +++ +++ if (sem_init (&sem, 0, 0) != 0) +++ { +++ puts ("sem_init failed"); +++ exit (1); +++ } +++ +++ for (i = 0; i < N * 10; ++i) +++ { +++ receiver = th[i % N]; +++ +++ if (pthread_kill (receiver, SIGUSR1) != 0) +++ { +++ puts ("kill failed"); +++ exit (1); +++ } +++ +++ if (TEMP_FAILURE_RETRY (sem_wait (&sem)) != 0) +++ { +++ puts ("sem_wait failed"); +++ exit (1); +++ } +++ } +++ +++ int e = pthread_barrier_wait (&b); +++ if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("barrier_wait failed"); +++ exit (1); +++ } +++ +++ for (i = 0; i < N; ++i) +++ if (pthread_join (th[i], NULL) != 0) +++ { +++ puts ("join failed"); +++ exit (1); +++ } +++ +++ return 0; +++} +++ +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-locale1.c ++@@ -0,0 +1,18 @@ +++/* Test that the thread-local locale works right in the main thread +++ when statically linked. */ +++ +++#include "../locale/tst-C-locale.c" +++ +++#include +++#include +++ +++/* This is never called, just here to get pthreads linked in. */ +++int +++useless (void) +++{ +++ pthread_t th; +++ pthread_create (&th, 0, (void *(*) (void *)) useless, 0); +++ /* This is to check __libc_current_sigrt* can be used in statically +++ linked apps. */ +++ return SIGRTMIN; +++} ++--- /dev/null +++++ b/fbtl/tst-locale2.c ++@@ -0,0 +1,15 @@ +++/* Test that the thread-local locale works right in the main thread +++ when statically linked. */ +++ +++#include "../argp/tst-argp1.c" +++ +++#include +++ +++/* This is never called, just here to get pthreads linked in. */ +++void * +++useless (void *a) +++{ +++ pthread_t th; +++ pthread_create (&th, 0, useless, a); +++ return NULL; +++} ++--- /dev/null +++++ b/fbtl/tst-mutex1.c ++@@ -0,0 +1,76 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++ +++ +++#ifndef ATTR +++# define ATTR NULL +++#endif +++ +++ +++static int +++do_test (void) +++{ +++ pthread_mutex_t m; +++ +++ int e = pthread_mutex_init (&m, ATTR); +++ if (ATTR != NULL && e == ENOTSUP) +++ { +++ puts ("cannot support selected type of mutexes"); +++ return 0; +++ } +++ else if (e != 0) +++ { +++ puts ("mutex_init failed"); +++ return 1; +++ } +++ +++ if (ATTR != NULL && pthread_mutexattr_destroy (ATTR) != 0) +++ { +++ puts ("mutexattr_destroy failed"); +++ return 1; +++ } +++ +++ if (pthread_mutex_lock (&m) != 0) +++ { +++ puts ("mutex_lock failed"); +++ return 1; +++ } +++ +++ if (pthread_mutex_unlock (&m) != 0) +++ { +++ puts ("mutex_unlock failed"); +++ return 1; +++ } +++ +++ if (pthread_mutex_destroy (&m) != 0) +++ { +++ puts ("mutex_destroy failed"); +++ return 1; +++ } +++ +++ return 0; +++} +++ +++#ifndef TEST_FUNCTION +++# define TEST_FUNCTION do_test () +++#endif +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-mutex2.c ++@@ -0,0 +1,241 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++ +++ +++static pthread_mutex_t m; +++static pthread_barrier_t b; +++ +++ +++static void * +++tf (void *arg) +++{ +++ int e = pthread_mutex_unlock (&m); +++ if (e == 0) +++ { +++ puts ("child: 1st mutex_unlock succeeded"); +++ exit (1); +++ } +++ else if (e != EPERM) +++ { +++ puts ("child: 1st mutex_unlock error != EPERM"); +++ exit (1); +++ } +++ +++ e = pthread_mutex_trylock (&m); +++ if (e == 0) +++ { +++ puts ("child: 1st trylock suceeded"); +++ exit (1); +++ } +++ if (e != EBUSY) +++ { +++ puts ("child: 1st trylock didn't return EBUSY"); +++ exit (1); +++ } +++ +++ e = pthread_barrier_wait (&b); +++ if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("child: 1st barrier_wait failed"); +++ exit (1); +++ } +++ +++ e = pthread_barrier_wait (&b); +++ if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("child: 2nd barrier_wait failed"); +++ exit (1); +++ } +++ +++ e = pthread_mutex_unlock (&m); +++ if (e == 0) +++ { +++ puts ("child: 2nd mutex_unlock succeeded"); +++ exit (1); +++ } +++ else if (e != EPERM) +++ { +++ puts ("child: 2nd mutex_unlock error != EPERM"); +++ exit (1); +++ } +++ +++ if (pthread_mutex_trylock (&m) != 0) +++ { +++ puts ("child: 2nd trylock failed"); +++ exit (1); +++ } +++ +++ if (pthread_mutex_unlock (&m) != 0) +++ { +++ puts ("child: 3rd mutex_unlock failed"); +++ exit (1); +++ } +++ +++ return NULL; +++} +++ +++ +++static int +++do_test (void) +++{ +++ pthread_mutexattr_t a; +++ int e; +++ +++ if (pthread_mutexattr_init (&a) != 0) +++ { +++ puts ("mutexattr_init failed"); +++ return 1; +++ } +++ +++ if (pthread_mutexattr_settype (&a, PTHREAD_MUTEX_ERRORCHECK) != 0) +++ { +++ puts ("mutexattr_settype failed"); +++ return 1; +++ } +++ +++#ifdef ENABLE_PI +++ if (pthread_mutexattr_setprotocol (&a, PTHREAD_PRIO_INHERIT) != 0) +++ { +++ puts ("pthread_mutexattr_setprotocol failed"); +++ return 1; +++ } +++#endif +++ +++ e = pthread_mutex_init (&m, &a); +++ if (e != 0) +++ { +++#ifdef ENABLE_PI +++ if (e == ENOTSUP) +++ { +++ puts ("PI mutexes unsupported"); +++ return 0; +++ } +++#endif +++ puts ("mutex_init failed"); +++ return 1; +++ } +++ +++ if (pthread_barrier_init (&b, NULL, 2) != 0) +++ { +++ puts ("barrier_init failed"); +++ return 1; +++ } +++ +++ e = pthread_mutex_unlock (&m); +++ if (e == 0) +++ { +++ puts ("1st mutex_unlock succeeded"); +++ return 1; +++ } +++ else if (e != EPERM) +++ { +++ puts ("1st mutex_unlock error != EPERM"); +++ return 1; +++ } +++ +++ if (pthread_mutex_lock (&m) != 0) +++ { +++ puts ("mutex_lock failed"); +++ return 1; +++ } +++ +++ e = pthread_mutex_lock (&m); +++ if (e == 0) +++ { +++ puts ("2nd mutex_lock succeeded"); +++ return 1; +++ } +++ else if (e != EDEADLK) +++ { +++ puts ("2nd mutex_lock error != EDEADLK"); +++ return 1; +++ } +++ +++ pthread_t th; +++ if (pthread_create (&th, NULL, tf, NULL) != 0) +++ { +++ puts ("create failed"); +++ return 1; +++ } +++ +++ e = pthread_barrier_wait (&b); +++ if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("1st barrier_wait failed"); +++ return 1; +++ } +++ +++ if (pthread_mutex_unlock (&m) != 0) +++ { +++ puts ("2nd mutex_unlock failed"); +++ return 1; +++ } +++ +++ e = pthread_mutex_unlock (&m); +++ if (e == 0) +++ { +++ puts ("3rd mutex_unlock succeeded"); +++ return 1; +++ } +++ else if (e != EPERM) +++ { +++ puts ("3rd mutex_unlock error != EPERM"); +++ return 1; +++ } +++ +++ e = pthread_barrier_wait (&b); +++ if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("2nd barrier_wait failed"); +++ return 1; +++ } +++ +++ if (pthread_join (th, NULL) != 0) +++ { +++ puts ("join failed"); +++ return 1; +++ } +++ +++ if (pthread_mutex_destroy (&m) != 0) +++ { +++ puts ("mutex_destroy failed"); +++ return 1; +++ } +++ +++ if (pthread_barrier_destroy (&b) != 0) +++ { +++ puts ("barrier_destroy failed"); +++ return 1; +++ } +++ +++ if (pthread_mutexattr_destroy (&a) != 0) +++ { +++ puts ("mutexattr_destroy failed"); +++ return 1; +++ } +++ +++ return 0; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-mutex3.c ++@@ -0,0 +1,241 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++ +++ +++static pthread_mutex_t m; +++static pthread_barrier_t b; +++ +++ +++static void * +++tf (void *arg) +++{ +++ int e = pthread_mutex_unlock (&m); +++ if (e == 0) +++ { +++ puts ("1st mutex_unlock in child succeeded"); +++ exit (1); +++ } +++ if (e != EPERM) +++ { +++ puts ("1st mutex_unlock in child didn't return EPERM"); +++ exit (1); +++ } +++ +++ e = pthread_mutex_trylock (&m); +++ if (e == 0) +++ { +++ puts ("mutex_trylock in second thread succeeded"); +++ exit (1); +++ } +++ if (e != EBUSY) +++ { +++ puts ("mutex_trylock returned wrong value"); +++ exit (1); +++ } +++ +++ e = pthread_barrier_wait (&b); +++ if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("barrier_wait failed"); +++ exit (1); +++ } +++ +++ e = pthread_barrier_wait (&b); +++ if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("barrier_wait failed"); +++ exit (1); +++ } +++ +++ e = pthread_mutex_unlock (&m); +++ if (e == 0) +++ { +++ puts ("2nd mutex_unlock in child succeeded"); +++ exit (1); +++ } +++ if (e != EPERM) +++ { +++ puts ("2nd mutex_unlock in child didn't return EPERM"); +++ exit (1); +++ } +++ +++ if (pthread_mutex_trylock (&m) != 0) +++ { +++ puts ("2nd mutex_trylock in second thread failed"); +++ exit (1); +++ } +++ +++ if (pthread_mutex_unlock (&m) != 0) +++ { +++ puts ("3rd mutex_unlock in second thread failed"); +++ exit (1); +++ } +++ +++ return NULL; +++} +++ +++ +++static int +++do_test (void) +++{ +++ pthread_mutexattr_t a; +++ +++ if (pthread_mutexattr_init (&a) != 0) +++ { +++ puts ("mutexattr_init failed"); +++ return 1; +++ } +++ +++ if (pthread_mutexattr_settype (&a, PTHREAD_MUTEX_RECURSIVE) != 0) +++ { +++ puts ("mutexattr_settype failed"); +++ return 1; +++ } +++ +++#ifdef ENABLE_PI +++ if (pthread_mutexattr_setprotocol (&a, PTHREAD_PRIO_INHERIT) != 0) +++ { +++ puts ("pthread_mutexattr_setprotocol failed"); +++ return 1; +++ } +++#endif +++ +++ int e; +++ e = pthread_mutex_init (&m, &a); +++ if (e != 0) +++ { +++#ifdef ENABLE_PI +++ if (e == ENOTSUP) +++ { +++ puts ("PI mutexes unsupported"); +++ return 0; +++ } +++#endif +++ puts ("mutex_init failed"); +++ return 1; +++ } +++ +++ if (pthread_barrier_init (&b, NULL, 2) != 0) +++ { +++ puts ("barrier_init failed"); +++ return 1; +++ } +++ +++ if (pthread_mutex_lock (&m) != 0) +++ { +++ puts ("mutex_lock failed"); +++ return 1; +++ } +++ +++ if (pthread_mutex_lock (&m) != 0) +++ { +++ puts ("2nd mutex_lock failed"); +++ return 1; +++ } +++ +++ if (pthread_mutex_trylock (&m) != 0) +++ { +++ puts ("1st trylock failed"); +++ return 1; +++ } +++ +++ if (pthread_mutex_unlock (&m) != 0) +++ { +++ puts ("mutex_unlock failed"); +++ return 1; +++ } +++ +++ if (pthread_mutex_unlock (&m) != 0) +++ { +++ puts ("2nd mutex_unlock failed"); +++ return 1; +++ } +++ +++ pthread_t th; +++ if (pthread_create (&th, NULL, tf, NULL) != 0) +++ { +++ puts ("create failed"); +++ return 1; +++ } +++ +++ e = pthread_barrier_wait (&b); +++ if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("barrier_wait failed"); +++ return 1; +++ } +++ +++ if (pthread_mutex_unlock (&m) != 0) +++ { +++ puts ("3rd mutex_unlock failed"); +++ return 1; +++ } +++ +++ e = pthread_mutex_unlock (&m); +++ if (e == 0) +++ { +++ puts ("4th mutex_unlock succeeded"); +++ return 1; +++ } +++ if (e != EPERM) +++ { +++ puts ("4th mutex_unlock didn't return EPERM"); +++ return 1; +++ } +++ +++ e = pthread_barrier_wait (&b); +++ if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("barrier_wait failed"); +++ return 1; +++ } +++ +++ if (pthread_join (th, NULL) != 0) +++ { +++ puts ("join failed"); +++ return 1; +++ } +++ +++ if (pthread_barrier_destroy (&b) != 0) +++ { +++ puts ("barrier_destroy failed"); +++ return 1; +++ } +++ +++ if (pthread_mutex_destroy (&m) != 0) +++ { +++ puts ("mutex_destroy failed"); +++ return 1; +++ } +++ +++ if (pthread_mutexattr_destroy (&a) != 0) +++ { +++ puts ("mutexattr_destroy failed"); +++ return 1; +++ } +++ +++ return 0; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-mutex4.c ++@@ -0,0 +1,277 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++static int +++do_test (void) +++{ +++ size_t ps = sysconf (_SC_PAGESIZE); +++ char tmpfname[] = "/tmp/tst-mutex4.XXXXXX"; +++ char data[ps]; +++ void *mem; +++ int fd; +++ pthread_mutex_t *m; +++ pthread_mutexattr_t a; +++ pid_t pid; +++ char *p; +++ int err; +++ int s; +++ pthread_barrier_t *b; +++ pthread_barrierattr_t ba; +++ +++ fd = mkstemp (tmpfname); +++ if (fd == -1) +++ { +++ printf ("cannot open temporary file: %m\n"); +++ return 1; +++ } +++ +++ /* Make sure it is always removed. */ +++ unlink (tmpfname); +++ +++ /* Create one page of data. */ +++ memset (data, '\0', ps); +++ +++ /* Write the data to the file. */ +++ if (write (fd, data, ps) != (ssize_t) ps) +++ { +++ puts ("short write"); +++ return 1; +++ } +++ +++ mem = mmap (NULL, ps, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); +++ if (mem == MAP_FAILED) +++ { +++ printf ("mmap failed: %m\n"); +++ return 1; +++ } +++ +++ m = (pthread_mutex_t *) (((uintptr_t) mem + __alignof (pthread_mutex_t) - 1) +++ & ~(__alignof (pthread_mutex_t) - 1)); +++ b = (pthread_barrier_t *) (((uintptr_t) (m + 1) +++ + __alignof (pthread_barrier_t) - 1) +++ & ~(__alignof (pthread_barrier_t) - 1)); +++ p = (char *) (b + 1); +++ +++ if (pthread_mutexattr_init (&a) != 0) +++ { +++ puts ("mutexattr_init failed"); +++ return 1; +++ } +++ +++ if (pthread_mutexattr_getpshared (&a, &s) != 0) +++ { +++ puts ("1st mutexattr_getpshared failed"); +++ return 1; +++ } +++ +++ if (s != PTHREAD_PROCESS_PRIVATE) +++ { +++ puts ("default pshared value wrong"); +++ return 1; +++ } +++ +++ if (pthread_mutexattr_setpshared (&a, PTHREAD_PROCESS_SHARED) != 0) +++ { +++ puts ("mutexattr_setpshared failed"); +++ return 1; +++ } +++ +++ if (pthread_mutexattr_getpshared (&a, &s) != 0) +++ { +++ puts ("2nd mutexattr_getpshared failed"); +++ return 1; +++ } +++ +++ if (s != PTHREAD_PROCESS_SHARED) +++ { +++ puts ("pshared value after setpshared call wrong"); +++ return 1; +++ } +++ +++#ifdef ENABLE_PI +++ if (pthread_mutexattr_setprotocol (&a, PTHREAD_PRIO_INHERIT) != 0) +++ { +++ puts ("pthread_mutexattr_setprotocol failed"); +++ return 1; +++ } +++#endif +++ +++ if ((err = pthread_mutex_init (m, &a)) != 0) +++ { +++#ifdef ENABLE_PI +++ if (err == ENOTSUP) +++ { +++ puts ("PI mutexes unsupported"); +++ return 0; +++ } +++#endif +++ puts ("mutex_init failed"); +++ return 1; +++ } +++ +++ if (pthread_mutex_lock (m) != 0) +++ { +++ puts ("mutex_lock failed"); +++ return 1; +++ } +++ +++ if (pthread_mutexattr_destroy (&a) != 0) +++ { +++ puts ("mutexattr_destroy failed"); +++ return 1; +++ } +++ +++ if (pthread_barrierattr_init (&ba) != 0) +++ { +++ puts ("barrierattr_init failed"); +++ return 1; +++ } +++ +++ if (pthread_barrierattr_setpshared (&ba, PTHREAD_PROCESS_SHARED) != 0) +++ { +++ puts ("barrierattr_setpshared failed"); +++ return 1; +++ } +++ +++ if (pthread_barrier_init (b, &ba, 2) != 0) +++ { +++ puts ("barrier_init failed"); +++ return 1; +++ } +++ +++ if (pthread_barrierattr_destroy (&ba) != 0) +++ { +++ puts ("barrierattr_destroy failed"); +++ return 1; +++ } +++ +++ err = pthread_mutex_trylock (m); +++ if (err == 0) +++ { +++ puts ("mutex_trylock succeeded"); +++ return 1; +++ } +++ else if (err != EBUSY) +++ { +++ puts ("mutex_trylock didn't return EBUSY"); +++ return 1; +++ } +++ +++ *p = 0; +++ +++ if (pthread_mutex_unlock (m) != 0) +++ { +++ puts ("parent: 1st mutex_unlock failed"); +++ return 1; +++ } +++ +++ puts ("going to fork now"); +++ pid = fork (); +++ if (pid == -1) +++ { +++ puts ("fork failed"); +++ return 1; +++ } +++ else if (pid == 0) +++ { +++ if (pthread_mutex_lock (m) != 0) +++ { +++ puts ("child: mutex_lock failed"); +++ return 1; +++ } +++ +++ int e = pthread_barrier_wait (b); +++ if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("child: barrier_wait failed"); +++ return 1; +++ } +++ +++ if ((*p)++ != 0) +++ { +++ puts ("child: *p != 0"); +++ return 1; +++ } +++ +++ if (pthread_mutex_unlock (m) != 0) +++ { +++ puts ("child: mutex_unlock failed"); +++ return 1; +++ } +++ +++ puts ("child done"); +++ } +++ else +++ { +++ int e = pthread_barrier_wait (b); +++ if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("parent: barrier_wait failed"); +++ return 1; +++ } +++ +++ if (pthread_mutex_lock (m) != 0) +++ { +++ puts ("parent: 2nd mutex_lock failed"); +++ return 1; +++ } +++ +++ if (*p != 1) +++ { +++ puts ("*p != 1"); +++ return 1; +++ } +++ +++ if (pthread_mutex_unlock (m) != 0) +++ { +++ puts ("parent: 2nd mutex_unlock failed"); +++ return 1; +++ } +++ +++ if (pthread_mutex_destroy (m) != 0) +++ { +++ puts ("mutex_destroy failed"); +++ return 1; +++ } +++ +++ if (pthread_barrier_destroy (b) != 0) +++ { +++ puts ("barrier_destroy failed"); +++ return 1; +++ } +++ +++ puts ("parent done"); +++ } +++ +++ return 0; +++} +++ +++#define TIMEOUT 4 +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-mutex5.c ++@@ -0,0 +1,201 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++#ifndef TYPE +++# define TYPE PTHREAD_MUTEX_NORMAL +++#endif +++ +++ +++static int +++do_test (void) +++{ +++ pthread_mutex_t m; +++ struct timespec ts; +++ struct timeval tv; +++ struct timeval tv2; +++ int err; +++ pthread_mutexattr_t a; +++ +++ if (pthread_mutexattr_init (&a) != 0) +++ { +++ puts ("mutexattr_init failed"); +++ return 1; +++ } +++ +++ if (pthread_mutexattr_settype (&a, TYPE) != 0) +++ { +++ puts ("mutexattr_settype failed"); +++ return 1; +++ } +++ +++#ifdef ENABLE_PI +++ if (pthread_mutexattr_setprotocol (&a, PTHREAD_PRIO_INHERIT) != 0) +++ { +++ puts ("pthread_mutexattr_setprotocol failed"); +++ return 1; +++ } +++#endif +++ +++ err = pthread_mutex_init (&m, &a); +++ if (err != 0) +++ { +++#ifdef ENABLE_PI +++ if (err == ENOTSUP) +++ { +++ puts ("PI mutexes unsupported"); +++ return 0; +++ } +++#endif +++ puts ("mutex_init failed"); +++ return 1; +++ } +++ +++ if (pthread_mutexattr_destroy (&a) != 0) +++ { +++ puts ("mutexattr_destroy failed"); +++ return 1; +++ } +++ +++ if (pthread_mutex_lock (&m) != 0) +++ { +++ puts ("mutex_lock failed"); +++ return 1; +++ } +++ +++ if (pthread_mutex_trylock (&m) == 0) +++ { +++ puts ("mutex_trylock succeeded"); +++ return 1; +++ } +++ +++ gettimeofday (&tv, NULL); +++ TIMEVAL_TO_TIMESPEC (&tv, &ts); +++ +++ ts.tv_sec += 2; /* Wait 2 seconds. */ +++ +++ err = pthread_mutex_timedlock (&m, &ts); +++ if (err == 0) +++ { +++ puts ("timedlock succeeded"); +++ return 1; +++ } +++ else if (err != ETIMEDOUT) +++ { +++ printf ("timedlock error != ETIMEDOUT: %d\n", err); +++ return 1; +++ } +++ else +++ { +++ int clk_tck = sysconf (_SC_CLK_TCK); +++ +++ gettimeofday (&tv2, NULL); +++ +++ tv2.tv_sec -= tv.tv_sec; +++ tv2.tv_usec -= tv.tv_usec; +++ if (tv2.tv_usec < 0) +++ { +++ tv2.tv_usec += 1000000; +++ tv2.tv_sec -= 1; +++ } +++ +++ /* Be a bit tolerant, add one CLK_TCK. */ +++ tv2.tv_usec += 1000000 / clk_tck; +++ if (tv2.tv_usec >= 1000000) +++ { +++ tv2.tv_usec -= 1000000; +++ ++tv2.tv_sec; +++ } +++ +++ if (tv2.tv_sec < 2) +++ { +++ printf ("premature timeout: %ld.%06ld difference\n", +++ tv2.tv_sec, tv2.tv_usec); +++ return 1; +++ } +++ } +++ +++ (void) gettimeofday (&tv, NULL); +++ TIMEVAL_TO_TIMESPEC (&tv, &ts); +++ +++ ts.tv_sec += 2; /* Wait 2 seconds. */ +++ /* The following makes the ts value invalid. */ +++ ts.tv_nsec += 1000000000; +++ +++ err = pthread_mutex_timedlock (&m, &ts); +++ if (err == 0) +++ { +++ puts ("2nd timedlock succeeded"); +++ return 1; +++ } +++ else if (err != EINVAL) +++ { +++ printf ("2nd timedlock error != EINVAL: %d\n", err); +++ return 1; +++ } +++ +++ if (pthread_mutex_unlock (&m) != 0) +++ { +++ puts ("mutex_unlock failed"); +++ return 1; +++ } +++ +++ (void) gettimeofday (&tv, NULL); +++ TIMEVAL_TO_TIMESPEC (&tv, &ts); +++ +++ ts.tv_sec += 2; /* Wait 2 seconds. */ +++ if (pthread_mutex_timedlock (&m, &ts) != 0) +++ { +++ puts ("3rd timedlock failed"); +++ } +++ +++ (void) gettimeofday (&tv2, NULL); +++ +++ /* Check that timedlock didn't delay. We use a limit of 0.1 secs. */ +++ timersub (&tv2, &tv, &tv2); +++ if (tv2.tv_sec > 0 || tv2.tv_usec > 100000) +++ { +++ puts ("3rd timedlock didn't return right away"); +++ return 1; +++ } +++ +++ if (pthread_mutex_unlock (&m) != 0) +++ { +++ puts ("final mutex_unlock failed"); +++ return 1; +++ } +++ +++ if (pthread_mutex_destroy (&m) != 0) +++ { +++ puts ("mutex_destroy failed"); +++ return 1; +++ } +++ +++ return 0; +++} +++ +++#define TIMEOUT 4 +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-mutex5a.c ++@@ -0,0 +1,2 @@ +++#define TYPE PTHREAD_MUTEX_ADAPTIVE_NP +++#include "tst-mutex5.c" ++--- /dev/null +++++ b/fbtl/tst-mutex6.c ++@@ -0,0 +1,72 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++ +++#ifndef TEST_FUNCTION +++static int do_test (void); +++# define TEST_FUNCTION do_test () +++#endif +++#include "../test-skeleton.c" +++ +++#ifndef ATTR +++pthread_mutexattr_t *attr; +++# define ATTR attr +++#endif +++ +++ +++static int +++do_test (void) +++{ +++ pthread_mutex_t m; +++ +++ int e = pthread_mutex_init (&m, ATTR); +++ if (ATTR != NULL && e == ENOTSUP) +++ { +++ puts ("cannot support selected type of mutexes"); +++ e = pthread_mutex_init (&m, NULL); +++ } +++ if (e != 0) +++ { +++ puts ("mutex_init failed"); +++ return 1; +++ } +++ +++ if (ATTR != NULL && pthread_mutexattr_destroy (ATTR) != 0) +++ { +++ puts ("mutexattr_destroy failed"); +++ return 1; +++ } +++ +++ if (pthread_mutex_lock (&m) != 0) +++ { +++ puts ("1st mutex_lock failed"); +++ return 1; +++ } +++ +++ delayed_exit (1); +++ /* This call should never return. */ +++ xpthread_mutex_lock (&m); +++ +++ puts ("2nd mutex_lock returned"); +++ return 1; +++} ++--- /dev/null +++++ b/fbtl/tst-mutex7.c ++@@ -0,0 +1,164 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++ +++ +++#ifndef TYPE +++# define TYPE PTHREAD_MUTEX_DEFAULT +++#endif +++ +++ +++static pthread_mutex_t lock; +++ +++ +++#define ROUNDS 1000 +++#define N 100 +++ +++ +++static void * +++tf (void *arg) +++{ +++ int nr = (long int) arg; +++ int cnt; +++ struct timespec ts = { .tv_sec = 0, .tv_nsec = 11000 }; +++ +++ for (cnt = 0; cnt < ROUNDS; ++cnt) +++ { +++ if (pthread_mutex_lock (&lock) != 0) +++ { +++ printf ("thread %d: failed to get the lock\n", nr); +++ return (void *) 1l; +++ } +++ +++ if (pthread_mutex_unlock (&lock) != 0) +++ { +++ printf ("thread %d: failed to release the lock\n", nr); +++ return (void *) 1l; +++ } +++ +++ nanosleep (&ts, NULL); +++ } +++ +++ return NULL; +++} +++ +++ +++static int +++do_test (void) +++{ +++ pthread_mutexattr_t a; +++ +++ if (pthread_mutexattr_init (&a) != 0) +++ { +++ puts ("mutexattr_init failed"); +++ exit (1); +++ } +++ +++ if (pthread_mutexattr_settype (&a, TYPE) != 0) +++ { +++ puts ("mutexattr_settype failed"); +++ exit (1); +++ } +++ +++#ifdef ENABLE_PI +++ if (pthread_mutexattr_setprotocol (&a, PTHREAD_PRIO_INHERIT) != 0) +++ { +++ puts ("pthread_mutexattr_setprotocol failed"); +++ return 1; +++ } +++#endif +++ +++ int e = pthread_mutex_init (&lock, &a); +++ if (e != 0) +++ { +++#ifdef ENABLE_PI +++ if (e == ENOTSUP) +++ { +++ puts ("PI mutexes unsupported"); +++ return 0; +++ } +++#endif +++ puts ("mutex_init failed"); +++ return 1; +++ } +++ +++ if (pthread_mutexattr_destroy (&a) != 0) +++ { +++ puts ("mutexattr_destroy failed"); +++ return 1; +++ } +++ +++ pthread_attr_t at; +++ pthread_t th[N]; +++ int cnt; +++ +++ if (pthread_attr_init (&at) != 0) +++ { +++ puts ("attr_init failed"); +++ return 1; +++ } +++ +++ if (pthread_attr_setstacksize (&at, 1 * 1024 * 1024) != 0) +++ { +++ puts ("attr_setstacksize failed"); +++ return 1; +++ } +++ +++ if (pthread_mutex_lock (&lock) != 0) +++ { +++ puts ("locking in parent failed"); +++ return 1; +++ } +++ +++ for (cnt = 0; cnt < N; ++cnt) +++ if (pthread_create (&th[cnt], &at, tf, (void *) (long int) cnt) != 0) +++ { +++ printf ("creating thread %d failed\n", cnt); +++ return 1; +++ } +++ +++ if (pthread_attr_destroy (&at) != 0) +++ { +++ puts ("attr_destroy failed"); +++ return 1; +++ } +++ +++ if (pthread_mutex_unlock (&lock) != 0) +++ { +++ puts ("unlocking in parent failed"); +++ return 1; +++ } +++ +++ for (cnt = 0; cnt < N; ++cnt) +++ if (pthread_join (th[cnt], NULL) != 0) +++ { +++ printf ("joining thread %d failed\n", cnt); +++ return 1; +++ } +++ +++ return 0; +++} +++ +++#define TIMEOUT 60 +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-mutex7a.c ++@@ -0,0 +1,2 @@ +++#define TYPE PTHREAD_MUTEX_ADAPTIVE_NP +++#include "tst-mutex7.c" ++--- /dev/null +++++ b/fbtl/tst-mutex8-static.c ++@@ -0,0 +1 @@ +++#include "tst-mutex8.c" ++--- /dev/null +++++ b/fbtl/tst-mutex8.c ++@@ -0,0 +1,380 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++/* This test checks behavior not required by POSIX. */ +++#include +++#include +++#include +++#include +++#include +++ +++ +++static pthread_mutex_t *m; +++static pthread_barrier_t b; +++static pthread_cond_t c; +++static bool done; +++ +++ +++static void +++cl (void *arg) +++{ +++ if (pthread_mutex_unlock (m) != 0) +++ { +++ puts ("cl: mutex_unlocked failed"); +++ exit (1); +++ } +++} +++ +++ +++static void * +++tf (void *arg) +++{ +++ if (pthread_mutex_lock (m) != 0) +++ { +++ puts ("tf: mutex_lock failed"); +++ return (void *) 1l; +++ } +++ +++ int e = pthread_barrier_wait (&b); +++ if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("barrier_wait failed"); +++ return (void *) 1l; +++ } +++ +++ if (arg == NULL) +++ do +++ if (pthread_cond_wait (&c, m) != 0) +++ { +++ puts ("tf: cond_wait failed"); +++ return (void *) 1l; +++ } +++ while (! done); +++ else +++ do +++ { +++ pthread_cleanup_push (cl, NULL); +++ +++ if (pthread_cond_wait (&c, m) != 0) +++ { +++ puts ("tf: cond_wait failed"); +++ return (void *) 1l; +++ } +++ +++ pthread_cleanup_pop (0); +++ } +++ while (! done); +++ +++ if (pthread_mutex_unlock (m) != 0) +++ { +++ puts ("tf: mutex_unlock failed"); +++ return (void *) 1l; +++ } +++ +++ return NULL; +++} +++ +++ +++static int +++check_type (const char *mas, pthread_mutexattr_t *ma) +++{ +++ if (pthread_mutex_init (m, ma) != 0) +++ { +++ printf ("1st mutex_init failed for %s\n", mas); +++ return 1; +++ } +++ +++ if (pthread_mutex_destroy (m) != 0) +++ { +++ printf ("immediate mutex_destroy failed for %s\n", mas); +++ return 1; +++ } +++ +++ if (pthread_mutex_init (m, ma) != 0) +++ { +++ printf ("2nd mutex_init failed for %s\n", mas); +++ return 1; +++ } +++ +++ if (pthread_mutex_lock (m) != 0) +++ { +++ printf ("1st mutex_lock failed for %s\n", mas); +++ return 1; +++ } +++ +++ int e = pthread_mutex_destroy (m); +++ if (e == 0) +++ { +++ printf ("mutex_destroy of self-locked mutex succeeded for %s\n", mas); +++ return 1; +++ } +++ if (e != EBUSY) +++ { +++ printf ("mutex_destroy of self-locked mutex did not return EBUSY %s\n", +++ mas); +++ return 1; +++ } +++ +++ if (pthread_mutex_unlock (m) != 0) +++ { +++ printf ("1st mutex_unlock failed for %s\n", mas); +++ return 1; +++ } +++ +++ if (pthread_mutex_trylock (m) != 0) +++ { +++ printf ("mutex_trylock failed for %s\n", mas); +++ return 1; +++ } +++ +++ e = pthread_mutex_destroy (m); +++ if (e == 0) +++ { +++ printf ("mutex_destroy of self-trylocked mutex succeeded for %s\n", mas); +++ return 1; +++ } +++ if (e != EBUSY) +++ { +++ printf ("\ +++mutex_destroy of self-trylocked mutex did not return EBUSY %s\n", +++ mas); +++ return 1; +++ } +++ +++ if (pthread_mutex_unlock (m) != 0) +++ { +++ printf ("2nd mutex_unlock failed for %s\n", mas); +++ return 1; +++ } +++ +++ pthread_t th; +++ if (pthread_create (&th, NULL, tf, NULL) != 0) +++ { +++ puts ("1st create failed"); +++ return 1; +++ } +++ done = false; +++ +++ e = pthread_barrier_wait (&b); +++ if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("1st barrier_wait failed"); +++ return 1; +++ } +++ +++ if (pthread_mutex_lock (m) != 0) +++ { +++ printf ("2nd mutex_lock failed for %s\n", mas); +++ return 1; +++ } +++ +++ if (pthread_mutex_unlock (m) != 0) +++ { +++ printf ("3rd mutex_unlock failed for %s\n", mas); +++ return 1; +++ } +++ +++ e = pthread_mutex_destroy (m); +++ if (e == 0) +++ { +++ printf ("mutex_destroy of condvar-used mutex succeeded for %s\n", mas); +++ return 1; +++ } +++ if (e != EBUSY) +++ { +++ printf ("\ +++mutex_destroy of condvar-used mutex did not return EBUSY for %s\n", mas); +++ return 1; +++ } +++ +++ done = true; +++ if (pthread_cond_signal (&c) != 0) +++ { +++ puts ("cond_signal failed"); +++ return 1; +++ } +++ +++ void *r; +++ if (pthread_join (th, &r) != 0) +++ { +++ puts ("join failed"); +++ return 1; +++ } +++ if (r != NULL) +++ { +++ puts ("thread didn't return NULL"); +++ return 1; +++ } +++ +++ if (pthread_mutex_destroy (m) != 0) +++ { +++ printf ("mutex_destroy after condvar-use failed for %s\n", mas); +++ return 1; +++ } +++ +++ if (pthread_mutex_init (m, ma) != 0) +++ { +++ printf ("3rd mutex_init failed for %s\n", mas); +++ return 1; +++ } +++ +++ if (pthread_create (&th, NULL, tf, (void *) 1) != 0) +++ { +++ puts ("2nd create failed"); +++ return 1; +++ } +++ done = false; +++ +++ e = pthread_barrier_wait (&b); +++ if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("2nd barrier_wait failed"); +++ return 1; +++ } +++ +++ if (pthread_mutex_lock (m) != 0) +++ { +++ printf ("3rd mutex_lock failed for %s\n", mas); +++ return 1; +++ } +++ +++ if (pthread_mutex_unlock (m) != 0) +++ { +++ printf ("4th mutex_unlock failed for %s\n", mas); +++ return 1; +++ } +++ +++ e = pthread_mutex_destroy (m); +++ if (e == 0) +++ { +++ printf ("2nd mutex_destroy of condvar-used mutex succeeded for %s\n", +++ mas); +++ return 1; +++ } +++ if (e != EBUSY) +++ { +++ printf ("\ +++2nd mutex_destroy of condvar-used mutex did not return EBUSY for %s\n", +++ mas); +++ return 1; +++ } +++ +++ if (pthread_cancel (th) != 0) +++ { +++ puts ("cond_cancel failed"); +++ return 1; +++ } +++ +++ if (pthread_join (th, &r) != 0) +++ { +++ puts ("join failed"); +++ return 1; +++ } +++ if (r != PTHREAD_CANCELED) +++ { +++ puts ("thread not canceled"); +++ return 1; +++ } +++ +++ if (pthread_mutex_destroy (m) != 0) +++ { +++ printf ("mutex_destroy after condvar-canceled failed for %s\n", mas); +++ return 1; +++ } +++ +++ return 0; +++} +++ +++ +++static int +++do_test (void) +++{ +++ pthread_mutex_t mm; +++ m = &mm; +++ +++ if (pthread_barrier_init (&b, NULL, 2) != 0) +++ { +++ puts ("barrier_init failed"); +++ return 1; +++ } +++ +++ if (pthread_cond_init (&c, NULL) != 0) +++ { +++ puts ("cond_init failed"); +++ return 1; +++ } +++ +++ puts ("check normal mutex"); +++ int res = check_type ("normal", NULL); +++ +++ pthread_mutexattr_t ma; +++ if (pthread_mutexattr_init (&ma) != 0) +++ { +++ puts ("1st mutexattr_init failed"); +++ return 1; +++ } +++ if (pthread_mutexattr_settype (&ma, PTHREAD_MUTEX_RECURSIVE) != 0) +++ { +++ puts ("1st mutexattr_settype failed"); +++ return 1; +++ } +++#ifdef ENABLE_PI +++ if (pthread_mutexattr_setprotocol (&ma, PTHREAD_PRIO_INHERIT)) +++ { +++ puts ("1st pthread_mutexattr_setprotocol failed"); +++ return 1; +++ } +++#endif +++ puts ("check recursive mutex"); +++ res |= check_type ("recursive", &ma); +++ if (pthread_mutexattr_destroy (&ma) != 0) +++ { +++ puts ("1st mutexattr_destroy failed"); +++ return 1; +++ } +++ +++ if (pthread_mutexattr_init (&ma) != 0) +++ { +++ puts ("2nd mutexattr_init failed"); +++ return 1; +++ } +++ if (pthread_mutexattr_settype (&ma, PTHREAD_MUTEX_ERRORCHECK) != 0) +++ { +++ puts ("2nd mutexattr_settype failed"); +++ return 1; +++ } +++#ifdef ENABLE_PI +++ if (pthread_mutexattr_setprotocol (&ma, PTHREAD_PRIO_INHERIT)) +++ { +++ puts ("2nd pthread_mutexattr_setprotocol failed"); +++ return 1; +++ } +++#endif +++ puts ("check error-checking mutex"); +++ res |= check_type ("error-checking", &ma); +++ if (pthread_mutexattr_destroy (&ma) != 0) +++ { +++ puts ("2nd mutexattr_destroy failed"); +++ return 1; +++ } +++ +++ return res; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-mutex9.c ++@@ -0,0 +1,202 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++static int +++do_test (void) +++{ +++ size_t ps = sysconf (_SC_PAGESIZE); +++ char tmpfname[] = "/tmp/tst-mutex9.XXXXXX"; +++ char data[ps]; +++ void *mem; +++ int fd; +++ pthread_mutex_t *m; +++ pthread_mutexattr_t a; +++ pid_t pid; +++ +++ fd = mkstemp (tmpfname); +++ if (fd == -1) +++ { +++ printf ("cannot open temporary file: %m\n"); +++ return 1; +++ } +++ +++ /* Make sure it is always removed. */ +++ unlink (tmpfname); +++ +++ /* Create one page of data. */ +++ memset (data, '\0', ps); +++ +++ /* Write the data to the file. */ +++ if (write (fd, data, ps) != (ssize_t) ps) +++ { +++ puts ("short write"); +++ return 1; +++ } +++ +++ mem = mmap (NULL, ps, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); +++ if (mem == MAP_FAILED) +++ { +++ printf ("mmap failed: %m\n"); +++ return 1; +++ } +++ +++ m = (pthread_mutex_t *) (((uintptr_t) mem + __alignof (pthread_mutex_t)) +++ & ~(__alignof (pthread_mutex_t) - 1)); +++ +++ if (pthread_mutexattr_init (&a) != 0) +++ { +++ puts ("mutexattr_init failed"); +++ return 1; +++ } +++ +++ if (pthread_mutexattr_setpshared (&a, PTHREAD_PROCESS_SHARED) != 0) +++ { +++ puts ("mutexattr_setpshared failed"); +++ return 1; +++ } +++ +++ if (pthread_mutexattr_settype (&a, PTHREAD_MUTEX_RECURSIVE) != 0) +++ { +++ puts ("mutexattr_settype failed"); +++ return 1; +++ } +++ +++#ifdef ENABLE_PI +++ if (pthread_mutexattr_setprotocol (&a, PTHREAD_PRIO_INHERIT) != 0) +++ { +++ puts ("pthread_mutexattr_setprotocol failed"); +++ return 1; +++ } +++#endif +++ +++ int e; +++ if ((e = pthread_mutex_init (m, &a)) != 0) +++ { +++#ifdef ENABLE_PI +++ if (e == ENOTSUP) +++ { +++ puts ("PI mutexes unsupported"); +++ return 0; +++ } +++#endif +++ puts ("mutex_init failed"); +++ return 1; +++ } +++ +++ if (pthread_mutex_lock (m) != 0) +++ { +++ puts ("mutex_lock failed"); +++ return 1; +++ } +++ +++ if (pthread_mutexattr_destroy (&a) != 0) +++ { +++ puts ("mutexattr_destroy failed"); +++ return 1; +++ } +++ +++ puts ("going to fork now"); +++ pid = fork (); +++ if (pid == -1) +++ { +++ puts ("fork failed"); +++ return 1; +++ } +++ else if (pid == 0) +++ { +++ if (pthread_mutex_trylock (m) == 0) +++ { +++ puts ("child: mutex_trylock succeeded"); +++ exit (1); +++ } +++ +++ if (pthread_mutex_unlock (m) == 0) +++ { +++ puts ("child: mutex_unlock succeeded"); +++ exit (1); +++ } +++ +++ struct timeval tv; +++ gettimeofday (&tv, NULL); +++ struct timespec ts; +++ TIMEVAL_TO_TIMESPEC (&tv, &ts); +++ ts.tv_nsec += 500000000; +++ if (ts.tv_nsec >= 1000000000) +++ { +++ ++ts.tv_sec; +++ ts.tv_nsec -= 1000000000; +++ } +++ +++ e = pthread_mutex_timedlock (m, &ts); +++ if (e == 0) +++ { +++ puts ("child: mutex_timedlock succeeded"); +++ exit (1); +++ } +++ if (e != ETIMEDOUT) +++ { +++ puts ("child: mutex_timedlock didn't time out"); +++ exit (1); +++ } +++ +++ alarm (1); +++ +++ pthread_mutex_lock (m); +++ +++ puts ("child: mutex_lock returned"); +++ +++ exit (0); +++ } +++ +++ sleep (2); +++ +++ int status; +++ if (TEMP_FAILURE_RETRY (waitpid (pid, &status, 0)) != pid) +++ { +++ puts ("waitpid failed"); +++ return 1; +++ } +++ if (! WIFSIGNALED (status)) +++ { +++ puts ("child not killed by signal"); +++ return 1; +++ } +++ if (WTERMSIG (status) != SIGALRM) +++ { +++ puts ("child not killed by SIGALRM"); +++ return 1; +++ } +++ +++ return 0; +++} +++ +++#define TIMEOUT 3 +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-mutexpi1.c ++@@ -0,0 +1,27 @@ +++#include +++#include +++#include +++ +++ +++static pthread_mutexattr_t a; +++ +++static void +++prepare (void) +++{ +++ if (pthread_mutexattr_init (&a) != 0) +++ { +++ puts ("mutexattr_init failed"); +++ exit (1); +++ } +++ +++ if (pthread_mutexattr_setprotocol (&a, PTHREAD_PRIO_INHERIT) != 0) +++ { +++ puts ("mutexattr_setprotocol failed"); +++ exit (1); +++ } +++} +++#define PREPARE(argc, argv) prepare () +++ +++ +++#define ATTR &a +++#include "tst-mutex1.c" ++--- /dev/null +++++ b/fbtl/tst-mutexpi2.c ++@@ -0,0 +1,2 @@ +++#define ENABLE_PI 1 +++#include "tst-mutex2.c" ++--- /dev/null +++++ b/fbtl/tst-mutexpi3.c ++@@ -0,0 +1,2 @@ +++#define ENABLE_PI 1 +++#include "tst-mutex3.c" ++--- /dev/null +++++ b/fbtl/tst-mutexpi4.c ++@@ -0,0 +1,2 @@ +++#define ENABLE_PI 1 +++#include "tst-mutex4.c" ++--- /dev/null +++++ b/fbtl/tst-mutexpi5.c ++@@ -0,0 +1,2 @@ +++#define ENABLE_PI 1 +++#include "tst-mutex5.c" ++--- /dev/null +++++ b/fbtl/tst-mutexpi5a.c ++@@ -0,0 +1,2 @@ +++#define ENABLE_PI 1 +++#include "tst-mutex5a.c" ++--- /dev/null +++++ b/fbtl/tst-mutexpi6.c ++@@ -0,0 +1,29 @@ +++#include +++#include +++#include +++ +++ +++pthread_mutexattr_t a; +++pthread_mutexattr_t *attr; +++ +++static void +++prepare (void) +++{ +++ attr = &a; +++ if (pthread_mutexattr_init (&a) != 0) +++ { +++ puts ("mutexattr_init failed"); +++ exit (1); +++ } +++ +++ if (pthread_mutexattr_setprotocol (&a, PTHREAD_PRIO_INHERIT) != 0) +++ { +++ puts ("mutexattr_setprotocol failed"); +++ exit (1); +++ } +++} +++#define PREPARE(argc, argv) prepare () +++ +++ +++#define ATTR attr +++#include "tst-mutex6.c" ++--- /dev/null +++++ b/fbtl/tst-mutexpi7.c ++@@ -0,0 +1,2 @@ +++#define ENABLE_PI 1 +++#include "tst-mutex7.c" ++--- /dev/null +++++ b/fbtl/tst-mutexpi7a.c ++@@ -0,0 +1,2 @@ +++#define ENABLE_PI 1 +++#include "tst-mutex7a.c" ++--- /dev/null +++++ b/fbtl/tst-mutexpi8-static.c ++@@ -0,0 +1 @@ +++#include "tst-mutexpi8.c" ++--- /dev/null +++++ b/fbtl/tst-mutexpi8.c ++@@ -0,0 +1,2 @@ +++#define ENABLE_PI 1 +++#include "tst-mutex8.c" ++--- /dev/null +++++ b/fbtl/tst-mutexpi9.c ++@@ -0,0 +1,2 @@ +++#define ENABLE_PI 1 +++#include "tst-mutex9.c" ++--- /dev/null +++++ b/fbtl/tst-mutexpp1.c ++@@ -0,0 +1,45 @@ +++#include +++#include +++#include +++ +++#include "tst-tpp.h" +++ +++static pthread_mutexattr_t a; +++ +++static void +++prepare (void) +++{ +++ init_tpp_test (); +++ +++ if (pthread_mutexattr_init (&a) != 0) +++ { +++ puts ("mutexattr_init failed"); +++ exit (1); +++ } +++ +++ if (pthread_mutexattr_setprotocol (&a, PTHREAD_PRIO_PROTECT) != 0) +++ { +++ puts ("mutexattr_setprotocol failed"); +++ exit (1); +++ } +++ +++ if (pthread_mutexattr_setprioceiling (&a, 6) != 0) +++ { +++ puts ("mutexattr_setprioceiling failed"); +++ exit (1); +++ } +++} +++#define PREPARE(argc, argv) prepare () +++ +++static int do_test (void); +++ +++static int +++do_test_wrapper (void) +++{ +++ init_tpp_test (); +++ return do_test (); +++} +++#define TEST_FUNCTION do_test_wrapper () +++ +++#define ATTR &a +++#include "tst-mutex1.c" ++--- /dev/null +++++ b/fbtl/tst-mutexpp10.c ++@@ -0,0 +1,333 @@ +++/* Copyright (C) 2006-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Jakub Jelinek , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++#include "tst-tpp.h" +++ +++static int +++do_test (void) +++{ +++ int ret = 0; +++ +++ init_tpp_test (); +++ +++ pthread_mutexattr_t ma; +++ if (pthread_mutexattr_init (&ma)) +++ { +++ puts ("mutexattr_init failed"); +++ return 1; +++ } +++ if (pthread_mutexattr_setprotocol (&ma, PTHREAD_PRIO_PROTECT)) +++ { +++ puts ("mutexattr_setprotocol failed"); +++ return 1; +++ } +++ +++ int prioceiling; +++ if (pthread_mutexattr_getprioceiling (&ma, &prioceiling)) +++ { +++ puts ("mutexattr_getprioceiling failed"); +++ return 1; +++ } +++ +++ if (prioceiling < fifo_min || prioceiling > fifo_max) +++ { +++ printf ("prioceiling %d not in %d..%d range\n", +++ prioceiling, fifo_min, fifo_max); +++ return 1; +++ } +++ +++ if (fifo_max < INT_MAX +++ && pthread_mutexattr_setprioceiling (&ma, fifo_max + 1) != EINVAL) +++ { +++ printf ("mutexattr_setprioceiling %d did not fail with EINVAL\n", +++ fifo_max + 1); +++ return 1; +++ } +++ +++ if (fifo_min > 0 +++ && pthread_mutexattr_setprioceiling (&ma, fifo_min - 1) != EINVAL) +++ { +++ printf ("mutexattr_setprioceiling %d did not fail with EINVAL\n", +++ fifo_min - 1); +++ return 1; +++ } +++ +++ if (pthread_mutexattr_setprioceiling (&ma, fifo_min)) +++ { +++ puts ("mutexattr_setprioceiling failed"); +++ return 1; +++ } +++ +++ if (pthread_mutexattr_setprioceiling (&ma, fifo_max)) +++ { +++ puts ("mutexattr_setprioceiling failed"); +++ return 1; +++ } +++ +++ if (pthread_mutexattr_setprioceiling (&ma, 6)) +++ { +++ puts ("mutexattr_setprioceiling failed"); +++ return 1; +++ } +++ +++ if (pthread_mutexattr_getprioceiling (&ma, &prioceiling)) +++ { +++ puts ("mutexattr_getprioceiling failed"); +++ return 1; +++ } +++ +++ if (prioceiling != 6) +++ { +++ printf ("mutexattr_getprioceiling returned %d != 6\n", +++ prioceiling); +++ return 1; +++ } +++ +++ pthread_mutex_t m1, m2, m3; +++ int e = pthread_mutex_init (&m1, &ma); +++ if (e == ENOTSUP) +++ { +++ puts ("cannot support selected type of mutexes"); +++ return 0; +++ } +++ else if (e != 0) +++ { +++ puts ("mutex_init failed"); +++ return 1; +++ } +++ +++ if (pthread_mutexattr_setprioceiling (&ma, 8)) +++ { +++ puts ("mutexattr_setprioceiling failed"); +++ return 1; +++ } +++ +++ if (pthread_mutex_init (&m2, &ma)) +++ { +++ puts ("mutex_init failed"); +++ return 1; +++ } +++ +++ if (pthread_mutexattr_setprioceiling (&ma, 5)) +++ { +++ puts ("mutexattr_setprioceiling failed"); +++ return 1; +++ } +++ +++ if (pthread_mutex_init (&m3, &ma)) +++ { +++ puts ("mutex_init failed"); +++ return 1; +++ } +++ +++ CHECK_TPP_PRIORITY (4, 4); +++ +++ if (pthread_mutex_lock (&m1) != 0) +++ { +++ puts ("mutex_lock failed"); +++ return 1; +++ } +++ +++ CHECK_TPP_PRIORITY (4, 6); +++ +++ if (pthread_mutex_trylock (&m2) != 0) +++ { +++ puts ("mutex_lock failed"); +++ return 1; +++ } +++ +++ CHECK_TPP_PRIORITY (4, 8); +++ +++ if (pthread_mutex_lock (&m3) != 0) +++ { +++ puts ("mutex_lock failed"); +++ return 1; +++ } +++ +++ CHECK_TPP_PRIORITY (4, 8); +++ +++ if (pthread_mutex_unlock (&m2) != 0) +++ { +++ puts ("mutex_unlock failed"); +++ return 1; +++ } +++ +++ CHECK_TPP_PRIORITY (4, 6); +++ +++ if (pthread_mutex_unlock (&m1) != 0) +++ { +++ puts ("mutex_unlock failed"); +++ return 1; +++ } +++ +++ CHECK_TPP_PRIORITY (4, 5); +++ +++ if (pthread_mutex_lock (&m2) != 0) +++ { +++ puts ("mutex_lock failed"); +++ return 1; +++ } +++ +++ CHECK_TPP_PRIORITY (4, 8); +++ +++ if (pthread_mutex_unlock (&m2) != 0) +++ { +++ puts ("mutex_unlock failed"); +++ return 1; +++ } +++ +++ CHECK_TPP_PRIORITY (4, 5); +++ +++ if (pthread_mutex_getprioceiling (&m1, &prioceiling)) +++ { +++ puts ("mutex_getprioceiling m1 failed"); +++ return 1; +++ } +++ else if (prioceiling != 6) +++ { +++ printf ("unexpected m1 prioceiling %d != 6\n", prioceiling); +++ return 1; +++ } +++ +++ if (pthread_mutex_getprioceiling (&m2, &prioceiling)) +++ { +++ puts ("mutex_getprioceiling m2 failed"); +++ return 1; +++ } +++ else if (prioceiling != 8) +++ { +++ printf ("unexpected m2 prioceiling %d != 8\n", prioceiling); +++ return 1; +++ } +++ +++ if (pthread_mutex_getprioceiling (&m3, &prioceiling)) +++ { +++ puts ("mutex_getprioceiling m3 failed"); +++ return 1; +++ } +++ else if (prioceiling != 5) +++ { +++ printf ("unexpected m3 prioceiling %d != 5\n", prioceiling); +++ return 1; +++ } +++ +++ if (pthread_mutex_setprioceiling (&m1, 7, &prioceiling)) +++ { +++ printf ("mutex_setprioceiling failed"); +++ return 1; +++ } +++ else if (prioceiling != 6) +++ { +++ printf ("unexpected m1 old prioceiling %d != 6\n", prioceiling); +++ return 1; +++ } +++ +++ if (pthread_mutex_getprioceiling (&m1, &prioceiling)) +++ { +++ puts ("mutex_getprioceiling m1 failed"); +++ return 1; +++ } +++ else if (prioceiling != 7) +++ { +++ printf ("unexpected m1 prioceiling %d != 7\n", prioceiling); +++ return 1; +++ } +++ +++ CHECK_TPP_PRIORITY (4, 5); +++ +++ if (pthread_mutex_unlock (&m3) != 0) +++ { +++ puts ("mutex_unlock failed"); +++ return 1; +++ } +++ +++ CHECK_TPP_PRIORITY (4, 4); +++ +++ if (pthread_mutex_trylock (&m1) != 0) +++ { +++ puts ("mutex_lock failed"); +++ return 1; +++ } +++ +++ CHECK_TPP_PRIORITY (4, 7); +++ +++ struct sched_param sp; +++ memset (&sp, 0, sizeof (sp)); +++ sp.sched_priority = 8; +++ if (pthread_setschedparam (pthread_self (), SCHED_FIFO, &sp)) +++ { +++ puts ("cannot set scheduling params"); +++ return 1; +++ } +++ +++ CHECK_TPP_PRIORITY (8, 8); +++ +++ if (pthread_mutex_unlock (&m1) != 0) +++ { +++ puts ("mutex_unlock failed"); +++ return 1; +++ } +++ +++ CHECK_TPP_PRIORITY (8, 8); +++ +++ if (pthread_mutex_lock (&m3) != EINVAL) +++ { +++ puts ("pthread_mutex_lock didn't fail with EINVAL"); +++ return 1; +++ } +++ +++ CHECK_TPP_PRIORITY (8, 8); +++ +++ if (pthread_mutex_destroy (&m1) != 0) +++ { +++ puts ("mutex_destroy failed"); +++ return 1; +++ } +++ +++ if (pthread_mutex_destroy (&m2) != 0) +++ { +++ puts ("mutex_destroy failed"); +++ return 1; +++ } +++ +++ if (pthread_mutex_destroy (&m3) != 0) +++ { +++ puts ("mutex_destroy failed"); +++ return 1; +++ } +++ +++ if (pthread_mutexattr_destroy (&ma) != 0) +++ { +++ puts ("mutexattr_destroy failed"); +++ return 1; +++ } +++ +++ return ret; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-mutexpp6.c ++@@ -0,0 +1,45 @@ +++#include +++#include +++#include +++ +++#include "tst-tpp.h" +++ +++static pthread_mutexattr_t a; +++ +++static void +++prepare (void) +++{ +++ init_tpp_test (); +++ +++ if (pthread_mutexattr_init (&a) != 0) +++ { +++ puts ("mutexattr_init failed"); +++ exit (1); +++ } +++ +++ if (pthread_mutexattr_setprotocol (&a, PTHREAD_PRIO_PROTECT) != 0) +++ { +++ puts ("mutexattr_setprotocol failed"); +++ exit (1); +++ } +++ +++ if (pthread_mutexattr_setprioceiling (&a, 6) != 0) +++ { +++ puts ("mutexattr_setprioceiling failed"); +++ exit (1); +++ } +++} +++#define PREPARE(argc, argv) prepare () +++ +++static int do_test (void); +++ +++static int +++do_test_wrapper (void) +++{ +++ init_tpp_test (); +++ return do_test (); +++} +++#define TEST_FUNCTION do_test_wrapper () +++ +++#define ATTR &a +++#include "tst-mutex6.c" ++--- /dev/null +++++ b/fbtl/tst-oddstacklimit.c ++@@ -0,0 +1,73 @@ +++/* Test NPTL with stack limit that is not a multiple of the page size. +++ Copyright (C) 2012-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 +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++ +++/* This sets the stack resource limit to 1023kb, which is not a multiple +++ of the page size since every architecture's page size is > 1k. */ +++#ifndef ODD_STACK_LIMIT +++# define ODD_STACK_LIMIT (1023 * 1024) +++#endif +++ +++static const char *command; +++ +++static int +++do_test (void) +++{ +++ int ret; +++ struct rlimit rlim; +++ +++ ret = getrlimit (RLIMIT_STACK, &rlim); +++ if (ret != 0) +++ { +++ printf ("getrlimit failed: %s\n", strerror (errno)); +++ return 1; +++ } +++ rlim.rlim_cur = ODD_STACK_LIMIT; +++ ret = setrlimit (RLIMIT_STACK, &rlim); +++ if (ret != 0) +++ { +++ printf ("setrlimit failed: %s\n", strerror (errno)); +++ return 1; +++ } +++ ret = system (command); +++ if (ret == -1) +++ { +++ printf ("system failed: %s\n", strerror (errno)); +++ return 1; +++ } +++ if (WIFEXITED (ret)) +++ return WEXITSTATUS (ret); +++ else +++ return 1; +++} +++ +++#define OPT_COMMAND 10000 +++#define CMDLINE_OPTIONS \ +++ { "command", required_argument, NULL, OPT_COMMAND }, +++#define CMDLINE_PROCESS \ +++ case OPT_COMMAND: \ +++ command = optarg; \ +++ break; +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-once1.c ++@@ -0,0 +1,50 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++ +++ +++static pthread_once_t once = PTHREAD_ONCE_INIT; +++ +++static int global; +++ +++static void +++once_handler (void) +++{ +++ ++global; +++} +++ +++ +++static int +++do_test (void) +++{ +++ pthread_once (&once, once_handler); +++ pthread_once (&once, once_handler); +++ +++ if (global != 1) +++ { +++ printf ("global = %d, expected 1\n", global); +++ return 1; +++ } +++ +++ return 0; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-once2.c ++@@ -0,0 +1,103 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++ +++ +++#define N 100 +++ +++static pthread_once_t once = PTHREAD_ONCE_INIT; +++ +++static int global; +++ +++static void +++once_handler (void) +++{ +++ struct timespec ts; +++ +++ ++global; +++ +++ ts.tv_sec = 2; +++ ts.tv_nsec = 0; +++ nanosleep (&ts, NULL); +++} +++ +++ +++static void * +++tf (void *arg) +++{ +++ pthread_once (&once, once_handler); +++ +++ if (global != 1) +++ { +++ printf ("thread %ld: global == %d\n", (long int) arg, global); +++ exit (1); +++ } +++ +++ return NULL; +++} +++ +++ +++static int +++do_test (void) +++{ +++ pthread_attr_t at; +++ pthread_t th[N]; +++ int cnt; +++ +++ if (pthread_attr_init (&at) != 0) +++ { +++ puts ("attr_init failed"); +++ return 1; +++ } +++ +++ if (pthread_attr_setstacksize (&at, 1 * 1024 * 1024) != 0) +++ { +++ puts ("attr_setstacksize failed"); +++ return 1; +++ } +++ +++ for (cnt = 0; cnt < N; ++cnt) +++ if (pthread_create (&th[cnt], &at, tf, (void *) (long int) cnt) != 0) +++ { +++ printf ("creation of thread %d failed\n", cnt); +++ return 1; +++ } +++ +++ if (pthread_attr_destroy (&at) != 0) +++ { +++ puts ("attr_destroy failed"); +++ return 1; +++ } +++ +++ for (cnt = 0; cnt < N; ++cnt) +++ if (pthread_join (th[cnt], NULL) != 0) +++ { +++ printf ("join of thread %d failed\n", cnt); +++ return 1; +++ } +++ +++ return 0; +++} +++ +++#define TEST_FUNCTION do_test () +++#define TIMEOUT 4 +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-once3.c ++@@ -0,0 +1,166 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++ +++ +++#define N 100 +++ +++static pthread_once_t once = PTHREAD_ONCE_INIT; +++ +++static pthread_cond_t cond = PTHREAD_COND_INITIALIZER; +++static pthread_mutex_t mut = PTHREAD_MUTEX_INITIALIZER; +++ +++static pthread_barrier_t bar; +++ +++static int global; +++static int cl_called; +++ +++static void +++once_handler1 (void) +++{ +++ if (pthread_mutex_lock (&mut) != 0) +++ { +++ puts ("once_handler1: mutex_lock failed"); +++ exit (1); +++ } +++ puts ("once_handler1: locked"); +++ +++ int r = pthread_barrier_wait (&bar); +++ if (r != 0 && r!= PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("once_handler1: barrier_wait failed"); +++ exit (1); +++ } +++ +++ puts ("once_handler1: going to wait on cond"); +++ +++ pthread_cond_wait (&cond, &mut); +++ +++ /* We should never get here. */ +++ exit (42); +++} +++ +++static void +++once_handler2 (void) +++{ +++ global = 1; +++} +++ +++ +++static void +++cl (void *arg) +++{ +++ cl_called = 1; +++} +++ +++ +++static void * +++tf (void *arg) +++{ +++ pthread_cleanup_push (cl, NULL) +++ +++ pthread_once (&once, once_handler1); +++ +++ pthread_cleanup_pop (0); +++ +++ /* We should never get here. */ +++ puts ("pthread_once in tf returned"); +++ exit (1); +++} +++ +++ +++static int +++do_test (void) +++{ +++ pthread_t th; +++ +++ if (pthread_barrier_init (&bar, NULL, 2) != 0) +++ { +++ puts ("barrier_init failed"); +++ return 1; +++ } +++ +++ if (pthread_create (&th, NULL, tf, NULL) != 0) +++ { +++ puts ("first create failed"); +++ return 1; +++ } +++ +++ int r = pthread_barrier_wait (&bar); +++ if (r != 0 && r!= PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("barrier_wait failed"); +++ return 1; +++ } +++ +++ if (pthread_mutex_lock (&mut) != 0) +++ { +++ puts ("mutex_lock failed"); +++ return 1; +++ } +++ /* We unlock the mutex so that we catch the case where the pthread_cond_wait +++ call incorrectly resumes and tries to get the mutex. */ +++ if (pthread_mutex_unlock (&mut) != 0) +++ { +++ puts ("mutex_unlock failed"); +++ return 1; +++ } +++ +++ /* Cancel the thread. */ +++ puts ("going to cancel"); +++ if (pthread_cancel (th) != 0) +++ { +++ puts ("cancel failed"); +++ return 1; +++ } +++ +++ void *result; +++ pthread_join (th, &result); +++ if (result != PTHREAD_CANCELED) +++ { +++ puts ("join didn't return PTHREAD_CANCELED"); +++ return 1; +++ } +++ puts ("joined successfully"); +++ +++ printf ("once = %d\n", *(int *) &once); +++ +++ if (cl_called != 1) +++ { +++ puts ("cleanup handler not called"); +++ return 1; +++ } +++ +++ pthread_once (&once, once_handler2); +++ +++ if (global != 1) +++ { +++ puts ("global still 0"); +++ return 1; +++ } +++ +++ return 0; +++} +++ +++#define TEST_FUNCTION do_test () +++#define TIMEOUT 4 +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-once4.c ++@@ -0,0 +1,201 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++ +++ +++static pthread_once_t once = PTHREAD_ONCE_INIT; +++ +++static pthread_cond_t cond = PTHREAD_COND_INITIALIZER; +++static pthread_mutex_t mut = PTHREAD_MUTEX_INITIALIZER; +++ +++static pthread_barrier_t bar; +++ +++static int global; +++static int cl_called; +++ +++static void +++once_handler1 (void) +++{ +++ if (pthread_mutex_lock (&mut) != 0) +++ { +++ puts ("once_handler1: mutex_lock failed"); +++ exit (1); +++ } +++ +++ int r = pthread_barrier_wait (&bar); +++ if (r != 0 && r!= PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("once_handler1: barrier_wait failed"); +++ exit (1); +++ } +++ +++ pthread_cond_wait (&cond, &mut); +++ +++ /* We should never get here. */ +++} +++ +++ +++static void +++once_handler2 (void) +++{ +++ global = 1; +++} +++ +++ +++static void +++cl (void *arg) +++{ +++ ++cl_called; +++} +++ +++ +++static void * +++tf1 (void *arg) +++{ +++ pthread_cleanup_push (cl, NULL); +++ +++ pthread_once (&once, once_handler1); +++ +++ pthread_cleanup_pop (0); +++ +++ /* We should never get here. */ +++ puts ("pthread_once in tf returned"); +++ exit (1); +++} +++ +++ +++static void * +++tf2 (void *arg) +++{ +++ pthread_cleanup_push (cl, NULL); +++ +++ int r = pthread_barrier_wait (&bar); +++ if (r != 0 && r!= PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("once_handler2: barrier_wait failed"); +++ exit (1); +++ } +++ +++ pthread_cleanup_pop (0); +++ +++ pthread_once (&once, once_handler2); +++ +++ return NULL; +++} +++ +++ +++static int +++do_test (void) +++{ +++ pthread_t th[2]; +++ +++ if (pthread_barrier_init (&bar, NULL, 2) != 0) +++ { +++ puts ("barrier_init failed"); +++ return 1; +++ } +++ +++ if (pthread_create (&th[0], NULL, tf1, NULL) != 0) +++ { +++ puts ("first create failed"); +++ return 1; +++ } +++ +++ int r = pthread_barrier_wait (&bar); +++ if (r != 0 && r!= PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("first barrier_wait failed"); +++ return 1; +++ } +++ +++ if (pthread_mutex_lock (&mut) != 0) +++ { +++ puts ("mutex_lock failed"); +++ return 1; +++ } +++ /* We unlock the mutex so that we catch the case where the pthread_cond_wait +++ call incorrectly resumes and tries to get the mutex. */ +++ if (pthread_mutex_unlock (&mut) != 0) +++ { +++ puts ("mutex_unlock failed"); +++ return 1; +++ } +++ +++ if (pthread_create (&th[1], NULL, tf2, NULL) != 0) +++ { +++ puts ("second create failed"); +++ return 1; +++ } +++ +++ r = pthread_barrier_wait (&bar); +++ if (r != 0 && r!= PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("second barrier_wait failed"); +++ return 1; +++ } +++ +++ /* Give the second thread a chance to reach the pthread_once call. */ +++ sleep (2); +++ +++ /* Cancel the thread. */ +++ if (pthread_cancel (th[0]) != 0) +++ { +++ puts ("cancel failed"); +++ return 1; +++ } +++ +++ void *result; +++ pthread_join (th[0], &result); +++ if (result != PTHREAD_CANCELED) +++ { +++ puts ("first join didn't return PTHREAD_CANCELED"); +++ return 1; +++ } +++ +++ puts ("joined first thread"); +++ +++ pthread_join (th[1], &result); +++ if (result != NULL) +++ { +++ puts ("second join didn't return PTHREAD_CANCELED"); +++ return 1; +++ } +++ +++ if (global != 1) +++ { +++ puts ("global still 0"); +++ return 1; +++ } +++ +++ if (cl_called != 1) +++ { +++ printf ("cl_called = %d\n", cl_called); +++ return 1; +++ } +++ +++ return 0; +++} +++ +++#define TEST_FUNCTION do_test () +++#define TIMEOUT 4 +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-oncex3.c ++@@ -0,0 +1 @@ +++#include "tst-once3.c" ++--- /dev/null +++++ b/fbtl/tst-oncex4.c ++@@ -0,0 +1 @@ +++#include "tst-once4.c" ++--- /dev/null +++++ b/fbtl/tst-popen1.c ++@@ -0,0 +1,59 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Jakub Jelinek , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++static void * +++dummy (void *x) +++{ +++ return NULL; +++} +++ +++static char buf[sizeof "something\n"]; +++ +++static int +++do_test (void) +++{ +++ FILE *f; +++ pthread_t p; +++ int err; +++ +++ f = popen ("echo something", "r"); +++ if (f == NULL) +++ error (EXIT_FAILURE, errno, "popen failed"); +++ if (fgets (buf, sizeof (buf), f) == NULL) +++ error (EXIT_FAILURE, 0, "fgets failed"); +++ if (strcmp (buf, "something\n")) +++ error (EXIT_FAILURE, 0, "read wrong data"); +++ if (pclose (f)) +++ error (EXIT_FAILURE, errno, "pclose returned non-zero"); +++ if ((err = pthread_create (&p, NULL, dummy, NULL))) +++ error (EXIT_FAILURE, err, "pthread_create failed"); +++ if ((err = pthread_join (p, NULL))) +++ error (EXIT_FAILURE, err, "pthread_join failed"); +++ exit (0); +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-pthread-attr-affinity.c ++@@ -0,0 +1,63 @@ +++/* Make sure that pthread_attr_getaffinity_np does not crash when the input +++ cpuset size is smaller than that in the attribute structure. +++ +++ 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 +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++ +++ +++#define RETURN_IF_FAIL(f, ...) \ +++ ({ \ +++ int ret = f (__VA_ARGS__); \ +++ if (ret != 0) \ +++ { \ +++ printf ("%s:%d: %s returned %d (errno = %d)\n", __FILE__, __LINE__, \ +++ #f, ret, errno); \ +++ return ret; \ +++ } \ +++ }) +++ +++static int +++do_test (void) +++{ +++ for (int i = 0; i < 10; i++) +++ { +++ pthread_attr_t attr; +++ cpu_set_t *cpuset = CPU_ALLOC (512); +++ size_t cpusetsize = CPU_ALLOC_SIZE (512); +++ CPU_ZERO_S (cpusetsize, cpuset); +++ +++ RETURN_IF_FAIL (pthread_attr_init, &attr); +++ RETURN_IF_FAIL (pthread_attr_setaffinity_np, &attr, cpusetsize, cpuset); +++ CPU_FREE (cpuset); +++ +++ cpuset = CPU_ALLOC (1); +++ cpusetsize = CPU_ALLOC_SIZE (1); +++ RETURN_IF_FAIL (pthread_attr_getaffinity_np, &attr, cpusetsize, cpuset); +++ CPU_FREE (cpuset); +++ } +++ return 0; +++} +++ +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-pthread-getattr.c ++@@ -0,0 +1,161 @@ +++/* Make sure that the stackaddr returned by pthread_getattr_np is +++ reachable. +++ +++ Copyright (C) 2012-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 +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++/* There is an obscure bug in the kernel due to which RLIMIT_STACK is sometimes +++ returned as unlimited when it is not, which may cause this test to fail. +++ There is also the other case where RLIMIT_STACK is intentionally set as +++ unlimited or very high, which may result in a vma that is too large and again +++ results in a test case failure. To avoid these problems, we cap the stack +++ size to one less than 8M. See the following mailing list threads for more +++ information about this problem: +++ +++ . */ +++#define MAX_STACK_SIZE (8192 * 1024 - 1) +++ +++static size_t pagesize; +++ +++/* Check if the page in which TARGET lies is accessible. This will segfault +++ if it fails. */ +++static volatile char * +++allocate_and_test (char *target) +++{ +++ volatile char *mem = (char *) &mem; +++ /* FIXME: mem >= target for _STACK_GROWSUP. */ +++ mem = alloca ((size_t) (mem - target)); +++ +++ *mem = 42; +++ return mem; +++} +++ +++static int +++get_self_pthread_attr (const char *id, void **stackaddr, size_t *stacksize) +++{ +++ pthread_attr_t attr; +++ int ret; +++ pthread_t me = pthread_self (); +++ +++ if ((ret = pthread_getattr_np (me, &attr)) < 0) +++ { +++ printf ("%s: pthread_getattr_np failed: %s\n", id, strerror (ret)); +++ return 1; +++ } +++ +++ if ((ret = pthread_attr_getstack (&attr, stackaddr, stacksize)) < 0) +++ { +++ printf ("%s: pthread_attr_getstack returned error: %s\n", id, +++ strerror (ret)); +++ return 1; +++ } +++ +++ return 0; +++} +++ +++/* Verify that the stack size returned by pthread_getattr_np is usable when +++ the returned value is subject to rlimit. */ +++static int +++check_stack_top (void) +++{ +++ struct rlimit stack_limit; +++ void *stackaddr; +++ volatile void *mem; +++ size_t stacksize = 0; +++ int ret; +++ uintptr_t pagemask = ~(pagesize - 1); +++ +++ puts ("Verifying that stack top is accessible"); +++ +++ ret = getrlimit (RLIMIT_STACK, &stack_limit); +++ if (ret) +++ { +++ perror ("getrlimit failed"); +++ return 1; +++ } +++ +++ printf ("current rlimit_stack is %zu\n", (size_t) stack_limit.rlim_cur); +++ +++ if (get_self_pthread_attr ("check_stack_top", &stackaddr, &stacksize)) +++ return 1; +++ +++ /* Reduce the rlimit to a page less that what is currently being returned +++ (subject to a maximum of MAX_STACK_SIZE) so that we ensure that +++ pthread_getattr_np uses rlimit. The figure is intentionally unaligned so +++ to verify that pthread_getattr_np returns an aligned stacksize that +++ correctly fits into the rlimit. We don't bother about the case where the +++ stack is limited by the vma below it and not by the rlimit because the +++ stacksize returned in that case is computed from the end of that vma and is +++ hence safe. */ +++ stack_limit.rlim_cur = MIN (stacksize - pagesize + 1, MAX_STACK_SIZE); +++ printf ("Adjusting RLIMIT_STACK to %zu\n", (size_t) stack_limit.rlim_cur); +++ if ((ret = setrlimit (RLIMIT_STACK, &stack_limit)) < 0) +++ { +++ perror ("setrlimit failed"); +++ return 1; +++ } +++ +++ if (get_self_pthread_attr ("check_stack_top2", &stackaddr, &stacksize)) +++ return 1; +++ +++ printf ("Adjusted rlimit: stacksize=%zu, stackaddr=%p\n", stacksize, +++ stackaddr); +++ +++ /* A lot of targets tend to write stuff on top of the user stack during +++ context switches, so we cannot possibly safely go up to the very top of +++ stack and test access there. It is however sufficient to simply check if +++ the top page is accessible, so we target our access halfway up the top +++ page. Thanks Chris Metcalf for this idea. */ +++ mem = allocate_and_test (stackaddr + pagesize / 2); +++ +++ /* Before we celebrate, make sure we actually did test the same page. */ +++ if (((uintptr_t) stackaddr & pagemask) != ((uintptr_t) mem & pagemask)) +++ { +++ printf ("We successfully wrote into the wrong page.\n" +++ "Expected %#" PRIxPTR ", but got %#" PRIxPTR "\n", +++ (uintptr_t) stackaddr & pagemask, (uintptr_t) mem & pagemask); +++ +++ return 1; +++ } +++ +++ puts ("Stack top tests done"); +++ +++ return 0; +++} +++ +++/* TODO: Similar check for thread stacks once the thread stack sizes are +++ fixed. */ +++static int +++do_test (void) +++{ +++ pagesize = sysconf (_SC_PAGESIZE); +++ return check_stack_top (); +++} +++ +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-raise1.c ++@@ -0,0 +1,61 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Jakub Jelinek , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++ +++volatile int count; +++ +++void +++sh (int sig) +++{ +++ ++count; +++} +++ +++int +++main (void) +++{ +++ struct sigaction sa; +++ sa.sa_handler = sh; +++ sigemptyset (&sa.sa_mask); +++ sa.sa_flags = 0; +++ if (sigaction (SIGUSR1, &sa, NULL) < 0) +++ { +++ printf ("sigaction failed: %m\n"); +++ exit (1); +++ } +++ if (raise (SIGUSR1) < 0) +++ { +++ printf ("first raise failed: %m\n"); +++ exit (1); +++ } +++ if (raise (SIGUSR1) < 0) +++ { +++ printf ("second raise failed: %m\n"); +++ exit (1); +++ } +++ if (count != 2) +++ { +++ printf ("signal handler not called 2 times\n"); +++ exit (1); +++ } +++ exit (0); +++} ++--- /dev/null +++++ b/fbtl/tst-robust1.c ++@@ -0,0 +1,338 @@ +++/* Copyright (C) 2005-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++ +++ +++static pthread_mutex_t m1; +++static pthread_mutex_t m2; +++static pthread_barrier_t b; +++ +++ +++#ifndef LOCK +++# define LOCK(m) pthread_mutex_lock (m) +++#endif +++ +++ +++static void * +++tf (void *arg) +++{ +++ long int round = (long int) arg; +++ +++ if (pthread_setcancelstate (PTHREAD_CANCEL_ENABLE, NULL) != 0) +++ { +++ printf ("%ld: setcancelstate failed\n", round); +++ exit (1); +++ } +++ +++ int e = LOCK (&m1); +++ if (e != 0) +++ { +++ printf ("%ld: child: mutex_lock m1 failed with error %d\n", round, e); +++ exit (1); +++ } +++ +++ e = LOCK (&m2); +++ if (e != 0) +++ { +++ printf ("%ld: child: mutex_lock m2 failed with error %d\n", round, e); +++ exit (1); +++ } +++ +++ e = pthread_barrier_wait (&b); +++ if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%ld: child: 1st barrier_wait failed\n", round); +++ exit (1); +++ } +++ +++ e = pthread_barrier_wait (&b); +++ if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%ld: child: 2nd barrier_wait failed\n", round); +++ exit (1); +++ } +++ +++ pthread_testcancel (); +++ +++ printf ("%ld: testcancel returned\n", round); +++ exit (1); +++} +++ +++ +++static int +++do_test (void) +++{ +++#ifdef PREPARE_TMO +++ PREPARE_TMO; +++#endif +++ +++ pthread_mutexattr_t a; +++ if (pthread_mutexattr_init (&a) != 0) +++ { +++ puts ("mutexattr_init failed"); +++ return 1; +++ } +++ if (pthread_mutexattr_setrobust_np (&a, PTHREAD_MUTEX_ROBUST_NP) != 0) +++ { +++ puts ("mutexattr_setrobust failed"); +++ return 1; +++ } +++ +++#ifdef ENABLE_PI +++ if (pthread_mutexattr_setprotocol (&a, PTHREAD_PRIO_INHERIT) != 0) +++ { +++ puts ("pthread_mutexattr_setprotocol failed"); +++ return 1; +++ } +++ else +++ { +++ int e = pthread_mutex_init (&m1, &a); +++ if (e == ENOTSUP) +++ { +++ puts ("PI robust mutexes not supported"); +++ return 0; +++ } +++ else if (e != 0) +++ { +++ puts ("mutex_init m1 failed"); +++ return 1; +++ } +++ pthread_mutex_destroy (&m1); +++ } +++#endif +++ +++#ifndef NOT_CONSISTENT +++ if (pthread_mutex_init (&m1, &a) != 0) +++ { +++ puts ("mutex_init m1 failed"); +++ return 1; +++ } +++ +++ if (pthread_mutex_init (&m2, &a) != 0) +++ { +++ puts ("mutex_init m2 failed"); +++ return 1; +++ } +++#endif +++ +++ if (pthread_barrier_init (&b, NULL, 2) != 0) +++ { +++ puts ("barrier_init failed"); +++ return 1; +++ } +++ +++ for (long int round = 1; round < 5; ++round) +++ { +++#ifdef NOT_CONSISTENT +++ if (pthread_mutex_init (&m1 , &a) != 0) +++ { +++ puts ("mutex_init m1 failed"); +++ return 1; +++ } +++ if (pthread_mutex_init (&m2 , &a) != 0) +++ { +++ puts ("mutex_init m2 failed"); +++ return 1; +++ } +++#endif +++ +++ pthread_t th; +++ if (pthread_create (&th, NULL, tf, (void *) round) != 0) +++ { +++ printf ("%ld: create failed\n", round); +++ return 1; +++ } +++ +++ int e = pthread_barrier_wait (&b); +++ if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%ld: parent: 1st barrier_wait failed\n", round); +++ return 1; +++ } +++ +++ if (pthread_cancel (th) != 0) +++ { +++ printf ("%ld: cancel failed\n", round); +++ return 1; +++ } +++ +++ e = pthread_barrier_wait (&b); +++ if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("%ld: parent: 2nd barrier_wait failed\n", round); +++ return 1; +++ } +++ +++#ifndef AFTER_JOIN +++ if (round & 1) +++#endif +++ { +++ void *res; +++ if (pthread_join (th, &res) != 0) +++ { +++ printf ("%ld: join failed\n", round); +++ return 1; +++ } +++ if (res != PTHREAD_CANCELED) +++ { +++ printf ("%ld: thread not canceled\n", round); +++ return 1; +++ } +++ } +++ +++ e = LOCK (&m1); +++ if (e == 0) +++ { +++ printf ("%ld: parent: mutex_lock m1 succeeded\n", round); +++ return 1; +++ } +++ if (e != EOWNERDEAD) +++ { +++ printf ("%ld: parent: mutex_lock m1 returned wrong code\n", round); +++ return 1; +++ } +++ +++ e = LOCK (&m2); +++ if (e == 0) +++ { +++ printf ("%ld: parent: mutex_lock m2 succeeded\n", round); +++ return 1; +++ } +++ if (e != EOWNERDEAD) +++ { +++ printf ("%ld: parent: mutex_lock m2 returned wrong code\n", round); +++ return 1; +++ } +++ +++#ifndef AFTER_JOIN +++ if ((round & 1) == 0) +++ { +++ void *res; +++ if (pthread_join (th, &res) != 0) +++ { +++ printf ("%ld: join failed\n", round); +++ return 1; +++ } +++ if (res != PTHREAD_CANCELED) +++ { +++ printf ("%ld: thread not canceled\n", round); +++ return 1; +++ } +++ } +++#endif +++ +++#ifndef NOT_CONSISTENT +++ e = pthread_mutex_consistent_np (&m1); +++ if (e != 0) +++ { +++ printf ("%ld: mutex_consistent m1 failed with error %d\n", round, e); +++ return 1; +++ } +++ +++ e = pthread_mutex_consistent_np (&m2); +++ if (e != 0) +++ { +++ printf ("%ld: mutex_consistent m2 failed with error %d\n", round, e); +++ return 1; +++ } +++#endif +++ +++ e = pthread_mutex_unlock (&m1); +++ if (e != 0) +++ { +++ printf ("%ld: mutex_unlock m1 failed with %d\n", round, e); +++ return 1; +++ } +++ +++ e = pthread_mutex_unlock (&m2); +++ if (e != 0) +++ { +++ printf ("%ld: mutex_unlock m2 failed with %d\n", round, e); +++ return 1; +++ } +++ +++#ifdef NOT_CONSISTENT +++ e = LOCK (&m1); +++ if (e == 0) +++ { +++ printf ("%ld: locking inconsistent mutex m1 succeeded\n", round); +++ return 1; +++ } +++ if (e != ENOTRECOVERABLE) +++ { +++ printf ("%ld: locking inconsistent mutex m1 failed with error %d\n", +++ round, e); +++ return 1; +++ } +++ +++ if (pthread_mutex_destroy (&m1) != 0) +++ { +++ puts ("mutex_destroy m1 failed"); +++ return 1; +++ } +++ +++ e = LOCK (&m2); +++ if (e == 0) +++ { +++ printf ("%ld: locking inconsistent mutex m2 succeeded\n", round); +++ return 1; +++ } +++ if (e != ENOTRECOVERABLE) +++ { +++ printf ("%ld: locking inconsistent mutex m2 failed with error %d\n", +++ round, e); +++ return 1; +++ } +++ +++ if (pthread_mutex_destroy (&m2) != 0) +++ { +++ puts ("mutex_destroy m2 failed"); +++ return 1; +++ } +++#endif +++ } +++ +++#ifndef NOT_CONSISTENT +++ if (pthread_mutex_destroy (&m1) != 0) +++ { +++ puts ("mutex_destroy m1 failed"); +++ return 1; +++ } +++ +++ if (pthread_mutex_destroy (&m2) != 0) +++ { +++ puts ("mutex_destroy m2 failed"); +++ return 1; +++ } +++#endif +++ +++ if (pthread_mutexattr_destroy (&a) != 0) +++ { +++ puts ("mutexattr_destroy failed"); +++ return 1; +++ } +++ +++ return 0; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-robust2.c ++@@ -0,0 +1,3 @@ +++#define AFTER_JOIN 1 +++#define LOCK(m) pthread_mutex_trylock (m) +++#include "tst-robust1.c" ++--- /dev/null +++++ b/fbtl/tst-robust3.c ++@@ -0,0 +1,20 @@ +++#include +++#include +++ +++ +++static struct timespec tmo; +++ +++ +++#define PREPARE_TMO \ +++ do { \ +++ struct timeval tv; \ +++ gettimeofday (&tv, NULL); \ +++ \ +++ /* Define the timeout as one hour in the future. */ \ +++ tmo.tv_sec = tv.tv_sec + 3600; \ +++ tmo.tv_nsec = 0; \ +++ } while (0) +++ +++ +++#define LOCK(m) pthread_mutex_timedlock (m, &tmo) +++#include "tst-robust1.c" ++--- /dev/null +++++ b/fbtl/tst-robust4.c ++@@ -0,0 +1,2 @@ +++#define NOT_CONSISTENT 1 +++#include "tst-robust1.c" ++--- /dev/null +++++ b/fbtl/tst-robust5.c ++@@ -0,0 +1,2 @@ +++#define NOT_CONSISTENT 1 +++#include "tst-robust2.c" ++--- /dev/null +++++ b/fbtl/tst-robust6.c ++@@ -0,0 +1,2 @@ +++#define NOT_CONSISTENT 1 +++#include "tst-robust3.c" ++--- /dev/null +++++ b/fbtl/tst-robust7.c ++@@ -0,0 +1,212 @@ +++/* Copyright (C) 2005-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++ +++ +++static pthread_barrier_t b; +++static pthread_cond_t c = PTHREAD_COND_INITIALIZER; +++static pthread_mutex_t m; +++static bool first = true; +++ +++ +++static void * +++tf (void *arg) +++{ +++ long int n = (long int) arg; +++ +++ if (pthread_mutex_lock (&m) != 0) +++ { +++ printf ("thread %ld: mutex_lock failed\n", n + 1); +++ exit (1); +++ } +++ +++ int e = pthread_barrier_wait (&b); +++ if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("thread %ld: barrier_wait failed\n", n + 1); +++ exit (1); +++ } +++ +++ e = pthread_cond_wait (&c, &m); +++ if (first) +++ { +++ if (e != 0) +++ { +++ printf ("thread %ld: cond_wait failed\n", n + 1); +++ exit (1); +++ } +++ first = false; +++ } +++ else +++ { +++ if (e != EOWNERDEAD) +++ { +++ printf ("thread %ld: cond_wait did not return EOWNERDEAD\n", n + 1); +++ exit (1); +++ } +++ } +++ +++ if (pthread_cancel (pthread_self ()) != 0) +++ { +++ printf ("thread %ld: cancel failed\n", n + 1); +++ exit (1); +++ } +++ +++ pthread_testcancel (); +++ +++ printf ("thread %ld: testcancel returned\n", n + 1); +++ exit (1); +++} +++ +++ +++static int +++do_test (void) +++{ +++ pthread_mutexattr_t a; +++ if (pthread_mutexattr_init (&a) != 0) +++ { +++ puts ("mutexattr_init failed"); +++ return 1; +++ } +++ +++ if (pthread_mutexattr_setrobust_np (&a, PTHREAD_MUTEX_ROBUST_NP) != 0) +++ { +++ puts ("mutexattr_setrobust failed"); +++ return 1; +++ } +++ +++#ifdef ENABLE_PI +++ if (pthread_mutexattr_setprotocol (&a, PTHREAD_PRIO_INHERIT) != 0) +++ { +++ puts ("pthread_mutexattr_setprotocol failed"); +++ return 1; +++ } +++#endif +++ +++ int e; +++ e = pthread_mutex_init (&m, &a); +++ if (e != 0) +++ { +++#ifdef ENABLE_PI +++ if (e == ENOTSUP) +++ { +++ puts ("PI robust mutexes not supported"); +++ return 0; +++ } +++#endif +++ puts ("mutex_init failed"); +++ return 1; +++ } +++ +++ if (pthread_mutexattr_destroy (&a) != 0) +++ { +++ puts ("mutexattr_destroy failed"); +++ return 1; +++ } +++ +++ if (pthread_barrier_init (&b, NULL, 2) != 0) +++ { +++ puts ("barrier_init failed"); +++ return 1; +++ } +++ +++#define N 5 +++ pthread_t th[N]; +++ for (long int n = 0; n < N; ++n) +++ { +++ if (pthread_create (&th[n], NULL, tf, (void *) n) != 0) +++ { +++ printf ("pthread_create loop %ld failed\n", n + 1); +++ return 1; +++ } +++ +++ e = pthread_barrier_wait (&b); +++ if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ printf ("parent: barrier_wait failed in round %ld\n", n + 1); +++ return 1; +++ } +++ } +++ +++ if (pthread_mutex_lock (&m) != 0) +++ { +++ puts ("parent: mutex_lock failed"); +++ return 1; +++ } +++ +++ if (pthread_mutex_unlock (&m) != 0) +++ { +++ puts ("parent: mutex_unlock failed"); +++ return 1; +++ } +++ +++ if (pthread_cond_broadcast (&c) != 0) +++ { +++ puts ("cond_broadcast failed"); +++ return 1; +++ } +++ +++ for (int n = 0; n < N; ++n) +++ { +++ void *res; +++ if (pthread_join (th[n], &res) != 0) +++ { +++ printf ("join round %d failed\n", n + 1); +++ return 1; +++ } +++ if (res != PTHREAD_CANCELED) +++ { +++ printf ("thread %d not canceled\n", n + 1); +++ return 1; +++ } +++ } +++ +++ e = pthread_mutex_lock (&m); +++ if (e == 0) +++ { +++ puts ("parent: 2nd mutex_lock succeeded"); +++ return 1; +++ } +++ if (e != EOWNERDEAD) +++ { +++ puts ("parent: mutex_lock did not return EOWNERDEAD"); +++ return 1; +++ } +++ +++ if (pthread_mutex_unlock (&m) != 0) +++ { +++ puts ("parent: 2nd mutex_unlock failed"); +++ return 1; +++ } +++ +++ if (pthread_mutex_destroy (&m) != 0) +++ { +++ puts ("mutex_destroy failed"); +++ return 1; +++ } +++ +++ return 0; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-robust8.c ++@@ -0,0 +1,275 @@ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++ +++ +++static void prepare (void); +++#define PREPARE(argc, argv) prepare () +++static int do_test (void); +++#define TEST_FUNCTION do_test () +++#define TIMEOUT 5 +++#include "../test-skeleton.c" +++ +++ +++static int fd; +++#define N 100 +++ +++static void +++prepare (void) +++{ +++ fd = create_temp_file ("tst-robust8", NULL); +++ if (fd == -1) +++ exit (1); +++} +++ +++ +++#define THESIGNAL SIGKILL +++#define ROUNDS 5 +++#define THREADS 9 +++ +++ +++static const struct timespec before = { 0, 0 }; +++ +++ +++static pthread_mutex_t *map; +++ +++ +++static void * +++tf (void *arg) +++{ +++ long int nr = (long int) arg; +++ int fct = nr % 3; +++ +++ uint8_t state[N]; +++ memset (state, '\0', sizeof (state)); +++ +++ while (1) +++ { +++ int r = random () % N; +++ if (state[r] == 0) +++ { +++ int e; +++ +++ switch (fct) +++ { +++ case 0: +++ e = pthread_mutex_lock (&map[r]); +++ if (e != 0) +++ { +++ printf ("mutex_lock of %d in thread %ld failed with %d\n", +++ r, nr, e); +++ exit (1); +++ } +++ state[r] = 1; +++ break; +++ case 1: +++ e = pthread_mutex_timedlock (&map[r], &before); +++ if (e != 0 && e != ETIMEDOUT) +++ { +++ printf ("\ +++mutex_timedlock of %d in thread %ld failed with %d\n", +++ r, nr, e); +++ exit (1); +++ } +++ break; +++ default: +++ e = pthread_mutex_trylock (&map[r]); +++ if (e != 0 && e != EBUSY) +++ { +++ printf ("mutex_trylock of %d in thread %ld failed with %d\n", +++ r, nr, e); +++ exit (1); +++ } +++ break; +++ } +++ +++ if (e == EOWNERDEAD) +++ pthread_mutex_consistent_np (&map[r]); +++ +++ if (e == 0 || e == EOWNERDEAD) +++ state[r] = 1; +++ } +++ else +++ { +++ int e = pthread_mutex_unlock (&map[r]); +++ if (e != 0) +++ { +++ printf ("mutex_unlock of %d in thread %ld failed with %d\n", +++ r, nr, e); +++ exit (1); +++ } +++ +++ state[r] = 0; +++ } +++ } +++} +++ +++ +++static void +++child (int round) +++{ +++ for (int thread = 1; thread <= THREADS; ++thread) +++ { +++ pthread_t th; +++ if (pthread_create (&th, NULL, tf, (void *) (long int) thread) != 0) +++ { +++ printf ("cannot create thread %d in round %d\n", thread, round); +++ exit (1); +++ } +++ } +++ +++ struct timespec ts; +++ ts.tv_sec = 0; +++ ts.tv_nsec = 1000000000 / ROUNDS; +++ while (nanosleep (&ts, &ts) != 0) +++ /* nothing */; +++ +++ /* Time to die. */ +++ kill (getpid (), THESIGNAL); +++ +++ /* We better never get here. */ +++ abort (); +++} +++ +++ +++static int +++do_test (void) +++{ +++ if (ftruncate (fd, N * sizeof (pthread_mutex_t)) != 0) +++ { +++ puts ("cannot size new file"); +++ return 1; +++ } +++ +++ map = mmap (NULL, N * sizeof (pthread_mutex_t), PROT_READ | PROT_WRITE, +++ MAP_SHARED, fd, 0); +++ if (map == MAP_FAILED) +++ { +++ puts ("mapping failed"); +++ return 1; +++ } +++ +++ pthread_mutexattr_t ma; +++ if (pthread_mutexattr_init (&ma) != 0) +++ { +++ puts ("mutexattr_init failed"); +++ return 0; +++ } +++ if (pthread_mutexattr_setrobust_np (&ma, PTHREAD_MUTEX_ROBUST_NP) != 0) +++ { +++ puts ("mutexattr_setrobust failed"); +++ return 1; +++ } +++ if (pthread_mutexattr_setpshared (&ma, PTHREAD_PROCESS_SHARED) != 0) +++ { +++ puts ("mutexattr_setpshared failed"); +++ return 1; +++ } +++#ifdef ENABLE_PI +++ if (pthread_mutexattr_setprotocol (&ma, PTHREAD_PRIO_INHERIT) != 0) +++ { +++ puts ("pthread_mutexattr_setprotocol failed"); +++ return 1; +++ } +++#endif +++ +++ for (int round = 1; round <= ROUNDS; ++round) +++ { +++ for (int n = 0; n < N; ++n) +++ { +++ int e = pthread_mutex_init (&map[n], &ma); +++ if (e == ENOTSUP) +++ { +++#ifdef ENABLE_PI +++ puts ("cannot support pshared robust PI mutexes"); +++#else +++ puts ("cannot support pshared robust mutexes"); +++#endif +++ return 0; +++ } +++ if (e != 0) +++ { +++ printf ("mutex_init %d in round %d failed\n", n + 1, round); +++ return 1; +++ } +++ } +++ +++ pid_t p = fork (); +++ if (p == -1) +++ { +++ printf ("fork in round %d failed\n", round); +++ return 1; +++ } +++ if (p == 0) +++ child (round); +++ +++ int status; +++ if (TEMP_FAILURE_RETRY (waitpid (p, &status, 0)) != p) +++ { +++ printf ("waitpid in round %d failed\n", round); +++ return 1; +++ } +++ if (!WIFSIGNALED (status)) +++ { +++ printf ("child did not die of a signal in round %d\n", round); +++ return 1; +++ } +++ if (WTERMSIG (status) != THESIGNAL) +++ { +++ printf ("child did not die of signal %d in round %d\n", +++ THESIGNAL, round); +++ return 1; +++ } +++ +++ for (int n = 0; n < N; ++n) +++ { +++ int e = pthread_mutex_lock (&map[n]); +++ if (e != 0 && e != EOWNERDEAD) +++ { +++ printf ("mutex_lock %d failed in round %d\n", n + 1, round); +++ return 1; +++ } +++ } +++ +++ for (int n = 0; n < N; ++n) +++ if (pthread_mutex_unlock (&map[n]) != 0) +++ { +++ printf ("mutex_unlock %d failed in round %d\n", n + 1, round); +++ return 1; +++ } +++ +++ for (int n = 0; n < N; ++n) +++ { +++ int e = pthread_mutex_destroy (&map[n]); +++ if (e != 0) +++ { +++ printf ("mutex_destroy %d in round %d failed with %d\n", +++ n + 1, round, e); +++ printf("nusers = %d\n", (int) map[n].__data.__nusers); +++ return 1; +++ } +++ } +++ } +++ +++ if (pthread_mutexattr_destroy (&ma) != 0) +++ { +++ puts ("mutexattr_destroy failed"); +++ return 1; +++ } +++ +++ if (munmap (map, N * sizeof (pthread_mutex_t)) != 0) +++ { +++ puts ("munmap failed"); +++ return 1; +++ } +++ +++ return 0; +++} ++--- /dev/null +++++ b/fbtl/tst-robust9.c ++@@ -0,0 +1,94 @@ +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++static pthread_mutex_t m; +++ +++static void * +++tf (void *data) +++{ +++ int err = pthread_mutex_lock (&m); +++ if (err == EOWNERDEAD) +++ { +++ err = pthread_mutex_consistent_np (&m); +++ if (err) +++ { +++ puts ("pthread_mutex_consistent_np"); +++ exit (1); +++ } +++ } +++ else if (err) +++ { +++ puts ("pthread_mutex_lock"); +++ exit (1); +++ } +++ printf ("thread%ld got the lock.\n", (long int) data); +++ sleep (1); +++ /* exit without unlock */ +++ return NULL; +++} +++ +++static int +++do_test (void) +++{ +++ int err, i; +++ pthread_t t[3]; +++ pthread_mutexattr_t ma; +++ +++ pthread_mutexattr_init (&ma); +++ err = pthread_mutexattr_setrobust_np (&ma, PTHREAD_MUTEX_ROBUST_NP); +++ if (err) +++ { +++ puts ("pthread_mutexattr_setrobust_np"); +++ return 1; +++ } +++#ifdef ENABLE_PI +++ if (pthread_mutexattr_setprotocol (&ma, PTHREAD_PRIO_INHERIT) != 0) +++ { +++ puts ("pthread_mutexattr_setprotocol failed"); +++ return 1; +++ } +++#endif +++ err = pthread_mutex_init (&m, &ma); +++#ifdef ENABLE_PI +++ if (err == ENOTSUP) +++ { +++ puts ("PI robust mutexes not supported"); +++ return 0; +++ } +++#endif +++ if (err) +++ { +++ puts ("pthread_mutex_init"); +++ return 1; +++ } +++ +++ for (i = 0; i < sizeof (t) / sizeof (t[0]); i++) +++ { +++ err = pthread_create (&t[i], NULL, tf, (void *) (long int) i); +++ if (err) +++ { +++ puts ("pthread_create"); +++ return 1; +++ } +++ } +++ +++ for (i = 0; i < sizeof (t) / sizeof (t[0]); i++) +++ { +++ err = pthread_join (t[i], NULL); +++ if (err) +++ { +++ puts ("pthread_join"); +++ return 1; +++ } +++ } +++ return 0; +++} +++ +++#define TIMEOUT 5 +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-robustpi1.c ++@@ -0,0 +1,2 @@ +++#define ENABLE_PI 1 +++#include "tst-robust1.c" ++--- /dev/null +++++ b/fbtl/tst-robustpi2.c ++@@ -0,0 +1,2 @@ +++#define ENABLE_PI 1 +++#include "tst-robust2.c" ++--- /dev/null +++++ b/fbtl/tst-robustpi3.c ++@@ -0,0 +1,2 @@ +++#define ENABLE_PI 1 +++#include "tst-robust3.c" ++--- /dev/null +++++ b/fbtl/tst-robustpi4.c ++@@ -0,0 +1,2 @@ +++#define ENABLE_PI 1 +++#include "tst-robust4.c" ++--- /dev/null +++++ b/fbtl/tst-robustpi5.c ++@@ -0,0 +1,2 @@ +++#define ENABLE_PI 1 +++#include "tst-robust5.c" ++--- /dev/null +++++ b/fbtl/tst-robustpi6.c ++@@ -0,0 +1,2 @@ +++#define ENABLE_PI 1 +++#include "tst-robust6.c" ++--- /dev/null +++++ b/fbtl/tst-robustpi7.c ++@@ -0,0 +1,2 @@ +++#define ENABLE_PI 1 +++#include "tst-robust7.c" ++--- /dev/null +++++ b/fbtl/tst-robustpi8.c ++@@ -0,0 +1,2 @@ +++#define ENABLE_PI 1 +++#include "tst-robust8.c" ++--- /dev/null +++++ b/fbtl/tst-robustpi9.c ++@@ -0,0 +1,2 @@ +++#define ENABLE_PI 1 +++#include "tst-robust9.c" ++--- /dev/null +++++ b/fbtl/tst-rwlock1.c ++@@ -0,0 +1,116 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++ +++ +++static int +++do_test (void) +++{ +++ pthread_rwlock_t r; +++ +++ if (pthread_rwlock_init (&r, NULL) != 0) +++ { +++ puts ("rwlock_init failed"); +++ return 1; +++ } +++ puts ("rwlock_init succeeded"); +++ +++ if (pthread_rwlock_rdlock (&r) != 0) +++ { +++ puts ("1st rwlock_rdlock failed"); +++ return 1; +++ } +++ puts ("1st rwlock_rdlock succeeded"); +++ +++ if (pthread_rwlock_rdlock (&r) != 0) +++ { +++ puts ("2nd rwlock_rdlock failed"); +++ return 1; +++ } +++ puts ("2nd rwlock_rdlock succeeded"); +++ +++ if (pthread_rwlock_unlock (&r) != 0) +++ { +++ puts ("1st rwlock_unlock failed"); +++ return 1; +++ } +++ puts ("1st rwlock_unlock succeeded"); +++ +++ if (pthread_rwlock_unlock (&r) != 0) +++ { +++ puts ("2nd rwlock_unlock failed"); +++ return 1; +++ } +++ puts ("2nd rwlock_unlock succeeded"); +++ +++ if (pthread_rwlock_wrlock (&r) != 0) +++ { +++ puts ("1st rwlock_wrlock failed"); +++ return 1; +++ } +++ puts ("1st rwlock_wrlock succeeded"); +++ +++ if (pthread_rwlock_unlock (&r) != 0) +++ { +++ puts ("3rd rwlock_unlock failed"); +++ return 1; +++ } +++ puts ("3rd rwlock_unlock succeeded"); +++ +++ if (pthread_rwlock_wrlock (&r) != 0) +++ { +++ puts ("2nd rwlock_wrlock failed"); +++ return 1; +++ } +++ puts ("2nd rwlock_wrlock succeeded"); +++ +++ if (pthread_rwlock_unlock (&r) != 0) +++ { +++ puts ("4th rwlock_unlock failed"); +++ return 1; +++ } +++ puts ("4th rwlock_unlock succeeded"); +++ +++ if (pthread_rwlock_rdlock (&r) != 0) +++ { +++ puts ("3rd rwlock_rdlock failed"); +++ return 1; +++ } +++ puts ("3rd rwlock_rdlock succeeded"); +++ +++ if (pthread_rwlock_unlock (&r) != 0) +++ { +++ puts ("5th rwlock_unlock failed"); +++ return 1; +++ } +++ puts ("5th rwlock_unlock succeeded"); +++ +++ if (pthread_rwlock_destroy (&r) != 0) +++ { +++ puts ("rwlock_destroy failed"); +++ return 1; +++ } +++ puts ("rwlock_destroy succeeded"); +++ +++ return 0; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-rwlock10.c ++@@ -0,0 +1,20 @@ +++/* Test program for timedout read/write lock functions. +++ Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ Contributed by Ulrich Drepper , 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, see . */ +++ +++#define INIT PTHREAD_RWLOCK_INITIALIZER +++#include "tst-rwlock8.c" ++--- /dev/null +++++ b/fbtl/tst-rwlock11.c ++@@ -0,0 +1,20 @@ +++/* Test program for timedout read/write lock functions. +++ Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ Contributed by Ulrich Drepper , 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, see . */ +++ +++#define INIT PTHREAD_RWLOCK_INITIALIZER +++#include "tst-rwlock9.c" ++--- /dev/null +++++ b/fbtl/tst-rwlock12.c ++@@ -0,0 +1,207 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++static int +++do_test (void) +++{ +++ size_t ps = sysconf (_SC_PAGESIZE); +++ char tmpfname[] = "/tmp/tst-rwlock12.XXXXXX"; +++ char data[ps]; +++ void *mem; +++ int fd; +++ pthread_mutex_t *m; +++ pthread_mutexattr_t ma; +++ pthread_rwlock_t *r; +++ pthread_rwlockattr_t ra; +++ pid_t pid; +++ int status = 0; +++ +++ fd = mkstemp (tmpfname); +++ if (fd == -1) +++ { +++ printf ("cannot open temporary file: %m\n"); +++ return 1; +++ } +++ +++ /* Make sure it is always removed. */ +++ unlink (tmpfname); +++ +++ /* Create one page of data. */ +++ memset (data, '\0', ps); +++ +++ /* Write the data to the file. */ +++ if (write (fd, data, ps) != (ssize_t) ps) +++ { +++ puts ("short write"); +++ return 1; +++ } +++ +++ mem = mmap (NULL, ps, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); +++ if (mem == MAP_FAILED) +++ { +++ printf ("mmap failed: %m\n"); +++ return 1; +++ } +++ +++ r = (pthread_rwlock_t *) (((uintptr_t) mem + __alignof (pthread_rwlock_t)) +++ & ~(__alignof (pthread_rwlock_t) - 1)); +++ /* The following assumes alignment for a mutex is at least as high +++ as that for a rwlock. Which is true in our case. */ +++ m = (pthread_mutex_t *) (r + 1); +++ +++ if (pthread_rwlockattr_init (&ra) != 0) +++ { +++ puts ("rwlockattr_init failed"); +++ return 1; +++ } +++ +++ if (pthread_rwlockattr_setpshared (&ra, PTHREAD_PROCESS_SHARED) != 0) +++ { +++ puts ("rwlockattr_setpshared failed"); +++ return 1; +++ } +++ +++ if (pthread_rwlock_init (r, &ra) != 0) +++ { +++ puts ("rwlock_init failed"); +++ return 1; +++ } +++ +++ if (pthread_mutexattr_init (&ma) != 0) +++ { +++ puts ("rwlockattr_init failed"); +++ return 1; +++ } +++ +++ if (pthread_mutexattr_setpshared (&ma, PTHREAD_PROCESS_SHARED) != 0) +++ { +++ puts ("mutexattr_setpshared failed"); +++ return 1; +++ } +++ +++ if (pthread_mutex_init (m, &ma) != 0) +++ { +++ puts ("mutex_init failed"); +++ return 1; +++ } +++ +++ /* Lock the mutex. */ +++ if (pthread_mutex_lock (m) != 0) +++ { +++ puts ("mutex_lock failed"); +++ return 1; +++ } +++ +++ puts ("going to fork now"); +++ pid = fork (); +++ if (pid == -1) +++ { +++ puts ("fork failed"); +++ return 1; +++ } +++ else if (pid == 0) +++ { +++ /* Lock the mutex. */ +++ if (pthread_mutex_lock (m) != 0) +++ { +++ puts ("child: mutex_lock failed"); +++ return 1; +++ } +++ +++ /* Try to get the rwlock. */ +++ if (pthread_rwlock_trywrlock (r) == 0) +++ { +++ puts ("rwlock_trywrlock succeeded"); +++ return 1; +++ } +++ +++ /* Try again. */ +++ struct timespec ts = { .tv_sec = 0, .tv_nsec = 500000000 }; +++ int e = pthread_rwlock_timedwrlock (r, &ts); +++ if (e == 0) +++ { +++ puts ("rwlock_timedwrlock succeeded"); +++ return 1; +++ } +++ if (e != ETIMEDOUT) +++ { +++ puts ("rwlock_timedwrlock didn't return ETIMEDOUT"); +++ status = 1; +++ } +++ +++ if (pthread_rwlock_tryrdlock (r) == 0) +++ { +++ puts ("rwlock_tryrdlock succeeded"); +++ return 1; +++ } +++ +++ e = pthread_rwlock_timedrdlock (r, &ts); +++ if (e == 0) +++ { +++ puts ("rwlock_timedrdlock succeeded"); +++ return 1; +++ } +++ if (e != ETIMEDOUT) +++ { +++ puts ("rwlock_timedrdlock didn't return ETIMEDOUT"); +++ status = 1; +++ } +++ } +++ else +++ { +++ /* Lock the rwlock for writing. */ +++ if (pthread_rwlock_wrlock (r) != 0) +++ { +++ puts ("rwlock_wrlock failed"); +++ kill (pid, SIGTERM); +++ return 1; +++ } +++ +++ /* Allow the child to run. */ +++ if (pthread_mutex_unlock (m) != 0) +++ { +++ puts ("mutex_unlock failed"); +++ kill (pid, SIGTERM); +++ return 1; +++ } +++ +++ /* Just wait for the child. */ +++ if (TEMP_FAILURE_RETRY (waitpid (pid, &status, 0)) != pid) +++ { +++ puts ("waitpid failed"); +++ kill (pid, SIGTERM); +++ return 1; +++ } +++ } +++ +++ return status; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-rwlock13.c ++@@ -0,0 +1,70 @@ +++/* Copyright (C) 2004-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 +++ . */ +++ +++#include +++#include +++#include +++ +++ +++static int +++do_test (void) +++{ +++ pthread_rwlock_t r; +++ int ret; +++ +++ memset (&r, 0xaa, sizeof (r)); +++ if ((ret = pthread_rwlock_init (&r, NULL)) != 0) +++ { +++ printf ("rwlock_init failed: %d\n", ret); +++ return 1; +++ } +++ +++ if ((ret = pthread_rwlock_rdlock (&r)) != 0) +++ { +++ printf ("rwlock_rdlock failed: %d\n", ret); +++ return 1; +++ } +++ +++ if ((ret = pthread_rwlock_unlock (&r)) != 0) +++ { +++ printf ("rwlock_unlock failed: %d\n", ret); +++ return 1; +++ } +++ +++ if ((ret = pthread_rwlock_wrlock (&r)) != 0) +++ { +++ printf ("rwlock_wrlock failed: %d\n", ret); +++ return 1; +++ } +++ +++ if ((ret = pthread_rwlock_unlock (&r)) != 0) +++ { +++ printf ("second rwlock_unlock failed: %d\n", ret); +++ return 1; +++ } +++ +++ if ((ret = pthread_rwlock_destroy (&r)) != 0) +++ { +++ printf ("second rwlock_destroy failed: %d\n", ret); +++ return 1; +++ } +++ +++ return 0; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-rwlock14.c ++@@ -0,0 +1,168 @@ +++/* Copyright (C) 2004-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 2004. +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public +++ License as published by the Free Software Foundation; either +++ version 2.1 of the License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General Public License 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 +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++ +++ +++static pthread_barrier_t b; +++static pthread_rwlock_t r = PTHREAD_RWLOCK_INITIALIZER; +++ +++ +++static void * +++tf (void *arg) +++{ +++ /* Lock the read-write lock. */ +++ if (pthread_rwlock_wrlock (&r) != 0) +++ { +++ puts ("tf: cannot lock rwlock"); +++ exit (EXIT_FAILURE); +++ } +++ +++ pthread_t mt = *(pthread_t *) arg; +++ +++ pthread_barrier_wait (&b); +++ +++ /* This call will never return. */ +++ pthread_join (mt, NULL); +++ +++ return NULL; +++} +++ +++ +++static int +++do_test (void) +++{ +++ int result = 0; +++ struct timespec ts; +++ +++ if (clock_gettime (CLOCK_REALTIME, &ts) != 0) +++ { +++ puts ("clock_gettime failed"); +++ return 1; +++ } +++ +++ if (pthread_barrier_init (&b, NULL, 2) != 0) +++ { +++ puts ("barrier_init failed"); +++ return 1; +++ } +++ +++ pthread_t me = pthread_self (); +++ pthread_t th; +++ if (pthread_create (&th, NULL, tf, &me) != 0) +++ { +++ puts ("create failed"); +++ return 1; +++ } +++ +++ /* Wait until the rwlock is locked. */ +++ pthread_barrier_wait (&b); +++ +++ ts.tv_nsec = -1; +++ +++ int e = pthread_rwlock_timedrdlock (&r, &ts); +++ if (e == 0) +++ { +++ puts ("first rwlock_timedrdlock did not fail"); +++ result = 1; +++ } +++ else if (e != EINVAL) +++ { +++ puts ("first rwlock_timedrdlock did not return EINVAL"); +++ result = 1; +++ } +++ +++ e = pthread_rwlock_timedwrlock (&r, &ts); +++ if (e == 0) +++ { +++ puts ("first rwlock_timedwrlock did not fail"); +++ result = 1; +++ } +++ else if (e != EINVAL) +++ { +++ puts ("first rwlock_timedwrlock did not return EINVAL"); +++ result = 1; +++ } +++ +++ ts.tv_nsec = 1000000000; +++ +++ e = pthread_rwlock_timedrdlock (&r, &ts); +++ if (e == 0) +++ { +++ puts ("second rwlock_timedrdlock did not fail"); +++ result = 1; +++ } +++ else if (e != EINVAL) +++ { +++ puts ("second rwlock_timedrdlock did not return EINVAL"); +++ result = 1; +++ } +++ +++ e = pthread_rwlock_timedrdlock (&r, &ts); +++ if (e == 0) +++ { +++ puts ("second rwlock_timedrdlock did not fail"); +++ result = 1; +++ } +++ else if (e != EINVAL) +++ { +++ puts ("second rwlock_timedrdlock did not return EINVAL"); +++ result = 1; +++ } +++ +++ ts.tv_nsec = (__typeof (ts.tv_nsec)) 0x100001000LL; +++ if ((__typeof (ts.tv_nsec)) 0x100001000LL != 0x100001000LL) +++ ts.tv_nsec = 2000000000; +++ +++ e = pthread_rwlock_timedrdlock (&r, &ts); +++ if (e == 0) +++ { +++ puts ("third rwlock_timedrdlock did not fail"); +++ result = 1; +++ } +++ else if (e != EINVAL) +++ { +++ puts ("third rwlock_timedrdlock did not return EINVAL"); +++ result = 1; +++ } +++ +++ e = pthread_rwlock_timedrdlock (&r, &ts); +++ if (e == 0) +++ { +++ puts ("third rwlock_timedrdlock did not fail"); +++ result = 1; +++ } +++ else if (e != EINVAL) +++ { +++ puts ("third rwlock_timedrdlock did not return EINVAL"); +++ result = 1; +++ } +++ +++ if (result == 0) +++ puts ("no bugs"); +++ +++ return result; +++} +++ +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-rwlock2.c ++@@ -0,0 +1,168 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++ +++ +++static int +++do_test (void) +++{ +++ pthread_rwlock_t r; +++ pthread_rwlockattr_t at; +++ int e; +++ +++ if (pthread_rwlockattr_init (&at) != 0) +++ { +++ puts ("rwlockattr_init failed"); +++ return 1; +++ } +++ puts ("rwlockattr_init succeeded"); +++ +++#ifndef TYPE +++# define TYPE PTHREAD_RWLOCK_PREFER_READER_NP +++#endif +++ +++ if (pthread_rwlockattr_setkind_np (&at, TYPE) != 0) +++ { +++ puts ("rwlockattr_setkind failed"); +++ return 1; +++ } +++ puts ("rwlockattr_setkind succeeded"); +++ +++ if (pthread_rwlock_init (&r, &at) != 0) +++ { +++ puts ("rwlock_init failed"); +++ return 1; +++ } +++ puts ("rwlock_init succeeded"); +++ +++ if (pthread_rwlockattr_destroy (&at) != 0) +++ { +++ puts ("rwlockattr_destroy failed"); +++ return 1; +++ } +++ puts ("rwlockattr_destroy succeeded"); +++ +++ if (pthread_rwlock_wrlock (&r) != 0) +++ { +++ puts ("1st rwlock_wrlock failed"); +++ return 1; +++ } +++ puts ("1st rwlock_wrlock succeeded"); +++ +++ e = pthread_rwlock_tryrdlock (&r); +++ if (e == 0) +++ { +++ puts ("rwlock_tryrdlock on rwlock with writer succeeded"); +++ return 1; +++ } +++ if (e != EBUSY) +++ { +++ puts ("rwlock_tryrdlock on rwlock with writer return value != EBUSY"); +++ return 1; +++ } +++ puts ("rwlock_tryrdlock on rwlock with writer failed with EBUSY"); +++ +++ e = pthread_rwlock_trywrlock (&r); +++ if (e == 0) +++ { +++ puts ("rwlock_trywrlock on rwlock with writer succeeded"); +++ return 1; +++ } +++ if (e != EBUSY) +++ { +++ puts ("rwlock_trywrlock on rwlock with writer return value != EBUSY"); +++ return 1; +++ } +++ puts ("rwlock_trywrlock on rwlock with writer failed with EBUSY"); +++ +++ if (pthread_rwlock_unlock (&r) != 0) +++ { +++ puts ("1st rwlock_unlock failed"); +++ return 1; +++ } +++ puts ("1st rwlock_unlock succeeded"); +++ +++ if (pthread_rwlock_tryrdlock (&r) != 0) +++ { +++ puts ("rwlock_tryrdlock on unlocked rwlock failed"); +++ return 1; +++ } +++ puts ("rwlock_tryrdlock on unlocked rwlock succeeded"); +++ +++ e = pthread_rwlock_trywrlock (&r); +++ if (e == 0) +++ { +++ puts ("rwlock_trywrlock on rwlock with reader succeeded"); +++ return 1; +++ } +++ if (e != EBUSY) +++ { +++ puts ("rwlock_trywrlock on rwlock with reader return value != EBUSY"); +++ return 1; +++ } +++ puts ("rwlock_trywrlock on rwlock with reader failed with EBUSY"); +++ +++ if (pthread_rwlock_unlock (&r) != 0) +++ { +++ puts ("2nd rwlock_unlock failed"); +++ return 1; +++ } +++ puts ("2nd rwlock_unlock succeeded"); +++ +++ if (pthread_rwlock_trywrlock (&r) != 0) +++ { +++ puts ("rwlock_trywrlock on unlocked rwlock failed"); +++ return 1; +++ } +++ puts ("rwlock_trywrlock on unlocked rwlock succeeded"); +++ +++ e = pthread_rwlock_tryrdlock (&r); +++ if (e == 0) +++ { +++ puts ("rwlock_tryrdlock on rwlock with writer succeeded"); +++ return 1; +++ } +++ if (e != EBUSY) +++ { +++ puts ("rwlock_tryrdlock on rwlock with writer return value != EBUSY"); +++ return 1; +++ } +++ puts ("rwlock_tryrdlock on rwlock with writer failed with EBUSY"); +++ +++ if (pthread_rwlock_unlock (&r) != 0) +++ { +++ puts ("3rd rwlock_unlock failed"); +++ return 1; +++ } +++ puts ("3rd rwlock_unlock succeeded"); +++ +++ if (pthread_rwlock_destroy (&r) != 0) +++ { +++ puts ("rwlock_destroy failed"); +++ return 1; +++ } +++ puts ("rwlock_destroy succeeded"); +++ +++ return 0; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-rwlock2a.c ++@@ -0,0 +1,2 @@ +++#define TYPE PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP +++#include "tst-rwlock2.c" ++--- /dev/null +++++ b/fbtl/tst-rwlock3.c ++@@ -0,0 +1,92 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++/* This test case checks more than standard compliance. An +++ implementation may provide this service but it is not required to +++ do so. */ +++ +++#include +++#include +++#include +++ +++ +++static int +++do_test (void) +++{ +++ pthread_rwlock_t r; +++ int e; +++ +++ if (pthread_rwlock_init (&r, NULL) != 0) +++ { +++ puts ("rwlock_init failed"); +++ return 1; +++ } +++ puts ("rwlock_init succeeded"); +++ +++ if (pthread_rwlock_trywrlock (&r) != 0) +++ { +++ puts ("rwlock_trywrlock on unlocked rwlock failed"); +++ return 1; +++ } +++ puts ("rwlock_trywrlock on unlocked rwlock succeeded"); +++ +++ e = pthread_rwlock_rdlock (&r); +++ if (e == 0) +++ { +++ puts ("rwlock_rdlock on rwlock with writer succeeded"); +++ return 1; +++ } +++ if (e != EDEADLK) +++ { +++ puts ("rwlock_rdlock on rwlock with writer failed != EDEADLK"); +++ return 1; +++ } +++ puts ("rwlock_rdlock on rwlock with writer failed with EDEADLK"); +++ +++ e = pthread_rwlock_wrlock (&r); +++ if (e == 0) +++ { +++ puts ("rwlock_wrlock on rwlock with writer succeeded"); +++ return 1; +++ } +++ if (e != EDEADLK) +++ { +++ puts ("rwlock_wrlock on rwlock with writer failed != EDEADLK"); +++ return 1; +++ } +++ puts ("rwlock_wrlock on rwlock with writer failed with EDEADLK"); +++ +++ if (pthread_rwlock_unlock (&r) != 0) +++ { +++ puts ("rwlock_unlock failed"); +++ return 1; +++ } +++ puts ("rwlock_unlock succeeded"); +++ +++ if (pthread_rwlock_destroy (&r) != 0) +++ { +++ puts ("rwlock_destroy failed"); +++ return 1; +++ } +++ puts ("rwlock_destroy succeeded"); +++ +++ return 0; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-rwlock4.c ++@@ -0,0 +1,189 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++static int +++do_test (void) +++{ +++ size_t ps = sysconf (_SC_PAGESIZE); +++ char tmpfname[] = "/tmp/tst-rwlock4.XXXXXX"; +++ char data[ps]; +++ void *mem; +++ int fd; +++ pthread_rwlock_t *r; +++ pthread_rwlockattr_t a; +++ pid_t pid; +++ char *p; +++ int err; +++ int s; +++ +++ fd = mkstemp (tmpfname); +++ if (fd == -1) +++ { +++ printf ("cannot open temporary file: %m\n"); +++ return 1; +++ } +++ +++ /* Make sure it is always removed. */ +++ unlink (tmpfname); +++ +++ /* Create one page of data. */ +++ memset (data, '\0', ps); +++ +++ /* Write the data to the file. */ +++ if (write (fd, data, ps) != (ssize_t) ps) +++ { +++ puts ("short write"); +++ return 1; +++ } +++ +++ mem = mmap (NULL, ps, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); +++ if (mem == MAP_FAILED) +++ { +++ printf ("mmap failed: %m\n"); +++ return 1; +++ } +++ +++ r = (pthread_rwlock_t *) (((uintptr_t) mem + __alignof (pthread_rwlock_t)) +++ & ~(__alignof (pthread_rwlock_t) - 1)); +++ p = (char *) (r + 1); +++ +++ if (pthread_rwlockattr_init (&a) != 0) +++ { +++ puts ("rwlockattr_init failed"); +++ return 1; +++ } +++ +++ if (pthread_rwlockattr_getpshared (&a, &s) != 0) +++ { +++ puts ("1st rwlockattr_getpshared failed"); +++ return 1; +++ } +++ +++ if (s != PTHREAD_PROCESS_PRIVATE) +++ { +++ puts ("default pshared value wrong"); +++ return 1; +++ } +++ +++ if (pthread_rwlockattr_setpshared (&a, PTHREAD_PROCESS_SHARED) != 0) +++ { +++ puts ("rwlockattr_setpshared failed"); +++ return 1; +++ } +++ +++ if (pthread_rwlockattr_getpshared (&a, &s) != 0) +++ { +++ puts ("2nd rwlockattr_getpshared failed"); +++ return 1; +++ } +++ +++ if (s != PTHREAD_PROCESS_SHARED) +++ { +++ puts ("pshared value after setpshared call wrong"); +++ return 1; +++ } +++ +++ if (pthread_rwlock_init (r, &a) != 0) +++ { +++ puts ("rwlock_init failed"); +++ return 1; +++ } +++ +++ if (pthread_rwlock_rdlock (r) != 0) +++ { +++ puts ("rwlock_rdlock failed"); +++ return 1; +++ } +++ +++ if (pthread_rwlockattr_destroy (&a) != 0) +++ { +++ puts ("rwlockattr_destroy failed"); +++ return 1; +++ } +++ +++ err = pthread_rwlock_trywrlock (r); +++ if (err == 0) +++ { +++ puts ("rwlock_trywrlock succeeded"); +++ return 1; +++ } +++ else if (err != EBUSY) +++ { +++ puts ("rwlock_trywrlock didn't return EBUSY"); +++ return 1; +++ } +++ +++ *p = 0; +++ +++ puts ("going to fork now"); +++ pid = fork (); +++ if (pid == -1) +++ { +++ puts ("fork failed"); +++ return 1; +++ } +++ else if (pid == 0) +++ { +++ /* Play some lock ping-pong. It's our turn to unlock first. */ +++ if ((*p)++ != 0) +++ { +++ puts ("child: *p != 0"); +++ return 1; +++ } +++ +++ if (pthread_rwlock_unlock (r) != 0) +++ { +++ puts ("child: 1st rwlock_unlock failed"); +++ return 1; +++ } +++ +++ puts ("child done"); +++ } +++ else +++ { +++ if (pthread_rwlock_wrlock (r) != 0) +++ { +++ puts ("parent: rwlock_wrlock failed"); +++ return 1; +++ } +++ +++ if (*p != 1) +++ { +++ puts ("*p != 1"); +++ return 1; +++ } +++ +++ puts ("parent done"); +++ } +++ +++ return 0; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-rwlock5.c ++@@ -0,0 +1,84 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++ +++static int do_test (void); +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" +++ +++static pthread_mutex_t m = PTHREAD_MUTEX_INITIALIZER; +++static pthread_rwlock_t r; +++ +++ +++static void * +++tf (void *arg) +++{ +++ if (pthread_rwlock_wrlock (&r) == 0) +++ { +++ puts ("child: rwlock_wrlock succeeded"); +++ exit (1); +++ } +++ +++ puts ("child: rwlock_wrlock returned"); +++ +++ exit (1); +++} +++ +++ +++static int +++do_test (void) +++{ +++ pthread_t th; +++ +++ if (pthread_rwlock_init (&r, NULL) != 0) +++ { +++ puts ("rwlock_init failed"); +++ return 1; +++ } +++ +++ if (pthread_rwlock_wrlock (&r) != 0) +++ { +++ puts ("rwlock_wrlock failed"); +++ return 1; +++ } +++ +++ if (pthread_mutex_lock (&m) != 0) +++ { +++ puts ("mutex_lock failed"); +++ return 1; +++ } +++ +++ if (pthread_create (&th, NULL, tf, NULL) != 0) +++ { +++ puts ("create failed"); +++ return 1; +++ } +++ +++ delayed_exit (1); +++ /* This call should never return. */ +++ xpthread_mutex_lock (&m); +++ +++ puts ("2nd mutex_lock returned"); +++ return 1; +++} ++--- /dev/null +++++ b/fbtl/tst-rwlock6.c ++@@ -0,0 +1,225 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++static int kind[] = +++ { +++ PTHREAD_RWLOCK_PREFER_READER_NP, +++ PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, +++ PTHREAD_RWLOCK_PREFER_WRITER_NP, +++ }; +++ +++ +++static void * +++tf (void *arg) +++{ +++ pthread_rwlock_t *r = arg; +++ +++ /* Timeout: 0.3 secs. */ +++ struct timeval tv; +++ (void) gettimeofday (&tv, NULL); +++ +++ struct timespec ts; +++ TIMEVAL_TO_TIMESPEC (&tv, &ts); +++ ts.tv_nsec += 300000000; +++ if (ts.tv_nsec >= 1000000000) +++ { +++ ts.tv_nsec -= 1000000000; +++ ++ts.tv_sec; +++ } +++ +++ puts ("child calling timedrdlock"); +++ +++ int err = pthread_rwlock_timedrdlock (r, &ts); +++ if (err == 0) +++ { +++ puts ("rwlock_timedrdlock returned"); +++ pthread_exit ((void *) 1l); +++ } +++ +++ if (err != ETIMEDOUT) +++ { +++ printf ("err = %s (%d), expected %s (%d)\n", +++ strerror (err), err, strerror (ETIMEDOUT), ETIMEDOUT); +++ pthread_exit ((void *) 1l); +++ } +++ +++ puts ("1st child timedrdlock done"); +++ +++ struct timeval tv2; +++ (void) gettimeofday (&tv2, NULL); +++ +++ timersub (&tv2, &tv, &tv); +++ +++ if (tv.tv_usec < 200000) +++ { +++ puts ("timeout too short"); +++ pthread_exit ((void *) 1l); +++ } +++ +++ (void) gettimeofday (&tv, NULL); +++ TIMEVAL_TO_TIMESPEC (&tv, &ts); +++ ts.tv_sec += 10; +++ /* Note that the following operation makes ts invalid. */ +++ ts.tv_nsec += 1000000000; +++ +++ err = pthread_rwlock_timedrdlock (r, &ts); +++ if (err == 0) +++ { +++ puts ("2nd timedrdlock succeeded"); +++ pthread_exit ((void *) 1l); +++ } +++ if (err != EINVAL) +++ { +++ puts ("2nd timedrdlock did not return EINVAL"); +++ pthread_exit ((void *) 1l); +++ } +++ +++ puts ("2nd child timedrdlock done"); +++ +++ return NULL; +++} +++ +++ +++static int +++do_test (void) +++{ +++ size_t cnt; +++ for (cnt = 0; cnt < sizeof (kind) / sizeof (kind[0]); ++cnt) +++ { +++ pthread_rwlock_t r; +++ pthread_rwlockattr_t a; +++ +++ if (pthread_rwlockattr_init (&a) != 0) +++ { +++ printf ("round %Zu: rwlockattr_t failed\n", cnt); +++ exit (1); +++ } +++ +++ if (pthread_rwlockattr_setkind_np (&a, kind[cnt]) != 0) +++ { +++ printf ("round %Zu: rwlockattr_setkind failed\n", cnt); +++ exit (1); +++ } +++ +++ if (pthread_rwlock_init (&r, &a) != 0) +++ { +++ printf ("round %Zu: rwlock_init failed\n", cnt); +++ exit (1); +++ } +++ +++ if (pthread_rwlockattr_destroy (&a) != 0) +++ { +++ printf ("round %Zu: rwlockattr_destroy failed\n", cnt); +++ exit (1); +++ } +++ +++ struct timeval tv; +++ (void) gettimeofday (&tv, NULL); +++ +++ struct timespec ts; +++ TIMEVAL_TO_TIMESPEC (&tv, &ts); +++ +++ ++ts.tv_sec; +++ +++ /* Get a write lock. */ +++ int e = pthread_rwlock_timedwrlock (&r, &ts); +++ if (e != 0) +++ { +++ printf ("round %Zu: rwlock_timedwrlock failed (%d)\n", cnt, e); +++ exit (1); +++ } +++ +++ puts ("1st timedwrlock done"); +++ +++ (void) gettimeofday (&tv, NULL); +++ TIMEVAL_TO_TIMESPEC (&tv, &ts); +++ ++ts.tv_sec; +++ e = pthread_rwlock_timedrdlock (&r, &ts); +++ if (e == 0) +++ { +++ puts ("timedrdlock succeeded"); +++ exit (1); +++ } +++ if (e != EDEADLK) +++ { +++ puts ("timedrdlock did not return EDEADLK"); +++ exit (1); +++ } +++ +++ puts ("1st timedrdlock done"); +++ +++ (void) gettimeofday (&tv, NULL); +++ TIMEVAL_TO_TIMESPEC (&tv, &ts); +++ ++ts.tv_sec; +++ e = pthread_rwlock_timedwrlock (&r, &ts); +++ if (e == 0) +++ { +++ puts ("2nd timedwrlock succeeded"); +++ exit (1); +++ } +++ if (e != EDEADLK) +++ { +++ puts ("2nd timedwrlock did not return EDEADLK"); +++ exit (1); +++ } +++ +++ puts ("2nd timedwrlock done"); +++ +++ pthread_t th; +++ if (pthread_create (&th, NULL, tf, &r) != 0) +++ { +++ printf ("round %Zu: create failed\n", cnt); +++ exit (1); +++ } +++ +++ puts ("started thread"); +++ +++ void *status; +++ if (pthread_join (th, &status) != 0) +++ { +++ printf ("round %Zu: join failed\n", cnt); +++ exit (1); +++ } +++ if (status != NULL) +++ { +++ printf ("failure in round %Zu\n", cnt); +++ exit (1); +++ } +++ +++ puts ("joined thread"); +++ +++ if (pthread_rwlock_destroy (&r) != 0) +++ { +++ printf ("round %Zu: rwlock_destroy failed\n", cnt); +++ exit (1); +++ } +++ } +++ +++ return 0; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-rwlock7.c ++@@ -0,0 +1,181 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++static int kind[] = +++ { +++ PTHREAD_RWLOCK_PREFER_READER_NP, +++ PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, +++ PTHREAD_RWLOCK_PREFER_WRITER_NP, +++ }; +++ +++ +++static void * +++tf (void *arg) +++{ +++ pthread_rwlock_t *r = arg; +++ +++ /* Timeout: 0.3 secs. */ +++ struct timeval tv; +++ (void) gettimeofday (&tv, NULL); +++ +++ struct timespec ts; +++ TIMEVAL_TO_TIMESPEC (&tv, &ts); +++ ts.tv_nsec += 300000000; +++ if (ts.tv_nsec >= 1000000000) +++ { +++ ts.tv_nsec -= 1000000000; +++ ++ts.tv_sec; +++ } +++ +++ int err = pthread_rwlock_timedwrlock (r, &ts); +++ if (err == 0) +++ { +++ puts ("rwlock_timedwrlock returned"); +++ pthread_exit ((void *) 1l); +++ } +++ +++ if (err != ETIMEDOUT) +++ { +++ printf ("err = %s (%d), expected %s (%d)\n", +++ strerror (err), err, strerror (ETIMEDOUT), ETIMEDOUT); +++ pthread_exit ((void *) 1l); +++ } +++ puts ("child: timedwrlock failed with ETIMEDOUT"); +++ +++ struct timeval tv2; +++ (void) gettimeofday (&tv2, NULL); +++ +++ timersub (&tv2, &tv, &tv); +++ +++ if (tv.tv_usec < 200000) +++ { +++ puts ("timeout too short"); +++ pthread_exit ((void *) 1l); +++ } +++ +++ (void) gettimeofday (&tv, NULL); +++ TIMEVAL_TO_TIMESPEC (&tv, &ts); +++ ts.tv_sec += 10; +++ /* Note that the following operation makes ts invalid. */ +++ ts.tv_nsec += 1000000000; +++ +++ err = pthread_rwlock_timedwrlock (r, &ts); +++ if (err == 0) +++ { +++ puts ("2nd timedwrlock succeeded"); +++ pthread_exit ((void *) 1l); +++ } +++ if (err != EINVAL) +++ { +++ puts ("2nd timedwrlock did not return EINVAL"); +++ pthread_exit ((void *) 1l); +++ } +++ puts ("child: timedwrlock failed with EINVAL"); +++ +++ return NULL; +++} +++ +++ +++static int +++do_test (void) +++{ +++ size_t cnt; +++ for (cnt = 0; cnt < sizeof (kind) / sizeof (kind[0]); ++cnt) +++ { +++ pthread_rwlock_t r; +++ pthread_rwlockattr_t a; +++ +++ if (pthread_rwlockattr_init (&a) != 0) +++ { +++ printf ("round %Zu: rwlockattr_t failed\n", cnt); +++ exit (1); +++ } +++ +++ if (pthread_rwlockattr_setkind_np (&a, kind[cnt]) != 0) +++ { +++ printf ("round %Zu: rwlockattr_setkind failed\n", cnt); +++ exit (1); +++ } +++ +++ if (pthread_rwlock_init (&r, &a) != 0) +++ { +++ printf ("round %Zu: rwlock_init failed\n", cnt); +++ exit (1); +++ } +++ +++ if (pthread_rwlockattr_destroy (&a) != 0) +++ { +++ printf ("round %Zu: rwlockattr_destroy failed\n", cnt); +++ exit (1); +++ } +++ +++ struct timeval tv; +++ (void) gettimeofday (&tv, NULL); +++ +++ struct timespec ts; +++ TIMEVAL_TO_TIMESPEC (&tv, &ts); +++ +++ ++ts.tv_sec; +++ +++ /* Get a read lock. */ +++ if (pthread_rwlock_timedrdlock (&r, &ts) != 0) +++ { +++ printf ("round %Zu: rwlock_timedrdlock failed\n", cnt); +++ exit (1); +++ } +++ printf ("%zu: got timedrdlock\n", cnt); +++ +++ pthread_t th; +++ if (pthread_create (&th, NULL, tf, &r) != 0) +++ { +++ printf ("round %Zu: create failed\n", cnt); +++ exit (1); +++ } +++ +++ void *status; +++ if (pthread_join (th, &status) != 0) +++ { +++ printf ("round %Zu: join failed\n", cnt); +++ exit (1); +++ } +++ if (status != NULL) +++ { +++ printf ("failure in round %Zu\n", cnt); +++ exit (1); +++ } +++ +++ if (pthread_rwlock_destroy (&r) != 0) +++ { +++ printf ("round %Zu: rwlock_destroy failed\n", cnt); +++ exit (1); +++ } +++ } +++ +++ return 0; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-rwlock8.c ++@@ -0,0 +1,163 @@ +++/* Test program for timedout read/write lock functions. +++ Copyright (C) 2000-2013 Free Software Foundation, Inc. +++ Contributed by Ulrich Drepper , 2000. +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public License as +++ published by the Free Software Foundation; either version 2.1 of the +++ License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General 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, see . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++#define NWRITERS 15 +++#define WRITETRIES 10 +++#define NREADERS 15 +++#define READTRIES 15 +++ +++#define DELAY 1000000 +++ +++#ifndef INIT +++# define INIT PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP +++#endif +++ +++static pthread_rwlock_t lock = INIT; +++ +++ +++static void * +++writer_thread (void *nr) +++{ +++ struct timespec delay; +++ int n; +++ +++ delay.tv_sec = 0; +++ delay.tv_nsec = DELAY; +++ +++ for (n = 0; n < WRITETRIES; ++n) +++ { +++ printf ("writer thread %ld tries again\n", (long int) nr); +++ +++ if (pthread_rwlock_wrlock (&lock) != 0) +++ { +++ puts ("wrlock failed"); +++ exit (1); +++ } +++ +++ printf ("writer thread %ld succeeded\n", (long int) nr); +++ +++ nanosleep (&delay, NULL); +++ +++ if (pthread_rwlock_unlock (&lock) != 0) +++ { +++ puts ("unlock for writer failed"); +++ exit (1); +++ } +++ +++ printf ("writer thread %ld released\n", (long int) nr); +++ } +++ +++ return NULL; +++} +++ +++ +++static void * +++reader_thread (void *nr) +++{ +++ struct timespec delay; +++ int n; +++ +++ delay.tv_sec = 0; +++ delay.tv_nsec = DELAY; +++ +++ for (n = 0; n < READTRIES; ++n) +++ { +++ printf ("reader thread %ld tries again\n", (long int) nr); +++ +++ if (pthread_rwlock_rdlock (&lock) != 0) +++ { +++ puts ("rdlock failed"); +++ exit (1); +++ } +++ +++ printf ("reader thread %ld succeeded\n", (long int) nr); +++ +++ nanosleep (&delay, NULL); +++ +++ if (pthread_rwlock_unlock (&lock) != 0) +++ { +++ puts ("unlock for reader failed"); +++ exit (1); +++ } +++ +++ printf ("reader thread %ld released\n", (long int) nr); +++ } +++ +++ return NULL; +++} +++ +++ +++static int +++do_test (void) +++{ +++ pthread_t thwr[NWRITERS]; +++ pthread_t thrd[NREADERS]; +++ int n; +++ void *res; +++ +++ /* Make standard error the same as standard output. */ +++ dup2 (1, 2); +++ +++ /* Make sure we see all message, even those on stdout. */ +++ setvbuf (stdout, NULL, _IONBF, 0); +++ +++ for (n = 0; n < NWRITERS; ++n) +++ if (pthread_create (&thwr[n], NULL, writer_thread, +++ (void *) (long int) n) != 0) +++ { +++ puts ("writer create failed"); +++ exit (1); +++ } +++ +++ for (n = 0; n < NREADERS; ++n) +++ if (pthread_create (&thrd[n], NULL, reader_thread, +++ (void *) (long int) n) != 0) +++ { +++ puts ("reader create failed"); +++ exit (1); +++ } +++ +++ /* Wait for all the threads. */ +++ for (n = 0; n < NWRITERS; ++n) +++ if (pthread_join (thwr[n], &res) != 0) +++ { +++ puts ("writer join failed"); +++ exit (1); +++ } +++ for (n = 0; n < NREADERS; ++n) +++ if (pthread_join (thrd[n], &res) != 0) +++ { +++ puts ("reader join failed"); +++ exit (1); +++ } +++ +++ return 0; +++} +++ +++#define TIMEOUT 30 +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-rwlock9.c ++@@ -0,0 +1,202 @@ +++/* Test program for timedout read/write lock functions. +++ Copyright (C) 2000-2013 Free Software Foundation, Inc. +++ Contributed by Ulrich Drepper , 2000. +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public License as +++ published by the Free Software Foundation; either version 2.1 of the +++ License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General 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, see . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++#define NWRITERS 15 +++#define WRITETRIES 10 +++#define NREADERS 15 +++#define READTRIES 15 +++ +++#define TIMEOUT 1000000 +++#define DELAY 1000000 +++ +++#ifndef INIT +++# define INIT PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP +++#endif +++ +++static pthread_rwlock_t lock = INIT; +++ +++ +++static void * +++writer_thread (void *nr) +++{ +++ struct timespec ts; +++ struct timespec delay; +++ int n; +++ +++ delay.tv_sec = 0; +++ delay.tv_nsec = DELAY; +++ +++ for (n = 0; n < WRITETRIES; ++n) +++ { +++ int e; +++ do +++ { +++ struct timeval tv; +++ (void) gettimeofday (&tv, NULL); +++ TIMEVAL_TO_TIMESPEC (&tv, &ts); +++ +++ ts.tv_nsec += 2 * TIMEOUT; +++ if (ts.tv_nsec >= 1000000000) +++ { +++ ts.tv_nsec -= 1000000000; +++ ++ts.tv_sec; +++ } +++ +++ printf ("writer thread %ld tries again\n", (long int) nr); +++ +++ e = pthread_rwlock_timedwrlock (&lock, &ts); +++ if (e != 0 && e != ETIMEDOUT) +++ { +++ puts ("timedwrlock failed"); +++ exit (1); +++ } +++ } +++ while (e == ETIMEDOUT); +++ +++ printf ("writer thread %ld succeeded\n", (long int) nr); +++ +++ nanosleep (&delay, NULL); +++ +++ if (pthread_rwlock_unlock (&lock) != 0) +++ { +++ puts ("unlock for writer failed"); +++ exit (1); +++ } +++ +++ printf ("writer thread %ld released\n", (long int) nr); +++ } +++ +++ return NULL; +++} +++ +++ +++static void * +++reader_thread (void *nr) +++{ +++ struct timespec ts; +++ struct timespec delay; +++ int n; +++ +++ delay.tv_sec = 0; +++ delay.tv_nsec = DELAY; +++ +++ for (n = 0; n < READTRIES; ++n) +++ { +++ int e; +++ do +++ { +++ struct timeval tv; +++ (void) gettimeofday (&tv, NULL); +++ TIMEVAL_TO_TIMESPEC (&tv, &ts); +++ +++ ts.tv_nsec += TIMEOUT; +++ if (ts.tv_nsec >= 1000000000) +++ { +++ ts.tv_nsec -= 1000000000; +++ ++ts.tv_sec; +++ } +++ +++ printf ("reader thread %ld tries again\n", (long int) nr); +++ +++ e = pthread_rwlock_timedrdlock (&lock, &ts); +++ if (e != 0 && e != ETIMEDOUT) +++ { +++ puts ("timedrdlock failed"); +++ exit (1); +++ } +++ } +++ while (e == ETIMEDOUT); +++ +++ printf ("reader thread %ld succeeded\n", (long int) nr); +++ +++ nanosleep (&delay, NULL); +++ +++ if (pthread_rwlock_unlock (&lock) != 0) +++ { +++ puts ("unlock for reader failed"); +++ exit (1); +++ } +++ +++ printf ("reader thread %ld released\n", (long int) nr); +++ } +++ +++ return NULL; +++} +++ +++ +++static int +++do_test (void) +++{ +++ pthread_t thwr[NWRITERS]; +++ pthread_t thrd[NREADERS]; +++ int n; +++ void *res; +++ +++ /* Make standard error the same as standard output. */ +++ dup2 (1, 2); +++ +++ /* Make sure we see all message, even those on stdout. */ +++ setvbuf (stdout, NULL, _IONBF, 0); +++ +++ for (n = 0; n < NWRITERS; ++n) +++ if (pthread_create (&thwr[n], NULL, writer_thread, +++ (void *) (long int) n) != 0) +++ { +++ puts ("writer create failed"); +++ exit (1); +++ } +++ +++ for (n = 0; n < NREADERS; ++n) +++ if (pthread_create (&thrd[n], NULL, reader_thread, +++ (void *) (long int) n) != 0) +++ { +++ puts ("reader create failed"); +++ exit (1); +++ } +++ +++ /* Wait for all the threads. */ +++ for (n = 0; n < NWRITERS; ++n) +++ if (pthread_join (thwr[n], &res) != 0) +++ { +++ puts ("writer join failed"); +++ exit (1); +++ } +++ for (n = 0; n < NREADERS; ++n) +++ if (pthread_join (thrd[n], &res) != 0) +++ { +++ puts ("reader join failed"); +++ exit (1); +++ } +++ +++ return 0; +++} +++ +++#undef TIMEOUT +++#define TIMEOUT 30 +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-sched1.c ++@@ -0,0 +1,97 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++ +++ +++static int global; +++ +++static void * +++tf (void *a) +++{ +++ global = 1; +++ +++ return 0; +++} +++ +++ +++int +++do_test (void) +++{ +++ pthread_t th; +++ pthread_attr_t at; +++ +++ if (pthread_attr_init (&at) != 0) +++ { +++ puts ("attr_init failed"); +++ return 1; +++ } +++ +++ if (pthread_attr_setschedpolicy (&at, SCHED_OTHER) != 0) +++ { +++ puts ("attr_setschedpolicy failed"); +++ return 1; +++ } +++ +++ struct sched_param pa; +++ if (sched_getparam (getpid (), &pa) != 0) +++ { +++ puts ("sched_getschedparam failed"); +++ return 1; +++ } +++ +++ if (pthread_attr_setschedparam (&at, &pa) != 0) +++ { +++ puts ("attr_setschedparam failed"); +++ return 1; +++ } +++ +++ if (pthread_attr_setinheritsched (&at, PTHREAD_EXPLICIT_SCHED) != 0) +++ { +++ puts ("attr_setinheritsched failed"); +++ return 1; +++ } +++ +++ if (pthread_create (&th, &at, tf, NULL) != 0) +++ { +++ puts ("create failed"); +++ return 1; +++ } +++ +++ int e = pthread_join (th, NULL); +++ if (e != 0) +++ { +++ printf ("join failed: %d\n", e); +++ return 1; +++ } +++ +++ if (global == 0) +++ { +++ puts ("thread didn't run"); +++ return 1; +++ } +++ +++ return 0; +++} +++ +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-sem1.c ++@@ -0,0 +1,88 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++ +++ +++static int +++do_test (void) +++{ +++ sem_t s; +++ +++ if (sem_init (&s, 0, 1) == -1) +++ { +++ puts ("init failed"); +++ return 1; +++ } +++ +++ if (TEMP_FAILURE_RETRY (sem_wait (&s)) == -1) +++ { +++ puts ("1st wait failed"); +++ return 1; +++ } +++ +++ if (sem_post (&s) == -1) +++ { +++ puts ("1st post failed"); +++ return 1; +++ } +++ +++ if (TEMP_FAILURE_RETRY (sem_trywait (&s)) == -1) +++ { +++ puts ("1st trywait failed"); +++ return 1; +++ } +++ +++ errno = 0; +++ if (TEMP_FAILURE_RETRY (sem_trywait (&s)) != -1) +++ { +++ puts ("2nd trywait succeeded"); +++ return 1; +++ } +++ else if (errno != EAGAIN) +++ { +++ puts ("2nd trywait did not set errno to EAGAIN"); +++ return 1; +++ } +++ +++ if (sem_post (&s) == -1) +++ { +++ puts ("2nd post failed"); +++ return 1; +++ } +++ +++ if (TEMP_FAILURE_RETRY (sem_wait (&s)) == -1) +++ { +++ puts ("2nd wait failed"); +++ return 1; +++ } +++ +++ if (sem_destroy (&s) == -1) +++ { +++ puts ("destroy failed"); +++ return 1; +++ } +++ +++ return 0; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-sem10.c ++@@ -0,0 +1,87 @@ +++/* Copyright (C) 2007-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Jakub Jelinek , 2007. +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public +++ License as published by the Free Software Foundation; either +++ version 2.1 of the License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General Public License 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 +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++static int +++do_test (void) +++{ +++ sem_t s; +++ if (sem_init (&s, 0, 0) == -1) +++ { +++ puts ("sem_init failed"); +++ return 1; +++ } +++ +++ struct timeval tv; +++ if (gettimeofday (&tv, NULL) != 0) +++ { +++ puts ("gettimeofday failed"); +++ return 1; +++ } +++ +++ struct timespec ts; +++ TIMEVAL_TO_TIMESPEC (&tv, &ts); +++ +++ /* Set ts to yesterday. */ +++ ts.tv_sec -= 86400; +++ +++ int type_before; +++ if (pthread_setcanceltype (PTHREAD_CANCEL_DEFERRED, &type_before) != 0) +++ { +++ puts ("first pthread_setcanceltype failed"); +++ return 1; +++ } +++ +++ errno = 0; +++ if (TEMP_FAILURE_RETRY (sem_timedwait (&s, &ts)) != -1) +++ { +++ puts ("sem_timedwait succeeded"); +++ return 1; +++ } +++ if (errno != ETIMEDOUT) +++ { +++ printf ("sem_timedwait return errno = %d instead of ETIMEDOUT\n", +++ errno); +++ return 1; +++ } +++ +++ int type_after; +++ if (pthread_setcanceltype (PTHREAD_CANCEL_DEFERRED, &type_after) != 0) +++ { +++ puts ("second pthread_setcanceltype failed"); +++ return 1; +++ } +++ if (type_after != PTHREAD_CANCEL_DEFERRED) +++ { +++ puts ("sem_timedwait changed cancellation type"); +++ return 1; +++ } +++ +++ return 0; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-sem11-static.c ++@@ -0,0 +1 @@ +++#include "tst-sem11.c" ++--- /dev/null +++++ b/fbtl/tst-sem11.c ++@@ -0,0 +1,78 @@ +++#include +++#include +++#include +++#include +++#include +++ +++#ifndef SEM_WAIT +++# define SEM_WAIT(s) sem_wait (s) +++#endif +++ +++static void * +++tf (void *arg) +++{ +++#ifdef PREPARE +++ PREPARE +++#endif +++ SEM_WAIT (arg); +++ return NULL; +++} +++ +++int +++main (void) +++{ +++ int tries = 5; +++ pthread_t th; +++ union +++ { +++ sem_t s; +++ struct new_sem ns; +++ } u; +++ again: +++ if (sem_init (&u.s, 0, 0) != 0) +++ { +++ puts ("sem_init failed"); +++ return 1; +++ } +++ +++ if (u.ns.nwaiters != 0) +++ { +++ puts ("nwaiters not initialized"); +++ return 1; +++ } +++ +++ if (pthread_create (&th, NULL, tf, &u.s) != 0) +++ { +++ puts ("pthread_create failed"); +++ return 1; +++ } +++ +++ sleep (1); +++ +++ if (pthread_cancel (th) != 0) +++ { +++ puts ("pthread_cancel failed"); +++ return 1; +++ } +++ +++ void *r; +++ if (pthread_join (th, &r) != 0) +++ { +++ puts ("pthread_join failed"); +++ return 1; +++ } +++ if (r != PTHREAD_CANCELED && --tries > 0) +++ { +++ /* Maybe we get the scheduling right the next time. */ +++ sem_destroy (&u.s); +++ goto again; +++ } +++ +++ if (u.ns.nwaiters != 0) +++ { +++ puts ("nwaiters not reset"); +++ return 1; +++ } +++ +++ return 0; +++} ++--- /dev/null +++++ b/fbtl/tst-sem12-static.c ++@@ -0,0 +1 @@ +++#include "tst-sem12.c" ++--- /dev/null +++++ b/fbtl/tst-sem12.c ++@@ -0,0 +1,14 @@ +++#include +++#include +++ +++ +++#define PREPARE \ +++ struct timespec ts; \ +++ struct timeval tv; \ +++ gettimeofday (&tv, NULL); \ +++ TIMEVAL_TO_TIMESPEC (&tv, &ts); \ +++ ts.tv_sec += 60; +++ +++#define SEM_WAIT(s) sem_timedwait (s, &ts) +++ +++#include "tst-sem11.c" ++--- /dev/null +++++ b/fbtl/tst-sem13.c ++@@ -0,0 +1,65 @@ +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++static int +++do_test (void) +++{ +++ union +++ { +++ sem_t s; +++ struct new_sem ns; +++ } u; +++ +++ if (sem_init (&u.s, 0, 0) != 0) +++ { +++ puts ("sem_init failed"); +++ return 1; +++ } +++ +++ struct timespec ts = { 0, 1000000001 }; /* Invalid. */ +++ errno = 0; +++ if (sem_timedwait (&u.s, &ts) >= 0) +++ { +++ puts ("sem_timedwait did not fail"); +++ return 1; +++ } +++ if (errno != EINVAL) +++ { +++ perror ("sem_timedwait did not fail with EINVAL"); +++ return 1; +++ } +++ if (u.ns.nwaiters != 0) +++ { +++ printf ("sem_timedwait modified nwaiters: %ld\n", u.ns.nwaiters); +++ return 1; +++ } +++ +++ ts.tv_sec = /* Invalid. */ -2; +++ ts.tv_nsec = 0; +++ errno = 0; +++ if (sem_timedwait (&u.s, &ts) >= 0) +++ { +++ puts ("2nd sem_timedwait did not fail"); +++ return 1; +++ } +++ if (errno != ETIMEDOUT) +++ { +++ perror ("2nd sem_timedwait did not fail with ETIMEDOUT"); +++ return 1; +++ } +++ if (u.ns.nwaiters != 0) +++ { +++ printf ("2nd sem_timedwait modified nwaiters: %ld\n", u.ns.nwaiters); +++ return 1; +++ } +++ +++ return 0; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-sem14.c ++@@ -0,0 +1,92 @@ +++/* Test for sem_post race: bug 14532. +++ Copyright (C) 2012-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 +++ . */ +++ +++#include +++#include +++#include +++ +++#define NTHREADS 10 +++#define NITER 100000 +++ +++sem_t sem; +++int c; +++volatile int thread_fail; +++ +++static void * +++tf (void *arg) +++{ +++ for (int i = 0; i < NITER; i++) +++ { +++ if (sem_wait (&sem) != 0) +++ { +++ perror ("sem_wait"); +++ thread_fail = 1; +++ } +++ ++c; +++ if (sem_post (&sem) != 0) +++ { +++ perror ("sem_post"); +++ thread_fail = 1; +++ } +++ } +++ return NULL; +++} +++ +++static int +++do_test (void) +++{ +++ if (sem_init (&sem, 0, 0) != 0) +++ { +++ perror ("sem_init"); +++ return 1; +++ } +++ +++ pthread_t th[NTHREADS]; +++ for (int i = 0; i < NTHREADS; i++) +++ { +++ if (pthread_create (&th[i], NULL, tf, NULL) != 0) +++ { +++ puts ("pthread_create failed"); +++ return 1; +++ } +++ } +++ +++ if (sem_post (&sem) != 0) +++ { +++ perror ("sem_post"); +++ return 1; +++ } +++ +++ for (int i = 0; i < NTHREADS; i++) +++ if (pthread_join (th[i], NULL) != 0) +++ { +++ puts ("pthread_join failed"); +++ return 1; +++ } +++ +++ if (c != NTHREADS * NITER) +++ { +++ printf ("c = %d, should be %d\n", c, NTHREADS * NITER); +++ return 1; +++ } +++ return thread_fail; +++} +++ +++#define TIMEOUT 10 +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-sem2.c ++@@ -0,0 +1,53 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++ +++static int do_test (void); +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" +++ +++static int +++do_test (void) +++{ +++ sem_t s; +++ +++ if (sem_init (&s, 0, 0) == -1) +++ { +++ puts ("init failed"); +++ return 1; +++ } +++ +++ delayed_exit (1); +++ +++ if (TEMP_FAILURE_RETRY (sem_wait (&s)) == -1) +++ { +++ puts ("wait failed"); +++ return 1; +++ } +++ +++ /* We should never get here. */ +++ puts ("wait succeeded"); +++ return 1; +++} ++--- /dev/null +++++ b/fbtl/tst-sem3.c ++@@ -0,0 +1,141 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++int +++main (void) +++{ +++ size_t ps = sysconf (_SC_PAGESIZE); +++ char tmpfname[] = "/tmp/tst-sem3.XXXXXX"; +++ char data[ps]; +++ void *mem; +++ int fd; +++ sem_t *s; +++ pid_t pid; +++ char *p; +++ +++ fd = mkstemp (tmpfname); +++ if (fd == -1) +++ { +++ printf ("cannot open temporary file: %m\n"); +++ exit (1); +++ } +++ +++ /* Make sure it is always removed. */ +++ unlink (tmpfname); +++ +++ /* Create one page of data. */ +++ memset (data, '\0', ps); +++ +++ /* Write the data to the file. */ +++ if (write (fd, data, ps) != (ssize_t) ps) +++ { +++ puts ("short write"); +++ exit (1); +++ } +++ +++ mem = mmap (NULL, ps, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); +++ if (mem == MAP_FAILED) +++ { +++ printf ("mmap failed: %m\n"); +++ exit (1); +++ } +++ +++ s = (sem_t *) (((uintptr_t) mem + __alignof (sem_t)) +++ & ~(__alignof (sem_t) - 1)); +++ p = (char *) (s + 1); +++ +++ if (sem_init (s, 1, 1) == -1) +++ { +++ puts ("init failed"); +++ exit (1); +++ } +++ +++ if (TEMP_FAILURE_RETRY (sem_wait (s)) == -1) +++ { +++ puts ("1st wait failed"); +++ exit (1); +++ } +++ +++ errno = 0; +++ if (TEMP_FAILURE_RETRY (sem_trywait (s)) != -1) +++ { +++ puts ("trywait succeeded"); +++ exit (1); +++ } +++ else if (errno != EAGAIN) +++ { +++ puts ("trywait didn't return EAGAIN"); +++ exit (1); +++ } +++ +++ *p = 0; +++ +++ puts ("going to fork now"); +++ pid = fork (); +++ if (pid == -1) +++ { +++ puts ("fork failed"); +++ exit (1); +++ } +++ else if (pid == 0) +++ { +++ /* Play some lock ping-pong. It's our turn to unlock first. */ +++ if ((*p)++ != 0) +++ { +++ puts ("child: *p != 0"); +++ exit (1); +++ } +++ +++ if (sem_post (s) == -1) +++ { +++ puts ("child: 1st post failed"); +++ exit (1); +++ } +++ +++ puts ("child done"); +++ } +++ else +++ { +++ if (TEMP_FAILURE_RETRY (sem_wait (s)) == -1) +++ { +++ printf ("parent: 2nd wait failed: %m\n"); +++ exit (1); +++ } +++ +++ if (*p != 1) +++ { +++ puts ("*p != 1"); +++ exit (1); +++ } +++ +++ puts ("parent done"); +++ } +++ +++ exit (0); +++} ++--- /dev/null +++++ b/fbtl/tst-sem4.c ++@@ -0,0 +1,146 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++static void +++remove_sem (int status, void *arg) +++{ +++ sem_unlink (arg); +++} +++ +++ +++int +++main (void) +++{ +++ sem_t *s; +++ sem_t *s2; +++ pid_t pid; +++ int val; +++ +++ s = sem_open ("/glibc-tst-sem4", O_CREAT, 0600, 1); +++ if (s == SEM_FAILED) +++ { +++ if (errno == ENOSYS) +++ { +++ puts ("sem_open not supported. Oh well."); +++ return 0; +++ } +++ +++ /* Maybe the shm filesystem has strict permissions. */ +++ if (errno == EACCES) +++ { +++ puts ("sem_open not allowed. Oh well."); +++ return 0; +++ } +++ +++ printf ("sem_open: %m\n"); +++ return 1; +++ } +++ +++ on_exit (remove_sem, (void *) "/glibc-tst-sem4"); +++ +++ /* We have the semaphore object. Now try again with O_EXCL, this +++ should fail. */ +++ s2 = sem_open ("/glibc-tst-sem4", O_CREAT | O_EXCL, 0600, 1); +++ if (s2 != SEM_FAILED) +++ { +++ puts ("2nd sem_open didn't fail"); +++ return 1; +++ } +++ if (errno != EEXIST) +++ { +++ puts ("2nd sem_open returned wrong error"); +++ return 1; +++ } +++ +++ /* Check the value. */ +++ if (sem_getvalue (s, &val) == -1) +++ { +++ puts ("getvalue failed"); +++ return 1; +++ } +++ if (val != 1) +++ { +++ printf ("initial value wrong: got %d, expected 1\n", val); +++ return 1; +++ } +++ +++ if (TEMP_FAILURE_RETRY (sem_wait (s)) == -1) +++ { +++ puts ("1st sem_wait failed"); +++ return 1; +++ } +++ +++ pid = fork (); +++ if (pid == -1) +++ { +++ printf ("fork failed: %m\n"); +++ return 1; +++ } +++ +++ if (pid == 0) +++ { +++ /* Child. */ +++ +++ /* Check the value. */ +++ if (sem_getvalue (s, &val) == -1) +++ { +++ puts ("child: getvalue failed"); +++ return 1; +++ } +++ if (val != 0) +++ { +++ printf ("child: value wrong: got %d, expect 0\n", val); +++ return 1; +++ } +++ +++ if (sem_post (s) == -1) +++ { +++ puts ("child: post failed"); +++ return 1; +++ } +++ } +++ else +++ { +++ if (TEMP_FAILURE_RETRY (sem_wait (s)) == -1) +++ { +++ puts ("2nd sem_wait failed"); +++ return 1; +++ } +++ +++ if (sem_getvalue (s, &val) == -1) +++ { +++ puts ("parent: 2nd getvalue failed"); +++ return 1; +++ } +++ if (val != 0) +++ { +++ printf ("parent: value wrong: got %d, expected 0\n", val); +++ return 1; +++ } +++ } +++ +++ return 0; +++} ++--- /dev/null +++++ b/fbtl/tst-sem5.c ++@@ -0,0 +1,93 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++static int +++do_test (void) +++{ +++ sem_t s; +++ struct timespec ts; +++ struct timeval tv; +++ +++ if (sem_init (&s, 0, 1) == -1) +++ { +++ puts ("sem_init failed"); +++ return 1; +++ } +++ +++ if (TEMP_FAILURE_RETRY (sem_wait (&s)) == -1) +++ { +++ puts ("sem_wait failed"); +++ return 1; +++ } +++ +++ if (gettimeofday (&tv, NULL) != 0) +++ { +++ puts ("gettimeofday failed"); +++ return 1; +++ } +++ +++ TIMEVAL_TO_TIMESPEC (&tv, &ts); +++ +++ /* We wait for half a second. */ +++ ts.tv_nsec += 500000000; +++ if (ts.tv_nsec >= 1000000000) +++ { +++ ++ts.tv_sec; +++ ts.tv_nsec -= 1000000000; +++ } +++ +++ errno = 0; +++ if (TEMP_FAILURE_RETRY (sem_timedwait (&s, &ts)) != -1) +++ { +++ puts ("sem_timedwait succeeded"); +++ return 1; +++ } +++ if (errno != ETIMEDOUT) +++ { +++ printf ("sem_timedwait return errno = %d instead of ETIMEDOUT\n", +++ errno); +++ return 1; +++ } +++ +++ struct timespec ts2; +++ if (clock_gettime (CLOCK_REALTIME, &ts2) != 0) +++ { +++ puts ("clock_gettime failed"); +++ return 1; +++ } +++ +++ if (ts2.tv_sec < ts.tv_sec +++ || (ts2.tv_sec == ts.tv_sec && ts2.tv_nsec < ts.tv_nsec)) +++ { +++ puts ("timeout too short"); +++ return 1; +++ } +++ +++ return 0; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-sem6.c ++@@ -0,0 +1,80 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++ +++ +++static void +++handler (int sig) +++{ +++ struct sigaction sa; +++ +++ sa.sa_handler = SIG_DFL; +++ sa.sa_flags = 0; +++ sigemptyset (&sa.sa_mask); +++ +++ sigaction (SIGALRM, &sa, NULL); +++ +++ /* Rearm the timer. */ +++ alarm (1); +++} +++ +++ +++static int +++do_test (void) +++{ +++ sem_t s; +++ struct sigaction sa; +++ +++ sa.sa_handler = handler; +++ sa.sa_flags = 0; +++ sigemptyset (&sa.sa_mask); +++ +++ sigaction (SIGALRM, &sa, NULL); +++ +++ if (sem_init (&s, 0, 0) == -1) +++ { +++ puts ("init failed"); +++ return 1; +++ } +++ +++ /* Set an alarm for 1 second. The wrapper will expect this. */ +++ alarm (1); +++ +++ int res = sem_wait (&s); +++ if (res == 0) +++ { +++ puts ("wait succeeded"); +++ return 1; +++ } +++ if (res != -1 || errno != EINTR) +++ { +++ puts ("wait didn't fail with EINTR"); +++ return 1; +++ } +++ +++ return 0; +++} +++ +++#define TIMEOUT 3 +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-sem7.c ++@@ -0,0 +1,108 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++static void +++remove_sem (int status, void *arg) +++{ +++ sem_unlink (arg); +++} +++ +++ +++int +++main (void) +++{ +++ sem_t *s; +++ sem_t *s2; +++ sem_t *s3; +++ +++ s = sem_open ("/glibc-tst-sem7", O_CREAT, 0600, 1); +++ if (s == SEM_FAILED) +++ { +++ if (errno == ENOSYS) +++ { +++ puts ("sem_open not supported. Oh well."); +++ return 0; +++ } +++ +++ /* Maybe the shm filesystem has strict permissions. */ +++ if (errno == EACCES) +++ { +++ puts ("sem_open not allowed. Oh well."); +++ return 0; +++ } +++ +++ printf ("sem_open: %m\n"); +++ return 1; +++ } +++ +++ on_exit (remove_sem, (void *) "/glibc-tst-sem7"); +++ +++ /* We have the semaphore object. Now try again. We should get the +++ same address. */ +++ s2 = sem_open ("/glibc-tst-sem7", O_CREAT, 0600, 1); +++ if (s2 == SEM_FAILED) +++ { +++ puts ("2nd sem_open failed"); +++ return 1; +++ } +++ if (s != s2) +++ { +++ puts ("2nd sem_open didn't return the same address"); +++ return 1; +++ } +++ +++ /* And again, this time without O_CREAT. */ +++ s3 = sem_open ("/glibc-tst-sem7", 0); +++ if (s3 == SEM_FAILED) +++ { +++ puts ("3rd sem_open failed"); +++ return 1; +++ } +++ if (s != s3) +++ { +++ puts ("3rd sem_open didn't return the same address"); +++ return 1; +++ } +++ +++ /* Now close the handle. Three times. */ +++ if (sem_close (s2) != 0) +++ { +++ puts ("1st sem_close failed"); +++ return 1; +++ } +++ if (sem_close (s) != 0) +++ { +++ puts ("2nd sem_close failed"); +++ return 1; +++ } +++ if (sem_close (s3) != 0) +++ { +++ puts ("3rd sem_close failed"); +++ return 1; +++ } +++ +++ return 0; +++} ++--- /dev/null +++++ b/fbtl/tst-sem8.c ++@@ -0,0 +1,73 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++static void +++remove_sem (int status, void *arg) +++{ +++ sem_unlink (arg); +++} +++ +++ +++int +++main (void) +++{ +++ sem_t *s; +++ int i; +++ +++ on_exit (remove_sem, (void *) "/glibc-tst-sem8"); +++ +++ for (i = 0; i < 3; ++i) +++ { +++ s = sem_open ("/glibc-tst-sem8", O_CREAT, 0600, 1); +++ if (s == SEM_FAILED) +++ { +++ if (errno == ENOSYS) +++ { +++ puts ("sem_open not supported. Oh well."); +++ return 0; +++ } +++ +++ /* Maybe the shm filesystem has strict permissions. */ +++ if (errno == EACCES) +++ { +++ puts ("sem_open not allowed. Oh well."); +++ return 0; +++ } +++ +++ printf ("sem_open: %m\n"); +++ return 1; +++ } +++ +++ /* Now close the handle. */ +++ if (sem_close (s) != 0) +++ { +++ puts ("sem_close failed"); +++ return 1; +++ } +++ } +++ +++ return 0; +++} ++--- /dev/null +++++ b/fbtl/tst-sem9.c ++@@ -0,0 +1,80 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++static void +++remove_sem (int status, void *arg) +++{ +++ sem_unlink (arg); +++} +++ +++ +++int +++main (void) +++{ +++ sem_t *s; +++ int i; +++ +++ on_exit (remove_sem, (void *) "/glibc-tst-sem9"); +++ +++ for (i = 0; i < 3; ++i) +++ { +++ s = sem_open ("/glibc-tst-sem9", O_CREAT, 0600, 1); +++ if (s == SEM_FAILED) +++ { +++ if (errno == ENOSYS) +++ { +++ puts ("sem_open not supported. Oh well."); +++ return 0; +++ } +++ +++ /* Maybe the shm filesystem has strict permissions. */ +++ if (errno == EACCES) +++ { +++ puts ("sem_open not allowed. Oh well."); +++ return 0; +++ } +++ +++ printf ("sem_open: %m\n"); +++ return 1; +++ } +++ +++ /* Now close the handle. */ +++ if (sem_close (s) != 0) +++ { +++ puts ("sem_close failed"); +++ return 1; +++ } +++ +++ /* And remove it. */ +++ if (sem_unlink ("/glibc-tst-sem9") != 0) +++ { +++ puts ("sem_unlink failed"); +++ return 1; +++ } +++ } +++ +++ return 0; +++} ++--- /dev/null +++++ b/fbtl/tst-setuid1-static.c ++@@ -0,0 +1 @@ +++#include "tst-setuid1.c" ++--- /dev/null +++++ b/fbtl/tst-setuid1.c ++@@ -0,0 +1,1084 @@ +++/* Copyright (C) 2004-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Jakub Jelinek , 2004. +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public +++ License as published by the Free Software Foundation; either +++ version 2.1 of the License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General Public License 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 +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++static pthread_barrier_t b3, b4; +++static uid_t prev_ruid, prev_euid, prev_suid, nobody_uid; +++static gid_t prev_rgid, prev_egid, prev_sgid, nobody_gid; +++enum ACTION { PREPARE, SET, CHECK_BEFORE, CHECK_AFTER }; +++#define TESTNO(arg) ((long int) (arg) & 0xff) +++#define THREADNO(arg) ((long int) (arg) >> 8) +++ +++ +++static void +++check_prev_uid (int tno) +++{ +++ uid_t ruid, euid, suid; +++ if (getresuid (&ruid, &euid, &suid) < 0) +++ { +++ printf ("getresuid failed: %d %m\n", tno); +++ exit (1); +++ } +++ +++ if (ruid != prev_ruid || euid != prev_euid || suid != prev_suid) +++ { +++ printf ("uids before in %d (%d %d %d) != (%d %d %d)\n", tno, +++ ruid, euid, suid, prev_ruid, prev_euid, prev_suid); +++ exit (1); +++ } +++} +++ +++ +++static void +++check_prev_gid (int tno) +++{ +++ gid_t rgid, egid, sgid; +++ if (getresgid (&rgid, &egid, &sgid) < 0) +++ { +++ printf ("getresgid failed: %d %m\n", tno); +++ exit (1); +++ } +++ +++ if (rgid != prev_rgid || egid != prev_egid || sgid != prev_sgid) +++ { +++ printf ("gids before in %d (%d %d %d) != (%d %d %d)\n", tno, +++ rgid, egid, sgid, prev_rgid, prev_egid, prev_sgid); +++ exit (1); +++ } +++} +++ +++ +++static void +++test_setuid1 (enum ACTION action, int tno) +++{ +++ if (action == PREPARE) +++ return; +++ +++ if (action != CHECK_AFTER) +++ check_prev_uid (tno); +++ +++ if (action == SET && setuid (nobody_uid) < 0) +++ { +++ printf ("setuid failed: %m\n"); +++ exit (1); +++ } +++ +++ if (action != CHECK_BEFORE) +++ { +++ uid_t ruid, euid, suid; +++ if (getresuid (&ruid, &euid, &suid) < 0) +++ { +++ printf ("getresuid failed: %d %m\n", tno); +++ exit (1); +++ } +++ +++ if (ruid != nobody_uid || euid != nobody_uid || suid != nobody_uid) +++ { +++ printf ("after setuid %d (%d %d %d) != (%d %d %d)\n", tno, +++ ruid, euid, suid, nobody_uid, nobody_uid, nobody_uid); +++ exit (1); +++ } +++ } +++} +++ +++ +++static void +++test_setuid2 (enum ACTION action, int tno) +++{ +++ if (action == PREPARE) +++ { +++ if (setresuid (nobody_uid, nobody_uid, -1) < 0) +++ { +++ printf ("setresuid failed: %m\n"); +++ exit (1); +++ } +++ +++ prev_ruid = nobody_uid; +++ prev_euid = nobody_uid; +++ return; +++ } +++ +++ if (action != CHECK_AFTER) +++ check_prev_uid (tno); +++ +++ if (action == SET && setuid (prev_suid) < 0) +++ { +++ printf ("setuid failed: %m\n"); +++ exit (1); +++ } +++ +++ if (action != CHECK_BEFORE) +++ { +++ uid_t ruid, euid, suid; +++ if (getresuid (&ruid, &euid, &suid) < 0) +++ { +++ printf ("getresuid failed: %d %m\n", tno); +++ exit (1); +++ } +++ +++ if (ruid != nobody_uid || euid != prev_suid || suid != prev_suid) +++ { +++ printf ("after setuid %d (%d %d %d) != (%d %d %d)\n", tno, +++ ruid, euid, suid, nobody_uid, prev_suid, prev_suid); +++ exit (1); +++ } +++ } +++} +++ +++ +++static void +++test_seteuid1 (enum ACTION action, int tno) +++{ +++ if (action == PREPARE) +++ return; +++ +++ if (action != CHECK_AFTER) +++ check_prev_uid (tno); +++ +++ if (action == SET && seteuid (nobody_uid) < 0) +++ { +++ printf ("seteuid failed: %m\n"); +++ exit (1); +++ } +++ +++ if (action != CHECK_BEFORE) +++ { +++ uid_t ruid, euid, suid; +++ if (getresuid (&ruid, &euid, &suid) < 0) +++ { +++ printf ("getresuid failed: %d %m\n", tno); +++ exit (1); +++ } +++ +++ if (ruid != prev_ruid || euid != nobody_uid || suid != prev_suid) +++ { +++ printf ("after seteuid %d (%d %d %d) != (%d %d %d)\n", tno, +++ ruid, euid, suid, prev_ruid, nobody_uid, prev_suid); +++ exit (1); +++ } +++ } +++} +++ +++ +++static void +++test_seteuid2 (enum ACTION action, int tno) +++{ +++ if (action == PREPARE) +++ { +++ if (setresuid (nobody_uid, nobody_uid, -1) < 0) +++ { +++ printf ("setresuid failed: %m\n"); +++ exit (1); +++ } +++ +++ prev_ruid = nobody_uid; +++ prev_euid = nobody_uid; +++ nobody_uid = prev_suid; +++ return; +++ } +++ +++ test_seteuid1 (action, tno); +++} +++ +++ +++static void +++test_setreuid1 (enum ACTION action, int tno) +++{ +++ if (action == PREPARE) +++ return; +++ +++ if (action != CHECK_AFTER) +++ check_prev_uid (tno); +++ +++ if (action == SET && setreuid (-1, nobody_uid) < 0) +++ { +++ printf ("setreuid failed: %m\n"); +++ exit (1); +++ } +++ +++ if (action != CHECK_BEFORE) +++ { +++ uid_t ruid, euid, suid, esuid; +++ if (getresuid (&ruid, &euid, &suid) < 0) +++ { +++ printf ("getresuid failed: %d %m\n", tno); +++ exit (1); +++ } +++ +++ if (prev_ruid != nobody_uid) +++ esuid = nobody_uid; +++ else +++ esuid = prev_suid; +++ +++ if (ruid != prev_ruid || euid != nobody_uid || suid != esuid) +++ { +++ printf ("after setreuid %d (%d %d %d) != (%d %d %d)\n", tno, +++ ruid, euid, suid, prev_ruid, nobody_uid, esuid); +++ exit (1); +++ } +++ } +++} +++ +++ +++static void +++test_setreuid2 (enum ACTION action, int tno) +++{ +++ if (action == PREPARE) +++ return; +++ +++ if (action != CHECK_AFTER) +++ check_prev_uid (tno); +++ +++ if (action == SET && setreuid (nobody_uid, -1) < 0) +++ { +++ printf ("setreuid failed: %m\n"); +++ exit (1); +++ } +++ +++ if (action != CHECK_BEFORE) +++ { +++ uid_t ruid, euid, suid; +++ if (getresuid (&ruid, &euid, &suid) < 0) +++ { +++ printf ("getresuid failed: %d %m\n", tno); +++ exit (1); +++ } +++ +++ if (ruid != nobody_uid || euid != prev_euid || suid != prev_euid) +++ { +++ printf ("after setreuid %d (%d %d %d) != (%d %d %d)\n", tno, +++ ruid, euid, suid, nobody_uid, prev_euid, prev_euid); +++ exit (1); +++ } +++ } +++} +++ +++ +++static void +++test_setreuid3 (enum ACTION action, int tno) +++{ +++ if (action == PREPARE) +++ return; +++ +++ if (action != CHECK_AFTER) +++ check_prev_uid (tno); +++ +++ if (action == SET && setreuid (nobody_uid, nobody_uid) < 0) +++ { +++ printf ("setreuid failed: %m\n"); +++ exit (1); +++ } +++ +++ if (action != CHECK_BEFORE) +++ { +++ uid_t ruid, euid, suid; +++ if (getresuid (&ruid, &euid, &suid) < 0) +++ { +++ printf ("getresuid failed: %d %m\n", tno); +++ exit (1); +++ } +++ +++ if (ruid != nobody_uid || euid != nobody_uid || suid != nobody_uid) +++ { +++ printf ("after setreuid %d (%d %d %d) != (%d %d %d)\n", tno, +++ ruid, euid, suid, nobody_uid, nobody_uid, nobody_uid); +++ exit (1); +++ } +++ } +++} +++ +++ +++static void +++test_setreuid4 (enum ACTION action, int tno) +++{ +++ if (action == PREPARE) +++ { +++ if (setresuid (nobody_uid, nobody_uid, -1) < 0) +++ { +++ printf ("setresuid failed: %m\n"); +++ exit (1); +++ } +++ +++ prev_ruid = nobody_uid; +++ prev_euid = nobody_uid; +++ nobody_uid = prev_suid; +++ return; +++ } +++ +++ test_setreuid1 (action, tno); +++} +++ +++ +++static void +++test_setresuid1 (enum ACTION action, int tno) +++{ +++ if (action == PREPARE) +++ return; +++ +++ if (action != CHECK_AFTER) +++ check_prev_uid (tno); +++ +++ if (action == SET && setresuid (-1, nobody_uid, -1) < 0) +++ { +++ printf ("setresuid failed: %m\n"); +++ exit (1); +++ } +++ +++ if (action != CHECK_BEFORE) +++ { +++ uid_t ruid, euid, suid; +++ if (getresuid (&ruid, &euid, &suid) < 0) +++ { +++ printf ("getresuid failed: %d %m\n", tno); +++ exit (1); +++ } +++ +++ if (ruid != prev_ruid || euid != nobody_uid || suid != prev_suid) +++ { +++ printf ("after setresuid %d (%d %d %d) != (%d %d %d)\n", tno, +++ ruid, euid, suid, prev_ruid, nobody_uid, prev_suid); +++ exit (1); +++ } +++ } +++} +++ +++ +++static void +++test_setresuid2 (enum ACTION action, int tno) +++{ +++ if (action == PREPARE) +++ return; +++ +++ if (action != CHECK_AFTER) +++ check_prev_uid (tno); +++ +++ if (action == SET && setresuid (prev_euid, nobody_uid, nobody_uid) < 0) +++ { +++ printf ("setresuid failed: %m\n"); +++ exit (1); +++ } +++ +++ if (action != CHECK_BEFORE) +++ { +++ uid_t ruid, euid, suid; +++ if (getresuid (&ruid, &euid, &suid) < 0) +++ { +++ printf ("getresuid failed: %d %m\n", tno); +++ exit (1); +++ } +++ +++ if (ruid != prev_euid || euid != nobody_uid || suid != nobody_uid) +++ { +++ printf ("after setresuid %d (%d %d %d) != (%d %d %d)\n", tno, +++ ruid, euid, suid, prev_euid, nobody_uid, nobody_uid); +++ exit (1); +++ } +++ } +++} +++ +++ +++static void +++test_setresuid3 (enum ACTION action, int tno) +++{ +++ if (action == PREPARE) +++ return; +++ +++ if (action != CHECK_AFTER) +++ check_prev_uid (tno); +++ +++ if (action == SET && setresuid (nobody_uid, nobody_uid, nobody_uid) < 0) +++ { +++ printf ("setresuid failed: %m\n"); +++ exit (1); +++ } +++ +++ if (action != CHECK_BEFORE) +++ { +++ uid_t ruid, euid, suid; +++ if (getresuid (&ruid, &euid, &suid) < 0) +++ { +++ printf ("getresuid failed: %d %m\n", tno); +++ exit (1); +++ } +++ +++ if (ruid != nobody_uid || euid != nobody_uid || suid != nobody_uid) +++ { +++ printf ("after setresuid %d (%d %d %d) != (%d %d %d)\n", tno, +++ ruid, euid, suid, nobody_uid, nobody_uid, nobody_uid); +++ exit (1); +++ } +++ } +++} +++ +++ +++static void +++test_setresuid4 (enum ACTION action, int tno) +++{ +++ if (action == PREPARE) +++ { +++ if (setresuid (nobody_uid, nobody_uid, -1) < 0) +++ { +++ printf ("setresuid failed: %m\n"); +++ exit (1); +++ } +++ +++ prev_ruid = nobody_uid; +++ prev_euid = nobody_uid; +++ nobody_uid = prev_suid; +++ return; +++ } +++ +++ test_setresuid1 (action, tno); +++} +++ +++ +++static void +++test_setgid1 (enum ACTION action, int tno) +++{ +++ if (action == PREPARE) +++ return; +++ +++ if (action != CHECK_AFTER) +++ check_prev_gid (tno); +++ +++ if (action == SET && setgid (nobody_gid) < 0) +++ { +++ printf ("setgid failed: %m\n"); +++ exit (1); +++ } +++ +++ if (action != CHECK_BEFORE) +++ { +++ gid_t rgid, egid, sgid; +++ if (getresgid (&rgid, &egid, &sgid) < 0) +++ { +++ printf ("getresgid failed: %d %m\n", tno); +++ exit (1); +++ } +++ +++ if (rgid != nobody_gid || egid != nobody_gid || sgid != nobody_gid) +++ { +++ printf ("after setgid %d (%d %d %d) != (%d %d %d)\n", tno, +++ rgid, egid, sgid, nobody_gid, nobody_gid, nobody_gid); +++ exit (1); +++ } +++ } +++} +++ +++ +++static void +++test_setgid2 (enum ACTION action, int tno) +++{ +++ if (action == PREPARE) +++ { +++ if (setresgid (nobody_gid, nobody_gid, -1) < 0) +++ { +++ printf ("setresgid failed: %m\n"); +++ exit (1); +++ } +++ +++ prev_rgid = nobody_gid; +++ prev_egid = nobody_gid; +++ +++ if (setresuid (nobody_uid, nobody_uid, -1) < 0) +++ { +++ printf ("setresuid failed: %m\n"); +++ exit (1); +++ } +++ +++ prev_ruid = nobody_uid; +++ prev_euid = nobody_uid; +++ return; +++ } +++ +++ if (action != CHECK_AFTER) +++ check_prev_gid (tno); +++ +++ if (action == SET && setgid (prev_sgid) < 0) +++ { +++ printf ("setgid failed: %m\n"); +++ exit (1); +++ } +++ +++ if (action != CHECK_BEFORE) +++ { +++ gid_t rgid, egid, sgid; +++ if (getresgid (&rgid, &egid, &sgid) < 0) +++ { +++ printf ("getresgid failed: %d %m\n", tno); +++ exit (1); +++ } +++ +++ if (rgid != nobody_gid || egid != prev_sgid || sgid != prev_sgid) +++ { +++ printf ("after setgid %d (%d %d %d) != (%d %d %d)\n", tno, +++ rgid, egid, sgid, nobody_gid, prev_sgid, prev_sgid); +++ exit (1); +++ } +++ } +++} +++ +++ +++static void +++test_setegid1 (enum ACTION action, int tno) +++{ +++ if (action == PREPARE) +++ return; +++ +++ if (action != CHECK_AFTER) +++ check_prev_gid (tno); +++ +++ if (action == SET && setegid (nobody_gid) < 0) +++ { +++ printf ("setegid failed: %m\n"); +++ exit (1); +++ } +++ +++ if (action != CHECK_BEFORE) +++ { +++ gid_t rgid, egid, sgid; +++ if (getresgid (&rgid, &egid, &sgid) < 0) +++ { +++ printf ("getresgid failed: %d %m\n", tno); +++ exit (1); +++ } +++ +++ if (rgid != prev_rgid || egid != nobody_gid || sgid != prev_sgid) +++ { +++ printf ("after setegid %d (%d %d %d) != (%d %d %d)\n", tno, +++ rgid, egid, sgid, prev_rgid, nobody_gid, prev_sgid); +++ exit (1); +++ } +++ } +++} +++ +++ +++static void +++test_setegid2 (enum ACTION action, int tno) +++{ +++ if (action == PREPARE) +++ { +++ if (setresgid (nobody_gid, nobody_gid, -1) < 0) +++ { +++ printf ("setresgid failed: %m\n"); +++ exit (1); +++ } +++ +++ prev_rgid = nobody_gid; +++ prev_egid = nobody_gid; +++ nobody_gid = prev_sgid; +++ return; +++ } +++ +++ test_setegid1 (action, tno); +++} +++ +++ +++static void +++test_setregid1 (enum ACTION action, int tno) +++{ +++ if (action == PREPARE) +++ return; +++ +++ if (action != CHECK_AFTER) +++ check_prev_gid (tno); +++ +++ if (action == SET && setregid (-1, nobody_gid) < 0) +++ { +++ printf ("setregid failed: %m\n"); +++ exit (1); +++ } +++ +++ if (action != CHECK_BEFORE) +++ { +++ gid_t rgid, egid, sgid, esgid; +++ if (getresgid (&rgid, &egid, &sgid) < 0) +++ { +++ printf ("getresgid failed: %d %m\n", tno); +++ exit (1); +++ } +++ +++ if (prev_rgid != nobody_gid) +++ esgid = nobody_gid; +++ else +++ esgid = prev_sgid; +++ +++ if (rgid != prev_rgid || egid != nobody_gid || sgid != esgid) +++ { +++ printf ("after setregid %d (%d %d %d) != (%d %d %d)\n", tno, +++ rgid, egid, sgid, prev_rgid, nobody_gid, esgid); +++ exit (1); +++ } +++ } +++} +++ +++ +++static void +++test_setregid2 (enum ACTION action, int tno) +++{ +++ if (action == PREPARE) +++ return; +++ +++ if (action != CHECK_AFTER) +++ check_prev_gid (tno); +++ +++ if (action == SET && setregid (nobody_gid, -1) < 0) +++ { +++ printf ("setregid failed: %m\n"); +++ exit (1); +++ } +++ +++ if (action != CHECK_BEFORE) +++ { +++ gid_t rgid, egid, sgid; +++ if (getresgid (&rgid, &egid, &sgid) < 0) +++ { +++ printf ("getresgid failed: %d %m\n", tno); +++ exit (1); +++ } +++ +++ if (rgid != nobody_gid || egid != prev_egid || sgid != prev_egid) +++ { +++ printf ("after setregid %d (%d %d %d) != (%d %d %d)\n", tno, +++ rgid, egid, sgid, nobody_gid, prev_egid, prev_egid); +++ exit (1); +++ } +++ } +++} +++ +++ +++static void +++test_setregid3 (enum ACTION action, int tno) +++{ +++ if (action == PREPARE) +++ return; +++ +++ if (action != CHECK_AFTER) +++ check_prev_gid (tno); +++ +++ if (action == SET && setregid (nobody_gid, nobody_gid) < 0) +++ { +++ printf ("setregid failed: %m\n"); +++ exit (1); +++ } +++ +++ if (action != CHECK_BEFORE) +++ { +++ gid_t rgid, egid, sgid; +++ if (getresgid (&rgid, &egid, &sgid) < 0) +++ { +++ printf ("getresgid failed: %d %m\n", tno); +++ exit (1); +++ } +++ +++ if (rgid != nobody_gid || egid != nobody_gid || sgid != nobody_gid) +++ { +++ printf ("after setregid %d (%d %d %d) != (%d %d %d)\n", tno, +++ rgid, egid, sgid, nobody_gid, nobody_gid, nobody_gid); +++ exit (1); +++ } +++ } +++} +++ +++ +++static void +++test_setregid4 (enum ACTION action, int tno) +++{ +++ if (action == PREPARE) +++ { +++ if (setresgid (nobody_gid, nobody_gid, -1) < 0) +++ { +++ printf ("setresgid failed: %m\n"); +++ exit (1); +++ } +++ +++ prev_rgid = nobody_gid; +++ prev_egid = nobody_gid; +++ nobody_gid = prev_sgid; +++ return; +++ } +++ +++ test_setregid1 (action, tno); +++} +++ +++ +++static void +++test_setresgid1 (enum ACTION action, int tno) +++{ +++ if (action == PREPARE) +++ return; +++ +++ if (action != CHECK_AFTER) +++ check_prev_gid (tno); +++ +++ if (action == SET && setresgid (-1, nobody_gid, -1) < 0) +++ { +++ printf ("setresgid failed: %m\n"); +++ exit (1); +++ } +++ +++ if (action != CHECK_BEFORE) +++ { +++ gid_t rgid, egid, sgid; +++ if (getresgid (&rgid, &egid, &sgid) < 0) +++ { +++ printf ("getresgid failed: %d %m\n", tno); +++ exit (1); +++ } +++ +++ if (rgid != prev_rgid || egid != nobody_gid || sgid != prev_sgid) +++ { +++ printf ("after setresgid %d (%d %d %d) != (%d %d %d)\n", tno, +++ rgid, egid, sgid, prev_rgid, nobody_gid, prev_sgid); +++ exit (1); +++ } +++ } +++} +++ +++ +++static void +++test_setresgid2 (enum ACTION action, int tno) +++{ +++ if (action == PREPARE) +++ return; +++ +++ if (action != CHECK_AFTER) +++ check_prev_gid (tno); +++ +++ if (action == SET && setresgid (prev_egid, nobody_gid, nobody_gid) < 0) +++ { +++ printf ("setresgid failed: %m\n"); +++ exit (1); +++ } +++ +++ if (action != CHECK_BEFORE) +++ { +++ gid_t rgid, egid, sgid; +++ if (getresgid (&rgid, &egid, &sgid) < 0) +++ { +++ printf ("getresgid failed: %d %m\n", tno); +++ exit (1); +++ } +++ +++ if (rgid != prev_egid || egid != nobody_gid || sgid != nobody_gid) +++ { +++ printf ("after setresgid %d (%d %d %d) != (%d %d %d)\n", tno, +++ rgid, egid, sgid, prev_egid, nobody_gid, nobody_gid); +++ exit (1); +++ } +++ } +++} +++ +++ +++static void +++test_setresgid3 (enum ACTION action, int tno) +++{ +++ if (action == PREPARE) +++ return; +++ +++ if (action != CHECK_AFTER) +++ check_prev_gid (tno); +++ +++ if (action == SET && setresgid (nobody_gid, nobody_gid, nobody_gid) < 0) +++ { +++ printf ("setresgid failed: %m\n"); +++ exit (1); +++ } +++ +++ if (action != CHECK_BEFORE) +++ { +++ gid_t rgid, egid, sgid; +++ if (getresgid (&rgid, &egid, &sgid) < 0) +++ { +++ printf ("getresgid failed: %d %m\n", tno); +++ exit (1); +++ } +++ +++ if (rgid != nobody_gid || egid != nobody_gid || sgid != nobody_gid) +++ { +++ printf ("after setresgid %d (%d %d %d) != (%d %d %d)\n", tno, +++ rgid, egid, sgid, nobody_gid, nobody_gid, nobody_gid); +++ exit (1); +++ } +++ } +++} +++ +++ +++static void +++test_setresgid4 (enum ACTION action, int tno) +++{ +++ if (action == PREPARE) +++ { +++ if (setresgid (nobody_gid, nobody_gid, -1) < 0) +++ { +++ printf ("setresgid failed: %m\n"); +++ exit (1); +++ } +++ +++ prev_rgid = nobody_gid; +++ prev_egid = nobody_gid; +++ nobody_gid = prev_sgid; +++ return; +++ } +++ +++ test_setresgid1 (action, tno); +++} +++ +++ +++static struct setuid_test +++{ +++ const char *name; +++ void (*test) (enum ACTION, int tno); +++} setuid_tests[] = +++{ +++ { "setuid1", test_setuid1 }, +++ { "setuid2", test_setuid2 }, +++ { "seteuid1", test_seteuid1 }, +++ { "seteuid2", test_seteuid2 }, +++ { "setreuid1", test_setreuid1 }, +++ { "setreuid2", test_setreuid2 }, +++ { "setreuid3", test_setreuid3 }, +++ { "setreuid4", test_setreuid4 }, +++ { "setresuid1", test_setresuid1 }, +++ { "setresuid2", test_setresuid2 }, +++ { "setresuid3", test_setresuid3 }, +++ { "setresuid4", test_setresuid4 }, +++ { "setgid1", test_setgid1 }, +++ { "setgid2", test_setgid2 }, +++ { "setegid1", test_setegid1 }, +++ { "setegid2", test_setegid2 }, +++ { "setregid1", test_setregid1 }, +++ { "setregid2", test_setregid2 }, +++ { "setregid3", test_setregid3 }, +++ { "setregid4", test_setregid4 }, +++ { "setresgid1", test_setresgid1 }, +++ { "setresgid2", test_setresgid2 }, +++ { "setresgid3", test_setresgid3 }, +++ { "setresgid4", test_setresgid4 } +++}; +++ +++ +++static void * +++tf2 (void *arg) +++{ +++ int e = pthread_barrier_wait (&b4); +++ if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("barrier_wait failed"); +++ exit (1); +++ } +++ +++ setuid_tests[TESTNO (arg)].test (CHECK_AFTER, THREADNO (arg)); +++ return NULL; +++} +++ +++ +++static void * +++tf (void *arg) +++{ +++ setuid_tests[TESTNO (arg)].test (CHECK_BEFORE, THREADNO (arg)); +++ +++ int e = pthread_barrier_wait (&b3); +++ if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("barrier_wait failed"); +++ exit (1); +++ } +++ +++ return tf2 (arg); +++} +++ +++ +++static int +++do_one_test (long int testno) +++{ +++ printf ("%s test\n", setuid_tests[testno].name); +++ +++ pid_t pid = fork (); +++ if (pid == 0) +++ { +++ setuid_tests[testno].test (PREPARE, 0); +++ setuid_tests[testno].test (SET, 0); +++ exit (0); +++ } +++ +++ if (pid < 0) +++ { +++ printf ("fork failed: %m\n"); +++ exit (1); +++ } +++ +++ int status; +++ if (waitpid (pid, &status, 0) < 0) +++ { +++ printf ("waitpid failed: %m\n"); +++ exit (1); +++ } +++ +++ if (!WIFEXITED (status)) +++ { +++ puts ("child did not exit"); +++ exit (1); +++ } +++ +++ if (WEXITSTATUS (status)) +++ { +++ printf ("skipping %s test\n", setuid_tests[testno].name); +++ return 0; +++ } +++ +++ pid = fork (); +++ if (pid == 0) +++ { +++ setuid_tests[testno].test (PREPARE, 0); +++ +++ pthread_t th; +++ int e = pthread_create (&th, NULL, tf, (void *) (testno | 0x100L)); +++ if (e != 0) +++ { +++ printf ("create failed: %m\n"); +++ exit (1); +++ } +++ +++ pthread_t th2; +++ e = pthread_create (&th2, NULL, tf, (void *) (testno | 0x200L)); +++ if (e != 0) +++ { +++ printf ("create failed: %m\n"); +++ exit (1); +++ } +++ +++ e = pthread_barrier_wait (&b3); +++ if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("barrier_wait failed"); +++ exit (1); +++ } +++ +++ setuid_tests[testno].test (SET, 0); +++ +++ pthread_t th3; +++ e = pthread_create (&th3, NULL, tf2, (void *) (testno | 0x300L)); +++ if (e != 0) +++ { +++ printf ("create failed: %m\n"); +++ exit (1); +++ } +++ +++ e = pthread_barrier_wait (&b4); +++ if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("barrier_wait failed"); +++ exit (1); +++ } +++ +++ exit (0); +++ } +++ +++ if (pid < 0) +++ { +++ printf ("fork failed: %m\n"); +++ exit (1); +++ } +++ +++ if (waitpid (pid, &status, 0) < 0) +++ { +++ printf ("waitpid failed: %m\n"); +++ exit (1); +++ } +++ +++ if (!WIFEXITED (status)) +++ { +++ puts ("second child did not exit"); +++ exit (1); +++ } +++ +++ if (WEXITSTATUS (status)) +++ exit (WEXITSTATUS (status)); +++ +++ return 0; +++} +++ +++ +++static int +++do_test (void) +++{ +++ struct passwd *pwd = getpwnam ("nobody"); +++ if (pwd == NULL) +++ { +++ puts ("User nobody doesn't exist"); +++ return 0; +++ } +++ nobody_uid = pwd->pw_uid; +++ nobody_gid = pwd->pw_gid; +++ +++ if (getresuid (&prev_ruid, &prev_euid, &prev_suid) < 0) +++ { +++ printf ("getresuid failed: %m\n"); +++ exit (1); +++ } +++ +++ if (getresgid (&prev_rgid, &prev_egid, &prev_sgid) < 0) +++ { +++ printf ("getresgid failed: %m\n"); +++ exit (1); +++ } +++ +++ if (prev_ruid == nobody_uid || prev_euid == nobody_uid +++ || prev_suid == nobody_uid) +++ { +++ puts ("already running as user nobody, skipping tests"); +++ exit (0); +++ } +++ +++ if (prev_rgid == nobody_gid || prev_egid == nobody_gid +++ || prev_sgid == nobody_gid) +++ { +++ puts ("already running as group nobody, skipping tests"); +++ exit (0); +++ } +++ +++ if (pthread_barrier_init (&b3, NULL, 3) != 0) +++ { +++ puts ("barrier_init failed"); +++ exit (1); +++ } +++ +++ if (pthread_barrier_init (&b4, NULL, 4) != 0) +++ { +++ puts ("barrier_init failed"); +++ exit (1); +++ } +++ +++ for (unsigned long int testno = 0; +++ testno < sizeof (setuid_tests) / sizeof (setuid_tests[0]); +++ ++testno) +++ do_one_test (testno); +++ return 0; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-signal1.c ++@@ -0,0 +1,188 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++static sigset_t ss; +++static pthread_barrier_t *b; +++ +++ +++static void * +++tf (void *arg) +++{ +++ sigdelset (&ss, SIGINT); +++ +++ if (pthread_sigmask (SIG_SETMASK, &ss, NULL) != 0) +++ { +++ puts ("2nd pthread_sigmask failed"); +++ exit (1); +++ } +++ +++ pthread_barrier_wait (b); +++ +++ int sig; +++ int res = sigwait (&ss, &sig); +++ if (res == 0) +++ { +++ printf ("sigwait returned successfully with signal %d\n", sig); +++ exit (1); +++ } +++ +++ printf ("sigwait returned with %s (%d)\n", strerror (res), res); +++ +++ return NULL; +++} +++ +++ +++static void +++receiver (void) +++{ +++ pthread_t th; +++ +++ /* Make sure the process doesn't run forever. */ +++ alarm (10); +++ +++ sigfillset (&ss); +++ +++ if (pthread_sigmask (SIG_SETMASK, &ss, NULL) != 0) +++ { +++ puts ("1st pthread_sigmask failed"); +++ exit (1); +++ } +++ +++ if (pthread_create (&th, NULL, tf, NULL) != 0) +++ { +++ puts ("pthread_create failed"); +++ exit (1); +++ } +++ +++ if (pthread_join (th, NULL) == 0) +++ { +++ puts ("thread joined?!"); +++ exit (1); +++ } +++ +++ _exit (0); +++} +++ +++ +++static int +++do_test (void) +++{ +++ char tmp[] = "/tmp/tst-signal1-XXXXXX"; +++ +++ int fd = mkstemp (tmp); +++ if (fd == -1) +++ { +++ puts ("mkstemp failed"); +++ exit (1); +++ } +++ +++ unlink (tmp); +++ +++ int i; +++ for (i = 0; i < 20; ++i) +++ write (fd, "foobar xyzzy", 12); +++ +++ b = mmap (NULL, sizeof (pthread_barrier_t), PROT_READ | PROT_WRITE, +++ MAP_SHARED, fd, 0); +++ if (b == MAP_FAILED) +++ { +++ puts ("mmap failed"); +++ exit (1); +++ } +++ +++ pthread_barrierattr_t ba; +++ if (pthread_barrierattr_init (&ba) != 0) +++ { +++ puts ("barrierattr_init failed"); +++ exit (1); +++ } +++ +++ if (pthread_barrierattr_setpshared (&ba, PTHREAD_PROCESS_SHARED) != 0) +++ { +++ puts ("barrierattr_setpshared failed"); +++ exit (1); +++ } +++ +++ if (pthread_barrier_init (b, &ba, 2) != 0) +++ { +++ puts ("barrier_init failed"); +++ exit (1); +++ } +++ +++ if (pthread_barrierattr_destroy (&ba) != 0) +++ { +++ puts ("barrierattr_destroy failed"); +++ exit (1); +++ } +++ +++ pid_t pid = fork (); +++ if (pid == -1) +++ { +++ puts ("fork failed"); +++ exit (1); +++ } +++ +++ if (pid == 0) +++ receiver (); +++ +++ pthread_barrier_wait (b); +++ +++ /* Wait a bit more. */ +++ struct timespec ts = { .tv_sec = 0, .tv_nsec = 10000000 }; +++ nanosleep (&ts, NULL); +++ +++ /* Send the signal. */ +++ puts ("sending the signal now"); +++ kill (pid, SIGINT); +++ +++ /* Wait for the process to terminate. */ +++ int status; +++ if (TEMP_FAILURE_RETRY (waitpid (pid, &status, 0)) != pid) +++ { +++ puts ("wrong child reported terminated"); +++ exit (1); +++ } +++ +++ if (!WIFSIGNALED (status)) +++ { +++ puts ("child wasn't signalled"); +++ exit (1); +++ } +++ +++ if (WTERMSIG (status) != SIGINT) +++ { +++ puts ("child not terminated with SIGINT"); +++ exit (1); +++ } +++ +++ return 0; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-signal2.c ++@@ -0,0 +1,197 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++static sigset_t ss; +++static pthread_barrier_t *b; +++ +++ +++static void * +++tf (void *arg) +++{ +++ pthread_barrier_wait (b); +++ +++ puts ("child: calling sigwait now"); +++ +++ int sig; +++ int err; +++ err = sigwait (&ss, &sig); +++ if (err != 0) +++ { +++ printf ("sigwait returned unsuccessfully: %s (%d)\n", +++ strerror (err), err); +++ _exit (1); +++ } +++ +++ puts ("sigwait returned"); +++ +++ if (sig != SIGINT) +++ { +++ printf ("caught signal %d, expected %d (SIGINT)\n", sig, SIGINT); +++ _exit (1); +++ } +++ +++ puts ("child thread terminating now"); +++ +++ return NULL; +++} +++ +++ +++static void +++receiver (void) +++{ +++ pthread_t th; +++ +++ /* Make sure the process doesn't run forever. */ +++ alarm (10); +++ +++ sigfillset (&ss); +++ +++ if (pthread_sigmask (SIG_SETMASK, &ss, NULL) != 0) +++ { +++ puts ("1st pthread_sigmask failed"); +++ _exit (1); +++ } +++ +++ if (pthread_create (&th, NULL, tf, NULL) != 0) +++ { +++ puts ("pthread_create failed"); +++ _exit (1); +++ } +++ +++ if (pthread_join (th, NULL) != 0) +++ { +++ puts ("thread didn't join"); +++ _exit (1); +++ } +++ +++ puts ("join succeeded"); +++ +++ _exit (0); +++} +++ +++ +++static int +++do_test (void) +++{ +++ char tmp[] = "/tmp/tst-signal1-XXXXXX"; +++ +++ int fd = mkstemp (tmp); +++ if (fd == -1) +++ { +++ puts ("mkstemp failed"); +++ exit (1); +++ } +++ +++ unlink (tmp); +++ +++ int i; +++ for (i = 0; i < 20; ++i) +++ write (fd, "foobar xyzzy", 12); +++ +++ b = mmap (NULL, sizeof (pthread_barrier_t), PROT_READ | PROT_WRITE, +++ MAP_SHARED, fd, 0); +++ if (b == MAP_FAILED) +++ { +++ puts ("mmap failed"); +++ exit (1); +++ } +++ +++ pthread_barrierattr_t ba; +++ if (pthread_barrierattr_init (&ba) != 0) +++ { +++ puts ("barrierattr_init failed"); +++ exit (1); +++ } +++ +++ if (pthread_barrierattr_setpshared (&ba, PTHREAD_PROCESS_SHARED) != 0) +++ { +++ puts ("barrierattr_setpshared failed"); +++ exit (1); +++ } +++ +++ if (pthread_barrier_init (b, &ba, 2) != 0) +++ { +++ puts ("barrier_init failed"); +++ exit (1); +++ } +++ +++ if (pthread_barrierattr_destroy (&ba) != 0) +++ { +++ puts ("barrierattr_destroy failed"); +++ exit (1); +++ } +++ +++ pid_t pid = fork (); +++ if (pid == -1) +++ { +++ puts ("fork failed"); +++ exit (1); +++ } +++ +++ if (pid == 0) +++ receiver (); +++ +++ pthread_barrier_wait (b); +++ +++ /* Wait a bit more. */ +++ struct timespec ts = { .tv_sec = 0, .tv_nsec = 10000000 }; +++ nanosleep (&ts, NULL); +++ +++ /* Send the signal. */ +++ puts ("sending the signal now"); +++ kill (pid, SIGINT); +++ +++ /* Wait for the process to terminate. */ +++ int status; +++ if (TEMP_FAILURE_RETRY (waitpid (pid, &status, 0)) != pid) +++ { +++ puts ("wrong child reported terminated"); +++ exit (1); +++ } +++ +++ if (!WIFEXITED (status)) +++ { +++ if (WIFSIGNALED (status)) +++ printf ("child exited with signal %d\n", WTERMSIG (status)); +++ else +++ puts ("child didn't exit normally"); +++ exit (1); +++ } +++ +++ if (WEXITSTATUS (status) != 0) +++ { +++ printf ("exit status %d != 0\n", WEXITSTATUS (status)); +++ exit (1); +++ } +++ +++ return 0; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-signal3.c ++@@ -0,0 +1,260 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++/* Number of different signalss to use. Also is the number of +++ threads. */ +++#define N 10 +++/* Maximum number of threads in flight at any one time. */ +++#define INFLIGHT 5 +++/* Number of signals sent in total. */ +++#define ROUNDS 10000 +++ +++ +++static int received[N][N]; +++static int nsig[N]; +++static pthread_t th[N]; +++static sem_t sem; +++static pthread_mutex_t lock[N]; +++static pthread_t th_main; +++static int sig0; +++ +++static void +++handler (int sig) +++{ +++ int i; +++ for (i = 0; i < N; ++i) +++ if (pthread_equal (pthread_self (), th[i])) +++ break; +++ +++ if (i == N) +++ { +++ if (pthread_equal (pthread_self (), th_main)) +++ puts ("signal received by main thread"); +++ else +++ printf ("signal received by unknown thread (%lx)\n", +++ (unsigned long int) pthread_self ()); +++ exit (1); +++ } +++ +++ ++received[i][sig - sig0]; +++ +++ sem_post (&sem); +++} +++ +++ +++static void * +++tf (void *arg) +++{ +++ int idx = (long int) arg; +++ +++ sigset_t ss; +++ sigemptyset (&ss); +++ +++ int i; +++ for (i = 0; i <= idx; ++i) +++ sigaddset (&ss, sig0 + i); +++ +++ if (pthread_sigmask (SIG_UNBLOCK, &ss, NULL) != 0) +++ { +++ printf ("thread %d: pthread_sigmask failed\n", i); +++ exit (1); +++ } +++ +++ pthread_mutex_lock (&lock[idx]); +++ +++ return NULL; +++} +++ +++ +++static int +++do_test (void) +++{ +++ /* Block all signals. */ +++ sigset_t ss; +++ sigfillset (&ss); +++ +++ th_main = pthread_self (); +++ +++ sig0 = SIGRTMIN; +++ +++ if (pthread_sigmask (SIG_SETMASK, &ss, NULL) != 0) +++ { +++ puts ("1st pthread_sigmask failed"); +++ exit (1); +++ } +++ +++ /* Install the handler. */ +++ int i; +++ for (i = 0; i < N; ++i) +++ { +++ struct sigaction sa = +++ { +++ .sa_handler = handler, +++ .sa_flags = 0 +++ }; +++ sigfillset (&sa.sa_mask); +++ +++ if (sigaction (sig0 + i, &sa, NULL) != 0) +++ { +++ printf ("sigaction for signal %d failed\n", i); +++ exit (1); +++ } +++ } +++ +++ if (sem_init (&sem, 0, INFLIGHT) != 0) +++ { +++ puts ("sem_init failed"); +++ exit (1); +++ } +++ +++ pthread_attr_t a; +++ +++ if (pthread_attr_init (&a) != 0) +++ { +++ puts ("attr_init failed"); +++ exit (1); +++ } +++ +++ if (pthread_attr_setstacksize (&a, 1 * 1024 * 1024) != 0) +++ { +++ puts ("attr_setstacksize failed"); +++ return 1; +++ } +++ +++ for (i = 0; i < N; ++i) +++ { +++ if (pthread_mutex_init (&lock[i], NULL) != 0) +++ { +++ printf ("mutex_init[%d] failed\n", i); +++ } +++ +++ if (pthread_mutex_lock (&lock[i]) != 0) +++ { +++ printf ("mutex_lock[%d] failed\n", i); +++ } +++ +++ if (pthread_create (&th[i], &a, tf, (void *) (long int) i) != 0) +++ { +++ printf ("create of thread %d failed\n", i); +++ exit (1); +++ } +++ } +++ +++ if (pthread_attr_destroy (&a) != 0) +++ { +++ puts ("attr_destroy failed"); +++ exit (1); +++ } +++ +++ int result = 0; +++ unsigned int r = 42; +++ pid_t pid = getpid (); +++ +++ for (i = 0; i < ROUNDS; ++i) +++ { +++ if (TEMP_FAILURE_RETRY (sem_wait (&sem)) != 0) +++ { +++ printf ("sem_wait round %d failed: %m\n", i); +++ exit (1); +++ } +++ +++ int s = rand_r (&r) % N; +++ +++ kill (pid, sig0 + s); +++ } +++ +++ void *status; +++ for (i = 0; i < N; ++i) +++ { +++ if (pthread_mutex_unlock (&lock[i]) != 0) +++ { +++ printf ("unlock %d failed\n", i); +++ exit (1); +++ } +++ +++ if (pthread_join (th[i], &status) != 0) +++ { +++ printf ("join %d failed\n", i); +++ result = 1; +++ } +++ else if (status != NULL) +++ { +++ printf ("%d: result != NULL\n", i); +++ result = 1; +++ } +++ } +++ +++ int total = 0; +++ for (i = 0; i < N; ++i) +++ { +++ int j; +++ +++ for (j = 0; j <= i; ++j) +++ total += received[i][j]; +++ +++ for (j = i + 1; j < N; ++j) +++ if (received[i][j] != 0) +++ { +++ printf ("thread %d received signal SIGRTMIN+%d\n", i, j); +++ result = 1; +++ } +++ } +++ +++ if (total != ROUNDS) +++ { +++ printf ("total number of handled signals is %d, expected %d\n", +++ total, ROUNDS); +++ result = 1; +++ } +++ +++ printf ("A total of %d signals sent and received\n", total); +++ for (i = 0; i < N; ++i) +++ { +++ printf ("thread %2d:", i); +++ +++ int j; +++ for (j = 0; j <= i; ++j) +++ { +++ printf (" %5d", received[i][j]); +++ nsig[j] += received[i][j]; +++ } +++ +++ putchar ('\n'); +++ +++ } +++ +++ printf ("\nTotal :"); +++ for (i = 0; i < N; ++i) +++ printf (" %5d", nsig[i]); +++ putchar ('\n'); +++ +++ return result; +++} +++ +++#define TIMEOUT 10 +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-signal4.c ++@@ -0,0 +1,59 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++ +++static int +++do_test (void) +++{ +++ sigset_t ss; +++ +++ sigemptyset (&ss); +++ +++ int i; +++ for (i = 0; i < 10000; ++i) +++ { +++ long int r = random (); +++ +++ if (r != SIG_BLOCK && r != SIG_SETMASK && r != SIG_UNBLOCK) +++ { +++ int e = pthread_sigmask (r, &ss, NULL); +++ +++ if (e == 0) +++ { +++ printf ("pthread_sigmask succeeded for how = %ld\n", r); +++ exit (1); +++ } +++ +++ if (e != EINVAL) +++ { +++ puts ("pthread_sigmask didn't return EINVAL"); +++ exit (1); +++ } +++ } +++ } +++ +++ return 0; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-signal5.c ++@@ -0,0 +1,110 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++static sigset_t ss; +++ +++ +++static void * +++tf (void *arg) +++{ +++ sigset_t ss2; +++ if (pthread_sigmask (SIG_SETMASK, NULL, &ss2) != 0) +++ { +++ puts ("child: sigmask failed"); +++ exit (1); +++ } +++ +++ int i; +++ for (i = 1; i < 32; ++i) +++ if (sigismember (&ss, i) && ! sigismember (&ss2, i)) +++ { +++ printf ("signal %d set in parent mask, but not in child\n", i); +++ exit (1); +++ } +++ else if (! sigismember (&ss, i) && sigismember (&ss2, i)) +++ { +++ printf ("signal %d set in child mask, but not in parent\n", i); +++ exit (1); +++ } +++ +++ return NULL; +++} +++ +++ +++static int +++do_test (void) +++{ +++ sigemptyset (&ss); +++ sigaddset (&ss, SIGUSR1); +++ if (pthread_sigmask (SIG_SETMASK, &ss, NULL) != 0) +++ { +++ puts ("1st sigmask failed"); +++ exit (1); +++ } +++ +++ pthread_t th; +++ if (pthread_create (&th, NULL, tf, NULL) != 0) +++ { +++ puts ("1st create failed"); +++ exit (1); +++ } +++ +++ void *r; +++ if (pthread_join (th, &r) != 0) +++ { +++ puts ("1st join failed"); +++ exit (1); +++ } +++ +++ sigemptyset (&ss); +++ sigaddset (&ss, SIGUSR2); +++ sigaddset (&ss, SIGFPE); +++ if (pthread_sigmask (SIG_SETMASK, &ss, NULL) != 0) +++ { +++ puts ("2nd sigmask failed"); +++ exit (1); +++ } +++ +++ if (pthread_create (&th, NULL, tf, NULL) != 0) +++ { +++ puts ("2nd create failed"); +++ exit (1); +++ } +++ +++ if (pthread_join (th, &r) != 0) +++ { +++ puts ("2nd join failed"); +++ exit (1); +++ } +++ +++ return 0; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-signal6.c ++@@ -0,0 +1,191 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++#define N 2 +++static pthread_barrier_t bar; +++static struct +++{ +++ void *p; +++ pthread_t s; +++} ti[N]; +++static int sig1; +++ +++ +++static void +++handler (int sig) +++{ +++ pthread_t self = pthread_self (); +++ size_t i; +++ +++ for (i = 0; i < N; ++i) +++ if (ti[i].s == self) +++ { +++ if ((uintptr_t) ti[i].p <= (uintptr_t) &self +++ && (uintptr_t) ti[i].p + 2 * MINSIGSTKSZ > (uintptr_t) &self) +++ { +++ puts ("alt stack not used"); +++ exit (1); +++ } +++ +++ printf ("thread %zu used alt stack for signal %d\n", i, sig); +++ +++ return; +++ } +++ +++ puts ("handler: thread not found"); +++ exit (1); +++} +++ +++ +++static void * +++tf (void *arg) +++{ +++ size_t nr = (uintptr_t) arg; +++ if (nr >= N) +++ { +++ puts ("wrong nr parameter"); +++ exit (1); +++ } +++ +++ sigset_t ss; +++ sigemptyset (&ss); +++ size_t i; +++ for (i = 0; i < N; ++i) +++ if (i != nr) +++ if (sigaddset (&ss, sig1 + i) != 0) +++ { +++ puts ("tf: sigaddset failed"); +++ exit (1); +++ } +++ if (pthread_sigmask (SIG_BLOCK, &ss, NULL) != 0) +++ { +++ puts ("tf: sigmask failed"); +++ exit (1); +++ } +++ +++ void *p = malloc (2 * MINSIGSTKSZ); +++ if (p == NULL) +++ { +++ puts ("tf: malloc failed"); +++ exit (1); +++ } +++ +++ stack_t s; +++ s.ss_sp = p; +++ s.ss_size = 2 * MINSIGSTKSZ; +++ s.ss_flags = 0; +++ if (sigaltstack (&s, NULL) != 0) +++ { +++ puts ("tf: sigaltstack failed"); +++ exit (1); +++ } +++ +++ ti[nr].p = p; +++ ti[nr].s = pthread_self (); +++ +++ pthread_barrier_wait (&bar); +++ +++ pthread_barrier_wait (&bar); +++ +++ return NULL; +++} +++ +++ +++static int +++do_test (void) +++{ +++ sig1 = SIGRTMIN; +++ if (sig1 + N > SIGRTMAX) +++ { +++ puts ("too few RT signals"); +++ return 0; +++ } +++ +++ struct sigaction sa; +++ sa.sa_handler = handler; +++ sa.sa_flags = 0; +++ sigemptyset (&sa.sa_mask); +++ +++ if (sigaction (sig1, &sa, NULL) != 0 +++ || sigaction (sig1 + 1, &sa, NULL) != 0 +++ || sigaction (sig1 + 2, &sa, NULL) != 0) +++ { +++ puts ("sigaction failed"); +++ return 1; +++ } +++ +++ if (pthread_barrier_init (&bar, NULL, 1 + N) != 0) +++ { +++ puts ("barrier_init failed"); +++ return 1; +++ } +++ +++ pthread_t th[N]; +++ size_t i; +++ for (i = 0; i < N; ++i) +++ if (pthread_create (&th[i], NULL, tf, (void *) (long int) i) != 0) +++ { +++ puts ("create failed"); +++ return 1; +++ } +++ +++ /* Block the three signals. */ +++ sigset_t ss; +++ sigemptyset (&ss); +++ for (i = 0; i <= N; ++i) +++ sigaddset (&ss, sig1 + i); +++ if (pthread_sigmask (SIG_BLOCK, &ss, NULL) != 0) +++ { +++ puts ("main: sigmask failed"); +++ return 1; +++ } +++ +++ pthread_barrier_wait (&bar); +++ +++ /* Send some signals. */ +++ pid_t me = getpid (); +++ kill (me, sig1 + N); +++ for (i = 0; i < N; ++i) +++ kill (me, sig1 + i); +++ kill (me, sig1 + N); +++ +++ /* Give the signals a chance to be worked on. */ +++ sleep (1); +++ +++ pthread_barrier_wait (&bar); +++ +++ for (i = 0; i < N; ++i) +++ if (pthread_join (th[i], NULL) != 0) +++ { +++ puts ("join failed"); +++ return 1; +++ } +++ +++ return 0; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-signal7.c ++@@ -0,0 +1,58 @@ +++/* Copyright (C) 2005-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++ +++ +++static int +++do_test (void) +++{ +++ int result = 0; +++ +++ errno = 0; +++ if (sigaction (SIGCANCEL, NULL, NULL) == 0) +++ { +++ puts ("sigaction(SIGCANCEL) did not fail"); +++ result = 1; +++ } +++ else if (errno != EINVAL) +++ { +++ puts ("sigaction(SIGCANCEL) did not set errno to EINVAL"); +++ result = 1; +++ } +++ +++ errno = 0; +++ if (sigaction (SIGSETXID, NULL, NULL) == 0) +++ { +++ puts ("sigaction(SIGSETXID) did not fail"); +++ result = 1; +++ } +++ else if (errno != EINVAL) +++ { +++ puts ("sigaction(SIGSETXID) did not set errno to EINVAL"); +++ result = 1; +++ } +++ +++ return result; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-spin1.c ++@@ -0,0 +1,56 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++ +++ +++static int +++do_test (void) +++{ +++ pthread_spinlock_t s; +++ +++ if (pthread_spin_init (&s, PTHREAD_PROCESS_PRIVATE) != 0) +++ { +++ puts ("spin_init failed"); +++ return 1; +++ } +++ +++ if (pthread_spin_lock (&s) != 0) +++ { +++ puts ("spin_lock failed"); +++ return 1; +++ } +++ +++ if (pthread_spin_unlock (&s) != 0) +++ { +++ puts ("spin_unlock failed"); +++ return 1; +++ } +++ +++ if (pthread_spin_destroy (&s) != 0) +++ { +++ puts ("spin_destroy failed"); +++ return 1; +++ } +++ +++ return 0; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-spin2.c ++@@ -0,0 +1,158 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++static int +++do_test (void) +++{ +++ size_t ps = sysconf (_SC_PAGESIZE); +++ char tmpfname[] = "/tmp/tst-spin2.XXXXXX"; +++ char data[ps]; +++ void *mem; +++ int fd; +++ pthread_spinlock_t *s; +++ pid_t pid; +++ char *p; +++ int err; +++ +++ fd = mkstemp (tmpfname); +++ if (fd == -1) +++ { +++ printf ("cannot open temporary file: %m\n"); +++ return 1; +++ } +++ +++ /* Make sure it is always removed. */ +++ unlink (tmpfname); +++ +++ /* Create one page of data. */ +++ memset (data, '\0', ps); +++ +++ /* Write the data to the file. */ +++ if (write (fd, data, ps) != (ssize_t) ps) +++ { +++ puts ("short write"); +++ return 1; +++ } +++ +++ mem = mmap (NULL, ps, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); +++ if (mem == MAP_FAILED) +++ { +++ printf ("mmap failed: %m\n"); +++ return 1; +++ } +++ +++ s = (pthread_spinlock_t *) (((uintptr_t) mem +++ + __alignof (pthread_spinlock_t)) +++ & ~(__alignof (pthread_spinlock_t) - 1)); +++ p = (char *) (s + 1); +++ +++ if (pthread_spin_init (s, PTHREAD_PROCESS_SHARED) != 0) +++ { +++ puts ("spin_init failed"); +++ return 1; +++ } +++ +++ if (pthread_spin_lock (s) != 0) +++ { +++ puts ("spin_lock failed"); +++ return 1; +++ } +++ +++ err = pthread_spin_trylock (s); +++ if (err == 0) +++ { +++ puts ("1st spin_trylock succeeded"); +++ return 1; +++ } +++ else if (err != EBUSY) +++ { +++ puts ("1st spin_trylock didn't return EBUSY"); +++ return 1; +++ } +++ +++ err = pthread_spin_unlock (s); +++ if (err != 0) +++ { +++ puts ("parent: spin_unlock failed"); +++ return 1; +++ } +++ +++ err = pthread_spin_trylock (s); +++ if (err != 0) +++ { +++ puts ("2nd spin_trylock failed"); +++ return 1; +++ } +++ +++ *p = 0; +++ +++ puts ("going to fork now"); +++ pid = fork (); +++ if (pid == -1) +++ { +++ puts ("fork failed"); +++ return 1; +++ } +++ else if (pid == 0) +++ { +++ /* Play some lock ping-pong. It's our turn to unlock first. */ +++ if ((*p)++ != 0) +++ { +++ puts ("child: *p != 0"); +++ return 1; +++ } +++ +++ if (pthread_spin_unlock (s) != 0) +++ { +++ puts ("child: 1st spin_unlock failed"); +++ return 1; +++ } +++ +++ puts ("child done"); +++ } +++ else +++ { +++ if (pthread_spin_lock (s) != 0) +++ { +++ puts ("parent: 2nd spin_lock failed"); +++ return 1; +++ } +++ +++ puts ("waiting for child"); +++ +++ waitpid (pid, NULL, 0); +++ +++ puts ("parent done"); +++ } +++ +++ return 0; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-spin3.c ++@@ -0,0 +1,53 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++ +++static int do_test (void); +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" +++ +++static int +++do_test (void) +++{ +++ pthread_spinlock_t s; +++ +++ if (pthread_spin_init (&s, PTHREAD_PROCESS_PRIVATE) != 0) +++ { +++ puts ("spin_init failed"); +++ return 1; +++ } +++ +++ if (pthread_spin_lock (&s) != 0) +++ { +++ puts ("1st spin_lock failed"); +++ return 1; +++ } +++ +++ delayed_exit (1); +++ +++ /* This call should never return. */ +++ xpthread_spin_lock (&s); +++ +++ puts ("2nd spin_lock returned"); +++ return 1; +++} ++--- /dev/null +++++ b/fbtl/tst-stack1.c ++@@ -0,0 +1,145 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++static void *stack; +++static size_t size; +++ +++ +++static void * +++tf (void *a) +++{ +++ int result = 0; +++ +++ puts ("child start"); +++ +++ pthread_attr_t attr; +++ if (pthread_getattr_np (pthread_self (), &attr) != 0) +++ { +++ puts ("getattr_np failed"); +++ exit (1); +++ } +++ +++ size_t test_size; +++ void *test_stack; +++ if (pthread_attr_getstack (&attr, &test_stack, &test_size) != 0) +++ { +++ puts ("attr_getstack failed"); +++ exit (1); +++ } +++ +++ if (test_size != size) +++ { +++ printf ("child: reported size differs: is %zu, expected %zu\n", +++ test_size, size); +++ result = 1; +++ } +++ +++ if (test_stack != stack) +++ { +++ printf ("child: reported stack address differs: is %p, expected %p\n", +++ test_stack, stack); +++ result = 1; +++ } +++ +++ puts ("child OK"); +++ +++ return result ? (void *) 1l : NULL; +++} +++ +++ +++int +++do_test (void) +++{ +++ int result = 0; +++ +++ size = MAX (4 * getpagesize (), PTHREAD_STACK_MIN); +++ if (posix_memalign (&stack, getpagesize (), size) != 0) +++ { +++ puts ("out of memory while allocating the stack memory"); +++ exit (1); +++ } +++ +++ pthread_attr_t attr; +++ if (pthread_attr_init (&attr) != 0) +++ { +++ puts ("attr_init failed"); +++ exit (1); +++ } +++ +++ puts ("attr_setstack"); +++ if (pthread_attr_setstack (&attr, stack, size) != 0) +++ { +++ puts ("attr_setstack failed"); +++ exit (1); +++ } +++ +++ size_t test_size; +++ void *test_stack; +++ puts ("attr_getstack"); +++ if (pthread_attr_getstack (&attr, &test_stack, &test_size) != 0) +++ { +++ puts ("attr_getstack failed"); +++ exit (1); +++ } +++ +++ if (test_size != size) +++ { +++ printf ("reported size differs: is %zu, expected %zu\n", +++ test_size, size); +++ result = 1; +++ } +++ +++ if (test_stack != stack) +++ { +++ printf ("reported stack address differs: is %p, expected %p\n", +++ test_stack, stack); +++ result = 1; +++ } +++ +++ puts ("create"); +++ +++ pthread_t th; +++ if (pthread_create (&th, &attr, tf, NULL) != 0) +++ { +++ puts ("failed to create thread"); +++ exit (1); +++ } +++ +++ void *status; +++ if (pthread_join (th, &status) != 0) +++ { +++ puts ("join failed"); +++ exit (1); +++ } +++ +++ result |= status != NULL; +++ +++ return result; +++} +++ +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-stack2.c ++@@ -0,0 +1,78 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Jakub Jelinek , 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, see +++ . */ +++ +++/* Test whether it is possible to create a thread with PTHREAD_STACK_MIN +++ stack size. */ +++ +++#include +++#include +++#include +++ +++static int seen; +++ +++static void * +++tf (void *p) +++{ +++ ++seen; +++ return NULL; +++} +++ +++static int +++do_test (void) +++{ +++ pthread_attr_t attr; +++ pthread_attr_init (&attr); +++ +++ int result = 0; +++ int res = pthread_attr_setstacksize (&attr, PTHREAD_STACK_MIN); +++ if (res) +++ { +++ printf ("pthread_attr_setstacksize failed %d\n", res); +++ result = 1; +++ } +++ +++ /* Create the thread. */ +++ pthread_t th; +++ res = pthread_create (&th, &attr, tf, NULL); +++ if (res) +++ { +++ printf ("pthread_create failed %d\n", res); +++ result = 1; +++ } +++ else +++ { +++ res = pthread_join (th, NULL); +++ if (res) +++ { +++ printf ("pthread_join failed %d\n", res); +++ result = 1; +++ } +++ } +++ +++ if (seen != 1) +++ { +++ printf ("seen %d != 1\n", seen); +++ result = 1; +++ } +++ +++ return result; +++} +++ +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-stack3.c ++@@ -0,0 +1,100 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Jakub Jelinek , 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, see +++ . */ +++ +++/* Test whether pthread_create/pthread_join with user defined stacks +++ doesn't leak memory. +++ NOTE: this tests functionality beyond POSIX. In POSIX user defined +++ stacks cannot be ever freed once used by pthread_create nor they can +++ be reused for other thread. */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++static int seen; +++ +++static void * +++tf (void *p) +++{ +++ ++seen; +++ return NULL; +++} +++ +++static int +++do_test (void) +++{ +++ mtrace (); +++ +++ void *stack; +++ int res = posix_memalign (&stack, getpagesize (), 4 * PTHREAD_STACK_MIN); +++ if (res) +++ { +++ printf ("malloc failed %s\n", strerror (res)); +++ return 1; +++ } +++ +++ pthread_attr_t attr; +++ pthread_attr_init (&attr); +++ +++ int result = 0; +++ res = pthread_attr_setstack (&attr, stack, 4 * PTHREAD_STACK_MIN); +++ if (res) +++ { +++ printf ("pthread_attr_setstack failed %d\n", res); +++ result = 1; +++ } +++ +++ for (int i = 0; i < 16; ++i) +++ { +++ /* Create the thread. */ +++ pthread_t th; +++ res = pthread_create (&th, &attr, tf, NULL); +++ if (res) +++ { +++ printf ("pthread_create failed %d\n", res); +++ result = 1; +++ } +++ else +++ { +++ res = pthread_join (th, NULL); +++ if (res) +++ { +++ printf ("pthread_join failed %d\n", res); +++ result = 1; +++ } +++ } +++ } +++ +++ pthread_attr_destroy (&attr); +++ +++ if (seen != 16) +++ { +++ printf ("seen %d != 16\n", seen); +++ result = 1; +++ } +++ +++ free (stack); +++ return result; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-stackguard1-static.c ++@@ -0,0 +1 @@ +++#include "tst-stackguard1.c" ++--- /dev/null +++++ b/fbtl/tst-stackguard1.c ++@@ -0,0 +1,226 @@ +++/* Copyright (C) 2005-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Jakub Jelinek , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++static const char *command; +++static bool child; +++static uintptr_t stack_chk_guard_copy; +++static bool stack_chk_guard_copy_set; +++static int fds[2]; +++ +++static void __attribute__ ((constructor)) +++con (void) +++{ +++ stack_chk_guard_copy = STACK_CHK_GUARD; +++ stack_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 void * +++tf (void *arg) +++{ +++ if (stack_chk_guard_copy != STACK_CHK_GUARD) +++ { +++ puts ("STACK_CHK_GUARD changed in thread"); +++ return (void *) 1L; +++ } +++ return NULL; +++} +++ +++static int +++do_test (void) +++{ +++ if (!stack_chk_guard_copy_set) +++ { +++ puts ("constructor has not been run"); +++ return 1; +++ } +++ +++ if (stack_chk_guard_copy != STACK_CHK_GUARD) +++ { +++ puts ("STACK_CHK_GUARD changed between constructor and do_test"); +++ return 1; +++ } +++ +++ if (child) +++ { +++ int i; +++ pthread_t th[4]; +++ void *ret; +++ for (i = 0; i < 4; ++i) +++ if (pthread_create (&th[i], NULL, tf, NULL)) +++ { +++ puts ("thread creation failed"); +++ return 1; +++ } +++ for (i = 0; i < 4; ++i) +++ if (pthread_join (th[i], &ret)) +++ { +++ puts ("thread join failed"); +++ return 1; +++ } +++ else if (ret != NULL) +++ return 1; +++ +++ write (2, &stack_chk_guard_copy, sizeof (stack_chk_guard_copy)); +++ return 0; +++ } +++ +++ if (command == NULL) +++ { +++ puts ("missing --command or --child argument"); +++ return 1; +++ } +++ +++#define N 16 +++ uintptr_t child_stack_chk_guards[N + 1]; +++ child_stack_chk_guards[N] = stack_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 (stack_chk_guard_copy != STACK_CHK_GUARD) +++ { +++ puts ("STACK_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_stack_chk_guards[i], +++ sizeof (uintptr_t))) != sizeof (uintptr_t)) +++ { +++ puts ("could not read stack_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_stack_chk_guards, N + 1, sizeof (uintptr_t), uintptr_t_cmp); +++ +++ 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 stack guard canaries are either randomized, +++ or equal to the default stack guard canary value. +++ Even with randomized stack 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_stack_chk_guards[i] != child_stack_chk_guards[i+1]) +++ ndifferences++; +++ else if (child_stack_chk_guards[i] == default_guard) +++ ndefaults++; +++ } +++ +++ printf ("differences %d defaults %d\n", ndifferences, ndefaults); +++ +++ if (ndifferences < N / 2 && ndefaults < N / 2) +++ { +++ puts ("stack guard canaries are not randomized enough"); +++ puts ("nor equal to the default canary 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" ++--- /dev/null +++++ b/fbtl/tst-stdio1.c ++@@ -0,0 +1,56 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++ +++static int do_test (void); +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" +++ +++static void *tf (void *a) +++{ +++ flockfile (stdout); +++ /* This call should never return. */ +++ return a; +++} +++ +++ +++int +++do_test (void) +++{ +++ pthread_t th; +++ +++ flockfile (stdout); +++ +++ if (pthread_create (&th, NULL, tf, NULL) != 0) +++ { +++ write (2, "create failed\n", 14); +++ _exit (1); +++ } +++ +++ delayed_exit (1); +++ xpthread_join (th); +++ +++ puts ("join returned"); +++ +++ return 1; +++} ++--- /dev/null +++++ b/fbtl/tst-stdio2.c ++@@ -0,0 +1,81 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++ +++ +++static void *tf (void *a) +++{ +++ puts ("start tf"); +++ +++ /* Multiple locking, implicitly or explicitly, must be possible. */ +++ flockfile (stdout); +++ +++ puts ("after first flockfile"); +++ +++ flockfile (stdout); +++ +++ puts ("foo"); +++ +++ funlockfile (stdout); +++ +++ puts ("after first funlockfile"); +++ +++ funlockfile (stdout); +++ +++ puts ("all done"); +++ +++ return a; +++} +++ +++ +++int +++do_test (void) +++{ +++ pthread_t th; +++ +++ if (pthread_create (&th, NULL, tf, NULL) != 0) +++ { +++ write (2, "create failed\n", 14); +++ _exit (1); +++ } +++ +++ void *result; +++ if (pthread_join (th, &result) != 0) +++ { +++ puts ("join failed"); +++ exit (1); +++ } +++ else if (result != NULL) +++ { +++ printf ("wrong return value: %p, expected %p\n", result, NULL); +++ exit (1); +++ } +++ +++ puts ("join returned succsefully"); +++ +++ return 0; +++} +++ +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-sysconf.c ++@@ -0,0 +1,47 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++ +++ +++static int +++do_test (void) +++{ +++ puts ("We expect no limits"); +++ /* We have no fixed limit on the number of threads. Make sure the +++ headers tell the right story. */ +++#ifdef PTHREAD_THREADS_MAX +++ printf ("Header report maximum number of threads = %lu\n", +++ (unsigned long int) PTHREAD_THREADS_MAX); +++ return 1; +++#else +++ long int r = sysconf (_SC_THREAD_THREADS_MAX); +++ if (r != -1) +++ { +++ printf ("sysconf(_SC_THREAD_THREADS_MAX) return %ld\n", r); +++ return 1; +++ } +++#endif +++ +++ return 0; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-tls1.c ++@@ -0,0 +1,111 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++ +++ +++struct test_s +++{ +++ int a; +++ int b; +++}; +++ +++#define INIT_A 1 +++#define INIT_B 42 +++/* Deliberately not static. */ +++__thread struct test_s s __attribute__ ((tls_model ("initial-exec"))) = +++{ +++ .a = INIT_A, +++ .b = INIT_B +++}; +++ +++ +++static void * +++tf (void *arg) +++{ +++ if (s.a != INIT_A || s.b != INIT_B) +++ { +++ puts ("initial value of s in child thread wrong"); +++ exit (1); +++ } +++ +++ ++s.a; +++ +++ return NULL; +++} +++ +++ +++int +++do_test (void) +++{ +++ if (s.a != INIT_A || s.b != INIT_B) +++ { +++ puts ("initial value of s in main thread wrong"); +++ exit (1); +++ } +++ +++ pthread_attr_t a; +++ +++ if (pthread_attr_init (&a) != 0) +++ { +++ puts ("attr_init failed"); +++ exit (1); +++ } +++ +++ if (pthread_attr_setstacksize (&a, 1 * 1024 * 1024) != 0) +++ { +++ puts ("attr_setstacksize failed"); +++ return 1; +++ } +++ +++#define N 10 +++ int i; +++ for (i = 0; i < N; ++i) +++ { +++#define M 10 +++ pthread_t th[M]; +++ int j; +++ for (j = 0; j < M; ++j, ++s.a) +++ if (pthread_create (&th[j], &a, tf, NULL) != 0) +++ { +++ puts ("pthread_create failed"); +++ exit (1); +++ } +++ +++ for (j = 0; j < M; ++j) +++ if (pthread_join (th[j], NULL) != 0) +++ { +++ puts ("pthread_join failed"); +++ exit (1); +++ } +++ } +++ +++ if (pthread_attr_destroy (&a) != 0) +++ { +++ puts ("attr_destroy failed"); +++ exit (1); +++ } +++ +++ return 0; +++} +++ +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-tls2.c ++@@ -0,0 +1,205 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++#define N 10 +++static pthread_t th[N]; +++ +++ +++#define CB(n) \ +++static void \ +++cb##n (void) \ +++{ \ +++ if (th[n] != pthread_self ()) \ +++ { \ +++ write (STDOUT_FILENO, "wrong callback\n", 15); \ +++ _exit (1); \ +++ } \ +++} +++CB (0) +++CB (1) +++CB (2) +++CB (3) +++CB (4) +++CB (5) +++CB (6) +++CB (7) +++CB (8) +++CB (9) +++static void (*cbs[]) (void) = +++{ +++ cb0, cb1, cb2, cb3, cb4, cb5, cb6, cb7, cb8, cb9 +++}; +++ +++ +++static __thread void (*fp) (void) __attribute__ ((tls_model ("local-exec"))); +++ +++ +++static sem_t s; +++ +++ +++#define THE_SIG SIGUSR1 +++static void +++handler (int sig) +++{ +++ if (sig != THE_SIG) +++ { +++ write (STDOUT_FILENO, "wrong signal\n", 13); +++ _exit (1); +++ } +++ +++ fp (); +++ +++ if (sem_post (&s) != 0) +++ { +++ write (STDOUT_FILENO, "sem_post failed\n", 16); +++ _exit (1); +++ } +++} +++ +++ +++static pthread_barrier_t b; +++ +++#define TOTAL_SIGS 1000 +++static int nsigs; +++ +++ +++static void * +++tf (void *arg) +++{ +++ fp = arg; +++ +++ pthread_barrier_wait (&b); +++ +++ pthread_barrier_wait (&b); +++ +++ if (nsigs != TOTAL_SIGS) +++ { +++ puts ("barrier_wait prematurely returns"); +++ exit (1); +++ } +++ +++ return NULL; +++} +++ +++ +++int +++do_test (void) +++{ +++ if (pthread_barrier_init (&b, NULL, N + 1) != 0) +++ { +++ puts ("barrier_init failed"); +++ exit (1); +++ } +++ +++ if (sem_init (&s, 0, 0) != 0) +++ { +++ puts ("sem_init failed"); +++ exit (1); +++ } +++ +++ struct sigaction sa; +++ sa.sa_handler = handler; +++ sigemptyset (&sa.sa_mask); +++ sa.sa_flags = 0; +++ if (sigaction (THE_SIG, &sa, NULL) != 0) +++ { +++ puts ("sigaction failed"); +++ exit (1); +++ } +++ +++ pthread_attr_t a; +++ +++ if (pthread_attr_init (&a) != 0) +++ { +++ puts ("attr_init failed"); +++ exit (1); +++ } +++ +++ if (pthread_attr_setstacksize (&a, 1 * 1024 * 1024) != 0) +++ { +++ puts ("attr_setstacksize failed"); +++ return 1; +++ } +++ +++ int i; +++ for (i = 0; i < N; ++i) +++ if (pthread_create (&th[i], &a, tf, cbs[i]) != 0) +++ { +++ puts ("pthread_create failed"); +++ exit (1); +++ } +++ +++ if (pthread_attr_destroy (&a) != 0) +++ { +++ puts ("attr_destroy failed"); +++ exit (1); +++ } +++ +++ pthread_barrier_wait (&b); +++ +++ sigset_t ss; +++ sigemptyset (&ss); +++ sigaddset (&ss, THE_SIG); +++ if (pthread_sigmask (SIG_BLOCK, &ss, NULL) != 0) +++ { +++ puts ("pthread_sigmask failed"); +++ exit (1); +++ } +++ +++ /* Start sending signals. */ +++ for (i = 0; i < TOTAL_SIGS; ++i) +++ { +++ if (kill (getpid (), THE_SIG) != 0) +++ { +++ puts ("kill failed"); +++ exit (1); +++ } +++ +++ if (TEMP_FAILURE_RETRY (sem_wait (&s)) != 0) +++ { +++ puts ("sem_wait failed"); +++ exit (1); +++ } +++ +++ ++nsigs; +++ } +++ +++ pthread_barrier_wait (&b); +++ +++ for (i = 0; i < N; ++i) +++ if (pthread_join (th[i], NULL) != 0) +++ { +++ puts ("join failed"); +++ exit (1); +++ } +++ +++ return 0; +++} +++ +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-tls3.c ++@@ -0,0 +1,206 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++#define THE_SIG SIGUSR1 +++ +++ +++#define N 10 +++static pthread_t th[N]; +++ +++ +++#define CB(n) \ +++static void \ +++cb##n (void) \ +++{ \ +++ if (th[n] != pthread_self ()) \ +++ { \ +++ write (STDOUT_FILENO, "wrong callback\n", 15); \ +++ _exit (1); \ +++ } \ +++} +++CB (0) +++CB (1) +++CB (2) +++CB (3) +++CB (4) +++CB (5) +++CB (6) +++CB (7) +++CB (8) +++CB (9) +++static void (*cbs[]) (void) = +++{ +++ cb0, cb1, cb2, cb3, cb4, cb5, cb6, cb7, cb8, cb9 +++}; +++ +++ +++sem_t s; +++ +++ +++pthread_barrier_t b; +++ +++#define TOTAL_SIGS 1000 +++int nsigs; +++ +++ +++int +++do_test (void) +++{ +++ if ((uintptr_t) pthread_self () & (TCB_ALIGNMENT - 1)) +++ { +++ puts ("initial thread's struct pthread not aligned enough"); +++ exit (1); +++ } +++ +++ if (pthread_barrier_init (&b, NULL, N + 1) != 0) +++ { +++ puts ("barrier_init failed"); +++ exit (1); +++ } +++ +++ if (sem_init (&s, 0, 0) != 0) +++ { +++ puts ("sem_init failed"); +++ exit (1); +++ } +++ +++ void *h = dlopen ("tst-tls3mod.so", RTLD_LAZY); +++ if (h == NULL) +++ { +++ puts ("dlopen failed"); +++ exit (1); +++ } +++ +++ void *(*tf) (void *) = dlsym (h, "tf"); +++ if (tf == NULL) +++ { +++ puts ("dlsym for tf failed"); +++ exit (1); +++ } +++ +++ struct sigaction sa; +++ sa.sa_handler = dlsym (h, "handler"); +++ if (sa.sa_handler == NULL) +++ { +++ puts ("dlsym for handler failed"); +++ exit (1); +++ } +++ sigemptyset (&sa.sa_mask); +++ sa.sa_flags = 0; +++ if (sigaction (THE_SIG, &sa, NULL) != 0) +++ { +++ puts ("sigaction failed"); +++ exit (1); +++ } +++ +++ pthread_attr_t a; +++ +++ if (pthread_attr_init (&a) != 0) +++ { +++ puts ("attr_init failed"); +++ exit (1); +++ } +++ +++ if (pthread_attr_setstacksize (&a, 1 * 1024 * 1024) != 0) +++ { +++ puts ("attr_setstacksize failed"); +++ return 1; +++ } +++ +++ int r; +++ for (r = 0; r < 10; ++r) +++ { +++ int i; +++ for (i = 0; i < N; ++i) +++ if (pthread_create (&th[i], &a, tf, cbs[i]) != 0) +++ { +++ puts ("pthread_create failed"); +++ exit (1); +++ } +++ +++ nsigs = 0; +++ +++ pthread_barrier_wait (&b); +++ +++ sigset_t ss; +++ sigemptyset (&ss); +++ sigaddset (&ss, THE_SIG); +++ if (pthread_sigmask (SIG_BLOCK, &ss, NULL) != 0) +++ { +++ puts ("pthread_sigmask failed"); +++ exit (1); +++ } +++ +++ /* Start sending signals. */ +++ for (i = 0; i < TOTAL_SIGS; ++i) +++ { +++ if (kill (getpid (), THE_SIG) != 0) +++ { +++ puts ("kill failed"); +++ exit (1); +++ } +++ +++ if (TEMP_FAILURE_RETRY (sem_wait (&s)) != 0) +++ { +++ puts ("sem_wait failed"); +++ exit (1); +++ } +++ +++ ++nsigs; +++ } +++ +++ pthread_barrier_wait (&b); +++ +++ if (pthread_sigmask (SIG_UNBLOCK, &ss, NULL) != 0) +++ { +++ puts ("pthread_sigmask failed"); +++ exit (1); +++ } +++ +++ for (i = 0; i < N; ++i) +++ if (pthread_join (th[i], NULL) != 0) +++ { +++ puts ("join failed"); +++ exit (1); +++ } +++ } +++ +++ if (pthread_attr_destroy (&a) != 0) +++ { +++ puts ("attr_destroy failed"); +++ exit (1); +++ } +++ +++ return 0; +++} +++ +++ +++#define TIMEOUT 5 +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-tls3mod.c ++@@ -0,0 +1,88 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++extern pthread_barrier_t b; +++ +++#define TOTAL_SIGS 1000 +++extern int nsigs; +++ +++extern sem_t s; +++ +++ +++static __thread void (*fp) (void); +++ +++ +++#define THE_SIG SIGUSR1 +++void +++handler (int sig) +++{ +++ if (sig != THE_SIG) +++ { +++ write (STDOUT_FILENO, "wrong signal\n", 13); +++ _exit (1); +++ } +++ +++ fp (); +++ +++ if (sem_post (&s) != 0) +++ { +++ write (STDOUT_FILENO, "sem_post failed\n", 16); +++ _exit (1); +++ } +++} +++ +++ +++void * +++tf (void *arg) +++{ +++ if ((uintptr_t) pthread_self () & (TCB_ALIGNMENT - 1)) +++ { +++ puts ("thread's struct pthread not aligned enough"); +++ exit (1); +++ } +++ +++ if (fp != NULL) +++ { +++ puts ("fp not initially NULL"); +++ exit (1); +++ } +++ +++ fp = arg; +++ +++ pthread_barrier_wait (&b); +++ +++ pthread_barrier_wait (&b); +++ +++ if (nsigs != TOTAL_SIGS) +++ { +++ puts ("barrier_wait prematurely returns"); +++ exit (1); +++ } +++ +++ return NULL; +++} ++--- /dev/null +++++ b/fbtl/tst-tls4.c ++@@ -0,0 +1,182 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Jakub Jelinek , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++#define N 3 +++ +++void (*test1) (void), (*test2) (void); +++ +++pthread_barrier_t b2, b3; +++ +++static void * +++tf (void *arg) +++{ +++ int i; +++ +++ for (i = 0; i <= (uintptr_t) arg; ++i) +++ { +++ int r = pthread_barrier_wait (&b3); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("tf: barrier_wait failed"); +++ exit (1); +++ } +++ } +++ +++ test1 (); +++ +++ for (i = 0; i < 3; ++i) +++ { +++ int r = pthread_barrier_wait (&b3); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("tf: barrier_wait failed"); +++ exit (1); +++ } +++ } +++ +++ test2 (); +++ +++ for (i = 0; i < 3 - (uintptr_t) arg; ++i) +++ { +++ int r = pthread_barrier_wait (&b3); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("tf: barrier_wait failed"); +++ exit (1); +++ } +++ } +++ +++ return NULL; +++} +++ +++static void * +++tf2 (void *arg) +++{ +++ int r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("tf2: barrier_wait failed"); +++ exit (1); +++ } +++ +++ int i; +++ for (i = 0; i < N; ++i) +++ tf (arg); +++ return NULL; +++} +++ +++int +++do_test (void) +++{ +++ pthread_t th[2]; +++ const char *modules[N] +++ = { "tst-tls4moda.so", "tst-tls4moda.so", "tst-tls4modb.so" }; +++ +++ if (pthread_barrier_init (&b2, NULL, 2) != 0) +++ { +++ puts ("barrier_init failed"); +++ return 1; +++ } +++ +++ if (pthread_barrier_init (&b3, NULL, 3) != 0) +++ { +++ puts ("barrier_init failed"); +++ return 1; +++ } +++ +++ if (pthread_create (&th[0], NULL, tf2, (void *) (uintptr_t) 1)) +++ { +++ puts ("pthread_create failed"); +++ return 1; +++ } +++ +++ int r = pthread_barrier_wait (&b2); +++ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) +++ { +++ puts ("barrier_wait failed"); +++ return 1; +++ } +++ +++ int i; +++ for (i = 0; i < N; ++i) +++ { +++ void *h = dlopen (modules[i], RTLD_LAZY); +++ if (h == NULL) +++ { +++ printf ("dlopen failed %s\n", dlerror ()); +++ return 1; +++ } +++ +++ test1 = dlsym (h, "test1"); +++ if (test1 == NULL) +++ { +++ printf ("dlsym for test1 failed %s\n", dlerror ()); +++ return 1; +++ } +++ +++ test2 = dlsym (h, "test2"); +++ if (test2 == NULL) +++ { +++ printf ("dlsym for test2 failed %s\n", dlerror ()); +++ return 1; +++ } +++ +++ if (pthread_create (&th[1], NULL, tf, (void *) (uintptr_t) 2)) +++ { +++ puts ("pthread_create failed"); +++ return 1; +++ } +++ +++ tf ((void *) (uintptr_t) 0); +++ +++ if (pthread_join (th[1], NULL) != 0) +++ { +++ puts ("join failed"); +++ return 1; +++ } +++ +++ if (dlclose (h)) +++ { +++ puts ("dlclose failed"); +++ return 1; +++ } +++ +++ printf ("test %d with %s succeeded\n", i, modules[i]); +++ } +++ +++ if (pthread_join (th[0], NULL) != 0) +++ { +++ puts ("join failed"); +++ return 1; +++ } +++ +++ return 0; +++} +++ +++#define TIMEOUT 5 +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-tls4moda.c ++@@ -0,0 +1,52 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Jakub Jelinek , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++ +++ +++static __thread unsigned char foo [32] +++ __attribute__ ((tls_model ("initial-exec"), aligned (sizeof (void *)))); +++ +++void +++test1 (void) +++{ +++ size_t s; +++ +++ for (s = 0; s < sizeof (foo); ++s) +++ { +++ if (foo [s]) +++ abort (); +++ foo [s] = s; +++ } +++} +++ +++void +++test2 (void) +++{ +++ size_t s; +++ +++ for (s = 0; s < sizeof (foo); ++s) +++ { +++ if (foo [s] != s) +++ abort (); +++ foo [s] = sizeof (foo) - s; +++ } +++} ++--- /dev/null +++++ b/fbtl/tst-tls4modb.c ++@@ -0,0 +1,61 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Jakub Jelinek , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++ +++ +++static int i; +++int bar; +++ +++static __thread void *foo [32 / sizeof (void *)] +++ __attribute__ ((tls_model ("initial-exec"), aligned (sizeof (void *)))) +++ = { &i, &bar }; +++ +++void +++test1 (void) +++{ +++ size_t s; +++ +++ if (foo [0] != &i || foo [1] != &bar) +++ abort (); +++ +++ foo [0] = NULL; +++ foo [1] = NULL; +++ for (s = 0; s < sizeof (foo) / sizeof (void *); ++s) +++ { +++ if (foo [s]) +++ abort (); +++ foo [s] = &foo[s]; +++ } +++} +++ +++void +++test2 (void) +++{ +++ size_t s; +++ +++ for (s = 0; s < sizeof (foo) / sizeof (void *); ++s) +++ { +++ if (foo [s] != &foo [s]) +++ abort (); +++ foo [s] = &foo [s ^ 1]; +++ } +++} ++--- /dev/null +++++ b/fbtl/tst-tls5.c ++@@ -0,0 +1,119 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Jakub Jelinek , 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, see +++ . */ +++ +++/* Check alignment, overlapping and layout of TLS variables. */ +++#include +++#include +++#include +++#include +++#include +++#include +++ +++#include "tst-tls5.h" +++ +++#ifdef TLS_REGISTER +++ +++struct tls_obj tls_registry[64]; +++ +++static int +++tls_addr_cmp (const void *a, const void *b) +++{ +++ if (((struct tls_obj *)a)->addr < ((struct tls_obj *)b)->addr) +++ return -1; +++ if (((struct tls_obj *)a)->addr > ((struct tls_obj *)b)->addr) +++ return 1; +++ return 0; +++} +++ +++static int +++do_test (void) +++{ +++ size_t cnt, i; +++ int res = 0; +++ uintptr_t min_addr = ~(uintptr_t) 0, max_addr = 0; +++ +++ for (cnt = 0; tls_registry[cnt].name; ++cnt); +++ tls_registry[cnt].name = NULL; +++ tls_registry[cnt].addr = (uintptr_t) pthread_self (); +++ tls_registry[cnt].size = sizeof (struct pthread); +++ tls_registry[cnt++].align = __alignof__ (struct pthread); +++ +++ qsort (tls_registry, cnt, sizeof (struct tls_obj), tls_addr_cmp); +++ +++ for (i = 0; i < cnt; ++i) +++ { +++ printf ("%s%s = %p, size %zd, align %zd", +++ tls_registry[i].name ? "&" : "", +++ tls_registry[i].name ?: "pthread_self ()", +++ (void *) tls_registry[i].addr, +++ tls_registry[i].size, tls_registry[i].align); +++ if (tls_registry[i].addr & (tls_registry[i].align - 1)) +++ { +++ fputs (", WRONG ALIGNMENT", stdout); +++ res = 1; +++ } +++ if (i > 0 +++ && (tls_registry[i - 1].addr + tls_registry[i - 1].size +++ > tls_registry[i].addr)) +++ { +++ fputs (", ADDRESS OVERLAP", stdout); +++ res = 1; +++ } +++ puts (""); +++ if (tls_registry[i].name) +++ { +++ min_addr = MIN (tls_registry[i].addr, min_addr); +++ max_addr = MAX (tls_registry[i].addr + tls_registry[i].size, +++ max_addr); +++ } +++ } +++ +++ if (cnt > 1) +++ { +++#if TLS_TCB_AT_TP +++ if (tls_registry[cnt - 1].name) +++ { +++ puts ("pthread_self () not larger than all TLS addresses"); +++ res = 1; +++ } +++ else +++ max_addr = MAX (tls_registry[cnt - 1].addr, max_addr); +++#elif TLS_DTV_AT_TP +++ if (tls_registry[0].name) +++ { +++ puts ("pthread_self () not smaller than all TLS addresses"); +++ res = 1; +++ } +++#else +++ abort (); +++#endif +++ printf ("Initial TLS used block size %zd\n", +++ (size_t) (max_addr - min_addr)); +++ } +++ return res; +++} +++ +++#define TEST_FUNCTION do_test () +++ +++#else +++ +++#define TEST_FUNCTION 0 +++ +++#endif +++ +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-tls5.h ++@@ -0,0 +1,25 @@ +++#include +++#include +++#include +++ +++ +++struct tls_obj +++{ +++ const char *name; +++ uintptr_t addr; +++ size_t size; +++ size_t align; +++}; +++extern struct tls_obj tls_registry[]; +++ +++#define TLS_REGISTER(x) \ +++static void __attribute__((constructor)) \ +++tls_register_##x (void) \ +++{ \ +++ size_t i; \ +++ for (i = 0; tls_registry[i].name; ++i); \ +++ tls_registry[i].name = #x; \ +++ tls_registry[i].addr = (uintptr_t) &x; \ +++ tls_registry[i].size = sizeof (x); \ +++ tls_registry[i].align = __alignof__ (x); \ +++} ++--- /dev/null +++++ b/fbtl/tst-tls5mod.c ++@@ -0,0 +1,6 @@ +++#include +++ +++#ifdef TLS_REGISTER +++/* Ensure tls_registry is exported from the binary. */ +++void *tst_tls5mod attribute_hidden = tls_registry; +++#endif ++--- /dev/null +++++ b/fbtl/tst-tls5moda.c ++@@ -0,0 +1,6 @@ +++#include +++ +++#ifdef TLS_REGISTER +++static __thread char a [32] __attribute__ ((aligned (64))); +++TLS_REGISTER (a) +++#endif ++--- /dev/null +++++ b/fbtl/tst-tls5modb.c ++@@ -0,0 +1,6 @@ +++#include +++ +++#ifdef TLS_REGISTER +++static __thread int b; +++TLS_REGISTER (b) +++#endif ++--- /dev/null +++++ b/fbtl/tst-tls5modc.c ++@@ -0,0 +1,6 @@ +++#include +++ +++#ifdef TLS_REGISTER +++static __thread int c; +++TLS_REGISTER (c) +++#endif ++--- /dev/null +++++ b/fbtl/tst-tls5modd.c ++@@ -0,0 +1,6 @@ +++#include +++ +++#ifdef TLS_REGISTER +++static __thread int d; +++TLS_REGISTER (d) +++#endif ++--- /dev/null +++++ b/fbtl/tst-tls5mode.c ++@@ -0,0 +1,8 @@ +++#include +++ +++#ifdef TLS_REGISTER +++static __thread int e1 = 24; +++static __thread char e2 [32] __attribute__ ((aligned (64))); +++TLS_REGISTER (e1) +++TLS_REGISTER (e2) +++#endif ++--- /dev/null +++++ b/fbtl/tst-tls5modf.c ++@@ -0,0 +1,9 @@ +++#include +++ +++#ifdef TLS_REGISTER +++char tst_tls5modf[60] attribute_hidden = { 26 }; +++static __thread int f1 = 24; +++static __thread char f2 [32] __attribute__ ((aligned (64))); +++TLS_REGISTER (f1) +++TLS_REGISTER (f2) +++#endif ++--- /dev/null +++++ b/fbtl/tst-tls6.sh ++@@ -0,0 +1,76 @@ +++#! /bin/bash +++# A tls test. +++# Copyright (C) 2003-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 +++# . +++ +++set -e +++ +++common_objpfx=$1; shift +++test_via_rtld_prefix=$1; shift +++test_wrapper_env=$1; shift +++logfile=$common_objpfx/fbtl/tst-tls6.out +++ +++# We have to find libc and fbtl +++library_path=${common_objpfx}:${common_objpfx}fbtl +++tst_tls5="${test_via_rtld_prefix} ${common_objpfx}/fbtl/tst-tls5" +++ +++LC_ALL=C +++export LC_ALL +++LANG=C +++export LANG +++ +++> $logfile +++fail=0 +++ +++for aligned in a e f; do +++ echo "preload tst-tls5mod{$aligned,b,c,d}.so" >> $logfile +++ echo "===============" >> $logfile +++ ${test_wrapper_env} \ +++ LD_PRELOAD="`echo ${common_objpfx}fbtl/tst-tls5mod{$aligned,b,c,d}.so \ +++ | sed 's/:$//;s/: /:/g'`" ${tst_tls5} >> $logfile || fail=1 +++ echo >> $logfile +++ +++ echo "preload tst-tls5mod{b,$aligned,c,d}.so" >> $logfile +++ echo "===============" >> $logfile +++ ${test_wrapper_env} \ +++ LD_PRELOAD="`echo ${common_objpfx}fbtl/tst-tls5mod{b,$aligned,c,d}.so \ +++ | sed 's/:$//;s/: /:/g'`" ${tst_tls5} >> $logfile || fail=1 +++ echo >> $logfile +++ +++ echo "preload tst-tls5mod{b,c,d,$aligned}.so" >> $logfile +++ echo "===============" >> $logfile +++ ${test_wrapper_env} \ +++ LD_PRELOAD="`echo ${common_objpfx}fbtl/tst-tls5mod{b,c,d,$aligned}.so \ +++ | sed 's/:$//;s/: /:/g'`" ${tst_tls5} >> $logfile || fail=1 +++ echo >> $logfile +++done +++ +++echo "preload tst-tls5mod{d,a,b,c,e}" >> $logfile +++echo "===============" >> $logfile +++${test_wrapper_env} \ +++LD_PRELOAD="`echo ${common_objpfx}fbtl/tst-tls5mod{d,a,b,c,e}.so \ +++ | sed 's/:$//;s/: /:/g'`" ${tst_tls5} >> $logfile || fail=1 +++echo >> $logfile +++ +++echo "preload tst-tls5mod{d,a,b,e,f}" >> $logfile +++echo "===============" >> $logfile +++${test_wrapper_env} \ +++LD_PRELOAD="`echo ${common_objpfx}fbtl/tst-tls5mod{d,a,b,e,f}.so \ +++ | sed 's/:$//;s/: /:/g'`" ${tst_tls5} >> $logfile || fail=1 +++echo >> $logfile +++ +++exit $fail ++--- /dev/null +++++ b/fbtl/tst-tpp.h ++@@ -0,0 +1,93 @@ +++/* Copyright (C) 2006-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Jakub Jelinek , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++/* This test is Linux specific. */ +++#define CHECK_TPP_PRIORITY(normal, boosted) \ +++ do \ +++ { \ +++ pid_t tid = syscall (__NR_gettid); \ +++ \ +++ struct sched_param cep_sp; \ +++ int cep_policy; \ +++ if (pthread_getschedparam (pthread_self (), &cep_policy, \ +++ &cep_sp) != 0) \ +++ { \ +++ puts ("getschedparam failed"); \ +++ ret = 1; \ +++ } \ +++ else if (cep_sp.sched_priority != (normal)) \ +++ { \ +++ printf ("unexpected priority %d != %d\n", \ +++ cep_sp.sched_priority, (normal)); \ +++ } \ +++ if (syscall (__NR_sched_getparam, tid, &cep_sp) == 0 \ +++ && cep_sp.sched_priority != (boosted)) \ +++ { \ +++ printf ("unexpected boosted priority %d != %d\n", \ +++ cep_sp.sched_priority, (boosted)); \ +++ ret = 1; \ +++ } \ +++ } \ +++ while (0) +++ +++int fifo_min, fifo_max; +++ +++void +++init_tpp_test (void) +++{ +++ fifo_min = sched_get_priority_min (SCHED_FIFO); +++ if (fifo_min < 0) +++ { +++ printf ("couldn't get min priority for SCHED_FIFO: %m\n"); +++ exit (1); +++ } +++ +++ fifo_max = sched_get_priority_max (SCHED_FIFO); +++ if (fifo_max < 0) +++ { +++ printf ("couldn't get max priority for SCHED_FIFO: %m\n"); +++ exit (1); +++ } +++ +++ if (fifo_min > 4 || fifo_max < 10) +++ { +++ printf ("%d..%d SCHED_FIFO priority interval not suitable for this test\n", +++ fifo_min, fifo_max); +++ exit (0); +++ } +++ +++ struct sched_param sp; +++ memset (&sp, 0, sizeof (sp)); +++ sp.sched_priority = 4; +++ int e = pthread_setschedparam (pthread_self (), SCHED_FIFO, &sp); +++ if (e != 0) +++ { +++ errno = e; +++ printf ("cannot set scheduling params: %m\n"); +++ exit (0); +++ } +++} ++--- /dev/null +++++ b/fbtl/tst-tsd1.c ++@@ -0,0 +1,117 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++ +++ +++static int +++do_test (void) +++{ +++ pthread_key_t key1; +++ pthread_key_t key2; +++ void *value; +++ int result = 0; +++ int err; +++ +++ err = pthread_key_create (&key1, NULL); +++ if (err != 0) +++ { +++ printf ("1st key_create failed: %s\n", strerror (err)); +++ return 1; +++ } +++ +++ /* Initial value must be NULL. */ +++ value = pthread_getspecific (key1); +++ if (value != NULL) +++ { +++ puts ("1st getspecific != NULL"); +++ result = 1; +++ } +++ +++ err = pthread_setspecific (key1, (void *) -2l); +++ if (err != 0) +++ { +++ printf ("1st setspecific failed: %s\n", strerror (err)); +++ return 1; +++ } +++ +++ value = pthread_getspecific (key1); +++ if (value == NULL) +++ { +++ puts ("2nd getspecific == NULL\n"); +++ result = 1; +++ } +++ else if (value != (void *) -2l) +++ { +++ puts ("2nd getspecific != -2l\n"); +++ result = 1; +++ } +++ +++ err = pthread_setspecific (key1, (void *) -3l); +++ if (err != 0) +++ { +++ printf ("2nd setspecific failed: %s\n", strerror (err)); +++ return 1; +++ } +++ +++ value = pthread_getspecific (key1); +++ if (value == NULL) +++ { +++ puts ("3rd getspecific == NULL\n"); +++ result = 1; +++ } +++ else if (value != (void *) -3l) +++ { +++ puts ("3rd getspecific != -2l\n"); +++ result = 1; +++ } +++ +++ err = pthread_key_delete (key1); +++ if (err != 0) +++ { +++ printf ("key_delete failed: %s\n", strerror (err)); +++ result = 1; +++ } +++ +++ +++ err = pthread_key_create (&key2, NULL); +++ if (err != 0) +++ { +++ printf ("2nd key_create failed: %s\n", strerror (err)); +++ return 1; +++ } +++ +++ if (key1 != key2) +++ puts ("key1 != key2; no more tests performed"); +++ else +++ { +++ value = pthread_getspecific (key2); +++ if (value != NULL) +++ { +++ puts ("4th getspecific != NULL"); +++ result = 1; +++ } +++ } +++ +++ return result; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-tsd2.c ++@@ -0,0 +1,96 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++ +++ +++static int result; +++ +++ +++static void +++destr (void *arg) +++{ +++ if (arg != (void *) -2l) +++ result = 2; +++ else +++ result = 0; +++} +++ +++ +++static void * +++tf (void *arg) +++{ +++ pthread_key_t key = (pthread_key_t) (long int) arg; +++ int err; +++ +++ err = pthread_setspecific (key, (void *) -2l); +++ if (err != 0) +++ result = 3; +++ +++ return NULL; +++} +++ +++ +++static int +++do_test (void) +++{ +++ pthread_key_t key; +++ pthread_t th; +++ int err; +++ +++ err = pthread_key_create (&key, destr); +++ if (err != 0) +++ { +++ printf ("key_create failed: %s\n", strerror (err)); +++ return 1; +++ } +++ +++ result = 1; +++ +++ err = pthread_create (&th, NULL, tf, (void *) (long int) key); +++ if (err != 0) +++ { +++ printf ("create failed: %s\n", strerror (err)); +++ return 1; +++ } +++ +++ /* Wait for the thread to terminate. */ +++ err = pthread_join (th, NULL); +++ if (err != 0) +++ { +++ printf ("join failed: %s\n", strerror (err)); +++ return 1; +++ } +++ +++ if (result == 1) +++ puts ("destructor not called"); +++ else if (result == 2) +++ puts ("destructor got passed a wrong value"); +++ else if (result == 3) +++ puts ("setspecific in child failed"); +++ else if (result != 0) +++ puts ("result != 0"); +++ +++ return result; +++} +++ +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-tsd3.c ++@@ -0,0 +1,128 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++ +++ +++static pthread_key_t key1; +++static pthread_key_t key2; +++ +++ +++static int left; +++ +++ +++static void +++destr1 (void *arg) +++{ +++ if (--left > 0) +++ { +++ puts ("set key2"); +++ +++ if (pthread_setspecific (key2, (void *) 1l) != 0) +++ { +++ puts ("destr1: setspecific failed"); +++ exit (1); +++ } +++ } +++} +++ +++ +++static void +++destr2 (void *arg) +++{ +++ if (--left > 0) +++ { +++ puts ("set key1"); +++ +++ if (pthread_setspecific (key1, (void *) 1l) != 0) +++ { +++ puts ("destr2: setspecific failed"); +++ exit (1); +++ } +++ } +++} +++ +++ +++static void * +++tf (void *arg) +++{ +++ /* Let the destructors work. */ +++ left = 7; +++ +++ if (pthread_setspecific (key1, (void *) 1l) != 0 +++ || pthread_setspecific (key2, (void *) 1l) != 0) +++ { +++ puts ("tf: setspecific failed"); +++ exit (1); +++ } +++ +++ return NULL; +++} +++ +++ +++static int +++do_test (void) +++{ +++ /* Allocate two keys, both with destructors. */ +++ if (pthread_key_create (&key1, destr1) != 0 +++ || pthread_key_create (&key2, destr2) != 0) +++ { +++ puts ("key_create failed"); +++ return 1; +++ } +++ +++ pthread_t th; +++ if (pthread_create (&th, NULL, tf, NULL) != 0) +++ { +++ puts ("create failed"); +++ return 1; +++ } +++ +++ if (pthread_join (th, NULL) != 0) +++ { +++ puts ("join failed"); +++ return 1; +++ } +++ +++ if (left != 0) +++ { +++ printf ("left == %d\n", left); +++ return 1; +++ } +++ +++ if (pthread_getspecific (key1) != NULL) +++ { +++ puts ("key1 data != NULL"); +++ return 1; +++ } +++ if (pthread_getspecific (key2) != NULL) +++ { +++ puts ("key2 data != NULL"); +++ return 1; +++ } +++ +++ return 0; +++} +++ +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-tsd4.c ++@@ -0,0 +1,102 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++ +++ +++static pthread_key_t key; +++ +++ +++static int rounds; +++ +++ +++static void +++destr (void *arg) +++{ +++ ++rounds; +++ +++ if (pthread_setspecific (key, (void *) 1l) != 0) +++ { +++ puts ("destr: setspecific failed"); +++ exit (1); +++ } +++} +++ +++ +++static void * +++tf (void *arg) +++{ +++ if (pthread_setspecific (key, (void *) 1l) != 0) +++ { +++ puts ("tf: setspecific failed"); +++ exit (1); +++ } +++ +++ return NULL; +++} +++ +++ +++/* This test check non-standard behavior. The standard does not +++ require that the implementation has to stop calling TSD destructors +++ when they are set over and over again. But NPTL does. */ +++static int +++do_test (void) +++{ +++ /* Allocate two keys, both with destructors. */ +++ if (pthread_key_create (&key, destr) != 0) +++ { +++ puts ("key_create failed"); +++ return 1; +++ } +++ +++ pthread_t th; +++ if (pthread_create (&th, NULL, tf, NULL) != 0) +++ { +++ puts ("create failed"); +++ return 1; +++ } +++ +++ if (pthread_join (th, NULL) != 0) +++ { +++ puts ("join failed"); +++ return 1; +++ } +++ +++ if (rounds < PTHREAD_DESTRUCTOR_ITERATIONS) +++ { +++ printf ("rounds == %d, PTHREAD_DESTRUCTOR_ITERATIONS = %d\n", +++ rounds, PTHREAD_DESTRUCTOR_ITERATIONS); +++ return 1; +++ } +++ +++ if (pthread_getspecific (key) != NULL) +++ { +++ puts ("key data != NULL"); +++ return 1; +++ } +++ +++ return 0; +++} +++ +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-tsd5.c ++@@ -0,0 +1,80 @@ +++/* Copyright (C) 2004-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 2004. +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public +++ License as published by the Free Software Foundation; either +++ version 2.1 of the License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General Public License 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 +++ . */ +++ +++#include +++#include +++#include +++ +++ +++static pthread_mutex_t m = PTHREAD_MUTEX_INITIALIZER; +++ +++ +++static void +++cl (void *p) +++{ +++ pthread_mutex_unlock (&m); +++} +++ +++ +++static void * +++tf (void *arg) +++{ +++ if (pthread_mutex_lock (&m) != 0) +++ { +++ puts ("2nd mutex_lock failed"); +++ exit (1); +++ } +++ +++ exit (0); +++} +++ +++ +++static int +++do_test (void) +++{ +++ pthread_key_t k; +++ if (pthread_key_create (&k, cl) != 0) +++ { +++ puts ("key_create failed"); +++ return 1; +++ } +++ if (pthread_setspecific (k, (void *) 1) != 0) +++ { +++ puts ("setspecific failed"); +++ return 1; +++ } +++ +++ if (pthread_mutex_lock (&m) != 0) +++ { +++ puts ("1st mutex_lock failed"); +++ return 1; +++ } +++ +++ pthread_t th; +++ if (pthread_create (&th, NULL, tf, NULL) != 0) +++ { +++ puts ("create failed"); +++ return 1; +++ } +++ +++ pthread_exit (NULL); +++} +++ +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-tsd6.c ++@@ -0,0 +1,89 @@ +++#include +++#include +++#include +++#include +++#include +++#include +++ +++#define NKEYS 100 +++static pthread_key_t keys[NKEYS]; +++static pthread_barrier_t b; +++ +++ +++static void * +++tf (void *arg) +++{ +++ void *res = NULL; +++ for (int i = 0; i < NKEYS; ++i) +++ { +++ void *p = pthread_getspecific (keys[i]); +++ pthread_setspecific (keys[i], (void *) 7); +++ if (p != NULL) +++ res = p; +++ } +++ if (arg != NULL) +++ { +++ pthread_barrier_wait (arg); +++ pthread_barrier_wait (arg); +++ } +++ return res; +++} +++ +++ +++static int +++do_test (void) +++{ +++ pthread_barrier_init (&b, NULL, 2); +++ +++ for (int i = 0; i < NKEYS; ++i) +++ if (pthread_key_create (&keys[i], NULL) != 0) +++ { +++ puts ("cannot create keys"); +++ return 1; +++ } +++ +++ pthread_t th; +++ if (pthread_create (&th, NULL, tf, &b) != 0) +++ { +++ puts ("cannot create thread in parent"); +++ return 1; +++ } +++ +++ pthread_barrier_wait (&b); +++ +++ pid_t pid = fork (); +++ if (pid == 0) +++ { +++ if (pthread_create (&th, NULL, tf, NULL) != 0) +++ { +++ puts ("cannot create thread in child"); +++ exit (1); +++ } +++ +++ void *res; +++ pthread_join (th, &res); +++ +++ exit (res != NULL); +++ } +++ else if (pid == -1) +++ { +++ puts ("cannot create child process"); +++ return 1; +++ } +++ +++ int s; +++ if (TEMP_FAILURE_RETRY (waitpid (pid, &s, 0)) != pid) +++ { +++ puts ("failing to wait for child process"); +++ return 1; +++ } +++ +++ pthread_barrier_wait (&b); +++ pthread_join (th, NULL); +++ +++ return !WIFEXITED (s) ? 2 : WEXITSTATUS (s); +++} +++ +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-typesizes.c ++@@ -0,0 +1,95 @@ +++/* Copyright (C) 2005-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++ +++static const struct +++{ +++ const char *name; +++ size_t expected; +++ size_t is; +++} types[] = +++ { +++#define T(t, c) \ +++ { #t, c, sizeof (t) } +++ T (pthread_attr_t, __SIZEOF_PTHREAD_ATTR_T), +++ T (pthread_mutex_t, __SIZEOF_PTHREAD_MUTEX_T), +++ T (pthread_mutexattr_t, __SIZEOF_PTHREAD_MUTEXATTR_T), +++ T (pthread_cond_t, __SIZEOF_PTHREAD_COND_T), +++ T (pthread_condattr_t, __SIZEOF_PTHREAD_CONDATTR_T), +++ T (pthread_rwlock_t, __SIZEOF_PTHREAD_RWLOCK_T), +++ T (pthread_rwlockattr_t, __SIZEOF_PTHREAD_RWLOCKATTR_T), +++ T (pthread_barrier_t, __SIZEOF_PTHREAD_BARRIER_T), +++ T (pthread_barrierattr_t, __SIZEOF_PTHREAD_BARRIERATTR_T) +++ }; +++ +++static int +++do_test (void) +++{ +++ int result = 0; +++ +++#define TEST_TYPE(name) \ +++ printf ("%s: ", #name); \ +++ if (sizeof (name) != sizeof (((name *) 0)->__size)) \ +++ { \ +++ printf ("expected %zu, is %zu\n", \ +++ sizeof (((name *) 0)->__size), sizeof (name)); \ +++ result = 1; \ +++ } \ +++ else \ +++ puts ("OK") +++ +++ TEST_TYPE (pthread_mutex_t); +++ TEST_TYPE (pthread_cond_t); +++ TEST_TYPE (pthread_rwlock_t); +++ +++#define TEST_TYPE2(name, internal) \ +++ printf ("%s: ", #name); \ +++ if (sizeof (((name *) 0)->__size) < sizeof (internal)) \ +++ { \ +++ printf ("expected %zu, is %zu\n", \ +++ sizeof (((name *) 0)->__size), sizeof (internal)); \ +++ result = 1; \ +++ } \ +++ else \ +++ puts ("OK") +++ +++ TEST_TYPE2 (pthread_attr_t, struct pthread_attr); +++ TEST_TYPE2 (pthread_mutexattr_t, struct pthread_mutexattr); +++ TEST_TYPE2 (pthread_condattr_t, struct pthread_condattr); +++ TEST_TYPE2 (pthread_rwlockattr_t, struct pthread_rwlockattr); +++ TEST_TYPE2 (pthread_barrier_t, struct pthread_barrier); +++ TEST_TYPE2 (pthread_barrierattr_t, struct pthread_barrierattr); +++ TEST_TYPE2 (sem_t, struct new_sem); +++ TEST_TYPE2 (sem_t, struct old_sem); +++ +++ for (size_t i = 0; i < sizeof (types) / sizeof (types[0]); ++i) +++ if (types[i].expected != types[i].is) +++ { +++ printf ("%s: expected %zu, is %zu\n", +++ types[i].name, types[i].expected, types[i].is); +++ result = 1; +++ } +++ +++ return result; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-umask1.c ++@@ -0,0 +1,136 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++static struct +++{ +++ int (*fp) (const char *, mode_t); +++ const char *name; +++ bool is_fd; +++} fcts[] = +++{ +++ { creat, "creat", true }, +++ { mkdir, "mkdir", false }, +++ { mkfifo, "mkfifo", false }, +++}; +++#define nfcts (sizeof (fcts) / sizeof (fcts[0])) +++ +++ +++static int +++work (const char *fname, int mask) +++{ +++ int result = 0; +++ size_t i; +++ for (i = 0; i < nfcts; ++i) +++ { +++ remove (fname); +++ int fd = fcts[i].fp (fname, 0777); +++ if (fd == -1) +++ { +++ printf ("cannot %s %s: %m\n", fcts[i].name, fname); +++ exit (1); +++ } +++ if (fcts[i].is_fd) +++ close (fd); +++ struct stat64 st; +++ if (stat64 (fname, &st) == -1) +++ { +++ printf ("cannot stat %s after %s: %m\n", fname, fcts[i].name); +++ exit (1); +++ } +++ +++ if ((st.st_mode & mask) != 0) +++ { +++ printf ("mask not successful after %s: %x still set\n", +++ fcts[i].name, (unsigned int) (st.st_mode & mask)); +++ result = 1; +++ } +++ } +++ +++ return result; +++} +++ +++ +++static pthread_barrier_t bar; +++ +++ +++static void * +++tf (void *arg) +++{ +++ pthread_barrier_wait (&bar); +++ +++ int result = work (arg, 022); +++ +++ pthread_barrier_wait (&bar); +++ +++ pthread_barrier_wait (&bar); +++ +++ return (work (arg, 0) | result) ? (void *) -1l : NULL; +++} +++ +++ +++static int +++do_test (const char *fname) +++{ +++ int result = 0; +++ +++ umask (0); +++ result |= work (fname, 0); +++ +++ pthread_barrier_init (&bar, NULL, 2); +++ +++ pthread_t th; +++ if (pthread_create (&th, NULL, tf, (void *) fname) != 0) +++ { +++ puts ("cannot create thread"); +++ exit (1); +++ } +++ +++ umask (022); +++ result |= work (fname, 022); +++ +++ pthread_barrier_wait (&bar); +++ +++ pthread_barrier_wait (&bar); +++ +++ umask (0); +++ +++ pthread_barrier_wait (&bar); +++ +++ void *res; +++ if (pthread_join (th, &res) != 0) +++ { +++ puts ("join failed"); +++ exit (1); +++ } +++ +++ remove (fname); +++ +++ return result || res != NULL; +++} +++ +++#define TEST_FUNCTION do_test (argc < 2 ? "/tmp/tst-umask.tmp" : argv[1]) +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-unload.c ++@@ -0,0 +1,47 @@ +++/* Tests for non-unloading of libpthread. +++ Copyright (C) 2000-2013 Free Software Foundation, Inc. +++ Contributed by Ulrich Drepper , 2000. +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public License as +++ published by the Free Software Foundation; either version 2.1 of the +++ License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General 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, see . */ +++ +++#include +++#include +++#include +++#include +++ +++static int +++do_test (void) +++{ +++ void *p = dlopen (LIBPTHREAD_SO, RTLD_LAZY); +++ +++ if (p == NULL) +++ { +++ puts ("failed to load " LIBPTHREAD_SO); +++ return 1; +++ } +++ +++ if (dlclose (p) != 0) +++ { +++ puts ("dlclose (" LIBPTHREAD_SO ") failed"); +++ return 1; +++ } +++ +++ puts ("seems to work"); +++ +++ return 0; +++} +++ +++#define TEST_FUNCTION do_test () +++#include "../test-skeleton.c" ++--- /dev/null +++++ b/fbtl/tst-vfork1.c ++@@ -0,0 +1 @@ +++#include ++--- /dev/null +++++ b/fbtl/tst-vfork1x.c ++@@ -0,0 +1 @@ +++#include ++--- /dev/null +++++ b/fbtl/tst-vfork2.c ++@@ -0,0 +1 @@ +++#include ++--- /dev/null +++++ b/fbtl/tst-vfork2x.c ++@@ -0,0 +1 @@ +++#include ++--- /dev/null +++++ b/fbtl/unwind.c ++@@ -0,0 +1,148 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper +++ and Richard Henderson , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include "pthreadP.h" +++#include +++ +++#ifdef _STACK_GROWS_DOWN +++# define FRAME_LEFT(frame, other, adj) \ +++ ((uintptr_t) frame - adj >= (uintptr_t) other - adj) +++#elif _STACK_GROWS_UP +++# define FRAME_LEFT(frame, other, adj) \ +++ ((uintptr_t) frame - adj <= (uintptr_t) other - adj) +++#else +++# error "Define either _STACK_GROWS_DOWN or _STACK_GROWS_UP" +++#endif +++ +++static _Unwind_Reason_Code +++unwind_stop (int version, _Unwind_Action actions, +++ _Unwind_Exception_Class exc_class, +++ struct _Unwind_Exception *exc_obj, +++ struct _Unwind_Context *context, void *stop_parameter) +++{ +++ struct pthread_unwind_buf *buf = stop_parameter; +++ struct pthread *self = THREAD_SELF; +++ struct _pthread_cleanup_buffer *curp = THREAD_GETMEM (self, cleanup); +++ int do_longjump = 0; +++ +++ /* Adjust all pointers used in comparisons, so that top of thread's +++ stack is at the top of address space. Without that, things break +++ if stack is allocated above the main stack. */ +++ uintptr_t adj = (uintptr_t) self->stackblock + self->stackblock_size; +++ +++ /* Do longjmp if we're at "end of stack", aka "end of unwind data". +++ We assume there are only C frame without unwind data in between +++ here and the jmp_buf target. Otherwise simply note that the CFA +++ of a function is NOT within it's stack frame; it's the SP of the +++ previous frame. */ +++ if ((actions & _UA_END_OF_STACK) +++ || ! _JMPBUF_CFA_UNWINDS_ADJ (buf->cancel_jmp_buf[0].jmp_buf, context, +++ adj)) +++ do_longjump = 1; +++ +++ if (__glibc_unlikely (curp != NULL)) +++ { +++ /* Handle the compatibility stuff. Execute all handlers +++ registered with the old method which would be unwound by this +++ step. */ +++ struct _pthread_cleanup_buffer *oldp = buf->priv.data.cleanup; +++ void *cfa = (void *) (_Unwind_Ptr) _Unwind_GetCFA (context); +++ +++ if (curp != oldp && (do_longjump || FRAME_LEFT (cfa, curp, adj))) +++ { +++ do +++ { +++ /* Pointer to the next element. */ +++ struct _pthread_cleanup_buffer *nextp = curp->__prev; +++ +++ /* Call the handler. */ +++ curp->__routine (curp->__arg); +++ +++ /* To the next. */ +++ curp = nextp; +++ } +++ while (curp != oldp +++ && (do_longjump || FRAME_LEFT (cfa, curp, adj))); +++ +++ /* Mark the current element as handled. */ +++ THREAD_SETMEM (self, cleanup, curp); +++ } +++ } +++ +++ if (do_longjump) +++ __libc_unwind_longjmp ((struct __jmp_buf_tag *) buf->cancel_jmp_buf, 1); +++ +++ return _URC_NO_REASON; +++} +++ +++ +++static void +++unwind_cleanup (_Unwind_Reason_Code reason, struct _Unwind_Exception *exc) +++{ +++ /* When we get here a C++ catch block didn't rethrow the object. We +++ cannot handle this case and therefore abort. */ +++#if 0 // does not work due to multiple macro expansions +++# define STR_N_LEN(str) str, strlen (str) +++ INTERNAL_SYSCALL_DECL (err); +++ INTERNAL_SYSCALL (write, err, 3, STDERR_FILENO, +++ STR_N_LEN ("FATAL: exception not rethrown\n")); +++#else +++# define UNWIND_FAILED_MSG "FATAL: exception not rethrown\n" +++ INTERNAL_SYSCALL_DECL (err); +++ INTERNAL_SYSCALL (write, err, 3, STDERR_FILENO, +++ UNWIND_FAILED_MSG, strlen(UNWIND_FAILED_MSG)); +++#endif +++ abort (); +++} +++ +++ +++void +++__cleanup_fct_attribute __attribute ((noreturn)) +++__pthread_unwind (__pthread_unwind_buf_t *buf) +++{ +++ struct pthread_unwind_buf *ibuf = (struct pthread_unwind_buf *) buf; +++ struct pthread *self = THREAD_SELF; +++ +++ /* This is not a catchable exception, so don't provide any details about +++ the exception type. We do need to initialize the field though. */ +++ THREAD_SETMEM (self, exc.exception_class, 0); +++ THREAD_SETMEM (self, exc.exception_cleanup, &unwind_cleanup); +++ +++ _Unwind_ForcedUnwind (&self->exc, unwind_stop, ibuf); +++ /* NOTREACHED */ +++ +++ /* We better do not get here. */ +++ abort (); +++} +++hidden_def (__pthread_unwind) +++ +++ +++void +++__cleanup_fct_attribute __attribute ((noreturn)) +++__pthread_unwind_next (__pthread_unwind_buf_t *buf) +++{ +++ struct pthread_unwind_buf *ibuf = (struct pthread_unwind_buf *) buf; +++ +++ __pthread_unwind ((__pthread_unwind_buf_t *) ibuf->priv.data.prev); +++} +++hidden_def (__pthread_unwind_next) ++--- /dev/null +++++ b/fbtl/vars.c ++@@ -0,0 +1,43 @@ +++/* Copyright (C) 2004-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 +++ . */ +++ +++#include +++#include +++#include +++#include +++ +++/* Default thread attributes for the case when the user does not +++ provide any. */ +++struct pthread_attr __default_pthread_attr attribute_hidden; +++ +++/* Mutex protecting __default_pthread_attr. */ +++int __default_pthread_attr_lock = LLL_LOCK_INITIALIZER; +++ +++/* Flag whether the machine is SMP or not. */ +++int __is_smp attribute_hidden; +++ +++#ifndef TLS_MULTIPLE_THREADS_IN_TCB +++/* Variable set to a nonzero value either if more than one thread runs or ran, +++ or if a single-threaded process is trying to cancel itself. See +++ nptl/descr.h for more context on the single-threaded process case. */ +++int __pthread_multiple_threads attribute_hidden; +++#endif +++ +++/* Table of the key information. */ +++struct pthread_key_struct __pthread_keys[PTHREAD_KEYS_MAX] +++ __attribute__ ((nocommon)); +++hidden_data_def (__pthread_keys) ++--- /dev/null +++++ b/fbtl/version.c ++@@ -0,0 +1,42 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++ +++ +++static const char banner[] = +++#include "banner.h" +++"Copyright (C) 2006 Free Software Foundation, Inc.\n\ +++This is free software; see the source for copying conditions.\n\ +++There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A\n\ +++PARTICULAR PURPOSE.\n" +++"Forced unwind support included.\n" +++; +++ +++ +++extern void __nptl_main (void) __attribute__ ((noreturn)); +++void +++__nptl_main (void) +++{ +++ INTERNAL_SYSCALL_DECL (err); +++ INTERNAL_SYSCALL (write, err, 3, STDOUT_FILENO, (const char *) banner, +++ sizeof banner - 1); +++ +++ _exit (0); +++} ++--- /dev/null +++++ b/fbtl_db/ChangeLog ++@@ -0,0 +1,333 @@ +++2013-05-31 Joseph Myers +++ +++ * Makefile ($(objpfx)libthread_db.so): Remove dependencies on +++ libc. +++ +++2013-05-16 Ryan S. Arnold +++ +++ * db_info.c: Add missing #include due to uint64_t or +++ uint32_t usage. +++ * fetch-value.c: Likewise. +++ * td_ta_clear_event.c: Likewise. +++ * td_ta_set_event.c: Likewise. +++ * td_ta_tsd_iter.c: Likewise. +++ * td_thr_clear_event.c: Likewise. +++ * td_thr_get_info.c: Likewise. +++ * td_thr_set_event.c: Likewise. +++ * td_thr_tsd.c: Likewise. +++ +++2013-01-02 Joseph Myers +++ +++ * All files with FSF copyright notices: Update copyright dates +++ using scripts/update-copyrights. +++ +++2013-01-01 Joseph Myers +++ +++ * td_ta_thr_iter.c: Reformat copyright notice. +++ * td_thr_validate.c: Likewise. +++ +++2012-11-23 Mike Frysinger +++ +++ * Makefile ($(objpfx)db-symbols.out): Change readelf to $(READELF). +++ +++2012-10-08 Jonathan Nieder +++ +++ [BZ #14661] +++ * Makefile ($(objpfx)db-symbols.out): Force C locale when running +++ readelf -s. +++ +++2012-03-07 Ulrich Drepper +++ +++ * Makefile (distribute): Remove variable. +++ +++2011-09-15 Andreas Schwab +++ +++ * thread_dbP.h: Include +++ +++2009-08-23 Roland McGrath +++ +++ * td_ta_map_lwp2thr.c (__td_ta_lookup_th_unique): Move ta_ok check +++ and LOG call back to ... +++ (td_ta_map_lwp2thr): ... here. +++ Reported by Maciej W. Rozycki . +++ +++2009-05-25 Aurelien Jarno +++ +++ [BZ #10200] +++ * db-symbols.awk: Use the last field for the symbol name instead +++ of the 8th one. +++ +++2009-03-19 Roland McGrath +++ +++ * td_symbol_list.c (DB_LOOKUP_NAME, DB_LOOKUP_NAME_TH_UNIQUE): +++ Use STRINGIFY macro in place of #argument. +++ +++2009-02-27 Roland McGrath +++ +++ * td_symbol_list.c (symbol_list_arr): Move initializer guts to ... +++ * db-symbols.h: ... here, new file. +++ * db-symbols.awk: New file. +++ * Makefile (distribute): Add them. +++ ($(objpfx)db-symbols.out): New target. +++ (tests): Depend on it. +++ ($(objpfx)db-symbols.v.i): New dependent rule. +++ +++2009-02-06 Ulrich Drepper +++ +++ * td_thr_get_info.c (td_thr_get_info): Initialize schedpolicy in +++ the special case [Coverity CID 251]. +++ +++2008-03-25 Roland McGrath +++ +++ [BZ #5983] +++ * structs.def: Add pid field of struct pthread. +++ * td_ta_thr_iter.c (iterate_thread_list): Take new arg MATCH_PID. +++ If a thread's pid does not match nor is < 0 while its tid matches +++ nor is < 0 and equal to -MATCH_PID, ignore it. +++ * td_thr_validate.c (td_thr_validate): Validate thread's pid/tid. +++ +++2007-05-16 Roland McGrath +++ +++ * td_thr_get_info.c: Fake the results for TH->th_unique == 0. +++ * td_thr_validate.c: Likewise. +++ * td_thr_setgregs.c: Likewise. +++ * td_thr_setfpregs.c: Likewise. +++ * td_thr_getgregs.c: Likewise. +++ * td_thr_getfpregs.c: Likewise. +++ * td_thr_tlsbase.c: Likewise. +++ +++ * structs.def: Add DB_VARIABLE (__nptl_initial_report_events). +++ * db_info.c: Add necessary declaration. +++ * td_thr_event_enable.c: Set __nptl_initial_report_events too. +++ +++ * td_ta_thr_iter.c (iterate_thread_list): Make FAKE_EMPTY bool. +++ Use th_unique=0 in fake descriptor before initialization. +++ +++ * td_ta_map_lwp2thr.c (__td_ta_lookup_th_unique): New function, broken +++ out of ... +++ (td_ta_map_lwp2thr): ... here, call it. But don't before __stack_user +++ is initialized, then fake a handle with th_unique=0. +++ * thread_dbP.h: Declare it. +++ +++2006-10-26 Pete Eberlein +++ +++ * nptl_db/db_info.c [TLS_DTV_AT_TP]: Fixed size init for dtvp +++ to sizeof a pointer, instead of sizeof the union. +++ +++2006-10-27 Ulrich Drepper +++ +++ * structs.def: USE_TLS support is now default. +++ +++2006-02-03 Roland McGrath +++ +++ * structs.def: Add a descriptor for pointer.val field of dtv_t. +++ * td_thr_tlsbase.c (td_thr_tlsbase): Extract pointer.val field from +++ DTV slot. +++ +++2004-09-09 Roland McGrath +++ +++ * td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Don't abort if inferior's +++ descriptor is bogus. +++ +++2004-05-27 Roland McGrath +++ +++ * td_thr_validate.c: When we find no threads and the inferior appears +++ uninitialized, validate the main thread as a special case. +++ +++2004-05-01 Jakub Jelinek +++ +++ * thread_dbP.h (LOG): Use write instead of __libc_write. +++ +++2004-04-03 Ulrich Drepper +++ +++ * td_ta_set_event.c (td_ta_set_event): Initialize copy to avoid +++ warnings. +++ +++ * td_ta_thr_iter.c (td_ta_thr_iter): Initialize list to avoid warning. +++ * td_ta_clear_event.c (td_ta_clear_event): Initialize eventmask to +++ avoid warning. +++ * td_ta_set_event.c (td_ta_set_event): Likewise. +++ +++2004-03-24 Roland McGrath +++ +++ * fetch-value.c (_td_locate_field): Cast DB_DESC_OFFSET to int32_t. +++ * thread_dbP.h (DB_DESC_OFFSET): Remove cast from definition. +++ +++2004-03-13 Jakub Jelinek +++ +++ * db_info.c: Don't use TLS_TP_OFFSET in the #if, but +++ TLS_TCB_SIZE == 0 ?: in the DESC macro. +++ +++2004-03-12 Roland McGrath +++ +++ * db_info.c [TLS_DTV_AT_TP && TLS_TP_OFFSET > 0] +++ (_thread_db_pthread_dtvp): Define differently for this case (PowerPC). +++ +++2003-12-11 Ulrich Weigand +++ +++ * db_info.c (REGISTER): Add bit size of thread register as second +++ parameter to REGISTER macro. +++ +++2003-12-02 Roland McGrath +++ +++ * thread_dbP.h (DB_FUNCTION): New macro. +++ * structs.def: Use it for __nptl_create_event and __nptl_death_event. +++ * db_info.c (DB_FUNCTION): New macro. +++ * td_symbol_list.c (DB_FUNCTION): New macro, prepend "." to symbol +++ name under [HAVE_ASM_GLOBAL_DOT_NAME]. +++ (td_lookup) [HAVE_ASM_GLOBAL_DOT_NAME]: If lookup fails with PS_NOSYM +++ and name starts with a dot, try it without the dot. +++ +++2003-09-08 Roland McGrath +++ +++ * td_thr_get_info.c (td_thr_get_info): Cast th_unique to thread_t. +++ +++2003-08-22 Roland McGrath +++ +++ * fetch-value.c (_td_check_sizeof, _td_locate_field): Return +++ TD_NOCAPAB for PS_NOSYM, instead of vanilla TD_ERR. +++ * td_thr_tls_get_addr.c (td_thr_tls_get_addr): Return TD_NOAPLIC when +++ DB_GET_FIELD returns TD_NOCAPAB. +++ +++ * thread_db.h (td_thr_tls_get_addr): Use psaddr_t in signature. +++ * structs.def [USE_TLS]: Add DB_STRUCT_FIELD (link_map, l_tls_modid). +++ * db_info.c (link_map): Typedef it. +++ * td_thr_tls_get_addr.c (td_thr_tls_get_addr): Rewritten. +++ +++2003-08-14 Roland McGrath +++ +++ * thread_dbP.h: Mostly rewritten with many new macros and decls. +++ * td_ta_new.c (td_ta_new): Don't cache a lot of symbol values. +++ * structs.def: New file. +++ * db_info.c: New file. +++ * td_symbol_list.c (symbol_list_arr): Define with structs.def macros. +++ * td_ta_clear_event.c: Rewritten. +++ * td_ta_event_addr.c: Rewritten. +++ * td_ta_event_getmsg.c: Rewritten. +++ * td_ta_get_nthreads.c: Rewritten. +++ * td_ta_map_lwp2thr.c: New file. +++ * td_ta_set_event.c: Rewritten. +++ * td_ta_thr_iter.c: Rewritten. +++ * td_ta_tsd_iter.c: Rewritten. +++ * td_thr_clear_event.c: Rewritten. +++ * td_thr_event_enable.c: Rewritten. +++ * td_thr_event_getmsg.c: Rewritten. +++ * td_thr_get_info.c: Rewritten. +++ * td_thr_getfpregs.c: Rewritten. +++ * td_thr_getgregs.c: Rewritten. +++ * td_thr_set_event.c: Rewritten. +++ * td_thr_setfpregs.c: Rewritten. +++ * td_thr_setgregs.c: Rewritten. +++ * td_thr_tlsbase.c: Rewritten. +++ * td_thr_tsd.c: Rewritten. +++ * td_thr_validate.c: Rewritten. +++ * Makefile (distribute): Add them. +++ * fetch-value.c: New file. +++ * Makefile (libthread_db-routines): Add it. +++ +++ * thread_db.h (td_err_e): Comment fix. +++ +++2003-08-05 Roland McGrath +++ +++ * thread_dbP.h (td_lookup): Add attribute_hidden to decl. +++ +++2003-08-04 Roland McGrath +++ +++ * td_ta_clear_event.c (td_ta_clear_event): Fix sizes in ps_* calls. +++ +++2003-06-23 Roland McGrath +++ +++ * proc_service.h: Cosmetic and comment fixes. +++ +++2003-06-19 Roland McGrath +++ +++ * td_thr_event_enable.c (td_thr_event_enable): Use proper type `bool' +++ for value written into inferior's `report_events'. +++ +++2003-03-18 Roland McGrath +++ +++ * td_thr_event_getmsg.c (td_thr_event_getmsg): Splice the thread out +++ of the ->nextevent linkage. +++ +++ * td_ta_event_getmsg.c (td_ta_event_getmsg): Runtime error instead of +++ assert for reading TD_EVENT_NONE. Clear the event buffer after +++ reading it. Add a sanity check for foo->nextevent = foo. +++ +++2003-03-15 Roland McGrath +++ +++ * thread_db.h (td_err_e): Add TD_NOTLS and TD_TLSDEFER. +++ (td_thr_tlsbase): Declare it. +++ * td_thr_tlsbase.c: New file. +++ * Makefile (libthread_db-routines): Add it. +++ * Versions (libthread_db: GLIBC_2.3.3): New set, add td_thr_tlsbase. +++ * td_thr_tls_get_addr.c (td_thr_tls_get_addr): Use td_thr_tlsbase. +++ +++2003-03-14 Roland McGrath +++ +++ * td_thr_tls_get_addr.c (td_thr_tls_get_addr): Use `header.' prefix. +++ +++2003-03-10 Roland McGrath +++ +++ * td_ta_thr_iter.c (iterate_thread_list): Don't use `header.data.' +++ prefix for `struct pthread' members. +++ * td_thr_validate.c (check_thread_list): Likewise. +++ * td_thr_tls_get_addr.c (td_thr_tls_get_addr): Likewise. +++ +++2003-03-03 Roland McGrath +++ +++ * td_thr_tls_get_addr.c (td_thr_tls_get_addr): Handle TLS_DTV_AT_TP. +++ +++2003-02-15 Ulrich Drepper +++ +++ * td_symbol_list.c: New symbol name for SYM_PTHREAD_NTHREADS. +++ +++2003-01-07 Jakub Jelinek +++ +++ * td_ta_event_getmsg.c: Include assert.h. +++ +++-2003-01-05 Ulrich Drepper +++ +++ * Makefile (libthread_db.so-no-z-defs): Define. +++ +++2003-01-03 Roland McGrath +++ +++ * td_thr_setgregs.c (td_thr_setgregs): *_BIT -> *_BITMASK +++ * td_thr_setfpregs.c (td_thr_setfpregs): Likewise. +++ * td_thr_get_info.c (td_thr_get_info): Likewise. +++ * td_thr_getgregs.c (td_thr_getgregs): Likewise. +++ * td_thr_getfpregs.c (td_thr_getfpregs): Likewise. +++ * td_ta_thr_iter.c (iterate_thread_list): Likewise. +++ +++2002-12-12 Roland McGrath +++ +++ * td_ta_thr_iter.c (iterate_thread_list): Handle special case of +++ uninitialized __stack_user (zeros), hard-wire just the main thread. +++ +++ * td_thr_get_info.c (td_thr_get_info): Fix ti_lid initialization. +++ +++2002-12-06 Roland McGrath +++ +++ * td_ta_event_getmsg.c (td_ta_event_getmsg): Write the NEXT pointer +++ into the inferior's __pthread_last_event variable, not a word from +++ an inferior address used in the parent. Pass the address of a +++ null word to ps_pdwrite, not a null pointer. +++ +++2002-12-04 Roland McGrath +++ +++ * td_thr_get_info.c (td_thr_get_info): ti_tid is pthread_t, not a PID. +++ +++ * thread_db.h (td_thrinfo_t): Comment fix. +++ +++ * td_ta_map_lwp2thr.c: Moved to ../nptl/sysdeps/i386/. +++ +++2002-12-04 Ulrich Drepper +++ +++ * td_ta_thr_iter.c (iterate_thread_list): At end of iteration read +++ pointer to the next element from inferior. +++ +++2002-12-02 Roland McGrath +++ +++ * td_symbol_list.c (symbol_list_arr): pthread_keys -> __pthread_keys +++ +++ * td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Fetch inferior registers to +++ see its %gs value, not our own. ++--- /dev/null +++++ b/fbtl_db/Makefile ++@@ -0,0 +1,59 @@ +++# Copyright (C) 2002-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 +++# . +++ +++# Makefile for NPTL debug library subdirectory of GNU C Library. +++ +++subdir := fbtl_db +++ +++fbtl_db-version = 1.0 +++ +++extra-libs = libthread_db +++extra-libs-others := $(extra-libs) +++ +++headers = thread_db.h +++ +++libthread_db-routines = td_init td_log td_ta_new td_ta_delete \ +++ td_ta_get_nthreads td_ta_get_ph \ +++ td_ta_map_id2thr td_ta_map_lwp2thr \ +++ td_ta_thr_iter td_ta_tsd_iter \ +++ td_thr_get_info td_thr_getfpregs td_thr_getgregs \ +++ td_thr_getxregs td_thr_getxregsize td_thr_setfpregs \ +++ td_thr_setgregs td_thr_setprio td_thr_setsigpending \ +++ td_thr_setxregs td_thr_sigsetmask td_thr_tsd \ +++ td_thr_validate td_thr_dbsuspend td_thr_dbresume \ +++ td_ta_setconcurrency td_ta_enable_stats \ +++ td_ta_reset_stats td_ta_get_stats td_ta_event_addr \ +++ td_thr_event_enable td_thr_set_event \ +++ td_thr_clear_event td_thr_event_getmsg \ +++ td_ta_set_event td_ta_event_getmsg \ +++ td_ta_clear_event td_symbol_list \ +++ td_thr_tlsbase td_thr_tls_get_addr \ +++ fetch-value +++ +++libthread_db-inhibit-o = $(filter-out .os,$(object-suffixes)) +++ +++# The ps_* callback functions are not defined. +++libthread_db.so-no-z-defs = yes +++ +++include ../Rules +++ +++tests: $(objpfx)db-symbols.out +++$(objpfx)db-symbols.out: $(objpfx)db-symbols.v.i \ +++ $(common-objpfx)fbtl/libpthread.so +++ LC_ALL=C $(READELF) -W -s $(filter %.so,$^) | $(AWK) -f $< > $@ +++ +++$(objpfx)db-symbols.v.i: db-symbols.awk ++--- /dev/null +++++ b/fbtl_db/Versions ++@@ -0,0 +1,24 @@ +++libthread_db { +++ GLIBC_2.1.3 { +++ # t* +++ td_init; td_log; td_ta_clear_event; td_ta_delete; td_ta_enable_stats; +++ td_ta_event_addr; td_ta_event_getmsg; td_ta_get_nthreads; td_ta_get_ph; +++ td_ta_get_stats; td_ta_map_id2thr; td_ta_map_lwp2thr; td_ta_new; +++ td_ta_reset_stats; td_ta_set_event; td_ta_setconcurrency; +++ td_ta_thr_iter; td_ta_tsd_iter; td_thr_clear_event; td_thr_dbresume; +++ td_thr_dbsuspend; td_thr_event_enable; td_thr_event_getmsg; +++ td_thr_get_info; td_thr_getfpregs; td_thr_getgregs; td_thr_getxregs; +++ td_thr_getxregsize; td_thr_set_event; td_thr_setfpregs; td_thr_setgregs; +++ td_thr_setprio; td_thr_setsigpending; td_thr_setxregs; td_thr_sigsetmask; +++ td_thr_tsd; td_thr_validate; +++ } +++ GLIBC_2.2.3 { +++ td_symbol_list; +++ } +++ GLIBC_2.3 { +++ td_thr_tls_get_addr; +++ } +++ GLIBC_2.3.3 { +++ td_thr_tlsbase; +++ } +++} ++--- /dev/null +++++ b/fbtl_db/db-symbols.awk ++@@ -0,0 +1,47 @@ +++# This script processes the output of 'readelf -W -s' on the libpthread.so +++# we've just built. It checks for all the symbols used in td_symbol_list. +++ +++BEGIN { +++%define DB_RTLD_VARIABLE(name) /* Nothing. */ +++%define DB_MAIN_VARIABLE(name) /* Nothing. */ +++%define DB_LOOKUP_NAME(idx, name) required[STRINGIFY (name)] = 1; +++%define DB_LOOKUP_NAME_TH_UNIQUE(idx, name) th_unique[STRINGIFY (name)] = 1; +++%include "db-symbols.h" +++ +++ in_symtab = 0; +++} +++ +++/Symbol table '.symtab'/ { in_symtab=1; next } +++NF == 0 { in_symtab=0; next } +++ +++!in_symtab { next } +++ +++NF >= 8 && $7 != "UND" { seen[$NF] = 1 } +++ +++END { +++ status = 0; +++ +++ for (s in required) { +++ if (s in seen) print s, "ok"; +++ else { +++ status = 1; +++ print s, "***MISSING***"; +++ } +++ } +++ +++ any = ""; +++ for (s in th_unique) { +++ if (s in seen) { +++ any = s; +++ break; +++ } +++ } +++ if (any) +++ print "th_unique:", any; +++ else { +++ status = 1; +++ print "th_unique:", "***MISSING***"; +++ } +++ +++ exit(status); +++} ++--- /dev/null +++++ b/fbtl_db/db-symbols.h ++@@ -0,0 +1,55 @@ +++/* List of symbols in libpthread examined by libthread_db. +++ Copyright (C) 2009-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 +++ . */ +++ +++#ifdef HAVE_ASM_GLOBAL_DOT_NAME +++# define DOT(x) .##x /* PPC64 requires . prefix on code symbols. */ +++#else +++# define DOT(x) x /* No prefix. */ +++#endif +++ +++#define STRINGIFY(name) STRINGIFY_1(name) +++#define STRINGIFY_1(name) #name +++ +++#define DB_STRUCT(type) \ +++ DB_LOOKUP_NAME (SYM_SIZEOF_##type, _thread_db_sizeof_##type) +++#define DB_STRUCT_FIELD(type, field) \ +++ DB_LOOKUP_NAME (SYM_##type##_FIELD_##field, _thread_db_##type##_##field) +++#define DB_SYMBOL(name) \ +++ DB_LOOKUP_NAME (SYM_##name, name) +++#define DB_FUNCTION(name) \ +++ DB_LOOKUP_NAME (SYM_##name, DOT (name)) +++#define DB_VARIABLE(name) \ +++ DB_LOOKUP_NAME (SYM_##name, name) \ +++ DB_LOOKUP_NAME (SYM_DESC_##name, _thread_db_##name) +++ +++# include "structs.def" +++ +++# undef DB_STRUCT +++# undef DB_FUNCTION +++# undef DB_SYMBOL +++# undef DB_VARIABLE +++# undef DOT +++ +++DB_LOOKUP_NAME_TH_UNIQUE (SYM_TH_UNIQUE_REGISTER64, _thread_db_register64) +++DB_LOOKUP_NAME_TH_UNIQUE (SYM_TH_UNIQUE_REGISTER32, _thread_db_register32) +++DB_LOOKUP_NAME_TH_UNIQUE (SYM_TH_UNIQUE_CONST_THREAD_AREA, +++ _thread_db_const_thread_area) +++DB_LOOKUP_NAME_TH_UNIQUE (SYM_TH_UNIQUE_REGISTER32_THREAD_AREA, +++ _thread_db_register32_thread_area) +++DB_LOOKUP_NAME_TH_UNIQUE (SYM_TH_UNIQUE_REGISTER64_THREAD_AREA, +++ _thread_db_register64_thread_area) ++--- /dev/null +++++ b/fbtl_db/db_info.c ++@@ -0,0 +1,109 @@ +++/* This file is included by pthread_create.c to define in libpthread +++ all the magic symbols required by libthread_db. +++ +++ Copyright (C) 2003-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 +++ . */ +++ +++#include +++#include "thread_dbP.h" +++#include +++#include +++ +++typedef struct pthread pthread; +++typedef struct pthread_key_struct pthread_key_struct; +++typedef struct pthread_key_data pthread_key_data; +++typedef struct +++{ +++ struct pthread_key_data data[PTHREAD_KEY_2NDLEVEL_SIZE]; +++} +++pthread_key_data_level2; +++ +++typedef struct +++{ +++ union dtv dtv[UINT32_MAX / 2 / sizeof (union dtv)]; /* No constant bound. */ +++} dtv; +++ +++typedef struct link_map link_map; +++typedef struct rtld_global rtld_global; +++typedef struct dtv_slotinfo_list dtv_slotinfo_list; +++typedef struct dtv_slotinfo dtv_slotinfo; +++ +++/* Actually static in nptl/init.c, but we only need it for typeof. */ +++extern bool __nptl_initial_report_events; +++ +++#define schedparam_sched_priority schedparam.sched_priority +++ +++#define eventbuf_eventmask eventbuf.eventmask +++#define eventbuf_eventmask_event_bits eventbuf.eventmask.event_bits +++ +++#define DESC(name, offset, obj) \ +++ DB_DEFINE_DESC (name, 8 * sizeof (obj), 1, offset); +++#define ARRAY_DESC(name, offset, obj) \ +++ DB_DEFINE_DESC (name, \ +++ 8 * sizeof (obj)[0], sizeof (obj) / sizeof (obj)[0], \ +++ offset); +++ +++#if TLS_TCB_AT_TP +++# define dtvp header.dtv +++#elif TLS_DTV_AT_TP +++/* Special case hack. If TLS_TCB_SIZE == 0 (on PowerPC), there is no TCB +++ containing the DTV at the TP, but actually the TCB lies behind the TP, +++ i.e. at the very end of the area covered by TLS_PRE_TCB_SIZE. */ +++DESC (_thread_db_pthread_dtvp, +++ TLS_PRE_TCB_SIZE + offsetof (tcbhead_t, dtv) +++ - (TLS_TCB_SIZE == 0 ? sizeof (tcbhead_t) : 0), union dtv *) +++#endif +++ +++ +++#define DB_STRUCT(type) \ +++ const uint32_t _thread_db_sizeof_##type = sizeof (type); +++#define DB_STRUCT_FIELD(type, field) \ +++ DESC (_thread_db_##type##_##field, \ +++ offsetof (type, field), ((type *) 0)->field) +++#define DB_STRUCT_ARRAY_FIELD(type, field) \ +++ ARRAY_DESC (_thread_db_##type##_##field, \ +++ offsetof (type, field), ((type *) 0)->field) +++#define DB_VARIABLE(name) DESC (_thread_db_##name, 0, name) +++#define DB_ARRAY_VARIABLE(name) ARRAY_DESC (_thread_db_##name, 0, name) +++#define DB_SYMBOL(name) /* Nothing. */ +++#define DB_FUNCTION(name) /* Nothing. */ +++#include "structs.def" +++#undef DB_STRUCT +++#undef DB_STRUCT_FIELD +++#undef DB_SYMBOL +++#undef DB_FUNCTION +++#undef DB_VARIABLE +++#undef DESC +++ +++ +++ +++#ifdef DB_THREAD_SELF +++# ifdef DB_THREAD_SELF_INCLUDE +++# include DB_THREAD_SELF_INCLUDE +++# endif +++ +++/* This macro is defined in the machine's tls.h using the three below. */ +++# define CONST_THREAD_AREA(bits, value) \ +++ const uint32_t _thread_db_const_thread_area = (value); +++# define REGISTER_THREAD_AREA(bits, regofs, scale) \ +++ DB_DEFINE_DESC (_thread_db_register##bits##_thread_area, \ +++ bits, (scale), (regofs)); +++# define REGISTER(bits, size, regofs, bias) \ +++ DB_DEFINE_DESC (_thread_db_register##bits, size, (uint32_t)(bias), (regofs)); +++ +++DB_THREAD_SELF +++#endif ++--- /dev/null +++++ b/fbtl_db/fetch-value.c ++@@ -0,0 +1,285 @@ +++/* Helper routines for libthread_db. +++ Copyright (C) 2003-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 +++ . */ +++ +++#include "thread_dbP.h" +++#include +++#include +++#include +++ +++td_err_e +++_td_check_sizeof (td_thragent_t *ta, uint32_t *sizep, int sizep_name) +++{ +++ if (*sizep == 0) +++ { +++ psaddr_t descptr; +++ ps_err_e err = td_lookup (ta->ph, sizep_name, &descptr); +++ if (err == PS_NOSYM) +++ return TD_NOCAPAB; +++ if (err == PS_OK) +++ err = ps_pdread (ta->ph, descptr, sizep, sizeof *sizep); +++ if (err != PS_OK) +++ return TD_ERR; +++ if (*sizep & 0xff000000U) +++ *sizep = bswap_32 (*sizep); +++ } +++ return TD_OK; +++} +++ +++td_err_e +++_td_locate_field (td_thragent_t *ta, +++ db_desc_t desc, int descriptor_name, +++ psaddr_t idx, psaddr_t *address) +++{ +++ uint32_t elemsize; +++ +++ if (DB_DESC_SIZE (desc) == 0) +++ { +++ /* Read the information about this field from the inferior. */ +++ psaddr_t descptr; +++ ps_err_e err = td_lookup (ta->ph, descriptor_name, &descptr); +++ if (err == PS_NOSYM) +++ return TD_NOCAPAB; +++ if (err == PS_OK) +++ err = ps_pdread (ta->ph, descptr, desc, DB_SIZEOF_DESC); +++ if (err != PS_OK) +++ return TD_ERR; +++ if (DB_DESC_SIZE (desc) == 0) +++ return TD_DBERR; +++ if (DB_DESC_SIZE (desc) & 0xff000000U) +++ { +++ /* Byte-swap these words, though we leave the size word +++ in native order as the handy way to distinguish. */ +++ DB_DESC_OFFSET (desc) = bswap_32 (DB_DESC_OFFSET (desc)); +++ DB_DESC_NELEM (desc) = bswap_32 (DB_DESC_NELEM (desc)); +++ } +++ } +++ +++ if (idx != 0 && DB_DESC_NELEM (desc) != 0 +++ && idx - (psaddr_t) 0 > DB_DESC_NELEM (desc)) +++ /* This is an internal indicator to callers with nonzero IDX +++ that the IDX value is too big. */ +++ return TD_NOAPLIC; +++ +++ elemsize = DB_DESC_SIZE (desc); +++ if (elemsize & 0xff000000U) +++ elemsize = bswap_32 (elemsize); +++ +++ *address += (int32_t) DB_DESC_OFFSET (desc); +++ *address += (elemsize / 8 * (idx - (psaddr_t) 0)); +++ return TD_OK; +++} +++ +++td_err_e +++_td_fetch_value (td_thragent_t *ta, +++ db_desc_t desc, int descriptor_name, +++ psaddr_t idx, psaddr_t address, +++ psaddr_t *result) +++{ +++ ps_err_e err; +++ td_err_e terr = _td_locate_field (ta, desc, descriptor_name, idx, &address); +++ if (terr != TD_OK) +++ return terr; +++ +++ if (DB_DESC_SIZE (desc) == 8 || DB_DESC_SIZE (desc) == bswap_32 (8)) +++ { +++ uint8_t value; +++ err = ps_pdread (ta->ph, address, &value, sizeof value); +++ *result = (psaddr_t) 0 + value; +++ } +++ else if (DB_DESC_SIZE (desc) == 32) +++ { +++ uint32_t value; +++ err = ps_pdread (ta->ph, address, &value, sizeof value); +++ *result = (psaddr_t) 0 + value; +++ } +++ else if (DB_DESC_SIZE (desc) == 64) +++ { +++ uint64_t value; +++ if (sizeof (psaddr_t) < 8) +++ return TD_NOCAPAB; +++ err = ps_pdread (ta->ph, address, &value, sizeof value); +++ *result = (psaddr_t) 0 + value; +++ } +++ else if (DB_DESC_SIZE (desc) == bswap_32 (32)) +++ { +++ uint32_t value; +++ err = ps_pdread (ta->ph, address, &value, sizeof value); +++ value = bswap_32 (value); +++ *result = (psaddr_t) 0 + value; +++ } +++ else if (DB_DESC_SIZE (desc) == bswap_32 (64)) +++ { +++ uint64_t value; +++ if (sizeof (psaddr_t) < 8) +++ return TD_NOCAPAB; +++ err = ps_pdread (ta->ph, address, &value, sizeof value); +++ value = bswap_64 (value); +++ *result = (psaddr_t) 0 + value; +++ } +++ else +++ return TD_DBERR; +++ +++ return err == PS_OK ? TD_OK : TD_ERR; +++} +++ +++ +++td_err_e +++_td_store_value (td_thragent_t *ta, +++ uint32_t desc[2], int descriptor_name, psaddr_t idx, +++ psaddr_t address, psaddr_t widened_value) +++{ +++ ps_err_e err; +++ td_err_e terr = _td_locate_field (ta, desc, descriptor_name, idx, &address); +++ if (terr != TD_OK) +++ return terr; +++ +++ if (DB_DESC_SIZE (desc) == 8 || DB_DESC_SIZE (desc) == bswap_32 (8)) +++ { +++ uint8_t value = widened_value - (psaddr_t) 0; +++ err = ps_pdwrite (ta->ph, address, &value, sizeof value); +++ } +++ else if (DB_DESC_SIZE (desc) == 32) +++ { +++ uint32_t value = widened_value - (psaddr_t) 0; +++ err = ps_pdwrite (ta->ph, address, &value, sizeof value); +++ } +++ else if (DB_DESC_SIZE (desc) == 64) +++ { +++ uint64_t value = widened_value - (psaddr_t) 0; +++ if (sizeof (psaddr_t) < 8) +++ return TD_NOCAPAB; +++ err = ps_pdwrite (ta->ph, address, &value, sizeof value); +++ } +++ else if (DB_DESC_SIZE (desc) == bswap_32 (32)) +++ { +++ uint32_t value = widened_value - (psaddr_t) 0; +++ value = bswap_32 (value); +++ err = ps_pdwrite (ta->ph, address, &value, sizeof value); +++ } +++ else if (DB_DESC_SIZE (desc) == bswap_32 (64)) +++ { +++ uint64_t value = widened_value - (psaddr_t) 0; +++ if (sizeof (psaddr_t) < 8) +++ return TD_NOCAPAB; +++ value = bswap_64 (value); +++ err = ps_pdwrite (ta->ph, address, &value, sizeof value); +++ } +++ else +++ return TD_DBERR; +++ +++ return err == PS_OK ? TD_OK : TD_ERR; +++} +++ +++td_err_e +++_td_fetch_value_local (td_thragent_t *ta, +++ db_desc_t desc, int descriptor_name, psaddr_t idx, +++ void *address, +++ psaddr_t *result) +++{ +++ td_err_e terr = _td_locate_field (ta, desc, descriptor_name, idx, &address); +++ if (terr != TD_OK) +++ return terr; +++ +++ if (DB_DESC_SIZE (desc) == 8 || DB_DESC_SIZE (desc) == bswap_32 (8)) +++ { +++ uint8_t value; +++ memcpy (&value, address, sizeof value); +++ *result = (psaddr_t) 0 + value; +++ } +++ else if (DB_DESC_SIZE (desc) == 32) +++ { +++ uint32_t value; +++ memcpy (&value, address, sizeof value); +++ *result = (psaddr_t) 0 + value; +++ } +++ else if (DB_DESC_SIZE (desc) == 64) +++ { +++ uint64_t value; +++ if (sizeof (psaddr_t) < 8) +++ return TD_NOCAPAB; +++ memcpy (&value, address, sizeof value); +++ *result = (psaddr_t) 0 + value; +++ } +++ else if (DB_DESC_SIZE (desc) == bswap_32 (32)) +++ { +++ uint32_t value; +++ memcpy (&value, address, sizeof value); +++ value = bswap_32 (value); +++ *result = (psaddr_t) 0 + value; +++ } +++ else if (DB_DESC_SIZE (desc) == bswap_32 (64)) +++ { +++ uint64_t value; +++ if (sizeof (psaddr_t) < 8) +++ return TD_NOCAPAB; +++ memcpy (&value, address, sizeof value); +++ value = bswap_64 (value); +++ *result = (psaddr_t) 0 + value; +++ } +++ else +++ return TD_DBERR; +++ +++ return TD_OK; +++} +++ +++ +++td_err_e +++_td_store_value_local (td_thragent_t *ta, +++ uint32_t desc[2], int descriptor_name, psaddr_t idx, +++ void *address, psaddr_t widened_value) +++{ +++ td_err_e terr = _td_locate_field (ta, desc, descriptor_name, idx, &address); +++ if (terr != TD_OK) +++ return terr; +++ +++ if (DB_DESC_SIZE (desc) == 8 || DB_DESC_SIZE (desc) == bswap_32 (8)) +++ { +++ uint8_t value = widened_value - (psaddr_t) 0; +++ memcpy (address, &value, sizeof value); +++ } +++ else if (DB_DESC_SIZE (desc) == 32) +++ { +++ uint32_t value = widened_value - (psaddr_t) 0; +++ memcpy (address, &value, sizeof value); +++ } +++ else if (DB_DESC_SIZE (desc) == 64) +++ { +++ uint64_t value = widened_value - (psaddr_t) 0; +++ if (sizeof (psaddr_t) < 8) +++ return TD_NOCAPAB; +++ memcpy (address, &value, sizeof value); +++ } +++ else if (DB_DESC_SIZE (desc) == bswap_32 (32)) +++ { +++ uint32_t value = widened_value - (psaddr_t) 0; +++ value = bswap_32 (value); +++ memcpy (address, &value, sizeof value); +++ } +++ else if (DB_DESC_SIZE (desc) == bswap_32 (64)) +++ { +++ uint64_t value = widened_value - (psaddr_t) 0; +++ if (sizeof (psaddr_t) < 8) +++ return TD_NOCAPAB; +++ value = bswap_64 (value); +++ memcpy (address, &value, sizeof value); +++ } +++ else +++ return TD_DBERR; +++ +++ return TD_OK; +++} ++--- /dev/null +++++ b/fbtl_db/proc_service.h ++@@ -0,0 +1,86 @@ +++/* Callback interface for libthread_db, functions users must define. +++ Copyright (C) 1999-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 +++ . */ +++ +++/* The definitions in this file must correspond to those in the debugger. */ +++#include +++ +++/* Functions in this interface return one of these status codes. */ +++typedef enum +++{ +++ PS_OK, /* Generic "call succeeded". */ +++ PS_ERR, /* Generic error. */ +++ PS_BADPID, /* Bad process handle. */ +++ PS_BADLID, /* Bad LWP identifier. */ +++ PS_BADADDR, /* Bad address. */ +++ PS_NOSYM, /* Could not find given symbol. */ +++ PS_NOFREGS /* FPU register set not available for given LWP. */ +++} ps_err_e; +++ +++ +++/* This type is opaque in this interface. +++ It's defined by the user of libthread_db. */ +++struct ps_prochandle; +++ +++ +++/* Read or write process memory at the given address. */ +++extern ps_err_e ps_pdread (struct ps_prochandle *, +++ psaddr_t, void *, size_t); +++extern ps_err_e ps_pdwrite (struct ps_prochandle *, +++ psaddr_t, const void *, size_t); +++extern ps_err_e ps_ptread (struct ps_prochandle *, +++ psaddr_t, void *, size_t); +++extern ps_err_e ps_ptwrite (struct ps_prochandle *, +++ psaddr_t, const void *, size_t); +++ +++ +++/* Get and set the given LWP's general or FPU register set. */ +++extern ps_err_e ps_lgetregs (struct ps_prochandle *, +++ lwpid_t, prgregset_t); +++extern ps_err_e ps_lsetregs (struct ps_prochandle *, +++ lwpid_t, const prgregset_t); +++extern ps_err_e ps_lgetfpregs (struct ps_prochandle *, +++ lwpid_t, prfpregset_t *); +++extern ps_err_e ps_lsetfpregs (struct ps_prochandle *, +++ lwpid_t, const prfpregset_t *); +++ +++/* Return the PID of the process. */ +++extern pid_t ps_getpid (struct ps_prochandle *); +++ +++/* Fetch the special per-thread address associated with the given LWP. +++ This call is only used on a few platforms (most use a normal register). +++ The meaning of the `int' parameter is machine-dependent. */ +++extern ps_err_e ps_get_thread_area (const struct ps_prochandle *, +++ lwpid_t, int, psaddr_t *); +++ +++ +++/* Look up the named symbol in the named DSO in the symbol tables +++ associated with the process being debugged, filling in *SYM_ADDR +++ with the corresponding run-time address. */ +++extern ps_err_e ps_pglobal_lookup (struct ps_prochandle *, +++ const char *object_name, +++ const char *sym_name, +++ psaddr_t *sym_addr); +++ +++ +++/* Stop or continue the entire process. */ +++extern ps_err_e ps_pstop (const struct ps_prochandle *); +++extern ps_err_e ps_pcontinue (const struct ps_prochandle *); +++ +++/* Stop or continue the given LWP alone. */ +++extern ps_err_e ps_lstop (const struct ps_prochandle *, lwpid_t); +++extern ps_err_e ps_lcontinue (const struct ps_prochandle *, lwpid_t); ++--- /dev/null +++++ b/fbtl_db/shlib-versions ++@@ -0,0 +1,2 @@ +++# The thread debug library +++libthread_db=1 ++--- /dev/null +++++ b/fbtl_db/structs.def ++@@ -0,0 +1,123 @@ +++/* List of types and symbols in libpthread examined by libthread_db. +++ Copyright (C) 2003-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 +++ . */ +++ +++#ifndef DB_STRUCT_ARRAY_FIELD +++# define DB_STRUCT_ARRAY_FIELD(type, field) DB_STRUCT_FIELD (type, field) +++# define DB_ARRAY_VARIABLE(name) DB_VARIABLE (name) +++# define STRUCTS_DEF_DEFAULTS 1 +++#endif +++ +++#ifndef DB_RTLD_VARIABLE +++# define DB_RTLD_VARIABLE(name) DB_VARIABLE (name) +++#endif +++ +++#ifndef DB_MAIN_VARIABLE +++# define DB_MAIN_VARIABLE(name) DB_VARIABLE (name) +++#endif +++ +++#ifndef DB_RTLD_GLOBAL_FIELD +++# if !IS_IN (libpthread) +++# define DB_RTLD_GLOBAL_FIELD(field) \ +++ DB_STRUCT_FIELD (rtld_global, _##field) \ +++ DB_MAIN_VARIABLE (_##field) +++# elif defined SHARED +++# define DB_RTLD_GLOBAL_FIELD(field) \ +++ DB_STRUCT_FIELD (rtld_global, _##field) +++# else +++# define DB_RTLD_GLOBAL_FIELD(field) \ +++ DB_MAIN_VARIABLE (_##field) +++# endif +++#endif /* DB_RTLD_GLOBAL_FIELD */ +++ +++DB_STRUCT (pthread) +++DB_STRUCT_FIELD (pthread, list) +++DB_STRUCT_FIELD (pthread, report_events) +++DB_STRUCT_FIELD (pthread, tid) +++DB_STRUCT_FIELD (pthread, start_routine) +++DB_STRUCT_FIELD (pthread, cancelhandling) +++DB_STRUCT_FIELD (pthread, schedpolicy) +++DB_STRUCT_FIELD (pthread, schedparam_sched_priority) +++DB_STRUCT_FIELD (pthread, specific) +++DB_STRUCT_FIELD (pthread, eventbuf) +++DB_STRUCT_FIELD (pthread, eventbuf_eventmask) +++DB_STRUCT_ARRAY_FIELD (pthread, eventbuf_eventmask_event_bits) +++DB_STRUCT_FIELD (pthread, nextevent) +++ +++DB_STRUCT (list_t) +++DB_STRUCT_FIELD (list_t, next) +++DB_STRUCT_FIELD (list_t, prev) +++ +++DB_STRUCT (td_thr_events_t) +++DB_STRUCT_ARRAY_FIELD (td_thr_events_t, event_bits) +++ +++DB_STRUCT (td_eventbuf_t) +++DB_STRUCT_FIELD (td_eventbuf_t, eventnum) +++DB_STRUCT_FIELD (td_eventbuf_t, eventdata) +++ +++DB_SYMBOL (stack_used) +++DB_SYMBOL (__stack_user) +++DB_SYMBOL (nptl_version) +++DB_FUNCTION (__nptl_create_event) +++DB_FUNCTION (__nptl_death_event) +++DB_SYMBOL (__nptl_threads_events) +++DB_VARIABLE (__nptl_nthreads) +++DB_VARIABLE (__nptl_last_event) +++DB_VARIABLE (__nptl_initial_report_events) +++ +++DB_ARRAY_VARIABLE (__pthread_keys) +++DB_STRUCT (pthread_key_struct) +++DB_STRUCT_FIELD (pthread_key_struct, seq) +++DB_STRUCT_FIELD (pthread_key_struct, destr) +++ +++DB_STRUCT (pthread_key_data) +++DB_STRUCT_FIELD (pthread_key_data, seq) +++DB_STRUCT_FIELD (pthread_key_data, data) +++DB_STRUCT (pthread_key_data_level2) +++DB_STRUCT_ARRAY_FIELD (pthread_key_data_level2, data) +++ +++DB_STRUCT_FIELD (link_map, l_tls_modid) +++DB_STRUCT_FIELD (link_map, l_tls_offset) +++ +++DB_STRUCT_ARRAY_FIELD (dtv, dtv) +++#define pointer_val pointer.val /* Field of anonymous struct in dtv_t. */ +++DB_STRUCT_FIELD (dtv_t, pointer_val) +++DB_STRUCT_FIELD (dtv_t, counter) +++#if !IS_IN (libpthread) || TLS_TCB_AT_TP +++DB_STRUCT_FIELD (pthread, dtvp) +++#endif +++ +++#if !(IS_IN (libpthread) && !defined SHARED) +++DB_STRUCT (rtld_global) +++DB_RTLD_VARIABLE (_rtld_global) +++#endif +++DB_RTLD_GLOBAL_FIELD (dl_tls_dtv_slotinfo_list) +++ +++DB_STRUCT (dtv_slotinfo_list) +++DB_STRUCT_FIELD (dtv_slotinfo_list, len) +++DB_STRUCT_FIELD (dtv_slotinfo_list, next) +++DB_STRUCT_ARRAY_FIELD (dtv_slotinfo_list, slotinfo) +++ +++DB_STRUCT (dtv_slotinfo) +++DB_STRUCT_FIELD (dtv_slotinfo, gen) +++DB_STRUCT_FIELD (dtv_slotinfo, map) +++ +++#ifdef STRUCTS_DEF_DEFAULTS +++# undef DB_STRUCT_ARRAY_FIELD +++# undef DB_ARRAY_VARIABLE +++# undef STRUCTS_DEF_DEFAULTS +++#endif ++--- /dev/null +++++ b/fbtl_db/td_init.c ++@@ -0,0 +1,31 @@ +++/* Initialization function of thread debugger support library. +++ Copyright (C) 1999-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 1999. +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public +++ License as published by the Free Software Foundation; either +++ version 2.1 of the License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General Public License for more details. +++ +++ You should have received a copy of the GNU Lesser General Public +++ License along with the GNU C Library; if not, see +++ . */ +++ +++#include "thread_dbP.h" +++ +++int __td_debug; +++ +++ +++td_err_e +++td_init (void) +++{ +++ /* XXX We have to figure out what has to be done. */ +++ LOG ("td_init"); +++ return TD_OK; +++} ++--- /dev/null +++++ b/fbtl_db/td_log.c ++@@ -0,0 +1,31 @@ +++/* Noop, left for historical reasons. +++ Copyright (C) 1999-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 1999. +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public +++ License as published by the Free Software Foundation; either +++ version 2.1 of the License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General Public License for more details. +++ +++ You should have received a copy of the GNU Lesser General Public +++ License along with the GNU C Library; if not, see +++ . */ +++ +++#include "thread_dbP.h" +++ +++ +++td_err_e +++td_log (void) +++{ +++ /* This interface is deprecated in the Sun interface. We provide it +++ for compatibility but don't do anything ourself. We might in +++ future do some logging if this seems reasonable. */ +++ LOG ("td_log"); +++ return TD_OK; +++} ++--- /dev/null +++++ b/fbtl_db/td_symbol_list.c ++@@ -0,0 +1,59 @@ +++/* Return list of symbols the library can request. +++ Copyright (C) 2001-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include "thread_dbP.h" +++ +++static const char *symbol_list_arr[] = +++{ +++# define DB_LOOKUP_NAME(idx, name) [idx] = STRINGIFY (name), +++# define DB_LOOKUP_NAME_TH_UNIQUE(idx, name) [idx] = STRINGIFY (name), +++# include "db-symbols.h" +++# undef DB_LOOKUP_NAME +++# undef DB_LOOKUP_NAME_TH_UNIQUE +++ +++ [SYM_NUM_MESSAGES] = NULL +++}; +++ +++ +++const char ** +++td_symbol_list (void) +++{ +++ return symbol_list_arr; +++} +++ +++ +++ps_err_e +++td_mod_lookup (struct ps_prochandle *ps, const char *mod, +++ int idx, psaddr_t *sym_addr) +++{ +++ ps_err_e result; +++ assert (idx >= 0 && idx < SYM_NUM_MESSAGES); +++ result = ps_pglobal_lookup (ps, mod, symbol_list_arr[idx], sym_addr); +++ +++#ifdef HAVE_ASM_GLOBAL_DOT_NAME +++ /* For PowerPC, 64-bit uses dot symbols but 32-bit does not. +++ We could be a 64-bit libthread_db debugging a 32-bit libpthread. */ +++ if (result == PS_NOSYM && symbol_list_arr[idx][0] == '.') +++ result = ps_pglobal_lookup (ps, LIBPTHREAD_SO, &symbol_list_arr[idx][1], +++ sym_addr); +++#endif +++ +++ return result; +++} ++--- /dev/null +++++ b/fbtl_db/td_ta_clear_event.c ++@@ -0,0 +1,77 @@ +++/* Globally disable events. +++ Copyright (C) 1999-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 1999. +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public +++ License as published by the Free Software Foundation; either +++ version 2.1 of the License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General Public License for more details. +++ +++ You should have received a copy of the GNU Lesser General Public +++ License along with the GNU C Library; if not, see +++ . */ +++ +++#include +++#include "thread_dbP.h" +++ +++ +++td_err_e +++td_ta_clear_event (const td_thragent_t *ta_arg, td_thr_events_t *event) +++{ +++ td_thragent_t *const ta = (td_thragent_t *) ta_arg; +++ td_err_e err; +++ psaddr_t eventmask = 0; +++ void *copy = NULL; +++ +++ LOG ("td_ta_clear_event"); +++ +++ /* Test whether the TA parameter is ok. */ +++ if (! ta_ok (ta)) +++ return TD_BADTA; +++ +++ /* Fetch the old event mask from the inferior and modify it in place. */ +++ err = DB_GET_SYMBOL (eventmask, ta, __nptl_threads_events); +++ if (err == TD_OK) +++ err = DB_GET_STRUCT (copy, ta, eventmask, td_thr_events_t); +++ if (err == TD_OK) +++ { +++ uint32_t idx; +++ for (idx = 0; idx < TD_EVENTSIZE; ++idx) +++ { +++ psaddr_t word; +++ uint32_t mask; +++ err = DB_GET_FIELD_LOCAL (word, ta, copy, +++ td_thr_events_t, event_bits, idx); +++ if (err != TD_OK) +++ break; +++ mask = (uintptr_t) word; +++ mask &= ~event->event_bits[idx]; +++ word = (psaddr_t) (uintptr_t) mask; +++ err = DB_PUT_FIELD_LOCAL (ta, copy, +++ td_thr_events_t, event_bits, idx, word); +++ if (err != TD_OK) +++ break; +++ } +++ if (err == TD_NOAPLIC) +++ { +++ err = TD_OK; +++ while (idx < TD_EVENTSIZE) +++ if (event->event_bits[idx++] != 0) +++ { +++ err = TD_NOEVENT; +++ break; +++ } +++ } +++ if (err == TD_OK) +++ /* Now write it back to the inferior. */ +++ err = DB_PUT_STRUCT (ta, eventmask, td_thr_events_t, copy); +++ } +++ +++ return err; +++} ++--- /dev/null +++++ b/fbtl_db/td_ta_delete.c ++@@ -0,0 +1,41 @@ +++/* Detach to target process. +++ Copyright (C) 1999-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 1999. +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public +++ License as published by the Free Software Foundation; either +++ version 2.1 of the License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General Public License for more details. +++ +++ You should have received a copy of the GNU Lesser General Public +++ License along with the GNU C Library; if not, see +++ . */ +++ +++#include +++ +++#include "thread_dbP.h" +++ +++ +++td_err_e +++td_ta_delete (td_thragent_t *ta) +++{ +++ LOG ("td_ta_delete"); +++ +++ /* Safety check. Note that the test will also fail for TA == NULL. */ +++ if (!ta_ok (ta)) +++ return TD_BADTA; +++ +++ /* Remove the handle from the list. */ +++ list_del (&ta->list); +++ +++ /* The handle was allocated in `td_ta_new'. */ +++ free (ta); +++ +++ return TD_OK; +++} ++--- /dev/null +++++ b/fbtl_db/td_ta_enable_stats.c ++@@ -0,0 +1,34 @@ +++/* Enable collection of statistics for process. +++ Copyright (C) 1999-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 1999. +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public +++ License as published by the Free Software Foundation; either +++ version 2.1 of the License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General Public License for more details. +++ +++ You should have received a copy of the GNU Lesser General Public +++ License along with the GNU C Library; if not, see +++ . */ +++ +++#include "thread_dbP.h" +++ +++ +++td_err_e +++td_ta_enable_stats (const td_thragent_t *ta, int enable) +++{ +++ /* XXX We have to figure out what has to be done. */ +++ LOG ("td_ta_enable_stats"); +++ +++ /* Test whether the TA parameter is ok. */ +++ if (! ta_ok (ta)) +++ return TD_BADTA; +++ +++ return TD_OK; +++} ++--- /dev/null +++++ b/fbtl_db/td_ta_event_addr.c ++@@ -0,0 +1,60 @@ +++/* Get event address. +++ Copyright (C) 1999-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 1999. +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public +++ License as published by the Free Software Foundation; either +++ version 2.1 of the License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General Public License for more details. +++ +++ You should have received a copy of the GNU Lesser General Public +++ License along with the GNU C Library; if not, see +++ . */ +++ +++#include "thread_dbP.h" +++ +++ +++td_err_e +++td_ta_event_addr (const td_thragent_t *ta_arg, +++ td_event_e event, td_notify_t *addr) +++{ +++ td_thragent_t *const ta = (td_thragent_t *) ta_arg; +++ td_err_e err; +++ psaddr_t taddr; +++ +++ LOG ("td_ta_event_addr"); +++ +++ /* Test whether the TA parameter is ok. */ +++ if (! ta_ok (ta)) +++ return TD_BADTA; +++ +++ switch (event) +++ { +++ case TD_CREATE: +++ err = DB_GET_SYMBOL (taddr, ta, __nptl_create_event); +++ break; +++ +++ case TD_DEATH: +++ err = DB_GET_SYMBOL (taddr, ta, __nptl_death_event); +++ break; +++ +++ default: +++ /* Event cannot be handled. */ +++ return TD_NOEVENT; +++ } +++ +++ if (err == TD_OK) +++ { +++ /* Success, we got the address. */ +++ addr->type = NOTIFY_BPT; +++ addr->u.bptaddr = taddr; +++ } +++ +++ return err; +++} ++--- /dev/null +++++ b/fbtl_db/td_ta_event_getmsg.c ++@@ -0,0 +1,104 @@ +++/* Retrieve event. +++ Copyright (C) 1999-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 1999. +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public +++ License as published by the Free Software Foundation; either +++ version 2.1 of the License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General Public License for more details. +++ +++ You should have received a copy of the GNU Lesser General Public +++ License along with the GNU C Library; if not, see +++ . */ +++ +++#include +++#include +++ +++#include "thread_dbP.h" +++ +++ +++td_err_e +++td_ta_event_getmsg (const td_thragent_t *ta_arg, td_event_msg_t *msg) +++{ +++ td_thragent_t *const ta = (td_thragent_t *) ta_arg; +++ td_err_e err; +++ psaddr_t eventbuf, eventnum, eventdata; +++ psaddr_t thp, next; +++ void *copy; +++ +++ /* XXX I cannot think of another way but using a static variable. */ +++ /* XXX Use at least __thread once it is possible. */ +++ static td_thrhandle_t th; +++ +++ LOG ("td_thr_event_getmsg"); +++ +++ /* Test whether the TA parameter is ok. */ +++ if (! ta_ok (ta)) +++ return TD_BADTA; +++ +++ /* Get the pointer to the thread descriptor with the last event. */ +++ err = DB_GET_VALUE (thp, ta, __nptl_last_event, 0); +++ if (err != TD_OK) +++ return err; +++ +++ if (thp == 0) +++ /* Nothing waiting. */ +++ return TD_NOMSG; +++ +++ /* Copy the event message buffer in from the inferior. */ +++ err = DB_GET_FIELD_ADDRESS (eventbuf, ta, thp, pthread, eventbuf, 0); +++ if (err == TD_OK) +++ err = DB_GET_STRUCT (copy, ta, eventbuf, td_eventbuf_t); +++ if (err != TD_OK) +++ return err; +++ +++ /* Read the event details from the target thread. */ +++ err = DB_GET_FIELD_LOCAL (eventnum, ta, copy, td_eventbuf_t, eventnum, 0); +++ if (err != TD_OK) +++ return err; +++ /* If the structure is on the list there better be an event recorded. */ +++ if ((int) (uintptr_t) eventnum == TD_EVENT_NONE) +++ return TD_DBERR; +++ +++ /* Fill the user's data structure. */ +++ err = DB_GET_FIELD_LOCAL (eventdata, ta, copy, td_eventbuf_t, eventdata, 0); +++ if (err != TD_OK) +++ return err; +++ +++ /* Generate the thread descriptor. */ +++ th.th_ta_p = (td_thragent_t *) ta; +++ th.th_unique = thp; +++ +++ /* Fill the user's data structure. */ +++ msg->msg.data = (uintptr_t) eventdata; +++ msg->event = (uintptr_t) eventnum; +++ msg->th_p = &th; +++ +++ /* And clear the event message in the target. */ +++ memset (copy, 0, ta->ta_sizeof_td_eventbuf_t); +++ err = DB_PUT_STRUCT (ta, eventbuf, td_eventbuf_t, copy); +++ if (err != TD_OK) +++ return err; +++ +++ /* Get the pointer to the next descriptor with an event. */ +++ err = DB_GET_FIELD (next, ta, thp, pthread, nextevent, 0); +++ if (err != TD_OK) +++ return err; +++ +++ /* Store the pointer in the list head variable. */ +++ err = DB_PUT_VALUE (ta, __nptl_last_event, 0, next); +++ if (err != TD_OK) +++ return err; +++ +++ if (next != 0) +++ /* Clear the next pointer in the current descriptor. */ +++ err = DB_PUT_FIELD (ta, thp, pthread, nextevent, 0, 0); +++ +++ return err; +++} ++--- /dev/null +++++ b/fbtl_db/td_ta_get_nthreads.c ++@@ -0,0 +1,41 @@ +++/* Get the number of threads in the process. +++ Copyright (C) 1999-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 1999. +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public +++ License as published by the Free Software Foundation; either +++ version 2.1 of the License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General Public License for more details. +++ +++ You should have received a copy of the GNU Lesser General Public +++ License along with the GNU C Library; if not, see +++ . */ +++ +++#include "thread_dbP.h" +++ +++td_err_e +++td_ta_get_nthreads (const td_thragent_t *ta_arg, int *np) +++{ +++ td_thragent_t *const ta = (td_thragent_t *) ta_arg; +++ td_err_e err; +++ psaddr_t n; +++ +++ LOG ("td_ta_get_nthreads"); +++ +++ /* Test whether the TA parameter is ok. */ +++ if (! ta_ok (ta)) +++ return TD_BADTA; +++ +++ /* Access the variable in the inferior that tells us. */ +++ err = DB_GET_VALUE (n, ta, __nptl_nthreads, 0); +++ if (err == TD_OK) +++ *np = (uintptr_t) n; +++ +++ return err; +++} ++--- /dev/null +++++ b/fbtl_db/td_ta_get_ph.c ++@@ -0,0 +1,35 @@ +++/* Get external process handle. +++ Copyright (C) 1999-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 1999. +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public +++ License as published by the Free Software Foundation; either +++ version 2.1 of the License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General Public License for more details. +++ +++ You should have received a copy of the GNU Lesser General Public +++ License along with the GNU C Library; if not, see +++ . */ +++ +++#include "thread_dbP.h" +++ +++ +++td_err_e +++td_ta_get_ph (const td_thragent_t *ta, struct ps_prochandle **ph) +++{ +++ LOG ("td_ta_get_ph"); +++ +++ /* Test whether the TA parameter is ok. */ +++ if (! ta_ok (ta)) +++ return TD_BADTA; +++ +++ *ph = ta->ph; +++ +++ return TD_OK; +++} ++--- /dev/null +++++ b/fbtl_db/td_ta_get_stats.c ++@@ -0,0 +1,34 @@ +++/* Retrieve statistics for process. +++ Copyright (C) 1999-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 1999. +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public +++ License as published by the Free Software Foundation; either +++ version 2.1 of the License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General Public License for more details. +++ +++ You should have received a copy of the GNU Lesser General Public +++ License along with the GNU C Library; if not, see +++ . */ +++ +++#include "thread_dbP.h" +++ +++ +++td_err_e +++td_ta_get_stats (const td_thragent_t *ta, td_ta_stats_t *statsp) +++{ +++ /* XXX We have to figure out what has to be done. */ +++ LOG ("td_ta_get_stats"); +++ +++ /* Test whether the TA parameter is ok. */ +++ if (! ta_ok (ta)) +++ return TD_BADTA; +++ +++ return TD_OK; +++} ++--- /dev/null +++++ b/fbtl_db/td_ta_map_id2thr.c ++@@ -0,0 +1,37 @@ +++/* Map thread ID to thread handle. +++ Copyright (C) 1999-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 1999. +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public +++ License as published by the Free Software Foundation; either +++ version 2.1 of the License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General Public License for more details. +++ +++ You should have received a copy of the GNU Lesser General Public +++ License along with the GNU C Library; if not, see +++ . */ +++ +++#include "thread_dbP.h" +++ +++ +++td_err_e +++td_ta_map_id2thr (const td_thragent_t *ta, pthread_t pt, td_thrhandle_t *th) +++{ +++ LOG ("td_ta_map_id2thr"); +++ +++ /* Test whether the TA parameter is ok. */ +++ if (! ta_ok (ta)) +++ return TD_BADTA; +++ +++ /* Create the `td_thrhandle_t' object. */ +++ th->th_ta_p = (td_thragent_t *) ta; +++ th->th_unique = (psaddr_t) pt; +++ +++ return TD_OK; +++} ++--- /dev/null +++++ b/fbtl_db/td_ta_map_lwp2thr.c ++@@ -0,0 +1,208 @@ +++/* Which thread is running on an LWP? +++ Copyright (C) 2003-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 +++ . */ +++ +++#include "thread_dbP.h" +++#include +++#include +++#include +++ +++ +++td_err_e +++__td_ta_lookup_th_unique (const td_thragent_t *ta_arg, +++ lwpid_t lwpid, td_thrhandle_t *th) +++{ +++ td_thragent_t *const ta = (td_thragent_t *) ta_arg; +++ ps_err_e err; +++ td_err_e terr; +++ prgregset_t regs; +++ psaddr_t addr; +++ +++ if (ta->ta_howto == ta_howto_unknown) +++ { +++ /* We need to read in from the inferior the instructions what to do. */ +++ psaddr_t howto; +++ +++ err = td_lookup (ta->ph, SYM_TH_UNIQUE_CONST_THREAD_AREA, &howto); +++ if (err == PS_OK) +++ { +++ err = ps_pdread (ta->ph, howto, +++ &ta->ta_howto_data.const_thread_area, +++ sizeof ta->ta_howto_data.const_thread_area); +++ if (err != PS_OK) +++ return TD_ERR; +++ ta->ta_howto = ta_howto_const_thread_area; +++ if (ta->ta_howto_data.const_thread_area & 0xff000000U) +++ ta->ta_howto_data.const_thread_area +++ = bswap_32 (ta->ta_howto_data.const_thread_area); +++ } +++ else +++ { +++ switch (sizeof (regs[0])) +++ { +++ case 8: +++ err = td_lookup (ta->ph, SYM_TH_UNIQUE_REGISTER64, &howto); +++ if (err == PS_OK) +++ ta->ta_howto = ta_howto_reg; +++ else if (err == PS_NOSYM) +++ { +++ err = td_lookup (ta->ph, +++ SYM_TH_UNIQUE_REGISTER64_THREAD_AREA, +++ &howto); +++ if (err == PS_OK) +++ ta->ta_howto = ta_howto_reg_thread_area; +++ } +++ break; +++ +++ case 4: +++ err = td_lookup (ta->ph, SYM_TH_UNIQUE_REGISTER32, &howto); +++ if (err == PS_OK) +++ ta->ta_howto = ta_howto_reg; +++ else if (err == PS_NOSYM) +++ { +++ err = td_lookup (ta->ph, +++ SYM_TH_UNIQUE_REGISTER32_THREAD_AREA, +++ &howto); +++ if (err == PS_OK) +++ ta->ta_howto = ta_howto_reg_thread_area; +++ } +++ break; +++ +++ default: +++ abort (); +++ return TD_DBERR; +++ } +++ +++ if (err != PS_OK) +++ return TD_DBERR; +++ +++ /* For either of these methods we read in the same descriptor. */ +++ err = ps_pdread (ta->ph, howto, +++ ta->ta_howto_data.reg, DB_SIZEOF_DESC); +++ if (err != PS_OK) +++ return TD_ERR; +++ if (DB_DESC_SIZE (ta->ta_howto_data.reg) == 0) +++ return TD_DBERR; +++ if (DB_DESC_SIZE (ta->ta_howto_data.reg) & 0xff000000U) +++ { +++ /* Byte-swap these words, though we leave the size word +++ in native order as the handy way to distinguish. */ +++ DB_DESC_OFFSET (ta->ta_howto_data.reg) +++ = bswap_32 (DB_DESC_OFFSET (ta->ta_howto_data.reg)); +++ DB_DESC_NELEM (ta->ta_howto_data.reg) +++ = bswap_32 (DB_DESC_NELEM (ta->ta_howto_data.reg)); +++ } +++ } +++ } +++ +++ switch (ta->ta_howto) +++ { +++ default: +++ return TD_DBERR; +++ +++ case ta_howto_reg: +++ /* On most machines, we are just looking at a register. */ +++ if (ps_lgetregs (ta->ph, lwpid, regs) != PS_OK) +++ return TD_ERR; +++ terr = _td_fetch_value_local (ta, ta->ta_howto_data.reg, -1, +++ 0, regs, &addr); +++ if (terr != TD_OK) +++ return terr; +++ +++ /* In this descriptor the nelem word is overloaded as the bias. */ +++ addr += (int32_t) DB_DESC_NELEM (ta->ta_howto_data.reg); +++ th->th_unique = addr; +++ break; +++ +++ case ta_howto_const_thread_area: +++ /* Some hosts don't have this call and this case won't be used. */ +++# pragma weak ps_get_thread_area +++ if (&ps_get_thread_area == NULL) +++ return TD_NOCAPAB; +++ +++ /* A la x86-64, there is a magic index for get_thread_area. */ +++ if (ps_get_thread_area (ta->ph, lwpid, +++ ta->ta_howto_data.const_thread_area, +++ &th->th_unique) != PS_OK) +++ return TD_ERR; /* XXX Other error value? */ +++ break; +++ +++ case ta_howto_reg_thread_area: +++ if (&ps_get_thread_area == NULL) +++ return TD_NOCAPAB; +++ +++ /* A la i386, a register holds the index for get_thread_area. */ +++ if (ps_lgetregs (ta->ph, lwpid, regs) != PS_OK) +++ return TD_ERR; +++ terr = _td_fetch_value_local (ta, ta->ta_howto_data.reg_thread_area, +++ -1, 0, regs, &addr); +++ if (terr != TD_OK) +++ return terr; +++ /* In this descriptor the nelem word is overloaded as scale factor. */ +++ if (ps_get_thread_area +++ (ta->ph, lwpid, +++ ((addr - (psaddr_t) 0) +++ >> DB_DESC_NELEM (ta->ta_howto_data.reg_thread_area)), +++ &th->th_unique) != PS_OK) +++ return TD_ERR; /* XXX Other error value? */ +++ break; +++ } +++ +++ /* Found it. Now complete the `td_thrhandle_t' object. */ +++ th->th_ta_p = ta; +++ +++ return TD_OK; +++} +++ +++td_err_e +++td_ta_map_lwp2thr (const td_thragent_t *ta_arg, +++ lwpid_t lwpid, td_thrhandle_t *th) +++{ +++ td_thragent_t *const ta = (td_thragent_t *) ta_arg; +++ +++ LOG ("td_ta_map_lwp2thr"); +++ +++ /* Test whether the TA parameter is ok. */ +++ if (! ta_ok (ta)) +++ return TD_BADTA; +++ +++ /* We cannot rely on thread registers and such information at all +++ before __pthread_initialize_minimal has gotten far enough. They +++ sometimes contain garbage that would confuse us, left by the kernel +++ at exec. So if it looks like initialization is incomplete, we only +++ fake a special descriptor for the initial thread. */ +++ +++ psaddr_t list; +++ td_err_e err = DB_GET_SYMBOL (list, ta, __stack_user); +++ if (err != TD_OK) +++ return err; +++ +++ err = DB_GET_FIELD (list, ta, list, list_t, next, 0); +++ if (err != TD_OK) +++ return err; +++ +++ if (list == 0) +++ { +++ if (ps_getpid (ta->ph) != lwpid) +++ return TD_ERR; +++ th->th_ta_p = ta; +++ th->th_unique = 0; +++ return TD_OK; +++ } +++ +++ return __td_ta_lookup_th_unique (ta_arg, lwpid, th); +++} ++--- /dev/null +++++ b/fbtl_db/td_ta_new.c ++@@ -0,0 +1,64 @@ +++/* Attach to target process. +++ Copyright (C) 1999-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 1999. +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public +++ License as published by the Free Software Foundation; either +++ version 2.1 of the License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General Public License for more details. +++ +++ You should have received a copy of the GNU Lesser General Public +++ License along with the GNU C Library; if not, see +++ . */ +++ +++#include +++#include +++#include +++#include +++ +++#include "thread_dbP.h" +++ +++ +++/* Datatype for the list of known thread agents. Normally there will +++ be exactly one so we don't spend much though on making it fast. */ +++LIST_HEAD (__td_agent_list); +++ +++ +++td_err_e +++td_ta_new (struct ps_prochandle *ps, td_thragent_t **ta) +++{ +++ psaddr_t versaddr; +++ char versbuf[sizeof (VERSION)]; +++ +++ LOG ("td_ta_new"); +++ +++ /* Check whether the versions match. */ +++ if (td_lookup (ps, SYM_nptl_version, &versaddr) != PS_OK) +++ return TD_NOLIBTHREAD; +++ if (ps_pdread (ps, versaddr, versbuf, sizeof (versbuf)) != PS_OK) +++ return TD_ERR; +++ +++ if (memcmp (versbuf, VERSION, sizeof VERSION) != 0) +++ /* Not the right version. */ +++ return TD_VERSION; +++ +++ /* Fill in the appropriate information. */ +++ *ta = (td_thragent_t *) calloc (1, sizeof (td_thragent_t)); +++ if (*ta == NULL) +++ return TD_MALLOC; +++ +++ /* Store the proc handle which we will pass to the callback functions +++ back into the debugger. */ +++ (*ta)->ph = ps; +++ +++ /* Now add the new agent descriptor to the list. */ +++ list_add (&(*ta)->list, &__td_agent_list); +++ +++ return TD_OK; +++} ++--- /dev/null +++++ b/fbtl_db/td_ta_reset_stats.c ++@@ -0,0 +1,34 @@ +++/* Reset statistics. +++ Copyright (C) 1999-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 1999. +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public +++ License as published by the Free Software Foundation; either +++ version 2.1 of the License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General Public License for more details. +++ +++ You should have received a copy of the GNU Lesser General Public +++ License along with the GNU C Library; if not, see +++ . */ +++ +++#include "thread_dbP.h" +++ +++ +++td_err_e +++td_ta_reset_stats (const td_thragent_t *ta) +++{ +++ /* XXX We have to figure out what has to be done. */ +++ LOG ("td_ta_reset_stats"); +++ +++ /* Test whether the TA parameter is ok. */ +++ if (! ta_ok (ta)) +++ return TD_BADTA; +++ +++ return TD_OK; +++} ++--- /dev/null +++++ b/fbtl_db/td_ta_set_event.c ++@@ -0,0 +1,77 @@ +++/* Globally enable events. +++ Copyright (C) 1999-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 1999. +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public +++ License as published by the Free Software Foundation; either +++ version 2.1 of the License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General Public License for more details. +++ +++ You should have received a copy of the GNU Lesser General Public +++ License along with the GNU C Library; if not, see +++ . */ +++ +++#include +++#include "thread_dbP.h" +++ +++ +++td_err_e +++td_ta_set_event (const td_thragent_t *ta_arg, td_thr_events_t *event) +++{ +++ td_thragent_t *const ta = (td_thragent_t *) ta_arg; +++ td_err_e err; +++ psaddr_t eventmask = 0; +++ void *copy = NULL; +++ +++ LOG ("td_ta_set_event"); +++ +++ /* Test whether the TA parameter is ok. */ +++ if (! ta_ok (ta)) +++ return TD_BADTA; +++ +++ /* Fetch the old event mask from the inferior and modify it in place. */ +++ err = DB_GET_SYMBOL (eventmask, ta, __nptl_threads_events); +++ if (err == TD_OK) +++ err = DB_GET_STRUCT (copy, ta, eventmask, td_thr_events_t); +++ if (err == TD_OK) +++ { +++ uint32_t idx; +++ for (idx = 0; idx < TD_EVENTSIZE; ++idx) +++ { +++ psaddr_t word; +++ uint32_t mask; +++ err = DB_GET_FIELD_LOCAL (word, ta, copy, +++ td_thr_events_t, event_bits, idx); +++ if (err != TD_OK) +++ break; +++ mask = (uintptr_t) word; +++ mask |= event->event_bits[idx]; +++ word = (psaddr_t) (uintptr_t) mask; +++ err = DB_PUT_FIELD_LOCAL (ta, copy, +++ td_thr_events_t, event_bits, idx, word); +++ if (err != TD_OK) +++ break; +++ } +++ if (err == TD_NOAPLIC) +++ { +++ err = TD_OK; +++ while (idx < TD_EVENTSIZE) +++ if (event->event_bits[idx++] != 0) +++ { +++ err = TD_NOEVENT; +++ break; +++ } +++ } +++ if (err == TD_OK) +++ /* Now write it back to the inferior. */ +++ err = DB_PUT_STRUCT (ta, eventmask, td_thr_events_t, copy); +++ } +++ +++ return err; +++} ++--- /dev/null +++++ b/fbtl_db/td_ta_setconcurrency.c ++@@ -0,0 +1,34 @@ +++/* Set suggested concurrency level for process. +++ Copyright (C) 1999-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 1999. +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public +++ License as published by the Free Software Foundation; either +++ version 2.1 of the License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General Public License for more details. +++ +++ You should have received a copy of the GNU Lesser General Public +++ License along with the GNU C Library; if not, see +++ . */ +++ +++#include "thread_dbP.h" +++ +++ +++td_err_e +++td_ta_setconcurrency (const td_thragent_t *ta, int level) +++{ +++ /* This is something LinuxThreads does not need to support. */ +++ LOG ("td_ta_setconcurrency"); +++ +++ /* Test whether the TA parameter is ok. */ +++ if (! ta_ok (ta)) +++ return TD_BADTA; +++ +++ return TD_NOCAPAB; +++} ++--- /dev/null +++++ b/fbtl_db/td_ta_thr_iter.c ++@@ -0,0 +1,150 @@ +++/* Iterate over a process's threads. +++ Copyright (C) 1999-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 1999. +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public +++ License as published by the Free Software Foundation; either +++ version 2.1 of the License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General Public License for more details. +++ +++ You should have received a copy of the GNU Lesser General Public +++ License along with the GNU C Library; if not, see +++ . */ +++ +++#include "thread_dbP.h" +++ +++ +++static td_err_e +++iterate_thread_list (td_thragent_t *ta, td_thr_iter_f *callback, +++ void *cbdata_p, td_thr_state_e state, int ti_pri, +++ psaddr_t head, bool fake_empty, pid_t match_pid) +++{ +++ td_err_e err; +++ psaddr_t next, ofs; +++ void *copy; +++ +++ /* Test the state. +++ XXX This is incomplete. Normally this test should be in the loop. */ +++ if (state != TD_THR_ANY_STATE) +++ return TD_OK; +++ +++ err = DB_GET_FIELD (next, ta, head, list_t, next, 0); +++ if (err != TD_OK) +++ return err; +++ +++ if (next == 0 && fake_empty) +++ { +++ /* __pthread_initialize_minimal has not run. There is just the main +++ thread to return. We cannot rely on its thread register. They +++ sometimes contain garbage that would confuse us, left by the +++ kernel at exec. So if it looks like initialization is incomplete, +++ we only fake a special descriptor for the initial thread. */ +++ td_thrhandle_t th = { ta, 0 }; +++ return callback (&th, cbdata_p) != 0 ? TD_DBERR : TD_OK; +++ } +++ +++ /* Cache the offset from struct pthread to its list_t member. */ +++ err = DB_GET_FIELD_ADDRESS (ofs, ta, 0, pthread, list, 0); +++ if (err != TD_OK) +++ return err; +++ +++ if (ta->ta_sizeof_pthread == 0) +++ { +++ err = _td_check_sizeof (ta, &ta->ta_sizeof_pthread, SYM_SIZEOF_pthread); +++ if (err != TD_OK) +++ return err; +++ } +++ copy = __alloca (ta->ta_sizeof_pthread); +++ +++ while (next != head) +++ { +++ psaddr_t addr, schedpolicy, schedprio; +++ +++ addr = next - (ofs - (psaddr_t) 0); +++ if (next == 0 || addr == 0) /* Sanity check. */ +++ return TD_DBERR; +++ +++ /* Copy the whole descriptor in once so we can access the several +++ fields locally. Excess copying in one go is much better than +++ multiple ps_pdread calls. */ +++ if (ps_pdread (ta->ph, addr, copy, ta->ta_sizeof_pthread) != PS_OK) +++ return TD_ERR; +++ +++ err = DB_GET_FIELD_LOCAL (schedpolicy, ta, copy, pthread, +++ schedpolicy, 0); +++ if (err != TD_OK) +++ break; +++ err = DB_GET_FIELD_LOCAL (schedprio, ta, copy, pthread, +++ schedparam_sched_priority, 0); +++ if (err != TD_OK) +++ break; +++ +++ /* Now test whether this thread matches the specified conditions. */ +++ +++ /* Only if the priority level is as high or higher. */ +++ int descr_pri = ((uintptr_t) schedpolicy == SCHED_OTHER +++ ? 0 : (uintptr_t) schedprio); +++ if (descr_pri >= ti_pri) +++ { +++ /* Yep, it matches. Call the callback function. */ +++ td_thrhandle_t th; +++ th.th_ta_p = (td_thragent_t *) ta; +++ th.th_unique = addr; +++ if (callback (&th, cbdata_p) != 0) +++ return TD_DBERR; +++ } +++ +++ /* Get the pointer to the next element. */ +++ err = DB_GET_FIELD_LOCAL (next, ta, copy + (ofs - (psaddr_t) 0), list_t, +++ next, 0); +++ if (err != TD_OK) +++ break; +++ } +++ +++ return err; +++} +++ +++ +++td_err_e +++td_ta_thr_iter (const td_thragent_t *ta_arg, td_thr_iter_f *callback, +++ void *cbdata_p, td_thr_state_e state, int ti_pri, +++ sigset_t *ti_sigmask_p, unsigned int ti_user_flags) +++{ +++ td_thragent_t *const ta = (td_thragent_t *) ta_arg; +++ td_err_e err; +++ psaddr_t list = 0; +++ +++ LOG ("td_ta_thr_iter"); +++ +++ /* Test whether the TA parameter is ok. */ +++ if (! ta_ok (ta)) +++ return TD_BADTA; +++ +++ /* The thread library keeps two lists for the running threads. One +++ list contains the thread which are using user-provided stacks +++ (this includes the main thread) and the other includes the +++ threads for which the thread library allocated the stacks. We +++ have to iterate over both lists separately. We start with the +++ list of threads with user-defined stacks. */ +++ +++ pid_t pid = ps_getpid (ta->ph); +++ err = DB_GET_SYMBOL (list, ta, __stack_user); +++ if (err == TD_OK) +++ err = iterate_thread_list (ta, callback, cbdata_p, state, ti_pri, +++ list, true, pid); +++ +++ /* And the threads with stacks allocated by the implementation. */ +++ if (err == TD_OK) +++ err = DB_GET_SYMBOL (list, ta, stack_used); +++ if (err == TD_OK) +++ err = iterate_thread_list (ta, callback, cbdata_p, state, ti_pri, +++ list, false, pid); +++ +++ return err; +++} ++--- /dev/null +++++ b/fbtl_db/td_ta_tsd_iter.c ++@@ -0,0 +1,81 @@ +++/* Iterate over a process's thread-specific data. +++ Copyright (C) 1999-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 1999. +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public +++ License as published by the Free Software Foundation; either +++ version 2.1 of the License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General Public License for more details. +++ +++ You should have received a copy of the GNU Lesser General Public +++ License along with the GNU C Library; if not, see +++ . */ +++ +++#include +++#include "thread_dbP.h" +++#include +++ +++td_err_e +++td_ta_tsd_iter (const td_thragent_t *ta_arg, td_key_iter_f *callback, +++ void *cbdata_p) +++{ +++ td_thragent_t *const ta = (td_thragent_t *) ta_arg; +++ td_err_e err; +++ void *keys; +++ size_t keys_nb, keys_elemsize; +++ psaddr_t addr; +++ uint32_t idx; +++ +++ LOG ("td_ta_tsd_iter"); +++ +++ /* Test whether the TA parameter is ok. */ +++ if (! ta_ok (ta)) +++ return TD_BADTA; +++ +++ /* This makes sure we have the size information on hand. */ +++ addr = 0; +++ err = _td_locate_field (ta, +++ ta->ta_var___pthread_keys, SYM_DESC___pthread_keys, +++ (psaddr_t) 0 + 1, &addr); +++ if (err != TD_OK) +++ return err; +++ +++ /* Now copy in the entire array of key descriptors. */ +++ keys_elemsize = (addr - (psaddr_t) 0) / 8; +++ keys_nb = keys_elemsize * DB_DESC_NELEM (ta->ta_var___pthread_keys); +++ keys = __alloca (keys_nb); +++ err = DB_GET_SYMBOL (addr, ta, __pthread_keys); +++ if (err != TD_OK) +++ return err; +++ if (ps_pdread (ta->ph, addr, keys, keys_nb) != PS_OK) +++ return TD_ERR; +++ +++ /* Now get all descriptors, one after the other. */ +++ for (idx = 0; idx < DB_DESC_NELEM (ta->ta_var___pthread_keys); ++idx) +++ { +++ psaddr_t seq, destr; +++ err = DB_GET_FIELD_LOCAL (seq, ta, keys, pthread_key_struct, seq, 0); +++ if (err != TD_OK) +++ return err; +++ if (((uintptr_t) seq) & 1) +++ { +++ err = DB_GET_FIELD_LOCAL (destr, ta, keys, pthread_key_struct, +++ destr, 0); +++ if (err != TD_OK) +++ return err; +++ /* Return with an error if the callback returns a nonzero value. */ +++ if (callback ((thread_key_t) idx, destr, cbdata_p) != 0) +++ return TD_DBERR; +++ } +++ /* Advance to the next element in the copied array. */ +++ keys += keys_elemsize; +++ } +++ +++ return TD_OK; +++} ++--- /dev/null +++++ b/fbtl_db/td_thr_clear_event.c ++@@ -0,0 +1,75 @@ +++/* Disable specific event for thread. +++ Copyright (C) 1999-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 1999. +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public +++ License as published by the Free Software Foundation; either +++ version 2.1 of the License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General Public License for more details. +++ +++ You should have received a copy of the GNU Lesser General Public +++ License along with the GNU C Library; if not, see +++ . */ +++ +++#include +++#include +++ +++#include "thread_dbP.h" +++ +++ +++td_err_e +++td_thr_clear_event (const td_thrhandle_t *th, td_thr_events_t *event) +++{ +++ td_err_e err; +++ psaddr_t eventmask; +++ void *copy; +++ +++ LOG ("td_thr_clear_event"); +++ +++ /* Fetch the old event mask from the inferior and modify it in place. */ +++ err = DB_GET_FIELD_ADDRESS (eventmask, th->th_ta_p, +++ th->th_unique, pthread, eventbuf_eventmask, 0); +++ if (err == TD_OK) +++ err = DB_GET_STRUCT (copy, th->th_ta_p, eventmask, td_thr_events_t); +++ if (err == TD_OK) +++ { +++ uint32_t idx; +++ for (idx = 0; idx < TD_EVENTSIZE; ++idx) +++ { +++ psaddr_t word; +++ uint32_t mask; +++ err = DB_GET_FIELD_LOCAL (word, th->th_ta_p, copy, +++ td_thr_events_t, event_bits, idx); +++ if (err != TD_OK) +++ break; +++ mask = (uintptr_t) word; +++ mask &= ~event->event_bits[idx]; +++ word = (psaddr_t) (uintptr_t) mask; +++ err = DB_PUT_FIELD_LOCAL (th->th_ta_p, copy, +++ td_thr_events_t, event_bits, idx, word); +++ if (err != TD_OK) +++ break; +++ } +++ if (err == TD_NOAPLIC) +++ { +++ err = TD_OK; +++ while (idx < TD_EVENTSIZE) +++ if (event->event_bits[idx++] != 0) +++ { +++ err = TD_NOEVENT; +++ break; +++ } +++ } +++ if (err == TD_OK) +++ /* Now write it back to the inferior. */ +++ err = DB_PUT_STRUCT (th->th_ta_p, eventmask, td_thr_events_t, copy); +++ } +++ +++ return err; +++} ++--- /dev/null +++++ b/fbtl_db/td_thr_dbresume.c ++@@ -0,0 +1,29 @@ +++/* Resume execution of given thread. +++ Copyright (C) 1999-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 1999. +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public +++ License as published by the Free Software Foundation; either +++ version 2.1 of the License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General Public License for more details. +++ +++ You should have received a copy of the GNU Lesser General Public +++ License along with the GNU C Library; if not, see +++ . */ +++ +++#include "thread_dbP.h" +++ +++ +++td_err_e +++td_thr_dbresume (const td_thrhandle_t *th) +++{ +++ /* XXX We have to figure out what has to be done. */ +++ LOG ("td_thr_dbresume"); +++ return TD_NOCAPAB; +++} ++--- /dev/null +++++ b/fbtl_db/td_thr_dbsuspend.c ++@@ -0,0 +1,29 @@ +++/* Suspend execution of given thread. +++ Copyright (C) 1999-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 1999. +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public +++ License as published by the Free Software Foundation; either +++ version 2.1 of the License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General Public License for more details. +++ +++ You should have received a copy of the GNU Lesser General Public +++ License along with the GNU C Library; if not, see +++ . */ +++ +++#include "thread_dbP.h" +++ +++ +++td_err_e +++td_thr_dbsuspend (const td_thrhandle_t *th) +++{ +++ /* XXX We have to figure out what has to be done. */ +++ LOG ("td_thr_dbsuspend"); +++ return TD_NOCAPAB; +++} ++--- /dev/null +++++ b/fbtl_db/td_thr_event_enable.c ++@@ -0,0 +1,49 @@ +++/* Enable event process-wide. +++ Copyright (C) 1999-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 1999. +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public +++ License as published by the Free Software Foundation; either +++ version 2.1 of the License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General Public License for more details. +++ +++ You should have received a copy of the GNU Lesser General Public +++ License along with the GNU C Library; if not, see +++ . */ +++ +++#include "thread_dbP.h" +++ +++ +++td_err_e +++td_thr_event_enable (const td_thrhandle_t *th, int onoff) +++{ +++ LOG ("td_thr_event_enable"); +++ +++ if (th->th_unique != 0) +++ { +++ /* Write the new value into the thread data structure. */ +++ td_err_e err = DB_PUT_FIELD (th->th_ta_p, th->th_unique, pthread, +++ report_events, 0, +++ (psaddr_t) 0 + (onoff != 0)); +++ if (err != TD_OK) +++ return err; +++ +++ /* Just in case we are in the window between initializing __stack_user +++ and copying from __nptl_initial_report_events, we set it too. +++ It doesn't hurt to do this for non-initial threads, since it +++ won't be consulted again anyway. It would take another fetch +++ to get the tid and determine this isn't the initial thread, +++ so just do it always. */ +++ } +++ +++ /* We are faking it for the initial thread before its thread +++ descriptor is set up. */ +++ return DB_PUT_VALUE (th->th_ta_p, __nptl_initial_report_events, 0, +++ (psaddr_t) 0 + (onoff != 0)); +++} ++--- /dev/null +++++ b/fbtl_db/td_thr_event_getmsg.c ++@@ -0,0 +1,118 @@ +++/* Retrieve event. +++ Copyright (C) 1999-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 1999. +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public +++ License as published by the Free Software Foundation; either +++ version 2.1 of the License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General Public License for more details. +++ +++ You should have received a copy of the GNU Lesser General Public +++ License along with the GNU C Library; if not, see +++ . */ +++ +++#include "thread_dbP.h" +++#include +++ +++ +++td_err_e +++td_thr_event_getmsg (const td_thrhandle_t *th, td_event_msg_t *msg) +++{ +++ td_err_e err; +++ psaddr_t eventbuf, eventnum, eventdata; +++ psaddr_t thp, prevp; +++ void *copy; +++ +++ LOG ("td_thr_event_getmsg"); +++ +++ /* Copy the event message buffer in from the inferior. */ +++ err = DB_GET_FIELD_ADDRESS (eventbuf, th->th_ta_p, th->th_unique, pthread, +++ eventbuf, 0); +++ if (err == TD_OK) +++ err = DB_GET_STRUCT (copy, th->th_ta_p, eventbuf, td_eventbuf_t); +++ if (err != TD_OK) +++ return err; +++ +++ /* Check whether an event occurred. */ +++ err = DB_GET_FIELD_LOCAL (eventnum, th->th_ta_p, copy, +++ td_eventbuf_t, eventnum, 0); +++ if (err != TD_OK) +++ return err; +++ if ((int) (uintptr_t) eventnum == TD_EVENT_NONE) +++ /* Nothing. */ +++ return TD_NOMSG; +++ +++ /* Fill the user's data structure. */ +++ err = DB_GET_FIELD_LOCAL (eventdata, th->th_ta_p, copy, +++ td_eventbuf_t, eventdata, 0); +++ if (err != TD_OK) +++ return err; +++ +++ msg->msg.data = (uintptr_t) eventdata; +++ msg->event = (uintptr_t) eventnum; +++ msg->th_p = th; +++ +++ /* And clear the event message in the target. */ +++ memset (copy, 0, th->th_ta_p->ta_sizeof_td_eventbuf_t); +++ err = DB_PUT_STRUCT (th->th_ta_p, eventbuf, td_eventbuf_t, copy); +++ if (err != TD_OK) +++ return err; +++ +++ /* Get the pointer to the thread descriptor with the last event. +++ If it doesn't match TH, then walk down the list until we find it. +++ We must splice it out of the list so that there is no dangling +++ pointer to it later when it dies. */ +++ err = DB_GET_SYMBOL (prevp, th->th_ta_p, __nptl_last_event); +++ if (err != TD_OK) +++ return err; +++ err = DB_GET_VALUE (thp, th->th_ta_p, __nptl_last_event, 0); +++ if (err != TD_OK) +++ return err; +++ +++ while (thp != 0) +++ { +++ psaddr_t next; +++ err = DB_GET_FIELD (next, th->th_ta_p, th->th_unique, pthread, +++ nextevent, 0); +++ if (err != TD_OK) +++ return err; +++ +++ if (next == thp) +++ return TD_DBERR; +++ +++ if (thp == th->th_unique) +++ { +++ /* PREVP points at this thread, splice it out. */ +++ psaddr_t next_nextp; +++ err = DB_GET_FIELD_ADDRESS (next_nextp, th->th_ta_p, next, pthread, +++ nextevent, 0); +++ assert (err == TD_OK); /* We used this field before. */ +++ if (prevp == next_nextp) +++ return TD_DBERR; +++ +++ err = _td_store_value (th->th_ta_p, +++ th->th_ta_p->ta_var___nptl_last_event, -1, +++ 0, prevp, next); +++ if (err != TD_OK) +++ return err; +++ +++ /* Now clear this thread's own next pointer so it's not dangling +++ when the thread resumes and then chains on for its next event. */ +++ return DB_PUT_FIELD (th->th_ta_p, thp, pthread, nextevent, 0, 0); +++ } +++ +++ err = DB_GET_FIELD_ADDRESS (prevp, th->th_ta_p, thp, pthread, +++ nextevent, 0); +++ assert (err == TD_OK); /* We used this field before. */ +++ thp = next; +++ } +++ +++ /* Ack! This should not happen. */ +++ return TD_DBERR; +++} ++--- /dev/null +++++ b/fbtl_db/td_thr_get_info.c ++@@ -0,0 +1,126 @@ +++/* Get thread information. +++ Copyright (C) 1999-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 1999. +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public +++ License as published by the Free Software Foundation; either +++ version 2.1 of the License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General Public License for more details. +++ +++ You should have received a copy of the GNU Lesser General Public +++ License along with the GNU C Library; if not, see +++ . */ +++ +++#include +++#include +++#include +++#include "thread_dbP.h" +++ +++ +++td_err_e +++td_thr_get_info (const td_thrhandle_t *th, td_thrinfo_t *infop) +++{ +++ td_err_e err; +++ void *copy; +++ psaddr_t tls, schedpolicy, schedprio, cancelhandling, tid, report_events; +++ +++ LOG ("td_thr_get_info"); +++ +++ if (th->th_unique == 0) +++ { +++ /* Special case for the main thread before initialization. */ +++ copy = NULL; +++ tls = 0; +++ cancelhandling = 0; +++ schedpolicy = SCHED_OTHER; +++ schedprio = 0; +++ tid = 0; +++ err = DB_GET_VALUE (report_events, th->th_ta_p, +++ __nptl_initial_report_events, 0); +++ } +++ else +++ { +++ /* Copy the whole descriptor in once so we can access the several +++ fields locally. Excess copying in one go is much better than +++ multiple ps_pdread calls. */ +++ err = DB_GET_STRUCT (copy, th->th_ta_p, th->th_unique, pthread); +++ if (err != TD_OK) +++ return err; +++ +++ err = DB_GET_FIELD_ADDRESS (tls, th->th_ta_p, th->th_unique, +++ pthread, specific, 0); +++ if (err != TD_OK) +++ return err; +++ +++ err = DB_GET_FIELD_LOCAL (schedpolicy, th->th_ta_p, copy, pthread, +++ schedpolicy, 0); +++ if (err != TD_OK) +++ return err; +++ err = DB_GET_FIELD_LOCAL (schedprio, th->th_ta_p, copy, pthread, +++ schedparam_sched_priority, 0); +++ if (err != TD_OK) +++ return err; +++ err = DB_GET_FIELD_LOCAL (tid, th->th_ta_p, copy, pthread, tid, 0); +++ if (err != TD_OK) +++ return err; +++ err = DB_GET_FIELD_LOCAL (cancelhandling, th->th_ta_p, copy, pthread, +++ cancelhandling, 0); +++ if (err != TD_OK) +++ return err; +++ err = DB_GET_FIELD_LOCAL (report_events, th->th_ta_p, copy, pthread, +++ report_events, 0); +++ } +++ if (err != TD_OK) +++ return err; +++ +++ /* Fill in information. Clear first to provide reproducable +++ results for the fields we do not fill in. */ +++ memset (infop, '\0', sizeof (td_thrinfo_t)); +++ +++ infop->ti_tid = (thread_t) th->th_unique; +++ infop->ti_tls = (char *) tls; +++ infop->ti_pri = ((uintptr_t) schedpolicy == SCHED_OTHER +++ ? 0 : (uintptr_t) schedprio); +++ infop->ti_type = TD_THR_USER; +++ +++ if ((((int) (uintptr_t) cancelhandling) & EXITING_BITMASK) == 0) +++ /* XXX For now there is no way to get more information. */ +++ infop->ti_state = TD_THR_ACTIVE; +++ else if ((((int) (uintptr_t) cancelhandling) & TERMINATED_BITMASK) == 0) +++ infop->ti_state = TD_THR_ZOMBIE; +++ else +++ infop->ti_state = TD_THR_UNKNOWN; +++ +++ /* Initialization which are the same in both cases. */ +++ infop->ti_ta_p = th->th_ta_p; +++ infop->ti_lid = tid == 0 ? ps_getpid (th->th_ta_p->ph) : (uintptr_t) tid; +++ infop->ti_traceme = report_events != 0; +++ +++ if (copy != NULL) +++ err = DB_GET_FIELD_LOCAL (infop->ti_startfunc, th->th_ta_p, copy, pthread, +++ start_routine, 0); +++ if (copy != NULL && err == TD_OK) +++ { +++ uint32_t idx; +++ for (idx = 0; idx < TD_EVENTSIZE; ++idx) +++ { +++ psaddr_t word; +++ err = DB_GET_FIELD_LOCAL (word, th->th_ta_p, copy, pthread, +++ eventbuf_eventmask_event_bits, idx); +++ if (err != TD_OK) +++ break; +++ infop->ti_events.event_bits[idx] = (uintptr_t) word; +++ } +++ if (err == TD_NOAPLIC) +++ memset (&infop->ti_events.event_bits[idx], 0, +++ (TD_EVENTSIZE - idx) * sizeof infop->ti_events.event_bits[0]); +++ } +++ +++ return err; +++} ++--- /dev/null +++++ b/fbtl_db/td_thr_getfpregs.c ++@@ -0,0 +1,57 @@ +++/* Get a thread's floating-point register set. +++ Copyright (C) 1999-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 1999. +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public +++ License as published by the Free Software Foundation; either +++ version 2.1 of the License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General Public License for more details. +++ +++ You should have received a copy of the GNU Lesser General Public +++ License along with the GNU C Library; if not, see +++ . */ +++ +++#include "thread_dbP.h" +++ +++ +++td_err_e +++td_thr_getfpregs (const td_thrhandle_t *th, prfpregset_t *regset) +++{ +++ psaddr_t cancelhandling, tid; +++ td_err_e err; +++ +++ LOG ("td_thr_getfpregs"); +++ +++ if (th->th_unique == 0) +++ /* Special case for the main thread before initialization. */ +++ return ps_lgetfpregs (th->th_ta_p->ph, ps_getpid (th->th_ta_p->ph), +++ regset) != PS_OK ? TD_ERR : TD_OK; +++ +++ /* We have to get the state and the PID for this thread. */ +++ err = DB_GET_FIELD (cancelhandling, th->th_ta_p, th->th_unique, pthread, +++ cancelhandling, 0); +++ if (err != TD_OK) +++ return err; +++ +++ /* If the thread already terminated we return all zeroes. */ +++ if (((int) (uintptr_t) cancelhandling) & TERMINATED_BITMASK) +++ memset (regset, '\0', sizeof (*regset)); +++ /* Otherwise get the register content through the callback. */ +++ else +++ { +++ err = DB_GET_FIELD (tid, th->th_ta_p, th->th_unique, pthread, tid, 0); +++ if (err != TD_OK) +++ return err; +++ +++ if (ps_lgetfpregs (th->th_ta_p->ph, (uintptr_t) tid, regset) != PS_OK) +++ return TD_ERR; +++ } +++ +++ return TD_OK; +++} ++--- /dev/null +++++ b/fbtl_db/td_thr_getgregs.c ++@@ -0,0 +1,57 @@ +++/* Get a thread's general register set. +++ Copyright (C) 1999-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 1999. +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public +++ License as published by the Free Software Foundation; either +++ version 2.1 of the License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General Public License for more details. +++ +++ You should have received a copy of the GNU Lesser General Public +++ License along with the GNU C Library; if not, see +++ . */ +++ +++#include "thread_dbP.h" +++ +++ +++td_err_e +++td_thr_getgregs (const td_thrhandle_t *th, prgregset_t regset) +++{ +++ psaddr_t cancelhandling, tid; +++ td_err_e err; +++ +++ LOG ("td_thr_getgregs"); +++ +++ if (th->th_unique == 0) +++ /* Special case for the main thread before initialization. */ +++ return ps_lgetregs (th->th_ta_p->ph, ps_getpid (th->th_ta_p->ph), +++ regset) != PS_OK ? TD_ERR : TD_OK; +++ +++ /* We have to get the state and the PID for this thread. */ +++ err = DB_GET_FIELD (cancelhandling, th->th_ta_p, th->th_unique, pthread, +++ cancelhandling, 0); +++ if (err != TD_OK) +++ return err; +++ +++ /* If the thread already terminated we return all zeroes. */ +++ if (((int) (uintptr_t) cancelhandling) & TERMINATED_BITMASK) +++ memset (regset, '\0', sizeof (*regset)); +++ /* Otherwise get the register content through the callback. */ +++ else +++ { +++ err = DB_GET_FIELD (tid, th->th_ta_p, th->th_unique, pthread, tid, 0); +++ if (err != TD_OK) +++ return err; +++ +++ if (ps_lgetregs (th->th_ta_p->ph, (uintptr_t) tid, regset) != PS_OK) +++ return TD_ERR; +++ } +++ +++ return TD_OK; +++} ++--- /dev/null +++++ b/fbtl_db/td_thr_getxregs.c ++@@ -0,0 +1,29 @@ +++/* Get a thread's extra state register set. +++ Copyright (C) 1999-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 1999. +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public +++ License as published by the Free Software Foundation; either +++ version 2.1 of the License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General Public License for more details. +++ +++ You should have received a copy of the GNU Lesser General Public +++ License along with the GNU C Library; if not, see +++ . */ +++ +++#include "thread_dbP.h" +++ +++ +++td_err_e +++td_thr_getxregs (const td_thrhandle_t *th, void *xregs) +++{ +++ /* XXX This might be platform specific. */ +++ LOG ("td_thr_getxregs"); +++ return TD_NOXREGS; +++} ++--- /dev/null +++++ b/fbtl_db/td_thr_getxregsize.c ++@@ -0,0 +1,29 @@ +++/* Get the size of the extra state register set for this architecture. +++ Copyright (C) 1999-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 1999. +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public +++ License as published by the Free Software Foundation; either +++ version 2.1 of the License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General Public License for more details. +++ +++ You should have received a copy of the GNU Lesser General Public +++ License along with the GNU C Library; if not, see +++ . */ +++ +++#include "thread_dbP.h" +++ +++ +++td_err_e +++td_thr_getxregsize (const td_thrhandle_t *th, int *sizep) +++{ +++ /* XXX This might be platform specific. */ +++ LOG ("td_thr_getxregsize"); +++ return TD_NOXREGS; +++} ++--- /dev/null +++++ b/fbtl_db/td_thr_set_event.c ++@@ -0,0 +1,75 @@ +++/* Enable specific event for thread. +++ Copyright (C) 1999-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 1999. +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public +++ License as published by the Free Software Foundation; either +++ version 2.1 of the License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General Public License for more details. +++ +++ You should have received a copy of the GNU Lesser General Public +++ License along with the GNU C Library; if not, see +++ . */ +++ +++#include +++#include +++ +++#include "thread_dbP.h" +++ +++ +++td_err_e +++td_thr_set_event (const td_thrhandle_t *th, td_thr_events_t *event) +++{ +++ td_err_e err; +++ psaddr_t eventmask; +++ void *copy; +++ +++ LOG ("td_thr_set_event"); +++ +++ /* Fetch the old event mask from the inferior and modify it in place. */ +++ err = DB_GET_FIELD_ADDRESS (eventmask, th->th_ta_p, +++ th->th_unique, pthread, eventbuf_eventmask, 0); +++ if (err == TD_OK) +++ err = DB_GET_STRUCT (copy, th->th_ta_p, eventmask, td_thr_events_t); +++ if (err == TD_OK) +++ { +++ uint32_t idx; +++ for (idx = 0; idx < TD_EVENTSIZE; ++idx) +++ { +++ psaddr_t word; +++ uint32_t mask; +++ err = DB_GET_FIELD_LOCAL (word, th->th_ta_p, copy, +++ td_thr_events_t, event_bits, idx); +++ if (err != TD_OK) +++ break; +++ mask = (uintptr_t) word; +++ mask |= event->event_bits[idx]; +++ word = (psaddr_t) (uintptr_t) mask; +++ err = DB_PUT_FIELD_LOCAL (th->th_ta_p, copy, +++ td_thr_events_t, event_bits, idx, word); +++ if (err != TD_OK) +++ break; +++ } +++ if (err == TD_NOAPLIC) +++ { +++ err = TD_OK; +++ while (idx < TD_EVENTSIZE) +++ if (event->event_bits[idx++] != 0) +++ { +++ err = TD_NOEVENT; +++ break; +++ } +++ } +++ if (err == TD_OK) +++ /* Now write it back to the inferior. */ +++ err = DB_PUT_STRUCT (th->th_ta_p, eventmask, td_thr_events_t, copy); +++ } +++ +++ return err; +++} ++--- /dev/null +++++ b/fbtl_db/td_thr_setfpregs.c ++@@ -0,0 +1,54 @@ +++/* Set a thread's floating-point register set. +++ Copyright (C) 1999-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 1999. +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public +++ License as published by the Free Software Foundation; either +++ version 2.1 of the License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General Public License for more details. +++ +++ You should have received a copy of the GNU Lesser General Public +++ License along with the GNU C Library; if not, see +++ . */ +++ +++#include "thread_dbP.h" +++ +++ +++td_err_e +++td_thr_setfpregs (const td_thrhandle_t *th, const prfpregset_t *fpregs) +++{ +++ psaddr_t cancelhandling, tid; +++ td_err_e err; +++ +++ LOG ("td_thr_setfpregs"); +++ +++ if (th->th_unique == 0) +++ /* Special case for the main thread before initialization. */ +++ return ps_lsetfpregs (th->th_ta_p->ph, ps_getpid (th->th_ta_p->ph), +++ fpregs) != PS_OK ? TD_ERR : TD_OK; +++ +++ /* We have to get the state and the PID for this thread. */ +++ err = DB_GET_FIELD (cancelhandling, th->th_ta_p, th->th_unique, pthread, +++ cancelhandling, 0); +++ if (err != TD_OK) +++ return err; +++ +++ /* Only set the registers if the thread hasn't yet terminated. */ +++ if ((((int) (uintptr_t) cancelhandling) & TERMINATED_BITMASK) == 0) +++ { +++ err = DB_GET_FIELD (tid, th->th_ta_p, th->th_unique, pthread, tid, 0); +++ if (err != TD_OK) +++ return err; +++ +++ if (ps_lsetfpregs (th->th_ta_p->ph, (uintptr_t) tid, fpregs) != PS_OK) +++ return TD_ERR; +++ } +++ +++ return TD_OK; +++} ++--- /dev/null +++++ b/fbtl_db/td_thr_setgregs.c ++@@ -0,0 +1,54 @@ +++/* Set a thread's general register set. +++ Copyright (C) 1999-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 1999. +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public +++ License as published by the Free Software Foundation; either +++ version 2.1 of the License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General Public License for more details. +++ +++ You should have received a copy of the GNU Lesser General Public +++ License along with the GNU C Library; if not, see +++ . */ +++ +++#include "thread_dbP.h" +++ +++ +++td_err_e +++td_thr_setgregs (const td_thrhandle_t *th, prgregset_t gregs) +++{ +++ psaddr_t cancelhandling, tid; +++ td_err_e err; +++ +++ LOG ("td_thr_setgregs"); +++ +++ if (th->th_unique == 0) +++ /* Special case for the main thread before initialization. */ +++ return ps_lsetregs (th->th_ta_p->ph, ps_getpid (th->th_ta_p->ph), +++ gregs) != PS_OK ? TD_ERR : TD_OK; +++ +++ /* We have to get the state and the PID for this thread. */ +++ err = DB_GET_FIELD (cancelhandling, th->th_ta_p, th->th_unique, pthread, +++ cancelhandling, 0); +++ if (err != TD_OK) +++ return err; +++ +++ /* Only set the registers if the thread hasn't yet terminated. */ +++ if ((((int) (uintptr_t) cancelhandling) & TERMINATED_BITMASK) == 0) +++ { +++ err = DB_GET_FIELD (tid, th->th_ta_p, th->th_unique, pthread, tid, 0); +++ if (err != TD_OK) +++ return err; +++ +++ if (ps_lsetregs (th->th_ta_p->ph, tid - (psaddr_t) 0, gregs) != PS_OK) +++ return TD_ERR; +++ } +++ +++ return TD_OK; +++} ++--- /dev/null +++++ b/fbtl_db/td_thr_setprio.c ++@@ -0,0 +1,29 @@ +++/* Set a thread's priority. +++ Copyright (C) 1999-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 1999. +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public +++ License as published by the Free Software Foundation; either +++ version 2.1 of the License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General Public License for more details. +++ +++ You should have received a copy of the GNU Lesser General Public +++ License along with the GNU C Library; if not, see +++ . */ +++ +++#include "thread_dbP.h" +++ +++ +++td_err_e +++td_thr_setprio (const td_thrhandle_t *th, int prio) +++{ +++ /* XXX We have to figure out what has to be done. */ +++ LOG ("td_thr_setprio"); +++ return TD_OK; +++} ++--- /dev/null +++++ b/fbtl_db/td_thr_setsigpending.c ++@@ -0,0 +1,30 @@ +++/* Raise a signal for a thread. +++ Copyright (C) 1999-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 1999. +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public +++ License as published by the Free Software Foundation; either +++ version 2.1 of the License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General Public License for more details. +++ +++ You should have received a copy of the GNU Lesser General Public +++ License along with the GNU C Library; if not, see +++ . */ +++ +++#include "thread_dbP.h" +++ +++ +++td_err_e +++td_thr_setsigpending (const td_thrhandle_t *th, unsigned char n, +++ const sigset_t *ss) +++{ +++ /* XXX We have to figure out what has to be done. */ +++ LOG ("td_thr_setsigpending"); +++ return TD_OK; +++} ++--- /dev/null +++++ b/fbtl_db/td_thr_setxregs.c ++@@ -0,0 +1,29 @@ +++/* Set a thread's extra state register set. +++ Copyright (C) 1999-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 1999. +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public +++ License as published by the Free Software Foundation; either +++ version 2.1 of the License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General Public License for more details. +++ +++ You should have received a copy of the GNU Lesser General Public +++ License along with the GNU C Library; if not, see +++ . */ +++ +++#include "thread_dbP.h" +++ +++ +++td_err_e +++td_thr_setxregs (const td_thrhandle_t *ta, const void *addr) +++{ +++ /* XXX This might have to be platform specific. */ +++ LOG ("td_thr_setxregs"); +++ return TD_NOXREGS; +++} ++--- /dev/null +++++ b/fbtl_db/td_thr_sigsetmask.c ++@@ -0,0 +1,29 @@ +++/* Set a thread's signal mask. +++ Copyright (C) 1999-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 1999. +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public +++ License as published by the Free Software Foundation; either +++ version 2.1 of the License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General Public License for more details. +++ +++ You should have received a copy of the GNU Lesser General Public +++ License along with the GNU C Library; if not, see +++ . */ +++ +++#include "thread_dbP.h" +++ +++ +++td_err_e +++td_thr_sigsetmask (const td_thrhandle_t *th, const sigset_t *ss) +++{ +++ /* XXX We have to figure out what has to be done. */ +++ LOG ("td_thr_sigsetmask"); +++ return TD_OK; +++} ++--- /dev/null +++++ b/fbtl_db/td_thr_tls_get_addr.c ++@@ -0,0 +1,42 @@ +++/* Get address of thread local variable. +++ Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include "thread_dbP.h" +++ +++td_err_e +++td_thr_tls_get_addr (const td_thrhandle_t *th, +++ psaddr_t map_address, size_t offset, psaddr_t *address) +++{ +++ td_err_e err; +++ psaddr_t modid; +++ +++ /* Get the TLS module ID from the `struct link_map' in the inferior. */ +++ err = DB_GET_FIELD (modid, th->th_ta_p, map_address, link_map, +++ l_tls_modid, 0); +++ if (err == TD_NOCAPAB) +++ return TD_NOAPLIC; +++ if (err == TD_OK) +++ { +++ err = td_thr_tlsbase (th, (uintptr_t) modid, address); +++ if (err == TD_OK) +++ *address += offset; +++ } +++ return err; +++} ++--- /dev/null +++++ b/fbtl_db/td_thr_tlsbase.c ++@@ -0,0 +1,243 @@ +++/* Locate TLS data for a thread. +++ Copyright (C) 2003-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 +++ . */ +++ +++#include "thread_dbP.h" +++#include +++ +++/* Get the DTV slotinfo list head entry from the dynamic loader state +++ into *LISTHEAD. */ +++static td_err_e +++dtv_slotinfo_list (td_thragent_t *ta, +++ psaddr_t *listhead) +++{ +++ td_err_e err; +++ psaddr_t head; +++ +++ if (ta->ta_addr__rtld_global == 0 +++ && td_mod_lookup (ta->ph, LD_SO, SYM__rtld_global, +++ &ta->ta_addr__rtld_global) != PS_OK) +++ ta->ta_addr__rtld_global = (void*)-1; +++ +++ if (ta->ta_addr__rtld_global != (void*)-1) +++ { +++ err = DB_GET_FIELD (head, ta, ta->ta_addr__rtld_global, +++ rtld_global, _dl_tls_dtv_slotinfo_list, 0); +++ if (err != TD_OK) +++ return err; +++ } +++ else +++ { +++ if (ta->ta_addr__dl_tls_dtv_slotinfo_list == 0 +++ && td_mod_lookup (ta->ph, NULL, SYM__dl_tls_dtv_slotinfo_list, +++ &ta->ta_addr__dl_tls_dtv_slotinfo_list) != PS_OK) +++ return TD_ERR; +++ +++ err = _td_fetch_value (ta, ta->ta_var__dl_tls_dtv_slotinfo_list, +++ SYM_DESC__dl_tls_dtv_slotinfo_list, +++ 0, ta->ta_addr__dl_tls_dtv_slotinfo_list, &head); +++ if (err != TD_OK) +++ return err; +++ } +++ +++ *listhead = head; +++ return TD_OK; +++} +++ +++/* Get the address of the DTV slotinfo entry for MODID into +++ *DTVSLOTINFO. */ +++static td_err_e +++dtv_slotinfo (td_thragent_t *ta, +++ unsigned long int modid, +++ psaddr_t *dtvslotinfo) +++{ +++ td_err_e err; +++ psaddr_t slot, temp; +++ size_t slbase = 0; +++ +++ err = dtv_slotinfo_list (ta, &slot); +++ if (err != TD_OK) +++ return err; +++ +++ while (slot) +++ { +++ /* Get the number of entries in this list entry's array. */ +++ err = DB_GET_FIELD (temp, ta, slot, dtv_slotinfo_list, len, 0); +++ if (err != TD_OK) +++ return err; +++ size_t len = (uintptr_t)temp; +++ +++ /* Did we find the list entry for modid? */ +++ if (modid < slbase + len) +++ break; +++ +++ /* We didn't, so get the next list entry. */ +++ slbase += len; +++ err = DB_GET_FIELD (temp, ta, slot, dtv_slotinfo_list, +++ next, 0); +++ if (err != TD_OK) +++ return err; +++ slot = temp; +++ } +++ +++ /* We reached the end of the list and found nothing. */ +++ if (!slot) +++ return TD_ERR; +++ +++ /* Take the slotinfo for modid from the list entry. */ +++ err = DB_GET_FIELD_ADDRESS (temp, ta, slot, dtv_slotinfo_list, +++ slotinfo, modid - slbase); +++ if (err != TD_OK) +++ return err; +++ slot = temp; +++ +++ *dtvslotinfo = slot; +++ return TD_OK; +++} +++ +++/* Return in *BASE the base address of the TLS block for MODID within +++ TH. +++ +++ It should return success and yield the correct pointer in any +++ circumstance where the TLS block for the module and thread +++ requested has already been initialized. +++ +++ It should fail with TD_TLSDEFER only when the thread could not +++ possibly have observed any values in that TLS block. That way, the +++ debugger can fall back to showing initial values from the PT_TLS +++ segment (and refusing attempts to mutate) for the TD_TLSDEFER case, +++ and never fail to make the values the program will actually see +++ available to the user of the debugger. */ +++td_err_e +++td_thr_tlsbase (const td_thrhandle_t *th, +++ unsigned long int modid, +++ psaddr_t *base) +++{ +++ td_err_e err; +++ psaddr_t dtv, dtvslot, dtvptr, temp; +++ +++ if (modid < 1) +++ return TD_NOTLS; +++ +++ psaddr_t pd = th->th_unique; +++ if (pd == 0) +++ { +++ /* This is the fake handle for the main thread before libpthread +++ initialization. We are using 0 for its th_unique because we can't +++ trust that its thread register has been initialized. But we need +++ a real pointer to have any TLS access work. In case of dlopen'd +++ libpthread, initialization might not be for quite some time. So +++ try looking up the thread register now. Worst case, it's nonzero +++ uninitialized garbage and we get bogus results for TLS access +++ attempted too early. Tough. */ +++ +++ td_thrhandle_t main_th; +++ err = __td_ta_lookup_th_unique (th->th_ta_p, ps_getpid (th->th_ta_p->ph), +++ &main_th); +++ if (err == 0) +++ pd = main_th.th_unique; +++ if (pd == 0) +++ return TD_TLSDEFER; +++ } +++ +++ err = dtv_slotinfo (th->th_ta_p, modid, &temp); +++ if (err != TD_OK) +++ return err; +++ +++ psaddr_t slot; +++ err = DB_GET_STRUCT (slot, th->th_ta_p, temp, dtv_slotinfo); +++ if (err != TD_OK) +++ return err; +++ +++ /* Take the link_map from the slotinfo. */ +++ psaddr_t map; +++ err = DB_GET_FIELD_LOCAL (map, th->th_ta_p, slot, dtv_slotinfo, map, 0); +++ if (err != TD_OK) +++ return err; +++ if (!map) +++ return TD_ERR; +++ +++ /* Ok, the modid is good, now find out what DTV generation it +++ requires. */ +++ err = DB_GET_FIELD_LOCAL (temp, th->th_ta_p, slot, dtv_slotinfo, gen, 0); +++ if (err != TD_OK) +++ return err; +++ size_t modgen = (uintptr_t)temp; +++ +++ /* Get the DTV pointer from the thread descriptor. */ +++ err = DB_GET_FIELD (dtv, th->th_ta_p, pd, pthread, dtvp, 0); +++ if (err != TD_OK) +++ return err; +++ +++ psaddr_t dtvgenloc; +++ /* Get the DTV generation count at dtv[0].counter. */ +++ err = DB_GET_FIELD_ADDRESS (dtvgenloc, th->th_ta_p, dtv, dtv, dtv, 0); +++ if (err != TD_OK) +++ return err; +++ err = DB_GET_FIELD (temp, th->th_ta_p, dtvgenloc, dtv_t, counter, 0); +++ if (err != TD_OK) +++ return err; +++ size_t dtvgen = (uintptr_t)temp; +++ +++ /* Is the DTV current enough? */ +++ if (dtvgen < modgen) +++ { +++ try_static_tls: +++ /* If the module uses Static TLS, we're still good. */ +++ err = DB_GET_FIELD (temp, th->th_ta_p, map, link_map, l_tls_offset, 0); +++ if (err != TD_OK) +++ return err; +++ ptrdiff_t tlsoff = (uintptr_t)temp; +++ +++ if (tlsoff != FORCED_DYNAMIC_TLS_OFFSET +++ && tlsoff != NO_TLS_OFFSET) +++ { +++ psaddr_t tp = pd; +++ +++#if TLS_TCB_AT_TP +++ dtvptr = tp - tlsoff; +++#elif TLS_DTV_AT_TP +++ dtvptr = tp + tlsoff + TLS_PRE_TCB_SIZE; +++#else +++# error "Either TLS_TCB_AT_TP or TLS_DTV_AT_TP must be defined" +++#endif +++ +++ *base = dtvptr; +++ return TD_OK; +++ } +++ +++ return TD_TLSDEFER; +++ } +++ +++ /* Find the corresponding entry in the DTV. */ +++ err = DB_GET_FIELD_ADDRESS (dtvslot, th->th_ta_p, dtv, dtv, dtv, modid); +++ if (err != TD_OK) +++ return err; +++ +++ /* Extract the TLS block address from that DTV slot. */ +++ err = DB_GET_FIELD (dtvptr, th->th_ta_p, dtvslot, dtv_t, pointer_val, 0); +++ if (err != TD_OK) +++ return err; +++ +++ /* It could be that the memory for this module is not allocated for +++ the given thread. */ +++ if ((uintptr_t) dtvptr & 1) +++ goto try_static_tls; +++ +++ *base = dtvptr; +++ return TD_OK; +++} ++--- /dev/null +++++ b/fbtl_db/td_thr_tsd.c ++@@ -0,0 +1,96 @@ +++/* Get a thread-specific data pointer for a thread. +++ Copyright (C) 1999-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 1999. +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public +++ License as published by the Free Software Foundation; either +++ version 2.1 of the License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General Public License for more details. +++ +++ You should have received a copy of the GNU Lesser General Public +++ License along with the GNU C Library; if not, see +++ . */ +++ +++#include +++#include "thread_dbP.h" +++ +++ +++td_err_e +++td_thr_tsd (const td_thrhandle_t *th, const thread_key_t tk, void **data) +++{ +++ td_err_e err; +++ psaddr_t tk_seq, level1, level2, seq, value; +++ void *copy; +++ uint32_t pthread_key_2ndlevel_size, idx1st, idx2nd; +++ +++ LOG ("td_thr_tsd"); +++ +++ /* Get the key entry. */ +++ err = DB_GET_VALUE (tk_seq, th->th_ta_p, __pthread_keys, tk); +++ if (err == TD_NOAPLIC) +++ return TD_BADKEY; +++ if (err != TD_OK) +++ return err; +++ +++ /* Fail if this key is not at all used. */ +++ if (((uintptr_t) tk_seq & 1) == 0) +++ return TD_BADKEY; +++ +++ /* This makes sure we have the size information on hand. */ +++ err = DB_GET_FIELD_ADDRESS (level2, th->th_ta_p, 0, pthread_key_data_level2, +++ data, 1); +++ if (err != TD_OK) +++ return err; +++ +++ /* Compute the indeces. */ +++ pthread_key_2ndlevel_size +++ = DB_DESC_NELEM (th->th_ta_p->ta_field_pthread_key_data_level2_data); +++ idx1st = tk / pthread_key_2ndlevel_size; +++ idx2nd = tk % pthread_key_2ndlevel_size; +++ +++ /* Now fetch the first level pointer. */ +++ err = DB_GET_FIELD (level1, th->th_ta_p, th->th_unique, pthread, +++ specific, idx1st); +++ if (err == TD_NOAPLIC) +++ return TD_DBERR; +++ if (err != TD_OK) +++ return err; +++ +++ /* Check the pointer to the second level array. */ +++ if (level1 == 0) +++ return TD_NOTSD; +++ +++ /* Locate the element within the second level array. */ +++ err = DB_GET_FIELD_ADDRESS (level2, th->th_ta_p, +++ level1, pthread_key_data_level2, data, idx2nd); +++ if (err == TD_NOAPLIC) +++ return TD_DBERR; +++ if (err != TD_OK) +++ return err; +++ +++ /* Now copy in that whole structure. */ +++ err = DB_GET_STRUCT (copy, th->th_ta_p, level2, pthread_key_data); +++ if (err != TD_OK) +++ return err; +++ +++ /* Check whether the data is valid. */ +++ err = DB_GET_FIELD_LOCAL (seq, th->th_ta_p, copy, pthread_key_data, seq, 0); +++ if (err != TD_OK) +++ return err; +++ if (seq != tk_seq) +++ return TD_NOTSD; +++ +++ /* Finally, fetch the value. */ +++ err = DB_GET_FIELD_LOCAL (value, th->th_ta_p, copy, pthread_key_data, +++ data, 0); +++ if (err == TD_OK) +++ *data = value; +++ +++ return err; +++} ++--- /dev/null +++++ b/fbtl_db/td_thr_validate.c ++@@ -0,0 +1,84 @@ +++/* Validate a thread handle. +++ Copyright (C) 1999-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 1999. +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public +++ License as published by the Free Software Foundation; either +++ version 2.1 of the License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General Public License for more details. +++ +++ You should have received a copy of the GNU Lesser General Public +++ License along with the GNU C Library; if not, see +++ . */ +++ +++#include "thread_dbP.h" +++#include +++ +++static td_err_e +++check_thread_list (const td_thrhandle_t *th, psaddr_t head, bool *uninit) +++{ +++ td_err_e err; +++ psaddr_t next, ofs; +++ +++ err = DB_GET_FIELD (next, th->th_ta_p, head, list_t, next, 0); +++ if (err == TD_OK) +++ { +++ if (next == 0) +++ { +++ *uninit = true; +++ return TD_NOTHR; +++ } +++ err = DB_GET_FIELD_ADDRESS (ofs, th->th_ta_p, 0, pthread, list, 0); +++ } +++ +++ while (err == TD_OK) +++ { +++ if (next == head) +++ return TD_NOTHR; +++ +++ if (next - (ofs - (psaddr_t) 0) == th->th_unique) +++ return TD_OK; +++ +++ err = DB_GET_FIELD (next, th->th_ta_p, next, list_t, next, 0); +++ } +++ +++ return err; +++} +++ +++ +++td_err_e +++td_thr_validate (const td_thrhandle_t *th) +++{ +++ td_err_e err; +++ psaddr_t list; +++ +++ LOG ("td_thr_validate"); +++ +++ /* First check the list with threads using user allocated stacks. */ +++ bool uninit = false; +++ err = DB_GET_SYMBOL (list, th->th_ta_p, __stack_user); +++ if (err == TD_OK) +++ err = check_thread_list (th, list, &uninit); +++ +++ /* If our thread is not on this list search the list with stack +++ using implementation allocated stacks. */ +++ if (err == TD_NOTHR) +++ { +++ err = DB_GET_SYMBOL (list, th->th_ta_p, stack_used); +++ if (err == TD_OK) +++ err = check_thread_list (th, list, &uninit); +++ +++ if (err == TD_NOTHR && uninit && th->th_unique == 0) +++ /* __pthread_initialize_minimal has not run yet. +++ There is only the special case thread handle. */ +++ err = TD_OK; +++ } +++ +++ return err; +++} ++--- /dev/null +++++ b/fbtl_db/thread_db.h ++@@ -0,0 +1,458 @@ +++/* thread_db.h -- interface to libthread_db.so library for debugging -lpthread +++ Copyright (C) 1999-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 +++ . */ +++ +++#ifndef _THREAD_DB_H +++#define _THREAD_DB_H 1 +++ +++/* This is the debugger interface for the NPTL library. It is +++ modelled closely after the interface with same names in Solaris +++ with the goal to share the same code in the debugger. */ +++#include +++#include +++#include +++#include +++ +++ +++/* Error codes of the library. */ +++typedef enum +++{ +++ TD_OK, /* No error. */ +++ TD_ERR, /* No further specified error. */ +++ TD_NOTHR, /* No matching thread found. */ +++ TD_NOSV, /* No matching synchronization handle found. */ +++ TD_NOLWP, /* No matching light-weighted process found. */ +++ TD_BADPH, /* Invalid process handle. */ +++ TD_BADTH, /* Invalid thread handle. */ +++ TD_BADSH, /* Invalid synchronization handle. */ +++ TD_BADTA, /* Invalid thread agent. */ +++ TD_BADKEY, /* Invalid key. */ +++ TD_NOMSG, /* No event available. */ +++ TD_NOFPREGS, /* No floating-point register content available. */ +++ TD_NOLIBTHREAD, /* Application not linked with thread library. */ +++ TD_NOEVENT, /* Requested event is not supported. */ +++ TD_NOCAPAB, /* Capability not available. */ +++ TD_DBERR, /* Internal debug library error. */ +++ TD_NOAPLIC, /* Operation is not applicable. */ +++ TD_NOTSD, /* No thread-specific data available. */ +++ TD_MALLOC, /* Out of memory. */ +++ TD_PARTIALREG, /* Not entire register set was read or written. */ +++ TD_NOXREGS, /* X register set not available for given thread. */ +++ TD_TLSDEFER, /* Thread has not yet allocated TLS for given module. */ +++ TD_NOTALLOC = TD_TLSDEFER, +++ TD_VERSION, /* Version if libpthread and libthread_db do not match. */ +++ TD_NOTLS /* There is no TLS segment in the given module. */ +++} td_err_e; +++ +++ +++/* Possible thread states. TD_THR_ANY_STATE is a pseudo-state used to +++ select threads regardless of state in td_ta_thr_iter(). */ +++typedef enum +++{ +++ TD_THR_ANY_STATE, +++ TD_THR_UNKNOWN, +++ TD_THR_STOPPED, +++ TD_THR_RUN, +++ TD_THR_ACTIVE, +++ TD_THR_ZOMBIE, +++ TD_THR_SLEEP, +++ TD_THR_STOPPED_ASLEEP +++} td_thr_state_e; +++ +++/* Thread type: user or system. TD_THR_ANY_TYPE is a pseudo-type used +++ to select threads regardless of type in td_ta_thr_iter(). */ +++typedef enum +++{ +++ TD_THR_ANY_TYPE, +++ TD_THR_USER, +++ TD_THR_SYSTEM +++} td_thr_type_e; +++ +++ +++/* Types of the debugging library. */ +++ +++/* Handle for a process. This type is opaque. */ +++typedef struct td_thragent td_thragent_t; +++ +++/* The actual thread handle type. This is also opaque. */ +++typedef struct td_thrhandle +++{ +++ td_thragent_t *th_ta_p; +++ psaddr_t th_unique; +++} td_thrhandle_t; +++ +++ +++/* Forward declaration of a type defined by and for the dynamic linker. */ +++struct link_map; +++ +++ +++/* Flags for `td_ta_thr_iter'. */ +++#define TD_THR_ANY_USER_FLAGS 0xffffffff +++#define TD_THR_LOWEST_PRIORITY -20 +++#define TD_SIGNO_MASK NULL +++ +++ +++#define TD_EVENTSIZE 2 +++#define BT_UISHIFT 5 /* log base 2 of BT_NBIPUI, to extract word index */ +++#define BT_NBIPUI (1 << BT_UISHIFT) /* n bits per uint */ +++#define BT_UIMASK (BT_NBIPUI - 1) /* to extract bit index */ +++ +++/* Bitmask of enabled events. */ +++typedef struct td_thr_events +++{ +++ uint32_t event_bits[TD_EVENTSIZE]; +++} td_thr_events_t; +++ +++/* Event set manipulation macros. */ +++#define __td_eventmask(n) \ +++ (UINT32_C (1) << (((n) - 1) & BT_UIMASK)) +++#define __td_eventword(n) \ +++ ((UINT32_C ((n) - 1)) >> BT_UISHIFT) +++ +++#define td_event_emptyset(setp) \ +++ do { \ +++ int __i; \ +++ for (__i = TD_EVENTSIZE; __i > 0; --__i) \ +++ (setp)->event_bits[__i - 1] = 0; \ +++ } while (0) +++ +++#define td_event_fillset(setp) \ +++ do { \ +++ int __i; \ +++ for (__i = TD_EVENTSIZE; __i > 0; --__i) \ +++ (setp)->event_bits[__i - 1] = UINT32_C (0xffffffff); \ +++ } while (0) +++ +++#define td_event_addset(setp, n) \ +++ (((setp)->event_bits[__td_eventword (n)]) |= __td_eventmask (n)) +++#define td_event_delset(setp, n) \ +++ (((setp)->event_bits[__td_eventword (n)]) &= ~__td_eventmask (n)) +++#define td_eventismember(setp, n) \ +++ (__td_eventmask (n) & ((setp)->event_bits[__td_eventword (n)])) +++#if TD_EVENTSIZE == 2 +++# define td_eventisempty(setp) \ +++ (!((setp)->event_bits[0]) && !((setp)->event_bits[1])) +++#else +++# error "td_eventisempty must be changed to match TD_EVENTSIZE" +++#endif +++ +++/* Events reportable by the thread implementation. */ +++typedef enum +++{ +++ TD_ALL_EVENTS, /* Pseudo-event number. */ +++ TD_EVENT_NONE = TD_ALL_EVENTS, /* Depends on context. */ +++ TD_READY, /* Is executable now. */ +++ TD_SLEEP, /* Blocked in a synchronization obj. */ +++ TD_SWITCHTO, /* Now assigned to a process. */ +++ TD_SWITCHFROM, /* Not anymore assigned to a process. */ +++ TD_LOCK_TRY, /* Trying to get an unavailable lock. */ +++ TD_CATCHSIG, /* Signal posted to the thread. */ +++ TD_IDLE, /* Process getting idle. */ +++ TD_CREATE, /* New thread created. */ +++ TD_DEATH, /* Thread terminated. */ +++ TD_PREEMPT, /* Preempted. */ +++ TD_PRI_INHERIT, /* Inherited elevated priority. */ +++ TD_REAP, /* Reaped. */ +++ TD_CONCURRENCY, /* Number of processes changing. */ +++ TD_TIMEOUT, /* Conditional variable wait timed out. */ +++ TD_MIN_EVENT_NUM = TD_READY, +++ TD_MAX_EVENT_NUM = TD_TIMEOUT, +++ TD_EVENTS_ENABLE = 31 /* Event reporting enabled. */ +++} td_event_e; +++ +++/* Values representing the different ways events are reported. */ +++typedef enum +++{ +++ NOTIFY_BPT, /* User must insert breakpoint at u.bptaddr. */ +++ NOTIFY_AUTOBPT, /* Breakpoint at u.bptaddr is automatically +++ inserted. */ +++ NOTIFY_SYSCALL /* System call u.syscallno will be invoked. */ +++} td_notify_e; +++ +++/* Description how event type is reported. */ +++typedef struct td_notify +++{ +++ td_notify_e type; /* Way the event is reported. */ +++ union +++ { +++ psaddr_t bptaddr; /* Address of breakpoint. */ +++ int syscallno; /* Number of system call used. */ +++ } u; +++} td_notify_t; +++ +++/* Structure used to report event. */ +++typedef struct td_event_msg +++{ +++ td_event_e event; /* Event type being reported. */ +++ const td_thrhandle_t *th_p; /* Thread reporting the event. */ +++ union +++ { +++# if 0 +++ td_synchandle_t *sh; /* Handle of synchronization object. */ +++#endif +++ uintptr_t data; /* Event specific data. */ +++ } msg; +++} td_event_msg_t; +++ +++/* Structure containing event data available in each thread structure. */ +++typedef struct +++{ +++ td_thr_events_t eventmask; /* Mask of enabled events. */ +++ td_event_e eventnum; /* Number of last event. */ +++ void *eventdata; /* Data associated with event. */ +++} td_eventbuf_t; +++ +++ +++/* Gathered statistics about the process. */ +++typedef struct td_ta_stats +++{ +++ int nthreads; /* Total number of threads in use. */ +++ int r_concurrency; /* Concurrency level requested by user. */ +++ int nrunnable_num; /* Average runnable threads, numerator. */ +++ int nrunnable_den; /* Average runnable threads, denominator. */ +++ int a_concurrency_num; /* Achieved concurrency level, numerator. */ +++ int a_concurrency_den; /* Achieved concurrency level, denominator. */ +++ int nlwps_num; /* Average number of processes in use, +++ numerator. */ +++ int nlwps_den; /* Average number of processes in use, +++ denominator. */ +++ int nidle_num; /* Average number of idling processes, +++ numerator. */ +++ int nidle_den; /* Average number of idling processes, +++ denominator. */ +++} td_ta_stats_t; +++ +++ +++/* Since Sun's library is based on Solaris threads we have to define a few +++ types to map them to POSIX threads. */ +++typedef pthread_t thread_t; +++typedef pthread_key_t thread_key_t; +++ +++ +++/* Callback for iteration over threads. */ +++typedef int td_thr_iter_f (const td_thrhandle_t *, void *); +++ +++/* Callback for iteration over thread local data. */ +++typedef int td_key_iter_f (thread_key_t, void (*) (void *), void *); +++ +++ +++ +++/* Forward declaration. This has to be defined by the user. */ +++struct ps_prochandle; +++ +++ +++/* Information about the thread. */ +++typedef struct td_thrinfo +++{ +++ td_thragent_t *ti_ta_p; /* Process handle. */ +++ unsigned int ti_user_flags; /* Unused. */ +++ thread_t ti_tid; /* Thread ID returned by +++ pthread_create(). */ +++ char *ti_tls; /* Pointer to thread-local data. */ +++ psaddr_t ti_startfunc; /* Start function passed to +++ pthread_create(). */ +++ psaddr_t ti_stkbase; /* Base of thread's stack. */ +++ long int ti_stksize; /* Size of thread's stack. */ +++ psaddr_t ti_ro_area; /* Unused. */ +++ int ti_ro_size; /* Unused. */ +++ td_thr_state_e ti_state; /* Thread state. */ +++ unsigned char ti_db_suspended; /* Nonzero if suspended by debugger. */ +++ td_thr_type_e ti_type; /* Type of the thread (system vs +++ user thread). */ +++ intptr_t ti_pc; /* Unused. */ +++ intptr_t ti_sp; /* Unused. */ +++ short int ti_flags; /* Unused. */ +++ int ti_pri; /* Thread priority. */ +++ lwpid_t ti_lid; /* Kernel PID for this thread. */ +++ sigset_t ti_sigmask; /* Signal mask. */ +++ unsigned char ti_traceme; /* Nonzero if event reporting +++ enabled. */ +++ unsigned char ti_preemptflag; /* Unused. */ +++ unsigned char ti_pirecflag; /* Unused. */ +++ sigset_t ti_pending; /* Set of pending signals. */ +++ td_thr_events_t ti_events; /* Set of enabled events. */ +++} td_thrinfo_t; +++ +++ +++ +++/* Prototypes for exported library functions. */ +++ +++/* Initialize the thread debug support library. */ +++extern td_err_e td_init (void); +++ +++/* Historical relict. Should not be used anymore. */ +++extern td_err_e td_log (void); +++ +++/* Return list of symbols the library can request. */ +++extern const char **td_symbol_list (void); +++ +++/* Generate new thread debug library handle for process PS. */ +++extern td_err_e td_ta_new (struct ps_prochandle *__ps, td_thragent_t **__ta); +++ +++/* Free resources allocated for TA. */ +++extern td_err_e td_ta_delete (td_thragent_t *__ta); +++ +++/* Get number of currently running threads in process associated with TA. */ +++extern td_err_e td_ta_get_nthreads (const td_thragent_t *__ta, int *__np); +++ +++/* Return process handle passed in `td_ta_new' for process associated with +++ TA. */ +++extern td_err_e td_ta_get_ph (const td_thragent_t *__ta, +++ struct ps_prochandle **__ph); +++ +++/* Map thread library handle PT to thread debug library handle for process +++ associated with TA and store result in *TH. */ +++extern td_err_e td_ta_map_id2thr (const td_thragent_t *__ta, pthread_t __pt, +++ td_thrhandle_t *__th); +++ +++/* Map process ID LWPID to thread debug library handle for process +++ associated with TA and store result in *TH. */ +++extern td_err_e td_ta_map_lwp2thr (const td_thragent_t *__ta, lwpid_t __lwpid, +++ td_thrhandle_t *__th); +++ +++ +++/* Call for each thread in a process associated with TA the callback function +++ CALLBACK. */ +++extern td_err_e td_ta_thr_iter (const td_thragent_t *__ta, +++ td_thr_iter_f *__callback, void *__cbdata_p, +++ td_thr_state_e __state, int __ti_pri, +++ sigset_t *__ti_sigmask_p, +++ unsigned int __ti_user_flags); +++ +++/* Call for each defined thread local data entry the callback function KI. */ +++extern td_err_e td_ta_tsd_iter (const td_thragent_t *__ta, td_key_iter_f *__ki, +++ void *__p); +++ +++ +++/* Get event address for EVENT. */ +++extern td_err_e td_ta_event_addr (const td_thragent_t *__ta, +++ td_event_e __event, td_notify_t *__ptr); +++ +++/* Enable EVENT in global mask. */ +++extern td_err_e td_ta_set_event (const td_thragent_t *__ta, +++ td_thr_events_t *__event); +++ +++/* Disable EVENT in global mask. */ +++extern td_err_e td_ta_clear_event (const td_thragent_t *__ta, +++ td_thr_events_t *__event); +++ +++/* Return information about last event. */ +++extern td_err_e td_ta_event_getmsg (const td_thragent_t *__ta, +++ td_event_msg_t *__msg); +++ +++ +++/* Set suggested concurrency level for process associated with TA. */ +++extern td_err_e td_ta_setconcurrency (const td_thragent_t *__ta, int __level); +++ +++ +++/* Enable collecting statistics for process associated with TA. */ +++extern td_err_e td_ta_enable_stats (const td_thragent_t *__ta, int __enable); +++ +++/* Reset statistics. */ +++extern td_err_e td_ta_reset_stats (const td_thragent_t *__ta); +++ +++/* Retrieve statistics from process associated with TA. */ +++extern td_err_e td_ta_get_stats (const td_thragent_t *__ta, +++ td_ta_stats_t *__statsp); +++ +++ +++/* Validate that TH is a thread handle. */ +++extern td_err_e td_thr_validate (const td_thrhandle_t *__th); +++ +++/* Return information about thread TH. */ +++extern td_err_e td_thr_get_info (const td_thrhandle_t *__th, +++ td_thrinfo_t *__infop); +++ +++/* Retrieve floating-point register contents of process running thread TH. */ +++extern td_err_e td_thr_getfpregs (const td_thrhandle_t *__th, +++ prfpregset_t *__regset); +++ +++/* Retrieve general register contents of process running thread TH. */ +++extern td_err_e td_thr_getgregs (const td_thrhandle_t *__th, +++ prgregset_t __gregs); +++ +++/* Retrieve extended register contents of process running thread TH. */ +++extern td_err_e td_thr_getxregs (const td_thrhandle_t *__th, void *__xregs); +++ +++/* Get size of extended register set of process running thread TH. */ +++extern td_err_e td_thr_getxregsize (const td_thrhandle_t *__th, int *__sizep); +++ +++/* Set floating-point register contents of process running thread TH. */ +++extern td_err_e td_thr_setfpregs (const td_thrhandle_t *__th, +++ const prfpregset_t *__fpregs); +++ +++/* Set general register contents of process running thread TH. */ +++extern td_err_e td_thr_setgregs (const td_thrhandle_t *__th, +++ prgregset_t __gregs); +++ +++/* Set extended register contents of process running thread TH. */ +++extern td_err_e td_thr_setxregs (const td_thrhandle_t *__th, +++ const void *__addr); +++ +++ +++/* Get address of the given module's TLS storage area for the given thread. */ +++extern td_err_e td_thr_tlsbase (const td_thrhandle_t *__th, +++ unsigned long int __modid, +++ psaddr_t *__base); +++ +++/* Get address of thread local variable. */ +++extern td_err_e td_thr_tls_get_addr (const td_thrhandle_t *__th, +++ psaddr_t __map_address, size_t __offset, +++ psaddr_t *__address); +++ +++ +++/* Enable reporting for EVENT for thread TH. */ +++extern td_err_e td_thr_event_enable (const td_thrhandle_t *__th, int __event); +++ +++/* Enable EVENT for thread TH. */ +++extern td_err_e td_thr_set_event (const td_thrhandle_t *__th, +++ td_thr_events_t *__event); +++ +++/* Disable EVENT for thread TH. */ +++extern td_err_e td_thr_clear_event (const td_thrhandle_t *__th, +++ td_thr_events_t *__event); +++ +++/* Get event message for thread TH. */ +++extern td_err_e td_thr_event_getmsg (const td_thrhandle_t *__th, +++ td_event_msg_t *__msg); +++ +++ +++/* Set priority of thread TH. */ +++extern td_err_e td_thr_setprio (const td_thrhandle_t *__th, int __prio); +++ +++ +++/* Set pending signals for thread TH. */ +++extern td_err_e td_thr_setsigpending (const td_thrhandle_t *__th, +++ unsigned char __n, const sigset_t *__ss); +++ +++/* Set signal mask for thread TH. */ +++extern td_err_e td_thr_sigsetmask (const td_thrhandle_t *__th, +++ const sigset_t *__ss); +++ +++ +++/* Return thread local data associated with key TK in thread TH. */ +++extern td_err_e td_thr_tsd (const td_thrhandle_t *__th, +++ const thread_key_t __tk, void **__data); +++ +++ +++/* Suspend execution of thread TH. */ +++extern td_err_e td_thr_dbsuspend (const td_thrhandle_t *__th); +++ +++/* Resume execution of thread TH. */ +++extern td_err_e td_thr_dbresume (const td_thrhandle_t *__th); +++ +++#endif /* thread_db.h */ ++--- /dev/null +++++ b/fbtl_db/thread_dbP.h ++@@ -0,0 +1,258 @@ +++/* Private header for thread debug library +++ Copyright (C) 2003-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 +++ . */ +++ +++#ifndef _THREAD_DBP_H +++#define _THREAD_DBP_H 1 +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include "proc_service.h" +++#include "thread_db.h" +++#include "../fbtl/pthreadP.h" /* This is for *_BITMASK only. */ +++#include +++#include +++ +++/* Indeces for the symbol names. */ +++enum +++ { +++# define DB_STRUCT(type) SYM_SIZEOF_##type, +++# define DB_STRUCT_FIELD(type, field) SYM_##type##_FIELD_##field, +++# define DB_SYMBOL(name) SYM_##name, +++# define DB_FUNCTION(name) SYM_##name, +++# define DB_VARIABLE(name) SYM_##name, SYM_DESC_##name, +++# include "structs.def" +++# undef DB_STRUCT +++# undef DB_STRUCT_FIELD +++# undef DB_SYMBOL +++# undef DB_FUNCTION +++# undef DB_VARIABLE +++ +++ SYM_TH_UNIQUE_CONST_THREAD_AREA, +++ SYM_TH_UNIQUE_REGISTER64, +++ SYM_TH_UNIQUE_REGISTER32, +++ SYM_TH_UNIQUE_REGISTER64_THREAD_AREA, +++ SYM_TH_UNIQUE_REGISTER32_THREAD_AREA, +++ +++ SYM_NUM_MESSAGES +++ }; +++ +++ +++/* Comment out the following for less verbose output. */ +++#ifndef NDEBUG +++# define LOG(c) if (__td_debug) write (2, c "\n", strlen (c "\n")) +++extern int __td_debug attribute_hidden; +++#else +++# define LOG(c) +++#endif +++ +++ +++#define DB_DESC_SIZE(desc) ((desc)[0]) +++#define DB_DESC_NELEM(desc) ((desc)[1]) +++#define DB_DESC_OFFSET(desc) ((desc)[2]) +++#define DB_SIZEOF_DESC (3 * sizeof (uint32_t)) +++#define DB_DEFINE_DESC(name, size, nelem, offset) \ +++ const uint32_t name[3] = { (size), (nelem), (offset) } +++typedef uint32_t db_desc_t[3]; +++ +++ +++/* Handle for a process. This type is opaque. */ +++struct td_thragent +++{ +++ /* Chain on the list of all agent structures. */ +++ list_t list; +++ +++ /* Delivered by the debugger and we have to pass it back in the +++ proc callbacks. */ +++ struct ps_prochandle *ph; +++ +++ /* Cached values read from the inferior. */ +++# define DB_STRUCT(type) \ +++ uint32_t ta_sizeof_##type; +++# define DB_STRUCT_FIELD(type, field) \ +++ db_desc_t ta_field_##type##_##field; +++# define DB_SYMBOL(name) \ +++ psaddr_t ta_addr_##name; +++# define DB_FUNCTION(name) \ +++ psaddr_t ta_addr_##name; +++# define DB_VARIABLE(name) \ +++ psaddr_t ta_addr_##name; \ +++ db_desc_t ta_var_##name; +++# include "structs.def" +++# undef DB_STRUCT +++# undef DB_STRUCT_FIELD +++# undef DB_FUNCTION +++# undef DB_SYMBOL +++# undef DB_VARIABLE +++ +++ /* The method of locating a thread's th_unique value. */ +++ enum +++ { +++ ta_howto_unknown, +++ ta_howto_reg, +++ ta_howto_reg_thread_area, +++ ta_howto_const_thread_area +++ } ta_howto; +++ union +++ { +++ uint32_t const_thread_area; /* Constant argument to ps_get_thread_area. */ +++ /* These are as if the descriptor of the field in prregset_t, +++ but DB_DESC_NELEM is overloaded as follows: */ +++ db_desc_t reg; /* Signed bias applied to register value. */ +++ db_desc_t reg_thread_area; /* Bits to scale down register value. */ +++ } ta_howto_data; +++}; +++ +++ +++/* List of all known descriptors. */ +++extern list_t __td_agent_list attribute_hidden; +++ +++ +++/* Function used to test for correct thread agent pointer. */ +++static inline bool +++ta_ok (const td_thragent_t *ta) +++{ +++ list_t *runp; +++ +++ list_for_each (runp, &__td_agent_list) +++ if (list_entry (runp, td_thragent_t, list) == ta) +++ return true; +++ +++ return false; +++} +++ +++ +++/* Internal wrappers around ps_pglobal_lookup. */ +++extern ps_err_e td_mod_lookup (struct ps_prochandle *ps, const char *modname, +++ int idx, psaddr_t *sym_addr) attribute_hidden; +++#define td_lookup(ps, idx, sym_addr) \ +++ td_mod_lookup ((ps), LIBPTHREAD_SO, (idx), (sym_addr)) +++ +++ +++/* Store in psaddr_t VAR the address of inferior's symbol NAME. */ +++#define DB_GET_SYMBOL(var, ta, name) \ +++ (((ta)->ta_addr_##name == 0 \ +++ && td_lookup ((ta)->ph, SYM_##name, &(ta)->ta_addr_##name) != PS_OK) \ +++ ? TD_ERR : ((var) = (ta)->ta_addr_##name, TD_OK)) +++ +++/* Store in psaddr_t VAR the value of ((TYPE) PTR)->FIELD[IDX] in the inferior. +++ A target field smaller than psaddr_t is zero-extended. */ +++#define DB_GET_FIELD(var, ta, ptr, type, field, idx) \ +++ _td_fetch_value ((ta), (ta)->ta_field_##type##_##field, \ +++ SYM_##type##_FIELD_##field, \ +++ (psaddr_t) 0 + (idx), (ptr), &(var)) +++ +++#define DB_GET_FIELD_ADDRESS(var, ta, ptr, type, field, idx) \ +++ ((var) = (ptr), _td_locate_field ((ta), (ta)->ta_field_##type##_##field, \ +++ SYM_##type##_FIELD_##field, \ +++ (psaddr_t) 0 + (idx), &(var))) +++ +++extern td_err_e _td_locate_field (td_thragent_t *ta, +++ db_desc_t desc, int descriptor_name, +++ psaddr_t idx, +++ psaddr_t *address) attribute_hidden; +++ +++ +++/* Like DB_GET_FIELD, but PTR is a local pointer to a structure that +++ has already been copied in from the inferior. */ +++#define DB_GET_FIELD_LOCAL(var, ta, ptr, type, field, idx) \ +++ _td_fetch_value_local ((ta), (ta)->ta_field_##type##_##field, \ +++ SYM_##type##_FIELD_##field, \ +++ (psaddr_t) 0 + (idx), (ptr), &(var)) +++ +++/* Store in psaddr_t VAR the value of variable NAME[IDX] in the inferior. +++ A target value smaller than psaddr_t is zero-extended. */ +++#define DB_GET_VALUE(var, ta, name, idx) \ +++ (((ta)->ta_addr_##name == 0 \ +++ && td_lookup ((ta)->ph, SYM_##name, &(ta)->ta_addr_##name) != PS_OK) \ +++ ? TD_ERR \ +++ : _td_fetch_value ((ta), (ta)->ta_var_##name, SYM_DESC_##name, \ +++ (psaddr_t) 0 + (idx), (ta)->ta_addr_##name, &(var))) +++ +++/* Helper functions for those. */ +++extern td_err_e _td_fetch_value (td_thragent_t *ta, +++ db_desc_t field, int descriptor_name, +++ psaddr_t idx, psaddr_t address, +++ psaddr_t *result) attribute_hidden; +++extern td_err_e _td_fetch_value_local (td_thragent_t *ta, +++ db_desc_t field, +++ int descriptor_name, +++ psaddr_t idx, void *address, +++ psaddr_t *result) attribute_hidden; +++ +++/* Store psaddr_t VALUE in ((TYPE) PTR)->FIELD[IDX] in the inferior. +++ A target field smaller than psaddr_t is zero-extended. */ +++#define DB_PUT_FIELD(ta, ptr, type, field, idx, value) \ +++ _td_store_value ((ta), (ta)->ta_field_##type##_##field, \ +++ SYM_##type##_FIELD_##field, \ +++ (psaddr_t) 0 + (idx), (ptr), (value)) +++ +++#define DB_PUT_FIELD_LOCAL(ta, ptr, type, field, idx, value) \ +++ _td_store_value_local ((ta), (ta)->ta_field_##type##_##field, \ +++ SYM_##type##_FIELD_##field, \ +++ (psaddr_t) 0 + (idx), (ptr), (value)) +++ +++/* Store psaddr_t VALUE in variable NAME[IDX] in the inferior. +++ A target field smaller than psaddr_t is zero-extended. */ +++#define DB_PUT_VALUE(ta, name, idx, value) \ +++ (((ta)->ta_addr_##name == 0 \ +++ && td_lookup ((ta)->ph, SYM_##name, &(ta)->ta_addr_##name) != PS_OK) \ +++ ? TD_ERR \ +++ : _td_store_value ((ta), (ta)->ta_var_##name, SYM_DESC_##name, \ +++ (psaddr_t) 0 + (idx), (ta)->ta_addr_##name, (value))) +++ +++/* Helper functions for those. */ +++extern td_err_e _td_store_value (td_thragent_t *ta, +++ db_desc_t field, int descriptor_name, +++ psaddr_t idx, psaddr_t address, +++ psaddr_t value) attribute_hidden; +++extern td_err_e _td_store_value_local (td_thragent_t *ta, +++ db_desc_t field, int descriptor_name, +++ psaddr_t idx, void *address, +++ psaddr_t value) attribute_hidden; +++ +++#define DB_GET_STRUCT(var, ta, ptr, type) \ +++ ({ td_err_e _err = TD_OK; \ +++ if ((ta)->ta_sizeof_##type == 0) \ +++ _err = _td_check_sizeof ((ta), &(ta)->ta_sizeof_##type, \ +++ SYM_SIZEOF_##type); \ +++ if (_err == TD_OK) \ +++ _err = ps_pdread ((ta)->ph, (ptr), \ +++ (var) = __alloca ((ta)->ta_sizeof_##type), \ +++ (ta)->ta_sizeof_##type) \ +++ == PS_OK ? TD_OK : TD_ERR; \ +++ else \ +++ (var) = NULL; \ +++ _err; \ +++ }) +++#define DB_PUT_STRUCT(ta, ptr, type, copy) \ +++ ({ assert ((ta)->ta_sizeof_##type != 0); \ +++ ps_pdwrite ((ta)->ph, (ptr), (copy), (ta)->ta_sizeof_##type) \ +++ == PS_OK ? TD_OK : TD_ERR; \ +++ }) +++ +++extern td_err_e _td_check_sizeof (td_thragent_t *ta, uint32_t *sizep, +++ int sizep_name) attribute_hidden; +++ +++extern td_err_e __td_ta_lookup_th_unique (const td_thragent_t *ta, +++ lwpid_t lwpid, td_thrhandle_t *th); +++ +++#endif /* thread_dbP.h */ diff --cc debian/patches/kfreebsd/local-getaddrinfo-freebsd-kernel.diff index 000000000,000000000..c69f55fa7 new file mode 100644 --- /dev/null +++ b/debian/patches/kfreebsd/local-getaddrinfo-freebsd-kernel.diff @@@ -1,0 -1,0 +1,25 @@@ ++--- a/sysdeps/posix/getaddrinfo.c +++++ b/sysdeps/posix/getaddrinfo.c ++@@ -2522,8 +2522,21 @@ ++ } ++ ++ socklen_t sl = sizeof (results[i].source_addr); +++ const struct sockaddr *sa = q->ai_addr; +++#ifdef __FreeBSD_kernel__ +++ struct sockaddr_in6 sa_in6; +++ /* The FreeBSD kernel doesn't allow connections on port 0. Use +++ port 1 instead, as on the FreeBSD libc. */ +++ if (((struct sockaddr_in *)sa)->sin_port == htons(0)) +++ { +++ sa = (struct sockaddr *)&sa_in6; +++ memcpy(&sa_in6, q->ai_addr, q->ai_family == AF_INET6 ? +++ sizeof(struct sockaddr_in6) : sizeof(struct sockaddr_in)); +++ sa_in6.sin6_port = htons(1); +++ } +++#endif ++ if (fd != -1 ++- && __connect (fd, q->ai_addr, q->ai_addrlen) == 0 +++ && __connect (fd, sa, q->ai_addrlen) == 0 ++ && __getsockname (fd, ++ (struct sockaddr *) &results[i].source_addr, ++ &sl) == 0) diff --cc debian/patches/kfreebsd/local-grantpt.diff index 000000000,000000000..72aa74240 new file mode 100644 --- /dev/null +++ b/debian/patches/kfreebsd/local-grantpt.diff @@@ -1,0 -1,0 +1,21 @@@ ++--- ++ sysdeps/unix/grantpt.c | 6 +++++- ++ 1 file changed, 5 insertions(+), 1 deletion(-) ++ ++--- a/sysdeps/unix/grantpt.c +++++ b/sysdeps/unix/grantpt.c ++@@ -201,9 +201,13 @@ ++ else ++ { ++ int w; ++- +++retry: ++ if (__waitpid (pid, &w, 0) == -1) +++ { +++ if (errno == EINTR) +++ goto retry; ++ goto cleanup; +++ }; ++ if (!WIFEXITED (w)) ++ __set_errno (ENOEXEC); ++ else diff --cc debian/patches/kfreebsd/local-initgroups-order.diff index 000000000,000000000..722dc14f1 new file mode 100644 --- /dev/null +++ b/debian/patches/kfreebsd/local-initgroups-order.diff @@@ -1,0 -1,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: diff --cc debian/patches/kfreebsd/local-memusage_no_mremap.diff index 000000000,000000000..bd93869dd new file mode 100644 --- /dev/null +++ b/debian/patches/kfreebsd/local-memusage_no_mremap.diff @@@ -1,0 -1,0 +1,23 @@@ ++--- ++ malloc/memusage.c | 3 +++ ++ 1 file changed, 3 insertions(+) ++ ++--- a/malloc/memusage.c +++++ b/malloc/memusage.c ++@@ -674,6 +674,8 @@ ++ return result; ++ } ++ +++#include <_G_config.h> +++#ifdef _G_HAVE_MREMAP ++ ++ /* `mremap' replacement. We do not have to keep track of the size since ++ `munmap' will get it as a parameter. */ ++@@ -739,6 +741,7 @@ ++ /* Return the pointer to the user buffer. */ ++ return result; ++ } +++#endif ++ ++ ++ /* `munmap' replacement. */ diff --cc debian/patches/kfreebsd/local-no-execfn.diff index 000000000,000000000..bd0c46469 new file mode 100644 --- /dev/null +++ b/debian/patches/kfreebsd/local-no-execfn.diff @@@ -1,0 -1,0 +1,17 @@@ ++ ++AT_EXECFN is Linux specific ++ ++--- a/elf/rtld.c +++++ b/elf/rtld.c ++@@ -1119,9 +1119,11 @@ ++ case AT_ENTRY: ++ av->a_un.a_val = *user_entry; ++ break; +++# ifdef AT_EXECFN ++ case AT_EXECFN: ++ av->a_un.a_val = (uintptr_t) _dl_argv[0]; ++ break; +++# endif ++ } ++ #endif ++ } diff --cc debian/patches/kfreebsd/local-scripts.diff index 000000000,000000000..c00eda585 new file mode 100644 --- /dev/null +++ b/debian/patches/kfreebsd/local-scripts.diff @@@ -1,0 -1,0 +1,57 @@@ ++--- ++ abi-tags | 2 +- ++ configure | 4 +++- ++ configure.ac | 4 +++- ++ 3 files changed, 7 insertions(+), 3 deletions(-) ++ ++--- a/abi-tags +++++ b/abi-tags ++@@ -22,7 +22,7 @@ ++ ++ .*-sun-solaris2.* 2 2.0.0 # just an arbitrary value ++ ++-.*-.*-freebsd.*-gnu.* 3 4.0.0 # earliest compatible kernel version +++.*-.*-kfreebsd.* 3 5.4.0 # earliest compatible kernel version ++ ++ .*-.*-knetbsd.*-gnu.* 4 1.6.0 # earliest compatible kernel version ++ ++--- a/configure +++++ b/configure ++@@ -3869,7 +3869,7 @@ ++ ### ++ if test -z "$enable_hacker_mode" && test x"$libc_config_ok" != xyes; then ++ case "$machine-$host_os" in ++- *-linux* | *-gnu*) +++ *-linux* | *-gnu* | *-kfreebsd*) ++ ;; ++ *) ++ as_fn_error $? " ++@@ -3946,6 +3946,8 @@ ++ base_os=mach/hurd ;; ++ linux*) ++ base_os=unix/sysv ;; +++k*bsd*) +++ base_os=unix/bsd/bsd4.4 ;; ++ esac ++ ++ # For sunos4.1.1, try sunos4.1.1, then sunos4.1, then sunos4, then sunos. ++--- a/configure.ac +++++ b/configure.ac ++@@ -597,7 +597,7 @@ ++ ### ++ if test -z "$enable_hacker_mode" && test x"$libc_config_ok" != xyes; then ++ case "$machine-$host_os" in ++- *-linux* | *-gnu*) +++ *-linux* | *-gnu* | *-kfreebsd*) ++ ;; ++ *) ++ AC_MSG_ERROR([ ++@@ -669,6 +669,8 @@ ++ base_os=mach/hurd ;; ++ linux*) ++ base_os=unix/sysv ;; +++k*bsd*) +++ base_os=unix/bsd/bsd4.4 ;; ++ esac ++ ++ # For sunos4.1.1, try sunos4.1.1, then sunos4.1, then sunos4, then sunos. diff --cc debian/patches/kfreebsd/local-sys_queue_h.diff index 000000000,000000000..1c2771eb5 new file mode 100644 --- /dev/null +++ b/debian/patches/kfreebsd/local-sys_queue_h.diff @@@ -1,0 -1,0 +1,90 @@@ ++--- ++ misc/sys/queue.h | 37 +++++++++++++++++++++++++++++++++++++ ++ 1 file changed, 37 insertions(+) ++ ++--- a/misc/sys/queue.h +++++ b/misc/sys/queue.h ++@@ -32,6 +32,8 @@ ++ #ifndef _SYS_QUEUE_H_ ++ #define _SYS_QUEUE_H_ ++ +++#include +++ ++ /* ++ * This file defines five types of data structures: singly-linked lists, ++ * lists, simple queues, tail queues, and circular queues. ++@@ -136,6 +138,11 @@ ++ (var); \ ++ (var) = ((var)->field.le_next)) ++ +++#define LIST_FOREACH_SAFE(var, head, field, tvar) \ +++ for ((var) = ((head)->lh_first); \ +++ (var) && ((tvar) = ((var)->field.le_next), 1); \ +++ (var) = (tvar)) +++ ++ /* ++ * List access methods. ++ */ ++@@ -197,6 +204,16 @@ ++ #define SLIST_FOREACH(var, head, field) \ ++ for((var) = (head)->slh_first; (var); (var) = (var)->field.sle_next) ++ +++#define SLIST_FOREACH_SAFE(var, head, field, tvar) \ +++ for ((var) = SLIST_FIRST((head)); \ +++ (var) && ((tvar) = SLIST_NEXT((var), field), 1); \ +++ (var) = (tvar)) +++ +++#define SLIST_FOREACH_PREVPTR(var, varp, head, field) \ +++ for ((varp) = &SLIST_FIRST((head)); \ +++ ((var) = *(varp)) != NULL; \ +++ (varp) = &SLIST_NEXT((var), field)) +++ ++ /* ++ * Singly-linked List access methods. ++ */ ++@@ -253,6 +270,11 @@ ++ (head)->stqh_last = &(head)->stqh_first; \ ++ } while (/*CONSTCOND*/0) ++ +++#define STAILQ_REMOVE_HEAD_UNTIL(head, elm, field) do { \ +++ if (((head)->stqh_first = ((elm)->field.stqe_next)) == NULL) \ +++ (head)->stqh_last = &((head)->stqh_first); \ +++} while (/*CONSTCOND*/0) +++ ++ #define STAILQ_REMOVE(head, elm, type, field) do { \ ++ if ((head)->stqh_first == (elm)) { \ ++ STAILQ_REMOVE_HEAD((head), field); \ ++@@ -271,6 +293,11 @@ ++ (var); \ ++ (var) = ((var)->field.stqe_next)) ++ +++#define STAILQ_FOREACH_SAFE(var, head, field, tvar) \ +++ for ((var) = ((head)->stqh_first); \ +++ (var) && ((tvar) = ((var)->field.stqe_next), 1); \ +++ (var) = (tvar)) +++ ++ #define STAILQ_CONCAT(head1, head2) do { \ ++ if (!STAILQ_EMPTY((head2))) { \ ++ *(head1)->stqh_last = (head2)->stqh_first; \ ++@@ -437,11 +464,21 @@ ++ (var); \ ++ (var) = ((var)->field.tqe_next)) ++ +++#define TAILQ_FOREACH_SAFE(var, head, field, tvar) \ +++ for ((var) = ((head)->tqh_first); \ +++ (var) && ((tvar) = ((var)->field.tqe_next), 1); \ +++ (var) = (tvar)) +++ ++ #define TAILQ_FOREACH_REVERSE(var, head, headname, field) \ ++ for ((var) = (*(((struct headname *)((head)->tqh_last))->tqh_last)); \ ++ (var); \ ++ (var) = (*(((struct headname *)((var)->field.tqe_prev))->tqh_last))) ++ +++#define TAILQ_FOREACH_REVERSE_SAFE(var, head, headname, field, tvar) \ +++ for ((var) = (*(((struct headname *)((head)->tqh_last))->tqh_last)); \ +++ (var) && ((tvar) = (*(((struct headname *)((elm)->field.tqe_prev))->tqh_last)), 1); \ +++ (var) = (tvar)) +++ ++ #define TAILQ_CONCAT(head1, head2, field) do { \ ++ if (!TAILQ_EMPTY(head2)) { \ ++ *(head1)->tqh_last = (head2)->tqh_first; \ diff --cc debian/patches/kfreebsd/local-sysdeps.diff index 000000000,000000000..5512259a2 new file mode 100644 --- /dev/null +++ b/debian/patches/kfreebsd/local-sysdeps.diff @@@ -1,0 -1,0 +1,37641 @@@ ++--- /dev/null +++++ b/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/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/sysdeps/unix/bsd/bsd4.4/kfreebsd/Makefile ++@@ -0,0 +1,138 @@ +++# Use bash, not /bin/sh, for executing scripts, because the native +++# FreeBSD /bin/sh does not interpret the IFS="" 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 \ +++ bits/os-unistd.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 . +++sysdep_routines += errno-loc +++endif +++ +++ifeq ($(subdir),assert) +++CFLAGS-assert.c += -DFATAL_PREPARE_INCLUDE='' +++CFLAGS-assert-perr.c += -DFATAL_PREPARE_INCLUDE='' +++endif +++ +++ifeq ($(subdir),io) +++# For . +++sysdep_routines += sys_access sys_faccessat sys_getcwd +++# For . +++sysdep_routines += sys_open sys_openat open_2 +++# For . +++sysdep_routines += sys_fstat sys_fstatat sys_lstat sys_mkfifoat sys_mknod sys_mknodat sys_nfstat sys_nlstat sys_nstat sys_stat lchflags +++# For . +++sysdep_routines += fstatfs64 statfs64 sys_fstatfs sys_statfs +++# For . +++sysdep_routines += sys_futimesat +++# Other. +++sysdep_routines += lchmod +++endif +++ +++ifeq ($(subdir),dirent) +++# For . +++sysdep_routines += sys_getdents sys_getdirentries getdirentries getdirentries64 +++endif +++ +++ifeq ($(subdir),misc) +++# For . +++sysdep_routines += kenv +++# For . +++sysdep_routines += clone start_thread +++# For . +++sysdep_routines += getosreldate +++# For . +++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 . +++sysdep_routines += extattrctl extattr_delete_file extattr_get_file extattr_set_file +++# For . +++sysdep_routines += jail jail_attach jail_remove jail_get jail_set +++# For . +++sysdep_routines += ktrace utrace +++# For . +++sysdep_routines += kldfind kldfirstmod kldload kldnext kldstat kldsym kldunload kldunloadf +++# For . +++sysdep_routines += minherit sys_mmap sys_munmap +++# For . +++sysdep_routines += fhopen sys_fhstat sys_fhstatfs fhstat fhstat64 fhstatfs fhstatfs64 getfh getfsstat getfsstat64 sys_getfsstat getmntinfo getmntinfo64 mount nmount unmount +++# For . +++sysdep_routines += rfork +++# For . +++sysdep_routines += rtprio +++# For . +++sysdep_routines += bsd_sendfile +++# For . +++sysdep_routines += devname +++# For . +++sysdep_routines += sysctl sysctlbyname sysctlnametomib +++# For . +++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_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_semctl sys_shmctl sys_msgctl +++endif +++ +++ifeq ($(subdir),posix) +++# For . +++sysdep_routines += sys_getlogin sys_setlogin sys_read sys_write +++# for +++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 . +++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 +++# than the old non-GNU C library. +++inhibit-glue = yes +++ +++# Special ELF hacks. +++ifeq ($(subdir),elf) +++sysdep-rtld-routines += dl-brk dl-sbrk dl-getcwd dl-openat64 +++sysdep_routines += sys_umtx +++endif +++ +++ifeq ($(subdir),sunrpc) +++sysdep_headers += nfs/nfs.h +++endif +++ +++ifeq ($(subdir),rt) +++librt-routines += sys_shm_open +++endif ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/Versions ++@@ -0,0 +1,129 @@ +++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 . +++ __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_location; +++ +++ # see . +++ __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_2.18 { +++ msgctl; +++ semctl; +++ shmctl; +++ waitid; +++ #errlist-compat 97 +++ _sys_errlist; sys_errlist; _sys_nerr; sys_nerr; +++ } +++ GLIBC_2.21 { +++ __statfs; +++ } +++ 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; +++ # misc fixes for FreeBSD: +++ __syscall_connect; __syscall_sendto; +++ __syscall_cpuset_getaffinity ; __syscall_cpuset_setaffinity; +++ # global variable used in brk() +++ _end; +++ } +++} ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/_exit.S ++@@ -0,0 +1,26 @@ +++/* Copyright (C) 1991,92,97,99,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 +++ +++PSEUDO (_exit, exit, 1) +++ /* Shouldn't get here. */ +++PSEUDO_END(_exit) +++libc_hidden_def (_exit) +++rtld_hidden_def (_exit) +++weak_alias (_exit, _Exit) ++--- /dev/null +++++ b/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/sysdeps/unix/bsd/bsd4.4/kfreebsd/access.c ++@@ -0,0 +1,82 @@ +++/* 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 +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++/* +++ 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; +++} +++ +++ +++/* Test for access to FILE by our real user and group IDs without setting +++ errno. */ +++int +++__access_noerrno (const char *file, int type) +++{ +++ int ret; +++ int saved_errno = errno; +++ +++ ret = __access (file, type); +++ +++ __set_errno(saved_errno); +++ return ret; +++} +++ +++weak_alias (__access, access) ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/aio_sigqueue.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 +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++ +++#include +++#include +++ +++#include +++ +++int +++internal_function +++__aio_sigqueue (int sig, const union sigval val, pid_t caller_pid) +++{ +++#if !IS_IN (libc) +++ return sigqueue(caller_pid, sig, val); +++#else +++ return __sigqueue(caller_pid, sig, val); +++#endif +++} ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/bind.c ++@@ -0,0 +1,56 @@ +++/* Copyright (C) 2005 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Aurelien Jarno , 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 +++#include +++ +++/* 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); +++libc_hidden_proto (__libc_sa_len) +++ +++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; +++ +++ new_addrlen = __libc_sa_len ((addr.__sockaddr__)->sa_family); +++ +++ /* 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/sysdeps/unix/bsd/bsd4.4/kfreebsd/bits/auxv.h ++@@ -0,0 +1,44 @@ +++/* Copyright (C) 1995-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 +++ . */ +++ +++/* Legal values for a_type (entry type). */ +++ +++#define AT_NULL 0 /* End of vector */ +++#define AT_IGNORE 1 /* Entry should be ignored */ +++#define AT_EXECFD 2 /* File descriptor of program */ +++#define AT_PHDR 3 /* Program headers for program */ +++#define AT_PHENT 4 /* Size of program header entry */ +++#define AT_PHNUM 5 /* Number of program headers */ +++#define AT_PAGESZ 6 /* System page size */ +++#define AT_BASE 7 /* Base address of interpreter */ +++#define AT_FLAGS 8 /* Flags */ +++#define AT_ENTRY 9 /* Entry point of program */ +++#define AT_NOTELF 10 /* Program is not ELF */ +++#define AT_UID 11 /* Real uid */ +++#define AT_EUID 12 /* Effective uid */ +++#define AT_GID 13 /* Real gid */ +++#define AT_EGID 14 /* Effective gid */ +++#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_TIMEKEEP 22 /* Pointer to timehands. */ +++#define AT_STACKPROT 23 /* Initial stack protection. */ +++ ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/bits/dirent.h ++@@ -0,0 +1,55 @@ +++/* 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 directly; include 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 +++ +++/* Inform libc code that these two types are effectively identical. */ +++# define _DIRENT_MATCHES_DIRENT64 1 ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/bits/errno.h ++@@ -0,0 +1,195 @@ +++/*- +++ * 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 ECAPMODE 94 /* Not permitted in capability mode */ +++#define ENOTRECOVERABLE 95 /* State not recoverable */ +++#define EOWNERDEAD 96 /* Previous owner died */ +++ +++#define ELAST 96 /* 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/sysdeps/unix/bsd/bsd4.4/kfreebsd/bits/fcntl.h ++@@ -0,0 +1,233 @@ +++/* O_*, F_*, FD_* bit values for FreeBSD. +++ Copyright (C) 1991-1992, 1997-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, write to the Free +++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +++ 02111-1307 USA. */ +++ +++#ifndef _FCNTL_H +++# error "Never use directly; include instead." +++#endif +++ +++#include +++#include +++#ifdef __USE_GNU +++# include +++#endif +++ +++/* +++ * File status flags: these are used by open(2), fcntl(2). +++ * They are also used (indirectly) in the kernel file structure f_flags, +++ * which is a superset of the open/fcntl flags. Open flags and f_flags +++ * are inter-convertible using OFLAGS(fflags) and FFLAGS(oflags). +++ * Open/fcntl flags begin with O_; kernel-internal flags begin with F. +++ */ +++/* open-only flags */ +++#define O_RDONLY 0x0000 /* open for reading only */ +++#define O_WRONLY 0x0001 /* open for writing only */ +++#define O_RDWR 0x0002 /* open for reading and writing */ +++#define O_ACCMODE 0x0003 /* mask for above modes */ +++ +++/* +++ * Kernel encoding of open mode; separate read and write bits that are +++ * independently testable: 1 greater than the above. +++ */ +++ +++#define O_NONBLOCK 0x0004 /* no delay */ +++#define O_NDELAY O_NONBLOCK /* compat */ +++#define O_APPEND 0x0008 /* set append mode */ +++ +++#if defined __USE_MISC +++#define O_SHLOCK 0x0010 /* open with shared file lock */ +++#define O_EXLOCK 0x0020 /* open with exclusive file lock */ +++#endif +++ +++#define O_ASYNC 0x0040 /* signal pgrp when data ready */ +++#define O_FSYNC 0x0080 /* synchronous writes */ +++#define O_SYNC O_FSYNC /* POSIX synonym for O_FSYNC */ +++ +++#if defined (__USE_XOPEN2K8) || defined (__USE_MISC) +++#define O_NOFOLLOW 0x0100 /* don't follow symlinks */ +++#endif +++ +++#define O_CREAT 0x0200 /* create if nonexistent */ +++#define O_TRUNC 0x0400 /* truncate to zero length */ +++#define O_EXCL 0x0800 /* error if already exists */ +++/* Defined by POSIX 1003.1; BSD default, but must be distinct from O_RDONLY. */ +++#define O_NOCTTY 0x8000 /* don't assign controlling terminal */ +++ +++#if defined __USE_MISC +++/* Attempt to bypass buffer cache */ +++#define O_DIRECT 0x00010000 +++enum { O_NOATIME = 0}; /* Do not set atime. */ +++#endif +++ +++/* Defined by POSIX Extended API Set Part 2 */ +++#if defined (__USE_XOPEN2K8) || defined (__USE_MISC) +++#define O_DIRECTORY 0x00020000 /* Fail if not directory */ +++#define O_EXEC 0x00040000 /* Open for execute only */ +++#endif +++ +++#if defined (__USE_XOPEN2K8) || defined (__USE_MISC) +++/* Defined by POSIX 1003.1-2008; BSD default, but reserve for future use. */ +++#define O_TTY_INIT 0x00080000 /* Restore default termios attributes */ +++#define O_CLOEXEC 0x00100000 +++#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 +++ +++/* Since 'off_t' is 64-bit, O_LARGEFILE is a no-op. */ +++#define O_LARGEFILE 0 +++ +++#ifdef __USE_MISC +++/* 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_MISC +++/* +++ * Set by shm_open(3) to get automatic MAP_ASYNC behavior +++ * for POSIX shared memory objects (which are otherwise +++ * implemented as plain files). +++ */ +++#define FRDAHEAD O_CREAT +++#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 11 /* Get record locking info. */ +++#define F_SETLK 12 /* Set record locking info (non-blocking). */ +++#define F_SETLKW 13 /* Set record locking info (blocking). */ +++/* Not necessary, we always have 64-bit offsets. */ +++#define F_GETLK64 11 /* Get record locking info. */ +++#define F_SETLK64 12 /* Set record locking info (non-blocking). */ +++#define F_SETLKW64 13 /* Set record locking info (blocking). */ +++ +++#ifdef __USE_XOPEN2K8 +++#define F_DUPFD_CLOEXEC 17 /* Like F_DUPFD, but FD_CLOEXEC is set */ +++#endif +++#if defined __USE_MISC +++#define F_DUP2FD_CLOEXEC 18 /* Like F_DUP2FD, but FD_CLOEXEC is set */ +++#endif +++ +++#if defined __USE_UNIX98 || defined __USE_XOPEN2K8 +++# define F_GETOWN 5 /* Get owner of socket (receiver of SIGIO). */ +++# define F_SETOWN 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 */ +++ +++/* record locking flags (F_GETLK, F_SETLK, F_SETLKW) */ +++#define F_RDLCK 1 /* shared or read lock */ +++#define F_UNLCK 2 /* unlock */ +++#define F_WRLCK 3 /* exclusive or write lock */ +++#if defined __USE_MISC +++#define F_UNLCKSYS 4 /* purge locks for a given system ID */ +++#define F_CANCEL 5 /* cancel an async lock request */ +++#endif +++ +++#ifdef __USE_MISC +++/* 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_MISC +++# 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. */ +++ +++ +++#ifdef __USE_XOPEN2K +++/* +++ * Advice to posix_fadvise +++ */ +++#define POSIX_FADV_NORMAL 0 /* no special treatment */ +++#define POSIX_FADV_RANDOM 1 /* expect random page references */ +++#define POSIX_FADV_SEQUENTIAL 2 /* expect sequential page references */ +++#define POSIX_FADV_WILLNEED 3 /* will need these pages */ +++#define POSIX_FADV_DONTNEED 4 /* dont need these pages */ +++#define POSIX_FADV_NOREUSE 5 /* access data only once */ +++#endif ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/bits/in.h ++@@ -0,0 +1,310 @@ +++/* 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 directly; include instead." +++#endif +++ +++/* This is the FreeBSD version, do not assume a linux-based kernel. */ +++#define __USE_KERNEL_IPV6_DEFS 0 +++ +++/* 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/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 directly; include 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 , +++ 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/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 +++ +++#include +++ +++/* +++ * @(#)ioctl.h 8.6 (Berkeley) 3/28/94 +++ */ +++ +++#define TIOCGSIZE TIOCGWINSZ +++#define TIOCSSIZE TIOCSWINSZ +++ +++#include +++ +++#include +++ +++#endif /* !_IOCTLS_H_ */ ++--- /dev/null +++++ b/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 directly; include instead." +++#endif +++ +++#include +++ +++/* 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_MISC +++/* 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 +++{ +++ __uid_t cuid; /* creator user id */ +++ __gid_t cgid; /* creator group id */ +++ __uid_t uid; /* user id */ +++ __gid_t gid; /* group id */ +++ __mode_t mode; /* r/w permission */ +++ __uint16_t __seq; /* sequence # (to generate unique ipcid) */ +++ __key_t __key; /* user specified msg/sem/shm key */ +++}; ++--- /dev/null +++++ b/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 directly; include instead." +++#endif +++ +++#include +++#include +++ +++/* 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_MISC +++# 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_MISC +++# 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_MISC +++#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_MISC +++# 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_MISC +++# 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_MISC +++ +++__BEGIN_DECLS +++ +++extern int minherit (void *__addr, size_t __len, int __inherit); +++ +++__END_DECLS +++ +++#endif /* Use BSD */ ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/bits/msq.h ++@@ -0,0 +1,65 @@ +++/* 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 directly; include instead." +++#endif +++ +++#include +++ +++/* 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; /* msg queue permission bits */ +++ void *__msg_first; /* first message in the queue */ +++ void *__msg_last; /* last message in the queue */ +++ msglen_t __msg_cbytes; /* number of bytes in use on the queue */ +++ msgqnum_t msg_qnum; /* number of msgs in the queue */ +++ msglen_t msg_qbytes; /* max # of bytes on the 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() */ +++ __time_t msg_rtime; /* time of last msgrcv() */ +++ __time_t msg_ctime; /* time of last msgctl() */ +++}; +++ +++#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/sysdeps/unix/bsd/bsd4.4/kfreebsd/bits/os-unistd.h ++@@ -0,0 +1,8 @@ +++ +++__BEGIN_DECLS +++ +++/* whether is current process tainted by uid or gid changes */ +++extern int issetugid(void) __THROW; +++ +++__END_DECLS +++ ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/bits/param.h ++@@ -0,0 +1,189 @@ +++/* 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 +++# error "Never use directly; include instead." +++#endif +++ +++#include +++#include +++ +++/* +++ * __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: <0 if release branch, otherwise 1>xx +++ */ +++#include +++ +++/* Some inet code expects that this file defines the 'u_int32_t' type. */ +++#include +++ +++/* FreeBSD code expects that this file implicitly defines SIG* macros. */ +++#include +++ +++/* +++ * 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 ) +++ * MAXLOGNAME should be == UT_NAMESIZE+1 (see ) +++ */ +++ +++#define MAXCOMLEN 19 /* max command name remembered */ +++#define MAXINTERP 32 /* max interpreter file name length */ +++#define MAXLOGNAME 33 /* max login name length (incl. NUL) */ +++#define MAXUPRC CHILD_MAX /* max simultaneous processes */ +++#define NGROUPS (NGROUPS_MAX+1) /* max number groups */ +++#define MAXHOSTNAMELEN 256 /* max hostname size */ +++#define SPECNAMELEN 63 /* max length of devicename */ +++#define TTY_NAME_MAX SPECNAMELEN +++ +++/* BSD names for some values. */ +++ +++#define MAXSYMLINKS 32 +++#define CANBSIZ MAX_CANON +++ +++/* Machine type dependent parameters. */ +++#include +++ +++#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) +++#endif +++ +++/* +++ * 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 +++ +++/* +++ * 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 +++ +++#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<> (PAGE_SHIFT - DEV_BSHIFT)) +++ +++#define ctodb(db) /* calculates pages to devblks */ \ +++ ((db) << (PAGE_SHIFT - DEV_BSHIFT)) ++--- /dev/null +++++ b/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 directly; include 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. */ +++ +++#if defined __USE_XOPEN || defined __USE_XOPEN2K8 +++/* 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_MISC +++/* 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_MISC +++ +++# 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/sysdeps/unix/bsd/bsd4.4/kfreebsd/bits/posix_opt.h ++@@ -0,0 +1,92 @@ +++/* 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 instead. +++ */ +++ +++#ifndef _BITS_POSIX_OPT_H +++#define _BITS_POSIX_OPT_H 1 +++ +++#include +++ +++/* 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/sysdeps/unix/bsd/bsd4.4/kfreebsd/bits/resource.h ++@@ -0,0 +1,219 @@ +++/* 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 directly; include instead." +++#endif +++ +++#include +++#include +++ +++/* 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_VMEM = RLIMIT_AS, +++ +++ /* Pseudo-terminals. */ +++ RLIMIT_NPTS = 11, +++#define RLIMIT_NPTS RLIMIT_NPTS +++ +++ /* Swap used. */ +++ RLIMIT_SWAP = 12, +++#define RLIMIT_SWAP RLIMIT_SWAP +++ +++ __RLIMIT_NLIMITS = 13, +++ __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 +++}; +++ +++#include +++ +++/* 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/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 directly; use 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/sysdeps/unix/bsd/bsd4.4/kfreebsd/bits/sem.h ++@@ -0,0 +1,93 @@ +++/* 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 directly; use instead." +++#endif +++ +++#include +++ +++/* 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_MISC +++# 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; /* pointer to first semaphore in set */ +++ unsigned short sem_nsems; /* number of sems in set */ +++ __time_t sem_otime; /* last operation time */ +++ __time_t sem_ctime; /* last change time */ +++ /* Times measured in secs since */ +++ /* 00:00:00 GMT, Jan. 1, 1970 */ +++}; +++/* 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/sysdeps/unix/bsd/bsd4.4/kfreebsd/bits/shm.h ++@@ -0,0 +1,89 @@ +++/* 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 directly; use instead." +++#endif +++ +++#include +++ +++/* Permission flag for shmget. */ +++#ifdef __USE_MISC +++# 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 int shmatt_t; +++ +++/* Data structure describing a set of semaphores. */ +++struct shmid_ds +++ { +++ struct ipc_perm shm_perm; /* operation permission struct */ +++ size_t 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() */ +++ }; +++ +++#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/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 directly; use 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/sysdeps/unix/bsd/bsd4.4/kfreebsd/bits/siginfo.h ++@@ -0,0 +1,282 @@ +++/* 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 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 +++ +++#include /* __pid_t, __uid_t */ +++ +++typedef struct siginfo +++ { +++ int si_signo; /* Signal number. */ +++ int si_errno; /* If non-zero, an errno value associated with +++ this signal, as defined in . */ +++ int si_code; /* Signal code. */ +++ __pid_t si_pid; /* Sending process ID. */ +++ __uid_t 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. */ +++ union +++ { +++ struct +++ { +++ int _trapno; /* machine specific trap code */ +++ } _fault; +++ +++ /* POSIX.1b timers. */ +++ struct +++ { +++ int _timerid; +++ int _overrun; +++ } _timer; +++ +++ struct +++ { +++ int _mqd; +++ } _mesgq; +++ +++ /* SIGPOLL. */ +++ struct +++ { +++ long _band; /* band event for SIGPOLL. */ +++ } _poll; +++ +++ struct +++ { +++ long __spare1__; +++ int __spare2__[7]; +++ } __spare__; +++ } _reason; +++ } siginfo_t; +++ +++ +++/* X/Open requires some more fields with fixed names. */ +++# define si_int si_value.sival_int +++# define si_ptr si_value.sival_ptr +++# define si_trapno _reason._fault._trapno +++# define si_timerid _reason._timer._timerid +++# define si_overrun _reason._timer._overrun +++# define si_mqd _reason._mesgq._mqd +++# define si_band _reason._poll._band +++ +++ +++/* 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 /* __lwpid_t */ +++ +++/* Forward declaration. */ +++# ifndef __have_pthread_attr_t +++typedef union pthread_attr_t pthread_attr_t; +++# define __have_pthread_attr_t 1 +++# endif +++ +++/* 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. */ +++ pthread_attr_t *_attribute; /* Really pthread_attr_t. */ +++ } _sigev_thread; +++ } _sigev_un; +++ } sigevent_t; +++ +++#define sigev_notify_kqueue sigev_signo +++#define sigev_notify_function _sigev_un._sigev_thread._function +++#define sigev_notify_attributes _sigev_un._sigev_thread._attribute +++#define sigev_notify_thread_id _sigev_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/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 /* included. */ ++--- /dev/null +++++ b/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 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/sysdeps/unix/bsd/bsd4.4/kfreebsd/bits/socket.h ++@@ -0,0 +1,431 @@ +++/* 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 directly; use instead." +++#endif +++ +++#define __need_size_t +++#define __need_NULL +++#include +++ +++#include /* XXX Is this allowed? */ +++#include +++ +++/* 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 +++ +++ /* Flags to be ORed into the type parameter of socket and socketpair and +++ used for the flags parameter of paccept. */ +++ +++ SOCK_CLOEXEC = 0x10000000, /* Atomically set close-on-exec flag for the +++ new descriptor(s). */ +++#define SOCK_CLOEXEC SOCK_CLOEXEC +++ SOCK_NONBLOCK = 0x20000000 /* Atomically mark descriptor(s) as +++ non-blocking. */ +++#define SOCK_NONBLOCK SOCK_NONBLOCK +++}; +++ +++/* +++ * 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 +++ +++/* 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). */ +++#if ULONG_MAX > 0xffffffff +++# define __ss_aligntype __uint64_t +++#else +++# define __ss_aligntype __uint32_t +++#endif +++#define _SS_PADSIZE \ +++ (_SS_SIZE - __SOCKADDR_COMMON_SIZE - sizeof (__ss_aligntype)) +++ +++struct sockaddr_storage +++ { +++ __SOCKADDR_COMMON (ss_); /* Address family, etc. */ +++ char __ss_padding[_SS_PADSIZE]; +++ __ss_aligntype __ss_align; /* Force desired alignment. */ +++ }; +++ +++ +++/* 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 __glibc_c99_flexarr_available +++ __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 __glibc_c99_flexarr_available +++# 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 +++ SO_LABEL = 0x1009, +++#define SO_LABEL SO_LABEL +++ SO_PEERLABEL = 0x1010, +++#define SO_PEERLABEL SO_PEERLABEL +++ SO_LISTENQLIMIT = 0x1011, +++#define SO_LISTENQLIMIT SO_LISTENQLIMIT +++ SO_LISTENQLEN = 0x1012, +++#define SO_LISTENQLEN SO_LISTENQLEN +++ SO_LISTENINCQLEN = 0x1013, +++#define SO_LISTENINCQLEN SO_LISTENINCQLEN +++ SO_SETFIB = 0x1014, +++#define SO_SETFIB SO_SETFIB +++ SO_USER_COOKIE = 0x1015, +++#define SO_USER_COOKIE SO_USER_COOKIE +++ SO_PROTOCOL = 0x1016, +++#define SO_PROTOCOL SO_PROTOCOL +++ SO_PROTOTYPE = SO_PROTOCOL +++#define SO_PROTOTYPE SO_PROTOTYPE +++ }; +++ +++/* 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. */ +++ }; +++ +++/* Magic IPv4 addresses defined in FreeBSD version of , but not +++ included in Glibc version of the same header. */ +++#define INADDR_ALLRPTS_GROUP (uint32_t)0xe0000016 /* 224.0.0.22, IGMPv3 */ +++#define INADDR_CARP_GROUP (uint32_t)0xe0000012 /* 224.0.0.18 */ +++#define INADDR_PFSYNC_GROUP (uint32_t)0xe00000f0 /* 224.0.0.240 */ +++#define INADDR_ALLMDNS_GROUP (uint32_t)0xe00000fb /* 224.0.0.251 */ +++ +++#ifdef __USE_MISC +++ +++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/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 directly; use 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 +++ +++/* 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 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. */ +++ +++ __uint64_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 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. */ +++ +++ __uint64_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_MISC +++ +++/* 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_MISC */ +++ +++#endif /* bits/stat.h */ ++--- /dev/null +++++ b/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/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 directly; use instead." +++#endif +++ +++#include +++ +++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/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 directly; use instead." +++#endif +++ +++#include +++ +++#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/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 directly; use instead." +++#endif +++ +++/* sys_errlist and sys_nerr are deprecated. Use strerror instead. */ +++ +++#ifdef __USE_MISC +++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/sysdeps/unix/bsd/bsd4.4/kfreebsd/bits/syslog-path.h ++@@ -0,0 +1,31 @@ +++/* -- _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 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/sysdeps/unix/bsd/bsd4.4/kfreebsd/bits/sysmacros.h ++@@ -0,0 +1,60 @@ +++/* Definitions of macros to access `dev_t' values. FreeBSD version. +++ Copyright (C) 1996-2017 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 +++ . */ +++ +++#ifndef _BITS_SYSMACROS_H +++#define _BITS_SYSMACROS_H 1 +++ +++#ifndef _SYS_SYSMACROS_H +++# error "Never include directly; use instead." +++#endif +++ +++/* The FreeBSD version of dev_t in glibc is a 32-bit quantity, with 8-bit +++ major and 24-bit minor numbers. The encoding is mmmmMMmm, where M is a +++ hex digit of the major number and m is a hex digit of the minor number. */ +++ +++#define __SYSMACROS_DECLARE_MAJOR(DECL_TEMPL) \ +++ DECL_TEMPL(unsigned int, major, (__dev_t __dev)) +++ +++#define __SYSMACROS_DEFINE_MAJOR(DECL_TEMPL) \ +++ __SYSMACROS_DECLARE_MAJOR (DECL_TEMPL) \ +++ { \ +++ return ((__dev & (__dev_t) 0x0000ff00u) >> 8); \ +++ } +++ +++#define __SYSMACROS_DECLARE_MINOR(DECL_TEMPL) \ +++ DECL_TEMPL(unsigned int, minor, (__dev_t __dev)) +++ +++#define __SYSMACROS_DEFINE_MINOR(DECL_TEMPL) \ +++ __SYSMACROS_DECLARE_MINOR (DECL_TEMPL) \ +++ { \ +++ return (__dev & (__dev_t) 0xffff00ff); \ +++ } +++ +++#define __SYSMACROS_DECLARE_MAKEDEV(DECL_TEMPL) \ +++ DECL_TEMPL(__dev_t, makedev, (unsigned int __major, unsigned int __minor)) +++ +++#define __SYSMACROS_DEFINE_MAKEDEV(DECL_TEMPL) \ +++ __SYSMACROS_DECLARE_MAKEDEV (DECL_TEMPL) \ +++ { \ +++ __dev_t __dev; \ +++ __dev = (((__dev_t) (__major & 0x000000ffu)) << 8); \ +++ __dev |= (((__dev_t) (__minor & 0xffff00ffu)) << 0); \ +++ return __dev; \ +++ } +++ +++#endif /* bits/sysmacros.h */ ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/bits/termios.h ++@@ -0,0 +1,245 @@ +++/* 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 directly; use instead." +++#endif +++ +++/* These macros are also defined in some files (with +++ numerically identical values), but this serves to shut up cpp's +++ complaining. */ +++#ifdef __USE_MISC +++ +++# ifdef MDMBUF +++# undef MDMBUF +++# endif +++# ifdef FLUSHO +++# undef FLUSHO +++# endif +++# ifdef PENDIN +++# undef PENDIN +++# endif +++ +++#endif /* __USE_MISC */ +++ +++#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_MISC +++# define VERASE2 7 +++#endif +++#define VINTR 8 +++#define VQUIT 9 +++#define VSUSP 10 +++#ifdef __USE_MISC +++# define VDSUSP 11 +++#endif +++#define VSTART 12 +++#define VSTOP 13 +++#define VLNEXT 14 +++#define VDISCARD 15 +++#define VMIN 16 +++#define VTIME 17 +++#ifdef __USE_MISC +++# 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_MISC +++# 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_MISC +++# 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_MISC +++# 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_MISC +++# define ECHOKE (1 << 0) /* Visual erase for KILL. */ +++#endif +++#define ECHOE (1 << 1) /* Visual erase for ERASE. */ +++#define ECHOK (1 << 2) /* Echo NL after KILL. */ +++#define ECHO (1 << 3) /* Enable echo. */ +++#define ECHONL (1 << 4) /* Echo NL even if ECHO is off. */ +++#ifdef __USE_MISC +++# define ECHOPRT (1 << 5) /* Hardcopy visual erase. */ +++# define ECHOCTL (1 << 6) /* Echo control characters as ^X. */ +++#endif +++#define ISIG (1 << 7) /* Enable signals. */ +++#define ICANON (1 << 8) /* Do erase and kill processing. */ +++#ifdef __USE_MISC +++# define ALTWERASE (1 << 9) /* Alternate WERASE algorithm. */ +++#endif +++#define IEXTEN (1 << 10) /* Enable DISCARD and LNEXT. */ +++#ifdef __USE_MISC +++# define EXTPROC (1 << 11) /* External processing. */ +++#endif +++#define TOSTOP (1 << 22) /* Send SIGTTOU for background output. */ +++#ifdef __USE_MISC +++# 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. */ +++ +++ /* 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_MISC +++# define TCSASOFT 0x10 /* Flag: Don't alter hardware state. */ +++#endif +++ ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/bits/time.h ++@@ -0,0 +1,87 @@ +++/* System-dependent timing definitions. FreeBSD version. +++ Copyright (C) 1996-2017 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 +++ . */ +++ +++/* +++ * Never include this file directly; use instead. +++ */ +++ +++#ifndef _BITS_TIME_H +++#define _BITS_TIME_H 1 +++ +++#include +++ +++/* ISO/IEC 9899:1999 7.23.1: Components of time +++ The macro `CLOCKS_PER_SEC' is an expression with type `clock_t' that is +++ the number per second of the value returned by the `clock' function. */ +++/* CAE XSH, Issue 4, Version 2: +++ The value of CLOCKS_PER_SEC is required to be 1 million on all +++ XSI-conformant systems. */ +++#define CLOCKS_PER_SEC ((__clock_t) 1000000) +++ +++#if (!defined __STRICT_ANSI__ || defined __USE_POSIX) \ +++ && !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. */ +++extern long int __sysconf (int); +++# define CLK_TCK ((__clock_t) __sysconf (2)) /* 2 is _SC_CLK_TCK */ +++#endif +++ +++#ifdef __USE_POSIX199309 +++/* Identifier for system-wide realtime clock. */ +++# define CLOCK_REALTIME 0 +++/* Monotonic system-wide clock. */ +++# define CLOCK_MONOTONIC 4 +++/* These are BSD specific clocks. */ +++# ifdef __USE_MISC +++# 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 +++/* Thread-specific CPU-time clock. */ +++# define CLOCK_THREAD_CPUTIME_ID 14 +++/* High-resolution timer from the CPU. */ +++# define CLOCK_PROCESS_CPUTIME_ID 15 +++# ifdef __USE_MISC +++# define CPUCLOCK_WHICH_PID 0 +++# define CPUCLOCK_WHICH_TID 1 +++# 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 */ ++--- /dev/null +++++ b/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 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 directly; use instead." +++#endif +++ +++#ifndef _BITS_TYPESIZES_H +++#define _BITS_TYPESIZES_H 1 +++ +++/* See for the meaning of these macros. This file exists so +++ that 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 +++#define __FSWORD_T_TYPE __SWORD_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 +++#define __SNSECONDS_T_TYPE __SLONGWORD_TYPE +++#define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE +++#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE +++ +++/* Tell the libc code that off_t and off64_t are actually the same type +++ for all ABI purposes, even if possibly expressed as different base types +++ for C type-checking purposes. */ +++#define __OFF_T_MATCHES_OFF64_T 1 +++ +++/* Number of descriptors that can fit in an `fd_set'. */ +++#define __FD_SETSIZE 1024 +++ +++ +++#endif /* bits/typesizes.h */ ++--- /dev/null +++++ b/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 directly; use instead." +++#endif +++ +++#ifndef _BITS_UIO_H +++#define _BITS_UIO_H 1 +++ +++#include +++ +++ +++/* `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_MISC +++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/sysdeps/unix/bsd/bsd4.4/kfreebsd/bits/utsname.h ++@@ -0,0 +1,31 @@ +++/* 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 directly; use 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 +++ +++/* If nonzero, the size of of the `domainname` field in `struct utsname'. +++ This is zero to indicate that there should be no such field at all. */ +++#define _UTSNAME_DOMAIN_LENGTH 0 ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/bits/waitflags.h ++@@ -0,0 +1,82 @@ +++/* 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 directly; use 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 WEXITED 16 /* Wait for exited processes. */ +++#define WTRAPPED 32 /* Wait for a process to hit a trap or +++ a breakpoint. */ +++ +++#define __WCLONE 0x80000000 /* Wait for cloned process. */ +++#ifdef __USE_MISC +++# define WLINUXCLONE __WCLONE /* FreeBSD name for __WCLONE. */ +++#endif +++ +++ +++/* The following values are used by the `waitid' function. */ +++#if defined __USE_MISC || defined __USE_XOPEN || defined __USE_XOPEN2K8 +++# ifndef __ENUM_IDTYPE_T +++# define __ENUM_IDTYPE_T 1 +++ +++typedef enum +++{ +++ /* +++ * These names were mostly lifted from Solaris source code and +++ * still use Solaris style naming to avoid breaking any +++ * OpenSolaris code which has been ported to FreeBSD. There +++ * is no clear FreeBSD counterpart for all of the names, but +++ * some have a clear correspondence to FreeBSD entities. +++ * +++ * The numerical values are kept synchronized with the Solaris +++ * values. +++ */ +++ P_PID, /* A process identifier. */ +++ P_PPID, /* A parent process identifier. */ +++ P_PGID, /* A process group identifier. */ +++ P_SID, /* A session identifier. */ +++ P_CID, /* A scheduling class identifier. */ +++ P_UID, /* A user identifier. */ +++ P_GID, /* A group identifier. */ +++ P_ALL, /* All processes. */ +++ P_LWPID, /* An LWP identifier. */ +++ P_TASKID, /* A task identifier. */ +++ P_PROJID, /* A project identifier. */ +++ P_POOLID, /* A pool identifier. */ +++ P_JAILID, /* A zone identifier. */ +++ P_CTID, /* A (process) contract identifier. */ +++ P_CPUID, /* CPU identifier. */ +++ P_PSETID /* Processor set identifier. */ +++} idtype_t; /* The type of id_t we are using. */ +++ +++# if defined __USE_MISC +++# define P_ZONEID P_JAILID +++# endif +++# endif +++#endif ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/bits/waitstatus.h ++@@ -0,0 +1,102 @@ +++/* 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 directly; use 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 the child is stopped. */ +++#define __WIFSTOPPED(status) (((status) & 0x7f) == 0x7f) +++ +++/* Linux uses 0xffff, BSD uses SIGCONT */ +++#define __W_CONTINUED 0x13 +++#define __WCOREFLAG 0x80 +++/* Nonzero if STATUS indicates the child continued after a stop. */ +++#define __WIFCONTINUED(status) ((status) == __W_CONTINUED) +++ +++/* Nonzero if STATUS indicates the child dumped core. */ +++#define __WCOREDUMP(status) ((status) & __WCOREFLAG) +++ +++/* Nonzero if STATUS indicates termination by a signal. */ +++#define __WIFSIGNALED(status) \ +++ (!__WIFSTOPPED(status) && !__WIFEXITED(status) && !__WIFCONTINUED(status)) +++ +++/* Macros for constructing status values. */ +++#define __W_EXITCODE(ret, sig) ((ret) << 8 | (sig)) +++#define __W_STOPCODE(sig) ((sig) << 8 | 0x7f) +++ +++ +++ +++#ifdef __USE_MISC +++ +++# include +++ +++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/sysdeps/unix/bsd/bsd4.4/kfreebsd/brk.c ++@@ -0,0 +1,49 @@ +++/* 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 +++#include +++#include +++ +++extern int __syscall_obreak (void *addr); +++libc_hidden_proto (__syscall_obreak) +++ +++extern char _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 (void *addr) +++{ +++ if ((char*)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/sysdeps/unix/bsd/bsd4.4/kfreebsd/check_fds.c ++@@ -0,0 +1 @@ +++void __libc_check_standard_fds (void) {;} ++--- /dev/null +++++ b/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 +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++#include +++ +++ +++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/sysdeps/unix/bsd/bsd4.4/kfreebsd/check_pf.c ++@@ -0,0 +1 @@ +++#include ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/clock.c ++@@ -0,0 +1,44 @@ +++/* Copyright (C) 1991, 1997, 1998, 1999 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public +++ License as published by the Free Software Foundation; either +++ version 2.1 of the License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General Public License for more details. +++ +++ You should have received a copy of the GNU Lesser General Public +++ License along with the GNU C Library; if not, write to the Free +++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +++ 02111-1307 USA. */ +++ +++#include +++#include +++#include +++ +++#ifdef __GNUC__ +++__inline +++#endif +++static clock_t +++timeval_to_clock_t (const struct timeval *tv) +++{ +++ return (clock_t) ((tv->tv_sec * CLOCKS_PER_SEC) + +++ (tv->tv_usec * CLOCKS_PER_SEC / 1000000)); +++} +++ +++/* Return the time used by the program so far (user time + system time). */ +++clock_t +++clock (void) +++{ +++ struct rusage usage; +++ +++ if (__getrusage (RUSAGE_SELF, &usage) < 0) +++ return (clock_t) -1; +++ +++ return (timeval_to_clock_t (&usage.ru_stime) + +++ timeval_to_clock_t (&usage.ru_utime)); +++} ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/clock_getres.c ++@@ -0,0 +1,43 @@ +++/* 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 +++ +++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_VIRTUAL: \ +++ case CLOCK_PROF: \ +++ case CLOCK_MONOTONIC: \ +++ case CLOCK_UPTIME: \ +++ case CLOCK_UPTIME_PRECISE: \ +++ case CLOCK_UPTIME_FAST: \ +++ case CLOCK_REALTIME_PRECISE: \ +++ case CLOCK_REALTIME_FAST: \ +++ case CLOCK_MONOTONIC_PRECISE: \ +++ case CLOCK_MONOTONIC_FAST: \ +++ case CLOCK_SECOND: \ +++ retval = INLINE_SYSCALL (clock_getres, 2, clock_id, res); \ +++ break +++ +++/* We handled the REALTIME clock here. */ +++# define HANDLED_REALTIME 1 +++ +++#include ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/clock_gettime.c ++@@ -0,0 +1,43 @@ +++/* 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 +++#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_VIRTUAL: \ +++ case CLOCK_PROF: \ +++ case CLOCK_MONOTONIC: \ +++ case CLOCK_UPTIME: \ +++ case CLOCK_UPTIME_PRECISE: \ +++ case CLOCK_UPTIME_FAST: \ +++ case CLOCK_REALTIME_PRECISE: \ +++ case CLOCK_REALTIME_FAST: \ +++ case CLOCK_MONOTONIC_PRECISE: \ +++ case CLOCK_MONOTONIC_FAST: \ +++ case CLOCK_SECOND: \ +++ retval = INLINE_SYSCALL (clock_gettime, 2, clock_id, tp); \ +++ break +++ +++/* We handled the REALTIME clock here. */ +++# define HANDLED_REALTIME 1 +++#include ++--- /dev/null +++++ b/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 +++#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 ++--- /dev/null +++++ b/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 , 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 +++#include +++#include +++#include +++#include +++#include +++#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/sysdeps/unix/bsd/bsd4.4/kfreebsd/configure ++@@ -0,0 +1,423 @@ +++# This file is generated from configure.in by Autoconf. DO NOT EDIT! +++ # Local configure fragment for sysdeps/unix/bsd/bsd4.4/kfreebsd. +++ +++# 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 +++ +++ +++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +++$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +++if test "${ac_cv_path_GREP+set}" = set; then : +++ $as_echo_n "(cached) " >&6 +++else +++ if test -z "$GREP"; then +++ ac_path_GREP_found=false +++ # Loop through the user's path and test for each of PROGNAME-LIST +++ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +++for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +++do +++ IFS=$as_save_IFS +++ test -z "$as_dir" && as_dir=. +++ for ac_prog in grep ggrep; do +++ for ac_exec_ext in '' $ac_executable_extensions; do +++ ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" +++ { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue +++# Check for GNU ac_path_GREP and select it if it is found. +++ # Check for GNU $ac_path_GREP +++case `"$ac_path_GREP" --version 2>&1` in +++*GNU*) +++ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +++*) +++ ac_count=0 +++ $as_echo_n 0123456789 >"conftest.in" +++ while : +++ do +++ cat "conftest.in" "conftest.in" >"conftest.tmp" +++ mv "conftest.tmp" "conftest.in" +++ cp "conftest.in" "conftest.nl" +++ $as_echo 'GREP' >> "conftest.nl" +++ "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break +++ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break +++ as_fn_arith $ac_count + 1 && ac_count=$as_val +++ if test $ac_count -gt ${ac_path_GREP_max-0}; then +++ # Best one so far, save it but keep looking for a better one +++ ac_cv_path_GREP="$ac_path_GREP" +++ ac_path_GREP_max=$ac_count +++ fi +++ # 10*(2^10) chars as input seems more than enough +++ test $ac_count -gt 10 && break +++ done +++ rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +++esac +++ +++ $ac_path_GREP_found && break 3 +++ done +++ done +++ done +++IFS=$as_save_IFS +++ if test -z "$ac_cv_path_GREP"; then +++ as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 +++ fi +++else +++ ac_cv_path_GREP=$GREP +++fi +++ +++fi +++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +++$as_echo "$ac_cv_path_GREP" >&6; } +++ GREP="$ac_cv_path_GREP" +++ +++ +++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +++$as_echo_n "checking for egrep... " >&6; } +++if test "${ac_cv_path_EGREP+set}" = set; then : +++ $as_echo_n "(cached) " >&6 +++else +++ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 +++ then ac_cv_path_EGREP="$GREP -E" +++ else +++ if test -z "$EGREP"; then +++ ac_path_EGREP_found=false +++ # Loop through the user's path and test for each of PROGNAME-LIST +++ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +++for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +++do +++ IFS=$as_save_IFS +++ test -z "$as_dir" && as_dir=. +++ for ac_prog in egrep; do +++ for ac_exec_ext in '' $ac_executable_extensions; do +++ ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" +++ { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue +++# Check for GNU ac_path_EGREP and select it if it is found. +++ # Check for GNU $ac_path_EGREP +++case `"$ac_path_EGREP" --version 2>&1` in +++*GNU*) +++ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +++*) +++ ac_count=0 +++ $as_echo_n 0123456789 >"conftest.in" +++ while : +++ do +++ cat "conftest.in" "conftest.in" >"conftest.tmp" +++ mv "conftest.tmp" "conftest.in" +++ cp "conftest.in" "conftest.nl" +++ $as_echo 'EGREP' >> "conftest.nl" +++ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break +++ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break +++ as_fn_arith $ac_count + 1 && ac_count=$as_val +++ if test $ac_count -gt ${ac_path_EGREP_max-0}; then +++ # Best one so far, save it but keep looking for a better one +++ ac_cv_path_EGREP="$ac_path_EGREP" +++ ac_path_EGREP_max=$ac_count +++ fi +++ # 10*(2^10) chars as input seems more than enough +++ test $ac_count -gt 10 && break +++ done +++ rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +++esac +++ +++ $ac_path_EGREP_found && break 3 +++ done +++ done +++ done +++IFS=$as_save_IFS +++ if test -z "$ac_cv_path_EGREP"; then +++ as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 +++ fi +++else +++ ac_cv_path_EGREP=$EGREP +++fi +++ +++ fi +++fi +++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +++$as_echo "$ac_cv_path_EGREP" >&6; } +++ EGREP="$ac_cv_path_EGREP" +++ +++ +++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking installed kFreeBSD kernel header files" >&5 +++$as_echo_n "checking installed kFreeBSD kernel header files... " >&6; } +++if test "${libc_cv_kfreebsd830+set}" = set; then : +++ $as_echo_n "(cached) " >&6 +++else +++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext +++/* end confdefs.h. */ +++#include +++#if !defined(__FreeBSD_kernel_version) && defined(__FreeBSD_version) +++#define __FreeBSD_kernel_version __FreeBSD_version +++#endif +++#if !defined __FreeBSD_kernel_version || __FreeBSD_kernel_version < (8 *100000+ 3 *1000+ 0) /* 8.3.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_kfreebsd830='TOO OLD!' +++else +++ libc_cv_kfreebsd830='8.3.0 or later' +++fi +++rm -f conftest* +++ +++fi +++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_kfreebsd830" >&5 +++$as_echo "$libc_cv_kfreebsd830" >&6; } +++if test "$libc_cv_kfreebsd830" != '8.3.0 or later'; then +++ as_fn_error "GNU libc requires kernel header files from +++kFreeBSD 8.3.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 8.3.0 or later. +++This check uses , 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." "$LINENO" 5 +++fi +++ +++# Check whether --enable-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=8.3.0 +++ ;; +++ x86_64*) +++ arch_minimum_kernel=8.3.0 +++ ;; +++ *) +++ arch_minimum_kernel=8.3.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 +++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: minimum kernel version reset to $arch_minimum_kernel" >&5 +++$as_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 != '8.3.0'; then +++ minimum_kernel=$arch_minimum_kernel +++ fi +++fi +++ +++if test -n "$minimum_kernel"; then +++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kernel header at least $minimum_kernel" >&5 +++$as_echo_n "checking for kernel header at least $minimum_kernel... " >&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 confdefs.h - <<_ACEOF >conftest.$ac_ext +++/* end confdefs.h. */ +++#include +++#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* +++ +++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_minimum_kernel" >&5 +++$as_echo "$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 +++ as_fn_error "*** The available kernel headers are older than the requested +++*** compatible kernel version" "$LINENO" 5 +++ 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_complocaledir='${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_complocaledir='${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 FBTL add-on should be available. +++case $add_ons in +++ # It is available. Good. +++ *fbtl*) +++ fbtl_missing= +++ ;; +++ *) +++ fbtl_missing=yes +++ ;; +++esac +++ +++if test "$fbtl_missing"; then +++ if test $enable_sanity = yes; then +++ echo "\ +++*** On GNU/kFreeBSD systems it is normal to compile GNU libc with the +++*** \`fbtl' 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 \`fbtl' +++*** 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=$dir/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 +++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlinks in ${ac_prefix}/include" >&5 +++$as_echo_n "checking for symlinks in ${ac_prefix}/include... " >&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 +++ as_fn_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." "$LINENO" 5 +++ else +++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +++$as_echo "ok" >&6; } +++ fi +++fi +++ +++# We support internal syscalls. +++# It is advertised as inlined syscalls availability ... +++$as_echo "#define HAVE_INLINED_SYSCALLS 1" >>confdefs.h +++ ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/configure.in ++@@ -0,0 +1,258 @@ +++GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. +++# Local configure fragment for sysdeps/unix/bsd/bsd4.4/kfreebsd. +++ +++# 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],[8.3.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 +++#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 , 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], +++ AC_HELP_STRING([--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=8.3.0 +++ ;; +++ x86_64*) +++ arch_minimum_kernel=8.3.0 +++ ;; +++ *) +++ arch_minimum_kernel=8.3.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 != '8.3.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 +++#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 FBTL add-on should be available. +++case $add_ons in +++ # It is available. Good. +++ *fbtl*) +++ fbtl_missing= +++ ;; +++ *) +++ fbtl_missing=yes +++ ;; +++esac +++ +++if test "$fbtl_missing"; then +++ if test $enable_sanity = yes; then +++ echo "\ +++*** On GNU/kFreeBSD systems it is normal to compile GNU libc with the +++*** \`fbtl' 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 \`fbtl' +++*** 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=$dir/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/sysdeps/unix/bsd/bsd4.4/kfreebsd/connect.c ++@@ -0,0 +1,65 @@ +++/* Copyright (C) 2005 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Aurelien Jarno , 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 +++#include +++#include +++ +++/* 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); +++libc_hidden_proto (__libc_sa_len) +++ +++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; +++ +++ new_addrlen = __libc_sa_len ((addr.__sockaddr__)->sa_family); +++ +++ /* 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; +++} +++ +++weak_alias (__libc_connect, __connect) +++weak_alias (__libc_connect, connect) +++libc_hidden_weak (__connect) ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/cpuset-kern.h ++@@ -0,0 +1,52 @@ +++/* 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, write to the Free +++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +++ 02111-1307 USA. */ +++ +++/* From */ +++ +++ +++/* +++ * Valid cpulevel_t values. +++ */ +++#define CPU_LEVEL_ROOT 1 /* All system cpus. */ +++#define CPU_LEVEL_CPUSET 2 /* Available cpus for which. */ +++#define CPU_LEVEL_WHICH 3 /* Actual mask/id for which. */ +++ +++/* +++ * Valid cpuwhich_t values. +++ */ +++#define CPU_WHICH_TID 1 /* Specifies a thread id. */ +++#define CPU_WHICH_PID 2 /* Specifies a process id. */ +++#define CPU_WHICH_CPUSET 3 /* Specifies a set id. */ +++#define CPU_WHICH_IRQ 4 /* Specifies an irq #. */ +++#define CPU_WHICH_JAIL 5 /* Specifies a jail id. */ +++ +++/* +++ * Reserved cpuset identifiers. +++ */ +++#define CPUSET_INVALID -1 +++#define CPUSET_DEFAULT 0 +++ +++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) +++ +++ +++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) +++ ++--- /dev/null +++++ b/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 +++#include +++#include +++#include +++ +++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/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 +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++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/sysdeps/unix/bsd/bsd4.4/kfreebsd/dl-getcwd.c ++@@ -0,0 +1 @@ +++#include "getcwd.c" ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/dl-openat64.c ++@@ -0,0 +1,33 @@ +++/* Copyright (C) 2011 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++ +++extern int __syscall_openat (int fd, const char *path, int flag, mode_t mode); +++libc_hidden_proto (__syscall_openat) +++ +++int +++openat64 (int dfd, const char *file, int oflag, ...) +++{ +++ assert ((oflag & O_CREAT) == 0); +++ +++ return INLINE_SYSCALL (openat, 4, dfd, file, oflag, 0); +++} ++--- /dev/null +++++ b/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 , 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 +++#include +++#include +++#include +++#include +++#include +++#include +++ +++#include +++ +++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/sysdeps/unix/bsd/bsd4.4/kfreebsd/dl-osinfo.h ++@@ -0,0 +1,94 @@ +++/* 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 +++#include +++#include +++#include +++#include +++#include +++ +++#ifndef MIN +++# define MIN(a,b) (((a)<(b))?(a):(b)) +++#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) +++{ +++ union +++ { +++ uintptr_t num; +++ unsigned char bytes[sizeof (uintptr_t)]; +++ } ret; +++ +++ { +++ const size_t filllen = sizeof (ret.bytes) - 1; +++ ret.num = 0; +++# ifdef ENABLE_STACKGUARD_RANDOMIZE +++ int fd = open_not_cancel_2 ("/dev/urandom", O_RDONLY); +++ if (fd >= 0) +++ { +++ ssize_t reslen = read_not_cancel (fd, ret.bytes + 1, filllen); +++ close_not_cancel_no_status (fd); +++ if (reslen == (ssize_t) filllen) +++ return ret.num; +++ } +++# endif +++ ret.bytes[filllen] = 255; +++ ret.bytes[filllen - 1] = '\n'; +++ } +++ return ret.num; +++} +++ +++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/sysdeps/unix/bsd/bsd4.4/kfreebsd/dl-support.c ++@@ -0,0 +1,46 @@ +++/* 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. */ +++ +++#include +++#ifdef HAVE_AUX_VECTOR +++#include +++int _dl_clktck; +++ +++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; +++ } +++} +++#undef HAVE_AUX_VECTOR +++#endif +++ +++#include ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/dl-sysdep.c ++@@ -0,0 +1,316 @@ +++/* Operating system support for run-time dynamic linker. GNU/kFreeBSD version. +++ Copyright (C) 1995-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 +++ . */ +++ +++/* We conditionalize the whole of this file rather than simply eliding it +++ from the static build, because other sysdeps/ versions of this file +++ might define things needed by a static build. */ +++ +++#include +++#include +++ +++#ifdef SHARED +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include <_itoa.h> +++#include +++ +++#include +++#include +++#include +++#include +++#include +++#include +++ +++extern char **_environ attribute_hidden; +++extern char _end[] attribute_hidden; +++ +++/* Protect SUID program against misuse of file descriptors. */ +++extern void __libc_check_standard_fds (void); +++ +++#ifdef NEED_DL_BASE_ADDR +++ElfW(Addr) _dl_base_addr; +++#endif +++int __libc_enable_secure attribute_relro = 0; +++rtld_hidden_data_def (__libc_enable_secure) +++int __libc_multiple_libcs = 0; /* Defining this here avoids the inclusion +++ of init-first. */ +++/* This variable contains the lowest stack address ever used. */ +++void *__libc_stack_end attribute_relro = NULL; +++rtld_hidden_data_def(__libc_stack_end) +++void *_dl_random attribute_relro = NULL; +++ +++#ifndef DL_FIND_ARG_COMPONENTS +++# define DL_FIND_ARG_COMPONENTS(cookie, argc, argv, envp, auxp) \ +++ do { \ +++ void **_tmp; \ +++ (argc) = *(long int *) cookie; \ +++ (argv) = (char **) ((long int *) cookie + 1); \ +++ (envp) = (argv) + (argc) + 1; \ +++ for (_tmp = (void **) (envp); *_tmp; ++_tmp) \ +++ continue; \ +++ (auxp) = (void *) ++_tmp; \ +++ } while (0) +++#endif +++ +++#ifndef DL_STACK_END +++# define DL_STACK_END(cookie) ((void *) (cookie)) +++#endif +++ +++ +++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, _dl_argv, _environ, +++ GLRO(dl_auxv)); +++ +++ user_entry = (ElfW(Addr)) ENTRY_POINT; +++ GLRO(dl_platform) = NULL; /* Default to nothing known about the platform. */ +++ +++ for (av = GLRO(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. */ +++ __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 (__libc_enable_secure, 0)) +++ __libc_check_standard_fds (); +++ +++ (*dl_main) (phdr, phnum, &user_entry, GLRO(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 = GLRO(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_TIMEKEEP - 2] = { "TIMEKEEP: 0x", hex }, +++ [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); +++ } +++} +++void +++internal_function +++_dl_sysdep_start_cleanup (void) +++{ +++} +++ +++ +++#endif +++ +++ +++int +++attribute_hidden +++_dl_discover_osversion (void) +++{ +++ int request[2] = { CTL_KERN, KERN_OSRELDATE }; +++ size_t len; +++ int version; +++ int subrelease; +++ +++ len = sizeof(version); +++ if (__sysctl (request, 2, &version, &len, NULL, 0) < 0) +++ return -1; +++ +++/* +++ * since 8.0 release +++ * scheme is: Rxx +++ * 'R' is in the range 0 to 4 if this is a release branch or +++ * x.0-CURRENT before RELENG_*_0 is created, otherwise 'R' is +++ * in the range 5 to 9. +++ */ +++ +++ /* Convert to the GLIBC versioning system */ +++ subrelease = version % 1000; +++ if (subrelease >= 500) +++ subrelease -= 300; /* hopefull 55 values suffice for stable update */ +++ if (subrelease > 255) /* it have to fit into byte */ +++ subrelease = 255; +++ return ((version / 100000) << 16) /* major */ +++ | (((version % 100000) / 1000) << 8) /* minor 0 - 99 */ +++ | subrelease; +++} ++--- /dev/null +++++ b/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 +++ +++#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/sysdeps/unix/bsd/bsd4.4/kfreebsd/dl-writev.h ++@@ -0,0 +1,38 @@ +++/* Message-writing for the dynamic linker. +++ 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 +++ . */ +++ +++#include +++#include +++ +++/* This is used from only one place: dl-misc.c:_dl_debug_vdprintf. +++ Hence it's in a header with the expectation it will be inlined. +++ +++ This is writev, but with a constraint added and others loosened: +++ +++ 1. Under RTLD_PRIVATE_ERRNO, it must not clobber the private errno +++ when another thread holds the dl_load_lock. +++ 2. It is not obliged to detect and report errors at all. +++ 3. It's not really obliged to deliver a single atomic write +++ (though it may be preferable). */ +++ +++static inline void +++_dl_writev (int fd, const struct iovec *iov, size_t niov) +++{ +++ INTERNAL_SYSCALL_DECL (err); +++ INTERNAL_SYSCALL (writev, err, 3, fd, iov, niov); +++} ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/faccessat.c ++@@ -0,0 +1,64 @@ +++/* 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 +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++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 (int fd, const char *file, int mode, int flag) +++{ +++ int result = INLINE_SYSCALL (faccessat, 4, fd, file, mode, flag); +++ 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; +++} ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fbtl/Implies ++@@ -0,0 +1 @@ +++pthread ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fbtl/Makefile ++@@ -0,0 +1,62 @@ +++# Copyright (C) 2002-2013 Free Software Foundation, Inc. +++# This file is part of the GNU C Library. +++# Contributed by Ulrich Drepper , 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, see +++# . +++ +++ifeq ($(subdir),fbtl) +++sysdep_routines += register-atfork unregister-atfork libc_pthread_init \ +++ libc_multiple_threads +++ +++libpthread-sysdep_routines += pt-fork pthread_mutex_cond_lock +++ +++gen-as-const-headers += lowlevelrwlock.sym \ +++ unwindbuf.sym \ +++ structsem.sym +++ +++#gen-as-const-headers += lowlevelcond.sym lowlevelrwlock.sym \ +++# lowlevelbarrier.sym unwindbuf.sym \ +++# lowlevelrobustlock.sym pthread-pi-defines.sym \ +++# structsem.sym +++endif +++ +++ifeq ($(subdir),fbtl) +++routines += sys_thr_kill sys_thr_self +++routines += sys_sigwaitinfo sys_sigwait sys_sigtimedwait +++libpthread-routines += ptw-sys_sigwaitinfo ptw-sys_sigwait ptw-sys_sigtimedwait +++libpthread-routines += ptw-sys_sigprocmask ptw-sys_umtx +++libpthread-routines += ptw-sys_thr_kill +++libpthread-routines += ptw-sys_thr_kill2 +++libpthread-routines += ptw-sys_thr_new +++libpthread-routines += ptw-sys_thr_self +++libpthread-routines += ptw-sys_thr_set_name +++libpthread-routines += ptw-sys_thr_exit +++libpthread-routines += ptw-sigprocmask +++libpthread-routines += ptw-ioctl +++libpthread-routines += ptw-sys_clock_getcpuclockid2 +++endif +++ +++ifeq ($(subdir),rt) +++sysdep_routines += sys_clock_getcpuclockid2 +++endif +++ +++ifeq ($(subdir),posix) +++CFLAGS-fork.c = $(libio-mtsafe) +++CFLAGS-getpid.o = -fomit-frame-pointer +++CFLAGS-getpid.os = -fomit-frame-pointer +++endif +++ +++# Needed in both the signal and nptl subdir. +++CFLAGS-sigaction.c = -DWRAPPER_INCLUDE='' ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fbtl/Versions ++@@ -0,0 +1,18 @@ +++libc { +++ GLIBC_2.3.2 { +++ __register_atfork; +++ } +++ GLIBC_PRIVATE { +++ __libc_pthread_init; +++ __libc_current_sigrtmin_private; __libc_current_sigrtmax_private; +++ __libc_allocate_rtsig_private; +++# needed by pthread library +++ __syscall_sigprocmask; +++ __syscall_sigwaitinfo; +++ __syscall_sigsuspend; +++ __syscall_sigaction; +++ __syscall__umtx_op; +++# needed by librt as INLINE_SYSCALL: +++ __syscall_clock_getcpuclockid2; +++ } +++} ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fbtl/aio_misc.h ++@@ -0,0 +1,65 @@ +++/* Copyright (C) 2004-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Jakub Jelinek , 2004. +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public License as +++ published by the Free Software Foundation; either version 2.1 of the +++ License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General 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, see . */ +++ +++#ifndef _AIO_MISC_H +++# include_next +++# include +++# include +++# include +++# include +++ +++# define aio_start_notify_thread __aio_start_notify_thread +++# define aio_create_helper_thread __aio_create_helper_thread +++ +++extern inline void +++__aio_start_notify_thread (void) +++{ +++ sigset_t ss; +++ sigemptyset (&ss); +++ INLINE_SYSCALL (sigprocmask, 3, SIG_SETMASK, &ss, NULL); +++} +++ +++extern inline int +++__aio_create_helper_thread (pthread_t *threadp, void *(*tf) (void *), +++ void *arg) +++{ +++ pthread_attr_t attr; +++ +++ /* Make sure the thread is created detached. */ +++ pthread_attr_init (&attr); +++ pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED); +++ +++ /* The helper thread needs only very little resources. */ +++ (void) pthread_attr_setstacksize (&attr, __pthread_get_minstack (&attr)); +++ +++ /* Block all signals in the helper thread. To do this thoroughly we +++ temporarily have to block all signals here. */ +++ sigset_t ss; +++ sigset_t oss; +++ sigfillset (&ss); +++ INLINE_SYSCALL (sigprocmask, 3, SIG_SETMASK, &ss, &oss); +++ +++ int ret = pthread_create (threadp, &attr, tf, arg); +++ +++ /* Restore the signal mask. */ +++ INLINE_SYSCALL (sigprocmask, 3, SIG_SETMASK, &oss, NULL); +++ +++ (void) pthread_attr_destroy (&attr); +++ return ret; +++} +++#endif ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fbtl/allocrtsig.c ++@@ -0,0 +1,55 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++ +++ +++static int current_rtmin = __SIGRTMIN + 2; +++static int current_rtmax = __SIGRTMAX; +++ +++ +++/* We reserve __SIGRTMIN for use as the cancelation signal. This +++ signal is used internally. */ +++int +++__libc_current_sigrtmin (void) +++{ +++ return current_rtmin; +++} +++libc_hidden_def (__libc_current_sigrtmin) +++strong_alias (__libc_current_sigrtmin, __libc_current_sigrtmin_private) +++ +++ +++int +++__libc_current_sigrtmax (void) +++{ +++ return current_rtmax; +++} +++libc_hidden_def (__libc_current_sigrtmax) +++strong_alias (__libc_current_sigrtmax, __libc_current_sigrtmax_private) +++ +++ +++int +++__libc_allocate_rtsig (int high) +++{ +++ if (current_rtmin == -1 || current_rtmin > current_rtmax) +++ /* We don't have anymore signal available. */ +++ return -1; +++ +++ return high ? current_rtmin++ : current_rtmax--; +++} +++strong_alias (__libc_allocate_rtsig, __libc_allocate_rtsig_private) ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fbtl/bits/initspin.h ++@@ -0,0 +1 @@ +++/* No thread support. */ ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fbtl/bits/local_lim.h ++@@ -0,0 +1,51 @@ +++/* 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 +++ +++/* 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 +++/* We have no predefined limit on the number of threads. */ +++#undef PTHREAD_THREADS_MAX +++ +++/* 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 +++ +++/* Maximum value the semaphore can have. */ +++#define SEM_VALUE_MAX (2147483647) ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fbtl/bits/posix_opt.h ++@@ -0,0 +1,203 @@ +++/* 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 instead. +++ */ +++ +++#ifndef _BITS_POSIX_OPT_H +++#define _BITS_POSIX_OPT_H 1 +++ +++#include +++ +++/* 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 do not support priority inheritence. */ +++#define _POSIX_THREAD_PRIO_INHERIT -1 +++ +++/* We do not support priority protection */ +++#define _POSIX_THREAD_PRIO_PROTECT -1 +++ +++#ifdef __USE_XOPEN2K8 +++/* We do not support priority inheritence for robust mutexes. */ +++# define _POSIX_THREAD_ROBUST_PRIO_INHERIT -1 +++ +++/* We do not support priority protection for robust mutexes. */ +++# define _POSIX_THREAD_ROBUST_PRIO_PROTECT -1 +++#endif +++ +++/* We support POSIX.1b semaphores. */ +++#define _POSIX_SEMAPHORES 200809L +++ +++/* Real-time signals are available. */ +++#define _POSIX_REALTIME_SIGNALS 200809L +++ +++/* 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 supported. */ +++#define _POSIX_THREAD_PROCESS_SHARED 200809L +++ +++/* The monotonic clock is available. */ +++#define _POSIX_MONOTONIC_CLOCK 200809L +++ +++/* The clock selection interfaces are available. */ +++#define _POSIX_CLOCK_SELECTION 200809L +++ +++/* Advisory information interfaces are available. */ +++#define _POSIX_ADVISORY_INFO 200809L +++ +++/* 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 +++ +++#endif /* bits/posix_opt.h */ ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fbtl/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 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/sysdeps/unix/bsd/bsd4.4/kfreebsd/fbtl/bits/typesizes.h ++@@ -0,0 +1,91 @@ +++/* 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 directly; use instead." +++#endif +++ +++#ifndef _BITS_TYPESIZES_H +++#define _BITS_TYPESIZES_H 1 +++ +++/* See for the meaning of these macros. This file exists so +++ that 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 +++#define __FSWORD_T_TYPE __SWORD_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 +++#define __SNSECONDS_T_TYPE __SLONGWORD_TYPE +++#define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE +++#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE +++ +++/* Tell the libc code that off_t and off64_t are actually the same type +++ for all ABI purposes, even if possibly expressed as different base types +++ for C type-checking purposes. */ +++#define __OFF_T_MATCHES_OFF64_T 1 +++ +++/* Number of descriptors that can fit in an `fd_set'. */ +++#define __FD_SETSIZE 1024 +++ +++ +++#endif /* bits/typesizes.h */ ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fbtl/clock_getcpuclockid.c ++@@ -0,0 +1,28 @@ +++/* 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 +++ . */ +++ +++#include +++#include +++#include +++#include +++ +++int +++__clock_getcpuclockid (pid_t pid, clockid_t *clock_id) +++{ +++ return INLINE_SYSCALL(clock_getcpuclockid2, 3, pid, CPUCLOCK_WHICH_PID, clock_id); +++} +++strong_alias (__clock_getcpuclockid, clock_getcpuclockid) ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fbtl/clock_getres.c ++@@ -0,0 +1,60 @@ +++/* 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 +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++int __syscall_clock_getres(clockid_t clock_id, struct timespec *tp); +++libc_hidden_proto (__syscall_clock_getres) +++ +++int __syscall_clock_gettime(clockid_t clock_id, struct timespec *tp); +++libc_hidden_proto (__syscall_clock_gettime) +++ +++/* Get resolution of clock. */ +++int +++__clock_getres (clockid_t clock_id, struct timespec *tp) +++{ +++ /* we could try to provide fallback +++ via ??? for CLOCK_REALTIME +++ via HP_TIMING for CLOCK_PROCESS_CPUTIME_ID, +++ CLOCK_THREAD_CPUTIME_ID and related timers +++ +++ for now just pass it to kernel +++ */ +++ /* the negative clock_id means a CPU-timer, the resolution is same for all of them +++ the kernel returns resolution regardless whether the timer is accessible, +++ but POSIX/testsuite expects EINVAL +++ */ +++ +++ if (clock_id < 0) +++ { +++ int rv; +++ /* we reuse user provided struct timespec */ +++ rv = INLINE_SYSCALL (clock_gettime, 2, clock_id, tp); +++ if (rv != 0) +++ return rv; +++ /* valid, now really get the resolution */ +++ } +++ +++ return INLINE_SYSCALL (clock_getres, 2, clock_id, tp); +++} +++strong_alias (__clock_getres, clock_getres) ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fbtl/clock_gettime.c ++@@ -0,0 +1,43 @@ +++/* 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 +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++int __syscall_clock_gettime(clockid_t clock_id, struct timespec *tp); +++libc_hidden_proto (__syscall_clock_gettime) +++ +++/* Get current value of CLOCK and store it in TP. */ +++int +++__clock_gettime (clockid_t clock_id, struct timespec *tp) +++{ +++ /* we could try to provide fallback +++ via gettimeofday for CLOCK_REALTIME +++ via HP_TIMING for CLOCK_PROCESS_CPUTIME_ID, +++ CLOCK_THREAD_CPUTIME_ID and related timers +++ +++ for now just pass it to kernel +++ */ +++ return INLINE_SYSCALL (clock_gettime, 2, clock_id, tp); +++} +++weak_alias (__clock_gettime, clock_gettime) +++libc_hidden_def (__clock_gettime) ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fbtl/clock_nanosleep.c ++@@ -0,0 +1,99 @@ +++/* High-resolution sleep with the specified clock. +++ Copyright (C) 2000-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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++ +++ +++int __syscall_clock_gettime(clockid_t clock_id, struct timespec *tp); +++libc_hidden_proto (__syscall_clock_gettime) +++ +++ +++/* This implementation assumes that these is only a `nanosleep' system +++ call. So we have to remap all other activities. */ +++int +++__clock_nanosleep (clockid_t clock_id, int flags, const struct timespec *req, +++ struct timespec *rem) +++{ +++ struct timespec now; +++ +++ if (__builtin_expect (req->tv_nsec, 0) < 0 +++ || __builtin_expect (req->tv_nsec, 0) >= 1000000000) +++ return EINVAL; +++ +++ if (clock_id == CLOCK_THREAD_CPUTIME_ID) +++ return EINVAL; /* POSIX specifies EINVAL for this case. */ +++ +++ switch(clock_id) +++ { +++ case CLOCK_REALTIME: +++ case CLOCK_MONOTONIC: +++ case CLOCK_UPTIME: +++ case CLOCK_UPTIME_PRECISE: +++ case CLOCK_UPTIME_FAST: +++ case CLOCK_REALTIME_PRECISE: +++ case CLOCK_REALTIME_FAST: +++ case CLOCK_MONOTONIC_PRECISE: +++ case CLOCK_MONOTONIC_FAST: +++ case CLOCK_SECOND: +++ /* almost realtime clocks */ +++ break; +++ +++ default: +++ /* Not supported. */ +++ return ENOTSUP; +++ } +++ +++ /* If we got an absolute time, remap it. */ +++ if (flags == TIMER_ABSTIME) +++ { +++ long int nsec; +++ long int sec; +++ +++ /* Make sure we use safe data types. */ +++ assert (sizeof (sec) >= sizeof (now.tv_sec)); +++ +++ /* Get the current time for this clock. */ +++ if (__builtin_expect (INLINE_SYSCALL (clock_gettime, 2, clock_id, &now), 0) != 0) +++ return errno; +++ +++ /* Compute the difference. */ +++ nsec = req->tv_nsec - now.tv_nsec; +++ sec = req->tv_sec - now.tv_sec - (nsec < 0); +++ if (sec < 0) +++ /* The time has already elapsed. */ +++ return 0; +++ +++ now.tv_sec = sec; +++ now.tv_nsec = nsec + (nsec < 0 ? 1000000000 : 0); +++ +++ /* From now on this is our time. */ +++ req = &now; +++ +++ /* Make sure we are not modifying the struct pointed to by REM. */ +++ rem = NULL; +++ } +++ else if (__builtin_expect (flags, 0) != 0) +++ return EINVAL; +++ +++ return __builtin_expect (__nanosleep (req, rem), 0) ? errno : 0; +++} +++strong_alias (__clock_nanosleep, clock_nanosleep) ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fbtl/clock_settime.c ++@@ -0,0 +1,54 @@ +++/* 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 +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++int __syscall_clock_settime(clockid_t clock_id, const struct timespec *tp); +++libc_hidden_proto (__syscall_clock_settime) +++ +++/* Set CLOCK to value TP. */ +++int +++__clock_settime (clockid_t clock_id, const struct timespec *tp) +++{ +++ switch(clock_id) +++ { +++ case CLOCK_MONOTONIC: +++ case CLOCK_MONOTONIC_PRECISE: +++ case CLOCK_MONOTONIC_FAST: +++ /* almost monotonic clocks */ +++ __set_errno (EINVAL); /* per POSIX */ +++ return -1; +++ break; +++ default:; +++ }; +++ /* we could try to provide fallback +++ via settimeofday for CLOCK_REALTIME +++ via HP_TIMING for CLOCK_PROCESS_CPUTIME_ID, +++ CLOCK_THREAD_CPUTIME_ID and related timers +++ +++ for now just pass it to kernel +++ */ +++ +++ return INLINE_SYSCALL (clock_settime, 2, clock_id, tp); +++} +++strong_alias (__clock_settime, clock_settime) ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fbtl/fatal-prepare.h ++@@ -0,0 +1,24 @@ +++/* Copyright (C) 2003-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 +++ . */ +++ +++#include +++ +++/* We have to completely disable cancellation. assert() must not be a +++ cancellation point but the implementation uses write() etc. */ +++#define FATAL_PREPARE \ +++ __libc_ptf_call (__pthread_setcancelstate, \ +++ (PTHREAD_CANCEL_DISABLE, NULL), 0) ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fbtl/fork.c ++@@ -0,0 +1,228 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include "fork.h" +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++static void +++fresetlockfiles (void) +++{ +++ _IO_ITER i; +++ +++ for (i = _IO_iter_begin(); i != _IO_iter_end(); i = _IO_iter_next(i)) +++ _IO_lock_init (*((_IO_lock_t *) _IO_iter_file(i)->_lock)); +++} +++ +++ +++pid_t +++__libc_fork (void) +++{ +++ pid_t pid; +++ struct used_handler +++ { +++ struct fork_handler *handler; +++ struct used_handler *next; +++ } *allp = NULL; +++ +++ /* Determine if we are running multiple threads. We skip some fork +++ handlers in the single-thread case, to make fork safer to use in +++ signal handlers. POSIX requires that fork is async-signal-safe, +++ but our current fork implementation is not. */ +++ bool multiple_threads = THREAD_GETMEM (THREAD_SELF, header.multiple_threads); +++ +++ /* Run all the registered preparation handlers. In reverse order. +++ While doing this we build up a list of all the entries. */ +++ struct fork_handler *runp; +++ while ((runp = __fork_handlers) != NULL) +++ { +++ /* Make sure we read from the current RUNP pointer. */ +++ atomic_full_barrier (); +++ +++ unsigned int oldval = runp->refcntr; +++ +++ if (oldval == 0) +++ /* This means some other thread removed the list just after +++ the pointer has been loaded. Try again. Either the list +++ is empty or we can retry it. */ +++ continue; +++ +++ /* Bump the reference counter. */ +++ if (atomic_compare_and_exchange_bool_acq (&__fork_handlers->refcntr, +++ oldval + 1, oldval)) +++ /* The value changed, try again. */ +++ continue; +++ +++ /* We bumped the reference counter for the first entry in the +++ list. That means that none of the following entries will +++ just go away. The unloading code works in the order of the +++ list. +++ +++ While executing the registered handlers we are building a +++ list of all the entries so that we can go backward later on. */ +++ while (1) +++ { +++ /* Execute the handler if there is one. */ +++ if (runp->prepare_handler != NULL) +++ runp->prepare_handler (); +++ +++ /* Create a new element for the list. */ +++ struct used_handler *newp +++ = (struct used_handler *) alloca (sizeof (*newp)); +++ newp->handler = runp; +++ newp->next = allp; +++ allp = newp; +++ +++ /* Advance to the next handler. */ +++ runp = runp->next; +++ if (runp == NULL) +++ break; +++ +++ /* Bump the reference counter for the next entry. */ +++ atomic_increment (&runp->refcntr); +++ } +++ +++ /* We are done. */ +++ break; +++ } +++ +++ /* If we are not running multiple threads, we do not have to +++ preserve lock state. If fork runs from a signal handler, only +++ async-signal-safe functions can be used in the child. These data +++ structures are only used by unsafe functions, so their state does +++ not matter if fork was called from a signal handler. */ +++ if (multiple_threads) +++ { +++ _IO_list_lock (); +++ +++ /* Acquire malloc locks. This needs to come last because fork +++ handlers may use malloc, and the libio list lock has an +++ indirect malloc dependency as well (via the getdelim +++ function). */ +++ call_function_static_weak (__malloc_fork_lock_parent); +++ } +++ +++#ifdef ARCH_FORK +++ pid = ARCH_FORK (); +++#else +++# warning "ARCH_FORK must be defined so that the CLONE_SETTID flag is used" +++ pid = INLINE_SYSCALL (fork, 0); +++#endif +++ +++ +++ if (pid == 0) +++ { +++ struct pthread *self = THREAD_SELF; +++ +++ INLINE_SYSCALL(thr_self, 1, &(self->ktid)); +++ +++ if (__fork_generation_pointer != NULL) +++ *__fork_generation_pointer += 4; +++ +++#if HP_TIMING_AVAIL +++ /* The CPU clock of the thread and process have to be set to zero. */ +++ hp_timing_t now; +++ HP_TIMING_NOW (now); +++ THREAD_SETMEM (self, cpuclock_offset, now); +++ GL(dl_cpuclock_offset) = now; +++#endif +++ +++ /* Reset the lock state in the multi-threaded case. */ +++ if (multiple_threads) +++ { +++ /* Release malloc locks. */ +++ call_function_static_weak (__malloc_fork_unlock_child); +++ +++ /* Reset the file list. These are recursive mutexes. */ +++ fresetlockfiles (); +++ +++ /* Reset locks in the I/O code. */ +++ _IO_list_resetlock (); +++ } +++ +++ /* Reset the lock the dynamic loader uses to protect its data. */ +++ __rtld_lock_initialize (GL(dl_load_lock)); +++ +++ /* Run the handlers registered for the child. */ +++ while (allp != NULL) +++ { +++ if (allp->handler->child_handler != NULL) +++ allp->handler->child_handler (); +++ +++ /* Note that we do not have to wake any possible waiter. +++ This is the only thread in the new process. The count +++ may have been bumped up by other threads doing a fork. +++ We reset it to 1, to avoid waiting for non-existing +++ thread(s) to release the count. */ +++ allp->handler->refcntr = 1; +++ +++ /* XXX We could at this point look through the object pool +++ and mark all objects not on the __fork_handlers list as +++ unused. This is necessary in case the fork() happened +++ while another thread called dlclose() and that call had +++ to create a new list. */ +++ +++ allp = allp->next; +++ } +++ +++ /* Initialize the fork lock. */ +++ __fork_lock = LLL_LOCK_INITIALIZER; +++ } +++ else +++ { +++ /* Release acquired locks in the multi-threaded case. */ +++ if (multiple_threads) +++ { +++ /* Release malloc locks, parent process variant. */ +++ call_function_static_weak (__malloc_fork_unlock_parent); +++ +++ /* We execute this even if the 'fork' call failed. */ +++ _IO_list_unlock (); +++ } +++ +++ /* Run the handlers registered for the parent. */ +++ while (allp != NULL) +++ { +++ if (allp->handler->parent_handler != NULL) +++ allp->handler->parent_handler (); +++ +++ if (atomic_decrement_and_test (&allp->handler->refcntr) +++ && allp->handler->need_signal) +++ lll_futex_wake (&allp->handler->refcntr, 1, LLL_PRIVATE); +++ +++ allp = allp->next; +++ } +++ } +++ +++ return pid; +++} +++weak_alias (__libc_fork, __fork) +++libc_hidden_def (__fork) +++weak_alias (__libc_fork, fork) ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fbtl/fork.h ++@@ -0,0 +1,59 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++ +++/* The fork generation counter, defined in libpthread. */ +++extern unsigned long int __fork_generation attribute_hidden; +++ +++/* Pointer to the fork generation counter in the thread library. */ +++extern unsigned long int *__fork_generation_pointer attribute_hidden; +++ +++/* Lock to protect allocation and deallocation of fork handlers. */ +++extern int __fork_lock attribute_hidden; +++ +++/* Elements of the fork handler lists. */ +++struct fork_handler +++{ +++ struct fork_handler *next; +++ void (*prepare_handler) (void); +++ void (*parent_handler) (void); +++ void (*child_handler) (void); +++ void *dso_handle; +++ unsigned int refcntr; +++ int need_signal; +++}; +++ +++/* The single linked list of all currently registered for handlers. */ +++extern struct fork_handler *__fork_handlers attribute_hidden; +++ +++ +++/* Function to call to unregister fork handlers. */ +++extern void __unregister_atfork (void *dso_handle) attribute_hidden; +++#define UNREGISTER_ATFORK(dso_handle) __unregister_atfork (dso_handle) +++ +++ +++/* C library side function to register new fork handlers. */ +++extern int __register_atfork (void (*__prepare) (void), +++ void (*__parent) (void), +++ void (*__child) (void), +++ void *dso_handle); +++libc_hidden_proto (__register_atfork) +++ +++/* Add a new element to the fork list. */ +++extern void __linkin_atfork (struct fork_handler *newp) attribute_hidden; ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fbtl/gai_misc.h ++@@ -0,0 +1,120 @@ +++/* Copyright (C) 2006-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 +++ . */ +++ +++/* We define a special synchronization primitive for AIO. POSIX +++ conditional variables would be ideal but the pthread_cond_*wait +++ operations do not return on EINTR. This is a requirement for +++ correct aio_suspend and lio_listio implementations. */ +++ +++#include +++#include +++#include +++#include +++ +++#define DONT_NEED_GAI_MISC_COND 1 +++ +++#define GAI_MISC_NOTIFY(waitlist) \ +++ do { \ +++ if (*waitlist->counterp > 0 && --*waitlist->counterp == 0) \ +++ lll_futex_wake ((unsigned int *) waitlist->counterp, 1, LLL_PRIVATE); \ +++ } while (0) +++ +++#warning have to check sign of return values from futex wait calls +++ +++#define GAI_MISC_WAIT(result, futex, timeout, cancel) \ +++ do { \ +++ volatile int *futexaddr = &futex; \ +++ int oldval = futex; \ +++ \ +++ if (oldval != 0) \ +++ { \ +++ pthread_mutex_unlock (&__gai_requests_mutex); \ +++ \ +++ int oldtype; \ +++ if (cancel) \ +++ oldtype = LIBC_CANCEL_ASYNC (); \ +++ \ +++ int status; \ +++ do \ +++ { \ +++ status = lll_futex_timed_wait ((unsigned int *) futexaddr, oldval,\ +++ timeout, LLL_PRIVATE); \ +++ if (status != EWOULDBLOCK) \ +++ break; \ +++ \ +++ oldval = *futexaddr; \ +++ } \ +++ while (oldval != 0); \ +++ \ +++ if (cancel) \ +++ LIBC_CANCEL_RESET (oldtype); \ +++ \ +++ if (status == EINTR) \ +++ result = EINTR; \ +++ else if (status == ETIMEDOUT) \ +++ result = EAGAIN; \ +++ else \ +++ assert (status == 0 || status == EWOULDBLOCK); \ +++ \ +++ pthread_mutex_lock (&__gai_requests_mutex); \ +++ } \ +++ } while (0) +++ +++ +++#define gai_start_notify_thread __gai_start_notify_thread +++#define gai_create_helper_thread __gai_create_helper_thread +++ +++extern inline void +++__gai_start_notify_thread (void) +++{ +++ sigset_t ss; +++ sigemptyset (&ss); +++ INLINE_SYSCALL (sigprocmask, 3, SIG_SETMASK, &ss, NULL); +++} +++ +++extern inline int +++__gai_create_helper_thread (pthread_t *threadp, void *(*tf) (void *), +++ void *arg) +++{ +++ pthread_attr_t attr; +++ +++ /* Make sure the thread is created detached. */ +++ pthread_attr_init (&attr); +++ pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED); +++ +++ /* The helper thread needs only very little resources. */ +++ (void) pthread_attr_setstacksize (&attr, +++ __pthread_get_minstack (&attr) +++ + 4 * PTHREAD_STACK_MIN); +++ +++ /* Block all signals in the helper thread. To do this thoroughly we +++ temporarily have to block all signals here. */ +++ sigset_t ss; +++ sigset_t oss; +++ sigfillset (&ss); +++ INLINE_SYSCALL (sigprocmask, 3, SIG_SETMASK, &ss, &oss); +++ +++ int ret = pthread_create (threadp, &attr, tf, arg); +++ +++ /* Restore the signal mask. */ +++ INLINE_SYSCALL (sigprocmask, 3, SIG_SETMASK, &oss, NULL); +++ +++ (void) pthread_attr_destroy (&attr); +++ return ret; +++} +++ +++#include ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fbtl/internaltypes.h ++@@ -0,0 +1,169 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#ifndef _INTERNALTYPES_H +++#define _INTERNALTYPES_H 1 +++ +++#include +++ +++ +++struct pthread_attr +++{ +++ /* Scheduler parameters and priority. */ +++ struct sched_param schedparam; +++ int schedpolicy; +++ /* Various flags like detachstate, scope, etc. */ +++ int flags; +++ /* Size of guard area. */ +++ size_t guardsize; +++ /* Stack handling. */ +++ void *stackaddr; +++ size_t stacksize; +++ /* Affinity map. */ +++ cpu_set_t *cpuset; +++ size_t cpusetsize; +++}; +++ +++#define ATTR_FLAG_DETACHSTATE 0x0001 +++#define ATTR_FLAG_NOTINHERITSCHED 0x0002 +++#define ATTR_FLAG_SCOPEPROCESS 0x0004 +++#define ATTR_FLAG_STACKADDR 0x0008 +++#define ATTR_FLAG_OLDATTR 0x0010 +++#define ATTR_FLAG_SCHED_SET 0x0020 +++#define ATTR_FLAG_POLICY_SET 0x0040 +++ +++ +++/* Mutex attribute data structure. */ +++struct pthread_mutexattr +++{ +++ /* Identifier for the kind of mutex. +++ +++ Bit 31 is set if the mutex is to be shared between processes. +++ +++ Bit 0 to 30 contain one of the PTHREAD_MUTEX_ values to identify +++ the type of the mutex. */ +++ int mutexkind; +++}; +++ +++ +++/* Conditional variable attribute data structure. */ +++struct pthread_condattr +++{ +++ /* Combination of values: +++ +++ Bit 0 : flag whether coditional variable will be shareable between +++ processes. +++ +++ Bit 1-7: clock ID. */ +++ int value; +++}; +++ +++ +++/* The __NWAITERS field is used as a counter and to house the number +++ of bits for other purposes. COND_CLOCK_BITS is the number +++ of bits needed to represent the ID of the clock. COND_NWAITERS_SHIFT +++ is the number of bits reserved for other purposes like the clock. */ +++ +++/* Under FreeBSD: +++ #define CLOCK_REALTIME 0 +++ #define CLOCK_MONOTONIC 4 +++ +++ we therefore need at least 3 bits +++ */ +++ +++#define COND_CLOCK_BITS 4 +++#define COND_NWAITERS_SHIFT (COND_CLOCK_BITS) +++ +++ +++/* Read-write lock variable attribute data structure. */ +++struct pthread_rwlockattr +++{ +++ int lockkind; +++ int pshared; +++}; +++ +++ +++/* Barrier data structure. */ +++struct pthread_barrier +++{ +++ unsigned int curr_event; +++ int lock; +++ unsigned int left; +++ unsigned int init_count; +++ int private; +++}; +++ +++ +++/* Barrier variable attribute data structure. */ +++struct pthread_barrierattr +++{ +++ int pshared; +++}; +++ +++ +++/* Thread-local data handling. */ +++struct pthread_key_struct +++{ +++ /* Sequence numbers. Even numbers indicated vacant entries. Note +++ that zero is even. We use uintptr_t to not require padding on +++ 32- and 64-bit machines. On 64-bit machines it helps to avoid +++ wrapping, too. */ +++ uintptr_t seq; +++ +++ /* Destructor for the data. */ +++ void (*destr) (void *); +++}; +++ +++/* Check whether an entry is unused. */ +++#define KEY_UNUSED(p) (((p) & 1) == 0) +++/* Check whether a key is usable. We cannot reuse an allocated key if +++ the sequence counter would overflow after the next destroy call. +++ This would mean that we potentially free memory for a key with the +++ same sequence. This is *very* unlikely to happen, A program would +++ have to create and destroy a key 2^31 times (on 32-bit platforms, +++ on 64-bit platforms that would be 2^63). If it should happen we +++ simply don't use this specific key anymore. */ +++#define KEY_USABLE(p) (((uintptr_t) (p)) < ((uintptr_t) ((p) + 2))) +++ +++ +++/* Handling of read-write lock data. */ +++// XXX For now there is only one flag. Maybe more in future. +++#define RWLOCK_RECURSIVE(rwlock) ((rwlock)->__data.__flags != 0) +++ +++ +++/* Semaphore variable structure. */ +++struct new_sem +++{ +++ unsigned int value; +++ int private; +++ unsigned long int nwaiters; +++}; +++ +++struct old_sem +++{ +++ unsigned int value; +++}; +++ +++ +++/* Compatibility type for old conditional variable interfaces. */ +++typedef struct +++{ +++ pthread_cond_t *cond; +++} pthread_cond_2_0_t; +++ +++#endif /* internaltypes.h */ ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fbtl/jmp-unwind.c ++@@ -0,0 +1,38 @@ +++/* Clean up stack frames unwound by longjmp. Linux version. +++ Copyright (C) 1995-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 +++ . */ +++ +++#include +++#include +++#include +++ +++extern void __pthread_cleanup_upto (__jmp_buf env, char *targetframe); +++#pragma weak __pthread_cleanup_upto +++ +++ +++void +++_longjmp_unwind (jmp_buf env, int val) +++{ +++#ifdef SHARED +++ if (__libc_pthread_functions_init) +++ PTHFCT_CALL (ptr___pthread_cleanup_upto, (env->__jmpbuf, +++ CURRENT_STACK_FRAME)); +++#else +++ if (__pthread_cleanup_upto != NULL) +++ __pthread_cleanup_upto (env->__jmpbuf, CURRENT_STACK_FRAME); +++#endif +++} ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fbtl/kernel-posix-timers.h ++@@ -0,0 +1,138 @@ +++/* Copyright (C) 2003, 2007, 2012 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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 +++#include +++#include +++#include +++ +++ +++/* 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 pid_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 (void) +++{ +++ unsigned int i; +++ struct timer *timer = malloc (sizeof (struct timer)); +++ +++ if (timer == NULL) +++ goto fail; +++ +++ /* 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; +++ +++ free (timer); +++ +++fail: +++ 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); +++} +++ +++/* used syscalls */ +++ +++int __syscall_ktimer_create (clockid_t clockid, struct sigevent *evp, kernel_timer_t *timerid); +++int __syscall_ktimer_delete (kernel_timer_t timerid); +++int __syscall_ktimer_getoverrun (kernel_timer_t timerid); +++int __syscall_ktimer_gettime (kernel_timer_t timerid, struct itimerspec *value); +++int __syscall_ktimer_settime (kernel_timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue); +++ +++libc_hidden_proto (__syscall_ktimer_create) +++libc_hidden_proto (__syscall_ktimer_delete) +++libc_hidden_proto (__syscall_ktimer_getoverrun) +++libc_hidden_proto (__syscall_ktimer_gettime) +++libc_hidden_proto (__syscall_ktimer_settime) ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fbtl/libc-lowlevellock.c ++@@ -0,0 +1,20 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Paul Mackerras , 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, see +++ . */ +++ +++/* No difference to lowlevellock.c, except we lose a couple of functions. */ +++#include ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fbtl/libc_multiple_threads.c ++@@ -0,0 +1,28 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++ +++#if IS_IN (libc) +++# ifndef TLS_MULTIPLE_THREADS_IN_TCB +++/* Variable set to a nonzero value either if more than one thread runs or ran, +++ or if a single-threaded process is trying to cancel itself. See +++ nptl/descr.h for more context on the single-threaded process case. */ +++int __libc_multiple_threads attribute_hidden; +++# endif +++#endif ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fbtl/libc_pthread_init.c ++@@ -0,0 +1,88 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++unsigned long int *__fork_generation_pointer; +++ +++ +++#ifdef TLS_MULTIPLE_THREADS_IN_TCB +++void +++#else +++extern int __libc_multiple_threads attribute_hidden; +++ +++int * +++#endif +++internal_function +++__libc_pthread_init (unsigned long int *ptr, void (*reclaim) (void), +++ const struct pthread_functions *functions) +++{ +++ /* Remember the pointer to the generation counter in libpthread. */ +++ __fork_generation_pointer = ptr; +++ +++ /* Called by a child after fork. */ +++ __register_atfork (NULL, NULL, reclaim, NULL); +++ +++#ifdef SHARED +++ /* Copy the function pointers into an array in libc. This enables +++ access with just one memory reference but moreso, it prevents +++ hijacking the function pointers with just one pointer change. We +++ "encrypt" the function pointers since we cannot write-protect the +++ array easily enough. */ +++ union ptrhack +++ { +++ struct pthread_functions pf; +++# define NPTRS (sizeof (struct pthread_functions) / sizeof (void *)) +++ void *parr[NPTRS]; +++ } __attribute__ ((may_alias)) const *src; +++ union ptrhack *dest; +++ +++ src = (const void *) functions; +++ dest = (void *) &__libc_pthread_functions; +++ +++ for (size_t cnt = 0; cnt < NPTRS; ++cnt) +++ { +++ void *p = src->parr[cnt]; +++ PTR_MANGLE (p); +++ dest->parr[cnt] = p; +++ } +++ __libc_pthread_functions_init = 1; +++#endif +++ +++#ifndef TLS_MULTIPLE_THREADS_IN_TCB +++ return &__libc_multiple_threads; +++#endif +++} +++ +++#ifdef SHARED +++libc_freeres_fn (freeres_libptread) +++{ +++ if (__libc_pthread_functions_init) +++ PTHFCT_CALL (ptr_freeres, ()); +++} +++#endif ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fbtl/lowlevellock.c ++@@ -0,0 +1,129 @@ +++/* low level locking for pthread library. Generic futex-using version. +++ Copyright (C) 2003-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 +++ . */ +++ +++#include +++#include +++#include +++#include +++ +++void +++__lll_lock_wait_private (int *futex) +++{ +++ do +++ { +++ int oldval = atomic_compare_and_exchange_val_acq (futex, 2, 1); +++ if (oldval != 0) +++ lll_futex_wait (futex, 2, LLL_PRIVATE); +++ } +++ while (atomic_compare_and_exchange_bool_acq (futex, 2, 0) != 0); +++} +++ +++ +++/* These functions don't get included in libc.so */ +++#if IS_IN (libpthread) +++void +++__lll_lock_wait_shared (int *futex) +++{ +++ do +++ { +++ int oldval = atomic_compare_and_exchange_val_acq (futex, 2, 1); +++ if (oldval != 0) +++ lll_futex_wait (futex, 2, LLL_SHARED); +++ } +++ while (atomic_compare_and_exchange_bool_acq (futex, 2, 0) != 0); +++} +++ +++ +++int +++__lll_timedlock_wait (int *futex, const struct timespec *abstime, int private) +++{ +++ struct timespec rt; +++ +++ /* Reject invalid timeouts. */ +++ if (abstime->tv_nsec < 0 || abstime->tv_nsec >= 1000000000) +++ return EINVAL; +++ +++ /* Upgrade the lock. */ +++ if (atomic_exchange_acq (futex, 2) == 0) +++ return 0; +++ +++ do +++ { +++ struct timeval tv; +++ +++ /* Get the current time. */ +++ (void) __gettimeofday (&tv, NULL); +++ +++ /* Compute relative timeout. */ +++ rt.tv_sec = abstime->tv_sec - tv.tv_sec; +++ rt.tv_nsec = abstime->tv_nsec - tv.tv_usec * 1000; +++ if (rt.tv_nsec < 0) +++ { +++ rt.tv_nsec += 1000000000; +++ --rt.tv_sec; +++ } +++ +++ /* Already timed out? */ +++ if (rt.tv_sec < 0) +++ return ETIMEDOUT; +++ +++ // XYZ: Lost the lock to check whether it was private. +++ lll_futex_timed_wait (futex, 2, &rt, private); +++ } +++ while (atomic_compare_and_exchange_bool_acq (futex, 2, 0) != 0); +++ +++ return 0; +++} +++ +++int +++__lll_timedwait_tid (long *tidp, const struct timespec *abstime) +++{ +++ long tid; +++ +++ if (abstime->tv_nsec < 0 || abstime->tv_nsec >= 1000000000) +++ return EINVAL; +++ +++ /* Repeat until thread terminated. */ +++ while ((tid = *tidp) != KTID_TERMINATED) +++ { +++ struct timeval tv; +++ struct timespec rt; +++ +++ /* Get the current time. */ +++ (void) __gettimeofday (&tv, NULL); +++ +++ /* Compute relative timeout. */ +++ rt.tv_sec = abstime->tv_sec - tv.tv_sec; +++ rt.tv_nsec = abstime->tv_nsec - tv.tv_usec * 1000; +++ if (rt.tv_nsec < 0) +++ { +++ rt.tv_nsec += 1000000000; +++ --rt.tv_sec; +++ } +++ +++ /* Already timed out? */ +++ if (rt.tv_sec < 0) +++ return ETIMEDOUT; +++ +++ /* Wait until thread terminates. */ +++ lll_umtx_long_wait_shared (tidp, tid, &rt); +++ } +++ +++ return 0; +++} +++#endif ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fbtl/lowlevellock.h ++@@ -0,0 +1,168 @@ +++/* Copyright (C) 2002-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 +++ . */ +++ +++#ifndef _LOWLEVELLOCK_H +++#define _LOWLEVELLOCK_H 1 +++ +++/* Values for 'private' parameter of locking macros. Yes, the +++ definition seems to be backwards. But it is not. +++ They are the same as linux one's +++ */ +++ +++#define FUTEX_PRIVATE_FLAG 128 +++ +++#define LLL_PRIVATE 0 +++#define LLL_SHARED FUTEX_PRIVATE_FLAG +++#define KTID_TERMINATED 1 +++#include +++ +++#ifndef __ASSEMBLER__ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++/* Initializer for lock. */ +++#define LLL_LOCK_INITIALIZER (0) +++#define LLL_LOCK_INITIALIZER_LOCKED (1) +++#define LLL_LOCK_INITIALIZER_WAITERS (2) +++ +++#define lll_futex_wait(futex, val, private) \ +++ lll_futex_timed_wait(futex, val, NULL, private) +++ +++#define lll_futex_timed_wait(futex, val, timeout, private) \ +++ ({ \ +++ int __status; \ +++ if ((private) == LLL_PRIVATE) \ +++ __status = lll_umtx_int_wait_private (futex, val, timeout); \ +++ else \ +++ __status = lll_umtx_int_wait_shared (futex, val, timeout); \ +++ __status; \ +++ }) +++ +++#define lll_futex_wake(futex, nr, private) \ +++ ({ \ +++ int __status; \ +++ if ((private) == LLL_PRIVATE) \ +++ __status = lll_umtx_int_wake_private (futex, nr); \ +++ else \ +++ __status = lll_umtx_int_wake_shared (futex, nr); \ +++ __status; \ +++ }) +++ +++#define lll_trylock(lock) \ +++ atomic_compare_and_exchange_val_acq(&(lock), 1, 0) +++ +++#define lll_cond_trylock(lock) \ +++ atomic_compare_and_exchange_val_acq(&(lock), 2, 0) +++ +++extern void __lll_lock_wait_private (int *futex) attribute_hidden; +++extern void __lll_lock_wait_shared (int *futex) attribute_hidden; +++ +++#define __lll_lock_wait(futex, private) \ +++ ((void) ({ \ +++ if ((private) == LLL_PRIVATE) \ +++ __lll_lock_wait_private (futex); \ +++ else \ +++ __lll_lock_wait_shared (futex); \ +++ })) +++ +++#define __lll_lock(futex, private) \ +++ ((void) ({ \ +++ int *__futex = (futex); \ +++ if (__builtin_expect (atomic_compare_and_exchange_val_acq (__futex, \ +++ 1, 0), 0)) \ +++ { \ +++ __lll_lock_wait (__futex, private); \ +++ } \ +++ })) +++ +++#define lll_lock(futex, private) __lll_lock (&(futex), private) +++ +++ +++#define __lll_cond_lock(futex, private) \ +++ ((void) ({ \ +++ int *__futex = (futex); \ +++ if (__builtin_expect (atomic_exchange_acq (__futex, 2), 0)) \ +++ __lll_lock_wait (__futex, private); \ +++ })) +++ +++#define lll_cond_lock(futex, private) __lll_cond_lock (&(futex), private) +++ +++ +++extern int __lll_timedlock_wait (int *futex, const struct timespec *, +++ int private) attribute_hidden; +++ +++#define __lll_timedlock(futex, abstime, private) \ +++ ({ \ +++ int *__futex = (futex); \ +++ int __val = 0; \ +++ \ +++ if (__builtin_expect (atomic_exchange_acq (__futex, 1), 0)) \ +++ __val = __lll_timedlock_wait (__futex, abstime, private); \ +++ __val; \ +++ }) +++ +++#define lll_timedlock(futex, abstime, private) \ +++ __lll_timedlock (&(futex), abstime, private) +++ +++ +++#define __lll_unlock(futex, private) \ +++ (void) \ +++ ({ int *__futex = (futex); \ +++ int __private = (private); \ +++ int __oldval = atomic_exchange_rel (__futex, 0); \ +++ if (__builtin_expect (__oldval > 1, 0)) \ +++ lll_futex_wake (__futex, 1, __private); \ +++ }) +++ +++#define lll_unlock(futex, private) __lll_unlock(&(futex), private) +++ +++ +++#define lll_islocked(futex) \ +++ (futex != 0) +++ +++ +++/* The kernel notifies a process which uses CLONE_CHILD_CLEARTID via futex +++ wakeup when the clone terminates. The memory location contains the +++ thread ID while the clone is running and is reset to one (not zero as on linux) +++ afterwards. */ +++#define lll_wait_tid(tid) \ +++ do { \ +++ __typeof (tid) __tid; \ +++ while ((__tid = (tid)) != KTID_TERMINATED) \ +++ lll_umtx_long_wait_shared (&(tid), __tid, NULL);\ +++ } while (0) +++ +++extern int __lll_timedwait_tid (long *, const struct timespec *) +++ attribute_hidden; +++ +++#define lll_timedwait_tid(tid, abstime) \ +++ ({ \ +++ int __res = 0; \ +++ if ((tid) != KTID_TERMINATED) \ +++ __res = __lll_timedwait_tid (&(tid), (abstime)); \ +++ __res; \ +++ }) +++ +++#endif /* !__ASSEMBLER__ */ +++ +++#endif /* lowlevellock.h */ ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fbtl/lowlevelrwlock.sym ++@@ -0,0 +1,16 @@ +++#include +++#include +++#include +++#include +++ +++-- +++ +++MUTEX offsetof (pthread_rwlock_t, __data.__lock) +++NR_READERS offsetof (pthread_rwlock_t, __data.__nr_readers) +++READERS_WAKEUP offsetof (pthread_rwlock_t, __data.__readers_wakeup) +++WRITERS_WAKEUP offsetof (pthread_rwlock_t, __data.__writer_wakeup) +++READERS_QUEUED offsetof (pthread_rwlock_t, __data.__nr_readers_queued) +++WRITERS_QUEUED offsetof (pthread_rwlock_t, __data.__nr_writers_queued) +++FLAGS offsetof (pthread_rwlock_t, __data.__flags) +++WRITER offsetof (pthread_rwlock_t, __data.__writer) +++PSHARED offsetof (pthread_rwlock_t, __data.__shared) ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fbtl/pt-fork.c ++@@ -0,0 +1,27 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++ +++ +++pid_t +++__fork (void) +++{ +++ return __libc_fork (); +++} +++strong_alias (__fork, fork) ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fbtl/pt-raise.c ++@@ -0,0 +1 @@ +++#include ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fbtl/pthread_attr_getaffinity.c ++@@ -0,0 +1,69 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++int +++__pthread_attr_getaffinity_new (const pthread_attr_t *attr, size_t cpusetsize, +++ cpu_set_t *cpuset) +++{ +++ const struct pthread_attr *iattr; +++ +++ assert (sizeof (*attr) >= sizeof (struct pthread_attr)); +++ iattr = (const struct pthread_attr *) attr; +++ +++ if (iattr->cpuset != NULL) +++ { +++ /* Check whether there are any bits set beyond the limits +++ the user requested. */ +++ for (size_t cnt = cpusetsize; cnt < iattr->cpusetsize; ++cnt) +++ if (((char *) iattr->cpuset)[cnt] != 0) +++ return EINVAL; +++ +++ /* Copy over the cpuset from the thread attribute object. Limit the copy +++ to the minimum of the source and destination sizes to prevent a buffer +++ overrun. If the destination is larger, fill the remaining space with +++ zeroes. */ +++ void *p = mempcpy (cpuset, iattr->cpuset, +++ MIN (iattr->cpusetsize, cpusetsize)); +++ if (cpusetsize > iattr->cpusetsize) +++ memset (p, '\0', cpusetsize - iattr->cpusetsize); +++ } +++ else +++ /* We have no information. */ +++ memset (cpuset, -1, cpusetsize); +++ +++ return 0; +++} +++versioned_symbol (libpthread, __pthread_attr_getaffinity_new, +++ pthread_attr_getaffinity_np, GLIBC_2_3_4); +++ +++ +++#if SHLIB_COMPAT (libpthread, GLIBC_2_3_3, GLIBC_2_3_4) +++/* The old interface have not been really exposed */ +++strong_alias (__pthread_attr_getaffinity_new, __pthread_attr_getaffinity_old) +++compat_symbol (libpthread, __pthread_attr_getaffinity_old, +++ pthread_attr_getaffinity_np, GLIBC_2_3_3); +++#endif ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fbtl/pthread_attr_setaffinity.c ++@@ -0,0 +1,76 @@ +++/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++ +++ +++int +++__pthread_attr_setaffinity_new (pthread_attr_t *attr, size_t cpusetsize, +++ const cpu_set_t *cpuset) +++{ +++ struct pthread_attr *iattr; +++ +++ assert (sizeof (*attr) >= sizeof (struct pthread_attr)); +++ iattr = (struct pthread_attr *) attr; +++ +++ if (cpuset == NULL || cpusetsize == 0) +++ { +++ free (iattr->cpuset); +++ iattr->cpuset = NULL; +++ iattr->cpusetsize = 0; +++ } +++ else +++ { +++ int ret = check_cpuset_attr (cpuset, cpusetsize); +++ +++ if (ret) +++ return ret; +++ +++ if (iattr->cpusetsize != cpusetsize) +++ { +++ void *newp = (cpu_set_t *) realloc (iattr->cpuset, cpusetsize); +++ if (newp == NULL) +++ return ENOMEM; +++ +++ iattr->cpuset = newp; +++ iattr->cpusetsize = cpusetsize; +++ } +++ +++ memcpy (iattr->cpuset, cpuset, cpusetsize); +++ } +++ +++ return 0; +++} +++versioned_symbol (libpthread, __pthread_attr_setaffinity_new, +++ pthread_attr_setaffinity_np, GLIBC_2_3_4); +++ +++ +++#if SHLIB_COMPAT (libpthread, GLIBC_2_3_3, GLIBC_2_3_4) +++/* The old interface have not been really exposed */ +++strong_alias (__pthread_attr_setaffinity_new, __pthread_attr_setaffinity_old) +++compat_symbol (libpthread, __pthread_attr_setaffinity_old, +++ pthread_attr_setaffinity_np, GLIBC_2_3_3); +++#endif ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fbtl/pthread_getaffinity.c ++@@ -0,0 +1,67 @@ +++/* 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 +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++#include "../cpuset-kern.h" +++ +++int +++__pthread_getaffinity_new (pthread_t th, size_t cpusetsize, cpu_set_t *cpuset) +++{ +++ const struct pthread *pd = (const struct pthread *) th; +++ int64_t id = pd->tid; +++ int res; +++ +++ 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_TID, id, cpusetsize, cpuset); +++ +++ if (res == 0) +++ return 0; +++ +++ if (errno == ERANGE) +++ { +++ return EINVAL; +++ } +++ +++ return errno; +++} +++strong_alias (__pthread_getaffinity_new, __pthread_getaffinity_np) +++versioned_symbol (libpthread, __pthread_getaffinity_new, +++ pthread_getaffinity_np, GLIBC_2_3_4); +++ +++ +++#if SHLIB_COMPAT (libpthread, GLIBC_2_3_3, GLIBC_2_3_4) +++/* The old interface have not been really exposed */ +++strong_alias (__pthread_getaffinity_new, __pthread_getaffinity_old) +++compat_symbol (libpthread, __pthread_getaffinity_old, pthread_getaffinity_np, +++ GLIBC_2_3_3); +++#endif ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fbtl/pthread_getcpuclockid.c ++@@ -0,0 +1,36 @@ +++/* 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 +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++ +++int +++pthread_getcpuclockid (pthread_t threadid, clockid_t *clockid) +++{ +++ struct pthread *pd = (struct pthread *) threadid; +++ +++ /* Make sure the descriptor is valid. */ +++ if (INVALID_TD_P (pd)) +++ /* Not a valid thread handle. */ +++ return ESRCH; +++ +++ return INLINE_SYSCALL(clock_getcpuclockid2, 3, pd->tid, CPUCLOCK_WHICH_TID, clockid); +++} ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fbtl/pthread_getname.c ++@@ -0,0 +1,47 @@ +++/* pthread_getname_np -- Get thread name. +++ 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; see the file COPYING.LIB. If +++ not, see . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++int +++pthread_getname_np (pthread_t th, char *buf, size_t len) +++{ +++ const struct pthread *pd = (const struct pthread *) th; +++ struct ptrace_lwpinfo ti; +++ int res; +++ +++ ti.pl_tdname[0] = 0; +++ res = ptrace(PT_LWPINFO, pd->tid, (caddr_t)&ti, sizeof(struct ptrace_lwpinfo)); +++ +++ if (res != 0) +++ return errno; +++ +++ res = strlen(ti.pl_tdname); +++ +++ if (len < (res+1)) +++ return ERANGE; +++ +++ memcpy(buf, ti.pl_tdname, res+1); +++ return 0; +++} ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fbtl/pthread_getschedparam.c ++@@ -0,0 +1,77 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include "pthreadP.h" +++#include +++ +++ +++int +++__pthread_getschedparam (pthread_t threadid, int *policy, +++ struct sched_param *param) +++{ +++ struct pthread *pd = (struct pthread *) threadid; +++ +++ /* Make sure the descriptor is valid. */ +++ if (INVALID_TD_P (pd)) +++ /* Not a valid thread handle. */ +++ return ESRCH; +++ +++ int result = 0; +++#if 1 +++#warning TODO scheduling +++ *policy = SCHED_OTHER; +++ param->__sched_priority = 0; +++#else +++ +++ lll_lock (pd->lock, LLL_PRIVATE); +++ +++ /* The library is responsible for maintaining the values at all +++ times. If the user uses a interface other than +++ pthread_setschedparam to modify the scheduler setting it is not +++ the library's problem. In case the descriptor's values have +++ not yet been retrieved do it now. */ +++ if ((pd->flags & ATTR_FLAG_SCHED_SET) == 0) +++ { +++ if (__sched_getparam (pd->tid, &pd->schedparam) != 0) +++ result = 1; +++ else +++ pd->flags |= ATTR_FLAG_SCHED_SET; +++ } +++ +++ if ((pd->flags & ATTR_FLAG_POLICY_SET) == 0) +++ { +++ pd->schedpolicy = __sched_getscheduler (pd->tid); +++ if (pd->schedpolicy == -1) +++ result = 1; +++ else +++ pd->flags |= ATTR_FLAG_POLICY_SET; +++ } +++ +++ if (result == 0) +++ { +++ *policy = pd->schedpolicy; +++ memcpy (param, &pd->schedparam, sizeof (struct sched_param)); +++ } +++ +++ lll_unlock (pd->lock, LLL_PRIVATE); +++#endif +++ return result; +++} +++strong_alias (__pthread_getschedparam, pthread_getschedparam) ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fbtl/pthread_kill.c ++@@ -0,0 +1,61 @@ +++/* Copyright (C) 2002-2012 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++int +++__pthread_kill (pthread_t threadid, int signo) +++{ +++ struct pthread *pd = (struct pthread *) threadid; +++ +++ /* Make sure the descriptor is valid. */ +++ if (DEBUGGING_P && INVALID_TD_P (pd)) +++ /* Not a valid thread handle. */ +++ return ESRCH; +++ +++ /* Force load of pd->tid into local variable or register. Otherwise +++ if a thread exits between ESRCH test and tgkill, we might return +++ EINVAL, because pd->tid would be cleared by the kernel. */ +++ pid_t tid = atomic_forced_read (pd->tid); +++ if (__builtin_expect (tid <= KTID_TERMINATED, 0)) +++ /* Not a valid thread handle. */ +++ return ESRCH; +++ +++ /* Disallow sending the signal we use for cancellation, timers, +++ for the setxid implementation. */ +++ if (signo == SIGCANCEL || signo == SIGTIMER || signo == SIGSETXID) +++ return EINVAL; +++ +++ /* We have a special syscall to do the work. */ +++ +++ /* the KTID field in the TCB can be wrong under FreeBSD +++ a) before __pthread_initialize_minimal is finished (with libpthread) +++ b) in child just after fork +++ c) in single threaded program (no libpthread at all) +++ +++ In these situations no other thread can exist. +++ */ +++ return INLINE_SYSCALL(thr_kill, 2, tid, signo); +++} +++strong_alias (__pthread_kill, pthread_kill) ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fbtl/pthread_mutex_cond_lock.c ++@@ -0,0 +1,14 @@ +++#include +++ +++#define LLL_MUTEX_LOCK(mutex) \ +++ lll_cond_lock ((mutex)->__data.__lock, PTHREAD_MUTEX_PSHARED (mutex)) +++#define LLL_MUTEX_TRYLOCK(mutex) \ +++ lll_cond_trylock ((mutex)->__data.__lock) +++#define LLL_ROBUST_MUTEX_LOCK(mutex, id) \ +++ lll_robust_cond_lock ((mutex)->__data.__lock, id, \ +++ PTHREAD_ROBUST_MUTEX_PSHARED (mutex)) +++#define __pthread_mutex_lock internal_function __pthread_mutex_cond_lock +++#define __pthread_mutex_lock_full __pthread_mutex_cond_lock_full +++#define NO_INCR +++ +++#include ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fbtl/pthread_once.c ++@@ -0,0 +1,129 @@ +++/* Copyright (C) 2003-2014 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Jakub Jelinek , 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, see +++ . */ +++ +++#include "pthreadP.h" +++#include +++#include +++ +++ +++unsigned long int __fork_generation attribute_hidden; +++ +++ +++static void +++clear_once_control (void *arg) +++{ +++ pthread_once_t *once_control = (pthread_once_t *) arg; +++ +++ /* Reset to the uninitialized state here. We don't need a stronger memory +++ order because we do not need to make any other of our writes visible to +++ other threads that see this value: This function will be called if we +++ get interrupted (see __pthread_once), so all we need to relay to other +++ threads is the state being reset again. */ +++ *once_control = 0; +++ lll_futex_wake (once_control, INT_MAX, LLL_PRIVATE); +++} +++ +++ +++/* This is similar to a lock implementation, but we distinguish between three +++ states: not yet initialized (0), initialization finished (2), and +++ initialization in progress (__fork_generation | 1). If in the first state, +++ threads will try to run the initialization by moving to the second state; +++ the first thread to do so via a CAS on once_control runs init_routine, +++ other threads block. +++ When forking the process, some threads can be interrupted during the second +++ state; they won't be present in the forked child, so we need to restart +++ initialization in the child. To distinguish an in-progress initialization +++ from an interrupted initialization (in which case we need to reclaim the +++ lock), we look at the fork generation that's part of the second state: We +++ can reclaim iff it differs from the current fork generation. +++ XXX: This algorithm has an ABA issue on the fork generation: If an +++ initialization is interrupted, we then fork 2^30 times (30 bits of +++ once_control are used for the fork generation), and try to initialize +++ again, we can deadlock because we can't distinguish the in-progress and +++ interrupted cases anymore. */ +++int +++__pthread_once (pthread_once_t *once_control, void (*init_routine) (void)) +++{ +++ while (1) +++ { +++ int oldval, val, newval; +++ +++ /* We need acquire memory order for this load because if the value +++ signals that initialization has finished, we need to be see any +++ data modifications done during initialization. */ +++ val = *once_control; +++ atomic_read_barrier(); +++ do +++ { +++ /* Check if the initialization has already been done. */ +++ if (__glibc_likely ((val & 2) != 0)) +++ return 0; +++ +++ oldval = val; +++ /* We try to set the state to in-progress and having the current +++ fork generation. We don't need atomic accesses for the fork +++ generation because it's immutable in a particular process, and +++ forked child processes start with a single thread that modified +++ the generation. */ +++ newval = __fork_generation | 1; +++ /* We need acquire memory order here for the same reason as for the +++ load from once_control above. */ +++ val = atomic_compare_and_exchange_val_acq (once_control, newval, +++ oldval); +++ } +++ while (__glibc_unlikely (val != oldval)); +++ +++ /* Check if another thread already runs the initializer. */ +++ if ((oldval & 1) != 0) +++ { +++ /* Check whether the initializer execution was interrupted by a +++ fork. We know that for both values, bit 0 is set and bit 1 is +++ not. */ +++ if (oldval == newval) +++ { +++ /* Same generation, some other thread was faster. Wait. */ +++ lll_futex_wait (once_control, newval, LLL_PRIVATE); +++ continue; +++ } +++ } +++ +++ /* This thread is the first here. Do the initialization. +++ Register a cleanup handler so that in case the thread gets +++ interrupted the initialization can be restarted. */ +++ pthread_cleanup_push (clear_once_control, once_control); +++ +++ init_routine (); +++ +++ pthread_cleanup_pop (0); +++ +++ +++ /* Mark *once_control as having finished the initialization. We need +++ release memory order here because we need to synchronize with other +++ threads that want to use the initialized data. */ +++ atomic_write_barrier(); +++ *once_control = 2; +++ +++ /* Wake up all other threads. */ +++ lll_futex_wake (once_control, INT_MAX, LLL_PRIVATE); +++ break; +++ } +++ +++ return 0; +++} +++weak_alias (__pthread_once, pthread_once) +++hidden_def (__pthread_once) ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fbtl/pthread_setaffinity.c ++@@ -0,0 +1,70 @@ +++/* 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 +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++ +++#include "../cpuset-kern.h" +++ +++ +++size_t __kernel_cpumask_size attribute_hidden; +++ +++/* Determine the current affinity. As a side affect we learn +++ about the size of the cpumask_t in the kernel. */ +++int +++__determine_cpumask_size (pid_t tid) +++{ +++ /* not yet dynamical */ +++ __kernel_cpumask_size = sizeof(cpu_set_t); +++ return 0; +++} +++ +++int +++__pthread_setaffinity_new (pthread_t th, size_t cpusetsize, +++ const cpu_set_t *cpuset) +++{ +++ const struct pthread *pd = (const struct pthread *) th; +++ int64_t id = pd->tid; +++ int res; +++ +++ res = INLINE_SYSCALL (cpuset_setaffinity, 5, CPU_LEVEL_WHICH, +++ CPU_WHICH_TID, id, cpusetsize, cpuset); +++ +++ if (res == 0) +++ return 0; +++ +++ if ((errno == ERANGE) || (errno == EDEADLK)) +++ { +++ return EINVAL; +++ } +++ +++ return errno; +++} +++versioned_symbol (libpthread, __pthread_setaffinity_new, +++ pthread_setaffinity_np, GLIBC_2_3_4); +++ +++ +++#if SHLIB_COMPAT (libpthread, GLIBC_2_3_3, GLIBC_2_3_4) +++/* The old interface have not been really exposed */ +++strong_alias (__pthread_setaffinity_new, __pthread_setaffinity_old) +++compat_symbol (libpthread, __pthread_setaffinity_old, pthread_setaffinity_np, +++ GLIBC_2_3_3); +++#endif ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fbtl/pthread_setname.c ++@@ -0,0 +1,32 @@ +++/* pthread_setname_np -- Set thread name +++ 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; see the file COPYING.LIB. If +++ not, see . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++ +++int +++pthread_setname_np (pthread_t th, const char *name) +++{ +++ const struct pthread *pd = (const struct pthread *) th; +++ +++ return INLINE_SYSCALL(thr_set_name, 2, pd->tid, name); +++} ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fbtl/pthread_setschedparam.c ++@@ -0,0 +1,76 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include "pthreadP.h" +++#include +++ +++ +++int +++__pthread_setschedparam (pthread_t threadid, int policy, +++ const struct sched_param *param) +++{ +++ struct pthread *pd = (struct pthread *) threadid; +++ +++ /* Make sure the descriptor is valid. */ +++ if (INVALID_TD_P (pd)) +++ /* Not a valid thread handle. */ +++ return ESRCH; +++ +++#if 1 +++#warning TODO scheduling +++ return ENOSYS; +++#else +++ int result = 0; +++ +++ lll_lock (pd->lock, LLL_PRIVATE); +++ +++ struct sched_param p; +++ const struct sched_param *orig_param = param; +++ +++ /* If the thread should have higher priority because of some +++ PTHREAD_PRIO_PROTECT mutexes it holds, adjust the priority. */ +++ if (__builtin_expect (pd->tpp != NULL, 0) +++ && pd->tpp->priomax > param->sched_priority) +++ { +++ p = *param; +++ p.sched_priority = pd->tpp->priomax; +++ param = &p; +++ } +++ +++ /* Try to set the scheduler information. */ +++ if (__builtin_expect (__sched_setscheduler (pd->tid, policy, +++ param) == -1, 0)) +++ result = errno; +++ else +++ { +++ /* We succeeded changing the kernel information. Reflect this +++ change in the thread descriptor. */ +++ pd->schedpolicy = policy; +++ memcpy (&pd->schedparam, orig_param, sizeof (struct sched_param)); +++ pd->flags |= ATTR_FLAG_SCHED_SET | ATTR_FLAG_POLICY_SET; +++ } +++ +++ lll_unlock (pd->lock, LLL_PRIVATE); +++ +++ return result; +++#endif +++} +++strong_alias (__pthread_setschedparam, pthread_setschedparam) ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fbtl/pthread_setschedprio.c ++@@ -0,0 +1,68 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include "pthreadP.h" +++#include +++ +++ +++int +++pthread_setschedprio (pthread_t threadid, int prio) +++{ +++ struct pthread *pd = (struct pthread *) threadid; +++ +++ /* Make sure the descriptor is valid. */ +++ if (INVALID_TD_P (pd)) +++ /* Not a valid thread handle. */ +++ return ESRCH; +++ +++#if 1 +++#warning TODO scheduling +++ return ENOSYS; +++#else +++ int result = 0; +++ struct sched_param param; +++ param.sched_priority = prio; +++ +++ lll_lock (pd->lock, LLL_PRIVATE); +++ +++ /* If the thread should have higher priority because of some +++ PTHREAD_PRIO_PROTECT mutexes it holds, adjust the priority. */ +++ if (__builtin_expect (pd->tpp != NULL, 0) && pd->tpp->priomax > prio) +++ param.sched_priority = pd->tpp->priomax; +++ +++ /* Try to set the scheduler information. */ +++ if (__builtin_expect (sched_setparam (pd->tid, ¶m) == -1, 0)) +++ result = errno; +++ else +++ { +++ /* We succeeded changing the kernel information. Reflect this +++ change in the thread descriptor. */ +++ param.sched_priority = prio; +++ memcpy (&pd->schedparam, ¶m, sizeof (struct sched_param)); +++ pd->flags |= ATTR_FLAG_SCHED_SET; +++ } +++ +++ lll_unlock (pd->lock, LLL_PRIVATE); +++ +++ return result; +++#endif +++} ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fbtl/pthread_sigmask.c ++@@ -0,0 +1,20 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#define BUILD_AS_pthread_sigmask +++#include "sigprocmask.c" ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fbtl/pthread_yield.c ++@@ -0,0 +1,29 @@ +++/* Copyright (C) 2002 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++ +++ +++/* With the 1-on-1 model we implement this function is equivalent to +++ the 'sched_yield' function. */ +++int +++pthread_yield (void) +++{ +++ return sched_yield (); +++} ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fbtl/raise.c ++@@ -0,0 +1,35 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++int +++raise (int sig) +++{ +++ long ktid; +++ INLINE_SYSCALL(thr_self, 1, &ktid); +++ return INLINE_SYSCALL(thr_kill, 2, ktid, sig); +++} +++libc_hidden_def (raise) +++weak_alias (raise, gsignal) ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fbtl/register-atfork.c ++@@ -0,0 +1,144 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++ +++ +++struct fork_handler *__fork_handlers; +++ +++/* Lock to protect allocation and deallocation of fork handlers. */ +++int __fork_lock = LLL_LOCK_INITIALIZER; +++ +++ +++/* Number of pre-allocated handler entries. */ +++#define NHANDLER 48 +++ +++/* Memory pool for fork handler structures. */ +++static struct fork_handler_pool +++{ +++ struct fork_handler_pool *next; +++ struct fork_handler mem[NHANDLER]; +++} fork_handler_pool; +++ +++ +++static struct fork_handler * +++fork_handler_alloc (void) +++{ +++ struct fork_handler_pool *runp = &fork_handler_pool; +++ struct fork_handler *result = NULL; +++ unsigned int i; +++ +++ do +++ { +++ /* Search for an empty entry. */ +++ for (i = 0; i < NHANDLER; ++i) +++ if (runp->mem[i].refcntr == 0) +++ goto found; +++ } +++ while ((runp = runp->next) != NULL); +++ +++ /* We have to allocate a new entry. */ +++ runp = (struct fork_handler_pool *) calloc (1, sizeof (*runp)); +++ if (runp != NULL) +++ { +++ /* Enqueue the new memory pool into the list. */ +++ runp->next = fork_handler_pool.next; +++ fork_handler_pool.next = runp; +++ +++ /* We use the last entry on the page. This means when we start +++ searching from the front the next time we will find the first +++ entry unused. */ +++ i = NHANDLER - 1; +++ +++ found: +++ result = &runp->mem[i]; +++ result->refcntr = 1; +++ result->need_signal = 0; +++ } +++ +++ return result; +++} +++ +++ +++int +++__register_atfork (void (*prepare) (void), void (*parent) (void), +++ void (*child) (void), void *dso_handle) +++{ +++ /* Get the lock to not conflict with other allocations. */ +++ lll_lock (__fork_lock, LLL_PRIVATE); +++ +++ struct fork_handler *newp = fork_handler_alloc (); +++ +++ if (newp != NULL) +++ { +++ /* Initialize the new record. */ +++ newp->prepare_handler = prepare; +++ newp->parent_handler = parent; +++ newp->child_handler = child; +++ newp->dso_handle = dso_handle; +++ +++ __linkin_atfork (newp); +++ } +++ +++ /* Release the lock. */ +++ lll_unlock (__fork_lock, LLL_PRIVATE); +++ +++ return newp == NULL ? ENOMEM : 0; +++} +++libc_hidden_def (__register_atfork) +++ +++ +++void +++attribute_hidden +++__linkin_atfork (struct fork_handler *newp) +++{ +++ do +++ newp->next = __fork_handlers; +++ while (catomic_compare_and_exchange_bool_acq (&__fork_handlers, +++ newp, newp->next) != 0); +++} +++ +++ +++libc_freeres_fn (free_mem) +++{ +++ /* Get the lock to not conflict with running forks. */ +++ lll_lock (__fork_lock, LLL_PRIVATE); +++ +++ /* No more fork handlers. */ +++ __fork_handlers = NULL; +++ +++ /* Free eventually alloated memory blocks for the object pool. */ +++ struct fork_handler_pool *runp = fork_handler_pool.next; +++ +++ memset (&fork_handler_pool, '\0', sizeof (fork_handler_pool)); +++ +++ /* Release the lock. */ +++ lll_unlock (__fork_lock, LLL_PRIVATE); +++ +++ /* We can free the memory after releasing the lock. */ +++ while (runp != NULL) +++ { +++ struct fork_handler_pool *oldp = runp; +++ runp = runp->next; +++ free (oldp); +++ } +++} ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fbtl/sem_post.c ++@@ -0,0 +1,79 @@ +++/* sem_post -- post to a POSIX semaphore. Generic futex-using version. +++ Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Jakub Jelinek , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++ +++#include +++ +++int +++__new_sem_post (sem_t *sem) +++{ +++ struct new_sem *isem = (struct new_sem *) sem; +++ +++ __typeof (isem->value) cur = atomic_load_relaxed(&isem->value); +++ do +++ { +++ if (cur == SEM_VALUE_MAX) +++ { +++ __set_errno (EOVERFLOW); +++ return -1; +++ } +++ } +++ while (!atomic_compare_exchange_weak_release(&isem->value, &cur, cur + 1)); +++ +++ atomic_full_barrier (); +++ if (isem->nwaiters > 0) +++ { +++ int err = lll_futex_wake (&isem->value, 1, +++ isem->private ^ FUTEX_PRIVATE_FLAG); +++ if (__builtin_expect (err, 0) != 0) +++ { +++ __set_errno (err); +++ return -1; +++ } +++ } +++ return 0; +++} +++versioned_symbol (libpthread, __new_sem_post, sem_post, GLIBC_2_1); +++ +++ +++#if SHLIB_COMPAT (libpthread, GLIBC_2_0, GLIBC_2_1) +++int +++attribute_compat_text_section +++__old_sem_post (sem_t *sem) +++{ +++ int *futex = (int *) sem; +++ +++ (void) atomic_increment_val (futex); +++ /* We always have to assume it is a shared semaphore. */ +++ int err = lll_futex_wake (futex, 1, LLL_SHARED); +++ if (__builtin_expect (err, 0) != 0) +++ { +++ __set_errno (err); +++ return -1; +++ } +++ return 0; +++} +++compat_symbol (libpthread, __old_sem_post, sem_post, GLIBC_2_0); +++#endif ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fbtl/sem_timedwait.c ++@@ -0,0 +1,116 @@ +++/* sem_timedwait -- wait on a semaphore. Generic futex-using version. +++ Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Paul Mackerras , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++ +++#include +++#include +++#include +++ +++extern void __sem_wait_cleanup (void *arg) attribute_hidden; +++ +++/* This is in a seperate function in order to make sure gcc +++ puts the call site into an exception region, and thus the +++ cleanups get properly run. */ +++static int +++__attribute__ ((noinline)) +++do_futex_timed_wait (struct new_sem *isem, struct timespec *rt) +++{ +++ int err, oldtype = __pthread_enable_asynccancel (); +++ +++ err = lll_futex_timed_wait (&isem->value, 0, rt, +++ isem->private ^ FUTEX_PRIVATE_FLAG); +++ +++ __pthread_disable_asynccancel (oldtype); +++ return err; +++} +++ +++int +++sem_timedwait (sem_t *sem, const struct timespec *abstime) +++{ +++ struct new_sem *isem = (struct new_sem *) sem; +++ int err; +++ +++ if (atomic_decrement_if_positive (&isem->value) > 0) +++ return 0; +++ +++ if (abstime->tv_nsec < 0 || abstime->tv_nsec >= 1000000000) +++ { +++ __set_errno (EINVAL); +++ return -1; +++ } +++ +++ atomic_increment (&isem->nwaiters); +++ +++ pthread_cleanup_push (__sem_wait_cleanup, isem); +++ +++ while (1) +++ { +++ struct timeval tv; +++ struct timespec rt; +++ int sec, nsec; +++ +++ /* Get the current time. */ +++ __gettimeofday (&tv, NULL); +++ +++ /* Compute relative timeout. */ +++ sec = abstime->tv_sec - tv.tv_sec; +++ nsec = abstime->tv_nsec - tv.tv_usec * 1000; +++ if (nsec < 0) +++ { +++ nsec += 1000000000; +++ --sec; +++ } +++ +++ /* Already timed out? */ +++ if (sec < 0) +++ { +++ __set_errno (ETIMEDOUT); +++ err = -1; +++ break; +++ } +++ +++ /* Do wait. */ +++ rt.tv_sec = sec; +++ rt.tv_nsec = nsec; +++ err = do_futex_timed_wait(isem, &rt); +++ if (err != 0 && err != EWOULDBLOCK) +++ { +++ __set_errno (err); +++ err = -1; +++ break; +++ } +++ +++ if (atomic_decrement_if_positive (&isem->value) > 0) +++ { +++ err = 0; +++ break; +++ } +++ } +++ +++ pthread_cleanup_pop (0); +++ +++ atomic_decrement (&isem->nwaiters); +++ +++ return err; +++} ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fbtl/sem_trywait.c ++@@ -0,0 +1,49 @@ +++/* sem_trywait -- wait on a semaphore. Generic futex-using version. +++ Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Paul Mackerras , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++ +++#include +++ +++ +++int +++__new_sem_trywait (sem_t *sem) +++{ +++ int *futex = (int *) sem; +++ int val; +++ +++ if (*futex > 0) +++ { +++ val = atomic_decrement_if_positive (futex); +++ if (val > 0) +++ return 0; +++ } +++ +++ __set_errno (EAGAIN); +++ return -1; +++} +++versioned_symbol (libpthread, __new_sem_trywait, sem_trywait, GLIBC_2_1); +++#if SHLIB_COMPAT (libpthread, GLIBC_2_0, GLIBC_2_1) +++strong_alias (__new_sem_trywait, __old_sem_trywait) +++compat_symbol (libpthread, __old_sem_trywait, sem_trywait, GLIBC_2_0); +++#endif ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fbtl/sem_wait.c ++@@ -0,0 +1,122 @@ +++/* sem_wait -- wait on a semaphore. Generic futex-using version. +++ Copyright (C) 2003-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Paul Mackerras , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++ +++#include +++#include +++ +++ +++void +++attribute_hidden +++__sem_wait_cleanup (void *arg) +++{ +++ struct new_sem *isem = (struct new_sem *) arg; +++ +++ atomic_decrement (&isem->nwaiters); +++} +++ +++/* This is in a seperate function in order to make sure gcc +++ puts the call site into an exception region, and thus the +++ cleanups get properly run. */ +++static int +++__attribute__ ((noinline)) +++do_futex_wait (struct new_sem *isem) +++{ +++ int err, oldtype = __pthread_enable_asynccancel (); +++ +++ err = lll_futex_wait (&isem->value, 0, isem->private ^ FUTEX_PRIVATE_FLAG); +++ +++ __pthread_disable_asynccancel (oldtype); +++ return err; +++} +++ +++int +++__new_sem_wait (sem_t *sem) +++{ +++ struct new_sem *isem = (struct new_sem *) sem; +++ int err; +++ +++ if (atomic_decrement_if_positive (&isem->value) > 0) +++ return 0; +++ +++ atomic_increment (&isem->nwaiters); +++ +++ pthread_cleanup_push (__sem_wait_cleanup, isem); +++ +++ while (1) +++ { +++ err = do_futex_wait(isem); +++ if (err != 0 && err != EWOULDBLOCK) +++ { +++ __set_errno (err); +++ err = -1; +++ break; +++ } +++ +++ if (atomic_decrement_if_positive (&isem->value) > 0) +++ { +++ err = 0; +++ break; +++ } +++ } +++ +++ pthread_cleanup_pop (0); +++ +++ atomic_decrement (&isem->nwaiters); +++ +++ return err; +++} +++versioned_symbol (libpthread, __new_sem_wait, sem_wait, GLIBC_2_1); +++ +++ +++#if SHLIB_COMPAT (libpthread, GLIBC_2_0, GLIBC_2_1) +++int +++attribute_compat_text_section +++__old_sem_wait (sem_t *sem) +++{ +++ int *futex = (int *) sem; +++ int err; +++ +++ do +++ { +++ if (atomic_decrement_if_positive (futex) > 0) +++ return 0; +++ +++ /* Enable asynchronous cancellation. Required by the standard. */ +++ int oldtype = __pthread_enable_asynccancel (); +++ +++ /* Always assume the semaphore is shared. */ +++ err = lll_futex_wait (futex, 0, LLL_SHARED); +++ +++ /* Disable asynchronous cancellation. */ +++ __pthread_disable_asynccancel (oldtype); +++ } +++ while (err == 0 || err == EWOULDBLOCK); +++ +++ __set_errno (err); +++ return -1; +++} +++ +++compat_symbol (libpthread, __old_sem_wait, sem_wait, GLIBC_2_0); +++#endif ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fbtl/sigprocmask.c ++@@ -0,0 +1,66 @@ +++/* Copyright (C) 1997-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 +++ . */ +++ +++#include +++#include +++#include +++ +++#include +++#include +++ +++#include +++ +++#include +++ +++/* Get and/or change the set of blocked signals. */ +++int +++#ifdef BUILD_AS_pthread_sigmask +++pthread_sigmask(int how, const sigset_t *set, sigset_t *oset) +++#else +++__sigprocmask (int how, const sigset_t *set, sigset_t *oset) +++#endif +++{ +++ sigset_t local_newmask; +++ int rv; +++ +++ /* The only thing we have to make sure here is that SIGCANCEL and +++ SIGSETXID are not blocked. */ +++ if (set != NULL +++ && (__builtin_expect (__sigismember (set, SIGCANCEL), 0) +++ || __builtin_expect (__sigismember (set, SIGSETXID), 0) +++ )) +++ { +++ local_newmask = *set; +++ __sigdelset (&local_newmask, SIGCANCEL); +++ __sigdelset (&local_newmask, SIGSETXID); +++ set = &local_newmask; +++ } +++ +++ rv = INLINE_SYSCALL (sigprocmask, 3, how, set, oset); +++#ifdef BUILD_AS_pthread_sigmask +++ return rv; +++} +++#else +++ if (rv) +++ { +++ errno = rv; +++ return -1; +++ } +++ return 0; +++} +++weak_alias (__sigprocmask, sigprocmask) +++#endif ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fbtl/sigtimedwait.c ++@@ -0,0 +1,70 @@ +++/* Copyright (C) 1997-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 +++ . */ +++ +++#include +++#include +++#include +++ +++#include +++#include +++#include +++ +++static int +++do_sigtimedwait (const sigset_t *set, siginfo_t *info, +++ const struct timespec *timeout) +++{ +++#ifdef SIGCANCEL +++ sigset_t tmpset; +++ if (set != NULL +++ && (__builtin_expect (__sigismember (set, SIGCANCEL), 0) +++# ifdef SIGSETXID +++ || __builtin_expect (__sigismember (set, SIGSETXID), 0) +++# endif +++ )) +++ { +++ /* Create a temporary mask without the bit for SIGCANCEL set. */ +++ tmpset = *set; +++ __sigdelset (&tmpset, SIGCANCEL); +++# ifdef SIGSETXID +++ __sigdelset (&tmpset, SIGSETXID); +++# endif +++ set = &tmpset; +++ } +++#endif +++ +++ return INLINE_SYSCALL (sigtimedwait, 3, set, info, timeout); +++} +++ +++ +++/* Return any pending signal or wait for one for the given time. */ +++int +++__sigtimedwait (const sigset_t *set, siginfo_t *info, +++ const struct timespec *timeout) +++{ +++ if (SINGLE_THREAD_P) +++ return do_sigtimedwait (set, info, timeout); +++ +++ int oldtype = LIBC_CANCEL_ASYNC (); +++ +++ int result = do_sigtimedwait (set, info, timeout); +++ +++ LIBC_CANCEL_RESET (oldtype); +++ +++ return result; +++} +++libc_hidden_def (__sigtimedwait) +++weak_alias (__sigtimedwait, sigtimedwait) ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fbtl/sigwait.c ++@@ -0,0 +1,76 @@ +++/* Copyright (C) 1997-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 +++ . */ +++ +++#include +++#include +++#define __need_NULL +++#include +++#include +++ +++#include +++#include +++#include +++ +++ +++/* Return any pending signal or wait for one for the given time. */ +++static int +++do_sigwait (const sigset_t *set, int *sig) +++{ +++ int ret; +++ +++#ifdef SIGCANCEL +++ sigset_t tmpset; +++ if (set != NULL +++ && (__builtin_expect (__sigismember (set, SIGCANCEL), 0) +++# ifdef SIGSETXID +++ || __builtin_expect (__sigismember (set, SIGSETXID), 0) +++# endif +++ )) +++ { +++ /* Create a temporary mask without the bit for SIGCANCEL set. */ +++ tmpset = *set; +++ __sigdelset (&tmpset, SIGCANCEL); +++# ifdef SIGSETXID +++ __sigdelset (&tmpset, SIGSETXID); +++# endif +++ set = &tmpset; +++ } +++#endif +++ do { +++ ret = INLINE_SYSCALL (sigwait, 2, set, sig); +++ } while (ret == EINTR); +++ +++ return ret; +++} +++ +++int +++__sigwait (const sigset_t *set, int *sig) +++{ +++ if (SINGLE_THREAD_P) +++ return do_sigwait (set, sig); +++ +++ int oldtype = LIBC_CANCEL_ASYNC (); +++ +++ int result = do_sigwait (set, sig); +++ +++ LIBC_CANCEL_RESET (oldtype); +++ +++ return result; +++} +++libc_hidden_def (__sigwait) +++weak_alias (__sigwait, sigwait) +++strong_alias (__sigwait, __libc_sigwait) ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fbtl/sigwaitinfo.c ++@@ -0,0 +1,72 @@ +++/* Copyright (C) 1997-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 +++ . */ +++ +++#include +++#include +++#define __need_NULL +++#include +++#include +++ +++#include +++#include +++#include +++ +++ +++static int +++do_sigwaitinfo (const sigset_t *set, siginfo_t *info) +++{ +++#ifdef SIGCANCEL +++ sigset_t tmpset; +++ if (set != NULL +++ && (__builtin_expect (__sigismember (set, SIGCANCEL), 0) +++# ifdef SIGSETXID +++ || __builtin_expect (__sigismember (set, SIGSETXID), 0) +++# endif +++ )) +++ { +++ /* Create a temporary mask without the bit for SIGCANCEL set. */ +++ tmpset = *set; +++ __sigdelset (&tmpset, SIGCANCEL); +++# ifdef SIGSETXID +++ __sigdelset (&tmpset, SIGSETXID); +++# endif +++ set = &tmpset; +++ } +++#endif +++ +++ return INLINE_SYSCALL (sigwaitinfo, 2, set, info); +++} +++ +++ +++/* Return any pending signal or wait for one for the given time. */ +++int +++__sigwaitinfo (const sigset_t *set, siginfo_t *info) +++{ +++ if (SINGLE_THREAD_P) +++ return do_sigwaitinfo (set, info); +++ +++ int oldtype = LIBC_CANCEL_ASYNC (); +++ +++ int result = do_sigwaitinfo (set, info); +++ +++ LIBC_CANCEL_RESET (oldtype); +++ +++ return result; +++} +++libc_hidden_def (__sigwaitinfo) +++weak_alias (__sigwaitinfo, sigwaitinfo) +++strong_alias (__sigwaitinfo, __libc_sigwaitinfo) ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fbtl/sleep.c ++@@ -0,0 +1,2 @@ +++#include +++#include "../sleep.c" ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fbtl/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 +++ +++/* 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/sysdeps/unix/bsd/bsd4.4/kfreebsd/fbtl/structsem.sym ++@@ -0,0 +1,12 @@ +++#include +++#include +++#include +++#include +++#include "internaltypes.h" +++ +++-- +++ +++VALUE offsetof (struct new_sem, value) +++PRIVATE offsetof (struct new_sem, private) +++NWAITERS offsetof (struct new_sem, nwaiters) +++SEM_VALUE_MAX SEM_VALUE_MAX ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fbtl/sysconf.c ++@@ -0,0 +1,70 @@ +++/* 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 +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++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: +++ { +++ clockid_t clock_id; +++ /* try whether we have a syscall available */ +++ if ( ENOSYS != INLINE_SYSCALL(clock_getcpuclockid2, 3, 0, CPUCLOCK_WHICH_TID, &clock_id)) +++ return 200809L; +++ else +++ return -1; +++ } +++ 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 ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fbtl/timer_create.c ++@@ -0,0 +1,165 @@ +++/* Copyright (C) 2003,2004, 2007, 2009, 2012 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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 +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include "kernel-posix-timers.h" +++#include "kernel-posix-cpu-timers.h" +++ +++ +++int +++timer_create (clockid_t clock_id, struct sigevent *evp, timer_t *timerid) +++{ +++ { +++ /* 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_int = __kfreebsd_timer_ptr2id (newp); +++ +++ evp = &local_evp; +++ } +++ +++ kernel_timer_t ktimerid; +++ int retval = INLINE_SYSCALL (ktimer_create, 3, clock_id, evp, +++ &ktimerid); +++ +++ { +++ +++ 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; +++ } +++ } +++ else +++ { +++ { +++ /* 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; +++ } +++ } +++ } +++} ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fbtl/timer_delete.c ++@@ -0,0 +1,70 @@ +++/* Copyright (C) 2003, 2007, 2012 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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 +++#include +++#include +++#include +++#include +++#include "kernel-posix-timers.h" +++ +++ +++int +++timer_delete (timer_t timerid) +++{ +++ 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); +++ } +++ +++ /* Free the memory. */ +++ (void) __kfreebsd_timer_free (kt); +++ +++ return 0; +++ } +++ +++ /* The kernel timer is not known or something else bad happened. +++ Return the error. */ +++ return -1; +++} ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fbtl/timer_getoverr.c ++@@ -0,0 +1,36 @@ +++/* Copyright (C) 2003, 2012 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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 +++#include +++#include +++#include +++#include "kernel-posix-timers.h" +++ +++ +++int +++timer_getoverrun (timer_t timerid) +++{ +++ struct timer *kt = __kfreebsd_timer_id2ptr (timerid); +++ if (! kt) +++ return -1; +++ +++ /* Get the information from the kernel. */ +++ return INLINE_SYSCALL (ktimer_getoverrun, 1, kt->ktimerid); +++} ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fbtl/timer_gettime.c ++@@ -0,0 +1,37 @@ +++/* Copyright (C) 2003, 2012 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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 +++#include +++#include +++#include +++#include +++#include "kernel-posix-timers.h" +++ +++ +++int +++timer_gettime (timer_t timerid, struct itimerspec *value) +++{ +++ struct timer *kt = __kfreebsd_timer_id2ptr (timerid); +++ if (! kt) +++ return -1; +++ +++ /* Delete the kernel timer object. */ +++ return INLINE_SYSCALL (ktimer_gettime, 2, kt->ktimerid, value); +++} ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fbtl/timer_routines.c ++@@ -0,0 +1,201 @@ +++/* 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 , 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 +++#include +++#include +++#include +++#include +++#include +++#include +++#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; +++}; +++ +++ +++/* 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); +++ +++ INLINE_SYSCALL (sigprocmask, 3, 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. */ +++ /* but direct interface to kernel does not do such things */ +++ +++ int oldtype = LIBC_CANCEL_ASYNC (); +++ +++ int result = INLINE_SYSCALL (sigwaitinfo, 2, &ss, &si); +++ +++ 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. */ +++pid_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); +++ INLINE_SYSCALL (sigprocmask, 3, 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. */ +++ INLINE_SYSCALL (sigprocmask, 3, 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); +++} ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fbtl/timer_settime.c ++@@ -0,0 +1,39 @@ +++/* Copyright (C) 2003, 2012 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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 +++#include +++#include +++#include +++#include +++#include "kernel-posix-timers.h" +++ +++int +++timer_settime (timer_t timerid, int flags, const struct itimerspec *value, +++ struct itimerspec *ovalue) +++{ +++ struct timer *kt = __kfreebsd_timer_id2ptr (timerid); +++ if (! kt) +++ return -1; +++ +++ /* Set the kernel timer object. */ +++ return INLINE_SYSCALL (ktimer_settime, 4, kt->ktimerid, flags, +++ value, ovalue); +++ +++} ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fbtl/unregister-atfork.c ++@@ -0,0 +1,120 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++ +++ +++void +++__unregister_atfork (void *dso_handle) +++{ +++ /* Check whether there is any entry in the list which we have to +++ remove. It is likely that this is not the case so don't bother +++ getting the lock. +++ +++ We do not worry about other threads adding entries for this DSO +++ right this moment. If this happens this is a race and we can do +++ whatever we please. The program will crash anyway seen. */ +++ struct fork_handler *runp = __fork_handlers; +++ struct fork_handler *lastp = NULL; +++ +++ while (runp != NULL) +++ if (runp->dso_handle == dso_handle) +++ break; +++ else +++ { +++ lastp = runp; +++ runp = runp->next; +++ } +++ +++ if (runp == NULL) +++ /* Nothing to do. */ +++ return; +++ +++ /* Get the lock to not conflict with additions or deletions. Note +++ that there couldn't have been another thread deleting something. +++ The __unregister_atfork function is only called from the +++ dlclose() code which itself serializes the operations. */ +++ lll_lock (__fork_lock, LLL_PRIVATE); +++ +++ /* We have to create a new list with all the entries we don't remove. */ +++ struct deleted_handler +++ { +++ struct fork_handler *handler; +++ struct deleted_handler *next; +++ } *deleted = NULL; +++ +++ /* Remove the entries for the DSO which is unloaded from the list. +++ It's a single linked list so readers are. */ +++ do +++ { +++ again: +++ if (runp->dso_handle == dso_handle) +++ { +++ if (lastp == NULL) +++ { +++ /* We have to use an atomic operation here because +++ __linkin_atfork also uses one. */ +++ if (catomic_compare_and_exchange_bool_acq (&__fork_handlers, +++ runp->next, runp) +++ != 0) +++ { +++ runp = __fork_handlers; +++ goto again; +++ } +++ } +++ else +++ lastp->next = runp->next; +++ +++ /* We cannot overwrite the ->next element now. Put the deleted +++ entries in a separate list. */ +++ struct deleted_handler *newp = alloca (sizeof (*newp)); +++ newp->handler = runp; +++ newp->next = deleted; +++ deleted = newp; +++ } +++ else +++ lastp = runp; +++ +++ runp = runp->next; +++ } +++ while (runp != NULL); +++ +++ /* Release the lock. */ +++ lll_unlock (__fork_lock, LLL_PRIVATE); +++ +++ /* Walk the list of all entries which have to be deleted. */ +++ while (deleted != NULL) +++ { +++ /* We need to be informed by possible current users. */ +++ deleted->handler->need_signal = 1; +++ /* Make sure this gets written out first. */ +++ atomic_write_barrier (); +++ +++ /* Decrement the reference counter. If it does not reach zero +++ wait for the last user. */ +++ atomic_decrement (&deleted->handler->refcntr); +++ unsigned int val; +++ while ((val = deleted->handler->refcntr) != 0) +++ lll_futex_wait (&deleted->handler->refcntr, val, LLL_PRIVATE); +++ +++ deleted = deleted->next; +++ } +++} ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fbtl/unwindbuf.sym ++@@ -0,0 +1,7 @@ +++#include +++#include +++ +++-- +++ +++UNWINDBUFSIZE sizeof (__pthread_unwind_buf_t) +++UWJMPBUF offsetof (__pthread_unwind_buf_t, __cancel_jmp_buf) ++--- /dev/null +++++ b/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 +++#include +++#include /* Must come before . */ +++#include +++#include +++ +++#include +++ +++ +++#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/sysdeps/unix/bsd/bsd4.4/kfreebsd/fdatasync.c ++@@ -0,0 +1,32 @@ +++/* 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 +++ . */ +++ +++#include +++#include +++ +++int __libc_fsync (int fd); +++libc_hidden_proto (__libc_fsync) +++ +++/* Synchronize at least the data part of a file with the underlying +++ media. */ +++int +++fdatasync (int fildes) +++{ +++ return __libc_fsync (fildes); +++} +++ +++LIBC_CANCEL_HANDLED (); /* fsync handles our cancellation. */ ++--- /dev/null +++++ b/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 , 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 +++#include +++#include +++ +++#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/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 , 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 +++#include +++#include +++ +++#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/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 +++ +++#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/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 , 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 +++ +++#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/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 +++ +++#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/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 , 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 +++ +++#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/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 , 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 +++#include +++ +++#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/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 , 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 +++#include +++ +++#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/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/sysdeps/unix/bsd/bsd4.4/kfreebsd/futimesat.c ++@@ -0,0 +1,44 @@ +++/* 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 +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++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 (int fd, const char *file, const struct timeval tvp[2]) +++{ +++ if (file == NULL) +++ return __futimes (fd, tvp); +++ +++ return INLINE_SYSCALL (futimesat, 3, fd, file, tvp); +++} ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fxstat.c ++@@ -0,0 +1,47 @@ +++/* 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 +++#include +++#include +++ +++#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, &buf16); +++ if (result == 0) +++ stat16_to_stat (&buf16, buf); +++ return result; +++ } +++ else if (__builtin_expect (vers == _STAT_VER_stat, 1)) +++ return __syscall_fstat (fd, (struct stat16 *) buf); +++ else +++ { +++ __set_errno (EINVAL); +++ return -1; +++ } +++} +++hidden_def (__fxstat) +++ +++weak_alias (__fxstat, _fxstat) ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fxstat64.c ++@@ -0,0 +1,43 @@ +++/* 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 +++#include +++#include +++ +++#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, &buf16); +++ if (result == 0) +++ stat16_to_stat64 (&buf16, buf); +++ return result; +++ } +++ else +++ { +++ __set_errno (EINVAL); +++ return -1; +++ } +++} +++hidden_def (__fxstat64) ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fxstatat.c ++@@ -0,0 +1,66 @@ +++/* 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 +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++#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) +++{ +++ int result; +++ +++ if (__builtin_expect (vers == _STAT_VER, 1)) +++ { +++ struct stat16 buf16; +++ result = +++ INLINE_SYSCALL (fstatat, 4, fd, file, +++ &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, file, +++ (struct stat16 *) st, flag); +++ } +++ else +++ { +++ __set_errno (EINVAL); +++ return -1; +++ } +++ return result; +++} +++ +++libc_hidden_def (__fxstatat) ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/fxstatat64.c ++@@ -0,0 +1,60 @@ +++/* 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 +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++#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) +++{ +++ int result; +++ +++ if (__builtin_expect (vers == _STAT_VER, 1)) +++ { +++ struct stat16 buf16; +++ result = +++ INLINE_SYSCALL (fstatat, 4, fd, file, +++ &buf16, flag); +++ if (result == 0) +++ stat16_to_stat64 (&buf16, st); +++ } +++ else +++ { +++ __set_errno (EINVAL); +++ return -1; +++ } +++ return result; +++} +++ +++libc_hidden_def (__fxstatat64) ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/gai_sigqueue.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 +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++ +++#include +++#include +++ +++#include +++ +++int +++internal_function +++__gai_sigqueue (int sig, const union sigval val, pid_t caller_pid) +++{ +++#if !IS_IN(libc) +++ return sigqueue(caller_pid, sig, val); +++#else +++ return __sigqueue(caller_pid, sig, val); +++#endif +++} ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/getcwd.c ++@@ -0,0 +1,103 @@ +++/* 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 , 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 +++#include +++#include +++#include +++#include +++ +++#include +++ +++/* If we compile the file for use in ld.so we don't need the feature +++ that getcwd() allocates the buffers itself. */ +++#if IS_IN (rtld) +++# define NO_ALLOCATION 1 +++#endif +++ +++/* 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 *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; +++ } +++#ifdef NO_ALLOCATION +++ buf = NULL; +++#else +++ buf = (char *) malloc (len); +++#endif +++ if (__builtin_expect (buf == NULL, 0)) +++ { +++ __set_errno (ENOMEM); +++ return NULL; +++ } +++ } +++ else +++ { +++ if (size < len) +++ { +++ __set_errno (ERANGE); +++ return NULL; +++ } +++ +++ if (buf == NULL) +++ { +++#ifdef NO_ALLOCATION +++ buf = NULL; +++#else +++ buf = (char *) malloc (size); +++#endif +++ 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 ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/getdents.c ++@@ -0,0 +1,43 @@ +++/* 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 , 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 +++#include +++#include +++#include +++ +++/* 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); +++} +++ +++/* Since 'struct dirent64' == 'struct dirent', the functions '__getdents64' +++ and '__getdents' are equal. */ +++strong_alias (__getdents, __getdents64) ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/getdents64.c ++@@ -0,0 +1 @@ +++/* We have the function getdirentries64 in file getdirentries64.c. */ ++--- /dev/null +++++ b/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 , 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 +++#include +++#include +++#include +++#include +++ +++#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/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 ++--- /dev/null +++++ b/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 +++#include +++#include +++ +++/* 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/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 +++#include +++ +++#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/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 , 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 +++#include +++ +++#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/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 , 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 +++#include +++ +++/* 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/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 , 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 +++#include +++#include +++ +++/* 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/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 , 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 +++#include +++ +++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/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 , 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 +++#include +++#include +++#include +++#include +++ +++/* 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/sysdeps/unix/bsd/bsd4.4/kfreebsd/getlogin_r.c ++@@ -0,0 +1,73 @@ +++/* 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 , 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 +++#include +++#include +++#include +++#include +++#include +++ +++/* 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 errno; +++ /* 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 ERANGE; +++ } +++} +++libc_hidden_def (__getlogin_r) +++weak_alias (__getlogin_r, getlogin_r) +++libc_hidden_weak (getlogin_r) +++ ++--- /dev/null +++++ b/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 , 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 +++#include +++#include +++ +++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/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 , 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 +++#include +++#include +++ +++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/sysdeps/unix/bsd/bsd4.4/kfreebsd/getosreldate.c ++@@ -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. +++ */ +++ +++#include +++#include +++#include +++#include +++ +++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; +++ +++ 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/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/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 , 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 +++#include +++ +++/* 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/sysdeps/unix/bsd/bsd4.4/kfreebsd/getpt.c ++@@ -0,0 +1,51 @@ +++/* 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 +++#include +++#include +++#include +++#include +++#include +++ +++/* The system call does not change the controlling terminal, so we have +++ * to do it ourselves. */ +++extern int __syscall_posix_openpt (int oflag); +++libc_hidden_proto (__syscall_posix_openpt) +++ +++int +++__posix_openpt (int oflag) +++{ +++ int fd = INLINE_SYSCALL (posix_openpt, 1, oflag); +++ if (fd >= 0) +++ { +++ if (!(oflag & O_NOCTTY)) +++ __ioctl (fd, TIOCSCTTY, NULL); +++ } +++ return fd; +++} +++ +++weak_alias (__posix_openpt, posix_openpt) +++ +++int +++__getpt (void) +++{ +++ return __posix_openpt (O_RDWR | O_NOCTTY); +++} +++ +++weak_alias (__getpt, getpt) ++--- /dev/null +++++ b/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/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 , 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 +++#include +++#include +++ +++ +++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/sysdeps/unix/bsd/bsd4.4/kfreebsd/getvfsbyname.c ++@@ -0,0 +1,69 @@ +++/* +++ * 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 +++#include +++#include +++#include +++#include +++#include +++ +++/* +++ * Given a filesystem name, determine if it is resident in the kernel, +++ * and if it is resident, return its xvfsconf structure. +++ */ +++int +++__getvfsbyname(const char *fsnamen, 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/sysdeps/unix/bsd/bsd4.4/kfreebsd/glob.c ++@@ -0,0 +1,3 @@ +++/* 'glob64' is different from 'glob', because +++ 'struct stat64' != 'struct stat'. */ +++#include ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/glob64.c ++@@ -0,0 +1,3 @@ +++/* 'glob64' is different from 'glob', because +++ 'struct stat64' != 'struct stat'. */ +++#include ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/globfree.c ++@@ -0,0 +1,3 @@ +++/* 'globfree64' is different from 'globfree', because +++ 'struct stat64' != 'struct stat'. */ +++#include ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/globfree64.c ++@@ -0,0 +1,3 @@ +++/* 'globfree64' is different from 'globfree', because +++ 'struct stat64' != 'struct stat'. */ +++#include ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/grantpt.c ++@@ -0,0 +1,36 @@ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++#include "pty-private.h" +++ +++int __syscall_closefrom(int fd); +++libc_hidden_proto (__syscall_closefrom) +++ +++/* Close all file descriptors except the one specified. */ +++static void +++close_all_fds (void) +++{ +++ int i; +++ +++ for (i = 0 ; i < PTY_FILENO; i++) +++ close_not_cancel_no_status (i); +++ +++ INLINE_SYSCALL(closefrom, 1, PTY_FILENO + 1L); +++ +++ int nullfd = open_not_cancel_2 (_PATH_DEVNULL, O_RDONLY); +++ assert (nullfd == STDIN_FILENO); +++ nullfd = open_not_cancel_2 (_PATH_DEVNULL, O_WRONLY); +++ assert (nullfd == STDOUT_FILENO); +++ __dup2 (STDOUT_FILENO, STDERR_FILENO); +++} +++#define CLOSE_ALL_FDS() close_all_fds() +++ +++#include ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/gtty.c ++@@ -0,0 +1,2 @@ +++/* use stub only variant */ +++#include ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/Implies ++@@ -0,0 +1 @@ +++unix/bsd/bsd4.4/kfreebsd/x86 ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/Makefile ++@@ -0,0 +1,27 @@ +++# The default ABI is 32. +++default-abi := 32 +++ +++# 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 and . +++sysdep_routines += i386_get_ioperm i386_set_ioperm iopl +++# For . +++sysdep_routines += i386_vm86 +++# For . +++sysdep_routines += i386_get_ldt i386_set_ldt +++endif +++ +++# special flag to avoid usage of xmm registers in ld.so +++ifeq ($(subdir),io) +++CFLAGS-rtld-fxstat64.os += -mno-sse -mno-mmx +++endif ++--- /dev/null +++++ b/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/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/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 directly; include 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 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/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 directly; include 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 and 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/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/c++-types.data ++@@ -0,0 +1,67 @@ +++blkcnt64_t:x +++blkcnt_t:x +++blksize_t:j +++caddr_t:Pc +++clockid_t:i +++clock_t:i +++daddr_t:x +++dev_t:j +++fd_mask:l +++fsblkcnt64_t:y +++fsblkcnt_t:m +++fsfilcnt64_t:y +++fsfilcnt_t:m +++fsid_t:8__fsid_t +++gid_t:j +++id_t:j +++ino64_t:y +++ino_t:j +++int16_t:s +++int32_t:i +++int64_t:x +++int8_t:a +++intptr_t:i +++key_t:l +++loff_t:x +++mode_t:t +++nlink_t:t +++off64_t:x +++off_t:x +++pid_t:i +++pthread_attr_t:14pthread_attr_t +++pthread_barrier_t:17pthread_barrier_t +++pthread_barrierattr_t:21pthread_barrierattr_t +++pthread_cond_t:14pthread_cond_t +++pthread_condattr_t:18pthread_condattr_t +++pthread_key_t:j +++pthread_mutex_t:15pthread_mutex_t +++pthread_mutexattr_t:19pthread_mutexattr_t +++pthread_once_t:i +++pthread_rwlock_t:16pthread_rwlock_t +++pthread_rwlockattr_t:20pthread_rwlockattr_t +++pthread_spinlock_t:i +++pthread_t:m +++quad_t:x +++register_t:i +++rlim64_t:x +++rlim_t:x +++sigset_t:10__sigset_t +++size_t:j +++socklen_t:j +++ssize_t:i +++suseconds_t:l +++time_t:l +++u_char:h +++uid_t:j +++uint:j +++u_int:j +++u_int16_t:t +++u_int32_t:j +++u_int64_t:y +++u_int8_t:h +++ulong:m +++u_long:m +++u_quad_t:y +++useconds_t:j +++ushort:t +++u_short:t ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/dl-machine.h ++@@ -0,0 +1,80 @@ +++/* 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 +++ +++#ifndef _DL_MACHINE_KFREEBSD +++#define _DL_MACHINE_KFREEBSD +++ +++static inline void __attribute__ ((unused)) +++dl_platform_kfreebsd_i386_init (void) +++{ +++ /* This calls cpuid and and fills dl_x86_cpu_features */ +++ DL_PLATFORM_INIT; +++ +++ /* we don't have reasonable AT_PLATFORM from kernel +++ try to use cpuid to get one, also guess AT_HWCAP */ +++ GLRO(dl_hwcap) = GLRO(dl_x86_cpu_features).cpuid[COMMON_CPUID_INDEX_1].edx; +++ switch (GLRO(dl_hwcap) & 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]; +++ } +++} +++ +++#undef DL_PLATFORM_INIT +++#define DL_PLATFORM_INIT dl_platform_kfreebsd_i386_init () +++ +++#endif ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/dl-procinfo.h ++@@ -0,0 +1 @@ +++#include ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/exit-thread.h ++@@ -0,0 +1,49 @@ +++/* Call to terminate the current thread. GNU/kFreeBSD i386 version +++ Copyright (C) 2015 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 +++ . */ +++ +++#include +++ +++/* This causes the current thread to exit, without affecting other +++ threads in the process if there are any. If there are no other +++ threads left, then this has the effect of _exit (0). */ +++ +++static inline void __attribute__ ((noreturn, always_inline, unused)) +++__exit_thread (void) +++{ +++ /* Doing this in a loop is mostly just to satisfy the compiler that the +++ function really qualifies as noreturn. It also means that in some +++ pathological situation where the system call does not get made or does +++ not work, the thread will simply spin rather than running off the end +++ of the caller and doing unexpectedly strange things. */ +++ while (1) +++ { +++ asm volatile ( +++ "movl %%gs:0, %%edx\n\t" +++ "addl %0, %%edx\n\t" /* should be KTID, but they are at the same place anyway */ +++ "movl %%edx, 4(%%esp)\n\t" +++ "movl %1, %%eax\n\t" +++ "int $0x80\n\t" +++ /* It does return only for last thread of process */ +++ "movl %2, %%eax\n\t" +++ "movl $0, 4(%%esp)\n\t" +++ "int $0x80\n\t" +++ : +++ : "i" (TID), "i" (SYS_ify(thr_exit)), "i" (SYS_ify(exit)) +++ : "memory", "cc"); +++ } +++} ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/fbtl/Implies ++@@ -0,0 +1 @@ +++unix/bsd/bsd4.4/kfreebsd/x86/fbtl ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/fbtl/sysdep-cancel.h ++@@ -0,0 +1,108 @@ +++/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Jakub Jelinek , 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 +++#include +++#ifndef __ASSEMBLER__ +++# include +++#endif +++ +++#if IS_IN (libc) || IS_IN (libpthread) || IS_IN (librt) +++ +++# undef PSEUDO +++# define PSEUDO(name, syscall_name, args) \ +++ .text; \ +++ ENTRY (name) \ +++ cmpl $0, %gs:MULTIPLE_THREADS_OFFSET; \ +++ jne L(pseudo_cancel); \ +++ .type __##syscall_name##_nocancel,@function; \ +++ .globl __##syscall_name##_nocancel; \ +++ __##syscall_name##_nocancel: \ +++ DO_CALL (syscall_name, args); \ +++ jb SYSCALL_ERROR_LABEL; \ +++ ret; \ +++ .size __##syscall_name##_nocancel,.-__##syscall_name##_nocancel; \ +++ 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) +++ +++# if IS_IN (libpthread) +++# define CENABLE call __pthread_enable_asynccancel; +++# define CDISABLE call __pthread_disable_asynccancel +++# elif IS_IN (libc) +++# define CENABLE call __libc_enable_asynccancel; +++# define CDISABLE call __libc_disable_asynccancel +++# elif IS_IN (librt) +++# define CENABLE call __librt_enable_asynccancel; +++# define CDISABLE call __librt_disable_asynccancel +++# else +++# error Unsupported library +++# endif +++ +++ +++# ifndef __ASSEMBLER__ +++# define SINGLE_THREAD_P \ +++ __builtin_expect (THREAD_GETMEM (THREAD_SELF, \ +++ header.multiple_threads) == 0, 1) +++# else +++# define SINGLE_THREAD_P cmpl $0, %gs:MULTIPLE_THREADS_OFFSET +++# endif +++ +++#elif !defined __ASSEMBLER__ +++ +++# define SINGLE_THREAD_P (1) +++# define NO_CANCELLATION 1 +++ +++#endif +++ +++#ifndef __ASSEMBLER__ +++# define RTLD_SINGLE_THREAD_P \ +++ __builtin_expect (THREAD_GETMEM (THREAD_SELF, \ +++ header.multiple_threads) == 0, 1) +++#endif ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/fbtl/tls.h ++@@ -0,0 +1,100 @@ +++/* Definition for thread-local data handling. fbtl/i386 version. +++ Copyright (C) 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. */ +++ +++#ifndef _FREEBSD_TLS_H +++#define _FREEBSD_TLS_H +++ +++#include +++ +++# ifndef __ASSEMBLER__ +++ +++#undef TLS_INIT_TP +++#undef TLS_SETUP_GS_SEGMENT +++#undef TLS_GET_GS +++#undef TLS_SET_GS +++#undef __NR_set_thread_area +++ +++#include +++#include +++ +++ +++/* 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) \ +++ ({ \ +++ 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); \ +++ }) +++ +++#if 0 +++/* in Linux one; */ +++/* Magic for libthread_db to know how to do THREAD_SELF. */ +++# define DB_THREAD_SELF \ +++ REGISTER_THREAD_AREA (32, offsetof (struct user_regs_struct, xgs), 3) \ +++ REGISTER_THREAD_AREA (64, 26 * 8, 3) /* x86-64's user_regs_struct->gs */ +++#else +++/* # warning proper variant needed */ +++# undef DB_THREAD_SELF_INCLUDE +++# undef DB_THREAD_SELF +++# define DB_THREAD_SELF \ +++ REGISTER_THREAD_AREA (32, 10 * 4, 3) /* offsetof (struct user_regs_struct, xgs) */ \ +++ REGISTER_THREAD_AREA (64, 26 * 8, 3) /* x86-64's user_regs_struct->gs */ +++#endif +++ +++/* in fact this is OS-specific, but we do not have better header for it */ +++#define NEED_STACK_SIZE_FOR_PTH_CREATE 1 +++ +++#endif /* __ASSEMBLER__ */ +++ +++#endif /* tls.h */ ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/get_clockfreq.c ++@@ -0,0 +1 @@ +++#include ++--- /dev/null +++++ b/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 +++ +++.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/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 +++#include +++ +++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/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 +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public +++ License as published by the Free Software Foundation; either +++ version 2.1 of the License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General Public License for more details. +++ +++ You should have received a copy of the GNU Lesser General Public +++ License along with the GNU C Library; if not, write to the Free +++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +++ 02111-1307 USA. */ +++ +++#include +++#include +++#include +++ +++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/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 +++#include +++ +++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/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 +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public +++ License as published by the Free Software Foundation; either +++ version 2.1 of the License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General Public License for more details. +++ +++ You should have received a copy of the GNU Lesser General Public +++ License along with the GNU C Library; if not, write to the Free +++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +++ 02111-1307 USA. */ +++ +++#include +++#include +++#include +++ +++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/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 +++#include +++ +++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/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 +++ +++/* but compare-and-swap is always available */ +++ +++#undef TEST_FOR_COMPARE_AND_SWAP +++ ++--- /dev/null +++++ b/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 +++ +++/* but compare-and-swap is always available */ +++ +++#undef TEST_FOR_COMPARE_AND_SWAP +++ ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/i686/fbtl/tls.h ++@@ -0,0 +1,2 @@ +++/* no special TLS_GET_GS and TLS_SET_GS, as we do not define them at all */ +++#include ++--- /dev/null +++++ b/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 +++ +++/* but compare-and-swap is always available */ +++ +++#undef TEST_FOR_COMPARE_AND_SWAP +++ ++--- /dev/null +++++ b/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 +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public +++ License as published by the Free Software Foundation; either +++ version 2.1 of the License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General Public License for more details. +++ +++ You should have received a copy of the GNU Lesser General Public +++ License along with the GNU C Library; if not, write to the Free +++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +++ 02111-1307 USA. */ +++ +++#include +++#include /* open */ +++#include /* 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/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/ld.abilist ++@@ -0,0 +1,11 @@ +++GLIBC_2.3 GLIBC_2.3 A +++GLIBC_2.3 ___tls_get_addr F +++GLIBC_2.3 __libc_stack_end D 0x4 +++GLIBC_2.3 __tls_get_addr F +++GLIBC_2.3 _dl_mcount F +++GLIBC_2.3 _r_debug D 0x14 +++GLIBC_2.3 calloc F +++GLIBC_2.3 free F +++GLIBC_2.3 malloc F +++GLIBC_2.3 realloc F +++GLIBC_2.4 GLIBC_2.4 A ++--- /dev/null +++++ b/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 +++ +++#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/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/libBrokenLocale.abilist ++@@ -0,0 +1,2 @@ +++GLIBC_2.3 GLIBC_2.3 A +++GLIBC_2.3 __ctype_get_mb_cur_max F ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/libanl.abilist ++@@ -0,0 +1,5 @@ +++GLIBC_2.3 GLIBC_2.3 A +++GLIBC_2.3 gai_cancel F +++GLIBC_2.3 gai_error F +++GLIBC_2.3 gai_suspend F +++GLIBC_2.3 getaddrinfo_a F ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/libc.abilist ++@@ -0,0 +1,2207 @@ +++GLIBC_2.10 GLIBC_2.10 A +++GLIBC_2.10 __cxa_at_quick_exit F +++GLIBC_2.10 __posix_getopt F +++GLIBC_2.10 accept4 F +++GLIBC_2.10 devname F +++GLIBC_2.10 devname_r F +++GLIBC_2.10 endsgent F +++GLIBC_2.10 fgetsgent F +++GLIBC_2.10 fgetsgent_r F +++GLIBC_2.10 getsgent F +++GLIBC_2.10 getsgent_r F +++GLIBC_2.10 getsgnam F +++GLIBC_2.10 getsgnam_r F +++GLIBC_2.10 kenv F +++GLIBC_2.10 malloc_info F +++GLIBC_2.10 preadv F +++GLIBC_2.10 preadv64 F +++GLIBC_2.10 psiginfo F +++GLIBC_2.10 putsgent F +++GLIBC_2.10 pwritev F +++GLIBC_2.10 pwritev64 F +++GLIBC_2.10 quick_exit F +++GLIBC_2.10 register_printf_modifier F +++GLIBC_2.10 register_printf_specifier F +++GLIBC_2.10 register_printf_type F +++GLIBC_2.10 setsgent F +++GLIBC_2.10 sgetsgent F +++GLIBC_2.10 sgetsgent_r F +++GLIBC_2.10 sysctlnametomib F +++GLIBC_2.11 GLIBC_2.11 A +++GLIBC_2.11 __longjmp_chk F +++GLIBC_2.11 _sys_errlist D 0x178 +++GLIBC_2.11 _sys_nerr D 0x4 +++GLIBC_2.11 execvpe F +++GLIBC_2.11 lchflags F +++GLIBC_2.11 mkostemps F +++GLIBC_2.11 mkostemps64 F +++GLIBC_2.11 mkstemps F +++GLIBC_2.11 mkstemps64 F +++GLIBC_2.11 sys_errlist D 0x178 +++GLIBC_2.11 sys_nerr D 0x4 +++GLIBC_2.13 GLIBC_2.13 A +++GLIBC_2.13 __fentry__ F +++GLIBC_2.13 jail_attach F +++GLIBC_2.13 jail_get F +++GLIBC_2.13 jail_remove F +++GLIBC_2.13 jail_set F +++GLIBC_2.14 GLIBC_2.14 A +++GLIBC_2.14 syncfs F +++GLIBC_2.15 GLIBC_2.15 A +++GLIBC_2.15 __fdelt_chk F +++GLIBC_2.15 __fdelt_warn F +++GLIBC_2.15 posix_spawn F +++GLIBC_2.15 posix_spawnp F +++GLIBC_2.15 scandirat F +++GLIBC_2.15 scandirat64 F +++GLIBC_2.16 GLIBC_2.16 A +++GLIBC_2.16 __getauxval F +++GLIBC_2.16 __poll_chk F +++GLIBC_2.16 __ppoll_chk F +++GLIBC_2.16 aligned_alloc F +++GLIBC_2.16 c16rtomb F +++GLIBC_2.16 c32rtomb F +++GLIBC_2.16 getauxval F +++GLIBC_2.16 mbrtoc16 F +++GLIBC_2.16 mbrtoc32 F +++GLIBC_2.16 timespec_get F +++GLIBC_2.17 GLIBC_2.17 A +++GLIBC_2.17 clock_getcpuclockid F +++GLIBC_2.17 clock_getres F +++GLIBC_2.17 clock_gettime F +++GLIBC_2.17 clock_nanosleep F +++GLIBC_2.17 clock_settime F +++GLIBC_2.17 recvmmsg F +++GLIBC_2.17 secure_getenv F +++GLIBC_2.17 sendmmsg F +++GLIBC_2.18 GLIBC_2.18 A +++GLIBC_2.18 __cxa_thread_atexit_impl F +++GLIBC_2.18 _sys_errlist D 0x184 +++GLIBC_2.18 _sys_nerr D 0x4 +++GLIBC_2.18 msgctl F +++GLIBC_2.18 semctl F +++GLIBC_2.18 shmctl F +++GLIBC_2.18 sys_errlist D 0x184 +++GLIBC_2.18 sys_nerr D 0x4 +++GLIBC_2.18 waitid F +++GLIBC_2.21 GLIBC_2.21 A +++GLIBC_2.21 __statfs F +++GLIBC_2.22 GLIBC_2.22 A +++GLIBC_2.22 fmemopen F +++GLIBC_2.23 GLIBC_2.23 A +++GLIBC_2.23 fts64_children F +++GLIBC_2.23 fts64_close F +++GLIBC_2.23 fts64_open F +++GLIBC_2.23 fts64_read F +++GLIBC_2.23 fts64_set F +++GLIBC_2.24 GLIBC_2.24 A +++GLIBC_2.24 quick_exit F +++GLIBC_2.25 GLIBC_2.25 A +++GLIBC_2.25 __explicit_bzero_chk F +++GLIBC_2.25 explicit_bzero F +++GLIBC_2.25 getentropy F +++GLIBC_2.25 getrandom F +++GLIBC_2.25 gnu_dev_major F +++GLIBC_2.25 gnu_dev_makedev F +++GLIBC_2.25 gnu_dev_minor F +++GLIBC_2.25 strfromd F +++GLIBC_2.25 strfromf F +++GLIBC_2.25 strfroml F +++GLIBC_2.3 GLIBC_2.3 A +++GLIBC_2.3 _Exit F +++GLIBC_2.3 _IO_2_1_stderr_ D 0x9c +++GLIBC_2.3 _IO_2_1_stdin_ D 0x9c +++GLIBC_2.3 _IO_2_1_stdout_ D 0x9c +++GLIBC_2.3 _IO_adjust_column F +++GLIBC_2.3 _IO_adjust_wcolumn F +++GLIBC_2.3 _IO_default_doallocate F +++GLIBC_2.3 _IO_default_finish F +++GLIBC_2.3 _IO_default_pbackfail F +++GLIBC_2.3 _IO_default_uflow F +++GLIBC_2.3 _IO_default_xsgetn F +++GLIBC_2.3 _IO_default_xsputn F +++GLIBC_2.3 _IO_do_write F +++GLIBC_2.3 _IO_doallocbuf F +++GLIBC_2.3 _IO_fclose F +++GLIBC_2.3 _IO_fdopen F +++GLIBC_2.3 _IO_feof F +++GLIBC_2.3 _IO_ferror F +++GLIBC_2.3 _IO_fflush F +++GLIBC_2.3 _IO_fgetpos F +++GLIBC_2.3 _IO_fgetpos64 F +++GLIBC_2.3 _IO_fgets F +++GLIBC_2.3 _IO_file_attach F +++GLIBC_2.3 _IO_file_close F +++GLIBC_2.3 _IO_file_close_it F +++GLIBC_2.3 _IO_file_doallocate F +++GLIBC_2.3 _IO_file_finish F +++GLIBC_2.3 _IO_file_fopen F +++GLIBC_2.3 _IO_file_init F +++GLIBC_2.3 _IO_file_jumps D 0x54 +++GLIBC_2.3 _IO_file_open F +++GLIBC_2.3 _IO_file_overflow F +++GLIBC_2.3 _IO_file_read F +++GLIBC_2.3 _IO_file_seek F +++GLIBC_2.3 _IO_file_seekoff F +++GLIBC_2.3 _IO_file_setbuf F +++GLIBC_2.3 _IO_file_stat F +++GLIBC_2.3 _IO_file_sync F +++GLIBC_2.3 _IO_file_underflow F +++GLIBC_2.3 _IO_file_write F +++GLIBC_2.3 _IO_file_xsputn F +++GLIBC_2.3 _IO_flockfile F +++GLIBC_2.3 _IO_flush_all F +++GLIBC_2.3 _IO_flush_all_linebuffered F +++GLIBC_2.3 _IO_fopen F +++GLIBC_2.3 _IO_fprintf F +++GLIBC_2.3 _IO_fputs F +++GLIBC_2.3 _IO_fread F +++GLIBC_2.3 _IO_free_backup_area F +++GLIBC_2.3 _IO_free_wbackup_area F +++GLIBC_2.3 _IO_fsetpos F +++GLIBC_2.3 _IO_fsetpos64 F +++GLIBC_2.3 _IO_ftell F +++GLIBC_2.3 _IO_ftrylockfile F +++GLIBC_2.3 _IO_funlockfile F +++GLIBC_2.3 _IO_fwrite F +++GLIBC_2.3 _IO_getc F +++GLIBC_2.3 _IO_getline F +++GLIBC_2.3 _IO_getline_info F +++GLIBC_2.3 _IO_gets F +++GLIBC_2.3 _IO_init F +++GLIBC_2.3 _IO_init_marker F +++GLIBC_2.3 _IO_init_wmarker F +++GLIBC_2.3 _IO_iter_begin F +++GLIBC_2.3 _IO_iter_end F +++GLIBC_2.3 _IO_iter_file F +++GLIBC_2.3 _IO_iter_next F +++GLIBC_2.3 _IO_least_wmarker F +++GLIBC_2.3 _IO_link_in F +++GLIBC_2.3 _IO_list_all D 0x4 +++GLIBC_2.3 _IO_list_lock F +++GLIBC_2.3 _IO_list_resetlock F +++GLIBC_2.3 _IO_list_unlock F +++GLIBC_2.3 _IO_marker_delta F +++GLIBC_2.3 _IO_marker_difference F +++GLIBC_2.3 _IO_padn F +++GLIBC_2.3 _IO_peekc_locked F +++GLIBC_2.3 _IO_popen F +++GLIBC_2.3 _IO_printf F +++GLIBC_2.3 _IO_proc_close F +++GLIBC_2.3 _IO_proc_open F +++GLIBC_2.3 _IO_putc F +++GLIBC_2.3 _IO_puts F +++GLIBC_2.3 _IO_remove_marker F +++GLIBC_2.3 _IO_seekmark F +++GLIBC_2.3 _IO_seekoff F +++GLIBC_2.3 _IO_seekpos F +++GLIBC_2.3 _IO_seekwmark F +++GLIBC_2.3 _IO_setb F +++GLIBC_2.3 _IO_setbuffer F +++GLIBC_2.3 _IO_setvbuf F +++GLIBC_2.3 _IO_sgetn F +++GLIBC_2.3 _IO_sprintf F +++GLIBC_2.3 _IO_sputbackc F +++GLIBC_2.3 _IO_sputbackwc F +++GLIBC_2.3 _IO_sscanf F +++GLIBC_2.3 _IO_str_init_readonly F +++GLIBC_2.3 _IO_str_init_static F +++GLIBC_2.3 _IO_str_overflow F +++GLIBC_2.3 _IO_str_pbackfail F +++GLIBC_2.3 _IO_str_seekoff F +++GLIBC_2.3 _IO_str_underflow F +++GLIBC_2.3 _IO_sungetc F +++GLIBC_2.3 _IO_sungetwc F +++GLIBC_2.3 _IO_switch_to_get_mode F +++GLIBC_2.3 _IO_switch_to_main_wget_area F +++GLIBC_2.3 _IO_switch_to_wbackup_area F +++GLIBC_2.3 _IO_switch_to_wget_mode F +++GLIBC_2.3 _IO_un_link F +++GLIBC_2.3 _IO_ungetc F +++GLIBC_2.3 _IO_unsave_markers F +++GLIBC_2.3 _IO_unsave_wmarkers F +++GLIBC_2.3 _IO_vfprintf F +++GLIBC_2.3 _IO_vfscanf F +++GLIBC_2.3 _IO_vsprintf F +++GLIBC_2.3 _IO_wdefault_doallocate F +++GLIBC_2.3 _IO_wdefault_finish F +++GLIBC_2.3 _IO_wdefault_pbackfail F +++GLIBC_2.3 _IO_wdefault_uflow F +++GLIBC_2.3 _IO_wdefault_xsgetn F +++GLIBC_2.3 _IO_wdefault_xsputn F +++GLIBC_2.3 _IO_wdo_write F +++GLIBC_2.3 _IO_wdoallocbuf F +++GLIBC_2.3 _IO_wfile_jumps D 0x54 +++GLIBC_2.3 _IO_wfile_overflow F +++GLIBC_2.3 _IO_wfile_seekoff F +++GLIBC_2.3 _IO_wfile_sync F +++GLIBC_2.3 _IO_wfile_underflow F +++GLIBC_2.3 _IO_wfile_xsputn F +++GLIBC_2.3 _IO_wmarker_delta F +++GLIBC_2.3 _IO_wsetb F +++GLIBC_2.3 __acl_aclcheck_fd F +++GLIBC_2.3 __acl_aclcheck_file F +++GLIBC_2.3 __acl_delete_fd F +++GLIBC_2.3 __acl_delete_file F +++GLIBC_2.3 __acl_get_fd F +++GLIBC_2.3 __acl_get_file F +++GLIBC_2.3 __acl_set_fd F +++GLIBC_2.3 __acl_set_file F +++GLIBC_2.3 __after_morecore_hook D 0x4 +++GLIBC_2.3 __argz_count F +++GLIBC_2.3 __argz_next F +++GLIBC_2.3 __argz_stringify F +++GLIBC_2.3 __asprintf F +++GLIBC_2.3 __assert F +++GLIBC_2.3 __assert_fail F +++GLIBC_2.3 __assert_perror_fail F +++GLIBC_2.3 __backtrace F +++GLIBC_2.3 __backtrace_symbols F +++GLIBC_2.3 __backtrace_symbols_fd F +++GLIBC_2.3 __bsd_getpgrp F +++GLIBC_2.3 __bzero F +++GLIBC_2.3 __check_rhosts_file D 0x4 +++GLIBC_2.3 __close F +++GLIBC_2.3 __cmsg_nxthdr F +++GLIBC_2.3 __connect F +++GLIBC_2.3 __ctype_b_loc F +++GLIBC_2.3 __ctype_get_mb_cur_max F +++GLIBC_2.3 __ctype_tolower_loc F +++GLIBC_2.3 __ctype_toupper_loc F +++GLIBC_2.3 __curbrk D 0x4 +++GLIBC_2.3 __cxa_atexit F +++GLIBC_2.3 __cxa_finalize F +++GLIBC_2.3 __cyg_profile_func_enter F +++GLIBC_2.3 __cyg_profile_func_exit F +++GLIBC_2.3 __daylight D 0x4 +++GLIBC_2.3 __dcgettext F +++GLIBC_2.3 __default_morecore F +++GLIBC_2.3 __dgettext F +++GLIBC_2.3 __divdi3 F +++GLIBC_2.3 __dup2 F +++GLIBC_2.3 __duplocale F +++GLIBC_2.3 __environ D 0x4 +++GLIBC_2.3 __errno_location F +++GLIBC_2.3 __fbufsize F +++GLIBC_2.3 __fcntl F +++GLIBC_2.3 __ffs F +++GLIBC_2.3 __finite F +++GLIBC_2.3 __finitef F +++GLIBC_2.3 __finitel F +++GLIBC_2.3 __flbf F +++GLIBC_2.3 __fork F +++GLIBC_2.3 __fpending F +++GLIBC_2.3 __fpu_control D 0x2 +++GLIBC_2.3 __fpurge F +++GLIBC_2.3 __freadable F +++GLIBC_2.3 __freading F +++GLIBC_2.3 __free_hook D 0x4 +++GLIBC_2.3 __freelocale F +++GLIBC_2.3 __fsetlocking F +++GLIBC_2.3 __fwritable F +++GLIBC_2.3 __fwriting F +++GLIBC_2.3 __fxstat F +++GLIBC_2.3 __fxstat64 F +++GLIBC_2.3 __getdelim F +++GLIBC_2.3 __getpagesize F +++GLIBC_2.3 __getpgid F +++GLIBC_2.3 __getpid F +++GLIBC_2.3 __gettimeofday F +++GLIBC_2.3 __gmtime_r F +++GLIBC_2.3 __h_errno_location F +++GLIBC_2.3 __isalnum_l F +++GLIBC_2.3 __isalpha_l F +++GLIBC_2.3 __isascii_l F +++GLIBC_2.3 __isblank_l F +++GLIBC_2.3 __iscntrl_l F +++GLIBC_2.3 __isctype F +++GLIBC_2.3 __isdigit_l F +++GLIBC_2.3 __isgraph_l F +++GLIBC_2.3 __isinf F +++GLIBC_2.3 __isinff F +++GLIBC_2.3 __isinfl F +++GLIBC_2.3 __islower_l F +++GLIBC_2.3 __isnan F +++GLIBC_2.3 __isnanf F +++GLIBC_2.3 __isnanl F +++GLIBC_2.3 __isprint_l F +++GLIBC_2.3 __ispunct_l F +++GLIBC_2.3 __isspace_l F +++GLIBC_2.3 __isupper_l F +++GLIBC_2.3 __iswalnum_l F +++GLIBC_2.3 __iswalpha_l F +++GLIBC_2.3 __iswblank_l F +++GLIBC_2.3 __iswcntrl_l F +++GLIBC_2.3 __iswctype F +++GLIBC_2.3 __iswctype_l F +++GLIBC_2.3 __iswdigit_l F +++GLIBC_2.3 __iswgraph_l F +++GLIBC_2.3 __iswlower_l F +++GLIBC_2.3 __iswprint_l F +++GLIBC_2.3 __iswpunct_l F +++GLIBC_2.3 __iswspace_l F +++GLIBC_2.3 __iswupper_l F +++GLIBC_2.3 __iswxdigit_l F +++GLIBC_2.3 __isxdigit_l F +++GLIBC_2.3 __ivaliduser F +++GLIBC_2.3 __key_decryptsession_pk_LOCAL D 0x4 +++GLIBC_2.3 __key_encryptsession_pk_LOCAL D 0x4 +++GLIBC_2.3 __key_gendes_LOCAL D 0x4 +++GLIBC_2.3 __libc_allocate_rtsig F +++GLIBC_2.3 __libc_calloc F +++GLIBC_2.3 __libc_current_sigrtmax F +++GLIBC_2.3 __libc_current_sigrtmin F +++GLIBC_2.3 __libc_free F +++GLIBC_2.3 __libc_freeres F +++GLIBC_2.3 __libc_init_first F +++GLIBC_2.3 __libc_mallinfo F +++GLIBC_2.3 __libc_malloc F +++GLIBC_2.3 __libc_mallopt F +++GLIBC_2.3 __libc_memalign F +++GLIBC_2.3 __libc_pvalloc F +++GLIBC_2.3 __libc_realloc F +++GLIBC_2.3 __libc_start_main F +++GLIBC_2.3 __libc_valloc F +++GLIBC_2.3 __lseek F +++GLIBC_2.3 __lxstat F +++GLIBC_2.3 __lxstat64 F +++GLIBC_2.3 __malloc_hook D 0x4 +++GLIBC_2.3 __malloc_initialize_hook D 0x4 +++GLIBC_2.3 __mbrlen F +++GLIBC_2.3 __mbrtowc F +++GLIBC_2.3 __memalign_hook D 0x4 +++GLIBC_2.3 __memcpy_by2 F +++GLIBC_2.3 __memcpy_by4 F +++GLIBC_2.3 __memcpy_c F +++GLIBC_2.3 __memcpy_g F +++GLIBC_2.3 __mempcpy F +++GLIBC_2.3 __mempcpy_by2 F +++GLIBC_2.3 __mempcpy_by4 F +++GLIBC_2.3 __mempcpy_byn F +++GLIBC_2.3 __mempcpy_small F +++GLIBC_2.3 __memset_cc F +++GLIBC_2.3 __memset_ccn_by2 F +++GLIBC_2.3 __memset_ccn_by4 F +++GLIBC_2.3 __memset_cg F +++GLIBC_2.3 __memset_gcn_by2 F +++GLIBC_2.3 __memset_gcn_by4 F +++GLIBC_2.3 __memset_gg F +++GLIBC_2.3 __moddi3 F +++GLIBC_2.3 __monstartup F +++GLIBC_2.3 __morecore D 0x4 +++GLIBC_2.3 __nanosleep F +++GLIBC_2.3 __newlocale F +++GLIBC_2.3 __nl_langinfo_l F +++GLIBC_2.3 __nss_configure_lookup F +++GLIBC_2.3 __nss_database_lookup F +++GLIBC_2.3 __nss_group_lookup F +++GLIBC_2.3 __nss_hostname_digits_dots F +++GLIBC_2.3 __nss_hosts_lookup F +++GLIBC_2.3 __nss_next F +++GLIBC_2.3 __nss_passwd_lookup F +++GLIBC_2.3 __open F +++GLIBC_2.3 __overflow F +++GLIBC_2.3 __pipe F +++GLIBC_2.3 __poll F +++GLIBC_2.3 __pread64 F +++GLIBC_2.3 __printf_fp F +++GLIBC_2.3 __profile_frequency F +++GLIBC_2.3 __progname D 0x4 +++GLIBC_2.3 __progname_full D 0x4 +++GLIBC_2.3 __pwrite64 F +++GLIBC_2.3 __rawmemchr F +++GLIBC_2.3 __rcmd_errstr D 0x4 +++GLIBC_2.3 __read F +++GLIBC_2.3 __realloc_hook D 0x4 +++GLIBC_2.3 __res_init F +++GLIBC_2.3 __res_nclose F +++GLIBC_2.3 __res_ninit F +++GLIBC_2.3 __res_randomid F +++GLIBC_2.3 __res_state F +++GLIBC_2.3 __rpc_thread_createerr F +++GLIBC_2.3 __rpc_thread_svc_fdset F +++GLIBC_2.3 __rpc_thread_svc_max_pollfd F +++GLIBC_2.3 __rpc_thread_svc_pollfd F +++GLIBC_2.3 __sbrk F +++GLIBC_2.3 __sched_get_priority_max F +++GLIBC_2.3 __sched_get_priority_min F +++GLIBC_2.3 __sched_getparam F +++GLIBC_2.3 __sched_getscheduler F +++GLIBC_2.3 __sched_setscheduler F +++GLIBC_2.3 __sched_yield F +++GLIBC_2.3 __secure_getenv F +++GLIBC_2.3 __select F +++GLIBC_2.3 __send F +++GLIBC_2.3 __setpgid F +++GLIBC_2.3 __sigaction F +++GLIBC_2.3 __sigaddset F +++GLIBC_2.3 __sigdelset F +++GLIBC_2.3 __sigismember F +++GLIBC_2.3 __signbit F +++GLIBC_2.3 __signbitf F +++GLIBC_2.3 __signbitl F +++GLIBC_2.3 __sigpause F +++GLIBC_2.3 __sigsetjmp F +++GLIBC_2.3 __sigsuspend F +++GLIBC_2.3 __stpcpy F +++GLIBC_2.3 __stpcpy_g F +++GLIBC_2.3 __stpcpy_small F +++GLIBC_2.3 __stpncpy F +++GLIBC_2.3 __strcasecmp F +++GLIBC_2.3 __strcasecmp_l F +++GLIBC_2.3 __strcasestr F +++GLIBC_2.3 __strcat_c F +++GLIBC_2.3 __strcat_g F +++GLIBC_2.3 __strchr_c F +++GLIBC_2.3 __strchr_g F +++GLIBC_2.3 __strchrnul_c F +++GLIBC_2.3 __strchrnul_g F +++GLIBC_2.3 __strcmp_gg F +++GLIBC_2.3 __strcoll_l F +++GLIBC_2.3 __strcpy_g F +++GLIBC_2.3 __strcpy_small F +++GLIBC_2.3 __strcspn_c1 F +++GLIBC_2.3 __strcspn_c2 F +++GLIBC_2.3 __strcspn_c3 F +++GLIBC_2.3 __strcspn_cg F +++GLIBC_2.3 __strcspn_g F +++GLIBC_2.3 __strdup F +++GLIBC_2.3 __strerror_r F +++GLIBC_2.3 __strfmon_l F +++GLIBC_2.3 __strftime_l F +++GLIBC_2.3 __strlen_g F +++GLIBC_2.3 __strncasecmp_l F +++GLIBC_2.3 __strncat_g F +++GLIBC_2.3 __strncmp_g F +++GLIBC_2.3 __strncpy_by2 F +++GLIBC_2.3 __strncpy_by4 F +++GLIBC_2.3 __strncpy_byn F +++GLIBC_2.3 __strncpy_gg F +++GLIBC_2.3 __strndup F +++GLIBC_2.3 __strpbrk_c2 F +++GLIBC_2.3 __strpbrk_c3 F +++GLIBC_2.3 __strpbrk_cg F +++GLIBC_2.3 __strpbrk_g F +++GLIBC_2.3 __strrchr_c F +++GLIBC_2.3 __strrchr_g F +++GLIBC_2.3 __strsep_1c F +++GLIBC_2.3 __strsep_2c F +++GLIBC_2.3 __strsep_3c F +++GLIBC_2.3 __strsep_g F +++GLIBC_2.3 __strspn_c1 F +++GLIBC_2.3 __strspn_c2 F +++GLIBC_2.3 __strspn_c3 F +++GLIBC_2.3 __strspn_cg F +++GLIBC_2.3 __strspn_g F +++GLIBC_2.3 __strstr_cg F +++GLIBC_2.3 __strstr_g F +++GLIBC_2.3 __strtod_internal F +++GLIBC_2.3 __strtod_l F +++GLIBC_2.3 __strtof_internal F +++GLIBC_2.3 __strtof_l F +++GLIBC_2.3 __strtok_r F +++GLIBC_2.3 __strtok_r_1c F +++GLIBC_2.3 __strtol_internal F +++GLIBC_2.3 __strtol_l F +++GLIBC_2.3 __strtold_internal F +++GLIBC_2.3 __strtold_l F +++GLIBC_2.3 __strtoll_internal F +++GLIBC_2.3 __strtoll_l F +++GLIBC_2.3 __strtoul_internal F +++GLIBC_2.3 __strtoul_l F +++GLIBC_2.3 __strtoull_internal F +++GLIBC_2.3 __strtoull_l F +++GLIBC_2.3 __strverscmp F +++GLIBC_2.3 __strxfrm_l F +++GLIBC_2.3 __syscall_aio_cancel F +++GLIBC_2.3 __syscall_aio_error F +++GLIBC_2.3 __syscall_aio_read F +++GLIBC_2.3 __syscall_aio_return F +++GLIBC_2.3 __syscall_aio_suspend F +++GLIBC_2.3 __syscall_aio_waitcomplete F +++GLIBC_2.3 __syscall_aio_write F +++GLIBC_2.3 __syscall_lio_listio F +++GLIBC_2.3 __syscall_obreak F +++GLIBC_2.3 __syscall_yield F +++GLIBC_2.3 __sysconf F +++GLIBC_2.3 __sysctl F +++GLIBC_2.3 __sysv_signal F +++GLIBC_2.3 __timezone D 0x4 +++GLIBC_2.3 __toascii_l F +++GLIBC_2.3 __tolower_l F +++GLIBC_2.3 __toupper_l F +++GLIBC_2.3 __towctrans F +++GLIBC_2.3 __towctrans_l F +++GLIBC_2.3 __towlower_l F +++GLIBC_2.3 __towupper_l F +++GLIBC_2.3 __tzname D 0x8 +++GLIBC_2.3 __udivdi3 F +++GLIBC_2.3 __uflow F +++GLIBC_2.3 __umoddi3 F +++GLIBC_2.3 __underflow F +++GLIBC_2.3 __uselocale F +++GLIBC_2.3 __vfork F +++GLIBC_2.3 __vfscanf F +++GLIBC_2.3 __vsnprintf F +++GLIBC_2.3 __vsscanf F +++GLIBC_2.3 __wait F +++GLIBC_2.3 __waitpid F +++GLIBC_2.3 __wcscasecmp_l F +++GLIBC_2.3 __wcscoll_l F +++GLIBC_2.3 __wcsftime_l F +++GLIBC_2.3 __wcsncasecmp_l F +++GLIBC_2.3 __wcstod_internal F +++GLIBC_2.3 __wcstod_l F +++GLIBC_2.3 __wcstof_internal F +++GLIBC_2.3 __wcstof_l F +++GLIBC_2.3 __wcstol_internal F +++GLIBC_2.3 __wcstol_l F +++GLIBC_2.3 __wcstold_internal F +++GLIBC_2.3 __wcstold_l F +++GLIBC_2.3 __wcstoll_internal F +++GLIBC_2.3 __wcstoll_l F +++GLIBC_2.3 __wcstoul_internal F +++GLIBC_2.3 __wcstoul_l F +++GLIBC_2.3 __wcstoull_internal F +++GLIBC_2.3 __wcstoull_l F +++GLIBC_2.3 __wcsxfrm_l F +++GLIBC_2.3 __wctrans_l F +++GLIBC_2.3 __wctype_l F +++GLIBC_2.3 __woverflow F +++GLIBC_2.3 __write F +++GLIBC_2.3 __wuflow F +++GLIBC_2.3 __wunderflow F +++GLIBC_2.3 __xmknod F +++GLIBC_2.3 __xpg_basename F +++GLIBC_2.3 __xpg_sigpause F +++GLIBC_2.3 __xstat F +++GLIBC_2.3 __xstat64 F +++GLIBC_2.3 _authenticate F +++GLIBC_2.3 _dl_mcount_wrapper F +++GLIBC_2.3 _dl_mcount_wrapper_check F +++GLIBC_2.3 _environ D 0x4 +++GLIBC_2.3 _exit F +++GLIBC_2.3 _flushlbf F +++GLIBC_2.3 _libc_intl_domainname D 0x5 +++GLIBC_2.3 _longjmp F +++GLIBC_2.3 _mcleanup F +++GLIBC_2.3 _mcount F +++GLIBC_2.3 _nl_default_dirname D 0x12 +++GLIBC_2.3 _nl_domain_bindings D 0x4 +++GLIBC_2.3 _nl_msg_cat_cntr D 0x4 +++GLIBC_2.3 _null_auth D 0xc +++GLIBC_2.3 _obstack D 0x4 +++GLIBC_2.3 _obstack_allocated_p F +++GLIBC_2.3 _obstack_begin F +++GLIBC_2.3 _obstack_begin_1 F +++GLIBC_2.3 _obstack_free F +++GLIBC_2.3 _obstack_memory_used F +++GLIBC_2.3 _obstack_newchunk F +++GLIBC_2.3 _res D 0x200 +++GLIBC_2.3 _res_hconf D 0x30 +++GLIBC_2.3 _rpc_dtablesize F +++GLIBC_2.3 _seterr_reply F +++GLIBC_2.3 _setjmp F +++GLIBC_2.3 _sys_errlist D 0x15c +++GLIBC_2.3 _sys_nerr D 0x4 +++GLIBC_2.3 _sys_siglist D 0x204 +++GLIBC_2.3 _tolower F +++GLIBC_2.3 _toupper F +++GLIBC_2.3 a64l F +++GLIBC_2.3 abort F +++GLIBC_2.3 abs F +++GLIBC_2.3 accept F +++GLIBC_2.3 access F +++GLIBC_2.3 acct F +++GLIBC_2.3 addmntent F +++GLIBC_2.3 addseverity F +++GLIBC_2.3 adjtime F +++GLIBC_2.3 advance F +++GLIBC_2.3 alarm F +++GLIBC_2.3 alphasort F +++GLIBC_2.3 alphasort64 F +++GLIBC_2.3 argp_err_exit_status D 0x4 +++GLIBC_2.3 argp_error F +++GLIBC_2.3 argp_failure F +++GLIBC_2.3 argp_help F +++GLIBC_2.3 argp_parse F +++GLIBC_2.3 argp_program_bug_address D 0x4 +++GLIBC_2.3 argp_program_version D 0x4 +++GLIBC_2.3 argp_program_version_hook D 0x4 +++GLIBC_2.3 argp_state_help F +++GLIBC_2.3 argp_usage F +++GLIBC_2.3 argz_add F +++GLIBC_2.3 argz_add_sep F +++GLIBC_2.3 argz_append F +++GLIBC_2.3 argz_count F +++GLIBC_2.3 argz_create F +++GLIBC_2.3 argz_create_sep F +++GLIBC_2.3 argz_delete F +++GLIBC_2.3 argz_extract F +++GLIBC_2.3 argz_insert F +++GLIBC_2.3 argz_next F +++GLIBC_2.3 argz_replace F +++GLIBC_2.3 argz_stringify F +++GLIBC_2.3 asctime F +++GLIBC_2.3 asctime_r F +++GLIBC_2.3 asprintf F +++GLIBC_2.3 atof F +++GLIBC_2.3 atoi F +++GLIBC_2.3 atol F +++GLIBC_2.3 atoll F +++GLIBC_2.3 authdes_create F +++GLIBC_2.3 authdes_getucred F +++GLIBC_2.3 authdes_pk_create F +++GLIBC_2.3 authnone_create F +++GLIBC_2.3 authunix_create F +++GLIBC_2.3 authunix_create_default F +++GLIBC_2.3 backtrace F +++GLIBC_2.3 backtrace_symbols F +++GLIBC_2.3 backtrace_symbols_fd F +++GLIBC_2.3 basename F +++GLIBC_2.3 bcmp F +++GLIBC_2.3 bcopy F +++GLIBC_2.3 bind F +++GLIBC_2.3 bind_textdomain_codeset F +++GLIBC_2.3 bindresvport F +++GLIBC_2.3 bindtextdomain F +++GLIBC_2.3 brk F +++GLIBC_2.3 bsd_signal F +++GLIBC_2.3 bsearch F +++GLIBC_2.3 btowc F +++GLIBC_2.3 bzero F +++GLIBC_2.3 calloc F +++GLIBC_2.3 callrpc F +++GLIBC_2.3 canonicalize_file_name F +++GLIBC_2.3 catclose F +++GLIBC_2.3 catgets F +++GLIBC_2.3 catopen F +++GLIBC_2.3 cbc_crypt F +++GLIBC_2.3 cfgetispeed F +++GLIBC_2.3 cfgetospeed F +++GLIBC_2.3 cfmakeraw F +++GLIBC_2.3 cfree F +++GLIBC_2.3 cfsetispeed F +++GLIBC_2.3 cfsetospeed F +++GLIBC_2.3 cfsetspeed F +++GLIBC_2.3 chdir F +++GLIBC_2.3 chflags F +++GLIBC_2.3 chmod F +++GLIBC_2.3 chown F +++GLIBC_2.3 chroot F +++GLIBC_2.3 clearenv F +++GLIBC_2.3 clearerr F +++GLIBC_2.3 clearerr_unlocked F +++GLIBC_2.3 clnt_broadcast F +++GLIBC_2.3 clnt_create F +++GLIBC_2.3 clnt_pcreateerror F +++GLIBC_2.3 clnt_perrno F +++GLIBC_2.3 clnt_perror F +++GLIBC_2.3 clnt_spcreateerror F +++GLIBC_2.3 clnt_sperrno F +++GLIBC_2.3 clnt_sperror F +++GLIBC_2.3 clntraw_create F +++GLIBC_2.3 clnttcp_create F +++GLIBC_2.3 clntudp_bufcreate F +++GLIBC_2.3 clntudp_create F +++GLIBC_2.3 clntunix_create F +++GLIBC_2.3 clock F +++GLIBC_2.3 clone F +++GLIBC_2.3 close F +++GLIBC_2.3 closedir F +++GLIBC_2.3 closelog F +++GLIBC_2.3 confstr F +++GLIBC_2.3 connect F +++GLIBC_2.3 copysign F +++GLIBC_2.3 copysignf F +++GLIBC_2.3 copysignl F +++GLIBC_2.3 creat F +++GLIBC_2.3 creat64 F +++GLIBC_2.3 ctermid F +++GLIBC_2.3 ctime F +++GLIBC_2.3 ctime_r F +++GLIBC_2.3 cuserid F +++GLIBC_2.3 daemon F +++GLIBC_2.3 daylight D 0x4 +++GLIBC_2.3 dcgettext F +++GLIBC_2.3 dcngettext F +++GLIBC_2.3 des_setparity F +++GLIBC_2.3 dgettext F +++GLIBC_2.3 difftime F +++GLIBC_2.3 dirfd F +++GLIBC_2.3 dirname F +++GLIBC_2.3 div F +++GLIBC_2.3 dl_iterate_phdr F +++GLIBC_2.3 dngettext F +++GLIBC_2.3 dprintf F +++GLIBC_2.3 drand48 F +++GLIBC_2.3 drand48_r F +++GLIBC_2.3 dup F +++GLIBC_2.3 dup2 F +++GLIBC_2.3 duplocale F +++GLIBC_2.3 dysize F +++GLIBC_2.3 ecb_crypt F +++GLIBC_2.3 ecvt F +++GLIBC_2.3 ecvt_r F +++GLIBC_2.3 endaliasent F +++GLIBC_2.3 endfsent F +++GLIBC_2.3 endgrent F +++GLIBC_2.3 endhostent F +++GLIBC_2.3 endmntent F +++GLIBC_2.3 endnetent F +++GLIBC_2.3 endnetgrent F +++GLIBC_2.3 endprotoent F +++GLIBC_2.3 endpwent F +++GLIBC_2.3 endrpcent F +++GLIBC_2.3 endservent F +++GLIBC_2.3 endspent F +++GLIBC_2.3 endttyent F +++GLIBC_2.3 endusershell F +++GLIBC_2.3 endutent F +++GLIBC_2.3 endutxent F +++GLIBC_2.3 environ D 0x4 +++GLIBC_2.3 envz_add F +++GLIBC_2.3 envz_entry F +++GLIBC_2.3 envz_get F +++GLIBC_2.3 envz_merge F +++GLIBC_2.3 envz_remove F +++GLIBC_2.3 envz_strip F +++GLIBC_2.3 erand48 F +++GLIBC_2.3 erand48_r F +++GLIBC_2.3 err F +++GLIBC_2.3 error F +++GLIBC_2.3 error_at_line F +++GLIBC_2.3 error_message_count D 0x4 +++GLIBC_2.3 error_one_per_line D 0x4 +++GLIBC_2.3 error_print_progname D 0x4 +++GLIBC_2.3 errx F +++GLIBC_2.3 ether_aton F +++GLIBC_2.3 ether_aton_r F +++GLIBC_2.3 ether_hostton F +++GLIBC_2.3 ether_line F +++GLIBC_2.3 ether_ntoa F +++GLIBC_2.3 ether_ntoa_r F +++GLIBC_2.3 ether_ntohost F +++GLIBC_2.3 euidaccess F +++GLIBC_2.3 execl F +++GLIBC_2.3 execle F +++GLIBC_2.3 execlp F +++GLIBC_2.3 execv F +++GLIBC_2.3 execve F +++GLIBC_2.3 execvp F +++GLIBC_2.3 exit F +++GLIBC_2.3 extattr_delete_file F +++GLIBC_2.3 extattr_get_file F +++GLIBC_2.3 extattr_set_file F +++GLIBC_2.3 extattrctl F +++GLIBC_2.3 fattach F +++GLIBC_2.3 fchdir F +++GLIBC_2.3 fchflags F +++GLIBC_2.3 fchmod F +++GLIBC_2.3 fchown F +++GLIBC_2.3 fclose F +++GLIBC_2.3 fcloseall F +++GLIBC_2.3 fcntl F +++GLIBC_2.3 fcvt F +++GLIBC_2.3 fcvt_r F +++GLIBC_2.3 fdatasync F +++GLIBC_2.3 fdetach F +++GLIBC_2.3 fdopen F +++GLIBC_2.3 feof F +++GLIBC_2.3 feof_unlocked F +++GLIBC_2.3 ferror F +++GLIBC_2.3 ferror_unlocked F +++GLIBC_2.3 fexecve F +++GLIBC_2.3 fflush F +++GLIBC_2.3 fflush_unlocked F +++GLIBC_2.3 ffs F +++GLIBC_2.3 ffsl F +++GLIBC_2.3 ffsll F +++GLIBC_2.3 fgetc F +++GLIBC_2.3 fgetc_unlocked F +++GLIBC_2.3 fgetgrent F +++GLIBC_2.3 fgetgrent_r F +++GLIBC_2.3 fgetpos F +++GLIBC_2.3 fgetpos64 F +++GLIBC_2.3 fgetpwent F +++GLIBC_2.3 fgetpwent_r F +++GLIBC_2.3 fgets F +++GLIBC_2.3 fgets_unlocked F +++GLIBC_2.3 fgetspent F +++GLIBC_2.3 fgetspent_r F +++GLIBC_2.3 fgetwc F +++GLIBC_2.3 fgetwc_unlocked F +++GLIBC_2.3 fgetws F +++GLIBC_2.3 fgetws_unlocked F +++GLIBC_2.3 fgetxattr F +++GLIBC_2.3 fhopen F +++GLIBC_2.3 fhstat F +++GLIBC_2.3 fhstatfs F +++GLIBC_2.3 fileno F +++GLIBC_2.3 fileno_unlocked F +++GLIBC_2.3 finite F +++GLIBC_2.3 finitef F +++GLIBC_2.3 finitel F +++GLIBC_2.3 flistxattr F +++GLIBC_2.3 flock F +++GLIBC_2.3 flockfile F +++GLIBC_2.3 fmemopen F +++GLIBC_2.3 fmtmsg F +++GLIBC_2.3 fnmatch F +++GLIBC_2.3 fopen F +++GLIBC_2.3 fopen64 F +++GLIBC_2.3 fopencookie F +++GLIBC_2.3 fork F +++GLIBC_2.3 fpathconf F +++GLIBC_2.3 fprintf F +++GLIBC_2.3 fputc F +++GLIBC_2.3 fputc_unlocked F +++GLIBC_2.3 fputs F +++GLIBC_2.3 fputs_unlocked F +++GLIBC_2.3 fputwc F +++GLIBC_2.3 fputwc_unlocked F +++GLIBC_2.3 fputws F +++GLIBC_2.3 fputws_unlocked F +++GLIBC_2.3 fread F +++GLIBC_2.3 fread_unlocked F +++GLIBC_2.3 free F +++GLIBC_2.3 freeaddrinfo F +++GLIBC_2.3 freeifaddrs F +++GLIBC_2.3 freelocale F +++GLIBC_2.3 fremovexattr F +++GLIBC_2.3 freopen F +++GLIBC_2.3 freopen64 F +++GLIBC_2.3 frexp F +++GLIBC_2.3 frexpf F +++GLIBC_2.3 frexpl F +++GLIBC_2.3 fscanf F +++GLIBC_2.3 fseek F +++GLIBC_2.3 fseeko F +++GLIBC_2.3 fseeko64 F +++GLIBC_2.3 fsetpos F +++GLIBC_2.3 fsetpos64 F +++GLIBC_2.3 fsetxattr F +++GLIBC_2.3 fstatfs F +++GLIBC_2.3 fstatfs64 F +++GLIBC_2.3 fstatvfs F +++GLIBC_2.3 fstatvfs64 F +++GLIBC_2.3 fsync F +++GLIBC_2.3 ftell F +++GLIBC_2.3 ftello F +++GLIBC_2.3 ftello64 F +++GLIBC_2.3 ftime F +++GLIBC_2.3 ftok F +++GLIBC_2.3 ftruncate F +++GLIBC_2.3 ftruncate64 F +++GLIBC_2.3 ftrylockfile F +++GLIBC_2.3 fts_children F +++GLIBC_2.3 fts_close F +++GLIBC_2.3 fts_open F +++GLIBC_2.3 fts_read F +++GLIBC_2.3 fts_set F +++GLIBC_2.3 ftw F +++GLIBC_2.3 ftw64 F +++GLIBC_2.3 funlockfile F +++GLIBC_2.3 futimes F +++GLIBC_2.3 fwide F +++GLIBC_2.3 fwprintf F +++GLIBC_2.3 fwrite F +++GLIBC_2.3 fwrite_unlocked F +++GLIBC_2.3 fwscanf F +++GLIBC_2.3 gai_strerror F +++GLIBC_2.3 gcvt F +++GLIBC_2.3 get_avphys_pages F +++GLIBC_2.3 get_current_dir_name F +++GLIBC_2.3 get_myaddress F +++GLIBC_2.3 get_nprocs F +++GLIBC_2.3 get_nprocs_conf F +++GLIBC_2.3 get_phys_pages F +++GLIBC_2.3 getaddrinfo F +++GLIBC_2.3 getaliasbyname F +++GLIBC_2.3 getaliasbyname_r F +++GLIBC_2.3 getaliasent F +++GLIBC_2.3 getaliasent_r F +++GLIBC_2.3 getc F +++GLIBC_2.3 getc_unlocked F +++GLIBC_2.3 getchar F +++GLIBC_2.3 getchar_unlocked F +++GLIBC_2.3 getcontext F +++GLIBC_2.3 getcwd F +++GLIBC_2.3 getdate F +++GLIBC_2.3 getdate_err D 0x4 +++GLIBC_2.3 getdate_r F +++GLIBC_2.3 getdelim F +++GLIBC_2.3 getdents F +++GLIBC_2.3 getdirentries F +++GLIBC_2.3 getdirentries64 F +++GLIBC_2.3 getdomainname F +++GLIBC_2.3 getdtablesize F +++GLIBC_2.3 getegid F +++GLIBC_2.3 getenv F +++GLIBC_2.3 geteuid F +++GLIBC_2.3 getfh F +++GLIBC_2.3 getfsent F +++GLIBC_2.3 getfsfile F +++GLIBC_2.3 getfsspec F +++GLIBC_2.3 getfsstat F +++GLIBC_2.3 getfsstat64 F +++GLIBC_2.3 getgid F +++GLIBC_2.3 getgrent F +++GLIBC_2.3 getgrent_r F +++GLIBC_2.3 getgrgid F +++GLIBC_2.3 getgrgid_r F +++GLIBC_2.3 getgrnam F +++GLIBC_2.3 getgrnam_r F +++GLIBC_2.3 getgrouplist F +++GLIBC_2.3 getgroups F +++GLIBC_2.3 gethostbyaddr F +++GLIBC_2.3 gethostbyaddr_r F +++GLIBC_2.3 gethostbyname F +++GLIBC_2.3 gethostbyname2 F +++GLIBC_2.3 gethostbyname2_r F +++GLIBC_2.3 gethostbyname_r F +++GLIBC_2.3 gethostent F +++GLIBC_2.3 gethostent_r F +++GLIBC_2.3 gethostid F +++GLIBC_2.3 gethostname F +++GLIBC_2.3 getifaddrs F +++GLIBC_2.3 getitimer F +++GLIBC_2.3 getline F +++GLIBC_2.3 getloadavg F +++GLIBC_2.3 getlogin F +++GLIBC_2.3 getlogin_r F +++GLIBC_2.3 getmntent F +++GLIBC_2.3 getmntent_r F +++GLIBC_2.3 getmntinfo F +++GLIBC_2.3 getmntinfo64 F +++GLIBC_2.3 getmsg F +++GLIBC_2.3 getnameinfo F +++GLIBC_2.3 getnetbyaddr F +++GLIBC_2.3 getnetbyaddr_r F +++GLIBC_2.3 getnetbyname F +++GLIBC_2.3 getnetbyname_r F +++GLIBC_2.3 getnetent F +++GLIBC_2.3 getnetent_r F +++GLIBC_2.3 getnetgrent F +++GLIBC_2.3 getnetgrent_r F +++GLIBC_2.3 getnetname F +++GLIBC_2.3 getopt F +++GLIBC_2.3 getopt_long F +++GLIBC_2.3 getopt_long_only F +++GLIBC_2.3 getpagesize F +++GLIBC_2.3 getpass F +++GLIBC_2.3 getpeername F +++GLIBC_2.3 getpgid F +++GLIBC_2.3 getpgrp F +++GLIBC_2.3 getpid F +++GLIBC_2.3 getpmsg F +++GLIBC_2.3 getppid F +++GLIBC_2.3 getpriority F +++GLIBC_2.3 getprotobyname F +++GLIBC_2.3 getprotobyname_r F +++GLIBC_2.3 getprotobynumber F +++GLIBC_2.3 getprotobynumber_r F +++GLIBC_2.3 getprotoent F +++GLIBC_2.3 getprotoent_r F +++GLIBC_2.3 getpt F +++GLIBC_2.3 getpublickey F +++GLIBC_2.3 getpw F +++GLIBC_2.3 getpwent F +++GLIBC_2.3 getpwent_r F +++GLIBC_2.3 getpwnam F +++GLIBC_2.3 getpwnam_r F +++GLIBC_2.3 getpwuid F +++GLIBC_2.3 getpwuid_r F +++GLIBC_2.3 getresgid F +++GLIBC_2.3 getresuid F +++GLIBC_2.3 getrlimit F +++GLIBC_2.3 getrlimit64 F +++GLIBC_2.3 getrpcbyname F +++GLIBC_2.3 getrpcbyname_r F +++GLIBC_2.3 getrpcbynumber F +++GLIBC_2.3 getrpcbynumber_r F +++GLIBC_2.3 getrpcent F +++GLIBC_2.3 getrpcent_r F +++GLIBC_2.3 getrpcport F +++GLIBC_2.3 getrusage F +++GLIBC_2.3 gets F +++GLIBC_2.3 getsecretkey F +++GLIBC_2.3 getservbyname F +++GLIBC_2.3 getservbyname_r F +++GLIBC_2.3 getservbyport F +++GLIBC_2.3 getservbyport_r F +++GLIBC_2.3 getservent F +++GLIBC_2.3 getservent_r F +++GLIBC_2.3 getsid F +++GLIBC_2.3 getsockname F +++GLIBC_2.3 getsockopt F +++GLIBC_2.3 getspent F +++GLIBC_2.3 getspent_r F +++GLIBC_2.3 getspnam F +++GLIBC_2.3 getspnam_r F +++GLIBC_2.3 getsubopt F +++GLIBC_2.3 gettext F +++GLIBC_2.3 gettimeofday F +++GLIBC_2.3 getttyent F +++GLIBC_2.3 getttynam F +++GLIBC_2.3 getuid F +++GLIBC_2.3 getusershell F +++GLIBC_2.3 getutent F +++GLIBC_2.3 getutent_r F +++GLIBC_2.3 getutid F +++GLIBC_2.3 getutid_r F +++GLIBC_2.3 getutline F +++GLIBC_2.3 getutline_r F +++GLIBC_2.3 getutmp F +++GLIBC_2.3 getutmpx F +++GLIBC_2.3 getutxent F +++GLIBC_2.3 getutxid F +++GLIBC_2.3 getutxline F +++GLIBC_2.3 getw F +++GLIBC_2.3 getwc F +++GLIBC_2.3 getwc_unlocked F +++GLIBC_2.3 getwchar F +++GLIBC_2.3 getwchar_unlocked F +++GLIBC_2.3 getwd F +++GLIBC_2.3 getxattr F +++GLIBC_2.3 glob F +++GLIBC_2.3 glob64 F +++GLIBC_2.3 glob_pattern_p F +++GLIBC_2.3 globfree F +++GLIBC_2.3 globfree64 F +++GLIBC_2.3 gmtime F +++GLIBC_2.3 gmtime_r F +++GLIBC_2.3 gnu_get_libc_release F +++GLIBC_2.3 gnu_get_libc_version F +++GLIBC_2.3 grantpt F +++GLIBC_2.3 group_member F +++GLIBC_2.3 gsignal F +++GLIBC_2.3 gtty F +++GLIBC_2.3 h_errlist D 0x14 +++GLIBC_2.3 h_nerr D 0x4 +++GLIBC_2.3 hasmntopt F +++GLIBC_2.3 hcreate F +++GLIBC_2.3 hcreate_r F +++GLIBC_2.3 hdestroy F +++GLIBC_2.3 hdestroy_r F +++GLIBC_2.3 herror F +++GLIBC_2.3 host2netname F +++GLIBC_2.3 hsearch F +++GLIBC_2.3 hsearch_r F +++GLIBC_2.3 hstrerror F +++GLIBC_2.3 htonl F +++GLIBC_2.3 htons F +++GLIBC_2.3 i386_get_ioperm F +++GLIBC_2.3 i386_get_ldt F +++GLIBC_2.3 i386_set_ioperm F +++GLIBC_2.3 i386_set_ldt F +++GLIBC_2.3 i386_vm86 F +++GLIBC_2.3 iconv F +++GLIBC_2.3 iconv_close F +++GLIBC_2.3 iconv_open F +++GLIBC_2.3 if_freenameindex F +++GLIBC_2.3 if_indextoname F +++GLIBC_2.3 if_nameindex F +++GLIBC_2.3 if_nametoindex F +++GLIBC_2.3 imaxabs F +++GLIBC_2.3 imaxdiv F +++GLIBC_2.3 in6addr_any D 0x10 +++GLIBC_2.3 in6addr_loopback D 0x10 +++GLIBC_2.3 index F +++GLIBC_2.3 inet_addr F +++GLIBC_2.3 inet_aton F +++GLIBC_2.3 inet_lnaof F +++GLIBC_2.3 inet_makeaddr F +++GLIBC_2.3 inet_netof F +++GLIBC_2.3 inet_network F +++GLIBC_2.3 inet_nsap_addr F +++GLIBC_2.3 inet_nsap_ntoa F +++GLIBC_2.3 inet_ntoa F +++GLIBC_2.3 inet_ntop F +++GLIBC_2.3 inet_pton F +++GLIBC_2.3 initgroups F +++GLIBC_2.3 initstate F +++GLIBC_2.3 initstate_r F +++GLIBC_2.3 innetgr F +++GLIBC_2.3 insque F +++GLIBC_2.3 ioctl F +++GLIBC_2.3 ioperm F +++GLIBC_2.3 iopl F +++GLIBC_2.3 iruserok F +++GLIBC_2.3 iruserok_af F +++GLIBC_2.3 isalnum F +++GLIBC_2.3 isalnum_l F +++GLIBC_2.3 isalpha F +++GLIBC_2.3 isalpha_l F +++GLIBC_2.3 isascii F +++GLIBC_2.3 isastream F +++GLIBC_2.3 isatty F +++GLIBC_2.3 isblank F +++GLIBC_2.3 isblank_l F +++GLIBC_2.3 iscntrl F +++GLIBC_2.3 iscntrl_l F +++GLIBC_2.3 isctype F +++GLIBC_2.3 isdigit F +++GLIBC_2.3 isdigit_l F +++GLIBC_2.3 isfdtype F +++GLIBC_2.3 isgraph F +++GLIBC_2.3 isgraph_l F +++GLIBC_2.3 isinf F +++GLIBC_2.3 isinff F +++GLIBC_2.3 isinfl F +++GLIBC_2.3 islower F +++GLIBC_2.3 islower_l F +++GLIBC_2.3 isnan F +++GLIBC_2.3 isnanf F +++GLIBC_2.3 isnanl F +++GLIBC_2.3 isprint F +++GLIBC_2.3 isprint_l F +++GLIBC_2.3 ispunct F +++GLIBC_2.3 ispunct_l F +++GLIBC_2.3 issetugid F +++GLIBC_2.3 isspace F +++GLIBC_2.3 isspace_l F +++GLIBC_2.3 isupper F +++GLIBC_2.3 isupper_l F +++GLIBC_2.3 iswalnum F +++GLIBC_2.3 iswalnum_l F +++GLIBC_2.3 iswalpha F +++GLIBC_2.3 iswalpha_l F +++GLIBC_2.3 iswblank F +++GLIBC_2.3 iswblank_l F +++GLIBC_2.3 iswcntrl F +++GLIBC_2.3 iswcntrl_l F +++GLIBC_2.3 iswctype F +++GLIBC_2.3 iswctype_l F +++GLIBC_2.3 iswdigit F +++GLIBC_2.3 iswdigit_l F +++GLIBC_2.3 iswgraph F +++GLIBC_2.3 iswgraph_l F +++GLIBC_2.3 iswlower F +++GLIBC_2.3 iswlower_l F +++GLIBC_2.3 iswprint F +++GLIBC_2.3 iswprint_l F +++GLIBC_2.3 iswpunct F +++GLIBC_2.3 iswpunct_l F +++GLIBC_2.3 iswspace F +++GLIBC_2.3 iswspace_l F +++GLIBC_2.3 iswupper F +++GLIBC_2.3 iswupper_l F +++GLIBC_2.3 iswxdigit F +++GLIBC_2.3 iswxdigit_l F +++GLIBC_2.3 isxdigit F +++GLIBC_2.3 isxdigit_l F +++GLIBC_2.3 jail F +++GLIBC_2.3 jrand48 F +++GLIBC_2.3 jrand48_r F +++GLIBC_2.3 key_decryptsession F +++GLIBC_2.3 key_decryptsession_pk F +++GLIBC_2.3 key_encryptsession F +++GLIBC_2.3 key_encryptsession_pk F +++GLIBC_2.3 key_gendes F +++GLIBC_2.3 key_get_conv F +++GLIBC_2.3 key_secretkey_is_set F +++GLIBC_2.3 key_setnet F +++GLIBC_2.3 key_setsecret F +++GLIBC_2.3 kill F +++GLIBC_2.3 killpg F +++GLIBC_2.3 kldfind F +++GLIBC_2.3 kldfirstmod F +++GLIBC_2.3 kldload F +++GLIBC_2.3 kldnext F +++GLIBC_2.3 kldstat F +++GLIBC_2.3 kldsym F +++GLIBC_2.3 kldunload F +++GLIBC_2.3 kldunloadf F +++GLIBC_2.3 ktrace F +++GLIBC_2.3 l64a F +++GLIBC_2.3 labs F +++GLIBC_2.3 lchmod F +++GLIBC_2.3 lchown F +++GLIBC_2.3 lckpwdf F +++GLIBC_2.3 lcong48 F +++GLIBC_2.3 lcong48_r F +++GLIBC_2.3 ldexp F +++GLIBC_2.3 ldexpf F +++GLIBC_2.3 ldexpl F +++GLIBC_2.3 ldiv F +++GLIBC_2.3 lfind F +++GLIBC_2.3 lgetxattr F +++GLIBC_2.3 link F +++GLIBC_2.3 listen F +++GLIBC_2.3 listxattr F +++GLIBC_2.3 llabs F +++GLIBC_2.3 lldiv F +++GLIBC_2.3 llistxattr F +++GLIBC_2.3 loc1 D 0x4 +++GLIBC_2.3 loc2 D 0x4 +++GLIBC_2.3 localeconv F +++GLIBC_2.3 localtime F +++GLIBC_2.3 localtime_r F +++GLIBC_2.3 lockf F +++GLIBC_2.3 lockf64 F +++GLIBC_2.3 locs D 0x4 +++GLIBC_2.3 longjmp F +++GLIBC_2.3 lrand48 F +++GLIBC_2.3 lrand48_r F +++GLIBC_2.3 lremovexattr F +++GLIBC_2.3 lsearch F +++GLIBC_2.3 lseek F +++GLIBC_2.3 lseek64 F +++GLIBC_2.3 lsetxattr F +++GLIBC_2.3 lutimes F +++GLIBC_2.3 madvise F +++GLIBC_2.3 makecontext F +++GLIBC_2.3 mallinfo F +++GLIBC_2.3 malloc F +++GLIBC_2.3 malloc_get_state F +++GLIBC_2.3 malloc_set_state F +++GLIBC_2.3 malloc_stats F +++GLIBC_2.3 malloc_trim F +++GLIBC_2.3 malloc_usable_size F +++GLIBC_2.3 mallopt F +++GLIBC_2.3 mallwatch D 0x4 +++GLIBC_2.3 mblen F +++GLIBC_2.3 mbrlen F +++GLIBC_2.3 mbrtowc F +++GLIBC_2.3 mbsinit F +++GLIBC_2.3 mbsnrtowcs F +++GLIBC_2.3 mbsrtowcs F +++GLIBC_2.3 mbstowcs F +++GLIBC_2.3 mbtowc F +++GLIBC_2.3 mcheck F +++GLIBC_2.3 mcheck_check_all F +++GLIBC_2.3 mcheck_pedantic F +++GLIBC_2.3 mcount F +++GLIBC_2.3 memalign F +++GLIBC_2.3 memccpy F +++GLIBC_2.3 memchr F +++GLIBC_2.3 memcmp F +++GLIBC_2.3 memcpy F +++GLIBC_2.3 memfrob F +++GLIBC_2.3 memmem F +++GLIBC_2.3 memmove F +++GLIBC_2.3 mempcpy F +++GLIBC_2.3 memrchr F +++GLIBC_2.3 memset F +++GLIBC_2.3 mincore F +++GLIBC_2.3 minherit F +++GLIBC_2.3 mkdir F +++GLIBC_2.3 mkdtemp F +++GLIBC_2.3 mkfifo F +++GLIBC_2.3 mkstemp F +++GLIBC_2.3 mkstemp64 F +++GLIBC_2.3 mktemp F +++GLIBC_2.3 mktime F +++GLIBC_2.3 mlock F +++GLIBC_2.3 mlockall F +++GLIBC_2.3 mmap F +++GLIBC_2.3 mmap64 F +++GLIBC_2.3 modf F +++GLIBC_2.3 modff F +++GLIBC_2.3 modfind F +++GLIBC_2.3 modfl F +++GLIBC_2.3 modfnext F +++GLIBC_2.3 modnext F +++GLIBC_2.3 modstat F +++GLIBC_2.3 moncontrol F +++GLIBC_2.3 monstartup F +++GLIBC_2.3 mount F +++GLIBC_2.3 mprobe F +++GLIBC_2.3 mprotect F +++GLIBC_2.3 mrand48 F +++GLIBC_2.3 mrand48_r F +++GLIBC_2.3 msgctl F +++GLIBC_2.3 msgget F +++GLIBC_2.3 msgrcv F +++GLIBC_2.3 msgsnd F +++GLIBC_2.3 msync F +++GLIBC_2.3 mtrace F +++GLIBC_2.3 munlock F +++GLIBC_2.3 munlockall F +++GLIBC_2.3 munmap F +++GLIBC_2.3 muntrace F +++GLIBC_2.3 nanosleep F +++GLIBC_2.3 netname2host F +++GLIBC_2.3 netname2user F +++GLIBC_2.3 newlocale F +++GLIBC_2.3 nftw F +++GLIBC_2.3 nftw64 F +++GLIBC_2.3 ngettext F +++GLIBC_2.3 nice F +++GLIBC_2.3 nl_langinfo F +++GLIBC_2.3 nl_langinfo_l F +++GLIBC_2.3 nmount F +++GLIBC_2.3 nrand48 F +++GLIBC_2.3 nrand48_r F +++GLIBC_2.3 ntohl F +++GLIBC_2.3 ntohs F +++GLIBC_2.3 ntp_adjtime F +++GLIBC_2.3 ntp_gettime F +++GLIBC_2.3 obstack_alloc_failed_handler D 0x4 +++GLIBC_2.3 obstack_exit_failure D 0x4 +++GLIBC_2.3 obstack_free F +++GLIBC_2.3 obstack_printf F +++GLIBC_2.3 obstack_vprintf F +++GLIBC_2.3 on_exit F +++GLIBC_2.3 open F +++GLIBC_2.3 open64 F +++GLIBC_2.3 open_memstream F +++GLIBC_2.3 opendir F +++GLIBC_2.3 openlog F +++GLIBC_2.3 optarg D 0x4 +++GLIBC_2.3 opterr D 0x4 +++GLIBC_2.3 optind D 0x4 +++GLIBC_2.3 optopt D 0x4 +++GLIBC_2.3 parse_printf_format F +++GLIBC_2.3 passwd2des F +++GLIBC_2.3 pathconf F +++GLIBC_2.3 pause F +++GLIBC_2.3 pclose F +++GLIBC_2.3 perror F +++GLIBC_2.3 pipe F +++GLIBC_2.3 pmap_getmaps F +++GLIBC_2.3 pmap_getport F +++GLIBC_2.3 pmap_rmtcall F +++GLIBC_2.3 pmap_set F +++GLIBC_2.3 pmap_unset F +++GLIBC_2.3 poll F +++GLIBC_2.3 popen F +++GLIBC_2.3 posix_fadvise F +++GLIBC_2.3 posix_fadvise64 F +++GLIBC_2.3 posix_fallocate F +++GLIBC_2.3 posix_fallocate64 F +++GLIBC_2.3 posix_madvise F +++GLIBC_2.3 posix_memalign F +++GLIBC_2.3 posix_openpt F +++GLIBC_2.3 posix_spawn F +++GLIBC_2.3 posix_spawn_file_actions_addclose F +++GLIBC_2.3 posix_spawn_file_actions_adddup2 F +++GLIBC_2.3 posix_spawn_file_actions_addopen F +++GLIBC_2.3 posix_spawn_file_actions_destroy F +++GLIBC_2.3 posix_spawn_file_actions_init F +++GLIBC_2.3 posix_spawnattr_destroy F +++GLIBC_2.3 posix_spawnattr_getflags F +++GLIBC_2.3 posix_spawnattr_getpgroup F +++GLIBC_2.3 posix_spawnattr_getschedparam F +++GLIBC_2.3 posix_spawnattr_getschedpolicy F +++GLIBC_2.3 posix_spawnattr_getsigdefault F +++GLIBC_2.3 posix_spawnattr_getsigmask F +++GLIBC_2.3 posix_spawnattr_init F +++GLIBC_2.3 posix_spawnattr_setflags F +++GLIBC_2.3 posix_spawnattr_setpgroup F +++GLIBC_2.3 posix_spawnattr_setschedparam F +++GLIBC_2.3 posix_spawnattr_setschedpolicy F +++GLIBC_2.3 posix_spawnattr_setsigdefault F +++GLIBC_2.3 posix_spawnattr_setsigmask F +++GLIBC_2.3 posix_spawnp F +++GLIBC_2.3 pread F +++GLIBC_2.3 pread64 F +++GLIBC_2.3 printf F +++GLIBC_2.3 printf_size F +++GLIBC_2.3 printf_size_info F +++GLIBC_2.3 profil F +++GLIBC_2.3 program_invocation_name D 0x4 +++GLIBC_2.3 program_invocation_short_name D 0x4 +++GLIBC_2.3 pselect F +++GLIBC_2.3 psignal F +++GLIBC_2.3 pthread_attr_destroy F +++GLIBC_2.3 pthread_attr_getdetachstate F +++GLIBC_2.3 pthread_attr_getinheritsched F +++GLIBC_2.3 pthread_attr_getschedparam F +++GLIBC_2.3 pthread_attr_getschedpolicy F +++GLIBC_2.3 pthread_attr_getscope F +++GLIBC_2.3 pthread_attr_init F +++GLIBC_2.3 pthread_attr_setdetachstate F +++GLIBC_2.3 pthread_attr_setinheritsched F +++GLIBC_2.3 pthread_attr_setschedparam F +++GLIBC_2.3 pthread_attr_setschedpolicy F +++GLIBC_2.3 pthread_attr_setscope F +++GLIBC_2.3 pthread_cond_broadcast F +++GLIBC_2.3 pthread_cond_destroy F +++GLIBC_2.3 pthread_cond_init F +++GLIBC_2.3 pthread_cond_signal F +++GLIBC_2.3 pthread_cond_timedwait F +++GLIBC_2.3 pthread_cond_wait F +++GLIBC_2.3 pthread_condattr_destroy F +++GLIBC_2.3 pthread_condattr_init F +++GLIBC_2.3 pthread_equal F +++GLIBC_2.3 pthread_exit F +++GLIBC_2.3 pthread_getschedparam F +++GLIBC_2.3 pthread_mutex_destroy F +++GLIBC_2.3 pthread_mutex_init F +++GLIBC_2.3 pthread_mutex_lock F +++GLIBC_2.3 pthread_mutex_unlock F +++GLIBC_2.3 pthread_self F +++GLIBC_2.3 pthread_setcancelstate F +++GLIBC_2.3 pthread_setcanceltype F +++GLIBC_2.3 pthread_setschedparam F +++GLIBC_2.3 ptrace F +++GLIBC_2.3 ptsname F +++GLIBC_2.3 ptsname_r F +++GLIBC_2.3 putc F +++GLIBC_2.3 putc_unlocked F +++GLIBC_2.3 putchar F +++GLIBC_2.3 putchar_unlocked F +++GLIBC_2.3 putenv F +++GLIBC_2.3 putgrent F +++GLIBC_2.3 putmsg F +++GLIBC_2.3 putpmsg F +++GLIBC_2.3 putpwent F +++GLIBC_2.3 puts F +++GLIBC_2.3 putspent F +++GLIBC_2.3 pututline F +++GLIBC_2.3 pututxline F +++GLIBC_2.3 putw F +++GLIBC_2.3 putwc F +++GLIBC_2.3 putwc_unlocked F +++GLIBC_2.3 putwchar F +++GLIBC_2.3 putwchar_unlocked F +++GLIBC_2.3 pvalloc F +++GLIBC_2.3 pwrite F +++GLIBC_2.3 pwrite64 F +++GLIBC_2.3 qecvt F +++GLIBC_2.3 qecvt_r F +++GLIBC_2.3 qfcvt F +++GLIBC_2.3 qfcvt_r F +++GLIBC_2.3 qgcvt F +++GLIBC_2.3 qsort F +++GLIBC_2.3 quotactl F +++GLIBC_2.3 raise F +++GLIBC_2.3 rand F +++GLIBC_2.3 rand_r F +++GLIBC_2.3 random F +++GLIBC_2.3 random_r F +++GLIBC_2.3 rawmemchr F +++GLIBC_2.3 rcmd F +++GLIBC_2.3 rcmd_af F +++GLIBC_2.3 re_comp F +++GLIBC_2.3 re_compile_fastmap F +++GLIBC_2.3 re_compile_pattern F +++GLIBC_2.3 re_exec F +++GLIBC_2.3 re_match F +++GLIBC_2.3 re_match_2 F +++GLIBC_2.3 re_search F +++GLIBC_2.3 re_search_2 F +++GLIBC_2.3 re_set_registers F +++GLIBC_2.3 re_set_syntax F +++GLIBC_2.3 re_syntax_options D 0x4 +++GLIBC_2.3 read F +++GLIBC_2.3 readdir F +++GLIBC_2.3 readdir64 F +++GLIBC_2.3 readdir64_r F +++GLIBC_2.3 readdir_r F +++GLIBC_2.3 readlink F +++GLIBC_2.3 readv F +++GLIBC_2.3 realloc F +++GLIBC_2.3 realpath F +++GLIBC_2.3 reboot F +++GLIBC_2.3 recv F +++GLIBC_2.3 recvfrom F +++GLIBC_2.3 recvmsg F +++GLIBC_2.3 regcomp F +++GLIBC_2.3 regerror F +++GLIBC_2.3 regexec F +++GLIBC_2.3 regfree F +++GLIBC_2.3 register_printf_function F +++GLIBC_2.3 registerrpc F +++GLIBC_2.3 remove F +++GLIBC_2.3 removexattr F +++GLIBC_2.3 remque F +++GLIBC_2.3 rename F +++GLIBC_2.3 revoke F +++GLIBC_2.3 rewind F +++GLIBC_2.3 rewinddir F +++GLIBC_2.3 rexec F +++GLIBC_2.3 rexec_af F +++GLIBC_2.3 rexecoptions D 0x4 +++GLIBC_2.3 rfork F +++GLIBC_2.3 rindex F +++GLIBC_2.3 rmdir F +++GLIBC_2.3 rpc_createerr D 0x10 +++GLIBC_2.3 rpmatch F +++GLIBC_2.3 rresvport F +++GLIBC_2.3 rresvport_af F +++GLIBC_2.3 rtime F +++GLIBC_2.3 rtprio F +++GLIBC_2.3 ruserok F +++GLIBC_2.3 ruserok_af F +++GLIBC_2.3 ruserpass F +++GLIBC_2.3 sbrk F +++GLIBC_2.3 scalbln F +++GLIBC_2.3 scalblnf F +++GLIBC_2.3 scalblnl F +++GLIBC_2.3 scalbn F +++GLIBC_2.3 scalbnf F +++GLIBC_2.3 scalbnl F +++GLIBC_2.3 scandir F +++GLIBC_2.3 scandir64 F +++GLIBC_2.3 scanf F +++GLIBC_2.3 sched_get_priority_max F +++GLIBC_2.3 sched_get_priority_min F +++GLIBC_2.3 sched_getparam F +++GLIBC_2.3 sched_getscheduler F +++GLIBC_2.3 sched_rr_get_interval F +++GLIBC_2.3 sched_setparam F +++GLIBC_2.3 sched_setscheduler F +++GLIBC_2.3 sched_yield F +++GLIBC_2.3 seed48 F +++GLIBC_2.3 seed48_r F +++GLIBC_2.3 seekdir F +++GLIBC_2.3 select F +++GLIBC_2.3 semctl F +++GLIBC_2.3 semget F +++GLIBC_2.3 semop F +++GLIBC_2.3 send F +++GLIBC_2.3 sendfile F +++GLIBC_2.3 sendfile64 F +++GLIBC_2.3 sendmsg F +++GLIBC_2.3 sendto F +++GLIBC_2.3 setaliasent F +++GLIBC_2.3 setbuf F +++GLIBC_2.3 setbuffer F +++GLIBC_2.3 setcontext F +++GLIBC_2.3 setdomainname F +++GLIBC_2.3 setegid F +++GLIBC_2.3 setenv F +++GLIBC_2.3 seteuid F +++GLIBC_2.3 setfsent F +++GLIBC_2.3 setgid F +++GLIBC_2.3 setgrent F +++GLIBC_2.3 setgroups F +++GLIBC_2.3 sethostent F +++GLIBC_2.3 sethostid F +++GLIBC_2.3 sethostname F +++GLIBC_2.3 setitimer F +++GLIBC_2.3 setjmp F +++GLIBC_2.3 setlinebuf F +++GLIBC_2.3 setlocale F +++GLIBC_2.3 setlogin F +++GLIBC_2.3 setlogmask F +++GLIBC_2.3 setmntent F +++GLIBC_2.3 setnetent F +++GLIBC_2.3 setnetgrent F +++GLIBC_2.3 setpgid F +++GLIBC_2.3 setpgrp F +++GLIBC_2.3 setpriority F +++GLIBC_2.3 setprotoent F +++GLIBC_2.3 setpwent F +++GLIBC_2.3 setregid F +++GLIBC_2.3 setresgid F +++GLIBC_2.3 setresuid F +++GLIBC_2.3 setreuid F +++GLIBC_2.3 setrlimit F +++GLIBC_2.3 setrlimit64 F +++GLIBC_2.3 setrpcent F +++GLIBC_2.3 setservent F +++GLIBC_2.3 setsid F +++GLIBC_2.3 setsockopt F +++GLIBC_2.3 setspent F +++GLIBC_2.3 setstate F +++GLIBC_2.3 setstate_r F +++GLIBC_2.3 settimeofday F +++GLIBC_2.3 setttyent F +++GLIBC_2.3 setuid F +++GLIBC_2.3 setusershell F +++GLIBC_2.3 setutent F +++GLIBC_2.3 setutxent F +++GLIBC_2.3 setvbuf F +++GLIBC_2.3 setxattr F +++GLIBC_2.3 sgetspent F +++GLIBC_2.3 sgetspent_r F +++GLIBC_2.3 shmat F +++GLIBC_2.3 shmctl F +++GLIBC_2.3 shmdt F +++GLIBC_2.3 shmget F +++GLIBC_2.3 shutdown F +++GLIBC_2.3 sigaction F +++GLIBC_2.3 sigaddset F +++GLIBC_2.3 sigaltstack F +++GLIBC_2.3 sigandset F +++GLIBC_2.3 sigblock F +++GLIBC_2.3 sigdelset F +++GLIBC_2.3 sigemptyset F +++GLIBC_2.3 sigfillset F +++GLIBC_2.3 siggetmask F +++GLIBC_2.3 sighold F +++GLIBC_2.3 sigignore F +++GLIBC_2.3 siginterrupt F +++GLIBC_2.3 sigisemptyset F +++GLIBC_2.3 sigismember F +++GLIBC_2.3 siglongjmp F +++GLIBC_2.3 signal F +++GLIBC_2.3 sigorset F +++GLIBC_2.3 sigpause F +++GLIBC_2.3 sigpending F +++GLIBC_2.3 sigprocmask F +++GLIBC_2.3 sigqueue F +++GLIBC_2.3 sigrelse F +++GLIBC_2.3 sigreturn F +++GLIBC_2.3 sigset F +++GLIBC_2.3 sigsetmask F +++GLIBC_2.3 sigstack F +++GLIBC_2.3 sigsuspend F +++GLIBC_2.3 sigtimedwait F +++GLIBC_2.3 sigvec F +++GLIBC_2.3 sigwait F +++GLIBC_2.3 sigwaitinfo F +++GLIBC_2.3 sleep F +++GLIBC_2.3 snprintf F +++GLIBC_2.3 sockatmark F +++GLIBC_2.3 socket F +++GLIBC_2.3 socketpair F +++GLIBC_2.3 sprintf F +++GLIBC_2.3 sprofil F +++GLIBC_2.3 srand F +++GLIBC_2.3 srand48 F +++GLIBC_2.3 srand48_r F +++GLIBC_2.3 srandom F +++GLIBC_2.3 srandom_r F +++GLIBC_2.3 sscanf F +++GLIBC_2.3 ssignal F +++GLIBC_2.3 sstk F +++GLIBC_2.3 statfs F +++GLIBC_2.3 statfs64 F +++GLIBC_2.3 statvfs F +++GLIBC_2.3 statvfs64 F +++GLIBC_2.3 stderr D 0x4 +++GLIBC_2.3 stdin D 0x4 +++GLIBC_2.3 stdout D 0x4 +++GLIBC_2.3 step F +++GLIBC_2.3 stime F +++GLIBC_2.3 stpcpy F +++GLIBC_2.3 stpncpy F +++GLIBC_2.3 strcasecmp F +++GLIBC_2.3 strcasecmp_l F +++GLIBC_2.3 strcasestr F +++GLIBC_2.3 strcat F +++GLIBC_2.3 strchr F +++GLIBC_2.3 strchrnul F +++GLIBC_2.3 strcmp F +++GLIBC_2.3 strcoll F +++GLIBC_2.3 strcoll_l F +++GLIBC_2.3 strcpy F +++GLIBC_2.3 strcspn F +++GLIBC_2.3 strdup F +++GLIBC_2.3 strerror F +++GLIBC_2.3 strerror_r F +++GLIBC_2.3 strfmon F +++GLIBC_2.3 strfmon_l F +++GLIBC_2.3 strfry F +++GLIBC_2.3 strftime F +++GLIBC_2.3 strftime_l F +++GLIBC_2.3 strlen F +++GLIBC_2.3 strncasecmp F +++GLIBC_2.3 strncasecmp_l F +++GLIBC_2.3 strncat F +++GLIBC_2.3 strncmp F +++GLIBC_2.3 strncpy F +++GLIBC_2.3 strndup F +++GLIBC_2.3 strnlen F +++GLIBC_2.3 strpbrk F +++GLIBC_2.3 strptime F +++GLIBC_2.3 strrchr F +++GLIBC_2.3 strsep F +++GLIBC_2.3 strsignal F +++GLIBC_2.3 strspn F +++GLIBC_2.3 strstr F +++GLIBC_2.3 strtod F +++GLIBC_2.3 strtod_l F +++GLIBC_2.3 strtof F +++GLIBC_2.3 strtof_l F +++GLIBC_2.3 strtoimax F +++GLIBC_2.3 strtok F +++GLIBC_2.3 strtok_r F +++GLIBC_2.3 strtol F +++GLIBC_2.3 strtol_l F +++GLIBC_2.3 strtold F +++GLIBC_2.3 strtold_l F +++GLIBC_2.3 strtoll F +++GLIBC_2.3 strtoll_l F +++GLIBC_2.3 strtoq F +++GLIBC_2.3 strtoul F +++GLIBC_2.3 strtoul_l F +++GLIBC_2.3 strtoull F +++GLIBC_2.3 strtoull_l F +++GLIBC_2.3 strtoumax F +++GLIBC_2.3 strtouq F +++GLIBC_2.3 strverscmp F +++GLIBC_2.3 strxfrm F +++GLIBC_2.3 strxfrm_l F +++GLIBC_2.3 stty F +++GLIBC_2.3 svc_exit F +++GLIBC_2.3 svc_fdset D 0x80 +++GLIBC_2.3 svc_getreq F +++GLIBC_2.3 svc_getreq_common F +++GLIBC_2.3 svc_getreq_poll F +++GLIBC_2.3 svc_getreqset F +++GLIBC_2.3 svc_max_pollfd D 0x4 +++GLIBC_2.3 svc_pollfd D 0x4 +++GLIBC_2.3 svc_register F +++GLIBC_2.3 svc_run F +++GLIBC_2.3 svc_sendreply F +++GLIBC_2.3 svc_unregister F +++GLIBC_2.3 svcauthdes_stats D 0xc +++GLIBC_2.3 svcerr_auth F +++GLIBC_2.3 svcerr_decode F +++GLIBC_2.3 svcerr_noproc F +++GLIBC_2.3 svcerr_noprog F +++GLIBC_2.3 svcerr_progvers F +++GLIBC_2.3 svcerr_systemerr F +++GLIBC_2.3 svcerr_weakauth F +++GLIBC_2.3 svcfd_create F +++GLIBC_2.3 svcraw_create F +++GLIBC_2.3 svctcp_create F +++GLIBC_2.3 svcudp_bufcreate F +++GLIBC_2.3 svcudp_create F +++GLIBC_2.3 svcudp_enablecache F +++GLIBC_2.3 svcunix_create F +++GLIBC_2.3 svcunixfd_create F +++GLIBC_2.3 swab F +++GLIBC_2.3 swapcontext F +++GLIBC_2.3 swapoff F +++GLIBC_2.3 swapon F +++GLIBC_2.3 swprintf F +++GLIBC_2.3 swscanf F +++GLIBC_2.3 symlink F +++GLIBC_2.3 sync F +++GLIBC_2.3 sys_errlist D 0x15c +++GLIBC_2.3 sys_nerr D 0x4 +++GLIBC_2.3 sys_sigabbrev D 0x204 +++GLIBC_2.3 sys_siglist D 0x204 +++GLIBC_2.3 sysarch F +++GLIBC_2.3 syscall F +++GLIBC_2.3 sysconf F +++GLIBC_2.3 sysctl F +++GLIBC_2.3 sysctlbyname F +++GLIBC_2.3 syslog F +++GLIBC_2.3 system F +++GLIBC_2.3 sysv_signal F +++GLIBC_2.3 tcdrain F +++GLIBC_2.3 tcflow F +++GLIBC_2.3 tcflush F +++GLIBC_2.3 tcgetattr F +++GLIBC_2.3 tcgetpgrp F +++GLIBC_2.3 tcgetsid F +++GLIBC_2.3 tcsendbreak F +++GLIBC_2.3 tcsetattr F +++GLIBC_2.3 tcsetpgrp F +++GLIBC_2.3 tdelete F +++GLIBC_2.3 tdestroy F +++GLIBC_2.3 telldir F +++GLIBC_2.3 tempnam F +++GLIBC_2.3 textdomain F +++GLIBC_2.3 tfind F +++GLIBC_2.3 time F +++GLIBC_2.3 timegm F +++GLIBC_2.3 timelocal F +++GLIBC_2.3 times F +++GLIBC_2.3 timezone D 0x4 +++GLIBC_2.3 tmpfile F +++GLIBC_2.3 tmpfile64 F +++GLIBC_2.3 tmpnam F +++GLIBC_2.3 tmpnam_r F +++GLIBC_2.3 toascii F +++GLIBC_2.3 tolower F +++GLIBC_2.3 tolower_l F +++GLIBC_2.3 toupper F +++GLIBC_2.3 toupper_l F +++GLIBC_2.3 towctrans F +++GLIBC_2.3 towctrans_l F +++GLIBC_2.3 towlower F +++GLIBC_2.3 towlower_l F +++GLIBC_2.3 towupper F +++GLIBC_2.3 towupper_l F +++GLIBC_2.3 tr_break F +++GLIBC_2.3 truncate F +++GLIBC_2.3 truncate64 F +++GLIBC_2.3 tsearch F +++GLIBC_2.3 ttyname F +++GLIBC_2.3 ttyname_r F +++GLIBC_2.3 ttyslot F +++GLIBC_2.3 twalk F +++GLIBC_2.3 tzname D 0x8 +++GLIBC_2.3 tzset F +++GLIBC_2.3 ualarm F +++GLIBC_2.3 ulckpwdf F +++GLIBC_2.3 ulimit F +++GLIBC_2.3 umask F +++GLIBC_2.3 uname F +++GLIBC_2.3 undelete F +++GLIBC_2.3 ungetc F +++GLIBC_2.3 ungetwc F +++GLIBC_2.3 unlink F +++GLIBC_2.3 unlockpt F +++GLIBC_2.3 unmount F +++GLIBC_2.3 unsetenv F +++GLIBC_2.3 updwtmp F +++GLIBC_2.3 updwtmpx F +++GLIBC_2.3 uselocale F +++GLIBC_2.3 user2netname F +++GLIBC_2.3 usleep F +++GLIBC_2.3 ustat F +++GLIBC_2.3 utime F +++GLIBC_2.3 utimes F +++GLIBC_2.3 utmpname F +++GLIBC_2.3 utmpxname F +++GLIBC_2.3 utrace F +++GLIBC_2.3 valloc F +++GLIBC_2.3 vasprintf F +++GLIBC_2.3 vdprintf F +++GLIBC_2.3 verr F +++GLIBC_2.3 verrx F +++GLIBC_2.3 versionsort F +++GLIBC_2.3 versionsort64 F +++GLIBC_2.3 vfork F +++GLIBC_2.3 vfprintf F +++GLIBC_2.3 vfscanf F +++GLIBC_2.3 vfwprintf F +++GLIBC_2.3 vfwscanf F +++GLIBC_2.3 vhangup F +++GLIBC_2.3 vlimit F +++GLIBC_2.3 vprintf F +++GLIBC_2.3 vscanf F +++GLIBC_2.3 vsnprintf F +++GLIBC_2.3 vsprintf F +++GLIBC_2.3 vsscanf F +++GLIBC_2.3 vswprintf F +++GLIBC_2.3 vswscanf F +++GLIBC_2.3 vsyslog F +++GLIBC_2.3 vtimes F +++GLIBC_2.3 vwarn F +++GLIBC_2.3 vwarnx F +++GLIBC_2.3 vwprintf F +++GLIBC_2.3 vwscanf F +++GLIBC_2.3 wait F +++GLIBC_2.3 wait3 F +++GLIBC_2.3 wait4 F +++GLIBC_2.3 waitid F +++GLIBC_2.3 waitpid F +++GLIBC_2.3 warn F +++GLIBC_2.3 warnx F +++GLIBC_2.3 wcpcpy F +++GLIBC_2.3 wcpncpy F +++GLIBC_2.3 wcrtomb F +++GLIBC_2.3 wcscasecmp F +++GLIBC_2.3 wcscasecmp_l F +++GLIBC_2.3 wcscat F +++GLIBC_2.3 wcschr F +++GLIBC_2.3 wcschrnul F +++GLIBC_2.3 wcscmp F +++GLIBC_2.3 wcscoll F +++GLIBC_2.3 wcscoll_l F +++GLIBC_2.3 wcscpy F +++GLIBC_2.3 wcscspn F +++GLIBC_2.3 wcsdup F +++GLIBC_2.3 wcsftime F +++GLIBC_2.3 wcsftime_l F +++GLIBC_2.3 wcslen F +++GLIBC_2.3 wcsncasecmp F +++GLIBC_2.3 wcsncasecmp_l F +++GLIBC_2.3 wcsncat F +++GLIBC_2.3 wcsncmp F +++GLIBC_2.3 wcsncpy F +++GLIBC_2.3 wcsnlen F +++GLIBC_2.3 wcsnrtombs F +++GLIBC_2.3 wcspbrk F +++GLIBC_2.3 wcsrchr F +++GLIBC_2.3 wcsrtombs F +++GLIBC_2.3 wcsspn F +++GLIBC_2.3 wcsstr F +++GLIBC_2.3 wcstod F +++GLIBC_2.3 wcstod_l F +++GLIBC_2.3 wcstof F +++GLIBC_2.3 wcstof_l F +++GLIBC_2.3 wcstoimax F +++GLIBC_2.3 wcstok F +++GLIBC_2.3 wcstol F +++GLIBC_2.3 wcstol_l F +++GLIBC_2.3 wcstold F +++GLIBC_2.3 wcstold_l F +++GLIBC_2.3 wcstoll F +++GLIBC_2.3 wcstoll_l F +++GLIBC_2.3 wcstombs F +++GLIBC_2.3 wcstoq F +++GLIBC_2.3 wcstoul F +++GLIBC_2.3 wcstoul_l F +++GLIBC_2.3 wcstoull F +++GLIBC_2.3 wcstoull_l F +++GLIBC_2.3 wcstoumax F +++GLIBC_2.3 wcstouq F +++GLIBC_2.3 wcswcs F +++GLIBC_2.3 wcswidth F +++GLIBC_2.3 wcsxfrm F +++GLIBC_2.3 wcsxfrm_l F +++GLIBC_2.3 wctob F +++GLIBC_2.3 wctomb F +++GLIBC_2.3 wctrans F +++GLIBC_2.3 wctrans_l F +++GLIBC_2.3 wctype F +++GLIBC_2.3 wctype_l F +++GLIBC_2.3 wcwidth F +++GLIBC_2.3 wmemchr F +++GLIBC_2.3 wmemcmp F +++GLIBC_2.3 wmemcpy F +++GLIBC_2.3 wmemmove F +++GLIBC_2.3 wmempcpy F +++GLIBC_2.3 wmemset F +++GLIBC_2.3 wordexp F +++GLIBC_2.3 wordfree F +++GLIBC_2.3 wprintf F +++GLIBC_2.3 write F +++GLIBC_2.3 writev F +++GLIBC_2.3 wscanf F +++GLIBC_2.3 xdecrypt F +++GLIBC_2.3 xdr_accepted_reply F +++GLIBC_2.3 xdr_array F +++GLIBC_2.3 xdr_authdes_cred F +++GLIBC_2.3 xdr_authdes_verf F +++GLIBC_2.3 xdr_authunix_parms F +++GLIBC_2.3 xdr_bool F +++GLIBC_2.3 xdr_bytes F +++GLIBC_2.3 xdr_callhdr F +++GLIBC_2.3 xdr_callmsg F +++GLIBC_2.3 xdr_char F +++GLIBC_2.3 xdr_cryptkeyarg F +++GLIBC_2.3 xdr_cryptkeyarg2 F +++GLIBC_2.3 xdr_cryptkeyres F +++GLIBC_2.3 xdr_des_block F +++GLIBC_2.3 xdr_double F +++GLIBC_2.3 xdr_enum F +++GLIBC_2.3 xdr_float F +++GLIBC_2.3 xdr_free F +++GLIBC_2.3 xdr_getcredres F +++GLIBC_2.3 xdr_hyper F +++GLIBC_2.3 xdr_int F +++GLIBC_2.3 xdr_int16_t F +++GLIBC_2.3 xdr_int32_t F +++GLIBC_2.3 xdr_int64_t F +++GLIBC_2.3 xdr_int8_t F +++GLIBC_2.3 xdr_key_netstarg F +++GLIBC_2.3 xdr_key_netstres F +++GLIBC_2.3 xdr_keybuf F +++GLIBC_2.3 xdr_keystatus F +++GLIBC_2.3 xdr_long F +++GLIBC_2.3 xdr_longlong_t F +++GLIBC_2.3 xdr_netnamestr F +++GLIBC_2.3 xdr_netobj F +++GLIBC_2.3 xdr_opaque F +++GLIBC_2.3 xdr_opaque_auth F +++GLIBC_2.3 xdr_pmap F +++GLIBC_2.3 xdr_pmaplist F +++GLIBC_2.3 xdr_pointer F +++GLIBC_2.3 xdr_reference F +++GLIBC_2.3 xdr_rejected_reply F +++GLIBC_2.3 xdr_replymsg F +++GLIBC_2.3 xdr_rmtcall_args F +++GLIBC_2.3 xdr_rmtcallres F +++GLIBC_2.3 xdr_short F +++GLIBC_2.3 xdr_sizeof F +++GLIBC_2.3 xdr_string F +++GLIBC_2.3 xdr_u_char F +++GLIBC_2.3 xdr_u_hyper F +++GLIBC_2.3 xdr_u_int F +++GLIBC_2.3 xdr_u_long F +++GLIBC_2.3 xdr_u_longlong_t F +++GLIBC_2.3 xdr_u_short F +++GLIBC_2.3 xdr_uint16_t F +++GLIBC_2.3 xdr_uint32_t F +++GLIBC_2.3 xdr_uint64_t F +++GLIBC_2.3 xdr_uint8_t F +++GLIBC_2.3 xdr_union F +++GLIBC_2.3 xdr_unixcred F +++GLIBC_2.3 xdr_vector F +++GLIBC_2.3 xdr_void F +++GLIBC_2.3 xdr_wrapstring F +++GLIBC_2.3 xdrmem_create F +++GLIBC_2.3 xdrrec_create F +++GLIBC_2.3 xdrrec_endofrecord F +++GLIBC_2.3 xdrrec_eof F +++GLIBC_2.3 xdrrec_skiprecord F +++GLIBC_2.3 xdrstdio_create F +++GLIBC_2.3 xencrypt F +++GLIBC_2.3 xprt_register F +++GLIBC_2.3 xprt_unregister F +++GLIBC_2.3.2 GLIBC_2.3.2 A +++GLIBC_2.3.2 __register_atfork F +++GLIBC_2.3.2 pthread_cond_broadcast F +++GLIBC_2.3.2 pthread_cond_destroy F +++GLIBC_2.3.2 pthread_cond_init F +++GLIBC_2.3.2 pthread_cond_signal F +++GLIBC_2.3.2 pthread_cond_timedwait F +++GLIBC_2.3.2 pthread_cond_wait F +++GLIBC_2.3.2 strptime_l F +++GLIBC_2.3.3 GLIBC_2.3.3 A +++GLIBC_2.3.3 inet6_option_alloc F +++GLIBC_2.3.3 inet6_option_append F +++GLIBC_2.3.3 inet6_option_find F +++GLIBC_2.3.3 inet6_option_init F +++GLIBC_2.3.3 inet6_option_next F +++GLIBC_2.3.3 inet6_option_space F +++GLIBC_2.3.3 nftw F +++GLIBC_2.3.3 nftw64 F +++GLIBC_2.3.3 posix_fallocate64 F +++GLIBC_2.3.3 remap_file_pages F +++GLIBC_2.3.3 sched_getaffinity F +++GLIBC_2.3.3 sched_setaffinity F +++GLIBC_2.3.3 semtimedop F +++GLIBC_2.3.4 GLIBC_2.3.4 A +++GLIBC_2.3.4 __chk_fail F +++GLIBC_2.3.4 __fprintf_chk F +++GLIBC_2.3.4 __gets_chk F +++GLIBC_2.3.4 __libc_sa_len F +++GLIBC_2.3.4 __memcpy_chk F +++GLIBC_2.3.4 __memmove_chk F +++GLIBC_2.3.4 __mempcpy_chk F +++GLIBC_2.3.4 __memset_chk F +++GLIBC_2.3.4 __printf_chk F +++GLIBC_2.3.4 __snprintf_chk F +++GLIBC_2.3.4 __sprintf_chk F +++GLIBC_2.3.4 __stpcpy_chk F +++GLIBC_2.3.4 __strcat_chk F +++GLIBC_2.3.4 __strcpy_chk F +++GLIBC_2.3.4 __strncat_chk F +++GLIBC_2.3.4 __strncpy_chk F +++GLIBC_2.3.4 __vfprintf_chk F +++GLIBC_2.3.4 __vprintf_chk F +++GLIBC_2.3.4 __vsnprintf_chk F +++GLIBC_2.3.4 __vsprintf_chk F +++GLIBC_2.3.4 __xpg_strerror_r F +++GLIBC_2.3.4 _sys_errlist D 0x174 +++GLIBC_2.3.4 _sys_nerr D 0x4 +++GLIBC_2.3.4 fhstat64 F +++GLIBC_2.3.4 fhstatfs64 F +++GLIBC_2.3.4 getipv4sourcefilter F +++GLIBC_2.3.4 getsourcefilter F +++GLIBC_2.3.4 kevent F +++GLIBC_2.3.4 kqueue F +++GLIBC_2.3.4 regexec F +++GLIBC_2.3.4 setipv4sourcefilter F +++GLIBC_2.3.4 setsourcefilter F +++GLIBC_2.3.4 sys_errlist D 0x174 +++GLIBC_2.3.4 sys_nerr D 0x4 +++GLIBC_2.3.4 xdr_quad_t F +++GLIBC_2.3.4 xdr_u_quad_t F +++GLIBC_2.4 GLIBC_2.4 A +++GLIBC_2.4 __confstr_chk F +++GLIBC_2.4 __fgets_chk F +++GLIBC_2.4 __fgets_unlocked_chk F +++GLIBC_2.4 __fgetws_chk F +++GLIBC_2.4 __fgetws_unlocked_chk F +++GLIBC_2.4 __fwprintf_chk F +++GLIBC_2.4 __fxstatat F +++GLIBC_2.4 __fxstatat64 F +++GLIBC_2.4 __getcwd_chk F +++GLIBC_2.4 __getdomainname_chk F +++GLIBC_2.4 __getgroups_chk F +++GLIBC_2.4 __gethostname_chk F +++GLIBC_2.4 __getlogin_r_chk F +++GLIBC_2.4 __getwd_chk F +++GLIBC_2.4 __mbsnrtowcs_chk F +++GLIBC_2.4 __mbsrtowcs_chk F +++GLIBC_2.4 __mbstowcs_chk F +++GLIBC_2.4 __pread64_chk F +++GLIBC_2.4 __pread_chk F +++GLIBC_2.4 __ptsname_r_chk F +++GLIBC_2.4 __read_chk F +++GLIBC_2.4 __readlink_chk F +++GLIBC_2.4 __realpath_chk F +++GLIBC_2.4 __recv_chk F +++GLIBC_2.4 __recvfrom_chk F +++GLIBC_2.4 __stack_chk_fail F +++GLIBC_2.4 __stpncpy_chk F +++GLIBC_2.4 __swprintf_chk F +++GLIBC_2.4 __syslog_chk F +++GLIBC_2.4 __ttyname_r_chk F +++GLIBC_2.4 __vfwprintf_chk F +++GLIBC_2.4 __vswprintf_chk F +++GLIBC_2.4 __vsyslog_chk F +++GLIBC_2.4 __vwprintf_chk F +++GLIBC_2.4 __wcpcpy_chk F +++GLIBC_2.4 __wcpncpy_chk F +++GLIBC_2.4 __wcrtomb_chk F +++GLIBC_2.4 __wcscat_chk F +++GLIBC_2.4 __wcscpy_chk F +++GLIBC_2.4 __wcsncat_chk F +++GLIBC_2.4 __wcsncpy_chk F +++GLIBC_2.4 __wcsnrtombs_chk F +++GLIBC_2.4 __wcsrtombs_chk F +++GLIBC_2.4 __wcstombs_chk F +++GLIBC_2.4 __wctomb_chk F +++GLIBC_2.4 __wmemcpy_chk F +++GLIBC_2.4 __wmemmove_chk F +++GLIBC_2.4 __wmempcpy_chk F +++GLIBC_2.4 __wmemset_chk F +++GLIBC_2.4 __wprintf_chk F +++GLIBC_2.4 __xmknodat F +++GLIBC_2.4 eaccess F +++GLIBC_2.4 faccessat F +++GLIBC_2.4 fchmodat F +++GLIBC_2.4 fchownat F +++GLIBC_2.4 fdopendir F +++GLIBC_2.4 futimesat F +++GLIBC_2.4 linkat F +++GLIBC_2.4 mkdirat F +++GLIBC_2.4 mkfifoat F +++GLIBC_2.4 open_wmemstream F +++GLIBC_2.4 openat F +++GLIBC_2.4 openat64 F +++GLIBC_2.4 ppoll F +++GLIBC_2.4 readlinkat F +++GLIBC_2.4 renameat F +++GLIBC_2.4 symlinkat F +++GLIBC_2.4 unlinkat F +++GLIBC_2.5 GLIBC_2.5 A +++GLIBC_2.5 __readlinkat_chk F +++GLIBC_2.5 inet6_opt_append F +++GLIBC_2.5 inet6_opt_find F +++GLIBC_2.5 inet6_opt_finish F +++GLIBC_2.5 inet6_opt_get_val F +++GLIBC_2.5 inet6_opt_init F +++GLIBC_2.5 inet6_opt_next F +++GLIBC_2.5 inet6_opt_set_val F +++GLIBC_2.5 inet6_rth_add F +++GLIBC_2.5 inet6_rth_getaddr F +++GLIBC_2.5 inet6_rth_init F +++GLIBC_2.5 inet6_rth_reverse F +++GLIBC_2.5 inet6_rth_segments F +++GLIBC_2.5 inet6_rth_space F +++GLIBC_2.6 GLIBC_2.6 A +++GLIBC_2.6 __sched_cpucount F +++GLIBC_2.6 futimens F +++GLIBC_2.6 strerror_l F +++GLIBC_2.6 utimensat F +++GLIBC_2.7 GLIBC_2.7 A +++GLIBC_2.7 __fread_chk F +++GLIBC_2.7 __fread_unlocked_chk F +++GLIBC_2.7 __isoc99_fscanf F +++GLIBC_2.7 __isoc99_fwscanf F +++GLIBC_2.7 __isoc99_scanf F +++GLIBC_2.7 __isoc99_sscanf F +++GLIBC_2.7 __isoc99_swscanf F +++GLIBC_2.7 __isoc99_vfscanf F +++GLIBC_2.7 __isoc99_vfwscanf F +++GLIBC_2.7 __isoc99_vscanf F +++GLIBC_2.7 __isoc99_vsscanf F +++GLIBC_2.7 __isoc99_vswscanf F +++GLIBC_2.7 __isoc99_vwscanf F +++GLIBC_2.7 __isoc99_wscanf F +++GLIBC_2.7 __open64_2 F +++GLIBC_2.7 __open_2 F +++GLIBC_2.7 __openat64_2 F +++GLIBC_2.7 __openat_2 F +++GLIBC_2.7 __sched_cpualloc F +++GLIBC_2.7 __sched_cpufree F +++GLIBC_2.7 mkostemp F +++GLIBC_2.7 mkostemp64 F +++GLIBC_2.8 GLIBC_2.8 A +++GLIBC_2.8 __asprintf_chk F +++GLIBC_2.8 __dprintf_chk F +++GLIBC_2.8 __obstack_printf_chk F +++GLIBC_2.8 __obstack_vprintf_chk F +++GLIBC_2.8 __vasprintf_chk F +++GLIBC_2.8 __vdprintf_chk F +++GLIBC_2.8 qsort_r F +++GLIBC_2.9 GLIBC_2.9 A +++GLIBC_2.9 dup3 F +++GLIBC_2.9 pipe2 F ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/libcrypt.abilist ++@@ -0,0 +1,8 @@ +++GLIBC_2.3 GLIBC_2.3 A +++GLIBC_2.3 crypt F +++GLIBC_2.3 crypt_r F +++GLIBC_2.3 encrypt F +++GLIBC_2.3 encrypt_r F +++GLIBC_2.3 fcrypt F +++GLIBC_2.3 setkey F +++GLIBC_2.3 setkey_r F ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/libdl.abilist ++@@ -0,0 +1,12 @@ +++GLIBC_2.3 GLIBC_2.3 A +++GLIBC_2.3 dladdr F +++GLIBC_2.3 dlclose F +++GLIBC_2.3 dlerror F +++GLIBC_2.3 dlopen F +++GLIBC_2.3 dlsym F +++GLIBC_2.3 dlvsym F +++GLIBC_2.3.3 GLIBC_2.3.3 A +++GLIBC_2.3.3 dladdr1 F +++GLIBC_2.3.3 dlinfo F +++GLIBC_2.3.4 GLIBC_2.3.4 A +++GLIBC_2.3.4 dlmopen F ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/libm.abilist ++@@ -0,0 +1,467 @@ +++GLIBC_2.15 GLIBC_2.15 A +++GLIBC_2.15 __acos_finite F +++GLIBC_2.15 __acosf_finite F +++GLIBC_2.15 __acosh_finite F +++GLIBC_2.15 __acoshf_finite F +++GLIBC_2.15 __acoshl_finite F +++GLIBC_2.15 __acosl_finite F +++GLIBC_2.15 __asin_finite F +++GLIBC_2.15 __asinf_finite F +++GLIBC_2.15 __asinl_finite F +++GLIBC_2.15 __atan2_finite F +++GLIBC_2.15 __atan2f_finite F +++GLIBC_2.15 __atan2l_finite F +++GLIBC_2.15 __atanh_finite F +++GLIBC_2.15 __atanhf_finite F +++GLIBC_2.15 __atanhl_finite F +++GLIBC_2.15 __cosh_finite F +++GLIBC_2.15 __coshf_finite F +++GLIBC_2.15 __coshl_finite F +++GLIBC_2.15 __exp10_finite F +++GLIBC_2.15 __exp10f_finite F +++GLIBC_2.15 __exp10l_finite F +++GLIBC_2.15 __exp2_finite F +++GLIBC_2.15 __exp2f_finite F +++GLIBC_2.15 __exp2l_finite F +++GLIBC_2.15 __exp_finite F +++GLIBC_2.15 __expf_finite F +++GLIBC_2.15 __expl_finite F +++GLIBC_2.15 __fmod_finite F +++GLIBC_2.15 __fmodf_finite F +++GLIBC_2.15 __fmodl_finite F +++GLIBC_2.15 __gamma_r_finite F +++GLIBC_2.15 __gammaf_r_finite F +++GLIBC_2.15 __gammal_r_finite F +++GLIBC_2.15 __hypot_finite F +++GLIBC_2.15 __hypotf_finite F +++GLIBC_2.15 __hypotl_finite F +++GLIBC_2.15 __j0_finite F +++GLIBC_2.15 __j0f_finite F +++GLIBC_2.15 __j0l_finite F +++GLIBC_2.15 __j1_finite F +++GLIBC_2.15 __j1f_finite F +++GLIBC_2.15 __j1l_finite F +++GLIBC_2.15 __jn_finite F +++GLIBC_2.15 __jnf_finite F +++GLIBC_2.15 __jnl_finite F +++GLIBC_2.15 __lgamma_r_finite F +++GLIBC_2.15 __lgammaf_r_finite F +++GLIBC_2.15 __lgammal_r_finite F +++GLIBC_2.15 __log10_finite F +++GLIBC_2.15 __log10f_finite F +++GLIBC_2.15 __log10l_finite F +++GLIBC_2.15 __log2_finite F +++GLIBC_2.15 __log2f_finite F +++GLIBC_2.15 __log2l_finite F +++GLIBC_2.15 __log_finite F +++GLIBC_2.15 __logf_finite F +++GLIBC_2.15 __logl_finite F +++GLIBC_2.15 __pow_finite F +++GLIBC_2.15 __powf_finite F +++GLIBC_2.15 __powl_finite F +++GLIBC_2.15 __remainder_finite F +++GLIBC_2.15 __remainderf_finite F +++GLIBC_2.15 __remainderl_finite F +++GLIBC_2.15 __scalb_finite F +++GLIBC_2.15 __scalbf_finite F +++GLIBC_2.15 __scalbl_finite F +++GLIBC_2.15 __sinh_finite F +++GLIBC_2.15 __sinhf_finite F +++GLIBC_2.15 __sinhl_finite F +++GLIBC_2.15 __sqrt_finite F +++GLIBC_2.15 __sqrtf_finite F +++GLIBC_2.15 __sqrtl_finite F +++GLIBC_2.15 __y0_finite F +++GLIBC_2.15 __y0f_finite F +++GLIBC_2.15 __y0l_finite F +++GLIBC_2.15 __y1_finite F +++GLIBC_2.15 __y1f_finite F +++GLIBC_2.15 __y1l_finite F +++GLIBC_2.15 __yn_finite F +++GLIBC_2.15 __ynf_finite F +++GLIBC_2.15 __ynl_finite F +++GLIBC_2.18 GLIBC_2.18 A +++GLIBC_2.18 __issignaling F +++GLIBC_2.18 __issignalingf F +++GLIBC_2.18 __issignalingl F +++GLIBC_2.23 GLIBC_2.23 A +++GLIBC_2.23 __signgam D 0x4 +++GLIBC_2.23 lgamma F +++GLIBC_2.23 lgammaf F +++GLIBC_2.23 lgammal F +++GLIBC_2.24 GLIBC_2.24 A +++GLIBC_2.24 nextdown F +++GLIBC_2.24 nextdownf F +++GLIBC_2.24 nextdownl F +++GLIBC_2.24 nextup F +++GLIBC_2.24 nextupf F +++GLIBC_2.24 nextupl F +++GLIBC_2.25 GLIBC_2.25 A +++GLIBC_2.25 __iscanonicall F +++GLIBC_2.25 __iseqsig F +++GLIBC_2.25 __iseqsigf F +++GLIBC_2.25 __iseqsigl F +++GLIBC_2.25 canonicalize F +++GLIBC_2.25 canonicalizef F +++GLIBC_2.25 canonicalizel F +++GLIBC_2.25 fegetmode F +++GLIBC_2.25 fesetexcept F +++GLIBC_2.25 fesetmode F +++GLIBC_2.25 fetestexceptflag F +++GLIBC_2.25 fmaxmag F +++GLIBC_2.25 fmaxmagf F +++GLIBC_2.25 fmaxmagl F +++GLIBC_2.25 fminmag F +++GLIBC_2.25 fminmagf F +++GLIBC_2.25 fminmagl F +++GLIBC_2.25 fromfp F +++GLIBC_2.25 fromfpf F +++GLIBC_2.25 fromfpl F +++GLIBC_2.25 fromfpx F +++GLIBC_2.25 fromfpxf F +++GLIBC_2.25 fromfpxl F +++GLIBC_2.25 getpayload F +++GLIBC_2.25 getpayloadf F +++GLIBC_2.25 getpayloadl F +++GLIBC_2.25 llogb F +++GLIBC_2.25 llogbf F +++GLIBC_2.25 llogbl F +++GLIBC_2.25 roundeven F +++GLIBC_2.25 roundevenf F +++GLIBC_2.25 roundevenl F +++GLIBC_2.25 setpayload F +++GLIBC_2.25 setpayloadf F +++GLIBC_2.25 setpayloadl F +++GLIBC_2.25 setpayloadsig F +++GLIBC_2.25 setpayloadsigf F +++GLIBC_2.25 setpayloadsigl F +++GLIBC_2.25 totalorder F +++GLIBC_2.25 totalorderf F +++GLIBC_2.25 totalorderl F +++GLIBC_2.25 totalordermag F +++GLIBC_2.25 totalordermagf F +++GLIBC_2.25 totalordermagl F +++GLIBC_2.25 ufromfp F +++GLIBC_2.25 ufromfpf F +++GLIBC_2.25 ufromfpl F +++GLIBC_2.25 ufromfpx F +++GLIBC_2.25 ufromfpxf F +++GLIBC_2.25 ufromfpxl F +++GLIBC_2.3 GLIBC_2.3 A +++GLIBC_2.3 _LIB_VERSION D 0x4 +++GLIBC_2.3 __clog10 F +++GLIBC_2.3 __clog10f F +++GLIBC_2.3 __clog10l F +++GLIBC_2.3 __expl F +++GLIBC_2.3 __expm1l F +++GLIBC_2.3 __finite F +++GLIBC_2.3 __finitef F +++GLIBC_2.3 __finitel F +++GLIBC_2.3 __fpclassify F +++GLIBC_2.3 __fpclassifyf F +++GLIBC_2.3 __fpclassifyl F +++GLIBC_2.3 __signbit F +++GLIBC_2.3 __signbitf F +++GLIBC_2.3 __signbitl F +++GLIBC_2.3 acos F +++GLIBC_2.3 acosf F +++GLIBC_2.3 acosh F +++GLIBC_2.3 acoshf F +++GLIBC_2.3 acoshl F +++GLIBC_2.3 acosl F +++GLIBC_2.3 asin F +++GLIBC_2.3 asinf F +++GLIBC_2.3 asinh F +++GLIBC_2.3 asinhf F +++GLIBC_2.3 asinhl F +++GLIBC_2.3 asinl F +++GLIBC_2.3 atan F +++GLIBC_2.3 atan2 F +++GLIBC_2.3 atan2f F +++GLIBC_2.3 atan2l F +++GLIBC_2.3 atanf F +++GLIBC_2.3 atanh F +++GLIBC_2.3 atanhf F +++GLIBC_2.3 atanhl F +++GLIBC_2.3 atanl F +++GLIBC_2.3 cabs F +++GLIBC_2.3 cabsf F +++GLIBC_2.3 cabsl F +++GLIBC_2.3 cacos F +++GLIBC_2.3 cacosf F +++GLIBC_2.3 cacosh F +++GLIBC_2.3 cacoshf F +++GLIBC_2.3 cacoshl F +++GLIBC_2.3 cacosl F +++GLIBC_2.3 carg F +++GLIBC_2.3 cargf F +++GLIBC_2.3 cargl F +++GLIBC_2.3 casin F +++GLIBC_2.3 casinf F +++GLIBC_2.3 casinh F +++GLIBC_2.3 casinhf F +++GLIBC_2.3 casinhl F +++GLIBC_2.3 casinl F +++GLIBC_2.3 catan F +++GLIBC_2.3 catanf F +++GLIBC_2.3 catanh F +++GLIBC_2.3 catanhf F +++GLIBC_2.3 catanhl F +++GLIBC_2.3 catanl F +++GLIBC_2.3 cbrt F +++GLIBC_2.3 cbrtf F +++GLIBC_2.3 cbrtl F +++GLIBC_2.3 ccos F +++GLIBC_2.3 ccosf F +++GLIBC_2.3 ccosh F +++GLIBC_2.3 ccoshf F +++GLIBC_2.3 ccoshl F +++GLIBC_2.3 ccosl F +++GLIBC_2.3 ceil F +++GLIBC_2.3 ceilf F +++GLIBC_2.3 ceill F +++GLIBC_2.3 cexp F +++GLIBC_2.3 cexpf F +++GLIBC_2.3 cexpl F +++GLIBC_2.3 cimag F +++GLIBC_2.3 cimagf F +++GLIBC_2.3 cimagl F +++GLIBC_2.3 clog F +++GLIBC_2.3 clog10 F +++GLIBC_2.3 clog10f F +++GLIBC_2.3 clog10l F +++GLIBC_2.3 clogf F +++GLIBC_2.3 clogl F +++GLIBC_2.3 conj F +++GLIBC_2.3 conjf F +++GLIBC_2.3 conjl F +++GLIBC_2.3 copysign F +++GLIBC_2.3 copysignf F +++GLIBC_2.3 copysignl F +++GLIBC_2.3 cos F +++GLIBC_2.3 cosf F +++GLIBC_2.3 cosh F +++GLIBC_2.3 coshf F +++GLIBC_2.3 coshl F +++GLIBC_2.3 cosl F +++GLIBC_2.3 cpow F +++GLIBC_2.3 cpowf F +++GLIBC_2.3 cpowl F +++GLIBC_2.3 cproj F +++GLIBC_2.3 cprojf F +++GLIBC_2.3 cprojl F +++GLIBC_2.3 creal F +++GLIBC_2.3 crealf F +++GLIBC_2.3 creall F +++GLIBC_2.3 csin F +++GLIBC_2.3 csinf F +++GLIBC_2.3 csinh F +++GLIBC_2.3 csinhf F +++GLIBC_2.3 csinhl F +++GLIBC_2.3 csinl F +++GLIBC_2.3 csqrt F +++GLIBC_2.3 csqrtf F +++GLIBC_2.3 csqrtl F +++GLIBC_2.3 ctan F +++GLIBC_2.3 ctanf F +++GLIBC_2.3 ctanh F +++GLIBC_2.3 ctanhf F +++GLIBC_2.3 ctanhl F +++GLIBC_2.3 ctanl F +++GLIBC_2.3 drem F +++GLIBC_2.3 dremf F +++GLIBC_2.3 dreml F +++GLIBC_2.3 erf F +++GLIBC_2.3 erfc F +++GLIBC_2.3 erfcf F +++GLIBC_2.3 erfcl F +++GLIBC_2.3 erff F +++GLIBC_2.3 erfl F +++GLIBC_2.3 exp F +++GLIBC_2.3 exp10 F +++GLIBC_2.3 exp10f F +++GLIBC_2.3 exp10l F +++GLIBC_2.3 exp2 F +++GLIBC_2.3 exp2f F +++GLIBC_2.3 exp2l F +++GLIBC_2.3 expf F +++GLIBC_2.3 expl F +++GLIBC_2.3 expm1 F +++GLIBC_2.3 expm1f F +++GLIBC_2.3 expm1l F +++GLIBC_2.3 fabs F +++GLIBC_2.3 fabsf F +++GLIBC_2.3 fabsl F +++GLIBC_2.3 fdim F +++GLIBC_2.3 fdimf F +++GLIBC_2.3 fdiml F +++GLIBC_2.3 feclearexcept F +++GLIBC_2.3 fedisableexcept F +++GLIBC_2.3 feenableexcept F +++GLIBC_2.3 fegetenv F +++GLIBC_2.3 fegetexcept F +++GLIBC_2.3 fegetexceptflag F +++GLIBC_2.3 fegetround F +++GLIBC_2.3 feholdexcept F +++GLIBC_2.3 feraiseexcept F +++GLIBC_2.3 fesetenv F +++GLIBC_2.3 fesetexceptflag F +++GLIBC_2.3 fesetround F +++GLIBC_2.3 fetestexcept F +++GLIBC_2.3 feupdateenv F +++GLIBC_2.3 finite F +++GLIBC_2.3 finitef F +++GLIBC_2.3 finitel F +++GLIBC_2.3 floor F +++GLIBC_2.3 floorf F +++GLIBC_2.3 floorl F +++GLIBC_2.3 fma F +++GLIBC_2.3 fmaf F +++GLIBC_2.3 fmal F +++GLIBC_2.3 fmax F +++GLIBC_2.3 fmaxf F +++GLIBC_2.3 fmaxl F +++GLIBC_2.3 fmin F +++GLIBC_2.3 fminf F +++GLIBC_2.3 fminl F +++GLIBC_2.3 fmod F +++GLIBC_2.3 fmodf F +++GLIBC_2.3 fmodl F +++GLIBC_2.3 frexp F +++GLIBC_2.3 frexpf F +++GLIBC_2.3 frexpl F +++GLIBC_2.3 gamma F +++GLIBC_2.3 gammaf F +++GLIBC_2.3 gammal F +++GLIBC_2.3 hypot F +++GLIBC_2.3 hypotf F +++GLIBC_2.3 hypotl F +++GLIBC_2.3 ilogb F +++GLIBC_2.3 ilogbf F +++GLIBC_2.3 ilogbl F +++GLIBC_2.3 j0 F +++GLIBC_2.3 j0f F +++GLIBC_2.3 j0l F +++GLIBC_2.3 j1 F +++GLIBC_2.3 j1f F +++GLIBC_2.3 j1l F +++GLIBC_2.3 jn F +++GLIBC_2.3 jnf F +++GLIBC_2.3 jnl F +++GLIBC_2.3 ldexp F +++GLIBC_2.3 ldexpf F +++GLIBC_2.3 ldexpl F +++GLIBC_2.3 lgamma F +++GLIBC_2.3 lgamma_r F +++GLIBC_2.3 lgammaf F +++GLIBC_2.3 lgammaf_r F +++GLIBC_2.3 lgammal F +++GLIBC_2.3 lgammal_r F +++GLIBC_2.3 llrint F +++GLIBC_2.3 llrintf F +++GLIBC_2.3 llrintl F +++GLIBC_2.3 llround F +++GLIBC_2.3 llroundf F +++GLIBC_2.3 llroundl F +++GLIBC_2.3 log F +++GLIBC_2.3 log10 F +++GLIBC_2.3 log10f F +++GLIBC_2.3 log10l F +++GLIBC_2.3 log1p F +++GLIBC_2.3 log1pf F +++GLIBC_2.3 log1pl F +++GLIBC_2.3 log2 F +++GLIBC_2.3 log2f F +++GLIBC_2.3 log2l F +++GLIBC_2.3 logb F +++GLIBC_2.3 logbf F +++GLIBC_2.3 logbl F +++GLIBC_2.3 logf F +++GLIBC_2.3 logl F +++GLIBC_2.3 lrint F +++GLIBC_2.3 lrintf F +++GLIBC_2.3 lrintl F +++GLIBC_2.3 lround F +++GLIBC_2.3 lroundf F +++GLIBC_2.3 lroundl F +++GLIBC_2.3 matherr F +++GLIBC_2.3 modf F +++GLIBC_2.3 modff F +++GLIBC_2.3 modfl F +++GLIBC_2.3 nan F +++GLIBC_2.3 nanf F +++GLIBC_2.3 nanl F +++GLIBC_2.3 nearbyint F +++GLIBC_2.3 nearbyintf F +++GLIBC_2.3 nearbyintl F +++GLIBC_2.3 nextafter F +++GLIBC_2.3 nextafterf F +++GLIBC_2.3 nextafterl F +++GLIBC_2.3 nexttoward F +++GLIBC_2.3 nexttowardf F +++GLIBC_2.3 nexttowardl F +++GLIBC_2.3 pow F +++GLIBC_2.3 pow10 F +++GLIBC_2.3 pow10f F +++GLIBC_2.3 pow10l F +++GLIBC_2.3 powf F +++GLIBC_2.3 powl F +++GLIBC_2.3 remainder F +++GLIBC_2.3 remainderf F +++GLIBC_2.3 remainderl F +++GLIBC_2.3 remquo F +++GLIBC_2.3 remquof F +++GLIBC_2.3 remquol F +++GLIBC_2.3 rint F +++GLIBC_2.3 rintf F +++GLIBC_2.3 rintl F +++GLIBC_2.3 round F +++GLIBC_2.3 roundf F +++GLIBC_2.3 roundl F +++GLIBC_2.3 scalb F +++GLIBC_2.3 scalbf F +++GLIBC_2.3 scalbl F +++GLIBC_2.3 scalbln F +++GLIBC_2.3 scalblnf F +++GLIBC_2.3 scalblnl F +++GLIBC_2.3 scalbn F +++GLIBC_2.3 scalbnf F +++GLIBC_2.3 scalbnl F +++GLIBC_2.3 signgam D 0x4 +++GLIBC_2.3 significand F +++GLIBC_2.3 significandf F +++GLIBC_2.3 significandl F +++GLIBC_2.3 sin F +++GLIBC_2.3 sincos F +++GLIBC_2.3 sincosf F +++GLIBC_2.3 sincosl F +++GLIBC_2.3 sinf F +++GLIBC_2.3 sinh F +++GLIBC_2.3 sinhf F +++GLIBC_2.3 sinhl F +++GLIBC_2.3 sinl F +++GLIBC_2.3 sqrt F +++GLIBC_2.3 sqrtf F +++GLIBC_2.3 sqrtl F +++GLIBC_2.3 tan F +++GLIBC_2.3 tanf F +++GLIBC_2.3 tanh F +++GLIBC_2.3 tanhf F +++GLIBC_2.3 tanhl F +++GLIBC_2.3 tanl F +++GLIBC_2.3 tgamma F +++GLIBC_2.3 tgammaf F +++GLIBC_2.3 tgammal F +++GLIBC_2.3 trunc F +++GLIBC_2.3 truncf F +++GLIBC_2.3 truncl F +++GLIBC_2.3 y0 F +++GLIBC_2.3 y0f F +++GLIBC_2.3 y0l F +++GLIBC_2.3 y1 F +++GLIBC_2.3 y1f F +++GLIBC_2.3 y1l F +++GLIBC_2.3 yn F +++GLIBC_2.3 ynf F +++GLIBC_2.3 ynl F +++GLIBC_2.4 GLIBC_2.4 A ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/libnsl.abilist ++@@ -0,0 +1,122 @@ +++GLIBC_2.3 GLIBC_2.3 A +++GLIBC_2.3 __free_fdresult F +++GLIBC_2.3 __nis_default_access F +++GLIBC_2.3 __nis_default_group F +++GLIBC_2.3 __nis_default_owner F +++GLIBC_2.3 __nis_default_ttl F +++GLIBC_2.3 __nis_finddirectory F +++GLIBC_2.3 __nis_hash F +++GLIBC_2.3 __nisbind_connect F +++GLIBC_2.3 __nisbind_create F +++GLIBC_2.3 __nisbind_destroy F +++GLIBC_2.3 __nisbind_next F +++GLIBC_2.3 __yp_check F +++GLIBC_2.3 nis_add F +++GLIBC_2.3 nis_add_entry F +++GLIBC_2.3 nis_addmember F +++GLIBC_2.3 nis_checkpoint F +++GLIBC_2.3 nis_clone_directory F +++GLIBC_2.3 nis_clone_object F +++GLIBC_2.3 nis_clone_result F +++GLIBC_2.3 nis_creategroup F +++GLIBC_2.3 nis_destroy_object F +++GLIBC_2.3 nis_destroygroup F +++GLIBC_2.3 nis_dir_cmp F +++GLIBC_2.3 nis_domain_of F +++GLIBC_2.3 nis_domain_of_r F +++GLIBC_2.3 nis_first_entry F +++GLIBC_2.3 nis_free_directory F +++GLIBC_2.3 nis_free_object F +++GLIBC_2.3 nis_free_request F +++GLIBC_2.3 nis_freenames F +++GLIBC_2.3 nis_freeresult F +++GLIBC_2.3 nis_freeservlist F +++GLIBC_2.3 nis_freetags F +++GLIBC_2.3 nis_getnames F +++GLIBC_2.3 nis_getservlist F +++GLIBC_2.3 nis_ismember F +++GLIBC_2.3 nis_leaf_of F +++GLIBC_2.3 nis_leaf_of_r F +++GLIBC_2.3 nis_lerror F +++GLIBC_2.3 nis_list F +++GLIBC_2.3 nis_local_directory F +++GLIBC_2.3 nis_local_group F +++GLIBC_2.3 nis_local_host F +++GLIBC_2.3 nis_local_principal F +++GLIBC_2.3 nis_lookup F +++GLIBC_2.3 nis_mkdir F +++GLIBC_2.3 nis_modify F +++GLIBC_2.3 nis_modify_entry F +++GLIBC_2.3 nis_name_of F +++GLIBC_2.3 nis_name_of_r F +++GLIBC_2.3 nis_next_entry F +++GLIBC_2.3 nis_perror F +++GLIBC_2.3 nis_ping F +++GLIBC_2.3 nis_print_directory F +++GLIBC_2.3 nis_print_entry F +++GLIBC_2.3 nis_print_group F +++GLIBC_2.3 nis_print_group_entry F +++GLIBC_2.3 nis_print_link F +++GLIBC_2.3 nis_print_object F +++GLIBC_2.3 nis_print_result F +++GLIBC_2.3 nis_print_rights F +++GLIBC_2.3 nis_print_table F +++GLIBC_2.3 nis_read_obj F +++GLIBC_2.3 nis_remove F +++GLIBC_2.3 nis_remove_entry F +++GLIBC_2.3 nis_removemember F +++GLIBC_2.3 nis_rmdir F +++GLIBC_2.3 nis_servstate F +++GLIBC_2.3 nis_sperrno F +++GLIBC_2.3 nis_sperror F +++GLIBC_2.3 nis_sperror_r F +++GLIBC_2.3 nis_stats F +++GLIBC_2.3 nis_verifygroup F +++GLIBC_2.3 nis_write_obj F +++GLIBC_2.3 readColdStartFile F +++GLIBC_2.3 writeColdStartFile F +++GLIBC_2.3 xdr_cback_data F +++GLIBC_2.3 xdr_domainname F +++GLIBC_2.3 xdr_keydat F +++GLIBC_2.3 xdr_mapname F +++GLIBC_2.3 xdr_obj_p F +++GLIBC_2.3 xdr_peername F +++GLIBC_2.3 xdr_valdat F +++GLIBC_2.3 xdr_yp_buf F +++GLIBC_2.3 xdr_ypall F +++GLIBC_2.3 xdr_ypbind_binding F +++GLIBC_2.3 xdr_ypbind_resp F +++GLIBC_2.3 xdr_ypbind_resptype F +++GLIBC_2.3 xdr_ypbind_setdom F +++GLIBC_2.3 xdr_ypdelete_args F +++GLIBC_2.3 xdr_ypmap_parms F +++GLIBC_2.3 xdr_ypmaplist F +++GLIBC_2.3 xdr_yppush_status F +++GLIBC_2.3 xdr_yppushresp_xfr F +++GLIBC_2.3 xdr_ypreq_key F +++GLIBC_2.3 xdr_ypreq_nokey F +++GLIBC_2.3 xdr_ypreq_xfr F +++GLIBC_2.3 xdr_ypresp_all F +++GLIBC_2.3 xdr_ypresp_key_val F +++GLIBC_2.3 xdr_ypresp_maplist F +++GLIBC_2.3 xdr_ypresp_master F +++GLIBC_2.3 xdr_ypresp_order F +++GLIBC_2.3 xdr_ypresp_val F +++GLIBC_2.3 xdr_ypresp_xfr F +++GLIBC_2.3 xdr_ypstat F +++GLIBC_2.3 xdr_ypupdate_args F +++GLIBC_2.3 xdr_ypxfrstat F +++GLIBC_2.3 yp_all F +++GLIBC_2.3 yp_bind F +++GLIBC_2.3 yp_first F +++GLIBC_2.3 yp_get_default_domain F +++GLIBC_2.3 yp_maplist F +++GLIBC_2.3 yp_master F +++GLIBC_2.3 yp_match F +++GLIBC_2.3 yp_next F +++GLIBC_2.3 yp_order F +++GLIBC_2.3 yp_unbind F +++GLIBC_2.3 yp_update F +++GLIBC_2.3 ypbinderr_string F +++GLIBC_2.3 yperr_string F +++GLIBC_2.3 ypprot_err F ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/libpthread.abilist ++@@ -0,0 +1,227 @@ +++GLIBC_2.12 GLIBC_2.12 A +++GLIBC_2.12 pthread_getname_np F +++GLIBC_2.12 pthread_setname_np F +++GLIBC_2.18 GLIBC_2.18 A +++GLIBC_2.18 pthread_getattr_default_np F +++GLIBC_2.18 pthread_setattr_default_np F +++GLIBC_2.3 GLIBC_2.3 A +++GLIBC_2.3 _IO_flockfile F +++GLIBC_2.3 _IO_ftrylockfile F +++GLIBC_2.3 _IO_funlockfile F +++GLIBC_2.3 __close F +++GLIBC_2.3 __connect F +++GLIBC_2.3 __errno_location F +++GLIBC_2.3 __fcntl F +++GLIBC_2.3 __fork F +++GLIBC_2.3 __h_errno_location F +++GLIBC_2.3 __libc_allocate_rtsig F +++GLIBC_2.3 __libc_current_sigrtmax F +++GLIBC_2.3 __libc_current_sigrtmin F +++GLIBC_2.3 __lseek F +++GLIBC_2.3 __nanosleep F +++GLIBC_2.3 __open F +++GLIBC_2.3 __open64 F +++GLIBC_2.3 __pread64 F +++GLIBC_2.3 __pthread_getspecific F +++GLIBC_2.3 __pthread_key_create F +++GLIBC_2.3 __pthread_mutex_destroy F +++GLIBC_2.3 __pthread_mutex_init F +++GLIBC_2.3 __pthread_mutex_lock F +++GLIBC_2.3 __pthread_mutex_trylock F +++GLIBC_2.3 __pthread_mutex_unlock F +++GLIBC_2.3 __pthread_mutexattr_destroy F +++GLIBC_2.3 __pthread_mutexattr_init F +++GLIBC_2.3 __pthread_mutexattr_settype F +++GLIBC_2.3 __pthread_once F +++GLIBC_2.3 __pthread_rwlock_destroy F +++GLIBC_2.3 __pthread_rwlock_init F +++GLIBC_2.3 __pthread_rwlock_rdlock F +++GLIBC_2.3 __pthread_rwlock_tryrdlock F +++GLIBC_2.3 __pthread_rwlock_trywrlock F +++GLIBC_2.3 __pthread_rwlock_unlock F +++GLIBC_2.3 __pthread_rwlock_wrlock F +++GLIBC_2.3 __pthread_setspecific F +++GLIBC_2.3 __pwrite64 F +++GLIBC_2.3 __read F +++GLIBC_2.3 __res_state F +++GLIBC_2.3 __send F +++GLIBC_2.3 __sigaction F +++GLIBC_2.3 __vfork F +++GLIBC_2.3 __wait F +++GLIBC_2.3 __write F +++GLIBC_2.3 _pthread_cleanup_pop F +++GLIBC_2.3 _pthread_cleanup_pop_restore F +++GLIBC_2.3 _pthread_cleanup_push F +++GLIBC_2.3 _pthread_cleanup_push_defer F +++GLIBC_2.3 accept F +++GLIBC_2.3 close F +++GLIBC_2.3 connect F +++GLIBC_2.3 fcntl F +++GLIBC_2.3 flockfile F +++GLIBC_2.3 fork F +++GLIBC_2.3 fsync F +++GLIBC_2.3 ftrylockfile F +++GLIBC_2.3 funlockfile F +++GLIBC_2.3 longjmp F +++GLIBC_2.3 lseek F +++GLIBC_2.3 lseek64 F +++GLIBC_2.3 msync F +++GLIBC_2.3 nanosleep F +++GLIBC_2.3 open F +++GLIBC_2.3 open64 F +++GLIBC_2.3 pause F +++GLIBC_2.3 pread F +++GLIBC_2.3 pread64 F +++GLIBC_2.3 pthread_atfork F +++GLIBC_2.3 pthread_attr_destroy F +++GLIBC_2.3 pthread_attr_getdetachstate F +++GLIBC_2.3 pthread_attr_getguardsize F +++GLIBC_2.3 pthread_attr_getinheritsched F +++GLIBC_2.3 pthread_attr_getschedparam F +++GLIBC_2.3 pthread_attr_getschedpolicy F +++GLIBC_2.3 pthread_attr_getscope F +++GLIBC_2.3 pthread_attr_getstack F +++GLIBC_2.3 pthread_attr_getstackaddr F +++GLIBC_2.3 pthread_attr_getstacksize F +++GLIBC_2.3 pthread_attr_init F +++GLIBC_2.3 pthread_attr_setdetachstate F +++GLIBC_2.3 pthread_attr_setguardsize F +++GLIBC_2.3 pthread_attr_setinheritsched F +++GLIBC_2.3 pthread_attr_setschedparam F +++GLIBC_2.3 pthread_attr_setschedpolicy F +++GLIBC_2.3 pthread_attr_setscope F +++GLIBC_2.3 pthread_attr_setstack F +++GLIBC_2.3 pthread_attr_setstackaddr F +++GLIBC_2.3 pthread_attr_setstacksize F +++GLIBC_2.3 pthread_barrier_destroy F +++GLIBC_2.3 pthread_barrier_init F +++GLIBC_2.3 pthread_barrier_wait F +++GLIBC_2.3 pthread_barrierattr_destroy F +++GLIBC_2.3 pthread_barrierattr_init F +++GLIBC_2.3 pthread_barrierattr_setpshared F +++GLIBC_2.3 pthread_cancel F +++GLIBC_2.3 pthread_cond_broadcast F +++GLIBC_2.3 pthread_cond_destroy F +++GLIBC_2.3 pthread_cond_init F +++GLIBC_2.3 pthread_cond_signal F +++GLIBC_2.3 pthread_cond_timedwait F +++GLIBC_2.3 pthread_cond_wait F +++GLIBC_2.3 pthread_condattr_destroy F +++GLIBC_2.3 pthread_condattr_getpshared F +++GLIBC_2.3 pthread_condattr_init F +++GLIBC_2.3 pthread_condattr_setpshared F +++GLIBC_2.3 pthread_create F +++GLIBC_2.3 pthread_detach F +++GLIBC_2.3 pthread_equal F +++GLIBC_2.3 pthread_exit F +++GLIBC_2.3 pthread_getattr_np F +++GLIBC_2.3 pthread_getconcurrency F +++GLIBC_2.3 pthread_getcpuclockid F +++GLIBC_2.3 pthread_getschedparam F +++GLIBC_2.3 pthread_getspecific F +++GLIBC_2.3 pthread_join F +++GLIBC_2.3 pthread_key_create F +++GLIBC_2.3 pthread_key_delete F +++GLIBC_2.3 pthread_kill F +++GLIBC_2.3 pthread_kill_other_threads_np F +++GLIBC_2.3 pthread_mutex_destroy F +++GLIBC_2.3 pthread_mutex_init F +++GLIBC_2.3 pthread_mutex_lock F +++GLIBC_2.3 pthread_mutex_timedlock F +++GLIBC_2.3 pthread_mutex_trylock F +++GLIBC_2.3 pthread_mutex_unlock F +++GLIBC_2.3 pthread_mutexattr_destroy F +++GLIBC_2.3 pthread_mutexattr_getkind_np F +++GLIBC_2.3 pthread_mutexattr_getpshared F +++GLIBC_2.3 pthread_mutexattr_gettype F +++GLIBC_2.3 pthread_mutexattr_init F +++GLIBC_2.3 pthread_mutexattr_setkind_np F +++GLIBC_2.3 pthread_mutexattr_setpshared F +++GLIBC_2.3 pthread_mutexattr_settype F +++GLIBC_2.3 pthread_once F +++GLIBC_2.3 pthread_rwlock_destroy F +++GLIBC_2.3 pthread_rwlock_init F +++GLIBC_2.3 pthread_rwlock_rdlock F +++GLIBC_2.3 pthread_rwlock_timedrdlock F +++GLIBC_2.3 pthread_rwlock_timedwrlock F +++GLIBC_2.3 pthread_rwlock_tryrdlock F +++GLIBC_2.3 pthread_rwlock_trywrlock F +++GLIBC_2.3 pthread_rwlock_unlock F +++GLIBC_2.3 pthread_rwlock_wrlock F +++GLIBC_2.3 pthread_rwlockattr_destroy F +++GLIBC_2.3 pthread_rwlockattr_getkind_np F +++GLIBC_2.3 pthread_rwlockattr_getpshared F +++GLIBC_2.3 pthread_rwlockattr_init F +++GLIBC_2.3 pthread_rwlockattr_setkind_np F +++GLIBC_2.3 pthread_rwlockattr_setpshared F +++GLIBC_2.3 pthread_self F +++GLIBC_2.3 pthread_setcancelstate F +++GLIBC_2.3 pthread_setcanceltype F +++GLIBC_2.3 pthread_setconcurrency F +++GLIBC_2.3 pthread_setschedparam F +++GLIBC_2.3 pthread_setspecific F +++GLIBC_2.3 pthread_sigmask F +++GLIBC_2.3 pthread_spin_destroy F +++GLIBC_2.3 pthread_spin_init F +++GLIBC_2.3 pthread_spin_lock F +++GLIBC_2.3 pthread_spin_trylock F +++GLIBC_2.3 pthread_spin_unlock F +++GLIBC_2.3 pthread_testcancel F +++GLIBC_2.3 pthread_yield F +++GLIBC_2.3 pwrite F +++GLIBC_2.3 pwrite64 F +++GLIBC_2.3 raise F +++GLIBC_2.3 read F +++GLIBC_2.3 recv F +++GLIBC_2.3 recvfrom F +++GLIBC_2.3 recvmsg F +++GLIBC_2.3 sem_close F +++GLIBC_2.3 sem_destroy F +++GLIBC_2.3 sem_getvalue F +++GLIBC_2.3 sem_init F +++GLIBC_2.3 sem_open F +++GLIBC_2.3 sem_post F +++GLIBC_2.3 sem_timedwait F +++GLIBC_2.3 sem_trywait F +++GLIBC_2.3 sem_unlink F +++GLIBC_2.3 sem_wait F +++GLIBC_2.3 send F +++GLIBC_2.3 sendmsg F +++GLIBC_2.3 sendto F +++GLIBC_2.3 sigaction F +++GLIBC_2.3 siglongjmp F +++GLIBC_2.3 sigwait F +++GLIBC_2.3 system F +++GLIBC_2.3 tcdrain F +++GLIBC_2.3 vfork F +++GLIBC_2.3 wait F +++GLIBC_2.3 waitpid F +++GLIBC_2.3 write F +++GLIBC_2.3.2 GLIBC_2.3.2 A +++GLIBC_2.3.2 pthread_cond_broadcast F +++GLIBC_2.3.2 pthread_cond_destroy F +++GLIBC_2.3.2 pthread_cond_init F +++GLIBC_2.3.2 pthread_cond_signal F +++GLIBC_2.3.2 pthread_cond_timedwait F +++GLIBC_2.3.2 pthread_cond_wait F +++GLIBC_2.3.3 GLIBC_2.3.3 A +++GLIBC_2.3.3 __pthread_cleanup_routine F +++GLIBC_2.3.3 __pthread_register_cancel F +++GLIBC_2.3.3 __pthread_register_cancel_defer F +++GLIBC_2.3.3 __pthread_unregister_cancel F +++GLIBC_2.3.3 __pthread_unregister_cancel_restore F +++GLIBC_2.3.3 __pthread_unwind_next F +++GLIBC_2.3.3 pthread_attr_getaffinity_np F +++GLIBC_2.3.3 pthread_attr_setaffinity_np F +++GLIBC_2.3.3 pthread_barrierattr_getpshared F +++GLIBC_2.3.3 pthread_condattr_getclock F +++GLIBC_2.3.3 pthread_condattr_setclock F +++GLIBC_2.3.3 pthread_getaffinity_np F +++GLIBC_2.3.3 pthread_setaffinity_np F +++GLIBC_2.3.3 pthread_timedjoin_np F +++GLIBC_2.3.3 pthread_tryjoin_np F +++GLIBC_2.3.4 GLIBC_2.3.4 A +++GLIBC_2.3.4 pthread_attr_getaffinity_np F +++GLIBC_2.3.4 pthread_attr_setaffinity_np F +++GLIBC_2.3.4 pthread_getaffinity_np F +++GLIBC_2.3.4 pthread_setaffinity_np F ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/libresolv.abilist ++@@ -0,0 +1,94 @@ +++GLIBC_2.3 GLIBC_2.3 A +++GLIBC_2.3 __b64_ntop F +++GLIBC_2.3 __b64_pton F +++GLIBC_2.3 __dn_comp F +++GLIBC_2.3 __dn_count_labels F +++GLIBC_2.3 __dn_expand F +++GLIBC_2.3 __dn_skipname F +++GLIBC_2.3 __fp_nquery F +++GLIBC_2.3 __fp_query F +++GLIBC_2.3 __fp_resstat F +++GLIBC_2.3 __hostalias F +++GLIBC_2.3 __loc_aton F +++GLIBC_2.3 __loc_ntoa F +++GLIBC_2.3 __p_cdname F +++GLIBC_2.3 __p_cdnname F +++GLIBC_2.3 __p_class F +++GLIBC_2.3 __p_class_syms D 0x54 +++GLIBC_2.3 __p_fqname F +++GLIBC_2.3 __p_fqnname F +++GLIBC_2.3 __p_option F +++GLIBC_2.3 __p_query F +++GLIBC_2.3 __p_secstodate F +++GLIBC_2.3 __p_time F +++GLIBC_2.3 __p_type F +++GLIBC_2.3 __p_type_syms D 0x228 +++GLIBC_2.3 __putlong F +++GLIBC_2.3 __putshort F +++GLIBC_2.3 __res_close F +++GLIBC_2.3 __res_dnok F +++GLIBC_2.3 __res_hnok F +++GLIBC_2.3 __res_hostalias F +++GLIBC_2.3 __res_isourserver F +++GLIBC_2.3 __res_mailok F +++GLIBC_2.3 __res_mkquery F +++GLIBC_2.3 __res_nameinquery F +++GLIBC_2.3 __res_nmkquery F +++GLIBC_2.3 __res_nquery F +++GLIBC_2.3 __res_nquerydomain F +++GLIBC_2.3 __res_nsearch F +++GLIBC_2.3 __res_nsend F +++GLIBC_2.3 __res_ownok F +++GLIBC_2.3 __res_queriesmatch F +++GLIBC_2.3 __res_query F +++GLIBC_2.3 __res_querydomain F +++GLIBC_2.3 __res_search F +++GLIBC_2.3 __res_send F +++GLIBC_2.3 __sym_ntop F +++GLIBC_2.3 __sym_ntos F +++GLIBC_2.3 __sym_ston F +++GLIBC_2.3 _gethtbyaddr F +++GLIBC_2.3 _gethtbyname F +++GLIBC_2.3 _gethtbyname2 F +++GLIBC_2.3 _gethtent F +++GLIBC_2.3 _getlong F +++GLIBC_2.3 _getshort F +++GLIBC_2.3 _res_opcodes D 0x40 +++GLIBC_2.3 _sethtent F +++GLIBC_2.3 inet_net_ntop F +++GLIBC_2.3 inet_net_pton F +++GLIBC_2.3 inet_neta F +++GLIBC_2.3 res_gethostbyaddr F +++GLIBC_2.3 res_gethostbyname F +++GLIBC_2.3 res_gethostbyname2 F +++GLIBC_2.3 res_send_setqhook F +++GLIBC_2.3 res_send_setrhook F +++GLIBC_2.3.2 GLIBC_2.3.2 A +++GLIBC_2.3.2 __p_rcode F +++GLIBC_2.9 GLIBC_2.9 A +++GLIBC_2.9 ns_datetosecs F +++GLIBC_2.9 ns_format_ttl F +++GLIBC_2.9 ns_get16 F +++GLIBC_2.9 ns_get32 F +++GLIBC_2.9 ns_initparse F +++GLIBC_2.9 ns_makecanon F +++GLIBC_2.9 ns_msg_getflag F +++GLIBC_2.9 ns_name_compress F +++GLIBC_2.9 ns_name_ntol F +++GLIBC_2.9 ns_name_ntop F +++GLIBC_2.9 ns_name_pack F +++GLIBC_2.9 ns_name_pton F +++GLIBC_2.9 ns_name_rollback F +++GLIBC_2.9 ns_name_skip F +++GLIBC_2.9 ns_name_uncompress F +++GLIBC_2.9 ns_name_unpack F +++GLIBC_2.9 ns_parse_ttl F +++GLIBC_2.9 ns_parserr F +++GLIBC_2.9 ns_put16 F +++GLIBC_2.9 ns_put32 F +++GLIBC_2.9 ns_samedomain F +++GLIBC_2.9 ns_samename F +++GLIBC_2.9 ns_skiprr F +++GLIBC_2.9 ns_sprintrr F +++GLIBC_2.9 ns_sprintrrf F +++GLIBC_2.9 ns_subdomain F ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/librt.abilist ++@@ -0,0 +1,46 @@ +++GLIBC_2.3 GLIBC_2.3 A +++GLIBC_2.3 aio_cancel F +++GLIBC_2.3 aio_cancel64 F +++GLIBC_2.3 aio_error F +++GLIBC_2.3 aio_error64 F +++GLIBC_2.3 aio_fsync F +++GLIBC_2.3 aio_fsync64 F +++GLIBC_2.3 aio_init F +++GLIBC_2.3 aio_read F +++GLIBC_2.3 aio_read64 F +++GLIBC_2.3 aio_return F +++GLIBC_2.3 aio_return64 F +++GLIBC_2.3 aio_suspend F +++GLIBC_2.3 aio_suspend64 F +++GLIBC_2.3 aio_write F +++GLIBC_2.3 aio_write64 F +++GLIBC_2.3 clock_getcpuclockid F +++GLIBC_2.3 clock_getres F +++GLIBC_2.3 clock_gettime F +++GLIBC_2.3 clock_nanosleep F +++GLIBC_2.3 clock_settime F +++GLIBC_2.3 lio_listio F +++GLIBC_2.3 lio_listio64 F +++GLIBC_2.3 shm_open F +++GLIBC_2.3 shm_unlink F +++GLIBC_2.3 timer_create F +++GLIBC_2.3 timer_delete F +++GLIBC_2.3 timer_getoverrun F +++GLIBC_2.3 timer_gettime F +++GLIBC_2.3 timer_settime F +++GLIBC_2.3.4 GLIBC_2.3.4 A +++GLIBC_2.3.4 mq_close F +++GLIBC_2.3.4 mq_getattr F +++GLIBC_2.3.4 mq_notify F +++GLIBC_2.3.4 mq_open F +++GLIBC_2.3.4 mq_receive F +++GLIBC_2.3.4 mq_send F +++GLIBC_2.3.4 mq_setattr F +++GLIBC_2.3.4 mq_timedreceive F +++GLIBC_2.3.4 mq_timedsend F +++GLIBC_2.3.4 mq_unlink F +++GLIBC_2.4 GLIBC_2.4 A +++GLIBC_2.4 lio_listio F +++GLIBC_2.4 lio_listio64 F +++GLIBC_2.7 GLIBC_2.7 A +++GLIBC_2.7 __mq_open_2 F ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/libthread_db.abilist ++@@ -0,0 +1,42 @@ +++GLIBC_2.3 GLIBC_2.3 A +++GLIBC_2.3 td_init F +++GLIBC_2.3 td_log F +++GLIBC_2.3 td_symbol_list F +++GLIBC_2.3 td_ta_clear_event F +++GLIBC_2.3 td_ta_delete F +++GLIBC_2.3 td_ta_enable_stats F +++GLIBC_2.3 td_ta_event_addr F +++GLIBC_2.3 td_ta_event_getmsg F +++GLIBC_2.3 td_ta_get_nthreads F +++GLIBC_2.3 td_ta_get_ph F +++GLIBC_2.3 td_ta_get_stats F +++GLIBC_2.3 td_ta_map_id2thr F +++GLIBC_2.3 td_ta_map_lwp2thr F +++GLIBC_2.3 td_ta_new F +++GLIBC_2.3 td_ta_reset_stats F +++GLIBC_2.3 td_ta_set_event F +++GLIBC_2.3 td_ta_setconcurrency F +++GLIBC_2.3 td_ta_thr_iter F +++GLIBC_2.3 td_ta_tsd_iter F +++GLIBC_2.3 td_thr_clear_event F +++GLIBC_2.3 td_thr_dbresume F +++GLIBC_2.3 td_thr_dbsuspend F +++GLIBC_2.3 td_thr_event_enable F +++GLIBC_2.3 td_thr_event_getmsg F +++GLIBC_2.3 td_thr_get_info F +++GLIBC_2.3 td_thr_getfpregs F +++GLIBC_2.3 td_thr_getgregs F +++GLIBC_2.3 td_thr_getxregs F +++GLIBC_2.3 td_thr_getxregsize F +++GLIBC_2.3 td_thr_set_event F +++GLIBC_2.3 td_thr_setfpregs F +++GLIBC_2.3 td_thr_setgregs F +++GLIBC_2.3 td_thr_setprio F +++GLIBC_2.3 td_thr_setsigpending F +++GLIBC_2.3 td_thr_setxregs F +++GLIBC_2.3 td_thr_sigsetmask F +++GLIBC_2.3 td_thr_tls_get_addr F +++GLIBC_2.3 td_thr_tsd F +++GLIBC_2.3 td_thr_validate F +++GLIBC_2.3.3 GLIBC_2.3.3 A +++GLIBC_2.3.3 td_thr_tlsbase F ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/libutil.abilist ++@@ -0,0 +1,7 @@ +++GLIBC_2.3 GLIBC_2.3 A +++GLIBC_2.3 forkpty F +++GLIBC_2.3 login F +++GLIBC_2.3 login_tty F +++GLIBC_2.3 logout F +++GLIBC_2.3 logwtmp F +++GLIBC_2.3 openpty F ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/localplt.data ++@@ -0,0 +1,20 @@ +++# See scripts/check-localplt.awk for how this file is processed. +++# PLT use is required for the malloc family and for matherr because +++# users can define their own functions and have library internals call them. +++# Linker in binutils 2.26 and newer consolidates R_386_JUMP_SLOT +++# relocation with R_386_GLOB_DAT relocation against the same symbol. +++libc.so: calloc +++libc.so: free + REL R_386_GLOB_DAT +++libc.so: malloc + REL R_386_GLOB_DAT +++libc.so: memalign +++libc.so: realloc +++libm.so: matherr +++# The main malloc is interposed into the dynamic linker, for +++# allocations after the initial link (when dlopen is used). +++ld.so: malloc +++ld.so: calloc +++ld.so: realloc +++ld.so: free + REL R_386_GLOB_DAT +++# The TLS-enabled version of these functions is interposed from libc.so. +++ld.so: _dl_signal_error + REL R_386_GLOB_DAT +++ld.so: _dl_catch_error + REL R_386_GLOB_DAT ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/lseek.S ++@@ -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. */ +++ +++#include +++ +++/* 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(__lseek, lseek, 3) +++ jnb L(no_error) +++ call SYSCALL_ERROR_LABEL; +++ orl $-1, %edx; +++L(pseudo_end): +++L(no_error): +++ ret +++PSEUDO_END(__lseek) +++libc_hidden_def (__lseek) +++ +++strong_alias (__lseek, __libc_lseek) +++libc_hidden_def (__libc_lseek) +++ +++strong_alias (__lseek, __libc_lseek64) +++libc_hidden_def (__libc_lseek64) +++ +++strong_alias (__lseek, __lseek64) +++libc_hidden_def (__lseek64) +++ +++strong_alias (__lseek, __llseek) +++libc_hidden_def (__llseek) +++ +++weak_alias (__lseek, lseek) +++libc_hidden_weak (lseek) +++ +++weak_alias (__lseek, lseek64) +++libc_hidden_weak (lseek64) +++ +++weak_alias (__lseek, llseek) +++libc_hidden_weak (llseek) ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/makecontext.S ++@@ -0,0 +1,120 @@ +++/* Create new context. +++ Copyright (C) 2001,02 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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 +++ +++#include +++ +++ +++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 +++ cfi_adjust_cfa_offset (4) +++1: popl %ecx +++ cfi_adjust_cfa_offset (-4) +++ addl $L(exitcode)-1b, %ecx +++ movl %ecx, (%edx) +++#else +++ movl $L(exitcode), (%edx) +++#endif +++ /* We need to terminate the FDE here instead of after ret because +++ the unwinder looks at ra-1 for unwind information. */ +++ cfi_endproc +++ +++ /* '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 +++ cfi_startproc +++END(__makecontext) +++ +++weak_alias(__makecontext, makecontext) ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/pipe.S ++@@ -0,0 +1,30 @@ +++/* Copyright (C) 1991,92,93,95,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 +++ +++SYSCALL__ (pipe, 1) +++ movl 4(%esp), scratch +++ movl %eax, (scratch) +++ movl r1, 4(scratch) +++ xorl %eax, %eax +++ ret +++PSEUDO_END (__pipe) +++ +++libc_hidden_def (__pipe) +++weak_alias (__pipe, pipe) ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/pt-vfork.S ++@@ -0,0 +1 @@ +++#include ++--- /dev/null +++++ b/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 +++ +++.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/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/shlib-versions ++@@ -0,0 +1 @@ +++ld=ld.so.1 ++--- /dev/null +++++ b/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/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/start.S ++@@ -0,0 +1,151 @@ +++/* Startup code compliant to the ELF i386 ABI. +++ Copyright (C) 1995-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. +++ +++ 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, see +++ . */ +++ +++/* This is the canonical entry point, usually the first thing in the text +++ segment. The SVR4/i386 ABI (pages 3-31, 3-32) says that when the entry +++ point runs, most registers' values are unspecified, except for: +++ +++ %edx 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. +++ +++ %esp The stack contains the arguments and environment: +++ 0(%esp) argc +++ 4(%esp) argv[0] +++ ... +++ (4*argc)(%esp) NULL +++ (4*(argc+1))(%esp) envp[0] +++ ... +++ NULL +++*/ +++ +++#include +++ +++ weak_extern (_end) +++ +++ .text +++ .globl _start +++ .type _start,@function +++_start: +++ /* Clear the frame pointer. The ABI suggests this be done, to mark +++ the outermost frame obviously. */ +++ xorl %ebp, %ebp +++ +++ /* Extract the arguments as encoded on the stack and set up +++ the arguments for `main': argc, argv. envp will be determined +++ later in __libc_start_main. */ +++ popl %esi /* Pop the argument count. */ +++ movl %esp, %ecx /* argv starts just at the current stack top.*/ +++ +++ /* Before pushing the arguments align the stack to a 16-byte +++ (SSE needs 16-byte alignment) boundary to avoid penalties from +++ misaligned accesses. Thanks to Edward Seidl +++ for pointing this out. */ +++ andl $0xfffffff0, %esp +++ pushl %eax /* Push garbage because we allocate +++ 28 more bytes. */ +++ +++ /* Provide the highest stack address to the user code (for stacks +++ which grow downwards). */ +++ pushl %esp +++ +++ pushl %edx /* Push address of the shared library +++ termination function. */ +++ +++#ifdef SHARED +++ /* Load PIC register. */ +++ call 1f +++ addl $_GLOBAL_OFFSET_TABLE_, %ebx +++ +++ /* Push address of our own entry points to .fini and .init. */ +++ leal __libc_csu_fini@GOTOFF(%ebx), %eax +++ pushl %eax +++ leal __libc_csu_init@GOTOFF(%ebx), %eax +++ pushl %eax +++ +++ pushl %ecx /* Push second argument: argv. */ +++ pushl %esi /* Push first argument: argc. */ +++ +++ pushl main@GOT(%ebx) +++ +++ /* Call the user's main function, and exit with its value. +++ But let the libc call main. */ +++ call __libc_start_main@PLT +++#else +++ /* Push address of our own entry points to .fini and .init. */ +++ pushl $__libc_csu_fini +++ pushl $__libc_csu_init +++ +++ pushl %ecx /* Push second argument: argv. */ +++ pushl %esi /* Push first argument: argc. */ +++ +++ pushl $main +++ +++ /* Call the user's main function, and exit with its value. +++ But let the libc call main. */ +++ call __libc_start_main +++#endif +++ +++ hlt /* Crash if somehow `exit' does return. */ +++ +++#ifdef SHARED +++1: movl (%esp), %ebx +++ ret +++#endif +++ /* just reference _end, +++ it is needed as global symbol for brk() usage, +++ it is a dead code on purpose. */ +++#ifdef SHARED +++ leal _end@GOTOFF(%ebx), %eax +++#else +++ mov $_end, %eax +++#endif +++ +++/* To fulfill the System V/i386 ABI we need this symbol. Yuck, it's so +++ meaningless since we don't support machines < 80386. */ +++ .section .rodata +++ .globl _fp_hw +++_fp_hw: .long 3 +++ .size _fp_hw, 4 +++ .type _fp_hw,@object +++ +++/* 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/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 , 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 +++#include +++#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/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 +++ +++.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/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 ." +++#endif +++ +++#include +++ +++__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/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 +++ +++__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/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 +++ +++/* 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/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 +++ +++.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/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 +++ +++/* 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/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 +++ +++ .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/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/syscalls-internal.h ++@@ -0,0 +1,157 @@ +++/* 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 +++ +++/* +++ 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_clock_gettime(name, err, nr, clkid, ts) \ +++(void)({ \ +++ register long int _a1 = (long int) (clkid); \ +++ register long int _a2 = (long int) (ts); \ +++ register long int result; \ +++ register long int _trash; \ +++ asm volatile ( \ +++ "pushl %4\n\t" \ +++ "pushl %3\n\t" \ +++ "pushl %2\n\t" \ +++ "int $0x80\n\t" \ +++ "addl $12,%%esp\n\t" \ +++ : "=a" (result), \ +++ "=d" (_trash) \ +++ : "0" ((long int) SYS_##name), \ +++ "ri" (_a1), \ +++ "ri" (_a2) \ +++ : "memory", "cc" ); \ +++ result; \ +++}) +++ +++#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_kill(name, err, nr, pid, sig) \ +++(void)({ \ +++ register long int _a1 = (long int) (pid); \ +++ register long int _a2 = (long int) (sig); \ +++ register long int result; \ +++ register long int _trash; \ +++ asm volatile ( \ +++ "pushl %4\n\t" \ +++ "pushl %3\n\t" \ +++ "pushl %2\n\t" \ +++ "int $0x80\n\t" \ +++ "addl $12,%%esp\n\t" \ +++ : "=a" (result), \ +++ "=d" (_trash) \ +++ : "0" ((long int) SYS_##name), \ +++ "ri" (_a1), \ +++ "ri" (_a2) \ +++ : "memory", "cc" ); \ +++ result; \ +++}) +++ +++#define INTERNAL_SYSCALL_write(name, err, nr, fd, buf, cnt) \ +++(void)({ \ +++ register long int _a1 = (long int) (fd); \ +++ register long int _a2 = (long int) (buf); \ +++ 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; \ +++}) +++ +++#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/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 +++ +++/* 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 +++ +++#endif /* !PIC */ ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/sysdep.h ++@@ -0,0 +1,200 @@ +++/* 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, , 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 +++/* Defines RTLD_PRIVATE_ERRNO and USE_DL_SYSINFO. */ +++#include +++#include +++ +++#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 IS_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 +++/* 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 +++ +++/* Consistency check for position-independent code. */ +++#if defined __PIC__ && !__GNUC_PREREQ (5,0) +++# define check_consistency() \ +++ ({ int __res; \ +++ __asm__ __volatile__ \ +++ (LOAD_PIC_REG_STR (cx) ";" \ +++ "subl %%ebx, %%ecx;" \ +++ "je 1f;" \ +++ "ud2;" \ +++ "1:\n" \ +++ : "=c" (__res)); \ +++ __res; }) +++#endif +++ +++#endif /* __ASSEMBLER__ */ +++ +++ +++/* Pointer mangling support. */ +++#if 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/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/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/vfork.S ++@@ -0,0 +1,59 @@ +++/* 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 +++ +++/* 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) +++ cfi_register (%eip, %ecx) +++ +++ /* 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/sysdeps/unix/bsd/bsd4.4/kfreebsd/if_index.c ++@@ -0,0 +1,317 @@ +++/* Copyright (C) 2002 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Bruno Haible , 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 +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++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) +++weak_alias (__if_nametoindex, if_nametoindex) +++libc_hidden_weak (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; +++} +++weak_alias (__if_indextoname, if_indextoname) +++libc_hidden_weak (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; +++} +++weak_alias (__if_nameindex, if_nameindex) +++libc_hidden_weak (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) +++weak_alias (__if_freenameindex, if_freenameindex) +++libc_hidden_weak (if_freenameindex) ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/ifaddrs.c ++@@ -0,0 +1,382 @@ +++/* $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 +++ +++ /* +++__FBSDID("$FreeBSD: src/lib/libc/net/getifaddrs.c,v 1.6 2002/07/25 08:08:30 ume Exp $"); +++ */ +++ +++#include +++#include +++#include +++#include +++#include +++ +++#ifdef NET_RT_IFLIST +++#include +++#include +++#include +++#include +++#else +++#error NET_RT_IFLIST is required +++#endif +++ +++#include +++#include +++#include +++#include +++ +++#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); +++ /* XXX: smooth over a kfreebsd 9.0->10.1 ABI break */ +++ if (rtm->rtm_msglen == 152) { +++ /* on kfreebsd-i386 9.0, struct rt_msghdr is 96 bytes */ +++ dl = (struct sockaddr_dl *)((char *)ifm + 96); +++ } +++ if (rtm->rtm_msglen == 156) { +++ /* on kfreebsd-i386 10.1, struct rt_msghdr is 100 bytes */ +++ dl = (struct sockaddr_dl *)((char *)ifm + 100); +++ } +++ 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); +++ /* XXX: smooth over a kfreebsd 9.0->10.1 ABI break */ +++ if (rtm->rtm_msglen == 152) { +++ /* on kfreebsd-i386 9.0, struct rt_msghdr is 96 bytes */ +++ dl = (struct sockaddr_dl *)((char *)ifm + 96); +++ } +++ if (rtm->rtm_msglen == 156) { +++ /* on kfreebsd-i386 10.1, struct rt_msghdr is 100 bytes */ +++ dl = (struct sockaddr_dl *)((char *)ifm + 100); +++ } +++ +++ 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); +++} +++weak_alias (__getifaddrs, getifaddrs) +++libc_hidden_weak (getifaddrs) +++ +++void +++__freeifaddrs(struct ifaddrs *ifp) +++{ +++ +++ free(ifp); +++} +++weak_alias (__freeifaddrs, freeifaddrs) +++libc_hidden_weak (freeifaddrs) ++--- /dev/null +++++ b/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 +++#include +++#include +++#include +++#include +++#include +++ +++#include +++ +++/* 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/sysdeps/unix/bsd/bsd4.4/kfreebsd/init-first.c ++@@ -0,0 +1,139 @@ +++/* 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 +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++#include +++ +++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 +++ +++ /* Initialize ctype data. */ +++ __ctype_init (); +++ +++#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/sysdeps/unix/bsd/bsd4.4/kfreebsd/init-posix.c ++@@ -0,0 +1,33 @@ +++/* Copyright (C) 1991, 94, 95, 97, 98, 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. */ +++ +++#include +++#include +++ +++/* This must be initialized data or its presence will not be sufficient to +++ merit linkage of this file, which is necessary for the real +++ initialization function below to be called. */ +++time_t _posix_start_time = -1; +++ +++void +++__init_posix (void) +++{ +++ _posix_start_time = time ((time_t *) NULL); +++} +++ +++text_set_element(__libc_subinit, __init_posix); ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/ipc_priv.h ++@@ -0,0 +1,53 @@ +++/* +++ 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, write to the Free +++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +++ 02111-1307 USA. */ +++ +++struct ipc_perm_old +++ { +++ __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; +++ }; +++ +++static inline void +++ipc_perm_old2new(const struct ipc_perm_old *in, struct ipc_perm *out) +++{ +++ out->cuid = in->cuid; +++ out->cgid = in->cgid; +++ out->uid = in->uid; +++ out->gid = in->gid; +++ out->mode = in->mode; +++ out->__seq = in->__seq; +++ out->__key = in->__key; +++} +++ +++static inline void +++ipc_perm_new2old(const struct ipc_perm *in, struct ipc_perm_old *out) +++{ +++ out->cuid = in->cuid; +++ out->cgid = in->cgid; +++ out->uid = in->uid; +++ out->gid = in->gid; +++ out->mode = in->mode; +++ out->__seq = in->__seq; +++ out->__key = in->__key; +++} ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/kenv.h ++@@ -0,0 +1,39 @@ +++/*- +++ * Copyright (c) 2002 Maxime Henrion +++ * 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 +++#include +++ +++__BEGIN_DECLS +++int kenv(int action, const char *name, char *value, int len); +++__END_DECLS +++ +++#endif /* !_KENV_H */ ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/kernel-features.h ++@@ -0,0 +1,93 @@ +++/* 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. */ +++# define __ASSUME_REALTIME_SIGNALS 1 +++ +++/* Use signals #32, #33, #34 for internal linuxthreads communication */ +++#define PTHREAD_SIGBASE 32 +++ +++/* The `ftruncate' syscall was introduced in kFreeBSD 7.0. */ +++# define __ASSUME_TRUNCATE_SYSCALL 1 +++ +++/* The `lseek' syscall was introduced in kFreeBSD 7.0. */ +++# define __ASSUME_LSEEK_SYSCALL 1 +++ +++/* The `mmap' syscall was introduced in kFreeBSD 7.0. */ +++# define __ASSUME_MMAP_SYSCALL 1 +++ +++/* The `pread' and `pwrite' syscalls were introduced in kFreeBSD 7.0. */ +++# define __ASSUME_PREAD_PWRITE_SYSCALLS 1 +++ +++/* The `shm_*' syscalls were introduced in kFreeBSD 8.0 */ +++# define __ASSUME_SHMFCTS 1 +++ +++/* The `*at' syscalls were introduced in kFreeBSD 8.0. */ +++# define __ASSUME_ATFCTS 1 +++ +++/* The pselect syscall was introduced in kFreeBSD 8.1. */ +++# define __ASSUME_PSELECT 1 +++ +++/* The posix_fallocate syscall was introduced in kFreeBSD 8.3. */ +++#if __KFREEBSD_KERNEL_VERSION >= 0x80300 +++# define __ASSUME_FALLOCATE 1 +++#endif +++ +++/* The wait6 syscall was introduced in kFreeBSD 9.2. */ +++#if __KFREEBSD_KERNEL_VERSION >= 0x90200 +++# define __ASSUME_WAIT6 1 +++#endif +++ +++/* Support for private "futexes" was added before we start with fbtl. */ +++# define __ASSUME_PRIVATE_FUTEX 1 ++--- /dev/null +++++ b/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 15 +++ ++--- /dev/null +++++ b/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 +++ +++/* 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 +++ +++/* Get the real definitions. */ +++#include_next +++ +++/* 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. */ +++#undef VALID_ELF_HEADER +++#define VALID_ELF_HEADER(hdr,exp,size) (memcmp (hdr, expected2, size) == 0) +++#undef VALID_ELF_OSABI +++#define VALID_ELF_OSABI(osabi) (osabi == ELFOSABI_FREEBSD) +++#undef MORE_ELF_HEADER_DATA +++#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/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/sysdeps/unix/bsd/bsd4.4/kfreebsd/lowlevelumtx.h ++@@ -0,0 +1,131 @@ +++/* 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 +++ . */ +++ +++#ifndef _LOWLEVELUMTX_H +++#define _LOWLEVELUMTX_H 1 +++ +++#include +++#include +++#include +++ +++/* from */ +++/* op code for _umtx_op */ +++#define UMTX_OP_WAIT 2 +++#define UMTX_OP_WAKE 3 +++#define UMTX_OP_WAIT_UINT 11 +++#define UMTX_OP_WAIT_UINT_PRIVATE 15 +++#define UMTX_OP_WAKE_PRIVATE 16 +++ +++int __syscall__umtx_op(void *, int, long, void*, void*); +++libc_hidden_proto (__syscall__umtx_op) +++ +++#define UMTX_SYSCALL __syscall__umtx_op +++ +++/* +++ * +++ we provide set of functions +++ lll_umtx_{int,long}_{wait,wake}_{private,shared} +++ * +++ */ +++ +++/*******************************************************/ +++ +++#define lll_umtx_int_wait_private(addr, val, timeout) \ +++ ({ \ +++ UMTX_SYSCALL( \ +++ addr, \ +++ UMTX_OP_WAIT_UINT_PRIVATE, \ +++ (long)((unsigned int)(val)), \ +++ NULL, \ +++ timeout); \ +++ }) +++ +++#define lll_umtx_int_wait_shared(addr, val, timeout) \ +++ ({ \ +++ UMTX_SYSCALL( \ +++ addr, \ +++ UMTX_OP_WAIT_UINT, \ +++ (long)((unsigned int)(val)), \ +++ NULL, \ +++ timeout); \ +++ }) +++ +++#define lll_umtx_long_wait_private(addr, val, timeout) \ +++ ({ \ +++ UMTX_SYSCALL( \ +++ addr, \ +++ UMTX_OP_WAIT, /* only autoshare available */ \ +++ val, \ +++ NULL, \ +++ timeout); \ +++ }) +++ +++#define lll_umtx_long_wait_shared(addr, val, timeout) \ +++ ({ \ +++ UMTX_SYSCALL( \ +++ addr, \ +++ UMTX_OP_WAIT, /* only autoshare available */ \ +++ val, \ +++ NULL, \ +++ timeout); \ +++ }) +++ +++/*******************************************************/ +++ +++#define lll_umtx_int_wake_private(addr, num) \ +++ ({ \ +++ UMTX_SYSCALL( \ +++ addr, \ +++ UMTX_OP_WAKE_PRIVATE, \ +++ num, \ +++ NULL, \ +++ NULL); \ +++ }) +++ +++#define lll_umtx_int_wake_shared(addr, num) \ +++ ({ \ +++ UMTX_SYSCALL( \ +++ addr, \ +++ UMTX_OP_WAKE, \ +++ num, \ +++ NULL, \ +++ NULL); \ +++ }) +++ +++#define lll_umtx_long_wake_private(addr, num) \ +++ ({ \ +++ UMTX_SYSCALL( \ +++ addr, \ +++ UMTX_OP_WAKE_PRIVATE, \ +++ num, \ +++ NULL, \ +++ NULL); \ +++ }) +++ +++#define lll_umtx_long_wake_shared(addr, num) \ +++ ({ \ +++ UMTX_SYSCALL( \ +++ addr, \ +++ UMTX_OP_WAKE, \ +++ num, \ +++ NULL, \ +++ NULL); \ +++ }) +++ +++/*******************************************************/ +++ +++#endif /* _LOWLEVELUMTX_H */ ++--- /dev/null +++++ b/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/sysdeps/unix/bsd/bsd4.4/kfreebsd/lxstat.c ++@@ -0,0 +1,47 @@ +++/* 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 +++#include +++#include +++ +++#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 (file, &buf16); +++ if (result == 0) +++ stat16_to_stat (&buf16, buf); +++ return result; +++ } +++ else if (__builtin_expect (vers == _STAT_VER_stat, 1)) +++ return __syscall_lstat (file, (struct stat16 *) buf); +++ else +++ { +++ __set_errno (EINVAL); +++ return -1; +++ } +++} +++hidden_def (__lxstat) +++ +++weak_alias (__lxstat, _lxstat) ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/lxstat64.c ++@@ -0,0 +1,43 @@ +++/* 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 +++#include +++#include +++ +++#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 (file, &buf16); +++ if (result == 0) +++ stat16_to_stat64 (&buf16, buf); +++ return result; +++ } +++ else +++ { +++ __set_errno (EINVAL); +++ return -1; +++ } +++} +++hidden_def (__lxstat64) ++--- /dev/null +++++ b/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/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 . +++ 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 +++ +++/* 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.\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\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/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/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/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 directly; include 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/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 directly; include 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/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 +++ +++/* 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/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 directly; include 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/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 directly; include 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/sysdeps/unix/bsd/bsd4.4/kfreebsd/mips/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 +++#include +++#include +++ +++#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/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 , 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 +++#include +++ +++#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/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 ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/mmap.c ++@@ -0,0 +1,57 @@ +++/* Copyright (C) 2002 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Bruno Haible , 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 +++#include +++#include +++#include +++#include +++ +++extern void *__syscall_mmap (void *__addr, size_t __len, int __prot, +++ int __flags, int __fd, __off_t __offset) __THROW; +++libc_hidden_proto (__syscall_mmap) +++ +++void * +++__mmap (void *addr, size_t len, int prot, int flags, int fd, __off_t offset) +++{ +++ /* 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; +++ +++ return INLINE_SYSCALL (mmap, 6, addr, len, prot, flags, fd, offset); +++} +++ +++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/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/sysdeps/unix/bsd/bsd4.4/kfreebsd/msgctl.c ++@@ -0,0 +1,104 @@ +++/* 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 +++ . */ +++ +++#include +++#include +++#include +++ +++#include +++#include +++#include +++#include +++#include +++ +++#include +++ +++/* Provide operations to control over shared memory segments. */ +++ +++extern int __syscall_msgctl(int msqid, int cmd, struct msqid_ds *buf); +++libc_hidden_proto (__syscall_msgctl) +++ +++int +++__new_msgctl(int msqid, int cmd, struct msqid_ds *buf) +++{ +++ return INLINE_SYSCALL (msgctl, 3, msqid, cmd, buf); +++} +++versioned_symbol (libc, __new_msgctl, msgctl, GLIBC_2_18); +++ +++#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_18) +++struct msqid_ds_old +++{ +++ struct ipc_perm_old 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]; +++}; +++ +++int +++attribute_compat_text_section +++__old_msgctl(int msqid, int cmd, struct msqid_ds_old *buf) +++{ +++ struct msqid_ds newbuf; +++ int rv; +++ +++ if (cmd == IPC_SET) +++ { +++ ipc_perm_old2new(&(buf->msg_perm), &(newbuf.msg_perm)); +++ newbuf.__msg_first = buf->__msg_first; +++ newbuf.__msg_last = buf->__msg_first; +++ newbuf.__msg_cbytes = buf->__msg_cbytes; +++ newbuf.msg_qnum = buf->msg_qnum; +++ newbuf.msg_qbytes = buf->msg_qbytes; +++ newbuf.msg_lspid = buf->msg_lspid; +++ newbuf.msg_lrpid = buf->msg_lrpid; +++ newbuf.msg_stime = buf->msg_stime; +++ newbuf.msg_rtime = buf->msg_rtime; +++ newbuf.msg_ctime = buf->msg_ctime; +++ } +++ +++ rv = __new_msgctl (msqid, cmd, &newbuf); +++ +++ if ((rv != -1) && (cmd == IPC_STAT)) +++ { +++ ipc_perm_new2old(&(newbuf.msg_perm), &(buf->msg_perm)); +++ buf->__msg_first = newbuf.__msg_first; +++ buf->__msg_last = newbuf.__msg_first; +++ buf->__msg_cbytes = newbuf.__msg_cbytes; +++ buf->msg_qnum = newbuf.msg_qnum; +++ buf->msg_qbytes = newbuf.msg_qbytes; +++ buf->msg_lspid = newbuf.msg_lspid; +++ buf->msg_lrpid = newbuf.msg_lrpid; +++ buf->msg_stime = newbuf.msg_stime; +++ buf->msg_rtime = newbuf.msg_rtime; +++ buf->msg_ctime = newbuf.msg_ctime; +++ } +++ +++ return rv; +++} +++compat_symbol (libc, __old_msgctl, msgctl, GLIBC_2_0); +++#endif ++--- /dev/null +++++ b/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 +++#include +++#include +++#include +++#include +++ +++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/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 +++#include +++#include /* 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/sysdeps/unix/bsd/bsd4.4/kfreebsd/net/if.h ++@@ -0,0 +1,444 @@ +++/*- +++ * 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 +++ +++#include +++ +++#include +++#include +++#include +++ +++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_vhid; /* carp vhid */ +++ unsigned char ifi_baudrate_pf; /* baudrate power factor */ +++ 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 */ +++#ifdef _IFI_OQDROPS +++ unsigned long ifi_oqdrops; /* dropped on output */ +++#endif +++}; +++ +++/*- +++ * 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_NETMAP 0x100000 /* netmap mode supported/enabled */ +++#define IFCAP_RXCSUM_IPV6 0x200000 /* can offload checksum on IPv6 RX */ +++#define IFCAP_TXCSUM_IPV6 0x400000 /* can offload checksum on IPv6 TX */ +++ +++#define IFCAP_HWCSUM_IPV6 (IFCAP_RXCSUM_IPV6 | IFCAP_TXCSUM_IPV6) +++ +++#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 IFCAP_CANTCHANGE (IFCAP_NETMAP) +++ +++#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]; +++ unsigned int ifru_fib; +++ } 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 ifr_fib ifr_ifru.ifru_fib /* interface fib */ +++}; +++ +++#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)) +++ +++#include +++ +++/* +++ * 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 */ +++}; +++ +++/* +++ * 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 */ +++}; +++ +++/* +++ * Structure used to request i2c data +++ * from interface transceivers. +++ */ +++struct ifi2creq { +++ unsigned char dev_addr; /* i2c address (0xA0, 0xA2) */ +++ unsigned char offset; /* read offset */ +++ unsigned char len; /* read length */ +++ unsigned char spare0; +++ unsigned int spare1; +++ unsigned char data[8]; /* read buffer */ +++}; +++ +++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/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/sysdeps/unix/bsd/bsd4.4/kfreebsd/netinet/icmp6.h ++@@ -0,0 +1,561 @@ +++/* 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 +++#include +++#include +++#include +++ +++#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 */ +++#define MLDV2_LISTENER_REPORT 143 /* RFC3810 listener report */ +++ +++/* The definitions below are experimental. TBA */ +++#define MLD_MTRACE_RESP 200 /* mtrace resp (to sender) */ +++#define MLD_MTRACE 201 /* mtrace messages */ +++ +++#define ICMP6_DST_UNREACH_NOROUTE 0 /* no route to destination */ +++#define ICMP6_DST_UNREACH_ADMIN 1 /* administratively prohibited */ +++#define ICMP6_DST_UNREACH_NOTNEIGHBOR 2 /* not a neighbor(obsolete) */ +++#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 /* port unreachable */ +++ +++#define ICMP6_TIME_EXCEED_TRANSIT 0 /* ttl==0 in transit */ +++#define ICMP6_TIME_EXCEED_REASSEMBLY 1 /* ttl==0 in reass */ +++ +++#define ICMP6_PARAMPROB_HEADER 0 /* erroneous header field */ +++#define ICMP6_PARAMPROB_NEXTHEADER 1 /* unrecognized next header */ +++#define ICMP6_PARAMPROB_OPTION 2 /* unrecognized option */ +++ +++#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_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 */ +++ +++#define ND_REDIRECT_ONLINK 0 /* redirect to an on-link node */ +++#define ND_REDIRECT_ROUTER 1 /* redirect to a better router */ +++ +++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/sysdeps/unix/bsd/bsd4.4/kfreebsd/netinet/if_ether.h ++@@ -0,0 +1,139 @@ +++/* 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 +++#include +++ +++#include +++#include +++ +++#ifdef __USE_MISC +++/* +++ * 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 +++#include +++#include +++ +++__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_MISC */ +++ +++#endif /* netinet/if_ether.h */ ++--- /dev/null +++++ b/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 +++#include +++ +++__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_MISC +++/* +++ * 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 +++#include +++ +++/* +++ * 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_MISC */ +++ +++__END_DECLS +++ +++#endif /* netinet/ip_icmp.h */ ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/netinet/tcp.h ++@@ -0,0 +1,278 @@ +++/* 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 +++#include +++ +++/* +++ * 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 */ +++#define TCP_CCALGOOPT 65 /* get/set cc algorithm specific options */ +++#define TCP_KEEPINIT 128 /* N, time to establish connection */ +++#define TCP_KEEPIDLE 256 /* L,N,X start keeplives after this period */ +++#define TCP_KEEPINTVL 512 /* L,N interval between keepalives */ +++#define TCP_KEEPCNT 1024 /* L,N number of keepalives before close */ +++#define TCP_FASTOPEN 1025 /* enable TFO / was created via TFO */ +++#define TCP_PCAP_OUT 2048 /* number of output packets to keep */ +++#define TCP_PCAP_IN 4096 /* number of input packets to keep */ +++#define TCP_FUNCTION_BLK 8192 /* Set the tcp function pointers to the specified stack */ +++ +++#ifdef __USE_MISC +++# include +++ +++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 */ +++ +++/* +++ * TCP header. +++ * Per RFC 793, September, 1981. +++ */ +++struct tcphdr +++ { +++ __extension__ union +++ { +++ struct +++ { +++ 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 */ +++}; +++ struct +++ { +++ 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 defines" +++# endif +++ u_int16_t window; +++ u_int16_t check; +++ u_int16_t urg_ptr; +++}; +++ }; +++}; +++ +++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/sysdeps/unix/bsd/bsd4.4/kfreebsd/nfs/nfs.h ++@@ -0,0 +1,3 @@ +++#include +++#include +++#include ++--- /dev/null +++++ b/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 , 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 +++#include +++ +++/* 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 IS_IN (libc) || IS_IN (libpthread) || 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/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 +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++int +++__libc_open (const char *file, int oflag, ...) +++{ +++ int mode = 0; +++ int fd; +++ +++ if (__OPEN_NEEDS_MODE (oflag)) +++ { +++ 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/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/sysdeps/unix/bsd/bsd4.4/kfreebsd/openat.c ++@@ -0,0 +1,70 @@ +++/* 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 +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++extern int __syscall_openat (int fd, const char *path, int flag, mode_t mode); +++libc_hidden_proto (__syscall_openat) +++ +++/* 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 (int fd, const char *file, int oflag, ...) +++{ +++ int mode = 0; +++ int result; +++ +++ if (__OPEN_NEEDS_MODE (oflag)) +++ { +++ va_list arg; +++ va_start (arg, oflag); +++ mode = va_arg (arg, int); +++ va_end (arg); +++ } +++ +++ if (SINGLE_THREAD_P) +++ return INLINE_SYSCALL (openat, 4, fd, file, oflag, mode); +++ else +++ { +++ int oldtype = LIBC_CANCEL_ASYNC (); +++ result = INLINE_SYSCALL (openat, 4, 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) ++--- /dev/null +++++ b/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/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/sysdeps/unix/bsd/bsd4.4/kfreebsd/posix_fadvise.c ++@@ -0,0 +1,51 @@ +++/* 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, write to the Free +++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +++ 02111-1307 USA. */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++extern int __syscall_posix_fadvise(int fd, off_t offset, off_t len, int advice); +++libc_hidden_proto (__syscall_posix_fadvise) +++ +++/* the syscall is available in 8.x since 8.3 and in 9.1 and above */ +++/* i.e. it is not supported in 9.0 kernel */ +++ +++int +++posix_fadvise(int fd, off_t offset, off_t len, int advice) +++{ +++ int rv; +++ rv = INLINE_SYSCALL (posix_fadvise, 4, fd, offset, len, advice); +++ if (rv == -1) +++ { +++ if (errno == ENOSYS) /* cheat under old kernels as successfull */ +++ return 0; +++ return errno; +++ } +++ return rv; +++} +++ +++weak_alias (posix_fadvise, posix_fadvise64) ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/posix_fadvise64.c ++@@ -0,0 +1 @@ +++/* 'posix_fadvise64' is the same as 'posix_fadvise', because __off64_t == __off_t. */ ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/posix_fallocate.c ++@@ -0,0 +1,81 @@ +++/* Copyright (C) 2007-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 +++ . */ +++ +++#include +++#include +++#include +++ +++extern int __syscall_posix_fallocate(int fd, off_t offset, off_t len); +++libc_hidden_proto (__syscall_posix_fallocate) +++ +++#define posix_fallocate static internal_fallocate +++#include +++#undef posix_fallocate +++ +++#if !defined __ASSUME_FALLOCATE +++static int __have_fallocate; +++#endif +++ +++ +++/* Reserve storage for the data of the file associated with FD. */ +++int +++__posix_fallocate (int fd, __off_t offset, __off_t len) +++{ +++#ifndef __ASSUME_FALLOCATE +++ if (__have_fallocate >= 0) +++#endif +++ { +++ int res = INLINE_SYSCALL (posix_fallocate, 3, fd, offset, len); +++ +++ if (res == -1) +++ res = errno; +++#ifndef __ASSUME_FALLOCATE +++ if (res == ENOSYS) +++ { +++ __have_fallocate = -1; +++ } +++ else +++#endif +++ { +++ if (res != EOPNOTSUPP) +++ return res; +++ } +++ } +++ return internal_fallocate (fd, offset, len); +++} +++strong_alias (__posix_fallocate, posix_fallocate) +++ +++/* 'posix_fallocate64' is the same as 'posix_fallocate', because __off64_t == __off_t. */ +++/* but previous prototype have different size of len parameter */ +++ +++#include +++#include +++ +++#if __WORDSIZE == 32 && SHLIB_COMPAT(libc, GLIBC_2_2, GLIBC_2_3_3) +++ +++int +++attribute_compat_text_section +++__posix_fallocate64_l32 (int fd, off64_t offset, size_t len) +++{ +++ return __posix_fallocate (fd, offset, len); +++} +++ +++versioned_symbol (libc, __posix_fallocate, posix_fallocate64, GLIBC_2_3_3); +++compat_symbol (libc, __posix_fallocate64_l32, posix_fallocate64, GLIBC_2_2); +++#else +++weak_alias (__posix_fallocate, posix_fallocate64) +++#endif ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/posix_fallocate64.c ++@@ -0,0 +1 @@ +++/* 'posix_fallocate64' is the same as 'posix_fallocate', because __off64_t == __off_t. */ ++--- /dev/null +++++ b/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/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/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/sysdeps/unix/bsd/bsd4.4/kfreebsd/prof-freq.c ++@@ -0,0 +1,38 @@ +++/* 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 +++#include +++#include +++ +++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/sysdeps/unix/bsd/bsd4.4/kfreebsd/ptsname.c ++@@ -0,0 +1,110 @@ +++/* Copyright (C) 1998-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 +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++/* Directory where we can find the slave pty nodes. */ +++#define _PATH_DEVPTS "/dev/pts/" +++ +++/* Static buffer for `ptsname'. */ +++static char buffer[sizeof (_PATH_DEVPTS) + 20]; +++ +++ +++/* 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; +++} +++ +++ +++int +++__isptymaster(int fd) +++{ +++ if (0 == __ioctl(fd, TIOCPTMASTER)) +++ return 0; +++ +++ if (errno != EBADF) +++ __set_errno (EINVAL); +++ +++ return -1; +++} +++ +++ +++int +++__ptsname_internal (int fd, char *buf, size_t buflen, struct stat64 *stp) +++{ +++ struct fiodgname_arg fiodgname; +++ char *p; +++ if (buf == NULL) +++ { +++ __set_errno (EINVAL); +++ return EINVAL; +++ } +++ +++ /* Check if FD really is a master pseudo terminal. */ +++ if (0 != __isptymaster(fd)) +++ { +++ __set_errno (ENOTTY); +++ return ENOTTY; +++ } +++ +++ if (buflen < sizeof (_PATH_DEV) + 5) /* "/dev/" + "pts/" */ +++ { +++ __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); +++ +++ fiodgname.buf = p; +++ fiodgname.len = buflen; +++ +++ if (0 != __ioctl(fd, FIODGNAME, &fiodgname)) +++ return errno; +++ +++ if (__xstat64 (_STAT_VER, buf, stp) < 0) +++ return 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/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/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/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 +++#undef __readdir64 +++#undef readdir64 +++ +++strong_alias (__readdir, __readdir64) +++weak_alias (__readdir64, readdir64) ++--- /dev/null +++++ b/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/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/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 +++#undef __readdir64_r +++#undef readdir64_r +++ +++strong_alias (__readdir_r, __readdir64_r) +++weak_alias (__readdir64_r, readdir64_r) ++--- /dev/null +++++ b/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 +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#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/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 +++#include +++#include +++#include +++ +++#include +++#include +++#include +++ +++extern ssize_t __syscall_readv (int, __const struct iovec *, int); +++libc_hidden_proto(__syscall_readv) +++ +++static ssize_t __atomic_readv_replacement (int, __const struct iovec *, +++ int) internal_function; +++ +++ssize_t +++__readv (int fd, const struct iovec *vector, int count) +++{ +++ if (count <= UIO_MAXIOV) +++ { +++ if (SINGLE_THREAD_P) +++ return INLINE_SYSCALL (readv, 3, fd, vector, count); +++ +++ int oldtype = LIBC_CANCEL_ASYNC (); +++ ssize_t result = INLINE_SYSCALL (readv, 3, fd, vector, count); +++ LIBC_CANCEL_RESET (oldtype); +++ return result; +++ +++ } +++ else +++ return __atomic_readv_replacement (fd, vector, count); +++} +++weak_alias (__readv, readv) +++ +++#undef weak_alias +++#define weak_alias(a,b) +++#define __readv static internal_function __atomic_readv_replacement +++#include ++--- /dev/null +++++ b/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 +++#include +++#include +++ +++/* 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/sysdeps/unix/bsd/bsd4.4/kfreebsd/remove.c ++@@ -0,0 +1,39 @@ +++/* 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 +++#include +++#include +++ +++int +++remove (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/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 +++#include +++ +++/* 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/sysdeps/unix/bsd/bsd4.4/kfreebsd/sa_len.c ++@@ -0,0 +1,47 @@ +++/* 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 +++ +++#include +++#include +++#include +++#include +++ +++extern int __libc_sa_len (sa_family_t __af); +++libc_hidden_proto (__libc_sa_len) +++ +++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; +++} +++libc_hidden_def (__libc_sa_len) ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/sbrk.c ++@@ -0,0 +1 @@ +++#include ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/sched_getaffinity.c ++@@ -0,0 +1,65 @@ +++/* 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 +++#include +++#include +++#include +++#include +++#include +++ +++#include "cpuset-kern.h" +++ +++int +++__libc_sched_getaffinity (pid_t pid, size_t cpusetsize, cpu_set_t *cpuset) +++{ +++ int res; +++ int64_t id; +++ +++ if (pid < 0) +++ { +++ __set_errno(ESRCH); +++ return -1; +++ } +++ +++ if (pid == 0) // user level "self" +++ id = -1; // kernel level "self" +++ else +++ id = pid; +++ +++ 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, id, 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/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 , 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 +++#include +++#include +++#include +++ +++/* 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/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 +++#include +++#include +++#include +++#include +++#include +++ +++#include "cpuset-kern.h" +++ +++int +++__libc_sched_setaffinity (pid_t pid, size_t cpusetsize, const cpu_set_t *cpuset) +++{ +++ int res; +++ int64_t id; +++ +++ if (pid < 0) +++ { +++ __set_errno(ESRCH); +++ return -1; +++ } +++ +++ if (pid == 0) // user level "self" +++ id = -1; // kernel level "self" +++ else +++ id = pid; +++ +++ res = INLINE_SYSCALL (cpuset_setaffinity, 5, CPU_LEVEL_WHICH, +++ CPU_WHICH_PID, id, 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/sysdeps/unix/bsd/bsd4.4/kfreebsd/seekdir.c ++@@ -0,0 +1,2 @@ +++/* Avoid , which doesn't pass the testsuite. */ +++#include ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/semctl.c ++@@ -0,0 +1,175 @@ +++/* 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 +++#include +++#include /* va_list */ +++#include /* NULL */ +++#include +++#include +++ +++#include +++#include +++#include +++#include +++#include +++ +++ +++/* union semun from FreeBSD */ +++/* +++ * semctl's arg parameter structure +++ */ +++union semun +++{ +++ int val; /* value for SETVAL */ +++ struct semid_ds *buf; /* buffer for IPC_STAT & IPC_SET */ +++ struct semid_ds_old *oldbuf; /* 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 +++__new_semctl (int semid, int semnum, int cmd, ...) +++{ +++ va_list ap; +++ union semun semun; +++ union semun *semun_ptr; +++ +++ va_start (ap, cmd); +++ switch (cmd) +++ { +++ case SEM_STAT: +++ case IPC_SET: +++ case IPC_STAT: +++ case GETALL: +++ case SETVAL: +++ case SETALL: +++ semun = va_arg (ap, union semun); +++ semun_ptr = &semun; +++ break; +++ default: +++ semun_ptr = NULL; +++ } +++ va_end (ap); +++ return INLINE_SYSCALL (semctl, 4, semid, semnum, cmd, semun_ptr); +++} +++versioned_symbol (libc, __new_semctl, semctl, GLIBC_2_18); +++ +++#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_18) +++ +++struct semid_ds_old +++{ +++ struct ipc_perm_old 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]; +++}; +++ +++int +++attribute_compat_text_section +++__old_semctl (int semid, int semnum, int cmd, ...) +++{ +++ struct semid_ds newbuf; +++ struct semid_ds_old *buf; +++ int rv; +++ +++ va_list ap; +++ union semun semun; +++ union semun *semun_ptr; +++ +++ va_start (ap, cmd); +++ switch (cmd) +++ { +++ case SEM_STAT: +++ case IPC_SET: +++ case IPC_STAT: +++ semun = va_arg (ap, union semun); +++ buf = semun.oldbuf; +++ semun.buf = &newbuf; +++ semun_ptr = &semun; +++ break; +++ case GETALL: +++ case SETVAL: +++ case SETALL: +++ semun = va_arg (ap, union semun); +++ semun_ptr = &semun; +++ break; +++ default: +++ semun_ptr = NULL; +++ } +++ va_end (ap); +++ +++ if (cmd == IPC_SET) +++ { +++ ipc_perm_old2new(&(buf->sem_perm), &(newbuf.sem_perm)); +++ newbuf.__sem_base = buf->__sem_base; +++ newbuf.sem_nsems = buf->sem_nsems; +++ newbuf.sem_otime = buf->sem_otime; +++ newbuf.sem_ctime = buf->sem_ctime; +++ } +++ +++ rv = INLINE_SYSCALL (semctl, 4, semid, semnum, cmd, semun_ptr); +++ +++ if ((rv != -1) && ((cmd == IPC_STAT) || (cmd == SEM_STAT))) +++ { +++ ipc_perm_new2old(&(newbuf.sem_perm), &(buf->sem_perm)); +++ buf->__sem_base = newbuf.__sem_base; +++ buf->sem_nsems = newbuf.sem_nsems; +++ buf->sem_otime = newbuf.sem_otime; +++ buf->sem_ctime = newbuf.sem_ctime; +++ } +++ +++ return rv; +++} +++compat_symbol (libc, __old_semctl, semctl, GLIBC_2_0); +++#endif ++--- /dev/null +++++ b/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 +++#include +++#include +++ +++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/sysdeps/unix/bsd/bsd4.4/kfreebsd/sendto.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 , 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 +++#include +++#include +++ +++/* 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); +++libc_hidden_proto (__libc_sa_len) +++ +++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__) +++ { +++ new_addrlen = __libc_sa_len ((addr.__sockaddr__)->sa_family); +++ +++ /* 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/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 , 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 +++#include +++ +++/* 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/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 , 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 +++#include +++ +++/* 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/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 , 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 +++#include +++ +++/* 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/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 , 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 +++#include +++ +++/* 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/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/sysdeps/unix/bsd/bsd4.4/kfreebsd/shlib-versions ++@@ -0,0 +1,5 @@ +++# DEFAULT Earliest symbol set +++# --------------- ------------------------------ +++DEFAULT GLIBC_2.3 +++libc=0.1 +++libm=1 ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/shm-directory.c ++@@ -0,0 +1,102 @@ +++/* Determine directory for shm/sem files. GNU/kFreeBSD version. +++ Copyright (C) 2000-2015 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 +++ . */ +++ +++#include "shm-directory.h" +++ +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++/* Mount point of the shared memory filesystem. */ +++static struct +++{ +++ char *dir; +++ size_t dirlen; +++} mountpoint; +++ +++/* This is the default directory. */ +++static const char defaultdir[] = "/dev/shm/"; +++ +++/* This is the alternate debian directory. */ +++static const char alternatedir[] = "/run/shm"; +++ +++/* Protect the `mountpoint' variable above. */ +++__libc_once_define (static, once); +++ +++ +++/* Determine where the shmfs is mounted (if at all). */ +++static void +++where_is_shmfs (void) +++{ +++ struct statfs f; +++ +++ /* The canonical place is /dev/shm. This is at least what the +++ documentation tells everybody to do. */ +++ if (__statfs (defaultdir, &f) == 0) +++ { +++ /* It is in the normal place. */ +++ mountpoint.dir = (char *) defaultdir; +++ mountpoint.dirlen = sizeof (defaultdir) - 1; +++ +++ return; +++ } +++ +++ /* The alternate place is /run/shm. */ +++ if (__statfs (alternatedir, &f) == 0) +++ { +++ /* It is in the normal place. */ +++ mountpoint.dir = (char *) alternatedir; +++ mountpoint.dirlen = sizeof (alternatedir) - 1; +++ +++ return; +++ } +++} +++ +++ +++const char * +++__shm_directory (size_t *len) +++{ +++ /* Determine where the shmfs is mounted. */ +++ __libc_once (once, where_is_shmfs); +++ +++ /* If we don't know the mount points there is nothing we can do. Ever. */ +++ if (__glibc_unlikely (mountpoint.dir == NULL)) +++ { +++ __set_errno (ENOSYS); +++ return NULL; +++ } +++ +++ *len = mountpoint.dirlen; +++ return mountpoint.dir; +++} +++#if IS_IN (libpthread) +++hidden_def (__shm_directory) +++#endif +++ +++ +++/* Make sure the table is freed if we want to free everything before +++ exiting. */ +++libc_freeres_fn (freeit) +++{ +++ if (mountpoint.dir != defaultdir) +++ free (mountpoint.dir); +++} ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/shm_open.c ++@@ -0,0 +1,37 @@ +++/* Copyright (C) 2014 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public +++ License as published by the Free Software Foundation; either +++ version 2.1 of the License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General Public License for more details. +++ +++ You should have received a copy of the GNU Lesser General Public +++ License along with the GNU C Library; if not, write to the Free +++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +++ 02111-1307 USA. */ +++ +++#include +++#include +++#include +++ +++extern int __syscall_shm_open (const char *name, int flag, mode_t mode); +++libc_hidden_proto (__syscall_shm_open) +++ +++int +++shm_open (const char *name, int flag, mode_t mode) +++{ +++ /* +++ * O_CLOEXEC never has any effect on shm_open(). However, old kernel +++ * versions (prior to rev 261138 in HEAD) return EINVAL when this +++ * (otherwise harmless) flag is used. +++ */ +++ flag &= ~O_CLOEXEC; +++ +++ return INLINE_SYSCALL (shm_open, 3, name, flag, mode); +++} ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/shmctl.c ++@@ -0,0 +1,91 @@ +++/* 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 +++ . */ +++ +++#include +++#include +++#include +++ +++#include +++#include +++#include +++#include +++#include +++ +++#include +++ +++/* Provide operations to control over shared memory segments. */ +++extern int __syscall_shmctl (int shmid, int cmd, struct shmid_ds *buf); +++libc_hidden_proto (__syscall_shmctl) +++ +++ +++int +++__new_shmctl (int shmid, int cmd, struct shmid_ds *buf) +++{ +++ return INLINE_SYSCALL (shmctl, 3, shmid, cmd, buf); +++} +++versioned_symbol (libc, __new_shmctl, shmctl, GLIBC_2_18); +++ +++#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_18) +++struct shmid_ds_old { +++ struct ipc_perm_old shm_perm; /* operation permission structure */ +++ int shm_segsz; /* size of segment in bytes */ +++ pid_t shm_lpid; /* process ID of last shared memory op */ +++ pid_t shm_cpid; /* process ID of creator */ +++ unsigned short 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; /* sysv stupidity */ +++}; +++ +++int +++attribute_compat_text_section +++__old_shmctl (int shmid, int cmd, struct shmid_ds_old *buf) +++{ +++ struct shmid_ds newbuf; +++ int rv; +++ +++ if (cmd == IPC_SET) +++ { +++ ipc_perm_old2new(&(buf->shm_perm), &(newbuf.shm_perm)); +++ newbuf.shm_segsz = buf->shm_segsz; +++ newbuf.shm_lpid = buf->shm_lpid; +++ newbuf.shm_cpid = buf->shm_cpid; +++ newbuf.shm_nattch= buf->shm_nattch; +++ newbuf.shm_atime = buf->shm_atime; +++ newbuf.shm_dtime = buf->shm_dtime; +++ newbuf.shm_ctime = buf->shm_ctime; +++ } +++ +++ rv = __new_shmctl (shmid, cmd, &newbuf); +++ +++ if ((rv != -1) && (cmd == IPC_STAT)) +++ { +++ ipc_perm_new2old(&(newbuf.shm_perm), &(buf->shm_perm)); +++ buf->shm_segsz = newbuf.shm_segsz; +++ buf->shm_lpid = newbuf.shm_lpid; +++ buf->shm_cpid = newbuf.shm_cpid; +++ buf->shm_nattch= newbuf.shm_nattch; +++ buf->shm_atime = newbuf.shm_atime; +++ buf->shm_dtime = newbuf.shm_dtime; +++ buf->shm_ctime = newbuf.shm_ctime; +++ } +++ +++ return rv; +++} +++compat_symbol (libc, __old_shmctl, shmctl, GLIBC_2_0); +++#endif ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/sigaction.c ++@@ -0,0 +1,48 @@ +++/* 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 +++#include +++#include +++#include +++ +++extern int __syscall_sigaction (int __sig, const struct sigaction *__act, struct sigaction *__oact) __THROW; +++libc_hidden_proto (__syscall_sigaction) +++ +++int +++__libc_sigaction (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) +++ +++#ifdef WRAPPER_INCLUDE +++# include WRAPPER_INCLUDE +++#endif +++ +++#ifndef LIBC_SIGACTION +++weak_alias (__libc_sigaction, __sigaction) +++libc_hidden_weak (__sigaction) +++weak_alias (__libc_sigaction, sigaction) +++#endif ++--- /dev/null +++++ b/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 ++--- /dev/null +++++ b/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/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 ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/sleep.c ++@@ -0,0 +1,49 @@ +++/* 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 +++ +++/* 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 (__builtin_expect (seconds == 0, 0)) +++ { +++#ifdef CANCELLATION_P +++ CANCELLATION_P (THREAD_SELF); +++#endif +++ 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/sysdeps/unix/bsd/bsd4.4/kfreebsd/socket/sys/un.h ++@@ -0,0 +1,2 @@ +++/* kludge to satisfy $SRC/include/sys/un.h */ +++#include ++--- /dev/null +++++ b/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 , 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 +++#include +++#include +++ +++extern int __syscall_fhstat (const fhandle_t *fhp, struct stat16 *buf); +++extern int __syscall_fstat (int, struct stat16 *); +++extern int __syscall_lstat (const char *, struct stat16 *); +++extern int __syscall_stat (const char *, struct stat16 *); +++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/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 +++ +++#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/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 , 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 +++ +++#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/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 , 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 +++#include +++#include +++#include +++#include +++#include +++ +++/* +++ * 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/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 , 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 +++#include +++ +++#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/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 , 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 +++#include +++ +++#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/sysdeps/unix/bsd/bsd4.4/kfreebsd/stty.c ++@@ -0,0 +1,2 @@ +++/* use stub only variant */ +++#include ++--- /dev/null +++++ b/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 +++#include +++ +++#endif /* sys/kd.h */ ++--- /dev/null +++++ b/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 +++ +++/* Retrieving the list of mounted filesystems. */ +++ +++#include +++#include +++#include +++#include +++ +++/* For getvfsbyname. */ +++#include +++#include +++#include +++#include +++#include +++#include +++ +++/* +++ * 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 . */ +++ +++#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/sysdeps/unix/bsd/bsd4.4/kfreebsd/sys/ptrace.h ++@@ -0,0 +1,127 @@ +++/*- +++ * 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 +++ +++#include +++#include +++#include +++ +++__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. */ +++ +++#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 */ +++ +++#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_FOLLOW_FORK 23 +++ +++#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_VM_TIMESTAMP 40 /* Get VM version (timestamp) */ +++#define PT_VM_ENTRY 41 /* Get VM map (entry) */ +++ +++#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 */ +++ +++/* 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 */ +++#define PL_FLAG_SCE 0x04 /* syscall enter point */ +++#define PL_FLAG_SCX 0x08 /* syscall leave point */ +++#define PL_FLAG_EXEC 0x10 /* exec(2) succeeded */ +++#define PL_FLAG_SI 0x20 /* siginfo is valid */ +++#define PL_FLAG_FORKED 0x40 /* new child */ +++#define PL_FLAG_CHILD 0x80 /* I am from child */ +++ sigset_t pl_sigmask; /* LWP signal mask */ +++ sigset_t pl_siglist; /* LWP pending signal */ +++ struct siginfo pl_siginfo; /* siginfo for signal */ +++ char pl_tdname[MAXCOMLEN + 1]; /* LWP name */ +++ int pl_child_pid; /* New child pid */ +++}; +++ +++extern int ptrace(int _request, pid_t _pid, caddr_t _addr, int _data) __THROW; +++ +++__END_DECLS +++ +++#endif /* _SYS_PTRACE_H */ ++--- /dev/null +++++ b/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 +++ +++/* +++ * 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/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 +++ +++/* +++ * 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/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 +++ +++/*- +++ * 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 /* for TAILQ macros */ +++#include /* for struct selinfo */ +++#include +++#include +++#include +++ +++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/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 +++ +++ +++__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/sysdeps/unix/bsd/bsd4.4/kfreebsd/sys/syscall.h ++@@ -0,0 +1,505 @@ +++#ifndef _SYSCALL_H +++#define _SYSCALL_H 1 +++ +++/* +++ * System call numbers. +++ * +++ * DO NOT EDIT-- this file is automatically generated. +++ * $FreeBSD$ +++ * created from FreeBSD: stable/10/sys/kern/syscalls.master 293474 2016-01-09 14:20:23Z dchagin +++ */ +++ +++#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_ffclock_getcounter 241 +++#define SYS_ffclock_setestimate 242 +++#define SYS_ffclock_getestimate 243 +++#define SYS_clock_getcpuclockid2 247 +++#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_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 511 +++#define SYS_shmctl 512 +++#define SYS_lpathconf 513 +++#define SYS_cap_new 514 +++#define SYS___cap_rights_get 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_wait6 532 +++#define SYS_cap_rights_limit 533 +++#define SYS_cap_ioctls_limit 534 +++#define SYS_cap_ioctls_get 535 +++#define SYS_cap_fcntls_limit 536 +++#define SYS_cap_fcntls_get 537 +++#define SYS_bindat 538 +++#define SYS_connectat 539 +++#define SYS_chflagsat 540 +++#define SYS_accept4 541 +++#define SYS_pipe2 542 +++#define SYS_aio_mlock 543 +++#define SYS_procctl 544 +++#define SYS_ppoll 545 +++#define SYS_futimens 546 +++#define SYS_utimensat 547 +++#define SYS_MAXSYSCALL 548 +++ +++#define SYS_obreak SYS_break +++#define SYS_sysctl SYS___sysctl +++#define SYS_getcwd SYS___getcwd +++#define SYS_setugid SYS___setugid +++#define SYS_semctl SYS___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/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/sysdeps/unix/bsd/bsd4.4/kfreebsd/sys/ucontext.h ++@@ -0,0 +1,49 @@ +++/* 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 +++#include +++ +++/* We need the signal context definitions even if they are not exposed +++ by . */ +++#include +++#include +++ +++/* This include file defines the type 'mcontext_t'. */ +++#include +++ +++/* 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/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 +++ +++/* Get the definition of the macro to define the common sockaddr members. */ +++#include +++ +++__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 /* 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/sysdeps/unix/bsd/bsd4.4/kfreebsd/syscalls-inline.h ++@@ -0,0 +1,82 @@ +++/* 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 +++#include +++#include +++ +++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_sigprocmask (int how, const sigset_t *set, sigset_t *oldset); +++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_sigprocmask) +++libc_hidden_proto (__syscall_nanosleep) +++ +++int __syscall_sigwait (const sigset_t *set, int *sig); +++int __syscall_sigwaitinfo (const sigset_t *set, siginfo_t *info); +++int __syscall_sigtimedwait(const sigset_t *set, siginfo_t *info, const struct timespec *timeout); +++libc_hidden_proto (__syscall_sigwait) +++libc_hidden_proto (__syscall_sigwaitinfo) +++libc_hidden_proto (__syscall_sigtimedwait) +++ +++int __syscall_clock_getcpuclockid2(int64_t id, int which, clockid_t *clock_id); +++libc_hidden_proto (__syscall_clock_getcpuclockid2) +++ +++int __syscall_thr_exit(long *p); +++int __syscall_thr_kill(long id, int sig); +++int __syscall_thr_kill2(int pid, long id, int sig); +++int __syscall_thr_new(void *arg, int size); +++int __syscall_thr_self(long *id); +++int __syscall_thr_set_name(long id, const char *name); +++libc_hidden_proto (__syscall_thr_exit) +++libc_hidden_proto (__syscall_thr_kill) +++libc_hidden_proto (__syscall_thr_kill2) +++libc_hidden_proto (__syscall_thr_new) +++libc_hidden_proto (__syscall_thr_self) +++libc_hidden_proto (__syscall_thr_set_name) +++ +++#endif ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/syscalls.list ++@@ -0,0 +1,214 @@ +++# File name Caller Syscall name # args Strong name Weak names +++accept4 - accept4 Ci:iBNi accept4 +++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_bind - bind i:ipi __syscall_bind +++sys_clock_getcpuclockid2 - clock_getcpuclockid2 Vi:iip __syscall_clock_getcpuclockid2 +++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_close - close i:i __syscall_close +++sys_closefrom EXTRA closefrom i:i __syscall_closefrom +++sys_connect - connect i:ipi __syscall_connect +++sys_cpuset_getaffinity - cpuset_getaffinity i:iiiip __syscall_cpuset_getaffinity +++sys_cpuset_setaffinity - cpuset_setaffinity i:iiiip __syscall_cpuset_setaffinity +++execve - execve i:spp __execve execve +++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 +++extattrctl - extattrctl i:sisI extattrctl +++sys_faccessat - faccessat i:isii __syscall_faccessat +++fchmodat - fchmodat i:isii fchmodat +++fchownat - fchownat i:isiii fchownat +++sys_fcntl - fcntl i:iiF __syscall_fcntl +++fexecve - fexecve i:ipp fexecve +++fhopen - fhopen i:pi fhopen +++sys_fhstat - fhstat i:pp __syscall_fhstat +++sys_fhstatfs - fhstatfs i:pp __syscall_fhstatfs +++sys_fork - fork i: __syscall_fork fork +++sys_fstat - fstat i:ip __syscall_fstat +++sys_fstatat - fstatat i:ispi __syscall_fstatat +++sys_fstatfs - fstatfs i:ip __syscall_fstatfs +++ftruncate - ftruncate i:ii __ftruncate !__ftruncate64 ftruncate ftruncate64 +++futimes - futimes i:ip __futimes futimes +++sys_futimesat - futimesat i:isp __syscall_futimesat +++getcontext - getcontext i:p __getcontext getcontext +++sys_getcwd - getcwd i:bn __syscall_getcwd +++sys_getdents - getdents i:ibn __syscall_getdents getdents +++sys_getdirentries - getdirentries i:ibnP __syscall_getdirentries +++getegid - getegid i: __getegid getegid +++geteuid - geteuid i: __geteuid geteuid +++getfh - getfh i:sp getfh +++sys_getfsstat - getfsstat i:pii __syscall_getfsstat +++sys_getlogin - getlogin i:bn __syscall_getlogin +++getpgid - getpgid i:i __getpgid __getpgid_internal getpgid +++getpgrp - getpgrp i: getpgrp +++getppid - getppid i: __getppid getppid +++getresgid - getresgid i:ppp getresgid +++getresuid - getresuid i:ppp getresuid +++getrlimit - getrlimit i:ip __getrlimit getrlimit getrlimit64 __getrlimit64 +++getsid - getsid i:i getsid +++issetugid - issetugid i: issetugid +++jail - jail i:p jail +++jail_attach - jail_attach i:i jail_attach +++jail_get - jail_get i:pii jail_get +++jail_remove - jail_remove i:i jail_remove +++jail_set - jail_set i:pii jail_set +++kenv - kenv i:issi kenv +++kevent EXTRA kevent i:ipipip __kevent kevent +++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 +++kqueue EXTRA kqueue i: __kqueue kqueue +++sys_ktimer_create - ktimer_create i:iPp __syscall_ktimer_create +++sys_ktimer_delete - ktimer_delete i:i __syscall_ktimer_delete +++sys_ktimer_getoverrun - ktimer_getoverrun i:i __syscall_ktimer_getoverrun +++sys_ktimer_gettime - ktimer_gettime i:ip __syscall_ktimer_gettime +++sys_ktimer_settime - ktimer_settime i:iipp __syscall_ktimer_settime +++ktrace - ktrace i:siii ktrace +++lchflags - lchflags i:si lchflags +++lchmod - lchmod i:si __lchmod lchmod +++lchown - lchown i:sii __lchown lchown +++linkat - linkat i:isisi linkat +++sys_lio_listio - lio_listio i:ibnP __syscall_lio_listio +++lseek - lseek i:iii __libc_lseek !__lseek lseek !__libc_lseek64 !__lseek64 lseek64 !__llseek llseek +++sys_lstat - lstat i:sp __syscall_lstat +++lutimes - lutimes i:sp __lutimes lutimes +++posix_madvise - madvise i:pii posix_madvise +++mincore - mincore i:anV mincore +++minherit - minherit i:aii minherit +++mkdirat - mkdirat i:isi mkdirat +++mkfifo - mkfifo i:si __mkfifo mkfifo +++sys_mkfifoat - mkfifoat i:isi __syscall_mkfifoat +++sys_mknod - mknod i:sii __syscall_mknod +++sys_mknodat - mknodat i:isii __syscall_mknodat +++mlock - mlock i:bn mlock +++mlockall - mlockall i:i mlockall +++sys_mmap - mmap b:aniiii __syscall_mmap +++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 +++sys_msgctl - msgctl i:iip __syscall_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 +++sys_munmap - munmap i:pi __syscall_munmap +++nanosleep - nanosleep Ci:pp __libc_nanosleep __nanosleep nanosleep +++sys_nanosleep EXTRA nanosleep i:pp __syscall_nanosleep +++nfssvc - nfssvc i:ip nfssvc +++sys_nfstat - nfstat i:ip __syscall_nfstat +++nlm_syscall - nlm_syscall i:iiip nlm_syscall +++sys_nlstat - nlstat i:sp __syscall_nlstat +++nmount - nmount i:pii nmount +++sys_nstat - nstat i:sp __syscall_nstat +++ntp_adjtime - ntp_adjtime i:p ntp_adjtime +++ntp_gettime - ntp_gettime i:p ntp_gettime +++obreak - obreak i:a __syscall_obreak +++sys_open - open i:siv __syscall_open +++sys_openat - openat i:isii __syscall_openat !__openat_nocancel !__openat64_nocancel +++poll - poll Ci:pii __poll poll +++sys_posix_fadvise EXTRA posix_fadvise i:iiii __syscall_posix_fadvise +++sys_posix_fallocate EXTRA posix_fallocate i:iii __syscall_posix_fallocate +++posix_openpt getpt posix_openpt i:i __syscall_posix_openpt +++pread - pread Ci:ibni __libc_pread !__pread pread !__libc_pread64 !__pread64 pread64 +++preadv - preadv Ci:ipii __preadv preadv __preadv64 preadv64 +++pselect - pselect Ci:iPPPPP __pselect !__libc_pselect pselect +++pwrite - pwrite Ci:ibni __libc_pwrite !__pwrite pwrite !__libc_pwrite64 !__pwrite64 pwrite64 +++pwritev - pwritev Ci:ipii __pwritev pwritev __pwritev64 pwritev64 +++quotactl - quotactl i:siip quotactl +++sys_read - read i:ibn __syscall_read +++readlink - readlink i:spi __syscall_readlink __readlink readlink +++readlinkat - readlinkat i:issi readlinkat +++sys_readv - readv i:ipi __syscall_readv +++renameat - renameat i:isis renameat +++rfork - rfork i:i __rfork rfork +++rtprio - rtprio i:iip __rtprio rtprio +++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_gets - sched_getscheduler i:i __sched_getscheduler sched_getscheduler +++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 +++sys_semctl - semctl i:iiip __syscall_semctl +++semget - semget i:iii semget +++semop - semop i:ipi semop +++bsd_sendfile - sendfile i:iiiippi bsd_sendfile +++sys_sendto - sendto i:ibnibn __syscall_sendto +++setcontext - setcontext i:p __setcontext setcontext +++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 +++sys_shm_open - shm_open i:sii __syscall_shm_open +++shm_unlink - shm_unlink i:s shm_unlink +++shmat - shmat i:iai shmat +++sys_shmctl - shmctl i:iip __syscall_shmctl +++shmdt - shmdt i:a shmdt +++shmget - shmget i:iii shmget +++sys_sigaction - sigaction i:ipp __syscall_sigaction +++sigpending - sigpending i:p sigpending +++sys_sigprocmask EXTRA sigprocmask Vi:iPP __syscall_sigprocmask +++sigprocmask - sigprocmask i:iPP __sigprocmask sigprocmask +++sigqueue - sigqueue i:iii __sigqueue sigqueue +++sigsuspend - sigsuspend Ci:p __sigsuspend sigsuspend +++sys_sigsuspend EXTRA sigsuspend i:p __syscall_sigsuspend +++sigtimedwait - sigtimedwait Ci:ppP __sigtimedwait sigtimedwait +++sys_sigtimedwait - sigtimedwait i:ppP __syscall_sigtimedwait +++sys_sigwait - sigwait i:pp __syscall_sigwait +++sigwaitinfo - sigwaitinfo Ci:pp __sigwaitinfo sigwaitinfo +++sys_sigwaitinfo - sigwaitinfo i:pp __syscall_sigwaitinfo +++sys_stat - stat i:sp __syscall_stat +++sys_statfs - statfs i:sp __syscall_statfs +++swapcontext - swapcontext i:pp __swapcontext swapcontext +++swapoff - swapoff i:s swapoff +++swapon - swapon i:s swapon +++symlinkat - symlinkat i:sis symlinkat +++sysarch - sysarch i:ip __sysarch sysarch +++sysctl - sysctl i:pibNbn __sysctl sysctl +++sys_thr_exit - thr_exit Vi:P __syscall_thr_exit +++sys_thr_kill - thr_kill Vi:ii __syscall_thr_kill +++sys_thr_kill2 - thr_kill2 Vi:iii __syscall_thr_kill2 +++sys_thr_new - thr_new Vi:pi __syscall_thr_new +++sys_thr_self - thr_self Vi:p __syscall_thr_self +++sys_thr_set_name - thr_set_name Vi:iP __syscall_thr_set_name +++truncate - truncate i:sii __truncate !__truncate64 truncate truncate64 +++sys_umtx - _umtx_op Vi:piipp __syscall__umtx_op +++undelete - undelete i:s undelete +++unlinkat - unlinkat i:isi unlinkat +++unmount - unmount i:si unmount +++utrace - utrace i:bn utrace +++wait4 - wait4 i:iWiP __syscall_wait4 __wait4 wait4 +++sys_wait6 EXTRA wait6 i:iiWiPP __syscall_wait6 +++sys_write - write i:ibn __syscall_write +++sys_writev - writev i:ipi __syscall_writev +++yield - yield i: __syscall_yield ++--- /dev/null +++++ b/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 +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++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 ++--- /dev/null +++++ b/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 , 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 +++#include +++ +++/* 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, (void *)newval, newlen); +++} +++ +++weak_alias (__sysctlbyname, sysctlbyname) ++--- /dev/null +++++ b/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 +++#include +++#include +++ +++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/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 +++#include +++#include +++#include +++#include +++ +++/* 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/sysdeps/unix/bsd/bsd4.4/kfreebsd/tcflow.c ++@@ -0,0 +1,4 @@ +++/* just use internal functions */ +++#define tcgetattr __tcgetattr +++#define write __write +++#include ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/telldir.c ++@@ -0,0 +1,2 @@ +++/* Avoid , which doesn't pass the testsuite. */ +++#include ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/testrtsig.h ++@@ -0,0 +1,30 @@ +++/* 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 +++#include +++ +++#include +++#include +++ +++static int +++kernel_has_rtsig (void) +++{ +++ return 1; +++} ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/times.c ++@@ -0,0 +1,71 @@ +++/* Copyright (C) 1991,92,93,95,96,97,1998,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. */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++ +++ +++/* Time the program started. */ +++extern time_t _posix_start_time; +++ +++#ifdef __GNUC__ +++__inline +++#endif +++static clock_t +++timeval_to_clock_t (const struct timeval *tv, clock_t clk_tck) +++{ +++ return (clock_t) ((tv->tv_sec * clk_tck) + +++ (tv->tv_usec * clk_tck / 1000000L)); +++} +++ +++/* Store the CPU time used by this process and all its +++ dead children (and their dead children) in BUFFER. +++ Return the elapsed real time, or (clock_t) -1 for errors. +++ All times are in CLK_TCKths of a second. */ +++clock_t +++__times (struct tms *buffer) +++{ +++ struct rusage usage; +++ clock_t clk_tck; +++ +++ if (buffer == NULL) +++ { +++ __set_errno (EINVAL); +++ return (clock_t) -1; +++ } +++ +++ clk_tck = __getclktck (); +++ +++ if (__getrusage (RUSAGE_SELF, &usage) < 0) +++ return (clock_t) -1; +++ buffer->tms_utime = (clock_t) timeval_to_clock_t (&usage.ru_utime, clk_tck); +++ buffer->tms_stime = (clock_t) timeval_to_clock_t (&usage.ru_stime, clk_tck); +++ +++ if (__getrusage (RUSAGE_CHILDREN, &usage) < 0) +++ return (clock_t) -1; +++ buffer->tms_cutime = (clock_t) timeval_to_clock_t (&usage.ru_utime, clk_tck); +++ buffer->tms_cstime = (clock_t) timeval_to_clock_t (&usage.ru_stime, clk_tck); +++ +++ return (time ((time_t *) NULL) - _posix_start_time) * clk_tck; +++} +++ +++weak_alias (__times, times) ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/timespec_get.c ++@@ -0,0 +1,47 @@ +++/* Copyright (C) 2011-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. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General Public License 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 +++ . */ +++ +++#include +++#include +++#include +++ +++/* Set TS to calendar time based in time base BASE. */ +++ +++/* if the timespec_get function is successful +++ it returns the nonzero value base; +++ otherwise, it returns zero. +++ */ +++ +++int __syscall_clock_gettime(clockid_t clock_id, struct timespec *tp); +++libc_hidden_proto (__syscall_clock_gettime) +++ +++int +++timespec_get (struct timespec *ts, int base) +++{ +++ switch (base) +++ { +++ case TIME_UTC: +++ if ( 0 != INLINE_SYSCALL (clock_gettime, 2, CLOCK_REALTIME, ts)) +++ return 0; +++ break; +++ +++ default: +++ return 0; +++ } +++ +++ return base; +++} ++--- /dev/null +++++ b/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/sysdeps/unix/bsd/bsd4.4/kfreebsd/ttyname.c ++@@ -0,0 +1,70 @@ +++/* 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 +++#include +++#include +++#include +++#include +++#include +++#include +++ +++/* 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 (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/sysdeps/unix/bsd/bsd4.4/kfreebsd/ttyname_r.c ++@@ -0,0 +1,75 @@ +++/* 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 +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++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 (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/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 . +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public +++ License as published by the Free Software Foundation; either +++ version 2.1 of the License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General Public License for more details. +++ +++ You should have received a copy of the GNU Lesser General Public +++ License along with the GNU C Library; if not, write to the Free +++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +++ 02111-1307 USA. */ +++ +++#include +++#include +++#include +++#include +++ +++#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/sysdeps/unix/bsd/bsd4.4/kfreebsd/unlockpt.c ++@@ -0,0 +1,32 @@ +++/* 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 +++#include +++#include +++#include +++ +++extern int __isptymaster(int fd); +++ +++int +++unlockpt (int fd) +++{ +++ /* there is no need/way to do unlocking of slave pseudo-terminal device, +++ just check whether fd might be valid master pseudo-terminal device */ +++ return __isptymaster(fd); +++} ++--- /dev/null +++++ b/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 +++#include +++ +++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/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 , 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 +++#include +++#include +++#include +++#include +++#include +++ +++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/sysdeps/unix/bsd/bsd4.4/kfreebsd/utmp-compat/Makefile ++@@ -0,0 +1,6 @@ +++# Additional functions: +++ +++ifeq ($(subdir),login) +++# For . +++sysdep_routines += utmpconv +++endif ++--- /dev/null +++++ b/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 directly; use instead." +++#endif +++ +++#include +++#include +++ +++ +++#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/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 +++#include +++#include +++ +++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/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 +++#include +++#include +++ +++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/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 , 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 +++#include +++#include +++ +++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/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 , 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 +++#include +++#include +++ +++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/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 , 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 +++#include +++#include +++ +++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/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 +++#include +++#include +++#include +++ +++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/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 +++#include +++ +++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/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 +++#include +++ +++#include +++ +++/* 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/sysdeps/unix/bsd/bsd4.4/kfreebsd/utmp-compat/utmp_file.c ++@@ -0,0 +1 @@ +++#include ++--- /dev/null +++++ b/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 , 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 +++#include +++#include +++#include +++#include +++ +++/* 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/sysdeps/unix/bsd/bsd4.4/kfreebsd/utmp-utmpx/utmp_file.c ++@@ -0,0 +1 @@ +++#include ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/wait.c ++@@ -0,0 +1 @@ +++#include ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/wait3.c ++@@ -0,0 +1 @@ +++#include ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/waitid.c ++@@ -0,0 +1,108 @@ +++/* +++ Copyright (C) 2004-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, see +++ . */ +++ +++#include +++#include +++#include +++#include +++#include +++#include +++ +++extern int __syscall_wait6 (idtype_t itype, int64_t id, +++ int *status, int options, +++ struct rusage *rusage, siginfo_t *infop); +++libc_hidden_proto (__syscall_wait6) +++ +++ +++#define DO_WAITID simulated_waitid +++static int simulated_waitid (idtype_t idtype, id_t id, siginfo_t *infop, int options); +++ +++ +++#if !defined __ASSUME_WAIT6 +++static int __have_wait6; +++#endif +++ +++static inline int +++do_waitid (idtype_t idtype, id_t id, siginfo_t *infop, int options) +++{ +++ int ret; +++ int status; +++#ifndef __ASSUME_WAIT6 +++ if (__have_wait6 >= 0) +++#endif +++ { +++ ret = INLINE_SYSCALL (wait6, 6, idtype, id, &status, options, NULL, infop); +++ +++ if (ret == 0 && infop != NULL) +++ { +++ memset(infop, 0, sizeof(*infop)); +++ } +++ if (ret >= 0) +++ return 0; +++#ifndef __ASSUME_WAIT6 +++ if (errno == ENOSYS) +++ { +++ __have_wait6 = -1; +++ } +++ else +++#endif +++ { +++ return ret; +++ } +++ } +++ return simulated_waitid(idtype, id, infop, options); +++} +++ +++ +++#define waitid __unused_waitid_alias +++#include +++#undef waitid +++ +++versioned_symbol (libc, __waitid, waitid, GLIBC_2_18); +++ +++#if SHLIB_COMPAT (libc, GLIBC_2_1, GLIBC_2_18) +++ +++/* it used to be: */ +++ +++#define OLD_P_ALL 0 +++#define OLD_P_PID 1 +++#define OLD_P_PGID 2 +++ +++int +++__waitid_old (idtype_t oldtype, id_t id, siginfo_t *infop, int options) +++{ +++ idtype_t newtype; +++ +++ switch (oldtype) +++ { +++ case OLD_P_ALL: +++ newtype = P_ALL; +++ break; +++ case OLD_P_PID: +++ newtype = P_PID; +++ break; +++ case OLD_P_PGID: +++ newtype = P_PGID; +++ break; +++ default: +++ newtype = oldtype; +++ } +++ return __waitid(newtype, id, infop, options); +++} +++compat_symbol (libc, __waitid_old, waitid, GLIBC_2_1); +++#endif ++--- /dev/null +++++ b/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 +++#include +++#include +++#include +++#include +++ +++/* 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/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 +++#include +++#include +++#include +++ +++#include +++#include +++#include +++ +++extern ssize_t __syscall_writev (int, const struct iovec *, int); +++ +++static ssize_t __atomic_writev_replacement (int, const struct iovec *, +++ int) internal_function; +++ +++ssize_t +++__writev (int fd, const struct iovec *vector, int count) +++{ +++ if (count <= UIO_MAXIOV) +++ { +++ if (SINGLE_THREAD_P) +++ return INLINE_SYSCALL (writev, 3, fd, vector, count); +++ +++ int oldtype = LIBC_CANCEL_ASYNC (); +++ ssize_t result = INLINE_SYSCALL (writev, 3, fd, vector, count); +++ LIBC_CANCEL_RESET (oldtype); +++ return result; +++ +++ } +++ else +++ return __atomic_writev_replacement (fd, vector, count); +++} +++weak_alias (__writev, writev) +++ +++#undef weak_alias +++#define weak_alias(a,b) +++#define __writev static internal_function __atomic_writev_replacement +++#include +++ ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86/Makefile ++@@ -0,0 +1,9 @@ +++# We don't need any header files. +++abi-includes := +++ +++abi-variants := 32 64 +++ +++abi-32-options := -D__i386__ -U__x86_64__ +++abi-32-condition := !defined __x86_64__ +++abi-64-options := -U__i386__ -D__x86_64__ -U__ILP32__ -D__LP64__ +++abi-64-condition := defined __x86_64__ && defined __LP64__ ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86/fbtl/bits/pthreadtypes.h ++@@ -0,0 +1,240 @@ +++/* Copyright (C) 2002-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 +++ . */ +++ +++#ifndef _BITS_PTHREADTYPES_H +++#define _BITS_PTHREADTYPES_H 1 +++ +++#include +++ +++#ifdef __x86_64__ +++# if __WORDSIZE == 64 +++# define __SIZEOF_PTHREAD_ATTR_T 56 +++# define __SIZEOF_PTHREAD_MUTEX_T 40 +++# define __SIZEOF_PTHREAD_MUTEXATTR_T 4 +++# define __SIZEOF_PTHREAD_COND_T 48 +++# define __SIZEOF_PTHREAD_CONDATTR_T 4 +++# define __SIZEOF_PTHREAD_RWLOCK_T 56 +++# define __SIZEOF_PTHREAD_RWLOCKATTR_T 8 +++# define __SIZEOF_PTHREAD_BARRIER_T 32 +++# define __SIZEOF_PTHREAD_BARRIERATTR_T 4 +++# else +++# define __SIZEOF_PTHREAD_ATTR_T 32 +++# define __SIZEOF_PTHREAD_MUTEX_T 32 +++# define __SIZEOF_PTHREAD_MUTEXATTR_T 4 +++# define __SIZEOF_PTHREAD_COND_T 48 +++# define __SIZEOF_PTHREAD_CONDATTR_T 4 +++# define __SIZEOF_PTHREAD_RWLOCK_T 44 +++# define __SIZEOF_PTHREAD_RWLOCKATTR_T 8 +++# define __SIZEOF_PTHREAD_BARRIER_T 20 +++# define __SIZEOF_PTHREAD_BARRIERATTR_T 4 +++# endif +++#else +++# define __SIZEOF_PTHREAD_ATTR_T 36 +++# define __SIZEOF_PTHREAD_MUTEX_T 24 +++# define __SIZEOF_PTHREAD_MUTEXATTR_T 4 +++# define __SIZEOF_PTHREAD_COND_T 48 +++# define __SIZEOF_PTHREAD_CONDATTR_T 4 +++# define __SIZEOF_PTHREAD_RWLOCK_T 32 +++# define __SIZEOF_PTHREAD_RWLOCKATTR_T 8 +++# define __SIZEOF_PTHREAD_BARRIER_T 20 +++# define __SIZEOF_PTHREAD_BARRIERATTR_T 4 +++#endif +++ +++ +++/* Thread identifiers. The structure of the attribute type is not +++ exposed on purpose. */ +++typedef unsigned long int pthread_t; +++ +++ +++union pthread_attr_t +++{ +++ char __size[__SIZEOF_PTHREAD_ATTR_T]; +++ long int __align; +++}; +++#ifndef __have_pthread_attr_t +++typedef union pthread_attr_t pthread_attr_t; +++# define __have_pthread_attr_t 1 +++#endif +++ +++ +++#ifdef __x86_64__ +++typedef struct __pthread_internal_list +++{ +++ struct __pthread_internal_list *__prev; +++ struct __pthread_internal_list *__next; +++} __pthread_list_t; +++#else +++typedef struct __pthread_internal_slist +++{ +++ struct __pthread_internal_slist *__next; +++} __pthread_slist_t; +++#endif +++ +++ +++/* Data structures for mutex handling. The structure of the attribute +++ type is not exposed on purpose. */ +++typedef union +++{ +++ struct __pthread_mutex_s +++ { +++ int __lock; +++ unsigned int __count; +++ int __owner; +++#ifdef __x86_64__ +++ unsigned int __nusers; +++#endif +++ /* KIND must stay at this position in the structure to maintain +++ binary compatibility. */ +++ int __kind; +++#ifdef __x86_64__ +++ int __spins; +++ __pthread_list_t __list; +++# define __PTHREAD_MUTEX_HAVE_PREV 1 +++#else +++ unsigned int __nusers; +++ __extension__ union +++ { +++ int __spins; +++ __pthread_slist_t __list; +++ }; +++#endif +++ } __data; +++ char __size[__SIZEOF_PTHREAD_MUTEX_T]; +++ long int __align; +++} pthread_mutex_t; +++ +++typedef union +++{ +++ char __size[__SIZEOF_PTHREAD_MUTEXATTR_T]; +++ int __align; +++} pthread_mutexattr_t; +++ +++ +++/* Data structure for conditional variable handling. The structure of +++ the attribute type is not exposed on purpose. */ +++typedef union +++{ +++ struct +++ { +++ int __lock; +++ unsigned int __futex; +++ __extension__ unsigned long long int __total_seq; +++ __extension__ unsigned long long int __wakeup_seq; +++ __extension__ unsigned long long int __woken_seq; +++ void *__mutex; +++ unsigned int __nwaiters; +++ unsigned int __broadcast_seq; +++ } __data; +++ char __size[__SIZEOF_PTHREAD_COND_T]; +++ __extension__ long long int __align; +++} pthread_cond_t; +++ +++typedef union +++{ +++ char __size[__SIZEOF_PTHREAD_CONDATTR_T]; +++ int __align; +++} pthread_condattr_t; +++ +++ +++/* Keys for thread-specific data */ +++typedef unsigned int pthread_key_t; +++ +++ +++/* Once-only execution */ +++typedef int pthread_once_t; +++ +++ +++#if defined __USE_UNIX98 || defined __USE_XOPEN2K +++/* Data structure for read-write lock variable handling. The +++ structure of the attribute type is not exposed on purpose. */ +++typedef union +++{ +++# ifdef __x86_64__ +++ struct +++ { +++ int __lock; +++ unsigned int __nr_readers; +++ unsigned int __readers_wakeup; +++ unsigned int __writer_wakeup; +++ unsigned int __nr_readers_queued; +++ unsigned int __nr_writers_queued; +++ int __writer; +++ int __shared; +++ unsigned long int __pad1; +++ unsigned long int __pad2; +++ /* FLAGS must stay at this position in the structure to maintain +++ binary compatibility. */ +++ unsigned int __flags; +++# define __PTHREAD_RWLOCK_INT_FLAGS_SHARED 1 +++ } __data; +++# else +++ struct +++ { +++ int __lock; +++ unsigned int __nr_readers; +++ unsigned int __readers_wakeup; +++ unsigned int __writer_wakeup; +++ unsigned int __nr_readers_queued; +++ unsigned int __nr_writers_queued; +++ /* FLAGS must stay at this position in the structure to maintain +++ binary compatibility. */ +++ unsigned char __flags; +++ unsigned char __shared; +++ unsigned char __pad1; +++ unsigned char __pad2; +++ int __writer; +++ } __data; +++# endif +++ char __size[__SIZEOF_PTHREAD_RWLOCK_T]; +++ long int __align; +++} pthread_rwlock_t; +++ +++typedef union +++{ +++ char __size[__SIZEOF_PTHREAD_RWLOCKATTR_T]; +++ long int __align; +++} pthread_rwlockattr_t; +++#endif +++ +++ +++#ifdef __USE_XOPEN2K +++/* POSIX spinlock data type. */ +++typedef volatile int pthread_spinlock_t; +++ +++ +++/* POSIX barriers data type. The structure of the type is +++ deliberately not exposed. */ +++typedef union +++{ +++ char __size[__SIZEOF_PTHREAD_BARRIER_T]; +++ long int __align; +++} pthread_barrier_t; +++ +++typedef union +++{ +++ char __size[__SIZEOF_PTHREAD_BARRIERATTR_T]; +++ int __align; +++} pthread_barrierattr_t; +++#endif +++ +++ +++#ifndef __x86_64__ +++/* Extra attributes for the cleanup functions. */ +++# define __cleanup_fct_attribute __attribute__ ((__regparm__ (1))) +++#endif +++ +++#endif /* bits/pthreadtypes.h */ ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86/fbtl/bits/semaphore.h ++@@ -0,0 +1,40 @@ +++/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 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, see +++ . */ +++ +++#ifndef _SEMAPHORE_H +++# error "Never use directly; include instead." +++#endif +++ +++#include +++ +++#if __WORDSIZE == 64 +++# define __SIZEOF_SEM_T 32 +++#else +++# define __SIZEOF_SEM_T 16 +++#endif +++ +++ +++/* Value returned if `sem_open' failed. */ +++#define SEM_FAILED ((sem_t *) 0) +++ +++ +++typedef union +++{ +++ char __size[__SIZEOF_SEM_T]; +++ long int __align; +++} sem_t; ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86/fbtl/lowlevellock.h ++@@ -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 +++ . */ +++ +++#include_next +++ +++#ifndef __ASSEMBLER__ +++ /* Delay in spinlock loop. */ +++# define BUSY_WAIT_NOP asm ("rep; nop") +++# ifndef LOCK_INSTR +++# ifdef UP +++# define LOCK_INSTR /* nothing */ +++# else +++# define LOCK_INSTR "lock;" +++# endif +++# endif +++#else +++# ifndef LOCK +++# ifdef UP +++# define LOCK +++# else +++# define LOCK lock +++# endif +++# endif +++#endif /* !__ASSEMBLER__ */ ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/Implies ++@@ -0,0 +1 @@ +++unix/bsd/bsd4.4/kfreebsd/x86 ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/Makefile ++@@ -0,0 +1,20 @@ +++# The default ABI is 64. +++default-abi := 64 +++ +++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 and . +++sysdep_routines += iopl ioperm +++endif ++--- /dev/null +++++ b/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/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/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 directly; include 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 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 for the internals of mc_fpstate[]. +++ */ +++ int mc_fpstate[128] __attribute__((aligned(16))); +++ int mc_spare2[8]; +++ } mcontext_t; +++ +++#else +++ +++/* 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. +++ */ +++ long mc_onstack; /* XXX - sigcontext compat. */ +++ long mc_rdi; /* machine state (struct trapframe) */ +++ long mc_rsi; +++ long mc_rdx; +++ long mc_rcx; +++ long mc_r8; +++ long mc_r9; +++ long mc_rax; +++ long mc_rbx; +++ long mc_rbp; +++ long mc_r10; +++ long mc_r11; +++ long mc_r12; +++ long mc_r13; +++ long mc_r14; +++ long mc_r15; +++ long mc_trapno; +++ long mc_addr; +++ long mc_flags; +++ long mc_err; +++ long mc_rip; +++ long mc_cs; +++ long mc_rflags; +++ long mc_rsp; +++ long mc_ss; +++ +++ long mc_len; /* sizeof(mcontext_t) */ +++#define _MC_FPFMT_NODEV 0x10000 /* device not present or configured */ +++#define _MC_FPFMT_XMM 0x10002 +++ long 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 */ +++ long mc_ownedfp; +++ /* +++ * See for the internals of mc_fpstate[]. +++ */ +++ long mc_fpstate[64] __attribute__((aligned(16))); +++ long mc_spare[8]; +++} mcontext_t; +++ +++#endif +++ +++/* Traditional BSD names for some members. */ +++#define mc_eflags mc_efl ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/bits/sigcontext.h ++@@ -0,0 +1,147 @@ +++/* 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 directly; include instead." +++#endif +++ +++#ifndef _BITS_SIGCONTEXT_H +++#define _BITS_SIGCONTEXT_H 1 +++ +++#ifdef __i386__ +++ +++/* 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 and 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 +++ +++#else +++ +++__extension__ struct sigcontext +++ { +++ __sigset_t sc_mask; /* Blocked signals to restore. */ +++ long sc_onstack; /* Nonzero if running on sigstack. */ +++ union { long sc_rdi; long rdi;}; +++ union { long sc_rsi; long rsi;}; +++ union { long sc_rdx; long rdx;}; +++ union { long sc_rcx; long rcx;}; +++ union { long sc_r8; long r8;}; +++ union { long sc_r9; long r9;}; +++ union { long sc_rax; long rax;}; +++ union { long sc_rbx; long rbx;}; +++ union { long sc_rbp; long rbp;}; +++ union { long sc_r10; long r10;}; +++ union { long sc_r11; long r11;}; +++ union { long sc_r12; long r12;}; +++ union { long sc_r13; long r13;}; +++ union { long sc_r14; long r14;}; +++ union { long sc_r15; long r15;}; +++ union { long sc_trapno; long trapno;}; +++ union { long sc_addr; long addr;}; +++ union { long sc_flags; long flags;}; +++ union { long sc_err; long err;}; +++ union { long sc_rip; long rip;}; +++ union { long sc_cs; long cs;}; +++ union { long sc_rflags; long rflags;}; +++ union { long sc_rsp; long rsp;}; +++ union { long sc_ss; long ss;}; +++ long sc_len; /* sizeof(mcontext_t) */ +++ /* +++ * XXX - See and for +++ * the following fields. +++ */ +++ long sc_fpformat; +++ long sc_ownedfp; +++ long sc_fpstate[64] __attribute__((aligned(16))); +++ long sc_spare[8]; +++ }; +++ +++/* Traditional BSD names for some members. */ +++#define sc_sp sc_rsp /* Stack pointer. */ +++#define sc_fp sc_rbp /* Frame pointer. */ +++#define sc_pc sc_rip /* Process counter. */ +++ +++#endif +++ +++#endif /* _BITS_SIGCONTEXT_H */ ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/c++-types.data ++@@ -0,0 +1,67 @@ +++blkcnt64_t:l +++blkcnt_t:l +++blksize_t:j +++caddr_t:Pc +++clockid_t:i +++clock_t:i +++daddr_t:l +++dev_t:j +++fd_mask:l +++fsblkcnt64_t:m +++fsblkcnt_t:m +++fsfilcnt64_t:m +++fsfilcnt_t:m +++fsid_t:8__fsid_t +++gid_t:j +++id_t:j +++ino64_t:m +++ino_t:j +++int16_t:s +++int32_t:i +++int64_t:l +++int8_t:a +++intptr_t:l +++key_t:l +++loff_t:l +++mode_t:t +++nlink_t:t +++off64_t:l +++off_t:l +++pid_t:i +++pthread_attr_t:14pthread_attr_t +++pthread_barrier_t:17pthread_barrier_t +++pthread_barrierattr_t:21pthread_barrierattr_t +++pthread_cond_t:14pthread_cond_t +++pthread_condattr_t:18pthread_condattr_t +++pthread_key_t:j +++pthread_mutex_t:15pthread_mutex_t +++pthread_mutexattr_t:19pthread_mutexattr_t +++pthread_once_t:i +++pthread_rwlock_t:16pthread_rwlock_t +++pthread_rwlockattr_t:20pthread_rwlockattr_t +++pthread_spinlock_t:i +++pthread_t:m +++quad_t:l +++register_t:l +++rlim64_t:l +++rlim_t:l +++sigset_t:10__sigset_t +++size_t:m +++socklen_t:j +++ssize_t:l +++suseconds_t:l +++time_t:l +++u_char:h +++uid_t:j +++uint:j +++u_int:j +++u_int16_t:t +++u_int32_t:j +++u_int64_t:m +++u_int8_t:h +++ulong:m +++u_long:m +++u_quad_t:m +++useconds_t:j +++ushort:t +++u_short:t ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/dl-cache.h ++@@ -0,0 +1 @@ +++#include ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/dl-machine.h ++@@ -0,0 +1,119 @@ +++/* Machine-dependent ELF dynamic relocation inline functions. FreeBSD/amd64 version. +++ 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_next +++ +++#undef RTLD_START +++ +++/* Initial entry point code for the dynamic linker. +++ The C function `_dl_start' is the real entry point; +++ its return value is the user program's entry point. */ +++#define RTLD_START asm ("\n\ +++.text\n\ +++ .align 16\n\ +++.globl _start\n\ +++# we dont use it: .globl _dl_start_user\n\ +++_start:\n\ +++ # align stack.\n\ +++ andq $-16, %rsp\n\ +++ # save argument pointer.\n\ +++ movq %rdi, %r13\n\ +++ call _dl_start\n\ +++# we dont use it: _dl_start_user:\n\ +++ # Save the user entry point address in %r12.\n\ +++ movq %rax, %r12\n\ +++ # See if we were run as a command with the executable file\n\ +++ # name as an extra leading argument.\n\ +++ movl _dl_skip_args(%rip), %eax\n\ +++ # get the original argument count.\n\ +++ movq 0(%r13), %rdx\n\ +++ # Adjust the pointer to skip _dl_skip_args words.\n\ +++ leaq (%r13,%rax,8), %r13\n\ +++ # Subtract _dl_skip_args from argc.\n\ +++ subl %eax, %edx\n\ +++ # Put argc on adjusted place\n\ +++ movq %rdx, 0(%r13)\n\ +++ # Call _dl_init (struct link_map *main_map, int argc, char **argv, char **env)\n\ +++ # argc -> rsi\n\ +++ movq %rdx, %rsi\n\ +++ # _dl_loaded -> rdi\n\ +++ movq _rtld_local(%rip), %rdi\n\ +++ # env -> rcx\n\ +++ leaq 16(%r13,%rdx,8), %rcx\n\ +++ # argv -> rdx\n\ +++ leaq 8(%r13), %rdx\n\ +++ # Clear %rbp to mark outermost frame obviously even for constructors.\n\ +++ xorl %ebp, %ebp\n\ +++ # Call the function to run the initializers.\n\ +++ call _dl_init@PLT\n\ +++ # Pass our finalizer function to the user in %rdx, as per ELF ABI draft.\n\ +++ leaq _dl_fini(%rip), %rdx\n\ +++ # And make sure %rdi points to argc stored on the stack.\n\ +++ movq %r13, %rdi\n\ +++ # Pass finalizer function also in %rsi, as per C calling convention.\n\ +++ movq %rdx, %rsi\n\ +++ # Jump to the user's entry point.\n\ +++ jmp *%r12\n\ +++.previous\n\ +++"); +++ +++#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 +++ +++#ifndef _DL_MACHINE_KFREEBSD +++#define _DL_MACHINE_KFREEBSD +++ +++static inline void __attribute__ ((unused)) +++dl_platform_kfreebsd_x86_64_init (void) +++{ +++ /* This calls cpuid and and fills dl_x86_cpu_features */ +++ DL_PLATFORM_INIT; +++ +++ /* we don't have reasonable AT_PLATFORM from kernel +++ use cpuid to guess AT_HWCAP */ +++ GLRO(dl_hwcap) = GLRO(dl_x86_cpu_features).cpuid[COMMON_CPUID_INDEX_1].edx; +++ GLRO(dl_platform) = ELF_MACHINE_NAME; +++} +++ +++#undef DL_PLATFORM_INIT +++#define DL_PLATFORM_INIT dl_platform_kfreebsd_x86_64_init () +++ +++#endif ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/dl-procinfo.c ++@@ -0,0 +1 @@ +++#include ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/dl-procinfo.h ++@@ -0,0 +1,5 @@ +++#if IS_IN (ldconfig) +++# include +++#else +++# include +++#endif ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/exit-thread.h ++@@ -0,0 +1,49 @@ +++/* Call to terminate the current thread. GNU/kFreeBSD x86-64 version +++ Copyright (C) 2015 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 +++ . */ +++ +++#include +++ +++/* This causes the current thread to exit, without affecting other +++ threads in the process if there are any. If there are no other +++ threads left, then this has the effect of _exit (0). */ +++ +++static inline void __attribute__ ((noreturn, always_inline, unused)) +++__exit_thread (void) +++{ +++ /* Doing this in a loop is mostly just to satisfy the compiler that the +++ function really qualifies as noreturn. It also means that in some +++ pathological situation where the system call does not get made or does +++ not work, the thread will simply spin rather than running off the end +++ of the caller and doing unexpectedly strange things. */ +++ while (1) +++ { +++ asm volatile ( +++ "movq %%fs:0, %%rdi\n\t" +++ "addq %0, %%rdi\n\t" /* should be KTID, but they are at the same place anyway */ +++ "movl %1, %%eax\n\t" +++ "syscall\n\t" +++ /* It does return only for last thread of process */ +++ "movl %2, %%eax\n\t" +++ "xorl %%edi, %%edi\n\t" +++ "syscall\n\t" +++ : +++ : "i" (TID), "i" (SYS_ify(thr_exit)), "i" (SYS_ify(exit)) +++ : "memory", "cc", "cx", "dx", "r8", "r9", "r10", "r11"); +++ } +++} +++ ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/fbtl/Implies ++@@ -0,0 +1 @@ +++unix/bsd/bsd4.4/kfreebsd/x86/fbtl ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/fbtl/asm/prctl.h ++@@ -0,0 +1 @@ +++/* placeholder to linuxish sysdeps/x86_64/pt-machine.h happy */ ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/fbtl/cancellation.S ++@@ -0,0 +1,119 @@ +++/* Copyright (C) 2009, 2011 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 2009. +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public +++ License as published by the Free Software Foundation; either +++ version 2.1 of the License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General Public License 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 +++ . */ +++ +++#include +++#include +++#include +++#include "lowlevellock.h" +++ +++#if IS_IN (libpthread) +++# ifdef SHARED +++# define __pthread_unwind __GI___pthread_unwind +++# endif +++#else +++# ifndef SHARED +++ .weak __pthread_unwind +++# endif +++#endif +++ +++ +++/* It is crucial that the functions in this file don't modify registers +++ other than %rax and %r11. The syscall wrapper code depends on this +++ because it doesn't explicitly save the other registers which hold +++ relevant values. */ +++ .text +++ +++ .hidden __pthread_enable_asynccancel +++ENTRY(__pthread_enable_asynccancel) +++ movl %fs:CANCELHANDLING, %eax +++2: movl %eax, %r11d +++ orl $TCB_CANCELTYPE_BITMASK, %r11d +++ cmpl %eax, %r11d +++ je 1f +++ +++ lock +++ cmpxchgl %r11d, %fs:CANCELHANDLING +++ jnz 2b +++ +++ andl $(TCB_CANCELSTATE_BITMASK|TCB_CANCELTYPE_BITMASK|TCB_CANCELED_BITMASK|TCB_EXITING_BITMASK|TCB_CANCEL_RESTMASK|TCB_TERMINATED_BITMASK), %r11d +++ cmpl $(TCB_CANCELTYPE_BITMASK|TCB_CANCELED_BITMASK), %r11d +++ je 3f +++ +++1: ret +++ +++3: subq $8, %rsp +++ cfi_adjust_cfa_offset(8) +++ LP_OP(mov) $TCB_PTHREAD_CANCELED, %fs:RESULT +++ lock +++ orl $TCB_EXITING_BITMASK, %fs:CANCELHANDLING +++ mov %fs:CLEANUP_JMP_BUF, %RDI_LP +++#ifdef SHARED +++ call __pthread_unwind@PLT +++#else +++ call __pthread_unwind +++#endif +++ hlt +++END(__pthread_enable_asynccancel) +++ +++ +++ .hidden __pthread_disable_asynccancel +++ENTRY(__pthread_disable_asynccancel) +++ testl $TCB_CANCELTYPE_BITMASK, %edi +++ jnz 1f +++ +++ movl %fs:CANCELHANDLING, %eax +++2: movl %eax, %r11d +++ andl $~TCB_CANCELTYPE_BITMASK, %r11d +++ lock +++ cmpxchgl %r11d, %fs:CANCELHANDLING +++ jnz 2b +++ +++ movl %r11d, %eax +++3: andl $(TCB_CANCELING_BITMASK|TCB_CANCELED_BITMASK), %eax +++ cmpl $TCB_CANCELING_BITMASK, %eax +++ je 4f +++1: ret +++ +++# define UMTX_OP_WAIT_UINT_PRIVATE 15 +++# define LOAD_PRIVATE_FUTEX_WAIT(reg) \ +++ movl $UMTX_OP_WAIT_UINT_PRIVATE, reg +++ +++ /* Performance doesn't matter in this loop. We will +++ delay until the thread is canceled. And we will unlikely +++ enter the loop twice. */ +++ +++# warning check this: +++ /* +++ The C-code repeatedy does: +++ lll_futex_wait (&self->cancelhandling, newval, LLL_PRIVATE); +++ newval = THREAD_GETMEM (self, cancelhandling); +++ +++ but the original NPTL code does not fill rdx +++ with the old value ... +++ */ +++ +++4: mov %fs:0, %RDI_LP +++ movl $SYS__umtx_op, %eax +++ xorq %r8, %r8 +++ xorq %r10, %r10 +++ addq $CANCELHANDLING, %rdi +++ LOAD_PRIVATE_FUTEX_WAIT (%esi) +++ syscall +++ movl %fs:CANCELHANDLING, %eax +++ jmp 3b +++END(__pthread_disable_asynccancel) ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/fbtl/libc-cancellation.S ++@@ -0,0 +1,21 @@ +++/* Copyright (C) 2009 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 2009. +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public +++ License as published by the Free Software Foundation; either +++ version 2.1 of the License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General Public License 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 +++ . */ +++ +++#define __pthread_enable_asynccancel __libc_enable_asynccancel +++#define __pthread_disable_asynccancel __libc_disable_asynccancel +++#include "cancellation.S" ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/fbtl/librt-cancellation.S ++@@ -0,0 +1,21 @@ +++/* Copyright (C) 2009 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Ulrich Drepper , 2009. +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public +++ License as published by the Free Software Foundation; either +++ version 2.1 of the License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General Public License 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 +++ . */ +++ +++#define __pthread_enable_asynccancel __librt_enable_asynccancel +++#define __pthread_disable_asynccancel __librt_disable_asynccancel +++#include "cancellation.S" ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/fbtl/sysdep-cancel.h ++@@ -0,0 +1,111 @@ +++/* Copyright (C) 2002-2012 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Jakub Jelinek , 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, see +++ . */ +++ +++#include +++#include +++#ifndef __ASSEMBLER__ +++# include +++#endif +++ +++/* Syscalls with more than 6 arguments are not supported here. */ +++ +++#if IS_IN (libc) || IS_IN (libpthread) || IS_IN (librt) +++ +++/* The code to disable cancellation depends on the fact that the called +++ functions are special. They don't modify registers other than %rax +++ and %r11 if they return. Therefore we don't have to preserve other +++ registers around these calls. */ +++# undef PSEUDO +++# define PSEUDO(name, syscall_name, args) \ +++ .text; \ +++ ENTRY (name) \ +++ SINGLE_THREAD_P; \ +++ jne L(pseudo_cancel); \ +++ .type __##syscall_name##_nocancel,@function; \ +++ .globl __##syscall_name##_nocancel; \ +++ __##syscall_name##_nocancel: \ +++ DO_CALL (syscall_name, args); \ +++ jb SYSCALL_ERROR_LABEL; \ +++ ret; \ +++ .size __##syscall_name##_nocancel,.-__##syscall_name##_nocancel; \ +++ L(pseudo_cancel): \ +++ /* We always have to align the stack before calling a function. */ \ +++ subq $8, %rsp; cfi_adjust_cfa_offset (8); \ +++ CENABLE \ +++ /* The return value from CENABLE is argument for CDISABLE. */ \ +++ movq %rax, (%rsp); \ +++ DO_CALL (syscall_name, args); \ +++ popq %rdi; cfi_adjust_cfa_offset(-8); \ +++ pushfq; cfi_adjust_cfa_offset(8); \ +++ /* Save %rax since it's the error code from the syscall. */ \ +++ movq %rax, %rsi; \ +++ CDISABLE \ +++ popfq; cfi_adjust_cfa_offset(-8); \ +++ /* fetch the error code from the syscall. */ \ +++ movq %rsi, %rax; \ +++ jb SYSCALL_ERROR_LABEL; \ +++ L(pseudo_end): \ +++ +++# if IS_IN (libpthread) +++# define CENABLE call __pthread_enable_asynccancel; +++# define CDISABLE call __pthread_disable_asynccancel; +++# define __local_multiple_threads __pthread_multiple_threads +++# elif IS_IN (libc) +++# define CENABLE call __libc_enable_asynccancel; +++# define CDISABLE call __libc_disable_asynccancel; +++# define __local_multiple_threads __libc_multiple_threads +++# elif IS_IN (librt) +++# define CENABLE call __librt_enable_asynccancel; +++# define CDISABLE call __librt_disable_asynccancel; +++# else +++# error Unsupported library +++# endif +++ +++# if IS_IN (libpthread) || IS_IN (libc) +++# ifndef __ASSEMBLER__ +++extern int __local_multiple_threads attribute_hidden; +++# define SINGLE_THREAD_P \ +++ __builtin_expect (__local_multiple_threads == 0, 1) +++# else +++# define SINGLE_THREAD_P cmpl $0, __local_multiple_threads(%rip) +++# endif +++ +++# else +++ +++# ifndef __ASSEMBLER__ +++# define SINGLE_THREAD_P \ +++ __builtin_expect (THREAD_GETMEM (THREAD_SELF, \ +++ header.multiple_threads) == 0, 1) +++# else +++# define SINGLE_THREAD_P cmpl $0, %fs:MULTIPLE_THREADS_OFFSET +++# endif +++ +++# endif +++ +++#elif !defined __ASSEMBLER__ +++ +++# define SINGLE_THREAD_P (1) +++# define NO_CANCELLATION 1 +++ +++#endif +++ +++#ifndef __ASSEMBLER__ +++# define RTLD_SINGLE_THREAD_P \ +++ __builtin_expect (THREAD_GETMEM (THREAD_SELF, \ +++ header.multiple_threads) == 0, 1) +++#endif ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/fbtl/tls.h ++@@ -0,0 +1,73 @@ +++/* Definitions for thread-local data handling. fbtl/x86-64 version. +++ Copyright (C) 2002 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Modification for FreeBSD 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. */ +++ +++#ifndef _FREEBSD_TLS_H +++#define _FREEBSD_TLS_H +++ +++#include +++ +++#ifndef __ASSEMBLER__ +++ +++#include +++#include +++ +++#if 0 +++/* in Linux one; */ +++/* Magic for libthread_db to know how to do THREAD_SELF. */ +++# define DB_THREAD_SELF_INCLUDE /* For the FS constant. */ +++# define DB_THREAD_SELF CONST_THREAD_AREA (64, FS) +++#else +++/* # warning proper FS constant needed */ +++# undef DB_THREAD_SELF_INCLUDE +++# undef DB_THREAD_SELF +++# define DB_THREAD_SELF CONST_THREAD_AREA (64, 25) +++#endif +++ +++/* 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. */ +++ +++# undef TLS_INIT_TP +++# define TLS_INIT_TP(descr) \ +++ ({ \ +++ void *_descr = (descr); \ +++ tcbhead_t *head = _descr; \ +++ long int _result; \ +++ \ +++ head->tcb = _descr; \ +++ /* For now the thread descriptor is at the same address. */ \ +++ head->self = _descr; \ +++ \ +++ asm volatile ("syscall" \ +++ : "=a" (_result) \ +++ : "0" ((unsigned long int) SYS_sysarch), \ +++ "D" ((unsigned long int) AMD64_SET_FSBASE), \ +++ "S" (&_descr) \ +++ : "memory", "cc", "cx", "dx", "r8", "r9", "r10", "r11"); \ +++ \ +++ _result ? "cannot set %fs base address for thread-local storage" : 0; \ +++ }) +++ +++/* in fact this is OS-specific, but we do not have better header for it */ +++#define NEED_STACK_SIZE_FOR_PTH_CREATE 1 +++ +++#endif /* __ASSEMBLER__ */ +++ +++#endif /* tls.h */ ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/fts.c ++@@ -0,0 +1,3 @@ +++/* On GNU/kFreeBSD x86_64, ino_t and ino64_t have different sizes, so +++ fts and fts64 have to be different functions. */ +++#include ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/fts64.c ++@@ -0,0 +1,3 @@ +++/* On GNU/kFreeBSD x86_64, ino_t and ino64_t have different sizes, so +++ fts and fts64 have to be different functions. */ +++#include ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/get_clockfreq.c ++@@ -0,0 +1 @@ +++#include "../i386/get_clockfreq.c" ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/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 +++ +++.text +++ENTRY(__getcontext) +++ clc +++ movq 0(%rsp), %rsi /* save the return PC value */ +++ +++ DO_CALL (getcontext, 1) +++ jb SYSCALL_ERROR_LABEL +++ +++ addq $8, %rsp /* remove stale return address */ +++ jmp *%rsi +++ +++L(pseudo_end): +++ ret +++ +++PSEUDO_END(__getcontext) +++ +++weak_alias(__getcontext, getcontext) ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/ioperm.c ++@@ -0,0 +1,32 @@ +++/* 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 +++#include +++ +++int +++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); +++} ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/iopl.c ++@@ -0,0 +1 @@ +++#include "../i386/iopl.c" ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/ld.abilist ++@@ -0,0 +1,10 @@ +++GLIBC_2.3 GLIBC_2.3 A +++GLIBC_2.3 __libc_stack_end D 0x8 +++GLIBC_2.3 __tls_get_addr F +++GLIBC_2.3 _dl_mcount F +++GLIBC_2.3 _r_debug D 0x28 +++GLIBC_2.3 calloc F +++GLIBC_2.3 free F +++GLIBC_2.3 malloc F +++GLIBC_2.3 realloc F +++GLIBC_2.4 GLIBC_2.4 A ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/ldconfig.h ++@@ -0,0 +1,39 @@ +++/* 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 +++ +++#define SYSDEP_KNOWN_INTERPRETER_NAMES \ +++ { "/lib/ld.so.1", FLAG_ELF_LIBC6 }, \ +++ { "/lib/ld-kfreebsd-x86-64.so.1", FLAG_ELF_LIBC6 }, \ +++ { "/lib64/ld-kfreebsd-x86-64.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/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/ldd-rewrite.sed ++@@ -0,0 +1,3 @@ +++/LD_TRACE_LOADED_OBJECTS=1/a\ +++add_env="$add_env LD_LIBRARY_VERSION=\\$verify_out" +++s_^\(RTLDLIST=\)\(.*lib\)\(\|64\)\(/[^/]*\)\(-kfreebsd-x86-64\)\(\.so\.[0-9.]*\)[ ]*$_\1"\2\4\6 \2\4\5\6"_ ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/libBrokenLocale.abilist ++@@ -0,0 +1,2 @@ +++GLIBC_2.3 GLIBC_2.3 A +++GLIBC_2.3 __ctype_get_mb_cur_max F ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/libanl.abilist ++@@ -0,0 +1,5 @@ +++GLIBC_2.3 GLIBC_2.3 A +++GLIBC_2.3 gai_cancel F +++GLIBC_2.3 gai_error F +++GLIBC_2.3 gai_suspend F +++GLIBC_2.3 getaddrinfo_a F ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/libc.abilist ++@@ -0,0 +1,2155 @@ +++GLIBC_2.10 GLIBC_2.10 A +++GLIBC_2.10 __cxa_at_quick_exit F +++GLIBC_2.10 __posix_getopt F +++GLIBC_2.10 accept4 F +++GLIBC_2.10 devname F +++GLIBC_2.10 devname_r F +++GLIBC_2.10 endsgent F +++GLIBC_2.10 fgetsgent F +++GLIBC_2.10 fgetsgent_r F +++GLIBC_2.10 getsgent F +++GLIBC_2.10 getsgent_r F +++GLIBC_2.10 getsgnam F +++GLIBC_2.10 getsgnam_r F +++GLIBC_2.10 ioperm F +++GLIBC_2.10 kenv F +++GLIBC_2.10 malloc_info F +++GLIBC_2.10 preadv F +++GLIBC_2.10 preadv64 F +++GLIBC_2.10 psiginfo F +++GLIBC_2.10 putsgent F +++GLIBC_2.10 pwritev F +++GLIBC_2.10 pwritev64 F +++GLIBC_2.10 quick_exit F +++GLIBC_2.10 register_printf_modifier F +++GLIBC_2.10 register_printf_specifier F +++GLIBC_2.10 register_printf_type F +++GLIBC_2.10 setsgent F +++GLIBC_2.10 sgetsgent F +++GLIBC_2.10 sgetsgent_r F +++GLIBC_2.10 sysctlnametomib F +++GLIBC_2.11 GLIBC_2.11 A +++GLIBC_2.11 __longjmp_chk F +++GLIBC_2.11 _sys_errlist D 0x2f0 +++GLIBC_2.11 _sys_nerr D 0x4 +++GLIBC_2.11 execvpe F +++GLIBC_2.11 lchflags F +++GLIBC_2.11 mkostemps F +++GLIBC_2.11 mkostemps64 F +++GLIBC_2.11 mkstemps F +++GLIBC_2.11 mkstemps64 F +++GLIBC_2.11 sys_errlist D 0x2f0 +++GLIBC_2.11 sys_nerr D 0x4 +++GLIBC_2.13 GLIBC_2.13 A +++GLIBC_2.13 __fentry__ F +++GLIBC_2.13 jail_attach F +++GLIBC_2.13 jail_get F +++GLIBC_2.13 jail_remove F +++GLIBC_2.13 jail_set F +++GLIBC_2.14 GLIBC_2.14 A +++GLIBC_2.14 memcpy F +++GLIBC_2.14 syncfs F +++GLIBC_2.15 GLIBC_2.15 A +++GLIBC_2.15 __fdelt_chk F +++GLIBC_2.15 __fdelt_warn F +++GLIBC_2.15 posix_spawn F +++GLIBC_2.15 posix_spawnp F +++GLIBC_2.15 scandirat F +++GLIBC_2.15 scandirat64 F +++GLIBC_2.16 GLIBC_2.16 A +++GLIBC_2.16 __getauxval F +++GLIBC_2.16 __poll_chk F +++GLIBC_2.16 __ppoll_chk F +++GLIBC_2.16 aligned_alloc F +++GLIBC_2.16 c16rtomb F +++GLIBC_2.16 c32rtomb F +++GLIBC_2.16 getauxval F +++GLIBC_2.16 mbrtoc16 F +++GLIBC_2.16 mbrtoc32 F +++GLIBC_2.16 timespec_get F +++GLIBC_2.17 GLIBC_2.17 A +++GLIBC_2.17 clock_getcpuclockid F +++GLIBC_2.17 clock_getres F +++GLIBC_2.17 clock_gettime F +++GLIBC_2.17 clock_nanosleep F +++GLIBC_2.17 clock_settime F +++GLIBC_2.17 recvmmsg F +++GLIBC_2.17 secure_getenv F +++GLIBC_2.17 sendmmsg F +++GLIBC_2.18 GLIBC_2.18 A +++GLIBC_2.18 __cxa_thread_atexit_impl F +++GLIBC_2.18 _sys_errlist D 0x308 +++GLIBC_2.18 _sys_nerr D 0x4 +++GLIBC_2.18 msgctl F +++GLIBC_2.18 semctl F +++GLIBC_2.18 shmctl F +++GLIBC_2.18 sys_errlist D 0x308 +++GLIBC_2.18 sys_nerr D 0x4 +++GLIBC_2.18 waitid F +++GLIBC_2.21 GLIBC_2.21 A +++GLIBC_2.21 __statfs F +++GLIBC_2.22 GLIBC_2.22 A +++GLIBC_2.22 fmemopen F +++GLIBC_2.23 GLIBC_2.23 A +++GLIBC_2.23 fts64_children F +++GLIBC_2.23 fts64_close F +++GLIBC_2.23 fts64_open F +++GLIBC_2.23 fts64_read F +++GLIBC_2.23 fts64_set F +++GLIBC_2.24 GLIBC_2.24 A +++GLIBC_2.24 quick_exit F +++GLIBC_2.25 GLIBC_2.25 A +++GLIBC_2.25 __explicit_bzero_chk F +++GLIBC_2.25 explicit_bzero F +++GLIBC_2.25 getentropy F +++GLIBC_2.25 getrandom F +++GLIBC_2.25 gnu_dev_major F +++GLIBC_2.25 gnu_dev_makedev F +++GLIBC_2.25 gnu_dev_minor F +++GLIBC_2.25 strfromd F +++GLIBC_2.25 strfromf F +++GLIBC_2.25 strfroml F +++GLIBC_2.3 GLIBC_2.3 A +++GLIBC_2.3 _Exit F +++GLIBC_2.3 _IO_2_1_stderr_ D 0xe0 +++GLIBC_2.3 _IO_2_1_stdin_ D 0xe0 +++GLIBC_2.3 _IO_2_1_stdout_ D 0xe0 +++GLIBC_2.3 _IO_adjust_column F +++GLIBC_2.3 _IO_adjust_wcolumn F +++GLIBC_2.3 _IO_default_doallocate F +++GLIBC_2.3 _IO_default_finish F +++GLIBC_2.3 _IO_default_pbackfail F +++GLIBC_2.3 _IO_default_uflow F +++GLIBC_2.3 _IO_default_xsgetn F +++GLIBC_2.3 _IO_default_xsputn F +++GLIBC_2.3 _IO_do_write F +++GLIBC_2.3 _IO_doallocbuf F +++GLIBC_2.3 _IO_fclose F +++GLIBC_2.3 _IO_fdopen F +++GLIBC_2.3 _IO_feof F +++GLIBC_2.3 _IO_ferror F +++GLIBC_2.3 _IO_fflush F +++GLIBC_2.3 _IO_fgetpos F +++GLIBC_2.3 _IO_fgetpos64 F +++GLIBC_2.3 _IO_fgets F +++GLIBC_2.3 _IO_file_attach F +++GLIBC_2.3 _IO_file_close F +++GLIBC_2.3 _IO_file_close_it F +++GLIBC_2.3 _IO_file_doallocate F +++GLIBC_2.3 _IO_file_finish F +++GLIBC_2.3 _IO_file_fopen F +++GLIBC_2.3 _IO_file_init F +++GLIBC_2.3 _IO_file_jumps D 0xa8 +++GLIBC_2.3 _IO_file_open F +++GLIBC_2.3 _IO_file_overflow F +++GLIBC_2.3 _IO_file_read F +++GLIBC_2.3 _IO_file_seek F +++GLIBC_2.3 _IO_file_seekoff F +++GLIBC_2.3 _IO_file_setbuf F +++GLIBC_2.3 _IO_file_stat F +++GLIBC_2.3 _IO_file_sync F +++GLIBC_2.3 _IO_file_underflow F +++GLIBC_2.3 _IO_file_write F +++GLIBC_2.3 _IO_file_xsputn F +++GLIBC_2.3 _IO_flockfile F +++GLIBC_2.3 _IO_flush_all F +++GLIBC_2.3 _IO_flush_all_linebuffered F +++GLIBC_2.3 _IO_fopen F +++GLIBC_2.3 _IO_fprintf F +++GLIBC_2.3 _IO_fputs F +++GLIBC_2.3 _IO_fread F +++GLIBC_2.3 _IO_free_backup_area F +++GLIBC_2.3 _IO_free_wbackup_area F +++GLIBC_2.3 _IO_fsetpos F +++GLIBC_2.3 _IO_fsetpos64 F +++GLIBC_2.3 _IO_ftell F +++GLIBC_2.3 _IO_ftrylockfile F +++GLIBC_2.3 _IO_funlockfile F +++GLIBC_2.3 _IO_fwrite F +++GLIBC_2.3 _IO_getc F +++GLIBC_2.3 _IO_getline F +++GLIBC_2.3 _IO_getline_info F +++GLIBC_2.3 _IO_gets F +++GLIBC_2.3 _IO_init F +++GLIBC_2.3 _IO_init_marker F +++GLIBC_2.3 _IO_init_wmarker F +++GLIBC_2.3 _IO_iter_begin F +++GLIBC_2.3 _IO_iter_end F +++GLIBC_2.3 _IO_iter_file F +++GLIBC_2.3 _IO_iter_next F +++GLIBC_2.3 _IO_least_wmarker F +++GLIBC_2.3 _IO_link_in F +++GLIBC_2.3 _IO_list_all D 0x8 +++GLIBC_2.3 _IO_list_lock F +++GLIBC_2.3 _IO_list_resetlock F +++GLIBC_2.3 _IO_list_unlock F +++GLIBC_2.3 _IO_marker_delta F +++GLIBC_2.3 _IO_marker_difference F +++GLIBC_2.3 _IO_padn F +++GLIBC_2.3 _IO_peekc_locked F +++GLIBC_2.3 _IO_popen F +++GLIBC_2.3 _IO_printf F +++GLIBC_2.3 _IO_proc_close F +++GLIBC_2.3 _IO_proc_open F +++GLIBC_2.3 _IO_putc F +++GLIBC_2.3 _IO_puts F +++GLIBC_2.3 _IO_remove_marker F +++GLIBC_2.3 _IO_seekmark F +++GLIBC_2.3 _IO_seekoff F +++GLIBC_2.3 _IO_seekpos F +++GLIBC_2.3 _IO_seekwmark F +++GLIBC_2.3 _IO_setb F +++GLIBC_2.3 _IO_setbuffer F +++GLIBC_2.3 _IO_setvbuf F +++GLIBC_2.3 _IO_sgetn F +++GLIBC_2.3 _IO_sprintf F +++GLIBC_2.3 _IO_sputbackc F +++GLIBC_2.3 _IO_sputbackwc F +++GLIBC_2.3 _IO_sscanf F +++GLIBC_2.3 _IO_str_init_readonly F +++GLIBC_2.3 _IO_str_init_static F +++GLIBC_2.3 _IO_str_overflow F +++GLIBC_2.3 _IO_str_pbackfail F +++GLIBC_2.3 _IO_str_seekoff F +++GLIBC_2.3 _IO_str_underflow F +++GLIBC_2.3 _IO_sungetc F +++GLIBC_2.3 _IO_sungetwc F +++GLIBC_2.3 _IO_switch_to_get_mode F +++GLIBC_2.3 _IO_switch_to_main_wget_area F +++GLIBC_2.3 _IO_switch_to_wbackup_area F +++GLIBC_2.3 _IO_switch_to_wget_mode F +++GLIBC_2.3 _IO_un_link F +++GLIBC_2.3 _IO_ungetc F +++GLIBC_2.3 _IO_unsave_markers F +++GLIBC_2.3 _IO_unsave_wmarkers F +++GLIBC_2.3 _IO_vfprintf F +++GLIBC_2.3 _IO_vfscanf F +++GLIBC_2.3 _IO_vsprintf F +++GLIBC_2.3 _IO_wdefault_doallocate F +++GLIBC_2.3 _IO_wdefault_finish F +++GLIBC_2.3 _IO_wdefault_pbackfail F +++GLIBC_2.3 _IO_wdefault_uflow F +++GLIBC_2.3 _IO_wdefault_xsgetn F +++GLIBC_2.3 _IO_wdefault_xsputn F +++GLIBC_2.3 _IO_wdo_write F +++GLIBC_2.3 _IO_wdoallocbuf F +++GLIBC_2.3 _IO_wfile_jumps D 0xa8 +++GLIBC_2.3 _IO_wfile_overflow F +++GLIBC_2.3 _IO_wfile_seekoff F +++GLIBC_2.3 _IO_wfile_sync F +++GLIBC_2.3 _IO_wfile_underflow F +++GLIBC_2.3 _IO_wfile_xsputn F +++GLIBC_2.3 _IO_wmarker_delta F +++GLIBC_2.3 _IO_wsetb F +++GLIBC_2.3 __acl_aclcheck_fd F +++GLIBC_2.3 __acl_aclcheck_file F +++GLIBC_2.3 __acl_delete_fd F +++GLIBC_2.3 __acl_delete_file F +++GLIBC_2.3 __acl_get_fd F +++GLIBC_2.3 __acl_get_file F +++GLIBC_2.3 __acl_set_fd F +++GLIBC_2.3 __acl_set_file F +++GLIBC_2.3 __after_morecore_hook D 0x8 +++GLIBC_2.3 __argz_count F +++GLIBC_2.3 __argz_next F +++GLIBC_2.3 __argz_stringify F +++GLIBC_2.3 __asprintf F +++GLIBC_2.3 __assert F +++GLIBC_2.3 __assert_fail F +++GLIBC_2.3 __assert_perror_fail F +++GLIBC_2.3 __backtrace F +++GLIBC_2.3 __backtrace_symbols F +++GLIBC_2.3 __backtrace_symbols_fd F +++GLIBC_2.3 __bsd_getpgrp F +++GLIBC_2.3 __bzero F +++GLIBC_2.3 __check_rhosts_file D 0x4 +++GLIBC_2.3 __close F +++GLIBC_2.3 __cmsg_nxthdr F +++GLIBC_2.3 __connect F +++GLIBC_2.3 __ctype_b_loc F +++GLIBC_2.3 __ctype_get_mb_cur_max F +++GLIBC_2.3 __ctype_tolower_loc F +++GLIBC_2.3 __ctype_toupper_loc F +++GLIBC_2.3 __curbrk D 0x8 +++GLIBC_2.3 __cxa_atexit F +++GLIBC_2.3 __cxa_finalize F +++GLIBC_2.3 __cyg_profile_func_enter F +++GLIBC_2.3 __cyg_profile_func_exit F +++GLIBC_2.3 __daylight D 0x4 +++GLIBC_2.3 __dcgettext F +++GLIBC_2.3 __default_morecore F +++GLIBC_2.3 __dgettext F +++GLIBC_2.3 __dup2 F +++GLIBC_2.3 __duplocale F +++GLIBC_2.3 __environ D 0x8 +++GLIBC_2.3 __errno_location F +++GLIBC_2.3 __fbufsize F +++GLIBC_2.3 __fcntl F +++GLIBC_2.3 __ffs F +++GLIBC_2.3 __finite F +++GLIBC_2.3 __finitef F +++GLIBC_2.3 __finitel F +++GLIBC_2.3 __flbf F +++GLIBC_2.3 __fork F +++GLIBC_2.3 __fpending F +++GLIBC_2.3 __fpu_control D 0x2 +++GLIBC_2.3 __fpurge F +++GLIBC_2.3 __freadable F +++GLIBC_2.3 __freading F +++GLIBC_2.3 __free_hook D 0x8 +++GLIBC_2.3 __freelocale F +++GLIBC_2.3 __fsetlocking F +++GLIBC_2.3 __fwritable F +++GLIBC_2.3 __fwriting F +++GLIBC_2.3 __fxstat F +++GLIBC_2.3 __fxstat64 F +++GLIBC_2.3 __getdelim F +++GLIBC_2.3 __getpagesize F +++GLIBC_2.3 __getpgid F +++GLIBC_2.3 __getpid F +++GLIBC_2.3 __gettimeofday F +++GLIBC_2.3 __gmtime_r F +++GLIBC_2.3 __h_errno_location F +++GLIBC_2.3 __isalnum_l F +++GLIBC_2.3 __isalpha_l F +++GLIBC_2.3 __isascii_l F +++GLIBC_2.3 __isblank_l F +++GLIBC_2.3 __iscntrl_l F +++GLIBC_2.3 __isctype F +++GLIBC_2.3 __isdigit_l F +++GLIBC_2.3 __isgraph_l F +++GLIBC_2.3 __isinf F +++GLIBC_2.3 __isinff F +++GLIBC_2.3 __isinfl F +++GLIBC_2.3 __islower_l F +++GLIBC_2.3 __isnan F +++GLIBC_2.3 __isnanf F +++GLIBC_2.3 __isnanl F +++GLIBC_2.3 __isprint_l F +++GLIBC_2.3 __ispunct_l F +++GLIBC_2.3 __isspace_l F +++GLIBC_2.3 __isupper_l F +++GLIBC_2.3 __iswalnum_l F +++GLIBC_2.3 __iswalpha_l F +++GLIBC_2.3 __iswblank_l F +++GLIBC_2.3 __iswcntrl_l F +++GLIBC_2.3 __iswctype F +++GLIBC_2.3 __iswctype_l F +++GLIBC_2.3 __iswdigit_l F +++GLIBC_2.3 __iswgraph_l F +++GLIBC_2.3 __iswlower_l F +++GLIBC_2.3 __iswprint_l F +++GLIBC_2.3 __iswpunct_l F +++GLIBC_2.3 __iswspace_l F +++GLIBC_2.3 __iswupper_l F +++GLIBC_2.3 __iswxdigit_l F +++GLIBC_2.3 __isxdigit_l F +++GLIBC_2.3 __ivaliduser F +++GLIBC_2.3 __key_decryptsession_pk_LOCAL D 0x8 +++GLIBC_2.3 __key_encryptsession_pk_LOCAL D 0x8 +++GLIBC_2.3 __key_gendes_LOCAL D 0x8 +++GLIBC_2.3 __libc_allocate_rtsig F +++GLIBC_2.3 __libc_calloc F +++GLIBC_2.3 __libc_current_sigrtmax F +++GLIBC_2.3 __libc_current_sigrtmin F +++GLIBC_2.3 __libc_free F +++GLIBC_2.3 __libc_freeres F +++GLIBC_2.3 __libc_init_first F +++GLIBC_2.3 __libc_mallinfo F +++GLIBC_2.3 __libc_malloc F +++GLIBC_2.3 __libc_mallopt F +++GLIBC_2.3 __libc_memalign F +++GLIBC_2.3 __libc_pvalloc F +++GLIBC_2.3 __libc_realloc F +++GLIBC_2.3 __libc_start_main F +++GLIBC_2.3 __libc_valloc F +++GLIBC_2.3 __lseek F +++GLIBC_2.3 __lxstat F +++GLIBC_2.3 __lxstat64 F +++GLIBC_2.3 __malloc_hook D 0x8 +++GLIBC_2.3 __malloc_initialize_hook D 0x8 +++GLIBC_2.3 __mbrlen F +++GLIBC_2.3 __mbrtowc F +++GLIBC_2.3 __memalign_hook D 0x8 +++GLIBC_2.3 __mempcpy F +++GLIBC_2.3 __mempcpy_small F +++GLIBC_2.3 __monstartup F +++GLIBC_2.3 __morecore D 0x8 +++GLIBC_2.3 __nanosleep F +++GLIBC_2.3 __newlocale F +++GLIBC_2.3 __nl_langinfo_l F +++GLIBC_2.3 __nss_configure_lookup F +++GLIBC_2.3 __nss_database_lookup F +++GLIBC_2.3 __nss_group_lookup F +++GLIBC_2.3 __nss_hostname_digits_dots F +++GLIBC_2.3 __nss_hosts_lookup F +++GLIBC_2.3 __nss_next F +++GLIBC_2.3 __nss_passwd_lookup F +++GLIBC_2.3 __open F +++GLIBC_2.3 __overflow F +++GLIBC_2.3 __pipe F +++GLIBC_2.3 __poll F +++GLIBC_2.3 __pread64 F +++GLIBC_2.3 __printf_fp F +++GLIBC_2.3 __profile_frequency F +++GLIBC_2.3 __progname D 0x8 +++GLIBC_2.3 __progname_full D 0x8 +++GLIBC_2.3 __pwrite64 F +++GLIBC_2.3 __rawmemchr F +++GLIBC_2.3 __rcmd_errstr D 0x8 +++GLIBC_2.3 __read F +++GLIBC_2.3 __realloc_hook D 0x8 +++GLIBC_2.3 __res_init F +++GLIBC_2.3 __res_nclose F +++GLIBC_2.3 __res_ninit F +++GLIBC_2.3 __res_randomid F +++GLIBC_2.3 __res_state F +++GLIBC_2.3 __rpc_thread_createerr F +++GLIBC_2.3 __rpc_thread_svc_fdset F +++GLIBC_2.3 __rpc_thread_svc_max_pollfd F +++GLIBC_2.3 __rpc_thread_svc_pollfd F +++GLIBC_2.3 __sbrk F +++GLIBC_2.3 __sched_get_priority_max F +++GLIBC_2.3 __sched_get_priority_min F +++GLIBC_2.3 __sched_getparam F +++GLIBC_2.3 __sched_getscheduler F +++GLIBC_2.3 __sched_setscheduler F +++GLIBC_2.3 __sched_yield F +++GLIBC_2.3 __secure_getenv F +++GLIBC_2.3 __select F +++GLIBC_2.3 __send F +++GLIBC_2.3 __setpgid F +++GLIBC_2.3 __sigaction F +++GLIBC_2.3 __sigaddset F +++GLIBC_2.3 __sigdelset F +++GLIBC_2.3 __sigismember F +++GLIBC_2.3 __signbit F +++GLIBC_2.3 __signbitf F +++GLIBC_2.3 __signbitl F +++GLIBC_2.3 __sigpause F +++GLIBC_2.3 __sigsetjmp F +++GLIBC_2.3 __sigsuspend F +++GLIBC_2.3 __stpcpy F +++GLIBC_2.3 __stpcpy_small F +++GLIBC_2.3 __stpncpy F +++GLIBC_2.3 __strcasecmp F +++GLIBC_2.3 __strcasecmp_l F +++GLIBC_2.3 __strcasestr F +++GLIBC_2.3 __strcoll_l F +++GLIBC_2.3 __strcpy_small F +++GLIBC_2.3 __strcspn_c1 F +++GLIBC_2.3 __strcspn_c2 F +++GLIBC_2.3 __strcspn_c3 F +++GLIBC_2.3 __strdup F +++GLIBC_2.3 __strerror_r F +++GLIBC_2.3 __strfmon_l F +++GLIBC_2.3 __strftime_l F +++GLIBC_2.3 __strncasecmp_l F +++GLIBC_2.3 __strndup F +++GLIBC_2.3 __strpbrk_c2 F +++GLIBC_2.3 __strpbrk_c3 F +++GLIBC_2.3 __strsep_1c F +++GLIBC_2.3 __strsep_2c F +++GLIBC_2.3 __strsep_3c F +++GLIBC_2.3 __strsep_g F +++GLIBC_2.3 __strspn_c1 F +++GLIBC_2.3 __strspn_c2 F +++GLIBC_2.3 __strspn_c3 F +++GLIBC_2.3 __strtod_internal F +++GLIBC_2.3 __strtod_l F +++GLIBC_2.3 __strtof_internal F +++GLIBC_2.3 __strtof_l F +++GLIBC_2.3 __strtok_r F +++GLIBC_2.3 __strtok_r_1c F +++GLIBC_2.3 __strtol_internal F +++GLIBC_2.3 __strtol_l F +++GLIBC_2.3 __strtold_internal F +++GLIBC_2.3 __strtold_l F +++GLIBC_2.3 __strtoll_internal F +++GLIBC_2.3 __strtoll_l F +++GLIBC_2.3 __strtoul_internal F +++GLIBC_2.3 __strtoul_l F +++GLIBC_2.3 __strtoull_internal F +++GLIBC_2.3 __strtoull_l F +++GLIBC_2.3 __strverscmp F +++GLIBC_2.3 __strxfrm_l F +++GLIBC_2.3 __syscall_aio_cancel F +++GLIBC_2.3 __syscall_aio_error F +++GLIBC_2.3 __syscall_aio_read F +++GLIBC_2.3 __syscall_aio_return F +++GLIBC_2.3 __syscall_aio_suspend F +++GLIBC_2.3 __syscall_aio_waitcomplete F +++GLIBC_2.3 __syscall_aio_write F +++GLIBC_2.3 __syscall_lio_listio F +++GLIBC_2.3 __syscall_obreak F +++GLIBC_2.3 __syscall_yield F +++GLIBC_2.3 __sysconf F +++GLIBC_2.3 __sysctl F +++GLIBC_2.3 __sysv_signal F +++GLIBC_2.3 __timezone D 0x8 +++GLIBC_2.3 __toascii_l F +++GLIBC_2.3 __tolower_l F +++GLIBC_2.3 __toupper_l F +++GLIBC_2.3 __towctrans F +++GLIBC_2.3 __towctrans_l F +++GLIBC_2.3 __towlower_l F +++GLIBC_2.3 __towupper_l F +++GLIBC_2.3 __tzname D 0x10 +++GLIBC_2.3 __uflow F +++GLIBC_2.3 __underflow F +++GLIBC_2.3 __uselocale F +++GLIBC_2.3 __vfork F +++GLIBC_2.3 __vfscanf F +++GLIBC_2.3 __vsnprintf F +++GLIBC_2.3 __vsscanf F +++GLIBC_2.3 __wait F +++GLIBC_2.3 __waitpid F +++GLIBC_2.3 __wcscasecmp_l F +++GLIBC_2.3 __wcscoll_l F +++GLIBC_2.3 __wcsftime_l F +++GLIBC_2.3 __wcsncasecmp_l F +++GLIBC_2.3 __wcstod_internal F +++GLIBC_2.3 __wcstod_l F +++GLIBC_2.3 __wcstof_internal F +++GLIBC_2.3 __wcstof_l F +++GLIBC_2.3 __wcstol_internal F +++GLIBC_2.3 __wcstol_l F +++GLIBC_2.3 __wcstold_internal F +++GLIBC_2.3 __wcstold_l F +++GLIBC_2.3 __wcstoll_internal F +++GLIBC_2.3 __wcstoll_l F +++GLIBC_2.3 __wcstoul_internal F +++GLIBC_2.3 __wcstoul_l F +++GLIBC_2.3 __wcstoull_internal F +++GLIBC_2.3 __wcstoull_l F +++GLIBC_2.3 __wcsxfrm_l F +++GLIBC_2.3 __wctrans_l F +++GLIBC_2.3 __wctype_l F +++GLIBC_2.3 __woverflow F +++GLIBC_2.3 __write F +++GLIBC_2.3 __wuflow F +++GLIBC_2.3 __wunderflow F +++GLIBC_2.3 __xmknod F +++GLIBC_2.3 __xpg_basename F +++GLIBC_2.3 __xpg_sigpause F +++GLIBC_2.3 __xstat F +++GLIBC_2.3 __xstat64 F +++GLIBC_2.3 _authenticate F +++GLIBC_2.3 _dl_mcount_wrapper F +++GLIBC_2.3 _dl_mcount_wrapper_check F +++GLIBC_2.3 _environ D 0x8 +++GLIBC_2.3 _exit F +++GLIBC_2.3 _flushlbf F +++GLIBC_2.3 _libc_intl_domainname D 0x5 +++GLIBC_2.3 _longjmp F +++GLIBC_2.3 _mcleanup F +++GLIBC_2.3 _mcount F +++GLIBC_2.3 _nl_default_dirname D 0x12 +++GLIBC_2.3 _nl_domain_bindings D 0x8 +++GLIBC_2.3 _nl_msg_cat_cntr D 0x4 +++GLIBC_2.3 _null_auth D 0x18 +++GLIBC_2.3 _obstack D 0x8 +++GLIBC_2.3 _obstack_allocated_p F +++GLIBC_2.3 _obstack_begin F +++GLIBC_2.3 _obstack_begin_1 F +++GLIBC_2.3 _obstack_free F +++GLIBC_2.3 _obstack_memory_used F +++GLIBC_2.3 _obstack_newchunk F +++GLIBC_2.3 _res D 0x238 +++GLIBC_2.3 _res_hconf D 0x48 +++GLIBC_2.3 _rpc_dtablesize F +++GLIBC_2.3 _seterr_reply F +++GLIBC_2.3 _setjmp F +++GLIBC_2.3 _sys_errlist D 0x2b8 +++GLIBC_2.3 _sys_nerr D 0x4 +++GLIBC_2.3 _sys_siglist D 0x408 +++GLIBC_2.3 _tolower F +++GLIBC_2.3 _toupper F +++GLIBC_2.3 a64l F +++GLIBC_2.3 abort F +++GLIBC_2.3 abs F +++GLIBC_2.3 accept F +++GLIBC_2.3 access F +++GLIBC_2.3 acct F +++GLIBC_2.3 addmntent F +++GLIBC_2.3 addseverity F +++GLIBC_2.3 adjtime F +++GLIBC_2.3 advance F +++GLIBC_2.3 alarm F +++GLIBC_2.3 alphasort F +++GLIBC_2.3 alphasort64 F +++GLIBC_2.3 argp_err_exit_status D 0x4 +++GLIBC_2.3 argp_error F +++GLIBC_2.3 argp_failure F +++GLIBC_2.3 argp_help F +++GLIBC_2.3 argp_parse F +++GLIBC_2.3 argp_program_bug_address D 0x8 +++GLIBC_2.3 argp_program_version D 0x8 +++GLIBC_2.3 argp_program_version_hook D 0x8 +++GLIBC_2.3 argp_state_help F +++GLIBC_2.3 argp_usage F +++GLIBC_2.3 argz_add F +++GLIBC_2.3 argz_add_sep F +++GLIBC_2.3 argz_append F +++GLIBC_2.3 argz_count F +++GLIBC_2.3 argz_create F +++GLIBC_2.3 argz_create_sep F +++GLIBC_2.3 argz_delete F +++GLIBC_2.3 argz_extract F +++GLIBC_2.3 argz_insert F +++GLIBC_2.3 argz_next F +++GLIBC_2.3 argz_replace F +++GLIBC_2.3 argz_stringify F +++GLIBC_2.3 asctime F +++GLIBC_2.3 asctime_r F +++GLIBC_2.3 asprintf F +++GLIBC_2.3 atof F +++GLIBC_2.3 atoi F +++GLIBC_2.3 atol F +++GLIBC_2.3 atoll F +++GLIBC_2.3 authdes_create F +++GLIBC_2.3 authdes_getucred F +++GLIBC_2.3 authdes_pk_create F +++GLIBC_2.3 authnone_create F +++GLIBC_2.3 authunix_create F +++GLIBC_2.3 authunix_create_default F +++GLIBC_2.3 backtrace F +++GLIBC_2.3 backtrace_symbols F +++GLIBC_2.3 backtrace_symbols_fd F +++GLIBC_2.3 basename F +++GLIBC_2.3 bcmp F +++GLIBC_2.3 bcopy F +++GLIBC_2.3 bind F +++GLIBC_2.3 bind_textdomain_codeset F +++GLIBC_2.3 bindresvport F +++GLIBC_2.3 bindtextdomain F +++GLIBC_2.3 brk F +++GLIBC_2.3 bsd_signal F +++GLIBC_2.3 bsearch F +++GLIBC_2.3 btowc F +++GLIBC_2.3 bzero F +++GLIBC_2.3 calloc F +++GLIBC_2.3 callrpc F +++GLIBC_2.3 canonicalize_file_name F +++GLIBC_2.3 catclose F +++GLIBC_2.3 catgets F +++GLIBC_2.3 catopen F +++GLIBC_2.3 cbc_crypt F +++GLIBC_2.3 cfgetispeed F +++GLIBC_2.3 cfgetospeed F +++GLIBC_2.3 cfmakeraw F +++GLIBC_2.3 cfree F +++GLIBC_2.3 cfsetispeed F +++GLIBC_2.3 cfsetospeed F +++GLIBC_2.3 cfsetspeed F +++GLIBC_2.3 chdir F +++GLIBC_2.3 chflags F +++GLIBC_2.3 chmod F +++GLIBC_2.3 chown F +++GLIBC_2.3 chroot F +++GLIBC_2.3 clearenv F +++GLIBC_2.3 clearerr F +++GLIBC_2.3 clearerr_unlocked F +++GLIBC_2.3 clnt_broadcast F +++GLIBC_2.3 clnt_create F +++GLIBC_2.3 clnt_pcreateerror F +++GLIBC_2.3 clnt_perrno F +++GLIBC_2.3 clnt_perror F +++GLIBC_2.3 clnt_spcreateerror F +++GLIBC_2.3 clnt_sperrno F +++GLIBC_2.3 clnt_sperror F +++GLIBC_2.3 clntraw_create F +++GLIBC_2.3 clnttcp_create F +++GLIBC_2.3 clntudp_bufcreate F +++GLIBC_2.3 clntudp_create F +++GLIBC_2.3 clntunix_create F +++GLIBC_2.3 clock F +++GLIBC_2.3 clone F +++GLIBC_2.3 close F +++GLIBC_2.3 closedir F +++GLIBC_2.3 closelog F +++GLIBC_2.3 confstr F +++GLIBC_2.3 connect F +++GLIBC_2.3 copysign F +++GLIBC_2.3 copysignf F +++GLIBC_2.3 copysignl F +++GLIBC_2.3 creat F +++GLIBC_2.3 creat64 F +++GLIBC_2.3 ctermid F +++GLIBC_2.3 ctime F +++GLIBC_2.3 ctime_r F +++GLIBC_2.3 cuserid F +++GLIBC_2.3 daemon F +++GLIBC_2.3 daylight D 0x4 +++GLIBC_2.3 dcgettext F +++GLIBC_2.3 dcngettext F +++GLIBC_2.3 des_setparity F +++GLIBC_2.3 dgettext F +++GLIBC_2.3 difftime F +++GLIBC_2.3 dirfd F +++GLIBC_2.3 dirname F +++GLIBC_2.3 div F +++GLIBC_2.3 dl_iterate_phdr F +++GLIBC_2.3 dngettext F +++GLIBC_2.3 dprintf F +++GLIBC_2.3 drand48 F +++GLIBC_2.3 drand48_r F +++GLIBC_2.3 dup F +++GLIBC_2.3 dup2 F +++GLIBC_2.3 duplocale F +++GLIBC_2.3 dysize F +++GLIBC_2.3 ecb_crypt F +++GLIBC_2.3 ecvt F +++GLIBC_2.3 ecvt_r F +++GLIBC_2.3 endaliasent F +++GLIBC_2.3 endfsent F +++GLIBC_2.3 endgrent F +++GLIBC_2.3 endhostent F +++GLIBC_2.3 endmntent F +++GLIBC_2.3 endnetent F +++GLIBC_2.3 endnetgrent F +++GLIBC_2.3 endprotoent F +++GLIBC_2.3 endpwent F +++GLIBC_2.3 endrpcent F +++GLIBC_2.3 endservent F +++GLIBC_2.3 endspent F +++GLIBC_2.3 endttyent F +++GLIBC_2.3 endusershell F +++GLIBC_2.3 endutent F +++GLIBC_2.3 endutxent F +++GLIBC_2.3 environ D 0x8 +++GLIBC_2.3 envz_add F +++GLIBC_2.3 envz_entry F +++GLIBC_2.3 envz_get F +++GLIBC_2.3 envz_merge F +++GLIBC_2.3 envz_remove F +++GLIBC_2.3 envz_strip F +++GLIBC_2.3 erand48 F +++GLIBC_2.3 erand48_r F +++GLIBC_2.3 err F +++GLIBC_2.3 error F +++GLIBC_2.3 error_at_line F +++GLIBC_2.3 error_message_count D 0x4 +++GLIBC_2.3 error_one_per_line D 0x4 +++GLIBC_2.3 error_print_progname D 0x8 +++GLIBC_2.3 errx F +++GLIBC_2.3 ether_aton F +++GLIBC_2.3 ether_aton_r F +++GLIBC_2.3 ether_hostton F +++GLIBC_2.3 ether_line F +++GLIBC_2.3 ether_ntoa F +++GLIBC_2.3 ether_ntoa_r F +++GLIBC_2.3 ether_ntohost F +++GLIBC_2.3 euidaccess F +++GLIBC_2.3 execl F +++GLIBC_2.3 execle F +++GLIBC_2.3 execlp F +++GLIBC_2.3 execv F +++GLIBC_2.3 execve F +++GLIBC_2.3 execvp F +++GLIBC_2.3 exit F +++GLIBC_2.3 extattr_delete_file F +++GLIBC_2.3 extattr_get_file F +++GLIBC_2.3 extattr_set_file F +++GLIBC_2.3 extattrctl F +++GLIBC_2.3 fattach F +++GLIBC_2.3 fchdir F +++GLIBC_2.3 fchflags F +++GLIBC_2.3 fchmod F +++GLIBC_2.3 fchown F +++GLIBC_2.3 fclose F +++GLIBC_2.3 fcloseall F +++GLIBC_2.3 fcntl F +++GLIBC_2.3 fcvt F +++GLIBC_2.3 fcvt_r F +++GLIBC_2.3 fdatasync F +++GLIBC_2.3 fdetach F +++GLIBC_2.3 fdopen F +++GLIBC_2.3 feof F +++GLIBC_2.3 feof_unlocked F +++GLIBC_2.3 ferror F +++GLIBC_2.3 ferror_unlocked F +++GLIBC_2.3 fexecve F +++GLIBC_2.3 fflush F +++GLIBC_2.3 fflush_unlocked F +++GLIBC_2.3 ffs F +++GLIBC_2.3 ffsl F +++GLIBC_2.3 ffsll F +++GLIBC_2.3 fgetc F +++GLIBC_2.3 fgetc_unlocked F +++GLIBC_2.3 fgetgrent F +++GLIBC_2.3 fgetgrent_r F +++GLIBC_2.3 fgetpos F +++GLIBC_2.3 fgetpos64 F +++GLIBC_2.3 fgetpwent F +++GLIBC_2.3 fgetpwent_r F +++GLIBC_2.3 fgets F +++GLIBC_2.3 fgets_unlocked F +++GLIBC_2.3 fgetspent F +++GLIBC_2.3 fgetspent_r F +++GLIBC_2.3 fgetwc F +++GLIBC_2.3 fgetwc_unlocked F +++GLIBC_2.3 fgetws F +++GLIBC_2.3 fgetws_unlocked F +++GLIBC_2.3 fgetxattr F +++GLIBC_2.3 fhopen F +++GLIBC_2.3 fhstat F +++GLIBC_2.3 fhstatfs F +++GLIBC_2.3 fileno F +++GLIBC_2.3 fileno_unlocked F +++GLIBC_2.3 finite F +++GLIBC_2.3 finitef F +++GLIBC_2.3 finitel F +++GLIBC_2.3 flistxattr F +++GLIBC_2.3 flock F +++GLIBC_2.3 flockfile F +++GLIBC_2.3 fmemopen F +++GLIBC_2.3 fmtmsg F +++GLIBC_2.3 fnmatch F +++GLIBC_2.3 fopen F +++GLIBC_2.3 fopen64 F +++GLIBC_2.3 fopencookie F +++GLIBC_2.3 fork F +++GLIBC_2.3 fpathconf F +++GLIBC_2.3 fprintf F +++GLIBC_2.3 fputc F +++GLIBC_2.3 fputc_unlocked F +++GLIBC_2.3 fputs F +++GLIBC_2.3 fputs_unlocked F +++GLIBC_2.3 fputwc F +++GLIBC_2.3 fputwc_unlocked F +++GLIBC_2.3 fputws F +++GLIBC_2.3 fputws_unlocked F +++GLIBC_2.3 fread F +++GLIBC_2.3 fread_unlocked F +++GLIBC_2.3 free F +++GLIBC_2.3 freeaddrinfo F +++GLIBC_2.3 freeifaddrs F +++GLIBC_2.3 freelocale F +++GLIBC_2.3 fremovexattr F +++GLIBC_2.3 freopen F +++GLIBC_2.3 freopen64 F +++GLIBC_2.3 frexp F +++GLIBC_2.3 frexpf F +++GLIBC_2.3 frexpl F +++GLIBC_2.3 fscanf F +++GLIBC_2.3 fseek F +++GLIBC_2.3 fseeko F +++GLIBC_2.3 fseeko64 F +++GLIBC_2.3 fsetpos F +++GLIBC_2.3 fsetpos64 F +++GLIBC_2.3 fsetxattr F +++GLIBC_2.3 fstatfs F +++GLIBC_2.3 fstatfs64 F +++GLIBC_2.3 fstatvfs F +++GLIBC_2.3 fstatvfs64 F +++GLIBC_2.3 fsync F +++GLIBC_2.3 ftell F +++GLIBC_2.3 ftello F +++GLIBC_2.3 ftello64 F +++GLIBC_2.3 ftime F +++GLIBC_2.3 ftok F +++GLIBC_2.3 ftruncate F +++GLIBC_2.3 ftruncate64 F +++GLIBC_2.3 ftrylockfile F +++GLIBC_2.3 fts_children F +++GLIBC_2.3 fts_close F +++GLIBC_2.3 fts_open F +++GLIBC_2.3 fts_read F +++GLIBC_2.3 fts_set F +++GLIBC_2.3 ftw F +++GLIBC_2.3 ftw64 F +++GLIBC_2.3 funlockfile F +++GLIBC_2.3 futimes F +++GLIBC_2.3 fwide F +++GLIBC_2.3 fwprintf F +++GLIBC_2.3 fwrite F +++GLIBC_2.3 fwrite_unlocked F +++GLIBC_2.3 fwscanf F +++GLIBC_2.3 gai_strerror F +++GLIBC_2.3 gcvt F +++GLIBC_2.3 get_avphys_pages F +++GLIBC_2.3 get_current_dir_name F +++GLIBC_2.3 get_myaddress F +++GLIBC_2.3 get_nprocs F +++GLIBC_2.3 get_nprocs_conf F +++GLIBC_2.3 get_phys_pages F +++GLIBC_2.3 getaddrinfo F +++GLIBC_2.3 getaliasbyname F +++GLIBC_2.3 getaliasbyname_r F +++GLIBC_2.3 getaliasent F +++GLIBC_2.3 getaliasent_r F +++GLIBC_2.3 getc F +++GLIBC_2.3 getc_unlocked F +++GLIBC_2.3 getchar F +++GLIBC_2.3 getchar_unlocked F +++GLIBC_2.3 getcontext F +++GLIBC_2.3 getcwd F +++GLIBC_2.3 getdate F +++GLIBC_2.3 getdate_err D 0x4 +++GLIBC_2.3 getdate_r F +++GLIBC_2.3 getdelim F +++GLIBC_2.3 getdents F +++GLIBC_2.3 getdirentries F +++GLIBC_2.3 getdirentries64 F +++GLIBC_2.3 getdomainname F +++GLIBC_2.3 getdtablesize F +++GLIBC_2.3 getegid F +++GLIBC_2.3 getenv F +++GLIBC_2.3 geteuid F +++GLIBC_2.3 getfh F +++GLIBC_2.3 getfsent F +++GLIBC_2.3 getfsfile F +++GLIBC_2.3 getfsspec F +++GLIBC_2.3 getfsstat F +++GLIBC_2.3 getfsstat64 F +++GLIBC_2.3 getgid F +++GLIBC_2.3 getgrent F +++GLIBC_2.3 getgrent_r F +++GLIBC_2.3 getgrgid F +++GLIBC_2.3 getgrgid_r F +++GLIBC_2.3 getgrnam F +++GLIBC_2.3 getgrnam_r F +++GLIBC_2.3 getgrouplist F +++GLIBC_2.3 getgroups F +++GLIBC_2.3 gethostbyaddr F +++GLIBC_2.3 gethostbyaddr_r F +++GLIBC_2.3 gethostbyname F +++GLIBC_2.3 gethostbyname2 F +++GLIBC_2.3 gethostbyname2_r F +++GLIBC_2.3 gethostbyname_r F +++GLIBC_2.3 gethostent F +++GLIBC_2.3 gethostent_r F +++GLIBC_2.3 gethostid F +++GLIBC_2.3 gethostname F +++GLIBC_2.3 getifaddrs F +++GLIBC_2.3 getitimer F +++GLIBC_2.3 getline F +++GLIBC_2.3 getloadavg F +++GLIBC_2.3 getlogin F +++GLIBC_2.3 getlogin_r F +++GLIBC_2.3 getmntent F +++GLIBC_2.3 getmntent_r F +++GLIBC_2.3 getmntinfo F +++GLIBC_2.3 getmntinfo64 F +++GLIBC_2.3 getmsg F +++GLIBC_2.3 getnameinfo F +++GLIBC_2.3 getnetbyaddr F +++GLIBC_2.3 getnetbyaddr_r F +++GLIBC_2.3 getnetbyname F +++GLIBC_2.3 getnetbyname_r F +++GLIBC_2.3 getnetent F +++GLIBC_2.3 getnetent_r F +++GLIBC_2.3 getnetgrent F +++GLIBC_2.3 getnetgrent_r F +++GLIBC_2.3 getnetname F +++GLIBC_2.3 getopt F +++GLIBC_2.3 getopt_long F +++GLIBC_2.3 getopt_long_only F +++GLIBC_2.3 getpagesize F +++GLIBC_2.3 getpass F +++GLIBC_2.3 getpeername F +++GLIBC_2.3 getpgid F +++GLIBC_2.3 getpgrp F +++GLIBC_2.3 getpid F +++GLIBC_2.3 getpmsg F +++GLIBC_2.3 getppid F +++GLIBC_2.3 getpriority F +++GLIBC_2.3 getprotobyname F +++GLIBC_2.3 getprotobyname_r F +++GLIBC_2.3 getprotobynumber F +++GLIBC_2.3 getprotobynumber_r F +++GLIBC_2.3 getprotoent F +++GLIBC_2.3 getprotoent_r F +++GLIBC_2.3 getpt F +++GLIBC_2.3 getpublickey F +++GLIBC_2.3 getpw F +++GLIBC_2.3 getpwent F +++GLIBC_2.3 getpwent_r F +++GLIBC_2.3 getpwnam F +++GLIBC_2.3 getpwnam_r F +++GLIBC_2.3 getpwuid F +++GLIBC_2.3 getpwuid_r F +++GLIBC_2.3 getresgid F +++GLIBC_2.3 getresuid F +++GLIBC_2.3 getrlimit F +++GLIBC_2.3 getrlimit64 F +++GLIBC_2.3 getrpcbyname F +++GLIBC_2.3 getrpcbyname_r F +++GLIBC_2.3 getrpcbynumber F +++GLIBC_2.3 getrpcbynumber_r F +++GLIBC_2.3 getrpcent F +++GLIBC_2.3 getrpcent_r F +++GLIBC_2.3 getrpcport F +++GLIBC_2.3 getrusage F +++GLIBC_2.3 gets F +++GLIBC_2.3 getsecretkey F +++GLIBC_2.3 getservbyname F +++GLIBC_2.3 getservbyname_r F +++GLIBC_2.3 getservbyport F +++GLIBC_2.3 getservbyport_r F +++GLIBC_2.3 getservent F +++GLIBC_2.3 getservent_r F +++GLIBC_2.3 getsid F +++GLIBC_2.3 getsockname F +++GLIBC_2.3 getsockopt F +++GLIBC_2.3 getspent F +++GLIBC_2.3 getspent_r F +++GLIBC_2.3 getspnam F +++GLIBC_2.3 getspnam_r F +++GLIBC_2.3 getsubopt F +++GLIBC_2.3 gettext F +++GLIBC_2.3 gettimeofday F +++GLIBC_2.3 getttyent F +++GLIBC_2.3 getttynam F +++GLIBC_2.3 getuid F +++GLIBC_2.3 getusershell F +++GLIBC_2.3 getutent F +++GLIBC_2.3 getutent_r F +++GLIBC_2.3 getutid F +++GLIBC_2.3 getutid_r F +++GLIBC_2.3 getutline F +++GLIBC_2.3 getutline_r F +++GLIBC_2.3 getutmp F +++GLIBC_2.3 getutmpx F +++GLIBC_2.3 getutxent F +++GLIBC_2.3 getutxid F +++GLIBC_2.3 getutxline F +++GLIBC_2.3 getw F +++GLIBC_2.3 getwc F +++GLIBC_2.3 getwc_unlocked F +++GLIBC_2.3 getwchar F +++GLIBC_2.3 getwchar_unlocked F +++GLIBC_2.3 getwd F +++GLIBC_2.3 getxattr F +++GLIBC_2.3 glob F +++GLIBC_2.3 glob64 F +++GLIBC_2.3 glob_pattern_p F +++GLIBC_2.3 globfree F +++GLIBC_2.3 globfree64 F +++GLIBC_2.3 gmtime F +++GLIBC_2.3 gmtime_r F +++GLIBC_2.3 gnu_get_libc_release F +++GLIBC_2.3 gnu_get_libc_version F +++GLIBC_2.3 grantpt F +++GLIBC_2.3 group_member F +++GLIBC_2.3 gsignal F +++GLIBC_2.3 gtty F +++GLIBC_2.3 h_errlist D 0x28 +++GLIBC_2.3 h_nerr D 0x4 +++GLIBC_2.3 hasmntopt F +++GLIBC_2.3 hcreate F +++GLIBC_2.3 hcreate_r F +++GLIBC_2.3 hdestroy F +++GLIBC_2.3 hdestroy_r F +++GLIBC_2.3 herror F +++GLIBC_2.3 host2netname F +++GLIBC_2.3 hsearch F +++GLIBC_2.3 hsearch_r F +++GLIBC_2.3 hstrerror F +++GLIBC_2.3 htonl F +++GLIBC_2.3 htons F +++GLIBC_2.3 iconv F +++GLIBC_2.3 iconv_close F +++GLIBC_2.3 iconv_open F +++GLIBC_2.3 if_freenameindex F +++GLIBC_2.3 if_indextoname F +++GLIBC_2.3 if_nameindex F +++GLIBC_2.3 if_nametoindex F +++GLIBC_2.3 imaxabs F +++GLIBC_2.3 imaxdiv F +++GLIBC_2.3 in6addr_any D 0x10 +++GLIBC_2.3 in6addr_loopback D 0x10 +++GLIBC_2.3 index F +++GLIBC_2.3 inet_addr F +++GLIBC_2.3 inet_aton F +++GLIBC_2.3 inet_lnaof F +++GLIBC_2.3 inet_makeaddr F +++GLIBC_2.3 inet_netof F +++GLIBC_2.3 inet_network F +++GLIBC_2.3 inet_nsap_addr F +++GLIBC_2.3 inet_nsap_ntoa F +++GLIBC_2.3 inet_ntoa F +++GLIBC_2.3 inet_ntop F +++GLIBC_2.3 inet_pton F +++GLIBC_2.3 initgroups F +++GLIBC_2.3 initstate F +++GLIBC_2.3 initstate_r F +++GLIBC_2.3 innetgr F +++GLIBC_2.3 insque F +++GLIBC_2.3 ioctl F +++GLIBC_2.3 iruserok F +++GLIBC_2.3 iruserok_af F +++GLIBC_2.3 isalnum F +++GLIBC_2.3 isalnum_l F +++GLIBC_2.3 isalpha F +++GLIBC_2.3 isalpha_l F +++GLIBC_2.3 isascii F +++GLIBC_2.3 isastream F +++GLIBC_2.3 isatty F +++GLIBC_2.3 isblank F +++GLIBC_2.3 isblank_l F +++GLIBC_2.3 iscntrl F +++GLIBC_2.3 iscntrl_l F +++GLIBC_2.3 isctype F +++GLIBC_2.3 isdigit F +++GLIBC_2.3 isdigit_l F +++GLIBC_2.3 isfdtype F +++GLIBC_2.3 isgraph F +++GLIBC_2.3 isgraph_l F +++GLIBC_2.3 isinf F +++GLIBC_2.3 isinff F +++GLIBC_2.3 isinfl F +++GLIBC_2.3 islower F +++GLIBC_2.3 islower_l F +++GLIBC_2.3 isnan F +++GLIBC_2.3 isnanf F +++GLIBC_2.3 isnanl F +++GLIBC_2.3 isprint F +++GLIBC_2.3 isprint_l F +++GLIBC_2.3 ispunct F +++GLIBC_2.3 ispunct_l F +++GLIBC_2.3 issetugid F +++GLIBC_2.3 isspace F +++GLIBC_2.3 isspace_l F +++GLIBC_2.3 isupper F +++GLIBC_2.3 isupper_l F +++GLIBC_2.3 iswalnum F +++GLIBC_2.3 iswalnum_l F +++GLIBC_2.3 iswalpha F +++GLIBC_2.3 iswalpha_l F +++GLIBC_2.3 iswblank F +++GLIBC_2.3 iswblank_l F +++GLIBC_2.3 iswcntrl F +++GLIBC_2.3 iswcntrl_l F +++GLIBC_2.3 iswctype F +++GLIBC_2.3 iswctype_l F +++GLIBC_2.3 iswdigit F +++GLIBC_2.3 iswdigit_l F +++GLIBC_2.3 iswgraph F +++GLIBC_2.3 iswgraph_l F +++GLIBC_2.3 iswlower F +++GLIBC_2.3 iswlower_l F +++GLIBC_2.3 iswprint F +++GLIBC_2.3 iswprint_l F +++GLIBC_2.3 iswpunct F +++GLIBC_2.3 iswpunct_l F +++GLIBC_2.3 iswspace F +++GLIBC_2.3 iswspace_l F +++GLIBC_2.3 iswupper F +++GLIBC_2.3 iswupper_l F +++GLIBC_2.3 iswxdigit F +++GLIBC_2.3 iswxdigit_l F +++GLIBC_2.3 isxdigit F +++GLIBC_2.3 isxdigit_l F +++GLIBC_2.3 jail F +++GLIBC_2.3 jrand48 F +++GLIBC_2.3 jrand48_r F +++GLIBC_2.3 key_decryptsession F +++GLIBC_2.3 key_decryptsession_pk F +++GLIBC_2.3 key_encryptsession F +++GLIBC_2.3 key_encryptsession_pk F +++GLIBC_2.3 key_gendes F +++GLIBC_2.3 key_get_conv F +++GLIBC_2.3 key_secretkey_is_set F +++GLIBC_2.3 key_setnet F +++GLIBC_2.3 key_setsecret F +++GLIBC_2.3 kill F +++GLIBC_2.3 killpg F +++GLIBC_2.3 kldfind F +++GLIBC_2.3 kldfirstmod F +++GLIBC_2.3 kldload F +++GLIBC_2.3 kldnext F +++GLIBC_2.3 kldstat F +++GLIBC_2.3 kldsym F +++GLIBC_2.3 kldunload F +++GLIBC_2.3 kldunloadf F +++GLIBC_2.3 ktrace F +++GLIBC_2.3 l64a F +++GLIBC_2.3 labs F +++GLIBC_2.3 lchmod F +++GLIBC_2.3 lchown F +++GLIBC_2.3 lckpwdf F +++GLIBC_2.3 lcong48 F +++GLIBC_2.3 lcong48_r F +++GLIBC_2.3 ldexp F +++GLIBC_2.3 ldexpf F +++GLIBC_2.3 ldexpl F +++GLIBC_2.3 ldiv F +++GLIBC_2.3 lfind F +++GLIBC_2.3 lgetxattr F +++GLIBC_2.3 link F +++GLIBC_2.3 listen F +++GLIBC_2.3 listxattr F +++GLIBC_2.3 llabs F +++GLIBC_2.3 lldiv F +++GLIBC_2.3 llistxattr F +++GLIBC_2.3 loc1 D 0x8 +++GLIBC_2.3 loc2 D 0x8 +++GLIBC_2.3 localeconv F +++GLIBC_2.3 localtime F +++GLIBC_2.3 localtime_r F +++GLIBC_2.3 lockf F +++GLIBC_2.3 lockf64 F +++GLIBC_2.3 locs D 0x8 +++GLIBC_2.3 longjmp F +++GLIBC_2.3 lrand48 F +++GLIBC_2.3 lrand48_r F +++GLIBC_2.3 lremovexattr F +++GLIBC_2.3 lsearch F +++GLIBC_2.3 lseek F +++GLIBC_2.3 lseek64 F +++GLIBC_2.3 lsetxattr F +++GLIBC_2.3 lutimes F +++GLIBC_2.3 madvise F +++GLIBC_2.3 makecontext F +++GLIBC_2.3 mallinfo F +++GLIBC_2.3 malloc F +++GLIBC_2.3 malloc_get_state F +++GLIBC_2.3 malloc_set_state F +++GLIBC_2.3 malloc_stats F +++GLIBC_2.3 malloc_trim F +++GLIBC_2.3 malloc_usable_size F +++GLIBC_2.3 mallopt F +++GLIBC_2.3 mallwatch D 0x8 +++GLIBC_2.3 mblen F +++GLIBC_2.3 mbrlen F +++GLIBC_2.3 mbrtowc F +++GLIBC_2.3 mbsinit F +++GLIBC_2.3 mbsnrtowcs F +++GLIBC_2.3 mbsrtowcs F +++GLIBC_2.3 mbstowcs F +++GLIBC_2.3 mbtowc F +++GLIBC_2.3 mcheck F +++GLIBC_2.3 mcheck_check_all F +++GLIBC_2.3 mcheck_pedantic F +++GLIBC_2.3 mcount F +++GLIBC_2.3 memalign F +++GLIBC_2.3 memccpy F +++GLIBC_2.3 memchr F +++GLIBC_2.3 memcmp F +++GLIBC_2.3 memcpy F +++GLIBC_2.3 memfrob F +++GLIBC_2.3 memmem F +++GLIBC_2.3 memmove F +++GLIBC_2.3 mempcpy F +++GLIBC_2.3 memrchr F +++GLIBC_2.3 memset F +++GLIBC_2.3 mincore F +++GLIBC_2.3 minherit F +++GLIBC_2.3 mkdir F +++GLIBC_2.3 mkdtemp F +++GLIBC_2.3 mkfifo F +++GLIBC_2.3 mkstemp F +++GLIBC_2.3 mkstemp64 F +++GLIBC_2.3 mktemp F +++GLIBC_2.3 mktime F +++GLIBC_2.3 mlock F +++GLIBC_2.3 mlockall F +++GLIBC_2.3 mmap F +++GLIBC_2.3 mmap64 F +++GLIBC_2.3 modf F +++GLIBC_2.3 modff F +++GLIBC_2.3 modfind F +++GLIBC_2.3 modfl F +++GLIBC_2.3 modfnext F +++GLIBC_2.3 modnext F +++GLIBC_2.3 modstat F +++GLIBC_2.3 moncontrol F +++GLIBC_2.3 monstartup F +++GLIBC_2.3 mount F +++GLIBC_2.3 mprobe F +++GLIBC_2.3 mprotect F +++GLIBC_2.3 mrand48 F +++GLIBC_2.3 mrand48_r F +++GLIBC_2.3 msgctl F +++GLIBC_2.3 msgget F +++GLIBC_2.3 msgrcv F +++GLIBC_2.3 msgsnd F +++GLIBC_2.3 msync F +++GLIBC_2.3 mtrace F +++GLIBC_2.3 munlock F +++GLIBC_2.3 munlockall F +++GLIBC_2.3 munmap F +++GLIBC_2.3 muntrace F +++GLIBC_2.3 nanosleep F +++GLIBC_2.3 netname2host F +++GLIBC_2.3 netname2user F +++GLIBC_2.3 newlocale F +++GLIBC_2.3 nftw F +++GLIBC_2.3 nftw64 F +++GLIBC_2.3 ngettext F +++GLIBC_2.3 nice F +++GLIBC_2.3 nl_langinfo F +++GLIBC_2.3 nl_langinfo_l F +++GLIBC_2.3 nmount F +++GLIBC_2.3 nrand48 F +++GLIBC_2.3 nrand48_r F +++GLIBC_2.3 ntohl F +++GLIBC_2.3 ntohs F +++GLIBC_2.3 ntp_adjtime F +++GLIBC_2.3 ntp_gettime F +++GLIBC_2.3 obstack_alloc_failed_handler D 0x8 +++GLIBC_2.3 obstack_exit_failure D 0x4 +++GLIBC_2.3 obstack_free F +++GLIBC_2.3 obstack_printf F +++GLIBC_2.3 obstack_vprintf F +++GLIBC_2.3 on_exit F +++GLIBC_2.3 open F +++GLIBC_2.3 open64 F +++GLIBC_2.3 open_memstream F +++GLIBC_2.3 opendir F +++GLIBC_2.3 openlog F +++GLIBC_2.3 optarg D 0x8 +++GLIBC_2.3 opterr D 0x4 +++GLIBC_2.3 optind D 0x4 +++GLIBC_2.3 optopt D 0x4 +++GLIBC_2.3 parse_printf_format F +++GLIBC_2.3 passwd2des F +++GLIBC_2.3 pathconf F +++GLIBC_2.3 pause F +++GLIBC_2.3 pclose F +++GLIBC_2.3 perror F +++GLIBC_2.3 pipe F +++GLIBC_2.3 pmap_getmaps F +++GLIBC_2.3 pmap_getport F +++GLIBC_2.3 pmap_rmtcall F +++GLIBC_2.3 pmap_set F +++GLIBC_2.3 pmap_unset F +++GLIBC_2.3 poll F +++GLIBC_2.3 popen F +++GLIBC_2.3 posix_fadvise F +++GLIBC_2.3 posix_fadvise64 F +++GLIBC_2.3 posix_fallocate F +++GLIBC_2.3 posix_fallocate64 F +++GLIBC_2.3 posix_madvise F +++GLIBC_2.3 posix_memalign F +++GLIBC_2.3 posix_openpt F +++GLIBC_2.3 posix_spawn F +++GLIBC_2.3 posix_spawn_file_actions_addclose F +++GLIBC_2.3 posix_spawn_file_actions_adddup2 F +++GLIBC_2.3 posix_spawn_file_actions_addopen F +++GLIBC_2.3 posix_spawn_file_actions_destroy F +++GLIBC_2.3 posix_spawn_file_actions_init F +++GLIBC_2.3 posix_spawnattr_destroy F +++GLIBC_2.3 posix_spawnattr_getflags F +++GLIBC_2.3 posix_spawnattr_getpgroup F +++GLIBC_2.3 posix_spawnattr_getschedparam F +++GLIBC_2.3 posix_spawnattr_getschedpolicy F +++GLIBC_2.3 posix_spawnattr_getsigdefault F +++GLIBC_2.3 posix_spawnattr_getsigmask F +++GLIBC_2.3 posix_spawnattr_init F +++GLIBC_2.3 posix_spawnattr_setflags F +++GLIBC_2.3 posix_spawnattr_setpgroup F +++GLIBC_2.3 posix_spawnattr_setschedparam F +++GLIBC_2.3 posix_spawnattr_setschedpolicy F +++GLIBC_2.3 posix_spawnattr_setsigdefault F +++GLIBC_2.3 posix_spawnattr_setsigmask F +++GLIBC_2.3 posix_spawnp F +++GLIBC_2.3 pread F +++GLIBC_2.3 pread64 F +++GLIBC_2.3 printf F +++GLIBC_2.3 printf_size F +++GLIBC_2.3 printf_size_info F +++GLIBC_2.3 profil F +++GLIBC_2.3 program_invocation_name D 0x8 +++GLIBC_2.3 program_invocation_short_name D 0x8 +++GLIBC_2.3 pselect F +++GLIBC_2.3 psignal F +++GLIBC_2.3 pthread_attr_destroy F +++GLIBC_2.3 pthread_attr_getdetachstate F +++GLIBC_2.3 pthread_attr_getinheritsched F +++GLIBC_2.3 pthread_attr_getschedparam F +++GLIBC_2.3 pthread_attr_getschedpolicy F +++GLIBC_2.3 pthread_attr_getscope F +++GLIBC_2.3 pthread_attr_init F +++GLIBC_2.3 pthread_attr_setdetachstate F +++GLIBC_2.3 pthread_attr_setinheritsched F +++GLIBC_2.3 pthread_attr_setschedparam F +++GLIBC_2.3 pthread_attr_setschedpolicy F +++GLIBC_2.3 pthread_attr_setscope F +++GLIBC_2.3 pthread_cond_broadcast F +++GLIBC_2.3 pthread_cond_destroy F +++GLIBC_2.3 pthread_cond_init F +++GLIBC_2.3 pthread_cond_signal F +++GLIBC_2.3 pthread_cond_timedwait F +++GLIBC_2.3 pthread_cond_wait F +++GLIBC_2.3 pthread_condattr_destroy F +++GLIBC_2.3 pthread_condattr_init F +++GLIBC_2.3 pthread_equal F +++GLIBC_2.3 pthread_exit F +++GLIBC_2.3 pthread_getschedparam F +++GLIBC_2.3 pthread_mutex_destroy F +++GLIBC_2.3 pthread_mutex_init F +++GLIBC_2.3 pthread_mutex_lock F +++GLIBC_2.3 pthread_mutex_unlock F +++GLIBC_2.3 pthread_self F +++GLIBC_2.3 pthread_setcancelstate F +++GLIBC_2.3 pthread_setcanceltype F +++GLIBC_2.3 pthread_setschedparam F +++GLIBC_2.3 ptrace F +++GLIBC_2.3 ptsname F +++GLIBC_2.3 ptsname_r F +++GLIBC_2.3 putc F +++GLIBC_2.3 putc_unlocked F +++GLIBC_2.3 putchar F +++GLIBC_2.3 putchar_unlocked F +++GLIBC_2.3 putenv F +++GLIBC_2.3 putgrent F +++GLIBC_2.3 putmsg F +++GLIBC_2.3 putpmsg F +++GLIBC_2.3 putpwent F +++GLIBC_2.3 puts F +++GLIBC_2.3 putspent F +++GLIBC_2.3 pututline F +++GLIBC_2.3 pututxline F +++GLIBC_2.3 putw F +++GLIBC_2.3 putwc F +++GLIBC_2.3 putwc_unlocked F +++GLIBC_2.3 putwchar F +++GLIBC_2.3 putwchar_unlocked F +++GLIBC_2.3 pvalloc F +++GLIBC_2.3 pwrite F +++GLIBC_2.3 pwrite64 F +++GLIBC_2.3 qecvt F +++GLIBC_2.3 qecvt_r F +++GLIBC_2.3 qfcvt F +++GLIBC_2.3 qfcvt_r F +++GLIBC_2.3 qgcvt F +++GLIBC_2.3 qsort F +++GLIBC_2.3 quotactl F +++GLIBC_2.3 raise F +++GLIBC_2.3 rand F +++GLIBC_2.3 rand_r F +++GLIBC_2.3 random F +++GLIBC_2.3 random_r F +++GLIBC_2.3 rawmemchr F +++GLIBC_2.3 rcmd F +++GLIBC_2.3 rcmd_af F +++GLIBC_2.3 re_comp F +++GLIBC_2.3 re_compile_fastmap F +++GLIBC_2.3 re_compile_pattern F +++GLIBC_2.3 re_exec F +++GLIBC_2.3 re_match F +++GLIBC_2.3 re_match_2 F +++GLIBC_2.3 re_search F +++GLIBC_2.3 re_search_2 F +++GLIBC_2.3 re_set_registers F +++GLIBC_2.3 re_set_syntax F +++GLIBC_2.3 re_syntax_options D 0x8 +++GLIBC_2.3 read F +++GLIBC_2.3 readdir F +++GLIBC_2.3 readdir64 F +++GLIBC_2.3 readdir64_r F +++GLIBC_2.3 readdir_r F +++GLIBC_2.3 readlink F +++GLIBC_2.3 readv F +++GLIBC_2.3 realloc F +++GLIBC_2.3 realpath F +++GLIBC_2.3 reboot F +++GLIBC_2.3 recv F +++GLIBC_2.3 recvfrom F +++GLIBC_2.3 recvmsg F +++GLIBC_2.3 regcomp F +++GLIBC_2.3 regerror F +++GLIBC_2.3 regexec F +++GLIBC_2.3 regfree F +++GLIBC_2.3 register_printf_function F +++GLIBC_2.3 registerrpc F +++GLIBC_2.3 remove F +++GLIBC_2.3 removexattr F +++GLIBC_2.3 remque F +++GLIBC_2.3 rename F +++GLIBC_2.3 revoke F +++GLIBC_2.3 rewind F +++GLIBC_2.3 rewinddir F +++GLIBC_2.3 rexec F +++GLIBC_2.3 rexec_af F +++GLIBC_2.3 rexecoptions D 0x4 +++GLIBC_2.3 rfork F +++GLIBC_2.3 rindex F +++GLIBC_2.3 rmdir F +++GLIBC_2.3 rpc_createerr D 0x20 +++GLIBC_2.3 rpmatch F +++GLIBC_2.3 rresvport F +++GLIBC_2.3 rresvport_af F +++GLIBC_2.3 rtime F +++GLIBC_2.3 rtprio F +++GLIBC_2.3 ruserok F +++GLIBC_2.3 ruserok_af F +++GLIBC_2.3 ruserpass F +++GLIBC_2.3 sbrk F +++GLIBC_2.3 scalbn F +++GLIBC_2.3 scalbnf F +++GLIBC_2.3 scalbnl F +++GLIBC_2.3 scandir F +++GLIBC_2.3 scandir64 F +++GLIBC_2.3 scanf F +++GLIBC_2.3 sched_get_priority_max F +++GLIBC_2.3 sched_get_priority_min F +++GLIBC_2.3 sched_getparam F +++GLIBC_2.3 sched_getscheduler F +++GLIBC_2.3 sched_rr_get_interval F +++GLIBC_2.3 sched_setparam F +++GLIBC_2.3 sched_setscheduler F +++GLIBC_2.3 sched_yield F +++GLIBC_2.3 seed48 F +++GLIBC_2.3 seed48_r F +++GLIBC_2.3 seekdir F +++GLIBC_2.3 select F +++GLIBC_2.3 semctl F +++GLIBC_2.3 semget F +++GLIBC_2.3 semop F +++GLIBC_2.3 send F +++GLIBC_2.3 sendfile F +++GLIBC_2.3 sendfile64 F +++GLIBC_2.3 sendmsg F +++GLIBC_2.3 sendto F +++GLIBC_2.3 setaliasent F +++GLIBC_2.3 setbuf F +++GLIBC_2.3 setbuffer F +++GLIBC_2.3 setcontext F +++GLIBC_2.3 setdomainname F +++GLIBC_2.3 setegid F +++GLIBC_2.3 setenv F +++GLIBC_2.3 seteuid F +++GLIBC_2.3 setfsent F +++GLIBC_2.3 setgid F +++GLIBC_2.3 setgrent F +++GLIBC_2.3 setgroups F +++GLIBC_2.3 sethostent F +++GLIBC_2.3 sethostid F +++GLIBC_2.3 sethostname F +++GLIBC_2.3 setitimer F +++GLIBC_2.3 setjmp F +++GLIBC_2.3 setlinebuf F +++GLIBC_2.3 setlocale F +++GLIBC_2.3 setlogin F +++GLIBC_2.3 setlogmask F +++GLIBC_2.3 setmntent F +++GLIBC_2.3 setnetent F +++GLIBC_2.3 setnetgrent F +++GLIBC_2.3 setpgid F +++GLIBC_2.3 setpgrp F +++GLIBC_2.3 setpriority F +++GLIBC_2.3 setprotoent F +++GLIBC_2.3 setpwent F +++GLIBC_2.3 setregid F +++GLIBC_2.3 setresgid F +++GLIBC_2.3 setresuid F +++GLIBC_2.3 setreuid F +++GLIBC_2.3 setrlimit F +++GLIBC_2.3 setrlimit64 F +++GLIBC_2.3 setrpcent F +++GLIBC_2.3 setservent F +++GLIBC_2.3 setsid F +++GLIBC_2.3 setsockopt F +++GLIBC_2.3 setspent F +++GLIBC_2.3 setstate F +++GLIBC_2.3 setstate_r F +++GLIBC_2.3 settimeofday F +++GLIBC_2.3 setttyent F +++GLIBC_2.3 setuid F +++GLIBC_2.3 setusershell F +++GLIBC_2.3 setutent F +++GLIBC_2.3 setutxent F +++GLIBC_2.3 setvbuf F +++GLIBC_2.3 setxattr F +++GLIBC_2.3 sgetspent F +++GLIBC_2.3 sgetspent_r F +++GLIBC_2.3 shmat F +++GLIBC_2.3 shmctl F +++GLIBC_2.3 shmdt F +++GLIBC_2.3 shmget F +++GLIBC_2.3 shutdown F +++GLIBC_2.3 sigaction F +++GLIBC_2.3 sigaddset F +++GLIBC_2.3 sigaltstack F +++GLIBC_2.3 sigandset F +++GLIBC_2.3 sigblock F +++GLIBC_2.3 sigdelset F +++GLIBC_2.3 sigemptyset F +++GLIBC_2.3 sigfillset F +++GLIBC_2.3 siggetmask F +++GLIBC_2.3 sighold F +++GLIBC_2.3 sigignore F +++GLIBC_2.3 siginterrupt F +++GLIBC_2.3 sigisemptyset F +++GLIBC_2.3 sigismember F +++GLIBC_2.3 siglongjmp F +++GLIBC_2.3 signal F +++GLIBC_2.3 sigorset F +++GLIBC_2.3 sigpause F +++GLIBC_2.3 sigpending F +++GLIBC_2.3 sigprocmask F +++GLIBC_2.3 sigqueue F +++GLIBC_2.3 sigrelse F +++GLIBC_2.3 sigreturn F +++GLIBC_2.3 sigset F +++GLIBC_2.3 sigsetmask F +++GLIBC_2.3 sigstack F +++GLIBC_2.3 sigsuspend F +++GLIBC_2.3 sigtimedwait F +++GLIBC_2.3 sigvec F +++GLIBC_2.3 sigwait F +++GLIBC_2.3 sigwaitinfo F +++GLIBC_2.3 sleep F +++GLIBC_2.3 snprintf F +++GLIBC_2.3 sockatmark F +++GLIBC_2.3 socket F +++GLIBC_2.3 socketpair F +++GLIBC_2.3 sprintf F +++GLIBC_2.3 sprofil F +++GLIBC_2.3 srand F +++GLIBC_2.3 srand48 F +++GLIBC_2.3 srand48_r F +++GLIBC_2.3 srandom F +++GLIBC_2.3 srandom_r F +++GLIBC_2.3 sscanf F +++GLIBC_2.3 ssignal F +++GLIBC_2.3 sstk F +++GLIBC_2.3 statfs F +++GLIBC_2.3 statfs64 F +++GLIBC_2.3 statvfs F +++GLIBC_2.3 statvfs64 F +++GLIBC_2.3 stderr D 0x8 +++GLIBC_2.3 stdin D 0x8 +++GLIBC_2.3 stdout D 0x8 +++GLIBC_2.3 step F +++GLIBC_2.3 stime F +++GLIBC_2.3 stpcpy F +++GLIBC_2.3 stpncpy F +++GLIBC_2.3 strcasecmp F +++GLIBC_2.3 strcasecmp_l F +++GLIBC_2.3 strcasestr F +++GLIBC_2.3 strcat F +++GLIBC_2.3 strchr F +++GLIBC_2.3 strchrnul F +++GLIBC_2.3 strcmp F +++GLIBC_2.3 strcoll F +++GLIBC_2.3 strcoll_l F +++GLIBC_2.3 strcpy F +++GLIBC_2.3 strcspn F +++GLIBC_2.3 strdup F +++GLIBC_2.3 strerror F +++GLIBC_2.3 strerror_r F +++GLIBC_2.3 strfmon F +++GLIBC_2.3 strfmon_l F +++GLIBC_2.3 strfry F +++GLIBC_2.3 strftime F +++GLIBC_2.3 strftime_l F +++GLIBC_2.3 strlen F +++GLIBC_2.3 strncasecmp F +++GLIBC_2.3 strncasecmp_l F +++GLIBC_2.3 strncat F +++GLIBC_2.3 strncmp F +++GLIBC_2.3 strncpy F +++GLIBC_2.3 strndup F +++GLIBC_2.3 strnlen F +++GLIBC_2.3 strpbrk F +++GLIBC_2.3 strptime F +++GLIBC_2.3 strrchr F +++GLIBC_2.3 strsep F +++GLIBC_2.3 strsignal F +++GLIBC_2.3 strspn F +++GLIBC_2.3 strstr F +++GLIBC_2.3 strtod F +++GLIBC_2.3 strtod_l F +++GLIBC_2.3 strtof F +++GLIBC_2.3 strtof_l F +++GLIBC_2.3 strtoimax F +++GLIBC_2.3 strtok F +++GLIBC_2.3 strtok_r F +++GLIBC_2.3 strtol F +++GLIBC_2.3 strtol_l F +++GLIBC_2.3 strtold F +++GLIBC_2.3 strtold_l F +++GLIBC_2.3 strtoll F +++GLIBC_2.3 strtoq F +++GLIBC_2.3 strtoul F +++GLIBC_2.3 strtoul_l F +++GLIBC_2.3 strtoull F +++GLIBC_2.3 strtoumax F +++GLIBC_2.3 strtouq F +++GLIBC_2.3 strverscmp F +++GLIBC_2.3 strxfrm F +++GLIBC_2.3 strxfrm_l F +++GLIBC_2.3 stty F +++GLIBC_2.3 svc_exit F +++GLIBC_2.3 svc_fdset D 0x80 +++GLIBC_2.3 svc_getreq F +++GLIBC_2.3 svc_getreq_common F +++GLIBC_2.3 svc_getreq_poll F +++GLIBC_2.3 svc_getreqset F +++GLIBC_2.3 svc_max_pollfd D 0x4 +++GLIBC_2.3 svc_pollfd D 0x8 +++GLIBC_2.3 svc_register F +++GLIBC_2.3 svc_run F +++GLIBC_2.3 svc_sendreply F +++GLIBC_2.3 svc_unregister F +++GLIBC_2.3 svcauthdes_stats D 0x18 +++GLIBC_2.3 svcerr_auth F +++GLIBC_2.3 svcerr_decode F +++GLIBC_2.3 svcerr_noproc F +++GLIBC_2.3 svcerr_noprog F +++GLIBC_2.3 svcerr_progvers F +++GLIBC_2.3 svcerr_systemerr F +++GLIBC_2.3 svcerr_weakauth F +++GLIBC_2.3 svcfd_create F +++GLIBC_2.3 svcraw_create F +++GLIBC_2.3 svctcp_create F +++GLIBC_2.3 svcudp_bufcreate F +++GLIBC_2.3 svcudp_create F +++GLIBC_2.3 svcudp_enablecache F +++GLIBC_2.3 svcunix_create F +++GLIBC_2.3 svcunixfd_create F +++GLIBC_2.3 swab F +++GLIBC_2.3 swapcontext F +++GLIBC_2.3 swapoff F +++GLIBC_2.3 swapon F +++GLIBC_2.3 swprintf F +++GLIBC_2.3 swscanf F +++GLIBC_2.3 symlink F +++GLIBC_2.3 sync F +++GLIBC_2.3 sys_errlist D 0x2b8 +++GLIBC_2.3 sys_nerr D 0x4 +++GLIBC_2.3 sys_sigabbrev D 0x408 +++GLIBC_2.3 sys_siglist D 0x408 +++GLIBC_2.3 sysarch F +++GLIBC_2.3 syscall F +++GLIBC_2.3 sysconf F +++GLIBC_2.3 sysctl F +++GLIBC_2.3 sysctlbyname F +++GLIBC_2.3 syslog F +++GLIBC_2.3 system F +++GLIBC_2.3 sysv_signal F +++GLIBC_2.3 tcdrain F +++GLIBC_2.3 tcflow F +++GLIBC_2.3 tcflush F +++GLIBC_2.3 tcgetattr F +++GLIBC_2.3 tcgetpgrp F +++GLIBC_2.3 tcgetsid F +++GLIBC_2.3 tcsendbreak F +++GLIBC_2.3 tcsetattr F +++GLIBC_2.3 tcsetpgrp F +++GLIBC_2.3 tdelete F +++GLIBC_2.3 tdestroy F +++GLIBC_2.3 telldir F +++GLIBC_2.3 tempnam F +++GLIBC_2.3 textdomain F +++GLIBC_2.3 tfind F +++GLIBC_2.3 time F +++GLIBC_2.3 timegm F +++GLIBC_2.3 timelocal F +++GLIBC_2.3 times F +++GLIBC_2.3 timezone D 0x8 +++GLIBC_2.3 tmpfile F +++GLIBC_2.3 tmpfile64 F +++GLIBC_2.3 tmpnam F +++GLIBC_2.3 tmpnam_r F +++GLIBC_2.3 toascii F +++GLIBC_2.3 tolower F +++GLIBC_2.3 tolower_l F +++GLIBC_2.3 toupper F +++GLIBC_2.3 toupper_l F +++GLIBC_2.3 towctrans F +++GLIBC_2.3 towctrans_l F +++GLIBC_2.3 towlower F +++GLIBC_2.3 towlower_l F +++GLIBC_2.3 towupper F +++GLIBC_2.3 towupper_l F +++GLIBC_2.3 tr_break F +++GLIBC_2.3 truncate F +++GLIBC_2.3 truncate64 F +++GLIBC_2.3 tsearch F +++GLIBC_2.3 ttyname F +++GLIBC_2.3 ttyname_r F +++GLIBC_2.3 ttyslot F +++GLIBC_2.3 twalk F +++GLIBC_2.3 tzname D 0x10 +++GLIBC_2.3 tzset F +++GLIBC_2.3 ualarm F +++GLIBC_2.3 ulckpwdf F +++GLIBC_2.3 ulimit F +++GLIBC_2.3 umask F +++GLIBC_2.3 uname F +++GLIBC_2.3 undelete F +++GLIBC_2.3 ungetc F +++GLIBC_2.3 ungetwc F +++GLIBC_2.3 unlink F +++GLIBC_2.3 unlockpt F +++GLIBC_2.3 unmount F +++GLIBC_2.3 unsetenv F +++GLIBC_2.3 updwtmp F +++GLIBC_2.3 updwtmpx F +++GLIBC_2.3 uselocale F +++GLIBC_2.3 user2netname F +++GLIBC_2.3 usleep F +++GLIBC_2.3 ustat F +++GLIBC_2.3 utime F +++GLIBC_2.3 utimes F +++GLIBC_2.3 utmpname F +++GLIBC_2.3 utmpxname F +++GLIBC_2.3 utrace F +++GLIBC_2.3 valloc F +++GLIBC_2.3 vasprintf F +++GLIBC_2.3 vdprintf F +++GLIBC_2.3 verr F +++GLIBC_2.3 verrx F +++GLIBC_2.3 versionsort F +++GLIBC_2.3 versionsort64 F +++GLIBC_2.3 vfork F +++GLIBC_2.3 vfprintf F +++GLIBC_2.3 vfscanf F +++GLIBC_2.3 vfwprintf F +++GLIBC_2.3 vfwscanf F +++GLIBC_2.3 vhangup F +++GLIBC_2.3 vlimit F +++GLIBC_2.3 vprintf F +++GLIBC_2.3 vscanf F +++GLIBC_2.3 vsnprintf F +++GLIBC_2.3 vsprintf F +++GLIBC_2.3 vsscanf F +++GLIBC_2.3 vswprintf F +++GLIBC_2.3 vswscanf F +++GLIBC_2.3 vsyslog F +++GLIBC_2.3 vtimes F +++GLIBC_2.3 vwarn F +++GLIBC_2.3 vwarnx F +++GLIBC_2.3 vwprintf F +++GLIBC_2.3 vwscanf F +++GLIBC_2.3 wait F +++GLIBC_2.3 wait3 F +++GLIBC_2.3 wait4 F +++GLIBC_2.3 waitid F +++GLIBC_2.3 waitpid F +++GLIBC_2.3 warn F +++GLIBC_2.3 warnx F +++GLIBC_2.3 wcpcpy F +++GLIBC_2.3 wcpncpy F +++GLIBC_2.3 wcrtomb F +++GLIBC_2.3 wcscasecmp F +++GLIBC_2.3 wcscasecmp_l F +++GLIBC_2.3 wcscat F +++GLIBC_2.3 wcschr F +++GLIBC_2.3 wcschrnul F +++GLIBC_2.3 wcscmp F +++GLIBC_2.3 wcscoll F +++GLIBC_2.3 wcscoll_l F +++GLIBC_2.3 wcscpy F +++GLIBC_2.3 wcscspn F +++GLIBC_2.3 wcsdup F +++GLIBC_2.3 wcsftime F +++GLIBC_2.3 wcsftime_l F +++GLIBC_2.3 wcslen F +++GLIBC_2.3 wcsncasecmp F +++GLIBC_2.3 wcsncasecmp_l F +++GLIBC_2.3 wcsncat F +++GLIBC_2.3 wcsncmp F +++GLIBC_2.3 wcsncpy F +++GLIBC_2.3 wcsnlen F +++GLIBC_2.3 wcsnrtombs F +++GLIBC_2.3 wcspbrk F +++GLIBC_2.3 wcsrchr F +++GLIBC_2.3 wcsrtombs F +++GLIBC_2.3 wcsspn F +++GLIBC_2.3 wcsstr F +++GLIBC_2.3 wcstod F +++GLIBC_2.3 wcstod_l F +++GLIBC_2.3 wcstof F +++GLIBC_2.3 wcstof_l F +++GLIBC_2.3 wcstoimax F +++GLIBC_2.3 wcstok F +++GLIBC_2.3 wcstol F +++GLIBC_2.3 wcstol_l F +++GLIBC_2.3 wcstold F +++GLIBC_2.3 wcstold_l F +++GLIBC_2.3 wcstoll F +++GLIBC_2.3 wcstoll_l F +++GLIBC_2.3 wcstombs F +++GLIBC_2.3 wcstoq F +++GLIBC_2.3 wcstoul F +++GLIBC_2.3 wcstoul_l F +++GLIBC_2.3 wcstoull F +++GLIBC_2.3 wcstoull_l F +++GLIBC_2.3 wcstoumax F +++GLIBC_2.3 wcstouq F +++GLIBC_2.3 wcswcs F +++GLIBC_2.3 wcswidth F +++GLIBC_2.3 wcsxfrm F +++GLIBC_2.3 wcsxfrm_l F +++GLIBC_2.3 wctob F +++GLIBC_2.3 wctomb F +++GLIBC_2.3 wctrans F +++GLIBC_2.3 wctrans_l F +++GLIBC_2.3 wctype F +++GLIBC_2.3 wctype_l F +++GLIBC_2.3 wcwidth F +++GLIBC_2.3 wmemchr F +++GLIBC_2.3 wmemcmp F +++GLIBC_2.3 wmemcpy F +++GLIBC_2.3 wmemmove F +++GLIBC_2.3 wmempcpy F +++GLIBC_2.3 wmemset F +++GLIBC_2.3 wordexp F +++GLIBC_2.3 wordfree F +++GLIBC_2.3 wprintf F +++GLIBC_2.3 write F +++GLIBC_2.3 writev F +++GLIBC_2.3 wscanf F +++GLIBC_2.3 xdecrypt F +++GLIBC_2.3 xdr_accepted_reply F +++GLIBC_2.3 xdr_array F +++GLIBC_2.3 xdr_authdes_cred F +++GLIBC_2.3 xdr_authdes_verf F +++GLIBC_2.3 xdr_authunix_parms F +++GLIBC_2.3 xdr_bool F +++GLIBC_2.3 xdr_bytes F +++GLIBC_2.3 xdr_callhdr F +++GLIBC_2.3 xdr_callmsg F +++GLIBC_2.3 xdr_char F +++GLIBC_2.3 xdr_cryptkeyarg F +++GLIBC_2.3 xdr_cryptkeyarg2 F +++GLIBC_2.3 xdr_cryptkeyres F +++GLIBC_2.3 xdr_des_block F +++GLIBC_2.3 xdr_double F +++GLIBC_2.3 xdr_enum F +++GLIBC_2.3 xdr_float F +++GLIBC_2.3 xdr_free F +++GLIBC_2.3 xdr_getcredres F +++GLIBC_2.3 xdr_hyper F +++GLIBC_2.3 xdr_int F +++GLIBC_2.3 xdr_int16_t F +++GLIBC_2.3 xdr_int32_t F +++GLIBC_2.3 xdr_int64_t F +++GLIBC_2.3 xdr_int8_t F +++GLIBC_2.3 xdr_key_netstarg F +++GLIBC_2.3 xdr_key_netstres F +++GLIBC_2.3 xdr_keybuf F +++GLIBC_2.3 xdr_keystatus F +++GLIBC_2.3 xdr_long F +++GLIBC_2.3 xdr_longlong_t F +++GLIBC_2.3 xdr_netnamestr F +++GLIBC_2.3 xdr_netobj F +++GLIBC_2.3 xdr_opaque F +++GLIBC_2.3 xdr_opaque_auth F +++GLIBC_2.3 xdr_pmap F +++GLIBC_2.3 xdr_pmaplist F +++GLIBC_2.3 xdr_pointer F +++GLIBC_2.3 xdr_reference F +++GLIBC_2.3 xdr_rejected_reply F +++GLIBC_2.3 xdr_replymsg F +++GLIBC_2.3 xdr_rmtcall_args F +++GLIBC_2.3 xdr_rmtcallres F +++GLIBC_2.3 xdr_short F +++GLIBC_2.3 xdr_sizeof F +++GLIBC_2.3 xdr_string F +++GLIBC_2.3 xdr_u_char F +++GLIBC_2.3 xdr_u_hyper F +++GLIBC_2.3 xdr_u_int F +++GLIBC_2.3 xdr_u_long F +++GLIBC_2.3 xdr_u_longlong_t F +++GLIBC_2.3 xdr_u_short F +++GLIBC_2.3 xdr_uint16_t F +++GLIBC_2.3 xdr_uint32_t F +++GLIBC_2.3 xdr_uint64_t F +++GLIBC_2.3 xdr_uint8_t F +++GLIBC_2.3 xdr_union F +++GLIBC_2.3 xdr_unixcred F +++GLIBC_2.3 xdr_vector F +++GLIBC_2.3 xdr_void F +++GLIBC_2.3 xdr_wrapstring F +++GLIBC_2.3 xdrmem_create F +++GLIBC_2.3 xdrrec_create F +++GLIBC_2.3 xdrrec_endofrecord F +++GLIBC_2.3 xdrrec_eof F +++GLIBC_2.3 xdrrec_skiprecord F +++GLIBC_2.3 xdrstdio_create F +++GLIBC_2.3 xencrypt F +++GLIBC_2.3 xprt_register F +++GLIBC_2.3 xprt_unregister F +++GLIBC_2.3.2 GLIBC_2.3.2 A +++GLIBC_2.3.2 __register_atfork F +++GLIBC_2.3.2 pthread_cond_broadcast F +++GLIBC_2.3.2 pthread_cond_destroy F +++GLIBC_2.3.2 pthread_cond_init F +++GLIBC_2.3.2 pthread_cond_signal F +++GLIBC_2.3.2 pthread_cond_timedwait F +++GLIBC_2.3.2 pthread_cond_wait F +++GLIBC_2.3.2 strptime_l F +++GLIBC_2.3.3 GLIBC_2.3.3 A +++GLIBC_2.3.3 inet6_option_alloc F +++GLIBC_2.3.3 inet6_option_append F +++GLIBC_2.3.3 inet6_option_find F +++GLIBC_2.3.3 inet6_option_init F +++GLIBC_2.3.3 inet6_option_next F +++GLIBC_2.3.3 inet6_option_space F +++GLIBC_2.3.3 nftw F +++GLIBC_2.3.3 nftw64 F +++GLIBC_2.3.3 remap_file_pages F +++GLIBC_2.3.3 sched_getaffinity F +++GLIBC_2.3.3 sched_setaffinity F +++GLIBC_2.3.3 semtimedop F +++GLIBC_2.3.3 strtoll_l F +++GLIBC_2.3.3 strtoull_l F +++GLIBC_2.3.4 GLIBC_2.3.4 A +++GLIBC_2.3.4 __chk_fail F +++GLIBC_2.3.4 __fprintf_chk F +++GLIBC_2.3.4 __gets_chk F +++GLIBC_2.3.4 __libc_sa_len F +++GLIBC_2.3.4 __memcpy_chk F +++GLIBC_2.3.4 __memmove_chk F +++GLIBC_2.3.4 __mempcpy_chk F +++GLIBC_2.3.4 __memset_chk F +++GLIBC_2.3.4 __printf_chk F +++GLIBC_2.3.4 __snprintf_chk F +++GLIBC_2.3.4 __sprintf_chk F +++GLIBC_2.3.4 __stpcpy_chk F +++GLIBC_2.3.4 __strcat_chk F +++GLIBC_2.3.4 __strcpy_chk F +++GLIBC_2.3.4 __strncat_chk F +++GLIBC_2.3.4 __strncpy_chk F +++GLIBC_2.3.4 __vfprintf_chk F +++GLIBC_2.3.4 __vprintf_chk F +++GLIBC_2.3.4 __vsnprintf_chk F +++GLIBC_2.3.4 __vsprintf_chk F +++GLIBC_2.3.4 __xpg_strerror_r F +++GLIBC_2.3.4 _sys_errlist D 0x2e8 +++GLIBC_2.3.4 _sys_nerr D 0x4 +++GLIBC_2.3.4 fhstat64 F +++GLIBC_2.3.4 fhstatfs64 F +++GLIBC_2.3.4 getipv4sourcefilter F +++GLIBC_2.3.4 getsourcefilter F +++GLIBC_2.3.4 iopl F +++GLIBC_2.3.4 kevent F +++GLIBC_2.3.4 kqueue F +++GLIBC_2.3.4 regexec F +++GLIBC_2.3.4 setipv4sourcefilter F +++GLIBC_2.3.4 setsourcefilter F +++GLIBC_2.3.4 sys_errlist D 0x2e8 +++GLIBC_2.3.4 sys_nerr D 0x4 +++GLIBC_2.3.4 xdr_quad_t F +++GLIBC_2.3.4 xdr_u_quad_t F +++GLIBC_2.4 GLIBC_2.4 A +++GLIBC_2.4 __confstr_chk F +++GLIBC_2.4 __fgets_chk F +++GLIBC_2.4 __fgets_unlocked_chk F +++GLIBC_2.4 __fgetws_chk F +++GLIBC_2.4 __fgetws_unlocked_chk F +++GLIBC_2.4 __fwprintf_chk F +++GLIBC_2.4 __fxstatat F +++GLIBC_2.4 __fxstatat64 F +++GLIBC_2.4 __getcwd_chk F +++GLIBC_2.4 __getdomainname_chk F +++GLIBC_2.4 __getgroups_chk F +++GLIBC_2.4 __gethostname_chk F +++GLIBC_2.4 __getlogin_r_chk F +++GLIBC_2.4 __getwd_chk F +++GLIBC_2.4 __mbsnrtowcs_chk F +++GLIBC_2.4 __mbsrtowcs_chk F +++GLIBC_2.4 __mbstowcs_chk F +++GLIBC_2.4 __pread64_chk F +++GLIBC_2.4 __pread_chk F +++GLIBC_2.4 __ptsname_r_chk F +++GLIBC_2.4 __read_chk F +++GLIBC_2.4 __readlink_chk F +++GLIBC_2.4 __realpath_chk F +++GLIBC_2.4 __recv_chk F +++GLIBC_2.4 __recvfrom_chk F +++GLIBC_2.4 __stack_chk_fail F +++GLIBC_2.4 __stpncpy_chk F +++GLIBC_2.4 __swprintf_chk F +++GLIBC_2.4 __syslog_chk F +++GLIBC_2.4 __ttyname_r_chk F +++GLIBC_2.4 __vfwprintf_chk F +++GLIBC_2.4 __vswprintf_chk F +++GLIBC_2.4 __vsyslog_chk F +++GLIBC_2.4 __vwprintf_chk F +++GLIBC_2.4 __wcpcpy_chk F +++GLIBC_2.4 __wcpncpy_chk F +++GLIBC_2.4 __wcrtomb_chk F +++GLIBC_2.4 __wcscat_chk F +++GLIBC_2.4 __wcscpy_chk F +++GLIBC_2.4 __wcsncat_chk F +++GLIBC_2.4 __wcsncpy_chk F +++GLIBC_2.4 __wcsnrtombs_chk F +++GLIBC_2.4 __wcsrtombs_chk F +++GLIBC_2.4 __wcstombs_chk F +++GLIBC_2.4 __wctomb_chk F +++GLIBC_2.4 __wmemcpy_chk F +++GLIBC_2.4 __wmemmove_chk F +++GLIBC_2.4 __wmempcpy_chk F +++GLIBC_2.4 __wmemset_chk F +++GLIBC_2.4 __wprintf_chk F +++GLIBC_2.4 __xmknodat F +++GLIBC_2.4 eaccess F +++GLIBC_2.4 faccessat F +++GLIBC_2.4 fchmodat F +++GLIBC_2.4 fchownat F +++GLIBC_2.4 fdopendir F +++GLIBC_2.4 futimesat F +++GLIBC_2.4 linkat F +++GLIBC_2.4 mkdirat F +++GLIBC_2.4 mkfifoat F +++GLIBC_2.4 open_wmemstream F +++GLIBC_2.4 openat F +++GLIBC_2.4 openat64 F +++GLIBC_2.4 ppoll F +++GLIBC_2.4 readlinkat F +++GLIBC_2.4 renameat F +++GLIBC_2.4 symlinkat F +++GLIBC_2.4 unlinkat F +++GLIBC_2.5 GLIBC_2.5 A +++GLIBC_2.5 __readlinkat_chk F +++GLIBC_2.5 inet6_opt_append F +++GLIBC_2.5 inet6_opt_find F +++GLIBC_2.5 inet6_opt_finish F +++GLIBC_2.5 inet6_opt_get_val F +++GLIBC_2.5 inet6_opt_init F +++GLIBC_2.5 inet6_opt_next F +++GLIBC_2.5 inet6_opt_set_val F +++GLIBC_2.5 inet6_rth_add F +++GLIBC_2.5 inet6_rth_getaddr F +++GLIBC_2.5 inet6_rth_init F +++GLIBC_2.5 inet6_rth_reverse F +++GLIBC_2.5 inet6_rth_segments F +++GLIBC_2.5 inet6_rth_space F +++GLIBC_2.6 GLIBC_2.6 A +++GLIBC_2.6 __sched_cpucount F +++GLIBC_2.6 futimens F +++GLIBC_2.6 strerror_l F +++GLIBC_2.6 utimensat F +++GLIBC_2.7 GLIBC_2.7 A +++GLIBC_2.7 __fread_chk F +++GLIBC_2.7 __fread_unlocked_chk F +++GLIBC_2.7 __isoc99_fscanf F +++GLIBC_2.7 __isoc99_fwscanf F +++GLIBC_2.7 __isoc99_scanf F +++GLIBC_2.7 __isoc99_sscanf F +++GLIBC_2.7 __isoc99_swscanf F +++GLIBC_2.7 __isoc99_vfscanf F +++GLIBC_2.7 __isoc99_vfwscanf F +++GLIBC_2.7 __isoc99_vscanf F +++GLIBC_2.7 __isoc99_vsscanf F +++GLIBC_2.7 __isoc99_vswscanf F +++GLIBC_2.7 __isoc99_vwscanf F +++GLIBC_2.7 __isoc99_wscanf F +++GLIBC_2.7 __open64_2 F +++GLIBC_2.7 __open_2 F +++GLIBC_2.7 __openat64_2 F +++GLIBC_2.7 __openat_2 F +++GLIBC_2.7 __sched_cpualloc F +++GLIBC_2.7 __sched_cpufree F +++GLIBC_2.7 mkostemp F +++GLIBC_2.7 mkostemp64 F +++GLIBC_2.8 GLIBC_2.8 A +++GLIBC_2.8 __asprintf_chk F +++GLIBC_2.8 __dprintf_chk F +++GLIBC_2.8 __obstack_printf_chk F +++GLIBC_2.8 __obstack_vprintf_chk F +++GLIBC_2.8 __vasprintf_chk F +++GLIBC_2.8 __vdprintf_chk F +++GLIBC_2.8 qsort_r F +++GLIBC_2.9 GLIBC_2.9 A +++GLIBC_2.9 dup3 F +++GLIBC_2.9 pipe2 F ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/libcrypt.abilist ++@@ -0,0 +1,8 @@ +++GLIBC_2.3 GLIBC_2.3 A +++GLIBC_2.3 crypt F +++GLIBC_2.3 crypt_r F +++GLIBC_2.3 encrypt F +++GLIBC_2.3 encrypt_r F +++GLIBC_2.3 fcrypt F +++GLIBC_2.3 setkey F +++GLIBC_2.3 setkey_r F ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/libdl.abilist ++@@ -0,0 +1,12 @@ +++GLIBC_2.3 GLIBC_2.3 A +++GLIBC_2.3 dladdr F +++GLIBC_2.3 dlclose F +++GLIBC_2.3 dlerror F +++GLIBC_2.3 dlopen F +++GLIBC_2.3 dlsym F +++GLIBC_2.3 dlvsym F +++GLIBC_2.3.3 GLIBC_2.3.3 A +++GLIBC_2.3.3 dladdr1 F +++GLIBC_2.3.3 dlinfo F +++GLIBC_2.3.4 GLIBC_2.3.4 A +++GLIBC_2.3.4 dlmopen F ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/libm.abilist ++@@ -0,0 +1,465 @@ +++GLIBC_2.15 GLIBC_2.15 A +++GLIBC_2.15 __acos_finite F +++GLIBC_2.15 __acosf_finite F +++GLIBC_2.15 __acosh_finite F +++GLIBC_2.15 __acoshf_finite F +++GLIBC_2.15 __acoshl_finite F +++GLIBC_2.15 __acosl_finite F +++GLIBC_2.15 __asin_finite F +++GLIBC_2.15 __asinf_finite F +++GLIBC_2.15 __asinl_finite F +++GLIBC_2.15 __atan2_finite F +++GLIBC_2.15 __atan2f_finite F +++GLIBC_2.15 __atan2l_finite F +++GLIBC_2.15 __atanh_finite F +++GLIBC_2.15 __atanhf_finite F +++GLIBC_2.15 __atanhl_finite F +++GLIBC_2.15 __cosh_finite F +++GLIBC_2.15 __coshf_finite F +++GLIBC_2.15 __coshl_finite F +++GLIBC_2.15 __exp10_finite F +++GLIBC_2.15 __exp10f_finite F +++GLIBC_2.15 __exp10l_finite F +++GLIBC_2.15 __exp2_finite F +++GLIBC_2.15 __exp2f_finite F +++GLIBC_2.15 __exp2l_finite F +++GLIBC_2.15 __exp_finite F +++GLIBC_2.15 __expf_finite F +++GLIBC_2.15 __expl_finite F +++GLIBC_2.15 __fmod_finite F +++GLIBC_2.15 __fmodf_finite F +++GLIBC_2.15 __fmodl_finite F +++GLIBC_2.15 __gamma_r_finite F +++GLIBC_2.15 __gammaf_r_finite F +++GLIBC_2.15 __gammal_r_finite F +++GLIBC_2.15 __hypot_finite F +++GLIBC_2.15 __hypotf_finite F +++GLIBC_2.15 __hypotl_finite F +++GLIBC_2.15 __j0_finite F +++GLIBC_2.15 __j0f_finite F +++GLIBC_2.15 __j0l_finite F +++GLIBC_2.15 __j1_finite F +++GLIBC_2.15 __j1f_finite F +++GLIBC_2.15 __j1l_finite F +++GLIBC_2.15 __jn_finite F +++GLIBC_2.15 __jnf_finite F +++GLIBC_2.15 __jnl_finite F +++GLIBC_2.15 __lgamma_r_finite F +++GLIBC_2.15 __lgammaf_r_finite F +++GLIBC_2.15 __lgammal_r_finite F +++GLIBC_2.15 __log10_finite F +++GLIBC_2.15 __log10f_finite F +++GLIBC_2.15 __log10l_finite F +++GLIBC_2.15 __log2_finite F +++GLIBC_2.15 __log2f_finite F +++GLIBC_2.15 __log2l_finite F +++GLIBC_2.15 __log_finite F +++GLIBC_2.15 __logf_finite F +++GLIBC_2.15 __logl_finite F +++GLIBC_2.15 __pow_finite F +++GLIBC_2.15 __powf_finite F +++GLIBC_2.15 __powl_finite F +++GLIBC_2.15 __remainder_finite F +++GLIBC_2.15 __remainderf_finite F +++GLIBC_2.15 __remainderl_finite F +++GLIBC_2.15 __scalb_finite F +++GLIBC_2.15 __scalbf_finite F +++GLIBC_2.15 __scalbl_finite F +++GLIBC_2.15 __sinh_finite F +++GLIBC_2.15 __sinhf_finite F +++GLIBC_2.15 __sinhl_finite F +++GLIBC_2.15 __sqrt_finite F +++GLIBC_2.15 __sqrtf_finite F +++GLIBC_2.15 __sqrtl_finite F +++GLIBC_2.15 __y0_finite F +++GLIBC_2.15 __y0f_finite F +++GLIBC_2.15 __y0l_finite F +++GLIBC_2.15 __y1_finite F +++GLIBC_2.15 __y1f_finite F +++GLIBC_2.15 __y1l_finite F +++GLIBC_2.15 __yn_finite F +++GLIBC_2.15 __ynf_finite F +++GLIBC_2.15 __ynl_finite F +++GLIBC_2.18 GLIBC_2.18 A +++GLIBC_2.18 __issignaling F +++GLIBC_2.18 __issignalingf F +++GLIBC_2.18 __issignalingl F +++GLIBC_2.23 GLIBC_2.23 A +++GLIBC_2.23 __signgam D 0x4 +++GLIBC_2.23 lgamma F +++GLIBC_2.23 lgammaf F +++GLIBC_2.23 lgammal F +++GLIBC_2.24 GLIBC_2.24 A +++GLIBC_2.24 nextdown F +++GLIBC_2.24 nextdownf F +++GLIBC_2.24 nextdownl F +++GLIBC_2.24 nextup F +++GLIBC_2.24 nextupf F +++GLIBC_2.24 nextupl F +++GLIBC_2.25 GLIBC_2.25 A +++GLIBC_2.25 __iscanonicall F +++GLIBC_2.25 __iseqsig F +++GLIBC_2.25 __iseqsigf F +++GLIBC_2.25 __iseqsigl F +++GLIBC_2.25 canonicalize F +++GLIBC_2.25 canonicalizef F +++GLIBC_2.25 canonicalizel F +++GLIBC_2.25 fegetmode F +++GLIBC_2.25 fesetexcept F +++GLIBC_2.25 fesetmode F +++GLIBC_2.25 fetestexceptflag F +++GLIBC_2.25 fmaxmag F +++GLIBC_2.25 fmaxmagf F +++GLIBC_2.25 fmaxmagl F +++GLIBC_2.25 fminmag F +++GLIBC_2.25 fminmagf F +++GLIBC_2.25 fminmagl F +++GLIBC_2.25 fromfp F +++GLIBC_2.25 fromfpf F +++GLIBC_2.25 fromfpl F +++GLIBC_2.25 fromfpx F +++GLIBC_2.25 fromfpxf F +++GLIBC_2.25 fromfpxl F +++GLIBC_2.25 getpayload F +++GLIBC_2.25 getpayloadf F +++GLIBC_2.25 getpayloadl F +++GLIBC_2.25 llogb F +++GLIBC_2.25 llogbf F +++GLIBC_2.25 llogbl F +++GLIBC_2.25 roundeven F +++GLIBC_2.25 roundevenf F +++GLIBC_2.25 roundevenl F +++GLIBC_2.25 setpayload F +++GLIBC_2.25 setpayloadf F +++GLIBC_2.25 setpayloadl F +++GLIBC_2.25 setpayloadsig F +++GLIBC_2.25 setpayloadsigf F +++GLIBC_2.25 setpayloadsigl F +++GLIBC_2.25 totalorder F +++GLIBC_2.25 totalorderf F +++GLIBC_2.25 totalorderl F +++GLIBC_2.25 totalordermag F +++GLIBC_2.25 totalordermagf F +++GLIBC_2.25 totalordermagl F +++GLIBC_2.25 ufromfp F +++GLIBC_2.25 ufromfpf F +++GLIBC_2.25 ufromfpl F +++GLIBC_2.25 ufromfpx F +++GLIBC_2.25 ufromfpxf F +++GLIBC_2.25 ufromfpxl F +++GLIBC_2.3 GLIBC_2.3 A +++GLIBC_2.3 _LIB_VERSION D 0x4 +++GLIBC_2.3 __clog10 F +++GLIBC_2.3 __clog10f F +++GLIBC_2.3 __clog10l F +++GLIBC_2.3 __finite F +++GLIBC_2.3 __finitef F +++GLIBC_2.3 __finitel F +++GLIBC_2.3 __fpclassify F +++GLIBC_2.3 __fpclassifyf F +++GLIBC_2.3 __fpclassifyl F +++GLIBC_2.3 __signbit F +++GLIBC_2.3 __signbitf F +++GLIBC_2.3 __signbitl F +++GLIBC_2.3 acos F +++GLIBC_2.3 acosf F +++GLIBC_2.3 acosh F +++GLIBC_2.3 acoshf F +++GLIBC_2.3 acoshl F +++GLIBC_2.3 acosl F +++GLIBC_2.3 asin F +++GLIBC_2.3 asinf F +++GLIBC_2.3 asinh F +++GLIBC_2.3 asinhf F +++GLIBC_2.3 asinhl F +++GLIBC_2.3 asinl F +++GLIBC_2.3 atan F +++GLIBC_2.3 atan2 F +++GLIBC_2.3 atan2f F +++GLIBC_2.3 atan2l F +++GLIBC_2.3 atanf F +++GLIBC_2.3 atanh F +++GLIBC_2.3 atanhf F +++GLIBC_2.3 atanhl F +++GLIBC_2.3 atanl F +++GLIBC_2.3 cabs F +++GLIBC_2.3 cabsf F +++GLIBC_2.3 cabsl F +++GLIBC_2.3 cacos F +++GLIBC_2.3 cacosf F +++GLIBC_2.3 cacosh F +++GLIBC_2.3 cacoshf F +++GLIBC_2.3 cacoshl F +++GLIBC_2.3 cacosl F +++GLIBC_2.3 carg F +++GLIBC_2.3 cargf F +++GLIBC_2.3 cargl F +++GLIBC_2.3 casin F +++GLIBC_2.3 casinf F +++GLIBC_2.3 casinh F +++GLIBC_2.3 casinhf F +++GLIBC_2.3 casinhl F +++GLIBC_2.3 casinl F +++GLIBC_2.3 catan F +++GLIBC_2.3 catanf F +++GLIBC_2.3 catanh F +++GLIBC_2.3 catanhf F +++GLIBC_2.3 catanhl F +++GLIBC_2.3 catanl F +++GLIBC_2.3 cbrt F +++GLIBC_2.3 cbrtf F +++GLIBC_2.3 cbrtl F +++GLIBC_2.3 ccos F +++GLIBC_2.3 ccosf F +++GLIBC_2.3 ccosh F +++GLIBC_2.3 ccoshf F +++GLIBC_2.3 ccoshl F +++GLIBC_2.3 ccosl F +++GLIBC_2.3 ceil F +++GLIBC_2.3 ceilf F +++GLIBC_2.3 ceill F +++GLIBC_2.3 cexp F +++GLIBC_2.3 cexpf F +++GLIBC_2.3 cexpl F +++GLIBC_2.3 cimag F +++GLIBC_2.3 cimagf F +++GLIBC_2.3 cimagl F +++GLIBC_2.3 clog F +++GLIBC_2.3 clog10 F +++GLIBC_2.3 clog10f F +++GLIBC_2.3 clog10l F +++GLIBC_2.3 clogf F +++GLIBC_2.3 clogl F +++GLIBC_2.3 conj F +++GLIBC_2.3 conjf F +++GLIBC_2.3 conjl F +++GLIBC_2.3 copysign F +++GLIBC_2.3 copysignf F +++GLIBC_2.3 copysignl F +++GLIBC_2.3 cos F +++GLIBC_2.3 cosf F +++GLIBC_2.3 cosh F +++GLIBC_2.3 coshf F +++GLIBC_2.3 coshl F +++GLIBC_2.3 cosl F +++GLIBC_2.3 cpow F +++GLIBC_2.3 cpowf F +++GLIBC_2.3 cpowl F +++GLIBC_2.3 cproj F +++GLIBC_2.3 cprojf F +++GLIBC_2.3 cprojl F +++GLIBC_2.3 creal F +++GLIBC_2.3 crealf F +++GLIBC_2.3 creall F +++GLIBC_2.3 csin F +++GLIBC_2.3 csinf F +++GLIBC_2.3 csinh F +++GLIBC_2.3 csinhf F +++GLIBC_2.3 csinhl F +++GLIBC_2.3 csinl F +++GLIBC_2.3 csqrt F +++GLIBC_2.3 csqrtf F +++GLIBC_2.3 csqrtl F +++GLIBC_2.3 ctan F +++GLIBC_2.3 ctanf F +++GLIBC_2.3 ctanh F +++GLIBC_2.3 ctanhf F +++GLIBC_2.3 ctanhl F +++GLIBC_2.3 ctanl F +++GLIBC_2.3 drem F +++GLIBC_2.3 dremf F +++GLIBC_2.3 dreml F +++GLIBC_2.3 erf F +++GLIBC_2.3 erfc F +++GLIBC_2.3 erfcf F +++GLIBC_2.3 erfcl F +++GLIBC_2.3 erff F +++GLIBC_2.3 erfl F +++GLIBC_2.3 exp F +++GLIBC_2.3 exp10 F +++GLIBC_2.3 exp10f F +++GLIBC_2.3 exp10l F +++GLIBC_2.3 exp2 F +++GLIBC_2.3 exp2f F +++GLIBC_2.3 exp2l F +++GLIBC_2.3 expf F +++GLIBC_2.3 expl F +++GLIBC_2.3 expm1 F +++GLIBC_2.3 expm1f F +++GLIBC_2.3 expm1l F +++GLIBC_2.3 fabs F +++GLIBC_2.3 fabsf F +++GLIBC_2.3 fabsl F +++GLIBC_2.3 fdim F +++GLIBC_2.3 fdimf F +++GLIBC_2.3 fdiml F +++GLIBC_2.3 feclearexcept F +++GLIBC_2.3 fedisableexcept F +++GLIBC_2.3 feenableexcept F +++GLIBC_2.3 fegetenv F +++GLIBC_2.3 fegetexcept F +++GLIBC_2.3 fegetexceptflag F +++GLIBC_2.3 fegetround F +++GLIBC_2.3 feholdexcept F +++GLIBC_2.3 feraiseexcept F +++GLIBC_2.3 fesetenv F +++GLIBC_2.3 fesetexceptflag F +++GLIBC_2.3 fesetround F +++GLIBC_2.3 fetestexcept F +++GLIBC_2.3 feupdateenv F +++GLIBC_2.3 finite F +++GLIBC_2.3 finitef F +++GLIBC_2.3 finitel F +++GLIBC_2.3 floor F +++GLIBC_2.3 floorf F +++GLIBC_2.3 floorl F +++GLIBC_2.3 fma F +++GLIBC_2.3 fmaf F +++GLIBC_2.3 fmal F +++GLIBC_2.3 fmax F +++GLIBC_2.3 fmaxf F +++GLIBC_2.3 fmaxl F +++GLIBC_2.3 fmin F +++GLIBC_2.3 fminf F +++GLIBC_2.3 fminl F +++GLIBC_2.3 fmod F +++GLIBC_2.3 fmodf F +++GLIBC_2.3 fmodl F +++GLIBC_2.3 frexp F +++GLIBC_2.3 frexpf F +++GLIBC_2.3 frexpl F +++GLIBC_2.3 gamma F +++GLIBC_2.3 gammaf F +++GLIBC_2.3 gammal F +++GLIBC_2.3 hypot F +++GLIBC_2.3 hypotf F +++GLIBC_2.3 hypotl F +++GLIBC_2.3 ilogb F +++GLIBC_2.3 ilogbf F +++GLIBC_2.3 ilogbl F +++GLIBC_2.3 j0 F +++GLIBC_2.3 j0f F +++GLIBC_2.3 j0l F +++GLIBC_2.3 j1 F +++GLIBC_2.3 j1f F +++GLIBC_2.3 j1l F +++GLIBC_2.3 jn F +++GLIBC_2.3 jnf F +++GLIBC_2.3 jnl F +++GLIBC_2.3 ldexp F +++GLIBC_2.3 ldexpf F +++GLIBC_2.3 ldexpl F +++GLIBC_2.3 lgamma F +++GLIBC_2.3 lgamma_r F +++GLIBC_2.3 lgammaf F +++GLIBC_2.3 lgammaf_r F +++GLIBC_2.3 lgammal F +++GLIBC_2.3 lgammal_r F +++GLIBC_2.3 llrint F +++GLIBC_2.3 llrintf F +++GLIBC_2.3 llrintl F +++GLIBC_2.3 llround F +++GLIBC_2.3 llroundf F +++GLIBC_2.3 llroundl F +++GLIBC_2.3 log F +++GLIBC_2.3 log10 F +++GLIBC_2.3 log10f F +++GLIBC_2.3 log10l F +++GLIBC_2.3 log1p F +++GLIBC_2.3 log1pf F +++GLIBC_2.3 log1pl F +++GLIBC_2.3 log2 F +++GLIBC_2.3 log2f F +++GLIBC_2.3 log2l F +++GLIBC_2.3 logb F +++GLIBC_2.3 logbf F +++GLIBC_2.3 logbl F +++GLIBC_2.3 logf F +++GLIBC_2.3 logl F +++GLIBC_2.3 lrint F +++GLIBC_2.3 lrintf F +++GLIBC_2.3 lrintl F +++GLIBC_2.3 lround F +++GLIBC_2.3 lroundf F +++GLIBC_2.3 lroundl F +++GLIBC_2.3 matherr F +++GLIBC_2.3 modf F +++GLIBC_2.3 modff F +++GLIBC_2.3 modfl F +++GLIBC_2.3 nan F +++GLIBC_2.3 nanf F +++GLIBC_2.3 nanl F +++GLIBC_2.3 nearbyint F +++GLIBC_2.3 nearbyintf F +++GLIBC_2.3 nearbyintl F +++GLIBC_2.3 nextafter F +++GLIBC_2.3 nextafterf F +++GLIBC_2.3 nextafterl F +++GLIBC_2.3 nexttoward F +++GLIBC_2.3 nexttowardf F +++GLIBC_2.3 nexttowardl F +++GLIBC_2.3 pow F +++GLIBC_2.3 pow10 F +++GLIBC_2.3 pow10f F +++GLIBC_2.3 pow10l F +++GLIBC_2.3 powf F +++GLIBC_2.3 powl F +++GLIBC_2.3 remainder F +++GLIBC_2.3 remainderf F +++GLIBC_2.3 remainderl F +++GLIBC_2.3 remquo F +++GLIBC_2.3 remquof F +++GLIBC_2.3 remquol F +++GLIBC_2.3 rint F +++GLIBC_2.3 rintf F +++GLIBC_2.3 rintl F +++GLIBC_2.3 round F +++GLIBC_2.3 roundf F +++GLIBC_2.3 roundl F +++GLIBC_2.3 scalb F +++GLIBC_2.3 scalbf F +++GLIBC_2.3 scalbl F +++GLIBC_2.3 scalbln F +++GLIBC_2.3 scalblnf F +++GLIBC_2.3 scalblnl F +++GLIBC_2.3 scalbn F +++GLIBC_2.3 scalbnf F +++GLIBC_2.3 scalbnl F +++GLIBC_2.3 signgam D 0x4 +++GLIBC_2.3 significand F +++GLIBC_2.3 significandf F +++GLIBC_2.3 significandl F +++GLIBC_2.3 sin F +++GLIBC_2.3 sincos F +++GLIBC_2.3 sincosf F +++GLIBC_2.3 sincosl F +++GLIBC_2.3 sinf F +++GLIBC_2.3 sinh F +++GLIBC_2.3 sinhf F +++GLIBC_2.3 sinhl F +++GLIBC_2.3 sinl F +++GLIBC_2.3 sqrt F +++GLIBC_2.3 sqrtf F +++GLIBC_2.3 sqrtl F +++GLIBC_2.3 tan F +++GLIBC_2.3 tanf F +++GLIBC_2.3 tanh F +++GLIBC_2.3 tanhf F +++GLIBC_2.3 tanhl F +++GLIBC_2.3 tanl F +++GLIBC_2.3 tgamma F +++GLIBC_2.3 tgammaf F +++GLIBC_2.3 tgammal F +++GLIBC_2.3 trunc F +++GLIBC_2.3 truncf F +++GLIBC_2.3 truncl F +++GLIBC_2.3 y0 F +++GLIBC_2.3 y0f F +++GLIBC_2.3 y0l F +++GLIBC_2.3 y1 F +++GLIBC_2.3 y1f F +++GLIBC_2.3 y1l F +++GLIBC_2.3 yn F +++GLIBC_2.3 ynf F +++GLIBC_2.3 ynl F +++GLIBC_2.4 GLIBC_2.4 A ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/libnsl.abilist ++@@ -0,0 +1,122 @@ +++GLIBC_2.3 GLIBC_2.3 A +++GLIBC_2.3 __free_fdresult F +++GLIBC_2.3 __nis_default_access F +++GLIBC_2.3 __nis_default_group F +++GLIBC_2.3 __nis_default_owner F +++GLIBC_2.3 __nis_default_ttl F +++GLIBC_2.3 __nis_finddirectory F +++GLIBC_2.3 __nis_hash F +++GLIBC_2.3 __nisbind_connect F +++GLIBC_2.3 __nisbind_create F +++GLIBC_2.3 __nisbind_destroy F +++GLIBC_2.3 __nisbind_next F +++GLIBC_2.3 __yp_check F +++GLIBC_2.3 nis_add F +++GLIBC_2.3 nis_add_entry F +++GLIBC_2.3 nis_addmember F +++GLIBC_2.3 nis_checkpoint F +++GLIBC_2.3 nis_clone_directory F +++GLIBC_2.3 nis_clone_object F +++GLIBC_2.3 nis_clone_result F +++GLIBC_2.3 nis_creategroup F +++GLIBC_2.3 nis_destroy_object F +++GLIBC_2.3 nis_destroygroup F +++GLIBC_2.3 nis_dir_cmp F +++GLIBC_2.3 nis_domain_of F +++GLIBC_2.3 nis_domain_of_r F +++GLIBC_2.3 nis_first_entry F +++GLIBC_2.3 nis_free_directory F +++GLIBC_2.3 nis_free_object F +++GLIBC_2.3 nis_free_request F +++GLIBC_2.3 nis_freenames F +++GLIBC_2.3 nis_freeresult F +++GLIBC_2.3 nis_freeservlist F +++GLIBC_2.3 nis_freetags F +++GLIBC_2.3 nis_getnames F +++GLIBC_2.3 nis_getservlist F +++GLIBC_2.3 nis_ismember F +++GLIBC_2.3 nis_leaf_of F +++GLIBC_2.3 nis_leaf_of_r F +++GLIBC_2.3 nis_lerror F +++GLIBC_2.3 nis_list F +++GLIBC_2.3 nis_local_directory F +++GLIBC_2.3 nis_local_group F +++GLIBC_2.3 nis_local_host F +++GLIBC_2.3 nis_local_principal F +++GLIBC_2.3 nis_lookup F +++GLIBC_2.3 nis_mkdir F +++GLIBC_2.3 nis_modify F +++GLIBC_2.3 nis_modify_entry F +++GLIBC_2.3 nis_name_of F +++GLIBC_2.3 nis_name_of_r F +++GLIBC_2.3 nis_next_entry F +++GLIBC_2.3 nis_perror F +++GLIBC_2.3 nis_ping F +++GLIBC_2.3 nis_print_directory F +++GLIBC_2.3 nis_print_entry F +++GLIBC_2.3 nis_print_group F +++GLIBC_2.3 nis_print_group_entry F +++GLIBC_2.3 nis_print_link F +++GLIBC_2.3 nis_print_object F +++GLIBC_2.3 nis_print_result F +++GLIBC_2.3 nis_print_rights F +++GLIBC_2.3 nis_print_table F +++GLIBC_2.3 nis_read_obj F +++GLIBC_2.3 nis_remove F +++GLIBC_2.3 nis_remove_entry F +++GLIBC_2.3 nis_removemember F +++GLIBC_2.3 nis_rmdir F +++GLIBC_2.3 nis_servstate F +++GLIBC_2.3 nis_sperrno F +++GLIBC_2.3 nis_sperror F +++GLIBC_2.3 nis_sperror_r F +++GLIBC_2.3 nis_stats F +++GLIBC_2.3 nis_verifygroup F +++GLIBC_2.3 nis_write_obj F +++GLIBC_2.3 readColdStartFile F +++GLIBC_2.3 writeColdStartFile F +++GLIBC_2.3 xdr_cback_data F +++GLIBC_2.3 xdr_domainname F +++GLIBC_2.3 xdr_keydat F +++GLIBC_2.3 xdr_mapname F +++GLIBC_2.3 xdr_obj_p F +++GLIBC_2.3 xdr_peername F +++GLIBC_2.3 xdr_valdat F +++GLIBC_2.3 xdr_yp_buf F +++GLIBC_2.3 xdr_ypall F +++GLIBC_2.3 xdr_ypbind_binding F +++GLIBC_2.3 xdr_ypbind_resp F +++GLIBC_2.3 xdr_ypbind_resptype F +++GLIBC_2.3 xdr_ypbind_setdom F +++GLIBC_2.3 xdr_ypdelete_args F +++GLIBC_2.3 xdr_ypmap_parms F +++GLIBC_2.3 xdr_ypmaplist F +++GLIBC_2.3 xdr_yppush_status F +++GLIBC_2.3 xdr_yppushresp_xfr F +++GLIBC_2.3 xdr_ypreq_key F +++GLIBC_2.3 xdr_ypreq_nokey F +++GLIBC_2.3 xdr_ypreq_xfr F +++GLIBC_2.3 xdr_ypresp_all F +++GLIBC_2.3 xdr_ypresp_key_val F +++GLIBC_2.3 xdr_ypresp_maplist F +++GLIBC_2.3 xdr_ypresp_master F +++GLIBC_2.3 xdr_ypresp_order F +++GLIBC_2.3 xdr_ypresp_val F +++GLIBC_2.3 xdr_ypresp_xfr F +++GLIBC_2.3 xdr_ypstat F +++GLIBC_2.3 xdr_ypupdate_args F +++GLIBC_2.3 xdr_ypxfrstat F +++GLIBC_2.3 yp_all F +++GLIBC_2.3 yp_bind F +++GLIBC_2.3 yp_first F +++GLIBC_2.3 yp_get_default_domain F +++GLIBC_2.3 yp_maplist F +++GLIBC_2.3 yp_master F +++GLIBC_2.3 yp_match F +++GLIBC_2.3 yp_next F +++GLIBC_2.3 yp_order F +++GLIBC_2.3 yp_unbind F +++GLIBC_2.3 yp_update F +++GLIBC_2.3 ypbinderr_string F +++GLIBC_2.3 yperr_string F +++GLIBC_2.3 ypprot_err F ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/libpthread.abilist ++@@ -0,0 +1,227 @@ +++GLIBC_2.12 GLIBC_2.12 A +++GLIBC_2.12 pthread_getname_np F +++GLIBC_2.12 pthread_setname_np F +++GLIBC_2.18 GLIBC_2.18 A +++GLIBC_2.18 pthread_getattr_default_np F +++GLIBC_2.18 pthread_setattr_default_np F +++GLIBC_2.3 GLIBC_2.3 A +++GLIBC_2.3 _IO_flockfile F +++GLIBC_2.3 _IO_ftrylockfile F +++GLIBC_2.3 _IO_funlockfile F +++GLIBC_2.3 __close F +++GLIBC_2.3 __connect F +++GLIBC_2.3 __errno_location F +++GLIBC_2.3 __fcntl F +++GLIBC_2.3 __fork F +++GLIBC_2.3 __h_errno_location F +++GLIBC_2.3 __libc_allocate_rtsig F +++GLIBC_2.3 __libc_current_sigrtmax F +++GLIBC_2.3 __libc_current_sigrtmin F +++GLIBC_2.3 __lseek F +++GLIBC_2.3 __nanosleep F +++GLIBC_2.3 __open F +++GLIBC_2.3 __open64 F +++GLIBC_2.3 __pread64 F +++GLIBC_2.3 __pthread_getspecific F +++GLIBC_2.3 __pthread_key_create F +++GLIBC_2.3 __pthread_mutex_destroy F +++GLIBC_2.3 __pthread_mutex_init F +++GLIBC_2.3 __pthread_mutex_lock F +++GLIBC_2.3 __pthread_mutex_trylock F +++GLIBC_2.3 __pthread_mutex_unlock F +++GLIBC_2.3 __pthread_mutexattr_destroy F +++GLIBC_2.3 __pthread_mutexattr_init F +++GLIBC_2.3 __pthread_mutexattr_settype F +++GLIBC_2.3 __pthread_once F +++GLIBC_2.3 __pthread_rwlock_destroy F +++GLIBC_2.3 __pthread_rwlock_init F +++GLIBC_2.3 __pthread_rwlock_rdlock F +++GLIBC_2.3 __pthread_rwlock_tryrdlock F +++GLIBC_2.3 __pthread_rwlock_trywrlock F +++GLIBC_2.3 __pthread_rwlock_unlock F +++GLIBC_2.3 __pthread_rwlock_wrlock F +++GLIBC_2.3 __pthread_setspecific F +++GLIBC_2.3 __pwrite64 F +++GLIBC_2.3 __read F +++GLIBC_2.3 __res_state F +++GLIBC_2.3 __send F +++GLIBC_2.3 __sigaction F +++GLIBC_2.3 __vfork F +++GLIBC_2.3 __wait F +++GLIBC_2.3 __write F +++GLIBC_2.3 _pthread_cleanup_pop F +++GLIBC_2.3 _pthread_cleanup_pop_restore F +++GLIBC_2.3 _pthread_cleanup_push F +++GLIBC_2.3 _pthread_cleanup_push_defer F +++GLIBC_2.3 accept F +++GLIBC_2.3 close F +++GLIBC_2.3 connect F +++GLIBC_2.3 fcntl F +++GLIBC_2.3 flockfile F +++GLIBC_2.3 fork F +++GLIBC_2.3 fsync F +++GLIBC_2.3 ftrylockfile F +++GLIBC_2.3 funlockfile F +++GLIBC_2.3 longjmp F +++GLIBC_2.3 lseek F +++GLIBC_2.3 lseek64 F +++GLIBC_2.3 msync F +++GLIBC_2.3 nanosleep F +++GLIBC_2.3 open F +++GLIBC_2.3 open64 F +++GLIBC_2.3 pause F +++GLIBC_2.3 pread F +++GLIBC_2.3 pread64 F +++GLIBC_2.3 pthread_atfork F +++GLIBC_2.3 pthread_attr_destroy F +++GLIBC_2.3 pthread_attr_getdetachstate F +++GLIBC_2.3 pthread_attr_getguardsize F +++GLIBC_2.3 pthread_attr_getinheritsched F +++GLIBC_2.3 pthread_attr_getschedparam F +++GLIBC_2.3 pthread_attr_getschedpolicy F +++GLIBC_2.3 pthread_attr_getscope F +++GLIBC_2.3 pthread_attr_getstack F +++GLIBC_2.3 pthread_attr_getstackaddr F +++GLIBC_2.3 pthread_attr_getstacksize F +++GLIBC_2.3 pthread_attr_init F +++GLIBC_2.3 pthread_attr_setdetachstate F +++GLIBC_2.3 pthread_attr_setguardsize F +++GLIBC_2.3 pthread_attr_setinheritsched F +++GLIBC_2.3 pthread_attr_setschedparam F +++GLIBC_2.3 pthread_attr_setschedpolicy F +++GLIBC_2.3 pthread_attr_setscope F +++GLIBC_2.3 pthread_attr_setstack F +++GLIBC_2.3 pthread_attr_setstackaddr F +++GLIBC_2.3 pthread_attr_setstacksize F +++GLIBC_2.3 pthread_barrier_destroy F +++GLIBC_2.3 pthread_barrier_init F +++GLIBC_2.3 pthread_barrier_wait F +++GLIBC_2.3 pthread_barrierattr_destroy F +++GLIBC_2.3 pthread_barrierattr_init F +++GLIBC_2.3 pthread_barrierattr_setpshared F +++GLIBC_2.3 pthread_cancel F +++GLIBC_2.3 pthread_cond_broadcast F +++GLIBC_2.3 pthread_cond_destroy F +++GLIBC_2.3 pthread_cond_init F +++GLIBC_2.3 pthread_cond_signal F +++GLIBC_2.3 pthread_cond_timedwait F +++GLIBC_2.3 pthread_cond_wait F +++GLIBC_2.3 pthread_condattr_destroy F +++GLIBC_2.3 pthread_condattr_getpshared F +++GLIBC_2.3 pthread_condattr_init F +++GLIBC_2.3 pthread_condattr_setpshared F +++GLIBC_2.3 pthread_create F +++GLIBC_2.3 pthread_detach F +++GLIBC_2.3 pthread_equal F +++GLIBC_2.3 pthread_exit F +++GLIBC_2.3 pthread_getattr_np F +++GLIBC_2.3 pthread_getconcurrency F +++GLIBC_2.3 pthread_getcpuclockid F +++GLIBC_2.3 pthread_getschedparam F +++GLIBC_2.3 pthread_getspecific F +++GLIBC_2.3 pthread_join F +++GLIBC_2.3 pthread_key_create F +++GLIBC_2.3 pthread_key_delete F +++GLIBC_2.3 pthread_kill F +++GLIBC_2.3 pthread_kill_other_threads_np F +++GLIBC_2.3 pthread_mutex_destroy F +++GLIBC_2.3 pthread_mutex_init F +++GLIBC_2.3 pthread_mutex_lock F +++GLIBC_2.3 pthread_mutex_timedlock F +++GLIBC_2.3 pthread_mutex_trylock F +++GLIBC_2.3 pthread_mutex_unlock F +++GLIBC_2.3 pthread_mutexattr_destroy F +++GLIBC_2.3 pthread_mutexattr_getkind_np F +++GLIBC_2.3 pthread_mutexattr_getpshared F +++GLIBC_2.3 pthread_mutexattr_gettype F +++GLIBC_2.3 pthread_mutexattr_init F +++GLIBC_2.3 pthread_mutexattr_setkind_np F +++GLIBC_2.3 pthread_mutexattr_setpshared F +++GLIBC_2.3 pthread_mutexattr_settype F +++GLIBC_2.3 pthread_once F +++GLIBC_2.3 pthread_rwlock_destroy F +++GLIBC_2.3 pthread_rwlock_init F +++GLIBC_2.3 pthread_rwlock_rdlock F +++GLIBC_2.3 pthread_rwlock_timedrdlock F +++GLIBC_2.3 pthread_rwlock_timedwrlock F +++GLIBC_2.3 pthread_rwlock_tryrdlock F +++GLIBC_2.3 pthread_rwlock_trywrlock F +++GLIBC_2.3 pthread_rwlock_unlock F +++GLIBC_2.3 pthread_rwlock_wrlock F +++GLIBC_2.3 pthread_rwlockattr_destroy F +++GLIBC_2.3 pthread_rwlockattr_getkind_np F +++GLIBC_2.3 pthread_rwlockattr_getpshared F +++GLIBC_2.3 pthread_rwlockattr_init F +++GLIBC_2.3 pthread_rwlockattr_setkind_np F +++GLIBC_2.3 pthread_rwlockattr_setpshared F +++GLIBC_2.3 pthread_self F +++GLIBC_2.3 pthread_setcancelstate F +++GLIBC_2.3 pthread_setcanceltype F +++GLIBC_2.3 pthread_setconcurrency F +++GLIBC_2.3 pthread_setschedparam F +++GLIBC_2.3 pthread_setspecific F +++GLIBC_2.3 pthread_sigmask F +++GLIBC_2.3 pthread_spin_destroy F +++GLIBC_2.3 pthread_spin_init F +++GLIBC_2.3 pthread_spin_lock F +++GLIBC_2.3 pthread_spin_trylock F +++GLIBC_2.3 pthread_spin_unlock F +++GLIBC_2.3 pthread_testcancel F +++GLIBC_2.3 pthread_yield F +++GLIBC_2.3 pwrite F +++GLIBC_2.3 pwrite64 F +++GLIBC_2.3 raise F +++GLIBC_2.3 read F +++GLIBC_2.3 recv F +++GLIBC_2.3 recvfrom F +++GLIBC_2.3 recvmsg F +++GLIBC_2.3 sem_close F +++GLIBC_2.3 sem_destroy F +++GLIBC_2.3 sem_getvalue F +++GLIBC_2.3 sem_init F +++GLIBC_2.3 sem_open F +++GLIBC_2.3 sem_post F +++GLIBC_2.3 sem_timedwait F +++GLIBC_2.3 sem_trywait F +++GLIBC_2.3 sem_unlink F +++GLIBC_2.3 sem_wait F +++GLIBC_2.3 send F +++GLIBC_2.3 sendmsg F +++GLIBC_2.3 sendto F +++GLIBC_2.3 sigaction F +++GLIBC_2.3 siglongjmp F +++GLIBC_2.3 sigwait F +++GLIBC_2.3 system F +++GLIBC_2.3 tcdrain F +++GLIBC_2.3 vfork F +++GLIBC_2.3 wait F +++GLIBC_2.3 waitpid F +++GLIBC_2.3 write F +++GLIBC_2.3.2 GLIBC_2.3.2 A +++GLIBC_2.3.2 pthread_cond_broadcast F +++GLIBC_2.3.2 pthread_cond_destroy F +++GLIBC_2.3.2 pthread_cond_init F +++GLIBC_2.3.2 pthread_cond_signal F +++GLIBC_2.3.2 pthread_cond_timedwait F +++GLIBC_2.3.2 pthread_cond_wait F +++GLIBC_2.3.3 GLIBC_2.3.3 A +++GLIBC_2.3.3 __pthread_cleanup_routine F +++GLIBC_2.3.3 __pthread_register_cancel F +++GLIBC_2.3.3 __pthread_register_cancel_defer F +++GLIBC_2.3.3 __pthread_unregister_cancel F +++GLIBC_2.3.3 __pthread_unregister_cancel_restore F +++GLIBC_2.3.3 __pthread_unwind_next F +++GLIBC_2.3.3 pthread_attr_getaffinity_np F +++GLIBC_2.3.3 pthread_attr_setaffinity_np F +++GLIBC_2.3.3 pthread_barrierattr_getpshared F +++GLIBC_2.3.3 pthread_condattr_getclock F +++GLIBC_2.3.3 pthread_condattr_setclock F +++GLIBC_2.3.3 pthread_getaffinity_np F +++GLIBC_2.3.3 pthread_setaffinity_np F +++GLIBC_2.3.3 pthread_timedjoin_np F +++GLIBC_2.3.3 pthread_tryjoin_np F +++GLIBC_2.3.4 GLIBC_2.3.4 A +++GLIBC_2.3.4 pthread_attr_getaffinity_np F +++GLIBC_2.3.4 pthread_attr_setaffinity_np F +++GLIBC_2.3.4 pthread_getaffinity_np F +++GLIBC_2.3.4 pthread_setaffinity_np F ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/libresolv.abilist ++@@ -0,0 +1,94 @@ +++GLIBC_2.3 GLIBC_2.3 A +++GLIBC_2.3 __b64_ntop F +++GLIBC_2.3 __b64_pton F +++GLIBC_2.3 __dn_comp F +++GLIBC_2.3 __dn_count_labels F +++GLIBC_2.3 __dn_expand F +++GLIBC_2.3 __dn_skipname F +++GLIBC_2.3 __fp_nquery F +++GLIBC_2.3 __fp_query F +++GLIBC_2.3 __fp_resstat F +++GLIBC_2.3 __hostalias F +++GLIBC_2.3 __loc_aton F +++GLIBC_2.3 __loc_ntoa F +++GLIBC_2.3 __p_cdname F +++GLIBC_2.3 __p_cdnname F +++GLIBC_2.3 __p_class F +++GLIBC_2.3 __p_class_syms D 0xa8 +++GLIBC_2.3 __p_fqname F +++GLIBC_2.3 __p_fqnname F +++GLIBC_2.3 __p_option F +++GLIBC_2.3 __p_query F +++GLIBC_2.3 __p_secstodate F +++GLIBC_2.3 __p_time F +++GLIBC_2.3 __p_type F +++GLIBC_2.3 __p_type_syms D 0x450 +++GLIBC_2.3 __putlong F +++GLIBC_2.3 __putshort F +++GLIBC_2.3 __res_close F +++GLIBC_2.3 __res_dnok F +++GLIBC_2.3 __res_hnok F +++GLIBC_2.3 __res_hostalias F +++GLIBC_2.3 __res_isourserver F +++GLIBC_2.3 __res_mailok F +++GLIBC_2.3 __res_mkquery F +++GLIBC_2.3 __res_nameinquery F +++GLIBC_2.3 __res_nmkquery F +++GLIBC_2.3 __res_nquery F +++GLIBC_2.3 __res_nquerydomain F +++GLIBC_2.3 __res_nsearch F +++GLIBC_2.3 __res_nsend F +++GLIBC_2.3 __res_ownok F +++GLIBC_2.3 __res_queriesmatch F +++GLIBC_2.3 __res_query F +++GLIBC_2.3 __res_querydomain F +++GLIBC_2.3 __res_search F +++GLIBC_2.3 __res_send F +++GLIBC_2.3 __sym_ntop F +++GLIBC_2.3 __sym_ntos F +++GLIBC_2.3 __sym_ston F +++GLIBC_2.3 _gethtbyaddr F +++GLIBC_2.3 _gethtbyname F +++GLIBC_2.3 _gethtbyname2 F +++GLIBC_2.3 _gethtent F +++GLIBC_2.3 _getlong F +++GLIBC_2.3 _getshort F +++GLIBC_2.3 _res_opcodes D 0x80 +++GLIBC_2.3 _sethtent F +++GLIBC_2.3 inet_net_ntop F +++GLIBC_2.3 inet_net_pton F +++GLIBC_2.3 inet_neta F +++GLIBC_2.3 res_gethostbyaddr F +++GLIBC_2.3 res_gethostbyname F +++GLIBC_2.3 res_gethostbyname2 F +++GLIBC_2.3 res_send_setqhook F +++GLIBC_2.3 res_send_setrhook F +++GLIBC_2.3.2 GLIBC_2.3.2 A +++GLIBC_2.3.2 __p_rcode F +++GLIBC_2.9 GLIBC_2.9 A +++GLIBC_2.9 ns_datetosecs F +++GLIBC_2.9 ns_format_ttl F +++GLIBC_2.9 ns_get16 F +++GLIBC_2.9 ns_get32 F +++GLIBC_2.9 ns_initparse F +++GLIBC_2.9 ns_makecanon F +++GLIBC_2.9 ns_msg_getflag F +++GLIBC_2.9 ns_name_compress F +++GLIBC_2.9 ns_name_ntol F +++GLIBC_2.9 ns_name_ntop F +++GLIBC_2.9 ns_name_pack F +++GLIBC_2.9 ns_name_pton F +++GLIBC_2.9 ns_name_rollback F +++GLIBC_2.9 ns_name_skip F +++GLIBC_2.9 ns_name_uncompress F +++GLIBC_2.9 ns_name_unpack F +++GLIBC_2.9 ns_parse_ttl F +++GLIBC_2.9 ns_parserr F +++GLIBC_2.9 ns_put16 F +++GLIBC_2.9 ns_put32 F +++GLIBC_2.9 ns_samedomain F +++GLIBC_2.9 ns_samename F +++GLIBC_2.9 ns_skiprr F +++GLIBC_2.9 ns_sprintrr F +++GLIBC_2.9 ns_sprintrrf F +++GLIBC_2.9 ns_subdomain F ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/librt.abilist ++@@ -0,0 +1,46 @@ +++GLIBC_2.3 GLIBC_2.3 A +++GLIBC_2.3 aio_cancel F +++GLIBC_2.3 aio_cancel64 F +++GLIBC_2.3 aio_error F +++GLIBC_2.3 aio_error64 F +++GLIBC_2.3 aio_fsync F +++GLIBC_2.3 aio_fsync64 F +++GLIBC_2.3 aio_init F +++GLIBC_2.3 aio_read F +++GLIBC_2.3 aio_read64 F +++GLIBC_2.3 aio_return F +++GLIBC_2.3 aio_return64 F +++GLIBC_2.3 aio_suspend F +++GLIBC_2.3 aio_suspend64 F +++GLIBC_2.3 aio_write F +++GLIBC_2.3 aio_write64 F +++GLIBC_2.3 clock_getcpuclockid F +++GLIBC_2.3 clock_getres F +++GLIBC_2.3 clock_gettime F +++GLIBC_2.3 clock_nanosleep F +++GLIBC_2.3 clock_settime F +++GLIBC_2.3 lio_listio F +++GLIBC_2.3 lio_listio64 F +++GLIBC_2.3 shm_open F +++GLIBC_2.3 shm_unlink F +++GLIBC_2.3 timer_create F +++GLIBC_2.3 timer_delete F +++GLIBC_2.3 timer_getoverrun F +++GLIBC_2.3 timer_gettime F +++GLIBC_2.3 timer_settime F +++GLIBC_2.3.4 GLIBC_2.3.4 A +++GLIBC_2.3.4 mq_close F +++GLIBC_2.3.4 mq_getattr F +++GLIBC_2.3.4 mq_notify F +++GLIBC_2.3.4 mq_open F +++GLIBC_2.3.4 mq_receive F +++GLIBC_2.3.4 mq_send F +++GLIBC_2.3.4 mq_setattr F +++GLIBC_2.3.4 mq_timedreceive F +++GLIBC_2.3.4 mq_timedsend F +++GLIBC_2.3.4 mq_unlink F +++GLIBC_2.4 GLIBC_2.4 A +++GLIBC_2.4 lio_listio F +++GLIBC_2.4 lio_listio64 F +++GLIBC_2.7 GLIBC_2.7 A +++GLIBC_2.7 __mq_open_2 F ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/libthread_db.abilist ++@@ -0,0 +1,42 @@ +++GLIBC_2.3 GLIBC_2.3 A +++GLIBC_2.3 td_init F +++GLIBC_2.3 td_log F +++GLIBC_2.3 td_symbol_list F +++GLIBC_2.3 td_ta_clear_event F +++GLIBC_2.3 td_ta_delete F +++GLIBC_2.3 td_ta_enable_stats F +++GLIBC_2.3 td_ta_event_addr F +++GLIBC_2.3 td_ta_event_getmsg F +++GLIBC_2.3 td_ta_get_nthreads F +++GLIBC_2.3 td_ta_get_ph F +++GLIBC_2.3 td_ta_get_stats F +++GLIBC_2.3 td_ta_map_id2thr F +++GLIBC_2.3 td_ta_map_lwp2thr F +++GLIBC_2.3 td_ta_new F +++GLIBC_2.3 td_ta_reset_stats F +++GLIBC_2.3 td_ta_set_event F +++GLIBC_2.3 td_ta_setconcurrency F +++GLIBC_2.3 td_ta_thr_iter F +++GLIBC_2.3 td_ta_tsd_iter F +++GLIBC_2.3 td_thr_clear_event F +++GLIBC_2.3 td_thr_dbresume F +++GLIBC_2.3 td_thr_dbsuspend F +++GLIBC_2.3 td_thr_event_enable F +++GLIBC_2.3 td_thr_event_getmsg F +++GLIBC_2.3 td_thr_get_info F +++GLIBC_2.3 td_thr_getfpregs F +++GLIBC_2.3 td_thr_getgregs F +++GLIBC_2.3 td_thr_getxregs F +++GLIBC_2.3 td_thr_getxregsize F +++GLIBC_2.3 td_thr_set_event F +++GLIBC_2.3 td_thr_setfpregs F +++GLIBC_2.3 td_thr_setgregs F +++GLIBC_2.3 td_thr_setprio F +++GLIBC_2.3 td_thr_setsigpending F +++GLIBC_2.3 td_thr_setxregs F +++GLIBC_2.3 td_thr_sigsetmask F +++GLIBC_2.3 td_thr_tls_get_addr F +++GLIBC_2.3 td_thr_tsd F +++GLIBC_2.3 td_thr_validate F +++GLIBC_2.3.3 GLIBC_2.3.3 A +++GLIBC_2.3.3 td_thr_tlsbase F ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/libutil.abilist ++@@ -0,0 +1,7 @@ +++GLIBC_2.3 GLIBC_2.3 A +++GLIBC_2.3 forkpty F +++GLIBC_2.3 login F +++GLIBC_2.3 login_tty F +++GLIBC_2.3 logout F +++GLIBC_2.3 logwtmp F +++GLIBC_2.3 openpty F ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/makecontext.S ++@@ -0,0 +1,146 @@ +++/* makecontext() for FreeBSD/amd64. +++ 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 +++#include +++ +++/* +++ void makecontext(ucontext_t *ucp, void *func(), int argc, ...); +++ +++ +++ input parameters: +++ +++ rdi ucp +++ rsi func +++ edx argc +++ rcx arg1 -> ucp.rdi +++ r8 arg2 -> ucp.rsi +++ r9 arg3 -> ucp.rdx +++ 8(%rsp) arg4 -> ucp.rcx +++ 16(%rsp) arg5 -> ucp.r8 +++ 24(%rsp) arg6 -> ucp.r9 +++ i*8+24(%rsp) arg(6+i)-> future stack +++ +++*/ +++ +++ENTRY(__makecontext) +++ +++ /* Compute the address of the stack. +++ The information comes from us_stack element. */ +++ movq oSS_SP(%rdi), %rax +++ addq oSS_SIZE(%rdi), %rax +++ +++ /* Put start addr into ucp */ +++ movq %rsi, oRIP(%rdi) +++ +++ /* properly align future stack */ +++ andq $-16, %rax +++ subq $8, %rax +++ +++ /* Put the next context into preserved ucp.rbx +++ (from the uc_link element). */ +++ movq oLINK(%rdi), %rsi +++ movq %rsi, oRBX(%rdi) +++ +++ /* save future registers arguments */ +++ +++ orl %edx, %edx +++ jz L(param_done) +++ +++ decl %edx +++ movq %rcx, oRDI(%rdi) +++ jz L(param_done) +++ +++ decl %edx +++ movq %r8, oRSI(%rdi) +++ jz L(param_done) +++ +++ decl %edx +++ movq %r9, oRDX(%rdi) +++ jz L(param_done) +++ +++ movq 8(%rsp), %rsi +++ decl %edx +++ movq %rsi, oRCX(%rdi) +++ jz L(param_done) +++ +++ movq 16(%rsp), %rcx +++ decl %edx +++ movq %rcx, oR8(%rdi) +++ jz L(param_done) +++ +++ movq 24(%rsp), %rsi +++ decl %edx +++ movq %rsi, oR9(%rdi) +++ jz L(param_done) +++ +++ /* we have to copy some arguments also on the future stack */ +++ movl %edx, %ecx +++ negq %rdx +++ leaq -16(%rax,%rdx,8), %rax /* we a litle bit waste stack space */ +++ orq $8, %rax +++ +++1: movq 24(%rsp,%rcx,8), %rsi +++ movq %rsi,(%rax,%rcx,8) +++ loop 1b +++ +++L(param_done): +++ +++ /* Store the future stack pointer and chain helper code. */ +++ leaq L(exitcode)(%rip), %rdx +++ movq %rax, oRSP(%rdi) +++ movq %rdx, (%rax) +++ +++ /* '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): +++ /* we don't bother with extra arguments left on the stack +++ - more than 6 arguments is rare +++ - setcontext changes stacks immediately +++ - exit will call _exit in near future +++ */ +++ +++ movq %rbx, %rdi /* argument for either syscall */ +++ testq %rbx, %rbx /* If it is zero exit. */ +++ jz 2f +++ +++ call JUMPTARGET(__setcontext) +++ /* If this returns (which can happen if the syscall fails) we'll +++ exit the program with the return error value (-1). */ +++ +++ movq %rax, %rdi +++2: 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/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/pipe.S ++@@ -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 +++ +++.text +++ENTRY (__pipe) +++ DO_CALL (pipe, 1) +++ jb SYSCALL_ERROR_LABEL +++ movl %eax, 0(%rdi) +++ movl %edx, 4(%rdi) +++ xorl %eax, %eax +++L(pseudo_end): +++ ret +++PSEUDO_END (__pipe) +++libc_hidden_def (__pipe) +++weak_alias (__pipe, pipe) ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/pt-vfork.S ++@@ -0,0 +1 @@ +++#include ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/readelflib.c ++@@ -0,0 +1,62 @@ +++/* Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Andreas Jaeger , 1999 and +++ Jakub Jelinek , 1999. +++ +++ The GNU C Library is free software; you can redistribute it and/or +++ modify it under the terms of the GNU Lesser General Public +++ License as published by the Free Software Foundation; either +++ version 2.1 of the License, or (at your option) any later version. +++ +++ The GNU C Library is distributed in the hope that it will be useful, +++ but WITHOUT ANY WARRANTY; without even the implied warranty of +++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +++ Lesser General Public License for more details. +++ +++ You should have received a copy of the GNU Lesser General Public +++ License along with the GNU C Library; if not, write to the Free +++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +++ 02111-1307 USA. */ +++ +++ +++int process_elf32_file (const char *file_name, const char *lib, int *flag, +++ unsigned int *osversion, char **soname, +++ void *file_contents, size_t file_length); +++int process_elf64_file (const char *file_name, const char *lib, int *flag, +++ unsigned int *osversion, char **soname, +++ void *file_contents, size_t file_length); +++ +++/* Returns 0 if everything is ok, != 0 in case of error. */ +++int +++process_elf_file (const char *file_name, const char *lib, int *flag, +++ unsigned int *osversion, char **soname, void *file_contents, +++ size_t file_length) +++{ +++ ElfW(Ehdr) *elf_header = (ElfW(Ehdr) *) file_contents; +++ int ret; +++ +++ if (elf_header->e_ident [EI_CLASS] == ELFCLASS32) +++ return process_elf32_file (file_name, lib, flag, osversion, soname, +++ file_contents, file_length); +++ else +++ { +++ ret = process_elf64_file (file_name, lib, flag, osversion, soname, +++ file_contents, file_length); +++ /* x86-64 64bit libraries are always LIBC6. */ +++ if (!ret) +++ *flag = FLAG_X8664_LIB64|FLAG_ELF_LIBC6; +++ return ret; +++ } +++} +++ +++#undef __ELF_NATIVE_CLASS +++#undef process_elf_file +++#define process_elf_file process_elf32_file +++#define __ELF_NATIVE_CLASS 32 +++#include "elf/readelflib.c" +++ +++#undef __ELF_NATIVE_CLASS +++#undef process_elf_file +++#define process_elf_file process_elf64_file +++#define __ELF_NATIVE_CLASS 64 +++#include "elf/readelflib.c" ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/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 +++ +++.text; +++ENTRY (__rfork) +++ /* save the return PC value into RSI */ +++ movq 0(%rsp), %rsi; +++ 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. */ +++ decq %rdx +++ andq %rdx, %rax +++ +++ popq %rdx +++ cfi_adjust_cfa_offset(-8) +++ +++ jmp *%rsi +++ +++L(pseudo_end): +++ ret +++PSEUDO_END (__rfork) +++ +++weak_alias (__rfork, rfork) +++ ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/shlib-versions ++@@ -0,0 +1 @@ +++ld=ld-kfreebsd-x86-64.so.1 ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/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_rip) +++#define GET_FRAME(ctx) ((void *) (_sg)->sc_rbp) +++#define GET_STACK(ctx) ((void *) (_sg)->sc_rsp) +++ +++#define CALL_SIGHANDLER(handler, signo, ctx) \ +++ (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx)) ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/start.S ++@@ -0,0 +1,156 @@ +++/* Startup code for FreeBSD/amd64 ABI. +++ Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Andreas Jaeger , 2001. +++ FreeBSD modification 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. +++ +++ 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. */ +++ +++/* This is the canonical entry point, usually the first thing in the text +++ segment. The SVR4/i386 ABI (pages 3-31, 3-32) says that when the entry +++ point runs, most registers' values are unspecified, except for a few. +++ Blindly applied on amd64: +++ +++ %rdx 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. +++ +++ %rsp The stack contains the arguments and environment: +++ 0(%rsp) argc +++ 8(%rsp) argv[0] +++ ... +++ (8*argc)(%rsp) NULL +++ (8*(argc+1))(%rsp) envp[0] +++ ... +++ NULL +++ +++ But on amd64 %rsp also have to be 16-byte aligned, +++ standard C calling convention already passes arguments in registers. +++ +++ FreeBSD uses %edi as pointer to arguments and environment, %rsp is passed aligned. +++ On entry from kernel, %rsp=%rdi or %rsp=%rdi-8, +++ on entry from ld.so, glibc might set up it slightly differently. +++ +++ On FreeBSD, we use %rsi for passing function pointer to rtld_fini(). +++ On entry from FreeBSD kernel, %rsi is cleared, %rdx is not cleared, +++ on entry from ld.so, glibc sets both %rsi and %rdx to point to rtld_fini(). +++ +++ Used interface (via %rdi, %rsi) is equal to standard C calling interface for +++ +++ void _start(void *arg, void *rtld_fini()); +++ +++*/ +++ +++#include +++#include +++ +++ weak_extern (_end) +++ +++ .text +++ .globl _start +++ .type _start,@function +++_start: +++ cfi_startproc +++ cfi_undefined (rip) +++ /* Clear the frame pointer. The ABI suggests this be done, to mark +++ the outermost frame obviously. */ +++ xorl %ebp, %ebp /* zero extending clears whole rbp */ +++ +++ /* Extract the arguments as encoded on the stack and set up +++ the arguments for __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). +++ The arguments are passed via registers and on the stack: +++ main: %rdi +++ argc: %rsi +++ argv: %rdx +++ init: %rcx +++ fini: %r8 +++ rtld_fini: %r9 +++ stack_end: stack. */ +++ +++ movq %rsi, %r9 /* Address of the shared library termination +++ function. */ +++ movq 0(%rdi), %rsi /* argument count. */ +++ leaq 8(%rdi), %rdx /* argv starts just at above argc. */ +++ +++ /* Align the stack to a 16 byte boundary to follow the ABI. */ +++ andq $~15, %rsp +++ +++ pushq %rax /* Push garbage because we push 8 more bytes. */ +++ +++ /* Provide the highest stack address to the user code (for stacks +++ which grow downwards). */ +++ pushq %rsp +++ +++#ifdef SHARED +++ /* Pass address of our own entry points to .fini and .init. */ +++ movq __libc_csu_fini@GOTPCREL(%rip), %r8 +++ movq __libc_csu_init@GOTPCREL(%rip), %rcx +++ +++ movq main@GOTPCREL(%rip), %rdi +++ +++ /* Call the user's main function, and exit with its value. +++ But let the libc call main. */ +++ call __libc_start_main@PLT +++#else +++ /* Pass address of our own entry points to .fini and .init. */ +++ movq $__libc_csu_fini, %r8 +++ movq $__libc_csu_init, %rcx +++ +++ movq $main, %rdi +++ +++ /* Call the user's main function, and exit with its value. +++ But let the libc call main. */ +++ call __libc_start_main +++#endif +++ +++ hlt /* Crash if somehow `exit' does return. */ +++ /* just reference _end, +++ it is needed as global symbol for brk() usage, +++ it is a dead code on purpose. */ +++#ifdef SHARED +++ movq _end@GOTPCREL(%rip), %rax +++#else +++ movq $_end, %rax +++#endif +++ cfi_endproc +++/* 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/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/start_thread.S ++@@ -0,0 +1,196 @@ +++/* Copyright (C) 2002 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Contributed by Bruno Haible , 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 +++#include +++ +++#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. +++*/ +++ +++ .text +++ENTRY (__start_thread) +++ +++ /* Insert the argument onto the new aligned stack. */ +++ andq $-16,%rsi +++ subq $16,%rsi +++ movq %rcx,8(%rsi) +++ +++ /* Save the function pointer. It will be popped off in the child */ +++ movq %rdx,0(%rsi) +++ +++ testq $32, %rdi /* flags & RFMEM */ +++ jnz L(complex) +++ +++ /* Do the system call. */ +++ movl $SYS_ify(rfork),%eax +++ /* End FDE now, because in the child the unwind info will be +++ wrong. */ +++ cfi_endproc; +++ syscall /* rdi and rsi are extra preserved */ +++ +++ jb SYSCALL_ERROR_LABEL +++ +++ testq %rdx,%rdx /* 0 for the parent and 1 for the child */ +++ jz L(pseudo_end) /* just return in parent */ +++ +++L(thread_start): +++ +++ /* set up stack */ +++ movq %rsi, %rsp +++ +++ /* Clear the frame pointer. The ABI suggests this be done, to mark +++ the outermost frame obviously. */ +++ xorl %ebp, %ebp +++ +++L(thread_start2): +++ +++ /* Set up arguments for the function call. */ +++ popq %rax /* Function to call. */ +++ popq %rdi /* Argument. */ +++ call *%rax +++ +++ /* Call exit with return value from function call. */ +++ movq %rax, %rdi +++ call HIDDEN_JUMPTARGET (_exit) +++ +++ +++/****************************************************************************************************** +++ * +++ * and now the complex one ... +++ * +++ ******************************************************************************************************/ +++ +++L(complex): +++ +++ subq $32, %rsp +++ +++ /* save arguments - flags and stack */ +++ movq %rdi,0(%rsp) +++ movq %rsi,8(%rsp) +++ +++ /* Block all signals. */ +++ orq $-1, %rax +++ movq %rax, 16(%rsp) +++ movq %rax, 24(%rsp) +++ +++ leaq 16(%rsp), %rsi +++ movl $SIG_SETMASK, %edi +++ movq %rsi,%rdx +++ DO_CALL (sigprocmask, 3) +++ jb L(error) +++ +++ /* restore arguments - flags and stack */ +++ movq 0(%rsp),%rdi +++ movq 8(%rsp),%rsi +++ +++ /* Copy mask info into the child's stack. */ +++ +++ subq $16,%rsi +++ movq 16(%rsp),%rcx +++ movq 24(%rsp),%rdx +++ movq %rcx, 0(%rsi) +++ movq %rdx, 8(%rsi) +++ +++ /* Perform the rfork system call. */ +++ DO_CALL (rfork, 1) +++ jb L(error_unmask) +++ +++ /* %rdx is now 0 for the parent and 1 for the child. */ +++ testq %rdx, %rdx +++ jnz L(child) +++ +++ /* Save the child pid, currently in %rax. */ +++ movq %rax, 0(%rsp) +++ +++ /* Restore the previous signal mask. */ +++ movl $SIG_SETMASK, %edi +++ leaq 16(%rsp), %rsi +++ xorl %edx,%edx +++ DO_CALL (sigprocmask, 3) +++ +++ /* Return the child pid, saved on stack. */ +++ movq 0(%rsp), %rax +++ addq $32, %rsp +++L(pseudo_end): +++ ret +++ +++L(error_unmask): +++ +++ /* Save the error code, currently in %rax. */ +++ movq %rax, 0(%rsp) +++ +++ /* Restore the previous signal mask. */ +++ movq $SIG_SETMASK, %rdi +++ leaq 16(%rsp), %rsi +++ xorl %edx,%edx +++ DO_CALL (sigprocmask, 3) +++ +++ /* load saved error code */ +++ movq 0(%rsp), %rax +++ +++L(error): +++ addq $32, %rsp +++ jmp SYSCALL_ERROR_LABEL +++ +++L(child):/* Here we are in the child thread. */ +++ +++ /* set up stack */ +++ movq %rsi, %rsp +++ +++ /* Clear the frame pointer. The ABI suggests this be done, to mark +++ the outermost frame obviously. */ +++ xorl %ebp, %ebp +++ +++ /* Restore the previous signal mask. */ +++ movq $SIG_SETMASK, %rdi +++ xorl %edx,%edx +++ DO_CALL (sigprocmask, 3) +++ +++ addq $16, %rsp +++ jmp L(thread_start2) +++ +++ cfi_startproc; +++ +++PSEUDO_END (__start_thread) ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/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 +++ +++.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/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/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 ." +++#endif +++ +++#include +++ +++__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/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/sys/perm.h ++@@ -0,0 +1,36 @@ +++/* 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 +++ +++__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; +++ +++__END_DECLS +++ +++#endif /* _SYS_PERM_H */ ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/sys_fork.S ++@@ -0,0 +1,36 @@ +++/* 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 +++ +++.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. */ +++ +++ decq %rdx +++ andq %rdx, %rax +++ +++L(pseudo_end): +++ ret +++PSEUDO_END (__syscall_fork) +++libc_hidden_def (__syscall_fork) ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/sysarch.h ++@@ -0,0 +1,72 @@ +++/* Parameters for the architecture specific system call. amd64 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 +++ +++/* 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_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 +++ AMD64_GET_FSBASE = 128, +++#define AMD64_GET_FSBASE AMD64_GET_FSBASE +++ AMD64_SET_FSBASE = 129, +++#define AMD64_SET_FSBASE AMD64_SET_FSBASE +++ AMD64_GET_GSBASE = 130, +++#define AMD64_GET_GSBASE AMD64_GET_GSBASE +++ AMD64_SET_GSBASE = 131 +++#define AMD64_SET_GSBASE AMD64_SET_GSBASE +++ }; +++ +++/* Argument struct for I386_GET_IOPERM and I386_SET_IOPERM. */ +++struct i386_ioperm_args +++ { +++ unsigned int start; +++ unsigned int length; +++ int enable; +++ }; +++ +++__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/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/syscall.S ++@@ -0,0 +1,31 @@ +++/* Copyright (C) 2006 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Modification for FreeBSD 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 +++ +++ .text +++ENTRY (__syscall) +++ movq %rcx, %r10 +++ movl $SYS_ify (syscall), %eax +++ syscall +++ jb SYSCALL_ERROR_LABEL +++L(pseudo_end): +++ ret +++PSEUDO_END (__syscall) +++weak_alias (__syscall, syscall) ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/syscalls-internal.h ++@@ -0,0 +1,129 @@ +++/* 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 +++ +++/* +++ 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_clock_gettime(name, err, nr, clkid, ts) \ +++(void)({ \ +++ register long int _a1 = (long int) (clkid); \ +++ register long int _a2 = (long int) (ts); \ +++ register long int result; \ +++ asm volatile ( \ +++ "syscall" \ +++ : "=a" (result) \ +++ : "0" ((long int) SYS_##name), \ +++ "D" (_a1), \ +++ "S" (_a2) \ +++ : "memory", "cc", "cx", "dx", "r8", "r9", "r10", "r11"); \ +++ result; \ +++}) +++ +++#define INTERNAL_SYSCALL_close(name, err, nr, fd) \ +++(void)({ \ +++ register long int _a1 = (long int) (fd); \ +++ register long int result; \ +++ asm volatile ( \ +++ "syscall" \ +++ : "=a" (result) \ +++ : "0" ((long int) SYS_##name), \ +++ "D" (_a1) \ +++ : "memory", "cc", "cx", "dx", "r8", "r9", "r10", "r11"); \ +++ result; \ +++}) +++ +++#define INTERNAL_SYSCALL_kill(name, err, nr, pid, sig) \ +++(void)({ \ +++ register long int _a1 = (long int) (pid); \ +++ register long int _a2 = (long int) (sig); \ +++ register long int result; \ +++ asm volatile ( \ +++ "syscall" \ +++ : "=a" (result) \ +++ : "0" ((long int) SYS_##name), \ +++ "D" (_a1), \ +++ "S" (_a2) \ +++ : "memory", "cc", "cx", "dx", "r8", "r9", "r10", "r11"); \ +++ result; \ +++}) +++ +++#define INTERNAL_SYSCALL_write(name, err, nr, fd, buf, cnt) \ +++(void)({ \ +++ register long int _a1 = (long int) (fd); \ +++ register long int _a2 = (long int) (buf); \ +++ register long int _a3 = (long int) (cnt); \ +++ register long int result; \ +++ register long int _trash; \ +++ asm volatile ( \ +++ "syscall" \ +++ : "=a" (result), \ +++ "=d" (_trash) \ +++ : "0" ((long int) SYS_##name), \ +++ "D" (_a1), \ +++ "S" (_a2), \ +++ "d" (_a3) \ +++ /* beware rdx is not preserved after syscall */ \ +++ : "memory", "cc", "cx", "r8", "r9", "r10", "r11"); \ +++ 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 ( \ +++ "syscall" \ +++ : "=a" (result), \ +++ "=d" (_trash) \ +++ : "0" ((long int) SYS_##name), \ +++ "D" (_a1), \ +++ "S" (_a2), \ +++ "d" (_a3) \ +++ /* beware rdx is not preserved after syscall */ \ +++ : "memory", "cc", "cx", "r8", "r9", "r10", "r11"); \ +++ result; \ +++}) +++ +++#endif ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/sysdep.S ++@@ -0,0 +1,40 @@ +++/* 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 +++ +++/* The following code is only used in the shared library when we +++ compile the reentrant version. Otherwise each system call defines +++ each own version. */ +++ +++#ifndef PIC +++ +++/* The syscall stubs jump here when they detect an error. +++ The code for Linux is almost identical to the canonical Unix +++ code, except that the error number in %rax is negated. */ +++ +++#undef CALL_MCOUNT +++#define CALL_MCOUNT /* Don't insert the profiling call, it clobbers %rax. */ +++ +++ .text +++ENTRY (__syscall_error) +++ +++#define __syscall_error __syscall_error_1 +++#include +++ +++#endif /* !PIC */ ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/sysdep.h ++@@ -0,0 +1,204 @@ +++/* Copyright (C) 2001,02,03,04 Free Software Foundation, Inc. +++ This file is part of the GNU C Library. +++ Modification for FreeBSD 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. */ +++ +++#ifndef _KFREEBSD_X86_64_SYSDEP_H +++#define _KFREEBSD_X86_64_SYSDEP_H 1 +++ +++/* There is some commonality. */ +++#include +++/* Defines RTLD_PRIVATE_ERRNO and USE_DL_SYSINFO. */ +++#include +++#include +++ +++#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 +++ +++#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. */ +++#elif RTLD_PRIVATE_ERRNO +++# define SYSCALL_ERROR_HANDLER \ +++0: \ +++ leaq rtld_errno(%rip), %rcx; \ +++ movl %eax, (%rcx); \ +++ orq $-1, %rax; \ +++ jmp L(pseudo_end); +++#else +++# if IS_IN (libc) +++# define SYSCALL_ERROR_ERRNO __libc_errno +++# else +++# define SYSCALL_ERROR_ERRNO errno +++# endif +++# define SYSCALL_ERROR_HANDLER \ +++0: \ +++ movq SYSCALL_ERROR_ERRNO@GOTTPOFF(%rip), %rcx;\ +++ movl %eax, %fs:(%rcx); \ +++ orq $-1, %rax; \ +++ jmp L(pseudo_end); +++#endif /* PIC */ +++ +++/* The FreeBSD/amd64 kernel expects the system call parameters in +++ registers according to the following table: +++ +++ syscall number rax +++ arg 1 rdi +++ arg 2 rsi +++ arg 3 rdx +++ arg 4 r10 +++ arg 5 r8 +++ arg 6 r9 +++ +++ The FreeBSD kernel internal syscall usage of registers: +++ +++ preserved: +++ stack pointer rsp +++ C preserved rbx, rbp, r12-r15 +++ some input params rdi, rsi +++ +++ destroyed: +++ return value(s) rax, rdx, eflags +++ return address from syscall rcx +++ eflags from syscall r11 +++ used internally r8-r10 +++ +++ Normal function call, including calls to the system call stub +++ functions in the libc, get the first six parameters passed in +++ registers and the seventh parameter and later on the stack. The +++ register use is as follows: +++ +++ system call number in the DO_CALL macro +++ arg 1 rdi +++ arg 2 rsi +++ arg 3 rdx +++ arg 4 rcx +++ arg 5 r8 +++ arg 6 r9 +++ +++ We have to take care that the stack is aligned to 16 bytes. When +++ called the stack is not aligned since the return address has just +++ been pushed. +++ +++*/ +++ +++#undef DO_CALL +++#define DO_CALL(syscall_name, args) \ +++ DOARGS_##args \ +++ movl $SYS_ify (syscall_name), %eax; \ +++ syscall; +++ +++#define DOARGS_0 /* nothing */ +++#define DOARGS_1 /* nothing */ +++#define DOARGS_2 /* nothing */ +++#define DOARGS_3 /* nothing */ +++#define DOARGS_4 movq %rcx, %r10; +++#define DOARGS_5 DOARGS_4 +++#define DOARGS_6 DOARGS_5 +++#define DOARGS_7 DOARGS_6 +++#define DOARGS_8 DOARGS_7 +++ +++#else /* !__ASSEMBLER__ */ +++ +++#include +++ +++#endif /* __ASSEMBLER__ */ +++ +++ +++/* Pointer mangling support. */ +++#if IS_IN (rtld) +++/* We cannot use the thread descriptor because in ld.so we use setjmp +++ earlier than the descriptor is initialized. */ +++# ifdef __ASSEMBLER__ +++# define PTR_MANGLE(reg) xorq __pointer_chk_guard_local(%rip), reg; \ +++ rolq $17, reg +++# define PTR_DEMANGLE(reg) rorq $17, reg; \ +++ xorq __pointer_chk_guard_local(%rip), reg +++# else +++# define PTR_MANGLE(reg) asm ("xorq __pointer_chk_guard_local(%%rip), %0\n" \ +++ "rolq $17, %0" \ +++ : "=r" (reg) : "0" (reg)) +++# define PTR_DEMANGLE(reg) asm ("rorq $17, %0\n" \ +++ "xorq __pointer_chk_guard_local(%%rip), %0" \ +++ : "=r" (reg) : "0" (reg)) +++# endif +++#else +++# ifdef __ASSEMBLER__ +++# define PTR_MANGLE(reg) xorq %fs:POINTER_GUARD, reg; \ +++ rolq $17, reg +++# define PTR_DEMANGLE(reg) rorq $17, reg; \ +++ xorq %fs:POINTER_GUARD, reg +++# else +++# define PTR_MANGLE(var) asm ("xorq %%fs:%c2, %0\n" \ +++ "rolq $17, %0" \ +++ : "=r" (var) \ +++ : "0" (var), \ +++ "i" (offsetof (tcbhead_t, \ +++ pointer_guard))) +++# define PTR_DEMANGLE(var) asm ("rorq $17, %0\n" \ +++ "xorq %%fs:%c2, %0" \ +++ : "=r" (var) \ +++ : "0" (var), \ +++ "i" (offsetof (tcbhead_t, \ +++ pointer_guard))) +++# endif +++#endif +++ +++#endif /* _KFREEBSD_X86_64_SYSDEP_H */ ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/ucontext_i.h ++@@ -0,0 +1,38 @@ +++/* Offsets needed in the makecontext() function implementation. +++ 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. */ +++ +++/* Offsets of the fields in the ucontext_t structure. */ +++ +++#define oRDI 24 +++#define oRSI 32 +++#define oRDX 40 +++#define oRCX 48 +++#define oR8 56 +++#define oR9 64 +++ +++#define oRAX 72 +++#define oRBX 80 +++#define oRBP 88 +++ +++#define oRIP 176 +++#define oRSP 200 +++ +++#define oLINK 816 +++#define oSS_SP 824 +++#define oSS_SIZE 832 ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/vfork.S ++@@ -0,0 +1,59 @@ +++/* 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 +++ +++/* 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 RDI. */ +++ popq %rdi +++ cfi_adjust_cfa_offset(-8) +++ cfi_register(%rip, %rdi) +++ +++ /* Perform the system call. */ +++ DO_CALL (vfork, 0) +++ jb L(error) /* Branch forward if it failed. */ +++ +++ /* In the parent process, %rdx == 0, %rax == child pid. */ +++ /* In the child process, %rdx == 1, %rax == parent pid. */ +++ +++ /* Change %rax to be 0 in the child process. */ +++ decq %rdx +++ andq %rdx, %rax +++ +++ /* Jump to the return PC. */ +++ jmp *%rdi +++ +++L(error): +++ /* Push back the return PC. */ +++ pushq %rdi +++ cfi_adjust_cfa_offset(8) +++ +++ /* 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/sysdeps/unix/bsd/bsd4.4/kfreebsd/xmknod.c ++@@ -0,0 +1,48 @@ +++/* xmknod call using old-style Unix mknod and mkfifo system calls. +++ Copyright (C) 1991, 1993, 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 +++#include +++#include +++ +++extern int __syscall_mknod (const char *, mode_t, dev_t); +++extern int __mkfifo (const char *, mode_t); +++ +++/* Create a device file named PATH, with permission and special bits MODE +++ and device number DEV (which can be constructed from major and minor +++ device numbers with the `makedev' macro above). */ +++int +++__xmknod (int vers, const char *path, mode_t mode, dev_t *dev) +++{ +++ if (vers != _MKNOD_VER) +++ { +++ __set_errno (EINVAL); +++ return -1; +++ } +++ +++ /* The FreeBSD mknod() system call cannot be used to create FIFOs; we +++ must use the mkfifo() system call for this purpose. */ +++ if (S_ISFIFO (mode)) +++ return __mkfifo (path, mode & ~S_IFMT); +++ +++ return __syscall_mknod (path, mode, *dev); +++} +++libc_hidden_def (__xmknod) +++ +++weak_alias (__xmknod, _xmknod) ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/xmknodat.c ++@@ -0,0 +1,59 @@ +++/* 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 +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++#include +++ +++extern int __syscall_mknodat (int fd, const char *path, +++ mode_t mode, dev_t dev); +++libc_hidden_proto (__syscall_mknodat) +++ +++extern int __syscall_mkfifoat (int fd, const char *path, +++ mode_t mode); +++libc_hidden_proto (__syscall_mkfifoat) +++ +++/* Create a device file named PATH relative to FD, with permission and +++ special bits MODE and device number DEV (which can be constructed +++ from major and minor device numbers with the `makedev' macro above). */ +++int +++__xmknodat (int vers, int fd, const char *file, mode_t mode, dev_t * dev) +++{ +++ if (vers != _MKNOD_VER) +++ { +++ __set_errno (EINVAL); +++ return -1; +++ } +++ +++ /* The FreeBSD mknod() system call cannot be used to create FIFOs; we +++ must use the mkfifo() system call for this purpose. */ +++ if (S_ISFIFO (mode)) +++ return INLINE_SYSCALL (mkfifoat, 3, fd, file, mode); +++ else +++ return INLINE_SYSCALL (mknodat, 4, fd, file, mode, *dev); +++} +++ +++libc_hidden_def (__xmknodat) ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/xstat.c ++@@ -0,0 +1,47 @@ +++/* xstat using FreeBSD stat, nstat 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 +++#include +++#include +++ +++#include "stat16conv.c" +++ +++int +++__xstat (int vers, const char *file, struct stat *buf) +++{ +++ if (__builtin_expect (vers == _STAT_VER, 1)) +++ { +++ struct stat16 buf16; +++ int result = __syscall_stat (file, &buf16); +++ if (result == 0) +++ stat16_to_stat (&buf16, buf); +++ return result; +++ } +++ else if (__builtin_expect (vers == _STAT_VER_stat, 1)) +++ return __syscall_stat (file, (struct stat16 *) buf); +++ else +++ { +++ __set_errno (EINVAL); +++ return -1; +++ } +++} +++hidden_def (__xstat) +++ +++weak_alias (__xstat, _xstat) ++--- /dev/null +++++ b/sysdeps/unix/bsd/bsd4.4/kfreebsd/xstat64.c ++@@ -0,0 +1,43 @@ +++/* xstat using FreeBSD stat, nstat 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 +++#include +++#include +++ +++#include "stat16conv.c" +++ +++int +++__xstat64 (int vers, const char *file, struct stat64 *buf) +++{ +++ if (__builtin_expect (vers == _STAT_VER, 1)) +++ { +++ struct stat16 buf16; +++ int result = __syscall_stat (file, &buf16); +++ if (result == 0) +++ stat16_to_stat64 (&buf16, buf); +++ return result; +++ } +++ else +++ { +++ __set_errno (EINVAL); +++ return -1; +++ } +++} +++hidden_def (__xstat64) diff --cc debian/patches/kfreebsd/local-tst-auxv.diff index 000000000,000000000..97024065d new file mode 100644 --- /dev/null +++ b/debian/patches/kfreebsd/local-tst-auxv.diff @@@ -1,0 -1,0 +1,18 @@@ ++--- a/elf/tst-auxv.c +++++ b/elf/tst-auxv.c ++@@ -42,6 +42,7 @@ do_test (int argc, char *argv[]) ++ return 1; ++ } ++ +++#ifdef AT_EXECFN ++ errno = 0; ++ execfn = (const char *) getauxval (AT_EXECFN); ++ ++@@ -62,6 +63,7 @@ do_test (int argc, char *argv[]) ++ printf ("Mismatch: argv[0]: %s vs. AT_EXECFN: %s\n", argv[0], execfn); ++ return 1; ++ } +++#endif ++ ++ return 0; ++ } diff --cc debian/patches/kfreebsd/local-tst-unique.diff index 000000000,000000000..f61d4753f new file mode 100644 --- /dev/null +++ b/debian/patches/kfreebsd/local-tst-unique.diff @@@ -1,0 -1,0 +1,22 @@@ ++tst-unique is not supported by the FreeBSD ELF OSABI ++ ++--- a/elf/Makefile +++++ b/elf/Makefile ++@@ -145,7 +145,7 @@ tests += loadtest restest1 preloadtest loadfail multiload origtest resolvfail \ ++ unload3 unload4 unload5 unload6 unload7 unload8 tst-global1 order2 \ ++ tst-audit1 tst-audit2 tst-audit8 tst-audit9 \ ++ tst-addr1 tst-thrlock \ ++- tst-unique1 tst-unique2 $(if $(CXX),tst-unique3 tst-unique4 \ +++ $(if $(CXX),tst-unique3 tst-unique4 \ ++ tst-nodelete) \ ++ tst-initorder tst-initorder2 tst-relsort1 tst-null-argv \ ++ tst-tlsalign tst-tlsalign-extern tst-nodelete-opened \ ++@@ -207,8 +207,6 @@ modules-names = testobj1 testobj2 testobj3 testobj4 testobj5 testobj6 \ ++ unload7mod1 unload7mod2 \ ++ unload8mod1 unload8mod1x unload8mod2 unload8mod3 \ ++ order2mod1 order2mod2 order2mod3 order2mod4 \ ++- tst-unique1mod1 tst-unique1mod2 \ ++- tst-unique2mod1 tst-unique2mod2 \ ++ tst-auditmod9a tst-auditmod9b \ ++ $(if $(CXX),tst-unique3lib tst-unique3lib2 tst-unique4lib \ ++ tst-nodelete-uniquemod tst-nodelete-rtldmod \ diff --cc debian/patches/kfreebsd/local-undef-glibc.diff index 000000000,000000000..f0c9c2b9f new file mode 100644 --- /dev/null +++ b/debian/patches/kfreebsd/local-undef-glibc.diff @@@ -1,0 -1,0 +1,18 @@@ ++Description: #undef __GLIBC__ before defining it ++Author: rmh ++Upstream status: REJECTED. DO NOT SUBMIT. (send to debian instead) ++ ++--- ++ include/features.h | 1 + ++ 1 file changed, 1 insertion(+) ++ ++--- a/include/features.h +++++ b/include/features.h ++@@ -352,6 +352,7 @@ ++ ++ /* Major and minor version number of the GNU C library package. Use ++ these macros to test for features in specific releases. */ +++#undef __GLIBC__ ++ #define __GLIBC__ 2 ++ #define __GLIBC_MINOR__ 23 ++ diff --cc debian/patches/kfreebsd/submitted-auxv.diff index 000000000,000000000..b9928b29c new file mode 100644 --- /dev/null +++ b/debian/patches/kfreebsd/submitted-auxv.diff @@@ -1,0 -1,0 +1,231 @@@ ++https://sourceware.org/bugzilla/show_bug.cgi?id=15794 ++ ++--- a/misc/getauxval.c +++++ b/misc/getauxval.c ++@@ -27,10 +27,15 @@ ++ ElfW(auxv_t) *p; ++ #endif ++ +++#ifdef AT_HWCAP ++ if (type == AT_HWCAP) ++ return GLRO(dl_hwcap); ++- else if (type == AT_HWCAP2) +++#endif +++ +++#ifdef AT_HWCAP2 +++ if (type == AT_HWCAP2) ++ return GLRO(dl_hwcap2); +++#endif ++ ++ #ifdef HAVE_AUX_VECTOR ++ for (p = GLRO(dl_auxv); p->a_type != AT_NULL; p++) ++--- /dev/null +++++ b/bits/auxv.h ++@@ -0,0 +1,91 @@ +++/* Copyright (C) 1995-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 +++ . */ +++ +++/* Legal values for a_type (entry type). */ +++ +++#define AT_NULL 0 /* End of vector */ +++#define AT_IGNORE 1 /* Entry should be ignored */ +++#define AT_EXECFD 2 /* File descriptor of program */ +++#define AT_PHDR 3 /* Program headers for program */ +++#define AT_PHENT 4 /* Size of program header entry */ +++#define AT_PHNUM 5 /* Number of program headers */ +++#define AT_PAGESZ 6 /* System page size */ +++#define AT_BASE 7 /* Base address of interpreter */ +++#define AT_FLAGS 8 /* Flags */ +++#define AT_ENTRY 9 /* Entry point of program */ +++#define AT_NOTELF 10 /* Program is not ELF */ +++#define AT_UID 11 /* Real uid */ +++#define AT_EUID 12 /* Effective uid */ +++#define AT_GID 13 /* Real gid */ +++#define AT_EGID 14 /* Effective gid */ +++#define AT_CLKTCK 17 /* Frequency of times() */ +++ +++/* Some more special a_type values describing the hardware. */ +++#define AT_PLATFORM 15 /* String identifying platform. */ +++#define AT_HWCAP 16 /* Machine-dependent hints about +++ processor capabilities. */ +++ +++/* This entry gives some information about the FPU initialization +++ performed by the kernel. */ +++#define AT_FPUCW 18 /* Used FPU control word. */ +++ +++/* Cache block sizes. */ +++#define AT_DCACHEBSIZE 19 /* Data cache block size. */ +++#define AT_ICACHEBSIZE 20 /* Instruction cache block size. */ +++#define AT_UCACHEBSIZE 21 /* Unified cache block size. */ +++ +++/* A special ignored value for PPC, used by the kernel to control the +++ interpretation of the AUXV. Must be > 16. */ +++#define AT_IGNOREPPC 22 /* Entry should be ignored. */ +++ +++#define AT_SECURE 23 /* Boolean, was exec setuid-like? */ +++ +++#define AT_BASE_PLATFORM 24 /* String identifying real platforms.*/ +++ +++#define AT_RANDOM 25 /* Address of 16 random bytes. */ +++ +++#define AT_HWCAP2 26 /* More machine-dependent hints about +++ processor capabilities. */ +++ +++#define AT_EXECFN 31 /* Filename of executable. */ +++ +++/* Pointer to the global system page used for system calls and other +++ nice things. */ +++#define AT_SYSINFO 32 +++#define AT_SYSINFO_EHDR 33 +++ +++/* Shapes of the caches. Bits 0-3 contains associativity; bits 4-7 contains +++ log2 of line size; mask those to get cache size. */ +++#define AT_L1I_CACHESHAPE 34 +++#define AT_L1D_CACHESHAPE 35 +++#define AT_L2_CACHESHAPE 36 +++#define AT_L3_CACHESHAPE 37 +++ +++/* Shapes of the caches, with more room to describe them. +++ *GEOMETRY are comprised of cache line size in bytes in the bottom 16 bits +++ and the cache associativity in the next 16 bits. */ +++#define AT_L1I_CACHESIZE 40 +++#define AT_L1I_CACHEGEOMETRY 41 +++#define AT_L1D_CACHESIZE 42 +++#define AT_L1D_CACHEGEOMETRY 43 +++#define AT_L2_CACHESIZE 44 +++#define AT_L2_CACHEGEOMETRY 45 +++#define AT_L3_CACHESIZE 46 +++#define AT_L3_CACHEGEOMETRY 47 +++ +++#define AT_MINSIGSTKSZ 51 /* Stack needed for signal delivery +++ (AArch64). */ ++--- a/elf/elf.h +++++ b/elf/elf.h ++@@ -1110,81 +1110,7 @@ ++ } a_un; ++ } Elf64_auxv_t; ++ ++-/* Legal values for a_type (entry type). */ ++- ++-#define AT_NULL 0 /* End of vector */ ++-#define AT_IGNORE 1 /* Entry should be ignored */ ++-#define AT_EXECFD 2 /* File descriptor of program */ ++-#define AT_PHDR 3 /* Program headers for program */ ++-#define AT_PHENT 4 /* Size of program header entry */ ++-#define AT_PHNUM 5 /* Number of program headers */ ++-#define AT_PAGESZ 6 /* System page size */ ++-#define AT_BASE 7 /* Base address of interpreter */ ++-#define AT_FLAGS 8 /* Flags */ ++-#define AT_ENTRY 9 /* Entry point of program */ ++-#define AT_NOTELF 10 /* Program is not ELF */ ++-#define AT_UID 11 /* Real uid */ ++-#define AT_EUID 12 /* Effective uid */ ++-#define AT_GID 13 /* Real gid */ ++-#define AT_EGID 14 /* Effective gid */ ++-#define AT_CLKTCK 17 /* Frequency of times() */ ++- ++-/* Some more special a_type values describing the hardware. */ ++-#define AT_PLATFORM 15 /* String identifying platform. */ ++-#define AT_HWCAP 16 /* Machine-dependent hints about ++- processor capabilities. */ ++- ++-/* This entry gives some information about the FPU initialization ++- performed by the kernel. */ ++-#define AT_FPUCW 18 /* Used FPU control word. */ ++- ++-/* Cache block sizes. */ ++-#define AT_DCACHEBSIZE 19 /* Data cache block size. */ ++-#define AT_ICACHEBSIZE 20 /* Instruction cache block size. */ ++-#define AT_UCACHEBSIZE 21 /* Unified cache block size. */ ++- ++-/* A special ignored value for PPC, used by the kernel to control the ++- interpretation of the AUXV. Must be > 16. */ ++-#define AT_IGNOREPPC 22 /* Entry should be ignored. */ ++- ++-#define AT_SECURE 23 /* Boolean, was exec setuid-like? */ ++- ++-#define AT_BASE_PLATFORM 24 /* String identifying real platforms.*/ ++- ++-#define AT_RANDOM 25 /* Address of 16 random bytes. */ ++- ++-#define AT_HWCAP2 26 /* More machine-dependent hints about ++- processor capabilities. */ ++- ++-#define AT_EXECFN 31 /* Filename of executable. */ ++- ++-/* Pointer to the global system page used for system calls and other ++- nice things. */ ++-#define AT_SYSINFO 32 ++-#define AT_SYSINFO_EHDR 33 ++- ++-/* Shapes of the caches. Bits 0-3 contains associativity; bits 4-7 contains ++- log2 of line size; mask those to get cache size. */ ++-#define AT_L1I_CACHESHAPE 34 ++-#define AT_L1D_CACHESHAPE 35 ++-#define AT_L2_CACHESHAPE 36 ++-#define AT_L3_CACHESHAPE 37 ++- ++-/* Shapes of the caches, with more room to describe them. ++- *GEOMETRY are comprised of cache line size in bytes in the bottom 16 bits ++- and the cache associativity in the next 16 bits. */ ++-#define AT_L1I_CACHESIZE 40 ++-#define AT_L1I_CACHEGEOMETRY 41 ++-#define AT_L1D_CACHESIZE 42 ++-#define AT_L1D_CACHEGEOMETRY 43 ++-#define AT_L2_CACHESIZE 44 ++-#define AT_L2_CACHEGEOMETRY 45 ++-#define AT_L3_CACHESIZE 46 ++-#define AT_L3_CACHEGEOMETRY 47 ++- ++-#define AT_MINSIGSTKSZ 51 /* Stack needed for signal delivery ++- (AArch64). */ ++- +++#include ++ /* Note section contents. Each entry in the note section begins with ++ a header of a fixed form. */ ++ ++--- a/misc/Makefile +++++ b/misc/Makefile ++@@ -34,7 +34,7 @@ ++ regexp.h bits/select.h bits/mman.h sys/xattr.h \ ++ syslog.h sys/syslog.h \ ++ bits/syslog.h bits/syslog-ldbl.h bits/syslog-path.h bits/error.h \ ++- bits/select2.h bits/hwcap.h sys/auxv.h \ +++ bits/select2.h bits/hwcap.h bits/auxv.h sys/auxv.h \ ++ sys/sysmacros.h bits/sysmacros.h bits/types/struct_iovec.h \ ++ bits/err-ldbl.h bits/error-ldbl.h ++ ++--- a/misc/sys/auxv.h +++++ b/misc/sys/auxv.h ++@@ -20,6 +20,7 @@ ++ #define _SYS_AUXV_H 1 ++ ++ #include +++#include ++ #include ++ #include ++ ++--- a/sysdeps/generic/ldsodefs.h +++++ b/sysdeps/generic/ldsodefs.h ++@@ -29,6 +29,7 @@ ++ #include ++ ++ #include +++#include ++ #include ++ #include ++ #include diff --cc debian/patches/kfreebsd/submitted-waitid.diff index 000000000,000000000..531525c3e new file mode 100644 --- /dev/null +++ b/debian/patches/kfreebsd/submitted-waitid.diff @@@ -1,0 -1,0 +1,77 @@@ ++ ++ ++http://sourceware.org/bugzilla/show_bug.cgi?id=15544 ++ ++ ++ ++diff --git a/bits/waitflags.h b/bits/waitflags.h ++index 59215f6..73fd714 100644 ++--- a/bits/waitflags.h +++++ b/bits/waitflags.h ++@@ -24,3 +24,16 @@ ++ # define WNOWAIT 8 /* Don't reap, just poll status. */ ++ # define WEXITED 16 /* Report dead child. */ ++ #endif +++ +++/* The following values are used by the `waitid' function. */ +++#if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8 +++# ifndef __ENUM_IDTYPE_T +++# define __ENUM_IDTYPE_T 1 +++typedef enum +++{ +++ P_ALL, /* Wait for any child. */ +++ P_PID, /* Wait for specified process. */ +++ P_PGID /* Wait for members of process group. */ +++} idtype_t; +++# endif +++#endif ++diff --git a/posix/sys/wait.h b/posix/sys/wait.h ++index 3ecc493..5692b07 100644 ++--- a/posix/sys/wait.h +++++ b/posix/sys/wait.h ++@@ -94,17 +94,6 @@ typedef union ++ # define W_STOPCODE(sig) __W_STOPCODE (sig) ++ #endif ++ ++-/* The following values are used by the `waitid' function. */ ++-#if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8 ++-typedef enum ++-{ ++- P_ALL, /* Wait for any child. */ ++- P_PID, /* Wait for specified process. */ ++- P_PGID /* Wait for members of process group. */ ++-} idtype_t; ++-#endif ++- ++- ++ /* Wait for a child to die. When one does, put its status in *STAT_LOC ++ and return its process ID. For errors, return (pid_t) -1. ++ ++diff --git a/sysdeps/unix/sysv/linux/bits/waitflags.h b/sysdeps/unix/sysv/linux/bits/waitflags.h ++index 2be017d..2ede21b 100644 ++--- a/sysdeps/unix/sysv/linux/bits/waitflags.h +++++ b/sysdeps/unix/sysv/linux/bits/waitflags.h ++@@ -35,3 +35,23 @@ ++ in this group */ ++ #define __WALL 0x40000000 /* Wait for any child. */ ++ #define __WCLONE 0x80000000 /* Wait for cloned process. */ +++ +++/* The following values are used by the `waitid' function. */ +++#if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8 +++# ifndef __ENUM_IDTYPE_T +++# define __ENUM_IDTYPE_T 1 +++ +++/* The Linux kernel defines these bare, rather than an enum, +++ which causes a conflict if the include order is reversed. */ +++# undef P_ALL +++# undef P_PID +++# undef P_PGID +++ +++typedef enum +++{ +++ P_ALL, /* Wait for any child. */ +++ P_PID, /* Wait for specified process. */ +++ P_PGID /* Wait for members of process group. */ +++} idtype_t; +++# endif +++#endif diff --cc debian/patches/locale/LC_IDENTIFICATION-optional-fields.diff index 000000000,000000000..7e98d412a new file mode 100644 --- /dev/null +++ b/debian/patches/locale/LC_IDENTIFICATION-optional-fields.diff @@@ -1,0 -1,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 ++@@ -145,6 +145,9 @@ ++ #cat); \ ++ identification->cat = ""; \ ++ } +++#define TEST_ELEM_OPT(cat) \ +++ if (identification->cat == NULL) \ +++ identification->cat = ""; \ ++ ++ TEST_ELEM (title); ++ TEST_ELEM (source); ++@@ -155,9 +158,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); ++ diff --cc debian/patches/locale/check-unknown-symbols.diff index 000000000,000000000..dbe8f3632 new file mode 100644 --- /dev/null +++ b/debian/patches/locale/check-unknown-symbols.diff @@@ -1,0 -1,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 ++@@ -3498,8 +3498,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 ++ { diff --cc debian/patches/locale/locale-print-LANGUAGE.diff index 000000000,000000000..b656d897a new file mode 100644 --- /dev/null +++ b/debian/patches/locale/locale-print-LANGUAGE.diff @@@ -1,0 -1,0 +1,40 @@@ ++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 ++@@ -793,11 +793,15 @@ ++ show_locale_vars (void) ++ { ++ const char *lcall = getenv ("LC_ALL") ?: ""; +++ const char *language = getenv ("LANGUAGE") ?: ""; ++ const char *lang = getenv ("LANG") ?: ""; ++ ++ /* 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 (size_t cat_no = 0; cat_no < NCATEGORIES; ++cat_no) ++ if (cat_no != LC_ALL) ++--- a/locale/tst-locale-locpath.sh +++++ b/locale/tst-locale-locpath.sh ++@@ -56,6 +56,7 @@ EOF ++ ++ cat > "$testroot/stdout-expected" < ++# DP: Upstream status: not submitted ++# DP: Date: 2006-01-10 ++ ++--- ++ localedata/locales/fo_FO | 4 ++-- ++ 1 file changed, 2 insertions(+), 2 deletions(-) ++ ++--- a/localedata/locales/fo_FO +++++ b/localedata/locales/fo_FO ++@@ -98,8 +98,8 @@ ++ "oktober";/ ++ "november";/ ++ "desember" ++-d_t_fmt "%a %d %b %Y %T" ++-date_fmt "%a %d %b %Y %T %Z" +++d_t_fmt "%a. %d. %b. %Y %T %Z" +++date_fmt "%1 tann %-e. %B %Y klokkan %T (UTC%z)" ++ d_fmt "%d//%m-%Y" ++ t_fmt "%T" ++ am_pm "";"" diff --cc debian/patches/localedata/git-unicode-13-support.diff index 000000000,000000000..b38ddbbba new file mode 100644 --- /dev/null +++ b/debian/patches/localedata/git-unicode-13-support.diff @@@ -1,0 -1,0 +1,8199 @@@ ++commit 8645f624697afecfaa4d97ac584bc0a943cbca17 ++Author: Mike FABIAN ++Date: Tue Apr 14 18:43:13 2020 +0200 ++ ++ Bug 25819: Update to Unicode 13.0.0 ++ ++ Unicode 13.0.0 Support: Character encoding, character type info, and ++ transliteration tables are all updated to Unicode 13.0.0, using ++ the generator scripts contributed by Mike FABIAN (Red Hat). ++ ++ Total added characters in newly generated CHARMAP: 5930 ++ Total added characters in newly generated WIDTH: 5536 ++ ++diff --git a/localedata/charmaps/UTF-8 b/localedata/charmaps/UTF-8 ++index e3d84d55c3..14c5d4fa33 100644 ++--- a/localedata/charmaps/UTF-8 +++++ b/localedata/charmaps/UTF-8 ++@@ -2127,6 +2127,16 @@ CHARMAP ++ /xe0/xa2/xbb ARABIC LETTER AFRICAN FEH ++ /xe0/xa2/xbc ARABIC LETTER AFRICAN QAF ++ /xe0/xa2/xbd ARABIC LETTER AFRICAN NOON +++ /xe0/xa2/xbe ARABIC LETTER PEH WITH SMALL V +++ /xe0/xa2/xbf ARABIC LETTER TEH WITH SMALL V +++ /xe0/xa3/x80 ARABIC LETTER TTEH WITH SMALL V +++ /xe0/xa3/x81 ARABIC LETTER TCHEH WITH SMALL V +++ /xe0/xa3/x82 ARABIC LETTER KEHEH WITH SMALL V +++ /xe0/xa3/x83 ARABIC LETTER GHAIN WITH THREE DOTS ABOVE +++ /xe0/xa3/x84 ARABIC LETTER AFRICAN QAF WITH THREE DOTS ABOVE +++ /xe0/xa3/x85 ARABIC LETTER JEEM WITH THREE DOTS ABOVE +++ /xe0/xa3/x86 ARABIC LETTER JEEM WITH THREE DOTS BELOW +++ /xe0/xa3/x87 ARABIC LETTER LAM WITH SMALL ARABIC LETTER TAH ABOVE ++ /xe0/xa3/x93 ARABIC SMALL LOW WAW ++ /xe0/xa3/x94 ARABIC SMALL HIGH WORD AR-RUB ++ /xe0/xa3/x95 ARABIC SMALL HIGH SAD ++@@ -2630,6 +2640,7 @@ CHARMAP ++ /xe0/xad/x8b ORIYA VOWEL SIGN O ++ /xe0/xad/x8c ORIYA VOWEL SIGN AU ++ /xe0/xad/x8d ORIYA SIGN VIRAMA +++ /xe0/xad/x95 ORIYA SIGN OVERLINE ++ /xe0/xad/x96 ORIYA AI LENGTH MARK ++ /xe0/xad/x97 ORIYA AU LENGTH MARK ++ /xe0/xad/x9c ORIYA LETTER RRA ++@@ -2920,6 +2931,7 @@ CHARMAP ++ /xe0/xb4/x81 MALAYALAM SIGN CANDRABINDU ++ /xe0/xb4/x82 MALAYALAM SIGN ANUSVARA ++ /xe0/xb4/x83 MALAYALAM SIGN VISARGA +++ /xe0/xb4/x84 MALAYALAM LETTER VEDIC ANUSVARA ++ /xe0/xb4/x85 MALAYALAM LETTER A ++ /xe0/xb4/x86 MALAYALAM LETTER AA ++ /xe0/xb4/x87 MALAYALAM LETTER I ++@@ -3033,6 +3045,7 @@ CHARMAP ++ /xe0/xb5/xbd MALAYALAM LETTER CHILLU L ++ /xe0/xb5/xbe MALAYALAM LETTER CHILLU LL ++ /xe0/xb5/xbf MALAYALAM LETTER CHILLU K +++ /xe0/xb6/x81 SINHALA SIGN CANDRABINDU ++ /xe0/xb6/x82 SINHALA SIGN ANUSVARAYA ++ /xe0/xb6/x83 SINHALA SIGN VISARGAYA ++ /xe0/xb6/x85 SINHALA LETTER AYANNA ++@@ -6053,6 +6066,8 @@ CHARMAP ++ /xe1/xaa/xbc COMBINING DOUBLE PARENTHESES ABOVE ++ /xe1/xaa/xbd COMBINING PARENTHESES BELOW ++ /xe1/xaa/xbe COMBINING PARENTHESES OVERLAY +++ /xe1/xaa/xbf COMBINING LATIN SMALL LETTER W BELOW +++ /xe1/xab/x80 COMBINING LATIN SMALL LETTER TURNED W BELOW ++ /xe1/xac/x80 BALINESE SIGN ULU RICEM ++ /xe1/xac/x81 BALINESE SIGN ULU CANDRA ++ /xe1/xac/x82 BALINESE SIGN CECEK ++@@ -10142,6 +10157,7 @@ CHARMAP ++ /xe2/xae/x93 NEWLINE RIGHT ++ /xe2/xae/x94 FOUR CORNER ARROWS CIRCLING ANTICLOCKWISE ++ /xe2/xae/x95 RIGHTWARDS BLACK ARROW +++ /xe2/xae/x97 SYMBOL FOR TYPE A ELECTRONICS ++ /xe2/xae/x98 THREE-D TOP-LIGHTED LEFTWARDS EQUILATERAL ARROWHEAD ++ /xe2/xae/x99 THREE-D RIGHT-LIGHTED UPWARDS EQUILATERAL ARROWHEAD ++ /xe2/xae/x9a THREE-D TOP-LIGHTED RIGHTWARDS EQUILATERAL ARROWHEAD ++@@ -10785,6 +10801,9 @@ CHARMAP ++ /xe2/xb9/x8d PARAGRAPHUS MARK ++ /xe2/xb9/x8e PUNCTUS ELEVATUS MARK ++ /xe2/xb9/x8f CORNISH VERSE DIVIDER +++ /xe2/xb9/x90 CROSS PATTY WITH RIGHT CROSSBAR +++ /xe2/xb9/x91 CROSS PATTY WITH LEFT CROSSBAR +++ /xe2/xb9/x92 TIRONIAN SIGN CAPITAL ET ++ /xe2/xba/x80 CJK RADICAL REPEAT ++ /xe2/xba/x81 CJK RADICAL CLIFF ++ /xe2/xba/x82 CJK RADICAL SECOND ONE ++@@ -11559,6 +11578,11 @@ CHARMAP ++ /xe3/x86/xb8 BOPOMOFO LETTER GH ++ /xe3/x86/xb9 BOPOMOFO LETTER LH ++ /xe3/x86/xba BOPOMOFO LETTER ZY +++ /xe3/x86/xbb BOPOMOFO FINAL LETTER G +++ /xe3/x86/xbc BOPOMOFO LETTER GW +++ /xe3/x86/xbd BOPOMOFO LETTER KW +++ /xe3/x86/xbe BOPOMOFO LETTER OE +++ /xe3/x86/xbf BOPOMOFO LETTER AH ++ /xe3/x87/x80 CJK STROKE T ++ /xe3/x87/x81 CJK STROKE WG ++ /xe3/x87/x82 CJK STROKE XG ++@@ -12224,7 +12248,7 @@ CHARMAP ++ .. /xe4/xb3/x80 ++ .. /xe4/xb4/x80 ++ .. /xe4/xb5/x80 ++-.. /xe4/xb6/x80 +++.. /xe4/xb6/x80 ++ /xe4/xb7/x80 HEXAGRAM FOR THE CREATIVE HEAVEN ++ /xe4/xb7/x81 HEXAGRAM FOR THE RECEPTIVE EARTH ++ /xe4/xb7/x82 HEXAGRAM FOR DIFFICULTY AT THE BEGINNING ++@@ -12616,7 +12640,7 @@ CHARMAP ++ .. /xe9/xbc/x80 ++ .. /xe9/xbd/x80 ++ .. /xe9/xbe/x80 ++-.. /xe9/xbf/x80 +++.. /xe9/xbf/x80 ++ /xea/x80/x80 YI SYLLABLE IT ++ /xea/x80/x81 YI SYLLABLE IX ++ /xea/x80/x82 YI SYLLABLE I ++@@ -14566,6 +14590,12 @@ CHARMAP ++ /xea/x9f/x84 LATIN CAPITAL LETTER C WITH PALATAL HOOK ++ /xea/x9f/x85 LATIN CAPITAL LETTER S WITH HOOK ++ /xea/x9f/x86 LATIN CAPITAL LETTER Z WITH PALATAL HOOK +++ /xea/x9f/x87 LATIN CAPITAL LETTER D WITH SHORT STROKE OVERLAY +++ /xea/x9f/x88 LATIN SMALL LETTER D WITH SHORT STROKE OVERLAY +++ /xea/x9f/x89 LATIN CAPITAL LETTER S WITH SHORT STROKE OVERLAY +++ /xea/x9f/x8a LATIN SMALL LETTER S WITH SHORT STROKE OVERLAY +++ /xea/x9f/xb5 LATIN CAPITAL LETTER REVERSED HALF H +++ /xea/x9f/xb6 LATIN SMALL LETTER REVERSED HALF H ++ /xea/x9f/xb7 LATIN EPIGRAPHIC LETTER SIDEWAYS I ++ /xea/x9f/xb8 MODIFIER LETTER CAPITAL H WITH STROKE ++ /xea/x9f/xb9 MODIFIER LETTER SMALL LIGATURE OE ++@@ -14619,6 +14649,7 @@ CHARMAP ++ /xea/xa0/xa9 SYLOTI NAGRI POETRY MARK-2 ++ /xea/xa0/xaa SYLOTI NAGRI POETRY MARK-3 ++ /xea/xa0/xab SYLOTI NAGRI POETRY MARK-4 +++ /xea/xa0/xac SYLOTI NAGRI SIGN ALTERNATE HASANTA ++ /xea/xa0/xb0 NORTH INDIC FRACTION ONE QUARTER ++ /xea/xa0/xb1 NORTH INDIC FRACTION ONE HALF ++ /xea/xa0/xb2 NORTH INDIC FRACTION THREE QUARTERS ++@@ -15333,6 +15364,10 @@ CHARMAP ++ /xea/xad/xa5 GREEK LETTER SMALL CAPITAL OMEGA ++ /xea/xad/xa6 LATIN SMALL LETTER DZ DIGRAPH WITH RETROFLEX HOOK ++ /xea/xad/xa7 LATIN SMALL LETTER TS DIGRAPH WITH RETROFLEX HOOK +++ /xea/xad/xa8 LATIN SMALL LETTER TURNED R WITH MIDDLE TILDE +++ /xea/xad/xa9 MODIFIER LETTER SMALL TURNED W +++ /xea/xad/xaa MODIFIER LETTER LEFT TACK +++ /xea/xad/xab MODIFIER LETTER RIGHT TACK ++ /xea/xad/xb0 CHEROKEE SMALL LETTER A ++ /xea/xad/xb1 CHEROKEE SMALL LETTER E ++ /xea/xad/xb2 CHEROKEE SMALL LETTER I ++@@ -28790,6 +28825,7 @@ CHARMAP ++ /xf0/x90/x86/x99 ROMAN DUPONDIUS SIGN ++ /xf0/x90/x86/x9a ROMAN AS SIGN ++ /xf0/x90/x86/x9b ROMAN CENTURIAL SIGN +++ /xf0/x90/x86/x9c ASCIA SYMBOL ++ /xf0/x90/x86/xa0 GREEK SYMBOL TAU RHO ++ /xf0/x90/x87/x90 PHAISTOS DISC SIGN PEDESTRIAN ++ /xf0/x90/x87/x91 PHAISTOS DISC SIGN PLUMED HEAD ++@@ -30761,6 +30797,53 @@ CHARMAP ++ /xf0/x90/xb9/xbc RUMI FRACTION ONE QUARTER ++ /xf0/x90/xb9/xbd RUMI FRACTION ONE THIRD ++ /xf0/x90/xb9/xbe RUMI FRACTION TWO THIRDS +++ /xf0/x90/xba/x80 YEZIDI LETTER ELIF +++ /xf0/x90/xba/x81 YEZIDI LETTER BE +++ /xf0/x90/xba/x82 YEZIDI LETTER PE +++ /xf0/x90/xba/x83 YEZIDI LETTER PHE +++ /xf0/x90/xba/x84 YEZIDI LETTER THE +++ /xf0/x90/xba/x85 YEZIDI LETTER SE +++ /xf0/x90/xba/x86 YEZIDI LETTER CIM +++ /xf0/x90/xba/x87 YEZIDI LETTER CHIM +++ /xf0/x90/xba/x88 YEZIDI LETTER CHHIM +++ /xf0/x90/xba/x89 YEZIDI LETTER HHA +++ /xf0/x90/xba/x8a YEZIDI LETTER XA +++ /xf0/x90/xba/x8b YEZIDI LETTER DAL +++ /xf0/x90/xba/x8c YEZIDI LETTER ZAL +++ /xf0/x90/xba/x8d YEZIDI LETTER RA +++ /xf0/x90/xba/x8e YEZIDI LETTER RHA +++ /xf0/x90/xba/x8f YEZIDI LETTER ZA +++ /xf0/x90/xba/x90 YEZIDI LETTER JA +++ /xf0/x90/xba/x91 YEZIDI LETTER SIN +++ /xf0/x90/xba/x92 YEZIDI LETTER SHIN +++ /xf0/x90/xba/x93 YEZIDI LETTER SAD +++ /xf0/x90/xba/x94 YEZIDI LETTER DAD +++ /xf0/x90/xba/x95 YEZIDI LETTER TA +++ /xf0/x90/xba/x96 YEZIDI LETTER ZE +++ /xf0/x90/xba/x97 YEZIDI LETTER EYN +++ /xf0/x90/xba/x98 YEZIDI LETTER XHEYN +++ /xf0/x90/xba/x99 YEZIDI LETTER FA +++ /xf0/x90/xba/x9a YEZIDI LETTER VA +++ /xf0/x90/xba/x9b YEZIDI LETTER VA ALTERNATE FORM +++ /xf0/x90/xba/x9c YEZIDI LETTER QAF +++ /xf0/x90/xba/x9d YEZIDI LETTER KAF +++ /xf0/x90/xba/x9e YEZIDI LETTER KHAF +++ /xf0/x90/xba/x9f YEZIDI LETTER GAF +++ /xf0/x90/xba/xa0 YEZIDI LETTER LAM +++ /xf0/x90/xba/xa1 YEZIDI LETTER MIM +++ /xf0/x90/xba/xa2 YEZIDI LETTER NUN +++ /xf0/x90/xba/xa3 YEZIDI LETTER UM +++ /xf0/x90/xba/xa4 YEZIDI LETTER WAW +++ /xf0/x90/xba/xa5 YEZIDI LETTER OW +++ /xf0/x90/xba/xa6 YEZIDI LETTER EW +++ /xf0/x90/xba/xa7 YEZIDI LETTER HAY +++ /xf0/x90/xba/xa8 YEZIDI LETTER YOT +++ /xf0/x90/xba/xa9 YEZIDI LETTER ET +++ /xf0/x90/xba/xab YEZIDI COMBINING HAMZA MARK +++ /xf0/x90/xba/xac YEZIDI COMBINING MADDA MARK +++ /xf0/x90/xba/xad YEZIDI HYPHENATION MARK +++ /xf0/x90/xba/xb0 YEZIDI LETTER LAM WITH DOT ABOVE +++ /xf0/x90/xba/xb1 YEZIDI LETTER YOT WITH CIRCUMFLEX ABOVE ++ /xf0/x90/xbc/x80 OLD SOGDIAN LETTER ALEPH ++ /xf0/x90/xbc/x81 OLD SOGDIAN LETTER FINAL ALEPH ++ /xf0/x90/xbc/x82 OLD SOGDIAN LETTER BETH ++@@ -30843,6 +30926,34 @@ CHARMAP ++ /xf0/x90/xbd/x97 SOGDIAN PUNCTUATION CIRCLE WITH DOT ++ /xf0/x90/xbd/x98 SOGDIAN PUNCTUATION TWO CIRCLES WITH DOTS ++ /xf0/x90/xbd/x99 SOGDIAN PUNCTUATION HALF CIRCLE WITH DOT +++ /xf0/x90/xbe/xb0 CHORASMIAN LETTER ALEPH +++ /xf0/x90/xbe/xb1 CHORASMIAN LETTER SMALL ALEPH +++ /xf0/x90/xbe/xb2 CHORASMIAN LETTER BETH +++ /xf0/x90/xbe/xb3 CHORASMIAN LETTER GIMEL +++ /xf0/x90/xbe/xb4 CHORASMIAN LETTER DALETH +++ /xf0/x90/xbe/xb5 CHORASMIAN LETTER HE +++ /xf0/x90/xbe/xb6 CHORASMIAN LETTER WAW +++ /xf0/x90/xbe/xb7 CHORASMIAN LETTER CURLED WAW +++ /xf0/x90/xbe/xb8 CHORASMIAN LETTER ZAYIN +++ /xf0/x90/xbe/xb9 CHORASMIAN LETTER HETH +++ /xf0/x90/xbe/xba CHORASMIAN LETTER YODH +++ /xf0/x90/xbe/xbb CHORASMIAN LETTER KAPH +++ /xf0/x90/xbe/xbc CHORASMIAN LETTER LAMEDH +++ /xf0/x90/xbe/xbd CHORASMIAN LETTER MEM +++ /xf0/x90/xbe/xbe CHORASMIAN LETTER NUN +++ /xf0/x90/xbe/xbf CHORASMIAN LETTER SAMEKH +++ /xf0/x90/xbf/x80 CHORASMIAN LETTER AYIN +++ /xf0/x90/xbf/x81 CHORASMIAN LETTER PE +++ /xf0/x90/xbf/x82 CHORASMIAN LETTER RESH +++ /xf0/x90/xbf/x83 CHORASMIAN LETTER SHIN +++ /xf0/x90/xbf/x84 CHORASMIAN LETTER TAW +++ /xf0/x90/xbf/x85 CHORASMIAN NUMBER ONE +++ /xf0/x90/xbf/x86 CHORASMIAN NUMBER TWO +++ /xf0/x90/xbf/x87 CHORASMIAN NUMBER THREE +++ /xf0/x90/xbf/x88 CHORASMIAN NUMBER FOUR +++ /xf0/x90/xbf/x89 CHORASMIAN NUMBER TEN +++ /xf0/x90/xbf/x8a CHORASMIAN NUMBER TWENTY +++ /xf0/x90/xbf/x8b CHORASMIAN NUMBER ONE HUNDRED ++ /xf0/x90/xbf/xa0 ELYMAIC LETTER ALEPH ++ /xf0/x90/xbf/xa1 ELYMAIC LETTER BETH ++ /xf0/x90/xbf/xa2 ELYMAIC LETTER GIMEL ++@@ -31147,6 +31258,7 @@ CHARMAP ++ /xf0/x91/x85/x84 CHAKMA LETTER LHAA ++ /xf0/x91/x85/x85 CHAKMA VOWEL SIGN AA ++ /xf0/x91/x85/x86 CHAKMA VOWEL SIGN EI +++ /xf0/x91/x85/x87 CHAKMA LETTER VAA ++ /xf0/x91/x85/x90 MAHAJANI LETTER A ++ /xf0/x91/x85/x91 MAHAJANI LETTER I ++ /xf0/x91/x85/x92 MAHAJANI LETTER U ++@@ -31264,6 +31376,8 @@ CHARMAP ++ /xf0/x91/x87/x8b SHARADA VOWEL MODIFIER MARK ++ /xf0/x91/x87/x8c SHARADA EXTRA SHORT VOWEL MARK ++ /xf0/x91/x87/x8d SHARADA SUTRA MARK +++ /xf0/x91/x87/x8e SHARADA VOWEL SIGN PRISHTHAMATRA E +++ /xf0/x91/x87/x8f SHARADA SIGN INVERTED CANDRABINDU ++ /xf0/x91/x87/x90 SHARADA DIGIT ZERO ++ /xf0/x91/x87/x91 SHARADA DIGIT ONE ++ /xf0/x91/x87/x92 SHARADA DIGIT TWO ++@@ -31645,10 +31759,13 @@ CHARMAP ++ /xf0/x91/x91/x97 NEWA DIGIT SEVEN ++ /xf0/x91/x91/x98 NEWA DIGIT EIGHT ++ /xf0/x91/x91/x99 NEWA DIGIT NINE +++ /xf0/x91/x91/x9a NEWA DOUBLE COMMA ++ /xf0/x91/x91/x9b NEWA PLACEHOLDER MARK ++ /xf0/x91/x91/x9d NEWA INSERTION SIGN ++ /xf0/x91/x91/x9e NEWA SANDHI MARK ++ /xf0/x91/x91/x9f NEWA LETTER VEDIC ANUSVARA +++ /xf0/x91/x91/xa0 NEWA SIGN JIHVAMULIYA +++ /xf0/x91/x91/xa1 NEWA SIGN UPADHMANIYA ++ /xf0/x91/x92/x80 TIRHUTA ANJI ++ /xf0/x91/x92/x81 TIRHUTA LETTER A ++ /xf0/x91/x92/x82 TIRHUTA LETTER AA ++@@ -32184,6 +32301,78 @@ CHARMAP ++ /xf0/x91/xa3/xb1 WARANG CITI NUMBER EIGHTY ++ /xf0/x91/xa3/xb2 WARANG CITI NUMBER NINETY ++ /xf0/x91/xa3/xbf WARANG CITI OM +++ /xf0/x91/xa4/x80 DIVES AKURU LETTER A +++ /xf0/x91/xa4/x81 DIVES AKURU LETTER AA +++ /xf0/x91/xa4/x82 DIVES AKURU LETTER I +++ /xf0/x91/xa4/x83 DIVES AKURU LETTER II +++ /xf0/x91/xa4/x84 DIVES AKURU LETTER U +++ /xf0/x91/xa4/x85 DIVES AKURU LETTER UU +++ /xf0/x91/xa4/x86 DIVES AKURU LETTER E +++ /xf0/x91/xa4/x89 DIVES AKURU LETTER O +++ /xf0/x91/xa4/x8c DIVES AKURU LETTER KA +++ /xf0/x91/xa4/x8d DIVES AKURU LETTER KHA +++ /xf0/x91/xa4/x8e DIVES AKURU LETTER GA +++ /xf0/x91/xa4/x8f DIVES AKURU LETTER GHA +++ /xf0/x91/xa4/x90 DIVES AKURU LETTER NGA +++ /xf0/x91/xa4/x91 DIVES AKURU LETTER CA +++ /xf0/x91/xa4/x92 DIVES AKURU LETTER CHA +++ /xf0/x91/xa4/x93 DIVES AKURU LETTER JA +++ /xf0/x91/xa4/x95 DIVES AKURU LETTER NYA +++ /xf0/x91/xa4/x96 DIVES AKURU LETTER TTA +++ /xf0/x91/xa4/x98 DIVES AKURU LETTER DDA +++ /xf0/x91/xa4/x99 DIVES AKURU LETTER DDHA +++ /xf0/x91/xa4/x9a DIVES AKURU LETTER NNA +++ /xf0/x91/xa4/x9b DIVES AKURU LETTER TA +++ /xf0/x91/xa4/x9c DIVES AKURU LETTER THA +++ /xf0/x91/xa4/x9d DIVES AKURU LETTER DA +++ /xf0/x91/xa4/x9e DIVES AKURU LETTER DHA +++ /xf0/x91/xa4/x9f DIVES AKURU LETTER NA +++ /xf0/x91/xa4/xa0 DIVES AKURU LETTER PA +++ /xf0/x91/xa4/xa1 DIVES AKURU LETTER PHA +++ /xf0/x91/xa4/xa2 DIVES AKURU LETTER BA +++ /xf0/x91/xa4/xa3 DIVES AKURU LETTER BHA +++ /xf0/x91/xa4/xa4 DIVES AKURU LETTER MA +++ /xf0/x91/xa4/xa5 DIVES AKURU LETTER YA +++ /xf0/x91/xa4/xa6 DIVES AKURU LETTER YYA +++ /xf0/x91/xa4/xa7 DIVES AKURU LETTER RA +++ /xf0/x91/xa4/xa8 DIVES AKURU LETTER LA +++ /xf0/x91/xa4/xa9 DIVES AKURU LETTER VA +++ /xf0/x91/xa4/xaa DIVES AKURU LETTER SHA +++ /xf0/x91/xa4/xab DIVES AKURU LETTER SSA +++ /xf0/x91/xa4/xac DIVES AKURU LETTER SA +++ /xf0/x91/xa4/xad DIVES AKURU LETTER HA +++ /xf0/x91/xa4/xae DIVES AKURU LETTER LLA +++ /xf0/x91/xa4/xaf DIVES AKURU LETTER ZA +++ /xf0/x91/xa4/xb0 DIVES AKURU VOWEL SIGN AA +++ /xf0/x91/xa4/xb1 DIVES AKURU VOWEL SIGN I +++ /xf0/x91/xa4/xb2 DIVES AKURU VOWEL SIGN II +++ /xf0/x91/xa4/xb3 DIVES AKURU VOWEL SIGN U +++ /xf0/x91/xa4/xb4 DIVES AKURU VOWEL SIGN UU +++ /xf0/x91/xa4/xb5 DIVES AKURU VOWEL SIGN E +++ /xf0/x91/xa4/xb7 DIVES AKURU VOWEL SIGN AI +++ /xf0/x91/xa4/xb8 DIVES AKURU VOWEL SIGN O +++ /xf0/x91/xa4/xbb DIVES AKURU SIGN ANUSVARA +++ /xf0/x91/xa4/xbc DIVES AKURU SIGN CANDRABINDU +++ /xf0/x91/xa4/xbd DIVES AKURU SIGN HALANTA +++ /xf0/x91/xa4/xbe DIVES AKURU VIRAMA +++ /xf0/x91/xa4/xbf DIVES AKURU PREFIXED NASAL SIGN +++ /xf0/x91/xa5/x80 DIVES AKURU MEDIAL YA +++ /xf0/x91/xa5/x81 DIVES AKURU INITIAL RA +++ /xf0/x91/xa5/x82 DIVES AKURU MEDIAL RA +++ /xf0/x91/xa5/x83 DIVES AKURU SIGN NUKTA +++ /xf0/x91/xa5/x84 DIVES AKURU DOUBLE DANDA +++ /xf0/x91/xa5/x85 DIVES AKURU GAP FILLER +++ /xf0/x91/xa5/x86 DIVES AKURU END OF TEXT MARK +++ /xf0/x91/xa5/x90 DIVES AKURU DIGIT ZERO +++ /xf0/x91/xa5/x91 DIVES AKURU DIGIT ONE +++ /xf0/x91/xa5/x92 DIVES AKURU DIGIT TWO +++ /xf0/x91/xa5/x93 DIVES AKURU DIGIT THREE +++ /xf0/x91/xa5/x94 DIVES AKURU DIGIT FOUR +++ /xf0/x91/xa5/x95 DIVES AKURU DIGIT FIVE +++ /xf0/x91/xa5/x96 DIVES AKURU DIGIT SIX +++ /xf0/x91/xa5/x97 DIVES AKURU DIGIT SEVEN +++ /xf0/x91/xa5/x98 DIVES AKURU DIGIT EIGHT +++ /xf0/x91/xa5/x99 DIVES AKURU DIGIT NINE ++ /xf0/x91/xa6/xa0 NANDINAGARI LETTER A ++ /xf0/x91/xa6/xa1 NANDINAGARI LETTER AA ++ /xf0/x91/xa6/xa2 NANDINAGARI LETTER I ++@@ -32789,6 +32978,7 @@ CHARMAP ++ /xf0/x91/xbb/xb6 MAKASAR VOWEL SIGN O ++ /xf0/x91/xbb/xb7 MAKASAR PASSIMBANG ++ /xf0/x91/xbb/xb8 MAKASAR END OF SECTION +++ /xf0/x91/xbe/xb0 LISU LETTER YHA ++ /xf0/x91/xbf/x80 TAMIL FRACTION ONE THREE-HUNDRED-AND-TWENTIETH ++ /xf0/x91/xbf/x81 TAMIL FRACTION ONE ONE-HUNDRED-AND-SIXTIETH ++ /xf0/x91/xbf/x82 TAMIL FRACTION ONE EIGHTIETH ++@@ -36756,6 +36946,9 @@ CHARMAP ++ /xf0/x96/xbf/xa1 NUSHU ITERATION MARK ++ /xf0/x96/xbf/xa2 OLD CHINESE HOOK MARK ++ /xf0/x96/xbf/xa3 OLD CHINESE ITERATION MARK +++ /xf0/x96/xbf/xa4 KHITAN SMALL SCRIPT FILLER +++ /xf0/x96/xbf/xb0 VIETNAMESE ALTERNATE READING MARK CA +++ /xf0/x96/xbf/xb1 VIETNAMESE ALTERNATE READING MARK NHAY ++ .. /xf0/x97/x80/x80 ++ .. /xf0/x97/x81/x80 ++ .. /xf0/x97/x82/x80 ++@@ -37607,6 +37800,490 @@ CHARMAP ++ /xf0/x98/xab/xb0 TANGUT COMPONENT-753 ++ /xf0/x98/xab/xb1 TANGUT COMPONENT-754 ++ /xf0/x98/xab/xb2 TANGUT COMPONENT-755 +++ /xf0/x98/xab/xb3 TANGUT COMPONENT-756 +++ /xf0/x98/xab/xb4 TANGUT COMPONENT-757 +++ /xf0/x98/xab/xb5 TANGUT COMPONENT-758 +++ /xf0/x98/xab/xb6 TANGUT COMPONENT-759 +++ /xf0/x98/xab/xb7 TANGUT COMPONENT-760 +++ /xf0/x98/xab/xb8 TANGUT COMPONENT-761 +++ /xf0/x98/xab/xb9 TANGUT COMPONENT-762 +++ /xf0/x98/xab/xba TANGUT COMPONENT-763 +++ /xf0/x98/xab/xbb TANGUT COMPONENT-764 +++ /xf0/x98/xab/xbc TANGUT COMPONENT-765 +++ /xf0/x98/xab/xbd TANGUT COMPONENT-766 +++ /xf0/x98/xab/xbe TANGUT COMPONENT-767 +++ /xf0/x98/xab/xbf TANGUT COMPONENT-768 +++ /xf0/x98/xac/x80 KHITAN SMALL SCRIPT CHARACTER-18B00 +++ /xf0/x98/xac/x81 KHITAN SMALL SCRIPT CHARACTER-18B01 +++ /xf0/x98/xac/x82 KHITAN SMALL SCRIPT CHARACTER-18B02 +++ /xf0/x98/xac/x83 KHITAN SMALL SCRIPT CHARACTER-18B03 +++ /xf0/x98/xac/x84 KHITAN SMALL SCRIPT CHARACTER-18B04 +++ /xf0/x98/xac/x85 KHITAN SMALL SCRIPT CHARACTER-18B05 +++ /xf0/x98/xac/x86 KHITAN SMALL SCRIPT CHARACTER-18B06 +++ /xf0/x98/xac/x87 KHITAN SMALL SCRIPT CHARACTER-18B07 +++ /xf0/x98/xac/x88 KHITAN SMALL SCRIPT CHARACTER-18B08 +++ /xf0/x98/xac/x89 KHITAN SMALL SCRIPT CHARACTER-18B09 +++ /xf0/x98/xac/x8a KHITAN SMALL SCRIPT CHARACTER-18B0A +++ /xf0/x98/xac/x8b KHITAN SMALL SCRIPT CHARACTER-18B0B +++ /xf0/x98/xac/x8c KHITAN SMALL SCRIPT CHARACTER-18B0C +++ /xf0/x98/xac/x8d KHITAN SMALL SCRIPT CHARACTER-18B0D +++ /xf0/x98/xac/x8e KHITAN SMALL SCRIPT CHARACTER-18B0E +++ /xf0/x98/xac/x8f KHITAN SMALL SCRIPT CHARACTER-18B0F +++ /xf0/x98/xac/x90 KHITAN SMALL SCRIPT CHARACTER-18B10 +++ /xf0/x98/xac/x91 KHITAN SMALL SCRIPT CHARACTER-18B11 +++ /xf0/x98/xac/x92 KHITAN SMALL SCRIPT CHARACTER-18B12 +++ /xf0/x98/xac/x93 KHITAN SMALL SCRIPT CHARACTER-18B13 +++ /xf0/x98/xac/x94 KHITAN SMALL SCRIPT CHARACTER-18B14 +++ /xf0/x98/xac/x95 KHITAN SMALL SCRIPT CHARACTER-18B15 +++ /xf0/x98/xac/x96 KHITAN SMALL SCRIPT CHARACTER-18B16 +++ /xf0/x98/xac/x97 KHITAN SMALL SCRIPT CHARACTER-18B17 +++ /xf0/x98/xac/x98 KHITAN SMALL SCRIPT CHARACTER-18B18 +++ /xf0/x98/xac/x99 KHITAN SMALL SCRIPT CHARACTER-18B19 +++ /xf0/x98/xac/x9a KHITAN SMALL SCRIPT CHARACTER-18B1A +++ /xf0/x98/xac/x9b KHITAN SMALL SCRIPT CHARACTER-18B1B +++ /xf0/x98/xac/x9c KHITAN SMALL SCRIPT CHARACTER-18B1C +++ /xf0/x98/xac/x9d KHITAN SMALL SCRIPT CHARACTER-18B1D +++ /xf0/x98/xac/x9e KHITAN SMALL SCRIPT CHARACTER-18B1E +++ /xf0/x98/xac/x9f KHITAN SMALL SCRIPT CHARACTER-18B1F +++ /xf0/x98/xac/xa0 KHITAN SMALL SCRIPT CHARACTER-18B20 +++ /xf0/x98/xac/xa1 KHITAN SMALL SCRIPT CHARACTER-18B21 +++ /xf0/x98/xac/xa2 KHITAN SMALL SCRIPT CHARACTER-18B22 +++ /xf0/x98/xac/xa3 KHITAN SMALL SCRIPT CHARACTER-18B23 +++ /xf0/x98/xac/xa4 KHITAN SMALL SCRIPT CHARACTER-18B24 +++ /xf0/x98/xac/xa5 KHITAN SMALL SCRIPT CHARACTER-18B25 +++ /xf0/x98/xac/xa6 KHITAN SMALL SCRIPT CHARACTER-18B26 +++ /xf0/x98/xac/xa7 KHITAN SMALL SCRIPT CHARACTER-18B27 +++ /xf0/x98/xac/xa8 KHITAN SMALL SCRIPT CHARACTER-18B28 +++ /xf0/x98/xac/xa9 KHITAN SMALL SCRIPT CHARACTER-18B29 +++ /xf0/x98/xac/xaa KHITAN SMALL SCRIPT CHARACTER-18B2A +++ /xf0/x98/xac/xab KHITAN SMALL SCRIPT CHARACTER-18B2B +++ /xf0/x98/xac/xac KHITAN SMALL SCRIPT CHARACTER-18B2C +++ /xf0/x98/xac/xad KHITAN SMALL SCRIPT CHARACTER-18B2D +++ /xf0/x98/xac/xae KHITAN SMALL SCRIPT CHARACTER-18B2E +++ /xf0/x98/xac/xaf KHITAN SMALL SCRIPT CHARACTER-18B2F +++ /xf0/x98/xac/xb0 KHITAN SMALL SCRIPT CHARACTER-18B30 +++ /xf0/x98/xac/xb1 KHITAN SMALL SCRIPT CHARACTER-18B31 +++ /xf0/x98/xac/xb2 KHITAN SMALL SCRIPT CHARACTER-18B32 +++ /xf0/x98/xac/xb3 KHITAN SMALL SCRIPT CHARACTER-18B33 +++ /xf0/x98/xac/xb4 KHITAN SMALL SCRIPT CHARACTER-18B34 +++ /xf0/x98/xac/xb5 KHITAN SMALL SCRIPT CHARACTER-18B35 +++ /xf0/x98/xac/xb6 KHITAN SMALL SCRIPT CHARACTER-18B36 +++ /xf0/x98/xac/xb7 KHITAN SMALL SCRIPT CHARACTER-18B37 +++ /xf0/x98/xac/xb8 KHITAN SMALL SCRIPT CHARACTER-18B38 +++ /xf0/x98/xac/xb9 KHITAN SMALL SCRIPT CHARACTER-18B39 +++ /xf0/x98/xac/xba KHITAN SMALL SCRIPT CHARACTER-18B3A +++ /xf0/x98/xac/xbb KHITAN SMALL SCRIPT CHARACTER-18B3B +++ /xf0/x98/xac/xbc KHITAN SMALL SCRIPT CHARACTER-18B3C +++ /xf0/x98/xac/xbd KHITAN SMALL SCRIPT CHARACTER-18B3D +++ /xf0/x98/xac/xbe KHITAN SMALL SCRIPT CHARACTER-18B3E +++ /xf0/x98/xac/xbf KHITAN SMALL SCRIPT CHARACTER-18B3F +++ /xf0/x98/xad/x80 KHITAN SMALL SCRIPT CHARACTER-18B40 +++ /xf0/x98/xad/x81 KHITAN SMALL SCRIPT CHARACTER-18B41 +++ /xf0/x98/xad/x82 KHITAN SMALL SCRIPT CHARACTER-18B42 +++ /xf0/x98/xad/x83 KHITAN SMALL SCRIPT CHARACTER-18B43 +++ /xf0/x98/xad/x84 KHITAN SMALL SCRIPT CHARACTER-18B44 +++ /xf0/x98/xad/x85 KHITAN SMALL SCRIPT CHARACTER-18B45 +++ /xf0/x98/xad/x86 KHITAN SMALL SCRIPT CHARACTER-18B46 +++ /xf0/x98/xad/x87 KHITAN SMALL SCRIPT CHARACTER-18B47 +++ /xf0/x98/xad/x88 KHITAN SMALL SCRIPT CHARACTER-18B48 +++ /xf0/x98/xad/x89 KHITAN SMALL SCRIPT CHARACTER-18B49 +++ /xf0/x98/xad/x8a KHITAN SMALL SCRIPT CHARACTER-18B4A +++ /xf0/x98/xad/x8b KHITAN SMALL SCRIPT CHARACTER-18B4B +++ /xf0/x98/xad/x8c KHITAN SMALL SCRIPT CHARACTER-18B4C +++ /xf0/x98/xad/x8d KHITAN SMALL SCRIPT CHARACTER-18B4D +++ /xf0/x98/xad/x8e KHITAN SMALL SCRIPT CHARACTER-18B4E +++ /xf0/x98/xad/x8f KHITAN SMALL SCRIPT CHARACTER-18B4F +++ /xf0/x98/xad/x90 KHITAN SMALL SCRIPT CHARACTER-18B50 +++ /xf0/x98/xad/x91 KHITAN SMALL SCRIPT CHARACTER-18B51 +++ /xf0/x98/xad/x92 KHITAN SMALL SCRIPT CHARACTER-18B52 +++ /xf0/x98/xad/x93 KHITAN SMALL SCRIPT CHARACTER-18B53 +++ /xf0/x98/xad/x94 KHITAN SMALL SCRIPT CHARACTER-18B54 +++ /xf0/x98/xad/x95 KHITAN SMALL SCRIPT CHARACTER-18B55 +++ /xf0/x98/xad/x96 KHITAN SMALL SCRIPT CHARACTER-18B56 +++ /xf0/x98/xad/x97 KHITAN SMALL SCRIPT CHARACTER-18B57 +++ /xf0/x98/xad/x98 KHITAN SMALL SCRIPT CHARACTER-18B58 +++ /xf0/x98/xad/x99 KHITAN SMALL SCRIPT CHARACTER-18B59 +++ /xf0/x98/xad/x9a KHITAN SMALL SCRIPT CHARACTER-18B5A +++ /xf0/x98/xad/x9b KHITAN SMALL SCRIPT CHARACTER-18B5B +++ /xf0/x98/xad/x9c KHITAN SMALL SCRIPT CHARACTER-18B5C +++ /xf0/x98/xad/x9d KHITAN SMALL SCRIPT CHARACTER-18B5D +++ /xf0/x98/xad/x9e KHITAN SMALL SCRIPT CHARACTER-18B5E +++ /xf0/x98/xad/x9f KHITAN SMALL SCRIPT CHARACTER-18B5F +++ /xf0/x98/xad/xa0 KHITAN SMALL SCRIPT CHARACTER-18B60 +++ /xf0/x98/xad/xa1 KHITAN SMALL SCRIPT CHARACTER-18B61 +++ /xf0/x98/xad/xa2 KHITAN SMALL SCRIPT CHARACTER-18B62 +++ /xf0/x98/xad/xa3 KHITAN SMALL SCRIPT CHARACTER-18B63 +++ /xf0/x98/xad/xa4 KHITAN SMALL SCRIPT CHARACTER-18B64 +++ /xf0/x98/xad/xa5 KHITAN SMALL SCRIPT CHARACTER-18B65 +++ /xf0/x98/xad/xa6 KHITAN SMALL SCRIPT CHARACTER-18B66 +++ /xf0/x98/xad/xa7 KHITAN SMALL SCRIPT CHARACTER-18B67 +++ /xf0/x98/xad/xa8 KHITAN SMALL SCRIPT CHARACTER-18B68 +++ /xf0/x98/xad/xa9 KHITAN SMALL SCRIPT CHARACTER-18B69 +++ /xf0/x98/xad/xaa KHITAN SMALL SCRIPT CHARACTER-18B6A +++ /xf0/x98/xad/xab KHITAN SMALL SCRIPT CHARACTER-18B6B +++ /xf0/x98/xad/xac KHITAN SMALL SCRIPT CHARACTER-18B6C +++ /xf0/x98/xad/xad KHITAN SMALL SCRIPT CHARACTER-18B6D +++ /xf0/x98/xad/xae KHITAN SMALL SCRIPT CHARACTER-18B6E +++ /xf0/x98/xad/xaf KHITAN SMALL SCRIPT CHARACTER-18B6F +++ /xf0/x98/xad/xb0 KHITAN SMALL SCRIPT CHARACTER-18B70 +++ /xf0/x98/xad/xb1 KHITAN SMALL SCRIPT CHARACTER-18B71 +++ /xf0/x98/xad/xb2 KHITAN SMALL SCRIPT CHARACTER-18B72 +++ /xf0/x98/xad/xb3 KHITAN SMALL SCRIPT CHARACTER-18B73 +++ /xf0/x98/xad/xb4 KHITAN SMALL SCRIPT CHARACTER-18B74 +++ /xf0/x98/xad/xb5 KHITAN SMALL SCRIPT CHARACTER-18B75 +++ /xf0/x98/xad/xb6 KHITAN SMALL SCRIPT CHARACTER-18B76 +++ /xf0/x98/xad/xb7 KHITAN SMALL SCRIPT CHARACTER-18B77 +++ /xf0/x98/xad/xb8 KHITAN SMALL SCRIPT CHARACTER-18B78 +++ /xf0/x98/xad/xb9 KHITAN SMALL SCRIPT CHARACTER-18B79 +++ /xf0/x98/xad/xba KHITAN SMALL SCRIPT CHARACTER-18B7A +++ /xf0/x98/xad/xbb KHITAN SMALL SCRIPT CHARACTER-18B7B +++ /xf0/x98/xad/xbc KHITAN SMALL SCRIPT CHARACTER-18B7C +++ /xf0/x98/xad/xbd KHITAN SMALL SCRIPT CHARACTER-18B7D +++ /xf0/x98/xad/xbe KHITAN SMALL SCRIPT CHARACTER-18B7E +++ /xf0/x98/xad/xbf KHITAN SMALL SCRIPT CHARACTER-18B7F +++ /xf0/x98/xae/x80 KHITAN SMALL SCRIPT CHARACTER-18B80 +++ /xf0/x98/xae/x81 KHITAN SMALL SCRIPT CHARACTER-18B81 +++ /xf0/x98/xae/x82 KHITAN SMALL SCRIPT CHARACTER-18B82 +++ /xf0/x98/xae/x83 KHITAN SMALL SCRIPT CHARACTER-18B83 +++ /xf0/x98/xae/x84 KHITAN SMALL SCRIPT CHARACTER-18B84 +++ /xf0/x98/xae/x85 KHITAN SMALL SCRIPT CHARACTER-18B85 +++ /xf0/x98/xae/x86 KHITAN SMALL SCRIPT CHARACTER-18B86 +++ /xf0/x98/xae/x87 KHITAN SMALL SCRIPT CHARACTER-18B87 +++ /xf0/x98/xae/x88 KHITAN SMALL SCRIPT CHARACTER-18B88 +++ /xf0/x98/xae/x89 KHITAN SMALL SCRIPT CHARACTER-18B89 +++ /xf0/x98/xae/x8a KHITAN SMALL SCRIPT CHARACTER-18B8A +++ /xf0/x98/xae/x8b KHITAN SMALL SCRIPT CHARACTER-18B8B +++ /xf0/x98/xae/x8c KHITAN SMALL SCRIPT CHARACTER-18B8C +++ /xf0/x98/xae/x8d KHITAN SMALL SCRIPT CHARACTER-18B8D +++ /xf0/x98/xae/x8e KHITAN SMALL SCRIPT CHARACTER-18B8E +++ /xf0/x98/xae/x8f KHITAN SMALL SCRIPT CHARACTER-18B8F +++ /xf0/x98/xae/x90 KHITAN SMALL SCRIPT CHARACTER-18B90 +++ /xf0/x98/xae/x91 KHITAN SMALL SCRIPT CHARACTER-18B91 +++ /xf0/x98/xae/x92 KHITAN SMALL SCRIPT CHARACTER-18B92 +++ /xf0/x98/xae/x93 KHITAN SMALL SCRIPT CHARACTER-18B93 +++ /xf0/x98/xae/x94 KHITAN SMALL SCRIPT CHARACTER-18B94 +++ /xf0/x98/xae/x95 KHITAN SMALL SCRIPT CHARACTER-18B95 +++ /xf0/x98/xae/x96 KHITAN SMALL SCRIPT CHARACTER-18B96 +++ /xf0/x98/xae/x97 KHITAN SMALL SCRIPT CHARACTER-18B97 +++ /xf0/x98/xae/x98 KHITAN SMALL SCRIPT CHARACTER-18B98 +++ /xf0/x98/xae/x99 KHITAN SMALL SCRIPT CHARACTER-18B99 +++ /xf0/x98/xae/x9a KHITAN SMALL SCRIPT CHARACTER-18B9A +++ /xf0/x98/xae/x9b KHITAN SMALL SCRIPT CHARACTER-18B9B +++ /xf0/x98/xae/x9c KHITAN SMALL SCRIPT CHARACTER-18B9C +++ /xf0/x98/xae/x9d KHITAN SMALL SCRIPT CHARACTER-18B9D +++ /xf0/x98/xae/x9e KHITAN SMALL SCRIPT CHARACTER-18B9E +++ /xf0/x98/xae/x9f KHITAN SMALL SCRIPT CHARACTER-18B9F +++ /xf0/x98/xae/xa0 KHITAN SMALL SCRIPT CHARACTER-18BA0 +++ /xf0/x98/xae/xa1 KHITAN SMALL SCRIPT CHARACTER-18BA1 +++ /xf0/x98/xae/xa2 KHITAN SMALL SCRIPT CHARACTER-18BA2 +++ /xf0/x98/xae/xa3 KHITAN SMALL SCRIPT CHARACTER-18BA3 +++ /xf0/x98/xae/xa4 KHITAN SMALL SCRIPT CHARACTER-18BA4 +++ /xf0/x98/xae/xa5 KHITAN SMALL SCRIPT CHARACTER-18BA5 +++ /xf0/x98/xae/xa6 KHITAN SMALL SCRIPT CHARACTER-18BA6 +++ /xf0/x98/xae/xa7 KHITAN SMALL SCRIPT CHARACTER-18BA7 +++ /xf0/x98/xae/xa8 KHITAN SMALL SCRIPT CHARACTER-18BA8 +++ /xf0/x98/xae/xa9 KHITAN SMALL SCRIPT CHARACTER-18BA9 +++ /xf0/x98/xae/xaa KHITAN SMALL SCRIPT CHARACTER-18BAA +++ /xf0/x98/xae/xab KHITAN SMALL SCRIPT CHARACTER-18BAB +++ /xf0/x98/xae/xac KHITAN SMALL SCRIPT CHARACTER-18BAC +++ /xf0/x98/xae/xad KHITAN SMALL SCRIPT CHARACTER-18BAD +++ /xf0/x98/xae/xae KHITAN SMALL SCRIPT CHARACTER-18BAE +++ /xf0/x98/xae/xaf KHITAN SMALL SCRIPT CHARACTER-18BAF +++ /xf0/x98/xae/xb0 KHITAN SMALL SCRIPT CHARACTER-18BB0 +++ /xf0/x98/xae/xb1 KHITAN SMALL SCRIPT CHARACTER-18BB1 +++ /xf0/x98/xae/xb2 KHITAN SMALL SCRIPT CHARACTER-18BB2 +++ /xf0/x98/xae/xb3 KHITAN SMALL SCRIPT CHARACTER-18BB3 +++ /xf0/x98/xae/xb4 KHITAN SMALL SCRIPT CHARACTER-18BB4 +++ /xf0/x98/xae/xb5 KHITAN SMALL SCRIPT CHARACTER-18BB5 +++ /xf0/x98/xae/xb6 KHITAN SMALL SCRIPT CHARACTER-18BB6 +++ /xf0/x98/xae/xb7 KHITAN SMALL SCRIPT CHARACTER-18BB7 +++ /xf0/x98/xae/xb8 KHITAN SMALL SCRIPT CHARACTER-18BB8 +++ /xf0/x98/xae/xb9 KHITAN SMALL SCRIPT CHARACTER-18BB9 +++ /xf0/x98/xae/xba KHITAN SMALL SCRIPT CHARACTER-18BBA +++ /xf0/x98/xae/xbb KHITAN SMALL SCRIPT CHARACTER-18BBB +++ /xf0/x98/xae/xbc KHITAN SMALL SCRIPT CHARACTER-18BBC +++ /xf0/x98/xae/xbd KHITAN SMALL SCRIPT CHARACTER-18BBD +++ /xf0/x98/xae/xbe KHITAN SMALL SCRIPT CHARACTER-18BBE +++ /xf0/x98/xae/xbf KHITAN SMALL SCRIPT CHARACTER-18BBF +++ /xf0/x98/xaf/x80 KHITAN SMALL SCRIPT CHARACTER-18BC0 +++ /xf0/x98/xaf/x81 KHITAN SMALL SCRIPT CHARACTER-18BC1 +++ /xf0/x98/xaf/x82 KHITAN SMALL SCRIPT CHARACTER-18BC2 +++ /xf0/x98/xaf/x83 KHITAN SMALL SCRIPT CHARACTER-18BC3 +++ /xf0/x98/xaf/x84 KHITAN SMALL SCRIPT CHARACTER-18BC4 +++ /xf0/x98/xaf/x85 KHITAN SMALL SCRIPT CHARACTER-18BC5 +++ /xf0/x98/xaf/x86 KHITAN SMALL SCRIPT CHARACTER-18BC6 +++ /xf0/x98/xaf/x87 KHITAN SMALL SCRIPT CHARACTER-18BC7 +++ /xf0/x98/xaf/x88 KHITAN SMALL SCRIPT CHARACTER-18BC8 +++ /xf0/x98/xaf/x89 KHITAN SMALL SCRIPT CHARACTER-18BC9 +++ /xf0/x98/xaf/x8a KHITAN SMALL SCRIPT CHARACTER-18BCA +++ /xf0/x98/xaf/x8b KHITAN SMALL SCRIPT CHARACTER-18BCB +++ /xf0/x98/xaf/x8c KHITAN SMALL SCRIPT CHARACTER-18BCC +++ /xf0/x98/xaf/x8d KHITAN SMALL SCRIPT CHARACTER-18BCD +++ /xf0/x98/xaf/x8e KHITAN SMALL SCRIPT CHARACTER-18BCE +++ /xf0/x98/xaf/x8f KHITAN SMALL SCRIPT CHARACTER-18BCF +++ /xf0/x98/xaf/x90 KHITAN SMALL SCRIPT CHARACTER-18BD0 +++ /xf0/x98/xaf/x91 KHITAN SMALL SCRIPT CHARACTER-18BD1 +++ /xf0/x98/xaf/x92 KHITAN SMALL SCRIPT CHARACTER-18BD2 +++ /xf0/x98/xaf/x93 KHITAN SMALL SCRIPT CHARACTER-18BD3 +++ /xf0/x98/xaf/x94 KHITAN SMALL SCRIPT CHARACTER-18BD4 +++ /xf0/x98/xaf/x95 KHITAN SMALL SCRIPT CHARACTER-18BD5 +++ /xf0/x98/xaf/x96 KHITAN SMALL SCRIPT CHARACTER-18BD6 +++ /xf0/x98/xaf/x97 KHITAN SMALL SCRIPT CHARACTER-18BD7 +++ /xf0/x98/xaf/x98 KHITAN SMALL SCRIPT CHARACTER-18BD8 +++ /xf0/x98/xaf/x99 KHITAN SMALL SCRIPT CHARACTER-18BD9 +++ /xf0/x98/xaf/x9a KHITAN SMALL SCRIPT CHARACTER-18BDA +++ /xf0/x98/xaf/x9b KHITAN SMALL SCRIPT CHARACTER-18BDB +++ /xf0/x98/xaf/x9c KHITAN SMALL SCRIPT CHARACTER-18BDC +++ /xf0/x98/xaf/x9d KHITAN SMALL SCRIPT CHARACTER-18BDD +++ /xf0/x98/xaf/x9e KHITAN SMALL SCRIPT CHARACTER-18BDE +++ /xf0/x98/xaf/x9f KHITAN SMALL SCRIPT CHARACTER-18BDF +++ /xf0/x98/xaf/xa0 KHITAN SMALL SCRIPT CHARACTER-18BE0 +++ /xf0/x98/xaf/xa1 KHITAN SMALL SCRIPT CHARACTER-18BE1 +++ /xf0/x98/xaf/xa2 KHITAN SMALL SCRIPT CHARACTER-18BE2 +++ /xf0/x98/xaf/xa3 KHITAN SMALL SCRIPT CHARACTER-18BE3 +++ /xf0/x98/xaf/xa4 KHITAN SMALL SCRIPT CHARACTER-18BE4 +++ /xf0/x98/xaf/xa5 KHITAN SMALL SCRIPT CHARACTER-18BE5 +++ /xf0/x98/xaf/xa6 KHITAN SMALL SCRIPT CHARACTER-18BE6 +++ /xf0/x98/xaf/xa7 KHITAN SMALL SCRIPT CHARACTER-18BE7 +++ /xf0/x98/xaf/xa8 KHITAN SMALL SCRIPT CHARACTER-18BE8 +++ /xf0/x98/xaf/xa9 KHITAN SMALL SCRIPT CHARACTER-18BE9 +++ /xf0/x98/xaf/xaa KHITAN SMALL SCRIPT CHARACTER-18BEA +++ /xf0/x98/xaf/xab KHITAN SMALL SCRIPT CHARACTER-18BEB +++ /xf0/x98/xaf/xac KHITAN SMALL SCRIPT CHARACTER-18BEC +++ /xf0/x98/xaf/xad KHITAN SMALL SCRIPT CHARACTER-18BED +++ /xf0/x98/xaf/xae KHITAN SMALL SCRIPT CHARACTER-18BEE +++ /xf0/x98/xaf/xaf KHITAN SMALL SCRIPT CHARACTER-18BEF +++ /xf0/x98/xaf/xb0 KHITAN SMALL SCRIPT CHARACTER-18BF0 +++ /xf0/x98/xaf/xb1 KHITAN SMALL SCRIPT CHARACTER-18BF1 +++ /xf0/x98/xaf/xb2 KHITAN SMALL SCRIPT CHARACTER-18BF2 +++ /xf0/x98/xaf/xb3 KHITAN SMALL SCRIPT CHARACTER-18BF3 +++ /xf0/x98/xaf/xb4 KHITAN SMALL SCRIPT CHARACTER-18BF4 +++ /xf0/x98/xaf/xb5 KHITAN SMALL SCRIPT CHARACTER-18BF5 +++ /xf0/x98/xaf/xb6 KHITAN SMALL SCRIPT CHARACTER-18BF6 +++ /xf0/x98/xaf/xb7 KHITAN SMALL SCRIPT CHARACTER-18BF7 +++ /xf0/x98/xaf/xb8 KHITAN SMALL SCRIPT CHARACTER-18BF8 +++ /xf0/x98/xaf/xb9 KHITAN SMALL SCRIPT CHARACTER-18BF9 +++ /xf0/x98/xaf/xba KHITAN SMALL SCRIPT CHARACTER-18BFA +++ /xf0/x98/xaf/xbb KHITAN SMALL SCRIPT CHARACTER-18BFB +++ /xf0/x98/xaf/xbc KHITAN SMALL SCRIPT CHARACTER-18BFC +++ /xf0/x98/xaf/xbd KHITAN SMALL SCRIPT CHARACTER-18BFD +++ /xf0/x98/xaf/xbe KHITAN SMALL SCRIPT CHARACTER-18BFE +++ /xf0/x98/xaf/xbf KHITAN SMALL SCRIPT CHARACTER-18BFF +++ /xf0/x98/xb0/x80 KHITAN SMALL SCRIPT CHARACTER-18C00 +++ /xf0/x98/xb0/x81 KHITAN SMALL SCRIPT CHARACTER-18C01 +++ /xf0/x98/xb0/x82 KHITAN SMALL SCRIPT CHARACTER-18C02 +++ /xf0/x98/xb0/x83 KHITAN SMALL SCRIPT CHARACTER-18C03 +++ /xf0/x98/xb0/x84 KHITAN SMALL SCRIPT CHARACTER-18C04 +++ /xf0/x98/xb0/x85 KHITAN SMALL SCRIPT CHARACTER-18C05 +++ /xf0/x98/xb0/x86 KHITAN SMALL SCRIPT CHARACTER-18C06 +++ /xf0/x98/xb0/x87 KHITAN SMALL SCRIPT CHARACTER-18C07 +++ /xf0/x98/xb0/x88 KHITAN SMALL SCRIPT CHARACTER-18C08 +++ /xf0/x98/xb0/x89 KHITAN SMALL SCRIPT CHARACTER-18C09 +++ /xf0/x98/xb0/x8a KHITAN SMALL SCRIPT CHARACTER-18C0A +++ /xf0/x98/xb0/x8b KHITAN SMALL SCRIPT CHARACTER-18C0B +++ /xf0/x98/xb0/x8c KHITAN SMALL SCRIPT CHARACTER-18C0C +++ /xf0/x98/xb0/x8d KHITAN SMALL SCRIPT CHARACTER-18C0D +++ /xf0/x98/xb0/x8e KHITAN SMALL SCRIPT CHARACTER-18C0E +++ /xf0/x98/xb0/x8f KHITAN SMALL SCRIPT CHARACTER-18C0F +++ /xf0/x98/xb0/x90 KHITAN SMALL SCRIPT CHARACTER-18C10 +++ /xf0/x98/xb0/x91 KHITAN SMALL SCRIPT CHARACTER-18C11 +++ /xf0/x98/xb0/x92 KHITAN SMALL SCRIPT CHARACTER-18C12 +++ /xf0/x98/xb0/x93 KHITAN SMALL SCRIPT CHARACTER-18C13 +++ /xf0/x98/xb0/x94 KHITAN SMALL SCRIPT CHARACTER-18C14 +++ /xf0/x98/xb0/x95 KHITAN SMALL SCRIPT CHARACTER-18C15 +++ /xf0/x98/xb0/x96 KHITAN SMALL SCRIPT CHARACTER-18C16 +++ /xf0/x98/xb0/x97 KHITAN SMALL SCRIPT CHARACTER-18C17 +++ /xf0/x98/xb0/x98 KHITAN SMALL SCRIPT CHARACTER-18C18 +++ /xf0/x98/xb0/x99 KHITAN SMALL SCRIPT CHARACTER-18C19 +++ /xf0/x98/xb0/x9a KHITAN SMALL SCRIPT CHARACTER-18C1A +++ /xf0/x98/xb0/x9b KHITAN SMALL SCRIPT CHARACTER-18C1B +++ /xf0/x98/xb0/x9c KHITAN SMALL SCRIPT CHARACTER-18C1C +++ /xf0/x98/xb0/x9d KHITAN SMALL SCRIPT CHARACTER-18C1D +++ /xf0/x98/xb0/x9e KHITAN SMALL SCRIPT CHARACTER-18C1E +++ /xf0/x98/xb0/x9f KHITAN SMALL SCRIPT CHARACTER-18C1F +++ /xf0/x98/xb0/xa0 KHITAN SMALL SCRIPT CHARACTER-18C20 +++ /xf0/x98/xb0/xa1 KHITAN SMALL SCRIPT CHARACTER-18C21 +++ /xf0/x98/xb0/xa2 KHITAN SMALL SCRIPT CHARACTER-18C22 +++ /xf0/x98/xb0/xa3 KHITAN SMALL SCRIPT CHARACTER-18C23 +++ /xf0/x98/xb0/xa4 KHITAN SMALL SCRIPT CHARACTER-18C24 +++ /xf0/x98/xb0/xa5 KHITAN SMALL SCRIPT CHARACTER-18C25 +++ /xf0/x98/xb0/xa6 KHITAN SMALL SCRIPT CHARACTER-18C26 +++ /xf0/x98/xb0/xa7 KHITAN SMALL SCRIPT CHARACTER-18C27 +++ /xf0/x98/xb0/xa8 KHITAN SMALL SCRIPT CHARACTER-18C28 +++ /xf0/x98/xb0/xa9 KHITAN SMALL SCRIPT CHARACTER-18C29 +++ /xf0/x98/xb0/xaa KHITAN SMALL SCRIPT CHARACTER-18C2A +++ /xf0/x98/xb0/xab KHITAN SMALL SCRIPT CHARACTER-18C2B +++ /xf0/x98/xb0/xac KHITAN SMALL SCRIPT CHARACTER-18C2C +++ /xf0/x98/xb0/xad KHITAN SMALL SCRIPT CHARACTER-18C2D +++ /xf0/x98/xb0/xae KHITAN SMALL SCRIPT CHARACTER-18C2E +++ /xf0/x98/xb0/xaf KHITAN SMALL SCRIPT CHARACTER-18C2F +++ /xf0/x98/xb0/xb0 KHITAN SMALL SCRIPT CHARACTER-18C30 +++ /xf0/x98/xb0/xb1 KHITAN SMALL SCRIPT CHARACTER-18C31 +++ /xf0/x98/xb0/xb2 KHITAN SMALL SCRIPT CHARACTER-18C32 +++ /xf0/x98/xb0/xb3 KHITAN SMALL SCRIPT CHARACTER-18C33 +++ /xf0/x98/xb0/xb4 KHITAN SMALL SCRIPT CHARACTER-18C34 +++ /xf0/x98/xb0/xb5 KHITAN SMALL SCRIPT CHARACTER-18C35 +++ /xf0/x98/xb0/xb6 KHITAN SMALL SCRIPT CHARACTER-18C36 +++ /xf0/x98/xb0/xb7 KHITAN SMALL SCRIPT CHARACTER-18C37 +++ /xf0/x98/xb0/xb8 KHITAN SMALL SCRIPT CHARACTER-18C38 +++ /xf0/x98/xb0/xb9 KHITAN SMALL SCRIPT CHARACTER-18C39 +++ /xf0/x98/xb0/xba KHITAN SMALL SCRIPT CHARACTER-18C3A +++ /xf0/x98/xb0/xbb KHITAN SMALL SCRIPT CHARACTER-18C3B +++ /xf0/x98/xb0/xbc KHITAN SMALL SCRIPT CHARACTER-18C3C +++ /xf0/x98/xb0/xbd KHITAN SMALL SCRIPT CHARACTER-18C3D +++ /xf0/x98/xb0/xbe KHITAN SMALL SCRIPT CHARACTER-18C3E +++ /xf0/x98/xb0/xbf KHITAN SMALL SCRIPT CHARACTER-18C3F +++ /xf0/x98/xb1/x80 KHITAN SMALL SCRIPT CHARACTER-18C40 +++ /xf0/x98/xb1/x81 KHITAN SMALL SCRIPT CHARACTER-18C41 +++ /xf0/x98/xb1/x82 KHITAN SMALL SCRIPT CHARACTER-18C42 +++ /xf0/x98/xb1/x83 KHITAN SMALL SCRIPT CHARACTER-18C43 +++ /xf0/x98/xb1/x84 KHITAN SMALL SCRIPT CHARACTER-18C44 +++ /xf0/x98/xb1/x85 KHITAN SMALL SCRIPT CHARACTER-18C45 +++ /xf0/x98/xb1/x86 KHITAN SMALL SCRIPT CHARACTER-18C46 +++ /xf0/x98/xb1/x87 KHITAN SMALL SCRIPT CHARACTER-18C47 +++ /xf0/x98/xb1/x88 KHITAN SMALL SCRIPT CHARACTER-18C48 +++ /xf0/x98/xb1/x89 KHITAN SMALL SCRIPT CHARACTER-18C49 +++ /xf0/x98/xb1/x8a KHITAN SMALL SCRIPT CHARACTER-18C4A +++ /xf0/x98/xb1/x8b KHITAN SMALL SCRIPT CHARACTER-18C4B +++ /xf0/x98/xb1/x8c KHITAN SMALL SCRIPT CHARACTER-18C4C +++ /xf0/x98/xb1/x8d KHITAN SMALL SCRIPT CHARACTER-18C4D +++ /xf0/x98/xb1/x8e KHITAN SMALL SCRIPT CHARACTER-18C4E +++ /xf0/x98/xb1/x8f KHITAN SMALL SCRIPT CHARACTER-18C4F +++ /xf0/x98/xb1/x90 KHITAN SMALL SCRIPT CHARACTER-18C50 +++ /xf0/x98/xb1/x91 KHITAN SMALL SCRIPT CHARACTER-18C51 +++ /xf0/x98/xb1/x92 KHITAN SMALL SCRIPT CHARACTER-18C52 +++ /xf0/x98/xb1/x93 KHITAN SMALL SCRIPT CHARACTER-18C53 +++ /xf0/x98/xb1/x94 KHITAN SMALL SCRIPT CHARACTER-18C54 +++ /xf0/x98/xb1/x95 KHITAN SMALL SCRIPT CHARACTER-18C55 +++ /xf0/x98/xb1/x96 KHITAN SMALL SCRIPT CHARACTER-18C56 +++ /xf0/x98/xb1/x97 KHITAN SMALL SCRIPT CHARACTER-18C57 +++ /xf0/x98/xb1/x98 KHITAN SMALL SCRIPT CHARACTER-18C58 +++ /xf0/x98/xb1/x99 KHITAN SMALL SCRIPT CHARACTER-18C59 +++ /xf0/x98/xb1/x9a KHITAN SMALL SCRIPT CHARACTER-18C5A +++ /xf0/x98/xb1/x9b KHITAN SMALL SCRIPT CHARACTER-18C5B +++ /xf0/x98/xb1/x9c KHITAN SMALL SCRIPT CHARACTER-18C5C +++ /xf0/x98/xb1/x9d KHITAN SMALL SCRIPT CHARACTER-18C5D +++ /xf0/x98/xb1/x9e KHITAN SMALL SCRIPT CHARACTER-18C5E +++ /xf0/x98/xb1/x9f KHITAN SMALL SCRIPT CHARACTER-18C5F +++ /xf0/x98/xb1/xa0 KHITAN SMALL SCRIPT CHARACTER-18C60 +++ /xf0/x98/xb1/xa1 KHITAN SMALL SCRIPT CHARACTER-18C61 +++ /xf0/x98/xb1/xa2 KHITAN SMALL SCRIPT CHARACTER-18C62 +++ /xf0/x98/xb1/xa3 KHITAN SMALL SCRIPT CHARACTER-18C63 +++ /xf0/x98/xb1/xa4 KHITAN SMALL SCRIPT CHARACTER-18C64 +++ /xf0/x98/xb1/xa5 KHITAN SMALL SCRIPT CHARACTER-18C65 +++ /xf0/x98/xb1/xa6 KHITAN SMALL SCRIPT CHARACTER-18C66 +++ /xf0/x98/xb1/xa7 KHITAN SMALL SCRIPT CHARACTER-18C67 +++ /xf0/x98/xb1/xa8 KHITAN SMALL SCRIPT CHARACTER-18C68 +++ /xf0/x98/xb1/xa9 KHITAN SMALL SCRIPT CHARACTER-18C69 +++ /xf0/x98/xb1/xaa KHITAN SMALL SCRIPT CHARACTER-18C6A +++ /xf0/x98/xb1/xab KHITAN SMALL SCRIPT CHARACTER-18C6B +++ /xf0/x98/xb1/xac KHITAN SMALL SCRIPT CHARACTER-18C6C +++ /xf0/x98/xb1/xad KHITAN SMALL SCRIPT CHARACTER-18C6D +++ /xf0/x98/xb1/xae KHITAN SMALL SCRIPT CHARACTER-18C6E +++ /xf0/x98/xb1/xaf KHITAN SMALL SCRIPT CHARACTER-18C6F +++ /xf0/x98/xb1/xb0 KHITAN SMALL SCRIPT CHARACTER-18C70 +++ /xf0/x98/xb1/xb1 KHITAN SMALL SCRIPT CHARACTER-18C71 +++ /xf0/x98/xb1/xb2 KHITAN SMALL SCRIPT CHARACTER-18C72 +++ /xf0/x98/xb1/xb3 KHITAN SMALL SCRIPT CHARACTER-18C73 +++ /xf0/x98/xb1/xb4 KHITAN SMALL SCRIPT CHARACTER-18C74 +++ /xf0/x98/xb1/xb5 KHITAN SMALL SCRIPT CHARACTER-18C75 +++ /xf0/x98/xb1/xb6 KHITAN SMALL SCRIPT CHARACTER-18C76 +++ /xf0/x98/xb1/xb7 KHITAN SMALL SCRIPT CHARACTER-18C77 +++ /xf0/x98/xb1/xb8 KHITAN SMALL SCRIPT CHARACTER-18C78 +++ /xf0/x98/xb1/xb9 KHITAN SMALL SCRIPT CHARACTER-18C79 +++ /xf0/x98/xb1/xba KHITAN SMALL SCRIPT CHARACTER-18C7A +++ /xf0/x98/xb1/xbb KHITAN SMALL SCRIPT CHARACTER-18C7B +++ /xf0/x98/xb1/xbc KHITAN SMALL SCRIPT CHARACTER-18C7C +++ /xf0/x98/xb1/xbd KHITAN SMALL SCRIPT CHARACTER-18C7D +++ /xf0/x98/xb1/xbe KHITAN SMALL SCRIPT CHARACTER-18C7E +++ /xf0/x98/xb1/xbf KHITAN SMALL SCRIPT CHARACTER-18C7F +++ /xf0/x98/xb2/x80 KHITAN SMALL SCRIPT CHARACTER-18C80 +++ /xf0/x98/xb2/x81 KHITAN SMALL SCRIPT CHARACTER-18C81 +++ /xf0/x98/xb2/x82 KHITAN SMALL SCRIPT CHARACTER-18C82 +++ /xf0/x98/xb2/x83 KHITAN SMALL SCRIPT CHARACTER-18C83 +++ /xf0/x98/xb2/x84 KHITAN SMALL SCRIPT CHARACTER-18C84 +++ /xf0/x98/xb2/x85 KHITAN SMALL SCRIPT CHARACTER-18C85 +++ /xf0/x98/xb2/x86 KHITAN SMALL SCRIPT CHARACTER-18C86 +++ /xf0/x98/xb2/x87 KHITAN SMALL SCRIPT CHARACTER-18C87 +++ /xf0/x98/xb2/x88 KHITAN SMALL SCRIPT CHARACTER-18C88 +++ /xf0/x98/xb2/x89 KHITAN SMALL SCRIPT CHARACTER-18C89 +++ /xf0/x98/xb2/x8a KHITAN SMALL SCRIPT CHARACTER-18C8A +++ /xf0/x98/xb2/x8b KHITAN SMALL SCRIPT CHARACTER-18C8B +++ /xf0/x98/xb2/x8c KHITAN SMALL SCRIPT CHARACTER-18C8C +++ /xf0/x98/xb2/x8d KHITAN SMALL SCRIPT CHARACTER-18C8D +++ /xf0/x98/xb2/x8e KHITAN SMALL SCRIPT CHARACTER-18C8E +++ /xf0/x98/xb2/x8f KHITAN SMALL SCRIPT CHARACTER-18C8F +++ /xf0/x98/xb2/x90 KHITAN SMALL SCRIPT CHARACTER-18C90 +++ /xf0/x98/xb2/x91 KHITAN SMALL SCRIPT CHARACTER-18C91 +++ /xf0/x98/xb2/x92 KHITAN SMALL SCRIPT CHARACTER-18C92 +++ /xf0/x98/xb2/x93 KHITAN SMALL SCRIPT CHARACTER-18C93 +++ /xf0/x98/xb2/x94 KHITAN SMALL SCRIPT CHARACTER-18C94 +++ /xf0/x98/xb2/x95 KHITAN SMALL SCRIPT CHARACTER-18C95 +++ /xf0/x98/xb2/x96 KHITAN SMALL SCRIPT CHARACTER-18C96 +++ /xf0/x98/xb2/x97 KHITAN SMALL SCRIPT CHARACTER-18C97 +++ /xf0/x98/xb2/x98 KHITAN SMALL SCRIPT CHARACTER-18C98 +++ /xf0/x98/xb2/x99 KHITAN SMALL SCRIPT CHARACTER-18C99 +++ /xf0/x98/xb2/x9a KHITAN SMALL SCRIPT CHARACTER-18C9A +++ /xf0/x98/xb2/x9b KHITAN SMALL SCRIPT CHARACTER-18C9B +++ /xf0/x98/xb2/x9c KHITAN SMALL SCRIPT CHARACTER-18C9C +++ /xf0/x98/xb2/x9d KHITAN SMALL SCRIPT CHARACTER-18C9D +++ /xf0/x98/xb2/x9e KHITAN SMALL SCRIPT CHARACTER-18C9E +++ /xf0/x98/xb2/x9f KHITAN SMALL SCRIPT CHARACTER-18C9F +++ /xf0/x98/xb2/xa0 KHITAN SMALL SCRIPT CHARACTER-18CA0 +++ /xf0/x98/xb2/xa1 KHITAN SMALL SCRIPT CHARACTER-18CA1 +++ /xf0/x98/xb2/xa2 KHITAN SMALL SCRIPT CHARACTER-18CA2 +++ /xf0/x98/xb2/xa3 KHITAN SMALL SCRIPT CHARACTER-18CA3 +++ /xf0/x98/xb2/xa4 KHITAN SMALL SCRIPT CHARACTER-18CA4 +++ /xf0/x98/xb2/xa5 KHITAN SMALL SCRIPT CHARACTER-18CA5 +++ /xf0/x98/xb2/xa6 KHITAN SMALL SCRIPT CHARACTER-18CA6 +++ /xf0/x98/xb2/xa7 KHITAN SMALL SCRIPT CHARACTER-18CA7 +++ /xf0/x98/xb2/xa8 KHITAN SMALL SCRIPT CHARACTER-18CA8 +++ /xf0/x98/xb2/xa9 KHITAN SMALL SCRIPT CHARACTER-18CA9 +++ /xf0/x98/xb2/xaa KHITAN SMALL SCRIPT CHARACTER-18CAA +++ /xf0/x98/xb2/xab KHITAN SMALL SCRIPT CHARACTER-18CAB +++ /xf0/x98/xb2/xac KHITAN SMALL SCRIPT CHARACTER-18CAC +++ /xf0/x98/xb2/xad KHITAN SMALL SCRIPT CHARACTER-18CAD +++ /xf0/x98/xb2/xae KHITAN SMALL SCRIPT CHARACTER-18CAE +++ /xf0/x98/xb2/xaf KHITAN SMALL SCRIPT CHARACTER-18CAF +++ /xf0/x98/xb2/xb0 KHITAN SMALL SCRIPT CHARACTER-18CB0 +++ /xf0/x98/xb2/xb1 KHITAN SMALL SCRIPT CHARACTER-18CB1 +++ /xf0/x98/xb2/xb2 KHITAN SMALL SCRIPT CHARACTER-18CB2 +++ /xf0/x98/xb2/xb3 KHITAN SMALL SCRIPT CHARACTER-18CB3 +++ /xf0/x98/xb2/xb4 KHITAN SMALL SCRIPT CHARACTER-18CB4 +++ /xf0/x98/xb2/xb5 KHITAN SMALL SCRIPT CHARACTER-18CB5 +++ /xf0/x98/xb2/xb6 KHITAN SMALL SCRIPT CHARACTER-18CB6 +++ /xf0/x98/xb2/xb7 KHITAN SMALL SCRIPT CHARACTER-18CB7 +++ /xf0/x98/xb2/xb8 KHITAN SMALL SCRIPT CHARACTER-18CB8 +++ /xf0/x98/xb2/xb9 KHITAN SMALL SCRIPT CHARACTER-18CB9 +++ /xf0/x98/xb2/xba KHITAN SMALL SCRIPT CHARACTER-18CBA +++ /xf0/x98/xb2/xbb KHITAN SMALL SCRIPT CHARACTER-18CBB +++ /xf0/x98/xb2/xbc KHITAN SMALL SCRIPT CHARACTER-18CBC +++ /xf0/x98/xb2/xbd KHITAN SMALL SCRIPT CHARACTER-18CBD +++ /xf0/x98/xb2/xbe KHITAN SMALL SCRIPT CHARACTER-18CBE +++ /xf0/x98/xb2/xbf KHITAN SMALL SCRIPT CHARACTER-18CBF +++ /xf0/x98/xb3/x80 KHITAN SMALL SCRIPT CHARACTER-18CC0 +++ /xf0/x98/xb3/x81 KHITAN SMALL SCRIPT CHARACTER-18CC1 +++ /xf0/x98/xb3/x82 KHITAN SMALL SCRIPT CHARACTER-18CC2 +++ /xf0/x98/xb3/x83 KHITAN SMALL SCRIPT CHARACTER-18CC3 +++ /xf0/x98/xb3/x84 KHITAN SMALL SCRIPT CHARACTER-18CC4 +++ /xf0/x98/xb3/x85 KHITAN SMALL SCRIPT CHARACTER-18CC5 +++ /xf0/x98/xb3/x86 KHITAN SMALL SCRIPT CHARACTER-18CC6 +++ /xf0/x98/xb3/x87 KHITAN SMALL SCRIPT CHARACTER-18CC7 +++ /xf0/x98/xb3/x88 KHITAN SMALL SCRIPT CHARACTER-18CC8 +++ /xf0/x98/xb3/x89 KHITAN SMALL SCRIPT CHARACTER-18CC9 +++ /xf0/x98/xb3/x8a KHITAN SMALL SCRIPT CHARACTER-18CCA +++ /xf0/x98/xb3/x8b KHITAN SMALL SCRIPT CHARACTER-18CCB +++ /xf0/x98/xb3/x8c KHITAN SMALL SCRIPT CHARACTER-18CCC +++ /xf0/x98/xb3/x8d KHITAN SMALL SCRIPT CHARACTER-18CCD +++ /xf0/x98/xb3/x8e KHITAN SMALL SCRIPT CHARACTER-18CCE +++ /xf0/x98/xb3/x8f KHITAN SMALL SCRIPT CHARACTER-18CCF +++ /xf0/x98/xb3/x90 KHITAN SMALL SCRIPT CHARACTER-18CD0 +++ /xf0/x98/xb3/x91 KHITAN SMALL SCRIPT CHARACTER-18CD1 +++ /xf0/x98/xb3/x92 KHITAN SMALL SCRIPT CHARACTER-18CD2 +++ /xf0/x98/xb3/x93 KHITAN SMALL SCRIPT CHARACTER-18CD3 +++ /xf0/x98/xb3/x94 KHITAN SMALL SCRIPT CHARACTER-18CD4 +++ /xf0/x98/xb3/x95 KHITAN SMALL SCRIPT CHARACTER-18CD5 +++.. /xf0/x98/xb4/x80 ++ /xf0/x9b/x80/x80 KATAKANA LETTER ARCHAIC E ++ /xf0/x9b/x80/x81 HIRAGANA LETTER ARCHAIC YE ++ /xf0/x9b/x80/x82 HENTAIGANA LETTER A-1 ++@@ -41771,6 +42448,9 @@ CHARMAP ++ /xf0/x9f/x84/x8a DIGIT NINE COMMA ++ /xf0/x9f/x84/x8b DINGBAT CIRCLED SANS-SERIF DIGIT ZERO ++ /xf0/x9f/x84/x8c DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT ZERO +++ /xf0/x9f/x84/x8d CIRCLED ZERO WITH SLASH +++ /xf0/x9f/x84/x8e CIRCLED ANTICLOCKWISE ARROW +++ /xf0/x9f/x84/x8f CIRCLED DOLLAR SIGN WITH OVERLAID BACKSLASH ++ /xf0/x9f/x84/x90 PARENTHESIZED LATIN CAPITAL LETTER A ++ /xf0/x9f/x84/x91 PARENTHESIZED LATIN CAPITAL LETTER B ++ /xf0/x9f/x84/x92 PARENTHESIZED LATIN CAPITAL LETTER C ++@@ -41864,6 +42544,9 @@ CHARMAP ++ /xf0/x9f/x85/xaa RAISED MC SIGN ++ /xf0/x9f/x85/xab RAISED MD SIGN ++ /xf0/x9f/x85/xac RAISED MR SIGN +++ /xf0/x9f/x85/xad CIRCLED CC +++ /xf0/x9f/x85/xae CIRCLED C WITH OVERLAID BACKSLASH +++ /xf0/x9f/x85/xaf CIRCLED HUMAN FIGURE ++ /xf0/x9f/x85/xb0 NEGATIVE SQUARED LATIN CAPITAL LETTER A ++ /xf0/x9f/x85/xb1 NEGATIVE SQUARED LATIN CAPITAL LETTER B ++ /xf0/x9f/x85/xb2 NEGATIVE SQUARED LATIN CAPITAL LETTER C ++@@ -41925,6 +42608,7 @@ CHARMAP ++ /xf0/x9f/x86/xaa SQUARED SHV ++ /xf0/x9f/x86/xab SQUARED UHD ++ /xf0/x9f/x86/xac SQUARED VOD +++ /xf0/x9f/x86/xad MASK WORK SYMBOL ++ /xf0/x9f/x87/xa6 REGIONAL INDICATOR SYMBOL LETTER A ++ /xf0/x9f/x87/xa7 REGIONAL INDICATOR SYMBOL LETTER B ++ /xf0/x9f/x87/xa8 REGIONAL INDICATOR SYMBOL LETTER C ++@@ -42997,6 +43681,8 @@ CHARMAP ++ /xf0/x9f/x9b/x93 STUPA ++ /xf0/x9f/x9b/x94 PAGODA ++ /xf0/x9f/x9b/x95 HINDU TEMPLE +++ /xf0/x9f/x9b/x96 HUT +++ /xf0/x9f/x9b/x97 ELEVATOR ++ /xf0/x9f/x9b/xa0 HAMMER AND WRENCH ++ /xf0/x9f/x9b/xa1 SHIELD ++ /xf0/x9f/x9b/xa2 OIL DRUM ++@@ -43021,6 +43707,8 @@ CHARMAP ++ /xf0/x9f/x9b/xb8 FLYING SAUCER ++ /xf0/x9f/x9b/xb9 SKATEBOARD ++ /xf0/x9f/x9b/xba AUTO RICKSHAW +++ /xf0/x9f/x9b/xbb PICKUP TRUCK +++ /xf0/x9f/x9b/xbc ROLLER SKATE ++ /xf0/x9f/x9c/x80 ALCHEMICAL SYMBOL FOR QUINTESSENCE ++ /xf0/x9f/x9c/x81 ALCHEMICAL SYMBOL FOR AIR ++ /xf0/x9f/x9c/x82 ALCHEMICAL SYMBOL FOR FIRE ++@@ -43386,6 +44074,8 @@ CHARMAP ++ /xf0/x9f/xa2/xab RIGHTWARDS FRONT-TILTED SHADOWED WHITE ARROW ++ /xf0/x9f/xa2/xac WHITE ARROW SHAFT WIDTH ONE ++ /xf0/x9f/xa2/xad WHITE ARROW SHAFT WIDTH TWO THIRDS +++ /xf0/x9f/xa2/xb0 ARROW POINTING UPWARDS THEN NORTH WEST +++ /xf0/x9f/xa2/xb1 ARROW POINTING RIGHTWARDS THEN CURVING SOUTH WEST ++ /xf0/x9f/xa4/x80 CIRCLED CROSS FORMEE WITH FOUR DOTS ++ /xf0/x9f/xa4/x81 CIRCLED CROSS FORMEE WITH TWO DOTS ++ /xf0/x9f/xa4/x82 CIRCLED CROSS FORMEE ++@@ -43398,6 +44088,7 @@ CHARMAP ++ /xf0/x9f/xa4/x89 DOWNWARD FACING NOTCHED HOOK ++ /xf0/x9f/xa4/x8a DOWNWARD FACING HOOK WITH DOT ++ /xf0/x9f/xa4/x8b DOWNWARD FACING NOTCHED HOOK WITH DOT +++ /xf0/x9f/xa4/x8c PINCHED FINGERS ++ /xf0/x9f/xa4/x8d WHITE HEART ++ /xf0/x9f/xa4/x8e BROWN HEART ++ /xf0/x9f/xa4/x8f PINCHING HAND ++@@ -43499,10 +44190,13 @@ CHARMAP ++ /xf0/x9f/xa5/xaf BAGEL ++ /xf0/x9f/xa5/xb0 SMILING FACE WITH SMILING EYES AND THREE HEARTS ++ /xf0/x9f/xa5/xb1 YAWNING FACE +++ /xf0/x9f/xa5/xb2 SMILING FACE WITH TEAR ++ /xf0/x9f/xa5/xb3 FACE WITH PARTY HORN AND PARTY HAT ++ /xf0/x9f/xa5/xb4 FACE WITH UNEVEN EYES AND WAVY MOUTH ++ /xf0/x9f/xa5/xb5 OVERHEATED FACE ++ /xf0/x9f/xa5/xb6 FREEZING FACE +++ /xf0/x9f/xa5/xb7 NINJA +++ /xf0/x9f/xa5/xb8 DISGUISED FACE ++ /xf0/x9f/xa5/xba FACE WITH PLEADING EYES ++ /xf0/x9f/xa5/xbb SARI ++ /xf0/x9f/xa5/xbc LAB COAT ++@@ -43544,12 +44238,17 @@ CHARMAP ++ /xf0/x9f/xa6/xa0 MICROBE ++ /xf0/x9f/xa6/xa1 BADGER ++ /xf0/x9f/xa6/xa2 SWAN +++ /xf0/x9f/xa6/xa3 MAMMOTH +++ /xf0/x9f/xa6/xa4 DODO ++ /xf0/x9f/xa6/xa5 SLOTH ++ /xf0/x9f/xa6/xa6 OTTER ++ /xf0/x9f/xa6/xa7 ORANGUTAN ++ /xf0/x9f/xa6/xa8 SKUNK ++ /xf0/x9f/xa6/xa9 FLAMINGO ++ /xf0/x9f/xa6/xaa OYSTER +++ /xf0/x9f/xa6/xab BEAVER +++ /xf0/x9f/xa6/xac BISON +++ /xf0/x9f/xa6/xad SEAL ++ /xf0/x9f/xa6/xae GUIDE DOG ++ /xf0/x9f/xa6/xaf PROBING CANE ++ /xf0/x9f/xa6/xb0 EMOJI COMPONENT RED HAIR ++@@ -43579,6 +44278,7 @@ CHARMAP ++ /xf0/x9f/xa7/x88 BUTTER ++ /xf0/x9f/xa7/x89 MATE DRINK ++ /xf0/x9f/xa7/x8a ICE CUBE +++ /xf0/x9f/xa7/x8b BUBBLE TEA ++ /xf0/x9f/xa7/x8d STANDING PERSON ++ /xf0/x9f/xa7/x8e KNEELING PERSON ++ /xf0/x9f/xa7/x8f DEAF PERSON ++@@ -43732,18 +44432,271 @@ CHARMAP ++ /xf0/x9f/xa9/xb1 ONE-PIECE SWIMSUIT ++ /xf0/x9f/xa9/xb2 BRIEFS ++ /xf0/x9f/xa9/xb3 SHORTS +++ /xf0/x9f/xa9/xb4 THONG SANDAL ++ /xf0/x9f/xa9/xb8 DROP OF BLOOD ++ /xf0/x9f/xa9/xb9 ADHESIVE BANDAGE ++ /xf0/x9f/xa9/xba STETHOSCOPE ++ /xf0/x9f/xaa/x80 YO-YO ++ /xf0/x9f/xaa/x81 KITE ++ /xf0/x9f/xaa/x82 PARACHUTE +++ /xf0/x9f/xaa/x83 BOOMERANG +++ /xf0/x9f/xaa/x84 MAGIC WAND +++ /xf0/x9f/xaa/x85 PINATA +++ /xf0/x9f/xaa/x86 NESTING DOLLS ++ /xf0/x9f/xaa/x90 RINGED PLANET ++ /xf0/x9f/xaa/x91 CHAIR ++ /xf0/x9f/xaa/x92 RAZOR ++ /xf0/x9f/xaa/x93 AXE ++ /xf0/x9f/xaa/x94 DIYA LAMP ++ /xf0/x9f/xaa/x95 BANJO +++ /xf0/x9f/xaa/x96 MILITARY HELMET +++ /xf0/x9f/xaa/x97 ACCORDION +++ /xf0/x9f/xaa/x98 LONG DRUM +++ /xf0/x9f/xaa/x99 COIN +++ /xf0/x9f/xaa/x9a CARPENTRY SAW +++ /xf0/x9f/xaa/x9b SCREWDRIVER +++ /xf0/x9f/xaa/x9c LADDER +++ /xf0/x9f/xaa/x9d HOOK +++ /xf0/x9f/xaa/x9e MIRROR +++ /xf0/x9f/xaa/x9f WINDOW +++ /xf0/x9f/xaa/xa0 PLUNGER +++ /xf0/x9f/xaa/xa1 SEWING NEEDLE +++ /xf0/x9f/xaa/xa2 KNOT +++ /xf0/x9f/xaa/xa3 BUCKET +++ /xf0/x9f/xaa/xa4 MOUSE TRAP +++ /xf0/x9f/xaa/xa5 TOOTHBRUSH +++ /xf0/x9f/xaa/xa6 HEADSTONE +++ /xf0/x9f/xaa/xa7 PLACARD +++ /xf0/x9f/xaa/xa8 ROCK +++ /xf0/x9f/xaa/xb0 FLY +++ /xf0/x9f/xaa/xb1 WORM +++ /xf0/x9f/xaa/xb2 BEETLE +++ /xf0/x9f/xaa/xb3 COCKROACH +++ /xf0/x9f/xaa/xb4 POTTED PLANT +++ /xf0/x9f/xaa/xb5 WOOD +++ /xf0/x9f/xaa/xb6 FEATHER +++ /xf0/x9f/xab/x80 ANATOMICAL HEART +++ /xf0/x9f/xab/x81 LUNGS +++ /xf0/x9f/xab/x82 PEOPLE HUGGING +++ /xf0/x9f/xab/x90 BLUEBERRIES +++ /xf0/x9f/xab/x91 BELL PEPPER +++ /xf0/x9f/xab/x92 OLIVE +++ /xf0/x9f/xab/x93 FLATBREAD +++ /xf0/x9f/xab/x94 TAMALE +++ /xf0/x9f/xab/x95 FONDUE +++ /xf0/x9f/xab/x96 TEAPOT +++ /xf0/x9f/xac/x80 BLOCK SEXTANT-1 +++ /xf0/x9f/xac/x81 BLOCK SEXTANT-2 +++ /xf0/x9f/xac/x82 BLOCK SEXTANT-12 +++ /xf0/x9f/xac/x83 BLOCK SEXTANT-3 +++ /xf0/x9f/xac/x84 BLOCK SEXTANT-13 +++ /xf0/x9f/xac/x85 BLOCK SEXTANT-23 +++ /xf0/x9f/xac/x86 BLOCK SEXTANT-123 +++ /xf0/x9f/xac/x87 BLOCK SEXTANT-4 +++ /xf0/x9f/xac/x88 BLOCK SEXTANT-14 +++ /xf0/x9f/xac/x89 BLOCK SEXTANT-24 +++ /xf0/x9f/xac/x8a BLOCK SEXTANT-124 +++ /xf0/x9f/xac/x8b BLOCK SEXTANT-34 +++ /xf0/x9f/xac/x8c BLOCK SEXTANT-134 +++ /xf0/x9f/xac/x8d BLOCK SEXTANT-234 +++ /xf0/x9f/xac/x8e BLOCK SEXTANT-1234 +++ /xf0/x9f/xac/x8f BLOCK SEXTANT-5 +++ /xf0/x9f/xac/x90 BLOCK SEXTANT-15 +++ /xf0/x9f/xac/x91 BLOCK SEXTANT-25 +++ /xf0/x9f/xac/x92 BLOCK SEXTANT-125 +++ /xf0/x9f/xac/x93 BLOCK SEXTANT-35 +++ /xf0/x9f/xac/x94 BLOCK SEXTANT-235 +++ /xf0/x9f/xac/x95 BLOCK SEXTANT-1235 +++ /xf0/x9f/xac/x96 BLOCK SEXTANT-45 +++ /xf0/x9f/xac/x97 BLOCK SEXTANT-145 +++ /xf0/x9f/xac/x98 BLOCK SEXTANT-245 +++ /xf0/x9f/xac/x99 BLOCK SEXTANT-1245 +++ /xf0/x9f/xac/x9a BLOCK SEXTANT-345 +++ /xf0/x9f/xac/x9b BLOCK SEXTANT-1345 +++ /xf0/x9f/xac/x9c BLOCK SEXTANT-2345 +++ /xf0/x9f/xac/x9d BLOCK SEXTANT-12345 +++ /xf0/x9f/xac/x9e BLOCK SEXTANT-6 +++ /xf0/x9f/xac/x9f BLOCK SEXTANT-16 +++ /xf0/x9f/xac/xa0 BLOCK SEXTANT-26 +++ /xf0/x9f/xac/xa1 BLOCK SEXTANT-126 +++ /xf0/x9f/xac/xa2 BLOCK SEXTANT-36 +++ /xf0/x9f/xac/xa3 BLOCK SEXTANT-136 +++ /xf0/x9f/xac/xa4 BLOCK SEXTANT-236 +++ /xf0/x9f/xac/xa5 BLOCK SEXTANT-1236 +++ /xf0/x9f/xac/xa6 BLOCK SEXTANT-46 +++ /xf0/x9f/xac/xa7 BLOCK SEXTANT-146 +++ /xf0/x9f/xac/xa8 BLOCK SEXTANT-1246 +++ /xf0/x9f/xac/xa9 BLOCK SEXTANT-346 +++ /xf0/x9f/xac/xaa BLOCK SEXTANT-1346 +++ /xf0/x9f/xac/xab BLOCK SEXTANT-2346 +++ /xf0/x9f/xac/xac BLOCK SEXTANT-12346 +++ /xf0/x9f/xac/xad BLOCK SEXTANT-56 +++ /xf0/x9f/xac/xae BLOCK SEXTANT-156 +++ /xf0/x9f/xac/xaf BLOCK SEXTANT-256 +++ /xf0/x9f/xac/xb0 BLOCK SEXTANT-1256 +++ /xf0/x9f/xac/xb1 BLOCK SEXTANT-356 +++ /xf0/x9f/xac/xb2 BLOCK SEXTANT-1356 +++ /xf0/x9f/xac/xb3 BLOCK SEXTANT-2356 +++ /xf0/x9f/xac/xb4 BLOCK SEXTANT-12356 +++ /xf0/x9f/xac/xb5 BLOCK SEXTANT-456 +++ /xf0/x9f/xac/xb6 BLOCK SEXTANT-1456 +++ /xf0/x9f/xac/xb7 BLOCK SEXTANT-2456 +++ /xf0/x9f/xac/xb8 BLOCK SEXTANT-12456 +++ /xf0/x9f/xac/xb9 BLOCK SEXTANT-3456 +++ /xf0/x9f/xac/xba BLOCK SEXTANT-13456 +++ /xf0/x9f/xac/xbb BLOCK SEXTANT-23456 +++ /xf0/x9f/xac/xbc LOWER LEFT BLOCK DIAGONAL LOWER MIDDLE LEFT TO LOWER CENTRE +++ /xf0/x9f/xac/xbd LOWER LEFT BLOCK DIAGONAL LOWER MIDDLE LEFT TO LOWER RIGHT +++ /xf0/x9f/xac/xbe LOWER LEFT BLOCK DIAGONAL UPPER MIDDLE LEFT TO LOWER CENTRE +++ /xf0/x9f/xac/xbf LOWER LEFT BLOCK DIAGONAL UPPER MIDDLE LEFT TO LOWER RIGHT +++ /xf0/x9f/xad/x80 LOWER LEFT BLOCK DIAGONAL UPPER LEFT TO LOWER CENTRE +++ /xf0/x9f/xad/x81 LOWER RIGHT BLOCK DIAGONAL UPPER MIDDLE LEFT TO UPPER CENTRE +++ /xf0/x9f/xad/x82 LOWER RIGHT BLOCK DIAGONAL UPPER MIDDLE LEFT TO UPPER RIGHT +++ /xf0/x9f/xad/x83 LOWER RIGHT BLOCK DIAGONAL LOWER MIDDLE LEFT TO UPPER CENTRE +++ /xf0/x9f/xad/x84 LOWER RIGHT BLOCK DIAGONAL LOWER MIDDLE LEFT TO UPPER RIGHT +++ /xf0/x9f/xad/x85 LOWER RIGHT BLOCK DIAGONAL LOWER LEFT TO UPPER CENTRE +++ /xf0/x9f/xad/x86 LOWER RIGHT BLOCK DIAGONAL LOWER MIDDLE LEFT TO UPPER MIDDLE RIGHT +++ /xf0/x9f/xad/x87 LOWER RIGHT BLOCK DIAGONAL LOWER CENTRE TO LOWER MIDDLE RIGHT +++ /xf0/x9f/xad/x88 LOWER RIGHT BLOCK DIAGONAL LOWER LEFT TO LOWER MIDDLE RIGHT +++ /xf0/x9f/xad/x89 LOWER RIGHT BLOCK DIAGONAL LOWER CENTRE TO UPPER MIDDLE RIGHT +++ /xf0/x9f/xad/x8a LOWER RIGHT BLOCK DIAGONAL LOWER LEFT TO UPPER MIDDLE RIGHT +++ /xf0/x9f/xad/x8b LOWER RIGHT BLOCK DIAGONAL LOWER CENTRE TO UPPER RIGHT +++ /xf0/x9f/xad/x8c LOWER LEFT BLOCK DIAGONAL UPPER CENTRE TO UPPER MIDDLE RIGHT +++ /xf0/x9f/xad/x8d LOWER LEFT BLOCK DIAGONAL UPPER LEFT TO UPPER MIDDLE RIGHT +++ /xf0/x9f/xad/x8e LOWER LEFT BLOCK DIAGONAL UPPER CENTRE TO LOWER MIDDLE RIGHT +++ /xf0/x9f/xad/x8f LOWER LEFT BLOCK DIAGONAL UPPER LEFT TO LOWER MIDDLE RIGHT +++ /xf0/x9f/xad/x90 LOWER LEFT BLOCK DIAGONAL UPPER CENTRE TO LOWER RIGHT +++ /xf0/x9f/xad/x91 LOWER LEFT BLOCK DIAGONAL UPPER MIDDLE LEFT TO LOWER MIDDLE RIGHT +++ /xf0/x9f/xad/x92 UPPER RIGHT BLOCK DIAGONAL LOWER MIDDLE LEFT TO LOWER CENTRE +++ /xf0/x9f/xad/x93 UPPER RIGHT BLOCK DIAGONAL LOWER MIDDLE LEFT TO LOWER RIGHT +++ /xf0/x9f/xad/x94 UPPER RIGHT BLOCK DIAGONAL UPPER MIDDLE LEFT TO LOWER CENTRE +++ /xf0/x9f/xad/x95 UPPER RIGHT BLOCK DIAGONAL UPPER MIDDLE LEFT TO LOWER RIGHT +++ /xf0/x9f/xad/x96 UPPER RIGHT BLOCK DIAGONAL UPPER LEFT TO LOWER CENTRE +++ /xf0/x9f/xad/x97 UPPER LEFT BLOCK DIAGONAL UPPER MIDDLE LEFT TO UPPER CENTRE +++ /xf0/x9f/xad/x98 UPPER LEFT BLOCK DIAGONAL UPPER MIDDLE LEFT TO UPPER RIGHT +++ /xf0/x9f/xad/x99 UPPER LEFT BLOCK DIAGONAL LOWER MIDDLE LEFT TO UPPER CENTRE +++ /xf0/x9f/xad/x9a UPPER LEFT BLOCK DIAGONAL LOWER MIDDLE LEFT TO UPPER RIGHT +++ /xf0/x9f/xad/x9b UPPER LEFT BLOCK DIAGONAL LOWER LEFT TO UPPER CENTRE +++ /xf0/x9f/xad/x9c UPPER LEFT BLOCK DIAGONAL LOWER MIDDLE LEFT TO UPPER MIDDLE RIGHT +++ /xf0/x9f/xad/x9d UPPER LEFT BLOCK DIAGONAL LOWER CENTRE TO LOWER MIDDLE RIGHT +++ /xf0/x9f/xad/x9e UPPER LEFT BLOCK DIAGONAL LOWER LEFT TO LOWER MIDDLE RIGHT +++ /xf0/x9f/xad/x9f UPPER LEFT BLOCK DIAGONAL LOWER CENTRE TO UPPER MIDDLE RIGHT +++ /xf0/x9f/xad/xa0 UPPER LEFT BLOCK DIAGONAL LOWER LEFT TO UPPER MIDDLE RIGHT +++ /xf0/x9f/xad/xa1 UPPER LEFT BLOCK DIAGONAL LOWER CENTRE TO UPPER RIGHT +++ /xf0/x9f/xad/xa2 UPPER RIGHT BLOCK DIAGONAL UPPER CENTRE TO UPPER MIDDLE RIGHT +++ /xf0/x9f/xad/xa3 UPPER RIGHT BLOCK DIAGONAL UPPER LEFT TO UPPER MIDDLE RIGHT +++ /xf0/x9f/xad/xa4 UPPER RIGHT BLOCK DIAGONAL UPPER CENTRE TO LOWER MIDDLE RIGHT +++ /xf0/x9f/xad/xa5 UPPER RIGHT BLOCK DIAGONAL UPPER LEFT TO LOWER MIDDLE RIGHT +++ /xf0/x9f/xad/xa6 UPPER RIGHT BLOCK DIAGONAL UPPER CENTRE TO LOWER RIGHT +++ /xf0/x9f/xad/xa7 UPPER RIGHT BLOCK DIAGONAL UPPER MIDDLE LEFT TO LOWER MIDDLE RIGHT +++ /xf0/x9f/xad/xa8 UPPER AND RIGHT AND LOWER TRIANGULAR THREE QUARTERS BLOCK +++ /xf0/x9f/xad/xa9 LEFT AND LOWER AND RIGHT TRIANGULAR THREE QUARTERS BLOCK +++ /xf0/x9f/xad/xaa UPPER AND LEFT AND LOWER TRIANGULAR THREE QUARTERS BLOCK +++ /xf0/x9f/xad/xab LEFT AND UPPER AND RIGHT TRIANGULAR THREE QUARTERS BLOCK +++ /xf0/x9f/xad/xac LEFT TRIANGULAR ONE QUARTER BLOCK +++ /xf0/x9f/xad/xad UPPER TRIANGULAR ONE QUARTER BLOCK +++ /xf0/x9f/xad/xae RIGHT TRIANGULAR ONE QUARTER BLOCK +++ /xf0/x9f/xad/xaf LOWER TRIANGULAR ONE QUARTER BLOCK +++ /xf0/x9f/xad/xb0 VERTICAL ONE EIGHTH BLOCK-2 +++ /xf0/x9f/xad/xb1 VERTICAL ONE EIGHTH BLOCK-3 +++ /xf0/x9f/xad/xb2 VERTICAL ONE EIGHTH BLOCK-4 +++ /xf0/x9f/xad/xb3 VERTICAL ONE EIGHTH BLOCK-5 +++ /xf0/x9f/xad/xb4 VERTICAL ONE EIGHTH BLOCK-6 +++ /xf0/x9f/xad/xb5 VERTICAL ONE EIGHTH BLOCK-7 +++ /xf0/x9f/xad/xb6 HORIZONTAL ONE EIGHTH BLOCK-2 +++ /xf0/x9f/xad/xb7 HORIZONTAL ONE EIGHTH BLOCK-3 +++ /xf0/x9f/xad/xb8 HORIZONTAL ONE EIGHTH BLOCK-4 +++ /xf0/x9f/xad/xb9 HORIZONTAL ONE EIGHTH BLOCK-5 +++ /xf0/x9f/xad/xba HORIZONTAL ONE EIGHTH BLOCK-6 +++ /xf0/x9f/xad/xbb HORIZONTAL ONE EIGHTH BLOCK-7 +++ /xf0/x9f/xad/xbc LEFT AND LOWER ONE EIGHTH BLOCK +++ /xf0/x9f/xad/xbd LEFT AND UPPER ONE EIGHTH BLOCK +++ /xf0/x9f/xad/xbe RIGHT AND UPPER ONE EIGHTH BLOCK +++ /xf0/x9f/xad/xbf RIGHT AND LOWER ONE EIGHTH BLOCK +++ /xf0/x9f/xae/x80 UPPER AND LOWER ONE EIGHTH BLOCK +++ /xf0/x9f/xae/x81 HORIZONTAL ONE EIGHTH BLOCK-1358 +++ /xf0/x9f/xae/x82 UPPER ONE QUARTER BLOCK +++ /xf0/x9f/xae/x83 UPPER THREE EIGHTHS BLOCK +++ /xf0/x9f/xae/x84 UPPER FIVE EIGHTHS BLOCK +++ /xf0/x9f/xae/x85 UPPER THREE QUARTERS BLOCK +++ /xf0/x9f/xae/x86 UPPER SEVEN EIGHTHS BLOCK +++ /xf0/x9f/xae/x87 RIGHT ONE QUARTER BLOCK +++ /xf0/x9f/xae/x88 RIGHT THREE EIGHTHS BLOCK +++ /xf0/x9f/xae/x89 RIGHT FIVE EIGHTHS BLOCK +++ /xf0/x9f/xae/x8a RIGHT THREE QUARTERS BLOCK +++ /xf0/x9f/xae/x8b RIGHT SEVEN EIGHTHS BLOCK +++ /xf0/x9f/xae/x8c LEFT HALF MEDIUM SHADE +++ /xf0/x9f/xae/x8d RIGHT HALF MEDIUM SHADE +++ /xf0/x9f/xae/x8e UPPER HALF MEDIUM SHADE +++ /xf0/x9f/xae/x8f LOWER HALF MEDIUM SHADE +++ /xf0/x9f/xae/x90 INVERSE MEDIUM SHADE +++ /xf0/x9f/xae/x91 UPPER HALF BLOCK AND LOWER HALF INVERSE MEDIUM SHADE +++ /xf0/x9f/xae/x92 UPPER HALF INVERSE MEDIUM SHADE AND LOWER HALF BLOCK +++ /xf0/x9f/xae/x94 LEFT HALF INVERSE MEDIUM SHADE AND RIGHT HALF BLOCK +++ /xf0/x9f/xae/x95 CHECKER BOARD FILL +++ /xf0/x9f/xae/x96 INVERSE CHECKER BOARD FILL +++ /xf0/x9f/xae/x97 HEAVY HORIZONTAL FILL +++ /xf0/x9f/xae/x98 UPPER LEFT TO LOWER RIGHT FILL +++ /xf0/x9f/xae/x99 UPPER RIGHT TO LOWER LEFT FILL +++ /xf0/x9f/xae/x9a UPPER AND LOWER TRIANGULAR HALF BLOCK +++ /xf0/x9f/xae/x9b LEFT AND RIGHT TRIANGULAR HALF BLOCK +++ /xf0/x9f/xae/x9c UPPER LEFT TRIANGULAR MEDIUM SHADE +++ /xf0/x9f/xae/x9d UPPER RIGHT TRIANGULAR MEDIUM SHADE +++ /xf0/x9f/xae/x9e LOWER RIGHT TRIANGULAR MEDIUM SHADE +++ /xf0/x9f/xae/x9f LOWER LEFT TRIANGULAR MEDIUM SHADE +++ /xf0/x9f/xae/xa0 BOX DRAWINGS LIGHT DIAGONAL UPPER CENTRE TO MIDDLE LEFT +++ /xf0/x9f/xae/xa1 BOX DRAWINGS LIGHT DIAGONAL UPPER CENTRE TO MIDDLE RIGHT +++ /xf0/x9f/xae/xa2 BOX DRAWINGS LIGHT DIAGONAL MIDDLE LEFT TO LOWER CENTRE +++ /xf0/x9f/xae/xa3 BOX DRAWINGS LIGHT DIAGONAL MIDDLE RIGHT TO LOWER CENTRE +++ /xf0/x9f/xae/xa4 BOX DRAWINGS LIGHT DIAGONAL UPPER CENTRE TO MIDDLE LEFT TO LOWER CENTRE +++ /xf0/x9f/xae/xa5 BOX DRAWINGS LIGHT DIAGONAL UPPER CENTRE TO MIDDLE RIGHT TO LOWER CENTRE +++ /xf0/x9f/xae/xa6 BOX DRAWINGS LIGHT DIAGONAL MIDDLE LEFT TO LOWER CENTRE TO MIDDLE RIGHT +++ /xf0/x9f/xae/xa7 BOX DRAWINGS LIGHT DIAGONAL MIDDLE LEFT TO UPPER CENTRE TO MIDDLE RIGHT +++ /xf0/x9f/xae/xa8 BOX DRAWINGS LIGHT DIAGONAL UPPER CENTRE TO MIDDLE LEFT AND MIDDLE RIGHT TO LOWER CENTRE +++ /xf0/x9f/xae/xa9 BOX DRAWINGS LIGHT DIAGONAL UPPER CENTRE TO MIDDLE RIGHT AND MIDDLE LEFT TO LOWER CENTRE +++ /xf0/x9f/xae/xaa BOX DRAWINGS LIGHT DIAGONAL UPPER CENTRE TO MIDDLE RIGHT TO LOWER CENTRE TO MIDDLE LEFT +++ /xf0/x9f/xae/xab BOX DRAWINGS LIGHT DIAGONAL UPPER CENTRE TO MIDDLE LEFT TO LOWER CENTRE TO MIDDLE RIGHT +++ /xf0/x9f/xae/xac BOX DRAWINGS LIGHT DIAGONAL MIDDLE LEFT TO UPPER CENTRE TO MIDDLE RIGHT TO LOWER CENTRE +++ /xf0/x9f/xae/xad BOX DRAWINGS LIGHT DIAGONAL MIDDLE RIGHT TO UPPER CENTRE TO MIDDLE LEFT TO LOWER CENTRE +++ /xf0/x9f/xae/xae BOX DRAWINGS LIGHT DIAGONAL DIAMOND +++ /xf0/x9f/xae/xaf BOX DRAWINGS LIGHT HORIZONTAL WITH VERTICAL STROKE +++ /xf0/x9f/xae/xb0 ARROWHEAD-SHAPED POINTER +++ /xf0/x9f/xae/xb1 INVERSE CHECK MARK +++ /xf0/x9f/xae/xb2 LEFT HALF RUNNING MAN +++ /xf0/x9f/xae/xb3 RIGHT HALF RUNNING MAN +++ /xf0/x9f/xae/xb4 INVERSE DOWNWARDS ARROW WITH TIP LEFTWARDS +++ /xf0/x9f/xae/xb5 LEFTWARDS ARROW AND UPPER AND LOWER ONE EIGHTH BLOCK +++ /xf0/x9f/xae/xb6 RIGHTWARDS ARROW AND UPPER AND LOWER ONE EIGHTH BLOCK +++ /xf0/x9f/xae/xb7 DOWNWARDS ARROW AND RIGHT ONE EIGHTH BLOCK +++ /xf0/x9f/xae/xb8 UPWARDS ARROW AND RIGHT ONE EIGHTH BLOCK +++ /xf0/x9f/xae/xb9 LEFT HALF FOLDER +++ /xf0/x9f/xae/xba RIGHT HALF FOLDER +++ /xf0/x9f/xae/xbb VOIDED GREEK CROSS +++ /xf0/x9f/xae/xbc RIGHT OPEN SQUARED DOT +++ /xf0/x9f/xae/xbd NEGATIVE DIAGONAL CROSS +++ /xf0/x9f/xae/xbe NEGATIVE DIAGONAL MIDDLE RIGHT TO LOWER CENTRE +++ /xf0/x9f/xae/xbf NEGATIVE DIAGONAL DIAMOND +++ /xf0/x9f/xaf/x80 WHITE HEAVY SALTIRE WITH ROUNDED CORNERS +++ /xf0/x9f/xaf/x81 LEFT THIRD WHITE RIGHT POINTING INDEX +++ /xf0/x9f/xaf/x82 MIDDLE THIRD WHITE RIGHT POINTING INDEX +++ /xf0/x9f/xaf/x83 RIGHT THIRD WHITE RIGHT POINTING INDEX +++ /xf0/x9f/xaf/x84 NEGATIVE SQUARED QUESTION MARK +++ /xf0/x9f/xaf/x85 STICK FIGURE +++ /xf0/x9f/xaf/x86 STICK FIGURE WITH ARMS RAISED +++ /xf0/x9f/xaf/x87 STICK FIGURE LEANING LEFT +++ /xf0/x9f/xaf/x88 STICK FIGURE LEANING RIGHT +++ /xf0/x9f/xaf/x89 STICK FIGURE WITH DRESS +++ /xf0/x9f/xaf/x8a WHITE UP-POINTING CHEVRON +++ /xf0/x9f/xaf/xb0 SEGMENTED DIGIT ZERO +++ /xf0/x9f/xaf/xb1 SEGMENTED DIGIT ONE +++ /xf0/x9f/xaf/xb2 SEGMENTED DIGIT TWO +++ /xf0/x9f/xaf/xb3 SEGMENTED DIGIT THREE +++ /xf0/x9f/xaf/xb4 SEGMENTED DIGIT FOUR +++ /xf0/x9f/xaf/xb5 SEGMENTED DIGIT FIVE +++ /xf0/x9f/xaf/xb6 SEGMENTED DIGIT SIX +++ /xf0/x9f/xaf/xb7 SEGMENTED DIGIT SEVEN +++ /xf0/x9f/xaf/xb8 SEGMENTED DIGIT EIGHT +++ /xf0/x9f/xaf/xb9 SEGMENTED DIGIT NINE ++ .. /xf0/xa0/x80/x80 ++ .. /xf0/xa0/x81/x80 ++ .. /xf0/xa0/x82/x80 ++@@ -44411,7 +45364,7 @@ CHARMAP ++ .. /xf0/xaa/x98/x80 ++ .. /xf0/xaa/x99/x80 ++ .. /xf0/xaa/x9a/x80 ++-.. /xf0/xaa/x9b/x80 +++.. /xf0/xaa/x9b/x80 ++ .. /xf0/xaa/x9c/x80 ++ .. /xf0/xaa/x9d/x80 ++ .. /xf0/xaa/x9e/x80 ++@@ -45231,6 +46184,84 @@ CHARMAP ++ /xf0/xaf/xa8/x9b CJK COMPATIBILITY IDEOGRAPH-2FA1B ++ /xf0/xaf/xa8/x9c CJK COMPATIBILITY IDEOGRAPH-2FA1C ++ /xf0/xaf/xa8/x9d CJK COMPATIBILITY IDEOGRAPH-2FA1D +++.. /xf0/xb0/x80/x80 +++.. /xf0/xb0/x81/x80 +++.. /xf0/xb0/x82/x80 +++.. /xf0/xb0/x83/x80 +++.. /xf0/xb0/x84/x80 +++.. /xf0/xb0/x85/x80 +++.. /xf0/xb0/x86/x80 +++.. /xf0/xb0/x87/x80 +++.. /xf0/xb0/x88/x80 +++.. /xf0/xb0/x89/x80 +++.. /xf0/xb0/x8a/x80 +++.. /xf0/xb0/x8b/x80 +++.. /xf0/xb0/x8c/x80 +++.. /xf0/xb0/x8d/x80 +++.. /xf0/xb0/x8e/x80 +++.. /xf0/xb0/x8f/x80 +++.. /xf0/xb0/x90/x80 +++.. /xf0/xb0/x91/x80 +++.. /xf0/xb0/x92/x80 +++.. /xf0/xb0/x93/x80 +++.. /xf0/xb0/x94/x80 +++.. /xf0/xb0/x95/x80 +++.. /xf0/xb0/x96/x80 +++.. /xf0/xb0/x97/x80 +++.. /xf0/xb0/x98/x80 +++.. /xf0/xb0/x99/x80 +++.. /xf0/xb0/x9a/x80 +++.. /xf0/xb0/x9b/x80 +++.. /xf0/xb0/x9c/x80 +++.. /xf0/xb0/x9d/x80 +++.. /xf0/xb0/x9e/x80 +++.. /xf0/xb0/x9f/x80 +++.. /xf0/xb0/xa0/x80 +++.. /xf0/xb0/xa1/x80 +++.. /xf0/xb0/xa2/x80 +++.. /xf0/xb0/xa3/x80 +++.. /xf0/xb0/xa4/x80 +++.. /xf0/xb0/xa5/x80 +++.. /xf0/xb0/xa6/x80 +++.. /xf0/xb0/xa7/x80 +++.. /xf0/xb0/xa8/x80 +++.. /xf0/xb0/xa9/x80 +++.. /xf0/xb0/xaa/x80 +++.. /xf0/xb0/xab/x80 +++.. /xf0/xb0/xac/x80 +++.. /xf0/xb0/xad/x80 +++.. /xf0/xb0/xae/x80 +++.. /xf0/xb0/xaf/x80 +++.. /xf0/xb0/xb0/x80 +++.. /xf0/xb0/xb1/x80 +++.. /xf0/xb0/xb2/x80 +++.. /xf0/xb0/xb3/x80 +++.. /xf0/xb0/xb4/x80 +++.. /xf0/xb0/xb5/x80 +++.. /xf0/xb0/xb6/x80 +++.. /xf0/xb0/xb7/x80 +++.. /xf0/xb0/xb8/x80 +++.. /xf0/xb0/xb9/x80 +++.. /xf0/xb0/xba/x80 +++.. /xf0/xb0/xbb/x80 +++.. /xf0/xb0/xbc/x80 +++.. /xf0/xb0/xbd/x80 +++.. /xf0/xb0/xbe/x80 +++.. /xf0/xb0/xbf/x80 +++.. /xf0/xb1/x80/x80 +++.. /xf0/xb1/x81/x80 +++.. /xf0/xb1/x82/x80 +++.. /xf0/xb1/x83/x80 +++.. /xf0/xb1/x84/x80 +++.. /xf0/xb1/x85/x80 +++.. /xf0/xb1/x86/x80 +++.. /xf0/xb1/x87/x80 +++.. /xf0/xb1/x88/x80 +++.. /xf0/xb1/x89/x80 +++.. /xf0/xb1/x8a/x80 +++.. /xf0/xb1/x8b/x80 +++.. /xf0/xb1/x8c/x80 +++.. /xf0/xb1/x8d/x80 ++ /xf3/xa0/x80/x81 LANGUAGE TAG ++ /xf3/xa0/x80/xa0 TAG SPACE ++ /xf3/xa0/x80/xa1 TAG EXCLAMATION MARK ++@@ -47618,7 +48649,7 @@ CHARMAP ++ .. /xf4/x8f/xbf/x80 ++ END CHARMAP ++ ++-% Character width according to Unicode 12.1.0. +++% Character width according to Unicode 13.0.0. ++ % - Default width is 1. ++ % - Double-width characters have width 2; generated from ++ % "grep '^[^;]*;[WF]' EastAsianWidth.txt" ++@@ -47686,7 +48717,7 @@ WIDTH ++ 0 ++ ... 0 ++ 0 ++- 0 +++... 0 ++ ... 0 ++ 0 ++ 0 ++@@ -47709,6 +48740,7 @@ WIDTH ++ ... 0 ++ 0 ++ ... 0 +++ 0 ++ 0 ++ ... 0 ++ 0 ++@@ -47767,7 +48799,7 @@ WIDTH ++ ... 0 ++ ... 0 ++ 0 ++-... 0 +++... 0 ++ ... 0 ++ 0 ++ ... 0 ++@@ -47846,11 +48878,9 @@ WIDTH ++ ... 2 ++ ... 2 ++ ... 2 ++-... 2 ++-... 2 +++... 2 ++ ... 2 ++-... 2 ++-... 2 +++... 2 ++ ... 2 ++ ... 2 ++ ... 0 ++@@ -47861,6 +48891,7 @@ WIDTH ++ 0 ++ 0 ++ ... 0 +++ 0 ++ ... 0 ++ ... 0 ++ 0 ++@@ -47912,6 +48943,7 @@ WIDTH ++ 0 ++ ... 0 ++ ... 0 +++... 0 ++ ... 0 ++ 0 ++ ... 0 ++@@ -47925,6 +48957,7 @@ WIDTH ++ ... 0 ++ ... 0 ++ ... 0 +++ 0 ++ ... 0 ++ 0 ++ ... 0 ++@@ -47960,6 +48993,9 @@ WIDTH ++ ... 0 ++ ... 0 ++ ... 0 +++... 0 +++ 0 +++ 0 ++ ... 0 ++ ... 0 ++ 0 ++@@ -47993,8 +49029,11 @@ WIDTH ++ 0 ++ ... 0 ++ ... 2 +++ 0 +++... 2 ++ ... 2 ++-... 2 +++... 2 +++... 2 ++ ... 2 ++ ... 2 ++ ... 2 ++@@ -48051,26 +49090,29 @@ WIDTH ++ ... 2 ++ 2 ++ ... 2 ++- 2 +++... 2 ++ ... 2 ++-... 2 +++... 2 ++ ... 2 ++-... 2 ++-... 2 ++-... 2 ++-... 2 ++-... 2 +++... 2 +++... 2 +++... 2 +++... 2 ++ ... 2 ++-... 2 +++... 2 ++ ... 2 ++-... 2 ++-... 2 ++-... 2 +++... 2 +++... 2 +++... 2 +++... 2 +++... 2 +++... 2 ++ ... 2 ++ ... 2 ++ ... 2 ++ ... 2 ++ ... 2 +++... 2 ++ 0 ++ ... 0 ++ ... 0 ++diff --git a/localedata/locales/i18n_ctype b/localedata/locales/i18n_ctype ++index 269712b60f..6f078a101d 100644 ++--- a/localedata/locales/i18n_ctype +++++ b/localedata/locales/i18n_ctype ++@@ -16,7 +16,7 @@ comment_char % ++ % Generated automatically by gen_unicode_ctype.py for Unicode 12.1.0. ++ ++ LC_IDENTIFICATION ++-title "Unicode 12.1.0 FDCC-set" +++title "Unicode 13.0.0 FDCC-set" ++ source "UnicodeData.txt, DerivedCoreProperties.txt" ++ address "" ++ contact "" ++@@ -25,14 +25,14 @@ tel "" ++ fax "" ++ language "" ++ territory "Earth" ++-revision "12.1.0" ++-date "2019-05-08" +++revision "13.0.0" +++date "2020-04-14" ++ category "i18n:2012";LC_CTYPE ++ END LC_IDENTIFICATION ++ ++ LC_CTYPE ++ % The following is the 14652 i18n fdcc-set LC_CTYPE category. ++-% It covers Unicode version 12.1.0. +++% It covers Unicode version 13.0.0. ++ % The character classes and mapping tables were automatically ++ % generated using the gen_unicode_ctype.py program. ++ ++@@ -115,7 +115,7 @@ upper / ++ ;;;;;;;;;/ ++ ;;;;;;;;;/ ++ ..;..;;;;;/ ++- ;;..;..;/ +++ ;;..;;;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++@@ -215,25 +215,25 @@ lower / ++ ;..;;;;;;;/ ++ ;;;;..;;;;/ ++ ;;;;;;;;;/ ++- ;;;;;;..;/ ++- ..;..;..;..;/ ++- ..;..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;;/ ++- .. +++ ;;;;;;;;;/ +++ ..;..;..;..;/ +++ ..;..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;;.. ++ ++ % The "alpha" class of the "i18n" FDCC-set is reflecting ++ % the recommendations in TR 10176 annex A ++@@ -250,7 +250,7 @@ alpha / ++ ..;;..;..;/ ++ ..;..;;..;/ ++ ..;..;..;..;/ ++- ..;..;..;..;/ +++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;;..;..;/ ++@@ -276,14 +276,14 @@ alpha / ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;;..;/ ++- ..;..;..;..;/ ++- ..;..;..;;/ ++- ..;..;;..;/ ++- ..;..;..;..;/ ++- ;..;..;;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ..;;..;..;/ +++ ..;..;..;..;/ +++ ..;..;;..;/ +++ ..;;..;..;/ +++ ..;..;..;;/ +++ ..;..;;..;/ ++ ..;;..;..;/ ++ ..;;;..;..;/ ++ ;..;..;..;/ ++@@ -302,39 +302,39 @@ alpha / ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++- ..;..;;..;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;..;;/ ++- ..;..;..;..;/ ++- ..;..;..;;;/ ++- ;..;..;..;;/ ++- ..;..;..;..;/ ++- ..;..;..;;;/ ++- ..;;;..;;/ ++- ..;;;;..;/ ++- ..;..;..;;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ;;..;;..;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;;..;..;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;..;;/ ++- ..;..;;..;/ +++ ..;..;;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ;..;..;..;/ +++ ..;..;..;..;/ +++ ;;;..;..;/ +++ ..;;..;..;/ +++ ..;..;..;..;/ +++ ..;;;..;;;/ +++ ..;;..;;;;/ +++ ..;..;..;..;/ +++ ;..;..;..;/ +++ ..;..;..;..;/ +++ ..;;;..;;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ..;..;;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ;..;..;;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;;;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++- ..;..;..;..;/ +++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;;..;/ ++@@ -370,14 +370,16 @@ alpha / ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++- ..;;..;/ +++ ..;..;/ +++ ..;..;;/ +++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++- ..;..;;/ +++ ..;..;;/ ++ ..;..;/ ++- ..;;..;/ +++ ..;;..;/ ++ ..;;;/ ++ ..;;..;/ ++ ..;..;/ ++@@ -389,14 +391,19 @@ alpha / ++ ..;..;;/ ++ ;..;..;/ ++ ..;..;/ ++- ..;;..;/ ++- ..;;..;/ ++- ..;..;/ ++- ..;..;;/ ++- ;..;..;/ ++- ;..;..;/ +++ ..;..;/ +++ ..;..;;/ +++ ..;..;/ +++ ..;..;/ +++ ..;;;/ +++ ..;..;;/ +++ ..;..;/ ++ ..;..;/ ++- ..;..;;/ +++ ..;..;/ +++ ..;;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ ++ ..;..;/ ++ ..;;..;/ ++ ..;..;/ ++@@ -411,7 +418,7 @@ alpha / ++ ..;..;/ ++ ..;..;/ ++ ..;;..;/ ++- ..;..;/ +++ ..;;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++@@ -421,7 +428,8 @@ alpha / ++ ..;..;/ ++ ..;..;/ ++ ..;..;;/ ++- ..;..;/ +++ ..;..;/ +++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++@@ -458,10 +466,11 @@ alpha / ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- .. +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ .. ++ ++ % The "digit" class must only contain the BASIC LATIN digits, says ISO C 99 ++ % (sections 7.25.2.1.5 and 5.2.1). ++@@ -496,8 +505,8 @@ punct / ++ ;..;..;;;/ ++ ..;..;;;;/ ++ ..;..;;;;;/ ++- ;..;..;;;;/ ++- ..;;..;;;/ +++ ;..;..;;;;/ +++ ;..;;..;;;/ ++ ..;;;;..;;/ ++ ;..;..;;;;/ ++ ..;..;..;;/ ++@@ -522,31 +531,32 @@ punct / ++ ;;;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++- ..;..;..;..;/ ++- ;;..;..;..;/ +++ ..;..;..;..;/ +++ ;;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;;;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++- ;..;..;..;;/ +++ ;..;..;..;;/ ++ ..;..;..;;/ ++ ..;;;;..;/ ++ ..;..;..;;;/ ++- ..;..;;;..;/ ++- ..;;..;..;/ ++- ..;..;..;..;/ ++- ..;;..;..;/ ++- ..;..;..;..;/ ++- ..;..;..;/ ++- ..;..;/ ++- ..;;..;/ ++- ..;..;;/ ++- ;;..;/ ++- ..;..;/ ++- ..;..;;/ ++- ;..;..;/ +++ ..;..;;;..;/ +++ ..;..;;..;/ +++ ..;..;..;..;/ +++ ..;..;;..;/ +++ ..;..;..;..;/ +++ ..;..;..;/ +++ ..;..;/ +++ ..;..;;/ +++ ..;..;/ +++ ..;;;;/ +++ ..;..;/ +++ ..;..;/ +++ ..;;;/ +++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;;/ ++@@ -554,22 +564,24 @@ punct / ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;;..;/ ++- ..;..;;/ ++- ..;;..;/ ++- ..;..;/ ++- ..;;..;/ ++- ..;;..;/ ++- ..;;;/ ++- ..;;..;/ ++- ..;;..;/ ++- ;..;..;/ ++- ..;;..;/ ++- ..;..;;/ ++- ;..;..;/ +++ ..;;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;;/ +++ ..;..;/ +++ ..;;..;/ +++ ;..;..;/ +++ ..;..;;/ +++ ..;..;;/ +++ ..;..;;/ +++ ;..;..;/ +++ ..;..;;/ +++ ..;;..;/ +++ ..;..;;/ +++ ..;..;/ +++ ..;..;/ +++ ..;;;/ +++ ..;..;/ ++ ..;..;;/ ++ ..;..;/ ++ ..;;..;/ ++@@ -578,7 +590,7 @@ punct / ++ ..;..;/ ++ ..;..;/ ++ ..;..;;/ ++- ..;..;/ +++ ;..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++@@ -593,25 +605,25 @@ punct / ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;;..;/ ++- ..;..;/ ++- .. +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;;/ +++ ..;..;/ +++ ..;.. ++ ++ graph / ++ ..;..;..;..;/ ++@@ -620,7 +632,7 @@ graph / ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;;..;..;/ ++- ..;..;..;..;/ +++ ..;..;..;..;/ ++ ..;..;;..;/ ++ ..;..;..;;/ ++ ..;..;..;..;/ ++@@ -633,7 +645,7 @@ graph / ++ ..;;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++- ..;..;..;..;/ +++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ;..;..;..;/ ++@@ -644,13 +656,13 @@ graph / ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;;..;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;;..;;/ ++- ..;;..;..;/ ++- ..;..;..;..;/ ++- ;..;..;;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ..;;..;;..;/ +++ ;..;..;..;/ +++ ..;..;..;;/ +++ ..;..;;..;/ ++ ..;;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++@@ -667,7 +679,7 @@ graph / ++ ..;..;;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++- ..;..;..;..;/ +++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++@@ -677,69 +689,70 @@ graph / ++ ;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++- ..;..;..;..;/ +++ ..;..;..;..;/ ++ ..;..;;;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++- ..;..;..;..;/ +++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;..;;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;;..;..;/ ++- ..;..;..;..;/ ++- ..;..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;;/ ++- ..;..;/ ++- ..;..;;/ ++- ..;..;;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ..;;..;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ..;..;..;;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;;..;/ +++ ..;..;/ +++ ..;;..;/ +++ ..;;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ ++ ..;..;/ ++- ..;..;/ ++- ..;..;;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ ++ ..;..;/ ++ ..;;..;/ ++ ..;..;/ ++@@ -750,71 +763,75 @@ graph / ++ ..;..;/ ++ ..;..;;/ ++ ;..;..;/ ++- ..;..;;/ ++- ..;..;/ +++ ..;..;/ +++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++- ..;;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;;/ ++- ..;..;/ ++- ..;;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;;;/ ++- ..;..;;/ ++- ;;;;;/ +++ ..;..;;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;;..;/ +++ ..;..;;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;;/ +++ ;..;..;/ +++ ;;;;;;/ ++ ..;..;;/ ++ ;;;;;/ ++ ..;;..;/ ++@@ -825,25 +842,26 @@ graph / ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++- ..;..;/ ++- ..;..;/ +++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++- ..;..;/ ++- ..;..;/ +++ ..;..;/ +++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;;/ ++ ..;..;/ ++ ..;.. ++ ++@@ -854,7 +872,7 @@ print / ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;;..;..;/ ++- ..;..;..;..;/ +++ ..;..;..;..;/ ++ ..;..;;..;/ ++ ..;..;..;;/ ++ ..;..;..;..;/ ++@@ -867,7 +885,7 @@ print / ++ ..;;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++- ..;..;..;..;/ +++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ;..;..;..;/ ++@@ -878,13 +896,13 @@ print / ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;;..;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;;..;;/ ++- ..;;..;..;/ ++- ..;..;..;..;/ ++- ;..;..;;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ..;;..;;..;/ +++ ;..;..;..;/ +++ ..;..;..;;/ +++ ..;..;;..;/ ++ ..;;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++@@ -901,7 +919,7 @@ print / ++ ..;;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++- ..;..;..;..;/ +++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++@@ -910,36 +928,35 @@ print / ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++- ..;..;..;..;/ +++ ..;..;..;..;/ ++ ..;..;..;;;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++- ..;..;..;..;/ +++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;;..;/ ++- ..;..;..;..;/ ++- ..;..;..;/ ++- ..;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ..;..;;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ;..;..;..;/ +++ ..;..;..;..;/ +++ ..;..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++- ..;;..;/ +++ ..;;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++@@ -966,89 +983,94 @@ print / ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++- ..;..;/ ++- ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ ++ ..;..;/ ++ ..;;..;/ ++ ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;;;/ ++- ..;..;/ ++- ..;..;;/ ++- ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;;/ +++ ;..;..;/ +++ ..;..;/ +++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++- ..;;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;;/ ++- ..;..;/ ++- ..;;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;;;/ ++- ..;..;;/ ++- ;;;;;/ +++ ..;..;;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;;..;/ +++ ..;..;;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;;/ +++ ;..;..;/ +++ ;;;;;;/ ++ ..;..;;/ ++ ;;;;;/ ++ ..;;..;/ ++@@ -1059,25 +1081,26 @@ print / ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++- ..;..;/ ++- ..;..;/ +++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++- ..;..;/ ++- ..;..;/ +++ ..;..;/ +++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;;/ ++ ..;..;/ ++ ..;.. ++ ++@@ -1359,146 +1382,147 @@ toupper / ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,) +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,) ++ ++ tolower / ++ (,);(,);(,);(,);/ ++@@ -1785,14 +1809,15 @@ tolower / ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++@@ -2164,33 +2189,34 @@ map "totitle"; / ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++@@ -2322,13 +2348,13 @@ class "combining"; / ++ ..;;..;..;/ ++ ..;..;..;..;/ ++ ;..;..;..;/ ++- ..;..;;..;/ +++ ..;..;;..;/ ++ ..;..;;..;/ ++ ..;..;..;..;/ ++ ..;..;;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++- ..;;..;..;;/ +++ ..;;..;..;;/ ++ ..;;..;..;;/ ++ ..;..;;..;/ ++ ..;..;;;;/ ++@@ -2339,49 +2365,53 @@ class "combining"; / ++ ..;..;..;..;/ ++ ..;;..;..;;/ ++ ..;..;..;..;/ ++- ..;;..;..;/ +++ ..;;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ;;..;..;..;/ ++ ..;..;;..;/ ++ ..;..;..;..;/ ++ ..;..;;;;/ ++- ..;..;..;..;/ ++- ;..;..;..;/ ++- ..;;..;;..;/ ++- ..;;..;..;/ ++- ..;;..;..;/ ++- ..;..;;..;/ ++- ..;;;..;/ ++- ..;..;/ ++- ..;..;;/ ++- ..;..;/ +++ ..;;..;..;/ +++ ..;;..;..;/ +++ ..;..;;..;;/ +++ ..;..;;..;/ +++ ..;..;;..;/ +++ ..;..;..;;/ +++ ..;..;;;/ +++ ..;..;/ +++ ..;..;/ +++ ..;;..;/ +++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;;/ ++ ..;..;/ ++- ..;..;;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;;/ ++- ..;..;/ ++- ..;..;;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;;/ ++- ..;..;/ ++- ..;;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;;/ ++- ..;..;;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;;/ ++- ..;..;/ +++ ..;..;/ +++ ..;;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;;..;/ +++ ..;..;/ +++ ..;;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;;/ +++ ..;..;/ +++ ..;;..;/ +++ ..;..;;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;;..;/ +++ ..;;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;;..;/ +++ ..;;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++@@ -2407,14 +2437,14 @@ class "combining_level3"; / ++ ..;;..;;..;/ ++ ..;..;..;..;/ ++ ..;;..;..;/ ++- ..;..;..;;/ +++ ..;..;..;;/ ++ ..;..;..;;/ ++ ..;..;..;..;/ ++ ..;..;..;;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;;..;/ ++- ..;;..;;..;/ +++ ..;;..;;..;/ ++ ..;;..;..;;/ ++ ..;..;..;..;/ ++ ;..;..;..;/ ++@@ -2428,7 +2458,7 @@ class "combining_level3"; / ++ ..;;..;..;/ ++ ..;..;..;;/ ++ ..;..;;;;/ ++- ..;..;..;;/ +++ ..;;..;..;;/ ++ ..;..;..;..;/ ++ ;..;;..;..;/ ++ ..;..;..;..;/ ++@@ -2438,26 +2468,29 @@ class "combining_level3"; / ++ ..;..;/ ++ ..;..;;/ ++ ..;..;/ ++- ..;..;;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;;/ ++- ..;..;/ ++- ..;;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;;/ ++- ..;..;;/ ++- ..;..;/ ++- ..;..;/ ++- ..;;..;/ ++- ..;..;/ +++ ..;..;/ +++ ..;;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;;/ +++ ..;..;/ +++ ..;;..;/ +++ ..;..;;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;;..;/ +++ ..;;..;/ +++ ..;..;/ +++ ..;..;;/ +++ ..;..;;/ +++ ..;..;/ ++ ..;..;/ ++ ..;;;/ ++ ..;..;;/ ++diff --git a/localedata/locales/tr_TR b/localedata/locales/tr_TR ++index b175d0237d..d5785ceca1 100644 ++--- a/localedata/locales/tr_TR +++++ b/localedata/locales/tr_TR ++@@ -43,7 +43,7 @@ fax "" ++ language "Turkish" ++ territory "Turkey" ++ revision "1.0" ++-date "2019-05-08" +++date "2020-04-14" ++ ++ category "i18n:2012";LC_IDENTIFICATION ++ category "i18n:2012";LC_CTYPE ++@@ -127,7 +127,7 @@ END LC_COLLATE ++ ++ LC_CTYPE ++ % The following is the 14652 i18n fdcc-set LC_CTYPE category. ++-% It covers Unicode version 12.1.0. +++% It covers Unicode version 13.0.0. ++ % The character classes and mapping tables were automatically ++ % generated using the gen_unicode_ctype.py program. ++ ++@@ -210,7 +210,7 @@ upper / ++ ;;;;;;;;;/ ++ ;;;;;;;;;/ ++ ..;..;;;;;/ ++- ;;..;..;/ +++ ;;..;;;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++@@ -310,25 +310,25 @@ lower / ++ ;..;;;;;;;/ ++ ;;;;..;;;;/ ++ ;;;;;;;;;/ ++- ;;;;;;..;/ ++- ..;..;..;..;/ ++- ..;..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;;/ ++- .. +++ ;;;;;;;;;/ +++ ..;..;..;..;/ +++ ..;..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;;.. ++ ++ % The "alpha" class of the "i18n" FDCC-set is reflecting ++ % the recommendations in TR 10176 annex A ++@@ -345,7 +345,7 @@ alpha / ++ ..;;..;..;/ ++ ..;..;;..;/ ++ ..;..;..;..;/ ++- ..;..;..;..;/ +++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;;..;..;/ ++@@ -371,14 +371,14 @@ alpha / ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;;..;/ ++- ..;..;..;..;/ ++- ..;..;..;;/ ++- ..;..;;..;/ ++- ..;..;..;..;/ ++- ;..;..;;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ..;;..;..;/ +++ ..;..;..;..;/ +++ ..;..;;..;/ +++ ..;;..;..;/ +++ ..;..;..;;/ +++ ..;..;;..;/ ++ ..;;..;..;/ ++ ..;;;..;..;/ ++ ;..;..;..;/ ++@@ -397,39 +397,39 @@ alpha / ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++- ..;..;;..;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;..;;/ ++- ..;..;..;..;/ ++- ..;..;..;;;/ ++- ;..;..;..;;/ ++- ..;..;..;..;/ ++- ..;..;..;;;/ ++- ..;;;..;;/ ++- ..;;;;..;/ ++- ..;..;..;;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ;;..;;..;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;;..;..;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;..;;/ ++- ..;..;;..;/ +++ ..;..;;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ;..;..;..;/ +++ ..;..;..;..;/ +++ ;;;..;..;/ +++ ..;;..;..;/ +++ ..;..;..;..;/ +++ ..;;;..;;;/ +++ ..;;..;;;;/ +++ ..;..;..;..;/ +++ ;..;..;..;/ +++ ..;..;..;..;/ +++ ..;;;..;;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ..;..;;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ;..;..;;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;;;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++- ..;..;..;..;/ +++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;;..;/ ++@@ -465,14 +465,16 @@ alpha / ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++- ..;;..;/ +++ ..;..;/ +++ ..;..;;/ +++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++- ..;..;;/ +++ ..;..;;/ ++ ..;..;/ ++- ..;;..;/ +++ ..;;..;/ ++ ..;;;/ ++ ..;;..;/ ++ ..;..;/ ++@@ -484,14 +486,19 @@ alpha / ++ ..;..;;/ ++ ;..;..;/ ++ ..;..;/ ++- ..;;..;/ ++- ..;;..;/ ++- ..;..;/ ++- ..;..;;/ ++- ;..;..;/ ++- ;..;..;/ +++ ..;..;/ +++ ..;..;;/ +++ ..;..;/ +++ ..;..;/ +++ ..;;;/ +++ ..;..;;/ +++ ..;..;/ ++ ..;..;/ ++- ..;..;;/ +++ ..;..;/ +++ ..;;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ ++ ..;..;/ ++ ..;;..;/ ++ ..;..;/ ++@@ -506,7 +513,7 @@ alpha / ++ ..;..;/ ++ ..;..;/ ++ ..;;..;/ ++- ..;..;/ +++ ..;;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++@@ -516,7 +523,8 @@ alpha / ++ ..;..;/ ++ ..;..;/ ++ ..;..;;/ ++- ..;..;/ +++ ..;..;/ +++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++@@ -553,10 +561,11 @@ alpha / ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- .. +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ .. ++ ++ % The "digit" class must only contain the BASIC LATIN digits, says ISO C 99 ++ % (sections 7.25.2.1.5 and 5.2.1). ++@@ -591,8 +600,8 @@ punct / ++ ;..;..;;;/ ++ ..;..;;;;/ ++ ..;..;;;;;/ ++- ;..;..;;;;/ ++- ..;;..;;;/ +++ ;..;..;;;;/ +++ ;..;;..;;;/ ++ ..;;;;..;;/ ++ ;..;..;;;;/ ++ ..;..;..;;/ ++@@ -617,31 +626,32 @@ punct / ++ ;;;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++- ..;..;..;..;/ ++- ;;..;..;..;/ +++ ..;..;..;..;/ +++ ;;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;;;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++- ;..;..;..;;/ +++ ;..;..;..;;/ ++ ..;..;..;;/ ++ ..;;;;..;/ ++ ..;..;..;;;/ ++- ..;..;;;..;/ ++- ..;;..;..;/ ++- ..;..;..;..;/ ++- ..;;..;..;/ ++- ..;..;..;..;/ ++- ..;..;..;/ ++- ..;..;/ ++- ..;;..;/ ++- ..;..;;/ ++- ;;..;/ ++- ..;..;/ ++- ..;..;;/ ++- ;..;..;/ +++ ..;..;;;..;/ +++ ..;..;;..;/ +++ ..;..;..;..;/ +++ ..;..;;..;/ +++ ..;..;..;..;/ +++ ..;..;..;/ +++ ..;..;/ +++ ..;..;;/ +++ ..;..;/ +++ ..;;;;/ +++ ..;..;/ +++ ..;..;/ +++ ..;;;/ +++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;;/ ++@@ -649,22 +659,24 @@ punct / ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;;..;/ ++- ..;..;;/ ++- ..;;..;/ ++- ..;..;/ ++- ..;;..;/ ++- ..;;..;/ ++- ..;;;/ ++- ..;;..;/ ++- ..;;..;/ ++- ;..;..;/ ++- ..;;..;/ ++- ..;..;;/ ++- ;..;..;/ +++ ..;;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;;/ +++ ..;..;/ +++ ..;;..;/ +++ ;..;..;/ +++ ..;..;;/ +++ ..;..;;/ +++ ..;..;;/ +++ ;..;..;/ +++ ..;..;;/ +++ ..;;..;/ +++ ..;..;;/ +++ ..;..;/ +++ ..;..;/ +++ ..;;;/ +++ ..;..;/ ++ ..;..;;/ ++ ..;..;/ ++ ..;;..;/ ++@@ -673,7 +685,7 @@ punct / ++ ..;..;/ ++ ..;..;/ ++ ..;..;;/ ++- ..;..;/ +++ ;..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++@@ -688,25 +700,25 @@ punct / ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;;..;/ ++- ..;..;/ ++- .. +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;;/ +++ ..;..;/ +++ ..;.. ++ ++ graph / ++ ..;..;..;..;/ ++@@ -715,7 +727,7 @@ graph / ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;;..;..;/ ++- ..;..;..;..;/ +++ ..;..;..;..;/ ++ ..;..;;..;/ ++ ..;..;..;;/ ++ ..;..;..;..;/ ++@@ -728,7 +740,7 @@ graph / ++ ..;;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++- ..;..;..;..;/ +++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ;..;..;..;/ ++@@ -739,13 +751,13 @@ graph / ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;;..;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;;..;;/ ++- ..;;..;..;/ ++- ..;..;..;..;/ ++- ;..;..;;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ..;;..;;..;/ +++ ;..;..;..;/ +++ ..;..;..;;/ +++ ..;..;;..;/ ++ ..;;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++@@ -762,7 +774,7 @@ graph / ++ ..;..;;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++- ..;..;..;..;/ +++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++@@ -772,69 +784,70 @@ graph / ++ ;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++- ..;..;..;..;/ +++ ..;..;..;..;/ ++ ..;..;;;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++- ..;..;..;..;/ +++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;..;;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;;..;..;/ ++- ..;..;..;..;/ ++- ..;..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;;/ ++- ..;..;/ ++- ..;..;;/ ++- ..;..;;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ..;;..;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ..;..;..;;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;;..;/ +++ ..;..;/ +++ ..;;..;/ +++ ..;;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ ++ ..;..;/ ++- ..;..;/ ++- ..;..;;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ ++ ..;..;/ ++ ..;;..;/ ++ ..;..;/ ++@@ -845,71 +858,75 @@ graph / ++ ..;..;/ ++ ..;..;;/ ++ ;..;..;/ ++- ..;..;;/ ++- ..;..;/ +++ ..;..;/ +++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++- ..;;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;;/ ++- ..;..;/ ++- ..;;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;;;/ ++- ..;..;;/ ++- ;;;;;/ +++ ..;..;;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;;..;/ +++ ..;..;;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;;/ +++ ;..;..;/ +++ ;;;;;;/ ++ ..;..;;/ ++ ;;;;;/ ++ ..;;..;/ ++@@ -920,25 +937,26 @@ graph / ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++- ..;..;/ ++- ..;..;/ +++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++- ..;..;/ ++- ..;..;/ +++ ..;..;/ +++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;;/ ++ ..;..;/ ++ ..;.. ++ ++@@ -949,7 +967,7 @@ print / ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;;..;..;/ ++- ..;..;..;..;/ +++ ..;..;..;..;/ ++ ..;..;;..;/ ++ ..;..;..;;/ ++ ..;..;..;..;/ ++@@ -962,7 +980,7 @@ print / ++ ..;;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++- ..;..;..;..;/ +++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ;..;..;..;/ ++@@ -973,13 +991,13 @@ print / ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;;..;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;;..;;/ ++- ..;;..;..;/ ++- ..;..;..;..;/ ++- ;..;..;;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ..;;..;;..;/ +++ ;..;..;..;/ +++ ..;..;..;;/ +++ ..;..;;..;/ ++ ..;;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++@@ -996,7 +1014,7 @@ print / ++ ..;;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++- ..;..;..;..;/ +++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++@@ -1005,36 +1023,35 @@ print / ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++- ..;..;..;..;/ +++ ..;..;..;..;/ ++ ..;..;..;;;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++- ..;..;..;..;/ +++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;..;..;/ ++- ..;..;;..;/ ++- ..;..;..;..;/ ++- ..;..;..;/ ++- ..;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ..;..;;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ..;..;..;..;/ +++ ;..;..;..;/ +++ ..;..;..;..;/ +++ ..;..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++- ..;;..;/ +++ ..;;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++@@ -1061,89 +1078,94 @@ print / ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++- ..;..;/ ++- ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ ++ ..;..;/ ++ ..;;..;/ ++ ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;;;/ ++- ..;..;/ ++- ..;..;;/ ++- ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;;/ +++ ;..;..;/ +++ ..;..;/ +++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++- ..;;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;;/ ++- ..;..;/ ++- ..;;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;;;/ ++- ..;..;;/ ++- ;;;;;/ +++ ..;..;;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;;..;/ +++ ..;..;;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;;/ +++ ;..;..;/ +++ ;;;;;;/ ++ ..;..;;/ ++ ;;;;;/ ++ ..;;..;/ ++@@ -1154,25 +1176,26 @@ print / ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++- ..;..;/ ++- ..;..;/ +++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++- ..;..;/ ++- ..;..;/ +++ ..;..;/ +++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;;/ ++ ..;..;/ ++ ..;.. ++ ++@@ -1455,146 +1478,147 @@ toupper / ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,);/ ++- (,);(,) +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,);(,);/ +++ (,) ++ ++ tolower / ++ (,);(,);(,);(,);/ ++@@ -1881,14 +1905,15 @@ tolower / ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++@@ -2260,33 +2285,34 @@ map "totitle"; / ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ ++- (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);(,);/ +++ (,);(,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++@@ -2418,13 +2444,13 @@ class "combining"; / ++ ..;;..;..;/ ++ ..;..;..;..;/ ++ ;..;..;..;/ ++- ..;..;;..;/ +++ ..;..;;..;/ ++ ..;..;;..;/ ++ ..;..;..;..;/ ++ ..;..;;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++- ..;;..;..;;/ +++ ..;;..;..;;/ ++ ..;;..;..;;/ ++ ..;..;;..;/ ++ ..;..;;;;/ ++@@ -2435,49 +2461,53 @@ class "combining"; / ++ ..;..;..;..;/ ++ ..;;..;..;;/ ++ ..;..;..;..;/ ++- ..;;..;..;/ +++ ..;;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ;;..;..;..;/ ++ ..;..;;..;/ ++ ..;..;..;..;/ ++ ..;..;;;;/ ++- ..;..;..;..;/ ++- ;..;..;..;/ ++- ..;;..;;..;/ ++- ..;;..;..;/ ++- ..;;..;..;/ ++- ..;..;;..;/ ++- ..;;;..;/ ++- ..;..;/ ++- ..;..;;/ ++- ..;..;/ +++ ..;;..;..;/ +++ ..;;..;..;/ +++ ..;..;;..;;/ +++ ..;..;;..;/ +++ ..;..;;..;/ +++ ..;..;..;;/ +++ ..;..;;;/ +++ ..;..;/ +++ ..;..;/ +++ ..;;..;/ +++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;;/ ++ ..;..;/ ++- ..;..;;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;;/ ++- ..;..;/ ++- ..;..;;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;;/ ++- ..;..;/ ++- ..;;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;;/ ++- ..;..;;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;;/ ++- ..;..;/ +++ ..;..;/ +++ ..;;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;;..;/ +++ ..;..;/ +++ ..;;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;;/ +++ ..;..;/ +++ ..;;..;/ +++ ..;..;;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;;..;/ +++ ..;;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;;..;/ +++ ..;;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++@@ -2503,14 +2533,14 @@ class "combining_level3"; / ++ ..;;..;;..;/ ++ ..;..;..;..;/ ++ ..;;..;..;/ ++- ..;..;..;;/ +++ ..;..;..;;/ ++ ..;..;..;;/ ++ ..;..;..;..;/ ++ ..;..;..;;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;;..;/ ++- ..;;..;;..;/ +++ ..;;..;;..;/ ++ ..;;..;..;;/ ++ ..;..;..;..;/ ++ ;..;..;..;/ ++@@ -2524,7 +2554,7 @@ class "combining_level3"; / ++ ..;;..;..;/ ++ ..;..;..;;/ ++ ..;..;;;;/ ++- ..;..;..;;/ +++ ..;;..;..;;/ ++ ..;..;..;..;/ ++ ;..;;..;..;/ ++ ..;..;..;..;/ ++@@ -2534,26 +2564,29 @@ class "combining_level3"; / ++ ..;..;/ ++ ..;..;;/ ++ ..;..;/ ++- ..;..;;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;;/ ++- ..;..;/ ++- ..;;..;/ ++- ..;..;/ ++- ..;..;/ ++- ..;..;;/ ++- ..;..;;/ ++- ..;..;/ ++- ..;..;/ ++- ..;;..;/ ++- ..;..;/ +++ ..;..;/ +++ ..;;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;;/ +++ ..;..;/ +++ ..;;..;/ +++ ..;..;;/ +++ ..;..;/ +++ ..;..;/ +++ ..;..;/ +++ ..;;..;/ +++ ..;;..;/ +++ ..;..;/ +++ ..;..;;/ +++ ..;..;;/ +++ ..;..;/ ++ ..;..;/ ++ ..;;;/ ++ ..;..;;/ ++diff --git a/localedata/locales/translit_circle b/localedata/locales/translit_circle ++index 5f3919cfa8..0f1e81541c 100644 ++--- a/localedata/locales/translit_circle +++++ b/localedata/locales/translit_circle ++@@ -9,7 +9,7 @@ comment_char % ++ % otherwise be governed by that license. ++ ++ % Transliterations of encircled characters. ++-% Generated automatically from UnicodeData.txt by gen_translit_circle.py on 2019-05-08 for Unicode 12.1.0. +++% Generated automatically from UnicodeData.txt by gen_translit_circle.py on 2020-04-14 for Unicode 13.0.0. ++ ++ LC_CTYPE ++ ++diff --git a/localedata/locales/translit_cjk_compat b/localedata/locales/translit_cjk_compat ++index 5f422a4fb0..17b74134fc 100644 ++--- a/localedata/locales/translit_cjk_compat +++++ b/localedata/locales/translit_cjk_compat ++@@ -9,7 +9,7 @@ comment_char % ++ % otherwise be governed by that license. ++ ++ % Transliterations of CJK compatibility characters. ++-% Generated automatically from UnicodeData.txt by gen_translit_cjk_compat.py on 2019-05-08 for Unicode 12.1.0. +++% Generated automatically from UnicodeData.txt by gen_translit_cjk_compat.py on 2020-04-14 for Unicode 13.0.0. ++ ++ LC_CTYPE ++ ++diff --git a/localedata/locales/translit_combining b/localedata/locales/translit_combining ++index 3a89e50ae9..d5c8bbfe8f 100644 ++--- a/localedata/locales/translit_combining +++++ b/localedata/locales/translit_combining ++@@ -10,7 +10,7 @@ comment_char % ++ ++ % Transliterations that remove all combining characters (accents, ++ % pronounciation marks, etc.). ++-% Generated automatically from UnicodeData.txt by gen_translit_combining.py on 2019-05-08 for Unicode 12.1.0. +++% Generated automatically from UnicodeData.txt by gen_translit_combining.py on 2020-04-14 for Unicode 13.0.0. ++ ++ LC_CTYPE ++ ++@@ -564,6 +564,10 @@ translit_start ++ "" ++ % COMBINING PARENTHESES OVERLAY ++ "" +++% COMBINING LATIN SMALL LETTER W BELOW +++ "" +++% COMBINING LATIN SMALL LETTER TURNED W BELOW +++ "" ++ % COMBINING DOTTED GRAVE ACCENT ++ "" ++ % COMBINING DOTTED ACUTE ACCENT ++@@ -810,6 +814,10 @@ translit_start ++ "" ++ % HANIFI ROHINGYA SIGN TASSI ++ "" +++% YEZIDI COMBINING HAMZA MARK +++ "" +++% YEZIDI COMBINING MADDA MARK +++ "" ++ % SOGDIAN COMBINING DOT BELOW ++ "" ++ % SOGDIAN COMBINING TWO DOTS BELOW ++@@ -902,6 +910,36 @@ translit_start ++ "" ++ % DOGRA SIGN NUKTA ++ "" +++% DIVES AKURU VOWEL SIGN AA +++ "" +++% DIVES AKURU VOWEL SIGN I +++ "" +++% DIVES AKURU VOWEL SIGN II +++ "" +++% DIVES AKURU VOWEL SIGN U +++ "" +++% DIVES AKURU VOWEL SIGN UU +++ "" +++% DIVES AKURU VOWEL SIGN E +++ "" +++% DIVES AKURU VOWEL SIGN AI +++ "" +++% DIVES AKURU VOWEL SIGN O +++ "" +++% DIVES AKURU SIGN ANUSVARA +++ "" +++% DIVES AKURU SIGN CANDRABINDU +++ "" +++% DIVES AKURU SIGN HALANTA +++ "" +++% DIVES AKURU VIRAMA +++ "" +++% DIVES AKURU MEDIAL YA +++ "" +++% DIVES AKURU MEDIAL RA +++ "" +++% DIVES AKURU SIGN NUKTA +++ "" ++ % NANDINAGARI VOWEL SIGN AA ++ "" ++ % NANDINAGARI VOWEL SIGN I ++@@ -1200,6 +1238,12 @@ translit_start ++ "" ++ % MAKASAR VOWEL SIGN O ++ "" +++% KHITAN SMALL SCRIPT FILLER +++ "" +++% VIETNAMESE ALTERNATE READING MARK CA +++ "" +++% VIETNAMESE ALTERNATE READING MARK NHAY +++ "" ++ % COMBINING GREEK MUSICAL TRISEME ++ "" ++ % COMBINING GREEK MUSICAL TETRASEME ++diff --git a/localedata/locales/translit_compat b/localedata/locales/translit_compat ++index ba71c074eb..ff18b02ea3 100644 ++--- a/localedata/locales/translit_compat +++++ b/localedata/locales/translit_compat ++@@ -9,7 +9,7 @@ comment_char % ++ % otherwise be governed by that license. ++ ++ % Transliterations of compatibility characters and ligatures. ++-% Generated automatically from UnicodeData.txt by gen_translit_compat.py on 2019-05-08 for Unicode 12.1.0. +++% Generated automatically from UnicodeData.txt by gen_translit_compat.py on 2020-04-14 for Unicode 13.0.0. ++ ++ LC_CTYPE ++ ++@@ -1691,6 +1691,8 @@ translit_start ++ "" ++ % MODIFIER LETTER SMALL U WITH LEFT HOOK ++ "" +++% MODIFIER LETTER SMALL TURNED W +++ "" ++ % LATIN SMALL LIGATURE FF ++ "" ++ % LATIN SMALL LIGATURE FI ++diff --git a/localedata/locales/translit_font b/localedata/locales/translit_font ++index cec09348aa..e79b0d83f5 100644 ++--- a/localedata/locales/translit_font +++++ b/localedata/locales/translit_font ++@@ -9,7 +9,7 @@ comment_char % ++ % otherwise be governed by that license. ++ ++ % Transliterations of font equivalents. ++-% Generated automatically from UnicodeData.txt by gen_translit_font.py on 2019-05-08 for Unicode 12.1.0. +++% Generated automatically from UnicodeData.txt by gen_translit_font.py on 2020-04-14 for Unicode 13.0.0. ++ ++ LC_CTYPE ++ ++@@ -1199,6 +1199,16 @@ translit_start ++ % ARABIC MATHEMATICAL DOUBLE-STRUCK DAD ++ % ARABIC MATHEMATICAL DOUBLE-STRUCK ZAH ++ % ARABIC MATHEMATICAL DOUBLE-STRUCK GHAIN +++ % SEGMENTED DIGIT ZERO +++ % SEGMENTED DIGIT ONE +++ % SEGMENTED DIGIT TWO +++ % SEGMENTED DIGIT THREE +++ % SEGMENTED DIGIT FOUR +++ % SEGMENTED DIGIT FIVE +++ % SEGMENTED DIGIT SIX +++ % SEGMENTED DIGIT SEVEN +++ % SEGMENTED DIGIT EIGHT +++ % SEGMENTED DIGIT NINE ++ ++ translit_end ++ ++diff --git a/localedata/locales/translit_fraction b/localedata/locales/translit_fraction ++index 22612d4c94..197d57a644 100644 ++--- a/localedata/locales/translit_fraction +++++ b/localedata/locales/translit_fraction ++@@ -9,7 +9,7 @@ comment_char % ++ % otherwise be governed by that license. ++ ++ % Transliterations of fractions. ++-% Generated automatically from UnicodeData.txt by gen_translit_fraction.py on 2019-05-08 for Unicode 12.1.0. +++% Generated automatically from UnicodeData.txt by gen_translit_fraction.py on 2020-04-14 for Unicode 13.0.0. ++ % The replacements have been surrounded with spaces, because fractions are ++ % often preceded by a decimal number and followed by a unit or a math symbol. ++ ++diff --git a/localedata/unicode-gen/DerivedCoreProperties.txt b/localedata/unicode-gen/DerivedCoreProperties.txt ++index 4a92ffd1a5..bc97e2173d 100644 ++--- a/localedata/unicode-gen/DerivedCoreProperties.txt +++++ b/localedata/unicode-gen/DerivedCoreProperties.txt ++@@ -1,6 +1,6 @@ ++-# DerivedCoreProperties-12.1.0.txt ++-# Date: 2019-03-10, 10:53:06 GMT ++-# © 2019 Unicode®, Inc. +++# DerivedCoreProperties-13.0.0.txt +++# Date: 2020-01-22, 00:07:19 GMT +++# © 2020 Unicode®, Inc. ++ # Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries. ++ # For terms of use, see http://www.unicode.org/terms_of_use.html ++ # ++@@ -342,7 +342,7 @@ FFE9..FFEC ; Math # Sm [4] HALFWIDTH LEFTWARDS ARROW..HALFWIDTH DOWNWARDS A ++ 0840..0858 ; Alphabetic # Lo [25] MANDAIC LETTER HALQA..MANDAIC LETTER AIN ++ 0860..086A ; Alphabetic # Lo [11] SYRIAC LETTER MALAYALAM NGA..SYRIAC LETTER MALAYALAM SSA ++ 08A0..08B4 ; Alphabetic # Lo [21] ARABIC LETTER BEH WITH SMALL V BELOW..ARABIC LETTER KAF WITH DOT BELOW ++-08B6..08BD ; Alphabetic # Lo [8] ARABIC LETTER BEH WITH SMALL MEEM ABOVE..ARABIC LETTER AFRICAN NOON +++08B6..08C7 ; Alphabetic # Lo [18] ARABIC LETTER BEH WITH SMALL MEEM ABOVE..ARABIC LETTER LAM WITH SMALL ARABIC LETTER TAH ABOVE ++ 08D4..08DF ; Alphabetic # Mn [12] ARABIC SMALL HIGH WORD AR-RUB..ARABIC SMALL HIGH WORD WAQFA ++ 08E3..08E9 ; Alphabetic # Mn [7] ARABIC TURNED DAMMA BELOW..ARABIC CURLY KASRATAN ++ 08F0..0902 ; Alphabetic # Mn [19] ARABIC OPEN FATHATAN..DEVANAGARI SIGN ANUSVARA ++@@ -496,7 +496,7 @@ FFE9..FFEC ; Math # Sm [4] HALFWIDTH LEFTWARDS ARROW..HALFWIDTH DOWNWARDS A ++ 0CF1..0CF2 ; Alphabetic # Lo [2] KANNADA SIGN JIHVAMULIYA..KANNADA SIGN UPADHMANIYA ++ 0D00..0D01 ; Alphabetic # Mn [2] MALAYALAM SIGN COMBINING ANUSVARA ABOVE..MALAYALAM SIGN CANDRABINDU ++ 0D02..0D03 ; Alphabetic # Mc [2] MALAYALAM SIGN ANUSVARA..MALAYALAM SIGN VISARGA ++-0D05..0D0C ; Alphabetic # Lo [8] MALAYALAM LETTER A..MALAYALAM LETTER VOCALIC L +++0D04..0D0C ; Alphabetic # Lo [9] MALAYALAM LETTER VEDIC ANUSVARA..MALAYALAM LETTER VOCALIC L ++ 0D0E..0D10 ; Alphabetic # Lo [3] MALAYALAM LETTER E..MALAYALAM LETTER AI ++ 0D12..0D3A ; Alphabetic # Lo [41] MALAYALAM LETTER O..MALAYALAM LETTER TTTA ++ 0D3D ; Alphabetic # Lo MALAYALAM SIGN AVAGRAHA ++@@ -510,6 +510,7 @@ FFE9..FFEC ; Math # Sm [4] HALFWIDTH LEFTWARDS ARROW..HALFWIDTH DOWNWARDS A ++ 0D5F..0D61 ; Alphabetic # Lo [3] MALAYALAM LETTER ARCHAIC II..MALAYALAM LETTER VOCALIC LL ++ 0D62..0D63 ; Alphabetic # Mn [2] MALAYALAM VOWEL SIGN VOCALIC L..MALAYALAM VOWEL SIGN VOCALIC LL ++ 0D7A..0D7F ; Alphabetic # Lo [6] MALAYALAM LETTER CHILLU NN..MALAYALAM LETTER CHILLU K +++0D81 ; Alphabetic # Mn SINHALA SIGN CANDRABINDU ++ 0D82..0D83 ; Alphabetic # Mc [2] SINHALA SIGN ANUSVARAYA..SINHALA SIGN VISARGAYA ++ 0D85..0D96 ; Alphabetic # Lo [18] SINHALA LETTER AYANNA..SINHALA LETTER AUYANNA ++ 0D9A..0DB1 ; Alphabetic # Lo [24] SINHALA LETTER ALPAPRAANA KAYANNA..SINHALA LETTER DANTAJA NAYANNA ++@@ -668,6 +669,7 @@ FFE9..FFEC ; Math # Sm [4] HALFWIDTH LEFTWARDS ARROW..HALFWIDTH DOWNWARDS A ++ 1A6D..1A72 ; Alphabetic # Mc [6] TAI THAM VOWEL SIGN OY..TAI THAM VOWEL SIGN THAM AI ++ 1A73..1A74 ; Alphabetic # Mn [2] TAI THAM VOWEL SIGN OA ABOVE..TAI THAM SIGN MAI KANG ++ 1AA7 ; Alphabetic # Lm TAI THAM SIGN MAI YAMOK +++1ABF..1AC0 ; Alphabetic # Mn [2] COMBINING LATIN SMALL LETTER W BELOW..COMBINING LATIN SMALL LETTER TURNED W BELOW ++ 1B00..1B03 ; Alphabetic # Mn [4] BALINESE SIGN ULU RICEM..BALINESE SIGN SURANG ++ 1B04 ; Alphabetic # Mc BALINESE SIGN BISAH ++ 1B05..1B33 ; Alphabetic # Lo [47] BALINESE LETTER AKARA..BALINESE LETTER HA ++@@ -797,10 +799,10 @@ FFE9..FFEC ; Math # Sm [4] HALFWIDTH LEFTWARDS ARROW..HALFWIDTH DOWNWARDS A ++ 30FF ; Alphabetic # Lo KATAKANA DIGRAPH KOTO ++ 3105..312F ; Alphabetic # Lo [43] BOPOMOFO LETTER B..BOPOMOFO LETTER NN ++ 3131..318E ; Alphabetic # Lo [94] HANGUL LETTER KIYEOK..HANGUL LETTER ARAEAE ++-31A0..31BA ; Alphabetic # Lo [27] BOPOMOFO LETTER BU..BOPOMOFO LETTER ZY +++31A0..31BF ; Alphabetic # Lo [32] BOPOMOFO LETTER BU..BOPOMOFO LETTER AH ++ 31F0..31FF ; Alphabetic # Lo [16] KATAKANA LETTER SMALL KU..KATAKANA LETTER SMALL RO ++-3400..4DB5 ; Alphabetic # Lo [6582] CJK UNIFIED IDEOGRAPH-3400..CJK UNIFIED IDEOGRAPH-4DB5 ++-4E00..9FEF ; Alphabetic # Lo [20976] CJK UNIFIED IDEOGRAPH-4E00..CJK UNIFIED IDEOGRAPH-9FEF +++3400..4DBF ; Alphabetic # Lo [6592] CJK UNIFIED IDEOGRAPH-3400..CJK UNIFIED IDEOGRAPH-4DBF +++4E00..9FFC ; Alphabetic # Lo [20989] CJK UNIFIED IDEOGRAPH-4E00..CJK UNIFIED IDEOGRAPH-9FFC ++ A000..A014 ; Alphabetic # Lo [21] YI SYLLABLE IT..YI SYLLABLE E ++ A015 ; Alphabetic # Lm YI SYLLABLE WU ++ A016..A48C ; Alphabetic # Lo [1143] YI SYLLABLE BIT..YI SYLLABLE YYR ++@@ -827,7 +829,8 @@ A788 ; Alphabetic # Lm MODIFIER LETTER LOW CIRCUMFLEX ACCENT ++ A78B..A78E ; Alphabetic # L& [4] LATIN CAPITAL LETTER SALTILLO..LATIN SMALL LETTER L WITH RETROFLEX HOOK AND BELT ++ A78F ; Alphabetic # Lo LATIN LETTER SINOLOGICAL DOT ++ A790..A7BF ; Alphabetic # L& [48] LATIN CAPITAL LETTER N WITH DESCENDER..LATIN SMALL LETTER GLOTTAL U ++-A7C2..A7C6 ; Alphabetic # L& [5] LATIN CAPITAL LETTER ANGLICANA W..LATIN CAPITAL LETTER Z WITH PALATAL HOOK +++A7C2..A7CA ; Alphabetic # L& [9] LATIN CAPITAL LETTER ANGLICANA W..LATIN SMALL LETTER S WITH SHORT STROKE OVERLAY +++A7F5..A7F6 ; Alphabetic # L& [2] LATIN CAPITAL LETTER REVERSED HALF H..LATIN SMALL LETTER REVERSED HALF H ++ A7F7 ; Alphabetic # Lo LATIN EPIGRAPHIC LETTER SIDEWAYS I ++ A7F8..A7F9 ; Alphabetic # Lm [2] MODIFIER LETTER CAPITAL H WITH STROKE..MODIFIER LETTER SMALL LIGATURE OE ++ A7FA ; Alphabetic # L& LATIN LETTER SMALL CAPITAL TURNED M ++@@ -913,7 +916,8 @@ AB20..AB26 ; Alphabetic # Lo [7] ETHIOPIC SYLLABLE CCHHA..ETHIOPIC SYLLABLE ++ AB28..AB2E ; Alphabetic # Lo [7] ETHIOPIC SYLLABLE BBA..ETHIOPIC SYLLABLE BBO ++ AB30..AB5A ; Alphabetic # L& [43] LATIN SMALL LETTER BARRED ALPHA..LATIN SMALL LETTER Y WITH SHORT RIGHT LEG ++ AB5C..AB5F ; Alphabetic # Lm [4] MODIFIER LETTER SMALL HENG..MODIFIER LETTER SMALL U WITH LEFT HOOK ++-AB60..AB67 ; Alphabetic # L& [8] LATIN SMALL LETTER SAKHA YAT..LATIN SMALL LETTER TS DIGRAPH WITH RETROFLEX HOOK +++AB60..AB68 ; Alphabetic # L& [9] LATIN SMALL LETTER SAKHA YAT..LATIN SMALL LETTER TURNED R WITH MIDDLE TILDE +++AB69 ; Alphabetic # Lm MODIFIER LETTER SMALL TURNED W ++ AB70..ABBF ; Alphabetic # L& [80] CHEROKEE SMALL LETTER A..CHEROKEE SMALL LETTER YA ++ ABC0..ABE2 ; Alphabetic # Lo [35] MEETEI MAYEK LETTER KOK..MEETEI MAYEK LETTER I LONSUM ++ ABE3..ABE4 ; Alphabetic # Mc [2] MEETEI MAYEK VOWEL SIGN ONAP..MEETEI MAYEK VOWEL SIGN INAP ++@@ -1018,9 +1022,13 @@ FFDA..FFDC ; Alphabetic # Lo [3] HALFWIDTH HANGUL LETTER EU..HALFWIDTH HANG ++ 10CC0..10CF2 ; Alphabetic # L& [51] OLD HUNGARIAN SMALL LETTER A..OLD HUNGARIAN SMALL LETTER US ++ 10D00..10D23 ; Alphabetic # Lo [36] HANIFI ROHINGYA LETTER A..HANIFI ROHINGYA MARK NA KHONNA ++ 10D24..10D27 ; Alphabetic # Mn [4] HANIFI ROHINGYA SIGN HARBAHAY..HANIFI ROHINGYA SIGN TASSI +++10E80..10EA9 ; Alphabetic # Lo [42] YEZIDI LETTER ELIF..YEZIDI LETTER ET +++10EAB..10EAC ; Alphabetic # Mn [2] YEZIDI COMBINING HAMZA MARK..YEZIDI COMBINING MADDA MARK +++10EB0..10EB1 ; Alphabetic # Lo [2] YEZIDI LETTER LAM WITH DOT ABOVE..YEZIDI LETTER YOT WITH CIRCUMFLEX ABOVE ++ 10F00..10F1C ; Alphabetic # Lo [29] OLD SOGDIAN LETTER ALEPH..OLD SOGDIAN LETTER FINAL TAW WITH VERTICAL TAIL ++ 10F27 ; Alphabetic # Lo OLD SOGDIAN LIGATURE AYIN-DALETH ++ 10F30..10F45 ; Alphabetic # Lo [22] SOGDIAN LETTER ALEPH..SOGDIAN INDEPENDENT SHIN +++10FB0..10FC4 ; Alphabetic # Lo [21] CHORASMIAN LETTER ALEPH..CHORASMIAN LETTER TAW ++ 10FE0..10FF6 ; Alphabetic # Lo [23] ELYMAIC LETTER ALEPH..ELYMAIC LIGATURE ZAYIN-YODH ++ 11000 ; Alphabetic # Mc BRAHMI SIGN CANDRABINDU ++ 11001 ; Alphabetic # Mn BRAHMI SIGN ANUSVARA ++@@ -1040,6 +1048,7 @@ FFDA..FFDC ; Alphabetic # Lo [3] HALFWIDTH HANGUL LETTER EU..HALFWIDTH HANG ++ 1112D..11132 ; Alphabetic # Mn [6] CHAKMA VOWEL SIGN AI..CHAKMA AU MARK ++ 11144 ; Alphabetic # Lo CHAKMA LETTER LHAA ++ 11145..11146 ; Alphabetic # Mc [2] CHAKMA VOWEL SIGN AA..CHAKMA VOWEL SIGN EI +++11147 ; Alphabetic # Lo CHAKMA LETTER VAA ++ 11150..11172 ; Alphabetic # Lo [35] MAHAJANI LETTER A..MAHAJANI LETTER RRA ++ 11176 ; Alphabetic # Lo MAHAJANI LIGATURE SHRI ++ 11180..11181 ; Alphabetic # Mn [2] SHARADA SIGN CANDRABINDU..SHARADA SIGN ANUSVARA ++@@ -1049,6 +1058,8 @@ FFDA..FFDC ; Alphabetic # Lo [3] HALFWIDTH HANGUL LETTER EU..HALFWIDTH HANG ++ 111B6..111BE ; Alphabetic # Mn [9] SHARADA VOWEL SIGN U..SHARADA VOWEL SIGN O ++ 111BF ; Alphabetic # Mc SHARADA VOWEL SIGN AU ++ 111C1..111C4 ; Alphabetic # Lo [4] SHARADA SIGN AVAGRAHA..SHARADA OM +++111CE ; Alphabetic # Mc SHARADA VOWEL SIGN PRISHTHAMATRA E +++111CF ; Alphabetic # Mn SHARADA SIGN INVERTED CANDRABINDU ++ 111DA ; Alphabetic # Lo SHARADA EKAM ++ 111DC ; Alphabetic # Lo SHARADA HEADSTROKE ++ 11200..11211 ; Alphabetic # Lo [18] KHOJKI LETTER A..KHOJKI LETTER JJA ++@@ -1093,7 +1104,7 @@ FFDA..FFDC ; Alphabetic # Lo [3] HALFWIDTH HANGUL LETTER EU..HALFWIDTH HANG ++ 11443..11444 ; Alphabetic # Mn [2] NEWA SIGN CANDRABINDU..NEWA SIGN ANUSVARA ++ 11445 ; Alphabetic # Mc NEWA SIGN VISARGA ++ 11447..1144A ; Alphabetic # Lo [4] NEWA SIGN AVAGRAHA..NEWA SIDDHI ++-1145F ; Alphabetic # Lo NEWA LETTER VEDIC ANUSVARA +++1145F..11461 ; Alphabetic # Lo [3] NEWA LETTER VEDIC ANUSVARA..NEWA SIGN UPADHMANIYA ++ 11480..114AF ; Alphabetic # Lo [48] TIRHUTA ANJI..TIRHUTA LETTER HA ++ 114B0..114B2 ; Alphabetic # Mc [3] TIRHUTA VOWEL SIGN AA..TIRHUTA VOWEL SIGN II ++ 114B3..114B8 ; Alphabetic # Mn [6] TIRHUTA VOWEL SIGN U..TIRHUTA VOWEL SIGN VOCALIC LL ++@@ -1138,7 +1149,18 @@ FFDA..FFDC ; Alphabetic # Lo [3] HALFWIDTH HANGUL LETTER EU..HALFWIDTH HANG ++ 1182F..11837 ; Alphabetic # Mn [9] DOGRA VOWEL SIGN U..DOGRA SIGN ANUSVARA ++ 11838 ; Alphabetic # Mc DOGRA SIGN VISARGA ++ 118A0..118DF ; Alphabetic # L& [64] WARANG CITI CAPITAL LETTER NGAA..WARANG CITI SMALL LETTER VIYO ++-118FF ; Alphabetic # Lo WARANG CITI OM +++118FF..11906 ; Alphabetic # Lo [8] WARANG CITI OM..DIVES AKURU LETTER E +++11909 ; Alphabetic # Lo DIVES AKURU LETTER O +++1190C..11913 ; Alphabetic # Lo [8] DIVES AKURU LETTER KA..DIVES AKURU LETTER JA +++11915..11916 ; Alphabetic # Lo [2] DIVES AKURU LETTER NYA..DIVES AKURU LETTER TTA +++11918..1192F ; Alphabetic # Lo [24] DIVES AKURU LETTER DDA..DIVES AKURU LETTER ZA +++11930..11935 ; Alphabetic # Mc [6] DIVES AKURU VOWEL SIGN AA..DIVES AKURU VOWEL SIGN E +++11937..11938 ; Alphabetic # Mc [2] DIVES AKURU VOWEL SIGN AI..DIVES AKURU VOWEL SIGN O +++1193B..1193C ; Alphabetic # Mn [2] DIVES AKURU SIGN ANUSVARA..DIVES AKURU SIGN CANDRABINDU +++1193F ; Alphabetic # Lo DIVES AKURU PREFIXED NASAL SIGN +++11940 ; Alphabetic # Mc DIVES AKURU MEDIAL YA +++11941 ; Alphabetic # Lo DIVES AKURU INITIAL RA +++11942 ; Alphabetic # Mc DIVES AKURU MEDIAL RA ++ 119A0..119A7 ; Alphabetic # Lo [8] NANDINAGARI LETTER A..NANDINAGARI LETTER VOCALIC RR ++ 119AA..119D0 ; Alphabetic # Lo [39] NANDINAGARI LETTER E..NANDINAGARI LETTER RRA ++ 119D1..119D3 ; Alphabetic # Mc [3] NANDINAGARI VOWEL SIGN AA..NANDINAGARI VOWEL SIGN II ++@@ -1201,6 +1223,7 @@ FFDA..FFDC ; Alphabetic # Lo [3] HALFWIDTH HANGUL LETTER EU..HALFWIDTH HANG ++ 11EE0..11EF2 ; Alphabetic # Lo [19] MAKASAR LETTER KA..MAKASAR ANGKA ++ 11EF3..11EF4 ; Alphabetic # Mn [2] MAKASAR VOWEL SIGN I..MAKASAR VOWEL SIGN U ++ 11EF5..11EF6 ; Alphabetic # Mc [2] MAKASAR VOWEL SIGN E..MAKASAR VOWEL SIGN O +++11FB0 ; Alphabetic # Lo LISU LETTER YHA ++ 12000..12399 ; Alphabetic # Lo [922] CUNEIFORM SIGN A..CUNEIFORM SIGN U U ++ 12400..1246E ; Alphabetic # Nl [111] CUNEIFORM NUMERIC SIGN TWO ASH..CUNEIFORM NUMERIC SIGN NINE U VARIANT FORM ++ 12480..12543 ; Alphabetic # Lo [196] CUNEIFORM SIGN AB TIMES NUN TENU..CUNEIFORM SIGN ZU5 TIMES THREE DISH TENU ++@@ -1222,8 +1245,10 @@ FFDA..FFDC ; Alphabetic # Lo [3] HALFWIDTH HANGUL LETTER EU..HALFWIDTH HANG ++ 16F93..16F9F ; Alphabetic # Lm [13] MIAO LETTER TONE-2..MIAO LETTER REFORMED TONE-8 ++ 16FE0..16FE1 ; Alphabetic # Lm [2] TANGUT ITERATION MARK..NUSHU ITERATION MARK ++ 16FE3 ; Alphabetic # Lm OLD CHINESE ITERATION MARK +++16FF0..16FF1 ; Alphabetic # Mc [2] VIETNAMESE ALTERNATE READING MARK CA..VIETNAMESE ALTERNATE READING MARK NHAY ++ 17000..187F7 ; Alphabetic # Lo [6136] TANGUT IDEOGRAPH-17000..TANGUT IDEOGRAPH-187F7 ++-18800..18AF2 ; Alphabetic # Lo [755] TANGUT COMPONENT-001..TANGUT COMPONENT-755 +++18800..18CD5 ; Alphabetic # Lo [1238] TANGUT COMPONENT-001..KHITAN SMALL SCRIPT CHARACTER-18CD5 +++18D00..18D08 ; Alphabetic # Lo [9] TANGUT IDEOGRAPH-18D00..TANGUT IDEOGRAPH-18D08 ++ 1B000..1B11E ; Alphabetic # Lo [287] KATAKANA LETTER ARCHAIC E..HENTAIGANA LETTER N-MU-MO-2 ++ 1B150..1B152 ; Alphabetic # Lo [3] HIRAGANA LETTER SMALL WI..HIRAGANA LETTER SMALL WO ++ 1B164..1B167 ; Alphabetic # Lo [4] KATAKANA LETTER SMALL WI..KATAKANA LETTER SMALL N ++@@ -1312,14 +1337,15 @@ FFDA..FFDC ; Alphabetic # Lo [3] HALFWIDTH HANGUL LETTER EU..HALFWIDTH HANG ++ 1F130..1F149 ; Alphabetic # So [26] SQUARED LATIN CAPITAL LETTER A..SQUARED LATIN CAPITAL LETTER Z ++ 1F150..1F169 ; Alphabetic # So [26] NEGATIVE CIRCLED LATIN CAPITAL LETTER A..NEGATIVE CIRCLED LATIN CAPITAL LETTER Z ++ 1F170..1F189 ; Alphabetic # So [26] NEGATIVE SQUARED LATIN CAPITAL LETTER A..NEGATIVE SQUARED LATIN CAPITAL LETTER Z ++-20000..2A6D6 ; Alphabetic # Lo [42711] CJK UNIFIED IDEOGRAPH-20000..CJK UNIFIED IDEOGRAPH-2A6D6 +++20000..2A6DD ; Alphabetic # Lo [42718] CJK UNIFIED IDEOGRAPH-20000..CJK UNIFIED IDEOGRAPH-2A6DD ++ 2A700..2B734 ; Alphabetic # Lo [4149] CJK UNIFIED IDEOGRAPH-2A700..CJK UNIFIED IDEOGRAPH-2B734 ++ 2B740..2B81D ; Alphabetic # Lo [222] CJK UNIFIED IDEOGRAPH-2B740..CJK UNIFIED IDEOGRAPH-2B81D ++ 2B820..2CEA1 ; Alphabetic # Lo [5762] CJK UNIFIED IDEOGRAPH-2B820..CJK UNIFIED IDEOGRAPH-2CEA1 ++ 2CEB0..2EBE0 ; Alphabetic # Lo [7473] CJK UNIFIED IDEOGRAPH-2CEB0..CJK UNIFIED IDEOGRAPH-2EBE0 ++ 2F800..2FA1D ; Alphabetic # Lo [542] CJK COMPATIBILITY IDEOGRAPH-2F800..CJK COMPATIBILITY IDEOGRAPH-2FA1D +++30000..3134A ; Alphabetic # Lo [4939] CJK UNIFIED IDEOGRAPH-30000..CJK UNIFIED IDEOGRAPH-3134A ++ ++-# Total code points: 127256 +++# Total code points: 132875 ++ ++ # ================================================ ++ ++@@ -1945,11 +1971,14 @@ A7BB ; Lowercase # L& LATIN SMALL LETTER GLOTTAL A ++ A7BD ; Lowercase # L& LATIN SMALL LETTER GLOTTAL I ++ A7BF ; Lowercase # L& LATIN SMALL LETTER GLOTTAL U ++ A7C3 ; Lowercase # L& LATIN SMALL LETTER ANGLICANA W +++A7C8 ; Lowercase # L& LATIN SMALL LETTER D WITH SHORT STROKE OVERLAY +++A7CA ; Lowercase # L& LATIN SMALL LETTER S WITH SHORT STROKE OVERLAY +++A7F6 ; Lowercase # L& LATIN SMALL LETTER REVERSED HALF H ++ A7F8..A7F9 ; Lowercase # Lm [2] MODIFIER LETTER CAPITAL H WITH STROKE..MODIFIER LETTER SMALL LIGATURE OE ++ A7FA ; Lowercase # L& LATIN LETTER SMALL CAPITAL TURNED M ++ AB30..AB5A ; Lowercase # L& [43] LATIN SMALL LETTER BARRED ALPHA..LATIN SMALL LETTER Y WITH SHORT RIGHT LEG ++ AB5C..AB5F ; Lowercase # Lm [4] MODIFIER LETTER SMALL HENG..MODIFIER LETTER SMALL U WITH LEFT HOOK ++-AB60..AB67 ; Lowercase # L& [8] LATIN SMALL LETTER SAKHA YAT..LATIN SMALL LETTER TS DIGRAPH WITH RETROFLEX HOOK +++AB60..AB68 ; Lowercase # L& [9] LATIN SMALL LETTER SAKHA YAT..LATIN SMALL LETTER TURNED R WITH MIDDLE TILDE ++ AB70..ABBF ; Lowercase # L& [80] CHEROKEE SMALL LETTER A..CHEROKEE SMALL LETTER YA ++ FB00..FB06 ; Lowercase # L& [7] LATIN SMALL LIGATURE FF..LATIN SMALL LIGATURE ST ++ FB13..FB17 ; Lowercase # L& [5] ARMENIAN SMALL LIGATURE MEN NOW..ARMENIAN SMALL LIGATURE MEN XEH ++@@ -1989,7 +2018,7 @@ FF41..FF5A ; Lowercase # L& [26] FULLWIDTH LATIN SMALL LETTER A..FULLWIDTH L ++ 1D7CB ; Lowercase # L& MATHEMATICAL BOLD SMALL DIGAMMA ++ 1E922..1E943 ; Lowercase # L& [34] ADLAM SMALL LETTER ALIF..ADLAM SMALL LETTER SHA ++ ++-# Total code points: 2340 +++# Total code points: 2344 ++ ++ # ================================================ ++ ++@@ -2595,7 +2624,9 @@ A7BA ; Uppercase # L& LATIN CAPITAL LETTER GLOTTAL A ++ A7BC ; Uppercase # L& LATIN CAPITAL LETTER GLOTTAL I ++ A7BE ; Uppercase # L& LATIN CAPITAL LETTER GLOTTAL U ++ A7C2 ; Uppercase # L& LATIN CAPITAL LETTER ANGLICANA W ++-A7C4..A7C6 ; Uppercase # L& [3] LATIN CAPITAL LETTER C WITH PALATAL HOOK..LATIN CAPITAL LETTER Z WITH PALATAL HOOK +++A7C4..A7C7 ; Uppercase # L& [4] LATIN CAPITAL LETTER C WITH PALATAL HOOK..LATIN CAPITAL LETTER D WITH SHORT STROKE OVERLAY +++A7C9 ; Uppercase # L& LATIN CAPITAL LETTER S WITH SHORT STROKE OVERLAY +++A7F5 ; Uppercase # L& LATIN CAPITAL LETTER REVERSED HALF H ++ FF21..FF3A ; Uppercase # L& [26] FULLWIDTH LATIN CAPITAL LETTER A..FULLWIDTH LATIN CAPITAL LETTER Z ++ 10400..10427 ; Uppercase # L& [40] DESERET CAPITAL LETTER LONG I..DESERET CAPITAL LETTER EW ++ 104B0..104D3 ; Uppercase # L& [36] OSAGE CAPITAL LETTER A..OSAGE CAPITAL LETTER ZHA ++@@ -2638,7 +2669,7 @@ FF21..FF3A ; Uppercase # L& [26] FULLWIDTH LATIN CAPITAL LETTER A..FULLWIDTH ++ 1F150..1F169 ; Uppercase # So [26] NEGATIVE CIRCLED LATIN CAPITAL LETTER A..NEGATIVE CIRCLED LATIN CAPITAL LETTER Z ++ 1F170..1F189 ; Uppercase # So [26] NEGATIVE SQUARED LATIN CAPITAL LETTER A..NEGATIVE SQUARED LATIN CAPITAL LETTER Z ++ ++-# Total code points: 1908 +++# Total code points: 1911 ++ ++ # ================================================ ++ ++@@ -2748,12 +2779,13 @@ A770 ; Cased # Lm MODIFIER LETTER US ++ A771..A787 ; Cased # L& [23] LATIN SMALL LETTER DUM..LATIN SMALL LETTER INSULAR T ++ A78B..A78E ; Cased # L& [4] LATIN CAPITAL LETTER SALTILLO..LATIN SMALL LETTER L WITH RETROFLEX HOOK AND BELT ++ A790..A7BF ; Cased # L& [48] LATIN CAPITAL LETTER N WITH DESCENDER..LATIN SMALL LETTER GLOTTAL U ++-A7C2..A7C6 ; Cased # L& [5] LATIN CAPITAL LETTER ANGLICANA W..LATIN CAPITAL LETTER Z WITH PALATAL HOOK +++A7C2..A7CA ; Cased # L& [9] LATIN CAPITAL LETTER ANGLICANA W..LATIN SMALL LETTER S WITH SHORT STROKE OVERLAY +++A7F5..A7F6 ; Cased # L& [2] LATIN CAPITAL LETTER REVERSED HALF H..LATIN SMALL LETTER REVERSED HALF H ++ A7F8..A7F9 ; Cased # Lm [2] MODIFIER LETTER CAPITAL H WITH STROKE..MODIFIER LETTER SMALL LIGATURE OE ++ A7FA ; Cased # L& LATIN LETTER SMALL CAPITAL TURNED M ++ AB30..AB5A ; Cased # L& [43] LATIN SMALL LETTER BARRED ALPHA..LATIN SMALL LETTER Y WITH SHORT RIGHT LEG ++ AB5C..AB5F ; Cased # Lm [4] MODIFIER LETTER SMALL HENG..MODIFIER LETTER SMALL U WITH LEFT HOOK ++-AB60..AB67 ; Cased # L& [8] LATIN SMALL LETTER SAKHA YAT..LATIN SMALL LETTER TS DIGRAPH WITH RETROFLEX HOOK +++AB60..AB68 ; Cased # L& [9] LATIN SMALL LETTER SAKHA YAT..LATIN SMALL LETTER TURNED R WITH MIDDLE TILDE ++ AB70..ABBF ; Cased # L& [80] CHEROKEE SMALL LETTER A..CHEROKEE SMALL LETTER YA ++ FB00..FB06 ; Cased # L& [7] LATIN SMALL LIGATURE FF..LATIN SMALL LIGATURE ST ++ FB13..FB17 ; Cased # L& [5] ARMENIAN SMALL LIGATURE MEN NOW..ARMENIAN SMALL LIGATURE MEN XEH ++@@ -2801,7 +2833,7 @@ FF41..FF5A ; Cased # L& [26] FULLWIDTH LATIN SMALL LETTER A..FULLWIDTH LATIN ++ 1F150..1F169 ; Cased # So [26] NEGATIVE CIRCLED LATIN CAPITAL LETTER A..NEGATIVE CIRCLED LATIN CAPITAL LETTER Z ++ 1F170..1F189 ; Cased # So [26] NEGATIVE SQUARED LATIN CAPITAL LETTER A..NEGATIVE SQUARED LATIN CAPITAL LETTER Z ++ ++-# Total code points: 4279 +++# Total code points: 4286 ++ ++ # ================================================ ++ ++@@ -2841,6 +2873,7 @@ FF41..FF5A ; Cased # L& [26] FULLWIDTH LATIN SMALL LETTER A..FULLWIDTH LATIN ++ 0483..0487 ; Case_Ignorable # Mn [5] COMBINING CYRILLIC TITLO..COMBINING CYRILLIC POKRYTIE ++ 0488..0489 ; Case_Ignorable # Me [2] COMBINING CYRILLIC HUNDRED THOUSANDS SIGN..COMBINING CYRILLIC MILLIONS SIGN ++ 0559 ; Case_Ignorable # Lm ARMENIAN MODIFIER LETTER LEFT HALF RING +++055F ; Case_Ignorable # Po ARMENIAN ABBREVIATION MARK ++ 0591..05BD ; Case_Ignorable # Mn [45] HEBREW ACCENT ETNAHTA..HEBREW POINT METEG ++ 05BF ; Case_Ignorable # Mn HEBREW POINT RAFE ++ 05C1..05C2 ; Case_Ignorable # Mn [2] HEBREW POINT SHIN DOT..HEBREW POINT SIN DOT ++@@ -2911,7 +2944,7 @@ FF41..FF5A ; Cased # L& [26] FULLWIDTH LATIN SMALL LETTER A..FULLWIDTH LATIN ++ 0B3F ; Case_Ignorable # Mn ORIYA VOWEL SIGN I ++ 0B41..0B44 ; Case_Ignorable # Mn [4] ORIYA VOWEL SIGN U..ORIYA VOWEL SIGN VOCALIC RR ++ 0B4D ; Case_Ignorable # Mn ORIYA SIGN VIRAMA ++-0B56 ; Case_Ignorable # Mn ORIYA AI LENGTH MARK +++0B55..0B56 ; Case_Ignorable # Mn [2] ORIYA SIGN OVERLINE..ORIYA AI LENGTH MARK ++ 0B62..0B63 ; Case_Ignorable # Mn [2] ORIYA VOWEL SIGN VOCALIC L..ORIYA VOWEL SIGN VOCALIC LL ++ 0B82 ; Case_Ignorable # Mn TAMIL SIGN ANUSVARA ++ 0BC0 ; Case_Ignorable # Mn TAMIL VOWEL SIGN II ++@@ -2934,6 +2967,7 @@ FF41..FF5A ; Cased # L& [26] FULLWIDTH LATIN SMALL LETTER A..FULLWIDTH LATIN ++ 0D41..0D44 ; Case_Ignorable # Mn [4] MALAYALAM VOWEL SIGN U..MALAYALAM VOWEL SIGN VOCALIC RR ++ 0D4D ; Case_Ignorable # Mn MALAYALAM SIGN VIRAMA ++ 0D62..0D63 ; Case_Ignorable # Mn [2] MALAYALAM VOWEL SIGN VOCALIC L..MALAYALAM VOWEL SIGN VOCALIC LL +++0D81 ; Case_Ignorable # Mn SINHALA SIGN CANDRABINDU ++ 0DCA ; Case_Ignorable # Mn SINHALA SIGN AL-LAKUNA ++ 0DD2..0DD4 ; Case_Ignorable # Mn [3] SINHALA VOWEL SIGN KETTI IS-PILLA..SINHALA VOWEL SIGN KETTI PAA-PILLA ++ 0DD6 ; Case_Ignorable # Mn SINHALA VOWEL SIGN DIGA PAA-PILLA ++@@ -2999,6 +3033,7 @@ FF41..FF5A ; Cased # L& [26] FULLWIDTH LATIN SMALL LETTER A..FULLWIDTH LATIN ++ 1AA7 ; Case_Ignorable # Lm TAI THAM SIGN MAI YAMOK ++ 1AB0..1ABD ; Case_Ignorable # Mn [14] COMBINING DOUBLED CIRCUMFLEX ACCENT..COMBINING PARENTHESES BELOW ++ 1ABE ; Case_Ignorable # Me COMBINING PARENTHESES OVERLAY +++1ABF..1AC0 ; Case_Ignorable # Mn [2] COMBINING LATIN SMALL LETTER W BELOW..COMBINING LATIN SMALL LETTER TURNED W BELOW ++ 1B00..1B03 ; Case_Ignorable # Mn [4] BALINESE SIGN ULU RICEM..BALINESE SIGN SURANG ++ 1B34 ; Case_Ignorable # Mn BALINESE SIGN REREKAN ++ 1B36..1B3A ; Case_Ignorable # Mn [5] BALINESE VOWEL SIGN ULU..BALINESE VOWEL SIGN RA REPA ++@@ -3084,6 +3119,7 @@ A802 ; Case_Ignorable # Mn SYLOTI NAGRI SIGN DVISVARA ++ A806 ; Case_Ignorable # Mn SYLOTI NAGRI SIGN HASANTA ++ A80B ; Case_Ignorable # Mn SYLOTI NAGRI SIGN ANUSVARA ++ A825..A826 ; Case_Ignorable # Mn [2] SYLOTI NAGRI VOWEL SIGN U..SYLOTI NAGRI VOWEL SIGN E +++A82C ; Case_Ignorable # Mn SYLOTI NAGRI SIGN ALTERNATE HASANTA ++ A8C4..A8C5 ; Case_Ignorable # Mn [2] SAURASHTRA SIGN VIRAMA..SAURASHTRA SIGN CANDRABINDU ++ A8E0..A8F1 ; Case_Ignorable # Mn [18] COMBINING DEVANAGARI DIGIT ZERO..COMBINING DEVANAGARI SIGN AVAGRAHA ++ A8FF ; Case_Ignorable # Mn DEVANAGARI VOWEL SIGN AY ++@@ -3114,6 +3150,8 @@ AAF3..AAF4 ; Case_Ignorable # Lm [2] MEETEI MAYEK SYLLABLE REPETITION MARK. ++ AAF6 ; Case_Ignorable # Mn MEETEI MAYEK VIRAMA ++ AB5B ; Case_Ignorable # Sk MODIFIER BREVE WITH INVERTED BREVE ++ AB5C..AB5F ; Case_Ignorable # Lm [4] MODIFIER LETTER SMALL HENG..MODIFIER LETTER SMALL U WITH LEFT HOOK +++AB69 ; Case_Ignorable # Lm MODIFIER LETTER SMALL TURNED W +++AB6A..AB6B ; Case_Ignorable # Sk [2] MODIFIER LETTER LEFT TACK..MODIFIER LETTER RIGHT TACK ++ ABE5 ; Case_Ignorable # Mn MEETEI MAYEK VOWEL SIGN ANAP ++ ABE8 ; Case_Ignorable # Mn MEETEI MAYEK VOWEL SIGN UNAP ++ ABED ; Case_Ignorable # Mn MEETEI MAYEK APUN IYEK ++@@ -3144,6 +3182,7 @@ FFF9..FFFB ; Case_Ignorable # Cf [3] INTERLINEAR ANNOTATION ANCHOR..INTERLI ++ 10A3F ; Case_Ignorable # Mn KHAROSHTHI VIRAMA ++ 10AE5..10AE6 ; Case_Ignorable # Mn [2] MANICHAEAN ABBREVIATION MARK ABOVE..MANICHAEAN ABBREVIATION MARK BELOW ++ 10D24..10D27 ; Case_Ignorable # Mn [4] HANIFI ROHINGYA SIGN HARBAHAY..HANIFI ROHINGYA SIGN TASSI +++10EAB..10EAC ; Case_Ignorable # Mn [2] YEZIDI COMBINING HAMZA MARK..YEZIDI COMBINING MADDA MARK ++ 10F46..10F50 ; Case_Ignorable # Mn [11] SOGDIAN COMBINING DOT BELOW..SOGDIAN COMBINING STROKE BELOW ++ 11001 ; Case_Ignorable # Mn BRAHMI SIGN ANUSVARA ++ 11038..11046 ; Case_Ignorable # Mn [15] BRAHMI VOWEL SIGN AA..BRAHMI VIRAMA ++@@ -3159,6 +3198,7 @@ FFF9..FFFB ; Case_Ignorable # Cf [3] INTERLINEAR ANNOTATION ANCHOR..INTERLI ++ 11180..11181 ; Case_Ignorable # Mn [2] SHARADA SIGN CANDRABINDU..SHARADA SIGN ANUSVARA ++ 111B6..111BE ; Case_Ignorable # Mn [9] SHARADA VOWEL SIGN U..SHARADA VOWEL SIGN O ++ 111C9..111CC ; Case_Ignorable # Mn [4] SHARADA SANDHI MARK..SHARADA EXTRA SHORT VOWEL MARK +++111CF ; Case_Ignorable # Mn SHARADA SIGN INVERTED CANDRABINDU ++ 1122F..11231 ; Case_Ignorable # Mn [3] KHOJKI VOWEL SIGN U..KHOJKI VOWEL SIGN AI ++ 11234 ; Case_Ignorable # Mn KHOJKI SIGN ANUSVARA ++ 11236..11237 ; Case_Ignorable # Mn [2] KHOJKI SIGN NUKTA..KHOJKI SIGN SHADDA ++@@ -3194,6 +3234,9 @@ FFF9..FFFB ; Case_Ignorable # Cf [3] INTERLINEAR ANNOTATION ANCHOR..INTERLI ++ 11727..1172B ; Case_Ignorable # Mn [5] AHOM VOWEL SIGN AW..AHOM SIGN KILLER ++ 1182F..11837 ; Case_Ignorable # Mn [9] DOGRA VOWEL SIGN U..DOGRA SIGN ANUSVARA ++ 11839..1183A ; Case_Ignorable # Mn [2] DOGRA SIGN VIRAMA..DOGRA SIGN NUKTA +++1193B..1193C ; Case_Ignorable # Mn [2] DIVES AKURU SIGN ANUSVARA..DIVES AKURU SIGN CANDRABINDU +++1193E ; Case_Ignorable # Mn DIVES AKURU VIRAMA +++11943 ; Case_Ignorable # Mn DIVES AKURU SIGN NUKTA ++ 119D4..119D7 ; Case_Ignorable # Mn [4] NANDINAGARI VOWEL SIGN U..NANDINAGARI VOWEL SIGN VOCALIC RR ++ 119DA..119DB ; Case_Ignorable # Mn [2] NANDINAGARI VOWEL SIGN E..NANDINAGARI VOWEL SIGN AI ++ 119E0 ; Case_Ignorable # Mn NANDINAGARI SIGN VIRAMA ++@@ -3230,6 +3273,7 @@ FFF9..FFFB ; Case_Ignorable # Cf [3] INTERLINEAR ANNOTATION ANCHOR..INTERLI ++ 16F93..16F9F ; Case_Ignorable # Lm [13] MIAO LETTER TONE-2..MIAO LETTER REFORMED TONE-8 ++ 16FE0..16FE1 ; Case_Ignorable # Lm [2] TANGUT ITERATION MARK..NUSHU ITERATION MARK ++ 16FE3 ; Case_Ignorable # Lm OLD CHINESE ITERATION MARK +++16FE4 ; Case_Ignorable # Mn KHITAN SMALL SCRIPT FILLER ++ 1BC9D..1BC9E ; Case_Ignorable # Mn [2] DUPLOYAN THICK LETTER SELECTOR..DUPLOYAN DOUBLE MARK ++ 1BCA0..1BCA3 ; Case_Ignorable # Cf [4] SHORTHAND FORMAT LETTER OVERLAP..SHORTHAND FORMAT UP STEP ++ 1D167..1D169 ; Case_Ignorable # Mn [3] MUSICAL SYMBOL COMBINING TREMOLO-1..MUSICAL SYMBOL COMBINING TREMOLO-3 ++@@ -3260,7 +3304,7 @@ E0001 ; Case_Ignorable # Cf LANGUAGE TAG ++ E0020..E007F ; Case_Ignorable # Cf [96] TAG SPACE..CANCEL TAG ++ E0100..E01EF ; Case_Ignorable # Mn [240] VARIATION SELECTOR-17..VARIATION SELECTOR-256 ++ ++-# Total code points: 2396 +++# Total code points: 2413 ++ ++ # ================================================ ++ ++@@ -3860,7 +3904,9 @@ A7BA ; Changes_When_Lowercased # L& LATIN CAPITAL LETTER GLOTTAL ++ A7BC ; Changes_When_Lowercased # L& LATIN CAPITAL LETTER GLOTTAL I ++ A7BE ; Changes_When_Lowercased # L& LATIN CAPITAL LETTER GLOTTAL U ++ A7C2 ; Changes_When_Lowercased # L& LATIN CAPITAL LETTER ANGLICANA W ++-A7C4..A7C6 ; Changes_When_Lowercased # L& [3] LATIN CAPITAL LETTER C WITH PALATAL HOOK..LATIN CAPITAL LETTER Z WITH PALATAL HOOK +++A7C4..A7C7 ; Changes_When_Lowercased # L& [4] LATIN CAPITAL LETTER C WITH PALATAL HOOK..LATIN CAPITAL LETTER D WITH SHORT STROKE OVERLAY +++A7C9 ; Changes_When_Lowercased # L& LATIN CAPITAL LETTER S WITH SHORT STROKE OVERLAY +++A7F5 ; Changes_When_Lowercased # L& LATIN CAPITAL LETTER REVERSED HALF H ++ FF21..FF3A ; Changes_When_Lowercased # L& [26] FULLWIDTH LATIN CAPITAL LETTER A..FULLWIDTH LATIN CAPITAL LETTER Z ++ 10400..10427 ; Changes_When_Lowercased # L& [40] DESERET CAPITAL LETTER LONG I..DESERET CAPITAL LETTER EW ++ 104B0..104D3 ; Changes_When_Lowercased # L& [36] OSAGE CAPITAL LETTER A..OSAGE CAPITAL LETTER ZHA ++@@ -3869,7 +3915,7 @@ FF21..FF3A ; Changes_When_Lowercased # L& [26] FULLWIDTH LATIN CAPITAL LETTE ++ 16E40..16E5F ; Changes_When_Lowercased # L& [32] MEDEFAIDRIN CAPITAL LETTER M..MEDEFAIDRIN CAPITAL LETTER Y ++ 1E900..1E921 ; Changes_When_Lowercased # L& [34] ADLAM CAPITAL LETTER ALIF..ADLAM CAPITAL LETTER SHA ++ ++-# Total code points: 1390 +++# Total code points: 1393 ++ ++ # ================================================ ++ ++@@ -4483,6 +4529,9 @@ A7BB ; Changes_When_Uppercased # L& LATIN SMALL LETTER GLOTTAL A ++ A7BD ; Changes_When_Uppercased # L& LATIN SMALL LETTER GLOTTAL I ++ A7BF ; Changes_When_Uppercased # L& LATIN SMALL LETTER GLOTTAL U ++ A7C3 ; Changes_When_Uppercased # L& LATIN SMALL LETTER ANGLICANA W +++A7C8 ; Changes_When_Uppercased # L& LATIN SMALL LETTER D WITH SHORT STROKE OVERLAY +++A7CA ; Changes_When_Uppercased # L& LATIN SMALL LETTER S WITH SHORT STROKE OVERLAY +++A7F6 ; Changes_When_Uppercased # L& LATIN SMALL LETTER REVERSED HALF H ++ AB53 ; Changes_When_Uppercased # L& LATIN SMALL LETTER CHI ++ AB70..ABBF ; Changes_When_Uppercased # L& [80] CHEROKEE SMALL LETTER A..CHEROKEE SMALL LETTER YA ++ FB00..FB06 ; Changes_When_Uppercased # L& [7] LATIN SMALL LIGATURE FF..LATIN SMALL LIGATURE ST ++@@ -4495,7 +4544,7 @@ FF41..FF5A ; Changes_When_Uppercased # L& [26] FULLWIDTH LATIN SMALL LETTER ++ 16E60..16E7F ; Changes_When_Uppercased # L& [32] MEDEFAIDRIN SMALL LETTER M..MEDEFAIDRIN SMALL LETTER Y ++ 1E922..1E943 ; Changes_When_Uppercased # L& [34] ADLAM SMALL LETTER ALIF..ADLAM SMALL LETTER SHA ++ ++-# Total code points: 1482 +++# Total code points: 1485 ++ ++ # ================================================ ++ ++@@ -5108,6 +5157,9 @@ A7BB ; Changes_When_Titlecased # L& LATIN SMALL LETTER GLOTTAL A ++ A7BD ; Changes_When_Titlecased # L& LATIN SMALL LETTER GLOTTAL I ++ A7BF ; Changes_When_Titlecased # L& LATIN SMALL LETTER GLOTTAL U ++ A7C3 ; Changes_When_Titlecased # L& LATIN SMALL LETTER ANGLICANA W +++A7C8 ; Changes_When_Titlecased # L& LATIN SMALL LETTER D WITH SHORT STROKE OVERLAY +++A7CA ; Changes_When_Titlecased # L& LATIN SMALL LETTER S WITH SHORT STROKE OVERLAY +++A7F6 ; Changes_When_Titlecased # L& LATIN SMALL LETTER REVERSED HALF H ++ AB53 ; Changes_When_Titlecased # L& LATIN SMALL LETTER CHI ++ AB70..ABBF ; Changes_When_Titlecased # L& [80] CHEROKEE SMALL LETTER A..CHEROKEE SMALL LETTER YA ++ FB00..FB06 ; Changes_When_Titlecased # L& [7] LATIN SMALL LIGATURE FF..LATIN SMALL LIGATURE ST ++@@ -5120,7 +5172,7 @@ FF41..FF5A ; Changes_When_Titlecased # L& [26] FULLWIDTH LATIN SMALL LETTER ++ 16E60..16E7F ; Changes_When_Titlecased # L& [32] MEDEFAIDRIN SMALL LETTER M..MEDEFAIDRIN SMALL LETTER Y ++ 1E922..1E943 ; Changes_When_Titlecased # L& [34] ADLAM SMALL LETTER ALIF..ADLAM SMALL LETTER SHA ++ ++-# Total code points: 1409 +++# Total code points: 1412 ++ ++ # ================================================ ++ ++@@ -5730,7 +5782,9 @@ A7BA ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER GLOTTAL ++ A7BC ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER GLOTTAL I ++ A7BE ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER GLOTTAL U ++ A7C2 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER ANGLICANA W ++-A7C4..A7C6 ; Changes_When_Casefolded # L& [3] LATIN CAPITAL LETTER C WITH PALATAL HOOK..LATIN CAPITAL LETTER Z WITH PALATAL HOOK +++A7C4..A7C7 ; Changes_When_Casefolded # L& [4] LATIN CAPITAL LETTER C WITH PALATAL HOOK..LATIN CAPITAL LETTER D WITH SHORT STROKE OVERLAY +++A7C9 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER S WITH SHORT STROKE OVERLAY +++A7F5 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER REVERSED HALF H ++ AB70..ABBF ; Changes_When_Casefolded # L& [80] CHEROKEE SMALL LETTER A..CHEROKEE SMALL LETTER YA ++ FB00..FB06 ; Changes_When_Casefolded # L& [7] LATIN SMALL LIGATURE FF..LATIN SMALL LIGATURE ST ++ FB13..FB17 ; Changes_When_Casefolded # L& [5] ARMENIAN SMALL LIGATURE MEN NOW..ARMENIAN SMALL LIGATURE MEN XEH ++@@ -5742,7 +5796,7 @@ FF21..FF3A ; Changes_When_Casefolded # L& [26] FULLWIDTH LATIN CAPITAL LETTE ++ 16E40..16E5F ; Changes_When_Casefolded # L& [32] MEDEFAIDRIN CAPITAL LETTER M..MEDEFAIDRIN CAPITAL LETTER Y ++ 1E900..1E921 ; Changes_When_Casefolded # L& [34] ADLAM CAPITAL LETTER ALIF..ADLAM CAPITAL LETTER SHA ++ ++-# Total code points: 1463 +++# Total code points: 1466 ++ ++ # ================================================ ++ ++@@ -5859,7 +5913,8 @@ A78B..A78D ; Changes_When_Casemapped # L& [3] LATIN CAPITAL LETTER SALTILLO ++ A790..A794 ; Changes_When_Casemapped # L& [5] LATIN CAPITAL LETTER N WITH DESCENDER..LATIN SMALL LETTER C WITH PALATAL HOOK ++ A796..A7AE ; Changes_When_Casemapped # L& [25] LATIN CAPITAL LETTER B WITH FLOURISH..LATIN CAPITAL LETTER SMALL CAPITAL I ++ A7B0..A7BF ; Changes_When_Casemapped # L& [16] LATIN CAPITAL LETTER TURNED K..LATIN SMALL LETTER GLOTTAL U ++-A7C2..A7C6 ; Changes_When_Casemapped # L& [5] LATIN CAPITAL LETTER ANGLICANA W..LATIN CAPITAL LETTER Z WITH PALATAL HOOK +++A7C2..A7CA ; Changes_When_Casemapped # L& [9] LATIN CAPITAL LETTER ANGLICANA W..LATIN SMALL LETTER S WITH SHORT STROKE OVERLAY +++A7F5..A7F6 ; Changes_When_Casemapped # L& [2] LATIN CAPITAL LETTER REVERSED HALF H..LATIN SMALL LETTER REVERSED HALF H ++ AB53 ; Changes_When_Casemapped # L& LATIN SMALL LETTER CHI ++ AB70..ABBF ; Changes_When_Casemapped # L& [80] CHEROKEE SMALL LETTER A..CHEROKEE SMALL LETTER YA ++ FB00..FB06 ; Changes_When_Casemapped # L& [7] LATIN SMALL LIGATURE FF..LATIN SMALL LIGATURE ST ++@@ -5875,7 +5930,7 @@ FF41..FF5A ; Changes_When_Casemapped # L& [26] FULLWIDTH LATIN SMALL LETTER ++ 16E40..16E7F ; Changes_When_Casemapped # L& [64] MEDEFAIDRIN CAPITAL LETTER M..MEDEFAIDRIN SMALL LETTER Y ++ 1E900..1E943 ; Changes_When_Casemapped # L& [68] ADLAM CAPITAL LETTER ALIF..ADLAM SMALL LETTER SHA ++ ++-# Total code points: 2841 +++# Total code points: 2847 ++ ++ # ================================================ ++ ++@@ -5949,7 +6004,7 @@ FF41..FF5A ; Changes_When_Casemapped # L& [26] FULLWIDTH LATIN SMALL LETTER ++ 0840..0858 ; ID_Start # Lo [25] MANDAIC LETTER HALQA..MANDAIC LETTER AIN ++ 0860..086A ; ID_Start # Lo [11] SYRIAC LETTER MALAYALAM NGA..SYRIAC LETTER MALAYALAM SSA ++ 08A0..08B4 ; ID_Start # Lo [21] ARABIC LETTER BEH WITH SMALL V BELOW..ARABIC LETTER KAF WITH DOT BELOW ++-08B6..08BD ; ID_Start # Lo [8] ARABIC LETTER BEH WITH SMALL MEEM ABOVE..ARABIC LETTER AFRICAN NOON +++08B6..08C7 ; ID_Start # Lo [18] ARABIC LETTER BEH WITH SMALL MEEM ABOVE..ARABIC LETTER LAM WITH SMALL ARABIC LETTER TAH ABOVE ++ 0904..0939 ; ID_Start # Lo [54] DEVANAGARI LETTER SHORT A..DEVANAGARI LETTER HA ++ 093D ; ID_Start # Lo DEVANAGARI SIGN AVAGRAHA ++ 0950 ; ID_Start # Lo DEVANAGARI OM ++@@ -6026,7 +6081,7 @@ FF41..FF5A ; Changes_When_Casemapped # L& [26] FULLWIDTH LATIN SMALL LETTER ++ 0CDE ; ID_Start # Lo KANNADA LETTER FA ++ 0CE0..0CE1 ; ID_Start # Lo [2] KANNADA LETTER VOCALIC RR..KANNADA LETTER VOCALIC LL ++ 0CF1..0CF2 ; ID_Start # Lo [2] KANNADA SIGN JIHVAMULIYA..KANNADA SIGN UPADHMANIYA ++-0D05..0D0C ; ID_Start # Lo [8] MALAYALAM LETTER A..MALAYALAM LETTER VOCALIC L +++0D04..0D0C ; ID_Start # Lo [9] MALAYALAM LETTER VEDIC ANUSVARA..MALAYALAM LETTER VOCALIC L ++ 0D0E..0D10 ; ID_Start # Lo [3] MALAYALAM LETTER E..MALAYALAM LETTER AI ++ 0D12..0D3A ; ID_Start # Lo [41] MALAYALAM LETTER O..MALAYALAM LETTER TTTA ++ 0D3D ; ID_Start # Lo MALAYALAM SIGN AVAGRAHA ++@@ -6225,10 +6280,10 @@ FF41..FF5A ; Changes_When_Casemapped # L& [26] FULLWIDTH LATIN SMALL LETTER ++ 30FF ; ID_Start # Lo KATAKANA DIGRAPH KOTO ++ 3105..312F ; ID_Start # Lo [43] BOPOMOFO LETTER B..BOPOMOFO LETTER NN ++ 3131..318E ; ID_Start # Lo [94] HANGUL LETTER KIYEOK..HANGUL LETTER ARAEAE ++-31A0..31BA ; ID_Start # Lo [27] BOPOMOFO LETTER BU..BOPOMOFO LETTER ZY +++31A0..31BF ; ID_Start # Lo [32] BOPOMOFO LETTER BU..BOPOMOFO LETTER AH ++ 31F0..31FF ; ID_Start # Lo [16] KATAKANA LETTER SMALL KU..KATAKANA LETTER SMALL RO ++-3400..4DB5 ; ID_Start # Lo [6582] CJK UNIFIED IDEOGRAPH-3400..CJK UNIFIED IDEOGRAPH-4DB5 ++-4E00..9FEF ; ID_Start # Lo [20976] CJK UNIFIED IDEOGRAPH-4E00..CJK UNIFIED IDEOGRAPH-9FEF +++3400..4DBF ; ID_Start # Lo [6592] CJK UNIFIED IDEOGRAPH-3400..CJK UNIFIED IDEOGRAPH-4DBF +++4E00..9FFC ; ID_Start # Lo [20989] CJK UNIFIED IDEOGRAPH-4E00..CJK UNIFIED IDEOGRAPH-9FFC ++ A000..A014 ; ID_Start # Lo [21] YI SYLLABLE IT..YI SYLLABLE E ++ A015 ; ID_Start # Lm YI SYLLABLE WU ++ A016..A48C ; ID_Start # Lo [1143] YI SYLLABLE BIT..YI SYLLABLE YYR ++@@ -6253,7 +6308,8 @@ A788 ; ID_Start # Lm MODIFIER LETTER LOW CIRCUMFLEX ACCENT ++ A78B..A78E ; ID_Start # L& [4] LATIN CAPITAL LETTER SALTILLO..LATIN SMALL LETTER L WITH RETROFLEX HOOK AND BELT ++ A78F ; ID_Start # Lo LATIN LETTER SINOLOGICAL DOT ++ A790..A7BF ; ID_Start # L& [48] LATIN CAPITAL LETTER N WITH DESCENDER..LATIN SMALL LETTER GLOTTAL U ++-A7C2..A7C6 ; ID_Start # L& [5] LATIN CAPITAL LETTER ANGLICANA W..LATIN CAPITAL LETTER Z WITH PALATAL HOOK +++A7C2..A7CA ; ID_Start # L& [9] LATIN CAPITAL LETTER ANGLICANA W..LATIN SMALL LETTER S WITH SHORT STROKE OVERLAY +++A7F5..A7F6 ; ID_Start # L& [2] LATIN CAPITAL LETTER REVERSED HALF H..LATIN SMALL LETTER REVERSED HALF H ++ A7F7 ; ID_Start # Lo LATIN EPIGRAPHIC LETTER SIDEWAYS I ++ A7F8..A7F9 ; ID_Start # Lm [2] MODIFIER LETTER CAPITAL H WITH STROKE..MODIFIER LETTER SMALL LIGATURE OE ++ A7FA ; ID_Start # L& LATIN LETTER SMALL CAPITAL TURNED M ++@@ -6300,7 +6356,8 @@ AB20..AB26 ; ID_Start # Lo [7] ETHIOPIC SYLLABLE CCHHA..ETHIOPIC SYLLABLE C ++ AB28..AB2E ; ID_Start # Lo [7] ETHIOPIC SYLLABLE BBA..ETHIOPIC SYLLABLE BBO ++ AB30..AB5A ; ID_Start # L& [43] LATIN SMALL LETTER BARRED ALPHA..LATIN SMALL LETTER Y WITH SHORT RIGHT LEG ++ AB5C..AB5F ; ID_Start # Lm [4] MODIFIER LETTER SMALL HENG..MODIFIER LETTER SMALL U WITH LEFT HOOK ++-AB60..AB67 ; ID_Start # L& [8] LATIN SMALL LETTER SAKHA YAT..LATIN SMALL LETTER TS DIGRAPH WITH RETROFLEX HOOK +++AB60..AB68 ; ID_Start # L& [9] LATIN SMALL LETTER SAKHA YAT..LATIN SMALL LETTER TURNED R WITH MIDDLE TILDE +++AB69 ; ID_Start # Lm MODIFIER LETTER SMALL TURNED W ++ AB70..ABBF ; ID_Start # L& [80] CHEROKEE SMALL LETTER A..CHEROKEE SMALL LETTER YA ++ ABC0..ABE2 ; ID_Start # Lo [35] MEETEI MAYEK LETTER KOK..MEETEI MAYEK LETTER I LONSUM ++ AC00..D7A3 ; ID_Start # Lo [11172] HANGUL SYLLABLE GA..HANGUL SYLLABLE HIH ++@@ -6394,15 +6451,19 @@ FFDA..FFDC ; ID_Start # Lo [3] HALFWIDTH HANGUL LETTER EU..HALFWIDTH HANGUL ++ 10C80..10CB2 ; ID_Start # L& [51] OLD HUNGARIAN CAPITAL LETTER A..OLD HUNGARIAN CAPITAL LETTER US ++ 10CC0..10CF2 ; ID_Start # L& [51] OLD HUNGARIAN SMALL LETTER A..OLD HUNGARIAN SMALL LETTER US ++ 10D00..10D23 ; ID_Start # Lo [36] HANIFI ROHINGYA LETTER A..HANIFI ROHINGYA MARK NA KHONNA +++10E80..10EA9 ; ID_Start # Lo [42] YEZIDI LETTER ELIF..YEZIDI LETTER ET +++10EB0..10EB1 ; ID_Start # Lo [2] YEZIDI LETTER LAM WITH DOT ABOVE..YEZIDI LETTER YOT WITH CIRCUMFLEX ABOVE ++ 10F00..10F1C ; ID_Start # Lo [29] OLD SOGDIAN LETTER ALEPH..OLD SOGDIAN LETTER FINAL TAW WITH VERTICAL TAIL ++ 10F27 ; ID_Start # Lo OLD SOGDIAN LIGATURE AYIN-DALETH ++ 10F30..10F45 ; ID_Start # Lo [22] SOGDIAN LETTER ALEPH..SOGDIAN INDEPENDENT SHIN +++10FB0..10FC4 ; ID_Start # Lo [21] CHORASMIAN LETTER ALEPH..CHORASMIAN LETTER TAW ++ 10FE0..10FF6 ; ID_Start # Lo [23] ELYMAIC LETTER ALEPH..ELYMAIC LIGATURE ZAYIN-YODH ++ 11003..11037 ; ID_Start # Lo [53] BRAHMI SIGN JIHVAMULIYA..BRAHMI LETTER OLD TAMIL NNNA ++ 11083..110AF ; ID_Start # Lo [45] KAITHI LETTER A..KAITHI LETTER HA ++ 110D0..110E8 ; ID_Start # Lo [25] SORA SOMPENG LETTER SAH..SORA SOMPENG LETTER MAE ++ 11103..11126 ; ID_Start # Lo [36] CHAKMA LETTER AA..CHAKMA LETTER HAA ++ 11144 ; ID_Start # Lo CHAKMA LETTER LHAA +++11147 ; ID_Start # Lo CHAKMA LETTER VAA ++ 11150..11172 ; ID_Start # Lo [35] MAHAJANI LETTER A..MAHAJANI LETTER RRA ++ 11176 ; ID_Start # Lo MAHAJANI LIGATURE SHRI ++ 11183..111B2 ; ID_Start # Lo [48] SHARADA LETTER A..SHARADA LETTER HA ++@@ -6428,7 +6489,7 @@ FFDA..FFDC ; ID_Start # Lo [3] HALFWIDTH HANGUL LETTER EU..HALFWIDTH HANGUL ++ 1135D..11361 ; ID_Start # Lo [5] GRANTHA SIGN PLUTA..GRANTHA LETTER VOCALIC LL ++ 11400..11434 ; ID_Start # Lo [53] NEWA LETTER A..NEWA LETTER HA ++ 11447..1144A ; ID_Start # Lo [4] NEWA SIGN AVAGRAHA..NEWA SIDDHI ++-1145F ; ID_Start # Lo NEWA LETTER VEDIC ANUSVARA +++1145F..11461 ; ID_Start # Lo [3] NEWA LETTER VEDIC ANUSVARA..NEWA SIGN UPADHMANIYA ++ 11480..114AF ; ID_Start # Lo [48] TIRHUTA ANJI..TIRHUTA LETTER HA ++ 114C4..114C5 ; ID_Start # Lo [2] TIRHUTA SIGN AVAGRAHA..TIRHUTA GVANG ++ 114C7 ; ID_Start # Lo TIRHUTA OM ++@@ -6441,7 +6502,13 @@ FFDA..FFDC ; ID_Start # Lo [3] HALFWIDTH HANGUL LETTER EU..HALFWIDTH HANGUL ++ 11700..1171A ; ID_Start # Lo [27] AHOM LETTER KA..AHOM LETTER ALTERNATE BA ++ 11800..1182B ; ID_Start # Lo [44] DOGRA LETTER A..DOGRA LETTER RRA ++ 118A0..118DF ; ID_Start # L& [64] WARANG CITI CAPITAL LETTER NGAA..WARANG CITI SMALL LETTER VIYO ++-118FF ; ID_Start # Lo WARANG CITI OM +++118FF..11906 ; ID_Start # Lo [8] WARANG CITI OM..DIVES AKURU LETTER E +++11909 ; ID_Start # Lo DIVES AKURU LETTER O +++1190C..11913 ; ID_Start # Lo [8] DIVES AKURU LETTER KA..DIVES AKURU LETTER JA +++11915..11916 ; ID_Start # Lo [2] DIVES AKURU LETTER NYA..DIVES AKURU LETTER TTA +++11918..1192F ; ID_Start # Lo [24] DIVES AKURU LETTER DDA..DIVES AKURU LETTER ZA +++1193F ; ID_Start # Lo DIVES AKURU PREFIXED NASAL SIGN +++11941 ; ID_Start # Lo DIVES AKURU INITIAL RA ++ 119A0..119A7 ; ID_Start # Lo [8] NANDINAGARI LETTER A..NANDINAGARI LETTER VOCALIC RR ++ 119AA..119D0 ; ID_Start # Lo [39] NANDINAGARI LETTER E..NANDINAGARI LETTER RRA ++ 119E1 ; ID_Start # Lo NANDINAGARI SIGN AVAGRAHA ++@@ -6466,6 +6533,7 @@ FFDA..FFDC ; ID_Start # Lo [3] HALFWIDTH HANGUL LETTER EU..HALFWIDTH HANGUL ++ 11D6A..11D89 ; ID_Start # Lo [32] GUNJALA GONDI LETTER OO..GUNJALA GONDI LETTER SA ++ 11D98 ; ID_Start # Lo GUNJALA GONDI OM ++ 11EE0..11EF2 ; ID_Start # Lo [19] MAKASAR LETTER KA..MAKASAR ANGKA +++11FB0 ; ID_Start # Lo LISU LETTER YHA ++ 12000..12399 ; ID_Start # Lo [922] CUNEIFORM SIGN A..CUNEIFORM SIGN U U ++ 12400..1246E ; ID_Start # Nl [111] CUNEIFORM NUMERIC SIGN TWO ASH..CUNEIFORM NUMERIC SIGN NINE U VARIANT FORM ++ 12480..12543 ; ID_Start # Lo [196] CUNEIFORM SIGN AB TIMES NUN TENU..CUNEIFORM SIGN ZU5 TIMES THREE DISH TENU ++@@ -6485,7 +6553,8 @@ FFDA..FFDC ; ID_Start # Lo [3] HALFWIDTH HANGUL LETTER EU..HALFWIDTH HANGUL ++ 16FE0..16FE1 ; ID_Start # Lm [2] TANGUT ITERATION MARK..NUSHU ITERATION MARK ++ 16FE3 ; ID_Start # Lm OLD CHINESE ITERATION MARK ++ 17000..187F7 ; ID_Start # Lo [6136] TANGUT IDEOGRAPH-17000..TANGUT IDEOGRAPH-187F7 ++-18800..18AF2 ; ID_Start # Lo [755] TANGUT COMPONENT-001..TANGUT COMPONENT-755 +++18800..18CD5 ; ID_Start # Lo [1238] TANGUT COMPONENT-001..KHITAN SMALL SCRIPT CHARACTER-18CD5 +++18D00..18D08 ; ID_Start # Lo [9] TANGUT IDEOGRAPH-18D00..TANGUT IDEOGRAPH-18D08 ++ 1B000..1B11E ; ID_Start # Lo [287] KATAKANA LETTER ARCHAIC E..HENTAIGANA LETTER N-MU-MO-2 ++ 1B150..1B152 ; ID_Start # Lo [3] HIRAGANA LETTER SMALL WI..HIRAGANA LETTER SMALL WO ++ 1B164..1B167 ; ID_Start # Lo [4] KATAKANA LETTER SMALL WI..KATAKANA LETTER SMALL N ++@@ -6564,14 +6633,15 @@ FFDA..FFDC ; ID_Start # Lo [3] HALFWIDTH HANGUL LETTER EU..HALFWIDTH HANGUL ++ 1EEA1..1EEA3 ; ID_Start # Lo [3] ARABIC MATHEMATICAL DOUBLE-STRUCK BEH..ARABIC MATHEMATICAL DOUBLE-STRUCK DAL ++ 1EEA5..1EEA9 ; ID_Start # Lo [5] ARABIC MATHEMATICAL DOUBLE-STRUCK WAW..ARABIC MATHEMATICAL DOUBLE-STRUCK YEH ++ 1EEAB..1EEBB ; ID_Start # Lo [17] ARABIC MATHEMATICAL DOUBLE-STRUCK LAM..ARABIC MATHEMATICAL DOUBLE-STRUCK GHAIN ++-20000..2A6D6 ; ID_Start # Lo [42711] CJK UNIFIED IDEOGRAPH-20000..CJK UNIFIED IDEOGRAPH-2A6D6 +++20000..2A6DD ; ID_Start # Lo [42718] CJK UNIFIED IDEOGRAPH-20000..CJK UNIFIED IDEOGRAPH-2A6DD ++ 2A700..2B734 ; ID_Start # Lo [4149] CJK UNIFIED IDEOGRAPH-2A700..CJK UNIFIED IDEOGRAPH-2B734 ++ 2B740..2B81D ; ID_Start # Lo [222] CJK UNIFIED IDEOGRAPH-2B740..CJK UNIFIED IDEOGRAPH-2B81D ++ 2B820..2CEA1 ; ID_Start # Lo [5762] CJK UNIFIED IDEOGRAPH-2B820..CJK UNIFIED IDEOGRAPH-2CEA1 ++ 2CEB0..2EBE0 ; ID_Start # Lo [7473] CJK UNIFIED IDEOGRAPH-2CEB0..CJK UNIFIED IDEOGRAPH-2EBE0 ++ 2F800..2FA1D ; ID_Start # Lo [542] CJK COMPATIBILITY IDEOGRAPH-2F800..CJK COMPATIBILITY IDEOGRAPH-2FA1D +++30000..3134A ; ID_Start # Lo [4939] CJK UNIFIED IDEOGRAPH-30000..CJK UNIFIED IDEOGRAPH-3134A ++ ++-# Total code points: 125884 +++# Total code points: 131482 ++ ++ # ================================================ ++ ++@@ -6677,7 +6747,7 @@ FFDA..FFDC ; ID_Start # Lo [3] HALFWIDTH HANGUL LETTER EU..HALFWIDTH HANGUL ++ 0859..085B ; ID_Continue # Mn [3] MANDAIC AFFRICATION MARK..MANDAIC GEMINATION MARK ++ 0860..086A ; ID_Continue # Lo [11] SYRIAC LETTER MALAYALAM NGA..SYRIAC LETTER MALAYALAM SSA ++ 08A0..08B4 ; ID_Continue # Lo [21] ARABIC LETTER BEH WITH SMALL V BELOW..ARABIC LETTER KAF WITH DOT BELOW ++-08B6..08BD ; ID_Continue # Lo [8] ARABIC LETTER BEH WITH SMALL MEEM ABOVE..ARABIC LETTER AFRICAN NOON +++08B6..08C7 ; ID_Continue # Lo [18] ARABIC LETTER BEH WITH SMALL MEEM ABOVE..ARABIC LETTER LAM WITH SMALL ARABIC LETTER TAH ABOVE ++ 08D3..08E1 ; ID_Continue # Mn [15] ARABIC SMALL LOW WAW..ARABIC SMALL HIGH SIGN SAFHA ++ 08E3..0902 ; ID_Continue # Mn [32] ARABIC TURNED DAMMA BELOW..DEVANAGARI SIGN ANUSVARA ++ 0903 ; ID_Continue # Mc DEVANAGARI SIGN VISARGA ++@@ -6782,7 +6852,7 @@ FFDA..FFDC ; ID_Start # Lo [3] HALFWIDTH HANGUL LETTER EU..HALFWIDTH HANGUL ++ 0B47..0B48 ; ID_Continue # Mc [2] ORIYA VOWEL SIGN E..ORIYA VOWEL SIGN AI ++ 0B4B..0B4C ; ID_Continue # Mc [2] ORIYA VOWEL SIGN O..ORIYA VOWEL SIGN AU ++ 0B4D ; ID_Continue # Mn ORIYA SIGN VIRAMA ++-0B56 ; ID_Continue # Mn ORIYA AI LENGTH MARK +++0B55..0B56 ; ID_Continue # Mn [2] ORIYA SIGN OVERLINE..ORIYA AI LENGTH MARK ++ 0B57 ; ID_Continue # Mc ORIYA AU LENGTH MARK ++ 0B5C..0B5D ; ID_Continue # Lo [2] ORIYA LETTER RRA..ORIYA LETTER RHA ++ 0B5F..0B61 ; ID_Continue # Lo [3] ORIYA LETTER YYA..ORIYA LETTER VOCALIC LL ++@@ -6851,7 +6921,7 @@ FFDA..FFDC ; ID_Start # Lo [3] HALFWIDTH HANGUL LETTER EU..HALFWIDTH HANGUL ++ 0CF1..0CF2 ; ID_Continue # Lo [2] KANNADA SIGN JIHVAMULIYA..KANNADA SIGN UPADHMANIYA ++ 0D00..0D01 ; ID_Continue # Mn [2] MALAYALAM SIGN COMBINING ANUSVARA ABOVE..MALAYALAM SIGN CANDRABINDU ++ 0D02..0D03 ; ID_Continue # Mc [2] MALAYALAM SIGN ANUSVARA..MALAYALAM SIGN VISARGA ++-0D05..0D0C ; ID_Continue # Lo [8] MALAYALAM LETTER A..MALAYALAM LETTER VOCALIC L +++0D04..0D0C ; ID_Continue # Lo [9] MALAYALAM LETTER VEDIC ANUSVARA..MALAYALAM LETTER VOCALIC L ++ 0D0E..0D10 ; ID_Continue # Lo [3] MALAYALAM LETTER E..MALAYALAM LETTER AI ++ 0D12..0D3A ; ID_Continue # Lo [41] MALAYALAM LETTER O..MALAYALAM LETTER TTTA ++ 0D3B..0D3C ; ID_Continue # Mn [2] MALAYALAM SIGN VERTICAL BAR VIRAMA..MALAYALAM SIGN CIRCULAR VIRAMA ++@@ -6868,6 +6938,7 @@ FFDA..FFDC ; ID_Start # Lo [3] HALFWIDTH HANGUL LETTER EU..HALFWIDTH HANGUL ++ 0D62..0D63 ; ID_Continue # Mn [2] MALAYALAM VOWEL SIGN VOCALIC L..MALAYALAM VOWEL SIGN VOCALIC LL ++ 0D66..0D6F ; ID_Continue # Nd [10] MALAYALAM DIGIT ZERO..MALAYALAM DIGIT NINE ++ 0D7A..0D7F ; ID_Continue # Lo [6] MALAYALAM LETTER CHILLU NN..MALAYALAM LETTER CHILLU K +++0D81 ; ID_Continue # Mn SINHALA SIGN CANDRABINDU ++ 0D82..0D83 ; ID_Continue # Mc [2] SINHALA SIGN ANUSVARAYA..SINHALA SIGN VISARGAYA ++ 0D85..0D96 ; ID_Continue # Lo [18] SINHALA LETTER AYANNA..SINHALA LETTER AUYANNA ++ 0D9A..0DB1 ; ID_Continue # Lo [24] SINHALA LETTER ALPAPRAANA KAYANNA..SINHALA LETTER DANTAJA NAYANNA ++@@ -7057,6 +7128,7 @@ FFDA..FFDC ; ID_Start # Lo [3] HALFWIDTH HANGUL LETTER EU..HALFWIDTH HANGUL ++ 1A90..1A99 ; ID_Continue # Nd [10] TAI THAM THAM DIGIT ZERO..TAI THAM THAM DIGIT NINE ++ 1AA7 ; ID_Continue # Lm TAI THAM SIGN MAI YAMOK ++ 1AB0..1ABD ; ID_Continue # Mn [14] COMBINING DOUBLED CIRCUMFLEX ACCENT..COMBINING PARENTHESES BELOW +++1ABF..1AC0 ; ID_Continue # Mn [2] COMBINING LATIN SMALL LETTER W BELOW..COMBINING LATIN SMALL LETTER TURNED W BELOW ++ 1B00..1B03 ; ID_Continue # Mn [4] BALINESE SIGN ULU RICEM..BALINESE SIGN SURANG ++ 1B04 ; ID_Continue # Mc BALINESE SIGN BISAH ++ 1B05..1B33 ; ID_Continue # Lo [47] BALINESE LETTER AKARA..BALINESE LETTER HA ++@@ -7215,10 +7287,10 @@ FFDA..FFDC ; ID_Start # Lo [3] HALFWIDTH HANGUL LETTER EU..HALFWIDTH HANGUL ++ 30FF ; ID_Continue # Lo KATAKANA DIGRAPH KOTO ++ 3105..312F ; ID_Continue # Lo [43] BOPOMOFO LETTER B..BOPOMOFO LETTER NN ++ 3131..318E ; ID_Continue # Lo [94] HANGUL LETTER KIYEOK..HANGUL LETTER ARAEAE ++-31A0..31BA ; ID_Continue # Lo [27] BOPOMOFO LETTER BU..BOPOMOFO LETTER ZY +++31A0..31BF ; ID_Continue # Lo [32] BOPOMOFO LETTER BU..BOPOMOFO LETTER AH ++ 31F0..31FF ; ID_Continue # Lo [16] KATAKANA LETTER SMALL KU..KATAKANA LETTER SMALL RO ++-3400..4DB5 ; ID_Continue # Lo [6582] CJK UNIFIED IDEOGRAPH-3400..CJK UNIFIED IDEOGRAPH-4DB5 ++-4E00..9FEF ; ID_Continue # Lo [20976] CJK UNIFIED IDEOGRAPH-4E00..CJK UNIFIED IDEOGRAPH-9FEF +++3400..4DBF ; ID_Continue # Lo [6592] CJK UNIFIED IDEOGRAPH-3400..CJK UNIFIED IDEOGRAPH-4DBF +++4E00..9FFC ; ID_Continue # Lo [20989] CJK UNIFIED IDEOGRAPH-4E00..CJK UNIFIED IDEOGRAPH-9FFC ++ A000..A014 ; ID_Continue # Lo [21] YI SYLLABLE IT..YI SYLLABLE E ++ A015 ; ID_Continue # Lm YI SYLLABLE WU ++ A016..A48C ; ID_Continue # Lo [1143] YI SYLLABLE BIT..YI SYLLABLE YYR ++@@ -7248,7 +7320,8 @@ A788 ; ID_Continue # Lm MODIFIER LETTER LOW CIRCUMFLEX ACCENT ++ A78B..A78E ; ID_Continue # L& [4] LATIN CAPITAL LETTER SALTILLO..LATIN SMALL LETTER L WITH RETROFLEX HOOK AND BELT ++ A78F ; ID_Continue # Lo LATIN LETTER SINOLOGICAL DOT ++ A790..A7BF ; ID_Continue # L& [48] LATIN CAPITAL LETTER N WITH DESCENDER..LATIN SMALL LETTER GLOTTAL U ++-A7C2..A7C6 ; ID_Continue # L& [5] LATIN CAPITAL LETTER ANGLICANA W..LATIN CAPITAL LETTER Z WITH PALATAL HOOK +++A7C2..A7CA ; ID_Continue # L& [9] LATIN CAPITAL LETTER ANGLICANA W..LATIN SMALL LETTER S WITH SHORT STROKE OVERLAY +++A7F5..A7F6 ; ID_Continue # L& [2] LATIN CAPITAL LETTER REVERSED HALF H..LATIN SMALL LETTER REVERSED HALF H ++ A7F7 ; ID_Continue # Lo LATIN EPIGRAPHIC LETTER SIDEWAYS I ++ A7F8..A7F9 ; ID_Continue # Lm [2] MODIFIER LETTER CAPITAL H WITH STROKE..MODIFIER LETTER SMALL LIGATURE OE ++ A7FA ; ID_Continue # L& LATIN LETTER SMALL CAPITAL TURNED M ++@@ -7262,6 +7335,7 @@ A80C..A822 ; ID_Continue # Lo [23] SYLOTI NAGRI LETTER CO..SYLOTI NAGRI LETT ++ A823..A824 ; ID_Continue # Mc [2] SYLOTI NAGRI VOWEL SIGN A..SYLOTI NAGRI VOWEL SIGN I ++ A825..A826 ; ID_Continue # Mn [2] SYLOTI NAGRI VOWEL SIGN U..SYLOTI NAGRI VOWEL SIGN E ++ A827 ; ID_Continue # Mc SYLOTI NAGRI VOWEL SIGN OO +++A82C ; ID_Continue # Mn SYLOTI NAGRI SIGN ALTERNATE HASANTA ++ A840..A873 ; ID_Continue # Lo [52] PHAGS-PA LETTER KA..PHAGS-PA LETTER CANDRABINDU ++ A880..A881 ; ID_Continue # Mc [2] SAURASHTRA SIGN ANUSVARA..SAURASHTRA SIGN VISARGA ++ A882..A8B3 ; ID_Continue # Lo [50] SAURASHTRA LETTER A..SAURASHTRA LETTER LLA ++@@ -7344,7 +7418,8 @@ AB20..AB26 ; ID_Continue # Lo [7] ETHIOPIC SYLLABLE CCHHA..ETHIOPIC SYLLABL ++ AB28..AB2E ; ID_Continue # Lo [7] ETHIOPIC SYLLABLE BBA..ETHIOPIC SYLLABLE BBO ++ AB30..AB5A ; ID_Continue # L& [43] LATIN SMALL LETTER BARRED ALPHA..LATIN SMALL LETTER Y WITH SHORT RIGHT LEG ++ AB5C..AB5F ; ID_Continue # Lm [4] MODIFIER LETTER SMALL HENG..MODIFIER LETTER SMALL U WITH LEFT HOOK ++-AB60..AB67 ; ID_Continue # L& [8] LATIN SMALL LETTER SAKHA YAT..LATIN SMALL LETTER TS DIGRAPH WITH RETROFLEX HOOK +++AB60..AB68 ; ID_Continue # L& [9] LATIN SMALL LETTER SAKHA YAT..LATIN SMALL LETTER TURNED R WITH MIDDLE TILDE +++AB69 ; ID_Continue # Lm MODIFIER LETTER SMALL TURNED W ++ AB70..ABBF ; ID_Continue # L& [80] CHEROKEE SMALL LETTER A..CHEROKEE SMALL LETTER YA ++ ABC0..ABE2 ; ID_Continue # Lo [35] MEETEI MAYEK LETTER KOK..MEETEI MAYEK LETTER I LONSUM ++ ABE3..ABE4 ; ID_Continue # Mc [2] MEETEI MAYEK VOWEL SIGN ONAP..MEETEI MAYEK VOWEL SIGN INAP ++@@ -7465,10 +7540,14 @@ FFDA..FFDC ; ID_Continue # Lo [3] HALFWIDTH HANGUL LETTER EU..HALFWIDTH HAN ++ 10D00..10D23 ; ID_Continue # Lo [36] HANIFI ROHINGYA LETTER A..HANIFI ROHINGYA MARK NA KHONNA ++ 10D24..10D27 ; ID_Continue # Mn [4] HANIFI ROHINGYA SIGN HARBAHAY..HANIFI ROHINGYA SIGN TASSI ++ 10D30..10D39 ; ID_Continue # Nd [10] HANIFI ROHINGYA DIGIT ZERO..HANIFI ROHINGYA DIGIT NINE +++10E80..10EA9 ; ID_Continue # Lo [42] YEZIDI LETTER ELIF..YEZIDI LETTER ET +++10EAB..10EAC ; ID_Continue # Mn [2] YEZIDI COMBINING HAMZA MARK..YEZIDI COMBINING MADDA MARK +++10EB0..10EB1 ; ID_Continue # Lo [2] YEZIDI LETTER LAM WITH DOT ABOVE..YEZIDI LETTER YOT WITH CIRCUMFLEX ABOVE ++ 10F00..10F1C ; ID_Continue # Lo [29] OLD SOGDIAN LETTER ALEPH..OLD SOGDIAN LETTER FINAL TAW WITH VERTICAL TAIL ++ 10F27 ; ID_Continue # Lo OLD SOGDIAN LIGATURE AYIN-DALETH ++ 10F30..10F45 ; ID_Continue # Lo [22] SOGDIAN LETTER ALEPH..SOGDIAN INDEPENDENT SHIN ++ 10F46..10F50 ; ID_Continue # Mn [11] SOGDIAN COMBINING DOT BELOW..SOGDIAN COMBINING STROKE BELOW +++10FB0..10FC4 ; ID_Continue # Lo [21] CHORASMIAN LETTER ALEPH..CHORASMIAN LETTER TAW ++ 10FE0..10FF6 ; ID_Continue # Lo [23] ELYMAIC LETTER ALEPH..ELYMAIC LIGATURE ZAYIN-YODH ++ 11000 ; ID_Continue # Mc BRAHMI SIGN CANDRABINDU ++ 11001 ; ID_Continue # Mn BRAHMI SIGN ANUSVARA ++@@ -7493,6 +7572,7 @@ FFDA..FFDC ; ID_Continue # Lo [3] HALFWIDTH HANGUL LETTER EU..HALFWIDTH HAN ++ 11136..1113F ; ID_Continue # Nd [10] CHAKMA DIGIT ZERO..CHAKMA DIGIT NINE ++ 11144 ; ID_Continue # Lo CHAKMA LETTER LHAA ++ 11145..11146 ; ID_Continue # Mc [2] CHAKMA VOWEL SIGN AA..CHAKMA VOWEL SIGN EI +++11147 ; ID_Continue # Lo CHAKMA LETTER VAA ++ 11150..11172 ; ID_Continue # Lo [35] MAHAJANI LETTER A..MAHAJANI LETTER RRA ++ 11173 ; ID_Continue # Mn MAHAJANI SIGN NUKTA ++ 11176 ; ID_Continue # Lo MAHAJANI LIGATURE SHRI ++@@ -7504,6 +7584,8 @@ FFDA..FFDC ; ID_Continue # Lo [3] HALFWIDTH HANGUL LETTER EU..HALFWIDTH HAN ++ 111BF..111C0 ; ID_Continue # Mc [2] SHARADA VOWEL SIGN AU..SHARADA SIGN VIRAMA ++ 111C1..111C4 ; ID_Continue # Lo [4] SHARADA SIGN AVAGRAHA..SHARADA OM ++ 111C9..111CC ; ID_Continue # Mn [4] SHARADA SANDHI MARK..SHARADA EXTRA SHORT VOWEL MARK +++111CE ; ID_Continue # Mc SHARADA VOWEL SIGN PRISHTHAMATRA E +++111CF ; ID_Continue # Mn SHARADA SIGN INVERTED CANDRABINDU ++ 111D0..111D9 ; ID_Continue # Nd [10] SHARADA DIGIT ZERO..SHARADA DIGIT NINE ++ 111DA ; ID_Continue # Lo SHARADA EKAM ++ 111DC ; ID_Continue # Lo SHARADA HEADSTROKE ++@@ -7557,7 +7639,7 @@ FFDA..FFDC ; ID_Continue # Lo [3] HALFWIDTH HANGUL LETTER EU..HALFWIDTH HAN ++ 11447..1144A ; ID_Continue # Lo [4] NEWA SIGN AVAGRAHA..NEWA SIDDHI ++ 11450..11459 ; ID_Continue # Nd [10] NEWA DIGIT ZERO..NEWA DIGIT NINE ++ 1145E ; ID_Continue # Mn NEWA SANDHI MARK ++-1145F ; ID_Continue # Lo NEWA LETTER VEDIC ANUSVARA +++1145F..11461 ; ID_Continue # Lo [3] NEWA LETTER VEDIC ANUSVARA..NEWA SIGN UPADHMANIYA ++ 11480..114AF ; ID_Continue # Lo [48] TIRHUTA ANJI..TIRHUTA LETTER HA ++ 114B0..114B2 ; ID_Continue # Mc [3] TIRHUTA VOWEL SIGN AA..TIRHUTA VOWEL SIGN II ++ 114B3..114B8 ; ID_Continue # Mn [6] TIRHUTA VOWEL SIGN U..TIRHUTA VOWEL SIGN VOCALIC LL ++@@ -7612,7 +7694,22 @@ FFDA..FFDC ; ID_Continue # Lo [3] HALFWIDTH HANGUL LETTER EU..HALFWIDTH HAN ++ 11839..1183A ; ID_Continue # Mn [2] DOGRA SIGN VIRAMA..DOGRA SIGN NUKTA ++ 118A0..118DF ; ID_Continue # L& [64] WARANG CITI CAPITAL LETTER NGAA..WARANG CITI SMALL LETTER VIYO ++ 118E0..118E9 ; ID_Continue # Nd [10] WARANG CITI DIGIT ZERO..WARANG CITI DIGIT NINE ++-118FF ; ID_Continue # Lo WARANG CITI OM +++118FF..11906 ; ID_Continue # Lo [8] WARANG CITI OM..DIVES AKURU LETTER E +++11909 ; ID_Continue # Lo DIVES AKURU LETTER O +++1190C..11913 ; ID_Continue # Lo [8] DIVES AKURU LETTER KA..DIVES AKURU LETTER JA +++11915..11916 ; ID_Continue # Lo [2] DIVES AKURU LETTER NYA..DIVES AKURU LETTER TTA +++11918..1192F ; ID_Continue # Lo [24] DIVES AKURU LETTER DDA..DIVES AKURU LETTER ZA +++11930..11935 ; ID_Continue # Mc [6] DIVES AKURU VOWEL SIGN AA..DIVES AKURU VOWEL SIGN E +++11937..11938 ; ID_Continue # Mc [2] DIVES AKURU VOWEL SIGN AI..DIVES AKURU VOWEL SIGN O +++1193B..1193C ; ID_Continue # Mn [2] DIVES AKURU SIGN ANUSVARA..DIVES AKURU SIGN CANDRABINDU +++1193D ; ID_Continue # Mc DIVES AKURU SIGN HALANTA +++1193E ; ID_Continue # Mn DIVES AKURU VIRAMA +++1193F ; ID_Continue # Lo DIVES AKURU PREFIXED NASAL SIGN +++11940 ; ID_Continue # Mc DIVES AKURU MEDIAL YA +++11941 ; ID_Continue # Lo DIVES AKURU INITIAL RA +++11942 ; ID_Continue # Mc DIVES AKURU MEDIAL RA +++11943 ; ID_Continue # Mn DIVES AKURU SIGN NUKTA +++11950..11959 ; ID_Continue # Nd [10] DIVES AKURU DIGIT ZERO..DIVES AKURU DIGIT NINE ++ 119A0..119A7 ; ID_Continue # Lo [8] NANDINAGARI LETTER A..NANDINAGARI LETTER VOCALIC RR ++ 119AA..119D0 ; ID_Continue # Lo [39] NANDINAGARI LETTER E..NANDINAGARI LETTER RRA ++ 119D1..119D3 ; ID_Continue # Mc [3] NANDINAGARI VOWEL SIGN AA..NANDINAGARI VOWEL SIGN II ++@@ -7682,6 +7779,7 @@ FFDA..FFDC ; ID_Continue # Lo [3] HALFWIDTH HANGUL LETTER EU..HALFWIDTH HAN ++ 11EE0..11EF2 ; ID_Continue # Lo [19] MAKASAR LETTER KA..MAKASAR ANGKA ++ 11EF3..11EF4 ; ID_Continue # Mn [2] MAKASAR VOWEL SIGN I..MAKASAR VOWEL SIGN U ++ 11EF5..11EF6 ; ID_Continue # Mc [2] MAKASAR VOWEL SIGN E..MAKASAR VOWEL SIGN O +++11FB0 ; ID_Continue # Lo LISU LETTER YHA ++ 12000..12399 ; ID_Continue # Lo [922] CUNEIFORM SIGN A..CUNEIFORM SIGN U U ++ 12400..1246E ; ID_Continue # Nl [111] CUNEIFORM NUMERIC SIGN TWO ASH..CUNEIFORM NUMERIC SIGN NINE U VARIANT FORM ++ 12480..12543 ; ID_Continue # Lo [196] CUNEIFORM SIGN AB TIMES NUN TENU..CUNEIFORM SIGN ZU5 TIMES THREE DISH TENU ++@@ -7707,8 +7805,11 @@ FFDA..FFDC ; ID_Continue # Lo [3] HALFWIDTH HANGUL LETTER EU..HALFWIDTH HAN ++ 16F93..16F9F ; ID_Continue # Lm [13] MIAO LETTER TONE-2..MIAO LETTER REFORMED TONE-8 ++ 16FE0..16FE1 ; ID_Continue # Lm [2] TANGUT ITERATION MARK..NUSHU ITERATION MARK ++ 16FE3 ; ID_Continue # Lm OLD CHINESE ITERATION MARK +++16FE4 ; ID_Continue # Mn KHITAN SMALL SCRIPT FILLER +++16FF0..16FF1 ; ID_Continue # Mc [2] VIETNAMESE ALTERNATE READING MARK CA..VIETNAMESE ALTERNATE READING MARK NHAY ++ 17000..187F7 ; ID_Continue # Lo [6136] TANGUT IDEOGRAPH-17000..TANGUT IDEOGRAPH-187F7 ++-18800..18AF2 ; ID_Continue # Lo [755] TANGUT COMPONENT-001..TANGUT COMPONENT-755 +++18800..18CD5 ; ID_Continue # Lo [1238] TANGUT COMPONENT-001..KHITAN SMALL SCRIPT CHARACTER-18CD5 +++18D00..18D08 ; ID_Continue # Lo [9] TANGUT IDEOGRAPH-18D00..TANGUT IDEOGRAPH-18D08 ++ 1B000..1B11E ; ID_Continue # Lo [287] KATAKANA LETTER ARCHAIC E..HENTAIGANA LETTER N-MU-MO-2 ++ 1B150..1B152 ; ID_Continue # Lo [3] HIRAGANA LETTER SMALL WI..HIRAGANA LETTER SMALL WO ++ 1B164..1B167 ; ID_Continue # Lo [4] KATAKANA LETTER SMALL WI..KATAKANA LETTER SMALL N ++@@ -7814,15 +7915,17 @@ FFDA..FFDC ; ID_Continue # Lo [3] HALFWIDTH HANGUL LETTER EU..HALFWIDTH HAN ++ 1EEA1..1EEA3 ; ID_Continue # Lo [3] ARABIC MATHEMATICAL DOUBLE-STRUCK BEH..ARABIC MATHEMATICAL DOUBLE-STRUCK DAL ++ 1EEA5..1EEA9 ; ID_Continue # Lo [5] ARABIC MATHEMATICAL DOUBLE-STRUCK WAW..ARABIC MATHEMATICAL DOUBLE-STRUCK YEH ++ 1EEAB..1EEBB ; ID_Continue # Lo [17] ARABIC MATHEMATICAL DOUBLE-STRUCK LAM..ARABIC MATHEMATICAL DOUBLE-STRUCK GHAIN ++-20000..2A6D6 ; ID_Continue # Lo [42711] CJK UNIFIED IDEOGRAPH-20000..CJK UNIFIED IDEOGRAPH-2A6D6 +++1FBF0..1FBF9 ; ID_Continue # Nd [10] SEGMENTED DIGIT ZERO..SEGMENTED DIGIT NINE +++20000..2A6DD ; ID_Continue # Lo [42718] CJK UNIFIED IDEOGRAPH-20000..CJK UNIFIED IDEOGRAPH-2A6DD ++ 2A700..2B734 ; ID_Continue # Lo [4149] CJK UNIFIED IDEOGRAPH-2A700..CJK UNIFIED IDEOGRAPH-2B734 ++ 2B740..2B81D ; ID_Continue # Lo [222] CJK UNIFIED IDEOGRAPH-2B740..CJK UNIFIED IDEOGRAPH-2B81D ++ 2B820..2CEA1 ; ID_Continue # Lo [5762] CJK UNIFIED IDEOGRAPH-2B820..CJK UNIFIED IDEOGRAPH-2CEA1 ++ 2CEB0..2EBE0 ; ID_Continue # Lo [7473] CJK UNIFIED IDEOGRAPH-2CEB0..CJK UNIFIED IDEOGRAPH-2EBE0 ++ 2F800..2FA1D ; ID_Continue # Lo [542] CJK COMPATIBILITY IDEOGRAPH-2F800..CJK COMPATIBILITY IDEOGRAPH-2FA1D +++30000..3134A ; ID_Continue # Lo [4939] CJK UNIFIED IDEOGRAPH-30000..CJK UNIFIED IDEOGRAPH-3134A ++ E0100..E01EF ; ID_Continue # Mn [240] VARIATION SELECTOR-17..VARIATION SELECTOR-256 ++ ++-# Total code points: 128789 +++# Total code points: 134434 ++ ++ # ================================================ ++ ++@@ -7893,7 +7996,7 @@ E0100..E01EF ; ID_Continue # Mn [240] VARIATION SELECTOR-17..VARIATION SELECTOR ++ 0840..0858 ; XID_Start # Lo [25] MANDAIC LETTER HALQA..MANDAIC LETTER AIN ++ 0860..086A ; XID_Start # Lo [11] SYRIAC LETTER MALAYALAM NGA..SYRIAC LETTER MALAYALAM SSA ++ 08A0..08B4 ; XID_Start # Lo [21] ARABIC LETTER BEH WITH SMALL V BELOW..ARABIC LETTER KAF WITH DOT BELOW ++-08B6..08BD ; XID_Start # Lo [8] ARABIC LETTER BEH WITH SMALL MEEM ABOVE..ARABIC LETTER AFRICAN NOON +++08B6..08C7 ; XID_Start # Lo [18] ARABIC LETTER BEH WITH SMALL MEEM ABOVE..ARABIC LETTER LAM WITH SMALL ARABIC LETTER TAH ABOVE ++ 0904..0939 ; XID_Start # Lo [54] DEVANAGARI LETTER SHORT A..DEVANAGARI LETTER HA ++ 093D ; XID_Start # Lo DEVANAGARI SIGN AVAGRAHA ++ 0950 ; XID_Start # Lo DEVANAGARI OM ++@@ -7970,7 +8073,7 @@ E0100..E01EF ; ID_Continue # Mn [240] VARIATION SELECTOR-17..VARIATION SELECTOR ++ 0CDE ; XID_Start # Lo KANNADA LETTER FA ++ 0CE0..0CE1 ; XID_Start # Lo [2] KANNADA LETTER VOCALIC RR..KANNADA LETTER VOCALIC LL ++ 0CF1..0CF2 ; XID_Start # Lo [2] KANNADA SIGN JIHVAMULIYA..KANNADA SIGN UPADHMANIYA ++-0D05..0D0C ; XID_Start # Lo [8] MALAYALAM LETTER A..MALAYALAM LETTER VOCALIC L +++0D04..0D0C ; XID_Start # Lo [9] MALAYALAM LETTER VEDIC ANUSVARA..MALAYALAM LETTER VOCALIC L ++ 0D0E..0D10 ; XID_Start # Lo [3] MALAYALAM LETTER E..MALAYALAM LETTER AI ++ 0D12..0D3A ; XID_Start # Lo [41] MALAYALAM LETTER O..MALAYALAM LETTER TTTA ++ 0D3D ; XID_Start # Lo MALAYALAM SIGN AVAGRAHA ++@@ -8168,10 +8271,10 @@ E0100..E01EF ; ID_Continue # Mn [240] VARIATION SELECTOR-17..VARIATION SELECTOR ++ 30FF ; XID_Start # Lo KATAKANA DIGRAPH KOTO ++ 3105..312F ; XID_Start # Lo [43] BOPOMOFO LETTER B..BOPOMOFO LETTER NN ++ 3131..318E ; XID_Start # Lo [94] HANGUL LETTER KIYEOK..HANGUL LETTER ARAEAE ++-31A0..31BA ; XID_Start # Lo [27] BOPOMOFO LETTER BU..BOPOMOFO LETTER ZY +++31A0..31BF ; XID_Start # Lo [32] BOPOMOFO LETTER BU..BOPOMOFO LETTER AH ++ 31F0..31FF ; XID_Start # Lo [16] KATAKANA LETTER SMALL KU..KATAKANA LETTER SMALL RO ++-3400..4DB5 ; XID_Start # Lo [6582] CJK UNIFIED IDEOGRAPH-3400..CJK UNIFIED IDEOGRAPH-4DB5 ++-4E00..9FEF ; XID_Start # Lo [20976] CJK UNIFIED IDEOGRAPH-4E00..CJK UNIFIED IDEOGRAPH-9FEF +++3400..4DBF ; XID_Start # Lo [6592] CJK UNIFIED IDEOGRAPH-3400..CJK UNIFIED IDEOGRAPH-4DBF +++4E00..9FFC ; XID_Start # Lo [20989] CJK UNIFIED IDEOGRAPH-4E00..CJK UNIFIED IDEOGRAPH-9FFC ++ A000..A014 ; XID_Start # Lo [21] YI SYLLABLE IT..YI SYLLABLE E ++ A015 ; XID_Start # Lm YI SYLLABLE WU ++ A016..A48C ; XID_Start # Lo [1143] YI SYLLABLE BIT..YI SYLLABLE YYR ++@@ -8196,7 +8299,8 @@ A788 ; XID_Start # Lm MODIFIER LETTER LOW CIRCUMFLEX ACCENT ++ A78B..A78E ; XID_Start # L& [4] LATIN CAPITAL LETTER SALTILLO..LATIN SMALL LETTER L WITH RETROFLEX HOOK AND BELT ++ A78F ; XID_Start # Lo LATIN LETTER SINOLOGICAL DOT ++ A790..A7BF ; XID_Start # L& [48] LATIN CAPITAL LETTER N WITH DESCENDER..LATIN SMALL LETTER GLOTTAL U ++-A7C2..A7C6 ; XID_Start # L& [5] LATIN CAPITAL LETTER ANGLICANA W..LATIN CAPITAL LETTER Z WITH PALATAL HOOK +++A7C2..A7CA ; XID_Start # L& [9] LATIN CAPITAL LETTER ANGLICANA W..LATIN SMALL LETTER S WITH SHORT STROKE OVERLAY +++A7F5..A7F6 ; XID_Start # L& [2] LATIN CAPITAL LETTER REVERSED HALF H..LATIN SMALL LETTER REVERSED HALF H ++ A7F7 ; XID_Start # Lo LATIN EPIGRAPHIC LETTER SIDEWAYS I ++ A7F8..A7F9 ; XID_Start # Lm [2] MODIFIER LETTER CAPITAL H WITH STROKE..MODIFIER LETTER SMALL LIGATURE OE ++ A7FA ; XID_Start # L& LATIN LETTER SMALL CAPITAL TURNED M ++@@ -8243,7 +8347,8 @@ AB20..AB26 ; XID_Start # Lo [7] ETHIOPIC SYLLABLE CCHHA..ETHIOPIC SYLLABLE ++ AB28..AB2E ; XID_Start # Lo [7] ETHIOPIC SYLLABLE BBA..ETHIOPIC SYLLABLE BBO ++ AB30..AB5A ; XID_Start # L& [43] LATIN SMALL LETTER BARRED ALPHA..LATIN SMALL LETTER Y WITH SHORT RIGHT LEG ++ AB5C..AB5F ; XID_Start # Lm [4] MODIFIER LETTER SMALL HENG..MODIFIER LETTER SMALL U WITH LEFT HOOK ++-AB60..AB67 ; XID_Start # L& [8] LATIN SMALL LETTER SAKHA YAT..LATIN SMALL LETTER TS DIGRAPH WITH RETROFLEX HOOK +++AB60..AB68 ; XID_Start # L& [9] LATIN SMALL LETTER SAKHA YAT..LATIN SMALL LETTER TURNED R WITH MIDDLE TILDE +++AB69 ; XID_Start # Lm MODIFIER LETTER SMALL TURNED W ++ AB70..ABBF ; XID_Start # L& [80] CHEROKEE SMALL LETTER A..CHEROKEE SMALL LETTER YA ++ ABC0..ABE2 ; XID_Start # Lo [35] MEETEI MAYEK LETTER KOK..MEETEI MAYEK LETTER I LONSUM ++ AC00..D7A3 ; XID_Start # Lo [11172] HANGUL SYLLABLE GA..HANGUL SYLLABLE HIH ++@@ -8342,15 +8447,19 @@ FFDA..FFDC ; XID_Start # Lo [3] HALFWIDTH HANGUL LETTER EU..HALFWIDTH HANGU ++ 10C80..10CB2 ; XID_Start # L& [51] OLD HUNGARIAN CAPITAL LETTER A..OLD HUNGARIAN CAPITAL LETTER US ++ 10CC0..10CF2 ; XID_Start # L& [51] OLD HUNGARIAN SMALL LETTER A..OLD HUNGARIAN SMALL LETTER US ++ 10D00..10D23 ; XID_Start # Lo [36] HANIFI ROHINGYA LETTER A..HANIFI ROHINGYA MARK NA KHONNA +++10E80..10EA9 ; XID_Start # Lo [42] YEZIDI LETTER ELIF..YEZIDI LETTER ET +++10EB0..10EB1 ; XID_Start # Lo [2] YEZIDI LETTER LAM WITH DOT ABOVE..YEZIDI LETTER YOT WITH CIRCUMFLEX ABOVE ++ 10F00..10F1C ; XID_Start # Lo [29] OLD SOGDIAN LETTER ALEPH..OLD SOGDIAN LETTER FINAL TAW WITH VERTICAL TAIL ++ 10F27 ; XID_Start # Lo OLD SOGDIAN LIGATURE AYIN-DALETH ++ 10F30..10F45 ; XID_Start # Lo [22] SOGDIAN LETTER ALEPH..SOGDIAN INDEPENDENT SHIN +++10FB0..10FC4 ; XID_Start # Lo [21] CHORASMIAN LETTER ALEPH..CHORASMIAN LETTER TAW ++ 10FE0..10FF6 ; XID_Start # Lo [23] ELYMAIC LETTER ALEPH..ELYMAIC LIGATURE ZAYIN-YODH ++ 11003..11037 ; XID_Start # Lo [53] BRAHMI SIGN JIHVAMULIYA..BRAHMI LETTER OLD TAMIL NNNA ++ 11083..110AF ; XID_Start # Lo [45] KAITHI LETTER A..KAITHI LETTER HA ++ 110D0..110E8 ; XID_Start # Lo [25] SORA SOMPENG LETTER SAH..SORA SOMPENG LETTER MAE ++ 11103..11126 ; XID_Start # Lo [36] CHAKMA LETTER AA..CHAKMA LETTER HAA ++ 11144 ; XID_Start # Lo CHAKMA LETTER LHAA +++11147 ; XID_Start # Lo CHAKMA LETTER VAA ++ 11150..11172 ; XID_Start # Lo [35] MAHAJANI LETTER A..MAHAJANI LETTER RRA ++ 11176 ; XID_Start # Lo MAHAJANI LIGATURE SHRI ++ 11183..111B2 ; XID_Start # Lo [48] SHARADA LETTER A..SHARADA LETTER HA ++@@ -8376,7 +8485,7 @@ FFDA..FFDC ; XID_Start # Lo [3] HALFWIDTH HANGUL LETTER EU..HALFWIDTH HANGU ++ 1135D..11361 ; XID_Start # Lo [5] GRANTHA SIGN PLUTA..GRANTHA LETTER VOCALIC LL ++ 11400..11434 ; XID_Start # Lo [53] NEWA LETTER A..NEWA LETTER HA ++ 11447..1144A ; XID_Start # Lo [4] NEWA SIGN AVAGRAHA..NEWA SIDDHI ++-1145F ; XID_Start # Lo NEWA LETTER VEDIC ANUSVARA +++1145F..11461 ; XID_Start # Lo [3] NEWA LETTER VEDIC ANUSVARA..NEWA SIGN UPADHMANIYA ++ 11480..114AF ; XID_Start # Lo [48] TIRHUTA ANJI..TIRHUTA LETTER HA ++ 114C4..114C5 ; XID_Start # Lo [2] TIRHUTA SIGN AVAGRAHA..TIRHUTA GVANG ++ 114C7 ; XID_Start # Lo TIRHUTA OM ++@@ -8389,7 +8498,13 @@ FFDA..FFDC ; XID_Start # Lo [3] HALFWIDTH HANGUL LETTER EU..HALFWIDTH HANGU ++ 11700..1171A ; XID_Start # Lo [27] AHOM LETTER KA..AHOM LETTER ALTERNATE BA ++ 11800..1182B ; XID_Start # Lo [44] DOGRA LETTER A..DOGRA LETTER RRA ++ 118A0..118DF ; XID_Start # L& [64] WARANG CITI CAPITAL LETTER NGAA..WARANG CITI SMALL LETTER VIYO ++-118FF ; XID_Start # Lo WARANG CITI OM +++118FF..11906 ; XID_Start # Lo [8] WARANG CITI OM..DIVES AKURU LETTER E +++11909 ; XID_Start # Lo DIVES AKURU LETTER O +++1190C..11913 ; XID_Start # Lo [8] DIVES AKURU LETTER KA..DIVES AKURU LETTER JA +++11915..11916 ; XID_Start # Lo [2] DIVES AKURU LETTER NYA..DIVES AKURU LETTER TTA +++11918..1192F ; XID_Start # Lo [24] DIVES AKURU LETTER DDA..DIVES AKURU LETTER ZA +++1193F ; XID_Start # Lo DIVES AKURU PREFIXED NASAL SIGN +++11941 ; XID_Start # Lo DIVES AKURU INITIAL RA ++ 119A0..119A7 ; XID_Start # Lo [8] NANDINAGARI LETTER A..NANDINAGARI LETTER VOCALIC RR ++ 119AA..119D0 ; XID_Start # Lo [39] NANDINAGARI LETTER E..NANDINAGARI LETTER RRA ++ 119E1 ; XID_Start # Lo NANDINAGARI SIGN AVAGRAHA ++@@ -8414,6 +8529,7 @@ FFDA..FFDC ; XID_Start # Lo [3] HALFWIDTH HANGUL LETTER EU..HALFWIDTH HANGU ++ 11D6A..11D89 ; XID_Start # Lo [32] GUNJALA GONDI LETTER OO..GUNJALA GONDI LETTER SA ++ 11D98 ; XID_Start # Lo GUNJALA GONDI OM ++ 11EE0..11EF2 ; XID_Start # Lo [19] MAKASAR LETTER KA..MAKASAR ANGKA +++11FB0 ; XID_Start # Lo LISU LETTER YHA ++ 12000..12399 ; XID_Start # Lo [922] CUNEIFORM SIGN A..CUNEIFORM SIGN U U ++ 12400..1246E ; XID_Start # Nl [111] CUNEIFORM NUMERIC SIGN TWO ASH..CUNEIFORM NUMERIC SIGN NINE U VARIANT FORM ++ 12480..12543 ; XID_Start # Lo [196] CUNEIFORM SIGN AB TIMES NUN TENU..CUNEIFORM SIGN ZU5 TIMES THREE DISH TENU ++@@ -8433,7 +8549,8 @@ FFDA..FFDC ; XID_Start # Lo [3] HALFWIDTH HANGUL LETTER EU..HALFWIDTH HANGU ++ 16FE0..16FE1 ; XID_Start # Lm [2] TANGUT ITERATION MARK..NUSHU ITERATION MARK ++ 16FE3 ; XID_Start # Lm OLD CHINESE ITERATION MARK ++ 17000..187F7 ; XID_Start # Lo [6136] TANGUT IDEOGRAPH-17000..TANGUT IDEOGRAPH-187F7 ++-18800..18AF2 ; XID_Start # Lo [755] TANGUT COMPONENT-001..TANGUT COMPONENT-755 +++18800..18CD5 ; XID_Start # Lo [1238] TANGUT COMPONENT-001..KHITAN SMALL SCRIPT CHARACTER-18CD5 +++18D00..18D08 ; XID_Start # Lo [9] TANGUT IDEOGRAPH-18D00..TANGUT IDEOGRAPH-18D08 ++ 1B000..1B11E ; XID_Start # Lo [287] KATAKANA LETTER ARCHAIC E..HENTAIGANA LETTER N-MU-MO-2 ++ 1B150..1B152 ; XID_Start # Lo [3] HIRAGANA LETTER SMALL WI..HIRAGANA LETTER SMALL WO ++ 1B164..1B167 ; XID_Start # Lo [4] KATAKANA LETTER SMALL WI..KATAKANA LETTER SMALL N ++@@ -8512,14 +8629,15 @@ FFDA..FFDC ; XID_Start # Lo [3] HALFWIDTH HANGUL LETTER EU..HALFWIDTH HANGU ++ 1EEA1..1EEA3 ; XID_Start # Lo [3] ARABIC MATHEMATICAL DOUBLE-STRUCK BEH..ARABIC MATHEMATICAL DOUBLE-STRUCK DAL ++ 1EEA5..1EEA9 ; XID_Start # Lo [5] ARABIC MATHEMATICAL DOUBLE-STRUCK WAW..ARABIC MATHEMATICAL DOUBLE-STRUCK YEH ++ 1EEAB..1EEBB ; XID_Start # Lo [17] ARABIC MATHEMATICAL DOUBLE-STRUCK LAM..ARABIC MATHEMATICAL DOUBLE-STRUCK GHAIN ++-20000..2A6D6 ; XID_Start # Lo [42711] CJK UNIFIED IDEOGRAPH-20000..CJK UNIFIED IDEOGRAPH-2A6D6 +++20000..2A6DD ; XID_Start # Lo [42718] CJK UNIFIED IDEOGRAPH-20000..CJK UNIFIED IDEOGRAPH-2A6DD ++ 2A700..2B734 ; XID_Start # Lo [4149] CJK UNIFIED IDEOGRAPH-2A700..CJK UNIFIED IDEOGRAPH-2B734 ++ 2B740..2B81D ; XID_Start # Lo [222] CJK UNIFIED IDEOGRAPH-2B740..CJK UNIFIED IDEOGRAPH-2B81D ++ 2B820..2CEA1 ; XID_Start # Lo [5762] CJK UNIFIED IDEOGRAPH-2B820..CJK UNIFIED IDEOGRAPH-2CEA1 ++ 2CEB0..2EBE0 ; XID_Start # Lo [7473] CJK UNIFIED IDEOGRAPH-2CEB0..CJK UNIFIED IDEOGRAPH-2EBE0 ++ 2F800..2FA1D ; XID_Start # Lo [542] CJK COMPATIBILITY IDEOGRAPH-2F800..CJK COMPATIBILITY IDEOGRAPH-2FA1D +++30000..3134A ; XID_Start # Lo [4939] CJK UNIFIED IDEOGRAPH-30000..CJK UNIFIED IDEOGRAPH-3134A ++ ++-# Total code points: 125861 +++# Total code points: 131459 ++ ++ # ================================================ ++ ++@@ -8621,7 +8739,7 @@ FFDA..FFDC ; XID_Start # Lo [3] HALFWIDTH HANGUL LETTER EU..HALFWIDTH HANGU ++ 0859..085B ; XID_Continue # Mn [3] MANDAIC AFFRICATION MARK..MANDAIC GEMINATION MARK ++ 0860..086A ; XID_Continue # Lo [11] SYRIAC LETTER MALAYALAM NGA..SYRIAC LETTER MALAYALAM SSA ++ 08A0..08B4 ; XID_Continue # Lo [21] ARABIC LETTER BEH WITH SMALL V BELOW..ARABIC LETTER KAF WITH DOT BELOW ++-08B6..08BD ; XID_Continue # Lo [8] ARABIC LETTER BEH WITH SMALL MEEM ABOVE..ARABIC LETTER AFRICAN NOON +++08B6..08C7 ; XID_Continue # Lo [18] ARABIC LETTER BEH WITH SMALL MEEM ABOVE..ARABIC LETTER LAM WITH SMALL ARABIC LETTER TAH ABOVE ++ 08D3..08E1 ; XID_Continue # Mn [15] ARABIC SMALL LOW WAW..ARABIC SMALL HIGH SIGN SAFHA ++ 08E3..0902 ; XID_Continue # Mn [32] ARABIC TURNED DAMMA BELOW..DEVANAGARI SIGN ANUSVARA ++ 0903 ; XID_Continue # Mc DEVANAGARI SIGN VISARGA ++@@ -8726,7 +8844,7 @@ FFDA..FFDC ; XID_Start # Lo [3] HALFWIDTH HANGUL LETTER EU..HALFWIDTH HANGU ++ 0B47..0B48 ; XID_Continue # Mc [2] ORIYA VOWEL SIGN E..ORIYA VOWEL SIGN AI ++ 0B4B..0B4C ; XID_Continue # Mc [2] ORIYA VOWEL SIGN O..ORIYA VOWEL SIGN AU ++ 0B4D ; XID_Continue # Mn ORIYA SIGN VIRAMA ++-0B56 ; XID_Continue # Mn ORIYA AI LENGTH MARK +++0B55..0B56 ; XID_Continue # Mn [2] ORIYA SIGN OVERLINE..ORIYA AI LENGTH MARK ++ 0B57 ; XID_Continue # Mc ORIYA AU LENGTH MARK ++ 0B5C..0B5D ; XID_Continue # Lo [2] ORIYA LETTER RRA..ORIYA LETTER RHA ++ 0B5F..0B61 ; XID_Continue # Lo [3] ORIYA LETTER YYA..ORIYA LETTER VOCALIC LL ++@@ -8795,7 +8913,7 @@ FFDA..FFDC ; XID_Start # Lo [3] HALFWIDTH HANGUL LETTER EU..HALFWIDTH HANGU ++ 0CF1..0CF2 ; XID_Continue # Lo [2] KANNADA SIGN JIHVAMULIYA..KANNADA SIGN UPADHMANIYA ++ 0D00..0D01 ; XID_Continue # Mn [2] MALAYALAM SIGN COMBINING ANUSVARA ABOVE..MALAYALAM SIGN CANDRABINDU ++ 0D02..0D03 ; XID_Continue # Mc [2] MALAYALAM SIGN ANUSVARA..MALAYALAM SIGN VISARGA ++-0D05..0D0C ; XID_Continue # Lo [8] MALAYALAM LETTER A..MALAYALAM LETTER VOCALIC L +++0D04..0D0C ; XID_Continue # Lo [9] MALAYALAM LETTER VEDIC ANUSVARA..MALAYALAM LETTER VOCALIC L ++ 0D0E..0D10 ; XID_Continue # Lo [3] MALAYALAM LETTER E..MALAYALAM LETTER AI ++ 0D12..0D3A ; XID_Continue # Lo [41] MALAYALAM LETTER O..MALAYALAM LETTER TTTA ++ 0D3B..0D3C ; XID_Continue # Mn [2] MALAYALAM SIGN VERTICAL BAR VIRAMA..MALAYALAM SIGN CIRCULAR VIRAMA ++@@ -8812,6 +8930,7 @@ FFDA..FFDC ; XID_Start # Lo [3] HALFWIDTH HANGUL LETTER EU..HALFWIDTH HANGU ++ 0D62..0D63 ; XID_Continue # Mn [2] MALAYALAM VOWEL SIGN VOCALIC L..MALAYALAM VOWEL SIGN VOCALIC LL ++ 0D66..0D6F ; XID_Continue # Nd [10] MALAYALAM DIGIT ZERO..MALAYALAM DIGIT NINE ++ 0D7A..0D7F ; XID_Continue # Lo [6] MALAYALAM LETTER CHILLU NN..MALAYALAM LETTER CHILLU K +++0D81 ; XID_Continue # Mn SINHALA SIGN CANDRABINDU ++ 0D82..0D83 ; XID_Continue # Mc [2] SINHALA SIGN ANUSVARAYA..SINHALA SIGN VISARGAYA ++ 0D85..0D96 ; XID_Continue # Lo [18] SINHALA LETTER AYANNA..SINHALA LETTER AUYANNA ++ 0D9A..0DB1 ; XID_Continue # Lo [24] SINHALA LETTER ALPAPRAANA KAYANNA..SINHALA LETTER DANTAJA NAYANNA ++@@ -9001,6 +9120,7 @@ FFDA..FFDC ; XID_Start # Lo [3] HALFWIDTH HANGUL LETTER EU..HALFWIDTH HANGU ++ 1A90..1A99 ; XID_Continue # Nd [10] TAI THAM THAM DIGIT ZERO..TAI THAM THAM DIGIT NINE ++ 1AA7 ; XID_Continue # Lm TAI THAM SIGN MAI YAMOK ++ 1AB0..1ABD ; XID_Continue # Mn [14] COMBINING DOUBLED CIRCUMFLEX ACCENT..COMBINING PARENTHESES BELOW +++1ABF..1AC0 ; XID_Continue # Mn [2] COMBINING LATIN SMALL LETTER W BELOW..COMBINING LATIN SMALL LETTER TURNED W BELOW ++ 1B00..1B03 ; XID_Continue # Mn [4] BALINESE SIGN ULU RICEM..BALINESE SIGN SURANG ++ 1B04 ; XID_Continue # Mc BALINESE SIGN BISAH ++ 1B05..1B33 ; XID_Continue # Lo [47] BALINESE LETTER AKARA..BALINESE LETTER HA ++@@ -9158,10 +9278,10 @@ FFDA..FFDC ; XID_Start # Lo [3] HALFWIDTH HANGUL LETTER EU..HALFWIDTH HANGU ++ 30FF ; XID_Continue # Lo KATAKANA DIGRAPH KOTO ++ 3105..312F ; XID_Continue # Lo [43] BOPOMOFO LETTER B..BOPOMOFO LETTER NN ++ 3131..318E ; XID_Continue # Lo [94] HANGUL LETTER KIYEOK..HANGUL LETTER ARAEAE ++-31A0..31BA ; XID_Continue # Lo [27] BOPOMOFO LETTER BU..BOPOMOFO LETTER ZY +++31A0..31BF ; XID_Continue # Lo [32] BOPOMOFO LETTER BU..BOPOMOFO LETTER AH ++ 31F0..31FF ; XID_Continue # Lo [16] KATAKANA LETTER SMALL KU..KATAKANA LETTER SMALL RO ++-3400..4DB5 ; XID_Continue # Lo [6582] CJK UNIFIED IDEOGRAPH-3400..CJK UNIFIED IDEOGRAPH-4DB5 ++-4E00..9FEF ; XID_Continue # Lo [20976] CJK UNIFIED IDEOGRAPH-4E00..CJK UNIFIED IDEOGRAPH-9FEF +++3400..4DBF ; XID_Continue # Lo [6592] CJK UNIFIED IDEOGRAPH-3400..CJK UNIFIED IDEOGRAPH-4DBF +++4E00..9FFC ; XID_Continue # Lo [20989] CJK UNIFIED IDEOGRAPH-4E00..CJK UNIFIED IDEOGRAPH-9FFC ++ A000..A014 ; XID_Continue # Lo [21] YI SYLLABLE IT..YI SYLLABLE E ++ A015 ; XID_Continue # Lm YI SYLLABLE WU ++ A016..A48C ; XID_Continue # Lo [1143] YI SYLLABLE BIT..YI SYLLABLE YYR ++@@ -9191,7 +9311,8 @@ A788 ; XID_Continue # Lm MODIFIER LETTER LOW CIRCUMFLEX ACCENT ++ A78B..A78E ; XID_Continue # L& [4] LATIN CAPITAL LETTER SALTILLO..LATIN SMALL LETTER L WITH RETROFLEX HOOK AND BELT ++ A78F ; XID_Continue # Lo LATIN LETTER SINOLOGICAL DOT ++ A790..A7BF ; XID_Continue # L& [48] LATIN CAPITAL LETTER N WITH DESCENDER..LATIN SMALL LETTER GLOTTAL U ++-A7C2..A7C6 ; XID_Continue # L& [5] LATIN CAPITAL LETTER ANGLICANA W..LATIN CAPITAL LETTER Z WITH PALATAL HOOK +++A7C2..A7CA ; XID_Continue # L& [9] LATIN CAPITAL LETTER ANGLICANA W..LATIN SMALL LETTER S WITH SHORT STROKE OVERLAY +++A7F5..A7F6 ; XID_Continue # L& [2] LATIN CAPITAL LETTER REVERSED HALF H..LATIN SMALL LETTER REVERSED HALF H ++ A7F7 ; XID_Continue # Lo LATIN EPIGRAPHIC LETTER SIDEWAYS I ++ A7F8..A7F9 ; XID_Continue # Lm [2] MODIFIER LETTER CAPITAL H WITH STROKE..MODIFIER LETTER SMALL LIGATURE OE ++ A7FA ; XID_Continue # L& LATIN LETTER SMALL CAPITAL TURNED M ++@@ -9205,6 +9326,7 @@ A80C..A822 ; XID_Continue # Lo [23] SYLOTI NAGRI LETTER CO..SYLOTI NAGRI LET ++ A823..A824 ; XID_Continue # Mc [2] SYLOTI NAGRI VOWEL SIGN A..SYLOTI NAGRI VOWEL SIGN I ++ A825..A826 ; XID_Continue # Mn [2] SYLOTI NAGRI VOWEL SIGN U..SYLOTI NAGRI VOWEL SIGN E ++ A827 ; XID_Continue # Mc SYLOTI NAGRI VOWEL SIGN OO +++A82C ; XID_Continue # Mn SYLOTI NAGRI SIGN ALTERNATE HASANTA ++ A840..A873 ; XID_Continue # Lo [52] PHAGS-PA LETTER KA..PHAGS-PA LETTER CANDRABINDU ++ A880..A881 ; XID_Continue # Mc [2] SAURASHTRA SIGN ANUSVARA..SAURASHTRA SIGN VISARGA ++ A882..A8B3 ; XID_Continue # Lo [50] SAURASHTRA LETTER A..SAURASHTRA LETTER LLA ++@@ -9287,7 +9409,8 @@ AB20..AB26 ; XID_Continue # Lo [7] ETHIOPIC SYLLABLE CCHHA..ETHIOPIC SYLLAB ++ AB28..AB2E ; XID_Continue # Lo [7] ETHIOPIC SYLLABLE BBA..ETHIOPIC SYLLABLE BBO ++ AB30..AB5A ; XID_Continue # L& [43] LATIN SMALL LETTER BARRED ALPHA..LATIN SMALL LETTER Y WITH SHORT RIGHT LEG ++ AB5C..AB5F ; XID_Continue # Lm [4] MODIFIER LETTER SMALL HENG..MODIFIER LETTER SMALL U WITH LEFT HOOK ++-AB60..AB67 ; XID_Continue # L& [8] LATIN SMALL LETTER SAKHA YAT..LATIN SMALL LETTER TS DIGRAPH WITH RETROFLEX HOOK +++AB60..AB68 ; XID_Continue # L& [9] LATIN SMALL LETTER SAKHA YAT..LATIN SMALL LETTER TURNED R WITH MIDDLE TILDE +++AB69 ; XID_Continue # Lm MODIFIER LETTER SMALL TURNED W ++ AB70..ABBF ; XID_Continue # L& [80] CHEROKEE SMALL LETTER A..CHEROKEE SMALL LETTER YA ++ ABC0..ABE2 ; XID_Continue # Lo [35] MEETEI MAYEK LETTER KOK..MEETEI MAYEK LETTER I LONSUM ++ ABE3..ABE4 ; XID_Continue # Mc [2] MEETEI MAYEK VOWEL SIGN ONAP..MEETEI MAYEK VOWEL SIGN INAP ++@@ -9414,10 +9537,14 @@ FFDA..FFDC ; XID_Continue # Lo [3] HALFWIDTH HANGUL LETTER EU..HALFWIDTH HA ++ 10D00..10D23 ; XID_Continue # Lo [36] HANIFI ROHINGYA LETTER A..HANIFI ROHINGYA MARK NA KHONNA ++ 10D24..10D27 ; XID_Continue # Mn [4] HANIFI ROHINGYA SIGN HARBAHAY..HANIFI ROHINGYA SIGN TASSI ++ 10D30..10D39 ; XID_Continue # Nd [10] HANIFI ROHINGYA DIGIT ZERO..HANIFI ROHINGYA DIGIT NINE +++10E80..10EA9 ; XID_Continue # Lo [42] YEZIDI LETTER ELIF..YEZIDI LETTER ET +++10EAB..10EAC ; XID_Continue # Mn [2] YEZIDI COMBINING HAMZA MARK..YEZIDI COMBINING MADDA MARK +++10EB0..10EB1 ; XID_Continue # Lo [2] YEZIDI LETTER LAM WITH DOT ABOVE..YEZIDI LETTER YOT WITH CIRCUMFLEX ABOVE ++ 10F00..10F1C ; XID_Continue # Lo [29] OLD SOGDIAN LETTER ALEPH..OLD SOGDIAN LETTER FINAL TAW WITH VERTICAL TAIL ++ 10F27 ; XID_Continue # Lo OLD SOGDIAN LIGATURE AYIN-DALETH ++ 10F30..10F45 ; XID_Continue # Lo [22] SOGDIAN LETTER ALEPH..SOGDIAN INDEPENDENT SHIN ++ 10F46..10F50 ; XID_Continue # Mn [11] SOGDIAN COMBINING DOT BELOW..SOGDIAN COMBINING STROKE BELOW +++10FB0..10FC4 ; XID_Continue # Lo [21] CHORASMIAN LETTER ALEPH..CHORASMIAN LETTER TAW ++ 10FE0..10FF6 ; XID_Continue # Lo [23] ELYMAIC LETTER ALEPH..ELYMAIC LIGATURE ZAYIN-YODH ++ 11000 ; XID_Continue # Mc BRAHMI SIGN CANDRABINDU ++ 11001 ; XID_Continue # Mn BRAHMI SIGN ANUSVARA ++@@ -9442,6 +9569,7 @@ FFDA..FFDC ; XID_Continue # Lo [3] HALFWIDTH HANGUL LETTER EU..HALFWIDTH HA ++ 11136..1113F ; XID_Continue # Nd [10] CHAKMA DIGIT ZERO..CHAKMA DIGIT NINE ++ 11144 ; XID_Continue # Lo CHAKMA LETTER LHAA ++ 11145..11146 ; XID_Continue # Mc [2] CHAKMA VOWEL SIGN AA..CHAKMA VOWEL SIGN EI +++11147 ; XID_Continue # Lo CHAKMA LETTER VAA ++ 11150..11172 ; XID_Continue # Lo [35] MAHAJANI LETTER A..MAHAJANI LETTER RRA ++ 11173 ; XID_Continue # Mn MAHAJANI SIGN NUKTA ++ 11176 ; XID_Continue # Lo MAHAJANI LIGATURE SHRI ++@@ -9453,6 +9581,8 @@ FFDA..FFDC ; XID_Continue # Lo [3] HALFWIDTH HANGUL LETTER EU..HALFWIDTH HA ++ 111BF..111C0 ; XID_Continue # Mc [2] SHARADA VOWEL SIGN AU..SHARADA SIGN VIRAMA ++ 111C1..111C4 ; XID_Continue # Lo [4] SHARADA SIGN AVAGRAHA..SHARADA OM ++ 111C9..111CC ; XID_Continue # Mn [4] SHARADA SANDHI MARK..SHARADA EXTRA SHORT VOWEL MARK +++111CE ; XID_Continue # Mc SHARADA VOWEL SIGN PRISHTHAMATRA E +++111CF ; XID_Continue # Mn SHARADA SIGN INVERTED CANDRABINDU ++ 111D0..111D9 ; XID_Continue # Nd [10] SHARADA DIGIT ZERO..SHARADA DIGIT NINE ++ 111DA ; XID_Continue # Lo SHARADA EKAM ++ 111DC ; XID_Continue # Lo SHARADA HEADSTROKE ++@@ -9506,7 +9636,7 @@ FFDA..FFDC ; XID_Continue # Lo [3] HALFWIDTH HANGUL LETTER EU..HALFWIDTH HA ++ 11447..1144A ; XID_Continue # Lo [4] NEWA SIGN AVAGRAHA..NEWA SIDDHI ++ 11450..11459 ; XID_Continue # Nd [10] NEWA DIGIT ZERO..NEWA DIGIT NINE ++ 1145E ; XID_Continue # Mn NEWA SANDHI MARK ++-1145F ; XID_Continue # Lo NEWA LETTER VEDIC ANUSVARA +++1145F..11461 ; XID_Continue # Lo [3] NEWA LETTER VEDIC ANUSVARA..NEWA SIGN UPADHMANIYA ++ 11480..114AF ; XID_Continue # Lo [48] TIRHUTA ANJI..TIRHUTA LETTER HA ++ 114B0..114B2 ; XID_Continue # Mc [3] TIRHUTA VOWEL SIGN AA..TIRHUTA VOWEL SIGN II ++ 114B3..114B8 ; XID_Continue # Mn [6] TIRHUTA VOWEL SIGN U..TIRHUTA VOWEL SIGN VOCALIC LL ++@@ -9561,7 +9691,22 @@ FFDA..FFDC ; XID_Continue # Lo [3] HALFWIDTH HANGUL LETTER EU..HALFWIDTH HA ++ 11839..1183A ; XID_Continue # Mn [2] DOGRA SIGN VIRAMA..DOGRA SIGN NUKTA ++ 118A0..118DF ; XID_Continue # L& [64] WARANG CITI CAPITAL LETTER NGAA..WARANG CITI SMALL LETTER VIYO ++ 118E0..118E9 ; XID_Continue # Nd [10] WARANG CITI DIGIT ZERO..WARANG CITI DIGIT NINE ++-118FF ; XID_Continue # Lo WARANG CITI OM +++118FF..11906 ; XID_Continue # Lo [8] WARANG CITI OM..DIVES AKURU LETTER E +++11909 ; XID_Continue # Lo DIVES AKURU LETTER O +++1190C..11913 ; XID_Continue # Lo [8] DIVES AKURU LETTER KA..DIVES AKURU LETTER JA +++11915..11916 ; XID_Continue # Lo [2] DIVES AKURU LETTER NYA..DIVES AKURU LETTER TTA +++11918..1192F ; XID_Continue # Lo [24] DIVES AKURU LETTER DDA..DIVES AKURU LETTER ZA +++11930..11935 ; XID_Continue # Mc [6] DIVES AKURU VOWEL SIGN AA..DIVES AKURU VOWEL SIGN E +++11937..11938 ; XID_Continue # Mc [2] DIVES AKURU VOWEL SIGN AI..DIVES AKURU VOWEL SIGN O +++1193B..1193C ; XID_Continue # Mn [2] DIVES AKURU SIGN ANUSVARA..DIVES AKURU SIGN CANDRABINDU +++1193D ; XID_Continue # Mc DIVES AKURU SIGN HALANTA +++1193E ; XID_Continue # Mn DIVES AKURU VIRAMA +++1193F ; XID_Continue # Lo DIVES AKURU PREFIXED NASAL SIGN +++11940 ; XID_Continue # Mc DIVES AKURU MEDIAL YA +++11941 ; XID_Continue # Lo DIVES AKURU INITIAL RA +++11942 ; XID_Continue # Mc DIVES AKURU MEDIAL RA +++11943 ; XID_Continue # Mn DIVES AKURU SIGN NUKTA +++11950..11959 ; XID_Continue # Nd [10] DIVES AKURU DIGIT ZERO..DIVES AKURU DIGIT NINE ++ 119A0..119A7 ; XID_Continue # Lo [8] NANDINAGARI LETTER A..NANDINAGARI LETTER VOCALIC RR ++ 119AA..119D0 ; XID_Continue # Lo [39] NANDINAGARI LETTER E..NANDINAGARI LETTER RRA ++ 119D1..119D3 ; XID_Continue # Mc [3] NANDINAGARI VOWEL SIGN AA..NANDINAGARI VOWEL SIGN II ++@@ -9631,6 +9776,7 @@ FFDA..FFDC ; XID_Continue # Lo [3] HALFWIDTH HANGUL LETTER EU..HALFWIDTH HA ++ 11EE0..11EF2 ; XID_Continue # Lo [19] MAKASAR LETTER KA..MAKASAR ANGKA ++ 11EF3..11EF4 ; XID_Continue # Mn [2] MAKASAR VOWEL SIGN I..MAKASAR VOWEL SIGN U ++ 11EF5..11EF6 ; XID_Continue # Mc [2] MAKASAR VOWEL SIGN E..MAKASAR VOWEL SIGN O +++11FB0 ; XID_Continue # Lo LISU LETTER YHA ++ 12000..12399 ; XID_Continue # Lo [922] CUNEIFORM SIGN A..CUNEIFORM SIGN U U ++ 12400..1246E ; XID_Continue # Nl [111] CUNEIFORM NUMERIC SIGN TWO ASH..CUNEIFORM NUMERIC SIGN NINE U VARIANT FORM ++ 12480..12543 ; XID_Continue # Lo [196] CUNEIFORM SIGN AB TIMES NUN TENU..CUNEIFORM SIGN ZU5 TIMES THREE DISH TENU ++@@ -9656,8 +9802,11 @@ FFDA..FFDC ; XID_Continue # Lo [3] HALFWIDTH HANGUL LETTER EU..HALFWIDTH HA ++ 16F93..16F9F ; XID_Continue # Lm [13] MIAO LETTER TONE-2..MIAO LETTER REFORMED TONE-8 ++ 16FE0..16FE1 ; XID_Continue # Lm [2] TANGUT ITERATION MARK..NUSHU ITERATION MARK ++ 16FE3 ; XID_Continue # Lm OLD CHINESE ITERATION MARK +++16FE4 ; XID_Continue # Mn KHITAN SMALL SCRIPT FILLER +++16FF0..16FF1 ; XID_Continue # Mc [2] VIETNAMESE ALTERNATE READING MARK CA..VIETNAMESE ALTERNATE READING MARK NHAY ++ 17000..187F7 ; XID_Continue # Lo [6136] TANGUT IDEOGRAPH-17000..TANGUT IDEOGRAPH-187F7 ++-18800..18AF2 ; XID_Continue # Lo [755] TANGUT COMPONENT-001..TANGUT COMPONENT-755 +++18800..18CD5 ; XID_Continue # Lo [1238] TANGUT COMPONENT-001..KHITAN SMALL SCRIPT CHARACTER-18CD5 +++18D00..18D08 ; XID_Continue # Lo [9] TANGUT IDEOGRAPH-18D00..TANGUT IDEOGRAPH-18D08 ++ 1B000..1B11E ; XID_Continue # Lo [287] KATAKANA LETTER ARCHAIC E..HENTAIGANA LETTER N-MU-MO-2 ++ 1B150..1B152 ; XID_Continue # Lo [3] HIRAGANA LETTER SMALL WI..HIRAGANA LETTER SMALL WO ++ 1B164..1B167 ; XID_Continue # Lo [4] KATAKANA LETTER SMALL WI..KATAKANA LETTER SMALL N ++@@ -9763,15 +9912,17 @@ FFDA..FFDC ; XID_Continue # Lo [3] HALFWIDTH HANGUL LETTER EU..HALFWIDTH HA ++ 1EEA1..1EEA3 ; XID_Continue # Lo [3] ARABIC MATHEMATICAL DOUBLE-STRUCK BEH..ARABIC MATHEMATICAL DOUBLE-STRUCK DAL ++ 1EEA5..1EEA9 ; XID_Continue # Lo [5] ARABIC MATHEMATICAL DOUBLE-STRUCK WAW..ARABIC MATHEMATICAL DOUBLE-STRUCK YEH ++ 1EEAB..1EEBB ; XID_Continue # Lo [17] ARABIC MATHEMATICAL DOUBLE-STRUCK LAM..ARABIC MATHEMATICAL DOUBLE-STRUCK GHAIN ++-20000..2A6D6 ; XID_Continue # Lo [42711] CJK UNIFIED IDEOGRAPH-20000..CJK UNIFIED IDEOGRAPH-2A6D6 +++1FBF0..1FBF9 ; XID_Continue # Nd [10] SEGMENTED DIGIT ZERO..SEGMENTED DIGIT NINE +++20000..2A6DD ; XID_Continue # Lo [42718] CJK UNIFIED IDEOGRAPH-20000..CJK UNIFIED IDEOGRAPH-2A6DD ++ 2A700..2B734 ; XID_Continue # Lo [4149] CJK UNIFIED IDEOGRAPH-2A700..CJK UNIFIED IDEOGRAPH-2B734 ++ 2B740..2B81D ; XID_Continue # Lo [222] CJK UNIFIED IDEOGRAPH-2B740..CJK UNIFIED IDEOGRAPH-2B81D ++ 2B820..2CEA1 ; XID_Continue # Lo [5762] CJK UNIFIED IDEOGRAPH-2B820..CJK UNIFIED IDEOGRAPH-2CEA1 ++ 2CEB0..2EBE0 ; XID_Continue # Lo [7473] CJK UNIFIED IDEOGRAPH-2CEB0..CJK UNIFIED IDEOGRAPH-2EBE0 ++ 2F800..2FA1D ; XID_Continue # Lo [542] CJK COMPATIBILITY IDEOGRAPH-2F800..CJK COMPATIBILITY IDEOGRAPH-2FA1D +++30000..3134A ; XID_Continue # Lo [4939] CJK UNIFIED IDEOGRAPH-30000..CJK UNIFIED IDEOGRAPH-3134A ++ E0100..E01EF ; XID_Continue # Mn [240] VARIATION SELECTOR-17..VARIATION SELECTOR-256 ++ ++-# Total code points: 128770 +++# Total code points: 134415 ++ ++ # ================================================ ++ ++@@ -9883,7 +10034,7 @@ E01F0..E0FFF ; Default_Ignorable_Code_Point # Cn [3600] ........ +++3400..4DBF;W # Lo [6592] CJK UNIFIED IDEOGRAPH-3400..CJK UNIFIED IDEOGRAPH-4DBF ++ 4DC0..4DFF;N # So [64] HEXAGRAM FOR THE CREATIVE HEAVEN..HEXAGRAM FOR BEFORE COMPLETION ++-4E00..9FEF;W # Lo [20976] CJK UNIFIED IDEOGRAPH-4E00..CJK UNIFIED IDEOGRAPH-9FEF ++-9FF0..9FFF;W # Cn [16] .. +++4E00..9FFC;W # Lo [20989] CJK UNIFIED IDEOGRAPH-4E00..CJK UNIFIED IDEOGRAPH-9FFC +++9FFD..9FFF;W # Cn [3] .. ++ A000..A014;W # Lo [21] YI SYLLABLE IT..YI SYLLABLE E ++ A015;W # Lm YI SYLLABLE WU ++ A016..A48C;W # Lo [1143] YI SYLLABLE BIT..YI SYLLABLE YYR ++@@ -1523,7 +1526,8 @@ A789..A78A;N # Sk [2] MODIFIER LETTER COLON..MODIFIER LETTER SHORT EQUAL ++ A78B..A78E;N # L& [4] LATIN CAPITAL LETTER SALTILLO..LATIN SMALL LETTER L WITH RETROFLEX HOOK AND BELT ++ A78F;N # Lo LATIN LETTER SINOLOGICAL DOT ++ A790..A7BF;N # L& [48] LATIN CAPITAL LETTER N WITH DESCENDER..LATIN SMALL LETTER GLOTTAL U ++-A7C2..A7C6;N # L& [5] LATIN CAPITAL LETTER ANGLICANA W..LATIN CAPITAL LETTER Z WITH PALATAL HOOK +++A7C2..A7CA;N # L& [9] LATIN CAPITAL LETTER ANGLICANA W..LATIN SMALL LETTER S WITH SHORT STROKE OVERLAY +++A7F5..A7F6;N # L& [2] LATIN CAPITAL LETTER REVERSED HALF H..LATIN SMALL LETTER REVERSED HALF H ++ A7F7;N # Lo LATIN EPIGRAPHIC LETTER SIDEWAYS I ++ A7F8..A7F9;N # Lm [2] MODIFIER LETTER CAPITAL H WITH STROKE..MODIFIER LETTER SMALL LIGATURE OE ++ A7FA;N # Ll LATIN LETTER SMALL CAPITAL TURNED M ++@@ -1539,6 +1543,7 @@ A823..A824;N # Mc [2] SYLOTI NAGRI VOWEL SIGN A..SYLOTI NAGRI VOWEL SIGN ++ A825..A826;N # Mn [2] SYLOTI NAGRI VOWEL SIGN U..SYLOTI NAGRI VOWEL SIGN E ++ A827;N # Mc SYLOTI NAGRI VOWEL SIGN OO ++ A828..A82B;N # So [4] SYLOTI NAGRI POETRY MARK-1..SYLOTI NAGRI POETRY MARK-4 +++A82C;N # Mn SYLOTI NAGRI SIGN ALTERNATE HASANTA ++ A830..A835;N # No [6] NORTH INDIC FRACTION ONE QUARTER..NORTH INDIC FRACTION THREE SIXTEENTHS ++ A836..A837;N # So [2] NORTH INDIC QUARTER MARK..NORTH INDIC PLACEHOLDER MARK ++ A838;N # Sc NORTH INDIC RUPEE MARK ++@@ -1639,7 +1644,9 @@ AB28..AB2E;N # Lo [7] ETHIOPIC SYLLABLE BBA..ETHIOPIC SYLLABLE BBO ++ AB30..AB5A;N # Ll [43] LATIN SMALL LETTER BARRED ALPHA..LATIN SMALL LETTER Y WITH SHORT RIGHT LEG ++ AB5B;N # Sk MODIFIER BREVE WITH INVERTED BREVE ++ AB5C..AB5F;N # Lm [4] MODIFIER LETTER SMALL HENG..MODIFIER LETTER SMALL U WITH LEFT HOOK ++-AB60..AB67;N # Ll [8] LATIN SMALL LETTER SAKHA YAT..LATIN SMALL LETTER TS DIGRAPH WITH RETROFLEX HOOK +++AB60..AB68;N # Ll [9] LATIN SMALL LETTER SAKHA YAT..LATIN SMALL LETTER TURNED R WITH MIDDLE TILDE +++AB69;N # Lm MODIFIER LETTER SMALL TURNED W +++AB6A..AB6B;N # Sk [2] MODIFIER LETTER LEFT TACK..MODIFIER LETTER RIGHT TACK ++ AB70..ABBF;N # Ll [80] CHEROKEE SMALL LETTER A..CHEROKEE SMALL LETTER YA ++ ABC0..ABE2;N # Lo [35] MEETEI MAYEK LETTER KOK..MEETEI MAYEK LETTER I LONSUM ++ ABE3..ABE4;N # Mc [2] MEETEI MAYEK VOWEL SIGN ONAP..MEETEI MAYEK VOWEL SIGN INAP ++@@ -1800,7 +1807,7 @@ FFFD;A # So REPLACEMENT CHARACTER ++ 10179..10189;N # So [17] GREEK YEAR SIGN..GREEK TRYBLION BASE SIGN ++ 1018A..1018B;N # No [2] GREEK ZERO SIGN..GREEK ONE QUARTER SIGN ++ 1018C..1018E;N # So [3] GREEK SINUSOID SIGN..NOMISMA SIGN ++-10190..1019B;N # So [12] ROMAN SEXTANS SIGN..ROMAN CENTURIAL SIGN +++10190..1019C;N # So [13] ROMAN SEXTANS SIGN..ASCIA SYMBOL ++ 101A0;N # So GREEK SYMBOL TAU RHO ++ 101D0..101FC;N # So [45] PHAISTOS DISC SIGN PEDESTRIAN..PHAISTOS DISC SIGN WAVY BAND ++ 101FD;N # Mn PHAISTOS DISC SIGN COMBINING OBLIQUE STROKE ++@@ -1902,6 +1909,10 @@ FFFD;A # So REPLACEMENT CHARACTER ++ 10D24..10D27;N # Mn [4] HANIFI ROHINGYA SIGN HARBAHAY..HANIFI ROHINGYA SIGN TASSI ++ 10D30..10D39;N # Nd [10] HANIFI ROHINGYA DIGIT ZERO..HANIFI ROHINGYA DIGIT NINE ++ 10E60..10E7E;N # No [31] RUMI DIGIT ONE..RUMI FRACTION TWO THIRDS +++10E80..10EA9;N # Lo [42] YEZIDI LETTER ELIF..YEZIDI LETTER ET +++10EAB..10EAC;N # Mn [2] YEZIDI COMBINING HAMZA MARK..YEZIDI COMBINING MADDA MARK +++10EAD;N # Pd YEZIDI HYPHENATION MARK +++10EB0..10EB1;N # Lo [2] YEZIDI LETTER LAM WITH DOT ABOVE..YEZIDI LETTER YOT WITH CIRCUMFLEX ABOVE ++ 10F00..10F1C;N # Lo [29] OLD SOGDIAN LETTER ALEPH..OLD SOGDIAN LETTER FINAL TAW WITH VERTICAL TAIL ++ 10F1D..10F26;N # No [10] OLD SOGDIAN NUMBER ONE..OLD SOGDIAN FRACTION ONE HALF ++ 10F27;N # Lo OLD SOGDIAN LIGATURE AYIN-DALETH ++@@ -1909,6 +1920,8 @@ FFFD;A # So REPLACEMENT CHARACTER ++ 10F46..10F50;N # Mn [11] SOGDIAN COMBINING DOT BELOW..SOGDIAN COMBINING STROKE BELOW ++ 10F51..10F54;N # No [4] SOGDIAN NUMBER ONE..SOGDIAN NUMBER ONE HUNDRED ++ 10F55..10F59;N # Po [5] SOGDIAN PUNCTUATION TWO VERTICAL BARS..SOGDIAN PUNCTUATION HALF CIRCLE WITH DOT +++10FB0..10FC4;N # Lo [21] CHORASMIAN LETTER ALEPH..CHORASMIAN LETTER TAW +++10FC5..10FCB;N # No [7] CHORASMIAN NUMBER ONE..CHORASMIAN NUMBER ONE HUNDRED ++ 10FE0..10FF6;N # Lo [23] ELYMAIC LETTER ALEPH..ELYMAIC LIGATURE ZAYIN-YODH ++ 11000;N # Mc BRAHMI SIGN CANDRABINDU ++ 11001;N # Mn BRAHMI SIGN ANUSVARA ++@@ -1941,6 +1954,7 @@ FFFD;A # So REPLACEMENT CHARACTER ++ 11140..11143;N # Po [4] CHAKMA SECTION MARK..CHAKMA QUESTION MARK ++ 11144;N # Lo CHAKMA LETTER LHAA ++ 11145..11146;N # Mc [2] CHAKMA VOWEL SIGN AA..CHAKMA VOWEL SIGN EI +++11147;N # Lo CHAKMA LETTER VAA ++ 11150..11172;N # Lo [35] MAHAJANI LETTER A..MAHAJANI LETTER RRA ++ 11173;N # Mn MAHAJANI SIGN NUKTA ++ 11174..11175;N # Po [2] MAHAJANI ABBREVIATION SIGN..MAHAJANI SECTION MARK ++@@ -1955,6 +1969,8 @@ FFFD;A # So REPLACEMENT CHARACTER ++ 111C5..111C8;N # Po [4] SHARADA DANDA..SHARADA SEPARATOR ++ 111C9..111CC;N # Mn [4] SHARADA SANDHI MARK..SHARADA EXTRA SHORT VOWEL MARK ++ 111CD;N # Po SHARADA SUTRA MARK +++111CE;N # Mc SHARADA VOWEL SIGN PRISHTHAMATRA E +++111CF;N # Mn SHARADA SIGN INVERTED CANDRABINDU ++ 111D0..111D9;N # Nd [10] SHARADA DIGIT ZERO..SHARADA DIGIT NINE ++ 111DA;N # Lo SHARADA EKAM ++ 111DB;N # Po SHARADA SIGN SIDDHAM ++@@ -2013,10 +2029,10 @@ FFFD;A # So REPLACEMENT CHARACTER ++ 11447..1144A;N # Lo [4] NEWA SIGN AVAGRAHA..NEWA SIDDHI ++ 1144B..1144F;N # Po [5] NEWA DANDA..NEWA ABBREVIATION SIGN ++ 11450..11459;N # Nd [10] NEWA DIGIT ZERO..NEWA DIGIT NINE ++-1145B;N # Po NEWA PLACEHOLDER MARK +++1145A..1145B;N # Po [2] NEWA DOUBLE COMMA..NEWA PLACEHOLDER MARK ++ 1145D;N # Po NEWA INSERTION SIGN ++ 1145E;N # Mn NEWA SANDHI MARK ++-1145F;N # Lo NEWA LETTER VEDIC ANUSVARA +++1145F..11461;N # Lo [3] NEWA LETTER VEDIC ANUSVARA..NEWA SIGN UPADHMANIYA ++ 11480..114AF;N # Lo [48] TIRHUTA ANJI..TIRHUTA LETTER HA ++ 114B0..114B2;N # Mc [3] TIRHUTA VOWEL SIGN AA..TIRHUTA VOWEL SIGN II ++ 114B3..114B8;N # Mn [6] TIRHUTA VOWEL SIGN U..TIRHUTA VOWEL SIGN VOCALIC LL ++@@ -2081,6 +2097,23 @@ FFFD;A # So REPLACEMENT CHARACTER ++ 118E0..118E9;N # Nd [10] WARANG CITI DIGIT ZERO..WARANG CITI DIGIT NINE ++ 118EA..118F2;N # No [9] WARANG CITI NUMBER TEN..WARANG CITI NUMBER NINETY ++ 118FF;N # Lo WARANG CITI OM +++11900..11906;N # Lo [7] DIVES AKURU LETTER A..DIVES AKURU LETTER E +++11909;N # Lo DIVES AKURU LETTER O +++1190C..11913;N # Lo [8] DIVES AKURU LETTER KA..DIVES AKURU LETTER JA +++11915..11916;N # Lo [2] DIVES AKURU LETTER NYA..DIVES AKURU LETTER TTA +++11918..1192F;N # Lo [24] DIVES AKURU LETTER DDA..DIVES AKURU LETTER ZA +++11930..11935;N # Mc [6] DIVES AKURU VOWEL SIGN AA..DIVES AKURU VOWEL SIGN E +++11937..11938;N # Mc [2] DIVES AKURU VOWEL SIGN AI..DIVES AKURU VOWEL SIGN O +++1193B..1193C;N # Mn [2] DIVES AKURU SIGN ANUSVARA..DIVES AKURU SIGN CANDRABINDU +++1193D;N # Mc DIVES AKURU SIGN HALANTA +++1193E;N # Mn DIVES AKURU VIRAMA +++1193F;N # Lo DIVES AKURU PREFIXED NASAL SIGN +++11940;N # Mc DIVES AKURU MEDIAL YA +++11941;N # Lo DIVES AKURU INITIAL RA +++11942;N # Mc DIVES AKURU MEDIAL RA +++11943;N # Mn DIVES AKURU SIGN NUKTA +++11944..11946;N # Po [3] DIVES AKURU DOUBLE DANDA..DIVES AKURU END OF TEXT MARK +++11950..11959;N # Nd [10] DIVES AKURU DIGIT ZERO..DIVES AKURU DIGIT NINE ++ 119A0..119A7;N # Lo [8] NANDINAGARI LETTER A..NANDINAGARI LETTER VOCALIC RR ++ 119AA..119D0;N # Lo [39] NANDINAGARI LETTER E..NANDINAGARI LETTER RRA ++ 119D1..119D3;N # Mc [3] NANDINAGARI VOWEL SIGN AA..NANDINAGARI VOWEL SIGN II ++@@ -2158,6 +2191,7 @@ FFFD;A # So REPLACEMENT CHARACTER ++ 11EF3..11EF4;N # Mn [2] MAKASAR VOWEL SIGN I..MAKASAR VOWEL SIGN U ++ 11EF5..11EF6;N # Mc [2] MAKASAR VOWEL SIGN E..MAKASAR VOWEL SIGN O ++ 11EF7..11EF8;N # Po [2] MAKASAR PASSIMBANG..MAKASAR END OF SECTION +++11FB0;N # Lo LISU LETTER YHA ++ 11FC0..11FD4;N # No [21] TAMIL FRACTION ONE THREE-HUNDRED-AND-TWENTIETH..TAMIL FRACTION DOWNSCALING FACTOR KIIZH ++ 11FD5..11FDC;N # So [8] TAMIL SIGN NEL..TAMIL SIGN MUKKURUNI ++ 11FDD..11FE0;N # Sc [4] TAMIL SIGN KAACU..TAMIL SIGN VARAAKAN ++@@ -2200,8 +2234,12 @@ FFFD;A # So REPLACEMENT CHARACTER ++ 16FE0..16FE1;W # Lm [2] TANGUT ITERATION MARK..NUSHU ITERATION MARK ++ 16FE2;W # Po OLD CHINESE HOOK MARK ++ 16FE3;W # Lm OLD CHINESE ITERATION MARK +++16FE4;W # Mn KHITAN SMALL SCRIPT FILLER +++16FF0..16FF1;W # Mc [2] VIETNAMESE ALTERNATE READING MARK CA..VIETNAMESE ALTERNATE READING MARK NHAY ++ 17000..187F7;W # Lo [6136] TANGUT IDEOGRAPH-17000..TANGUT IDEOGRAPH-187F7 ++-18800..18AF2;W # Lo [755] TANGUT COMPONENT-001..TANGUT COMPONENT-755 +++18800..18AFF;W # Lo [768] TANGUT COMPONENT-001..TANGUT COMPONENT-768 +++18B00..18CD5;W # Lo [470] KHITAN SMALL SCRIPT CHARACTER-18B00..KHITAN SMALL SCRIPT CHARACTER-18CD5 +++18D00..18D08;W # Lo [9] TANGUT IDEOGRAPH-18D00..TANGUT IDEOGRAPH-18D08 ++ 1B000..1B0FF;W # Lo [256] KATAKANA LETTER ARCHAIC E..HENTAIGANA LETTER RE-2 ++ 1B100..1B11E;W # Lo [31] HENTAIGANA LETTER RE-3..HENTAIGANA LETTER N-MU-MO-2 ++ 1B150..1B152;W # Lo [3] HIRAGANA LETTER SMALL WI..HIRAGANA LETTER SMALL WO ++@@ -2364,15 +2402,17 @@ FFFD;A # So REPLACEMENT CHARACTER ++ 1F0D1..1F0F5;N # So [37] PLAYING CARD ACE OF CLUBS..PLAYING CARD TRUMP-21 ++ 1F100..1F10A;A # No [11] DIGIT ZERO FULL STOP..DIGIT NINE COMMA ++ 1F10B..1F10C;N # No [2] DINGBAT CIRCLED SANS-SERIF DIGIT ZERO..DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT ZERO +++1F10D..1F10F;N # So [3] CIRCLED ZERO WITH SLASH..CIRCLED DOLLAR SIGN WITH OVERLAID BACKSLASH ++ 1F110..1F12D;A # So [30] PARENTHESIZED LATIN CAPITAL LETTER A..CIRCLED CD ++ 1F12E..1F12F;N # So [2] CIRCLED WZ..COPYLEFT SYMBOL ++ 1F130..1F169;A # So [58] SQUARED LATIN CAPITAL LETTER A..NEGATIVE CIRCLED LATIN CAPITAL LETTER Z ++-1F16A..1F16C;N # So [3] RAISED MC SIGN..RAISED MR SIGN +++1F16A..1F16F;N # So [6] RAISED MC SIGN..CIRCLED HUMAN FIGURE ++ 1F170..1F18D;A # So [30] NEGATIVE SQUARED LATIN CAPITAL LETTER A..NEGATIVE SQUARED SA ++ 1F18E;W # So NEGATIVE SQUARED AB ++ 1F18F..1F190;A # So [2] NEGATIVE SQUARED WC..SQUARE DJ ++ 1F191..1F19A;W # So [10] SQUARED CL..SQUARED VS ++ 1F19B..1F1AC;A # So [18] SQUARED THREE D..SQUARED VOD +++1F1AD;N # So MASK WORK SYMBOL ++ 1F1E6..1F1FF;N # So [26] REGIONAL INDICATOR SYMBOL LETTER A..REGIONAL INDICATOR SYMBOL LETTER Z ++ 1F200..1F202;W # So [3] SQUARE HIRAGANA HOKA..SQUARED KATAKANA SA ++ 1F210..1F23B;W # So [44] SQUARED CJK UNIFIED IDEOGRAPH-624B..SQUARED CJK UNIFIED IDEOGRAPH-914D ++@@ -2424,11 +2464,11 @@ FFFD;A # So REPLACEMENT CHARACTER ++ 1F6CD..1F6CF;N # So [3] SHOPPING BAGS..BED ++ 1F6D0..1F6D2;W # So [3] PLACE OF WORSHIP..SHOPPING TROLLEY ++ 1F6D3..1F6D4;N # So [2] STUPA..PAGODA ++-1F6D5;W # So HINDU TEMPLE +++1F6D5..1F6D7;W # So [3] HINDU TEMPLE..ELEVATOR ++ 1F6E0..1F6EA;N # So [11] HAMMER AND WRENCH..NORTHEAST-POINTING AIRPLANE ++ 1F6EB..1F6EC;W # So [2] AIRPLANE DEPARTURE..AIRPLANE ARRIVING ++ 1F6F0..1F6F3;N # So [4] SATELLITE..PASSENGER SHIP ++-1F6F4..1F6FA;W # So [7] SCOOTER..AUTO RICKSHAW +++1F6F4..1F6FC;W # So [9] SCOOTER..ROLLER SKATE ++ 1F700..1F773;N # So [116] ALCHEMICAL SYMBOL FOR QUINTESSENCE..ALCHEMICAL SYMBOL FOR HALF OUNCE ++ 1F780..1F7D8;N # So [89] BLACK LEFT-POINTING ISOSCELES RIGHT TRIANGLE..NEGATIVE CIRCLED SQUARE ++ 1F7E0..1F7EB;W # So [12] LARGE ORANGE CIRCLE..LARGE BROWN SQUARE ++@@ -2437,21 +2477,29 @@ FFFD;A # So REPLACEMENT CHARACTER ++ 1F850..1F859;N # So [10] LEFTWARDS SANS-SERIF ARROW..UP DOWN SANS-SERIF ARROW ++ 1F860..1F887;N # So [40] WIDE-HEADED LEFTWARDS LIGHT BARB ARROW..WIDE-HEADED SOUTH WEST VERY HEAVY BARB ARROW ++ 1F890..1F8AD;N # So [30] LEFTWARDS TRIANGLE ARROWHEAD..WHITE ARROW SHAFT WIDTH TWO THIRDS +++1F8B0..1F8B1;N # So [2] ARROW POINTING UPWARDS THEN NORTH WEST..ARROW POINTING RIGHTWARDS THEN CURVING SOUTH WEST ++ 1F900..1F90B;N # So [12] CIRCLED CROSS FORMEE WITH FOUR DOTS..DOWNWARD FACING NOTCHED HOOK WITH DOT ++-1F90D..1F971;W # So [101] WHITE HEART..YAWNING FACE ++-1F973..1F976;W # So [4] FACE WITH PARTY HORN AND PARTY HAT..FREEZING FACE ++-1F97A..1F9A2;W # So [41] FACE WITH PLEADING EYES..SWAN ++-1F9A5..1F9AA;W # So [6] SLOTH..OYSTER ++-1F9AE..1F9CA;W # So [29] GUIDE DOG..ICE CUBE +++1F90C..1F93A;W # So [47] PINCHED FINGERS..FENCER +++1F93B;N # So MODERN PENTATHLON +++1F93C..1F945;W # So [10] WRESTLERS..GOAL NET +++1F946;N # So RIFLE +++1F947..1F978;W # So [50] FIRST PLACE MEDAL..DISGUISED FACE +++1F97A..1F9CB;W # So [82] FACE WITH PLEADING EYES..BUBBLE TEA ++ 1F9CD..1F9FF;W # So [51] STANDING PERSON..NAZAR AMULET ++ 1FA00..1FA53;N # So [84] NEUTRAL CHESS KING..BLACK CHESS KNIGHT-BISHOP ++ 1FA60..1FA6D;N # So [14] XIANGQI RED GENERAL..XIANGQI BLACK SOLDIER ++-1FA70..1FA73;W # So [4] BALLET SHOES..SHORTS +++1FA70..1FA74;W # So [5] BALLET SHOES..THONG SANDAL ++ 1FA78..1FA7A;W # So [3] DROP OF BLOOD..STETHOSCOPE ++-1FA80..1FA82;W # So [3] YO-YO..PARACHUTE ++-1FA90..1FA95;W # So [6] RINGED PLANET..BANJO ++-20000..2A6D6;W # Lo [42711] CJK UNIFIED IDEOGRAPH-20000..CJK UNIFIED IDEOGRAPH-2A6D6 ++-2A6D7..2A6FF;W # Cn [41] .. +++1FA80..1FA86;W # So [7] YO-YO..NESTING DOLLS +++1FA90..1FAA8;W # So [25] RINGED PLANET..ROCK +++1FAB0..1FAB6;W # So [7] FLY..FEATHER +++1FAC0..1FAC2;W # So [3] ANATOMICAL HEART..PEOPLE HUGGING +++1FAD0..1FAD6;W # So [7] BLUEBERRIES..TEAPOT +++1FB00..1FB92;N # So [147] BLOCK SEXTANT-1..UPPER HALF INVERSE MEDIUM SHADE AND LOWER HALF BLOCK +++1FB94..1FBCA;N # So [55] LEFT HALF INVERSE MEDIUM SHADE AND RIGHT HALF BLOCK..WHITE UP-POINTING CHEVRON +++1FBF0..1FBF9;N # Nd [10] SEGMENTED DIGIT ZERO..SEGMENTED DIGIT NINE +++20000..2A6DD;W # Lo [42718] CJK UNIFIED IDEOGRAPH-20000..CJK UNIFIED IDEOGRAPH-2A6DD +++2A6DE..2A6FF;W # Cn [34] .. ++ 2A700..2B734;W # Lo [4149] CJK UNIFIED IDEOGRAPH-2A700..CJK UNIFIED IDEOGRAPH-2B734 ++ 2B735..2B73F;W # Cn [11] .. ++ 2B740..2B81D;W # Lo [222] CJK UNIFIED IDEOGRAPH-2B740..CJK UNIFIED IDEOGRAPH-2B81D ++@@ -2463,7 +2511,8 @@ FFFD;A # So REPLACEMENT CHARACTER ++ 2F800..2FA1D;W # Lo [542] CJK COMPATIBILITY IDEOGRAPH-2F800..CJK COMPATIBILITY IDEOGRAPH-2FA1D ++ 2FA1E..2FA1F;W # Cn [2] .. ++ 2FA20..2FFFD;W # Cn [1502] .. ++-30000..3FFFD;W # Cn [65534] .. +++30000..3134A;W # Lo [4939] CJK UNIFIED IDEOGRAPH-30000..CJK UNIFIED IDEOGRAPH-3134A +++3134B..3FFFD;W # Cn [60595] .. ++ E0001;N # Cf LANGUAGE TAG ++ E0020..E007F;N # Cf [96] TAG SPACE..CANCEL TAG ++ E0100..E01EF;A # Mn [240] VARIATION SELECTOR-17..VARIATION SELECTOR-256 ++diff --git a/localedata/unicode-gen/Makefile b/localedata/unicode-gen/Makefile ++index a2a24f525d..4cd026188e 100644 ++--- a/localedata/unicode-gen/Makefile +++++ b/localedata/unicode-gen/Makefile ++@@ -35,7 +35,7 @@ ++ # files for making modifications. ++ ++ ++-UNICODE_VERSION = 12.1.0 +++UNICODE_VERSION = 13.0.0 ++ ++ PYTHON3 = python3 ++ WGET = wget ++diff --git a/localedata/unicode-gen/PropList.txt b/localedata/unicode-gen/PropList.txt ++index 4394602fea..7d2f44c56f 100644 ++--- a/localedata/unicode-gen/PropList.txt +++++ b/localedata/unicode-gen/PropList.txt ++@@ -1,5 +1,5 @@ ++-# PropList-12.1.0.txt ++-# Date: 2019-03-10, 10:53:16 GMT +++# PropList-13.0.0.txt +++# Date: 2019-11-27, 03:13:28 GMT ++ # © 2019 Unicode®, Inc. ++ # Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries. ++ # For terms of use, see http://www.unicode.org/terms_of_use.html ++@@ -61,8 +61,9 @@ FE31..FE32 ; Dash # Pd [2] PRESENTATION FORM FOR VERTICAL EM DASH..PRESENTA ++ FE58 ; Dash # Pd SMALL EM DASH ++ FE63 ; Dash # Pd SMALL HYPHEN-MINUS ++ FF0D ; Dash # Pd FULLWIDTH HYPHEN-MINUS +++10EAD ; Dash # Pd YEZIDI HYPHENATION MARK ++ ++-# Total code points: 28 +++# Total code points: 29 ++ ++ # ================================================ ++ ++@@ -197,11 +198,13 @@ FF64 ; Terminal_Punctuation # Po HALFWIDTH IDEOGRAPHIC COMMA ++ 11238..1123C ; Terminal_Punctuation # Po [5] KHOJKI DANDA..KHOJKI DOUBLE SECTION MARK ++ 112A9 ; Terminal_Punctuation # Po MULTANI SECTION MARK ++ 1144B..1144D ; Terminal_Punctuation # Po [3] NEWA DANDA..NEWA COMMA ++-1145B ; Terminal_Punctuation # Po NEWA PLACEHOLDER MARK +++1145A..1145B ; Terminal_Punctuation # Po [2] NEWA DOUBLE COMMA..NEWA PLACEHOLDER MARK ++ 115C2..115C5 ; Terminal_Punctuation # Po [4] SIDDHAM DANDA..SIDDHAM SEPARATOR BAR ++ 115C9..115D7 ; Terminal_Punctuation # Po [15] SIDDHAM END OF TEXT MARK..SIDDHAM SECTION MARK WITH CIRCLES AND FOUR ENCLOSURES ++ 11641..11642 ; Terminal_Punctuation # Po [2] MODI DANDA..MODI DOUBLE DANDA ++ 1173C..1173E ; Terminal_Punctuation # Po [3] AHOM SIGN SMALL SECTION..AHOM SIGN RULAI +++11944 ; Terminal_Punctuation # Po DIVES AKURU DOUBLE DANDA +++11946 ; Terminal_Punctuation # Po DIVES AKURU END OF TEXT MARK ++ 11A42..11A43 ; Terminal_Punctuation # Po [2] ZANABAZAR SQUARE MARK SHAD..ZANABAZAR SQUARE MARK DOUBLE SHAD ++ 11A9B..11A9C ; Terminal_Punctuation # Po [2] SOYOMBO MARK SHAD..SOYOMBO MARK DOUBLE SHAD ++ 11AA1..11AA2 ; Terminal_Punctuation # Po [2] SOYOMBO TERMINAL MARK-1..SOYOMBO TERMINAL MARK-2 ++@@ -217,7 +220,7 @@ FF64 ; Terminal_Punctuation # Po HALFWIDTH IDEOGRAPHIC COMMA ++ 1BC9F ; Terminal_Punctuation # Po DUPLOYAN PUNCTUATION CHINOOK FULL STOP ++ 1DA87..1DA8A ; Terminal_Punctuation # Po [4] SIGNWRITING COMMA..SIGNWRITING COLON ++ ++-# Total code points: 264 +++# Total code points: 267 ++ ++ # ================================================ ++ ++@@ -525,6 +528,7 @@ FF41..FF46 ; Hex_Digit # L& [6] FULLWIDTH LATIN SMALL LETTER A..FULLWIDTH L ++ 0D4A..0D4C ; Other_Alphabetic # Mc [3] MALAYALAM VOWEL SIGN O..MALAYALAM VOWEL SIGN AU ++ 0D57 ; Other_Alphabetic # Mc MALAYALAM AU LENGTH MARK ++ 0D62..0D63 ; Other_Alphabetic # Mn [2] MALAYALAM VOWEL SIGN VOCALIC L..MALAYALAM VOWEL SIGN VOCALIC LL +++0D81 ; Other_Alphabetic # Mn SINHALA SIGN CANDRABINDU ++ 0D82..0D83 ; Other_Alphabetic # Mc [2] SINHALA SIGN ANUSVARAYA..SINHALA SIGN VISARGAYA ++ 0DCF..0DD1 ; Other_Alphabetic # Mc [3] SINHALA VOWEL SIGN AELA-PILLA..SINHALA VOWEL SIGN DIGA AEDA-PILLA ++ 0DD2..0DD4 ; Other_Alphabetic # Mn [3] SINHALA VOWEL SIGN KETTI IS-PILLA..SINHALA VOWEL SIGN KETTI PAA-PILLA ++@@ -595,6 +599,7 @@ FF41..FF46 ; Hex_Digit # L& [6] FULLWIDTH LATIN SMALL LETTER A..FULLWIDTH L ++ 1A65..1A6C ; Other_Alphabetic # Mn [8] TAI THAM VOWEL SIGN I..TAI THAM VOWEL SIGN OA BELOW ++ 1A6D..1A72 ; Other_Alphabetic # Mc [6] TAI THAM VOWEL SIGN OY..TAI THAM VOWEL SIGN THAM AI ++ 1A73..1A74 ; Other_Alphabetic # Mn [2] TAI THAM VOWEL SIGN OA ABOVE..TAI THAM SIGN MAI KANG +++1ABF..1AC0 ; Other_Alphabetic # Mn [2] COMBINING LATIN SMALL LETTER W BELOW..COMBINING LATIN SMALL LETTER TURNED W BELOW ++ 1B00..1B03 ; Other_Alphabetic # Mn [4] BALINESE SIGN ULU RICEM..BALINESE SIGN SURANG ++ 1B04 ; Other_Alphabetic # Mc BALINESE SIGN BISAH ++ 1B35 ; Other_Alphabetic # Mc BALINESE VOWEL SIGN TEDUNG ++@@ -676,6 +681,7 @@ FB1E ; Other_Alphabetic # Mn HEBREW POINT JUDEO-SPANISH VARIKA ++ 10A05..10A06 ; Other_Alphabetic # Mn [2] KHAROSHTHI VOWEL SIGN E..KHAROSHTHI VOWEL SIGN O ++ 10A0C..10A0F ; Other_Alphabetic # Mn [4] KHAROSHTHI VOWEL LENGTH MARK..KHAROSHTHI SIGN VISARGA ++ 10D24..10D27 ; Other_Alphabetic # Mn [4] HANIFI ROHINGYA SIGN HARBAHAY..HANIFI ROHINGYA SIGN TASSI +++10EAB..10EAC ; Other_Alphabetic # Mn [2] YEZIDI COMBINING HAMZA MARK..YEZIDI COMBINING MADDA MARK ++ 11000 ; Other_Alphabetic # Mc BRAHMI SIGN CANDRABINDU ++ 11001 ; Other_Alphabetic # Mn BRAHMI SIGN ANUSVARA ++ 11002 ; Other_Alphabetic # Mc BRAHMI SIGN VISARGA ++@@ -694,6 +700,8 @@ FB1E ; Other_Alphabetic # Mn HEBREW POINT JUDEO-SPANISH VARIKA ++ 111B3..111B5 ; Other_Alphabetic # Mc [3] SHARADA VOWEL SIGN AA..SHARADA VOWEL SIGN II ++ 111B6..111BE ; Other_Alphabetic # Mn [9] SHARADA VOWEL SIGN U..SHARADA VOWEL SIGN O ++ 111BF ; Other_Alphabetic # Mc SHARADA VOWEL SIGN AU +++111CE ; Other_Alphabetic # Mc SHARADA VOWEL SIGN PRISHTHAMATRA E +++111CF ; Other_Alphabetic # Mn SHARADA SIGN INVERTED CANDRABINDU ++ 1122C..1122E ; Other_Alphabetic # Mc [3] KHOJKI VOWEL SIGN AA..KHOJKI VOWEL SIGN II ++ 1122F..11231 ; Other_Alphabetic # Mn [3] KHOJKI VOWEL SIGN U..KHOJKI VOWEL SIGN AI ++ 11232..11233 ; Other_Alphabetic # Mc [2] KHOJKI VOWEL SIGN O..KHOJKI VOWEL SIGN AU ++@@ -749,6 +757,11 @@ FB1E ; Other_Alphabetic # Mn HEBREW POINT JUDEO-SPANISH VARIKA ++ 1182C..1182E ; Other_Alphabetic # Mc [3] DOGRA VOWEL SIGN AA..DOGRA VOWEL SIGN II ++ 1182F..11837 ; Other_Alphabetic # Mn [9] DOGRA VOWEL SIGN U..DOGRA SIGN ANUSVARA ++ 11838 ; Other_Alphabetic # Mc DOGRA SIGN VISARGA +++11930..11935 ; Other_Alphabetic # Mc [6] DIVES AKURU VOWEL SIGN AA..DIVES AKURU VOWEL SIGN E +++11937..11938 ; Other_Alphabetic # Mc [2] DIVES AKURU VOWEL SIGN AI..DIVES AKURU VOWEL SIGN O +++1193B..1193C ; Other_Alphabetic # Mn [2] DIVES AKURU SIGN ANUSVARA..DIVES AKURU SIGN CANDRABINDU +++11940 ; Other_Alphabetic # Mc DIVES AKURU MEDIAL YA +++11942 ; Other_Alphabetic # Mc DIVES AKURU MEDIAL RA ++ 119D1..119D3 ; Other_Alphabetic # Mc [3] NANDINAGARI VOWEL SIGN AA..NANDINAGARI VOWEL SIGN II ++ 119D4..119D7 ; Other_Alphabetic # Mn [4] NANDINAGARI VOWEL SIGN U..NANDINAGARI VOWEL SIGN VOCALIC RR ++ 119DA..119DB ; Other_Alphabetic # Mn [2] NANDINAGARI VOWEL SIGN E..NANDINAGARI VOWEL SIGN AI ++@@ -790,6 +803,7 @@ FB1E ; Other_Alphabetic # Mn HEBREW POINT JUDEO-SPANISH VARIKA ++ 16F4F ; Other_Alphabetic # Mn MIAO SIGN CONSONANT MODIFIER BAR ++ 16F51..16F87 ; Other_Alphabetic # Mc [55] MIAO SIGN ASPIRATION..MIAO VOWEL SIGN UI ++ 16F8F..16F92 ; Other_Alphabetic # Mn [4] MIAO TONE RIGHT..MIAO TONE BELOW +++16FF0..16FF1 ; Other_Alphabetic # Mc [2] VIETNAMESE ALTERNATE READING MARK CA..VIETNAMESE ALTERNATE READING MARK NHAY ++ 1BC9E ; Other_Alphabetic # Mn DUPLOYAN DOUBLE MARK ++ 1E000..1E006 ; Other_Alphabetic # Mn [7] COMBINING GLAGOLITIC LETTER AZU..COMBINING GLAGOLITIC LETTER ZHIVETE ++ 1E008..1E018 ; Other_Alphabetic # Mn [17] COMBINING GLAGOLITIC LETTER ZEMLJA..COMBINING GLAGOLITIC LETTER HERU ++@@ -801,7 +815,7 @@ FB1E ; Other_Alphabetic # Mn HEBREW POINT JUDEO-SPANISH VARIKA ++ 1F150..1F169 ; Other_Alphabetic # So [26] NEGATIVE CIRCLED LATIN CAPITAL LETTER A..NEGATIVE CIRCLED LATIN CAPITAL LETTER Z ++ 1F170..1F189 ; Other_Alphabetic # So [26] NEGATIVE SQUARED LATIN CAPITAL LETTER A..NEGATIVE SQUARED LATIN CAPITAL LETTER Z ++ ++-# Total code points: 1377 +++# Total code points: 1398 ++ ++ # ================================================ ++ ++@@ -809,21 +823,24 @@ FB1E ; Other_Alphabetic # Mn HEBREW POINT JUDEO-SPANISH VARIKA ++ 3007 ; Ideographic # Nl IDEOGRAPHIC NUMBER ZERO ++ 3021..3029 ; Ideographic # Nl [9] HANGZHOU NUMERAL ONE..HANGZHOU NUMERAL NINE ++ 3038..303A ; Ideographic # Nl [3] HANGZHOU NUMERAL TEN..HANGZHOU NUMERAL THIRTY ++-3400..4DB5 ; Ideographic # Lo [6582] CJK UNIFIED IDEOGRAPH-3400..CJK UNIFIED IDEOGRAPH-4DB5 ++-4E00..9FEF ; Ideographic # Lo [20976] CJK UNIFIED IDEOGRAPH-4E00..CJK UNIFIED IDEOGRAPH-9FEF +++3400..4DBF ; Ideographic # Lo [6592] CJK UNIFIED IDEOGRAPH-3400..CJK UNIFIED IDEOGRAPH-4DBF +++4E00..9FFC ; Ideographic # Lo [20989] CJK UNIFIED IDEOGRAPH-4E00..CJK UNIFIED IDEOGRAPH-9FFC ++ F900..FA6D ; Ideographic # Lo [366] CJK COMPATIBILITY IDEOGRAPH-F900..CJK COMPATIBILITY IDEOGRAPH-FA6D ++ FA70..FAD9 ; Ideographic # Lo [106] CJK COMPATIBILITY IDEOGRAPH-FA70..CJK COMPATIBILITY IDEOGRAPH-FAD9 +++16FE4 ; Ideographic # Mn KHITAN SMALL SCRIPT FILLER ++ 17000..187F7 ; Ideographic # Lo [6136] TANGUT IDEOGRAPH-17000..TANGUT IDEOGRAPH-187F7 ++-18800..18AF2 ; Ideographic # Lo [755] TANGUT COMPONENT-001..TANGUT COMPONENT-755 +++18800..18CD5 ; Ideographic # Lo [1238] TANGUT COMPONENT-001..KHITAN SMALL SCRIPT CHARACTER-18CD5 +++18D00..18D08 ; Ideographic # Lo [9] TANGUT IDEOGRAPH-18D00..TANGUT IDEOGRAPH-18D08 ++ 1B170..1B2FB ; Ideographic # Lo [396] NUSHU CHARACTER-1B170..NUSHU CHARACTER-1B2FB ++-20000..2A6D6 ; Ideographic # Lo [42711] CJK UNIFIED IDEOGRAPH-20000..CJK UNIFIED IDEOGRAPH-2A6D6 +++20000..2A6DD ; Ideographic # Lo [42718] CJK UNIFIED IDEOGRAPH-20000..CJK UNIFIED IDEOGRAPH-2A6DD ++ 2A700..2B734 ; Ideographic # Lo [4149] CJK UNIFIED IDEOGRAPH-2A700..CJK UNIFIED IDEOGRAPH-2B734 ++ 2B740..2B81D ; Ideographic # Lo [222] CJK UNIFIED IDEOGRAPH-2B740..CJK UNIFIED IDEOGRAPH-2B81D ++ 2B820..2CEA1 ; Ideographic # Lo [5762] CJK UNIFIED IDEOGRAPH-2B820..CJK UNIFIED IDEOGRAPH-2CEA1 ++ 2CEB0..2EBE0 ; Ideographic # Lo [7473] CJK UNIFIED IDEOGRAPH-2CEB0..CJK UNIFIED IDEOGRAPH-2EBE0 ++ 2F800..2FA1D ; Ideographic # Lo [542] CJK COMPATIBILITY IDEOGRAPH-2F800..CJK COMPATIBILITY IDEOGRAPH-2FA1D +++30000..3134A ; Ideographic # Lo [4939] CJK UNIFIED IDEOGRAPH-30000..CJK UNIFIED IDEOGRAPH-3134A ++ ++-# Total code points: 96190 +++# Total code points: 101652 ++ ++ # ================================================ ++ ++@@ -882,6 +899,7 @@ FA70..FAD9 ; Ideographic # Lo [106] CJK COMPATIBILITY IDEOGRAPH-FA70..CJK COM ++ 0AFD..0AFF ; Diacritic # Mn [3] GUJARATI SIGN THREE-DOT NUKTA ABOVE..GUJARATI SIGN TWO-CIRCLE NUKTA ABOVE ++ 0B3C ; Diacritic # Mn ORIYA SIGN NUKTA ++ 0B4D ; Diacritic # Mn ORIYA SIGN VIRAMA +++0B55 ; Diacritic # Mn ORIYA SIGN OVERLINE ++ 0BCD ; Diacritic # Mn TAMIL SIGN VIRAMA ++ 0C4D ; Diacritic # Mn TELUGU SIGN VIRAMA ++ 0CBC ; Diacritic # Mn KANNADA SIGN NUKTA ++@@ -978,6 +996,8 @@ AAC2 ; Diacritic # Lo TAI VIET TONE MAI SONG ++ AAF6 ; Diacritic # Mn MEETEI MAYEK VIRAMA ++ AB5B ; Diacritic # Sk MODIFIER BREVE WITH INVERTED BREVE ++ AB5C..AB5F ; Diacritic # Lm [4] MODIFIER LETTER SMALL HENG..MODIFIER LETTER SMALL U WITH LEFT HOOK +++AB69 ; Diacritic # Lm MODIFIER LETTER SMALL TURNED W +++AB6A..AB6B ; Diacritic # Sk [2] MODIFIER LETTER LEFT TACK..MODIFIER LETTER RIGHT TACK ++ ABEC ; Diacritic # Mc MEETEI MAYEK LUM IYEK ++ ABED ; Diacritic # Mn MEETEI MAYEK APUN IYEK ++ FB1E ; Diacritic # Mn HEBREW POINT JUDEO-SPANISH VARIKA ++@@ -1013,6 +1033,9 @@ FFE3 ; Diacritic # Sk FULLWIDTH MACRON ++ 116B7 ; Diacritic # Mn TAKRI SIGN NUKTA ++ 1172B ; Diacritic # Mn AHOM SIGN KILLER ++ 11839..1183A ; Diacritic # Mn [2] DOGRA SIGN VIRAMA..DOGRA SIGN NUKTA +++1193D ; Diacritic # Mc DIVES AKURU SIGN HALANTA +++1193E ; Diacritic # Mn DIVES AKURU VIRAMA +++11943 ; Diacritic # Mn DIVES AKURU SIGN NUKTA ++ 119E0 ; Diacritic # Mn NANDINAGARI SIGN VIRAMA ++ 11A34 ; Diacritic # Mn ZANABAZAR SQUARE SIGN VIRAMA ++ 11A47 ; Diacritic # Mn ZANABAZAR SQUARE SUBJOINER ++@@ -1025,6 +1048,7 @@ FFE3 ; Diacritic # Sk FULLWIDTH MACRON ++ 16B30..16B36 ; Diacritic # Mn [7] PAHAWH HMONG MARK CIM TUB..PAHAWH HMONG MARK CIM TAUM ++ 16F8F..16F92 ; Diacritic # Mn [4] MIAO TONE RIGHT..MIAO TONE BELOW ++ 16F93..16F9F ; Diacritic # Lm [13] MIAO LETTER TONE-2..MIAO LETTER REFORMED TONE-8 +++16FF0..16FF1 ; Diacritic # Mc [2] VIETNAMESE ALTERNATE READING MARK CA..VIETNAMESE ALTERNATE READING MARK NHAY ++ 1D167..1D169 ; Diacritic # Mn [3] MUSICAL SYMBOL COMBINING TREMOLO-1..MUSICAL SYMBOL COMBINING TREMOLO-3 ++ 1D16D..1D172 ; Diacritic # Mc [6] MUSICAL SYMBOL COMBINING AUGMENTATION DOT..MUSICAL SYMBOL COMBINING FLAG-5 ++ 1D17B..1D182 ; Diacritic # Mn [8] MUSICAL SYMBOL COMBINING ACCENT..MUSICAL SYMBOL COMBINING LOURE ++@@ -1036,7 +1060,7 @@ FFE3 ; Diacritic # Sk FULLWIDTH MACRON ++ 1E944..1E946 ; Diacritic # Mn [3] ADLAM ALIF LENGTHENER..ADLAM GEMINATION MARK ++ 1E948..1E94A ; Diacritic # Mn [3] ADLAM CONSONANT MODIFIER..ADLAM NUKTA ++ ++-# Total code points: 873 +++# Total code points: 882 ++ ++ # ================================================ ++ ++@@ -1044,6 +1068,7 @@ FFE3 ; Diacritic # Sk FULLWIDTH MACRON ++ 02D0..02D1 ; Extender # Lm [2] MODIFIER LETTER TRIANGULAR COLON..MODIFIER LETTER HALF TRIANGULAR COLON ++ 0640 ; Extender # Lm ARABIC TATWEEL ++ 07FA ; Extender # Lm NKO LAJANYALAN +++0B55 ; Extender # Mn ORIYA SIGN OVERLINE ++ 0E46 ; Extender # Lm THAI CHARACTER MAIYAMOK ++ 0EC6 ; Extender # Lm LAO KO LA ++ 180A ; Extender # Po MONGOLIAN NIRUGU ++@@ -1072,7 +1097,7 @@ FF70 ; Extender # Lm HALFWIDTH KATAKANA-HIRAGANA PROLONGED SOUND ++ 1E13C..1E13D ; Extender # Lm [2] NYIAKENG PUACHUE HMONG SIGN XW XW..NYIAKENG PUACHUE HMONG SYLLABLE LENGTHENER ++ 1E944..1E946 ; Extender # Mn [3] ADLAM ALIF LENGTHENER..ADLAM GEMINATION MARK ++ ++-# Total code points: 47 +++# Total code points: 48 ++ ++ # ================================================ ++ ++@@ -1155,11 +1180,12 @@ FF9E..FF9F ; Other_Grapheme_Extend # Lm [2] HALFWIDTH KATAKANA VOICED SOUND ++ 114B0 ; Other_Grapheme_Extend # Mc TIRHUTA VOWEL SIGN AA ++ 114BD ; Other_Grapheme_Extend # Mc TIRHUTA VOWEL SIGN SHORT O ++ 115AF ; Other_Grapheme_Extend # Mc SIDDHAM VOWEL SIGN AA +++11930 ; Other_Grapheme_Extend # Mc DIVES AKURU VOWEL SIGN AA ++ 1D165 ; Other_Grapheme_Extend # Mc MUSICAL SYMBOL COMBINING STEM ++ 1D16E..1D172 ; Other_Grapheme_Extend # Mc [5] MUSICAL SYMBOL COMBINING FLAG-1..MUSICAL SYMBOL COMBINING FLAG-5 ++ E0020..E007F ; Other_Grapheme_Extend # Cf [96] TAG SPACE..CANCEL TAG ++ ++-# Total code points: 126 +++# Total code points: 127 ++ ++ # ================================================ ++ ++@@ -1184,8 +1210,8 @@ E0020..E007F ; Other_Grapheme_Extend # Cf [96] TAG SPACE..CANCEL TAG ++ ++ # ================================================ ++ ++-3400..4DB5 ; Unified_Ideograph # Lo [6582] CJK UNIFIED IDEOGRAPH-3400..CJK UNIFIED IDEOGRAPH-4DB5 ++-4E00..9FEF ; Unified_Ideograph # Lo [20976] CJK UNIFIED IDEOGRAPH-4E00..CJK UNIFIED IDEOGRAPH-9FEF +++3400..4DBF ; Unified_Ideograph # Lo [6592] CJK UNIFIED IDEOGRAPH-3400..CJK UNIFIED IDEOGRAPH-4DBF +++4E00..9FFC ; Unified_Ideograph # Lo [20989] CJK UNIFIED IDEOGRAPH-4E00..CJK UNIFIED IDEOGRAPH-9FFC ++ FA0E..FA0F ; Unified_Ideograph # Lo [2] CJK COMPATIBILITY IDEOGRAPH-FA0E..CJK COMPATIBILITY IDEOGRAPH-FA0F ++ FA11 ; Unified_Ideograph # Lo CJK COMPATIBILITY IDEOGRAPH-FA11 ++ FA13..FA14 ; Unified_Ideograph # Lo [2] CJK COMPATIBILITY IDEOGRAPH-FA13..CJK COMPATIBILITY IDEOGRAPH-FA14 ++@@ -1193,13 +1219,14 @@ FA1F ; Unified_Ideograph # Lo CJK COMPATIBILITY IDEOGRAPH-FA1F ++ FA21 ; Unified_Ideograph # Lo CJK COMPATIBILITY IDEOGRAPH-FA21 ++ FA23..FA24 ; Unified_Ideograph # Lo [2] CJK COMPATIBILITY IDEOGRAPH-FA23..CJK COMPATIBILITY IDEOGRAPH-FA24 ++ FA27..FA29 ; Unified_Ideograph # Lo [3] CJK COMPATIBILITY IDEOGRAPH-FA27..CJK COMPATIBILITY IDEOGRAPH-FA29 ++-20000..2A6D6 ; Unified_Ideograph # Lo [42711] CJK UNIFIED IDEOGRAPH-20000..CJK UNIFIED IDEOGRAPH-2A6D6 +++20000..2A6DD ; Unified_Ideograph # Lo [42718] CJK UNIFIED IDEOGRAPH-20000..CJK UNIFIED IDEOGRAPH-2A6DD ++ 2A700..2B734 ; Unified_Ideograph # Lo [4149] CJK UNIFIED IDEOGRAPH-2A700..CJK UNIFIED IDEOGRAPH-2B734 ++ 2B740..2B81D ; Unified_Ideograph # Lo [222] CJK UNIFIED IDEOGRAPH-2B740..CJK UNIFIED IDEOGRAPH-2B81D ++ 2B820..2CEA1 ; Unified_Ideograph # Lo [5762] CJK UNIFIED IDEOGRAPH-2B820..CJK UNIFIED IDEOGRAPH-2CEA1 ++ 2CEB0..2EBE0 ; Unified_Ideograph # Lo [7473] CJK UNIFIED IDEOGRAPH-2CEB0..CJK UNIFIED IDEOGRAPH-2EBE0 +++30000..3134A ; Unified_Ideograph # Lo [4939] CJK UNIFIED IDEOGRAPH-30000..CJK UNIFIED IDEOGRAPH-3134A ++ ++-# Total code points: 87887 +++# Total code points: 92856 ++ ++ # ================================================ ++ ++@@ -1362,6 +1389,8 @@ FF61 ; Sentence_Terminal # Po HALFWIDTH IDEOGRAPHIC FULL STOP ++ 115C9..115D7 ; Sentence_Terminal # Po [15] SIDDHAM END OF TEXT MARK..SIDDHAM SECTION MARK WITH CIRCLES AND FOUR ENCLOSURES ++ 11641..11642 ; Sentence_Terminal # Po [2] MODI DANDA..MODI DOUBLE DANDA ++ 1173C..1173E ; Sentence_Terminal # Po [3] AHOM SIGN SMALL SECTION..AHOM SIGN RULAI +++11944 ; Sentence_Terminal # Po DIVES AKURU DOUBLE DANDA +++11946 ; Sentence_Terminal # Po DIVES AKURU END OF TEXT MARK ++ 11A42..11A43 ; Sentence_Terminal # Po [2] ZANABAZAR SQUARE MARK SHAD..ZANABAZAR SQUARE MARK DOUBLE SHAD ++ 11A9B..11A9C ; Sentence_Terminal # Po [2] SOYOMBO MARK SHAD..SOYOMBO MARK DOUBLE SHAD ++ 11C41..11C42 ; Sentence_Terminal # Po [2] BHAIKSUKI DANDA..BHAIKSUKI DOUBLE DANDA ++@@ -1374,7 +1403,7 @@ FF61 ; Sentence_Terminal # Po HALFWIDTH IDEOGRAPHIC FULL STOP ++ 1BC9F ; Sentence_Terminal # Po DUPLOYAN PUNCTUATION CHINOOK FULL STOP ++ 1DA88 ; Sentence_Terminal # Po SIGNWRITING FULL STOP ++ ++-# Total code points: 141 +++# Total code points: 143 ++ ++ # ================================================ ++ ++@@ -1574,8 +1603,8 @@ E0100..E01EF ; Variation_Selector # Mn [240] VARIATION SELECTOR-17..VARIATION S ++ 2B4D..2B73 ; Pattern_Syntax # So [39] DOWNWARDS TRIANGLE-HEADED ZIGZAG ARROW..DOWNWARDS TRIANGLE-HEADED ARROW TO BAR ++ 2B74..2B75 ; Pattern_Syntax # Cn [2] .. ++ 2B76..2B95 ; Pattern_Syntax # So [32] NORTH WEST TRIANGLE-HEADED ARROW TO BAR..RIGHTWARDS BLACK ARROW ++-2B96..2B97 ; Pattern_Syntax # Cn [2] .. ++-2B98..2BFF ; Pattern_Syntax # So [104] THREE-D TOP-LIGHTED LEFTWARDS EQUILATERAL ARROWHEAD..HELLSCHREIBER PAUSE SYMBOL +++2B96 ; Pattern_Syntax # Cn +++2B97..2BFF ; Pattern_Syntax # So [105] SYMBOL FOR TYPE A ELECTRONICS..HELLSCHREIBER PAUSE SYMBOL ++ 2E00..2E01 ; Pattern_Syntax # Po [2] RIGHT ANGLE SUBSTITUTION MARKER..RIGHT ANGLE DOTTED SUBSTITUTION MARKER ++ 2E02 ; Pattern_Syntax # Pi LEFT SUBSTITUTION BRACKET ++ 2E03 ; Pattern_Syntax # Pf RIGHT SUBSTITUTION BRACKET ++@@ -1614,7 +1643,9 @@ E0100..E01EF ; Variation_Selector # Mn [240] VARIATION SELECTOR-17..VARIATION S ++ 2E41 ; Pattern_Syntax # Po REVERSED COMMA ++ 2E42 ; Pattern_Syntax # Ps DOUBLE LOW-REVERSED-9 QUOTATION MARK ++ 2E43..2E4F ; Pattern_Syntax # Po [13] DASH WITH LEFT UPTURN..CORNISH VERSE DIVIDER ++-2E50..2E7F ; Pattern_Syntax # Cn [48] .. +++2E50..2E51 ; Pattern_Syntax # So [2] CROSS PATTY WITH RIGHT CROSSBAR..CROSS PATTY WITH LEFT CROSSBAR +++2E52 ; Pattern_Syntax # Po TIRONIAN SIGN CAPITAL ET +++2E53..2E7F ; Pattern_Syntax # Cn [45] .. ++ 3001..3003 ; Pattern_Syntax # Po [3] IDEOGRAPHIC COMMA..DITTO MARK ++ 3008 ; Pattern_Syntax # Ps LEFT ANGLE BRACKET ++ 3009 ; Pattern_Syntax # Pe RIGHT ANGLE BRACKET ++diff --git a/localedata/unicode-gen/UnicodeData.txt b/localedata/unicode-gen/UnicodeData.txt ++index e65aec52f7..e22f967bba 100644 ++--- a/localedata/unicode-gen/UnicodeData.txt +++++ b/localedata/unicode-gen/UnicodeData.txt ++@@ -2118,6 +2118,16 @@ ++ 08BB;ARABIC LETTER AFRICAN FEH;Lo;0;AL;;;;;N;;;;; ++ 08BC;ARABIC LETTER AFRICAN QAF;Lo;0;AL;;;;;N;;;;; ++ 08BD;ARABIC LETTER AFRICAN NOON;Lo;0;AL;;;;;N;;;;; +++08BE;ARABIC LETTER PEH WITH SMALL V;Lo;0;AL;;;;;N;;;;; +++08BF;ARABIC LETTER TEH WITH SMALL V;Lo;0;AL;;;;;N;;;;; +++08C0;ARABIC LETTER TTEH WITH SMALL V;Lo;0;AL;;;;;N;;;;; +++08C1;ARABIC LETTER TCHEH WITH SMALL V;Lo;0;AL;;;;;N;;;;; +++08C2;ARABIC LETTER KEHEH WITH SMALL V;Lo;0;AL;;;;;N;;;;; +++08C3;ARABIC LETTER GHAIN WITH THREE DOTS ABOVE;Lo;0;AL;;;;;N;;;;; +++08C4;ARABIC LETTER AFRICAN QAF WITH THREE DOTS ABOVE;Lo;0;AL;;;;;N;;;;; +++08C5;ARABIC LETTER JEEM WITH THREE DOTS ABOVE;Lo;0;AL;;;;;N;;;;; +++08C6;ARABIC LETTER JEEM WITH THREE DOTS BELOW;Lo;0;AL;;;;;N;;;;; +++08C7;ARABIC LETTER LAM WITH SMALL ARABIC LETTER TAH ABOVE;Lo;0;AL;;;;;N;;;;; ++ 08D3;ARABIC SMALL LOW WAW;Mn;220;NSM;;;;;N;;;;; ++ 08D4;ARABIC SMALL HIGH WORD AR-RUB;Mn;230;NSM;;;;;N;;;;; ++ 08D5;ARABIC SMALL HIGH SAD;Mn;230;NSM;;;;;N;;;;; ++@@ -2621,6 +2631,7 @@ ++ 0B4B;ORIYA VOWEL SIGN O;Mc;0;L;0B47 0B3E;;;;N;;;;; ++ 0B4C;ORIYA VOWEL SIGN AU;Mc;0;L;0B47 0B57;;;;N;;;;; ++ 0B4D;ORIYA SIGN VIRAMA;Mn;9;NSM;;;;;N;;;;; +++0B55;ORIYA SIGN OVERLINE;Mn;0;NSM;;;;;N;;;;; ++ 0B56;ORIYA AI LENGTH MARK;Mn;0;NSM;;;;;N;;;;; ++ 0B57;ORIYA AU LENGTH MARK;Mc;0;L;;;;;N;;;;; ++ 0B5C;ORIYA LETTER RRA;Lo;0;L;0B21 0B3C;;;;N;;;;; ++@@ -2911,6 +2922,7 @@ ++ 0D01;MALAYALAM SIGN CANDRABINDU;Mn;0;NSM;;;;;N;;;;; ++ 0D02;MALAYALAM SIGN ANUSVARA;Mc;0;L;;;;;N;;;;; ++ 0D03;MALAYALAM SIGN VISARGA;Mc;0;L;;;;;N;;;;; +++0D04;MALAYALAM LETTER VEDIC ANUSVARA;Lo;0;L;;;;;N;;;;; ++ 0D05;MALAYALAM LETTER A;Lo;0;L;;;;;N;;;;; ++ 0D06;MALAYALAM LETTER AA;Lo;0;L;;;;;N;;;;; ++ 0D07;MALAYALAM LETTER I;Lo;0;L;;;;;N;;;;; ++@@ -3024,6 +3036,7 @@ ++ 0D7D;MALAYALAM LETTER CHILLU L;Lo;0;L;;;;;N;;;;; ++ 0D7E;MALAYALAM LETTER CHILLU LL;Lo;0;L;;;;;N;;;;; ++ 0D7F;MALAYALAM LETTER CHILLU K;Lo;0;L;;;;;N;;;;; +++0D81;SINHALA SIGN CANDRABINDU;Mn;0;NSM;;;;;N;;;;; ++ 0D82;SINHALA SIGN ANUSVARAYA;Mc;0;L;;;;;N;;;;; ++ 0D83;SINHALA SIGN VISARGAYA;Mc;0;L;;;;;N;;;;; ++ 0D85;SINHALA LETTER AYANNA;Lo;0;L;;;;;N;;;;; ++@@ -6044,6 +6057,8 @@ ++ 1ABC;COMBINING DOUBLE PARENTHESES ABOVE;Mn;230;NSM;;;;;N;;;;; ++ 1ABD;COMBINING PARENTHESES BELOW;Mn;220;NSM;;;;;N;;;;; ++ 1ABE;COMBINING PARENTHESES OVERLAY;Me;0;NSM;;;;;N;;;;; +++1ABF;COMBINING LATIN SMALL LETTER W BELOW;Mn;220;NSM;;;;;N;;;;; +++1AC0;COMBINING LATIN SMALL LETTER TURNED W BELOW;Mn;220;NSM;;;;;N;;;;; ++ 1B00;BALINESE SIGN ULU RICEM;Mn;0;NSM;;;;;N;;;;; ++ 1B01;BALINESE SIGN ULU CANDRA;Mn;0;NSM;;;;;N;;;;; ++ 1B02;BALINESE SIGN CECEK;Mn;0;NSM;;;;;N;;;;; ++@@ -10133,6 +10148,7 @@ ++ 2B93;NEWLINE RIGHT;So;0;ON;;;;;N;;;;; ++ 2B94;FOUR CORNER ARROWS CIRCLING ANTICLOCKWISE;So;0;ON;;;;;N;;;;; ++ 2B95;RIGHTWARDS BLACK ARROW;So;0;ON;;;;;N;;;;; +++2B97;SYMBOL FOR TYPE A ELECTRONICS;So;0;ON;;;;;N;;;;; ++ 2B98;THREE-D TOP-LIGHTED LEFTWARDS EQUILATERAL ARROWHEAD;So;0;ON;;;;;N;;;;; ++ 2B99;THREE-D RIGHT-LIGHTED UPWARDS EQUILATERAL ARROWHEAD;So;0;ON;;;;;N;;;;; ++ 2B9A;THREE-D TOP-LIGHTED RIGHTWARDS EQUILATERAL ARROWHEAD;So;0;ON;;;;;N;;;;; ++@@ -10776,6 +10792,9 @@ ++ 2E4D;PARAGRAPHUS MARK;Po;0;ON;;;;;N;;;;; ++ 2E4E;PUNCTUS ELEVATUS MARK;Po;0;ON;;;;;N;;;;; ++ 2E4F;CORNISH VERSE DIVIDER;Po;0;ON;;;;;N;;;;; +++2E50;CROSS PATTY WITH RIGHT CROSSBAR;So;0;ON;;;;;N;;;;; +++2E51;CROSS PATTY WITH LEFT CROSSBAR;So;0;ON;;;;;N;;;;; +++2E52;TIRONIAN SIGN CAPITAL ET;Po;0;ON;;;;;N;;;;; ++ 2E80;CJK RADICAL REPEAT;So;0;ON;;;;;N;;;;; ++ 2E81;CJK RADICAL CLIFF;So;0;ON;;;;;N;;;;; ++ 2E82;CJK RADICAL SECOND ONE;So;0;ON;;;;;N;;;;; ++@@ -11550,6 +11569,11 @@ ++ 31B8;BOPOMOFO LETTER GH;Lo;0;L;;;;;N;;;;; ++ 31B9;BOPOMOFO LETTER LH;Lo;0;L;;;;;N;;;;; ++ 31BA;BOPOMOFO LETTER ZY;Lo;0;L;;;;;N;;;;; +++31BB;BOPOMOFO FINAL LETTER G;Lo;0;L;;;;;N;;;;; +++31BC;BOPOMOFO LETTER GW;Lo;0;L;;;;;N;;;;; +++31BD;BOPOMOFO LETTER KW;Lo;0;L;;;;;N;;;;; +++31BE;BOPOMOFO LETTER OE;Lo;0;L;;;;;N;;;;; +++31BF;BOPOMOFO LETTER AH;Lo;0;L;;;;;N;;;;; ++ 31C0;CJK STROKE T;So;0;ON;;;;;N;;;;; ++ 31C1;CJK STROKE WG;So;0;ON;;;;;N;;;;; ++ 31C2;CJK STROKE XG;So;0;ON;;;;;N;;;;; ++@@ -12114,7 +12138,7 @@ ++ 33FE;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY THIRTY-ONE;So;0;L; 0033 0031 65E5;;;;N;;;;; ++ 33FF;SQUARE GAL;So;0;ON; 0067 0061 006C;;;;N;;;;; ++ 3400;;Lo;0;L;;;;;N;;;;; ++-4DB5;;Lo;0;L;;;;;N;;;;; +++4DBF;;Lo;0;L;;;;;N;;;;; ++ 4DC0;HEXAGRAM FOR THE CREATIVE HEAVEN;So;0;ON;;;;;N;;;;; ++ 4DC1;HEXAGRAM FOR THE RECEPTIVE EARTH;So;0;ON;;;;;N;;;;; ++ 4DC2;HEXAGRAM FOR DIFFICULTY AT THE BEGINNING;So;0;ON;;;;;N;;;;; ++@@ -12180,7 +12204,7 @@ ++ 4DFE;HEXAGRAM FOR AFTER COMPLETION;So;0;ON;;;;;N;;;;; ++ 4DFF;HEXAGRAM FOR BEFORE COMPLETION;So;0;ON;;;;;N;;;;; ++ 4E00;;Lo;0;L;;;;;N;;;;; ++-9FEF;;Lo;0;L;;;;;N;;;;; +++9FFC;;Lo;0;L;;;;;N;;;;; ++ A000;YI SYLLABLE IT;Lo;0;L;;;;;N;;;;; ++ A001;YI SYLLABLE IX;Lo;0;L;;;;;N;;;;; ++ A002;YI SYLLABLE I;Lo;0;L;;;;;N;;;;; ++@@ -14130,6 +14154,12 @@ A7C3;LATIN SMALL LETTER ANGLICANA W;Ll;0;L;;;;;N;;;A7C2;;A7C2 ++ A7C4;LATIN CAPITAL LETTER C WITH PALATAL HOOK;Lu;0;L;;;;;N;;;;A794; ++ A7C5;LATIN CAPITAL LETTER S WITH HOOK;Lu;0;L;;;;;N;;;;0282; ++ A7C6;LATIN CAPITAL LETTER Z WITH PALATAL HOOK;Lu;0;L;;;;;N;;;;1D8E; +++A7C7;LATIN CAPITAL LETTER D WITH SHORT STROKE OVERLAY;Lu;0;L;;;;;N;;;;A7C8; +++A7C8;LATIN SMALL LETTER D WITH SHORT STROKE OVERLAY;Ll;0;L;;;;;N;;;A7C7;;A7C7 +++A7C9;LATIN CAPITAL LETTER S WITH SHORT STROKE OVERLAY;Lu;0;L;;;;;N;;;;A7CA; +++A7CA;LATIN SMALL LETTER S WITH SHORT STROKE OVERLAY;Ll;0;L;;;;;N;;;A7C9;;A7C9 +++A7F5;LATIN CAPITAL LETTER REVERSED HALF H;Lu;0;L;;;;;N;;;;A7F6; +++A7F6;LATIN SMALL LETTER REVERSED HALF H;Ll;0;L;;;;;N;;;A7F5;;A7F5 ++ A7F7;LATIN EPIGRAPHIC LETTER SIDEWAYS I;Lo;0;L;;;;;N;;;;; ++ A7F8;MODIFIER LETTER CAPITAL H WITH STROKE;Lm;0;L; 0126;;;;N;;;;; ++ A7F9;MODIFIER LETTER SMALL LIGATURE OE;Lm;0;L; 0153;;;;N;;;;; ++@@ -14183,6 +14213,7 @@ A828;SYLOTI NAGRI POETRY MARK-1;So;0;ON;;;;;N;;;;; ++ A829;SYLOTI NAGRI POETRY MARK-2;So;0;ON;;;;;N;;;;; ++ A82A;SYLOTI NAGRI POETRY MARK-3;So;0;ON;;;;;N;;;;; ++ A82B;SYLOTI NAGRI POETRY MARK-4;So;0;ON;;;;;N;;;;; +++A82C;SYLOTI NAGRI SIGN ALTERNATE HASANTA;Mn;9;NSM;;;;;N;;;;; ++ A830;NORTH INDIC FRACTION ONE QUARTER;No;0;L;;;;1/4;N;;;;; ++ A831;NORTH INDIC FRACTION ONE HALF;No;0;L;;;;1/2;N;;;;; ++ A832;NORTH INDIC FRACTION THREE QUARTERS;No;0;L;;;;3/4;N;;;;; ++@@ -14897,6 +14928,10 @@ AB64;LATIN SMALL LETTER INVERTED ALPHA;Ll;0;L;;;;;N;;;;; ++ AB65;GREEK LETTER SMALL CAPITAL OMEGA;Ll;0;L;;;;;N;;;;; ++ AB66;LATIN SMALL LETTER DZ DIGRAPH WITH RETROFLEX HOOK;Ll;0;L;;;;;N;;;;; ++ AB67;LATIN SMALL LETTER TS DIGRAPH WITH RETROFLEX HOOK;Ll;0;L;;;;;N;;;;; +++AB68;LATIN SMALL LETTER TURNED R WITH MIDDLE TILDE;Ll;0;L;;;;;N;;;;; +++AB69;MODIFIER LETTER SMALL TURNED W;Lm;0;L; 028D;;;;N;;;;; +++AB6A;MODIFIER LETTER LEFT TACK;Sk;0;ON;;;;;N;;;;; +++AB6B;MODIFIER LETTER RIGHT TACK;Sk;0;ON;;;;;N;;;;; ++ AB70;CHEROKEE SMALL LETTER A;Ll;0;L;;;;;N;;;13A0;;13A0 ++ AB71;CHEROKEE SMALL LETTER E;Ll;0;L;;;;;N;;;13A1;;13A1 ++ AB72;CHEROKEE SMALL LETTER I;Ll;0;L;;;;;N;;;13A2;;13A2 ++@@ -17086,6 +17121,7 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;; ++ 10199;ROMAN DUPONDIUS SIGN;So;0;ON;;;;;N;;;;; ++ 1019A;ROMAN AS SIGN;So;0;ON;;;;;N;;;;; ++ 1019B;ROMAN CENTURIAL SIGN;So;0;ON;;;;;N;;;;; +++1019C;ASCIA SYMBOL;So;0;ON;;;;;N;;;;; ++ 101A0;GREEK SYMBOL TAU RHO;So;0;ON;;;;;N;;;;; ++ 101D0;PHAISTOS DISC SIGN PEDESTRIAN;So;0;L;;;;;N;;;;; ++ 101D1;PHAISTOS DISC SIGN PLUMED HEAD;So;0;L;;;;;N;;;;; ++@@ -19057,6 +19093,53 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;; ++ 10E7C;RUMI FRACTION ONE QUARTER;No;0;AN;;;;1/4;N;;;;; ++ 10E7D;RUMI FRACTION ONE THIRD;No;0;AN;;;;1/3;N;;;;; ++ 10E7E;RUMI FRACTION TWO THIRDS;No;0;AN;;;;2/3;N;;;;; +++10E80;YEZIDI LETTER ELIF;Lo;0;R;;;;;N;;;;; +++10E81;YEZIDI LETTER BE;Lo;0;R;;;;;N;;;;; +++10E82;YEZIDI LETTER PE;Lo;0;R;;;;;N;;;;; +++10E83;YEZIDI LETTER PHE;Lo;0;R;;;;;N;;;;; +++10E84;YEZIDI LETTER THE;Lo;0;R;;;;;N;;;;; +++10E85;YEZIDI LETTER SE;Lo;0;R;;;;;N;;;;; +++10E86;YEZIDI LETTER CIM;Lo;0;R;;;;;N;;;;; +++10E87;YEZIDI LETTER CHIM;Lo;0;R;;;;;N;;;;; +++10E88;YEZIDI LETTER CHHIM;Lo;0;R;;;;;N;;;;; +++10E89;YEZIDI LETTER HHA;Lo;0;R;;;;;N;;;;; +++10E8A;YEZIDI LETTER XA;Lo;0;R;;;;;N;;;;; +++10E8B;YEZIDI LETTER DAL;Lo;0;R;;;;;N;;;;; +++10E8C;YEZIDI LETTER ZAL;Lo;0;R;;;;;N;;;;; +++10E8D;YEZIDI LETTER RA;Lo;0;R;;;;;N;;;;; +++10E8E;YEZIDI LETTER RHA;Lo;0;R;;;;;N;;;;; +++10E8F;YEZIDI LETTER ZA;Lo;0;R;;;;;N;;;;; +++10E90;YEZIDI LETTER JA;Lo;0;R;;;;;N;;;;; +++10E91;YEZIDI LETTER SIN;Lo;0;R;;;;;N;;;;; +++10E92;YEZIDI LETTER SHIN;Lo;0;R;;;;;N;;;;; +++10E93;YEZIDI LETTER SAD;Lo;0;R;;;;;N;;;;; +++10E94;YEZIDI LETTER DAD;Lo;0;R;;;;;N;;;;; +++10E95;YEZIDI LETTER TA;Lo;0;R;;;;;N;;;;; +++10E96;YEZIDI LETTER ZE;Lo;0;R;;;;;N;;;;; +++10E97;YEZIDI LETTER EYN;Lo;0;R;;;;;N;;;;; +++10E98;YEZIDI LETTER XHEYN;Lo;0;R;;;;;N;;;;; +++10E99;YEZIDI LETTER FA;Lo;0;R;;;;;N;;;;; +++10E9A;YEZIDI LETTER VA;Lo;0;R;;;;;N;;;;; +++10E9B;YEZIDI LETTER VA ALTERNATE FORM;Lo;0;R;;;;;N;;;;; +++10E9C;YEZIDI LETTER QAF;Lo;0;R;;;;;N;;;;; +++10E9D;YEZIDI LETTER KAF;Lo;0;R;;;;;N;;;;; +++10E9E;YEZIDI LETTER KHAF;Lo;0;R;;;;;N;;;;; +++10E9F;YEZIDI LETTER GAF;Lo;0;R;;;;;N;;;;; +++10EA0;YEZIDI LETTER LAM;Lo;0;R;;;;;N;;;;; +++10EA1;YEZIDI LETTER MIM;Lo;0;R;;;;;N;;;;; +++10EA2;YEZIDI LETTER NUN;Lo;0;R;;;;;N;;;;; +++10EA3;YEZIDI LETTER UM;Lo;0;R;;;;;N;;;;; +++10EA4;YEZIDI LETTER WAW;Lo;0;R;;;;;N;;;;; +++10EA5;YEZIDI LETTER OW;Lo;0;R;;;;;N;;;;; +++10EA6;YEZIDI LETTER EW;Lo;0;R;;;;;N;;;;; +++10EA7;YEZIDI LETTER HAY;Lo;0;R;;;;;N;;;;; +++10EA8;YEZIDI LETTER YOT;Lo;0;R;;;;;N;;;;; +++10EA9;YEZIDI LETTER ET;Lo;0;R;;;;;N;;;;; +++10EAB;YEZIDI COMBINING HAMZA MARK;Mn;230;NSM;;;;;N;;;;; +++10EAC;YEZIDI COMBINING MADDA MARK;Mn;230;NSM;;;;;N;;;;; +++10EAD;YEZIDI HYPHENATION MARK;Pd;0;R;;;;;N;;;;; +++10EB0;YEZIDI LETTER LAM WITH DOT ABOVE;Lo;0;R;;;;;N;;;;; +++10EB1;YEZIDI LETTER YOT WITH CIRCUMFLEX ABOVE;Lo;0;R;;;;;N;;;;; ++ 10F00;OLD SOGDIAN LETTER ALEPH;Lo;0;R;;;;;N;;;;; ++ 10F01;OLD SOGDIAN LETTER FINAL ALEPH;Lo;0;R;;;;;N;;;;; ++ 10F02;OLD SOGDIAN LETTER BETH;Lo;0;R;;;;;N;;;;; ++@@ -19139,6 +19222,34 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;; ++ 10F57;SOGDIAN PUNCTUATION CIRCLE WITH DOT;Po;0;AL;;;;;N;;;;; ++ 10F58;SOGDIAN PUNCTUATION TWO CIRCLES WITH DOTS;Po;0;AL;;;;;N;;;;; ++ 10F59;SOGDIAN PUNCTUATION HALF CIRCLE WITH DOT;Po;0;AL;;;;;N;;;;; +++10FB0;CHORASMIAN LETTER ALEPH;Lo;0;R;;;;;N;;;;; +++10FB1;CHORASMIAN LETTER SMALL ALEPH;Lo;0;R;;;;;N;;;;; +++10FB2;CHORASMIAN LETTER BETH;Lo;0;R;;;;;N;;;;; +++10FB3;CHORASMIAN LETTER GIMEL;Lo;0;R;;;;;N;;;;; +++10FB4;CHORASMIAN LETTER DALETH;Lo;0;R;;;;;N;;;;; +++10FB5;CHORASMIAN LETTER HE;Lo;0;R;;;;;N;;;;; +++10FB6;CHORASMIAN LETTER WAW;Lo;0;R;;;;;N;;;;; +++10FB7;CHORASMIAN LETTER CURLED WAW;Lo;0;R;;;;;N;;;;; +++10FB8;CHORASMIAN LETTER ZAYIN;Lo;0;R;;;;;N;;;;; +++10FB9;CHORASMIAN LETTER HETH;Lo;0;R;;;;;N;;;;; +++10FBA;CHORASMIAN LETTER YODH;Lo;0;R;;;;;N;;;;; +++10FBB;CHORASMIAN LETTER KAPH;Lo;0;R;;;;;N;;;;; +++10FBC;CHORASMIAN LETTER LAMEDH;Lo;0;R;;;;;N;;;;; +++10FBD;CHORASMIAN LETTER MEM;Lo;0;R;;;;;N;;;;; +++10FBE;CHORASMIAN LETTER NUN;Lo;0;R;;;;;N;;;;; +++10FBF;CHORASMIAN LETTER SAMEKH;Lo;0;R;;;;;N;;;;; +++10FC0;CHORASMIAN LETTER AYIN;Lo;0;R;;;;;N;;;;; +++10FC1;CHORASMIAN LETTER PE;Lo;0;R;;;;;N;;;;; +++10FC2;CHORASMIAN LETTER RESH;Lo;0;R;;;;;N;;;;; +++10FC3;CHORASMIAN LETTER SHIN;Lo;0;R;;;;;N;;;;; +++10FC4;CHORASMIAN LETTER TAW;Lo;0;R;;;;;N;;;;; +++10FC5;CHORASMIAN NUMBER ONE;No;0;R;;;;1;N;;;;; +++10FC6;CHORASMIAN NUMBER TWO;No;0;R;;;;2;N;;;;; +++10FC7;CHORASMIAN NUMBER THREE;No;0;R;;;;3;N;;;;; +++10FC8;CHORASMIAN NUMBER FOUR;No;0;R;;;;4;N;;;;; +++10FC9;CHORASMIAN NUMBER TEN;No;0;R;;;;10;N;;;;; +++10FCA;CHORASMIAN NUMBER TWENTY;No;0;R;;;;20;N;;;;; +++10FCB;CHORASMIAN NUMBER ONE HUNDRED;No;0;R;;;;100;N;;;;; ++ 10FE0;ELYMAIC LETTER ALEPH;Lo;0;R;;;;;N;;;;; ++ 10FE1;ELYMAIC LETTER BETH;Lo;0;R;;;;;N;;;;; ++ 10FE2;ELYMAIC LETTER GIMEL;Lo;0;R;;;;;N;;;;; ++@@ -19443,6 +19554,7 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;; ++ 11144;CHAKMA LETTER LHAA;Lo;0;L;;;;;N;;;;; ++ 11145;CHAKMA VOWEL SIGN AA;Mc;0;L;;;;;N;;;;; ++ 11146;CHAKMA VOWEL SIGN EI;Mc;0;L;;;;;N;;;;; +++11147;CHAKMA LETTER VAA;Lo;0;L;;;;;N;;;;; ++ 11150;MAHAJANI LETTER A;Lo;0;L;;;;;N;;;;; ++ 11151;MAHAJANI LETTER I;Lo;0;L;;;;;N;;;;; ++ 11152;MAHAJANI LETTER U;Lo;0;L;;;;;N;;;;; ++@@ -19560,6 +19672,8 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;; ++ 111CB;SHARADA VOWEL MODIFIER MARK;Mn;0;NSM;;;;;N;;;;; ++ 111CC;SHARADA EXTRA SHORT VOWEL MARK;Mn;0;NSM;;;;;N;;;;; ++ 111CD;SHARADA SUTRA MARK;Po;0;L;;;;;N;;;;; +++111CE;SHARADA VOWEL SIGN PRISHTHAMATRA E;Mc;0;L;;;;;N;;;;; +++111CF;SHARADA SIGN INVERTED CANDRABINDU;Mn;0;NSM;;;;;N;;;;; ++ 111D0;SHARADA DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; ++ 111D1;SHARADA DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; ++ 111D2;SHARADA DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; ++@@ -19941,10 +20055,13 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;; ++ 11457;NEWA DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; ++ 11458;NEWA DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; ++ 11459;NEWA DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; +++1145A;NEWA DOUBLE COMMA;Po;0;L;;;;;N;;;;; ++ 1145B;NEWA PLACEHOLDER MARK;Po;0;L;;;;;N;;;;; ++ 1145D;NEWA INSERTION SIGN;Po;0;L;;;;;N;;;;; ++ 1145E;NEWA SANDHI MARK;Mn;230;NSM;;;;;N;;;;; ++ 1145F;NEWA LETTER VEDIC ANUSVARA;Lo;0;L;;;;;N;;;;; +++11460;NEWA SIGN JIHVAMULIYA;Lo;0;L;;;;;N;;;;; +++11461;NEWA SIGN UPADHMANIYA;Lo;0;L;;;;;N;;;;; ++ 11480;TIRHUTA ANJI;Lo;0;L;;;;;N;;;;; ++ 11481;TIRHUTA LETTER A;Lo;0;L;;;;;N;;;;; ++ 11482;TIRHUTA LETTER AA;Lo;0;L;;;;;N;;;;; ++@@ -20480,6 +20597,78 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;; ++ 118F1;WARANG CITI NUMBER EIGHTY;No;0;L;;;;80;N;;;;; ++ 118F2;WARANG CITI NUMBER NINETY;No;0;L;;;;90;N;;;;; ++ 118FF;WARANG CITI OM;Lo;0;L;;;;;N;;;;; +++11900;DIVES AKURU LETTER A;Lo;0;L;;;;;N;;;;; +++11901;DIVES AKURU LETTER AA;Lo;0;L;;;;;N;;;;; +++11902;DIVES AKURU LETTER I;Lo;0;L;;;;;N;;;;; +++11903;DIVES AKURU LETTER II;Lo;0;L;;;;;N;;;;; +++11904;DIVES AKURU LETTER U;Lo;0;L;;;;;N;;;;; +++11905;DIVES AKURU LETTER UU;Lo;0;L;;;;;N;;;;; +++11906;DIVES AKURU LETTER E;Lo;0;L;;;;;N;;;;; +++11909;DIVES AKURU LETTER O;Lo;0;L;;;;;N;;;;; +++1190C;DIVES AKURU LETTER KA;Lo;0;L;;;;;N;;;;; +++1190D;DIVES AKURU LETTER KHA;Lo;0;L;;;;;N;;;;; +++1190E;DIVES AKURU LETTER GA;Lo;0;L;;;;;N;;;;; +++1190F;DIVES AKURU LETTER GHA;Lo;0;L;;;;;N;;;;; +++11910;DIVES AKURU LETTER NGA;Lo;0;L;;;;;N;;;;; +++11911;DIVES AKURU LETTER CA;Lo;0;L;;;;;N;;;;; +++11912;DIVES AKURU LETTER CHA;Lo;0;L;;;;;N;;;;; +++11913;DIVES AKURU LETTER JA;Lo;0;L;;;;;N;;;;; +++11915;DIVES AKURU LETTER NYA;Lo;0;L;;;;;N;;;;; +++11916;DIVES AKURU LETTER TTA;Lo;0;L;;;;;N;;;;; +++11918;DIVES AKURU LETTER DDA;Lo;0;L;;;;;N;;;;; +++11919;DIVES AKURU LETTER DDHA;Lo;0;L;;;;;N;;;;; +++1191A;DIVES AKURU LETTER NNA;Lo;0;L;;;;;N;;;;; +++1191B;DIVES AKURU LETTER TA;Lo;0;L;;;;;N;;;;; +++1191C;DIVES AKURU LETTER THA;Lo;0;L;;;;;N;;;;; +++1191D;DIVES AKURU LETTER DA;Lo;0;L;;;;;N;;;;; +++1191E;DIVES AKURU LETTER DHA;Lo;0;L;;;;;N;;;;; +++1191F;DIVES AKURU LETTER NA;Lo;0;L;;;;;N;;;;; +++11920;DIVES AKURU LETTER PA;Lo;0;L;;;;;N;;;;; +++11921;DIVES AKURU LETTER PHA;Lo;0;L;;;;;N;;;;; +++11922;DIVES AKURU LETTER BA;Lo;0;L;;;;;N;;;;; +++11923;DIVES AKURU LETTER BHA;Lo;0;L;;;;;N;;;;; +++11924;DIVES AKURU LETTER MA;Lo;0;L;;;;;N;;;;; +++11925;DIVES AKURU LETTER YA;Lo;0;L;;;;;N;;;;; +++11926;DIVES AKURU LETTER YYA;Lo;0;L;;;;;N;;;;; +++11927;DIVES AKURU LETTER RA;Lo;0;L;;;;;N;;;;; +++11928;DIVES AKURU LETTER LA;Lo;0;L;;;;;N;;;;; +++11929;DIVES AKURU LETTER VA;Lo;0;L;;;;;N;;;;; +++1192A;DIVES AKURU LETTER SHA;Lo;0;L;;;;;N;;;;; +++1192B;DIVES AKURU LETTER SSA;Lo;0;L;;;;;N;;;;; +++1192C;DIVES AKURU LETTER SA;Lo;0;L;;;;;N;;;;; +++1192D;DIVES AKURU LETTER HA;Lo;0;L;;;;;N;;;;; +++1192E;DIVES AKURU LETTER LLA;Lo;0;L;;;;;N;;;;; +++1192F;DIVES AKURU LETTER ZA;Lo;0;L;;;;;N;;;;; +++11930;DIVES AKURU VOWEL SIGN AA;Mc;0;L;;;;;N;;;;; +++11931;DIVES AKURU VOWEL SIGN I;Mc;0;L;;;;;N;;;;; +++11932;DIVES AKURU VOWEL SIGN II;Mc;0;L;;;;;N;;;;; +++11933;DIVES AKURU VOWEL SIGN U;Mc;0;L;;;;;N;;;;; +++11934;DIVES AKURU VOWEL SIGN UU;Mc;0;L;;;;;N;;;;; +++11935;DIVES AKURU VOWEL SIGN E;Mc;0;L;;;;;N;;;;; +++11937;DIVES AKURU VOWEL SIGN AI;Mc;0;L;;;;;N;;;;; +++11938;DIVES AKURU VOWEL SIGN O;Mc;0;L;11935 11930;;;;N;;;;; +++1193B;DIVES AKURU SIGN ANUSVARA;Mn;0;NSM;;;;;N;;;;; +++1193C;DIVES AKURU SIGN CANDRABINDU;Mn;0;NSM;;;;;N;;;;; +++1193D;DIVES AKURU SIGN HALANTA;Mc;9;L;;;;;N;;;;; +++1193E;DIVES AKURU VIRAMA;Mn;9;NSM;;;;;N;;;;; +++1193F;DIVES AKURU PREFIXED NASAL SIGN;Lo;0;L;;;;;N;;;;; +++11940;DIVES AKURU MEDIAL YA;Mc;0;L;;;;;N;;;;; +++11941;DIVES AKURU INITIAL RA;Lo;0;L;;;;;N;;;;; +++11942;DIVES AKURU MEDIAL RA;Mc;0;L;;;;;N;;;;; +++11943;DIVES AKURU SIGN NUKTA;Mn;7;NSM;;;;;N;;;;; +++11944;DIVES AKURU DOUBLE DANDA;Po;0;L;;;;;N;;;;; +++11945;DIVES AKURU GAP FILLER;Po;0;L;;;;;N;;;;; +++11946;DIVES AKURU END OF TEXT MARK;Po;0;L;;;;;N;;;;; +++11950;DIVES AKURU DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; +++11951;DIVES AKURU DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; +++11952;DIVES AKURU DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; +++11953;DIVES AKURU DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; +++11954;DIVES AKURU DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; +++11955;DIVES AKURU DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; +++11956;DIVES AKURU DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; +++11957;DIVES AKURU DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; +++11958;DIVES AKURU DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; +++11959;DIVES AKURU DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; ++ 119A0;NANDINAGARI LETTER A;Lo;0;L;;;;;N;;;;; ++ 119A1;NANDINAGARI LETTER AA;Lo;0;L;;;;;N;;;;; ++ 119A2;NANDINAGARI LETTER I;Lo;0;L;;;;;N;;;;; ++@@ -21085,6 +21274,7 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;; ++ 11EF6;MAKASAR VOWEL SIGN O;Mc;0;L;;;;;N;;;;; ++ 11EF7;MAKASAR PASSIMBANG;Po;0;L;;;;;N;;;;; ++ 11EF8;MAKASAR END OF SECTION;Po;0;L;;;;;N;;;;; +++11FB0;LISU LETTER YHA;Lo;0;L;;;;;N;;;;; ++ 11FC0;TAMIL FRACTION ONE THREE-HUNDRED-AND-TWENTIETH;No;0;L;;;;1/320;N;;;;; ++ 11FC1;TAMIL FRACTION ONE ONE-HUNDRED-AND-SIXTIETH;No;0;L;;;;1/160;N;;;;; ++ 11FC2;TAMIL FRACTION ONE EIGHTIETH;No;0;L;;;;1/80;N;;;;; ++@@ -25052,6 +25242,9 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;; ++ 16FE1;NUSHU ITERATION MARK;Lm;0;L;;;;;N;;;;; ++ 16FE2;OLD CHINESE HOOK MARK;Po;0;ON;;;;;N;;;;; ++ 16FE3;OLD CHINESE ITERATION MARK;Lm;0;L;;;;;N;;;;; +++16FE4;KHITAN SMALL SCRIPT FILLER;Mn;0;NSM;;;;;N;;;;; +++16FF0;VIETNAMESE ALTERNATE READING MARK CA;Mc;6;L;;;;;N;;;;; +++16FF1;VIETNAMESE ALTERNATE READING MARK NHAY;Mc;6;L;;;;;N;;;;; ++ 17000;;Lo;0;L;;;;;N;;;;; ++ 187F7;;Lo;0;L;;;;;N;;;;; ++ 18800;TANGUT COMPONENT-001;Lo;0;L;;;;;N;;;;; ++@@ -25809,6 +26002,491 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;; ++ 18AF0;TANGUT COMPONENT-753;Lo;0;L;;;;;N;;;;; ++ 18AF1;TANGUT COMPONENT-754;Lo;0;L;;;;;N;;;;; ++ 18AF2;TANGUT COMPONENT-755;Lo;0;L;;;;;N;;;;; +++18AF3;TANGUT COMPONENT-756;Lo;0;L;;;;;N;;;;; +++18AF4;TANGUT COMPONENT-757;Lo;0;L;;;;;N;;;;; +++18AF5;TANGUT COMPONENT-758;Lo;0;L;;;;;N;;;;; +++18AF6;TANGUT COMPONENT-759;Lo;0;L;;;;;N;;;;; +++18AF7;TANGUT COMPONENT-760;Lo;0;L;;;;;N;;;;; +++18AF8;TANGUT COMPONENT-761;Lo;0;L;;;;;N;;;;; +++18AF9;TANGUT COMPONENT-762;Lo;0;L;;;;;N;;;;; +++18AFA;TANGUT COMPONENT-763;Lo;0;L;;;;;N;;;;; +++18AFB;TANGUT COMPONENT-764;Lo;0;L;;;;;N;;;;; +++18AFC;TANGUT COMPONENT-765;Lo;0;L;;;;;N;;;;; +++18AFD;TANGUT COMPONENT-766;Lo;0;L;;;;;N;;;;; +++18AFE;TANGUT COMPONENT-767;Lo;0;L;;;;;N;;;;; +++18AFF;TANGUT COMPONENT-768;Lo;0;L;;;;;N;;;;; +++18B00;KHITAN SMALL SCRIPT CHARACTER-18B00;Lo;0;L;;;;;N;;;;; +++18B01;KHITAN SMALL SCRIPT CHARACTER-18B01;Lo;0;L;;;;;N;;;;; +++18B02;KHITAN SMALL SCRIPT CHARACTER-18B02;Lo;0;L;;;;;N;;;;; +++18B03;KHITAN SMALL SCRIPT CHARACTER-18B03;Lo;0;L;;;;;N;;;;; +++18B04;KHITAN SMALL SCRIPT CHARACTER-18B04;Lo;0;L;;;;;N;;;;; +++18B05;KHITAN SMALL SCRIPT CHARACTER-18B05;Lo;0;L;;;;;N;;;;; +++18B06;KHITAN SMALL SCRIPT CHARACTER-18B06;Lo;0;L;;;;;N;;;;; +++18B07;KHITAN SMALL SCRIPT CHARACTER-18B07;Lo;0;L;;;;;N;;;;; +++18B08;KHITAN SMALL SCRIPT CHARACTER-18B08;Lo;0;L;;;;;N;;;;; +++18B09;KHITAN SMALL SCRIPT CHARACTER-18B09;Lo;0;L;;;;;N;;;;; +++18B0A;KHITAN SMALL SCRIPT CHARACTER-18B0A;Lo;0;L;;;;;N;;;;; +++18B0B;KHITAN SMALL SCRIPT CHARACTER-18B0B;Lo;0;L;;;;;N;;;;; +++18B0C;KHITAN SMALL SCRIPT CHARACTER-18B0C;Lo;0;L;;;;;N;;;;; +++18B0D;KHITAN SMALL SCRIPT CHARACTER-18B0D;Lo;0;L;;;;;N;;;;; +++18B0E;KHITAN SMALL SCRIPT CHARACTER-18B0E;Lo;0;L;;;;;N;;;;; +++18B0F;KHITAN SMALL SCRIPT CHARACTER-18B0F;Lo;0;L;;;;;N;;;;; +++18B10;KHITAN SMALL SCRIPT CHARACTER-18B10;Lo;0;L;;;;;N;;;;; +++18B11;KHITAN SMALL SCRIPT CHARACTER-18B11;Lo;0;L;;;;;N;;;;; +++18B12;KHITAN SMALL SCRIPT CHARACTER-18B12;Lo;0;L;;;;;N;;;;; +++18B13;KHITAN SMALL SCRIPT CHARACTER-18B13;Lo;0;L;;;;;N;;;;; +++18B14;KHITAN SMALL SCRIPT CHARACTER-18B14;Lo;0;L;;;;;N;;;;; +++18B15;KHITAN SMALL SCRIPT CHARACTER-18B15;Lo;0;L;;;;;N;;;;; +++18B16;KHITAN SMALL SCRIPT CHARACTER-18B16;Lo;0;L;;;;;N;;;;; +++18B17;KHITAN SMALL SCRIPT CHARACTER-18B17;Lo;0;L;;;;;N;;;;; +++18B18;KHITAN SMALL SCRIPT CHARACTER-18B18;Lo;0;L;;;;;N;;;;; +++18B19;KHITAN SMALL SCRIPT CHARACTER-18B19;Lo;0;L;;;;;N;;;;; +++18B1A;KHITAN SMALL SCRIPT CHARACTER-18B1A;Lo;0;L;;;;;N;;;;; +++18B1B;KHITAN SMALL SCRIPT CHARACTER-18B1B;Lo;0;L;;;;;N;;;;; +++18B1C;KHITAN SMALL SCRIPT CHARACTER-18B1C;Lo;0;L;;;;;N;;;;; +++18B1D;KHITAN SMALL SCRIPT CHARACTER-18B1D;Lo;0;L;;;;;N;;;;; +++18B1E;KHITAN SMALL SCRIPT CHARACTER-18B1E;Lo;0;L;;;;;N;;;;; +++18B1F;KHITAN SMALL SCRIPT CHARACTER-18B1F;Lo;0;L;;;;;N;;;;; +++18B20;KHITAN SMALL SCRIPT CHARACTER-18B20;Lo;0;L;;;;;N;;;;; +++18B21;KHITAN SMALL SCRIPT CHARACTER-18B21;Lo;0;L;;;;;N;;;;; +++18B22;KHITAN SMALL SCRIPT CHARACTER-18B22;Lo;0;L;;;;;N;;;;; +++18B23;KHITAN SMALL SCRIPT CHARACTER-18B23;Lo;0;L;;;;;N;;;;; +++18B24;KHITAN SMALL SCRIPT CHARACTER-18B24;Lo;0;L;;;;;N;;;;; +++18B25;KHITAN SMALL SCRIPT CHARACTER-18B25;Lo;0;L;;;;;N;;;;; +++18B26;KHITAN SMALL SCRIPT CHARACTER-18B26;Lo;0;L;;;;;N;;;;; +++18B27;KHITAN SMALL SCRIPT CHARACTER-18B27;Lo;0;L;;;;;N;;;;; +++18B28;KHITAN SMALL SCRIPT CHARACTER-18B28;Lo;0;L;;;;;N;;;;; +++18B29;KHITAN SMALL SCRIPT CHARACTER-18B29;Lo;0;L;;;;;N;;;;; +++18B2A;KHITAN SMALL SCRIPT CHARACTER-18B2A;Lo;0;L;;;;;N;;;;; +++18B2B;KHITAN SMALL SCRIPT CHARACTER-18B2B;Lo;0;L;;;;;N;;;;; +++18B2C;KHITAN SMALL SCRIPT CHARACTER-18B2C;Lo;0;L;;;;;N;;;;; +++18B2D;KHITAN SMALL SCRIPT CHARACTER-18B2D;Lo;0;L;;;;;N;;;;; +++18B2E;KHITAN SMALL SCRIPT CHARACTER-18B2E;Lo;0;L;;;;;N;;;;; +++18B2F;KHITAN SMALL SCRIPT CHARACTER-18B2F;Lo;0;L;;;;;N;;;;; +++18B30;KHITAN SMALL SCRIPT CHARACTER-18B30;Lo;0;L;;;;;N;;;;; +++18B31;KHITAN SMALL SCRIPT CHARACTER-18B31;Lo;0;L;;;;;N;;;;; +++18B32;KHITAN SMALL SCRIPT CHARACTER-18B32;Lo;0;L;;;;;N;;;;; +++18B33;KHITAN SMALL SCRIPT CHARACTER-18B33;Lo;0;L;;;;;N;;;;; +++18B34;KHITAN SMALL SCRIPT CHARACTER-18B34;Lo;0;L;;;;;N;;;;; +++18B35;KHITAN SMALL SCRIPT CHARACTER-18B35;Lo;0;L;;;;;N;;;;; +++18B36;KHITAN SMALL SCRIPT CHARACTER-18B36;Lo;0;L;;;;;N;;;;; +++18B37;KHITAN SMALL SCRIPT CHARACTER-18B37;Lo;0;L;;;;;N;;;;; +++18B38;KHITAN SMALL SCRIPT CHARACTER-18B38;Lo;0;L;;;;;N;;;;; +++18B39;KHITAN SMALL SCRIPT CHARACTER-18B39;Lo;0;L;;;;;N;;;;; +++18B3A;KHITAN SMALL SCRIPT CHARACTER-18B3A;Lo;0;L;;;;;N;;;;; +++18B3B;KHITAN SMALL SCRIPT CHARACTER-18B3B;Lo;0;L;;;;;N;;;;; +++18B3C;KHITAN SMALL SCRIPT CHARACTER-18B3C;Lo;0;L;;;;;N;;;;; +++18B3D;KHITAN SMALL SCRIPT CHARACTER-18B3D;Lo;0;L;;;;;N;;;;; +++18B3E;KHITAN SMALL SCRIPT CHARACTER-18B3E;Lo;0;L;;;;;N;;;;; +++18B3F;KHITAN SMALL SCRIPT CHARACTER-18B3F;Lo;0;L;;;;;N;;;;; +++18B40;KHITAN SMALL SCRIPT CHARACTER-18B40;Lo;0;L;;;;;N;;;;; +++18B41;KHITAN SMALL SCRIPT CHARACTER-18B41;Lo;0;L;;;;;N;;;;; +++18B42;KHITAN SMALL SCRIPT CHARACTER-18B42;Lo;0;L;;;;;N;;;;; +++18B43;KHITAN SMALL SCRIPT CHARACTER-18B43;Lo;0;L;;;;;N;;;;; +++18B44;KHITAN SMALL SCRIPT CHARACTER-18B44;Lo;0;L;;;;;N;;;;; +++18B45;KHITAN SMALL SCRIPT CHARACTER-18B45;Lo;0;L;;;;;N;;;;; +++18B46;KHITAN SMALL SCRIPT CHARACTER-18B46;Lo;0;L;;;;;N;;;;; +++18B47;KHITAN SMALL SCRIPT CHARACTER-18B47;Lo;0;L;;;;;N;;;;; +++18B48;KHITAN SMALL SCRIPT CHARACTER-18B48;Lo;0;L;;;;;N;;;;; +++18B49;KHITAN SMALL SCRIPT CHARACTER-18B49;Lo;0;L;;;;;N;;;;; +++18B4A;KHITAN SMALL SCRIPT CHARACTER-18B4A;Lo;0;L;;;;;N;;;;; +++18B4B;KHITAN SMALL SCRIPT CHARACTER-18B4B;Lo;0;L;;;;;N;;;;; +++18B4C;KHITAN SMALL SCRIPT CHARACTER-18B4C;Lo;0;L;;;;;N;;;;; +++18B4D;KHITAN SMALL SCRIPT CHARACTER-18B4D;Lo;0;L;;;;;N;;;;; +++18B4E;KHITAN SMALL SCRIPT CHARACTER-18B4E;Lo;0;L;;;;;N;;;;; +++18B4F;KHITAN SMALL SCRIPT CHARACTER-18B4F;Lo;0;L;;;;;N;;;;; +++18B50;KHITAN SMALL SCRIPT CHARACTER-18B50;Lo;0;L;;;;;N;;;;; +++18B51;KHITAN SMALL SCRIPT CHARACTER-18B51;Lo;0;L;;;;;N;;;;; +++18B52;KHITAN SMALL SCRIPT CHARACTER-18B52;Lo;0;L;;;;;N;;;;; +++18B53;KHITAN SMALL SCRIPT CHARACTER-18B53;Lo;0;L;;;;;N;;;;; +++18B54;KHITAN SMALL SCRIPT CHARACTER-18B54;Lo;0;L;;;;;N;;;;; +++18B55;KHITAN SMALL SCRIPT CHARACTER-18B55;Lo;0;L;;;;;N;;;;; +++18B56;KHITAN SMALL SCRIPT CHARACTER-18B56;Lo;0;L;;;;;N;;;;; +++18B57;KHITAN SMALL SCRIPT CHARACTER-18B57;Lo;0;L;;;;;N;;;;; +++18B58;KHITAN SMALL SCRIPT CHARACTER-18B58;Lo;0;L;;;;;N;;;;; +++18B59;KHITAN SMALL SCRIPT CHARACTER-18B59;Lo;0;L;;;;;N;;;;; +++18B5A;KHITAN SMALL SCRIPT CHARACTER-18B5A;Lo;0;L;;;;;N;;;;; +++18B5B;KHITAN SMALL SCRIPT CHARACTER-18B5B;Lo;0;L;;;;;N;;;;; +++18B5C;KHITAN SMALL SCRIPT CHARACTER-18B5C;Lo;0;L;;;;;N;;;;; +++18B5D;KHITAN SMALL SCRIPT CHARACTER-18B5D;Lo;0;L;;;;;N;;;;; +++18B5E;KHITAN SMALL SCRIPT CHARACTER-18B5E;Lo;0;L;;;;;N;;;;; +++18B5F;KHITAN SMALL SCRIPT CHARACTER-18B5F;Lo;0;L;;;;;N;;;;; +++18B60;KHITAN SMALL SCRIPT CHARACTER-18B60;Lo;0;L;;;;;N;;;;; +++18B61;KHITAN SMALL SCRIPT CHARACTER-18B61;Lo;0;L;;;;;N;;;;; +++18B62;KHITAN SMALL SCRIPT CHARACTER-18B62;Lo;0;L;;;;;N;;;;; +++18B63;KHITAN SMALL SCRIPT CHARACTER-18B63;Lo;0;L;;;;;N;;;;; +++18B64;KHITAN SMALL SCRIPT CHARACTER-18B64;Lo;0;L;;;;;N;;;;; +++18B65;KHITAN SMALL SCRIPT CHARACTER-18B65;Lo;0;L;;;;;N;;;;; +++18B66;KHITAN SMALL SCRIPT CHARACTER-18B66;Lo;0;L;;;;;N;;;;; +++18B67;KHITAN SMALL SCRIPT CHARACTER-18B67;Lo;0;L;;;;;N;;;;; +++18B68;KHITAN SMALL SCRIPT CHARACTER-18B68;Lo;0;L;;;;;N;;;;; +++18B69;KHITAN SMALL SCRIPT CHARACTER-18B69;Lo;0;L;;;;;N;;;;; +++18B6A;KHITAN SMALL SCRIPT CHARACTER-18B6A;Lo;0;L;;;;;N;;;;; +++18B6B;KHITAN SMALL SCRIPT CHARACTER-18B6B;Lo;0;L;;;;;N;;;;; +++18B6C;KHITAN SMALL SCRIPT CHARACTER-18B6C;Lo;0;L;;;;;N;;;;; +++18B6D;KHITAN SMALL SCRIPT CHARACTER-18B6D;Lo;0;L;;;;;N;;;;; +++18B6E;KHITAN SMALL SCRIPT CHARACTER-18B6E;Lo;0;L;;;;;N;;;;; +++18B6F;KHITAN SMALL SCRIPT CHARACTER-18B6F;Lo;0;L;;;;;N;;;;; +++18B70;KHITAN SMALL SCRIPT CHARACTER-18B70;Lo;0;L;;;;;N;;;;; +++18B71;KHITAN SMALL SCRIPT CHARACTER-18B71;Lo;0;L;;;;;N;;;;; +++18B72;KHITAN SMALL SCRIPT CHARACTER-18B72;Lo;0;L;;;;;N;;;;; +++18B73;KHITAN SMALL SCRIPT CHARACTER-18B73;Lo;0;L;;;;;N;;;;; +++18B74;KHITAN SMALL SCRIPT CHARACTER-18B74;Lo;0;L;;;;;N;;;;; +++18B75;KHITAN SMALL SCRIPT CHARACTER-18B75;Lo;0;L;;;;;N;;;;; +++18B76;KHITAN SMALL SCRIPT CHARACTER-18B76;Lo;0;L;;;;;N;;;;; +++18B77;KHITAN SMALL SCRIPT CHARACTER-18B77;Lo;0;L;;;;;N;;;;; +++18B78;KHITAN SMALL SCRIPT CHARACTER-18B78;Lo;0;L;;;;;N;;;;; +++18B79;KHITAN SMALL SCRIPT CHARACTER-18B79;Lo;0;L;;;;;N;;;;; +++18B7A;KHITAN SMALL SCRIPT CHARACTER-18B7A;Lo;0;L;;;;;N;;;;; +++18B7B;KHITAN SMALL SCRIPT CHARACTER-18B7B;Lo;0;L;;;;;N;;;;; +++18B7C;KHITAN SMALL SCRIPT CHARACTER-18B7C;Lo;0;L;;;;;N;;;;; +++18B7D;KHITAN SMALL SCRIPT CHARACTER-18B7D;Lo;0;L;;;;;N;;;;; +++18B7E;KHITAN SMALL SCRIPT CHARACTER-18B7E;Lo;0;L;;;;;N;;;;; +++18B7F;KHITAN SMALL SCRIPT CHARACTER-18B7F;Lo;0;L;;;;;N;;;;; +++18B80;KHITAN SMALL SCRIPT CHARACTER-18B80;Lo;0;L;;;;;N;;;;; +++18B81;KHITAN SMALL SCRIPT CHARACTER-18B81;Lo;0;L;;;;;N;;;;; +++18B82;KHITAN SMALL SCRIPT CHARACTER-18B82;Lo;0;L;;;;;N;;;;; +++18B83;KHITAN SMALL SCRIPT CHARACTER-18B83;Lo;0;L;;;;;N;;;;; +++18B84;KHITAN SMALL SCRIPT CHARACTER-18B84;Lo;0;L;;;;;N;;;;; +++18B85;KHITAN SMALL SCRIPT CHARACTER-18B85;Lo;0;L;;;;;N;;;;; +++18B86;KHITAN SMALL SCRIPT CHARACTER-18B86;Lo;0;L;;;;;N;;;;; +++18B87;KHITAN SMALL SCRIPT CHARACTER-18B87;Lo;0;L;;;;;N;;;;; +++18B88;KHITAN SMALL SCRIPT CHARACTER-18B88;Lo;0;L;;;;;N;;;;; +++18B89;KHITAN SMALL SCRIPT CHARACTER-18B89;Lo;0;L;;;;;N;;;;; +++18B8A;KHITAN SMALL SCRIPT CHARACTER-18B8A;Lo;0;L;;;;;N;;;;; +++18B8B;KHITAN SMALL SCRIPT CHARACTER-18B8B;Lo;0;L;;;;;N;;;;; +++18B8C;KHITAN SMALL SCRIPT CHARACTER-18B8C;Lo;0;L;;;;;N;;;;; +++18B8D;KHITAN SMALL SCRIPT CHARACTER-18B8D;Lo;0;L;;;;;N;;;;; +++18B8E;KHITAN SMALL SCRIPT CHARACTER-18B8E;Lo;0;L;;;;;N;;;;; +++18B8F;KHITAN SMALL SCRIPT CHARACTER-18B8F;Lo;0;L;;;;;N;;;;; +++18B90;KHITAN SMALL SCRIPT CHARACTER-18B90;Lo;0;L;;;;;N;;;;; +++18B91;KHITAN SMALL SCRIPT CHARACTER-18B91;Lo;0;L;;;;;N;;;;; +++18B92;KHITAN SMALL SCRIPT CHARACTER-18B92;Lo;0;L;;;;;N;;;;; +++18B93;KHITAN SMALL SCRIPT CHARACTER-18B93;Lo;0;L;;;;;N;;;;; +++18B94;KHITAN SMALL SCRIPT CHARACTER-18B94;Lo;0;L;;;;;N;;;;; +++18B95;KHITAN SMALL SCRIPT CHARACTER-18B95;Lo;0;L;;;;;N;;;;; +++18B96;KHITAN SMALL SCRIPT CHARACTER-18B96;Lo;0;L;;;;;N;;;;; +++18B97;KHITAN SMALL SCRIPT CHARACTER-18B97;Lo;0;L;;;;;N;;;;; +++18B98;KHITAN SMALL SCRIPT CHARACTER-18B98;Lo;0;L;;;;;N;;;;; +++18B99;KHITAN SMALL SCRIPT CHARACTER-18B99;Lo;0;L;;;;;N;;;;; +++18B9A;KHITAN SMALL SCRIPT CHARACTER-18B9A;Lo;0;L;;;;;N;;;;; +++18B9B;KHITAN SMALL SCRIPT CHARACTER-18B9B;Lo;0;L;;;;;N;;;;; +++18B9C;KHITAN SMALL SCRIPT CHARACTER-18B9C;Lo;0;L;;;;;N;;;;; +++18B9D;KHITAN SMALL SCRIPT CHARACTER-18B9D;Lo;0;L;;;;;N;;;;; +++18B9E;KHITAN SMALL SCRIPT CHARACTER-18B9E;Lo;0;L;;;;;N;;;;; +++18B9F;KHITAN SMALL SCRIPT CHARACTER-18B9F;Lo;0;L;;;;;N;;;;; +++18BA0;KHITAN SMALL SCRIPT CHARACTER-18BA0;Lo;0;L;;;;;N;;;;; +++18BA1;KHITAN SMALL SCRIPT CHARACTER-18BA1;Lo;0;L;;;;;N;;;;; +++18BA2;KHITAN SMALL SCRIPT CHARACTER-18BA2;Lo;0;L;;;;;N;;;;; +++18BA3;KHITAN SMALL SCRIPT CHARACTER-18BA3;Lo;0;L;;;;;N;;;;; +++18BA4;KHITAN SMALL SCRIPT CHARACTER-18BA4;Lo;0;L;;;;;N;;;;; +++18BA5;KHITAN SMALL SCRIPT CHARACTER-18BA5;Lo;0;L;;;;;N;;;;; +++18BA6;KHITAN SMALL SCRIPT CHARACTER-18BA6;Lo;0;L;;;;;N;;;;; +++18BA7;KHITAN SMALL SCRIPT CHARACTER-18BA7;Lo;0;L;;;;;N;;;;; +++18BA8;KHITAN SMALL SCRIPT CHARACTER-18BA8;Lo;0;L;;;;;N;;;;; +++18BA9;KHITAN SMALL SCRIPT CHARACTER-18BA9;Lo;0;L;;;;;N;;;;; +++18BAA;KHITAN SMALL SCRIPT CHARACTER-18BAA;Lo;0;L;;;;;N;;;;; +++18BAB;KHITAN SMALL SCRIPT CHARACTER-18BAB;Lo;0;L;;;;;N;;;;; +++18BAC;KHITAN SMALL SCRIPT CHARACTER-18BAC;Lo;0;L;;;;;N;;;;; +++18BAD;KHITAN SMALL SCRIPT CHARACTER-18BAD;Lo;0;L;;;;;N;;;;; +++18BAE;KHITAN SMALL SCRIPT CHARACTER-18BAE;Lo;0;L;;;;;N;;;;; +++18BAF;KHITAN SMALL SCRIPT CHARACTER-18BAF;Lo;0;L;;;;;N;;;;; +++18BB0;KHITAN SMALL SCRIPT CHARACTER-18BB0;Lo;0;L;;;;;N;;;;; +++18BB1;KHITAN SMALL SCRIPT CHARACTER-18BB1;Lo;0;L;;;;;N;;;;; +++18BB2;KHITAN SMALL SCRIPT CHARACTER-18BB2;Lo;0;L;;;;;N;;;;; +++18BB3;KHITAN SMALL SCRIPT CHARACTER-18BB3;Lo;0;L;;;;;N;;;;; +++18BB4;KHITAN SMALL SCRIPT CHARACTER-18BB4;Lo;0;L;;;;;N;;;;; +++18BB5;KHITAN SMALL SCRIPT CHARACTER-18BB5;Lo;0;L;;;;;N;;;;; +++18BB6;KHITAN SMALL SCRIPT CHARACTER-18BB6;Lo;0;L;;;;;N;;;;; +++18BB7;KHITAN SMALL SCRIPT CHARACTER-18BB7;Lo;0;L;;;;;N;;;;; +++18BB8;KHITAN SMALL SCRIPT CHARACTER-18BB8;Lo;0;L;;;;;N;;;;; +++18BB9;KHITAN SMALL SCRIPT CHARACTER-18BB9;Lo;0;L;;;;;N;;;;; +++18BBA;KHITAN SMALL SCRIPT CHARACTER-18BBA;Lo;0;L;;;;;N;;;;; +++18BBB;KHITAN SMALL SCRIPT CHARACTER-18BBB;Lo;0;L;;;;;N;;;;; +++18BBC;KHITAN SMALL SCRIPT CHARACTER-18BBC;Lo;0;L;;;;;N;;;;; +++18BBD;KHITAN SMALL SCRIPT CHARACTER-18BBD;Lo;0;L;;;;;N;;;;; +++18BBE;KHITAN SMALL SCRIPT CHARACTER-18BBE;Lo;0;L;;;;;N;;;;; +++18BBF;KHITAN SMALL SCRIPT CHARACTER-18BBF;Lo;0;L;;;;;N;;;;; +++18BC0;KHITAN SMALL SCRIPT CHARACTER-18BC0;Lo;0;L;;;;;N;;;;; +++18BC1;KHITAN SMALL SCRIPT CHARACTER-18BC1;Lo;0;L;;;;;N;;;;; +++18BC2;KHITAN SMALL SCRIPT CHARACTER-18BC2;Lo;0;L;;;;;N;;;;; +++18BC3;KHITAN SMALL SCRIPT CHARACTER-18BC3;Lo;0;L;;;;;N;;;;; +++18BC4;KHITAN SMALL SCRIPT CHARACTER-18BC4;Lo;0;L;;;;;N;;;;; +++18BC5;KHITAN SMALL SCRIPT CHARACTER-18BC5;Lo;0;L;;;;;N;;;;; +++18BC6;KHITAN SMALL SCRIPT CHARACTER-18BC6;Lo;0;L;;;;;N;;;;; +++18BC7;KHITAN SMALL SCRIPT CHARACTER-18BC7;Lo;0;L;;;;;N;;;;; +++18BC8;KHITAN SMALL SCRIPT CHARACTER-18BC8;Lo;0;L;;;;;N;;;;; +++18BC9;KHITAN SMALL SCRIPT CHARACTER-18BC9;Lo;0;L;;;;;N;;;;; +++18BCA;KHITAN SMALL SCRIPT CHARACTER-18BCA;Lo;0;L;;;;;N;;;;; +++18BCB;KHITAN SMALL SCRIPT CHARACTER-18BCB;Lo;0;L;;;;;N;;;;; +++18BCC;KHITAN SMALL SCRIPT CHARACTER-18BCC;Lo;0;L;;;;;N;;;;; +++18BCD;KHITAN SMALL SCRIPT CHARACTER-18BCD;Lo;0;L;;;;;N;;;;; +++18BCE;KHITAN SMALL SCRIPT CHARACTER-18BCE;Lo;0;L;;;;;N;;;;; +++18BCF;KHITAN SMALL SCRIPT CHARACTER-18BCF;Lo;0;L;;;;;N;;;;; +++18BD0;KHITAN SMALL SCRIPT CHARACTER-18BD0;Lo;0;L;;;;;N;;;;; +++18BD1;KHITAN SMALL SCRIPT CHARACTER-18BD1;Lo;0;L;;;;;N;;;;; +++18BD2;KHITAN SMALL SCRIPT CHARACTER-18BD2;Lo;0;L;;;;;N;;;;; +++18BD3;KHITAN SMALL SCRIPT CHARACTER-18BD3;Lo;0;L;;;;;N;;;;; +++18BD4;KHITAN SMALL SCRIPT CHARACTER-18BD4;Lo;0;L;;;;;N;;;;; +++18BD5;KHITAN SMALL SCRIPT CHARACTER-18BD5;Lo;0;L;;;;;N;;;;; +++18BD6;KHITAN SMALL SCRIPT CHARACTER-18BD6;Lo;0;L;;;;;N;;;;; +++18BD7;KHITAN SMALL SCRIPT CHARACTER-18BD7;Lo;0;L;;;;;N;;;;; +++18BD8;KHITAN SMALL SCRIPT CHARACTER-18BD8;Lo;0;L;;;;;N;;;;; +++18BD9;KHITAN SMALL SCRIPT CHARACTER-18BD9;Lo;0;L;;;;;N;;;;; +++18BDA;KHITAN SMALL SCRIPT CHARACTER-18BDA;Lo;0;L;;;;;N;;;;; +++18BDB;KHITAN SMALL SCRIPT CHARACTER-18BDB;Lo;0;L;;;;;N;;;;; +++18BDC;KHITAN SMALL SCRIPT CHARACTER-18BDC;Lo;0;L;;;;;N;;;;; +++18BDD;KHITAN SMALL SCRIPT CHARACTER-18BDD;Lo;0;L;;;;;N;;;;; +++18BDE;KHITAN SMALL SCRIPT CHARACTER-18BDE;Lo;0;L;;;;;N;;;;; +++18BDF;KHITAN SMALL SCRIPT CHARACTER-18BDF;Lo;0;L;;;;;N;;;;; +++18BE0;KHITAN SMALL SCRIPT CHARACTER-18BE0;Lo;0;L;;;;;N;;;;; +++18BE1;KHITAN SMALL SCRIPT CHARACTER-18BE1;Lo;0;L;;;;;N;;;;; +++18BE2;KHITAN SMALL SCRIPT CHARACTER-18BE2;Lo;0;L;;;;;N;;;;; +++18BE3;KHITAN SMALL SCRIPT CHARACTER-18BE3;Lo;0;L;;;;;N;;;;; +++18BE4;KHITAN SMALL SCRIPT CHARACTER-18BE4;Lo;0;L;;;;;N;;;;; +++18BE5;KHITAN SMALL SCRIPT CHARACTER-18BE5;Lo;0;L;;;;;N;;;;; +++18BE6;KHITAN SMALL SCRIPT CHARACTER-18BE6;Lo;0;L;;;;;N;;;;; +++18BE7;KHITAN SMALL SCRIPT CHARACTER-18BE7;Lo;0;L;;;;;N;;;;; +++18BE8;KHITAN SMALL SCRIPT CHARACTER-18BE8;Lo;0;L;;;;;N;;;;; +++18BE9;KHITAN SMALL SCRIPT CHARACTER-18BE9;Lo;0;L;;;;;N;;;;; +++18BEA;KHITAN SMALL SCRIPT CHARACTER-18BEA;Lo;0;L;;;;;N;;;;; +++18BEB;KHITAN SMALL SCRIPT CHARACTER-18BEB;Lo;0;L;;;;;N;;;;; +++18BEC;KHITAN SMALL SCRIPT CHARACTER-18BEC;Lo;0;L;;;;;N;;;;; +++18BED;KHITAN SMALL SCRIPT CHARACTER-18BED;Lo;0;L;;;;;N;;;;; +++18BEE;KHITAN SMALL SCRIPT CHARACTER-18BEE;Lo;0;L;;;;;N;;;;; +++18BEF;KHITAN SMALL SCRIPT CHARACTER-18BEF;Lo;0;L;;;;;N;;;;; +++18BF0;KHITAN SMALL SCRIPT CHARACTER-18BF0;Lo;0;L;;;;;N;;;;; +++18BF1;KHITAN SMALL SCRIPT CHARACTER-18BF1;Lo;0;L;;;;;N;;;;; +++18BF2;KHITAN SMALL SCRIPT CHARACTER-18BF2;Lo;0;L;;;;;N;;;;; +++18BF3;KHITAN SMALL SCRIPT CHARACTER-18BF3;Lo;0;L;;;;;N;;;;; +++18BF4;KHITAN SMALL SCRIPT CHARACTER-18BF4;Lo;0;L;;;;;N;;;;; +++18BF5;KHITAN SMALL SCRIPT CHARACTER-18BF5;Lo;0;L;;;;;N;;;;; +++18BF6;KHITAN SMALL SCRIPT CHARACTER-18BF6;Lo;0;L;;;;;N;;;;; +++18BF7;KHITAN SMALL SCRIPT CHARACTER-18BF7;Lo;0;L;;;;;N;;;;; +++18BF8;KHITAN SMALL SCRIPT CHARACTER-18BF8;Lo;0;L;;;;;N;;;;; +++18BF9;KHITAN SMALL SCRIPT CHARACTER-18BF9;Lo;0;L;;;;;N;;;;; +++18BFA;KHITAN SMALL SCRIPT CHARACTER-18BFA;Lo;0;L;;;;;N;;;;; +++18BFB;KHITAN SMALL SCRIPT CHARACTER-18BFB;Lo;0;L;;;;;N;;;;; +++18BFC;KHITAN SMALL SCRIPT CHARACTER-18BFC;Lo;0;L;;;;;N;;;;; +++18BFD;KHITAN SMALL SCRIPT CHARACTER-18BFD;Lo;0;L;;;;;N;;;;; +++18BFE;KHITAN SMALL SCRIPT CHARACTER-18BFE;Lo;0;L;;;;;N;;;;; +++18BFF;KHITAN SMALL SCRIPT CHARACTER-18BFF;Lo;0;L;;;;;N;;;;; +++18C00;KHITAN SMALL SCRIPT CHARACTER-18C00;Lo;0;L;;;;;N;;;;; +++18C01;KHITAN SMALL SCRIPT CHARACTER-18C01;Lo;0;L;;;;;N;;;;; +++18C02;KHITAN SMALL SCRIPT CHARACTER-18C02;Lo;0;L;;;;;N;;;;; +++18C03;KHITAN SMALL SCRIPT CHARACTER-18C03;Lo;0;L;;;;;N;;;;; +++18C04;KHITAN SMALL SCRIPT CHARACTER-18C04;Lo;0;L;;;;;N;;;;; +++18C05;KHITAN SMALL SCRIPT CHARACTER-18C05;Lo;0;L;;;;;N;;;;; +++18C06;KHITAN SMALL SCRIPT CHARACTER-18C06;Lo;0;L;;;;;N;;;;; +++18C07;KHITAN SMALL SCRIPT CHARACTER-18C07;Lo;0;L;;;;;N;;;;; +++18C08;KHITAN SMALL SCRIPT CHARACTER-18C08;Lo;0;L;;;;;N;;;;; +++18C09;KHITAN SMALL SCRIPT CHARACTER-18C09;Lo;0;L;;;;;N;;;;; +++18C0A;KHITAN SMALL SCRIPT CHARACTER-18C0A;Lo;0;L;;;;;N;;;;; +++18C0B;KHITAN SMALL SCRIPT CHARACTER-18C0B;Lo;0;L;;;;;N;;;;; +++18C0C;KHITAN SMALL SCRIPT CHARACTER-18C0C;Lo;0;L;;;;;N;;;;; +++18C0D;KHITAN SMALL SCRIPT CHARACTER-18C0D;Lo;0;L;;;;;N;;;;; +++18C0E;KHITAN SMALL SCRIPT CHARACTER-18C0E;Lo;0;L;;;;;N;;;;; +++18C0F;KHITAN SMALL SCRIPT CHARACTER-18C0F;Lo;0;L;;;;;N;;;;; +++18C10;KHITAN SMALL SCRIPT CHARACTER-18C10;Lo;0;L;;;;;N;;;;; +++18C11;KHITAN SMALL SCRIPT CHARACTER-18C11;Lo;0;L;;;;;N;;;;; +++18C12;KHITAN SMALL SCRIPT CHARACTER-18C12;Lo;0;L;;;;;N;;;;; +++18C13;KHITAN SMALL SCRIPT CHARACTER-18C13;Lo;0;L;;;;;N;;;;; +++18C14;KHITAN SMALL SCRIPT CHARACTER-18C14;Lo;0;L;;;;;N;;;;; +++18C15;KHITAN SMALL SCRIPT CHARACTER-18C15;Lo;0;L;;;;;N;;;;; +++18C16;KHITAN SMALL SCRIPT CHARACTER-18C16;Lo;0;L;;;;;N;;;;; +++18C17;KHITAN SMALL SCRIPT CHARACTER-18C17;Lo;0;L;;;;;N;;;;; +++18C18;KHITAN SMALL SCRIPT CHARACTER-18C18;Lo;0;L;;;;;N;;;;; +++18C19;KHITAN SMALL SCRIPT CHARACTER-18C19;Lo;0;L;;;;;N;;;;; +++18C1A;KHITAN SMALL SCRIPT CHARACTER-18C1A;Lo;0;L;;;;;N;;;;; +++18C1B;KHITAN SMALL SCRIPT CHARACTER-18C1B;Lo;0;L;;;;;N;;;;; +++18C1C;KHITAN SMALL SCRIPT CHARACTER-18C1C;Lo;0;L;;;;;N;;;;; +++18C1D;KHITAN SMALL SCRIPT CHARACTER-18C1D;Lo;0;L;;;;;N;;;;; +++18C1E;KHITAN SMALL SCRIPT CHARACTER-18C1E;Lo;0;L;;;;;N;;;;; +++18C1F;KHITAN SMALL SCRIPT CHARACTER-18C1F;Lo;0;L;;;;;N;;;;; +++18C20;KHITAN SMALL SCRIPT CHARACTER-18C20;Lo;0;L;;;;;N;;;;; +++18C21;KHITAN SMALL SCRIPT CHARACTER-18C21;Lo;0;L;;;;;N;;;;; +++18C22;KHITAN SMALL SCRIPT CHARACTER-18C22;Lo;0;L;;;;;N;;;;; +++18C23;KHITAN SMALL SCRIPT CHARACTER-18C23;Lo;0;L;;;;;N;;;;; +++18C24;KHITAN SMALL SCRIPT CHARACTER-18C24;Lo;0;L;;;;;N;;;;; +++18C25;KHITAN SMALL SCRIPT CHARACTER-18C25;Lo;0;L;;;;;N;;;;; +++18C26;KHITAN SMALL SCRIPT CHARACTER-18C26;Lo;0;L;;;;;N;;;;; +++18C27;KHITAN SMALL SCRIPT CHARACTER-18C27;Lo;0;L;;;;;N;;;;; +++18C28;KHITAN SMALL SCRIPT CHARACTER-18C28;Lo;0;L;;;;;N;;;;; +++18C29;KHITAN SMALL SCRIPT CHARACTER-18C29;Lo;0;L;;;;;N;;;;; +++18C2A;KHITAN SMALL SCRIPT CHARACTER-18C2A;Lo;0;L;;;;;N;;;;; +++18C2B;KHITAN SMALL SCRIPT CHARACTER-18C2B;Lo;0;L;;;;;N;;;;; +++18C2C;KHITAN SMALL SCRIPT CHARACTER-18C2C;Lo;0;L;;;;;N;;;;; +++18C2D;KHITAN SMALL SCRIPT CHARACTER-18C2D;Lo;0;L;;;;;N;;;;; +++18C2E;KHITAN SMALL SCRIPT CHARACTER-18C2E;Lo;0;L;;;;;N;;;;; +++18C2F;KHITAN SMALL SCRIPT CHARACTER-18C2F;Lo;0;L;;;;;N;;;;; +++18C30;KHITAN SMALL SCRIPT CHARACTER-18C30;Lo;0;L;;;;;N;;;;; +++18C31;KHITAN SMALL SCRIPT CHARACTER-18C31;Lo;0;L;;;;;N;;;;; +++18C32;KHITAN SMALL SCRIPT CHARACTER-18C32;Lo;0;L;;;;;N;;;;; +++18C33;KHITAN SMALL SCRIPT CHARACTER-18C33;Lo;0;L;;;;;N;;;;; +++18C34;KHITAN SMALL SCRIPT CHARACTER-18C34;Lo;0;L;;;;;N;;;;; +++18C35;KHITAN SMALL SCRIPT CHARACTER-18C35;Lo;0;L;;;;;N;;;;; +++18C36;KHITAN SMALL SCRIPT CHARACTER-18C36;Lo;0;L;;;;;N;;;;; +++18C37;KHITAN SMALL SCRIPT CHARACTER-18C37;Lo;0;L;;;;;N;;;;; +++18C38;KHITAN SMALL SCRIPT CHARACTER-18C38;Lo;0;L;;;;;N;;;;; +++18C39;KHITAN SMALL SCRIPT CHARACTER-18C39;Lo;0;L;;;;;N;;;;; +++18C3A;KHITAN SMALL SCRIPT CHARACTER-18C3A;Lo;0;L;;;;;N;;;;; +++18C3B;KHITAN SMALL SCRIPT CHARACTER-18C3B;Lo;0;L;;;;;N;;;;; +++18C3C;KHITAN SMALL SCRIPT CHARACTER-18C3C;Lo;0;L;;;;;N;;;;; +++18C3D;KHITAN SMALL SCRIPT CHARACTER-18C3D;Lo;0;L;;;;;N;;;;; +++18C3E;KHITAN SMALL SCRIPT CHARACTER-18C3E;Lo;0;L;;;;;N;;;;; +++18C3F;KHITAN SMALL SCRIPT CHARACTER-18C3F;Lo;0;L;;;;;N;;;;; +++18C40;KHITAN SMALL SCRIPT CHARACTER-18C40;Lo;0;L;;;;;N;;;;; +++18C41;KHITAN SMALL SCRIPT CHARACTER-18C41;Lo;0;L;;;;;N;;;;; +++18C42;KHITAN SMALL SCRIPT CHARACTER-18C42;Lo;0;L;;;;;N;;;;; +++18C43;KHITAN SMALL SCRIPT CHARACTER-18C43;Lo;0;L;;;;;N;;;;; +++18C44;KHITAN SMALL SCRIPT CHARACTER-18C44;Lo;0;L;;;;;N;;;;; +++18C45;KHITAN SMALL SCRIPT CHARACTER-18C45;Lo;0;L;;;;;N;;;;; +++18C46;KHITAN SMALL SCRIPT CHARACTER-18C46;Lo;0;L;;;;;N;;;;; +++18C47;KHITAN SMALL SCRIPT CHARACTER-18C47;Lo;0;L;;;;;N;;;;; +++18C48;KHITAN SMALL SCRIPT CHARACTER-18C48;Lo;0;L;;;;;N;;;;; +++18C49;KHITAN SMALL SCRIPT CHARACTER-18C49;Lo;0;L;;;;;N;;;;; +++18C4A;KHITAN SMALL SCRIPT CHARACTER-18C4A;Lo;0;L;;;;;N;;;;; +++18C4B;KHITAN SMALL SCRIPT CHARACTER-18C4B;Lo;0;L;;;;;N;;;;; +++18C4C;KHITAN SMALL SCRIPT CHARACTER-18C4C;Lo;0;L;;;;;N;;;;; +++18C4D;KHITAN SMALL SCRIPT CHARACTER-18C4D;Lo;0;L;;;;;N;;;;; +++18C4E;KHITAN SMALL SCRIPT CHARACTER-18C4E;Lo;0;L;;;;;N;;;;; +++18C4F;KHITAN SMALL SCRIPT CHARACTER-18C4F;Lo;0;L;;;;;N;;;;; +++18C50;KHITAN SMALL SCRIPT CHARACTER-18C50;Lo;0;L;;;;;N;;;;; +++18C51;KHITAN SMALL SCRIPT CHARACTER-18C51;Lo;0;L;;;;;N;;;;; +++18C52;KHITAN SMALL SCRIPT CHARACTER-18C52;Lo;0;L;;;;;N;;;;; +++18C53;KHITAN SMALL SCRIPT CHARACTER-18C53;Lo;0;L;;;;;N;;;;; +++18C54;KHITAN SMALL SCRIPT CHARACTER-18C54;Lo;0;L;;;;;N;;;;; +++18C55;KHITAN SMALL SCRIPT CHARACTER-18C55;Lo;0;L;;;;;N;;;;; +++18C56;KHITAN SMALL SCRIPT CHARACTER-18C56;Lo;0;L;;;;;N;;;;; +++18C57;KHITAN SMALL SCRIPT CHARACTER-18C57;Lo;0;L;;;;;N;;;;; +++18C58;KHITAN SMALL SCRIPT CHARACTER-18C58;Lo;0;L;;;;;N;;;;; +++18C59;KHITAN SMALL SCRIPT CHARACTER-18C59;Lo;0;L;;;;;N;;;;; +++18C5A;KHITAN SMALL SCRIPT CHARACTER-18C5A;Lo;0;L;;;;;N;;;;; +++18C5B;KHITAN SMALL SCRIPT CHARACTER-18C5B;Lo;0;L;;;;;N;;;;; +++18C5C;KHITAN SMALL SCRIPT CHARACTER-18C5C;Lo;0;L;;;;;N;;;;; +++18C5D;KHITAN SMALL SCRIPT CHARACTER-18C5D;Lo;0;L;;;;;N;;;;; +++18C5E;KHITAN SMALL SCRIPT CHARACTER-18C5E;Lo;0;L;;;;;N;;;;; +++18C5F;KHITAN SMALL SCRIPT CHARACTER-18C5F;Lo;0;L;;;;;N;;;;; +++18C60;KHITAN SMALL SCRIPT CHARACTER-18C60;Lo;0;L;;;;;N;;;;; +++18C61;KHITAN SMALL SCRIPT CHARACTER-18C61;Lo;0;L;;;;;N;;;;; +++18C62;KHITAN SMALL SCRIPT CHARACTER-18C62;Lo;0;L;;;;;N;;;;; +++18C63;KHITAN SMALL SCRIPT CHARACTER-18C63;Lo;0;L;;;;;N;;;;; +++18C64;KHITAN SMALL SCRIPT CHARACTER-18C64;Lo;0;L;;;;;N;;;;; +++18C65;KHITAN SMALL SCRIPT CHARACTER-18C65;Lo;0;L;;;;;N;;;;; +++18C66;KHITAN SMALL SCRIPT CHARACTER-18C66;Lo;0;L;;;;;N;;;;; +++18C67;KHITAN SMALL SCRIPT CHARACTER-18C67;Lo;0;L;;;;;N;;;;; +++18C68;KHITAN SMALL SCRIPT CHARACTER-18C68;Lo;0;L;;;;;N;;;;; +++18C69;KHITAN SMALL SCRIPT CHARACTER-18C69;Lo;0;L;;;;;N;;;;; +++18C6A;KHITAN SMALL SCRIPT CHARACTER-18C6A;Lo;0;L;;;;;N;;;;; +++18C6B;KHITAN SMALL SCRIPT CHARACTER-18C6B;Lo;0;L;;;;;N;;;;; +++18C6C;KHITAN SMALL SCRIPT CHARACTER-18C6C;Lo;0;L;;;;;N;;;;; +++18C6D;KHITAN SMALL SCRIPT CHARACTER-18C6D;Lo;0;L;;;;;N;;;;; +++18C6E;KHITAN SMALL SCRIPT CHARACTER-18C6E;Lo;0;L;;;;;N;;;;; +++18C6F;KHITAN SMALL SCRIPT CHARACTER-18C6F;Lo;0;L;;;;;N;;;;; +++18C70;KHITAN SMALL SCRIPT CHARACTER-18C70;Lo;0;L;;;;;N;;;;; +++18C71;KHITAN SMALL SCRIPT CHARACTER-18C71;Lo;0;L;;;;;N;;;;; +++18C72;KHITAN SMALL SCRIPT CHARACTER-18C72;Lo;0;L;;;;;N;;;;; +++18C73;KHITAN SMALL SCRIPT CHARACTER-18C73;Lo;0;L;;;;;N;;;;; +++18C74;KHITAN SMALL SCRIPT CHARACTER-18C74;Lo;0;L;;;;;N;;;;; +++18C75;KHITAN SMALL SCRIPT CHARACTER-18C75;Lo;0;L;;;;;N;;;;; +++18C76;KHITAN SMALL SCRIPT CHARACTER-18C76;Lo;0;L;;;;;N;;;;; +++18C77;KHITAN SMALL SCRIPT CHARACTER-18C77;Lo;0;L;;;;;N;;;;; +++18C78;KHITAN SMALL SCRIPT CHARACTER-18C78;Lo;0;L;;;;;N;;;;; +++18C79;KHITAN SMALL SCRIPT CHARACTER-18C79;Lo;0;L;;;;;N;;;;; +++18C7A;KHITAN SMALL SCRIPT CHARACTER-18C7A;Lo;0;L;;;;;N;;;;; +++18C7B;KHITAN SMALL SCRIPT CHARACTER-18C7B;Lo;0;L;;;;;N;;;;; +++18C7C;KHITAN SMALL SCRIPT CHARACTER-18C7C;Lo;0;L;;;;;N;;;;; +++18C7D;KHITAN SMALL SCRIPT CHARACTER-18C7D;Lo;0;L;;;;;N;;;;; +++18C7E;KHITAN SMALL SCRIPT CHARACTER-18C7E;Lo;0;L;;;;;N;;;;; +++18C7F;KHITAN SMALL SCRIPT CHARACTER-18C7F;Lo;0;L;;;;;N;;;;; +++18C80;KHITAN SMALL SCRIPT CHARACTER-18C80;Lo;0;L;;;;;N;;;;; +++18C81;KHITAN SMALL SCRIPT CHARACTER-18C81;Lo;0;L;;;;;N;;;;; +++18C82;KHITAN SMALL SCRIPT CHARACTER-18C82;Lo;0;L;;;;;N;;;;; +++18C83;KHITAN SMALL SCRIPT CHARACTER-18C83;Lo;0;L;;;;;N;;;;; +++18C84;KHITAN SMALL SCRIPT CHARACTER-18C84;Lo;0;L;;;;;N;;;;; +++18C85;KHITAN SMALL SCRIPT CHARACTER-18C85;Lo;0;L;;;;;N;;;;; +++18C86;KHITAN SMALL SCRIPT CHARACTER-18C86;Lo;0;L;;;;;N;;;;; +++18C87;KHITAN SMALL SCRIPT CHARACTER-18C87;Lo;0;L;;;;;N;;;;; +++18C88;KHITAN SMALL SCRIPT CHARACTER-18C88;Lo;0;L;;;;;N;;;;; +++18C89;KHITAN SMALL SCRIPT CHARACTER-18C89;Lo;0;L;;;;;N;;;;; +++18C8A;KHITAN SMALL SCRIPT CHARACTER-18C8A;Lo;0;L;;;;;N;;;;; +++18C8B;KHITAN SMALL SCRIPT CHARACTER-18C8B;Lo;0;L;;;;;N;;;;; +++18C8C;KHITAN SMALL SCRIPT CHARACTER-18C8C;Lo;0;L;;;;;N;;;;; +++18C8D;KHITAN SMALL SCRIPT CHARACTER-18C8D;Lo;0;L;;;;;N;;;;; +++18C8E;KHITAN SMALL SCRIPT CHARACTER-18C8E;Lo;0;L;;;;;N;;;;; +++18C8F;KHITAN SMALL SCRIPT CHARACTER-18C8F;Lo;0;L;;;;;N;;;;; +++18C90;KHITAN SMALL SCRIPT CHARACTER-18C90;Lo;0;L;;;;;N;;;;; +++18C91;KHITAN SMALL SCRIPT CHARACTER-18C91;Lo;0;L;;;;;N;;;;; +++18C92;KHITAN SMALL SCRIPT CHARACTER-18C92;Lo;0;L;;;;;N;;;;; +++18C93;KHITAN SMALL SCRIPT CHARACTER-18C93;Lo;0;L;;;;;N;;;;; +++18C94;KHITAN SMALL SCRIPT CHARACTER-18C94;Lo;0;L;;;;;N;;;;; +++18C95;KHITAN SMALL SCRIPT CHARACTER-18C95;Lo;0;L;;;;;N;;;;; +++18C96;KHITAN SMALL SCRIPT CHARACTER-18C96;Lo;0;L;;;;;N;;;;; +++18C97;KHITAN SMALL SCRIPT CHARACTER-18C97;Lo;0;L;;;;;N;;;;; +++18C98;KHITAN SMALL SCRIPT CHARACTER-18C98;Lo;0;L;;;;;N;;;;; +++18C99;KHITAN SMALL SCRIPT CHARACTER-18C99;Lo;0;L;;;;;N;;;;; +++18C9A;KHITAN SMALL SCRIPT CHARACTER-18C9A;Lo;0;L;;;;;N;;;;; +++18C9B;KHITAN SMALL SCRIPT CHARACTER-18C9B;Lo;0;L;;;;;N;;;;; +++18C9C;KHITAN SMALL SCRIPT CHARACTER-18C9C;Lo;0;L;;;;;N;;;;; +++18C9D;KHITAN SMALL SCRIPT CHARACTER-18C9D;Lo;0;L;;;;;N;;;;; +++18C9E;KHITAN SMALL SCRIPT CHARACTER-18C9E;Lo;0;L;;;;;N;;;;; +++18C9F;KHITAN SMALL SCRIPT CHARACTER-18C9F;Lo;0;L;;;;;N;;;;; +++18CA0;KHITAN SMALL SCRIPT CHARACTER-18CA0;Lo;0;L;;;;;N;;;;; +++18CA1;KHITAN SMALL SCRIPT CHARACTER-18CA1;Lo;0;L;;;;;N;;;;; +++18CA2;KHITAN SMALL SCRIPT CHARACTER-18CA2;Lo;0;L;;;;;N;;;;; +++18CA3;KHITAN SMALL SCRIPT CHARACTER-18CA3;Lo;0;L;;;;;N;;;;; +++18CA4;KHITAN SMALL SCRIPT CHARACTER-18CA4;Lo;0;L;;;;;N;;;;; +++18CA5;KHITAN SMALL SCRIPT CHARACTER-18CA5;Lo;0;L;;;;;N;;;;; +++18CA6;KHITAN SMALL SCRIPT CHARACTER-18CA6;Lo;0;L;;;;;N;;;;; +++18CA7;KHITAN SMALL SCRIPT CHARACTER-18CA7;Lo;0;L;;;;;N;;;;; +++18CA8;KHITAN SMALL SCRIPT CHARACTER-18CA8;Lo;0;L;;;;;N;;;;; +++18CA9;KHITAN SMALL SCRIPT CHARACTER-18CA9;Lo;0;L;;;;;N;;;;; +++18CAA;KHITAN SMALL SCRIPT CHARACTER-18CAA;Lo;0;L;;;;;N;;;;; +++18CAB;KHITAN SMALL SCRIPT CHARACTER-18CAB;Lo;0;L;;;;;N;;;;; +++18CAC;KHITAN SMALL SCRIPT CHARACTER-18CAC;Lo;0;L;;;;;N;;;;; +++18CAD;KHITAN SMALL SCRIPT CHARACTER-18CAD;Lo;0;L;;;;;N;;;;; +++18CAE;KHITAN SMALL SCRIPT CHARACTER-18CAE;Lo;0;L;;;;;N;;;;; +++18CAF;KHITAN SMALL SCRIPT CHARACTER-18CAF;Lo;0;L;;;;;N;;;;; +++18CB0;KHITAN SMALL SCRIPT CHARACTER-18CB0;Lo;0;L;;;;;N;;;;; +++18CB1;KHITAN SMALL SCRIPT CHARACTER-18CB1;Lo;0;L;;;;;N;;;;; +++18CB2;KHITAN SMALL SCRIPT CHARACTER-18CB2;Lo;0;L;;;;;N;;;;; +++18CB3;KHITAN SMALL SCRIPT CHARACTER-18CB3;Lo;0;L;;;;;N;;;;; +++18CB4;KHITAN SMALL SCRIPT CHARACTER-18CB4;Lo;0;L;;;;;N;;;;; +++18CB5;KHITAN SMALL SCRIPT CHARACTER-18CB5;Lo;0;L;;;;;N;;;;; +++18CB6;KHITAN SMALL SCRIPT CHARACTER-18CB6;Lo;0;L;;;;;N;;;;; +++18CB7;KHITAN SMALL SCRIPT CHARACTER-18CB7;Lo;0;L;;;;;N;;;;; +++18CB8;KHITAN SMALL SCRIPT CHARACTER-18CB8;Lo;0;L;;;;;N;;;;; +++18CB9;KHITAN SMALL SCRIPT CHARACTER-18CB9;Lo;0;L;;;;;N;;;;; +++18CBA;KHITAN SMALL SCRIPT CHARACTER-18CBA;Lo;0;L;;;;;N;;;;; +++18CBB;KHITAN SMALL SCRIPT CHARACTER-18CBB;Lo;0;L;;;;;N;;;;; +++18CBC;KHITAN SMALL SCRIPT CHARACTER-18CBC;Lo;0;L;;;;;N;;;;; +++18CBD;KHITAN SMALL SCRIPT CHARACTER-18CBD;Lo;0;L;;;;;N;;;;; +++18CBE;KHITAN SMALL SCRIPT CHARACTER-18CBE;Lo;0;L;;;;;N;;;;; +++18CBF;KHITAN SMALL SCRIPT CHARACTER-18CBF;Lo;0;L;;;;;N;;;;; +++18CC0;KHITAN SMALL SCRIPT CHARACTER-18CC0;Lo;0;L;;;;;N;;;;; +++18CC1;KHITAN SMALL SCRIPT CHARACTER-18CC1;Lo;0;L;;;;;N;;;;; +++18CC2;KHITAN SMALL SCRIPT CHARACTER-18CC2;Lo;0;L;;;;;N;;;;; +++18CC3;KHITAN SMALL SCRIPT CHARACTER-18CC3;Lo;0;L;;;;;N;;;;; +++18CC4;KHITAN SMALL SCRIPT CHARACTER-18CC4;Lo;0;L;;;;;N;;;;; +++18CC5;KHITAN SMALL SCRIPT CHARACTER-18CC5;Lo;0;L;;;;;N;;;;; +++18CC6;KHITAN SMALL SCRIPT CHARACTER-18CC6;Lo;0;L;;;;;N;;;;; +++18CC7;KHITAN SMALL SCRIPT CHARACTER-18CC7;Lo;0;L;;;;;N;;;;; +++18CC8;KHITAN SMALL SCRIPT CHARACTER-18CC8;Lo;0;L;;;;;N;;;;; +++18CC9;KHITAN SMALL SCRIPT CHARACTER-18CC9;Lo;0;L;;;;;N;;;;; +++18CCA;KHITAN SMALL SCRIPT CHARACTER-18CCA;Lo;0;L;;;;;N;;;;; +++18CCB;KHITAN SMALL SCRIPT CHARACTER-18CCB;Lo;0;L;;;;;N;;;;; +++18CCC;KHITAN SMALL SCRIPT CHARACTER-18CCC;Lo;0;L;;;;;N;;;;; +++18CCD;KHITAN SMALL SCRIPT CHARACTER-18CCD;Lo;0;L;;;;;N;;;;; +++18CCE;KHITAN SMALL SCRIPT CHARACTER-18CCE;Lo;0;L;;;;;N;;;;; +++18CCF;KHITAN SMALL SCRIPT CHARACTER-18CCF;Lo;0;L;;;;;N;;;;; +++18CD0;KHITAN SMALL SCRIPT CHARACTER-18CD0;Lo;0;L;;;;;N;;;;; +++18CD1;KHITAN SMALL SCRIPT CHARACTER-18CD1;Lo;0;L;;;;;N;;;;; +++18CD2;KHITAN SMALL SCRIPT CHARACTER-18CD2;Lo;0;L;;;;;N;;;;; +++18CD3;KHITAN SMALL SCRIPT CHARACTER-18CD3;Lo;0;L;;;;;N;;;;; +++18CD4;KHITAN SMALL SCRIPT CHARACTER-18CD4;Lo;0;L;;;;;N;;;;; +++18CD5;KHITAN SMALL SCRIPT CHARACTER-18CD5;Lo;0;L;;;;;N;;;;; +++18D00;;Lo;0;L;;;;;N;;;;; +++18D08;;Lo;0;L;;;;;N;;;;; ++ 1B000;KATAKANA LETTER ARCHAIC E;Lo;0;L;;;;;N;;;;; ++ 1B001;HIRAGANA LETTER ARCHAIC YE;Lo;0;L;;;;;N;;;;; ++ 1B002;HENTAIGANA LETTER A-1;Lo;0;L;;;;;N;;;;; ++@@ -29973,6 +30651,9 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;; ++ 1F10A;DIGIT NINE COMMA;No;0;EN; 0039 002C;;9;9;N;;;;; ++ 1F10B;DINGBAT CIRCLED SANS-SERIF DIGIT ZERO;No;0;ON;;;;0;N;;;;; ++ 1F10C;DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT ZERO;No;0;ON;;;;0;N;;;;; +++1F10D;CIRCLED ZERO WITH SLASH;So;0;ON;;;;;N;;;;; +++1F10E;CIRCLED ANTICLOCKWISE ARROW;So;0;ON;;;;;N;;;;; +++1F10F;CIRCLED DOLLAR SIGN WITH OVERLAID BACKSLASH;So;0;ON;;;;;N;;;;; ++ 1F110;PARENTHESIZED LATIN CAPITAL LETTER A;So;0;L; 0028 0041 0029;;;;N;;;;; ++ 1F111;PARENTHESIZED LATIN CAPITAL LETTER B;So;0;L; 0028 0042 0029;;;;N;;;;; ++ 1F112;PARENTHESIZED LATIN CAPITAL LETTER C;So;0;L; 0028 0043 0029;;;;N;;;;; ++@@ -30066,6 +30747,9 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;; ++ 1F16A;RAISED MC SIGN;So;0;ON; 004D 0043;;;;N;;;;; ++ 1F16B;RAISED MD SIGN;So;0;ON; 004D 0044;;;;N;;;;; ++ 1F16C;RAISED MR SIGN;So;0;ON; 004D 0052;;;;N;;;;; +++1F16D;CIRCLED CC;So;0;ON;;;;;N;;;;; +++1F16E;CIRCLED C WITH OVERLAID BACKSLASH;So;0;ON;;;;;N;;;;; +++1F16F;CIRCLED HUMAN FIGURE;So;0;ON;;;;;N;;;;; ++ 1F170;NEGATIVE SQUARED LATIN CAPITAL LETTER A;So;0;L;;;;;N;;;;; ++ 1F171;NEGATIVE SQUARED LATIN CAPITAL LETTER B;So;0;L;;;;;N;;;;; ++ 1F172;NEGATIVE SQUARED LATIN CAPITAL LETTER C;So;0;L;;;;;N;;;;; ++@@ -30127,6 +30811,7 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;; ++ 1F1AA;SQUARED SHV;So;0;L;;;;;N;;;;; ++ 1F1AB;SQUARED UHD;So;0;L;;;;;N;;;;; ++ 1F1AC;SQUARED VOD;So;0;L;;;;;N;;;;; +++1F1AD;MASK WORK SYMBOL;So;0;ON;;;;;N;;;;; ++ 1F1E6;REGIONAL INDICATOR SYMBOL LETTER A;So;0;L;;;;;N;;;;; ++ 1F1E7;REGIONAL INDICATOR SYMBOL LETTER B;So;0;L;;;;;N;;;;; ++ 1F1E8;REGIONAL INDICATOR SYMBOL LETTER C;So;0;L;;;;;N;;;;; ++@@ -31199,6 +31884,8 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;; ++ 1F6D3;STUPA;So;0;ON;;;;;N;;;;; ++ 1F6D4;PAGODA;So;0;ON;;;;;N;;;;; ++ 1F6D5;HINDU TEMPLE;So;0;ON;;;;;N;;;;; +++1F6D6;HUT;So;0;ON;;;;;N;;;;; +++1F6D7;ELEVATOR;So;0;ON;;;;;N;;;;; ++ 1F6E0;HAMMER AND WRENCH;So;0;ON;;;;;N;;;;; ++ 1F6E1;SHIELD;So;0;ON;;;;;N;;;;; ++ 1F6E2;OIL DRUM;So;0;ON;;;;;N;;;;; ++@@ -31223,6 +31910,8 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;; ++ 1F6F8;FLYING SAUCER;So;0;ON;;;;;N;;;;; ++ 1F6F9;SKATEBOARD;So;0;ON;;;;;N;;;;; ++ 1F6FA;AUTO RICKSHAW;So;0;ON;;;;;N;;;;; +++1F6FB;PICKUP TRUCK;So;0;ON;;;;;N;;;;; +++1F6FC;ROLLER SKATE;So;0;ON;;;;;N;;;;; ++ 1F700;ALCHEMICAL SYMBOL FOR QUINTESSENCE;So;0;ON;;;;;N;;;;; ++ 1F701;ALCHEMICAL SYMBOL FOR AIR;So;0;ON;;;;;N;;;;; ++ 1F702;ALCHEMICAL SYMBOL FOR FIRE;So;0;ON;;;;;N;;;;; ++@@ -31588,6 +32277,8 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;; ++ 1F8AB;RIGHTWARDS FRONT-TILTED SHADOWED WHITE ARROW;So;0;ON;;;;;N;;;;; ++ 1F8AC;WHITE ARROW SHAFT WIDTH ONE;So;0;ON;;;;;N;;;;; ++ 1F8AD;WHITE ARROW SHAFT WIDTH TWO THIRDS;So;0;ON;;;;;N;;;;; +++1F8B0;ARROW POINTING UPWARDS THEN NORTH WEST;So;0;ON;;;;;N;;;;; +++1F8B1;ARROW POINTING RIGHTWARDS THEN CURVING SOUTH WEST;So;0;ON;;;;;N;;;;; ++ 1F900;CIRCLED CROSS FORMEE WITH FOUR DOTS;So;0;ON;;;;;N;;;;; ++ 1F901;CIRCLED CROSS FORMEE WITH TWO DOTS;So;0;ON;;;;;N;;;;; ++ 1F902;CIRCLED CROSS FORMEE;So;0;ON;;;;;N;;;;; ++@@ -31600,6 +32291,7 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;; ++ 1F909;DOWNWARD FACING NOTCHED HOOK;So;0;ON;;;;;N;;;;; ++ 1F90A;DOWNWARD FACING HOOK WITH DOT;So;0;ON;;;;;N;;;;; ++ 1F90B;DOWNWARD FACING NOTCHED HOOK WITH DOT;So;0;ON;;;;;N;;;;; +++1F90C;PINCHED FINGERS;So;0;ON;;;;;N;;;;; ++ 1F90D;WHITE HEART;So;0;ON;;;;;N;;;;; ++ 1F90E;BROWN HEART;So;0;ON;;;;;N;;;;; ++ 1F90F;PINCHING HAND;So;0;ON;;;;;N;;;;; ++@@ -31701,10 +32393,13 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;; ++ 1F96F;BAGEL;So;0;ON;;;;;N;;;;; ++ 1F970;SMILING FACE WITH SMILING EYES AND THREE HEARTS;So;0;ON;;;;;N;;;;; ++ 1F971;YAWNING FACE;So;0;ON;;;;;N;;;;; +++1F972;SMILING FACE WITH TEAR;So;0;ON;;;;;N;;;;; ++ 1F973;FACE WITH PARTY HORN AND PARTY HAT;So;0;ON;;;;;N;;;;; ++ 1F974;FACE WITH UNEVEN EYES AND WAVY MOUTH;So;0;ON;;;;;N;;;;; ++ 1F975;OVERHEATED FACE;So;0;ON;;;;;N;;;;; ++ 1F976;FREEZING FACE;So;0;ON;;;;;N;;;;; +++1F977;NINJA;So;0;ON;;;;;N;;;;; +++1F978;DISGUISED FACE;So;0;ON;;;;;N;;;;; ++ 1F97A;FACE WITH PLEADING EYES;So;0;ON;;;;;N;;;;; ++ 1F97B;SARI;So;0;ON;;;;;N;;;;; ++ 1F97C;LAB COAT;So;0;ON;;;;;N;;;;; ++@@ -31746,12 +32441,17 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;; ++ 1F9A0;MICROBE;So;0;ON;;;;;N;;;;; ++ 1F9A1;BADGER;So;0;ON;;;;;N;;;;; ++ 1F9A2;SWAN;So;0;ON;;;;;N;;;;; +++1F9A3;MAMMOTH;So;0;ON;;;;;N;;;;; +++1F9A4;DODO;So;0;ON;;;;;N;;;;; ++ 1F9A5;SLOTH;So;0;ON;;;;;N;;;;; ++ 1F9A6;OTTER;So;0;ON;;;;;N;;;;; ++ 1F9A7;ORANGUTAN;So;0;ON;;;;;N;;;;; ++ 1F9A8;SKUNK;So;0;ON;;;;;N;;;;; ++ 1F9A9;FLAMINGO;So;0;ON;;;;;N;;;;; ++ 1F9AA;OYSTER;So;0;ON;;;;;N;;;;; +++1F9AB;BEAVER;So;0;ON;;;;;N;;;;; +++1F9AC;BISON;So;0;ON;;;;;N;;;;; +++1F9AD;SEAL;So;0;ON;;;;;N;;;;; ++ 1F9AE;GUIDE DOG;So;0;ON;;;;;N;;;;; ++ 1F9AF;PROBING CANE;So;0;ON;;;;;N;;;;; ++ 1F9B0;EMOJI COMPONENT RED HAIR;So;0;ON;;;;;N;;;;; ++@@ -31781,6 +32481,7 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;; ++ 1F9C8;BUTTER;So;0;ON;;;;;N;;;;; ++ 1F9C9;MATE DRINK;So;0;ON;;;;;N;;;;; ++ 1F9CA;ICE CUBE;So;0;ON;;;;;N;;;;; +++1F9CB;BUBBLE TEA;So;0;ON;;;;;N;;;;; ++ 1F9CD;STANDING PERSON;So;0;ON;;;;;N;;;;; ++ 1F9CE;KNEELING PERSON;So;0;ON;;;;;N;;;;; ++ 1F9CF;DEAF PERSON;So;0;ON;;;;;N;;;;; ++@@ -31934,20 +32635,273 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;; ++ 1FA71;ONE-PIECE SWIMSUIT;So;0;ON;;;;;N;;;;; ++ 1FA72;BRIEFS;So;0;ON;;;;;N;;;;; ++ 1FA73;SHORTS;So;0;ON;;;;;N;;;;; +++1FA74;THONG SANDAL;So;0;ON;;;;;N;;;;; ++ 1FA78;DROP OF BLOOD;So;0;ON;;;;;N;;;;; ++ 1FA79;ADHESIVE BANDAGE;So;0;ON;;;;;N;;;;; ++ 1FA7A;STETHOSCOPE;So;0;ON;;;;;N;;;;; ++ 1FA80;YO-YO;So;0;ON;;;;;N;;;;; ++ 1FA81;KITE;So;0;ON;;;;;N;;;;; ++ 1FA82;PARACHUTE;So;0;ON;;;;;N;;;;; +++1FA83;BOOMERANG;So;0;ON;;;;;N;;;;; +++1FA84;MAGIC WAND;So;0;ON;;;;;N;;;;; +++1FA85;PINATA;So;0;ON;;;;;N;;;;; +++1FA86;NESTING DOLLS;So;0;ON;;;;;N;;;;; ++ 1FA90;RINGED PLANET;So;0;ON;;;;;N;;;;; ++ 1FA91;CHAIR;So;0;ON;;;;;N;;;;; ++ 1FA92;RAZOR;So;0;ON;;;;;N;;;;; ++ 1FA93;AXE;So;0;ON;;;;;N;;;;; ++ 1FA94;DIYA LAMP;So;0;ON;;;;;N;;;;; ++ 1FA95;BANJO;So;0;ON;;;;;N;;;;; +++1FA96;MILITARY HELMET;So;0;ON;;;;;N;;;;; +++1FA97;ACCORDION;So;0;ON;;;;;N;;;;; +++1FA98;LONG DRUM;So;0;ON;;;;;N;;;;; +++1FA99;COIN;So;0;ON;;;;;N;;;;; +++1FA9A;CARPENTRY SAW;So;0;ON;;;;;N;;;;; +++1FA9B;SCREWDRIVER;So;0;ON;;;;;N;;;;; +++1FA9C;LADDER;So;0;ON;;;;;N;;;;; +++1FA9D;HOOK;So;0;ON;;;;;N;;;;; +++1FA9E;MIRROR;So;0;ON;;;;;N;;;;; +++1FA9F;WINDOW;So;0;ON;;;;;N;;;;; +++1FAA0;PLUNGER;So;0;ON;;;;;N;;;;; +++1FAA1;SEWING NEEDLE;So;0;ON;;;;;N;;;;; +++1FAA2;KNOT;So;0;ON;;;;;N;;;;; +++1FAA3;BUCKET;So;0;ON;;;;;N;;;;; +++1FAA4;MOUSE TRAP;So;0;ON;;;;;N;;;;; +++1FAA5;TOOTHBRUSH;So;0;ON;;;;;N;;;;; +++1FAA6;HEADSTONE;So;0;ON;;;;;N;;;;; +++1FAA7;PLACARD;So;0;ON;;;;;N;;;;; +++1FAA8;ROCK;So;0;ON;;;;;N;;;;; +++1FAB0;FLY;So;0;ON;;;;;N;;;;; +++1FAB1;WORM;So;0;ON;;;;;N;;;;; +++1FAB2;BEETLE;So;0;ON;;;;;N;;;;; +++1FAB3;COCKROACH;So;0;ON;;;;;N;;;;; +++1FAB4;POTTED PLANT;So;0;ON;;;;;N;;;;; +++1FAB5;WOOD;So;0;ON;;;;;N;;;;; +++1FAB6;FEATHER;So;0;ON;;;;;N;;;;; +++1FAC0;ANATOMICAL HEART;So;0;ON;;;;;N;;;;; +++1FAC1;LUNGS;So;0;ON;;;;;N;;;;; +++1FAC2;PEOPLE HUGGING;So;0;ON;;;;;N;;;;; +++1FAD0;BLUEBERRIES;So;0;ON;;;;;N;;;;; +++1FAD1;BELL PEPPER;So;0;ON;;;;;N;;;;; +++1FAD2;OLIVE;So;0;ON;;;;;N;;;;; +++1FAD3;FLATBREAD;So;0;ON;;;;;N;;;;; +++1FAD4;TAMALE;So;0;ON;;;;;N;;;;; +++1FAD5;FONDUE;So;0;ON;;;;;N;;;;; +++1FAD6;TEAPOT;So;0;ON;;;;;N;;;;; +++1FB00;BLOCK SEXTANT-1;So;0;ON;;;;;N;;;;; +++1FB01;BLOCK SEXTANT-2;So;0;ON;;;;;N;;;;; +++1FB02;BLOCK SEXTANT-12;So;0;ON;;;;;N;;;;; +++1FB03;BLOCK SEXTANT-3;So;0;ON;;;;;N;;;;; +++1FB04;BLOCK SEXTANT-13;So;0;ON;;;;;N;;;;; +++1FB05;BLOCK SEXTANT-23;So;0;ON;;;;;N;;;;; +++1FB06;BLOCK SEXTANT-123;So;0;ON;;;;;N;;;;; +++1FB07;BLOCK SEXTANT-4;So;0;ON;;;;;N;;;;; +++1FB08;BLOCK SEXTANT-14;So;0;ON;;;;;N;;;;; +++1FB09;BLOCK SEXTANT-24;So;0;ON;;;;;N;;;;; +++1FB0A;BLOCK SEXTANT-124;So;0;ON;;;;;N;;;;; +++1FB0B;BLOCK SEXTANT-34;So;0;ON;;;;;N;;;;; +++1FB0C;BLOCK SEXTANT-134;So;0;ON;;;;;N;;;;; +++1FB0D;BLOCK SEXTANT-234;So;0;ON;;;;;N;;;;; +++1FB0E;BLOCK SEXTANT-1234;So;0;ON;;;;;N;;;;; +++1FB0F;BLOCK SEXTANT-5;So;0;ON;;;;;N;;;;; +++1FB10;BLOCK SEXTANT-15;So;0;ON;;;;;N;;;;; +++1FB11;BLOCK SEXTANT-25;So;0;ON;;;;;N;;;;; +++1FB12;BLOCK SEXTANT-125;So;0;ON;;;;;N;;;;; +++1FB13;BLOCK SEXTANT-35;So;0;ON;;;;;N;;;;; +++1FB14;BLOCK SEXTANT-235;So;0;ON;;;;;N;;;;; +++1FB15;BLOCK SEXTANT-1235;So;0;ON;;;;;N;;;;; +++1FB16;BLOCK SEXTANT-45;So;0;ON;;;;;N;;;;; +++1FB17;BLOCK SEXTANT-145;So;0;ON;;;;;N;;;;; +++1FB18;BLOCK SEXTANT-245;So;0;ON;;;;;N;;;;; +++1FB19;BLOCK SEXTANT-1245;So;0;ON;;;;;N;;;;; +++1FB1A;BLOCK SEXTANT-345;So;0;ON;;;;;N;;;;; +++1FB1B;BLOCK SEXTANT-1345;So;0;ON;;;;;N;;;;; +++1FB1C;BLOCK SEXTANT-2345;So;0;ON;;;;;N;;;;; +++1FB1D;BLOCK SEXTANT-12345;So;0;ON;;;;;N;;;;; +++1FB1E;BLOCK SEXTANT-6;So;0;ON;;;;;N;;;;; +++1FB1F;BLOCK SEXTANT-16;So;0;ON;;;;;N;;;;; +++1FB20;BLOCK SEXTANT-26;So;0;ON;;;;;N;;;;; +++1FB21;BLOCK SEXTANT-126;So;0;ON;;;;;N;;;;; +++1FB22;BLOCK SEXTANT-36;So;0;ON;;;;;N;;;;; +++1FB23;BLOCK SEXTANT-136;So;0;ON;;;;;N;;;;; +++1FB24;BLOCK SEXTANT-236;So;0;ON;;;;;N;;;;; +++1FB25;BLOCK SEXTANT-1236;So;0;ON;;;;;N;;;;; +++1FB26;BLOCK SEXTANT-46;So;0;ON;;;;;N;;;;; +++1FB27;BLOCK SEXTANT-146;So;0;ON;;;;;N;;;;; +++1FB28;BLOCK SEXTANT-1246;So;0;ON;;;;;N;;;;; +++1FB29;BLOCK SEXTANT-346;So;0;ON;;;;;N;;;;; +++1FB2A;BLOCK SEXTANT-1346;So;0;ON;;;;;N;;;;; +++1FB2B;BLOCK SEXTANT-2346;So;0;ON;;;;;N;;;;; +++1FB2C;BLOCK SEXTANT-12346;So;0;ON;;;;;N;;;;; +++1FB2D;BLOCK SEXTANT-56;So;0;ON;;;;;N;;;;; +++1FB2E;BLOCK SEXTANT-156;So;0;ON;;;;;N;;;;; +++1FB2F;BLOCK SEXTANT-256;So;0;ON;;;;;N;;;;; +++1FB30;BLOCK SEXTANT-1256;So;0;ON;;;;;N;;;;; +++1FB31;BLOCK SEXTANT-356;So;0;ON;;;;;N;;;;; +++1FB32;BLOCK SEXTANT-1356;So;0;ON;;;;;N;;;;; +++1FB33;BLOCK SEXTANT-2356;So;0;ON;;;;;N;;;;; +++1FB34;BLOCK SEXTANT-12356;So;0;ON;;;;;N;;;;; +++1FB35;BLOCK SEXTANT-456;So;0;ON;;;;;N;;;;; +++1FB36;BLOCK SEXTANT-1456;So;0;ON;;;;;N;;;;; +++1FB37;BLOCK SEXTANT-2456;So;0;ON;;;;;N;;;;; +++1FB38;BLOCK SEXTANT-12456;So;0;ON;;;;;N;;;;; +++1FB39;BLOCK SEXTANT-3456;So;0;ON;;;;;N;;;;; +++1FB3A;BLOCK SEXTANT-13456;So;0;ON;;;;;N;;;;; +++1FB3B;BLOCK SEXTANT-23456;So;0;ON;;;;;N;;;;; +++1FB3C;LOWER LEFT BLOCK DIAGONAL LOWER MIDDLE LEFT TO LOWER CENTRE;So;0;ON;;;;;N;;;;; +++1FB3D;LOWER LEFT BLOCK DIAGONAL LOWER MIDDLE LEFT TO LOWER RIGHT;So;0;ON;;;;;N;;;;; +++1FB3E;LOWER LEFT BLOCK DIAGONAL UPPER MIDDLE LEFT TO LOWER CENTRE;So;0;ON;;;;;N;;;;; +++1FB3F;LOWER LEFT BLOCK DIAGONAL UPPER MIDDLE LEFT TO LOWER RIGHT;So;0;ON;;;;;N;;;;; +++1FB40;LOWER LEFT BLOCK DIAGONAL UPPER LEFT TO LOWER CENTRE;So;0;ON;;;;;N;;;;; +++1FB41;LOWER RIGHT BLOCK DIAGONAL UPPER MIDDLE LEFT TO UPPER CENTRE;So;0;ON;;;;;N;;;;; +++1FB42;LOWER RIGHT BLOCK DIAGONAL UPPER MIDDLE LEFT TO UPPER RIGHT;So;0;ON;;;;;N;;;;; +++1FB43;LOWER RIGHT BLOCK DIAGONAL LOWER MIDDLE LEFT TO UPPER CENTRE;So;0;ON;;;;;N;;;;; +++1FB44;LOWER RIGHT BLOCK DIAGONAL LOWER MIDDLE LEFT TO UPPER RIGHT;So;0;ON;;;;;N;;;;; +++1FB45;LOWER RIGHT BLOCK DIAGONAL LOWER LEFT TO UPPER CENTRE;So;0;ON;;;;;N;;;;; +++1FB46;LOWER RIGHT BLOCK DIAGONAL LOWER MIDDLE LEFT TO UPPER MIDDLE RIGHT;So;0;ON;;;;;N;;;;; +++1FB47;LOWER RIGHT BLOCK DIAGONAL LOWER CENTRE TO LOWER MIDDLE RIGHT;So;0;ON;;;;;N;;;;; +++1FB48;LOWER RIGHT BLOCK DIAGONAL LOWER LEFT TO LOWER MIDDLE RIGHT;So;0;ON;;;;;N;;;;; +++1FB49;LOWER RIGHT BLOCK DIAGONAL LOWER CENTRE TO UPPER MIDDLE RIGHT;So;0;ON;;;;;N;;;;; +++1FB4A;LOWER RIGHT BLOCK DIAGONAL LOWER LEFT TO UPPER MIDDLE RIGHT;So;0;ON;;;;;N;;;;; +++1FB4B;LOWER RIGHT BLOCK DIAGONAL LOWER CENTRE TO UPPER RIGHT;So;0;ON;;;;;N;;;;; +++1FB4C;LOWER LEFT BLOCK DIAGONAL UPPER CENTRE TO UPPER MIDDLE RIGHT;So;0;ON;;;;;N;;;;; +++1FB4D;LOWER LEFT BLOCK DIAGONAL UPPER LEFT TO UPPER MIDDLE RIGHT;So;0;ON;;;;;N;;;;; +++1FB4E;LOWER LEFT BLOCK DIAGONAL UPPER CENTRE TO LOWER MIDDLE RIGHT;So;0;ON;;;;;N;;;;; +++1FB4F;LOWER LEFT BLOCK DIAGONAL UPPER LEFT TO LOWER MIDDLE RIGHT;So;0;ON;;;;;N;;;;; +++1FB50;LOWER LEFT BLOCK DIAGONAL UPPER CENTRE TO LOWER RIGHT;So;0;ON;;;;;N;;;;; +++1FB51;LOWER LEFT BLOCK DIAGONAL UPPER MIDDLE LEFT TO LOWER MIDDLE RIGHT;So;0;ON;;;;;N;;;;; +++1FB52;UPPER RIGHT BLOCK DIAGONAL LOWER MIDDLE LEFT TO LOWER CENTRE;So;0;ON;;;;;N;;;;; +++1FB53;UPPER RIGHT BLOCK DIAGONAL LOWER MIDDLE LEFT TO LOWER RIGHT;So;0;ON;;;;;N;;;;; +++1FB54;UPPER RIGHT BLOCK DIAGONAL UPPER MIDDLE LEFT TO LOWER CENTRE;So;0;ON;;;;;N;;;;; +++1FB55;UPPER RIGHT BLOCK DIAGONAL UPPER MIDDLE LEFT TO LOWER RIGHT;So;0;ON;;;;;N;;;;; +++1FB56;UPPER RIGHT BLOCK DIAGONAL UPPER LEFT TO LOWER CENTRE;So;0;ON;;;;;N;;;;; +++1FB57;UPPER LEFT BLOCK DIAGONAL UPPER MIDDLE LEFT TO UPPER CENTRE;So;0;ON;;;;;N;;;;; +++1FB58;UPPER LEFT BLOCK DIAGONAL UPPER MIDDLE LEFT TO UPPER RIGHT;So;0;ON;;;;;N;;;;; +++1FB59;UPPER LEFT BLOCK DIAGONAL LOWER MIDDLE LEFT TO UPPER CENTRE;So;0;ON;;;;;N;;;;; +++1FB5A;UPPER LEFT BLOCK DIAGONAL LOWER MIDDLE LEFT TO UPPER RIGHT;So;0;ON;;;;;N;;;;; +++1FB5B;UPPER LEFT BLOCK DIAGONAL LOWER LEFT TO UPPER CENTRE;So;0;ON;;;;;N;;;;; +++1FB5C;UPPER LEFT BLOCK DIAGONAL LOWER MIDDLE LEFT TO UPPER MIDDLE RIGHT;So;0;ON;;;;;N;;;;; +++1FB5D;UPPER LEFT BLOCK DIAGONAL LOWER CENTRE TO LOWER MIDDLE RIGHT;So;0;ON;;;;;N;;;;; +++1FB5E;UPPER LEFT BLOCK DIAGONAL LOWER LEFT TO LOWER MIDDLE RIGHT;So;0;ON;;;;;N;;;;; +++1FB5F;UPPER LEFT BLOCK DIAGONAL LOWER CENTRE TO UPPER MIDDLE RIGHT;So;0;ON;;;;;N;;;;; +++1FB60;UPPER LEFT BLOCK DIAGONAL LOWER LEFT TO UPPER MIDDLE RIGHT;So;0;ON;;;;;N;;;;; +++1FB61;UPPER LEFT BLOCK DIAGONAL LOWER CENTRE TO UPPER RIGHT;So;0;ON;;;;;N;;;;; +++1FB62;UPPER RIGHT BLOCK DIAGONAL UPPER CENTRE TO UPPER MIDDLE RIGHT;So;0;ON;;;;;N;;;;; +++1FB63;UPPER RIGHT BLOCK DIAGONAL UPPER LEFT TO UPPER MIDDLE RIGHT;So;0;ON;;;;;N;;;;; +++1FB64;UPPER RIGHT BLOCK DIAGONAL UPPER CENTRE TO LOWER MIDDLE RIGHT;So;0;ON;;;;;N;;;;; +++1FB65;UPPER RIGHT BLOCK DIAGONAL UPPER LEFT TO LOWER MIDDLE RIGHT;So;0;ON;;;;;N;;;;; +++1FB66;UPPER RIGHT BLOCK DIAGONAL UPPER CENTRE TO LOWER RIGHT;So;0;ON;;;;;N;;;;; +++1FB67;UPPER RIGHT BLOCK DIAGONAL UPPER MIDDLE LEFT TO LOWER MIDDLE RIGHT;So;0;ON;;;;;N;;;;; +++1FB68;UPPER AND RIGHT AND LOWER TRIANGULAR THREE QUARTERS BLOCK;So;0;ON;;;;;N;;;;; +++1FB69;LEFT AND LOWER AND RIGHT TRIANGULAR THREE QUARTERS BLOCK;So;0;ON;;;;;N;;;;; +++1FB6A;UPPER AND LEFT AND LOWER TRIANGULAR THREE QUARTERS BLOCK;So;0;ON;;;;;N;;;;; +++1FB6B;LEFT AND UPPER AND RIGHT TRIANGULAR THREE QUARTERS BLOCK;So;0;ON;;;;;N;;;;; +++1FB6C;LEFT TRIANGULAR ONE QUARTER BLOCK;So;0;ON;;;;;N;;;;; +++1FB6D;UPPER TRIANGULAR ONE QUARTER BLOCK;So;0;ON;;;;;N;;;;; +++1FB6E;RIGHT TRIANGULAR ONE QUARTER BLOCK;So;0;ON;;;;;N;;;;; +++1FB6F;LOWER TRIANGULAR ONE QUARTER BLOCK;So;0;ON;;;;;N;;;;; +++1FB70;VERTICAL ONE EIGHTH BLOCK-2;So;0;ON;;;;;N;;;;; +++1FB71;VERTICAL ONE EIGHTH BLOCK-3;So;0;ON;;;;;N;;;;; +++1FB72;VERTICAL ONE EIGHTH BLOCK-4;So;0;ON;;;;;N;;;;; +++1FB73;VERTICAL ONE EIGHTH BLOCK-5;So;0;ON;;;;;N;;;;; +++1FB74;VERTICAL ONE EIGHTH BLOCK-6;So;0;ON;;;;;N;;;;; +++1FB75;VERTICAL ONE EIGHTH BLOCK-7;So;0;ON;;;;;N;;;;; +++1FB76;HORIZONTAL ONE EIGHTH BLOCK-2;So;0;ON;;;;;N;;;;; +++1FB77;HORIZONTAL ONE EIGHTH BLOCK-3;So;0;ON;;;;;N;;;;; +++1FB78;HORIZONTAL ONE EIGHTH BLOCK-4;So;0;ON;;;;;N;;;;; +++1FB79;HORIZONTAL ONE EIGHTH BLOCK-5;So;0;ON;;;;;N;;;;; +++1FB7A;HORIZONTAL ONE EIGHTH BLOCK-6;So;0;ON;;;;;N;;;;; +++1FB7B;HORIZONTAL ONE EIGHTH BLOCK-7;So;0;ON;;;;;N;;;;; +++1FB7C;LEFT AND LOWER ONE EIGHTH BLOCK;So;0;ON;;;;;N;;;;; +++1FB7D;LEFT AND UPPER ONE EIGHTH BLOCK;So;0;ON;;;;;N;;;;; +++1FB7E;RIGHT AND UPPER ONE EIGHTH BLOCK;So;0;ON;;;;;N;;;;; +++1FB7F;RIGHT AND LOWER ONE EIGHTH BLOCK;So;0;ON;;;;;N;;;;; +++1FB80;UPPER AND LOWER ONE EIGHTH BLOCK;So;0;ON;;;;;N;;;;; +++1FB81;HORIZONTAL ONE EIGHTH BLOCK-1358;So;0;ON;;;;;N;;;;; +++1FB82;UPPER ONE QUARTER BLOCK;So;0;ON;;;;;N;;;;; +++1FB83;UPPER THREE EIGHTHS BLOCK;So;0;ON;;;;;N;;;;; +++1FB84;UPPER FIVE EIGHTHS BLOCK;So;0;ON;;;;;N;;;;; +++1FB85;UPPER THREE QUARTERS BLOCK;So;0;ON;;;;;N;;;;; +++1FB86;UPPER SEVEN EIGHTHS BLOCK;So;0;ON;;;;;N;;;;; +++1FB87;RIGHT ONE QUARTER BLOCK;So;0;ON;;;;;N;;;;; +++1FB88;RIGHT THREE EIGHTHS BLOCK;So;0;ON;;;;;N;;;;; +++1FB89;RIGHT FIVE EIGHTHS BLOCK;So;0;ON;;;;;N;;;;; +++1FB8A;RIGHT THREE QUARTERS BLOCK;So;0;ON;;;;;N;;;;; +++1FB8B;RIGHT SEVEN EIGHTHS BLOCK;So;0;ON;;;;;N;;;;; +++1FB8C;LEFT HALF MEDIUM SHADE;So;0;ON;;;;;N;;;;; +++1FB8D;RIGHT HALF MEDIUM SHADE;So;0;ON;;;;;N;;;;; +++1FB8E;UPPER HALF MEDIUM SHADE;So;0;ON;;;;;N;;;;; +++1FB8F;LOWER HALF MEDIUM SHADE;So;0;ON;;;;;N;;;;; +++1FB90;INVERSE MEDIUM SHADE;So;0;ON;;;;;N;;;;; +++1FB91;UPPER HALF BLOCK AND LOWER HALF INVERSE MEDIUM SHADE;So;0;ON;;;;;N;;;;; +++1FB92;UPPER HALF INVERSE MEDIUM SHADE AND LOWER HALF BLOCK;So;0;ON;;;;;N;;;;; +++1FB94;LEFT HALF INVERSE MEDIUM SHADE AND RIGHT HALF BLOCK;So;0;ON;;;;;N;;;;; +++1FB95;CHECKER BOARD FILL;So;0;ON;;;;;N;;;;; +++1FB96;INVERSE CHECKER BOARD FILL;So;0;ON;;;;;N;;;;; +++1FB97;HEAVY HORIZONTAL FILL;So;0;ON;;;;;N;;;;; +++1FB98;UPPER LEFT TO LOWER RIGHT FILL;So;0;ON;;;;;N;;;;; +++1FB99;UPPER RIGHT TO LOWER LEFT FILL;So;0;ON;;;;;N;;;;; +++1FB9A;UPPER AND LOWER TRIANGULAR HALF BLOCK;So;0;ON;;;;;N;;;;; +++1FB9B;LEFT AND RIGHT TRIANGULAR HALF BLOCK;So;0;ON;;;;;N;;;;; +++1FB9C;UPPER LEFT TRIANGULAR MEDIUM SHADE;So;0;ON;;;;;N;;;;; +++1FB9D;UPPER RIGHT TRIANGULAR MEDIUM SHADE;So;0;ON;;;;;N;;;;; +++1FB9E;LOWER RIGHT TRIANGULAR MEDIUM SHADE;So;0;ON;;;;;N;;;;; +++1FB9F;LOWER LEFT TRIANGULAR MEDIUM SHADE;So;0;ON;;;;;N;;;;; +++1FBA0;BOX DRAWINGS LIGHT DIAGONAL UPPER CENTRE TO MIDDLE LEFT;So;0;ON;;;;;N;;;;; +++1FBA1;BOX DRAWINGS LIGHT DIAGONAL UPPER CENTRE TO MIDDLE RIGHT;So;0;ON;;;;;N;;;;; +++1FBA2;BOX DRAWINGS LIGHT DIAGONAL MIDDLE LEFT TO LOWER CENTRE;So;0;ON;;;;;N;;;;; +++1FBA3;BOX DRAWINGS LIGHT DIAGONAL MIDDLE RIGHT TO LOWER CENTRE;So;0;ON;;;;;N;;;;; +++1FBA4;BOX DRAWINGS LIGHT DIAGONAL UPPER CENTRE TO MIDDLE LEFT TO LOWER CENTRE;So;0;ON;;;;;N;;;;; +++1FBA5;BOX DRAWINGS LIGHT DIAGONAL UPPER CENTRE TO MIDDLE RIGHT TO LOWER CENTRE;So;0;ON;;;;;N;;;;; +++1FBA6;BOX DRAWINGS LIGHT DIAGONAL MIDDLE LEFT TO LOWER CENTRE TO MIDDLE RIGHT;So;0;ON;;;;;N;;;;; +++1FBA7;BOX DRAWINGS LIGHT DIAGONAL MIDDLE LEFT TO UPPER CENTRE TO MIDDLE RIGHT;So;0;ON;;;;;N;;;;; +++1FBA8;BOX DRAWINGS LIGHT DIAGONAL UPPER CENTRE TO MIDDLE LEFT AND MIDDLE RIGHT TO LOWER CENTRE;So;0;ON;;;;;N;;;;; +++1FBA9;BOX DRAWINGS LIGHT DIAGONAL UPPER CENTRE TO MIDDLE RIGHT AND MIDDLE LEFT TO LOWER CENTRE;So;0;ON;;;;;N;;;;; +++1FBAA;BOX DRAWINGS LIGHT DIAGONAL UPPER CENTRE TO MIDDLE RIGHT TO LOWER CENTRE TO MIDDLE LEFT;So;0;ON;;;;;N;;;;; +++1FBAB;BOX DRAWINGS LIGHT DIAGONAL UPPER CENTRE TO MIDDLE LEFT TO LOWER CENTRE TO MIDDLE RIGHT;So;0;ON;;;;;N;;;;; +++1FBAC;BOX DRAWINGS LIGHT DIAGONAL MIDDLE LEFT TO UPPER CENTRE TO MIDDLE RIGHT TO LOWER CENTRE;So;0;ON;;;;;N;;;;; +++1FBAD;BOX DRAWINGS LIGHT DIAGONAL MIDDLE RIGHT TO UPPER CENTRE TO MIDDLE LEFT TO LOWER CENTRE;So;0;ON;;;;;N;;;;; +++1FBAE;BOX DRAWINGS LIGHT DIAGONAL DIAMOND;So;0;ON;;;;;N;;;;; +++1FBAF;BOX DRAWINGS LIGHT HORIZONTAL WITH VERTICAL STROKE;So;0;ON;;;;;N;;;;; +++1FBB0;ARROWHEAD-SHAPED POINTER;So;0;ON;;;;;N;;;;; +++1FBB1;INVERSE CHECK MARK;So;0;ON;;;;;N;;;;; +++1FBB2;LEFT HALF RUNNING MAN;So;0;ON;;;;;N;;;;; +++1FBB3;RIGHT HALF RUNNING MAN;So;0;ON;;;;;N;;;;; +++1FBB4;INVERSE DOWNWARDS ARROW WITH TIP LEFTWARDS;So;0;ON;;;;;N;;;;; +++1FBB5;LEFTWARDS ARROW AND UPPER AND LOWER ONE EIGHTH BLOCK;So;0;ON;;;;;N;;;;; +++1FBB6;RIGHTWARDS ARROW AND UPPER AND LOWER ONE EIGHTH BLOCK;So;0;ON;;;;;N;;;;; +++1FBB7;DOWNWARDS ARROW AND RIGHT ONE EIGHTH BLOCK;So;0;ON;;;;;N;;;;; +++1FBB8;UPWARDS ARROW AND RIGHT ONE EIGHTH BLOCK;So;0;ON;;;;;N;;;;; +++1FBB9;LEFT HALF FOLDER;So;0;ON;;;;;N;;;;; +++1FBBA;RIGHT HALF FOLDER;So;0;ON;;;;;N;;;;; +++1FBBB;VOIDED GREEK CROSS;So;0;ON;;;;;N;;;;; +++1FBBC;RIGHT OPEN SQUARED DOT;So;0;ON;;;;;N;;;;; +++1FBBD;NEGATIVE DIAGONAL CROSS;So;0;ON;;;;;N;;;;; +++1FBBE;NEGATIVE DIAGONAL MIDDLE RIGHT TO LOWER CENTRE;So;0;ON;;;;;N;;;;; +++1FBBF;NEGATIVE DIAGONAL DIAMOND;So;0;ON;;;;;N;;;;; +++1FBC0;WHITE HEAVY SALTIRE WITH ROUNDED CORNERS;So;0;ON;;;;;N;;;;; +++1FBC1;LEFT THIRD WHITE RIGHT POINTING INDEX;So;0;ON;;;;;N;;;;; +++1FBC2;MIDDLE THIRD WHITE RIGHT POINTING INDEX;So;0;ON;;;;;N;;;;; +++1FBC3;RIGHT THIRD WHITE RIGHT POINTING INDEX;So;0;ON;;;;;N;;;;; +++1FBC4;NEGATIVE SQUARED QUESTION MARK;So;0;ON;;;;;N;;;;; +++1FBC5;STICK FIGURE;So;0;ON;;;;;N;;;;; +++1FBC6;STICK FIGURE WITH ARMS RAISED;So;0;ON;;;;;N;;;;; +++1FBC7;STICK FIGURE LEANING LEFT;So;0;ON;;;;;N;;;;; +++1FBC8;STICK FIGURE LEANING RIGHT;So;0;ON;;;;;N;;;;; +++1FBC9;STICK FIGURE WITH DRESS;So;0;ON;;;;;N;;;;; +++1FBCA;WHITE UP-POINTING CHEVRON;So;0;ON;;;;;N;;;;; +++1FBF0;SEGMENTED DIGIT ZERO;Nd;0;EN; 0030;0;0;0;N;;;;; +++1FBF1;SEGMENTED DIGIT ONE;Nd;0;EN; 0031;1;1;1;N;;;;; +++1FBF2;SEGMENTED DIGIT TWO;Nd;0;EN; 0032;2;2;2;N;;;;; +++1FBF3;SEGMENTED DIGIT THREE;Nd;0;EN; 0033;3;3;3;N;;;;; +++1FBF4;SEGMENTED DIGIT FOUR;Nd;0;EN; 0034;4;4;4;N;;;;; +++1FBF5;SEGMENTED DIGIT FIVE;Nd;0;EN; 0035;5;5;5;N;;;;; +++1FBF6;SEGMENTED DIGIT SIX;Nd;0;EN; 0036;6;6;6;N;;;;; +++1FBF7;SEGMENTED DIGIT SEVEN;Nd;0;EN; 0037;7;7;7;N;;;;; +++1FBF8;SEGMENTED DIGIT EIGHT;Nd;0;EN; 0038;8;8;8;N;;;;; +++1FBF9;SEGMENTED DIGIT NINE;Nd;0;EN; 0039;9;9;9;N;;;;; ++ 20000;;Lo;0;L;;;;;N;;;;; ++-2A6D6;;Lo;0;L;;;;;N;;;;; +++2A6DD;;Lo;0;L;;;;;N;;;;; ++ 2A700;;Lo;0;L;;;;;N;;;;; ++ 2B734;;Lo;0;L;;;;;N;;;;; ++ 2B740;;Lo;0;L;;;;;N;;;;; ++@@ -32498,6 +33452,8 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;; ++ 2FA1B;CJK COMPATIBILITY IDEOGRAPH-2FA1B;Lo;0;L;9F16;;;;N;;;;; ++ 2FA1C;CJK COMPATIBILITY IDEOGRAPH-2FA1C;Lo;0;L;9F3B;;;;N;;;;; ++ 2FA1D;CJK COMPATIBILITY IDEOGRAPH-2FA1D;Lo;0;L;2A600;;;;N;;;;; +++30000;;Lo;0;L;;;;;N;;;;; +++3134A;;Lo;0;L;;;;;N;;;;; ++ E0001;LANGUAGE TAG;Cf;0;BN;;;;;N;;;;; ++ E0020;TAG SPACE;Cf;0;BN;;;;;N;;;;; ++ E0021;TAG EXCLAMATION MARK;Cf;0;BN;;;;;N;;;;; diff --cc debian/patches/localedata/locale-C.diff index 000000000,000000000..e2bf4ad0b new file mode 100644 --- /dev/null +++ b/debian/patches/localedata/locale-C.diff @@@ -1,0 -1,0 +1,977 @@@ ++--- /dev/null +++++ b/localedata/locales/C ++@@ -0,0 +1,974 @@ +++escape_char / +++comment_char % +++% Locale for C locale in UTF-8 +++% Contributed by Aurelien Jarno , 2011 +++ +++LC_IDENTIFICATION +++title "C locale" +++source "" +++address "" +++contact "" +++email "aurel32@debian.org" +++tel "" +++fax "" +++language "C" +++territory "" +++revision "1.6" +++date "2016-08-08" +++% +++category "i18n:2012";LC_IDENTIFICATION +++category "i18n:2012";LC_CTYPE +++category "i18n:2012";LC_COLLATE +++category "i18n:2012";LC_NUMERIC +++category "i18n:2012";LC_MONETARY +++category "i18n:2012";LC_TIME +++category "i18n:2012";LC_MESSAGES +++category "i18n:2012";LC_PAPER +++category "i18n:2012";LC_NAME +++category "i18n:2012";LC_ADDRESS +++category "i18n:2012";LC_TELEPHONE +++category "i18n:2012";LC_MEASUREMENT +++END LC_IDENTIFICATION +++ +++LC_CTYPE +++copy "i18n" +++ +++translit_start +++include "translit_combining";"" +++translit_end +++ +++END LC_CTYPE +++ +++LC_COLLATE +++order_start forward +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++ +++.. +++ +++UNDEFINED +++order_end +++END LC_COLLATE +++ +++LC_MONETARY +++copy "POSIX" +++END LC_MONETARY +++ +++LC_NUMERIC +++copy "POSIX" +++END LC_NUMERIC +++ +++LC_TIME +++% Abbreviated weekday names (%s) +++abday "";"";/ +++ "";"";/ +++ "";"";/ +++ "" +++% +++% Full weekday names (%A) +++day "";/ +++ "";/ +++ "";/ +++ "";/ +++ "";/ +++ "";/ +++ "" +++% +++% Abbreviated month names (%b) +++abmon "";"";/ +++ "";"";/ +++ "";"";/ +++ "";"";/ +++ "";"";/ +++ "";"" +++% +++% Full month names (%B) +++mon "";/ +++ "";/ +++ "";/ +++ "";/ +++ "";/ +++ "";/ +++ "";/ +++ "";/ +++ "";/ +++ "";/ +++ "";/ +++ "" +++% +++% Week description, consists of three fields: +++% 1. Number of days in a week. +++% 2. Gregorian date that is a first weekday (19971130 for Sunday, 19971201 for Monday). +++% 3. The weekday number to be contained in the first week of the year. +++% +++% ISO 8601 conforming applications should use the values 7, 19971130 (a +++% Monday), and 4 (Thursday), respectively. +++week 7;19971130;4 +++first_weekday 1 +++first_workday 2 +++% +++% Equivalent of AM/PM (%p) "AM"/"PM" +++am_pm "";"" +++% +++% Appropriate date and time representation (%c) +++% "%a %b %e %H:%M:%S %Y" +++d_t_fmt "/ +++/ +++" +++% +++% Appropriate date representation (%x) "%m/%d/%y" +++d_fmt "" +++% +++% Appropriate time representation (%X) "%H:%M:%S" +++t_fmt "" +++% +++% Appropriate 12 h time representation (%r) "%I:%M:%S %p" +++t_fmt_ampm "/ +++" +++% +++% Appropriate date representation (date(1)) "%a %b %e %H:%M:%S %Z %Y" +++date_fmt "" +++END LC_TIME +++ +++LC_MESSAGES +++% This is the POSIX Locale definition for +++% the LC_NUMERIC category. +++% +++yesexpr "" +++% +++noexpr "" +++END LC_MESSAGES +++ +++LC_PAPER +++copy "i18n" +++END LC_PAPER +++ +++LC_NAME +++copy "i18n" +++END LC_NAME +++ +++LC_ADDRESS +++copy "i18n" +++END LC_ADDRESS +++ +++LC_TELEPHONE +++tel_int_fmt "" +++END LC_TELEPHONE +++ +++LC_MEASUREMENT +++copy "i18n" +++END LC_MEASUREMENT diff --cc debian/patches/localedata/locale-en_DK.diff index 000000000,000000000..3c5f4de1f new file mode 100644 --- /dev/null +++ b/debian/patches/localedata/locale-en_DK.diff @@@ -1,0 -1,0 +1,65 @@@ ++# All lines beginning with `# DP:' are a description of the patch. ++# DP: Description: Improve en_DK and add en_DK.ISO-8859-15 to SUPPORTED ++# DP: This locale is only useful to provide ISO8601 date formats. ++# DP: Related bugs: #323159 ++# DP: Dpatch author: Denis Barbier ++# DP: Patch author: Jakob Bohm ++# DP: Upstream status: not submitted ++# DP: Date: 2006-01-16 ++ ++--- ++ localedata/SUPPORTED | 1 + ++ localedata/locales/en_DK | 22 +++------------------- ++ 2 files changed, 4 insertions(+), 19 deletions(-) ++ ++--- a/localedata/SUPPORTED +++++ b/localedata/SUPPORTED ++@@ -134,6 +134,7 @@ ++ en_CA.UTF-8/UTF-8 \ ++ en_CA/ISO-8859-1 \ ++ en_DK.UTF-8/UTF-8 \ +++en_DK.ISO-8859-15/ISO-8859-15 \ ++ en_DK/ISO-8859-1 \ ++ en_GB.UTF-8/UTF-8 \ ++ en_GB/ISO-8859-1 \ ++--- a/localedata/locales/en_DK +++++ b/localedata/locales/en_DK ++@@ -63,27 +63,11 @@ ++ END LC_CTYPE ++ ++ LC_MONETARY ++-int_curr_symbol "DKK " ++-currency_symbol "kr." ++-mon_decimal_point "," ++-mon_thousands_sep "." ++-mon_grouping 3;3 ++-positive_sign "" ++-negative_sign "-" ++-int_frac_digits 2 ++-frac_digits 2 ++-p_cs_precedes 1 ++-p_sep_by_space 0 ++-n_cs_precedes 1 ++-n_sep_by_space 0 ++-p_sign_posn 1 ++-n_sign_posn 1 +++copy "da_DK" ++ END LC_MONETARY ++ ++ LC_NUMERIC ++-decimal_point "," ++-thousands_sep "." ++-grouping 3;3 +++copy "da_DK" ++ END LC_NUMERIC ++ ++ LC_TIME ++@@ -152,7 +136,7 @@ ++ END LC_MEASUREMENT ++ ++ LC_NAME ++-name_fmt "%d%t%g%t%m%t%f" +++copy "da_DK" ++ END LC_NAME ++ ++ LC_ADDRESS diff --cc debian/patches/localedata/locale-eu_FR.diff index 000000000,000000000..594e99c26 new file mode 100644 --- /dev/null +++ b/debian/patches/localedata/locale-eu_FR.diff @@@ -1,0 -1,0 +1,198 @@@ ++# DP: Description: #257840: locales: Please add the eu_FR locale ++# DP: Related bugs: #257840 ++# DP: Dpatch author: GOTO Masanori ++# DP: Patch author: Christian Perrier ++# DP: Upstream status: Not submitted ++# DP: Status Details: sending upstream ++# DP: Date: 2004-07-31 ++ ++--- ++ localedata/SUPPORTED | 3 + ++ localedata/locales/eu_FR | 83 ++++++++++++++++++++++++++++++++++++++++++ ++ localedata/locales/eu_FR@euro | 83 ++++++++++++++++++++++++++++++++++++++++++ ++ 3 files changed, 169 insertions(+) ++ ++--- /dev/null +++++ b/localedata/locales/eu_FR ++@@ -0,0 +1,83 @@ +++comment_char % +++escape_char / +++% +++% Basque Language Locale for France +++% Language: eu +++% Territory: FR +++% Revision: 1.0 +++% Date: 2004-06-24 +++% Users: general +++% Charset: ISO-8859-1 +++% Distribution and use is free, also +++% for commercial purposes. +++ +++LC_IDENTIFICATION +++title "Basque locale for France" +++source "Christian Perrier and the Debian Project" +++address "" +++contact "Christian Perrier" +++email "bubulle@debian.org" +++tel "" +++fax "" +++language "Basque" +++territory "France" +++revision "1.0" +++date "2004-06-24" +++% +++category "i18n:2012";LC_IDENTIFICATION +++category "i18n:2012";LC_CTYPE +++category "i18n:2012";LC_COLLATE +++category "i18n:2012";LC_TIME +++category "i18n:2012";LC_NUMERIC +++category "i18n:2012";LC_MONETARY +++category "i18n:2012";LC_MESSAGES +++category "i18n:2012";LC_PAPER +++category "i18n:2012";LC_NAME +++category "i18n:2012";LC_ADDRESS +++category "i18n:2012";LC_TELEPHONE +++ +++END LC_IDENTIFICATION +++ +++LC_COLLATE +++copy "iso14651_t1" +++END LC_COLLATE +++ +++LC_CTYPE +++copy "i18n" +++END LC_CTYPE +++ +++LC_MESSAGES +++copy "eu_ES" +++END LC_MESSAGES +++ +++LC_MONETARY +++copy "fr_FR" +++END LC_MONETARY +++ +++LC_NUMERIC +++copy "fr_FR" +++END LC_NUMERIC +++ +++LC_TIME +++copy "eu_ES" +++END LC_TIME +++ +++LC_PAPER +++copy "fr_FR" +++END LC_PAPER +++ +++LC_TELEPHONE +++copy "fr_FR" +++END LC_TELEPHONE +++ +++LC_MEASUREMENT +++copy "fr_FR" +++END LC_MEASUREMENT +++ +++LC_NAME +++copy "eu_ES" +++END LC_NAME +++ +++LC_ADDRESS +++copy "fr_FR" +++END LC_ADDRESS ++--- a/localedata/SUPPORTED +++++ b/localedata/SUPPORTED ++@@ -191,6 +191,9 @@ ++ eu_ES.UTF-8/UTF-8 \ ++ eu_ES/ISO-8859-1 \ ++ eu_ES@euro/ISO-8859-15 \ +++eu_FR.UTF-8/UTF-8 \ +++eu_FR/ISO-8859-1 \ +++eu_FR@euro/ISO-8859-15 \ ++ fa_IR/UTF-8 \ ++ ff_SN/UTF-8 \ ++ fi_FI.UTF-8/UTF-8 \ ++--- /dev/null +++++ b/localedata/locales/eu_FR@euro ++@@ -0,0 +1,83 @@ +++comment_char % +++escape_char / +++% +++% Basque Language Locale for France +++% Language: eu +++% Territory: FR +++% Revision: 1.0 +++% Date: 2004-06-24 +++% Users: general +++% Charset: ISO-8859-15 +++% Distribution and use is free, also +++% for commercial purposes. +++ +++LC_IDENTIFICATION +++title "Basque locale for France" +++source "Christian Perrier and the Debian Project" +++address "" +++contact "Christian Perrier" +++email "bubulle@debian.org" +++tel "" +++fax "" +++language "Basque" +++territory "France" +++revision "1.0" +++date "2004-06-24" +++% +++category "i18n:2012";LC_IDENTIFICATION +++category "i18n:2012";LC_CTYPE +++category "i18n:2012";LC_COLLATE +++category "i18n:2012";LC_TIME +++category "i18n:2012";LC_NUMERIC +++category "i18n:2012";LC_MONETARY +++category "i18n:2012";LC_MESSAGES +++category "i18n:2012";LC_PAPER +++category "i18n:2012";LC_NAME +++category "i18n:2012";LC_ADDRESS +++category "i18n:2012";LC_TELEPHONE +++ +++END LC_IDENTIFICATION +++ +++LC_COLLATE +++copy "iso14651_t1" +++END LC_COLLATE +++ +++LC_CTYPE +++copy "i18n" +++END LC_CTYPE +++ +++LC_MESSAGES +++copy "eu_ES" +++END LC_MESSAGES +++ +++LC_MONETARY +++copy "fr_FR" +++END LC_MONETARY +++ +++LC_NUMERIC +++copy "fr_FR" +++END LC_NUMERIC +++ +++LC_TIME +++copy "eu_ES" +++END LC_TIME +++ +++LC_PAPER +++copy "fr_FR" +++END LC_PAPER +++ +++LC_TELEPHONE +++copy "fr_FR" +++END LC_TELEPHONE +++ +++LC_MEASUREMENT +++copy "fr_FR" +++END LC_MEASUREMENT +++ +++LC_NAME +++copy "eu_ES" +++END LC_NAME +++ +++LC_ADDRESS +++copy "fr_FR" +++END LC_ADDRESS diff --cc debian/patches/localedata/locale-ku_TR.diff index 000000000,000000000..d15e62888 new file mode 100644 --- /dev/null +++ b/debian/patches/localedata/locale-ku_TR.diff @@@ -1,0 -1,0 +1,115 @@@ ++# DP: Description: Please add Kurdish locale ++# DP: Related bugs: BZ870 ++# DP: Dpatch author: Denis Barbier ++# DP: Patch author: Kader DILSIZ, Pablo Saratxaga ++# DP: Upstream status: Version 0.1 submitted in the original bugreport ++# DP: has been committed, this new version has been sent just after. ++# DP: Date: 2006-01-06 ++ ++--- ++ localedata/locales/ku_TR | 67 ++++++++++++++++++++++++----------------------- ++ 1 file changed, 35 insertions(+), 32 deletions(-) ++ ++--- a/localedata/locales/ku_TR +++++ b/localedata/locales/ku_TR ++@@ -20,6 +20,8 @@ ++ % Date: 2003-07-27 ++ % Users: general ++ % History: +++% 0.2 2005-04-24 Erdal Ronah +++% Fix LC_CTYPE and LC_NAME sections. Remove dotless i from LC_COLLATE ++ ++ LC_IDENTIFICATION ++ title "Kurdish (latin) locale for Turkey" ++@@ -31,8 +33,8 @@ ++ fax "" ++ language "Kurdish" ++ territory "Turkey" ++-revision "0.1" ++-date "2003-07-27" +++revision "0.2" +++date "2005-04-24" ++ ++ category "i18n:2012";LC_IDENTIFICATION ++ category "i18n:2012";LC_CTYPE ++@@ -108,35 +110,35 @@ ++ END LC_NUMERIC ++ ++ LC_TIME ++-abday "yk";"dus";/ ++- "ss";"ar";/ ++- "pn";"n";/ ++- "sep" ++-day "yksm";/ ++- "dusm";/ ++- "ssm";/ ++- "arsm";/ ++- "pncsm";/ ++- "n";/ ++- "sept" +++abday "Y";"D";/ +++ "S";"";/ +++ "P";"n";/ +++ "" +++day "Yekem";/ +++ "Duem";/ +++ "Sem";/ +++ "arem";/ +++ "Pncem";/ +++ "n";/ +++ "em" ++ abmon "il";"Sib";/ ++ "Ada";"Ns";/ ++ "Gul";"Hez";/ ++ "Tr";"Teb";/ ++ "lo";"Cot";/ ++ "Mij";"Kan" ++-mon "ile";/ ++- "Sibat";/ ++- "Adar";/ ++- "Nsan";/ ++- "Gulan";/ ++- "Hezran";/ ++- "Trmeh";/ ++- "Tebax";/ ++- "lon";/ ++- "Cotmeh";/ ++- "Mijdar";/ ++- "Kann" +++mon "ile";/ +++ "sibat";/ +++ "adar";/ +++ "nsan";/ +++ "gulan";/ +++ "hezran";/ +++ "trmeh";/ +++ "tebax";/ +++ "lon";/ +++ "cotmeh";/ +++ "mijdar";/ +++ "kann" ++ d_t_fmt "%A %d %B %Y %T %Z" ++ d_fmt "%d//%m//%Y" ++ t_fmt "%T" ++@@ -170,13 +172,14 @@ ++ LC_NAME ++ name_fmt "%d%t%g%t%m%t%f" ++ % TODO ++-% Sayın ++-name_gen "Sayn" ++-name_mr "M." ++-name_mrs "Jne" ++-name_ms "Jne" ++-% "Kc,k" ++-name_miss "Kk" +++% Birz +++name_gen "Barz" +++name_mr "Barz" +++% "Birz" +++name_mrs "Barz" +++name_ms "Barz" +++% "Birz" +++name_miss "Barz" ++ END LC_NAME ++ ++ LC_ADDRESS diff --cc debian/patches/localedata/locale-zh_TW.diff index 000000000,000000000..02612cfe7 new file mode 100644 --- /dev/null +++ b/debian/patches/localedata/locale-zh_TW.diff @@@ -1,0 -1,0 +1,25 @@@ ++See BTS #352600. ++Not submitted yet. ++ ++--- ++ localedata/locales/zh_TW | 4 ++-- ++ 1 file changed, 2 insertions(+), 2 deletions(-) ++ ++--- a/localedata/locales/zh_TW +++++ b/localedata/locales/zh_TW ++@@ -114,13 +114,13 @@ ++ "";"";"" ++ ++ % d_t_fmt: "%Y%m%d (%A) %H
%M%S" ++-d_t_fmt "%Y%m%d (%A) %H/ +++d_t_fmt "%Y%m%d (%A) %H/ ++ %M%S" ++ ++ date_fmt "%Y%m%d (%A) %H/ ++ %M%S %Z" ++ ++-d_fmt "%Y%m%d" +++d_fmt "%Y%m%d" ++ ++ t_fmt "%H%M%S" ++ diff --cc debian/patches/localedata/locales-fr.diff index 000000000,000000000..d7c54306d new file mode 100644 --- /dev/null +++ b/debian/patches/localedata/locales-fr.diff @@@ -1,0 -1,0 +1,98 @@@ ++# All lines beginning with `# DP:' are a description of the patch. ++# DP: Description: Various fixes for all French locales ++# DP: Related bugs: #248377 #351786 #345481 ++# DP: Dpatch author: Denis Barbier ++# DP: Patch author: Denis Barbier ++# DP: Upstream status: not submitted ++# DP: Date: 2006-01-10 ++ ++--- ++ localedata/locales/fr_BE | 5 ++++- ++ localedata/locales/fr_CA | 1 + ++ localedata/locales/fr_CH | 5 ++++- ++ localedata/locales/fr_FR | 7 +++++++ ++ localedata/locales/fr_LU | 5 ++++- ++ 5 files changed, 20 insertions(+), 3 deletions(-) ++ ++--- a/localedata/locales/fr_BE +++++ b/localedata/locales/fr_BE ++@@ -140,7 +141,7 @@ ++ END LC_MEASUREMENT ++ ++ LC_NAME ++-name_fmt "%d%t%g%t%m%t%f" +++copy "fr_FR" ++ END LC_NAME ++ ++ LC_ADDRESS ++@@ -150,6 +151,8 @@ ++ country_ab3 "BEL" ++ country_num 056 ++ country_car "B" +++country_post "BE" +++country_isbn "979-10" ++ lang_name "franais" ++ lang_ab "fr" ++ lang_term "fra" ++--- a/localedata/locales/fr_CH +++++ b/localedata/locales/fr_CH ++@@ -123,7 +124,7 @@ ++ END LC_MEASUREMENT ++ ++ LC_NAME ++-name_fmt "%d%t%g%t%m%t%f" +++copy "fr_FR" ++ END LC_NAME ++ ++ LC_ADDRESS ++@@ -133,6 +134,8 @@ ++ country_ab3 "CHE" ++ country_num 756 ++ country_car "CH" +++country_post "CH" +++country_isbn "979-10" ++ lang_name "franais" ++ lang_ab "fr" ++ lang_term "fra" ++--- a/localedata/locales/fr_FR +++++ b/localedata/locales/fr_FR ++@@ -158,6 +159,11 @@ ++ ++ LC_NAME ++ name_fmt "%d%t%g%t%m%t%f" +++name_gen "" +++name_mr "M." +++name_mrs "Mme" +++name_miss "Mlle" +++name_ms "" ++ END LC_NAME ++ ++ LC_ADDRESS ++@@ -166,6 +172,7 @@ ++ country_ab2 "FR" ++ country_ab3 "FRA" ++ country_num 250 +++country_post "FR" ++ country_isbn "979-10" ++ country_car "F" ++ lang_name "franais" ++--- a/localedata/locales/fr_LU +++++ b/localedata/locales/fr_LU ++@@ -139,7 +140,7 @@ ++ END LC_MEASUREMENT ++ ++ LC_NAME ++-name_fmt "%d%t%g%t%m%t%f" +++copy "fr_FR" ++ END LC_NAME ++ ++ LC_ADDRESS ++@@ -149,6 +150,8 @@ ++ country_ab3 "LUX" ++ country_num 442 ++ country_car "L" +++country_post "LU" +++country_isbn "979-10" ++ lang_name "franais" ++ lang_ab "fr" ++ lang_term "fra" diff --cc debian/patches/localedata/sort-UTF8-first.diff index 000000000,000000000..afc2f528e new file mode 100644 --- /dev/null +++ b/debian/patches/localedata/sort-UTF8-first.diff @@@ -1,0 -1,0 +1,77 @@@ ++--- ++ localedata/SUPPORTED | 14 +++++++------- ++ 1 file changed, 7 insertions(+), 7 deletions(-) ++ ++--- a/localedata/SUPPORTED +++++ b/localedata/SUPPORTED ++@@ -256,8 +256,8 @@ ++ hne_IN/UTF-8 \ ++ hr_HR.UTF-8/UTF-8 \ ++ hr_HR/ISO-8859-2 \ ++-hsb_DE/ISO-8859-2 \ ++ hsb_DE.UTF-8/UTF-8 \ +++hsb_DE/ISO-8859-2 \ ++ ht_HT/UTF-8 \ ++ hu_HU.UTF-8/UTF-8 \ ++ hu_HU/ISO-8859-2 \ ++@@ -276,8 +276,8 @@ ++ it_IT/ISO-8859-1 \ ++ it_IT@euro/ISO-8859-15 \ ++ iu_CA/UTF-8 \ ++-ja_JP.EUC-JP/EUC-JP \ ++ ja_JP.UTF-8/UTF-8 \ +++ja_JP.EUC-JP/EUC-JP \ ++ ka_GE.UTF-8/UTF-8 \ ++ ka_GE/GEORGIAN-PS \ ++ kab_DZ/UTF-8 \ ++@@ -287,8 +287,8 @@ ++ kl_GL/ISO-8859-1 \ ++ km_KH/UTF-8 \ ++ kn_IN/UTF-8 \ ++-ko_KR.EUC-KR/EUC-KR \ ++ ko_KR.UTF-8/UTF-8 \ +++ko_KR.EUC-KR/EUC-KR \ ++ kok_IN/UTF-8 \ ++ ks_IN/UTF-8 \ ++ ks_IN@devanagari/UTF-8 \ ++@@ -376,8 +376,8 @@ ++ raj_IN/UTF-8 \ ++ ro_RO.UTF-8/UTF-8 \ ++ ro_RO/ISO-8859-2 \ ++-ru_RU.KOI8-R/KOI8-R \ ++ ru_RU.UTF-8/UTF-8 \ +++ru_RU.KOI8-R/KOI8-R \ ++ ru_RU/ISO-8859-5 \ ++ ru_UA.UTF-8/UTF-8 \ ++ ru_UA/KOI8-U \ ++@@ -458,9 +458,9 @@ ++ uz_UZ@cyrillic/UTF-8 \ ++ ve_ZA/UTF-8 \ ++ vi_VN/UTF-8 \ +++wa_BE.UTF-8/UTF-8 \ ++ wa_BE/ISO-8859-1 \ ++ wa_BE@euro/ISO-8859-15 \ ++-wa_BE.UTF-8/UTF-8 \ ++ wae_CH/UTF-8 \ ++ wal_ET/UTF-8 \ ++ wo_SN/UTF-8 \ ++@@ -471,17 +471,17 @@ ++ yo_NG/UTF-8 \ ++ yue_HK/UTF-8 \ ++ yuw_PG/UTF-8 \ +++zh_CN.UTF-8/UTF-8 \ ++ zh_CN.GB18030/GB18030 \ ++ zh_CN.GBK/GBK \ ++-zh_CN.UTF-8/UTF-8 \ ++ zh_CN/GB2312 \ ++ zh_HK.UTF-8/UTF-8 \ ++ zh_HK/BIG5-HKSCS \ ++ zh_SG.UTF-8/UTF-8 \ ++ zh_SG.GBK/GBK \ ++ zh_SG/GB2312 \ ++-zh_TW.EUC-TW/EUC-TW \ ++ zh_TW.UTF-8/UTF-8 \ +++zh_TW.EUC-TW/EUC-TW \ ++ zh_TW/BIG5 \ ++ zu_ZA.UTF-8/UTF-8 \ ++ zu_ZA/ISO-8859-1 \ diff --cc debian/patches/localedata/submitted-es_MX-decimal_point.diff index 000000000,000000000..aeb0f7cbe new file mode 100644 --- /dev/null +++ b/debian/patches/localedata/submitted-es_MX-decimal_point.diff @@@ -1,0 -1,0 +1,20 @@@ ++2012-06-06 Aurelien Jarno ++ ++ * locales/es_MX (LC_MONETARY): Set mon_thousands_sep to space ++ ( ). ++ ++--- ++ localedata/locales/es_MX | 2 +- ++ 1 file changed, 1 insertion(+), 1 deletion(-) ++ ++--- a/localedata/locales/es_MX +++++ b/localedata/locales/es_MX ++@@ -66,7 +66,7 @@ ++ int_curr_symbol "MXN " ++ currency_symbol "$" ++ mon_decimal_point "." ++-mon_thousands_sep "," +++mon_thousands_sep " " ++ mon_grouping 3;3 ++ positive_sign "" ++ negative_sign "-" diff --cc debian/patches/localedata/supported.diff index 000000000,000000000..458cf15d6 new file mode 100644 --- /dev/null +++ b/debian/patches/localedata/supported.diff @@@ -1,0 -1,0 +1,57 @@@ ++# All lines beginning with `# DP:' are a description of the patch. ++# DP: Description: Add several locales to localedata.SUPPORTED ++# DP: - ru_RU.CP1251 was requested in #225516 ++# DP: - uz_UZ.UTF-8 was clearly missing, uz_UZ had no UTF-8 variant ++# DP: - da_DK.ISO-8859-15, en_GB.ISO-8859-15, en_US.ISO-8859-15, no_NO.UTF-8, ++# DP: no_NO and sv_SE.ISO-8859-15 are found in fedora-branch CVS branch. ++# DP: Related bugs: #225516 (ru_RU.CP1251) ++# DP: Dpatch author: Denis Barbier ++# DP: Upstream status: not submitted ++# DP: Date: 2006-01-10 ++ ++--- ++ localedata/SUPPORTED | 5 +++++ ++ 1 file changed, 5 insertions(+) ++ ++--- a/localedata/SUPPORTED +++++ b/localedata/SUPPORTED ++@@ -137,6 +137,7 @@ ++ en_DK/ISO-8859-1 \ ++ en_GB.UTF-8/UTF-8 \ ++ en_GB/ISO-8859-1 \ +++en_GB.ISO-8859-15/ISO-8859-15 \ ++ en_HK.UTF-8/UTF-8 \ ++ en_HK/ISO-8859-1 \ ++ en_IE.UTF-8/UTF-8 \ ++@@ -154,6 +155,7 @@ ++ en_SG/ISO-8859-1 \ ++ en_US.UTF-8/UTF-8 \ ++ en_US/ISO-8859-1 \ +++en_US.ISO-8859-15/ISO-8859-15 \ ++ en_ZA.UTF-8/UTF-8 \ ++ en_ZA/ISO-8859-1 \ ++ en_ZM/UTF-8 \ ++@@ -283,6 +285,7 @@ ++ kab_DZ/UTF-8 \ ++ kk_KZ.UTF-8/UTF-8 \ ++ kk_KZ/PT154 \ +++kk_KZ.RK1048/RK1048 \ ++ kl_GL.UTF-8/UTF-8 \ ++ kl_GL/ISO-8859-1 \ ++ km_KH/UTF-8 \ ++@@ -379,6 +382,7 @@ ++ ru_RU.UTF-8/UTF-8 \ ++ ru_RU.KOI8-R/KOI8-R \ ++ ru_RU/ISO-8859-5 \ +++ru_RU.CP1251/CP1251 \ ++ ru_UA.UTF-8/UTF-8 \ ++ ru_UA/KOI8-U \ ++ rw_RW/UTF-8 \ ++@@ -419,6 +423,7 @@ ++ sv_FI@euro/ISO-8859-15 \ ++ sv_SE.UTF-8/UTF-8 \ ++ sv_SE/ISO-8859-1 \ +++sv_SE.ISO-8859-15/ISO-8859-15 \ ++ sw_KE/UTF-8 \ ++ sw_TZ/UTF-8 \ ++ szl_PL/UTF-8 \ diff --cc debian/patches/localedata/tailor-iso14651_t1.diff index 000000000,000000000..4422f6c42 new file mode 100644 --- /dev/null +++ b/debian/patches/localedata/tailor-iso14651_t1.diff @@@ -1,0 -1,0 +1,2347 @@@ ++# All lines beginning with `# DP:' are a description of the patch. ++# DP: Description: Rewrite collation rules to include iso14651_t1 ++# DP: ar_SA cs_CZ et_EE hr_HR lt_LT pl_PL sl_SI tr_TR: not ++# DP: submitted yet. ++# DP: Related bugs: BZ664 BZ672 ++# DP: Dpatch author: Denis Barbier ++# DP: Patch author: Denis Barbier, Pablo Saratxaga ++# DP: Upstream status: BZ664 BZ672 ++# DP: Date: 2006-01-18 ++ ++2008-08-08 Aurelien Jarno ++ ++ Loosy update for glibc 2.8. ++ ++2007-05-25 Pierre Habouzit ++ ++ Loosy update for glibc 2.6. ++ ++2005-01-16 Denis Barbier ++ ++ [BZ #672] ++ Replace current collation rules by including iso14651_t1 and adding ++ extra rules if needed. There should be no noticeable changes in ++ sorted text. only ligatures and ignoreable characters have modified ++ weights. ++ * locales/da_DK: Likewise. ++ ++--- ++ localedata/locales/ar_SA | 219 ---- ++ localedata/locales/sl_SI | 2076 ----------------------------------------------- ++ 2 files changed, 25 insertions(+), 2270 deletions(-) ++ ++--- a/localedata/locales/ar_SA +++++ b/localedata/locales/ar_SA ++@@ -47,223 +47,8 @@ ++ % Set up the LC_COLLATE category ++ ++ LC_COLLATE ++- ++- ++-order_start forward; forward ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ; ++- ; ++- ; ++- ; ++- ; ++- ; ++- ; ++- ; ++- ; ++- ; ++- ; ++- ; ++- ; ++- ; ++- ; ++- ; ++- ; ++- ; ++- ; ++- ; ++- ; ++- ; ++- ; ++- ; ++- ; ++- ; ++- ; ++- ; ++- ; ++- ; ++- ; ++- ; ++- ; ++- ; ++- ; ++- ; ++- ; ++- ; ++- ; ++- ; ++- ; ++- ; ++- ; ++- ; ++- ; ++- ; ++- ; ++- ; ++- ; ++- ; ++- ; ++- ; ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- IGNORE ++- IGNORE ++- IGNORE ++- IGNORE ++- IGNORE ++- IGNORE ++- IGNORE ++- IGNORE ++- IGNORE ++-order_end ++- ++- +++% Copy the template from ISO/IEC 14651 +++copy "iso14651_t1" ++ END LC_COLLATE ++ ++ ++--- a/localedata/locales/sl_SI +++++ b/localedata/locales/sl_SI ++@@ -51,2067 +51,31 @@ ++ END LC_IDENTIFICATION ++ ++ LC_COLLATE +++copy "iso14651_t1" ++ ++-% Base collation scheme: 1994-03-22 +++collating-symbol +++collating-symbol +++collating-symbol ++ ++-% Ordering algorithm: ++-% 1. Spaces and hyphen (but not soft ++-% hyphen) before punctuation ++-% characters, punctuation characters ++-% before numbers, ++-% numbers before letters. ++-% 2. Letters with diacritical marks are ++-% members of equivalence classes ++-% 3. A distinction is made with regards ++-% to case as noted below. ++-% 4. Special characters are ignored ++-% when comparing letters, but then ++-% they are considered ++-% 5. The alphabets are sorted in order ++-% of first appearance in ISO 10646: ++-% Latin, Greek, Cyrillic, etc. ++-% ++-% According to Greek specifications, ++-% the steps 2. and 3. above are reversed ++-% for the Greek script +++reorder-after +++ ++ ++-% collating symbols +++reorder-after +++ ++ ++-% The collating symbol naming is ++-% mostly taken from ISO 10646-1, ++-% for example the case and accent ++-% names are from this standard. +++reorder-after +++ ++ ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol +++ ;;;IGNORE +++ ;;;IGNORE ++ ++-% and ++-% are for cases like Danish ++-% and Spanish being treated ++-% as one letter. +++ ;;;IGNORE +++ ;;;IGNORE ++ ++-% The ...... collating ++-% symbols have defined weights as ++-% the last character in a group of ++-% Latin letters. They are used ++-% to specify deltas by locales using ++-% a locale as the default ordering ++-% and by "replace-after" statements ++-% specifying the changed placement ++-% in an ordering of a character. +++ ;;;IGNORE +++ ;;;IGNORE ++ ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++- ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++-collating-symbol ++- ++-% letter;accent;case;specials ++- ++-order_start forward;backward/ ++- ;forward;position ++- ++-% or letters first: ++- ++- ++- ++- ++- ++- ++-% Accents: ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ++- ;;;IGNORE ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++-<"=> IGNORE;IGNORE;IGNORE;<"=> ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++-UNDEFINED IGNORE;IGNORE;IGNORE ++- ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ++- "";"";"";IGNORE ++- "";"";"";IGNORE ++- "";"";"";IGNORE ++- "";"";"";IGNORE ++- "";"";"";IGNORE ++- "";"";"";IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ++- "";"";"";IGNORE ++- "";"";"";IGNORE ++- "";"";"";IGNORE ++- "";"";"";IGNORE ++- "";"";"";IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ++- "";"";"";IGNORE ++- "";"";"";IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ++- "";"";"";IGNORE ++- "";"";"";IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ++- "";"";"";IGNORE ++- "";"";"";IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ++- ;;;IGNORE ++- ;;;IGNORE ++- ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ++- ;;;IGNORE ++- ;;;IGNORE ++- "";"";"";IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- "";"";"";IGNORE ++- "";"";"";IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ++- "";"";"";IGNORE ++- "";"";"";IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;;;IGNORE ++- ;IGNORE;IGNORE;IGNORE ++- ;IGNORE;IGNORE;IGNORE ++- ;IGNORE;IGNORE;IGNORE ++- ;IGNORE;IGNORE;IGNORE ++- ;IGNORE;IGNORE;IGNORE ++- ;IGNORE;IGNORE;IGNORE ++- ;IGNORE;IGNORE;IGNORE ++- ;IGNORE;IGNORE;IGNORE ++- ;IGNORE;IGNORE;IGNORE ++- ;IGNORE;IGNORE;IGNORE ++- ;IGNORE;IGNORE;IGNORE ++- ;IGNORE;IGNORE;IGNORE ++- ;IGNORE;IGNORE;IGNORE ++- ;IGNORE;IGNORE;IGNORE ++- ;IGNORE;IGNORE;IGNORE ++- ;IGNORE;IGNORE;IGNORE ++- ;IGNORE;IGNORE;IGNORE ++- ;IGNORE;IGNORE;IGNORE ++- ;IGNORE;IGNORE;IGNORE ++- ;IGNORE;IGNORE;IGNORE ++- ;IGNORE;IGNORE;IGNORE ++- ;IGNORE;IGNORE;IGNORE ++- ;IGNORE;IGNORE;IGNORE ++- ;IGNORE;IGNORE;IGNORE ++- ;IGNORE;IGNORE;IGNORE ++- ;IGNORE;IGNORE;IGNORE ++- ;IGNORE;IGNORE;IGNORE ++- ++-% Arabic collating ++- ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- IGNORE;IGNORE;IGNORE; ++- ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ++- IGNORE;IGNORE;;IGNORE ++- IGNORE;IGNORE;;IGNORE ++- IGNORE;IGNORE;;IGNORE ++- IGNORE;IGNORE;;IGNORE ++- IGNORE;IGNORE;;IGNORE ++- IGNORE;IGNORE;;IGNORE ++- IGNORE;IGNORE;;IGNORE ++- IGNORE;IGNORE;;IGNORE ++- IGNORE;IGNORE;;IGNORE ++- ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ++- "";"";"";IGNORE ++- "";"";"";IGNORE ++- "";"";"";IGNORE ++- "";"";"";IGNORE ++- "";"";"";IGNORE ++- "";"";"";IGNORE ++- "";"";"";IGNORE ++- "";"";"";IGNORE ++- ++-% katakana/hiragana sorting ++-% base is katakana, as this is present in most charsets ++-% normal before voiced before semi-voiced ++-% small vocals before normal vocals ++-% katakana before hiragana ++- ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ;;IGNORE;IGNORE ++- ++-order_end +++reorder-end ++ ++ END LC_COLLATE ++ diff --cc debian/patches/m68k/local-dwarf2-buildfix.diff index 000000000,000000000..b189bf911 new file mode 100644 --- /dev/null +++ b/debian/patches/m68k/local-dwarf2-buildfix.diff @@@ -1,0 -1,0 +1,39 @@@ ++# DP: Description: Adding empty m68k framestate.c not to build for dwarf2. ++# DP: Related bugs: ++# DP: Dpatch author: GOTO Masanori ++# DP: Patch author: GOTO Masanori ++# DP: Upstream status: Debian-Specific ++# DP: Status Details: m68k uses sjlj exceptions, not dwarf2 unwind. ++# DP: This patch adds empty framestate.c for m68k to avoid ++# DP: dwarf2 build failure. ++# DP: Date: 2003-07-19 (Update 2005-03-16 gotom) ++ ++2005-03-16 GOTO Masanori ++ ++ * sysdeps/m68k/unwind-pe.c: Update to fix compilation failure. ++ ++2003-07-19 GOTO Masanori ++ ++ * sysdeps/m68k/framestate.c: Add to fix compilation failure ++ with sjlj exception, suggested by Philip Blundell. ++ ++ ++--- ++ sysdeps/m68k/framestate.c | 2 ++ ++ sysdeps/m68k/unwind-pe.c | 6 ++++++ ++ 2 files changed, 8 insertions(+) ++ ++--- /dev/null +++++ b/sysdeps/m68k/unwind-pe.c ++@@ -0,0 +1,6 @@ +++#include +++#include +++ +++#define _LIBC_DEFINITIONS +++#define NO_BASE_OF_ENCODED_VALUE +++#include "unwind-pe.h" ++--- /dev/null +++++ b/sysdeps/m68k/framestate.c ++@@ -0,0 +1,2 @@ +++ +++ diff --cc debian/patches/m68k/local-reloc.diff index 000000000,000000000..3d25b1a29 new file mode 100644 --- /dev/null +++ b/debian/patches/m68k/local-reloc.diff @@@ -1,0 -1,0 +1,23 @@@ ++# DP: Description: binutils bug workaround ++# DP: Related bugs: #263601: m68k: workaround for binutils problem ++# DP: Dpatch author: Roman Zippel ++# DP: Patch author: Richard Zidlicky ++# DP: Upstream status: Debian-Specific ++# DP: Status Details: Actual fix is to modify m68k binutils. ++# DP: Date: 2004-08-09 ++ ++--- ++ sysdeps/m68k/dl-machine.h | 2 ++ ++ 1 file changed, 2 insertions(+) ++ ++--- a/sysdeps/m68k/dl-machine.h +++++ b/sysdeps/m68k/dl-machine.h ++@@ -312,6 +312,8 @@ ++ Elf32_Addr *const reloc_addr = (void *) (l_addr + reloc->r_offset); ++ if (ELF32_R_TYPE (reloc->r_info) == R_68K_JMP_SLOT) ++ *reloc_addr += l_addr; +++ else if (ELF32_R_TYPE (reloc->r_info) == R_68K_NONE) +++ return; ++ else ++ _dl_reloc_bad_type (map, ELF32_R_TYPE (reloc->r_info), 1); ++ } diff --cc debian/patches/m68k/submitted-gcc34-seccomment.diff index 000000000,000000000..59aad5185 new file mode 100644 --- /dev/null +++ b/debian/patches/m68k/submitted-gcc34-seccomment.diff @@@ -1,0 -1,0 +1,33 @@@ ++# DP: Description: Make glibc-2.3.5 compile with gcc-3.4/4.0 + binutils 2.16 ++# on m68k fixed by adding #APP. ++# DP: Related bugs: ++# DP: Dpatch author: GOTO Masanori ++# DP: Patch author: Andreas Schwab ++# DP: Upstream status: Pending ++# DP: Status Details: ++# DP: Date: 2005-08-03 ++ ++From: Andreas Schwab ++ ++--- ++ include/libc-symbols.h | 6 +++--- ++ 1 file changed, 3 insertions(+), 3 deletions(-) ++ ++--- a/include/libc-symbols.h +++++ b/include/libc-symbols.h ++@@ -162,12 +162,12 @@ ++ #define __make_section_unallocated(section_string) \ ++ asm (".section " section_string "\n\t.previous"); ++ ++-/* Tacking on "\n\t#" to the section name makes gcc put it's bogus +++/* Tacking on "\n#APP\n\t#" to the section name makes gcc put it's bogus ++ section attributes on what looks like a comment to the assembler. */ ++ #ifdef HAVE_SECTION_QUOTES ++-# define __sec_comment "\"\n\t#\"" +++# define __sec_comment "\"\n#APP\n\t#\"" ++ #else ++-# define __sec_comment "\n\t#" +++# define __sec_comment "\n#APP\n\t#" ++ #endif ++ #define link_warning(symbol, msg) \ ++ __make_section_unallocated (".gnu.warning." #symbol) \ diff --cc debian/patches/mips/submitted-rld_map.diff index 000000000,000000000..b26cb5df1 new file mode 100644 --- /dev/null +++ b/debian/patches/mips/submitted-rld_map.diff @@@ -1,0 -1,0 +1,21 @@@ ++2010-05-20 Aurelien Jarno ++ ++ * sysdeps/mips/dl-machine.h (ELF_MACHINE_DEBUG_SETUP): test for ++ RLD_MAP pointer before using it. ++ ++--- ++ sysdeps/mips/dl-machine.h | 3 ++- ++ 1 file changed, 2 insertions(+), 1 deletion(-) ++ ++--- a/sysdeps/mips/dl-machine.h +++++ b/sysdeps/mips/dl-machine.h ++@@ -68,7 +68,8 @@ ++ ptr += (l)->l_info[DT_MIPS (RLD_MAP_REL)]->d_un.d_val; \ ++ *(ElfW(Addr) *)ptr = (ElfW(Addr)) (r); \ ++ } \ ++- else if ((l)->l_info[DT_MIPS (RLD_MAP)]) \ +++ else if ((l)->l_info[DT_MIPS (RLD_MAP)] && \ +++ (l)->l_info[DT_MIPS (RLD_MAP)]->d_un.d_ptr) \ ++ *(ElfW(Addr) *)((l)->l_info[DT_MIPS (RLD_MAP)]->d_un.d_ptr) = \ ++ (ElfW(Addr)) (r); \ ++ } while (0) diff --cc debian/patches/powerpc/local-powerpc8xx-dcbz.diff index 000000000,000000000..199c92a3b new file mode 100644 --- /dev/null +++ b/debian/patches/powerpc/local-powerpc8xx-dcbz.diff @@@ -1,0 -1,0 +1,30 @@@ ++--- a/sysdeps/unix/sysv/linux/powerpc/dl-auxv.h +++++ b/sysdeps/unix/sysv/linux/powerpc/dl-auxv.h ++@@ -23,8 +23,25 @@ int GLRO(dl_cache_line_size); ++ #endif ++ ++ /* Scan the Aux Vector for the "Data Cache Block Size" entry and assign it ++- to dl_cache_line_size. */ ++-#define DL_PLATFORM_AUXV \ +++ to dl_cache_line_size. We have to detect 8xx processors, which +++ have buggy dcbz implementations that cannot report page faults +++ correctly. That requires reading SPR, which is a privileged +++ operation. Fortunately 2.2.18 and later emulates PowerPC mfspr +++ reads from the PVR register. */ +++#ifndef __powerpc64__ +++ #define DL_PLATFORM_AUXV \ +++ case AT_DCACHEBSIZE: \ +++ { \ +++ unsigned pvr = 0; \ +++ asm ("mfspr %0, 287" : "=r" (pvr)); \ +++ if ((pvr & 0xffff0000) == 0x00500000) \ +++ break; \ +++ } \ +++ GLRO(dl_cache_line_size) = av->a_un.a_val; \ +++ break; +++#else +++ #define DL_PLATFORM_AUXV \ ++ case AT_DCACHEBSIZE: \ ++ GLRO(dl_cache_line_size) = av->a_un.a_val; \ ++ break; +++#endif diff --cc debian/patches/riscv64/local-asin-acos-raise-invalid.diff index 000000000,000000000..df2c3fab1 new file mode 100644 --- /dev/null +++ b/debian/patches/riscv64/local-asin-acos-raise-invalid.diff @@@ -1,0 -1,0 +1,31 @@@ ++This workarounds GCC bug PR 95115 introduced in GCC 10. This is similar to ++what is done in the float version. ++ ++--- a/sysdeps/ieee754/dbl-64/e_asin.c +++++ b/sysdeps/ieee754/dbl-64/e_asin.c ++@@ -327,11 +327,7 @@ __ieee754_asin(double x){ ++ else ++ if (k>0x7ff00000 || (k == 0x7ff00000 && u.i[LOW_HALF] != 0)) return x + x; ++ else { ++- u.i[HIGH_HALF]=0x7ff00000; ++- v.i[HIGH_HALF]=0x7ff00000; ++- u.i[LOW_HALF]=0; ++- v.i[LOW_HALF]=0; ++- return u.x/v.x; /* NaN */ +++ return (x-x)/(x-x); /* NaN */ ++ } ++ } ++ #ifndef __ieee754_asin ++@@ -637,11 +633,7 @@ __ieee754_acos(double x) ++ else ++ if (k>0x7ff00000 || (k == 0x7ff00000 && u.i[LOW_HALF] != 0)) return x + x; ++ else { ++- u.i[HIGH_HALF]=0x7ff00000; ++- v.i[HIGH_HALF]=0x7ff00000; ++- u.i[LOW_HALF]=0; ++- v.i[LOW_HALF]=0; ++- return u.x/v.x; +++ return (x-x)/(x-x); ++ } ++ } ++ #ifndef __ieee754_acos diff --cc debian/patches/series index 000000000,000000000..2bb3ea151 new file mode 100644 --- /dev/null +++ b/debian/patches/series @@@ -1,0 -1,0 +1,179 @@@ ++git-updates.diff ++ ++locale/check-unknown-symbols.diff ++locale/locale-print-LANGUAGE.diff ++locale/LC_IDENTIFICATION-optional-fields.diff ++localedata/sort-UTF8-first.diff ++localedata/supported.diff ++localedata/locale-eu_FR.diff ++localedata/locale-ku_TR.diff ++localedata/fo_FO-date_fmt.diff ++localedata/locales-fr.diff ++localedata/locale-en_DK.diff ++localedata/locale-zh_TW.diff ++localedata/tailor-iso14651_t1.diff ++localedata/locale-C.diff ++localedata/submitted-es_MX-decimal_point.diff ++localedata/git-unicode-13-support.diff ++ ++alpha/local-gcc4.1.diff ++alpha/submitted-dl-support.diff ++alpha/local-string-functions.diff ++alpha/submitted-fts64.diff ++alpha/submitted-makecontext.diff ++ ++arm/local-sigaction.diff ++arm/unsubmitted-ldconfig-cache-abi.diff ++arm/local-soname-hack.diff ++arm/local-vfp-sysdeps.diff ++arm/unsubmitted-ldso-multilib.diff ++arm/local-arm-futex.diff ++ ++hppa/local-inlining.diff ++ ++hurd-i386/git-posix_openpt.diff ++hurd-i386/local-enable-ldconfig.diff ++hurd-i386/tg-sysvshm.diff ++hurd-i386/tg-thread-cancel.diff ++hurd-i386/tg-bigmem.diff ++hurd-i386/local-disable-ioctls.diff ++hurd-i386/tg-sendmsg-SCM_CREDS.diff ++hurd-i386/tg-mach-hurd-link.diff ++hurd-i386/local-ED.diff ++hurd-i386/local-madvise_warn.diff ++hurd-i386/git-hurdsig-SA_SIGINFO.diff ++hurd-i386/tg-hooks.diff ++hurd-i386/local-usr.diff ++hurd-i386/git-sbrk-end.diff ++hurd-i386/tg-ifaddrs_v6.diff ++hurd-i386/tg-EIEIO-fr.diff ++hurd-i386/tg-EGREGIOUS-fr.diff ++hurd-i386/unsubmitted-clock_t_centiseconds.diff ++hurd-i386/submitted-path_mounted.diff ++hurd-i386/git-sigstate_thread_reference.diff ++hurd-i386/submitted-bind_umask2.diff ++hurd-i386/tg-bootstrap.diff ++hurd-i386/local-mach_print.diff ++hurd-i386/tg-eintr.diff ++hurd-i386/tg-libc_rwlock_recursive.diff ++hurd-i386/local-no_unsupported_ioctls.diff ++hurd-i386/local-exec_filename.diff ++hurd-i386/git-fork-pthread_exit.diff ++hurd-i386/git-spin_lock.diff ++hurd-i386/git-barrier-1.diff ++hurd-i386/git-sem-intr.diff ++hurd-i386/git-register-atfork.diff ++hurd-i386/git-register-atfork2.diff ++hurd-i386/git-pthread_self.diff ++hurd-i386/git-trunc-times.diff ++hurd-i386/git-ss_init.diff ++hurd-i386/git-tst-udp.diff ++hurd-i386/git-pselect.diff ++hurd-i386/git-fexecve.diff ++hurd-i386/git-cond_destroy.diff ++hurd-i386/git-holes.diff ++hurd-i386/git-longjmp-onstack.diff ++hurd-i386/git-intr-msg-unwind.diff ++hurd-i386/git-strtol-test.diff ++hurd-i386/local-tls-ie-align.diff ++hurd-i386/git-fix-longjmp.diff ++hurd-i386/git-sched_sets.diff ++hurd-i386/git-pthread_atfork-hidden.diff ++hurd-i386/git-bsd4.3-ioctls.diff ++hurd-i386/git-clock-cputime.diff ++hurd-i386/git-raise.diff ++hurd-i386/git-WAIT.diff ++hurd-i386/git-pthread_link_tests.diff ++hurd-i386/git-libpthread_syms.diff ++hurd-i386/git-libpthread-nodelete.diff ++hurd-i386/git-cthreads.diff ++hurd-i386/git-cthreads-symbols.diff ++hurd-i386/git-libpthread_plt.diff ++hurd-i386/git-lll-initializer.diff ++hurd-i386/sysvshm-lll.diff ++hurd-i386/git-lll-ptr.diff ++hurd-i386/git-ld-library-path-checks.diff ++hurd-i386/git-lll-wait-intr.diff ++hurd-i386/git-lll-private.diff ++hurd-i386/git-futex-internal.diff ++hurd-i386/git-libc-open.diff ++hurd-i386/git-pthread_get_cleanup_stack.diff ++hurd-i386/git-libpthread-testcancel.diff ++hurd-i386/git-SEM_VALUE_MAX.diff ++hurd-i386/git-sem-pshared.diff ++hurd-i386/git-sem-open-init.diff ++hurd-i386/git-sem-open.diff ++hurd-i386/git-siginfo_uesp.diff ++hurd-i386/git-mmap-EINVAL.diff ++hurd-i386/git-waitid.diff ++hurd-i386/git-hurd-version.diff ++hurd-i386/git-mmap_addr.diff ++hurd-i386/git-tiocflush.diff ++ ++i386/local-biarch.diff ++i386/unsubmitted-quiet-ldconfig.diff ++ ++riscv64/local-asin-acos-raise-invalid.diff ++ ++kfreebsd/submitted-waitid.diff ++kfreebsd/submitted-auxv.diff ++kfreebsd/local-config_h_in.patch ++kfreebsd/local-grantpt.diff ++kfreebsd/local-sysdeps.diff ++kfreebsd/local-fbtl.diff ++kfreebsd/local-fbtl-depends.diff ++kfreebsd/local-scripts.diff ++kfreebsd/local-getaddrinfo-freebsd-kernel.diff ++kfreebsd/local-no-execfn.diff ++ ++m68k/local-dwarf2-buildfix.diff ++m68k/local-reloc.diff ++m68k/submitted-gcc34-seccomment.diff ++ ++mips/submitted-rld_map.diff ++ ++powerpc/local-powerpc8xx-dcbz.diff ++ ++sh4/local-fpscr_values.diff ++ ++all/local-alias-et_EE.diff ++all/local-remove-manual.diff ++all/local-ru_RU.diff ++all/local-ldd.diff ++all/local-nis-shadow.diff ++all/submitted-po-fr-fixes.diff ++ ++any/local-asserth-decls.diff ++any/local-bindresvport_blacklist.diff ++any/local-fhs-linux-paths.diff ++any/local-fhs-nscd.diff ++any/local-ld-multiarch.diff ++any/local-ldso-disable-hwcap.diff ++any/local-nss-upgrade.diff ++any/local-stubs_h.diff ++any/local-tcsetaddr.diff ++any/local-nss-overflow.diff ++any/submitted-missing-etc-hosts.diff ++any/submitted-bits-fcntl_h-at.diff ++any/submitted-nptl-invalid-td.patch ++any/local-ldconfig-multiarch.diff ++any/local-disable-libnss-db.diff ++any/local-revert-bz13979.diff ++any/unsubmitted-ldso-machine-mismatch.diff ++any/local-ldconfig-ignore-ld.so.diff ++any/local-bootstrap-headers.diff ++any/submitted-resolv-unaligned.diff ++any/local-cudacc-float128.diff ++any/submitted-ld.so-cache-new-format.diff ++any/local-test-install.diff ++any/git-surplus-tls-accounting.diff ++any/git-ld.so-cache-endianness-markup.diff ++any/local-CVE-2021-33574-mq_notify-use-after-free.diff ++any/local-CVE-2023-4911.patch ++any/local-qsort-memory-corruption.patch ++any/local-CVE-2025-0395-1.diff ++any/local-CVE-2025-0395-2.diff ++any/local-CVE-2025-4802-1.diff ++any/local-CVE-2025-4802-2.diff ++any/local-CVE-2025-4802-3.diff ++any/local-CVE-2025-4802-4.diff diff --cc debian/patches/series.hurd-i386 index 000000000,000000000..e28716ac1 new file mode 100644 --- /dev/null +++ b/debian/patches/series.hurd-i386 @@@ -1,0 -1,0 +1,11 @@@ ++hurd-i386/submitted-net.diff ++hurd-i386/tg-bits_atomic.h_multiple_threads.diff ++hurd-i386/tg-unlockpt-chroot.diff ++hurd-i386/local-clock_gettime_MONOTONIC.diff ++hurd-i386/submitted-AF_LINK.diff ++hurd-i386/unsubmitted-mremap.diff ++hurd-i386/local-no-bootstrap-fs-access.diff ++hurd-i386/unsubmitted-prof-eintr.diff ++hurd-i386/tg-glibc-2.24-restore-malloc-hook.diff ++hurd-i386/unsubmitted-getaux_at_secure.diff ++hurd-i386/local-fix-nss.diff diff --cc debian/patches/series.kfreebsd-amd64 index 000000000,000000000..135b5e7d8 new file mode 100644 --- /dev/null +++ b/debian/patches/series.kfreebsd-amd64 @@@ -1,0 -1,0 +1,6 @@@ ++kfreebsd/local-memusage_no_mremap.diff ++kfreebsd/local-sys_queue_h.diff ++kfreebsd/local-undef-glibc.diff ++kfreebsd/local-initgroups-order.diff ++kfreebsd/local-tst-auxv.diff ++kfreebsd/local-tst-unique.diff diff --cc debian/patches/series.kfreebsd-i386 index 000000000,000000000..135b5e7d8 new file mode 100644 --- /dev/null +++ b/debian/patches/series.kfreebsd-i386 @@@ -1,0 -1,0 +1,6 @@@ ++kfreebsd/local-memusage_no_mremap.diff ++kfreebsd/local-sys_queue_h.diff ++kfreebsd/local-undef-glibc.diff ++kfreebsd/local-initgroups-order.diff ++kfreebsd/local-tst-auxv.diff ++kfreebsd/local-tst-unique.diff diff --cc debian/patches/sh4/local-fpscr_values.diff index 000000000,000000000..f2bbfd943 new file mode 100644 --- /dev/null +++ b/debian/patches/sh4/local-fpscr_values.diff @@@ -1,0 -1,0 +1,37 @@@ ++--- a/sysdeps/unix/sysv/linux/sh/sysdep.S +++++ b/sysdeps/unix/sysv/linux/sh/sysdep.S ++@@ -30,3 +30,14 @@ ++ ++ #define __syscall_error __syscall_error_1 ++ #include +++ +++ .data +++ .align 3 +++ .globl ___fpscr_values +++ .type ___fpscr_values, @object +++ .size ___fpscr_values, 8 +++___fpscr_values: +++ .long 0 +++ .long 0x80000 +++weak_alias (___fpscr_values, __fpscr_values) +++ ++--- a/sysdeps/unix/sysv/linux/sh/Versions +++++ b/sysdeps/unix/sysv/linux/sh/Versions ++@@ -2,6 +2,7 @@ ++ GLIBC_2.2 { ++ # functions used in other libraries ++ __xstat64; __fxstat64; __lxstat64; +++ __fpscr_values; ++ ++ # a* ++ alphasort64; ++--- a/sysdeps/unix/sysv/linux/sh/le/libc.abilist +++++ b/sysdeps/unix/sysv/linux/sh/le/libc.abilist ++@@ -267,6 +267,7 @@ ++ GLIBC_2.2 __flbf F ++ GLIBC_2.2 __fork F ++ GLIBC_2.2 __fpending F +++GLIBC_2.2 __fpscr_values D 0x8 ++ GLIBC_2.2 __fpu_control D 0x4 ++ GLIBC_2.2 __fpurge F ++ GLIBC_2.2 __freadable F diff --cc debian/po/POTFILES.in index 000000000,000000000..914f34509 new file mode 100644 --- /dev/null +++ b/debian/po/POTFILES.in @@@ -1,0 -1,0 +1,2 @@@ ++[type: gettext/rfc822deb] debhelper.in/locales.templates ++[type: gettext/rfc822deb] debhelper.in/libc.templates diff --cc debian/po/ar.po index 000000000,000000000..dbad7d86c new file mode 100644 --- /dev/null +++ b/debian/po/ar.po @@@ -1,0 -1,0 +1,255 @@@ ++# 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 , 2007, 2008. ++# Ossama Khayat , 2010. ++# ++msgid "" ++msgstr "" ++"Project-Id-Version: ar\n" ++"Report-Msgid-Bugs-To: glibc@packages.debian.org\n" ++"POT-Creation-Date: 2017-08-26 13:35+0200\n" ++"PO-Revision-Date: 2010-09-09 01:07+0300\n" ++"Last-Translator: Ossama Khayat \n" ++"Language-Team: Arabic \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 'invoke-rc.d " ++"start'." ++msgstr "" ++"عليك بتشغيل هذه الخدمات يدوياً بتنفيذ الأمر 'invoke-rc.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 "" ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:6001 ++msgid "Kernel must be upgraded" ++msgstr "" ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:6001 ++msgid "" ++"This version of the GNU libc requires kernel version ${kernel_ver} or " ++"later. Please upgrade your kernel before installing glibc." ++msgstr "" ++ ++#. Type: note ++#. Description ++#: ../debhelper.in/libc.templates:7001 ++msgid "Kernel version not supported" ++msgstr "" ++ ++#. Type: note ++#. Description ++#: ../debhelper.in/libc.templates:7001 ++msgid "" ++"This version of the GNU libc requires kernel version ${kernel_ver} or " ++"later. Older versions might work but are not officially supported by " ++"Debian. Please consider upgrading your kernel." ++msgstr "" diff --cc debian/po/ca.po index 000000000,000000000..0ca4c2ae2 new file mode 100644 --- /dev/null +++ b/debian/po/ca.po @@@ -1,0 -1,0 +1,266 @@@ ++# 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 , 2002, 2008, 2010. ++# Jordà Polo , 2007. ++# ++msgid "" ++msgstr "" ++"Project-Id-Version: 2.11.2-6\n" ++"Report-Msgid-Bugs-To: glibc@packages.debian.org\n" ++"POT-Creation-Date: 2017-08-26 13:35+0200\n" ++"PO-Revision-Date: 2010-10-23 11:57+0200\n" ++"Last-Translator: Jordi Mallach \n" ++"Language-Team: Catalan \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 'invoke-rc.d " ++"start'." ++msgstr "" ++"Haureu d'iniciar aquests serveis manualment executant «invoke-rc.d " ++"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 "" ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:6001 ++msgid "Kernel must be upgraded" ++msgstr "" ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:6001 ++msgid "" ++"This version of the GNU libc requires kernel version ${kernel_ver} or " ++"later. Please upgrade your kernel before installing glibc." ++msgstr "" ++ ++#. Type: note ++#. Description ++#: ../debhelper.in/libc.templates:7001 ++msgid "Kernel version not supported" ++msgstr "" ++ ++#. Type: note ++#. Description ++#: ../debhelper.in/libc.templates:7001 ++msgid "" ++"This version of the GNU libc requires kernel version ${kernel_ver} or " ++"later. Older versions might work but are not officially supported by " ++"Debian. Please consider upgrading your kernel." ++msgstr "" diff --cc debian/po/cs.po index 000000000,000000000..1c7561494 new file mode 100644 --- /dev/null +++ b/debian/po/cs.po @@@ -1,0 -1,0 +1,272 @@@ ++# ++# 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: glibc@packages.debian.org\n" ++"POT-Creation-Date: 2017-08-26 13:35+0200\n" ++"PO-Revision-Date: 2012-07-15 20:40+0200\n" ++"Last-Translator: Miroslav Kure \n" ++"Language-Team: Czech \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 'invoke-rc.d " ++"start'." ++msgstr "Budete je muset spustit ručně příkazem „invoke-rc.d 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í." ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:6001 ++msgid "Kernel must be upgraded" ++msgstr "" ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:6001 ++msgid "" ++"This version of the GNU libc requires kernel version ${kernel_ver} or " ++"later. Please upgrade your kernel before installing glibc." ++msgstr "" ++ ++#. Type: note ++#. Description ++#: ../debhelper.in/libc.templates:7001 ++msgid "Kernel version not supported" ++msgstr "" ++ ++#. Type: note ++#. Description ++#: ../debhelper.in/libc.templates:7001 ++msgid "" ++"This version of the GNU libc requires kernel version ${kernel_ver} or " ++"later. Older versions might work but are not officially supported by " ++"Debian. Please consider upgrading your kernel." ++msgstr "" diff --cc debian/po/da.po index 000000000,000000000..872707892 new file mode 100644 --- /dev/null +++ b/debian/po/da.po @@@ -1,0 -1,0 +1,273 @@@ ++# Danish translation glibc. ++# Copyright (C) 2019 glibc & nedenstående oversættere. ++# This file is distributed under the same license as the glibc package. ++# Morten Brix Pedersen . 2006. ++# Joe Hansen , 2010, 2012, 2016, 2019. ++# ++msgid "" ++msgstr "" ++"Project-Id-Version: glibc\n" ++"Report-Msgid-Bugs-To: glibc@packages.debian.org\n" ++"POT-Creation-Date: 2017-08-26 13:35+0200\n" ++"PO-Revision-Date: 2019-02-23 14:04+0200\n" ++"Last-Translator: Joe Hansen \n" ++"Language-Team: Danish \n" ++"Language: da\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 'invoke-rc.d " ++"start'." ++msgstr "" ++"Du skal genstarte disse manuelt ved at køre »invoke-rc.d 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." ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:6001 ++msgid "Kernel must be upgraded" ++msgstr "Kerne skal opgraderes" ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:6001 ++msgid "" ++"This version of the GNU libc requires kernel version ${kernel_ver} or " ++"later. Please upgrade your kernel before installing glibc." ++msgstr "" ++"Denne version af GNU libc kræver kerneversionen ${kernel_ver} eller senere. " ++"Opgrader venligst din kerne før installation af glibc." ++ ++#. Type: note ++#. Description ++#: ../debhelper.in/libc.templates:7001 ++msgid "Kernel version not supported" ++msgstr "Kerneversion er ikke understøttet" ++ ++#. Type: note ++#. Description ++#: ../debhelper.in/libc.templates:7001 ++msgid "" ++"This version of the GNU libc requires kernel version ${kernel_ver} or " ++"later. Older versions might work but are not officially supported by " ++"Debian. Please consider upgrading your kernel." ++msgstr "" ++"Denne version af GNU libc kræver kerneversionen ${kernel_ver} eller senere. " ++"Ældre versioner kan fungere men er ikke officielt understøttet af Debian. " ++"Overvej at opgradere din kerne." diff --cc debian/po/de.po index 000000000,000000000..13b956293 new file mode 100644 --- /dev/null +++ b/debian/po/de.po @@@ -1,0 -1,0 +1,279 @@@ ++# Translation of glibc debconf templates to German ++# Copyright (C) Helge Kreutzmann , 2006-2009, 2011, 2016, 2017. ++# This file is distributed under the same license as the glibc package. ++# ++msgid "" ++msgstr "" ++"Project-Id-Version: glibc 2.24-17\n" ++"Report-Msgid-Bugs-To: glibc@packages.debian.org\n" ++"POT-Creation-Date: 2017-06-13 22:11+0200\n" ++"PO-Revision-Date: 2017-09-30 10:35+0200\n" ++"Last-Translator: Helge Kreutzmann \n" ++"Language-Team: de \n" ++"Language: German\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 Locales" ++ ++#. Type: multiselect ++#. Description ++#: ../debhelper.in/locales.templates:1002 ++msgid "Locales to be generated:" ++msgstr "Zu generierende Locales (»Standorteinstellungen«):" ++ ++#. 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 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 Locales erzeugt werden sollen. UTF-8-Locales " ++"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 Locales, um Text in der für die Benutzer " ++"korrekten Sprache anzuzeigen. Sie können aus den generierten Locales 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 'invoke-rc.d " ++"start'." ++msgstr "" ++"Sie müssen diese manuell starten, indem Sie »invoke-rc.d 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 dieser Fragen bei jedem Upgrade " ++"von Bibliotheken vermieden." ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:6001 ++msgid "Kernel must be upgraded" ++msgstr "Kernel muss aktualisiert werden." ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:6001 ++msgid "" ++"This version of the GNU libc requires kernel version ${kernel_ver} or " ++"later. Please upgrade your kernel before installing glibc." ++msgstr "" ++"Diese Version der GNU-Libc benötigt Kernel Version ${kernel_ver} oder neuer. " ++"Bitte führen Sie vor der Installation der Glibc ein Upgrade durch." ++ ++#. Type: note ++#. Description ++#: ../debhelper.in/libc.templates:7001 ++msgid "Kernel version not supported" ++msgstr "Kernelversion wird nicht unterstützt" ++ ++#. Type: note ++#. Description ++#: ../debhelper.in/libc.templates:7001 ++msgid "" ++"This version of the GNU libc requires kernel version ${kernel_ver} or " ++"later. Older versions might work but are not officially supported by " ++"Debian. Please consider upgrading your kernel." ++msgstr "" ++"Diese Version der GNU-Libc benötigt Kernel Version ${kernel_ver} oder neuer. " ++"Ältere Versionen können funktionieren, werden aber nicht offiziell " ++"durch Debian unterstützt. Bitte prüfen Sie ein Upgrade Ihres Kernels." diff --cc debian/po/el.po index 000000000,000000000..3107d7f86 new file mode 100644 --- /dev/null +++ b/debian/po/el.po @@@ -1,0 -1,0 +1,295 @@@ ++# 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 , 2004. ++# Vangelis Skarmoutsos , 2017. ++# ++msgid "" ++msgstr "" ++"Project-Id-Version: el\n" ++"Report-Msgid-Bugs-To: glibc@packages.debian.org\n" ++"POT-Creation-Date: 2017-08-26 13:35+0200\n" ++"PO-Revision-Date: 2017-07-06 21:00+0300\n" ++"Last-Translator: Vangelis Skarmoutsos \n" ++"Language-Team: Greek \n" ++"Language: el\n" ++"MIME-Version: 1.0\n" ++"Content-Type: text/plain; charset=UTF-8\n" ++"Content-Transfer-Encoding: 8bit\n" ++"X-Generator: Poedit 2.0.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 "Θέλετε να αναβαθμίσετε το glib τώρα;" ++ ++#. 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 - γιατί η αυτόματη " ++"επανεκκίνηση μπορεί να σας αποσυνδέσει από την ενεργή συνεδρία Χ11." ++ ++#. 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 'invoke-rc.d " ++"start'." ++msgstr "" ++"Θα χρειαστεί να τις εκκινήστε χειροκίνητα τρέχοντας 'invoke-rc.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. Καθώς αυτές οι επανεκκινήσεις μπορούν να " ++"προκαλέσουν διακοπές των υπηρεσιών του συστήματος, φυσιολογικά θα ερωτηθείτε " ++"σε κάθε αναβάθμιση για την λίστα των υπηρεσιών που επιθυμείτε να " ++"επανεκκινήσετε. Μπορείτε να διαλέξετε αυτή την επιλογή για να αποφύγετε να " ++"ερωτηθείτε και έτσι όλες οι απαραίτητες επανεκκινήσεις θα γίνουν αυτόματα " ++"ώστε να αποφύγετε τις ερωτήσεις για κάθε αναβάθμιση βιβλιοθήκης." ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:6001 ++msgid "Kernel must be upgraded" ++msgstr "Ο πυρήνας πρέπει να αναβαθμιστεί" ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:6001 ++msgid "" ++"This version of the GNU libc requires kernel version ${kernel_ver} or " ++"later. Please upgrade your kernel before installing glibc." ++msgstr "" ++"Αυτή η έκδοση του GNU libc απαιτεί πυρήνα έκδοσης ${kernel_ver} ή νεότερο. " ++"Παρακαλώ αναβαθμίστε τον πυρήνα σας πριν εγκαταστήσετε το glibc." ++ ++#. Type: note ++#. Description ++#: ../debhelper.in/libc.templates:7001 ++msgid "Kernel version not supported" ++msgstr "Η έκδοση του πυρήνα δεν υποστηρίζεται" ++ ++#. Type: note ++#. Description ++#: ../debhelper.in/libc.templates:7001 ++msgid "" ++"This version of the GNU libc requires kernel version ${kernel_ver} or " ++"later. Older versions might work but are not officially supported by " ++"Debian. Please consider upgrading your kernel." ++msgstr "" ++"Αυτή η έκδοση του GNU libc απαιτεί πυρήνα έκδοσης ${kernel_ver} ή νεότερο. " ++"Οι παλαιότερες εκδόσεις ίσως λειτουργήσουν αλλά δεν υποστηρίζονται επίσημα " ++"από το Debian. Παρακαλώ σκεφτείτε να αναβαθμίσετε τον πυρήνα σας." diff --cc debian/po/es.po index 000000000,000000000..0dde0e332 new file mode 100644 --- /dev/null +++ b/debian/po/es.po @@@ -1,0 -1,0 +1,304 @@@ ++# 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 , 2003 ++# ++# - Updates ++# Carlos Valdivia Yagüe , 2006, 2007, 2008 ++# Omar Campagne 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: glibc@packages.debian.org\n" ++"POT-Creation-Date: 2017-08-26 13:35+0200\n" ++"PO-Revision-Date: 2012-01-14 11:44+0100\n" ++"Last-Translator: Omar Campagne \n" ++"Language-Team: Debian L10n Spanish \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 'invoke-rc.d " ++"start'." ++msgstr "" ++"Tendrá que iniciarlos manualmente ejecutando «invoke-rc.d 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." ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:6001 ++msgid "Kernel must be upgraded" ++msgstr "" ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:6001 ++msgid "" ++"This version of the GNU libc requires kernel version ${kernel_ver} or " ++"later. Please upgrade your kernel before installing glibc." ++msgstr "" ++ ++#. Type: note ++#. Description ++#: ../debhelper.in/libc.templates:7001 ++msgid "Kernel version not supported" ++msgstr "" ++ ++#. Type: note ++#. Description ++#: ../debhelper.in/libc.templates:7001 ++msgid "" ++"This version of the GNU libc requires kernel version ${kernel_ver} or " ++"later. Older versions might work but are not officially supported by " ++"Debian. Please consider upgrading your kernel." ++msgstr "" diff --cc debian/po/eu.po index 000000000,000000000..3f14d4961 new file mode 100644 --- /dev/null +++ b/debian/po/eu.po @@@ -1,0 -1,0 +1,263 @@@ ++# translation of glibc 2.6.1-3 debconf to basque ++# Piarres Beobide , 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: glibc@packages.debian.org\n" ++"POT-Creation-Date: 2017-08-26 13:35+0200\n" ++"PO-Revision-Date: 2007-09-11 09:57+0100\n" ++"Last-Translator: Piarres Beobide \n" ++"Language-Team: librezale \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 'invoke-rc.d " ++"start'." ++msgstr "" ++"Hauek eskuz abiarazi beharko dituzu 'invoke-rc.d 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 "" ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:6001 ++msgid "Kernel must be upgraded" ++msgstr "" ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:6001 ++msgid "" ++"This version of the GNU libc requires kernel version ${kernel_ver} or " ++"later. Please upgrade your kernel before installing glibc." ++msgstr "" ++ ++#. Type: note ++#. Description ++#: ../debhelper.in/libc.templates:7001 ++msgid "Kernel version not supported" ++msgstr "" ++ ++#. Type: note ++#. Description ++#: ../debhelper.in/libc.templates:7001 ++msgid "" ++"This version of the GNU libc requires kernel version ${kernel_ver} or " ++"later. Older versions might work but are not officially supported by " ++"Debian. Please consider upgrading your kernel." ++msgstr "" diff --cc debian/po/fi.po index 000000000,000000000..3a02ec658 new file mode 100644 --- /dev/null +++ b/debian/po/fi.po @@@ -1,0 -1,0 +1,282 @@@ ++# ++# 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: glibc@packages.debian.org\n" ++"POT-Creation-Date: 2017-08-26 13:35+0200\n" ++"PO-Revision-Date: 2014-06-04 20:45+0200\n" ++"Last-Translator: Esko Arajärvi \n" ++"Language-Team: Finnish \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 "Luotavat 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ä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 hakuja " ++"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-istuntosi." ++ ++#. 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 haluat keskeyttää päivityksen 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 hakuja " ++"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 'invoke-rc.d " ++"start'." ++msgstr "" ++"Nämä palvelut tulee käynnistää käsin ajamalla ”invoke-rc.d start”." ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:4001 ++msgid "xscreensaver and xlockmore must be restarted before upgrading" ++msgstr "xscreensaver ja xlockmore täytyy käynnistää uudelleen ennen päivitystä" ++ ++#. 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 "" ++"Järjestelmässä on ajossa yksi tai useampia xscreensaverin tai xlockmoren " ++"instansseja. Johtuen epäyhteensopivista muutoksista ohjelmakirjastoissa GNU " ++"libc:n päivityksen jälkeen et voi tunnistautua käyttäen näitä ohjelmia. " ++"Ohjelmat tulisi käynnistää uudelleen tai pysäyttää ennen päivityksen " ++"jatkamista, jotta käyttäjät eivät jää lukituiksi ulos sessioistaan. " ++ ++#. Type: boolean ++#. Description ++#: ../debhelper.in/libc.templates:5001 ++msgid "Restart services during package upgrades without asking?" ++msgstr "" ++"Käynnistetäänkö palvelut kysymättä uudelleen pakettien päivityksen " ++"yhteydessä?" ++ ++#. 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 "" ++"Järjestelmässäsi on asennettuna palveluita, jotka tulee käynnistää uudelleen " ++"päivitettäessä tiettyjä ohjelmakirjastoja, kuten libpam, libc ja libssl. " ++"Koska palveluiden uudelleenkäynnistys saattaa aiheuttaa katkoja palveluihin, " ++"kunkin päivityksen yhteydessä yleensä kysytään luetteloa käynnistettävistä " ++"palveluista. Voit valita tämän vaihtoehdon, jos et halua nähdä kysymystä " ++"jokaisen kirjastopäivityksen yhteydessä. Tällöin tarvittavat palvelut " ++"käynnistetään uudelleen automaattisesti." ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:6001 ++msgid "Kernel must be upgraded" ++msgstr "" ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:6001 ++msgid "" ++"This version of the GNU libc requires kernel version ${kernel_ver} or " ++"later. Please upgrade your kernel before installing glibc." ++msgstr "" ++ ++#. Type: note ++#. Description ++#: ../debhelper.in/libc.templates:7001 ++msgid "Kernel version not supported" ++msgstr "" ++ ++#. Type: note ++#. Description ++#: ../debhelper.in/libc.templates:7001 ++msgid "" ++"This version of the GNU libc requires kernel version ${kernel_ver} or " ++"later. Older versions might work but are not officially supported by " ++"Debian. Please consider upgrading your kernel." ++msgstr "" diff --cc debian/po/fr.po index 000000000,000000000..8c740dbb4 new file mode 100644 --- /dev/null +++ b/debian/po/fr.po @@@ -1,0 -1,0 +1,291 @@@ ++# Translation of glibc debconf templates to French ++# Copyright (C) 2001-2009, 2011, 2015, 2017 Debian French l10n team ++# This file is distributed under the same license as the glibc package. ++# ++# Translators: ++# Denis Barbier 2001-2006. ++# Christian Perrier , 2007, 2008, 2009, 2011, 2015. ++# Alban Vidal , 2017. ++msgid "" ++msgstr "" ++"Project-Id-Version: glibc 2.24-14\n" ++"Report-Msgid-Bugs-To: glibc@packages.debian.org\n" ++"POT-Creation-Date: 2017-08-26 13:35+0200\n" ++"PO-Revision-Date: 2017-08-04 14:44+0100\n" ++"Last-Translator: Alban Vidal \n" ++"Language-Team: French \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 2.0\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 à niveau 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 à niveau 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 à niveau 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 à niveau de la bibliothèque C 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 "" ++"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 lors de la mise à niveau 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 "" ++"Les services suivants n'ont pas pu être redémarrés lors de la mise à niveau " ++"de la bibliothèque C de GNU :" ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:3001 ++msgid "" ++"You will need to start these manually by running 'invoke-rc.d " ++"start'." ++msgstr "" ++"Il est nécessaire de les redémarrer vous-même avec la commande « invoke-rc.d " ++" 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 à niveau" ++ ++#. 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 de GNU 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 à niveau 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 à niveau. " ++"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 à " ++"niveau. Vous pouvez choisir ici que ce choix ne soit plus offert et que les " ++"redémarrages aient lieu systématiquement lors des mises à niveau de " ++"bibliothèques." ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:6001 ++msgid "Kernel must be upgraded" ++msgstr "Mise à niveau du noyau nécessaire" ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:6001 ++msgid "" ++"This version of the GNU libc requires kernel version ${kernel_ver} or " ++"later. Please upgrade your kernel before installing glibc." ++msgstr "" ++"Cette version de la bibliothèque C de GNU nécessite au minimum la " ++"version ${kernel_ver} du noyau. Veuillez mettre le noyau à niveau avant " ++"l'installation de glibc." ++ ++#. Type: note ++#. Description ++#: ../debhelper.in/libc.templates:7001 ++msgid "Kernel version not supported" ++msgstr "Version du noyau non gérée" ++ ++#. Type: note ++#. Description ++#: ../debhelper.in/libc.templates:7001 ++msgid "" ++"This version of the GNU libc requires kernel version ${kernel_ver} or " ++"later. Older versions might work but are not officially supported by " ++"Debian. Please consider upgrading your kernel." ++msgstr "" ++"Cette version de la bibliothèque C de GNU nécessite au minimum la " ++"version ${kernel_ver} du noyau. Des versions antérieures pourraient " ++"fonctionner, mais ne sont pas officiellement gérées par Debian. Veuillez " ++"prévoir la mise à niveau du noyau." diff --cc debian/po/gl.po index 000000000,000000000..d8e4558d4 new file mode 100644 --- /dev/null +++ b/debian/po/gl.po @@@ -1,0 -1,0 +1,264 @@@ ++# 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 , 2006, 2007, 2008. ++# Jorge Barreiro , 2010. ++msgid "" ++msgstr "" ++"Project-Id-Version: eglibc_2.11.2-2_gl\n" ++"Report-Msgid-Bugs-To: glibc@packages.debian.org\n" ++"POT-Creation-Date: 2017-08-26 13:35+0200\n" ++"PO-Revision-Date: 2010-08-13 01:43+0200\n" ++"Last-Translator: Jorge Barreiro \n" ++"Language-Team: Galician \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 'invoke-rc.d " ++"start'." ++msgstr "" ++"Ha ter que reinicialos manualmente executando \"invoke-rc.d 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 "" ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:6001 ++msgid "Kernel must be upgraded" ++msgstr "" ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:6001 ++msgid "" ++"This version of the GNU libc requires kernel version ${kernel_ver} or " ++"later. Please upgrade your kernel before installing glibc." ++msgstr "" ++ ++#. Type: note ++#. Description ++#: ../debhelper.in/libc.templates:7001 ++msgid "Kernel version not supported" ++msgstr "" ++ ++#. Type: note ++#. Description ++#: ../debhelper.in/libc.templates:7001 ++msgid "" ++"This version of the GNU libc requires kernel version ${kernel_ver} or " ++"later. Older versions might work but are not officially supported by " ++"Debian. Please consider upgrading your kernel." ++msgstr "" diff --cc debian/po/hu.po index 000000000,000000000..d8451c48b new file mode 100644 --- /dev/null +++ b/debian/po/hu.po @@@ -1,0 -1,0 +1,270 @@@ ++# SZERVÁC Attila , ++# Dr. Nagy Elemér Károly , 2013. ++# ++msgid "" ++msgstr "" ++"Project-Id-Version: glibc\n" ++"Report-Msgid-Bugs-To: glibc@packages.debian.org\n" ++"POT-Creation-Date: 2017-08-26 13:35+0200\n" ++"PO-Revision-Date: 2013-05-14 18:47+0200\n" ++"Last-Translator: Dr. Nagy Elemér Károly \n" ++"Language-Team: Hungarian \n" ++"Language: \n" ++"MIME-Version: 1.0\n" ++"Content-Type: text/plain; charset=UTF-8\n" ++"Content-Transfer-Encoding: UTF-8\n" ++"Plural-Forms: ???\n" ++"X-Poedit-Language: Hungarian\n" ++"X-Poedit-Country: HUNGARY\n" ++ ++#. Type: multiselect ++#. Choices ++#: ../debhelper.in/locales.templates:1001 ++msgid "All locales" ++msgstr "Minden nyelvi beállítás" ++ ++#. Type: multiselect ++#. Description ++#: ../debhelper.in/locales.templates:1002 ++msgid "Locales to be generated:" ++msgstr "Létrehozandó nyelvi 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 nyelvi 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 nyelvi beállításokat hozzunk létre. UTF-8 nyelvi " ++"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 nyelvi 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 nyelvi 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 "Akarod most frissíteni a glibc-t?" ++ ++#. 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 "" ++"Azokat a szolgáltatásokat és programokat, amelyek az NSS-t használják, újra " ++"kell indítani, különben előfordulhat, hogy nem tudnak keresni vagy " ++"bejelentkezni. A telepítő folyamat képes némelyik szolgáltatást (pl. ssh, " ++"telnetd) újraindítani, de némelyiket nem lehet automatikusan újraindítani. " ++"Egy program az xdm - ezt neked kell leállítanod és újraindítanod mert az " ++"automatikus újraindítás kidobhatna a grafikus felületről." ++ ++#. 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 "" ++"A program a következő, a frissítés előtt leállítandó telepített " ++"szolgáltatásokat észlelte: ${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 "" ++"Ha most meg akarod szakítani a frissítést és később folytatni, válaszolj " ++"nemmel az alábbi kérdésre." ++ ++#. Type: string ++#. Description ++#: ../debhelper.in/libc.templates:2001 ++msgid "Services to restart for GNU libc library upgrade:" ++msgstr "A GNU libc könyvtár frissítéséhez újraindítandó szolgáltatások:" ++ ++#. 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 "" ++"Azokat a szolgáltatásokat és programokat, amelyek az NSS-t használják, újra " ++"kell indítani, különben előfordulhat, hogy nem tudnak keresni vagy " ++"bejelentkezni (az ssh szolgáltatás esetén például előfordulhat, hogy leáll a " ++"bejelentkezés). Kérlek ellenőrizd ezt a szóközzel tagolt listát, ami az " ++"újraindítandó szolgáltatások init.d scriptjeit tartalmazza, és ha szükséges, " ++"javítsd ki." ++ ++#. Type: string ++#. Description ++#: ../debhelper.in/libc.templates:2001 ++msgid "" ++"Note: restarting sshd/telnetd should not affect any existing connections." ++msgstr "" ++"Egy apróság: az sshd/telnetd újraindítása elvileg nem érinti a létező " ++"kapcsolatokat." ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:3001 ++msgid "Failure restarting some services for GNU libc upgrade" ++msgstr "" ++"Nem sikerült újraindítani némelyik szolgáltatást a GNU libc frissítésekor" ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:3001 ++msgid "" ++"The following services could not be restarted for the GNU libc library " ++"upgrade:" ++msgstr "" ++"A következő szolgáltatásokat nem sikerült újraindítania GNU libc " ++"frissítésekor:" ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:3001 ++msgid "" ++"You will need to start these manually by running 'invoke-rc.d " ++"start'." ++msgstr "" ++"Ezeket neked kell újraindítanod a 'invoke-rc.d start' parancs " ++"futtatásával." ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:4001 ++msgid "xscreensaver and xlockmore must be restarted before upgrading" ++msgstr "Frissítés előtt újra kell indítani az xscreensaver-t és a xlockmore-t" ++ ++#. 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 "" ++"Egy vagy több futó xscreensaver-t vagy xlockmore-t észleltem a rendszeren. " ++"Inkompatibilis könyvtár változások miatt a GNU libc könyvtár frissítése után " ++"ezek a programok nem tudnak majd bejelentkezni. Ezért állítsd le vagy " ++"indítsd újra ezeket mielőtt folytatod a frissítést, különben kizárhatod a " ++"felhasználóikat a jelenlegi munkamenet." ++ ++#. Type: boolean ++#. Description ++#: ../debhelper.in/libc.templates:5001 ++msgid "Restart services during package upgrades without asking?" ++msgstr "A csomag frissítésekor kérdés nélkül újraindítsam a szolgáltatásokat?" ++ ++#. 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 "" ++"Ezen a rendszeren olyan szolgáltatások vannak telepítve, amelyeket újra kell " ++"indítani, bizonyos könyvtárak (mint a libpam, libc, libssl) frissítésekor. " ++"Mivel ezek az újraindítások megszakítják a szolgáltatásokat, alapesetben " ++"minden frissítésnél megkérdezi az újraindítandó szolgáltatások listáját a " ++"rendszer. Dönthetsz úgy, hogy ne kérdezzen - ilyenkor minden szükséges " ++"szolgáltatás-újraindítást elvégez a rendszer és nem kérdezget." ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:6001 ++msgid "Kernel must be upgraded" ++msgstr "" ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:6001 ++msgid "" ++"This version of the GNU libc requires kernel version ${kernel_ver} or " ++"later. Please upgrade your kernel before installing glibc." ++msgstr "" ++ ++#. Type: note ++#. Description ++#: ../debhelper.in/libc.templates:7001 ++msgid "Kernel version not supported" ++msgstr "" ++ ++#. Type: note ++#. Description ++#: ../debhelper.in/libc.templates:7001 ++msgid "" ++"This version of the GNU libc requires kernel version ${kernel_ver} or " ++"later. Older versions might work but are not officially supported by " ++"Debian. Please consider upgrading your kernel." ++msgstr "" diff --cc debian/po/it.po index 000000000,000000000..fea7a1448 new file mode 100644 --- /dev/null +++ b/debian/po/it.po @@@ -1,0 -1,0 +1,277 @@@ ++# Italian (it) translation of debconf templates for glibc ++# This file is distributed under the same license as the glibc package. ++# Luca Monducci , 2005-2020. ++# ++msgid "" ++msgstr "" ++"Project-Id-Version: glibc 2.31 debconf templates\n" ++"Report-Msgid-Bugs-To: glibc@packages.debian.org\n" ++"POT-Creation-Date: 2017-08-26 13:35+0200\n" ++"PO-Revision-Date: 2020-08-29 14:41+0200\n" ++"Last-Translator: Luca Monducci \n" ++"Language-Team: Italian \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 passare da una lingua a " ++"un'altra 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. È opportuno scegliere i «locale» UTF-8, " ++"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 alcuni utenti non parlano la lingua predefinita, " ++"quegli utenti 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 l'aggiornamento di glibc è xdm perché il riavvio " ++"automatico potrebbe disconnettere la propria sessione X11 attiva." ++ ++#. 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 già " ++"attive." ++ ++#. 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 'invoke-rc.d " ++"start'." ++msgstr "È necessario avviarli manualmente con «invoke-rc.d 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 chiudere fuori dalla " ++"propria sessione degli utenti connessi." ++ ++#. Type: boolean ++#. Description ++#: ../debhelper.in/libc.templates:5001 ++msgid "Restart services during package upgrades without asking?" ++msgstr "Riavviare i servizi durante l'aggiornamento senza chiedere conferma?" ++ ++#. 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 "" ++"Sul proprio sistema sono installati dei servizi che devono essere riavviati " ++"dopo l'aggiornamento di determinate librerie, quali libpam, libc e libssl. " ++"Poiché questi riavvii possono causare delle interruzioni dei servizi offerti " ++"dal sistema normalmente, a ogni aggiornamento, viene mostrato l'elenco dei " ++"servizi e viene chiesto di confermarne il riavvio. È possibile evitare che " ++"sia chiesta la conferma del riavvio accettando questa opzione; saranno " ++"effettuati automaticamente tutti i riavvii necessari senza fare domande per " ++"ogni aggiornamento della libreria." ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:6001 ++msgid "Kernel must be upgraded" ++msgstr "È necessario aggiornare il kernel" ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:6001 ++msgid "" ++"This version of the GNU libc requires kernel version ${kernel_ver} or " ++"later. Please upgrade your kernel before installing glibc." ++msgstr "" ++"Questa versione di GNU libc richiede che la versione del kernel sia " ++"${kernel_ver} o successiva. Aggiornare il kernel prima di installare " ++"glibc." ++ ++#. Type: note ++#. Description ++#: ../debhelper.in/libc.templates:7001 ++msgid "Kernel version not supported" ++msgstr "Versione del kernel non supportata" ++ ++#. Type: note ++#. Description ++#: ../debhelper.in/libc.templates:7001 ++msgid "" ++"This version of the GNU libc requires kernel version ${kernel_ver} or " ++"later. Older versions might work but are not officially supported by " ++"Debian. Please consider upgrading your kernel." ++msgstr "" ++"Questa versione di GNU libc richiede che la versione del kernel sia " ++"${kernel_ver} o successiva. Potrebbe funzionare anche con le versioni " ++"precedenti ma non sono ufficialmente supportate da Debian. Si raccomanda " ++"di aggiornare il kernel." diff --cc debian/po/ja.po index 000000000,000000000..a35160b0a new file mode 100644 --- /dev/null +++ b/debian/po/ja.po @@@ -1,0 -1,0 +1,291 @@@ ++# Kenshi Muto , 2007 ++# GOTO Masanori , -2007 ++# Nobuhiro Iwamatsu , 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. ++# Takuma Yamada , 2016. ++# ++msgid "" ++msgstr "" ++"Project-Id-Version: eglibc_2.13-38\n" ++"Report-Msgid-Bugs-To: glibc@packages.debian.org\n" ++"POT-Creation-Date: 2017-08-26 13:35+0200\n" ++"PO-Revision-Date: 2016-02-25 13:03+0900\n" ++"Last-Translator: Takuma Yamada \n" ++"Language-Team: Japanese \n" ++"Language: ja\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: Gtranslator 2.91.6\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 'invoke-rc.d " ++"start'." ++msgstr "" ++"'invoke-rc.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 "" ++"このシステムには、libpam や libc、libssl といった特定のライブラリがアップグ" ++"レードされたときに再起動を必要とするサービスがインストールされています。この" ++"再起動はそのシステムで動作しているサービスの中断を伴う可能性があるため、通常" ++"は再起動させるサービス一覧をアップグレードの度に質問します。このオプションを" ++"選択するとその質問を避けられます。代わりに、再起動が必要な場合は全て自動で再" ++"起動させるため、ライブラリをアップグレードする度に質問されるのを避けられま" ++"す。" ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:6001 ++msgid "Kernel must be upgraded" ++msgstr "カーネルをアップグレードする必要があります" ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:6001 ++msgid "" ++"This version of the GNU libc requires kernel version ${kernel_ver} or " ++"later. Please upgrade your kernel before installing glibc." ++msgstr "" ++"このバージョンの GNU libc はカーネルバージョン ${kernel_ver} 以降が必要です。" ++"glibc をインストールする前にカーネルをアップグレードしてください。" ++ ++#. Type: note ++#. Description ++#: ../debhelper.in/libc.templates:7001 ++msgid "Kernel version not supported" ++msgstr "カーネルバージョンがサポートされていません" ++ ++#. Type: note ++#. Description ++#: ../debhelper.in/libc.templates:7001 ++#, fuzzy ++#| msgid "" ++#| "This version of the GNU libc requires kernel version ${kernel_ver} or " ++#| "later. Older versions might work but are not officially supported. " ++#| "Please consider upgrading your kernel." ++msgid "" ++"This version of the GNU libc requires kernel version ${kernel_ver} or " ++"later. Older versions might work but are not officially supported by " ++"Debian. Please consider upgrading your kernel." ++msgstr "" ++"このバージョンの GNU libc はカーネルバージョン ${kernel_ver} 以降が必要です。" ++"古いバージョンでは動作するかもしれませんが、正式にはサポートされていません。" ++"カーネルのアップグレードを検討してください。" diff --cc debian/po/ko.po index 000000000,000000000..2ca857f06 new file mode 100644 --- /dev/null +++ b/debian/po/ko.po @@@ -1,0 -1,0 +1,254 @@@ ++# 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 , 2007 - 2008. ++# ++msgid "" ++msgstr "" ++"Project-Id-Version: glibc\n" ++"Report-Msgid-Bugs-To: glibc@packages.debian.org\n" ++"POT-Creation-Date: 2017-08-26 13:35+0200\n" ++"PO-Revision-Date: 2008-03-02 20:33-0500\n" ++"Last-Translator: Sunjae Park \n" ++"Language-Team: Korean \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 'invoke-rc.d " ++"start'." ++msgstr "" ++"이 서비스들은 'invoke-rc.d 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 "" ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:6001 ++msgid "Kernel must be upgraded" ++msgstr "" ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:6001 ++msgid "" ++"This version of the GNU libc requires kernel version ${kernel_ver} or " ++"later. Please upgrade your kernel before installing glibc." ++msgstr "" ++ ++#. Type: note ++#. Description ++#: ../debhelper.in/libc.templates:7001 ++msgid "Kernel version not supported" ++msgstr "" ++ ++#. Type: note ++#. Description ++#: ../debhelper.in/libc.templates:7001 ++msgid "" ++"This version of the GNU libc requires kernel version ${kernel_ver} or " ++"later. Older versions might work but are not officially supported by " ++"Debian. Please consider upgrading your kernel." ++msgstr "" diff --cc debian/po/lt.po index 000000000,000000000..a40a1fa8a new file mode 100644 --- /dev/null +++ b/debian/po/lt.po @@@ -1,0 -1,0 +1,255 @@@ ++# 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 , 2006, 2007, 2008. ++msgid "" ++msgstr "" ++"Project-Id-Version: lt\n" ++"Report-Msgid-Bugs-To: glibc@packages.debian.org\n" ++"POT-Creation-Date: 2017-08-26 13:35+0200\n" ++"PO-Revision-Date: 2008-02-26 23:36+0200\n" ++"Last-Translator: Gintautas Miliauskas \n" ++"Language-Team: Lithuanian \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 'invoke-rc.d " ++"start'." ++msgstr "" ++"Jas reikės paleisti rankiniu būdu įvykdant „invoke-rc.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 "" ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:6001 ++msgid "Kernel must be upgraded" ++msgstr "" ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:6001 ++msgid "" ++"This version of the GNU libc requires kernel version ${kernel_ver} or " ++"later. Please upgrade your kernel before installing glibc." ++msgstr "" ++ ++#. Type: note ++#. Description ++#: ../debhelper.in/libc.templates:7001 ++msgid "Kernel version not supported" ++msgstr "" ++ ++#. Type: note ++#. Description ++#: ../debhelper.in/libc.templates:7001 ++msgid "" ++"This version of the GNU libc requires kernel version ${kernel_ver} or " ++"later. Older versions might work but are not officially supported by " ++"Debian. Please consider upgrading your kernel." ++msgstr "" diff --cc debian/po/ml.po index 000000000,000000000..d1aa41d98 new file mode 100644 --- /dev/null +++ b/debian/po/ml.po @@@ -1,0 -1,0 +1,239 @@@ ++# 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 , ലാലു|Lalu കെആര്‍|KR , സജീവ്|Sajeev പിആര്‍|PR, 2007 ++# ++msgid "" ++msgstr "" ++"Project-Id-Version: Glibc 2007_05_26\n" ++"Report-Msgid-Bugs-To: glibc@packages.debian.org\n" ++"POT-Creation-Date: 2017-08-26 13:35+0200\n" ++"PO-Revision-Date: 2007-05-26 15:09+0530\n" ++"Last-Translator: അനൂപ്|Anoop പി|P , ലാലു|Lalu കെആര്‍|KR " ++",സജീവ് |Sajeev പിആര്‍|PR \n" ++"Language-Team: Swathanthra|സ്വതന്ത്ര Malayalam|മലയാളം Computing|കമ്പ്യൂട്ടിങ്ങ് \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 'invoke-rc.d " ++"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 "" ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:6001 ++msgid "Kernel must be upgraded" ++msgstr "" ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:6001 ++msgid "" ++"This version of the GNU libc requires kernel version ${kernel_ver} or " ++"later. Please upgrade your kernel before installing glibc." ++msgstr "" ++ ++#. Type: note ++#. Description ++#: ../debhelper.in/libc.templates:7001 ++msgid "Kernel version not supported" ++msgstr "" ++ ++#. Type: note ++#. Description ++#: ../debhelper.in/libc.templates:7001 ++msgid "" ++"This version of the GNU libc requires kernel version ${kernel_ver} or " ++"later. Older versions might work but are not officially supported by " ++"Debian. Please consider upgrading your kernel." ++msgstr "" diff --cc debian/po/nb.po index 000000000,000000000..57ddc1cf5 new file mode 100644 --- /dev/null +++ b/debian/po/nb.po @@@ -1,0 -1,0 +1,269 @@@ ++# 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 , 2007. ++# Bjørn Steensrud , 2011. ++msgid "" ++msgstr "" ++"Project-Id-Version: glibc_nb\n" ++"Report-Msgid-Bugs-To: glibc@packages.debian.org\n" ++"POT-Creation-Date: 2017-08-26 13:35+0200\n" ++"PO-Revision-Date: 2011-12-29 12:39+0100\n" ++"Last-Translator: Bjørn Steensrud \n" ++"Language-Team: Norwegian Bokmål \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 'invoke-rc.d " ++"start'." ++msgstr "Du må starte disse manuelt ved å kjøre «invoke-rc.d 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." ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:6001 ++msgid "Kernel must be upgraded" ++msgstr "" ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:6001 ++msgid "" ++"This version of the GNU libc requires kernel version ${kernel_ver} or " ++"later. Please upgrade your kernel before installing glibc." ++msgstr "" ++ ++#. Type: note ++#. Description ++#: ../debhelper.in/libc.templates:7001 ++msgid "Kernel version not supported" ++msgstr "" ++ ++#. Type: note ++#. Description ++#: ../debhelper.in/libc.templates:7001 ++msgid "" ++"This version of the GNU libc requires kernel version ${kernel_ver} or " ++"later. Older versions might work but are not officially supported by " ++"Debian. Please consider upgrading your kernel." ++msgstr "" diff --cc debian/po/nl.po index 000000000,000000000..58eb14d3e new file mode 100644 --- /dev/null +++ b/debian/po/nl.po @@@ -1,0 -1,0 +1,286 @@@ ++# Dutch translation of glibc po-debconf templates. ++# Copyright (C) 2008-2011 THE PACKAGE'S COPYRIGHT HOLDER ++# This file is distributed under the same license as the glibc package. ++# Bart Cornelis , 2008. ++# Vincent Zweije , 2011. ++# Frans Spiesschaert , 2016, 2017. ++# ++msgid "" ++msgstr "" ++"Project-Id-Version: glibc 2.21-6\n" ++"Report-Msgid-Bugs-To: glibc@packages.debian.org\n" ++"POT-Creation-Date: 2017-08-26 13:35+0200\n" ++"PO-Revision-Date: 2017-06-23 20:15+0200\n" ++"Last-Translator: Frans Spiesschaert \n" ++"Language-Team: Debian Dutch l10n Team \n" ++"Language: nl\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: Gtranslator 2.91.6\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 een raamwerk om tussen verschillende talen om te schakelen en " ++"het 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 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 programma's kunnen niet automatisch herstart worden. Een " ++"programma dat 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 geïnstalleerde 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 "Omwille van de opwaardering van 'GNU libc' 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 'invoke-rc.d " ++"start'." ++msgstr "" ++"U dient deze diensten handmatig te herstarten via het commando 'invoke-rc.d " ++" 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 exemplaren 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 programma's te authenticeren. U wordt sterk aangeraden om deze " ++"programma's te herstarten of te 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." ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:6001 ++msgid "Kernel must be upgraded" ++msgstr "De kernel moet opgewaardeerd worden" ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:6001 ++msgid "" ++"This version of the GNU libc requires kernel version ${kernel_ver} or " ++"later. Please upgrade your kernel before installing glibc." ++msgstr "" ++"Deze versie van GNU libc heeft kernel versie ${kernel_ver} of een meer " ++"recente versie nodig. Gelieve de kernel op te waarderen vooraleer glibc te " ++"installeren." ++ ++#. Type: note ++#. Description ++#: ../debhelper.in/libc.templates:7001 ++msgid "Kernel version not supported" ++msgstr "Niet-ondersteunde kernelversie" ++ ++#. Type: note ++#. Description ++#: ../debhelper.in/libc.templates:7001 ++msgid "" ++"This version of the GNU libc requires kernel version ${kernel_ver} or " ++"later. Older versions might work but are not officially supported by " ++"Debian. Please consider upgrading your kernel." ++msgstr "" ++"Deze versie van GNU libc heeft kernel versie ${kernel_ver} of een meer " ++"recente versie nodig. Het kan zijn dat oudere versies wel werken, maar " ++"officieel wordt dit niet ondersteund door Debian. U zou er best aan doen uw " ++"kernel op te waarderen." diff --cc debian/po/pl.po index 000000000,000000000..4f2899195 new file mode 100644 --- /dev/null +++ b/debian/po/pl.po @@@ -1,0 -1,0 +1,268 @@@ ++# ++# Michał Kułach , 2012. ++msgid "" ++msgstr "" ++"Project-Id-Version: debconf-glibc-locales-pl\n" ++"Report-Msgid-Bugs-To: glibc@packages.debian.org\n" ++"POT-Creation-Date: 2017-08-26 13:35+0200\n" ++"PO-Revision-Date: 2012-01-28 15:33+0100\n" ++"Last-Translator: Michał Kułach \n" ++"Language-Team: Polish \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 'invoke-rc.d " ++"start'." ++msgstr "" ++"Aby zrestartować te usługi ręcznie należy wywołać \"invoke-rc.d " ++"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." ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:6001 ++msgid "Kernel must be upgraded" ++msgstr "" ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:6001 ++msgid "" ++"This version of the GNU libc requires kernel version ${kernel_ver} or " ++"later. Please upgrade your kernel before installing glibc." ++msgstr "" ++ ++#. Type: note ++#. Description ++#: ../debhelper.in/libc.templates:7001 ++msgid "Kernel version not supported" ++msgstr "" ++ ++#. Type: note ++#. Description ++#: ../debhelper.in/libc.templates:7001 ++msgid "" ++"This version of the GNU libc requires kernel version ${kernel_ver} or " ++"later. Older versions might work but are not officially supported by " ++"Debian. Please consider upgrading your kernel." ++msgstr "" diff --cc debian/po/pt.po index 000000000,000000000..65e133028 new file mode 100644 --- /dev/null +++ b/debian/po/pt.po @@@ -1,0 -1,0 +1,274 @@@ ++# Portuguese translation of glibc's debconf messages. ++# Copyright (C) 2007 ++# This file is distributed under the same license as the glibc package. ++# Ricardo Silva , 2007. ++# Pedro Ribeiro , 2010, 2012, 2017 ++# ++msgid "" ++msgstr "" ++"Project-Id-Version: glibc 2.24-17\n" ++"Report-Msgid-Bugs-To: glibc@packages.debian.org\n" ++"POT-Creation-Date: 2017-06-13 22:11+0200\n" ++"PO-Revision-Date: 2017-09-07 10:25+0100\n" ++"Last-Translator: Pedro Ribeiro \n" ++"Language-Team: Portuguese \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ários idiomas e permitir aos " ++"utilizadores utilizarem o seu idioma, 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 software e sistemas " ++"mais 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 predefinido para o 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 no idioma correcto " ++"do utilizador. Dos locales gerados, pode escolher o padrão 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 o idioma padrão para todo o sistema. Se este é um sistema " ++"multi-utilizador em que nem todos os utilizadores são capazes de o 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 seguinte." ++ ++#. 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 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 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 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 para a actualização da " ++"biblioteca GNU libc:" ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:3001 ++msgid "" ++"You will need to start these manually by running 'invoke-rc.d " ++"start'." ++msgstr "" ++"Terá de os inicializar manualmente correndo 'invoke-rc.d 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." ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:6001 ++msgid "Kernel must be upgraded" ++msgstr "O kernel necessita de ser actualizado" ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:6001 ++msgid "" ++"This version of the GNU libc requires kernel version ${kernel_ver} or " ++"later. Please upgrade your kernel before installing glibc." ++msgstr "" ++"Esta versão da GNU libc necessita da versão ${kernel_ver} ou mais recente. " ++"Por favor, actualize o kernel antes de instalar a glibc." ++ ++#. Type: note ++#. Description ++#: ../debhelper.in/libc.templates:7001 ++msgid "Kernel version not supported" ++msgstr "Versão não suportada do kernel" ++ ++#. Type: note ++#. Description ++#: ../debhelper.in/libc.templates:7001 ++msgid "" ++"This version of the GNU libc requires kernel version ${kernel_ver} or " ++"later. Older versions might work but are not officially supported by " ++"Debian. Please consider upgrading your kernel." ++msgstr "" ++"Esta versão da GNU libc requer a versão ${kernel_ver} ou mais recente. " ++"Versões mais antigas podem funcionar mas não são oficialmente suportadas " ++"pela Debian. Por favor, considere actualizar o kernel." diff --cc debian/po/pt_BR.po index 000000000,000000000..786ca60fc new file mode 100644 --- /dev/null +++ b/debian/po/pt_BR.po @@@ -1,0 -1,0 +1,280 @@@ ++# 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) , 2007-2008. ++# Fernando Ike de Oliveira (fike) , 2013. ++# Adriano Rafael Gomes , 2014-2020. ++# ++msgid "" ++msgstr "" ++"Project-Id-Version: glibc\n" ++"Report-Msgid-Bugs-To: glibc@packages.debian.org\n" ++"POT-Creation-Date: 2017-08-26 13:35+0200\n" ++"PO-Revision-Date: 2020-07-11 18:48-0300\n" ++"Last-Translator: Adriano Rafael Gomes \n" ++"Language-Team: Brazilian Portuguese \n" ++"Language: pt_BR\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 são uma infraestrutura para alternar entre múltiplos idiomas e " ++"permitem aos usuários utilizar o seu idioma, país, caracteres, ordenaçã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 enfrentarão 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 e programas em execução 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 ou telnetd), mas outros programas não podem ser reiniciados " ++"automaticamente. Um programa que precisa ser parado e reiniciado manualmente " ++"por você depois da atualização da glibc é o xdm - porque reiniciar " ++"automaticamente pode desconectar suas sessões ativas do 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 "" ++"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 a serem reiniciados para 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 e programas em execução 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, revise a seguinte lista separada por espaços de scripts init.d de " ++"serviços que serão reiniciados agora, e a 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 para 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 para a atualização da " ++"biblioteca GNU libc:" ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:3001 ++msgid "" ++"You will need to start these manually by running 'invoke-rc.d " ++"start'." ++msgstr "" ++"Você deverá iniciá-los manualmente executando \"invoke-rc.d start" ++"\"." ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:4001 ++msgid "xscreensaver and xlockmore must be restarted before upgrading" ++msgstr "xscreensaver e xlockmore devem ser reiniciados antes da atualizaçã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 "" ++"Uma ou mais instâncias do xscreensaver ou do xlockmore foram detectadas em " ++"execução neste sistema. Por causa de modificações incompatíveis de " ++"biblioteca, a atualização da biblioteca GNU libc impossibilitará você de se " ++"autenticar nestes programas. Você deve providenciar que estes programas " ++"sejam reiniciados ou parados antes de continuar com esta atualização, para " ++"evitar bloquear seus usuários fora de suas sessões atuais." ++ ++#. Type: boolean ++#. Description ++#: ../debhelper.in/libc.templates:5001 ++msgid "Restart services during package upgrades without asking?" ++msgstr "Reiniciar serviços durante a atualização de pacotes sem perguntar?" ++ ++#. 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 "" ++"Existem serviços instalados no seu sistema que precisam ser reiniciados " ++"quando determinadas bibliotecas, tais como libpam, libc e libssl são " ++"atualizadas. Uma vez que essas reinicializações podem causar interrupções de " ++"serviços para o sistema, normalmente você terá que responder a cada " ++"atualização qual será a lista de serviços que quiser reiniciar. Você pode " ++"escolher esta opção para evitar novas solicitações; ao invés disso, todas as " ++"reinicializações necessárias serão realizadas automaticamente, para evitar " ++"que você responda a cada atualização de biblioteca." ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:6001 ++msgid "Kernel must be upgraded" ++msgstr "O kernel deve ser atualizado" ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:6001 ++msgid "" ++"This version of the GNU libc requires kernel version ${kernel_ver} or " ++"later. Please upgrade your kernel before installing glibc." ++msgstr "" ++"Essa versão da GNU libc requer um kernel versão ${kernel_ver} ou mais " ++"recente. Por favor, atualize o seu kernel antes de instalar a glibc." ++ ++#. Type: note ++#. Description ++#: ../debhelper.in/libc.templates:7001 ++msgid "Kernel version not supported" ++msgstr "Versão de kernel não suportada" ++ ++#. Type: note ++#. Description ++#: ../debhelper.in/libc.templates:7001 ++msgid "" ++"This version of the GNU libc requires kernel version ${kernel_ver} or " ++"later. Older versions might work but are not officially supported by " ++"Debian. Please consider upgrading your kernel." ++msgstr "" ++"Essa versão da GNU libc requer um kernel versão ${kernel_ver} ou mais " ++"recente. Versões mais antigas poderão funcionar, mas não são suportadas " ++"oficialmente pelo Debian. Por favor, considere atualizar o seu kernel." diff --cc debian/po/ro.po index 000000000,000000000..56bc743d7 new file mode 100644 --- /dev/null +++ b/debian/po/ro.po @@@ -1,0 -1,0 +1,260 @@@ ++# 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 , 2006, 2007, 2008. ++msgid "" ++msgstr "" ++"Project-Id-Version: \n" ++"Report-Msgid-Bugs-To: glibc@packages.debian.org\n" ++"POT-Creation-Date: 2017-08-26 13:35+0200\n" ++"PO-Revision-Date: 2008-02-17 12:48+0200\n" ++"Last-Translator: stan ioan-eugen \n" ++"Language-Team: romanian \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 'invoke-rc.d " ++"start'." ++msgstr "" ++"Va trebui să porniți aceste servicii manual executând comanda 'invoke-rc.d " ++" 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 "" ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:6001 ++msgid "Kernel must be upgraded" ++msgstr "" ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:6001 ++msgid "" ++"This version of the GNU libc requires kernel version ${kernel_ver} or " ++"later. Please upgrade your kernel before installing glibc." ++msgstr "" ++ ++#. Type: note ++#. Description ++#: ../debhelper.in/libc.templates:7001 ++msgid "Kernel version not supported" ++msgstr "" ++ ++#. Type: note ++#. Description ++#: ../debhelper.in/libc.templates:7001 ++msgid "" ++"This version of the GNU libc requires kernel version ${kernel_ver} or " ++"later. Older versions might work but are not officially supported by " ++"Debian. Please consider upgrading your kernel." ++msgstr "" diff --cc debian/po/ru.po index 000000000,000000000..2066f493e new file mode 100644 --- /dev/null +++ b/debian/po/ru.po @@@ -1,0 -1,0 +1,282 @@@ ++# 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 , 2006. ++# Sergey Alyoshin , 2007, 2008. ++# Yuri Kozlov , 2009, 2011. ++# Lev Lamberov , 2019. ++msgid "" ++msgstr "" ++"Project-Id-Version: eglibc 2.13-23\n" ++"Report-Msgid-Bugs-To: glibc@packages.debian.org\n" ++"POT-Creation-Date: 2017-08-26 13:35+0200\n" ++"PO-Revision-Date: 2019-01-30 19:31+0500\n" ++"Last-Translator: Lev Lamberov \n" ++"Language-Team: Russian \n" ++"Language: ru\n" ++"MIME-Version: 1.0\n" ++"Content-Type: text/plain; charset=UTF-8\n" ++"Content-Transfer-Encoding: 8bit\n" ++"X-Generator: Poedit 2.2.1\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 'invoke-rc.d " ++"start'." ++msgstr "" ++"Вам будет нужно запустить их вручную, для чего следует выполнить 'invoke-rc." ++"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). Так как это может " ++"вызвать перерыв в работе службы, то обычно при каждом обновлении " ++"запрашивается подтверждение списка служб, которые нужно перезапустить. Чтобы " ++"этот вопрос не задавался, вы можете ответить утвердительно; в этом случае " ++"все необходимые службы будут перезапущены автоматически." ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:6001 ++msgid "Kernel must be upgraded" ++msgstr "Следует обновить ядро" ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:6001 ++msgid "" ++"This version of the GNU libc requires kernel version ${kernel_ver} or " ++"later. Please upgrade your kernel before installing glibc." ++msgstr "" ++"Для данной версии GNU libc требуется ядро версии ${kernel_ver} или новее. " ++"Обновите ядро до выполнения установки glibc." ++ ++#. Type: note ++#. Description ++#: ../debhelper.in/libc.templates:7001 ++msgid "Kernel version not supported" ++msgstr "Версия ядра не поддерживается" ++ ++#. Type: note ++#. Description ++#: ../debhelper.in/libc.templates:7001 ++msgid "" ++"This version of the GNU libc requires kernel version ${kernel_ver} or " ++"later. Older versions might work but are not officially supported by " ++"Debian. Please consider upgrading your kernel." ++msgstr "" ++"Для данной версии GNU libc требуется ядро версии ${kernel_ver} или новее. " ++"Более старые версии могут работать, но они официально не поддерживаются в " ++"Debian. Рассмотрите возможность обновления ядра." diff --cc debian/po/sk.po index 000000000,000000000..1eeb265a5 new file mode 100644 --- /dev/null +++ b/debian/po/sk.po @@@ -1,0 -1,0 +1,270 @@@ ++# 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 , 2007, 2008, 2012. ++# ++msgid "" ++msgstr "" ++"Project-Id-Version: eglibc\n" ++"Report-Msgid-Bugs-To: glibc@packages.debian.org\n" ++"POT-Creation-Date: 2017-08-26 13:35+0200\n" ++"PO-Revision-Date: 2012-06-17 20:43+0100\n" ++"Last-Translator: Ivan Masár \n" ++"Language-Team: Slovak \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 'invoke-rc.d " ++"start'." ++msgstr "" ++"Budete musieť tieto služby spustiť ručne pomocou „invoke-rc.d " ++"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." ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:6001 ++msgid "Kernel must be upgraded" ++msgstr "" ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:6001 ++msgid "" ++"This version of the GNU libc requires kernel version ${kernel_ver} or " ++"later. Please upgrade your kernel before installing glibc." ++msgstr "" ++ ++#. Type: note ++#. Description ++#: ../debhelper.in/libc.templates:7001 ++msgid "Kernel version not supported" ++msgstr "" ++ ++#. Type: note ++#. Description ++#: ../debhelper.in/libc.templates:7001 ++msgid "" ++"This version of the GNU libc requires kernel version ${kernel_ver} or " ++"later. Older versions might work but are not officially supported by " ++"Debian. Please consider upgrading your kernel." ++msgstr "" diff --cc debian/po/sv.po index 000000000,000000000..3bc388267 new file mode 100644 --- /dev/null +++ b/debian/po/sv.po @@@ -1,0 -1,0 +1,269 @@@ ++# Translation of glibc debconf template to Swedish ++# Copyright (C) 2014 Martin Bagge ++# This file is distributed under the same license as the glibc package. ++# ++# Martin Bagge , 2008, 2011, 2014 ++msgid "" ++msgstr "" ++"Project-Id-Version: glibc_2.7-11_sv\n" ++"Report-Msgid-Bugs-To: glibc@packages.debian.org\n" ++"POT-Creation-Date: 2017-08-26 13:35+0200\n" ++"PO-Revision-Date: 2014-06-12 22:58+0200\n" ++"Last-Translator: Martin Bagge / brother \n" ++"Language-Team: Swedish \n" ++"Language: Swedish\n" ++"MIME-Version: 1.0\n" ++"Content-Type: text/plain; charset=UTF-8\n" ++"Content-Transfer-Encoding: 8bit\n" ++"X-Generator: Poedit 1.5.4\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 'invoke-rc.d " ++"start'." ++msgstr "" ++"Du behöver starta dessa manuellt genom att köra \"invoke-rc.d 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 inkompatibilitet 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 paketuppgraderingar 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 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." ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:6001 ++msgid "Kernel must be upgraded" ++msgstr "" ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:6001 ++msgid "" ++"This version of the GNU libc requires kernel version ${kernel_ver} or " ++"later. Please upgrade your kernel before installing glibc." ++msgstr "" ++ ++#. Type: note ++#. Description ++#: ../debhelper.in/libc.templates:7001 ++msgid "Kernel version not supported" ++msgstr "" ++ ++#. Type: note ++#. Description ++#: ../debhelper.in/libc.templates:7001 ++msgid "" ++"This version of the GNU libc requires kernel version ${kernel_ver} or " ++"later. Older versions might work but are not officially supported by " ++"Debian. Please consider upgrading your kernel." ++msgstr "" diff --cc debian/po/ta.po index 000000000,000000000..28736ed67 new file mode 100644 --- /dev/null +++ b/debian/po/ta.po @@@ -1,0 -1,0 +1,234 @@@ ++# 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 , 2007. ++msgid "" ++msgstr "" ++"Project-Id-Version: glibc\n" ++"Report-Msgid-Bugs-To: glibc@packages.debian.org\n" ++"POT-Creation-Date: 2017-08-26 13:35+0200\n" ++"PO-Revision-Date: 2007-04-24 19:42+0530\n" ++"Last-Translator: Dr.T.Vasudevan \n" ++"Language-Team: TAMIL \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 'invoke-rc.d " ++"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 "" ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:6001 ++msgid "Kernel must be upgraded" ++msgstr "" ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:6001 ++msgid "" ++"This version of the GNU libc requires kernel version ${kernel_ver} or " ++"later. Please upgrade your kernel before installing glibc." ++msgstr "" ++ ++#. Type: note ++#. Description ++#: ../debhelper.in/libc.templates:7001 ++msgid "Kernel version not supported" ++msgstr "" ++ ++#. Type: note ++#. Description ++#: ../debhelper.in/libc.templates:7001 ++msgid "" ++"This version of the GNU libc requires kernel version ${kernel_ver} or " ++"later. Older versions might work but are not officially supported by " ++"Debian. Please consider upgrading your kernel." ++msgstr "" diff --cc debian/po/templates.pot index 000000000,000000000..c04ef3819 new file mode 100644 --- /dev/null +++ b/debian/po/templates.pot @@@ -1,0 -1,0 +1,224 @@@ ++# SOME DESCRIPTIVE TITLE. ++# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER ++# This file is distributed under the same license as the glibc package. ++# FIRST AUTHOR , YEAR. ++# ++#, fuzzy ++msgid "" ++msgstr "" ++"Project-Id-Version: glibc\n" ++"Report-Msgid-Bugs-To: glibc@packages.debian.org\n" ++"POT-Creation-Date: 2017-08-26 13:35+0200\n" ++"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" ++"Last-Translator: FULL NAME \n" ++"Language-Team: LANGUAGE \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 'invoke-rc.d " ++"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 "" ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:6001 ++msgid "Kernel must be upgraded" ++msgstr "" ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:6001 ++msgid "" ++"This version of the GNU libc requires kernel version ${kernel_ver} or " ++"later. Please upgrade your kernel before installing glibc." ++msgstr "" ++ ++#. Type: note ++#. Description ++#: ../debhelper.in/libc.templates:7001 ++msgid "Kernel version not supported" ++msgstr "" ++ ++#. Type: note ++#. Description ++#: ../debhelper.in/libc.templates:7001 ++msgid "" ++"This version of the GNU libc requires kernel version ${kernel_ver} or " ++"later. Older versions might work but are not officially supported by " ++"Debian. Please consider upgrading your kernel." ++msgstr "" diff --cc debian/po/tr.po index 000000000,000000000..d5a23884b new file mode 100644 --- /dev/null +++ b/debian/po/tr.po @@@ -1,0 -1,0 +1,274 @@@ ++# Turkish translation of locales. ++# This file is distributed under the same license as the locales package. ++# Erçin EKER , 2004,2007. ++# ++msgid "" ++msgstr "" ++"Project-Id-Version: glibc\n" ++"Report-Msgid-Bugs-To: glibc@packages.debian.org\n" ++"POT-Creation-Date: 2017-08-26 13:35+0200\n" ++"PO-Revision-Date: 2014-08-01 03:34+0200\n" ++"Last-Translator: Mert Dirik \n" ++"Language-Team: debian-l10n-turkish \n" ++"Language: tr\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: Poedit 1.5.4\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 ortamında kullanılacak ö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 iletileri 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 tümünde kullanılacak olan dili belirleyecektir. Farklı " ++"dilleri konuşan kullanıcıların bir arada bulunduğu çok kullanıcılı " ++"sistemlerdeki 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 "glibc'yi şimdi yükseltmek istiyor musunuz?" ++ ++#. 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 kullanan hizmetler, yeniden başlatılmadıkları takdirde arama veya kimlik " ++"doğrulama gibi işlemleri yapamayacaklardır. Kurulum süreci bazı hizmetleri " ++"yeniden başlatabilir (örneğin sshd veya telnetd'yi), ama her hizmet otomatik " ++"olarak yeniden başlatılamaz. glibc yükseltmesinden sonra elle yeniden " ++"başlatmanız gereken hizmetlerden biri de xdm'dir, çünkü otomatik olarak " ++"yeniden başlatılması halinde etkin X11 oturumlarının kapanmasına sebep olur. " ++ ++#. 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 "" ++"Bu betik, yükseltme işlemi yapılmadan önce şu hizmetlerin yeniden " ++"başlatılması gerektiğini algıladı: ${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 "" ++"Eğer yükseltme işlemini ertelemek istiyorsanız lütfen aşağıdaki soruya Hayır " ++"yanıtını verin." ++ ++#. Type: string ++#. Description ++#: ../debhelper.in/libc.templates:2001 ++msgid "Services to restart for GNU libc library upgrade:" ++msgstr "" ++"GNU libc kitaplığı yükseltmesi esnasında yeniden başlatılacak olan hizmetler:" ++ ++#. 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 kullanan hizmetler yeniden başlatılmadıkları takdirde arama veya kimlik " ++"doğrulama gibi işlemleri yapamayacaklardır (örneğin ssh gibi hizmetler için, " ++"böyle bir durumda oturum açamayabilirsiniz). Lütfen yeniden başlatılacak " ++"hizmetlere ilişkin init.d betiklerinin boşluklarla ayrılmış aşağıdaki " ++"listesini inceleyin ve gerekliyse listeyi düzeltin." ++ ++#. Type: string ++#. Description ++#: ../debhelper.in/libc.templates:2001 ++msgid "" ++"Note: restarting sshd/telnetd should not affect any existing connections." ++msgstr "" ++"Not: sshd/telnetd'nin yeniden başlatılması mevcut bağlantıları etkilemez." ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:3001 ++msgid "Failure restarting some services for GNU libc upgrade" ++msgstr "GNU libc yükseltmesi esnasında bazı hizmetler yeniden başlatılamadı" ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:3001 ++msgid "" ++"The following services could not be restarted for the GNU libc library " ++"upgrade:" ++msgstr "" ++"Aşağıdaki hizmetler GNU libc yükseltmesi için yeniden başlatılırken bazı " ++"sorunlar oluştu:" ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:3001 ++msgid "" ++"You will need to start these manually by running 'invoke-rc.d " ++"start'." ++msgstr "" ++"Bu hizmetleri 'invoke-rc.d start' komutunu kullanarak elle " ++"başlatmanız gerekmektedir." ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:4001 ++msgid "xscreensaver and xlockmore must be restarted before upgrading" ++msgstr "" ++"Yükseltme işleminden önce xscreensaver ve xlockmore hizmetleri yeniden " ++"başlatılmalı" ++ ++#. 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 "" ++"Sisteminizde çalışmakta olan birden fazla xscreensaver ya da xlockmore " ++"örneğine rastlandı. Uyumsuz kitaplık değişiklikleri yüzünden, GNU libc " ++"paketinin yükseltilmesi bu programlarda kimlik doğrulamasını olanaksız hale " ++"getirecek. Mevcut oturumların kilitlenmesi önlemek için, yükseltme işlemine " ++"devam etmeden önce bu programları durdurmalı ya da yeniden başlatmalısınız." ++ ++#. Type: boolean ++#. Description ++#: ../debhelper.in/libc.templates:5001 ++msgid "Restart services during package upgrades without asking?" ++msgstr "" ++"Hizmetler paket yükseltme işlemi esnasında size sorulmadan yeniden " ++"başlatılsın mı?" ++ ++#. 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 "" ++"Sisteminizde libpam, libc ve libssl gibi bazı kitaplıklar yükseltildiğinde " ++"yeniden başlatılması gereken bazı hizmetler kurulu. Yeniden başlatma " ++"işlemleri sisteminizin sunduğu hizmetlerde kesintilere neden olabileceğinden " ++"dolayı her yükseltme işlemi esnasında yeniden başlatmak istediğiniz " ++"hizmetler size sorulacaktır. Eğer bu sorunun sorulmasını istemiyorsanız bu " ++"seçeneği kullanabilirsiniz. Bu seçenek seçildiği takdirde bir kitaplık " ++"yükseltmesi yapılırken gereken tüm yeniden başlatma işlemleri size " ++"sorulmaksızın otomatik olarak yapılacaktır." ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:6001 ++msgid "Kernel must be upgraded" ++msgstr "" ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:6001 ++msgid "" ++"This version of the GNU libc requires kernel version ${kernel_ver} or " ++"later. Please upgrade your kernel before installing glibc." ++msgstr "" ++ ++#. Type: note ++#. Description ++#: ../debhelper.in/libc.templates:7001 ++msgid "Kernel version not supported" ++msgstr "" ++ ++#. Type: note ++#. Description ++#: ../debhelper.in/libc.templates:7001 ++msgid "" ++"This version of the GNU libc requires kernel version ${kernel_ver} or " ++"later. Older versions might work but are not officially supported by " ++"Debian. Please consider upgrading your kernel." ++msgstr "" diff --cc debian/po/uk.po index 000000000,000000000..9dd29408a new file mode 100644 --- /dev/null +++ b/debian/po/uk.po @@@ -1,0 -1,0 +1,248 @@@ ++# 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 , 2004, 2006. ++msgid "" ++msgstr "" ++"Project-Id-Version: uk\n" ++"Report-Msgid-Bugs-To: glibc@packages.debian.org\n" ++"POT-Creation-Date: 2017-08-26 13:35+0200\n" ++"PO-Revision-Date: 2006-02-21 10:12+0200\n" ++"Last-Translator: Eugeniy Meshcheryakov \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 'invoke-rc.d " ++"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 "" ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:6001 ++msgid "Kernel must be upgraded" ++msgstr "" ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:6001 ++msgid "" ++"This version of the GNU libc requires kernel version ${kernel_ver} or " ++"later. Please upgrade your kernel before installing glibc." ++msgstr "" ++ ++#. Type: note ++#. Description ++#: ../debhelper.in/libc.templates:7001 ++msgid "Kernel version not supported" ++msgstr "" ++ ++#. Type: note ++#. Description ++#: ../debhelper.in/libc.templates:7001 ++msgid "" ++"This version of the GNU libc requires kernel version ${kernel_ver} or " ++"later. Older versions might work but are not officially supported by " ++"Debian. Please consider upgrading your kernel." ++msgstr "" diff --cc debian/po/vi.po index 000000000,000000000..257154118 new file mode 100644 --- /dev/null +++ b/debian/po/vi.po @@@ -1,0 -1,0 +1,265 @@@ ++# Vietnamese Translation for eGlibC. ++# Copyright © 2010 Free Software Foundation, Inc. ++# Clytie Siddall , 2005-2010. ++# ++msgid "" ++msgstr "" ++"Project-Id-Version: eglibc 2.11.2-6\n" ++"Report-Msgid-Bugs-To: glibc@packages.debian.org\n" ++"POT-Creation-Date: 2017-08-26 13:35+0200\n" ++"PO-Revision-Date: 2010-10-27 14:55+1030\n" ++"Last-Translator: Clytie Siddall \n" ++"Language-Team: Vietnamese \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 'invoke-rc.d " ++"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/ 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 "" ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:6001 ++msgid "Kernel must be upgraded" ++msgstr "" ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:6001 ++msgid "" ++"This version of the GNU libc requires kernel version ${kernel_ver} or " ++"later. Please upgrade your kernel before installing glibc." ++msgstr "" ++ ++#. Type: note ++#. Description ++#: ../debhelper.in/libc.templates:7001 ++msgid "Kernel version not supported" ++msgstr "" ++ ++#. Type: note ++#. Description ++#: ../debhelper.in/libc.templates:7001 ++msgid "" ++"This version of the GNU libc requires kernel version ${kernel_ver} or " ++"later. Older versions might work but are not officially supported by " ++"Debian. Please consider upgrading your kernel." ++msgstr "" diff --cc debian/po/zh_CN.po index 000000000,000000000..fe70e7fec new file mode 100644 --- /dev/null +++ b/debian/po/zh_CN.po @@@ -1,0 -1,0 +1,249 @@@ ++# 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 , 2004. ++# Carlos Z.F. Liu , 2004. ++# LI Daobing , 2007, 2008. ++# ++# ++msgid "" ++msgstr "" ++"Project-Id-Version: glibc 2.7-9\n" ++"Report-Msgid-Bugs-To: glibc@packages.debian.org\n" ++"POT-Creation-Date: 2017-08-26 13:35+0200\n" ++"PO-Revision-Date: 2008-02-28 23:44+0800\n" ++"Last-Translator: LI Daobing \n" ++"Language-Team: Chinese (Simplified) \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 'invoke-rc.d " ++"start'." ++msgstr "你需要通过手动运行 'invoke-rc.d 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 "" ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:6001 ++msgid "Kernel must be upgraded" ++msgstr "" ++ ++#. Type: error ++#. Description ++#: ../debhelper.in/libc.templates:6001 ++msgid "" ++"This version of the GNU libc requires kernel version ${kernel_ver} or " ++"later. Please upgrade your kernel before installing glibc." ++msgstr "" ++ ++#. Type: note ++#. Description ++#: ../debhelper.in/libc.templates:7001 ++msgid "Kernel version not supported" ++msgstr "" ++ ++#. Type: note ++#. Description ++#: ../debhelper.in/libc.templates:7001 ++msgid "" ++"This version of the GNU libc requires kernel version ${kernel_ver} or " ++"later. Older versions might work but are not officially supported by " ++"Debian. Please consider upgrading your kernel." ++msgstr "" diff --cc debian/quiltrc index 000000000,000000000..504225b80 new file mode 100644 --- /dev/null +++ b/debian/quiltrc @@@ -1,0 -1,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" diff --cc debian/rules index 000000000,000000000..ced73ee5f new file mode 100755 --- /dev/null +++ b/debian/rules @@@ -1,0 -1,0 +1,225 @@@ ++#! /usr/bin/make -f ++# -*- makefile -*- ++# debian/rules file for GNU libc. ++# Copyright 1998, 1999 by Joel Klecker ++# Copyright 2000 Ben Collins ++# Copyright 2003 Jeff Bailey ++# 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)) ++ ++# Beyond here you shouldn't need to customise anything: ++DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) ++DEB_HOST_ARCH_ENDIAN ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_ENDIAN) ++DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS) ++DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) ++DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) ++DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH) ++DEB_BUILD_ARCH_BITS ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH_BITS) ++DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) ++ ++DEB_SOURCE_PACKAGE := $(strip $(shell egrep '^Source: ' debian/control | cut -f 2 -d ':')) ++ ++DEB_VERSION := $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ') ++GLIBC_VERSION = $(shell echo $(DEB_VERSION) | sed -e 's/.*://' -e 's/[+-].*//') ++ ++SOURCE_DATE_EPOCH ?= $(shell dpkg-parsechangelog -STimestamp) ++ ++# The minimum package version with which these packages are compatible. ++shlib_dep_ver = $(GLIBC_VERSION) ++shlib_dep = $(libc) (>= $(shlib_dep_ver)) ++ ++DEB_BUILDDIR ?= $(build-tree)/$(DEB_HOST_ARCH)-$(curpass) ++DEB_BUILDDIRLIBC ?= $(build-tree)/$(DEB_HOST_ARCH)-libc ++ ++GLIBC_SOURCES = $(filter-out debian $(shell basename $(stamp)) $(build-tree), $(wildcard *)) ++ ++# 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 ++ ++# use the package settings, not the settings from the environment ++define unsetenv ++ unexport $(1) ++ $(1) = ++endef ++$(foreach v, CPPFLAGS CFLAGS CXXFLAGS LDFLAGS, $(if $(filter environment,$(origin $(v))),$(eval $(call unsetenv, $(v))))) ++ ++# Default setup ++GLIBC_PASSES ?= libc ++ ++prefix=/usr ++bindir=$(prefix)/bin ++datadir=$(prefix)/share ++complocaledir=$(prefix)/lib/locale ++sysconfdir=/etc ++libexecdir=$(prefix)/lib ++rootsbindir=/sbin ++includedir=$(prefix)/include ++docdir=$(prefix)/share/doc ++mandir=$(prefix)/share/man ++sbindir=$(prefix)/sbin ++vardbdir=/var/lib/misc ++rtlddir=/lib ++slibdir=/lib/$(DEB_HOST_MULTIARCH) ++libdir=/usr/lib/$(DEB_HOST_MULTIARCH) ++mvec = no ++crypt = no ++ ++ ++BASE_CC = gcc ++BASE_CXX = g++ ++BASE_MIG = mig ++DEB_GCC_VERSION ?= -10 ++ ++RUN_TESTSUITE = yes ++TIMEOUTFACTOR = 25 ++ ++# Set cross and native compiler names, including version. ++CC = $(DEB_HOST_GNU_TYPE)-$(BASE_CC)$(DEB_GCC_VERSION) ++CXX = $(DEB_HOST_GNU_TYPE)-$(BASE_CXX)$(DEB_GCC_VERSION) ++MIG = $(DEB_HOST_GNU_TYPE)-$(BASE_MIG) ++BUILD_CC = $(DEB_BUILD_GNU_TYPE)-$(BASE_CC) ++BUILD_CXX = $(DEB_BUILD_GNU_TYPE)-$(BASE_CXX) ++ ++BUILD_CFLAGS = -O2 -g -fdebug-prefix-map=$(CURDIR)=. ++HOST_CFLAGS = -pipe -O2 -g -fdebug-prefix-map=$(CURDIR)=. $(call xx,extra_cflags) ++ ++# 32-bit MIPS builders have a 2GB memory space. This is not enough to ++# build test-tgmath3.o with GCC, unless tweaking the garbage collector. ++ifeq ($(findstring mips,$(DEB_BUILD_ARCH))-$(DEB_BUILD_ARCH_BITS), mips-32) ++ CC += --param ggc-min-expand=10 ++endif ++ ++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) ++ ++# Which build pass are we on? ++curpass = $(filter-out %_,$(subst _,_ ,$@)) ++ ++ifneq ($(filter stage1,$(DEB_BUILD_PROFILES)),) ++ DEB_ARCH_REGULAR_PACKAGES = $(libc)-dev ++ DEB_INDEP_REGULAR_PACKAGES = ++ DEB_UDEB_PACKAGES = ++ ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),) ++ DEB_BUILD_OPTIONS+=nocheck ++ endif ++else ++ DEB_ARCH_REGULAR_PACKAGES = $(libc) $(libc)-dev $(libc)-dbg libc-bin libc-dev-bin ++ ifeq ($(filter stage2,$(DEB_BUILD_PROFILES)),) ++ DEB_ARCH_REGULAR_PACKAGES += libc-devtools ++ endif ++ DEB_INDEP_REGULAR_PACKAGES = glibc-doc glibc-source libc-l10n locales ++ ifneq ($(filter noudeb,$(DEB_BUILD_PROFILES)),) ++ DEB_UDEB_PACKAGES = ++ else ++ DEB_UDEB_PACKAGES = $(libc)-udeb ++ endif ++ ## Locales can only be pre-generated during native compiles ++ ifeq ($(DEB_HOST_ARCH),$(DEB_BUILD_ARCH)) ++ DEB_ARCH_REGULAR_PACKAGES += locales-all ++ endif ++endif ++ ++# Generic kernel version check ++define kernel_check ++(if [ $(CURRENT_KERNEL_VERSION) -lt $(1) ]; then \ ++ false; \ ++fi) ++endef ++ ++# Include libidn for both NPTL and FBTL 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 ++ ++ifneq ($(filter stage1,$(DEB_BUILD_PROFILES)),) ++DEB_ARCH_REGULAR_PACKAGES += $(foreach p,$(DEB_ARCH_MULTILIB_PACKAGES), $(if $(findstring -dev,$(p)), $(p))) ++else ++DEB_ARCH_REGULAR_PACKAGES += $(DEB_ARCH_MULTILIB_PACKAGES) ++endif ++ ++# Don't run dh_strip on this package ++NOSTRIP_$(libc)-dbg = 1 ++ ++# Put the debug files from these packages in $(libc)-dbg ++DEBUG_$(libc) = 1 ++DEBUG_libc6-xen = 1 ++DEBUG_libc6.1-alphaev67 = 1 ++ ++ifeq ($(filter stage1,$(DEB_BUILD_PROFILES)),) ++ ifeq ($(threads),yes) ++ DEB_ARCH_REGULAR_PACKAGES += nscd ++ endif ++endif ++ ++# And now the rules... ++include debian/rules.d/*.mk ++ ++clean:: unpatch ++ rm -rf $(patsubst %,debian/tmp-%,$(GLIBC_PASSES)) ++ rm -rf $(build-tree) ++ rm -rf $(stamp) ++ rm -rf debian/include ++ rm -f debian/control.in/libc0.1 debian/control.in/libc0.3 \ ++ debian/control.in/libc6 debian/control.in/libc6.1 \ ++ debian/*.preinst.* debian/*.links.* ++ ++# Required Debian targets ++build-arch: $(stamp)info \ ++ $(patsubst %,$(stamp)build_%,$(GLIBC_PASSES)) \ ++ $(patsubst %,$(stamp)check_%,$(GLIBC_PASSES)) ++ifeq ($(filter stage1,$(DEB_BUILD_PROFILES)),) ++build-arch: $(stamp)build_C.UTF-8 \ ++ $(stamp)build_locales-all ++endif ++ ++build-indep: $(stamp)source $(stamp)build_libc ++ ++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 diff --cc debian/rules.d/build.mk index 000000000,000000000..77a8258cf new file mode 100644 --- /dev/null +++ b/debian/rules.d/build.mk @@@ -1,0 -1,0 +1,385 @@@ ++# 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))) ++define generic_multilib_extra_pkg_install ++set -e; \ ++mkdir -p debian/$(1)/usr/include/sys; \ ++ln -sf $(DEB_HOST_MULTIARCH)/bits debian/$(1)/usr/include/; \ ++ln -sf $(DEB_HOST_MULTIARCH)/gnu debian/$(1)/usr/include/; \ ++ln -sf $(DEB_HOST_MULTIARCH)/fpu_control.h debian/$(1)/usr/include/; \ ++for i in `ls debian/tmp-libc/usr/include/$(DEB_HOST_MULTIARCH)/sys`; do \ ++ ln -sf ../$(DEB_HOST_MULTIARCH)/sys/$$i debian/$(1)/usr/include/sys/$$i; \ ++done ++mkdir -p debian/$(1)/usr/include/finclude; \ ++for i in `ls debian/tmp-libc/usr/include/finclude/$(DEB_HOST_MULTIARCH)`; do \ ++ ln -sf $(DEB_HOST_MULTIARCH)/$$i debian/$(1)/usr/include/finclude/$$i; \ ++done ++endef ++ ++ifneq ($(filter stage1,$(DEB_BUILD_PROFILES)),) ++ libc_extra_config_options = $(extra_config_options) --disable-sanity-checks \ ++ --enable-hacker-mode ++endif ++ ++ifdef WITH_SYSROOT ++ libc_extra_config_options += --with-headers=$(WITH_SYSROOT)/$(includedir) ++endif ++ ++$(stamp)config_sub_guess: $(stamp)patch ++ @echo Updating config.sub and config.guess ++ dh_update_autotools_config ++ touch $@ ++ ++$(patsubst %,mkbuilddir_%,$(GLIBC_PASSES)) :: mkbuilddir_% : $(stamp)mkbuilddir_% ++$(stamp)mkbuilddir_%: ++ @echo Making builddir for $(curpass) ++ test -d $(DEB_BUILDDIR) || mkdir -p $(DEB_BUILDDIR) ++ touch $@ ++ ++$(patsubst %,configure_%,$(GLIBC_PASSES)) :: configure_% : $(stamp)configure_% ++$(stamp)configure_%: $(stamp)config_sub_guess $(stamp)patch $(KERNEL_HEADER_DIR) $(stamp)mkbuilddir_% ++ @echo Configuring $(curpass) ++ rm -f $(DEB_BUILDDIR)/configparms ++ echo "MIG = $(call xx,MIG)" >> $(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 ++ifeq (,$(filter stage1 stage2,$(DEB_BUILD_PROFILES))) ++ if [ "$(curpass)" = "libc" ]; then \ ++ echo "LIBGD = yes" >> $(DEB_BUILDDIR)/configparms; \ ++ else \ ++ echo "LIBGD = no" >> $(DEB_BUILDDIR)/configparms; \ ++ fi ++else ++ echo "LIBGD = no" >> $(DEB_BUILDDIR)/configparms ++endif ++ echo "bindir = $(bindir)" >> $(DEB_BUILDDIR)/configparms ++ echo "datadir = $(datadir)" >> $(DEB_BUILDDIR)/configparms ++ echo "complocaledir = $(complocaledir)" >> $(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 "vardbdir = $(vardbdir)" >> $(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 ++ ++ # Define the installation directory for all calls to make. This avoid ++ # broken glibc makefiles to spuriously trigger install rules trying to ++ # overwrite system headers. ++ echo "install_root = $(CURDIR)/debian/tmp-$(curpass)" >> $(DEB_BUILDDIR)/configparms ++ ++ # Per architecture debian specific tests whitelist ++ echo "include $(CURDIR)/debian/testsuite-xfail-debian.mk" >> $(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; \ ++ echo -n "Build started: " ; date --rfc-2822; \ ++ echo "---------------"; \ ++ cd $(DEB_BUILDDIR) && \ ++ CC="$(call xx,CC)" \ ++ CXX=$(if $(filter nocheck,$(DEB_BUILD_OPTIONS)),:,"$(call xx,CXX)") \ ++ MIG="$(call xx,MIG)" \ ++ AUTOCONF=false \ ++ MAKEINFO=: \ ++ $(CURDIR)/configure \ ++ --host=$(call xx,configure_target) \ ++ --build=$$configure_build --prefix=/usr \ ++ --enable-add-ons=$(standard-add-ons)"$(call xx,add-ons)" \ ++ --without-selinux \ ++ --enable-stackguard-randomization \ ++ --enable-stack-protector=strong \ ++ --enable-obsolete-rpc \ ++ --with-default-link=no \ ++ --with-pkgversion="Debian GLIBC $(DEB_VERSION)" \ ++ --with-bugurl="http://www.debian.org/Bugs/" \ ++ $(if $(filter $(pt_chown),yes),--enable-pt_chown) \ ++ $(if $(filter $(threads),no),--disable-nscd) \ ++ $(if $(filter $(call xx,mvec),no),--disable-mathvec) \ ++ $(if $(filter $(call xx,crypt),no),--disable-crypt) \ ++ $(call xx,with_headers) $(call xx,extra_config_options) ++ touch $@ ++ ++$(patsubst %,build_%,$(GLIBC_PASSES)) :: build_% : $(stamp)build_% ++$(stamp)build_%: $(stamp)configure_% ++ @echo Building $(curpass) ++ ++ifneq ($(filter stage1,$(DEB_BUILD_PROFILES)),) ++ $(MAKE) cross-compiling=yes -C $(DEB_BUILDDIR) $(NJOBS) csu/subdir_lib ++else ++ $(MAKE) -C $(DEB_BUILDDIR) $(NJOBS) ++ echo "---------------" ++ echo -n "Build ended: " ; date --rfc-2822 ++endif ++ touch $@ ++ ++$(patsubst %,check_%,$(GLIBC_PASSES)) :: check_% : $(stamp)check_% ++$(stamp)check_%: $(stamp)build_% ++ @set -e ; \ ++ if [ -n "$(filter nocheck,$(DEB_BUILD_OPTIONS))" ]; then \ ++ echo "Tests have been disabled via DEB_BUILD_OPTIONS." ; \ ++ 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." ; \ ++ elif ! $(call kernel_check,$(call xx,MIN_KERNEL_SUPPORTED)); then \ ++ echo "Kernel too old, tests have been skipped." ; \ ++ elif [ $(call xx,RUN_TESTSUITE) != "yes" ]; then \ ++ echo "Testsuite disabled for $(curpass), skipping tests."; \ ++ else \ ++ find $(DEB_BUILDDIR) -name '*.out' -delete ; \ ++ LD_PRELOAD="" LANG="" LANGUAGE="" TIMEOUTFACTOR="$(TIMEOUTFACTOR)" $(MAKE) -C $(DEB_BUILDDIR) $(NJOBS) check || true ; \ ++ if ! test -f $(DEB_BUILDDIR)/tests.sum ; then \ ++ echo "+---------------------------------------------------------------------+" ; \ ++ echo "| Testsuite failed to build. |" ; \ ++ echo "+---------------------------------------------------------------------+" ; \ ++ exit 1 ; \ ++ fi ; \ ++ echo "+---------------------------------------------------------------------+" ; \ ++ echo "| Testsuite summary |" ; \ ++ echo "+---------------------------------------------------------------------+" ; \ ++ grep -E '^(FAIL|XFAIL|XPASS):' $(DEB_BUILDDIR)/tests.sum | sort ; \ ++ for test in $$(sed -e '/^\(FAIL\|XFAIL\): /!d;s/^.*: //' $(DEB_BUILDDIR)/tests.sum) ; do \ ++ echo "----------" ; \ ++ cat $(DEB_BUILDDIR)/$$test.test-result ; \ ++ if test -f $(DEB_BUILDDIR)/$$test.out ; then \ ++ cat $(DEB_BUILDDIR)/$$test.out ; \ ++ fi ; \ ++ echo "----------" ; \ ++ done ; \ ++ if grep -q '^FAIL:' $(DEB_BUILDDIR)/tests.sum ; then \ ++ echo "+---------------------------------------------------------------------+" ; \ ++ echo "| Encountered regressions that don't match expected failures. |" ; \ ++ echo "+---------------------------------------------------------------------+" ; \ ++ grep -E '^FAIL:' $(DEB_BUILDDIR)/tests.sum | sort ; \ ++ if ! dpkg-parsechangelog | egrep -q '^Version:.*\+deb[0-9]+u[0-9]+' ; then \ ++ exit 1 ; \ ++ fi ; \ ++ else \ ++ echo "+---------------------------------------------------------------------+" ; \ ++ echo "| Passed regression testing. Give yourself a hearty pat on the back. |" ; \ ++ echo "+---------------------------------------------------------------------+" ; \ ++ fi ; \ ++ fi ++ touch $@ ++ ++# Make sure to use the just built iconvconfig for native builds. When ++# cross-compiling use the system iconvconfig. A cross-specific ++# build-dependency makes sure that the correct version is used, as ++# the format might change between upstream versions. ++ifeq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH)) ++ICONVCONFIG = $(CURDIR)/$(DEB_BUILDDIRLIBC)/elf/ld.so --library-path $(CURDIR)/$(DEB_BUILDDIRLIBC) \ ++ $(CURDIR)/$(DEB_BUILDDIRLIBC)/iconv/iconvconfig ++else ++ICONVCONFIG = /usr/sbin/iconvconfig ++endif ++ ++$(patsubst %,install_%,$(GLIBC_PASSES)) :: install_% : $(stamp)install_% ++$(stamp)install_%: $(stamp)build_% ++ @echo Installing $(curpass) ++ rm -rf $(CURDIR)/debian/tmp-$(curpass) ++ifneq ($(filter stage1,$(DEB_BUILD_PROFILES)),) ++ $(MAKE) -C $(DEB_BUILDDIR) $(NJOBS) \ ++ cross-compiling=yes install_root=$(CURDIR)/debian/tmp-$(curpass) \ ++ install-bootstrap-headers=yes install-headers ++ ++ install -d $(CURDIR)/debian/tmp-$(curpass)/$(call xx,libdir) ++ install -m 644 $(DEB_BUILDDIR)/csu/crt[01in].o $(CURDIR)/debian/tmp-$(curpass)/$(call xx,libdir)/. ++ $(call xx,CC) -nostdlib -nostartfiles -shared -x c /dev/null \ ++ -o $(CURDIR)/debian/tmp-$(curpass)/$(call xx,libdir)/libc.so ++else ++ : # FIXME: why just needed for ARM multilib? ++ case "$(curpass)" in \ ++ armhf) \ ++ libgcc_dirs=/lib/arm-linux-gnueabihf; \ ++ if [ -n "$$WITH_BUILD_SYSROOT" ]; then \ ++ libgcc_dirs="$$WITH_BUILD_SYSROOT/usr/arm-linux-gnueabi/lib/arm-linux-gnueabihf $$WITH_BUILD_SYSROOT/usr/lib/gcc-cross/arm-linux-gnueabi/4.7/hf"; \ ++ fi; \ ++ ;; \ ++ armel) \ ++ libgcc_dirs=/lib/arm-linux-gnueabi; \ ++ if [ -n "$$WITH_BUILD_SYSROOT" ]; then \ ++ libgcc_dirs="$$WITH_BUILD_SYSROOT/usr/arm-linux-gnueabihf/lib/arm-linux-gnueabi $$WITH_BUILD_SYSROOT/usr/lib/gcc-cross/arm-linux-gnueabihf/4.7/sf"; \ ++ fi; \ ++ ;; \ ++ esac; \ ++ if [ -n "$$libgcc_dirs" ]; then \ ++ for d in $$libgcc_dirs; do \ ++ if [ -f $$d/libgcc_s.so.1 ]; then \ ++ cp -p $$d/libgcc_s.so.1 $(DEB_BUILDDIR)/; \ ++ break; \ ++ fi; \ ++ done; \ ++ fi ++ $(MAKE) -C $(DEB_BUILDDIR) \ ++ install_root=$(CURDIR)/debian/tmp-$(curpass) install ++ ++ # Generate gconv-modules.cache ++ case $(curpass)-$(call xx,slibdir) in libc-* | *-/lib32 | *-/lib64 | *-/libo32 | *-/libx32) \ ++ $(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 ++ ++ # Remove yppasswd.h and yppasswd.x as they are shipped by libnsl-dev ++ # This could probably be removed once we stop using --enable-obsolete-rpc. ++ rm $(CURDIR)/debian/tmp-$(curpass)/usr/include/rpcsvc/yppasswd.h ++ rm $(CURDIR)/debian/tmp-$(curpass)/usr/include/rpcsvc/yppasswd.x ++ ++ifeq ($(DEB_HOST_ARCH_OS),linux) ++ # Install the Python pretty printers ++ mkdir -p $(CURDIR)/debian/tmp-$(curpass)/usr/share/gdb/auto-load/$(call xx,slibdir) ++ perl -pe 'BEGIN {undef $$/; open(IN, "$(DEB_BUILDDIR)/nptl/nptl_lock_constants.py"); $$j=;} s/from nptl_lock_constants import \*/$$j/g;' \ ++ $(CURDIR)/nptl/nptl-printers.py > $(CURDIR)/debian/tmp-$(curpass)/usr/share/gdb/auto-load/$(call xx,slibdir)/libpthread-$(GLIBC_VERSION).so-gdb.py ++endif ++endif ++ ++ # 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_MULTIARCH).conf"; \ ++ echo "# Multiarch support" > $$conffile; \ ++ echo "/usr/local/lib/$(DEB_HOST_MULTIARCH)" >> $$conffile; \ ++ echo "$(call xx,slibdir)" >> $$conffile; \ ++ echo "$(call xx,libdir)" >> $$conffile; \ ++ if [ "$(DEB_HOST_GNU_TYPE)" != "$(DEB_HOST_MULTIARCH)" ]; then \ ++ echo "/usr/local/lib/$(DEB_HOST_GNU_TYPE)" >> $$conffile; \ ++ 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); \ ++ mkdir -p debian/tmp-$(curpass)/usr/include/finclude/$(DEB_HOST_MULTIARCH); \ ++ mv debian/tmp-$(curpass)/usr/include/finclude/math-vector-fortran.h debian/tmp-$(curpass)/usr/include/finclude/$(DEB_HOST_MULTIARCH); \ ++ fi ++ ++ifeq ($(filter stage1,$(DEB_BUILD_PROFILES)),) ++ # 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 | /libo32 | /libx32) \ ++ 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 in the slibdir directory, otherwise it will get ++ # created later by ldconfig, leading to a dangling symlink when the package ++ # is removed ++ ld_so="$$(ls debian/tmp-$(curpass)/$(call xx,slibdir)/ld-*.so)" ; \ ++ soname="$$(LANG=C LC_ALL=C readelf -d $$ld_so | grep 'Library soname:' | sed -e 's/.*Library soname: \[\(.*\)\]/\1/g')" ; \ ++ target="$$(basename $$ld_so)" ; \ ++ link_name="debian/tmp-$(curpass)/$(call xx,slibdir)/$$soname" ; \ ++ ln -sf $$target $$link_name ++ ++ $(call xx,extra_install) ++endif ++ touch $@ ++ ++# ++# Make sure to use the just built localedef for native builds. When ++# cross-compiling use the system localedef passing --little-endian ++# or --big-endian to select the correct endianess. A cross-specific ++# build-dependency makes sure that the correct version is used, as ++# the format might change between upstream versions. ++# ++ifeq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH)) ++LOCALEDEF = I18NPATH=$(CURDIR)/localedata \ ++ GCONV_PATH=$(CURDIR)/$(DEB_BUILDDIRLIBC)/iconvdata \ ++ LC_ALL=C \ ++ $(CURDIR)/$(DEB_BUILDDIRLIBC)/elf/ld.so --library-path $(CURDIR)/$(DEB_BUILDDIRLIBC) \ ++ $(CURDIR)/$(DEB_BUILDDIRLIBC)/locale/localedef ++else ++LOCALEDEF = I18NPATH=$(CURDIR)/localedata \ ++ GCONV_PATH=$(CURDIR)/$(DEB_BUILDDIRLIBC)/iconvdata \ ++ LC_ALL=C \ ++ localedef --$(DEB_HOST_ARCH_ENDIAN)-endian ++endif ++ ++$(stamp)build_C.UTF-8: $(stamp)/build_libc ++ $(LOCALEDEF) --quiet -c -f UTF-8 -i C $(CURDIR)/build-tree/C.UTF-8 ++ touch $@ ++ ++$(stamp)build_locales-all: $(stamp)/build_libc ++ $(MAKE) -C $(DEB_BUILDDIRLIBC) $(NJOBS) \ ++ objdir=$(DEB_BUILDDIRLIBC) \ ++ install_root=$(CURDIR)/build-tree/locales-all \ ++ localedata/install-locale-files LOCALEDEF="$(LOCALEDEF)" ++ rdfind -outputname /dev/null -makesymlinks true -removeidentinode false \ ++ $(CURDIR)/build-tree/locales-all/usr/lib/locale ++ symlinks -r -s -c $(CURDIR)/build-tree/locales-all/usr/lib/locale ++ touch $@ ++ ++$(stamp)source: $(stamp)patch ++ mkdir -p $(build-tree) ++ find $(GLIBC_SOURCES) -print0 | \ ++ LC_ALL=C sort -z | \ ++ tar -c -J --null --no-recursion -T - \ ++ --mode=go=rX,u+rw,a-s \ ++ --clamp-mtime --mtime "@$(SOURCE_DATE_EPOCH)" \ ++ --owner=root --group=root --numeric-owner \ ++ --xform='s=^=glibc-$(GLIBC_VERSION)/=' \ ++ -f $(CURDIR)/$(build-tree)/glibc-$(GLIBC_VERSION).tar.xz ++ mkdir -p debian/glibc-source/usr/src/glibc ++ tar cf - --files-from debian/glibc-source.filelist \ ++ --clamp-mtime --mtime "@$(SOURCE_DATE_EPOCH)" \ ++ | tar -x -C debian/glibc-source/usr/src/glibc -f - ++ ++ touch $@ ++ ++.NOTPARALLEL: $(patsubst %,check_%,$(GLIBC_PASSES)) diff --cc debian/rules.d/control.mk index 000000000,000000000..4f04da26f new file mode 100644 --- /dev/null +++ b/debian/rules.d/control.mk @@@ -1,0 -1,0 +1,51 @@@ ++libc_packages := libc6 libc6.1 libc0.1 libc0.3 ++libc0_1_archs := kfreebsd-amd64 kfreebsd-i386 ++libc0_3_archs := hurd-i386 ++libc6_archs := amd64 arm64 armel armhf hppa i386 m68k mips mipsel mipsn32 mipsn32el mips64 mips64el mipsr6 mipsr6el \ ++ mipsn32r6 mipsn32r6el mips64r6 mips64r6el nios2 powerpc ppc64 ppc64el riscv64 \ ++ sparc sparc64 s390x sh3 sh4 x32 ++libc6_1_archs := alpha ia64 ++ ++control_deps := $(wildcard debian/control.in/*) $(addprefix debian/control.in/, $(libc_packages)) ++triggers := binutils, linux-libc-dev [linux-any], $(BASE_CC)$(DEB_GCC_VERSION) ++ ++$(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) debian/tests/control.in ++ ++ # 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/sparc >> $@T ++ cat debian/control.in/sparc64 >> $@T ++ cat debian/control.in/s390 >> $@T ++ cat debian/control.in/amd64 >> $@T ++ cat debian/control.in/powerpc >> $@T ++ cat debian/control.in/ppc64 >> $@T ++ cat debian/control.in/mips32 >> $@T ++ cat debian/control.in/mipsn32 >> $@T ++ cat debian/control.in/mips64 >> $@T ++# cat debian/control.in/armhf >> $@T ++# cat debian/control.in/armel >> $@T ++ cat debian/control.in/kfreebsd-i386 >> $@T ++ cat debian/control.in/x32 >> $@T ++ cat debian/control.in/opt >> $@T ++ sed -e 's%@libc@%$(libc)%g' -e 's%@GLIBC_VERSION@%$(GLIBC_VERSION)%g' < $@T > debian/control ++ rm $@T ++ ++ # And generate the tests control file with the current GCC ++ sed -e 's%@triggers@%$(triggers)%g' debian/tests/control.in > debian/tests/control ++ touch $@ diff --cc debian/rules.d/debhelper.mk index 000000000,000000000..2f33261c3 new file mode 100644 --- /dev/null +++ b/debian/rules.d/debhelper.mk @@@ -1,0 -1,0 +1,287 @@@ ++# 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)) ++ ++ifeq ($(filter stage1,$(DEB_BUILD_PROFILES)),) ++DH_STRIP_DEBUG_PACKAGE=--dbg-package=$(libc)-dbg ++endif ++ ++$(patsubst %,$(stamp)binaryinst_%,$(DEB_ARCH_REGULAR_PACKAGES) $(DEB_INDEP_REGULAR_PACKAGES)):: $(patsubst %,$(stamp)install_%,$(GLIBC_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_systemd_enable -p$(curpass) ++ dh_installinit -p$(curpass) ++ dh_systemd_start -p$(curpass) ++ dh_installdocs -p$(curpass) ++ dh_lintian -p $(curpass) ++ dh_link -p$(curpass) ++ dh_bugfiles -p$(curpass) ++ ++ # when you want to install extra packages, use extra_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. ++ if test "$(NOSTRIP_$(curpass))" != 1; then \ ++ if test "$(DEBUG_$(curpass))" = 1; then \ ++ dh_strip -p$(curpass) -Xlibpthread $(DH_STRIP_DEBUG_PACKAGE); \ ++ for f in $$(find debian/$(curpass) -name libpthread-\*.so) ; do \ ++ dbgfile=$$(LC_ALL=C readelf -n $$f | sed -e '/Build ID:/!d' \ ++ -e "s#^.*Build ID: \([0-9a-f]\{2\}\)\([0-9a-f]\+\)#\1/\2.debug#") ; \ ++ dbgpath=debian/$(libc)-dbg/usr/lib/debug/.build-id/$$dbgfile ; \ ++ mkdir -p $$(dirname $$dbgpath) ; \ ++ $(DEB_HOST_GNU_TYPE)-objcopy --only-keep-debug $$f $$dbgpath ; \ ++ $(DEB_HOST_GNU_TYPE)-objcopy --add-gnu-debuglink=$$dbgpath $$f ; \ ++ done ; \ ++ else \ ++ dh_strip -p$(curpass) -Xlibpthread; \ ++ fi ; \ ++ for f in $$(find debian/$(curpass) -name libpthread-\*.so) ; do \ ++ $(DEB_HOST_GNU_TYPE)-strip --strip-debug --remove-section=.comment \ ++ --remove-section=.note $$f ; \ ++ done ; \ ++ for f in $$(find debian/$(curpass) -name \*crt\*.o) ; do \ ++ $(DEB_HOST_GNU_TYPE)-strip --strip-debug --remove-section=.comment \ ++ --remove-section=.note $$f ; \ ++ done ; \ ++ 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 -Xgconv/ -p$(curpass) -V "$(call xx,shlib_dep)" ++ # Add relevant udeb: lines in shlibs files ++ sh ./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: ++ # - we slightly increase the compression level for locales-all as it ++ # contains highly compressible data ++ # - other packages use dpkg's default xz format ++ case $(curpass) in \ ++ 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_%,$(GLIBC_PASSES)) ++ @echo Running debhelper for $(curpass) ++ dh_testroot ++ dh_installdirs -p$(curpass) ++ dh_install -p$(curpass) ++ dh_strip -p$(curpass) ++ dh_link -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_%,$(GLIBC_PASSES)) ++$(stamp)debhelper-common: ++ for x in `find debian/debhelper.in -maxdepth 1 -type f`; do \ ++ y=debian/`basename $$x`; \ ++ perl -p \ ++ -e 'BEGIN {undef $$/; open(IN, "debian/script.in/nsscheck.sh"); $$j=;} s/__NSS_CHECK__/$$j/g;' \ ++ -e 'BEGIN {undef $$/; open(IN, "debian/script.in/nohwcap.sh"); $$k=;} s/__NOHWCAP__/$$k/g;' \ ++ -e 'BEGIN {undef $$/; open(IN, "debian/tmp-libc/usr/share/i18n/SUPPORTED"); $$l=;} s/__PROVIDED_LOCALES__/$$l/g;' \ ++ -e 's#GLIBC_VERSION#$(GLIBC_VERSION)#g;' \ ++ -e 's#CURRENT_VER#$(DEB_VERSION)#g;' \ ++ -e 's#BUILD-TREE#$(build-tree)#g;' \ ++ -e 's#LIBC#$(libc)#g;' \ ++ -e 's#DEB_HOST_ARCH#$(DEB_HOST_ARCH)#g;' \ ++ $$x > $$y ; \ ++ case $$y in \ ++ *.install) \ ++ sed -e "s/^#.*//" -i $$y ; \ ++ $(if $(filter $(pt_chown),no),sed -e "/pt_chown/d" -i $$y ;) \ ++ $(if $(filter $(pldd),no),sed -e "/pldd/d" -i $$y ;) \ ++ ;; \ ++ esac; \ ++ done ++ ++ # Install nscd systemd files on linux ++ifeq ($(DEB_HOST_ARCH_OS),linux) ++ cp nscd/nscd.service debian/nscd.service ++ cp nscd/nscd.tmpfiles debian/nscd.tmpfile ++endif ++ ++ # Generate common substvars files. ++ : > tmp.substvars ++ifeq ($(filter stage1 stage2,$(DEB_BUILD_PROFILES)),) ++ echo 'libgcc:Depends=libgcc-s1 [!hppa !m68k], libgcc-s2 [m68k], libgcc-s4 [hppa]' >> tmp.substvars ++ echo 'libcrypt:Depends=libcrypt1' >> tmp.substvars ++ echo 'libcrypt-dev:Depends=libcrypt-dev' >> tmp.substvars ++ echo 'libnsl-dev:Depends=libnsl-dev' >> tmp.substvars ++ echo 'libc-dev:Breaks=$(libc)-dev-$(DEB_HOST_ARCH)-cross (<< $(GLIBC_VERSION)~)' >> tmp.substvars ++endif ++ 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 $@ ++ ++ifneq ($(filter stage1,$(DEB_BUILD_PROFILES)),) ++$(patsubst %,debhelper_%,$(GLIBC_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) ; \ ++ templates="libc-dev" ;\ ++ pass="" ; \ ++ suffix="" ;\ ++ case "$$curpass:$$slibdir" in \ ++ libc:*) \ ++ ;; \ ++ *:/lib32 | *:/lib64 | *:/libo32 | *:/libx32 | *:/lib/arm-linux-gnueabi*) \ ++ pass="-alt" \ ++ suffix="-$(curpass)" \ ++ ;; \ ++ *:* ) \ ++ templates="" \ ++ ;; \ ++ esac ; \ ++ for t in $$templates ; do \ ++ for s in debian/$$t$$pass.* ; do \ ++ t=`echo $$s | sed -e "s#libc\(.*\)$$pass#$(libc)\1$$suffix#"` ; \ ++ echo "Generating $$t ..."; \ ++ if [ "$$s" != "$$t" ] ; then \ ++ cp $$s $$t ; \ ++ fi ; \ ++ sed -i \ ++ -e "/LIBDIR.*\.a /d" \ ++ -e "s#TMPDIR#debian/tmp-$$curpass#g" \ ++ -e "s#RTLDDIR#$$rtlddir#g" \ ++ -e "s#SLIBDIR#$$slibdir#g" \ ++ -e "s#LIBDIR#$$libdir#g" \ ++ -e "/gdb/d" \ ++ $$t; \ ++ done ; \ ++ done ++else ++$(patsubst %,debhelper_%,$(GLIBC_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-udeb" \ ++ pass="" \ ++ suffix="" \ ++ ;; \ ++ *:/lib32 | *:/lib64 | *:/libo32 | *:/libx32 | *:/lib/arm-linux-gnueabi*) \ ++ 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 ; \ ++ sed -e "s#MULTIARCHDIR#$$DEB_HOST_MULTIARCH#g" -i $$t ; \ ++ $(if $(filter $(call xx,mvec),no),sed -e "/libmvec/d" -e "/libm-\*\.a/d" -i $$t ;) \ ++ $(if $(filter $(call xx,crypt),no),sed -e "/libcrypt/d" -i $$t ;) \ ++ $(if $(filter-out $(DEB_HOST_ARCH_OS),linux),sed -e "/gdb/d" -i $$t ;) \ ++ done ; \ ++ done ++endif ++ ++ 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 debian/*.triggers ++ rm -f debian/*.service ++ rm -f debian/*.tmpfile ++ ++ rm -f $(stamp)binaryinst* diff --cc debian/rules.d/info.mk index 000000000,000000000..fe50e2083 new file mode 100644 --- /dev/null +++ b/debian/rules.d/info.mk @@@ -1,0 -1,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 $@ diff --cc debian/rules.d/quilt.mk index 000000000,000000000..068111bd6 new file mode 100644 --- /dev/null +++ b/debian/rules.d/quilt.mk @@@ -1,0 -1,0 +1,45 @@@ ++# 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 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) applied >/dev/null 2>&1; then \ ++ echo "Unapplying architecture specific patches..."; \ ++ QUILT_PC="$$pc" $(QUILT) pop -a -v ; \ ++ fi ; \ ++ rm -rf $$pc ; \ ++ fi ++ rm -f $(stamp)patch ++ ++refresh: unpatch ++ @if $(QUILT) applied >/dev/null 2>&1; then \ ++ echo "Unapplying Debian patches..." ; \ ++ $(QUILT) pop -a -v ; \ ++ fi ++ @while $(QUILT) next ; do \ ++ $(QUILT) push ; \ ++ $(QUILT) refresh ; \ ++ done ; \ ++ $(QUILT) pop -a diff --cc debian/rules.d/tarball.mk index 000000000,000000000..f17c740b0 new file mode 100644 --- /dev/null +++ b/debian/rules.d/tarball.mk @@@ -1,0 -1,0 +1,25 @@@ ++GLIBC_GIT = https://sourceware.org/git/glibc.git ++GLIBC_BRANCH = release/$(GLIBC_VERSION)/master ++GLIBC_TAG = glibc-$(GLIBC_VERSION) ++GLIBC_CHECKOUT = glibc-checkout ++GLIBC_DIR = glibc-$(GLIBC_VERSION) ++DEB_ORIG = ../glibc_$(GLIBC_VERSION).orig.tar.xz ++GIT_UPDATES_DIFF = debian/patches/git-updates.diff ++ ++get-orig-source: $(DEB_ORIG) ++$(DEB_ORIG): ++ dh_testdir ++ git clone --bare $(GLIBC_GIT) $(GLIBC_CHECKOUT) ++ mkdir -p $(GLIBC_DIR) ++ (cd $(GLIBC_CHECKOUT) && git archive -v --format=tar $(GLIBC_TAG)) | tar -C $(GLIBC_DIR) -xf - ++ rm -fr $(GLIBC_DIR)/manual ++ tar --mode=go=rX,u+rw,a-s --owner=root --group=root --numeric-owner -Jcf $(DEB_ORIG) $(GLIBC_DIR) ++ rm -rf $(GLIBC_DIR) $(GLIBC_CHECKOUT) ++ ++update-from-upstream: ++ dh_testdir ++ git clone --bare $(GLIBC_GIT) $(GLIBC_CHECKOUT) ++ echo "GIT update of $(GLIBC_GIT)/$(GLIBC_BRANCH) from $(GLIBC_TAG)" > $(GIT_UPDATES_DIFF) ++ echo "" >> $(GIT_UPDATES_DIFF) ++ (cd $(GLIBC_CHECKOUT) && git diff --no-renames $(GLIBC_TAG) $(GLIBC_BRANCH) -- . ':!manual') >> $(GIT_UPDATES_DIFF) ++ rm -rf $(GLIBC_CHECKOUT) diff --cc debian/script.in/nohwcap.sh index 000000000,000000000..be7c175b6 new file mode 100644 --- /dev/null +++ b/debian/script.in/nohwcap.sh @@@ -1,0 -1,0 +1,22 @@@ ++ # 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. ++ ++ # We check the version between the current installed libc and ++ # all optimized packages. Due to multiarch, this has to be done ++ # independently of the architecture of the package. ++ all_upgraded=yes ++ for pkg in libc6.1-alphaev67 libc6-xen ; do ++ ver=$(dpkg-query -l $pkg 2>/dev/null | sed -e '/^[a-z][a-z]\s/!d;/^.[nc]/d;' -e "s/^..\s\+$pkg[0-9a-z:]*\s\+//;s/\s.*//g") ++ if [ -n "$ver" ] && [ "$ver" != "CURRENT_VER" ]; then ++ all_upgraded=no ++ fi ++ done ++ ++ # 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 "$DPKG_ROOT/etc/ld.so.nohwcap" ++ fi diff --cc debian/script.in/nsscheck.sh index 000000000,000000000..7e21b8e4b new file mode 100644 --- /dev/null +++ b/debian/script.in/nsscheck.sh @@@ -1,0 -1,0 +1,31 @@@ ++ echo -n "Checking for services that may need to be restarted..." ++ # Only get the ones that are installed, of the same architecture ++ # as libc (or arch all) and configured. Restart openssh-server even ++ # if only half-configured to continue accepting new connections ++ # during the upgrade. ++ check=$(dpkg-query -W -f='${binary:Package} ${Status} ${Architecture}\n' $check 2> /dev/null | \ ++ grep -E "(^openssh-server .* unpacked|installed) (all|${DPKG_MAINTSCRIPT_ARCH})$" | sed 's/[: ].*//') ++ # 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/\bopenssh-server\b/ssh/g' \ ++ -e's/\bsasl2-bin\b/saslauthd/g' \ ++ -e's/\bsamba\b/smbd/g' \ ++ -e's/\bpostgresql-common\b/postgresql/g' \ ++ ) ++ echo ++ echo "Checking init scripts..." ++ for service in $check; do ++ 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 ++ done diff --cc debian/shlibs-add-udebs index 000000000,000000000..f18e4c98e new file mode 100755 --- /dev/null +++ b/debian/shlibs-add-udebs @@@ -1,0 -1,0 +1,49 @@@ ++#! /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 . ++ ++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 librt$W libpthread$W libmvec$W" ++expr_libc3="libnss_dns$W libnss_files$W" ++expr_hurd="libmachuser$W libhurduser$W" ++ ++# Remove udeb entries wrongly added by dh_makeshlibs (see bugs #934889 ++# and #934891) ++sed -i -e '/^udeb:/d' $shlibs_file ++ ++for expr in $expr_libc1 $expr_libc2 $expr_libc3 $expr_hurd; do ++ add_udeb_line "$expr" $package-udeb ++done diff --cc debian/source/format index 000000000,000000000..163aaf8d8 new file mode 100644 --- /dev/null +++ b/debian/source/format @@@ -1,0 -1,0 +1,1 @@@ ++3.0 (quilt) diff --cc debian/source/lintian-overrides index 000000000,000000000..aff4c8194 new file mode 100644 --- /dev/null +++ b/debian/source/lintian-overrides @@@ -1,0 -1,0 +1,8 @@@ ++glibc source: debhelper-but-no-misc-depends libc0.1 ++glibc source: debhelper-but-no-misc-depends libc6 ++glibc source: debhelper-but-no-misc-depends libc6.1 ++glibc source: debhelper-but-no-misc-depends libc0.3 ++glibc source: license-problem-non-free-RFC debian/copyright ++glibc source: license-problem-non-free-RFC LICENSES ++glibc source: license-problem-non-free-RFC libidn/punycode.c ++glibc source: license-problem-non-free-RFC libidn/punycode.h diff --cc debian/symbols.wildcards index 000000000,000000000..5812217dd new file mode 100644 --- /dev/null +++ b/debian/symbols.wildcards @@@ -1,0 -1,0 +1,49 @@@ ++| #PACKAGE# (>> 2.31), #PACKAGE# (<< 2.32) ++ (symver|optional)GLIBC_PRIVATE 0 1 ++ (symver|optional)GLIBC_2.0 2.0 ++ (symver|optional)GLIBC_2.1 2.1 ++ (symver|optional)GLIBC_2.1.1 2.1.1 ++ (symver|optional)GLIBC_2.1.2 2.1.2 ++ (symver|optional)GLIBC_2.1.3 2.1.3 ++ (symver|optional)GLIBC_2.1.4 2.1.4 ++ (symver|optional)GLIBC_2.2 2.2 ++ (symver|optional)GLIBC_2.2.1 2.2.1 ++ (symver|optional)GLIBC_2.2.2 2.2.2 ++ (symver|optional)GLIBC_2.2.3 2.2.3 ++ (symver|optional)GLIBC_2.2.4 2.2.4 ++ (symver|optional)GLIBC_2.2.5 2.2.5 ++ (symver|optional)GLIBC_2.2.6 2.2.6 ++ (symver|optional)GLIBC_2.3 2.3 ++ (symver|optional)GLIBC_2.3.1 2.3.1 ++ (symver|optional)GLIBC_2.3.2 2.3.2 ++ (symver|optional)GLIBC_2.3.3 2.3.3 ++ (symver|optional)GLIBC_2.3.4 2.3.4 ++ (symver|optional)GLIBC_2.4 2.4 ++ (symver|optional)GLIBC_2.5 2.5 ++ (symver|optional)GLIBC_2.6 2.6 ++ (symver|optional)GLIBC_2.7 2.7 ++ (symver|optional)GLIBC_2.8 2.8 ++ (symver|optional)GLIBC_2.9 2.9 ++ (symver|optional)GLIBC_2.10 2.10 ++ (symver|optional)GLIBC_2.11 2.11 ++ (symver|optional)GLIBC_2.12 2.12 ++ (symver|optional)GLIBC_2.13 2.13 ++ (symver|optional)GLIBC_2.14 2.14 ++ (symver|optional)GLIBC_2.15 2.15 ++ (symver|optional)GLIBC_2.16 2.16 ++ (symver|optional)GLIBC_2.17 2.17 ++ (symver|optional)GLIBC_2.18 2.18 ++ (symver|optional)GLIBC_2.19 2.19 ++ (symver|optional)GLIBC_2.20 2.20 ++ (symver|optional)GLIBC_2.21 2.21 ++ (symver|optional)GLIBC_2.22 2.22 ++ (symver|optional)GLIBC_2.23 2.23 ++ (symver|optional)GLIBC_2.24 2.24 ++ (symver|optional)GLIBC_2.25 2.25 ++ (symver|optional)GLIBC_2.26 2.26 ++ (symver|optional)GLIBC_2.27 2.27 ++ (symver|optional)GLIBC_2.28 2.28 ++ (symver|optional)GLIBC_2.29 2.29 ++ (symver|optional)GLIBC_2.30 2.30 ++ (symver|optional)GLIBC_2.31 2.31 ++ (symver|optional)GCC_3.0 2.3.6 diff --cc debian/sysdeps/alpha.mk index 000000000,000000000..b88d7ce3d new file mode 100644 --- /dev/null +++ b/debian/sysdeps/alpha.mk @@@ -1,0 -1,0 +1,12 @@@ ++# configuration options for all flavours ++libc = libc6.1 ++ ++ifeq (,$(filter stage1 stage2, $(DEB_BUILD_PROFILES))) ++# build an ev67 optimized library ++GLIBC_PASSES += alphaev67 ++DEB_ARCH_REGULAR_PACKAGES += libc6.1-alphaev67 ++alphaev67_configure_target = alphaev67-linux-gnu ++alphaev67_CC = $(CC) -mcpu=ev67 -mtune=ev67 ++alphaev67_CXX = $(CXX) -mcpu=ev67 -mtune=ev67 ++alphaev67_slibdir = /lib/$(DEB_HOST_MULTIARCH)/ev67 ++endif diff --cc debian/sysdeps/amd64.mk index 000000000,000000000..a7f4ecd4a new file mode 100644 --- /dev/null +++ b/debian/sysdeps/amd64.mk @@@ -1,0 -1,0 +1,53 @@@ ++# configuration options for all flavours ++extra_config_options = --enable-multi-arch --enable-static-pie ++ ++# main library ++libc_mvec = yes ++libc_rtlddir = /lib64 ++ ++# multilib flavours ++ifeq (,$(filter nobiarch, $(DEB_BUILD_PROFILES))) ++ ++# build 32-bit (i386) alternative library ++GLIBC_PASSES += i386 ++DEB_ARCH_MULTILIB_PACKAGES += libc6-i386 libc6-dev-i386 ++libc6-i386_shlib_dep = libc6-i386 (>= $(shlib_dep_ver)) ++i386_configure_target = i686-linux-gnu ++i386_CC = $(CC) -m32 ++i386_CXX = $(CXX) -m32 ++i386_slibdir = /lib32 ++i386_libdir = /usr/lib32 ++ ++define libc6-dev-i386_extra_pkg_install ++ ++$(call generic_multilib_extra_pkg_install,libc6-dev-i386) ++ ++mkdir -p debian/libc6-dev-i386/usr/include/x86_64-linux-gnu/gnu ++cp -a debian/tmp-i386/usr/include/gnu/lib-names-32.h \ ++ debian/tmp-i386/usr/include/gnu/stubs-32.h \ ++ debian/libc6-dev-i386/usr/include/x86_64-linux-gnu/gnu ++ ++endef ++ ++# build x32 ABI alternative library ++GLIBC_PASSES += x32 ++DEB_ARCH_MULTILIB_PACKAGES += libc6-x32 libc6-dev-x32 ++libc6-x32_shlib_dep = libc6-x32 (>= $(shlib_dep_ver)) ++x32_configure_target = x86_64-linux-gnux32 ++x32_CC = $(CC) -mx32 ++x32_CXX = $(CXX) -mx32 ++x32_mvec = yes ++x32_rtlddir = /libx32 ++x32_slibdir = /libx32 ++x32_libdir = /usr/libx32 ++ ++define libc6-dev-x32_extra_pkg_install ++ ++mkdir -p debian/libc6-dev-x32/usr/include/x86_64-linux-gnu/gnu ++cp -a debian/tmp-x32/usr/include/gnu/lib-names-x32.h \ ++ debian/tmp-x32/usr/include/gnu/stubs-x32.h \ ++ debian/libc6-dev-x32/usr/include/x86_64-linux-gnu/gnu/ ++ ++endef ++ ++endif # multilib diff --cc debian/sysdeps/arm64.mk index 000000000,000000000..7f4ef7d9d new file mode 100644 --- /dev/null +++ b/debian/sysdeps/arm64.mk @@@ -1,0 -1,0 +1,2 @@@ ++# configuration options for all flavours ++extra_config_options = --enable-multi-arch --enable-static-pie diff --cc debian/sysdeps/armel.mk index 000000000,000000000..4a68418e8 new file mode 100644 --- /dev/null +++ b/debian/sysdeps/armel.mk @@@ -1,0 -1,0 +1,32 @@@ ++# configuration options for all flavours ++extra_config_options = --enable-multi-arch ++ ++# multilib flavours ++ifeq (,$(filter nobiarch, $(DEB_BUILD_PROFILES))) ++ ++# build hard-float (armhf) alternative library ++#GLIBC_PASSES += armhf ++#DEB_ARCH_MULTILIB_PACKAGES += libc6-armhf libc6-dev-armhf ++#armhf_configure_target = arm-linux-gnueabihf ++#armhf_CC = $(CC) -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard ++#armhf_CXX = $(CXX) -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard ++#armhf_slibdir = /lib/arm-linux-gnueabihf ++#armhf_libdir = /usr/lib/arm-linux-gnueabihf ++# ++#define libc6-dev-armhf_extra_pkg_install ++# ++#$(call generic_multilib_extra_pkg_install,libc6-dev-armhf) ++# ++#mkdir -p debian/libc6-dev-armhf/usr/include/arm-linux-gnueabi/gnu ++#cp -a debian/tmp-armhf/usr/include/gnu/lib-names-hard.h \ ++# debian/tmp-armhf/usr/include/gnu/stubs-hard.h \ ++# debian/libc6-dev-armhf/usr/include/arm-linux-gnueabi/gnu ++# ++#endef ++# ++#define libc6-armhf_extra_pkg_install ++#mkdir -p debian/libc6-armhf$(armhf_slibdir) ++#ln -sf ld-linux-armhf.so.3 debian/libc6-armhf$(armhf_slibdir)/ld-linux.so.3 ++#endef ++ ++endif # multilib diff --cc debian/sysdeps/armhf.mk index 000000000,000000000..a8f10d622 new file mode 100644 --- /dev/null +++ b/debian/sysdeps/armhf.mk @@@ -1,0 -1,0 +1,38 @@@ ++# configuration options for all flavours ++extra_config_options = --enable-multi-arch ++ ++# 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 ++ ++# multilib flavours ++ifeq (,$(filter nobiarch, $(DEB_BUILD_PROFILES))) ++ ++# build soft-float (armel) alternative library ++#GLIBC_PASSES += armel ++#DEB_ARCH_MULTILIB_PACKAGES += libc6-armel libc6-dev-armel ++#armel_configure_target = arm-linux-gnueabi ++#armel_CC = $(CC) -mfloat-abi=soft ++#armel_CXX = $(CXX) -mfloat-abi=soft ++#armel_slibdir = /lib/arm-linux-gnueabi ++#armel_libdir = /usr/lib/arm-linux-gnueabi ++# ++#define libc6-dev-armel_extra_pkg_install ++# ++#$(call generic_multilib_extra_pkg_install,libc6-dev-armel) ++# ++#mkdir -p debian/libc6-dev-armel/usr/include/arm-linux-gnueabihf/gnu ++#cp -a debian/tmp-armel/usr/include/gnu/lib-names-soft.h \ ++# debian/tmp-armel/usr/include/gnu/stubs-soft.h \ ++# debian/libc6-dev-armel/usr/include/arm-linux-gnueabihf/gnu ++# ++#endef ++ ++endif # multilib diff --cc debian/sysdeps/hppa.mk index 000000000,000000000..e644c5011 new file mode 100644 --- /dev/null +++ b/debian/sysdeps/hppa.mk @@@ -1,0 -1,0 +1,14 @@@ ++# HPPA build daemons are very slow ++TIMEOUTFACTOR=600 ++ ++# 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 ++ diff --cc debian/sysdeps/hurd-i386.mk index 000000000,000000000..cc1a95922 new file mode 100644 --- /dev/null +++ b/debian/sysdeps/hurd-i386.mk @@@ -1,0 -1,0 +1,32 @@@ ++ifeq (,$(filter stage1 stage2, $(DEB_BUILD_PROFILES))) ++# 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. ++GLIBC_PASSES += xen ++DEB_ARCH_REGULAR_PACKAGES += libc0.3-xen ++xen_extra_cflags = -mno-tls-direct-seg-refs ++xen_slibdir = /lib/$(DEB_HOST_MULTIARCH)/i686/nosegneg ++xen_add-ons = $(libc_add-ons) ++ ++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 ++endif ++ ++# Glibc should really do this ld.so link for us. ++define libc_extra_install ++mkdir -p debian/tmp-$(curpass)/lib ++ln -s ld.so.1 debian/tmp-$(curpass)/lib/ld.so ++mkdir -p debian/tmp-$(curpass)/usr/include/$(DEB_HOST_MULTIARCH)/mach ++mv debian/tmp-$(curpass)/usr/include/mach/i386 debian/tmp-$(curpass)/usr/include/$(DEB_HOST_MULTIARCH)/mach/ ++ln -s ../$(DEB_HOST_MULTIARCH)/mach/i386 debian/tmp-$(curpass)/usr/include/mach/i386 ++endef ++ ++# FIXME: We are having runtime issues with ifunc... ++# e.g. calling memset from a statically-linked program ++# ++# http://www.gnu.org/software/hurd/open_issues/ifunc.html ++# ++# For now we are just disabling ifunc: ++export libc_cv_ld_gnu_indirect_function=no diff --cc debian/sysdeps/hurd.mk index 000000000,000000000..0bbfdcfec new file mode 100644 --- /dev/null +++ b/debian/sysdeps/hurd.mk @@@ -1,0 -1,0 +1,48 @@@ ++# This is for the GNU OS. Commonly known as the Hurd. ++libc = libc0.3 ++ ++# Build and expect pt_chown on this platform ++pt_chown = yes ++# Expect pldd on this platform ++pldd = no ++ ++# Linuxthreads Config (we claim "no threads" as nptl keys off this) ++threads = no ++# MIG generates a lot of warnings ++extra_config_options = --disable-werror ++ ++ifndef HURD_SOURCE ++ HURD_HEADERS := /usr/include ++else ++ HURD_HEADERS := $(HURD_SOURCE)/include ++endif ++ ++# Minimum Kernel supported ++with_headers = --with-headers=$(shell pwd)/debian/include ++ ++KERNEL_HEADER_DIR = $(stamp)mkincludedir ++$(stamp)mkincludedir: ++ rm -rf debian/include ++ mkdir debian/include ++ ++ # System headers ++ for path in hurd mach mach_debug device cthreads.h; do \ ++ if [ -e "$(HURD_HEADERS)/$(DEB_HOST_MULTIARCH)/$$path" ]; then \ ++ ln -s $(HURD_HEADERS)/$(DEB_HOST_MULTIARCH)/$$path debian/include/$$path ; \ ++ elif [ -e "$(HURD_HEADERS)/$$path" ]; then \ ++ ln -s $(HURD_HEADERS)/$$path debian/include/$$path ; \ ++ fi ; \ ++ done ++ ++ # To make configure happy if libc0.3-dev is not installed. ++ touch debian/include/assert.h ++ ++ touch $@ ++ ++# Also to make configure happy. ++export CPPFLAGS = -isystem $(shell pwd)/debian/include ++ ++# Do not care about kernel versions for now. ++define kernel_check ++true ++endef diff --cc debian/sysdeps/i386.mk index 000000000,000000000..6f3cdd284 new file mode 100644 --- /dev/null +++ b/debian/sysdeps/i386.mk @@@ -1,0 -1,0 +1,83 @@@ ++# configuration options for all flavours ++extra_config_options = --enable-multi-arch --enable-static-pie ++ ++ifeq (,$(filter stage1 stage2, $(DEB_BUILD_PROFILES))) ++# 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. ++GLIBC_PASSES += xen ++DEB_ARCH_REGULAR_PACKAGES += libc6-xen ++xen_extra_cflags = -mno-tls-direct-seg-refs ++xen_slibdir = /lib/$(DEB_HOST_MULTIARCH)/i686/nosegneg ++ ++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 ++ ++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 ++endif ++ ++# multilib flavours ++ifeq (,$(filter nobiarch, $(DEB_BUILD_PROFILES))) ++ ++# build 64-bit (amd64) alternative library ++GLIBC_PASSES += amd64 ++DEB_ARCH_MULTILIB_PACKAGES += libc6-amd64 libc6-dev-amd64 ++libc6-amd64_shlib_dep = libc6-amd64 (>= $(shlib_dep_ver)) ++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_mvec = yes ++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-amd64_extra_pkg_install ++ ++$(call generic_multilib_extra_pkg_install,libc6-dev-amd64) ++ ++mkdir -p debian/libc6-dev-amd64/usr/include/i386-linux-gnu/gnu ++cp -a debian/tmp-amd64/usr/include/gnu/lib-names-64.h \ ++ debian/tmp-amd64/usr/include/gnu/stubs-64.h \ ++ debian/libc6-dev-amd64/usr/include/i386-linux-gnu/gnu ++ ++endef ++ ++# build x32 ABI alternative library ++GLIBC_PASSES += x32 ++DEB_ARCH_MULTILIB_PACKAGES += libc6-x32 libc6-dev-x32 ++libc6-x32_shlib_dep = libc6-x32 (>= $(shlib_dep_ver)) ++x32_configure_target = x86_64-linux-gnux32 ++x32_CC = $(CC) -mx32 ++x32_CXX = $(CXX) -mx32 ++x32_mvec = yes ++x32_rtlddir = /libx32 ++x32_slibdir = /libx32 ++x32_libdir = /usr/libx32 ++ ++define libc6-dev-x32_extra_pkg_install ++ ++mkdir -p debian/libc6-dev-x32/usr/include/i386-linux-gnu/gnu ++cp -a debian/tmp-x32/usr/include/gnu/lib-names-x32.h \ ++ debian/tmp-x32/usr/include/gnu/stubs-x32.h \ ++ debian/libc6-dev-x32/usr/include/i386-linux-gnu/gnu ++ ++endef ++ ++endif # multilib diff --cc debian/sysdeps/ia64.mk index 000000000,000000000..941270a61 new file mode 100644 --- /dev/null +++ b/debian/sysdeps/ia64.mk @@@ -1,0 -1,0 +1,2 @@@ ++# configuration options for all flavours ++libc = libc6.1 diff --cc debian/sysdeps/kfreebsd-amd64.mk index 000000000,000000000..8b21f7a1b new file mode 100644 --- /dev/null +++ b/debian/sysdeps/kfreebsd-amd64.mk @@@ -1,0 -1,0 +1,31 @@@ ++# build 32-bit (i386) alternative library ++GLIBC_PASSES += i386 ++ ++# multilib flavours ++ifeq (,$(filter nobiarch, $(DEB_BUILD_PROFILES))) ++ ++DEB_ARCH_MULTILIB_PACKAGES += libc0.1-i386 libc0.1-dev-i386 ++libc0.1-i386_shlib_dep = libc0.1-i386 (>= $(shlib_dep_ver)) ++ ++i386_add-ons = $(libc_add-ons) ++i386_configure_target = i686-kfreebsd-gnu ++i386_CC = $(CC) -m32 -march=pentium4 -mtune=generic ++i386_CXX = $(CXX) -m32 -march=pentium4 -mtune=generic ++i386_slibdir = /lib32 ++i386_libdir = /usr/lib32 ++ ++define libc0.1-dev-i386_extra_pkg_install ++ ++$(call generic_multilib_extra_pkg_install,libc0.1-dev-i386) ++ ++mkdir -p debian/libc0.1-dev-i386/usr/include/x86_64-kfreebsd-gnu/gnu ++cp -a debian/tmp-i386/usr/include/gnu/lib-names-32.h \ ++ debian/tmp-i386/usr/include/gnu/stubs-32.h \ ++ debian/libc0.1-dev-i386/usr/include/x86_64-kfreebsd-gnu/gnu ++ ++cp -a debian/tmp-i386/usr/include/sys/vm86.h \ ++ debian/libc0.1-dev-i386/usr/include/sys ++ ++endef ++ ++endif # multilib diff --cc debian/sysdeps/kfreebsd.mk index 000000000,000000000..66dab018d new file mode 100644 --- /dev/null +++ b/debian/sysdeps/kfreebsd.mk @@@ -1,0 -1,0 +1,75 @@@ ++# When changing this, make sure to update debian/debhelper.in/libc.preinst! ++MIN_KERNEL_SUPPORTED := 8.3.0 ++libc = libc0.1 ++ ++# Build and expect pt_chown on this platform ++pt_chown = yes ++# Expect pldd on this platform ++pldd = no ++ ++# NPTL Config ++threads = yes ++extra_config_options = --disable-compatible-utmp --disable-multi-arch --disable-werror ++libc_add-ons = fbtl $(add-ons) ++ ++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 ++ KFREEBSD_ARCH_HEADERS := /usr/include/$(DEB_HOST_MULTIARCH) ++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 ++ ++ # Link to any headers found at the new multiarch location, ++ # otherwise look for them in the old locations ++ for file in bsm machine machine-amd64 machine-i386 net netatalk netipx nfs osreldate.h x86 vm ; do \ ++ if test -e $(KFREEBSD_ARCH_HEADERS)/$$file ; then \ ++ ln -s $(KFREEBSD_ARCH_HEADERS)/$$file debian/include ; \ ++ elif test -e $(KFREEBSD_HEADERS)/$$file ; then \ ++ ln -s $(KFREEBSD_HEADERS)/$$file debian/include ; \ ++ fi ; \ ++ done ++ ++ mkdir -p debian/include/sys ++ # Link to any headers found in the old locations first ++ if test -d $(KFREEBSD_HEADERS)/sys ; then \ ++ find $(KFREEBSD_HEADERS)/sys -mindepth 1 \ ++ -exec ln -sf '{}' debian/include/sys ';' ; \ ++ fi ++ # Link to any headers found at the new multiarch location, ++ # replacing any existing links ++ if test -d $(KFREEBSD_ARCH_HEADERS)/sys ; then \ ++ find $(KFREEBSD_ARCH_HEADERS)/sys -mindepth 1 \ ++ -exec ln -sf '{}' debian/include/sys ';' ; \ ++ fi ++ ++ # 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 ++ diff --cc debian/sysdeps/linux.mk index 000000000,000000000..a709c2feb new file mode 100644 --- /dev/null +++ b/debian/sysdeps/linux.mk @@@ -1,0 -1,0 +1,66 @@@ ++# When changing this, make sure: ++# - to update debian/debhelper.in/libc.preinst! ++# - that all builds for a given gnu triplet have the same minimum version (see bug#882255) ++MIN_KERNEL_SUPPORTED := 3.2 ++libc = libc6 ++ ++# Do not build pt_chown on this platform ++pt_chown = no ++# Expect pldd on this platform ++pldd = yes ++ ++# NPTL Config ++threads = yes ++ ++ifeq ($(filter stage1 stage2,$(DEB_BUILD_PROFILES)),) ++ libc_extra_config_options = --with-selinux $(extra_config_options) ++endif ++ ++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 ++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 ++ ++ # Kernel and library headers ++ for h in arch asm asm-generic libaudit.h linux selinux sys/capability.h ; do \ ++ mkdir -p debian/include/$$(dirname $$h) ; \ ++ if [ -e "$(LINUX_HEADERS)/$$h" ]; then \ ++ ln -s $(LINUX_HEADERS)/$$h debian/include/$$h ; \ ++ elif [ -e "/usr/include/$(DEB_HOST_MULTIARCH)/$$h" ]; then \ ++ ln -s /usr/include/$(DEB_HOST_MULTIARCH)/$$h debian/include/$$h ; \ ++ elif [ -e "/usr/include/$$h" ]; then \ ++ ln -s /usr/include/$$h debian/include/$$h ; \ ++ fi ; \ ++ done ++ ++ # 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 diff --cc debian/sysdeps/mips.mk index 000000000,000000000..4b1d7f327 new file mode 100644 --- /dev/null +++ b/debian/sysdeps/mips.mk @@@ -1,0 -1,0 +1,51 @@@ ++# multilib flavours ++ifeq (,$(filter nobiarch, $(DEB_BUILD_PROFILES))) ++ ++# build 32-bit (n32) alternative library ++GLIBC_PASSES += mipsn32 ++DEB_ARCH_MULTILIB_PACKAGES += libc6-mipsn32 libc6-dev-mipsn32 ++libc6-mipsn32_shlib_dep = libc6-mipsn32 (>= $(shlib_dep_ver)) ++mipsn32_configure_target = mips64-linux-gnuabin32 ++mipsn32_CC = $(CC) -mabi=n32 ++mipsn32_CXX = $(CXX) -mabi=n32 ++mipsn32_rtlddir = /lib32 ++mipsn32_slibdir = /lib32 ++mipsn32_libdir = /usr/lib32 ++ ++# build 64-bit alternative library ++GLIBC_PASSES += mips64 ++DEB_ARCH_MULTILIB_PACKAGES += libc6-mips64 libc6-dev-mips64 ++libc6-mips64_shlib_dep = libc6-mips64 (>= $(shlib_dep_ver)) ++mips64_configure_target = mips64-linux-gnuabi64 ++mips64_CC = $(CC) -mabi=64 ++mips64_CXX = $(CXX) -mabi=64 ++mips64_rtlddir = /lib64 ++mips64_slibdir = /lib64 ++mips64_libdir = /usr/lib64 ++ ++define libc6-dev-mips64_extra_pkg_install ++ ++$(call generic_multilib_extra_pkg_install,libc6-dev-mips64) ++ ++mkdir -p debian/libc6-dev-mips64/usr/include/mips-linux-gnu/gnu ++cp -a debian/tmp-mips64/usr/include/gnu/lib-names-n64_hard.h \ ++ debian/tmp-mips64/usr/include/gnu/stubs-n64_hard.h \ ++ debian/libc6-dev-mips64/usr/include/mips-linux-gnu/gnu ++ ++endef ++ ++define libc6-dev-mipsn32_extra_pkg_install ++ ++mkdir -p debian/libc6-dev-mipsn32/usr/include/mips-linux-gnu/gnu ++cp -a debian/tmp-mipsn32/usr/include/gnu/lib-names-n32_hard.h \ ++ debian/tmp-mipsn32/usr/include/gnu/stubs-n32_hard.h \ ++ debian/libc6-dev-mipsn32/usr/include/mips-linux-gnu/gnu ++ ++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 ++ ++endif # multilib diff --cc debian/sysdeps/mips64.mk index 000000000,000000000..c0ba33738 new file mode 100644 --- /dev/null +++ b/debian/sysdeps/mips64.mk @@@ -1,0 -1,0 +1,49 @@@ ++# main library ++libc_rtlddir = /lib64 ++ ++# multilib flavours ++ifeq (,$(filter nobiarch, $(DEB_BUILD_PROFILES))) ++ ++# build 32-bit (n32) alternative library ++GLIBC_PASSES += mipsn32 ++DEB_ARCH_MULTILIB_PACKAGES += libc6-mipsn32 libc6-dev-mipsn32 ++libc6-mipsn32_shlib_dep = libc6-mipsn32 (>= $(shlib_dep_ver)) ++mipsn32_configure_target = mips64-linux-gnuabin32 ++mipsn32_CC = $(CC) -mabi=n32 ++mipsn32_CXX = $(CXX) -mabi=n32 ++mipsn32_rtlddir = /lib32 ++mipsn32_slibdir = /lib32 ++mipsn32_libdir = /usr/lib32 ++ ++# build 32-bit (o32) alternative library ++GLIBC_PASSES += mips32 ++DEB_ARCH_MULTILIB_PACKAGES += libc6-mips32 libc6-dev-mips32 ++libc6-mips32_shlib_dep = libc6-mips32 (>= $(shlib_dep_ver)) ++mips32_configure_target = mips-linux-gnu ++mips32_CC = $(CC) -mabi=32 ++mips32_CXX = $(CXX) -mabi=32 ++mips32_rtlddir = /lib ++mips32_slibdir = /libo32 ++mips32_libdir = /usr/libo32 ++ ++define libc6-dev-mipsn32_extra_pkg_install ++ ++$(call generic_multilib_extra_pkg_install,libc6-dev-mipsn32) ++ ++mkdir -p debian/libc6-dev-mipsn32/usr/include/mips64-linux-gnuabi64/gnu ++cp -a debian/tmp-mipsn32/usr/include/gnu/lib-names-n32_hard.h \ ++ debian/tmp-mipsn32/usr/include/gnu/stubs-n32_hard.h \ ++ debian/libc6-dev-mipsn32/usr/include/mips64-linux-gnuabi64/gnu ++ ++endef ++ ++define libc6-dev-mips32_extra_pkg_install ++ ++mkdir -p debian/libc6-dev-mips32/usr/include/mips64-linux-gnuabi64/gnu ++cp -a debian/tmp-mips32/usr/include/gnu/lib-names-o32_hard.h \ ++ debian/tmp-mips32/usr/include/gnu/stubs-o32_hard.h \ ++ debian/libc6-dev-mips32/usr/include/mips64-linux-gnuabi64/gnu ++ ++endef ++ ++endif # multilib diff --cc debian/sysdeps/mips64el.mk index 000000000,000000000..97010a665 new file mode 100644 --- /dev/null +++ b/debian/sysdeps/mips64el.mk @@@ -1,0 -1,0 +1,49 @@@ ++# main library ++libc_rtlddir = /lib64 ++ ++# multilib flavours ++ifeq (,$(filter nobiarch, $(DEB_BUILD_PROFILES))) ++ ++# build 32-bit (n32) alternative library ++GLIBC_PASSES += mipsn32 ++DEB_ARCH_MULTILIB_PACKAGES += libc6-mipsn32 libc6-dev-mipsn32 ++libc6-mipsn32_shlib_dep = libc6-mipsn32 (>= $(shlib_dep_ver)) ++mipsn32_configure_target = mips64el-linux-gnuabin32 ++mipsn32_CC = $(CC) -mabi=n32 ++mipsn32_CXX = $(CXX) -mabi=n32 ++mipsn32_rtlddir = /lib32 ++mipsn32_slibdir = /lib32 ++mipsn32_libdir = /usr/lib32 ++ ++# build 32-bit (o32) alternative library ++GLIBC_PASSES += mips32 ++DEB_ARCH_MULTILIB_PACKAGES += libc6-mips32 libc6-dev-mips32 ++libc6-mips32_shlib_dep = libc6-mips32 (>= $(shlib_dep_ver)) ++mips32_configure_target = mipsel-linux-gnu ++mips32_CC = $(CC) -mabi=32 ++mips32_CXX = $(CXX) -mabi=32 ++mips32_rtlddir = /lib ++mips32_slibdir = /libo32 ++mips32_libdir = /usr/libo32 ++ ++define libc6-dev-mipsn32_extra_pkg_install ++ ++$(call generic_multilib_extra_pkg_install,libc6-dev-mipsn32) ++ ++mkdir -p debian/libc6-dev-mipsn32/usr/include/mips64el-linux-gnuabi64/gnu ++cp -a debian/tmp-mipsn32/usr/include/gnu/lib-names-n32_hard.h \ ++ debian/tmp-mipsn32/usr/include/gnu/stubs-n32_hard.h \ ++ debian/libc6-dev-mipsn32/usr/include/mips64el-linux-gnuabi64/gnu ++ ++endef ++ ++define libc6-dev-mips32_extra_pkg_install ++ ++mkdir -p debian/libc6-dev-mips32/usr/include/mips64el-linux-gnuabi64/gnu ++cp -a debian/tmp-mips32/usr/include/gnu/lib-names-o32_hard.h \ ++ debian/tmp-mips32/usr/include/gnu/stubs-o32_hard.h \ ++ debian/libc6-dev-mips32/usr/include/mips64el-linux-gnuabi64/gnu ++ ++endef ++ ++endif # multilib diff --cc debian/sysdeps/mips64r6.mk index 000000000,000000000..ab5c27f66 new file mode 100644 --- /dev/null +++ b/debian/sysdeps/mips64r6.mk @@@ -1,0 -1,0 +1,49 @@@ ++# main library ++libc_rtlddir = /lib64 ++ ++# multilib flavours ++ifeq (,$(filter nobiarch, $(DEB_BUILD_PROFILES))) ++ ++# build 32-bit (n32) alternative library ++GLIBC_PASSES += mipsn32 ++DEB_ARCH_MULTILIB_PACKAGES += libc6-mipsn32 libc6-dev-mipsn32 ++libc6-mipsn32_shlib_dep = libc6-mipsn32 (>= $(shlib_dep_ver)) ++mipsn32_configure_target = mipsisa64r6-linux-gnuabin32 ++mipsn32_CC = $(CC) -mabi=n32 ++mipsn32_CXX = $(CXX) -mabi=n32 ++mipsn32_rtlddir = /lib32 ++mipsn32_slibdir = /lib32 ++mipsn32_libdir = /usr/lib32 ++ ++# build 32-bit (o32) alternative library ++GLIBC_PASSES += mips32 ++DEB_ARCH_MULTILIB_PACKAGES += libc6-mips32 libc6-dev-mips32 ++libc6-mips32_shlib_dep = libc6-mips32 (>= $(shlib_dep_ver)) ++mips32_configure_target = mipsisa32r6-linux-gnu ++mips32_CC = $(CC) -mabi=32 ++mips32_CXX = $(CXX) -mabi=32 ++mips32_rtlddir = /lib ++mips32_slibdir = /libo32 ++mips32_libdir = /usr/libo32 ++ ++define libc6-dev-mipsn32_extra_pkg_install ++ ++$(call generic_multilib_extra_pkg_install,libc6-dev-mipsn32) ++ ++mkdir -p debian/libc6-dev-mipsn32/usr/include/mipsisa64r6-linux-gnuabi64/gnu ++cp -a debian/tmp-mipsn32/usr/include/gnu/lib-names-n32_hard_2008.h \ ++ debian/tmp-mipsn32/usr/include/gnu/stubs-n32_hard_2008.h \ ++ debian/libc6-dev-mipsn32/usr/include/mipsisa64r6-linux-gnuabi64/gnu ++ ++endef ++ ++define libc6-dev-mips32_extra_pkg_install ++ ++mkdir -p debian/libc6-dev-mips32/usr/include/mipsisa64r6-linux-gnuabi64/gnu ++cp -a debian/tmp-mips32/usr/include/gnu/lib-names-o32_hard_2008.h \ ++ debian/tmp-mips32/usr/include/gnu/stubs-o32_hard_2008.h \ ++ debian/libc6-dev-mips32/usr/include/mipsisa64r6-linux-gnuabi64/gnu ++ ++endef ++ ++endif # multilib diff --cc debian/sysdeps/mips64r6el.mk index 000000000,000000000..67357439f new file mode 100644 --- /dev/null +++ b/debian/sysdeps/mips64r6el.mk @@@ -1,0 -1,0 +1,49 @@@ ++# main library ++libc_rtlddir = /lib64 ++ ++# multilib flavours ++ifeq (,$(filter nobiarch, $(DEB_BUILD_PROFILES))) ++ ++# build 32-bit (n32) alternative library ++GLIBC_PASSES += mipsn32 ++DEB_ARCH_MULTILIB_PACKAGES += libc6-mipsn32 libc6-dev-mipsn32 ++libc6-mipsn32_shlib_dep = libc6-mipsn32 (>= $(shlib_dep_ver)) ++mipsn32_configure_target = mipsisa64r6el-linux-gnuabin32 ++mipsn32_CC = $(CC) -mabi=n32 ++mipsn32_CXX = $(CXX) -mabi=n32 ++mipsn32_rtlddir = /lib32 ++mipsn32_slibdir = /lib32 ++mipsn32_libdir = /usr/lib32 ++ ++# build 32-bit (o32) alternative library ++GLIBC_PASSES += mips32 ++DEB_ARCH_MULTILIB_PACKAGES += libc6-mips32 libc6-dev-mips32 ++libc6-mips32_shlib_dep = libc6-mips32 (>= $(shlib_dep_ver)) ++mips32_configure_target = mipsisa32r6el-linux-gnu ++mips32_CC = $(CC) -mabi=32 ++mips32_CXX = $(CXX) -mabi=32 ++mips32_rtlddir = /lib ++mips32_slibdir = /libo32 ++mips32_libdir = /usr/libo32 ++ ++define libc6-dev-mipsn32_extra_pkg_install ++ ++$(call generic_multilib_extra_pkg_install,libc6-dev-mipsn32) ++ ++mkdir -p debian/libc6-dev-mipsn32/usr/include/mipsisa64r6el-linux-gnuabi64/gnu ++cp -a debian/tmp-mipsn32/usr/include/gnu/lib-names-n32_hard_2008.h \ ++ debian/tmp-mipsn32/usr/include/gnu/stubs-n32_hard_2008.h \ ++ debian/libc6-dev-mipsn32/usr/include/mipsisa64r6el-linux-gnuabi64/gnu ++ ++endef ++ ++define libc6-dev-mips32_extra_pkg_install ++ ++mkdir -p debian/libc6-dev-mips32/usr/include/mipsisa64r6el-linux-gnuabi64/gnu ++cp -a debian/tmp-mips32/usr/include/gnu/lib-names-o32_hard_2008.h \ ++ debian/tmp-mips32/usr/include/gnu/stubs-o32_hard_2008.h \ ++ debian/libc6-dev-mips32/usr/include/mipsisa64r6el-linux-gnuabi64/gnu ++ ++endef ++ ++endif # multilib diff --cc debian/sysdeps/mipsel.mk index 000000000,000000000..3733f94a7 new file mode 100644 --- /dev/null +++ b/debian/sysdeps/mipsel.mk @@@ -1,0 -1,0 +1,51 @@@ ++# multilib flavours ++ifeq (,$(filter nobiarch, $(DEB_BUILD_PROFILES))) ++ ++# build 32-bit (n32) alternative library ++GLIBC_PASSES += mipsn32 ++DEB_ARCH_MULTILIB_PACKAGES += libc6-mipsn32 libc6-dev-mipsn32 ++libc6-mipsn32_shlib_dep = libc6-mipsn32 (>= $(shlib_dep_ver)) ++mipsn32_configure_target = mips64el-linux-gnuabin32 ++mipsn32_CC = $(CC) -mabi=n32 ++mipsn32_CXX = $(CXX) -mabi=n32 ++mipsn32_rtlddir = /lib32 ++mipsn32_slibdir = /lib32 ++mipsn32_libdir = /usr/lib32 ++ ++# build 64-bit alternative library ++GLIBC_PASSES += mips64 ++DEB_ARCH_MULTILIB_PACKAGES += libc6-mips64 libc6-dev-mips64 ++libc6-mips64_shlib_dep = libc6-mips64 (>= $(shlib_dep_ver)) ++mips64_configure_target = mips64el-linux-gnuabi64 ++mips64_CC = $(CC) -mabi=64 ++mips64_CXX = $(CXX) -mabi=64 ++mips64_rtlddir = /lib64 ++mips64_slibdir = /lib64 ++mips64_libdir = /usr/lib64 ++ ++define libc6-dev-mips64_extra_pkg_install ++ ++$(call generic_multilib_extra_pkg_install,libc6-dev-mips64) ++ ++mkdir -p debian/libc6-dev-mips64/usr/include/mipsel-linux-gnu/gnu ++cp -a debian/tmp-mips64/usr/include/gnu/lib-names-n64_hard.h \ ++ debian/tmp-mips64/usr/include/gnu/stubs-n64_hard.h \ ++ debian/libc6-dev-mips64/usr/include/mipsel-linux-gnu/gnu ++ ++endef ++ ++define libc6-dev-mipsn32_extra_pkg_install ++ ++mkdir -p debian/libc6-dev-mipsn32/usr/include/mipsel-linux-gnu/gnu ++cp -a debian/tmp-mipsn32/usr/include/gnu/lib-names-n32_hard.h \ ++ debian/tmp-mipsn32/usr/include/gnu/stubs-n32_hard.h \ ++ debian/libc6-dev-mipsn32/usr/include/mipsel-linux-gnu/gnu ++ ++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 ++ ++endif # multilib diff --cc debian/sysdeps/mipsn32.mk index 000000000,000000000..62215e85d new file mode 100644 --- /dev/null +++ b/debian/sysdeps/mipsn32.mk @@@ -1,0 -1,0 +1,49 @@@ ++# main library ++libc_rtlddir = /lib32 ++ ++# multilib flavours ++ifeq (,$(filter nobiarch, $(DEB_BUILD_PROFILES))) ++ ++# build 64-bit alternative library ++GLIBC_PASSES += mips64 ++DEB_ARCH_MULTILIB_PACKAGES += libc6-mips64 libc6-dev-mips64 ++libc6-mips64_shlib_dep = libc6-mips64 (>= $(shlib_dep_ver)) ++mips64_configure_target = mips64-linux-gnuabi64 ++mips64_CC = $(CC) -mabi=64 ++mips64_CXX = $(CXX) -mabi=64 ++mips64_rtlddir = /lib64 ++mips64_slibdir = /lib64 ++mips64_libdir = /usr/lib64 ++ ++# build 32-bit (o32) alternative library ++GLIBC_PASSES += mips32 ++DEB_ARCH_MULTILIB_PACKAGES += libc6-mips32 libc6-dev-mips32 ++libc6-mips32_shlib_dep = libc6-mips32 (>= $(shlib_dep_ver)) ++mips32_configure_target = mips-linux-gnu ++mips32_CC = $(CC) -mabi=32 ++mips32_CXX = $(CXX) -mabi=32 ++mips32_rtlddir = /lib ++mips32_slibdir = /libo32 ++mips32_libdir = /usr/libo32 ++ ++define libc6-dev-mips64_extra_pkg_install ++ ++$(call generic_multilib_extra_pkg_install,libc6-dev-mips64) ++ ++mkdir -p debian/libc6-dev-mips64/usr/include/mips64-linux-gnuabin32/gnu ++cp -a debian/tmp-mips64/usr/include/gnu/lib-names-n64_hard.h \ ++ debian/tmp-mips64/usr/include/gnu/stubs-n64_hard.h \ ++ debian/libc6-dev-mips64/usr/include/mips64-linux-gnuabin32/gnu ++ ++endef ++ ++define libc6-dev-mips32_extra_pkg_install ++ ++mkdir -p debian/libc6-dev-mips32/usr/include/mips64-linux-gnuabin32/gnu ++cp -a debian/tmp-mips32/usr/include/gnu/lib-names-o32_hard.h \ ++ debian/tmp-mips32/usr/include/gnu/stubs-o32_hard.h \ ++ debian/libc6-dev-mips32/usr/include/mips64-linux-gnuabin32/gnu ++ ++endef ++ ++endif # multilib diff --cc debian/sysdeps/mipsn32el.mk index 000000000,000000000..331f0edd2 new file mode 100644 --- /dev/null +++ b/debian/sysdeps/mipsn32el.mk @@@ -1,0 -1,0 +1,49 @@@ ++# main library ++libc_rtlddir = /lib32 ++ ++# multilib flavours ++ifeq (,$(filter nobiarch, $(DEB_BUILD_PROFILES))) ++ ++# build 64-bit alternative library ++GLIBC_PASSES += mips64 ++DEB_ARCH_MULTILIB_PACKAGES += libc6-mips64 libc6-dev-mips64 ++libc6-mips64_shlib_dep = libc6-mips64 (>= $(shlib_dep_ver)) ++mips64_configure_target = mips64el-linux-gnuabi64 ++mips64_CC = $(CC) -mabi=64 ++mips64_CXX = $(CXX) -mabi=64 ++mips64_rtlddir = /lib64 ++mips64_slibdir = /lib64 ++mips64_libdir = /usr/lib64 ++ ++# build 32-bit (o32) alternative library ++GLIBC_PASSES += mips32 ++DEB_ARCH_MULTILIB_PACKAGES += libc6-mips32 libc6-dev-mips32 ++libc6-mips32_shlib_dep = libc6-mips32 (>= $(shlib_dep_ver)) ++mips32_configure_target = mipsel-linux-gnu ++mips32_CC = $(CC) -mabi=32 ++mips32_CXX = $(CXX) -mabi=32 ++mips32_rtlddir = /lib ++mips32_slibdir = /libo32 ++mips32_libdir = /usr/libo32 ++ ++define libc6-dev-mips64_extra_pkg_install ++ ++$(call generic_multilib_extra_pkg_install,libc6-dev-mips64) ++ ++mkdir -p debian/libc6-dev-mips64/usr/include/mips64el-linux-gnuabin32/gnu ++cp -a debian/tmp-mips64/usr/include/gnu/lib-names-n64_hard.h \ ++ debian/tmp-mips64/usr/include/gnu/stubs-n64_hard.h \ ++ debian/libc6-dev-mips64/usr/include/mips64el-linux-gnuabin32/gnu ++ ++endef ++ ++define libc6-dev-mips32_extra_pkg_install ++ ++mkdir -p debian/libc6-dev-mips32/usr/include/mips64el-linux-gnuabin32/gnu ++cp -a debian/tmp-mips32/usr/include/gnu/lib-names-o32_hard.h \ ++ debian/tmp-mips32/usr/include/gnu/stubs-o32_hard.h \ ++ debian/libc6-dev-mips32/usr/include/mips64el-linux-gnuabin32/gnu ++ ++endef ++ ++endif # multilib diff --cc debian/sysdeps/mipsn32r6.mk index 000000000,000000000..c44853226 new file mode 100644 --- /dev/null +++ b/debian/sysdeps/mipsn32r6.mk @@@ -1,0 -1,0 +1,49 @@@ ++# main library ++libc_rtlddir = /lib32 ++ ++# multilib flavours ++ifeq (,$(filter nobiarch, $(DEB_BUILD_PROFILES))) ++ ++# build 64-bit alternative library ++GLIBC_PASSES += mips64 ++DEB_ARCH_MULTILIB_PACKAGES += libc6-mips64 libc6-dev-mips64 ++libc6-mips64_shlib_dep = libc6-mips64 (>= $(shlib_dep_ver)) ++mips64_configure_target = mipsisa64r6-linux-gnuabi64 ++mips64_CC = $(CC) -mabi=64 ++mips64_CXX = $(CXX) -mabi=64 ++mips64_rtlddir = /lib64 ++mips64_slibdir = /lib64 ++mips64_libdir = /usr/lib64 ++ ++# build 32-bit (o32) alternative library ++GLIBC_PASSES += mips32 ++DEB_ARCH_MULTILIB_PACKAGES += libc6-mips32 libc6-dev-mips32 ++libc6-mips32_shlib_dep = libc6-mips32 (>= $(shlib_dep_ver)) ++mips32_configure_target = mipsisa32r6-linux-gnu ++mips32_CC = $(CC) -mabi=32 ++mips32_CXX = $(CXX) -mabi=32 ++mips32_rtlddir = /lib ++mips32_slibdir = /libo32 ++mips32_libdir = /usr/libo32 ++ ++define libc6-dev-mips64_extra_pkg_install ++ ++$(call generic_multilib_extra_pkg_install,libc6-dev-mips64) ++ ++mkdir -p debian/libc6-dev-mips64/usr/include/mipsisa64r6-linux-gnuabin32/gnu ++cp -a debian/tmp-mips64/usr/include/gnu/lib-names-n64_hard_2008.h \ ++ debian/tmp-mips64/usr/include/gnu/stubs-n64_hard_2008.h \ ++ debian/libc6-dev-mips64/usr/include/mipsisa64r6-linux-gnuabin32/gnu ++ ++endef ++ ++define libc6-dev-mips32_extra_pkg_install ++ ++mkdir -p debian/libc6-dev-mips32/usr/include/mipsisa64r6-linux-gnuabin32/gnu ++cp -a debian/tmp-mips32/usr/include/gnu/lib-names-o32_hard_2008.h \ ++ debian/tmp-mips32/usr/include/gnu/stubs-o32_hard_2008.h \ ++ debian/libc6-dev-mips32/usr/include/mipsisa64r6-linux-gnuabin32/gnu ++ ++endef ++ ++endif # multilib diff --cc debian/sysdeps/mipsn32r6el.mk index 000000000,000000000..42c3379d7 new file mode 100644 --- /dev/null +++ b/debian/sysdeps/mipsn32r6el.mk @@@ -1,0 -1,0 +1,49 @@@ ++# main library ++libc_rtlddir = /lib32 ++ ++# multilib flavours ++ifeq (,$(filter nobiarch, $(DEB_BUILD_PROFILES))) ++ ++# build 64-bit alternative library ++GLIBC_PASSES += mips64 ++DEB_ARCH_MULTILIB_PACKAGES += libc6-mips64 libc6-dev-mips64 ++libc6-mips64_shlib_dep = libc6-mips64 (>= $(shlib_dep_ver)) ++mips64_configure_target = mipsisa64r6el-linux-gnuabi64 ++mips64_CC = $(CC) -mabi=64 ++mips64_CXX = $(CXX) -mabi=64 ++mips64_rtlddir = /lib64 ++mips64_slibdir = /lib64 ++mips64_libdir = /usr/lib64 ++ ++# build 32-bit (o32) alternative library ++GLIBC_PASSES += mips32 ++DEB_ARCH_MULTILIB_PACKAGES += libc6-mips32 libc6-dev-mips32 ++libc6-mips32_shlib_dep = libc6-mips32 (>= $(shlib_dep_ver)) ++mips32_configure_target = mipsisa32r6el-linux-gnu ++mips32_CC = $(CC) -mabi=32 ++mips32_CXX = $(CXX) -mabi=32 ++mips32_rtlddir = /lib ++mips32_slibdir = /libo32 ++mips32_libdir = /usr/libo32 ++ ++define libc6-dev-mips64_extra_pkg_install ++ ++$(call generic_multilib_extra_pkg_install,libc6-dev-mips64) ++ ++mkdir -p debian/libc6-dev-mips64/usr/include/mipsisa64r6el-linux-gnuabin32/gnu ++cp -a debian/tmp-mips64/usr/include/gnu/lib-names-n64_hard_2008.h \ ++ debian/tmp-mips64/usr/include/gnu/stubs-n64_hard_2008.h \ ++ debian/libc6-dev-mips64/usr/include/mipsisa64r6el-linux-gnuabin32/gnu ++ ++endef ++ ++define libc6-dev-mips32_extra_pkg_install ++ ++mkdir -p debian/libc6-dev-mips32/usr/include/mipsisa64r6el-linux-gnuabin32/gnu ++cp -a debian/tmp-mips32/usr/include/gnu/lib-names-o32_hard_2008.h \ ++ debian/tmp-mips32/usr/include/gnu/stubs-o32_hard_2008.h \ ++ debian/libc6-dev-mips32/usr/include/mipsisa64r6el-linux-gnuabin32/gnu ++ ++endef ++ ++endif # multilib diff --cc debian/sysdeps/mipsr6.mk index 000000000,000000000..5778eedd8 new file mode 100644 --- /dev/null +++ b/debian/sysdeps/mipsr6.mk @@@ -1,0 -1,0 +1,51 @@@ ++# multilib flavours ++ifeq (,$(filter nobiarch, $(DEB_BUILD_PROFILES))) ++ ++# build 32-bit (n32) alternative library ++GLIBC_PASSES += mipsn32 ++DEB_ARCH_MULTILIB_PACKAGES += libc6-mipsn32 libc6-dev-mipsn32 ++libc6-mipsn32_shlib_dep = libc6-mipsn32 (>= $(shlib_dep_ver)) ++mipsn32_configure_target = mipsisa64r6-linux-gnuabin32 ++mipsn32_CC = $(CC) -mabi=n32 ++mipsn32_CXX = $(CXX) -mabi=n32 ++mipsn32_rtlddir = /lib32 ++mipsn32_slibdir = /lib32 ++mipsn32_libdir = /usr/lib32 ++ ++# build 64-bit alternative library ++GLIBC_PASSES += mips64 ++DEB_ARCH_MULTILIB_PACKAGES += libc6-mips64 libc6-dev-mips64 ++libc6-mips64_shlib_dep = libc6-mips64 (>= $(shlib_dep_ver)) ++mips64_configure_target = mipsisa64r6-linux-gnuabi64 ++mips64_CC = $(CC) -mabi=64 ++mips64_CXX = $(CXX) -mabi=64 ++mips64_rtlddir = /lib64 ++mips64_slibdir = /lib64 ++mips64_libdir = /usr/lib64 ++ ++define libc6-dev-mips64_extra_pkg_install ++ ++$(call generic_multilib_extra_pkg_install,libc6-dev-mips64) ++ ++mkdir -p debian/libc6-dev-mips64/usr/include/mipsisa32r6-linux-gnu/gnu ++cp -a debian/tmp-mips64/usr/include/gnu/lib-names-n64_hard_2008.h \ ++ debian/tmp-mips64/usr/include/gnu/stubs-n64_hard_2008.h \ ++ debian/libc6-dev-mips64/usr/include/mipsisa32r6-linux-gnu/gnu ++ ++endef ++ ++define libc6-dev-mipsn32_extra_pkg_install ++ ++mkdir -p debian/libc6-dev-mipsn32/usr/include/mipsisa32r6-linux-gnu/gnu ++cp -a debian/tmp-mipsn32/usr/include/gnu/lib-names-n32_hard_2008.h \ ++ debian/tmp-mipsn32/usr/include/gnu/stubs-n32_hard_2008.h \ ++ debian/libc6-dev-mipsn32/usr/include/mipsisa32r6-linux-gnu/gnu ++ ++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 ++ ++endif # multilib diff --cc debian/sysdeps/mipsr6el.mk index 000000000,000000000..9c0ee2081 new file mode 100644 --- /dev/null +++ b/debian/sysdeps/mipsr6el.mk @@@ -1,0 -1,0 +1,51 @@@ ++# multilib flavours ++ifeq (,$(filter nobiarch, $(DEB_BUILD_PROFILES))) ++ ++# build 32-bit (n32) alternative library ++GLIBC_PASSES += mipsn32 ++DEB_ARCH_MULTILIB_PACKAGES += libc6-mipsn32 libc6-dev-mipsn32 ++libc6-mipsn32_shlib_dep = libc6-mipsn32 (>= $(shlib_dep_ver)) ++mipsn32_configure_target = mipsisa64r6el-linux-gnuabin32 ++mipsn32_CC = $(CC) -mabi=n32 ++mipsn32_CXX = $(CXX) -mabi=n32 ++mipsn32_rtlddir = /lib32 ++mipsn32_slibdir = /lib32 ++mipsn32_libdir = /usr/lib32 ++ ++# build 64-bit alternative library ++GLIBC_PASSES += mips64 ++DEB_ARCH_MULTILIB_PACKAGES += libc6-mips64 libc6-dev-mips64 ++libc6-mips64_shlib_dep = libc6-mips64 (>= $(shlib_dep_ver)) ++mips64_configure_target = mipsisa64r6el-linux-gnuabi64 ++mips64_CC = $(CC) -mabi=64 ++mips64_CXX = $(CXX) -mabi=64 ++mips64_rtlddir = /lib64 ++mips64_slibdir = /lib64 ++mips64_libdir = /usr/lib64 ++ ++define libc6-dev-mips64_extra_pkg_install ++ ++$(call generic_multilib_extra_pkg_install,libc6-dev-mips64) ++ ++mkdir -p debian/libc6-dev-mips64/usr/include/mipsisa32r6el-linux-gnu/gnu ++cp -a debian/tmp-mips64/usr/include/gnu/lib-names-n64_hard_2008.h \ ++ debian/tmp-mips64/usr/include/gnu/stubs-n64_hard_2008.h \ ++ debian/libc6-dev-mips64/usr/include/mipsisa32r6el-linux-gnu/gnu ++ ++endef ++ ++define libc6-dev-mipsn32_extra_pkg_install ++ ++mkdir -p debian/libc6-dev-mipsn32/usr/include/mipsisa32r6el-linux-gnu/gnu ++cp -a debian/tmp-mipsn32/usr/include/gnu/lib-names-n32_hard_2008.h \ ++ debian/tmp-mipsn32/usr/include/gnu/stubs-n32_hard_2008.h \ ++ debian/libc6-dev-mipsn32/usr/include/mipsisa32r6el-linux-gnu/gnu ++ ++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 ++ ++endif # multilib diff --cc debian/sysdeps/powerpc.mk index 000000000,000000000..3520355a2 new file mode 100644 --- /dev/null +++ b/debian/sysdeps/powerpc.mk @@@ -1,0 -1,0 +1,29 @@@ ++# configuration options for all flavours ++extra_config_options = --enable-multi-arch ++ ++# multilib flavours ++ifeq (,$(filter nobiarch, $(DEB_BUILD_PROFILES))) ++ ++# build 64-bit (ppc64) alternative library ++GLIBC_PASSES += ppc64 ++DEB_ARCH_MULTILIB_PACKAGES += libc6-ppc64 libc6-dev-ppc64 ++libc6-ppc64_shlib_dep = libc6-ppc64 (>= $(shlib_dep_ver)) ++ppc64_configure_target = powerpc64-linux-gnu ++ppc64_CC = $(CC) -m64 ++ppc64_CXX = $(CXX) -m64 ++ppc64_rtlddir = /lib64 ++ppc64_slibdir = /lib64 ++ppc64_libdir = /usr/lib64 ++ ++define libc6-dev-ppc64_extra_pkg_install ++ ++$(call generic_multilib_extra_pkg_install,libc6-dev-ppc64) ++ ++mkdir -p debian/libc6-dev-ppc64/usr/include/powerpc-linux-gnu/gnu ++cp -a debian/tmp-ppc64/usr/include/gnu/lib-names-64-v1.h \ ++ debian/tmp-ppc64/usr/include/gnu/stubs-64-v1.h \ ++ debian/libc6-dev-ppc64/usr/include/powerpc-linux-gnu/gnu ++ ++endef ++ ++endif # multilib diff --cc debian/sysdeps/ppc64.mk index 000000000,000000000..a90138d18 new file mode 100644 --- /dev/null +++ b/debian/sysdeps/ppc64.mk @@@ -1,0 -1,0 +1,31 @@@ ++# configuration options for all flavours ++extra_config_options = --enable-multi-arch ++ ++# main library ++libc_rtlddir = /lib64 ++ ++# multilib flavours ++ifeq (,$(filter nobiarch, $(DEB_BUILD_PROFILES))) ++ ++# build 32-bit (powerpc) alternative library ++GLIBC_PASSES += powerpc ++DEB_ARCH_MULTILIB_PACKAGES += libc6-powerpc libc6-dev-powerpc ++libc6-powerpc_shlib_dep = libc6-powerpc (>= $(shlib_dep_ver)) ++powerpc_configure_target = powerpc-linux-gnu ++powerpc_CC = $(CC) -m32 ++powerpc_CXX = $(CXX) -m32 ++powerpc_slibdir = /lib32 ++powerpc_libdir = /usr/lib32 ++ ++define libc6-dev-powerpc_extra_pkg_install ++ ++$(call generic_multilib_extra_pkg_install,libc6-dev-powerpc) ++ ++mkdir -p debian/libc6-dev-powerpc/usr/include/powerpc64-linux-gnu/gnu ++cp -a debian/tmp-powerpc/usr/include/gnu/lib-names-32.h \ ++ debian/tmp-powerpc/usr/include/gnu/stubs-32.h \ ++ debian/libc6-dev-powerpc/usr/include/powerpc64-linux-gnu/gnu ++ ++endef ++ ++endif # multilib diff --cc debian/sysdeps/ppc64el.mk index 000000000,000000000..c235549e3 new file mode 100644 --- /dev/null +++ b/debian/sysdeps/ppc64el.mk @@@ -1,0 -1,0 +1,5 @@@ ++# configuration options for all flavours ++extra_config_options = --enable-multi-arch --with-cpu=power8 ++ ++# main library ++libc_rtlddir = /lib64 diff --cc debian/sysdeps/riscv64.mk index 000000000,000000000..d2ca48a93 new file mode 100644 --- /dev/null +++ b/debian/sysdeps/riscv64.mk @@@ -1,0 -1,0 +1,2 @@@ ++# riscv64 buildd are QEMU based and thus very slow ++TIMEOUTFACTOR=100 diff --cc debian/sysdeps/s390x.mk index 000000000,000000000..8081c20bb new file mode 100644 --- /dev/null +++ b/debian/sysdeps/s390x.mk @@@ -1,0 -1,0 +1,28 @@@ ++# configuration options for all flavours ++extra_config_options = --enable-multi-arch ++ ++# multilib flavours ++ifeq (,$(filter nobiarch, $(DEB_BUILD_PROFILES))) ++ ++# build 32-bit (s390) alternative library ++GLIBC_PASSES += s390 ++DEB_ARCH_MULTILIB_PACKAGES += libc6-s390 libc6-dev-s390 ++libc6-s390_shlib_dep = libc6-s390 (>= $(shlib_dep_ver)) ++s390_configure_target = s390-linux-gnu ++s390_CC = $(CC) -m31 ++s390_CXX = $(CXX) -m31 ++s390_slibdir = /lib32 ++s390_libdir = /usr/lib32 ++ ++define libc6-dev-s390_extra_pkg_install ++ ++$(call generic_multilib_extra_pkg_install,libc6-dev-s390) ++ ++mkdir -p debian/libc6-dev-s390/usr/include/s390x-linux-gnu/gnu ++cp -a debian/tmp-s390/usr/include/gnu/lib-names-32.h \ ++ debian/tmp-s390/usr/include/gnu/stubs-32.h \ ++ debian/libc6-dev-s390/usr/include/s390x-linux-gnu/gnu ++ ++endef ++ ++endif # multilib diff --cc debian/sysdeps/sh3.mk index 000000000,000000000..412008c9b new file mode 100644 --- /dev/null +++ b/debian/sysdeps/sh3.mk @@@ -1,0 -1,0 +1,7 @@@ ++# Renesas SH enabled -ffinte-math-only. Some software need -mieee. ++extra_cflags = -mieee ++ ++# GCC 5 and later emits calls to abort() when there is no target specific ++# __builtin_trap() implementation. This is not possible to do so in ld.so ++# so we need to pass the -fno-delete-null-pointer-checks option to GCC. ++extra_cflags += -fno-delete-null-pointer-checks diff --cc debian/sysdeps/sh4.mk index 000000000,000000000..412008c9b new file mode 100644 --- /dev/null +++ b/debian/sysdeps/sh4.mk @@@ -1,0 -1,0 +1,7 @@@ ++# Renesas SH enabled -ffinte-math-only. Some software need -mieee. ++extra_cflags = -mieee ++ ++# GCC 5 and later emits calls to abort() when there is no target specific ++# __builtin_trap() implementation. This is not possible to do so in ld.so ++# so we need to pass the -fno-delete-null-pointer-checks option to GCC. ++extra_cflags += -fno-delete-null-pointer-checks diff --cc debian/sysdeps/sparc.mk index 000000000,000000000..8a2824738 new file mode 100644 --- /dev/null +++ b/debian/sysdeps/sparc.mk @@@ -1,0 -1,0 +1,32 @@@ ++# configuration options for all flavours ++extra_config_options = --disable-multi-arch ++ ++# main library ++libc_configure_target=sparcv9-linux-gnu ++ ++# multilib flavours ++ifeq (,$(filter nobiarch, $(DEB_BUILD_PROFILES))) ++ ++# build 64-bit (sparc64) alternative library ++GLIBC_PASSES += sparc64 ++DEB_ARCH_MULTILIB_PACKAGES += libc6-sparc64 libc6-dev-sparc64 ++libc6-sparc64_shlib_dep = libc6-sparc64 (>= $(shlib_dep_ver)) ++sparc64_configure_target=sparc64-linux-gnu ++sparc64_CC = $(CC) -m64 ++sparc64_CXX = $(CXX) -m64 ++sparc64_rtlddir = /lib64 ++sparc64_slibdir = /lib64 ++sparc64_libdir = /usr/lib64 ++ ++define libc6-dev-sparc64_extra_pkg_install ++ ++$(call generic_multilib_extra_pkg_install,libc6-dev-sparc64) ++ ++mkdir -p debian/libc6-dev-sparc64/usr/include/sparc-linux-gnu/gnu ++cp -a debian/tmp-sparc64/usr/include/gnu/lib-names-64.h \ ++ debian/tmp-sparc64/usr/include/gnu/stubs-64.h \ ++ debian/libc6-dev-sparc64/usr/include/sparc-linux-gnu/gnu ++ ++endef ++ ++endif # multilib diff --cc debian/sysdeps/sparc64.mk index 000000000,000000000..a9cec4b09 new file mode 100644 --- /dev/null +++ b/debian/sysdeps/sparc64.mk @@@ -1,0 -1,0 +1,34 @@@ ++# configuration options for all flavours ++CC = $(DEB_HOST_GNU_TYPE)-$(BASE_CC)$(DEB_GCC_VERSION) -no-pie -fno-PIE ++CXX = $(DEB_HOST_GNU_TYPE)-$(BASE_CXX)$(DEB_GCC_VERSION) -no-pie -fno-PIE ++extra_config_options = --disable-multi-arch ++ ++# main library ++libc_rtlddir = /lib64 ++ ++# multilib flavours ++ifeq (,$(filter nobiarch, $(DEB_BUILD_PROFILES))) ++ ++# build 32-bit (sparc) alternative library ++GLIBC_PASSES += sparc ++DEB_ARCH_MULTILIB_PACKAGES += libc6-sparc libc6-dev-sparc ++libc6-sparc_shlib_dep = libc6-sparc (>= $(shlib_dep_ver)) ++sparc_configure_target=sparcv9-linux-gnu ++sparc_CC = $(CC) -m32 ++sparc_CXX = $(CXX) -m32 ++sparc_rtlddir = /lib ++sparc_slibdir = /lib32 ++sparc_libdir = /usr/lib32 ++ ++define libc6-dev-sparc_extra_pkg_install ++ ++$(call generic_multilib_extra_pkg_install,libc6-dev-sparc) ++ ++mkdir -p debian/libc6-dev-sparc/usr/include/sparc64-linux-gnu/gnu ++cp -a debian/tmp-sparc/usr/include/gnu/lib-names-32.h \ ++ debian/tmp-sparc/usr/include/gnu/stubs-32.h \ ++ debian/libc6-dev-sparc/usr/include/sparc64-linux-gnu/gnu ++ ++endef ++ ++endif # multilib diff --cc debian/sysdeps/x32.mk index 000000000,000000000..26a3ef851 new file mode 100644 --- /dev/null +++ b/debian/sysdeps/x32.mk @@@ -1,0 -1,0 +1,54 @@@ ++# configuration options for all flavours ++extra_config_options = --enable-multi-arch --enable-static-pie ++ ++# main library ++libc_mvec = yes ++libc_rtlddir = /libx32 ++ ++# multilib flavours ++ifeq (,$(filter nobiarch, $(DEB_BUILD_PROFILES))) ++ ++# build 64-bit (amd64) alternative library ++GLIBC_PASSES += amd64 ++DEB_ARCH_MULTILIB_PACKAGES += libc6-amd64 libc6-dev-amd64 ++libc6-amd64_shlib_dep = libc6-amd64 (>= $(shlib_dep_ver)) ++amd64_configure_target = x86_64-linux-gnu ++amd64_CC = $(CC) -m64 ++amd64_CXX = $(CXX) -m64 ++amd64_mvec = yes ++amd64_rtlddir = /lib64 ++amd64_slibdir = /lib64 ++amd64_libdir = /usr/lib64 ++ ++define libc6-dev-amd64_extra_pkg_install ++ ++$(call generic_multilib_extra_pkg_install,libc6-dev-amd64) ++ ++mkdir -p debian/libc6-dev-amd64/usr/include/x86_64-linux-gnux32/gnu ++cp -a debian/tmp-amd64/usr/include/gnu/lib-names-64.h \ ++ debian/tmp-amd64/usr/include/gnu/stubs-64.h \ ++ debian/libc6-dev-amd64/usr/include/x86_64-linux-gnux32/gnu ++ ++endef ++ ++# build 32-bit (i386) alternative library ++GLIBC_PASSES += i386 ++DEB_ARCH_MULTILIB_PACKAGES += libc6-i386 libc6-dev-i386 ++libc6-i386_shlib_dep = libc6-i386 (>= $(shlib_dep_ver)) ++i386_configure_target = i686-linux-gnu ++i386_CC = $(CC) -m32 ++i386_CXX = $(CXX) -m32 ++i386_mvec = no ++i386_slibdir = /lib32 ++i386_libdir = /usr/lib32 ++ ++define libc6-dev-i386_extra_pkg_install ++ ++mkdir -p debian/libc6-dev-i386/usr/include/x86_64-linux-gnux32/gnu ++cp -a debian/tmp-i386/usr/include/gnu/lib-names-32.h \ ++ debian/tmp-i386/usr/include/gnu/stubs-32.h \ ++ debian/libc6-dev-i386/usr/include/x86_64-linux-gnux32/gnu ++ ++endef ++ ++endif # multilib diff --cc debian/tests/control index 000000000,000000000..fe6028ed6 new file mode 100644 --- /dev/null +++ b/debian/tests/control @@@ -1,0 -1,0 +1,3 @@@ ++Tests: rebuild ++Depends: @builddeps@, fakeroot, binutils, linux-libc-dev [linux-any], gcc-10 ++Restrictions: allow-stderr diff --cc debian/tests/control.in index 000000000,000000000..20ac0b5c9 new file mode 100644 --- /dev/null +++ b/debian/tests/control.in @@@ -1,0 -1,0 +1,3 @@@ ++Tests: rebuild ++Depends: @builddeps@, fakeroot, @triggers@ ++Restrictions: allow-stderr diff --cc debian/tests/rebuild index 000000000,000000000..8a9985002 new file mode 100755 --- /dev/null +++ b/debian/tests/rebuild @@@ -1,0 -1,0 +1,3 @@@ ++#!/bin/sh ++set -e ++dpkg-buildpackage -rfakeroot -us -uc -b diff --cc debian/testsuite-xfail-debian.mk index 000000000,000000000..78e921f72 new file mode 100644 --- /dev/null +++ b/debian/testsuite-xfail-debian.mk @@@ -1,0 -1,0 +1,1018 @@@ ++###################################################################### ++# All architectures ++###################################################################### ++# These can fail when running with other loads or in a virtual machine ++test-xfail-tst-cpuclock2 = yes ++test-xfail-tst-cputimer1 = yes ++test-xfail-tst-timer = yes ++ ++# This is an upstream regression on multiple architectures ++# see https://sourceware.org/bugzilla/show_bug.cgi?id=19303 ++test-xfail-tst-cancel24-static = yes ++ ++# Due to the nature of this test, it's very sensitive to system load ++# in that, strangely, it wants more, not less. Given that's hard to ++# control, we'll just let it fail ++test-xfail-tst-create-detached = yes ++ ++###################################################################### ++# alpha (including optimized flavours) ++###################################################################### ++ifneq (,$(filter $(config-machine)-$(config-os), alpha-linux-gnu alphaev67-linux-gnu)) ++test-xfail-tst-backtrace5 = yes ++test-xfail-tst-backtrace6 = yes ++test-xfail-tst-cancel19 = yes ++test-xfail-test-double-finite-fma = yes ++test-xfail-test-double-finite-llrint = yes ++test-xfail-test-double-finite-llround = yes ++test-xfail-test-double-finite-lrint = yes ++test-xfail-test-double-finite-lround = yes ++test-xfail-test-double-finite-remainder = yes ++test-xfail-test-double-finite-scalbln = yes ++test-xfail-test-double-finite-scalbn = yes ++test-xfail-test-double-fma = yes ++test-xfail-test-double-llrint = yes ++test-xfail-test-double-llround = yes ++test-xfail-test-double-lrint = yes ++test-xfail-test-double-lround = yes ++test-xfail-test-double-remainder = yes ++test-xfail-test-double-scalbln = yes ++test-xfail-test-double-scalbn = yes ++test-xfail-test-fenv-return = yes ++test-xfail-test-fexcept = yes ++test-xfail-test-float-double-add = yes ++test-xfail-test-float-double-sub = yes ++test-xfail-test-float-finite-fma = yes ++test-xfail-test-float-finite-llrint = yes ++test-xfail-test-float-finite-llround = yes ++test-xfail-test-float-finite-lrint = yes ++test-xfail-test-float-finite-lround = yes ++test-xfail-test-float-finite-scalbln = yes ++test-xfail-test-float-finite-scalbn = yes ++test-xfail-test-float-fma = yes ++test-xfail-test-float-ldouble-add = yes ++test-xfail-test-float-ldouble-sub = yes ++test-xfail-test-float-llrint = yes ++test-xfail-test-float-llround = yes ++test-xfail-test-float-lrint = yes ++test-xfail-test-float-lround = yes ++test-xfail-test-float-scalbln = yes ++test-xfail-test-float-scalbn = yes ++test-xfail-test-float32-finite-fma = yes ++test-xfail-test-float32-finite-llrint = yes ++test-xfail-test-float32-finite-llround = yes ++test-xfail-test-float32-finite-lrint = yes ++test-xfail-test-float32-finite-lround = yes ++test-xfail-test-float32-finite-scalbln = yes ++test-xfail-test-float32-finite-scalbn = yes ++test-xfail-test-float32-float128-add = yes ++test-xfail-test-float32-float128-sub = yes ++test-xfail-test-float32-float32x-add = yes ++test-xfail-test-float32-float32x-sub = yes ++test-xfail-test-float32-float64-add = yes ++test-xfail-test-float32-float64-sub = yes ++test-xfail-test-float32-float64x-add = yes ++test-xfail-test-float32-float64x-sub = yes ++test-xfail-test-float32-fma = yes ++test-xfail-test-float32-llrint = yes ++test-xfail-test-float32-llround = yes ++test-xfail-test-float32-lrint = yes ++test-xfail-test-float32-lround = yes ++test-xfail-test-float32-scalbln = yes ++test-xfail-test-float32-scalbn = yes ++test-xfail-test-float32x-finite-fma = yes ++test-xfail-test-float32x-finite-llrint = yes ++test-xfail-test-float32x-finite-llround = yes ++test-xfail-test-float32x-finite-lrint = yes ++test-xfail-test-float32x-finite-lround = yes ++test-xfail-test-float32x-finite-remainder = yes ++test-xfail-test-float32x-finite-scalbln = yes ++test-xfail-test-float32x-finite-scalbn = yes ++test-xfail-test-float32x-fma = yes ++test-xfail-test-float32x-llrint = yes ++test-xfail-test-float32x-llround = yes ++test-xfail-test-float32x-lrint = yes ++test-xfail-test-float32x-lround = yes ++test-xfail-test-float32x-remainder = yes ++test-xfail-test-float32x-scalbln = yes ++test-xfail-test-float32x-scalbn = yes ++test-xfail-test-float64-finite-fma = yes ++test-xfail-test-float64-finite-llrint = yes ++test-xfail-test-float64-finite-llround = yes ++test-xfail-test-float64-finite-lrint = yes ++test-xfail-test-float64-finite-lround = yes ++test-xfail-test-float64-finite-remainder = yes ++test-xfail-test-float64-finite-scalbln = yes ++test-xfail-test-float64-finite-scalbn = yes ++test-xfail-test-float64-fma = yes ++test-xfail-test-float64-llrint = yes ++test-xfail-test-float64-llround = yes ++test-xfail-test-float64-lrint = yes ++test-xfail-test-float64-lround = yes ++test-xfail-test-float64-remainder = yes ++test-xfail-test-float64-scalbln = yes ++test-xfail-test-float64-scalbn = yes ++test-xfail-test-float64x-finite-llrint = yes ++test-xfail-test-float64x-finite-llround = yes ++test-xfail-test-float64x-finite-lrint = yes ++test-xfail-test-float64x-finite-lround = yes ++test-xfail-test-float64x-llrint = yes ++test-xfail-test-float64x-llround = yes ++test-xfail-test-float64x-lrint = yes ++test-xfail-test-float64x-lround = yes ++test-xfail-test-float128-finite-llrint = yes ++test-xfail-test-float128-finite-llround = yes ++test-xfail-test-float128-finite-lrint = yes ++test-xfail-test-float128-finite-lround = yes ++test-xfail-test-float128-llrint = yes ++test-xfail-test-float128-llround = yes ++test-xfail-test-float128-lrint = yes ++test-xfail-test-float128-lround = yes ++test-xfail-test-ldouble-finite-llrint = yes ++test-xfail-test-ldouble-finite-llround = yes ++test-xfail-test-ldouble-finite-lrint = yes ++test-xfail-test-ldouble-finite-lround = yes ++test-xfail-test-ldouble-llrint = yes ++test-xfail-test-ldouble-llround = yes ++test-xfail-test-ldouble-lrint = yes ++test-xfail-test-ldouble-lround = yes ++test-xfail-tst-eintr1 = yes ++test-xfail-tst-mqueue5 = yes ++test-xfail-tst-prelink-cmp = yes ++test-xfail-tst-signal3 = yes ++test-xfail-tst-timer4 = yes ++test-xfail-tst-waitid = yes ++test-xfail-tst-writev = yes ++ ++# There is not support for protection key on Alpha yet, and there is a ++# disagreement between kernel and glibc how to report that. ++test-xfail-tst-pkey = yes ++ ++# In some conditions the kernel might not provide a heap, causing ++# some tests to fail. See bug#889817 for details. ++test-xfail-tst-malloc-usable-tunables = yes ++endif ++ ++ ++###################################################################### ++# amd64 ++###################################################################### ++ifeq ($(config-machine)-$(config-os),x86_64-linux-gnu) ++# This test fails intermittently on amd64. It could be a kernel issue. ++# see https://sourceware.org/bugzilla/show_bug.cgi?id=19004 ++test-xfail-tst-robust8 = yes ++endif ++ ++ ++###################################################################### ++# arm64 ++###################################################################### ++ifeq ($(config-machine)-$(config-os),aarch64-linux-gnu) ++# There is not support for protection key on ARM64 yet, and there is a ++# disagreement between kernel and glibc how to report that. ++test-xfail-tst-pkey = yes ++ ++# In some conditions the kernel might not provide a heap, causing ++# some tests to fail. See bug#889817 for details. ++test-xfail-tst-malloc-usable-tunables = yes ++endif ++ ++ ++###################################################################### ++# armel ++###################################################################### ++ifeq ($(config-machine)-$(config-os),arm-linux-gnueabi) ++# There is not support for protection key on ARM yet, and there is a ++# disagreement between kernel and glibc how to report that. ++test-xfail-tst-pkey = yes ++endif ++ ++ ++###################################################################### ++# armhf ++###################################################################### ++ifeq ($(config-machine)-$(config-os),arm-linux-gnueabihf) ++# There is not support for protection key on ARM yet, and there is a ++# disagreement between kernel and glibc how to report that. ++test-xfail-tst-pkey = yes ++endif ++ ++ ++###################################################################### ++# hppa ++###################################################################### ++ifeq ($(config-machine)-$(config-os),hppa-linux-gnu) ++test-xfail-check-execstack = yes ++test-xfail-check-localplt = yes ++test-xfail-check-textrel = yes ++test-xfail-tst-audit2 = yes ++test-xfail-tst-backtrace2 = yes ++test-xfail-tst-backtrace3 = yes ++test-xfail-tst-backtrace4 = yes ++test-xfail-tst-backtrace5 = yes ++test-xfail-tst-backtrace6 = yes ++test-xfail-tst-cleanupx4 = yes ++test-xfail-tst-makecontext = yes ++test-xfail-tst-preadvwritev2 = yes ++test-xfail-tst-preadvwritev64v2 = yes ++test-xfail-tst-protected1a = yes ++test-xfail-tst-protected1b = yes ++test-xfail-tst-setcontext2 = yes ++test-xfail-tst-setcontext7 = yes ++test-xfail-tst-stack4 = yes ++# The following tests sometimes fail due to timeouts. ++test-xfail-tst-barrier5 = yes ++test-xfail-tst-cond25 = yes ++ ++# The following tests fail as xsigstack.c does not allocate stack ++# with executable permission ++# See https://sourceware.org/bugzilla/show_bug.cgi?id=24914 ++test-xfail-tst-minsigstksz-1 = yes ++test-xfail-tst-xsigstack = yes ++endif ++ ++ ++###################################################################### ++# hurd-i386 (including optimized flavours) ++###################################################################### ++ifeq ($(config-machine)-$(config-os),i686-gnu-gnu) ++# sysdeps/mach/hurd/dl-sysdep.c's open_file does not support the linker ++# creating files. ++test-xfail-tst-null-argv = yes ++ ++# bounding memory allocation is not supported yet ++tests-unsupported += tst-malloc-thread-fail ++tests-unsupported += tst-malloc-thread-fail-mcheck ++tests-unsupported += tst-dynarray-fail ++ ++# We don't provide /proc/cpuinfo yet ++test-xfail-test-multiarch = yes ++ ++# Need actual porting ++test-xfail-exe = yes ++ ++# TODO: in _hurd_port2fd store the flags in a new field in the hurd_fd ++# structure, and in __fdopendir pass over the O_NOATIME flag to the ++# __file_name_lookup_under call. ++test-xfail-tst-fdopendir = yes ++ ++# Overzealous test ++test-xfail-tst-pathconf = yes ++ ++# aio_suspend and lio_listio emulations use pthread_cond_wait, and thus can't be interrupted by a signal ++test-xfail-tst-aio10 = yes ++test-xfail-tst-aio9 = yes ++ ++# Needs LD_AUDIT support ++test-xfail-tst-audit1 = yes ++test-xfail-tst-audit2 = yes ++test-xfail-tst-audit3 = yes ++test-xfail-tst-audit8 = yes ++test-xfail-tst-audit9 = yes ++test-xfail-tst-audit11 = yes ++test-xfail-tst-audit12 = yes ++test-xfail-tst-audit14 = yes ++test-xfail-tst-audit15 = yes ++test-xfail-tst-audit16 = yes ++test-xfail-tst-auditmany = yes ++ ++# We always put LD_ORIGIN_PATH in the environment ++test-xfail-tst-execvpe5 = yes ++ ++# libgcc_s support assumes non-SIGINFO signal handler parameters ++test-xfail-tst-backtrace6 = yes ++ ++# Crashes on dividing by a profiling period 0 (not initialized) ++test-xfail-tst-sprofil = yes ++ ++# Missing RT signals. ++# And without rt_sigqueueinfo thread_expire_timer can't pass the si_code = SI_TIMER ++test-xfail-tst-timer4 = yes ++test-xfail-tst-timer5 = yes ++ ++# This generates GiBs of data instead of sparse files, putting build box on its knees ++tests-unsupported += test-lfs ++ ++# Needs LFS support ++#test-xfail-test-lfs = yes ++test-xfail-tst-tzset = yes ++ ++# new in 2.22 ++test-xfail-tst-prelink = yes ++test-xfail-tst-tls-atexit = yes ++ ++# new in 2.24 ++test-xfail-tst-spawn2 = yes ++ ++# fails randomly ++test-xfail-tst-preadvwritev64 = yes ++test-xfail-tst-preadwrite64 = yes ++ ++# happens on linux-i386 too ++test-xfail-annexc = yes ++ ++# needs sigwaitinfo ++test-xfail-tst-waitid = yes ++test-xfail-tst-wait4 = yes ++ ++# seems fixed in 2.24-3? ++test-xfail-tst-secure-getenv = yes ++ ++# new in 2.25 ++test-xfail-tst-posix_fallocate64 = yes ++test-xfail-tst-posix_fadvise = yes ++test-xfail-tst-posix_fadvise64 = yes ++test-xfail-tst-vfork3 = yes ++test-xfail-tst-env-setuid = yes ++test-xfail-tst-env-setuid-tunables = yes ++ ++# new in 2.26 ++test-xfail-tst-malloc-tcache-leak = yes ++test-xfail-tst-dynarray-fail-mem = yes ++test-xfail-test-errno = yes ++ ++# new in 2.27 ++test-xfail-tst-gmon-static = yes ++test-xfail-tst-gmon-static-gprof = yes ++test-xfail-tst-tls1-static-non-pie = yes ++test-xfail-tst-libc_dlvsym-static = yes ++test-xfail-tst-libc_dlvsym = yes ++ ++# want /proc/self/fd ++test-xfail-tst-if_index-long = yes ++test-xfail-tst-support_descriptors = yes ++ ++# new in 2.30 ++test-xfail-tst-nss-files-hosts-long = yes ++ ++# This redirects realloc with dlsym ++# Problem is: that creates a loop: realloc() calls dlsym() which calls ++# _dlerror_run calls libc_once(init) which calls pthread_key_create which calls ++# realloc() etc. ++test-xfail-tst-res_hconf_reorder = yes ++ ++# wants pthread_barrierattr_setpshared ++test-xfail-tst-pututxline-cache = yes ++test-xfail-tst-pututxline-lockfail = yes ++test-xfail-tst-mallocfork2 = yes ++test-xfail-tst-mallocfork2-mcheck = yes ++ ++# wants /proc/self/fd ++test-xfail-tst-updwtmpx = yes ++test-xfail-tst-lchmod = yes ++ ++# new in 2.32 ++test-xfail-tst-safe-linking = yes ++# Assumes some linuxish strings ++test-xfail-tst-strerror = yes ++# We always have several threads ++test-xfail-tst-single_threaded-pthread = yes ++# fixed in 2.32 ++test-xfail-tst-fdopendir2 = yes ++test-xfail-tst-grantpt = yes ++test-xfail-ISO11/threads.h/conform = yes ++test-xfail-ISO11/threads.h/linknamespace = yes ++test-xfail-tst-stackguard1-static = yes ++test-xfail-tst-stackguard1 = yes ++test-xfail-tst-ptrguard1-static = yes ++test-xfail-tst-ptrguard1 = yes ++test-xfail-tst-malloc-stats-cancellation = yes ++test-xfail-tst-malloc-stats-cancellation-mcheck = yes ++ ++# new in 2.33 ++test-xfail-tst-cpu-features-cpuinfo = yes ++test-xfail-tst-cpu-features-support = yes ++# Mach misses getting adjtime without privileges ++test-xfail-tst-adjtime = yes ++test-xfail-tst-join15 = yes ++ ++# fixed in 2.33 ++test-xfail-tst-malloc-usable-static-tunables = yes ++test-xfail-tst-malloc-usable-static = yes ++test-xfail-tst-get-cpu-features = yes ++test-xfail-test-fenv-sse-2 = yes ++test-xfail-test-fesetexcept-traps = yes ++test-xfail-tst-ptsname = yes ++test-xfail-tst-spawn4 = yes ++test-xfail-tst-spawn4-compat = yes ++ ++# new in 2.34 ++test-xfail-tst-cpu-features-cpuinfo-static = yes ++ ++# actually never succeded ++test-xfail-tst-create_format1 = yes ++test-xfail-tst-getcwd-abspath = yes ++test-xfail-tst-udp-error = yes ++ ++# Child seems to be inheriting the lockf from the parent? ++test-xfail-tst-lockf = yes ++ ++# assumes that all st_mode flags (32bit) can exist in stx_mode flags (16bit) ++test-xfail-tst-statx = yes ++ ++endif ++ ++ ++###################################################################### ++# i386 (including optimized flavours) ++###################################################################### ++ifeq ($(config-machine)-$(config-os),i686-linux-gnu) ++# Probably a GCC bug: https://sourceware.org/ml/libc-alpha/2015-11/msg00533.html ++test-xfail-tst-cleanupx4 = yes ++ ++# These failures happen on CPUs supporting AVX-512 due to a kernel bug: ++# https://bugzilla.kernel.org/show_bug.cgi?id=153531 ++test-xfail-tst-minsigstksz-1 = yes ++test-xfail-tst-minsigstksz-2 = yes ++endif ++ ++ ++###################################################################### ++# kfreebsd-* ++###################################################################### ++ifeq ($(config-os),kfreebsd-gnu) ++ ++# Most of these tests fail because fsid_t is defined as an union to ++# support both __val (POSIX) and val (BSD) name. ++test-xfail-ISO/ctype.h/conform = yes ++test-xfail-ISO/signal.h/conform = yes ++test-xfail-ISO/stdio.h/conform = yes ++test-xfail-ISO/math.h/conform = yes ++test-xfail-ISO/time.h/conform = yes ++test-xfail-ISO11/ctype.h/conform = yes ++test-xfail-ISO11/inttypes.h/conform = yes ++test-xfail-ISO11/math.h/conform = yes ++test-xfail-ISO11/signal.h/conform = yes ++test-xfail-ISO11/stdint.h/conform = yes ++test-xfail-ISO11/stdio.h/conform = yes ++test-xfail-ISO11/time.h/conform = yes ++test-xfail-ISO11/tgmath.h/conform = yes ++test-xfail-ISO11/wctype.h/conform = yes ++test-xfail-ISO99/ctype.h/conform = yes ++test-xfail-ISO99/inttypes.h/conform = yes ++test-xfail-ISO99/math.h/conform = yes ++test-xfail-ISO99/signal.h/conform = yes ++test-xfail-ISO99/stdint.h/conform = yes ++test-xfail-ISO99/stdio.h/conform = yes ++test-xfail-ISO99/time.h/conform = yes ++test-xfail-ISO99/tgmath.h/conform = yes ++test-xfail-ISO99/wctype.h/conform = yes ++test-xfail-POSIX/aio.h/conform = yes ++test-xfail-POSIX/ctype.h/conform = yes ++test-xfail-POSIX/dirent.h/conform = yes ++test-xfail-POSIX/fcntl.h/conform = yes ++test-xfail-POSIX/grp.h/conform = yes ++test-xfail-POSIX/math.h/conform = yes ++test-xfail-POSIX/mqueue.h/conform = yes ++test-xfail-POSIX/pthread.h/conform = yes ++test-xfail-POSIX/pwd.h/conform = yes ++test-xfail-POSIX/regex.h/conform = yes ++test-xfail-POSIX/sched.h/conform = yes ++test-xfail-POSIX/semaphore.h/conform = yes ++test-xfail-POSIX/signal.h/conform = yes ++test-xfail-POSIX/stdio.h/conform = yes ++test-xfail-POSIX/sys/mman.h/conform = yes ++test-xfail-POSIX/sys/stat.h/conform = yes ++test-xfail-POSIX/sys/times.h/conform = yes ++test-xfail-POSIX/sys/types.h/conform = yes ++test-xfail-POSIX/time.h/conform = yes ++test-xfail-POSIX/unistd.h/conform = yes ++test-xfail-POSIX/utime.h/conform = yes ++test-xfail-POSIX2008/aio.h/conform = yes ++test-xfail-POSIX2008/ctype.h/conform = yes ++test-xfail-POSIX2008/dirent.h/conform = yes ++test-xfail-POSIX2008/errno.h/conform = yes ++test-xfail-POSIX2008/fcntl.h/conform = yes ++test-xfail-POSIX2008/grp.h/conform = yes ++test-xfail-POSIX2008/inttypes.h/conform = yes ++test-xfail-POSIX2008/math.h/conform = yes ++test-xfail-POSIX2008/monetary.h/conform = yes ++test-xfail-POSIX2008/mqueue.h/conform = yes ++test-xfail-POSIX2008/net/if.h/conform = yes ++test-xfail-POSIX2008/netdb.h/linknamespace = yes ++test-xfail-POSIX2008/netinet/tcp.h/conform = yes ++test-xfail-POSIX2008/pthread.h/conform = yes ++test-xfail-POSIX2008/pwd.h/conform = yes ++test-xfail-POSIX2008/regex.h/conform = yes ++test-xfail-POSIX2008/sched.h/conform = yes ++test-xfail-POSIX2008/semaphore.h/conform = yes ++test-xfail-POSIX2008/stdint.h/conform = yes ++test-xfail-POSIX2008/spawn.h/conform = yes ++test-xfail-POSIX2008/stdio.h/conform = yes ++test-xfail-POSIX2008/stropts.h/conform = yes ++test-xfail-POSIX2008/sys/mman.h/conform = yes ++test-xfail-POSIX2008/sys/select.h/conform = yes ++test-xfail-POSIX2008/sys/stat.h/conform = yes ++test-xfail-POSIX2008/sys/statvfs.h/conform = yes ++test-xfail-POSIX2008/sys/times.h/conform = yes ++test-xfail-POSIX2008/sys/types.h/conform = yes ++test-xfail-POSIX2008/sys/un.h/conform = yes ++test-xfail-POSIX2008/termios.h/conform = yes ++test-xfail-POSIX2008/tgmath.h/conform = yes ++test-xfail-POSIX2008/time.h/conform = yes ++test-xfail-POSIX2008/unistd.h/conform = yes ++test-xfail-POSIX2008/utime.h/conform = yes ++test-xfail-POSIX2008/wctype.h/conform = yes ++test-xfail-UNIX98/aio.h/conform = yes ++test-xfail-UNIX98/ctype.h/conform = yes ++test-xfail-UNIX98/dirent.h/conform = yes ++test-xfail-UNIX98/errno.h/conform = yes ++test-xfail-UNIX98/fcntl.h/conform = yes ++test-xfail-UNIX98/ftw.h/conform = yes ++test-xfail-UNIX98/grp.h/conform = yes ++test-xfail-UNIX98/math.h/conform = yes ++test-xfail-UNIX98/monetary.h/conform = yes ++test-xfail-UNIX98/mqueue.h/conform = yes ++test-xfail-UNIX98/pthread.h/conform = yes ++test-xfail-UNIX98/pwd.h/conform = yes ++test-xfail-UNIX98/regex.h/conform = yes ++test-xfail-UNIX98/sched.h/conform = yes ++test-xfail-UNIX98/semaphore.h/conform = yes ++test-xfail-UNIX98/stdio.h/conform = yes ++test-xfail-UNIX98/stdlib.h/conform = yes ++test-xfail-UNIX98/stropts.h/conform = yes ++test-xfail-UNIX98/sys/ipc.h/conform = yes ++test-xfail-UNIX98/sys/mman.h/conform = yes ++test-xfail-UNIX98/sys/msg.h/conform = yes ++test-xfail-UNIX98/sys/resource.h/conform = yes ++test-xfail-UNIX98/sys/sem.h/conform = yes ++test-xfail-UNIX98/sys/shm.h/conform = yes ++test-xfail-UNIX98/sys/socket.h/conform = yes ++test-xfail-UNIX98/sys/stat.h/conform = yes ++test-xfail-UNIX98/sys/statvfs.h/conform = yes ++test-xfail-UNIX98/sys/time.h/conform = yes ++test-xfail-UNIX98/sys/timeb.h/conform = yes ++test-xfail-UNIX98/sys/times.h/conform = yes ++test-xfail-UNIX98/sys/types.h/conform = yes ++test-xfail-UNIX98/sys/uio.h/conform = yes ++test-xfail-UNIX98/sys/un.h/conform = yes ++test-xfail-UNIX98/termios.h/conform = yes ++test-xfail-UNIX98/time.h/conform = yes ++test-xfail-UNIX98/unistd.h/conform = yes ++test-xfail-UNIX98/utime.h/conform = yes ++test-xfail-UNIX98/utmpx.h/conform = yes ++test-xfail-UNIX98/wchar.h/conform = yes ++test-xfail-UNIX98/wctype.h/conform = yes ++test-xfail-XOPEN2K/aio.h/conform = yes ++test-xfail-XOPEN2K/arpa/inet.h/conform = yes ++test-xfail-XOPEN2K/ctype.h/conform = yes ++test-xfail-XOPEN2K/dirent.h/conform = yes ++test-xfail-XOPEN2K/errno.h/conform = yes ++test-xfail-XOPEN2K/fcntl.h/conform = yes ++test-xfail-XOPEN2K/ftw.h/conform = yes ++test-xfail-XOPEN2K/grp.h/conform = yes ++test-xfail-XOPEN2K/inttypes.h/conform = yes ++test-xfail-XOPEN2K/math.h/conform = yes ++test-xfail-XOPEN2K/monetary.h/conform = yes ++test-xfail-XOPEN2K/mqueue.h/conform = yes ++test-xfail-XOPEN2K/net/if.h/conform = yes ++test-xfail-XOPEN2K/netdb.h/conform = yes ++test-xfail-XOPEN2K/netdb.h/linknamespace = yes ++test-xfail-XOPEN2K/netinet/in.h/conform = yes ++test-xfail-XOPEN2K/netinet/tcp.h/conform = yes ++test-xfail-XOPEN2K/pthread.h/conform = yes ++test-xfail-XOPEN2K/pwd.h/conform = yes ++test-xfail-XOPEN2K/regex.h/conform = yes ++test-xfail-XOPEN2K/sched.h/conform = yes ++test-xfail-XOPEN2K/spawn.h/conform = yes ++test-xfail-XOPEN2K/stdio.h/conform = yes ++test-xfail-XOPEN2K/stdint.h/conform = yes ++test-xfail-XOPEN2K/stdlib.h/conform = yes ++test-xfail-XOPEN2K/stropts.h/conform = yes ++test-xfail-XOPEN2K/sys/ipc.h/conform = yes ++test-xfail-XOPEN2K/sys/mman.h/conform = yes ++test-xfail-XOPEN2K/sys/msg.h/conform = yes ++test-xfail-XOPEN2K/sys/resource.h/conform = yes ++test-xfail-XOPEN2K/sys/select.h/conform = yes ++test-xfail-XOPEN2K/sys/sem.h/conform = yes ++test-xfail-XOPEN2K/sys/shm.h/conform = yes ++test-xfail-XOPEN2K/sys/socket.h/conform = yes ++test-xfail-XOPEN2K/sys/stat.h/conform = yes ++test-xfail-XOPEN2K/sys/statvfs.h/conform = yes ++test-xfail-XOPEN2K/sys/time.h/conform = yes ++test-xfail-XOPEN2K/sys/timeb.h/conform = yes ++test-xfail-XOPEN2K/sys/times.h/conform = yes ++test-xfail-XOPEN2K/sys/types.h/conform = yes ++test-xfail-XOPEN2K/sys/uio.h/conform = yes ++test-xfail-XOPEN2K/sys/un.h/conform = yes ++test-xfail-XOPEN2K/termios.h/conform = yes ++test-xfail-XOPEN2K/time.h/conform = yes ++test-xfail-XOPEN2K/tgmath.h/conform = yes ++test-xfail-XOPEN2K/unistd.h/conform = yes ++test-xfail-XOPEN2K/utime.h/conform = yes ++test-xfail-XOPEN2K/utmpx.h/conform = yes ++test-xfail-XOPEN2K/wchar.h/conform = yes ++test-xfail-XOPEN2K/wctype.h/conform = yes ++test-xfail-XOPEN2K8/aio.h/conform = yes ++test-xfail-XOPEN2K8/arpa/inet.h/conform = yes ++test-xfail-XOPEN2K8/ctype.h/conform = yes ++test-xfail-XOPEN2K8/dirent.h/conform = yes ++test-xfail-XOPEN2K8/errno.h/conform = yes ++test-xfail-XOPEN2K8/fcntl.h/conform = yes ++test-xfail-XOPEN2K8/ftw.h/conform = yes ++test-xfail-XOPEN2K8/grp.h/conform = yes ++test-xfail-XOPEN2K8/inttypes.h/conform = yes ++test-xfail-XOPEN2K8/math.h/conform = yes ++test-xfail-XOPEN2K8/monetary.h/conform = yes ++test-xfail-XOPEN2K8/mqueue.h/conform = yes ++test-xfail-XOPEN2K8/net/if.h/conform = yes ++test-xfail-XOPEN2K8/netdb.h/conform = yes ++test-xfail-XOPEN2K8/netdb.h/linknamespace = yes ++test-xfail-XOPEN2K8/netinet/in.h/conform = yes ++test-xfail-XOPEN2K8/netinet/tcp.h/conform = yes ++test-xfail-XOPEN2K8/pthread.h/conform = yes ++test-xfail-XOPEN2K8/pwd.h/conform = yes ++test-xfail-XOPEN2K8/regex.h/conform = yes ++test-xfail-XOPEN2K8/sched.h/conform = yes ++test-xfail-XOPEN2K8/semaphore.h/conform = yes ++test-xfail-XOPEN2K8/spawn.h/conform = yes ++test-xfail-XOPEN2K8/stdio.h/conform = yes ++test-xfail-XOPEN2K8/stdint.h/conform = yes ++test-xfail-XOPEN2K8/stdlib.h/conform = yes ++test-xfail-XOPEN2K8/stropts.h/conform = yes ++test-xfail-XOPEN2K8/sys/ipc.h/conform = yes ++test-xfail-XOPEN2K8/sys/mman.h/conform = yes ++test-xfail-XOPEN2K8/sys/msg.h/conform = yes ++test-xfail-XOPEN2K8/sys/resource.h/conform = yes ++test-xfail-XOPEN2K8/sys/select.h/conform = yes ++test-xfail-XOPEN2K8/sys/sem.h/conform = yes ++test-xfail-XOPEN2K8/sys/shm.h/conform = yes ++test-xfail-XOPEN2K8/sys/socket.h/conform = yes ++test-xfail-XOPEN2K8/sys/stat.h/conform = yes ++test-xfail-XOPEN2K8/sys/statvfs.h/conform = yes ++test-xfail-XOPEN2K8/sys/time.h/conform = yes ++test-xfail-XOPEN2K8/sys/times.h/conform = yes ++test-xfail-XOPEN2K8/sys/types.h/conform = yes ++test-xfail-XOPEN2K8/sys/uio.h/conform = yes ++test-xfail-XOPEN2K8/sys/un.h/conform = yes ++test-xfail-XOPEN2K8/termios.h/conform = yes ++test-xfail-XOPEN2K8/tgmath.h/conform = yes ++test-xfail-XOPEN2K8/time.h/conform = yes ++test-xfail-XOPEN2K8/unistd.h/conform = yes ++test-xfail-XOPEN2K8/utime.h/conform = yes ++test-xfail-XOPEN2K8/utmpx.h/conform = yes ++test-xfail-XOPEN2K8/wchar.h/conform = yes ++test-xfail-XOPEN2K8/wctype.h/conform = yes ++test-xfail-XPG4/ctype.h/conform = yes ++test-xfail-XPG4/dirent.h/conform = yes ++test-xfail-XPG4/errno.h/conform = yes ++test-xfail-XPG4/fcntl.h/conform = yes ++test-xfail-XPG4/ftw.h/conform = yes ++test-xfail-XPG4/grp.h/conform = yes ++test-xfail-XPG4/math.h/conform = yes ++test-xfail-XPG4/monetary.h/conform = yes ++test-xfail-XPG4/pwd.h/conform = yes ++test-xfail-XPG4/regex.h/conform = yes ++test-xfail-XPG4/stdio.h/conform = yes ++test-xfail-XPG4/stdlib.h/conform = yes ++test-xfail-XPG4/stropts.h/conform = yes ++test-xfail-XPG4/sys/ipc.h/conform = yes ++test-xfail-XPG4/sys/mman.h/conform = yes ++test-xfail-XPG4/sys/msg.h/conform = yes ++test-xfail-XPG4/sys/sem.h/conform = yes ++test-xfail-XPG4/sys/shm.h/conform = yes ++test-xfail-XPG4/sys/socket.h/conform = yes ++test-xfail-XPG4/sys/stat.h/conform = yes ++test-xfail-XPG4/sys/time.h/conform = yes ++test-xfail-XPG4/sys/timeb.h/conform = yes ++test-xfail-XPG4/sys/times.h/conform = yes ++test-xfail-XPG4/sys/types.h/conform = yes ++test-xfail-XPG4/sys/uio.h/conform = yes ++test-xfail-XPG4/termios.h/conform = yes ++test-xfail-XPG4/time.h/conform = yes ++test-xfail-XPG4/unistd.h/conform = yes ++test-xfail-XPG4/utime.h/conform = yes ++test-xfail-XPG4/utmpx.h/conform = yes ++ ++# Most of these failures are due to headers provided by kfreebsd-kernel-headers ++test-xfail-check-installed-headers-c = yes ++test-xfail-check-installed-headers-c = yes ++test-xfail-check-installed-headers-cxx = yes ++test-xfail-check-installed-headers-c = yes ++test-xfail-check-installed-headers-cxx = yes ++test-xfail-check-installed-headers-c = yes ++test-xfail-check-installed-headers-c = yes ++test-xfail-check-installed-headers-c = yes ++test-xfail-check-installed-headers-cxx = yes ++test-xfail-check-installed-headers-c = yes ++test-xfail-check-installed-headers-cxx = yes ++ ++# will expectedly SIGSEGV on kfreebsd 10.0 and later, due to having ++# nxstack=1 by default (bug #762404) ++test-xfail-tst-execstack = yes ++test-xfail-tst-execstack-needed = yes ++test-xfail-tst-execstack-prog = =yes ++endif ++ ++ ++###################################################################### ++# kfreebsd-amd64 ++###################################################################### ++ifeq ($(config-machine)-$(config-os),x86_64-kfreebsd-gnu) ++test-xfail-check-local-headers = yes ++test-xfail-test-sysvsem = yes ++test-xfail-test-sysvshm = yes ++test-xfail-tst-aio10 = yes ++test-xfail-tst-aio9 = yes ++test-xfail-tst-attr2 = yes ++test-xfail-tst-attr3 = yes ++test-xfail-tst-cancel7 = yes ++test-xfail-tst-cancelx7 = yes ++test-xfail-tst-default-attr = yes ++test-xfail-tst-getpid1 = yes ++test-xfail-tst-getpid2 = yes ++test-xfail-tst-longjmp_chk = yes ++test-xfail-tst-renameat = yes ++test-xfail-tst-setcontext2 = yes ++test-xfail-tst-shm = yes ++test-xfail-tst-spawn2 = yes ++test-xfail-tst-spawn3 = yes ++test-xfail-tst-udp-error = yes ++test-xfail-tst-waitid = yes ++test-xfail-tst-writev = yes ++endif ++ ++ ++###################################################################### ++# kfreebsd-i386 (including optimized flavours) ++###################################################################### ++ifeq ($(config-machine)-$(config-os),i686-kfreebsd-gnu) ++test-xfail-check-local-headers = yes ++test-xfail-test-sysvsem = yes ++test-xfail-test-sysvshm = yes ++test-xfail-tst-aio10 = yes ++test-xfail-tst-aio9 = yes ++test-xfail-tst-attr2 = yes ++test-xfail-tst-attr3 = yes ++test-xfail-tst-cancel7 = yes ++test-xfail-tst-cancelx7 = yes ++test-xfail-tst-cleanupx4 = yes ++test-xfail-tst-default-attr = yes ++test-xfail-tst-getpid1 = yes ++test-xfail-tst-getpid2 = yes ++test-xfail-tst-longjmp_chk = yes ++test-xfail-tst-renameat = yes ++test-xfail-tst-setcontext2 = yes ++test-xfail-tst-shm = yes ++test-xfail-tst-spawn2 = yes ++test-xfail-tst-spawn3 = yes ++test-xfail-tst-udp-error = yes ++test-xfail-tst-waitid = yes ++endif ++ ++ ++###################################################################### ++# m68k ++###################################################################### ++ifeq ($(config-machine)-$(config-os),m68k-linux-gnu) ++test-xfail-annexc = yes ++test-xfail-bug-nextafter = yes ++test-xfail-bug-nexttoward = yes ++test-xfail-bug-regex20 = yes ++test-xfail-check-localplt = yes ++test-xfail-localedata/sort-test = yes ++test-xfail-test-float64 = yes ++test-xfail-test-fenv = yes ++test-xfail-test-float32 = yes ++test-xfail-test-ifloat64 = yes ++test-xfail-test-ifloat32 = yes ++test-xfail-test-misc = yes ++test-xfail-tst-atomic-long = yes ++test-xfail-tst-atomic = yes ++test-xfail-tst-mqueue5 = yes ++test-xfail-tst-mqueue6 = yes ++test-xfail-tst-rxspencer = yes ++endif ++ ++ ++###################################################################### ++# mips* ++###################################################################### ++ifneq (,$(filter $(config-machine)-$(config-os), mips-linux-gnu mipsel-linux-gnu mips64-linux-gnuabi64 mips64el-linux-gnuabi64 mips64-linux-gnuabin32 mips64el-linux-gnuabin32)) ++test-xfail-tst-stack4 = yes ++ ++# MIPS GCC does not use PT_GNU_STACK markers (this is a GCC issue) ++test-xfail-check-execstack = yes ++ ++# Theses failures are due to a bug in the cvt.s.d instruction on some FPU ++# (at least Octeon 3 and XBurst). The tininess detection is done on a ++# before-rounding basis instead of an after-rounding basis. ++test-xfail-test-float-fma = yes ++test-xfail-test-float-finite-fma = yes ++test-xfail-test-float32-fma = yes ++test-xfail-test-float32-finite-fma = yes ++test-xfail-test-float-double-add = yes ++test-xfail-test-float-double-sub = yes ++test-xfail-test-float-ldouble-add = yes ++test-xfail-test-float-ldouble-sub = yes ++test-xfail-test-float32-float32x-add = yes ++test-xfail-test-float32-float32x-sub = yes ++test-xfail-test-float32-float64-add = yes ++test-xfail-test-float32-float64-sub = yes ++ ++# Theses failures are due to a bug in the cvt.d.s instruction on some FPU ++# (at least Octeon 3 and XBurst). The qNaN payload is not preserved in ++# the conversion and a new qNaN is generated. ++test-xfail-tst-strfrom = yes ++test-xfail-tst-strfrom-locale = yes ++ ++# There is not support for protection key on MIPS yet, and there is a ++# disagreement between kernel and glibc how to report that. ++test-xfail-tst-pkey = yes ++endif ++ ++ ++###################################################################### ++# little-endian mips* ++###################################################################### ++ifneq (,$(filter $(config-machine)-$(config-os), mipsel-linux-gnu mips64el-linux-gnuabi64 mips64el-linux-gnuabin32)) ++# These failures are due to a bug in the Loongson 3A FPU ++test-xfail-test-double-finite-lround = yes ++test-xfail-test-double-lround = yes ++test-xfail-test-float32x-finite-lround = yes ++test-xfail-test-float32x-lround = yes ++test-xfail-test-float64-finite-lround = yes ++test-xfail-test-float64-lround = yes ++test-xfail-test-idouble-lround = yes ++test-xfail-test-ifloat32x-lround = yes ++test-xfail-test-ifloat64-lround = yes ++test-xfail-test-ildouble-lround = yes ++test-xfail-test-ldouble-finite-lround = yes ++test-xfail-test-ldouble-lround = yes ++endif ++ ++ ++###################################################################### ++# O32 mips* ++###################################################################### ++ifneq (,$(filter $(config-machine)-$(config-os), mips64-linux-gnu mips64el-linux-gnu)) ++# In some conditions the kernel might not provide a heap, causing ++# some tests to fail. See bug#889817 for details. ++test-xfail-tst-thread-exit-clobber = yes ++endif ++ ++ ++###################################################################### ++# N64 mips* ++###################################################################### ++ifneq (,$(filter $(config-machine)-$(config-os), mips64-linux-gnuabi64 mips64el-linux-gnuabi64)) ++# In some conditions the kernel might not provide a heap, causing ++# some tests to fail. See bug#889817 for details. ++test-xfail-tst-malloc-usable-tunables = yes ++endif ++ ++ ++###################################################################### ++# ppc64el ++###################################################################### ++ifeq ($(config-machine)-$(config-os),powerpc64le-linux-gnu) ++# In some conditions the kernel might not provide a heap, causing ++# some tests to fail. See bug#889817 for details. ++test-xfail-tst-malloc-usable-tunables = yes ++ ++# The glibc implementation of pkey_get and pkey_set are the stub ++# implementations. ++test-xfail-tst-pkey = yes ++endif ++ ++ ++###################################################################### ++# ppc64 ++###################################################################### ++ifeq ($(config-machine)-$(config-os),powerpc64-linux-gnu) ++test-xfail-tst-backtrace5 = yes ++test-xfail-tst-backtrace6 = yes ++test-xfail-tst-mqueue5 = yes ++test-xfail-tst-waitid = yes ++ ++# In some conditions the kernel might not provide a heap, causing ++# some tests to fail. See bug#889817 for details. ++test-xfail-tst-malloc-usable-tunables = yes ++ ++# The glibc implementation of pkey_get and pkey_set are the stub ++# implementations. ++test-xfail-tst-pkey = yes ++endif ++ ++ ++###################################################################### ++# powerpc ++###################################################################### ++ifeq ($(config-machine)-$(config-os),powerpc-linux-gnu) ++test-xfail-tst-backtrace5 = yes ++test-xfail-tst-backtrace6 = yes ++test-xfail-tst-mqueue5 = yes ++test-xfail-tst-waitid = yes ++ ++# The glibc implementation of pkey_get and pkey_set are the stub ++# implementations. ++test-xfail-tst-pkey = yes ++endif ++ ++ ++###################################################################### ++# riscv64 ++###################################################################### ++ifeq ($(config-machine)-$(config-os),riscv64-linux-gnu) ++test-xfail-tst-cond-except = yes ++test-xfail-tst-cond24 = yes ++test-xfail-tst-cond25 = yes ++test-xfail-tst-malloc-usable-tunables = yes ++test-xfail-tst-resolv-res_init = yes ++test-xfail-tst-resolv-res_init-thread = yes ++test-xfail-tst-resolv-threads = yes ++test-xfail-tst-robust-fork = yes ++test-xfail-tst-strfrom = yes ++test-xfail-tst-strfrom-locale = yes ++test-xfail-tst-tls12 = yes ++ ++# Those tests fail due to a kernel bug. See: ++# http://lists.infradead.org/pipermail/linux-riscv/2018-December/002512.html ++test-xfail-test-fenv = yes ++test-xfail-test-fpucw = yes ++test-xfail-test-fpucw-ieee = yes ++test-xfail-test-fpucw-ieee-static = yes ++test-xfail-test-fpucw-static = yes ++ ++# Those tests sometimes fail in a QEMU VM, but not on a HiFive Unleashed board ++test-xfail-test-at_quick_exit-race = yes ++test-xfail-test-on_exit-race = yes ++test-xfail-tst-cond16 = yes ++test-xfail-tst-malloc-thread-fail = yes ++test-xfail-tst-stack4 = yes ++endif ++ ++ ++###################################################################### ++# s390x ++###################################################################### ++ifeq ($(config-machine)-$(config-os),s390x-linux-gnu) ++test-xfail-tst-protected1a = yes ++test-xfail-tst-protected1b = yes ++ ++# In some conditions the kernel might not provide a heap, causing ++# some tests to fail. See bug#889817 for details. ++test-xfail-tst-malloc-usable-tunables = yes ++endif ++ ++ ++###################################################################### ++# sparc ++###################################################################### ++ifeq ($(config-machine)-$(config-os),sparc-linux-gnu) ++test-xfail-annexc = yes ++test-xfail-check-localplt = yes ++test-xfail-tst-backtrace2 = yes ++test-xfail-tst-backtrace3 = yes ++test-xfail-tst-backtrace4 = yes ++test-xfail-tst-backtrace5 = yes ++test-xfail-tst-backtrace6 = yes ++test-xfail-tst-waitid = yes ++ ++# Even if configured using --with-long-double-128, the biarch32 compiler ++# on sparc64 defaults to 64-bit doubles, causing the failure below. This ++# should be fixed by the following gcc patch: ++# http://gcc.gnu.org/ml/gcc-patches/2013-12/msg00318.html ++test-xfail-stdlib/isomac = yes ++endif ++ ++ ++###################################################################### ++# sparc64 ++###################################################################### ++ifeq ($(config-machine)-$(config-os),sparc64-linux-gnu) ++test-xfail-ISO/setjmp.h/conform = yes ++test-xfail-ISO11/setjmp.h/conform = yes ++test-xfail-ISO99/setjmp.h/conform = yes ++test-xfail-POSIX/pthread.h/conform = yes ++test-xfail-POSIX/setjmp.h/conform = yes ++test-xfail-POSIX2008/pthread.h/conform = yes ++test-xfail-POSIX2008/setjmp.h/conform = yes ++test-xfail-UNIX98/pthread.h/conform = yes ++test-xfail-UNIX98/setjmp.h/conform = yes ++test-xfail-XOPEN2K/pthread.h/conform = yes ++test-xfail-XOPEN2K/setjmp.h/conform = yes ++test-xfail-XOPEN2K8/pthread.h/conform = yes ++test-xfail-XOPEN2K8/setjmp.h/conform = yes ++test-xfail-XPG4/setjmp.h/conform = yes ++test-xfail-tst-cond8-static = yes ++test-xfail-tst-mutex8-static = yes ++test-xfail-tst-mutexpi8-static = yes ++test-xfail-tst-protected1a = yes ++test-xfail-tst-protected1b = yes ++test-xfail-tst-realloc = yes ++test-xfail-tst-waitid = yes ++test-xfail-test-float64x-float128-mul=yes ++ ++# In some conditions the kernel might not provide a heap, causing ++# some tests to fail. See bug#889817 for details. ++test-xfail-tst-malloc-usable-tunables = yes ++endif ++ ++ ++###################################################################### ++# x32 ++###################################################################### ++ifeq ($(config-machine)-$(config-os),x86_64-linux-gnux32) ++test-xfail-tst-platform-1 = yes ++endif diff --cc debian/watch index 000000000,000000000..7dbd0ca7d new file mode 100644 --- /dev/null +++ b/debian/watch @@@ -1,0 -1,0 +1,2 @@@ ++version=3 ++ftp://ftp.gnu.org/gnu/glibc/glibc-([\d\.]+)\.tar\.gz debian uupdate