From c039afaba90a159f991dc584b6501ba26c94e423 Mon Sep 17 00:00:00 2001 From: openKylinBot Date: Mon, 25 Apr 2022 22:03:04 +0800 Subject: [PATCH] Import Debian changes 2.31-ok1 glibc (2.31-ok1) yangtze; urgency=medium * Build for openKylin. --- debian/changelog | 5 + debian/changelog.ubuntu | 13151 +++ debian/changelog.upstream | 3 + debian/compat | 1 + debian/control | 920 + debian/control.in/amd64 | 25 + debian/control.in/armel | 23 + debian/control.in/armhf | 23 + debian/control.in/i386 | 26 + debian/control.in/kfreebsd-i386 | 25 + debian/control.in/libc | 91 + debian/control.in/main | 142 + debian/control.in/mips32 | 28 + debian/control.in/mips64 | 25 + debian/control.in/mipsn32 | 25 + debian/control.in/opt | 65 + debian/control.in/powerpc | 25 + debian/control.in/ppc64 | 25 + debian/control.in/s390 | 25 + debian/control.in/sparc | 25 + debian/control.in/sparc64 | 25 + debian/control.in/x32 | 24 + debian/copyright | 509 + debian/debhelper.in/glibc-doc.docs | 1 + debian/debhelper.in/glibc-doc.links | 17 + debian/debhelper.in/glibc-doc.manpages | 8 + debian/debhelper.in/glibc-source.install | 1 + .../glibc-source.lintian-overrides | 33 + debian/debhelper.in/libc-alt.install | 5 + .../debhelper.in/libc-alt.lintian-overrides | 14 + debian/debhelper.in/libc-alt.postrm | 21 + debian/debhelper.in/libc-bin.dirs | 2 + debian/debhelper.in/libc-bin.install | 21 + .../debhelper.in/libc-bin.lintian-overrides | 26 + debian/debhelper.in/libc-bin.manpages | 3 + debian/debhelper.in/libc-bin.postinst | 60 + debian/debhelper.in/libc-bin.triggers | 9 + debian/debhelper.in/libc-dev-alt.install | 22 + .../libc-dev-alt.lintian-overrides | 3 + debian/debhelper.in/libc-dev-bin.install | 5 + .../libc-dev-bin.lintian-overrides | 3 + debian/debhelper.in/libc-dev-bin.manpages | 3 + debian/debhelper.in/libc-dev.install | 23 + .../debhelper.in/libc-dev.install.hurd-i386 | 21 + .../debhelper.in/libc-dev.lintian-overrides | 3 + debian/debhelper.in/libc-l10n.install | 2 + debian/debhelper.in/libc-otherbuild.install | 3 + .../libc-otherbuild.lintian-overrides | 14 + debian/debhelper.in/libc-otherbuild.postinst | 13 + debian/debhelper.in/libc-otherbuild.postrm | 12 + debian/debhelper.in/libc-pic.install | 3 + debian/debhelper.in/libc-prof.install | 1 + debian/debhelper.in/libc-udeb.install | 16 + debian/debhelper.in/libc.NEWS | 95 + debian/debhelper.in/libc.README.Debian | 116 + debian/debhelper.in/libc.dirs | 1 + debian/debhelper.in/libc.docs | 2 + debian/debhelper.in/libc.install | 6 + debian/debhelper.in/libc.lintian-overrides | 13 + debian/debhelper.in/libc.postinst | 150 + debian/debhelper.in/libc.postrm | 31 + debian/debhelper.in/libc.preinst | 483 + debian/debhelper.in/libc.templates | 74 + debian/debhelper.in/locales-all.NEWS | 8 + debian/debhelper.in/locales-all.dirs | 1 + debian/debhelper.in/locales-all.install | 1 + debian/debhelper.in/locales-all.postinst | 14 + debian/debhelper.in/locales-all.prerm | 31 + debian/debhelper.in/locales.NEWS | 28 + debian/debhelper.in/locales.README.Debian | 17 + debian/debhelper.in/locales.config | 109 + debian/debhelper.in/locales.dirs | 1 + debian/debhelper.in/locales.install | 7 + debian/debhelper.in/locales.links | 1 + debian/debhelper.in/locales.manpages | 8 + debian/debhelper.in/locales.postinst | 85 + debian/debhelper.in/locales.postrm | 15 + debian/debhelper.in/locales.prerm | 19 + debian/debhelper.in/locales.templates | 27 + debian/debhelper.in/nscd.dirs | 1 + debian/debhelper.in/nscd.init | 146 + debian/debhelper.in/nscd.install | 3 + debian/debhelper.in/nscd.manpages | 2 + debian/debhelper.in/nscd.postrm | 14 + debian/generate-supported.mk | 11 + debian/glibc-source.filelist | 91 + debian/libc0.1-i386.symbols.kfreebsd-amd64 | 6 + debian/libc0.1.symbols.common | 59 + debian/libc0.1.symbols.kfreebsd-amd64 | 3 + debian/libc0.1.symbols.kfreebsd-i386 | 3 + debian/libc0.3.symbols.hurd-i386 | 1140 + debian/libc6-amd64.symbols.i386 | 7 + debian/libc6-amd64.symbols.x32 | 7 + debian/libc6-i386.symbols.amd64 | 5 + debian/libc6-i386.symbols.x32 | 12 + debian/libc6-mips32.symbols.mips64 | 5 + debian/libc6-mips32.symbols.mips64el | 5 + debian/libc6-mips32.symbols.mips64r6 | 5 + debian/libc6-mips32.symbols.mips64r6el | 5 + debian/libc6-mips32.symbols.mipsn32 | 5 + debian/libc6-mips32.symbols.mipsn32el | 5 + debian/libc6-mips32.symbols.mipsn32r6 | 5 + debian/libc6-mips32.symbols.mipsn32r6el | 5 + debian/libc6-mips64.symbols.mips | 5 + debian/libc6-mips64.symbols.mipsel | 5 + debian/libc6-mips64.symbols.mipsn32 | 5 + debian/libc6-mips64.symbols.mipsn32el | 5 + debian/libc6-mips64.symbols.mipsn32r6 | 5 + debian/libc6-mips64.symbols.mipsn32r6el | 5 + debian/libc6-mips64.symbols.mipsr6 | 5 + debian/libc6-mips64.symbols.mipsr6el | 5 + debian/libc6-mipsn32.symbols.mips | 5 + debian/libc6-mipsn32.symbols.mips64 | 5 + debian/libc6-mipsn32.symbols.mips64el | 5 + debian/libc6-mipsn32.symbols.mips64r6 | 5 + debian/libc6-mipsn32.symbols.mips64r6el | 5 + debian/libc6-mipsn32.symbols.mipsel | 5 + debian/libc6-mipsn32.symbols.mipsr6 | 5 + debian/libc6-mipsn32.symbols.mipsr6el | 5 + debian/libc6-ppc64.symbols.powerpc | 5 + debian/libc6-s390.symbols.s390x | 5 + debian/libc6-sparc.symbols.sparc64 | 6 + debian/libc6-sparc64.symbols.sparc | 5 + debian/libc6-x32.symbols.amd64 | 7 + debian/libc6-x32.symbols.i386 | 7 + debian/libc6.1.symbols.alpha | 54 + debian/libc6.symbols.amd64 | 7 + debian/libc6.symbols.arm | 12 + debian/libc6.symbols.arm64 | 5 + debian/libc6.symbols.armel | 9 + debian/libc6.symbols.armhf | 9 + debian/libc6.symbols.common | 50 + debian/libc6.symbols.hppa | 33 + debian/libc6.symbols.i386 | 12 + debian/libc6.symbols.m68k | 5 + debian/libc6.symbols.mips | 12 + debian/libc6.symbols.mips64 | 5 + debian/libc6.symbols.mips64el | 5 + debian/libc6.symbols.mips64r6 | 5 + debian/libc6.symbols.mips64r6el | 5 + debian/libc6.symbols.mipsel | 12 + debian/libc6.symbols.mipsn32 | 5 + debian/libc6.symbols.mipsn32el | 5 + debian/libc6.symbols.mipsn32r6 | 5 + debian/libc6.symbols.mipsn32r6el | 5 + debian/libc6.symbols.mipsr6 | 5 + debian/libc6.symbols.mipsr6el | 5 + debian/libc6.symbols.powerpc | 12 + debian/libc6.symbols.ppc64 | 5 + debian/libc6.symbols.ppc64el | 5 + debian/libc6.symbols.riscv64 | 5 + debian/libc6.symbols.s390x | 5 + debian/libc6.symbols.sparc | 48 + debian/libc6.symbols.sparc64 | 5 + debian/libc6.symbols.x32 | 7 + debian/local/etc/bindresvport.blacklist | 15 + debian/local/etc/ld.so.conf | 2 + debian/local/etc/ld.so.conf.d/libc.conf | 2 + debian/local/etc/nsswitch.conf | 20 + debian/local/manpages/Makefile | 20 + debian/local/manpages/catchsegv.1 | 223 + debian/local/manpages/de/validlocale.de.8 | 57 + debian/local/manpages/es/addendum.es | 3 + debian/local/manpages/es/validlocale.es.8 | 57 + debian/local/manpages/fr/addendum.fr | 4 + debian/local/manpages/fr/validlocale.fr.8 | 60 + debian/local/manpages/gencat.1 | 240 + debian/local/manpages/getconf.1 | 247 + debian/local/manpages/id/addendum.id | 3 + debian/local/manpages/locale-gen.8 | 108 + debian/local/manpages/locale-gen.8.sgml | 148 + debian/local/manpages/locale.alias.5 | 45 + debian/local/manpages/locale.gen.5 | 41 + debian/local/manpages/nscd.8 | 87 + debian/local/manpages/nscd.conf.5 | 243 + debian/local/manpages/pl/validlocale.pl.8 | 55 + debian/local/manpages/po/de.po | 298 + debian/local/manpages/po/es.po | 704 + debian/local/manpages/po/fr.po | 463 + debian/local/manpages/po/id.po | 554 + debian/local/manpages/po/man.pot | 175 + debian/local/manpages/po/pl.po | 522 + debian/local/manpages/po/pt_BR.po | 503 + debian/local/manpages/po4a.cfg | 9 + debian/local/manpages/pthread_atfork.3 | 53 + debian/local/manpages/pthread_cond_init.3 | 229 + debian/local/manpages/pthread_condattr_init.3 | 38 + debian/local/manpages/pthread_key_create.3 | 151 + debian/local/manpages/pthread_mutex_init.3 | 209 + .../local/manpages/pthread_mutexattr_init.3 | 81 + .../manpages/pthread_mutexattr_setkind_np.3 | 38 + debian/local/manpages/pthread_once.3 | 34 + debian/local/manpages/rpcgen.1 | 460 + debian/local/manpages/sotruss.1 | 52 + debian/local/manpages/tzselect.1 | 67 + debian/local/manpages/update-locale.8 | 49 + debian/local/manpages/validlocale.8 | 49 + debian/local/sbin/ldconfig | 16 + debian/local/usr_sbin/locale-gen | 178 + debian/local/usr_sbin/update-locale | 129 + debian/local/usr_sbin/validlocale | 75 + .../usr_share_locales/install-language-pack | 19 + .../usr_share_locales/remove-language-pack | 68 + debian/patches/README | 20 + debian/patches/all/local-alias-et_EE.diff | 17 + debian/patches/all/local-ldd.diff | 37 + debian/patches/all/local-nis-shadow.diff | 12 + debian/patches/all/local-remove-manual.diff | 224 + debian/patches/all/local-ru_RU.diff | 23 + debian/patches/all/submitted-po-fr-fixes.diff | 17 + debian/patches/alpha/local-gcc4.1.diff | 55 + .../patches/alpha/local-string-functions.diff | 995 + .../patches/alpha/submitted-dl-support.diff | 16 + debian/patches/alpha/submitted-fts64.diff | 13 + .../patches/alpha/submitted-makecontext.diff | 30 + debian/patches/any/local-asserth-decls.diff | 36 + .../any/local-bindresvport_blacklist.diff | 162 + .../patches/any/local-bootstrap-headers.diff | 83 + debian/patches/any/local-cudacc-float128.diff | 29 + .../patches/any/local-disable-libnss-db.diff | 18 + debian/patches/any/local-fhs-linux-paths.diff | 33 + debian/patches/any/local-fhs-nscd.diff | 23 + debian/patches/any/local-ld-multiarch.diff | 50 + .../any/local-ldconfig-ignore-ld.so.diff | 57 + .../patches/any/local-ldconfig-multiarch.diff | 55 + .../patches/any/local-ldso-disable-hwcap.diff | 138 + debian/patches/any/local-libpic.diff | 89 + debian/patches/any/local-nss-overflow.diff | 51 + debian/patches/any/local-nss-upgrade.diff | 33 + debian/patches/any/local-revert-bz13979.diff | 46 + debian/patches/any/local-rtlddir-cross.diff | 29 + debian/patches/any/local-stubs_h.diff | 15 + debian/patches/any/local-tcsetaddr.diff | 84 + debian/patches/any/local-test-install.diff | 16 + .../any/submitted-bits-fcntl_h-at.diff | 133 + .../any/submitted-ld.so-cache-new-format.diff | 59 + .../any/submitted-missing-etc-hosts.diff | 15 + .../any/submitted-nptl-invalid-td.patch | 22 + .../any/submitted-resolv-unaligned.diff | 97 + .../unsubmitted-ldso-machine-mismatch.diff | 15 + debian/patches/arm/local-arm-futex.diff | 23 + debian/patches/arm/local-sigaction.diff | 26 + debian/patches/arm/local-soname-hack.diff | 25 + debian/patches/arm/local-vfp-sysdeps.diff | 23 + .../arm/unsubmitted-ldconfig-cache-abi.diff | 145 + .../arm/unsubmitted-ldso-multilib.diff | 18 + debian/patches/git-updates.diff | 2297 + debian/patches/hppa/local-inlining.diff | 18 + .../hurd-i386/git-anon-mmap-shared.diff | 36 + debian/patches/hurd-i386/git-barrier-1.diff | 21 + .../hurd-i386/git-fork-pthread_exit.diff | 36 + .../patches/hurd-i386/git-pthread_self.diff | 31 + .../hurd-i386/git-register-atfork.diff | 330 + debian/patches/hurd-i386/git-sem-intr.diff | 162 + debian/patches/hurd-i386/git-spin_lock.diff | 22 + debian/patches/hurd-i386/local-ED.diff | 29 + .../local-clock_gettime_MONOTONIC.diff | 56 + .../hurd-i386/local-disable-ioctls.diff | 38 + .../hurd-i386/local-enable-ldconfig.diff | 44 + .../hurd-i386/local-exec_filename.diff | 134 + debian/patches/hurd-i386/local-fix-nss.diff | 45 + .../patches/hurd-i386/local-mach_print.diff | 20 + .../patches/hurd-i386/local-madvise_warn.diff | 19 + .../local-no-bootstrap-fs-access.diff | 21 + .../local-no_unsupported_ioctls.diff | 51 + debian/patches/hurd-i386/local-usr.diff | 15 + debian/patches/hurd-i386/posix_openpt.diff | 84 + .../patches/hurd-i386/submitted-AF_LINK.diff | 29 + .../hurd-i386/submitted-bind_umask2.diff | 50 + debian/patches/hurd-i386/submitted-net.diff | 2140 + .../hurd-i386/submitted-path_mounted.diff | 41 + debian/patches/hurd-i386/tg-EGREGIOUS-fr.diff | 26 + debian/patches/hurd-i386/tg-EIEIO-fr.diff | 24 + debian/patches/hurd-i386/tg-bigmem.diff | 48 + .../tg-bits_atomic.h_multiple_threads.diff | 279 + debian/patches/hurd-i386/tg-bootstrap.diff | 21 + debian/patches/hurd-i386/tg-eintr.diff | 31 + .../tg-glibc-2.24-restore-malloc-hook.diff | 15 + debian/patches/hurd-i386/tg-hooks.diff | 63 + .../hurd-i386/tg-hurdsig-SA_SIGINFO.diff | 633 + debian/patches/hurd-i386/tg-ifaddrs_v6.diff | 331 + .../hurd-i386/tg-libc_rwlock_recursive.diff | 67 + .../patches/hurd-i386/tg-mach-hurd-link.diff | 32 + debian/patches/hurd-i386/tg-pie-sbrk.diff | 34 + .../hurd-i386/tg-sendmsg-SCM_CREDS.diff | 267 + .../tg-sigstate_thread_reference.diff | 118 + debian/patches/hurd-i386/tg-sysvshm.diff | 793 + .../patches/hurd-i386/tg-thread-cancel.diff | 92 + .../patches/hurd-i386/tg-unlockpt-chroot.diff | 22 + .../unsubmitted-clock_t_centiseconds.diff | 59 + .../unsubmitted-getaux_at_secure.diff | 27 + .../patches/hurd-i386/unsubmitted-mremap.diff | 29 + .../hurd-i386/unsubmitted-prof-eintr.diff | 22 + debian/patches/i386/local-biarch.diff | 16 + .../i386/unsubmitted-quiet-ldconfig.diff | 16 + .../patches/kfreebsd/local-config_h_in.patch | 20 + .../patches/kfreebsd/local-fbtl-depends.diff | 18 + debian/patches/kfreebsd/local-fbtl.diff | 74107 ++++++++++++++++ .../local-getaddrinfo-freebsd-kernel.diff | 25 + debian/patches/kfreebsd/local-grantpt.diff | 21 + .../kfreebsd/local-initgroups-order.diff | 38 + .../kfreebsd/local-memusage_no_mremap.diff | 23 + debian/patches/kfreebsd/local-no-execfn.diff | 17 + debian/patches/kfreebsd/local-scripts.diff | 57 + .../patches/kfreebsd/local-sys_queue_h.diff | 90 + debian/patches/kfreebsd/local-sysdeps.diff | 37641 ++++++++ debian/patches/kfreebsd/local-tst-auxv.diff | 18 + debian/patches/kfreebsd/local-tst-unique.diff | 22 + .../patches/kfreebsd/local-undef-glibc.diff | 18 + debian/patches/kfreebsd/submitted-auxv.diff | 231 + debian/patches/kfreebsd/submitted-waitid.diff | 77 + .../LC_IDENTIFICATION-optional-fields.diff | 37 + .../patches/locale/check-unknown-symbols.diff | 37 + .../patches/locale/locale-print-LANGUAGE.diff | 40 + debian/patches/localedata/fo_FO-date_fmt.diff | 25 + debian/patches/localedata/locale-C.diff | 3235 + debian/patches/localedata/locale-en_DK.diff | 65 + debian/patches/localedata/locale-eu_FR.diff | 198 + debian/patches/localedata/locale-ku_TR.diff | 115 + debian/patches/localedata/locale-zh_TW.diff | 25 + debian/patches/localedata/locales-fr.diff | 98 + .../patches/localedata/sort-UTF8-first.diff | 77 + .../submitted-es_MX-decimal_point.diff | 20 + debian/patches/localedata/supported.diff | 57 + .../localedata/tailor-iso14651_t1.diff | 2347 + .../patches/m68k/local-dwarf2-buildfix.diff | 39 + debian/patches/m68k/local-reloc.diff | 23 + .../m68k/submitted-gcc34-seccomment.diff | 33 + debian/patches/mips/submitted-rld_map.diff | 21 + .../powerpc/local-powerpc8xx-dcbz.diff | 30 + debian/patches/series | 137 + debian/patches/series.hurd-i386 | 11 + debian/patches/series.kfreebsd-amd64 | 6 + debian/patches/series.kfreebsd-i386 | 6 + debian/patches/sh4/local-fpscr_values.diff | 37 + debian/patches/ubuntu/local-altlocaledir.diff | 38 + .../ubuntu/local-disable-ld_audit.diff | 20 + .../local-disable-nscd-netgroup-caching.diff | 13 + debian/patches/ubuntu/local-pldd-root.diff | 10 + .../ubuntu/localedata/ckb_IQ-new_locale.diff | 488 + .../ubuntu/localedata/en_IE-am_pm.diff | 14 + debian/patches/ubuntu/localedata/eo_US.diff | 246 + .../ubuntu/localedata/es_DO-am_pm.diff | 18 + .../ubuntu/localedata/lv_LV-currency.diff | 24 + debian/patches/ubuntu/localedata/sd_PK.diff | 239 + .../ubuntu/localedata/ug_CN@latin.diff | 164 + .../submitted-no-sprintf-pre-truncate.diff | 38 + debian/po/POTFILES.in | 2 + debian/po/ar.po | 255 + debian/po/ca.po | 266 + debian/po/cs.po | 272 + debian/po/da.po | 273 + debian/po/de.po | 279 + debian/po/el.po | 295 + debian/po/es.po | 304 + debian/po/eu.po | 263 + debian/po/fi.po | 282 + debian/po/fr.po | 291 + debian/po/gl.po | 264 + debian/po/hu.po | 270 + debian/po/it.po | 270 + debian/po/ja.po | 291 + debian/po/ko.po | 254 + debian/po/lt.po | 255 + debian/po/ml.po | 239 + debian/po/nb.po | 269 + debian/po/nl.po | 286 + debian/po/pl.po | 268 + debian/po/pt.po | 274 + debian/po/pt_BR.po | 285 + debian/po/ro.po | 260 + debian/po/ru.po | 282 + debian/po/sk.po | 270 + debian/po/sv.po | 269 + debian/po/ta.po | 234 + debian/po/templates.pot | 224 + debian/po/tr.po | 274 + debian/po/uk.po | 248 + debian/po/vi.po | 265 + debian/po/zh_CN.po | 249 + debian/quiltrc | 4 + debian/rules | 223 + debian/rules.d/build.mk | 358 + debian/rules.d/control.mk | 51 + debian/rules.d/debhelper.mk | 292 + debian/rules.d/info.mk | 16 + debian/rules.d/quilt.mk | 45 + debian/rules.d/tarball.mk | 25 + debian/script.in/nohwcap.sh | 22 + debian/script.in/nsscheck.sh | 27 + debian/shlibs-add-udebs | 49 + debian/source/format | 1 + debian/source/lintian-overrides | 8 + debian/symbols.wildcards | 49 + debian/sysdeps/alpha.mk | 12 + debian/sysdeps/amd64.mk | 67 + debian/sysdeps/arm64.mk | 12 + debian/sysdeps/armel.mk | 41 + debian/sysdeps/armhf.mk | 51 + debian/sysdeps/hppa.mk | 14 + debian/sysdeps/hurd-i386.mk | 23 + debian/sysdeps/hurd.mk | 50 + debian/sysdeps/i386.mk | 67 + debian/sysdeps/ia64.mk | 2 + debian/sysdeps/kfreebsd-amd64.mk | 44 + debian/sysdeps/kfreebsd.mk | 75 + debian/sysdeps/linux.mk | 69 + debian/sysdeps/mips.mk | 59 + debian/sysdeps/mips64.mk | 63 + debian/sysdeps/mips64el.mk | 63 + debian/sysdeps/mips64r6.mk | 63 + debian/sysdeps/mips64r6el.mk | 63 + debian/sysdeps/mipsel.mk | 59 + debian/sysdeps/mipsn32.mk | 63 + debian/sysdeps/mipsn32el.mk | 63 + debian/sysdeps/mipsn32r6.mk | 63 + debian/sysdeps/mipsn32r6el.mk | 63 + debian/sysdeps/mipsr6.mk | 59 + debian/sysdeps/mipsr6el.mk | 59 + debian/sysdeps/powerpc.mk | 37 + debian/sysdeps/ppc64.mk | 47 + debian/sysdeps/ppc64el.mk | 6 + debian/sysdeps/riscv64.mk | 2 + debian/sysdeps/s390x.mk | 44 + debian/sysdeps/sh3.mk | 7 + debian/sysdeps/sh4.mk | 7 + debian/sysdeps/sparc.mk | 40 + debian/sysdeps/sparc64.mk | 47 + debian/sysdeps/x32.mk | 67 + debian/tests/control | 3 + debian/tests/control.in | 3 + debian/tests/rebuild | 3 + debian/testsuite-xfail-debian.mk | 1087 + debian/watch | 2 + 434 files changed, 170693 insertions(+) create mode 100644 debian/changelog create mode 100644 debian/changelog.ubuntu create mode 100644 debian/changelog.upstream create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/control.in/amd64 create mode 100644 debian/control.in/armel create mode 100644 debian/control.in/armhf create mode 100644 debian/control.in/i386 create mode 100644 debian/control.in/kfreebsd-i386 create mode 100644 debian/control.in/libc create mode 100644 debian/control.in/main create mode 100644 debian/control.in/mips32 create mode 100644 debian/control.in/mips64 create mode 100644 debian/control.in/mipsn32 create mode 100644 debian/control.in/opt create mode 100644 debian/control.in/powerpc create mode 100644 debian/control.in/ppc64 create mode 100644 debian/control.in/s390 create mode 100644 debian/control.in/sparc create mode 100644 debian/control.in/sparc64 create mode 100644 debian/control.in/x32 create mode 100644 debian/copyright create mode 100644 debian/debhelper.in/glibc-doc.docs create mode 100644 debian/debhelper.in/glibc-doc.links create mode 100644 debian/debhelper.in/glibc-doc.manpages create mode 100644 debian/debhelper.in/glibc-source.install create mode 100644 debian/debhelper.in/glibc-source.lintian-overrides create mode 100644 debian/debhelper.in/libc-alt.install create mode 100644 debian/debhelper.in/libc-alt.lintian-overrides create mode 100644 debian/debhelper.in/libc-alt.postrm create mode 100644 debian/debhelper.in/libc-bin.dirs create mode 100644 debian/debhelper.in/libc-bin.install create mode 100644 debian/debhelper.in/libc-bin.lintian-overrides create mode 100644 debian/debhelper.in/libc-bin.manpages create mode 100644 debian/debhelper.in/libc-bin.postinst create mode 100644 debian/debhelper.in/libc-bin.triggers create mode 100644 debian/debhelper.in/libc-dev-alt.install create mode 100644 debian/debhelper.in/libc-dev-alt.lintian-overrides create mode 100644 debian/debhelper.in/libc-dev-bin.install create mode 100644 debian/debhelper.in/libc-dev-bin.lintian-overrides create mode 100644 debian/debhelper.in/libc-dev-bin.manpages create mode 100644 debian/debhelper.in/libc-dev.install create mode 100644 debian/debhelper.in/libc-dev.install.hurd-i386 create mode 100644 debian/debhelper.in/libc-dev.lintian-overrides create mode 100644 debian/debhelper.in/libc-l10n.install create mode 100644 debian/debhelper.in/libc-otherbuild.install create mode 100644 debian/debhelper.in/libc-otherbuild.lintian-overrides create mode 100644 debian/debhelper.in/libc-otherbuild.postinst create mode 100644 debian/debhelper.in/libc-otherbuild.postrm create mode 100644 debian/debhelper.in/libc-pic.install create mode 100644 debian/debhelper.in/libc-prof.install create mode 100644 debian/debhelper.in/libc-udeb.install create mode 100644 debian/debhelper.in/libc.NEWS create mode 100644 debian/debhelper.in/libc.README.Debian create mode 100644 debian/debhelper.in/libc.dirs create mode 100644 debian/debhelper.in/libc.docs create mode 100644 debian/debhelper.in/libc.install create mode 100644 debian/debhelper.in/libc.lintian-overrides create mode 100644 debian/debhelper.in/libc.postinst create mode 100644 debian/debhelper.in/libc.postrm create mode 100644 debian/debhelper.in/libc.preinst create mode 100644 debian/debhelper.in/libc.templates create mode 100644 debian/debhelper.in/locales-all.NEWS create mode 100644 debian/debhelper.in/locales-all.dirs create mode 100644 debian/debhelper.in/locales-all.install create mode 100644 debian/debhelper.in/locales-all.postinst create mode 100644 debian/debhelper.in/locales-all.prerm create mode 100644 debian/debhelper.in/locales.NEWS create mode 100644 debian/debhelper.in/locales.README.Debian create mode 100644 debian/debhelper.in/locales.config create mode 100644 debian/debhelper.in/locales.dirs create mode 100644 debian/debhelper.in/locales.install create mode 100644 debian/debhelper.in/locales.links create mode 100644 debian/debhelper.in/locales.manpages create mode 100644 debian/debhelper.in/locales.postinst create mode 100644 debian/debhelper.in/locales.postrm create mode 100644 debian/debhelper.in/locales.prerm create mode 100644 debian/debhelper.in/locales.templates create mode 100644 debian/debhelper.in/nscd.dirs create mode 100644 debian/debhelper.in/nscd.init create mode 100644 debian/debhelper.in/nscd.install create mode 100644 debian/debhelper.in/nscd.manpages create mode 100644 debian/debhelper.in/nscd.postrm create mode 100644 debian/generate-supported.mk create mode 100644 debian/glibc-source.filelist create mode 100644 debian/libc0.1-i386.symbols.kfreebsd-amd64 create mode 100644 debian/libc0.1.symbols.common create mode 100644 debian/libc0.1.symbols.kfreebsd-amd64 create mode 100644 debian/libc0.1.symbols.kfreebsd-i386 create mode 100644 debian/libc0.3.symbols.hurd-i386 create mode 100644 debian/libc6-amd64.symbols.i386 create mode 100644 debian/libc6-amd64.symbols.x32 create mode 100644 debian/libc6-i386.symbols.amd64 create mode 100644 debian/libc6-i386.symbols.x32 create mode 100644 debian/libc6-mips32.symbols.mips64 create mode 100644 debian/libc6-mips32.symbols.mips64el create mode 100644 debian/libc6-mips32.symbols.mips64r6 create mode 100644 debian/libc6-mips32.symbols.mips64r6el create mode 100644 debian/libc6-mips32.symbols.mipsn32 create mode 100644 debian/libc6-mips32.symbols.mipsn32el create mode 100644 debian/libc6-mips32.symbols.mipsn32r6 create mode 100644 debian/libc6-mips32.symbols.mipsn32r6el create mode 100644 debian/libc6-mips64.symbols.mips create mode 100644 debian/libc6-mips64.symbols.mipsel create mode 100644 debian/libc6-mips64.symbols.mipsn32 create mode 100644 debian/libc6-mips64.symbols.mipsn32el create mode 100644 debian/libc6-mips64.symbols.mipsn32r6 create mode 100644 debian/libc6-mips64.symbols.mipsn32r6el create mode 100644 debian/libc6-mips64.symbols.mipsr6 create mode 100644 debian/libc6-mips64.symbols.mipsr6el create mode 100644 debian/libc6-mipsn32.symbols.mips create mode 100644 debian/libc6-mipsn32.symbols.mips64 create mode 100644 debian/libc6-mipsn32.symbols.mips64el create mode 100644 debian/libc6-mipsn32.symbols.mips64r6 create mode 100644 debian/libc6-mipsn32.symbols.mips64r6el create mode 100644 debian/libc6-mipsn32.symbols.mipsel create mode 100644 debian/libc6-mipsn32.symbols.mipsr6 create mode 100644 debian/libc6-mipsn32.symbols.mipsr6el create mode 100644 debian/libc6-ppc64.symbols.powerpc create mode 100644 debian/libc6-s390.symbols.s390x create mode 100644 debian/libc6-sparc.symbols.sparc64 create mode 100644 debian/libc6-sparc64.symbols.sparc create mode 100644 debian/libc6-x32.symbols.amd64 create mode 100644 debian/libc6-x32.symbols.i386 create mode 100644 debian/libc6.1.symbols.alpha create mode 100644 debian/libc6.symbols.amd64 create mode 100644 debian/libc6.symbols.arm create mode 100644 debian/libc6.symbols.arm64 create mode 100644 debian/libc6.symbols.armel create mode 100644 debian/libc6.symbols.armhf create mode 100644 debian/libc6.symbols.common create mode 100644 debian/libc6.symbols.hppa create mode 100644 debian/libc6.symbols.i386 create mode 100644 debian/libc6.symbols.m68k create mode 100644 debian/libc6.symbols.mips create mode 100644 debian/libc6.symbols.mips64 create mode 100644 debian/libc6.symbols.mips64el create mode 100644 debian/libc6.symbols.mips64r6 create mode 100644 debian/libc6.symbols.mips64r6el create mode 100644 debian/libc6.symbols.mipsel create mode 100644 debian/libc6.symbols.mipsn32 create mode 100644 debian/libc6.symbols.mipsn32el create mode 100644 debian/libc6.symbols.mipsn32r6 create mode 100644 debian/libc6.symbols.mipsn32r6el create mode 100644 debian/libc6.symbols.mipsr6 create mode 100644 debian/libc6.symbols.mipsr6el create mode 100644 debian/libc6.symbols.powerpc create mode 100644 debian/libc6.symbols.ppc64 create mode 100644 debian/libc6.symbols.ppc64el create mode 100644 debian/libc6.symbols.riscv64 create mode 100644 debian/libc6.symbols.s390x create mode 100644 debian/libc6.symbols.sparc create mode 100644 debian/libc6.symbols.sparc64 create mode 100644 debian/libc6.symbols.x32 create mode 100644 debian/local/etc/bindresvport.blacklist create mode 100644 debian/local/etc/ld.so.conf create mode 100644 debian/local/etc/ld.so.conf.d/libc.conf create mode 100644 debian/local/etc/nsswitch.conf create mode 100644 debian/local/manpages/Makefile create mode 100644 debian/local/manpages/catchsegv.1 create mode 100644 debian/local/manpages/de/validlocale.de.8 create mode 100644 debian/local/manpages/es/addendum.es create mode 100644 debian/local/manpages/es/validlocale.es.8 create mode 100644 debian/local/manpages/fr/addendum.fr create mode 100644 debian/local/manpages/fr/validlocale.fr.8 create mode 100644 debian/local/manpages/gencat.1 create mode 100644 debian/local/manpages/getconf.1 create mode 100644 debian/local/manpages/id/addendum.id create mode 100644 debian/local/manpages/locale-gen.8 create mode 100644 debian/local/manpages/locale-gen.8.sgml create mode 100644 debian/local/manpages/locale.alias.5 create mode 100644 debian/local/manpages/locale.gen.5 create mode 100644 debian/local/manpages/nscd.8 create mode 100644 debian/local/manpages/nscd.conf.5 create mode 100644 debian/local/manpages/pl/validlocale.pl.8 create mode 100644 debian/local/manpages/po/de.po create mode 100644 debian/local/manpages/po/es.po create mode 100644 debian/local/manpages/po/fr.po create mode 100644 debian/local/manpages/po/id.po create mode 100644 debian/local/manpages/po/man.pot create mode 100644 debian/local/manpages/po/pl.po create mode 100644 debian/local/manpages/po/pt_BR.po create mode 100644 debian/local/manpages/po4a.cfg create mode 100644 debian/local/manpages/pthread_atfork.3 create mode 100644 debian/local/manpages/pthread_cond_init.3 create mode 100644 debian/local/manpages/pthread_condattr_init.3 create mode 100644 debian/local/manpages/pthread_key_create.3 create mode 100644 debian/local/manpages/pthread_mutex_init.3 create mode 100644 debian/local/manpages/pthread_mutexattr_init.3 create mode 100644 debian/local/manpages/pthread_mutexattr_setkind_np.3 create mode 100644 debian/local/manpages/pthread_once.3 create mode 100644 debian/local/manpages/rpcgen.1 create mode 100644 debian/local/manpages/sotruss.1 create mode 100644 debian/local/manpages/tzselect.1 create mode 100644 debian/local/manpages/update-locale.8 create mode 100644 debian/local/manpages/validlocale.8 create mode 100755 debian/local/sbin/ldconfig create mode 100755 debian/local/usr_sbin/locale-gen create mode 100755 debian/local/usr_sbin/update-locale create mode 100755 debian/local/usr_sbin/validlocale create mode 100644 debian/local/usr_share_locales/install-language-pack create mode 100644 debian/local/usr_share_locales/remove-language-pack create mode 100644 debian/patches/README create mode 100644 debian/patches/all/local-alias-et_EE.diff create mode 100644 debian/patches/all/local-ldd.diff create mode 100644 debian/patches/all/local-nis-shadow.diff create mode 100644 debian/patches/all/local-remove-manual.diff create mode 100644 debian/patches/all/local-ru_RU.diff create mode 100644 debian/patches/all/submitted-po-fr-fixes.diff create mode 100644 debian/patches/alpha/local-gcc4.1.diff create mode 100644 debian/patches/alpha/local-string-functions.diff create mode 100644 debian/patches/alpha/submitted-dl-support.diff create mode 100644 debian/patches/alpha/submitted-fts64.diff create mode 100644 debian/patches/alpha/submitted-makecontext.diff create mode 100644 debian/patches/any/local-asserth-decls.diff create mode 100644 debian/patches/any/local-bindresvport_blacklist.diff create mode 100644 debian/patches/any/local-bootstrap-headers.diff create mode 100644 debian/patches/any/local-cudacc-float128.diff create mode 100644 debian/patches/any/local-disable-libnss-db.diff create mode 100644 debian/patches/any/local-fhs-linux-paths.diff create mode 100644 debian/patches/any/local-fhs-nscd.diff create mode 100644 debian/patches/any/local-ld-multiarch.diff create mode 100644 debian/patches/any/local-ldconfig-ignore-ld.so.diff create mode 100644 debian/patches/any/local-ldconfig-multiarch.diff create mode 100644 debian/patches/any/local-ldso-disable-hwcap.diff create mode 100644 debian/patches/any/local-libpic.diff create mode 100644 debian/patches/any/local-nss-overflow.diff create mode 100644 debian/patches/any/local-nss-upgrade.diff create mode 100644 debian/patches/any/local-revert-bz13979.diff create mode 100644 debian/patches/any/local-rtlddir-cross.diff create mode 100644 debian/patches/any/local-stubs_h.diff create mode 100644 debian/patches/any/local-tcsetaddr.diff create mode 100644 debian/patches/any/local-test-install.diff create mode 100644 debian/patches/any/submitted-bits-fcntl_h-at.diff create mode 100644 debian/patches/any/submitted-ld.so-cache-new-format.diff create mode 100644 debian/patches/any/submitted-missing-etc-hosts.diff create mode 100644 debian/patches/any/submitted-nptl-invalid-td.patch create mode 100644 debian/patches/any/submitted-resolv-unaligned.diff create mode 100644 debian/patches/any/unsubmitted-ldso-machine-mismatch.diff create mode 100644 debian/patches/arm/local-arm-futex.diff create mode 100644 debian/patches/arm/local-sigaction.diff create mode 100644 debian/patches/arm/local-soname-hack.diff create mode 100644 debian/patches/arm/local-vfp-sysdeps.diff create mode 100644 debian/patches/arm/unsubmitted-ldconfig-cache-abi.diff create mode 100644 debian/patches/arm/unsubmitted-ldso-multilib.diff create mode 100644 debian/patches/git-updates.diff create mode 100644 debian/patches/hppa/local-inlining.diff create mode 100644 debian/patches/hurd-i386/git-anon-mmap-shared.diff create mode 100644 debian/patches/hurd-i386/git-barrier-1.diff create mode 100644 debian/patches/hurd-i386/git-fork-pthread_exit.diff create mode 100644 debian/patches/hurd-i386/git-pthread_self.diff create mode 100644 debian/patches/hurd-i386/git-register-atfork.diff create mode 100644 debian/patches/hurd-i386/git-sem-intr.diff create mode 100644 debian/patches/hurd-i386/git-spin_lock.diff create mode 100644 debian/patches/hurd-i386/local-ED.diff create mode 100644 debian/patches/hurd-i386/local-clock_gettime_MONOTONIC.diff create mode 100644 debian/patches/hurd-i386/local-disable-ioctls.diff create mode 100644 debian/patches/hurd-i386/local-enable-ldconfig.diff create mode 100644 debian/patches/hurd-i386/local-exec_filename.diff create mode 100644 debian/patches/hurd-i386/local-fix-nss.diff create mode 100644 debian/patches/hurd-i386/local-mach_print.diff create mode 100644 debian/patches/hurd-i386/local-madvise_warn.diff create mode 100644 debian/patches/hurd-i386/local-no-bootstrap-fs-access.diff create mode 100644 debian/patches/hurd-i386/local-no_unsupported_ioctls.diff create mode 100644 debian/patches/hurd-i386/local-usr.diff create mode 100644 debian/patches/hurd-i386/posix_openpt.diff create mode 100644 debian/patches/hurd-i386/submitted-AF_LINK.diff create mode 100644 debian/patches/hurd-i386/submitted-bind_umask2.diff create mode 100644 debian/patches/hurd-i386/submitted-net.diff create mode 100644 debian/patches/hurd-i386/submitted-path_mounted.diff create mode 100644 debian/patches/hurd-i386/tg-EGREGIOUS-fr.diff create mode 100644 debian/patches/hurd-i386/tg-EIEIO-fr.diff create mode 100644 debian/patches/hurd-i386/tg-bigmem.diff create mode 100644 debian/patches/hurd-i386/tg-bits_atomic.h_multiple_threads.diff create mode 100644 debian/patches/hurd-i386/tg-bootstrap.diff create mode 100644 debian/patches/hurd-i386/tg-eintr.diff create mode 100644 debian/patches/hurd-i386/tg-glibc-2.24-restore-malloc-hook.diff create mode 100644 debian/patches/hurd-i386/tg-hooks.diff create mode 100644 debian/patches/hurd-i386/tg-hurdsig-SA_SIGINFO.diff create mode 100644 debian/patches/hurd-i386/tg-ifaddrs_v6.diff create mode 100644 debian/patches/hurd-i386/tg-libc_rwlock_recursive.diff create mode 100644 debian/patches/hurd-i386/tg-mach-hurd-link.diff create mode 100644 debian/patches/hurd-i386/tg-pie-sbrk.diff create mode 100644 debian/patches/hurd-i386/tg-sendmsg-SCM_CREDS.diff create mode 100644 debian/patches/hurd-i386/tg-sigstate_thread_reference.diff create mode 100644 debian/patches/hurd-i386/tg-sysvshm.diff create mode 100644 debian/patches/hurd-i386/tg-thread-cancel.diff create mode 100644 debian/patches/hurd-i386/tg-unlockpt-chroot.diff create mode 100644 debian/patches/hurd-i386/unsubmitted-clock_t_centiseconds.diff create mode 100644 debian/patches/hurd-i386/unsubmitted-getaux_at_secure.diff create mode 100644 debian/patches/hurd-i386/unsubmitted-mremap.diff create mode 100644 debian/patches/hurd-i386/unsubmitted-prof-eintr.diff create mode 100644 debian/patches/i386/local-biarch.diff create mode 100644 debian/patches/i386/unsubmitted-quiet-ldconfig.diff create mode 100644 debian/patches/kfreebsd/local-config_h_in.patch create mode 100644 debian/patches/kfreebsd/local-fbtl-depends.diff create mode 100644 debian/patches/kfreebsd/local-fbtl.diff create mode 100644 debian/patches/kfreebsd/local-getaddrinfo-freebsd-kernel.diff create mode 100644 debian/patches/kfreebsd/local-grantpt.diff create mode 100644 debian/patches/kfreebsd/local-initgroups-order.diff create mode 100644 debian/patches/kfreebsd/local-memusage_no_mremap.diff create mode 100644 debian/patches/kfreebsd/local-no-execfn.diff create mode 100644 debian/patches/kfreebsd/local-scripts.diff create mode 100644 debian/patches/kfreebsd/local-sys_queue_h.diff create mode 100644 debian/patches/kfreebsd/local-sysdeps.diff create mode 100644 debian/patches/kfreebsd/local-tst-auxv.diff create mode 100644 debian/patches/kfreebsd/local-tst-unique.diff create mode 100644 debian/patches/kfreebsd/local-undef-glibc.diff create mode 100644 debian/patches/kfreebsd/submitted-auxv.diff create mode 100644 debian/patches/kfreebsd/submitted-waitid.diff create mode 100644 debian/patches/locale/LC_IDENTIFICATION-optional-fields.diff create mode 100644 debian/patches/locale/check-unknown-symbols.diff create mode 100644 debian/patches/locale/locale-print-LANGUAGE.diff create mode 100644 debian/patches/localedata/fo_FO-date_fmt.diff create mode 100644 debian/patches/localedata/locale-C.diff create mode 100644 debian/patches/localedata/locale-en_DK.diff create mode 100644 debian/patches/localedata/locale-eu_FR.diff create mode 100644 debian/patches/localedata/locale-ku_TR.diff create mode 100644 debian/patches/localedata/locale-zh_TW.diff create mode 100644 debian/patches/localedata/locales-fr.diff create mode 100644 debian/patches/localedata/sort-UTF8-first.diff create mode 100644 debian/patches/localedata/submitted-es_MX-decimal_point.diff create mode 100644 debian/patches/localedata/supported.diff create mode 100644 debian/patches/localedata/tailor-iso14651_t1.diff create mode 100644 debian/patches/m68k/local-dwarf2-buildfix.diff create mode 100644 debian/patches/m68k/local-reloc.diff create mode 100644 debian/patches/m68k/submitted-gcc34-seccomment.diff create mode 100644 debian/patches/mips/submitted-rld_map.diff create mode 100644 debian/patches/powerpc/local-powerpc8xx-dcbz.diff create mode 100644 debian/patches/series create mode 100644 debian/patches/series.hurd-i386 create mode 100644 debian/patches/series.kfreebsd-amd64 create mode 100644 debian/patches/series.kfreebsd-i386 create mode 100644 debian/patches/sh4/local-fpscr_values.diff create mode 100644 debian/patches/ubuntu/local-altlocaledir.diff create mode 100644 debian/patches/ubuntu/local-disable-ld_audit.diff create mode 100644 debian/patches/ubuntu/local-disable-nscd-netgroup-caching.diff create mode 100644 debian/patches/ubuntu/local-pldd-root.diff create mode 100644 debian/patches/ubuntu/localedata/ckb_IQ-new_locale.diff create mode 100644 debian/patches/ubuntu/localedata/en_IE-am_pm.diff create mode 100644 debian/patches/ubuntu/localedata/eo_US.diff create mode 100644 debian/patches/ubuntu/localedata/es_DO-am_pm.diff create mode 100644 debian/patches/ubuntu/localedata/lv_LV-currency.diff create mode 100644 debian/patches/ubuntu/localedata/sd_PK.diff create mode 100644 debian/patches/ubuntu/localedata/ug_CN@latin.diff create mode 100644 debian/patches/ubuntu/submitted-no-sprintf-pre-truncate.diff create mode 100644 debian/po/POTFILES.in create mode 100644 debian/po/ar.po create mode 100644 debian/po/ca.po create mode 100644 debian/po/cs.po create mode 100644 debian/po/da.po create mode 100644 debian/po/de.po create mode 100644 debian/po/el.po create mode 100644 debian/po/es.po create mode 100644 debian/po/eu.po create mode 100644 debian/po/fi.po create mode 100644 debian/po/fr.po create mode 100644 debian/po/gl.po create mode 100644 debian/po/hu.po create mode 100644 debian/po/it.po create mode 100644 debian/po/ja.po create mode 100644 debian/po/ko.po create mode 100644 debian/po/lt.po create mode 100644 debian/po/ml.po create mode 100644 debian/po/nb.po create mode 100644 debian/po/nl.po create mode 100644 debian/po/pl.po create mode 100644 debian/po/pt.po create mode 100644 debian/po/pt_BR.po create mode 100644 debian/po/ro.po create mode 100644 debian/po/ru.po create mode 100644 debian/po/sk.po create mode 100644 debian/po/sv.po create mode 100644 debian/po/ta.po create mode 100644 debian/po/templates.pot create mode 100644 debian/po/tr.po create mode 100644 debian/po/uk.po create mode 100644 debian/po/vi.po create mode 100644 debian/po/zh_CN.po create mode 100644 debian/quiltrc create mode 100755 debian/rules create mode 100644 debian/rules.d/build.mk create mode 100644 debian/rules.d/control.mk create mode 100644 debian/rules.d/debhelper.mk create mode 100644 debian/rules.d/info.mk create mode 100644 debian/rules.d/quilt.mk create mode 100644 debian/rules.d/tarball.mk create mode 100644 debian/script.in/nohwcap.sh create mode 100644 debian/script.in/nsscheck.sh create mode 100755 debian/shlibs-add-udebs create mode 100644 debian/source/format create mode 100644 debian/source/lintian-overrides create mode 100644 debian/symbols.wildcards create mode 100644 debian/sysdeps/alpha.mk create mode 100644 debian/sysdeps/amd64.mk create mode 100644 debian/sysdeps/arm64.mk create mode 100644 debian/sysdeps/armel.mk create mode 100644 debian/sysdeps/armhf.mk create mode 100644 debian/sysdeps/hppa.mk create mode 100644 debian/sysdeps/hurd-i386.mk create mode 100644 debian/sysdeps/hurd.mk create mode 100644 debian/sysdeps/i386.mk create mode 100644 debian/sysdeps/ia64.mk create mode 100644 debian/sysdeps/kfreebsd-amd64.mk create mode 100644 debian/sysdeps/kfreebsd.mk create mode 100644 debian/sysdeps/linux.mk create mode 100644 debian/sysdeps/mips.mk create mode 100644 debian/sysdeps/mips64.mk create mode 100644 debian/sysdeps/mips64el.mk create mode 100644 debian/sysdeps/mips64r6.mk create mode 100644 debian/sysdeps/mips64r6el.mk create mode 100644 debian/sysdeps/mipsel.mk create mode 100644 debian/sysdeps/mipsn32.mk create mode 100644 debian/sysdeps/mipsn32el.mk create mode 100644 debian/sysdeps/mipsn32r6.mk create mode 100644 debian/sysdeps/mipsn32r6el.mk create mode 100644 debian/sysdeps/mipsr6.mk create mode 100644 debian/sysdeps/mipsr6el.mk create mode 100644 debian/sysdeps/powerpc.mk create mode 100644 debian/sysdeps/ppc64.mk create mode 100644 debian/sysdeps/ppc64el.mk create mode 100644 debian/sysdeps/riscv64.mk create mode 100644 debian/sysdeps/s390x.mk create mode 100644 debian/sysdeps/sh3.mk create mode 100644 debian/sysdeps/sh4.mk create mode 100644 debian/sysdeps/sparc.mk create mode 100644 debian/sysdeps/sparc64.mk create mode 100644 debian/sysdeps/x32.mk create mode 100644 debian/tests/control create mode 100644 debian/tests/control.in create mode 100755 debian/tests/rebuild create mode 100644 debian/testsuite-xfail-debian.mk create mode 100644 debian/watch diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 00000000..34069ec6 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +glibc (2.31-ok1) yangtze; urgency=medium + + * Build for openKylin. + + -- openKylinBot Mon, 25 Apr 2022 22:03:04 +0800 diff --git a/debian/changelog.ubuntu b/debian/changelog.ubuntu new file mode 100644 index 00000000..1a4f8cf7 --- /dev/null +++ b/debian/changelog.ubuntu @@ -0,0 +1,13151 @@ +eglibc (2.15~pre6-0ubuntu10) precise; urgency=low + + * Merge from Debian (r5151, 2.13-26). + + -- Matthias Klose Wed, 08 Feb 2012 01:58:09 +0100 + +eglibc (2.15~pre6-0ubuntu9) precise; urgency=low + + * Merge from Debian (r5143, 2.13-25): + * Revert the patch from upstream PR 12724, which can cause surprising + changes in fclose behaviour when multiple file handles refer to the + same file (fclose on one changes file position on the other). + * Replace ubuntu/issue13579.diff with any/local-leak-revert-crash.diff, + a partial reversion of the patch. + + -- Matthias Klose Wed, 01 Feb 2012 20:45:23 +0100 + +eglibc (2.15~pre6-0ubuntu8) precise; urgency=low + + * Allow linking against the obsolete sunrpc implementation. + + -- Matthias Klose Wed, 01 Feb 2012 15:49:40 +0100 + +eglibc (2.15~pre6-0ubuntu7) precise; urgency=low + + * Fix BZ#16318, sort objects before relocations. LP: #919202. + + -- Matthias Klose Mon, 30 Jan 2012 16:03:19 +0100 + +eglibc (2.15~pre6-0ubuntu6) precise; urgency=low + + * Set minimum required kernel version to 2.6.24 on x86. + * Set minimum required kernel version to 2.6.32 on powerpc. + * Set minimum required kernel version to 2.6.31 on ARM (still needed + for the imx51 kernel). + * Disable multiarch routines for floor, ceil, rint, nearbyint. Work around + PR 13618. + + * Merge from Debian (r5124): + [ 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. + + -- Matthias Klose Thu, 26 Jan 2012 17:07:46 +0100 + +eglibc (2.15~pre6-0ubuntu4) precise; urgency=low + + * Issue #13579, revert the fix for #12509. LP: #893605. + * Add an pldd manpage. + * Merge Debian packaging up to 2.13-24ubuntu2. + * Set minimum required kernel version to 2.6.24. + * Don't include the libnss_db libraries; still built from separate sources. + + -- Matthias Klose Tue, 10 Jan 2012 18:53:31 +0100 + +eglibc (2.15~pre6-0ubuntu2) precise; urgency=low + + * New upstream snapshot (r16507 from the 2.15 branch) + + -- Matthias Klose Wed, 04 Jan 2012 17:59:43 +0100 + +eglibc (2.15~pre5-0ubuntu1) precise; urgency=low + + * New upstream snapshot (r16284 from the trunk) + + -- Matthias Klose Mon, 19 Dec 2011 11:36:25 +0100 + +eglibc (2.15~pre4-0ubuntu4) precise; urgency=low + + * Install a ld.so.conf.d file for the non-default multilib ARM targets. + + -- Matthias Klose Tue, 22 Nov 2011 23:58:01 +0100 + +eglibc (2.15~pre4-0ubuntu1) precise; urgency=low + + * New upstream snapshot (r15921 from the trunk) + * Install pldd in libc-bin, sotruss in libc-dev-bin. + * Update multi-arch soft/hard-float patches for ldconfig and ld.so + (Steve McIntyre). + + -- Matthias Klose Mon, 21 Nov 2011 13:31:15 +0100 + +eglibc (2.15~pre3-0ubuntu5) precise; urgency=low + + * Use the default compiler settings for armhf. + * Revert "Use leaf function attribute in __THROW". + + -- Matthias Klose Thu, 03 Nov 2011 11:29:08 -0400 + +eglibc (2.15~pre3-0ubuntu3) precise; urgency=low + + * Really disable the armhf multilib testsuite on the buildd. + + -- Matthias Klose Mon, 31 Oct 2011 23:07:57 +0200 + +eglibc (2.15~pre3-0ubuntu2) precise; urgency=low + + * Re-enable: + - Apply proposed patch for ARM hard-float ABI - runtime linker checks. + * Copy libgcc_s.so.1 into the library path for the non-default ARM multilib + builds. + + -- Matthias Klose Thu, 27 Oct 2011 23:09:00 +0200 + +eglibc (2.15~pre3-0ubuntu1) precise; urgency=low + + * New upstream snapshot (r15586 from the trunk) + * Revert: + - Apply proposed patch for ARM hard-float ABI - runtime linker checks. + + -- Matthias Klose Wed, 26 Oct 2011 12:46:59 +0200 + +eglibc (2.15~pre2-0ubuntu1) precise; urgency=low + + * New upstream snapshot (r15545 from the trunk). + * Install sunrpc headers. + * Disable running the armhf multilib testsuite on the buildd (timeout). + + -- Matthias Klose Tue, 25 Oct 2011 13:08:35 +0200 + +eglibc (2.15~pre1-0ubuntu2) precise; urgency=low + + * Link libresolv.so with ld.so for __stack_chk_guard. + * Apply proposed patch for ARM hard-float ABI - runtime linker checks. + + -- Matthias Klose Sun, 23 Oct 2011 14:18:07 +0200 + +eglibc (2.15~pre1-0ubuntu1) precise; urgency=low + + * New upstream snapshot (r15508 from the trunk). + + -- Matthias Klose Fri, 14 Oct 2011 11:38:00 +0200 + +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. + * 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-24ubuntu2) precise; urgency=low + + * libc6: Provide libc6-armel [armel], libc6-armhf [armhf]. + * libc6-dev: Provide libc6-dev-armel [armel], libc6-dev-armhf [armhf]. + + -- Matthias Klose Wed, 04 Jan 2012 15:02:18 +0100 + +eglibc (2.13-24ubuntu1) precise; urgency=low + + * Merge with Debian (r5108), bringing in an ARM header patch, and a fix + for CVE-2009-5029, an integer overflow in timezone code (LP: #906961) + + -- Adam Conrad Tue, 03 Jan 2012 12:04:05 -0700 + +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-23ubuntu1) precise; urgency=low + + * Merge with Debian (r5082), bringing in several new patches and fixes. + * Move biarch-compat.conf to zz_$(curpass)-biarch-compat.conf to get + saner include ordering, and to match how we're doing it in Debian. + + -- Adam Conrad Wed, 14 Dec 2011 22:09:18 -0700 + +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-20ubuntu10) precise; urgency=low + + * Add debian/debhelper.in/libc-udeb.install.armhf to make sure + our interpreter is installed to the correct path in the udeb. + + -- Adam Conrad Tue, 06 Dec 2011 11:27:22 -0700 + +eglibc (2.13-20ubuntu9) precise; urgency=low + + * No-change rebuild to drop spurious libsfgcc1 dependency on armhf. + + -- Adam Conrad Fri, 02 Dec 2011 20:56:09 -0700 + +eglibc (2.13-20ubuntu8) precise; urgency=low + + * Massage unsubmitted-ldso-abi-check.diff so it actually applies. + + -- Adam Conrad Thu, 01 Dec 2011 11:31:33 -0700 + +eglibc (2.13-20ubuntu7) precise; urgency=low + + * Update arm/unsubmitted-ldso-abi-check.diff with fixes to make + ld.so --verify exit(1) on hard-float/soft-float ABI mismatches. + + -- Adam Conrad Thu, 01 Dec 2011 11:11:33 -0700 + +eglibc (2.13-20ubuntu6) precise; urgency=low + + * Apply patches to elf/* utilities from Steve McIntyre: + - arm/unsubmitted-ldconfig-cache-abi.diff + - arm/unsubmitted-ldso-abi-check.diff + * Use default compiler (and options) on armhf, same as armel. + * 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. + + -- Adam Conrad Sat, 26 Nov 2011 23:01:23 +0000 + +eglibc (2.13-20ubuntu5) oneiric; urgency=low + + * libc6-dev: Don't break the current {gnat,gcj}-4.4-base versons. LP: #853688. + + -- Matthias Klose Tue, 04 Oct 2011 17:48:26 +0200 + +eglibc (2.13-20ubuntu4) oneiric; urgency=low + + * debian/control: + - help the apt resolver with the gcc-4.4 upgrade by providing + explicit breaks against {gnat,gcc,gcj}-{4.4,4.5}-base (LP: #853688) + + -- Michael Vogt Fri, 30 Sep 2011 14:02:02 +0200 + +eglibc (2.13-20ubuntu3) oneiric; urgency=low + + * Fix pthread/fork race/deadlock. LP: #838975. + - Avoid race between {,__de}allocate_stack and __reclaim_stacks during fork. + + * Merge from Debian: + + [ 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. + * patches/i386/local-cpuid-level2.diff: fix a typo. Closes: #609389. + + -- Matthias Klose Mon, 26 Sep 2011 13:50:14 +0200 + +eglibc (2.13-20ubuntu2) oneiric; urgency=low + + * Back out Debian r4943 ("Don't include ISO14651 collation rules in + C.UTF-8 locale") for now; this breaks regcomp on character ranges, which + exposed a bug in apt, and seems likely to cause other problems, so is + too risky a change for this point in our release cycle (LP: #848907). + + -- Colin Watson Tue, 13 Sep 2011 17:37:32 +0100 + +eglibc (2.13-20ubuntu1) oneiric; urgency=low + + [ Colin Watson ] + * Revert change from 2.13-17ubuntu2 now that data.tar.xz support is + deployed in Launchpad. Add Pre-Depends: dpkg (>= 1.15.6) to affected + packages. + + [ Dr. David Alan Gilbert ] + * ARM strchr: mask r1 to char (LP: #842258) + + [ Matthias Klose ] + * Merge with Debian (r4955). + + -- Matthias Klose Fri, 09 Sep 2011 13:44:41 +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-17ubuntu2) oneiric; urgency=low + + * Compress all binary packages using standard compression, to + work around #832354. + + -- Matthias Klose Tue, 23 Aug 2011 22:57:56 +0200 + +eglibc (2.13-17ubuntu1) oneiric; urgency=low + + * Merge with Debian (r4918). + + -- Matthias Klose Tue, 23 Aug 2011 20:29:34 +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-16ubuntu4) oneiric; urgency=low + + * Mark ARM __clone as .cantunwind (taken from the trunk). + * Re-enable running the testsuite. + + -- Matthias Klose Mon, 15 Aug 2011 16:20:52 +0200 + +eglibc (2.13-16ubuntu3) oneiric; urgency=low + + * libc6-dev-armhf: Install architecture specific header files. + * Build libc6-armel and libc6-dev-armel packages on armhf. LP: #810360. + * Re-enable multiarch on amd64 too. + + -- Matthias Klose Fri, 12 Aug 2011 13:17:26 +0200 + +eglibc (2.13-16ubuntu2) oneiric; urgency=low + + * Re-add the Multiarch: same attribute for libc6. + * Assume Intel Core i3/i5/i7 processor if AVX is available. + + -- Matthias Klose Thu, 11 Aug 2011 11:07:48 +0200 + +eglibc (2.13-16ubuntu1) oneiric; urgency=low + + * Merge with Debian (r4860). + * Update patches/svn-updates to revision 14811. + * Build using GCC-4.6. + + -- Matthias Klose Tue, 09 Aug 2011 16:11:30 +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. + * 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-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. + + -- Aurelien Jarno Fri, 05 Aug 2011 07:46:28 +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-9ubuntu3) oneiric; urgency=low + + * Build libc6-armhf and libc6-dev-armhf packages on armel. LP: #810360. + * Build using GCC 4.6 on armel. + * Add an empty directory /usr/lib/ in the biarch -dev packages, + needed by GCC to resolve names relative to this path. + + -- Matthias Klose Wed, 20 Jul 2011 15:22:21 +0200 + +eglibc (2.13-9ubuntu2) oneiric; urgency=low + + * Cut down the delta with Debian: + - drop debian/bug/locales/presubj and debian/locales.bug-presubj, + replaced by debian/debhelper.in/locales.bug-presubj + - debian/control.in/main: + + bump the multiarch build-dep on dpkg-dev to 1.16.0 now that it's + available in Ubuntu + + add ${misc:Depends} for multiarch-support + - debian/debhelper.in/libc.preinst: reorder so we get a sensible diff, + and fix the nbsp that was fixed upstream in 2.13-9. + - debian/debhelper.in/libc.preinst: drop changes from 2.13-8ubuntu2, + 2.13-8ubuntu3: Debian now guards this with a check for $1 = upgrade, + which should account for the initial unpack cases (both debootstrapping, + and first install of a foreign libc). + - clean up mismerge of debian/debhelper.in/libc.prerm. + - clean up mismerge of debian/debhelper.in/nscd.init. + - drop debian/patches/alpha/cvs-longjmp-chk.diff; no reason to carry + extra patches for alpha... + - drop debian/patches/hurd-i386/submitted-ttyname.diff, we don't want + stray hurd patches either. + - sync miscellaneous patches with Debian versions: + debian/patches/any/local-libgcc-compat-ports.diff, + debian/patches/any/local-ld-multiarch.diff + - reapply patches disabled without explanation: + all/local-alias-UTF-8.diff, all/local-pthread-manpages.diff + - debian/patches/lpia, debian/rules, debian/rules.d/control.mk, + debian/sysdeps/lpia.mk: drop support for lpia, which hasn't existed + since hardy. + + -- Steve Langasek Fri, 08 Jul 2011 08:55:44 -0700 + +eglibc (2.13-9ubuntu1) oneiric; urgency=low + + * Merge with Debian (r4786). + + -- Matthias Klose Mon, 04 Jul 2011 17:10:01 +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-8ubuntu3) oneiric; urgency=low + + * debhelper.in/libc.preinst: Don't probe for old copies of libc when doing + initial installs (i.e. no second argument to preinst), since debootstrap + extracts libc and other packages before unpacking it properly and we + don't want to break it (LP: #805342). + + -- Colin Watson Mon, 04 Jul 2011 09:40:56 +0100 + +eglibc (2.13-8ubuntu2) oneiric; urgency=low + + * debhelper.in/libc.preinst: don't probe for old copies of libc when we're + installing a libc for other than the default architecture; otherwise, we + can't bootstrap installing a foreign-arch libc onto the system. + + -- Steve Langasek Sat, 02 Jul 2011 17:46:14 -0700 + +eglibc (2.13-8ubuntu1) oneiric; urgency=low + + [ Colin Watson ] + * Backport from upstream: + - Update UTF-8 charmap from recent Unidata.txt file. + - Transliterate U20B9 (LP: #799673). + + [ Matthias Klose ] + * Merge with Debian (r4770). + * Align _start constant pool to 4 bytes (Richard Sandiford). LP: #791315. + * Adjust Breaks to gcc-4.x for the Ubuntu versions. + + -- Matthias Klose Sat, 02 Jul 2011 11:05:07 +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-6ubuntu2) oneiric; urgency=low + + * Fix preinst to cope with two-digit kernel version numbers, such as 3.0. + + -- Colin Watson Fri, 10 Jun 2011 17:21:32 +0100 + +eglibc (2.13-6ubuntu1) oneiric; urgency=low + + * Merge with Debian (r4726, 2.13-6). + * Fix installation of ld.co.conf.d file for biarch builds. + + -- Matthias Klose Thu, 09 Jun 2011 17:35:12 +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-5ubuntu1) oneiric; urgency=low + + * Revert: + - Provide compatibility symlinks for .o files in /usr/lib. + - debian/control.in/libc: Remove the Multi-Arch: same attribute. + * Run the ldconfig trigger in verbose mode again, if it failed. + * Merge with Debian (r4710, trunk). + + -- Matthias Klose Wed, 08 Jun 2011 20:09:08 +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-2ubuntu1) oneiric; urgency=low + + * Merge with Debian (r4637, trunk). + + -- Matthias Klose Wed, 04 May 2011 11:02:30 +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-0ubuntu15) oneiric; urgency=low + + * Re-enable the memcpy multiarch implementaiton on x86_64. LP: #727064. + * Merge with Debian (r4609, 2.13 branch). + * Update to r13356 from the eglibc-2.13 branch. + + -- Matthias Klose Tue, 26 Apr 2011 14:03:32 +0200 + +eglibc (2.13-0ubuntu13) natty; urgency=low + + * debian/sysdeps/linux.mk: detect when linux-libc-dev has moved its + headers to the multiarch dir, and create the symlink to the right place + so we can find those headers for building. LP: #750585. + + -- Steve Langasek Mon, 11 Apr 2011 02:15:33 -0700 + +eglibc (2.13-0ubuntu12) natty; urgency=low + + * For memcpy-ssse3, enable chk symbols in static builds. LP: #726802. + * Disable the memcpy multiarch implementaiton on x86_64. LP: #727064. + * Merge from Debian: + - Add patches/i386/cvs-cacheinfo.diff to fix empty LEVEL*CACHE* getconf() + entries for some CPU. Closes: #609389. + + -- Matthias Klose Tue, 05 Apr 2011 10:54:32 +0200 + +eglibc (2.13-0ubuntu11) natty; urgency=low + + * debian/rules.d/build.mk: when building 32-bit biarch libraries for + 64-bit archs, ship an /etc/ld.so.conf/biarch.conf config snippet adding + /lib32,/usr/lib32 to the path; these are already included in the path + for the biarch build itself, but the biarch ld.so may be Replaced: by + the multiarch libc which does not have built-in support for these + non-standard paths. + * debian/rules.d/debhelper.mk: the ld.so.conf snippet isn't included in + all of the alternate libc builds, only in libc6-i386 and libc6-powerpc; + so we add this by hand to the dh_install invocation for these packages. + LP: #741949. + * debian/debhelper.in/libc.preinst: don't restart kdm on upgrade. It may + no longer be required, and in any case the restart will break running + sessions so we want to avoid this for beta1. LP: #744944. + + -- Steve Langasek Tue, 29 Mar 2011 23:15:42 -0700 + +eglibc (2.13-0ubuntu10) natty; urgency=low + + * Provide compatibility symlinks for .o files in /usr/lib. LP: #744908. + * debian/control.in/libc: Remove the Multi-Arch: same attribute. + + -- Matthias Klose Tue, 29 Mar 2011 17:03:27 +0200 + +eglibc (2.13-0ubuntu9) natty; urgency=low + + * Update to r13241 from the eglibc-2.13 branch. + * Create ARM unwind records for system call stubs (Ulrich Weigand). + LP: #684218. + + -- Matthias Klose Wed, 23 Mar 2011 00:35:13 +0100 + +eglibc (2.13-0ubuntu8) natty; urgency=low + + * debian/rules.d/debhelper.mk: when doing a stage1 build, all our files are + in /lib, not in $slibdir (which is not the same thing under multiarch). + * debian/sysdeps/armhf.mk: use /lib/$(DEB_HOST_MULTIARCH) for rtlddir, so + that we avoid a file conflict with the armel libc and armel+armhf can + be multiarch-coinstallable. + * debian/control.in/libc, debian/control.in/main: make multiarch-support a + real package depending on the native libc; this eliminates the problem + of a circular depends/pre-depends loop never permitting apt to install + the base libraries for any foreign architecture. We still have the + dependency loop for the native architecture, which is safe (and needs to + be enforced!), but whenever a package is installed non-native, it's ok + to bypass this requirement (which is effectively what we're doing by + making multiarch-support Multi-Arch: foreign), because none of the + concerned library packages are installable at all unless a Multi-Arch: + same libc6 is available. + + -- Steve Langasek Mon, 21 Mar 2011 01:39:32 -0700 + +eglibc (2.13-0ubuntu7) natty; urgency=low + + * debian/patches/any/local-ldconfig-system-dirs.diff: make ldconfig + use the built-in system paths. Closes LP: #736932. + + -- Steve Langasek Thu, 17 Mar 2011 16:01:07 -0700 + +eglibc (2.13-0ubuntu6) natty; urgency=low + + * Build for multiarch. FFe LP: #733501. + + [ Aurelien Jarno ] + * Use the multiarch path for the native version and optimized flavors, and + mark these packages as Multi-Arch: same. + * patches/any/local-ld-multiarch.diff: add the multiarch compat dir + instead of the multiarch dir. + * Simplify the creation of /etc/ld.so.conf.d/.conf. + * Install a symlink ABI -> multiarch path. + + [ Steve Langasek ] + * build-depend on the multiarch dpkg-dev. + * debian/control.in/libc: add 'multiarch-support' provide. + * 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. + * Use globbing in lintian overrides instead of directory names, so that we + can use an architecture-agnostic override file. + * 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/rules.d/build.mk: populate /etc/ld.so.conf.d with the + $(DEB_HOST_MULTIARCH) paths, but also include $(DEB_HOST_GNU_TYPE) paths + if this is a different triplet to ensure backwards-compatibility with + packages already using the multiarch paths (on i386) + * Remove spurious debian/control.in/libc?* files from the source package, + since their presence caused the latest build to be Multi-Arch: no + * Include $rtlddir in the debhelper substitution rules + + -- Steve Langasek Tue, 15 Mar 2011 19:50:48 -0700 + +eglibc (2.13-0ubuntu5) natty; urgency=low + + * Enable SSE2 memset for AMD's upcoming Orochi processor and bugfix. + LP: #735020. + + -- Matthias Klose Mon, 14 Mar 2011 21:35:41 +0100 + +eglibc (2.13-0ubuntu4) natty; urgency=low + + * Merge with Debian (r4564, 2.13 branch). + * Merge Debian 2.11.2-12. + - Fix a typo in debian/patches/any/local-rtld.diff. Closes: #615806. + * Merge Debian 2.11.2-13. + [ 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. + * On ppc64, build with -O3 -fno-tree-vectorize. + * Update to r13065 from the eglibc-2.13 branch. + - debian/patches/any/cvs-rtld-prelink.diff: Remove, applied upstream. + - debian/patches/ppc64/submitted-loader-no-vsx.diff: Likewise. + * Re-enable the upstream change: + 2010-06-02 Kirill A. Shutemov + * elf/dl-reloc.c: Flush cache after solving TEXTRELs if arch + requires it. + Working OpenJDK ARM assembler interpreter. LP: #605042. + + -- Matthias Klose Tue, 08 Mar 2011 00:47:30 +0100 + +eglibc (2.13-0ubuntu3) natty; urgency=low + + [ Matthias Klose ] + * Add expected test results for ppc64. + + [ Dave Gilbert ] + * debian/patches/arm/local-linaro-cortex-strings.diff: + - ports/sysdeps/arm/memchr.S: Import fast multibyte memchr optimised + for ARM v7 from linaro cortex-strings bzr repo. + - ports/sysdeps/arm/strchr.S: Import simple strchr optimised for + ARM v7 from linaro cortex-strings bzr repo. + + -- Matthias Klose Thu, 24 Feb 2011 07:37:20 +0100 + +eglibc (2.13-0ubuntu2) natty; urgency=low + + * Apply upstream patch to fix prelinking. + + -- Colin Watson Wed, 23 Feb 2011 03:36:25 +0000 + +eglibc (2.13-0ubuntu1) natty; urgency=low + + * Upload to natty, fixing ld.so assertion on many programs (LP: #721469). + * Replace ppc64/local-loader-no-vsx.diff with submitted version from Ryan + S. Arnold. + + -- Colin Watson Fri, 18 Feb 2011 23:43:05 +0000 + +eglibc (2.13-0ubuntu1~ppa2) natty; urgency=low + + * Apply other part of proposed workaround for PR 12454 (as amended by Kees + Cook). + + -- Colin Watson Fri, 18 Feb 2011 21:18:42 +0000 + +eglibc (2.13-0ubuntu1~ppa1) natty; urgency=low + + * Upload as 2.13. + * Apply proposed workaround for PR 12454. + + -- Matthias Klose Fri, 18 Feb 2011 12:07:54 +0100 + +eglibc (2.13~pre1-0ubuntu1) natty; urgency=low + + * Generate 2.13 tarball based on r12879/2.13 branch. + * Merge Debian 2.11.2-8 - -11. + * patches/kfreebsd/local-sysdeps.diff: remove stub marks for at* + syscalls as we don't support FreeBSD 7.x kernels anyway. Closes: + #610749. + * Add patches/amd64/cvs-avx-tcb-alignment.diff from upstream to fix + alignement issues on CPU supporting the AVX instruction set. Closes: + #610657. + * Disable build failure in case of testsuite regressions, will be + re-enabled after squeeze release. + * Japanese debconf translation update from Nobuhiro Iwamatsu. + closes: #604752. + * Add expected gettext failure on hurd-i386. + * 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 + * Merge with Debian (r4525, 2.13 branch). + + -- Matthias Klose Fri, 18 Feb 2011 12:05:45 +0100 + +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.12.1-0ubuntu16) natty; urgency=low + + * ppc64/local-loader-no-vsx.diff: Build ppc64 ld.so with -mno-vsx, since + otherwise it tries to load a constant from the TOC before the TOC + reference has been relocated. + * any/submitted-sys-uio-vector.diff: Add patch from Petr Baudis to avoid a + clash with Altivec. + + -- Colin Watson Tue, 15 Feb 2011 09:32:49 +0000 + +eglibc (2.12.1-0ubuntu15) natty; urgency=low + + * Drop dependencies on findutils, obsolete post-lucid. + + -- Steve Langasek Wed, 09 Feb 2011 15:13:13 -0800 + +eglibc (2.12.1-0ubuntu14) natty; urgency=low + + [ Matthias Klose ] + * Call locale-gen --purge when updating from eglibc-2.11.x. LP: #504198. + + -- Colin Watson Fri, 28 Jan 2011 13:31:14 +0000 + +eglibc (2.12.1-0ubuntu13) natty; urgency=low + + * SECURITY UPDATE: setuid iconv users could load arbitrary libraries. + - debian/patches/any/submitted-origin.diff: refresh with new + proposed solution, avoiding iconv issues (LP: #701783). + + -- Kees Cook Tue, 11 Jan 2011 22:45:54 -0800 + +eglibc (2.12.1-0ubuntu12) natty; urgency=low + + * do not run 'telinit u' on upgrade, as this will break upstart. + touch /var/run/init.upgraded instead, which will force a re-exec just + before remounting root read-only. LP: #672177, LP: #694772. + + -- Clint Byrum Mon, 03 Jan 2011 10:17:18 -0800 + +eglibc (2.12.1-0ubuntu11) natty; urgency=low + + * Update to the eglibc 2.12 branch (r12365). + - Fix alignment of AVX safe area on x86_64, issue #12113. LP: #662511. + - Fix issue #12159, x86-64 strchr propagation of search byte into all bytes + of SSE register. (LP: #615953) + - any/cvs-audit-suid.diff, any/cvs-getlogin_r-error-handling-1.patch, + any/cvs-getlogin_r-error-handling-2.patch, any/cvs-issue12092.diff, + any/cvs-getlogin_r-error-handling-3.patch, any/cvs-issue12113.diff, + any/cvs-issue11968.diff: Remove, merged upstream. + - any/cvs-dst-expansion-fix.diff, any/submitted-etc-resolv.conf.diff, + locale/locale-print-LANGUAGE.diff: Updated. + + * Sort changelog entries with bzr-builddeb's merge_changelog to help merging + with Debian; update Debian changelog entries to their latest version, and + drop Debian changelog entries which aren't in the unstable changelog; this + keeps the diff between Debian unstable's changelog and Ubuntu's changelog + minimal (only Ubuntu entries) and makes it easier to review new Debian + changes. + * Copy binutils [mips mipsel] build-dep to minimize delta with Debian's + build-deps. + * Drop Vcs-Bzr; this package is now maintained in lp:ubuntu/eglibc. + * Drop version in texinfo build-dep; this is satisfied even in dapper. + * Move belocs-locales-bin conflicts around to lower the diff with Debian's + control. + * Copy Debian's libc6-dev-i386 Conflicts with libc6-i386 (<= 2.9-18) for + some older upgrades; this seems to apply to Ubuntu as well, and reduces + the delta with Debian just a bit. libc6-dev-i386 is not a commonly + installed package, and this is satisfied in lucid and later anyway, so it + shouldn't make upgrades harder, except if people use backports. + * Drop debian/control.in/libc0.1, libc0.3, libc6, and libc6.1 (these are + automatically generated) after confirming that generating them results in + the same data. + * Drop debian/debhelper.in/glibc-doc.docs; ChangeLog* is already listed in + debian/debhelper.in/glibc-doc.install. + * Drop debian/debhelper.in/libc-alt-dev.postinst as it only helps powerpc + upgrades from dapper versions which aren't supported on powerpc anymore. + * debian/debhelper.in/libc.postinst: drop inconsistent quotes around 2.12. + * debian/local/manpages/gencat.1, iconvconfig.8, mtrace.1: revert differing + RCS timestamps. + * debian/patches/series: drop reference to changelog version with respect to + local-ipv6-lookup.diff as the reference is bogus. + * Drop debian/patches/alpha/submitted-getsysstats.diff, + submitted-includes.diff, submitted-lowlevellock.diff, + submitted-procfs_h.diff; these should have been dropped in earlier merges + as they are not applied anymore and were dropped from Debian. + * Drop commented-out hppa/* lines from patches/series to be consistent with + how other arches were handled. + * debian/sysdeps/amd64.mk: symlink ld-linux with the same rune as Debian. + * Drop changes to debian/sysdeps/hurd.mk; Ubuntu doesn't build for Hurd. + * Remove debian/wrapper/objcopy; was dropped in Debian already. + * Add debian/ubuntu-changes trying to document all Debian -> Ubuntu + changes, albeit some remain obscure. + * Merge Debian 2.11.2-3. + - Drop new sparc/hurd/kfreebsd etc. patches from series. + - Replace any/submitted-etc-resolv.conf.diff by upstream version + patches/any/cvs-etc-resolv.conf.diff. + - Remaining changes are listed in debian/ubuntu-changes. + - Prefix "Embedded" to binary packages' short descriptions; + Debian #587586. + - debian/control.in/libc: conflicts with prelink (<< 0.0.20090925) as + earlier versions corrupts libc 2.11+ libraries; Debian #593966. + - Look for apache2.2-common instead of apache2-common in nsscheck; + Debian #586527. + - Always try to restart init when needed, and ignore the possible errors; + Debian #588922, #590175. + - Add localedata/locale-tt_RU.diff from upstream to fix the name of the + tt_RU.UTF-8@iqtelif locale; Debian #588478. + - Update Galician debconf translation, by Jorge Barreiro; Debian #592807. + * debian/control.in/opt, debian/control: Use ${binary:Version} instead of + ${Source-Version} for sparc flavors. + * Merge Debian 2.11.2-4. + - Drop new patches/hurd-i386/submitted-sched_param.diff from series. + - Remove manpages now provided by manpages-dev; Debian #595194); + LP: #669361. + * Merge Debian 2.11.2-5. + - Replace any/cvs-etc-resolv.conf.diff with previous version + any/submitted-etc-resolv.conf.diff; Debian #595269. + - Update any/cvs-sunrpc-license.diff from upstream. + * Merge Debian 2.11.2-6. + - Update Arabic debconf translation, by Ossama Khayat; Debian #596161. + - update-locale: if LANGUAGE is not compatible with the selected default + locale, emit a warning and disable it instead of failing; + Debian #596695. + - Add armhf support; Debian #596804. + - any/submitted-resolv.conf-thread.diff: new patch to correctly reload + resolv.conf for all threads; Debian #596499. + * Merge Debian 2.11.2-7. + - Update Portuguese debconf translation, by Pedro Ribeiro; Debian #597348. + - Don't add any/submitted-origin.diff as we have + any/dst-expansion-fix.diff already. + - Add any/cvs-audit-suid.diff to only load SUID audit objects in SUID + binaries. Fix CVE-2010-3847. Debian #600667. + - Update Catalan debconf translation, by Jordi Mallach; Debian #601085. + - Update Vietnamese debconf translation, by Clytie Siddall; + Debian #601531. + - Add arm/local-sigaction.diff to match sigaction with SA_RESTORER + behaviour with other architectures; Debian #595403. + + [ Matthias Klose ] + * any/cvs-at-pagesize.diff: Don't assume AT_PAGESIZE is always available. + LP: #672352. + * Remove po/header.pot file. LP: #670678. + * On ARM, use the atomic builtins provided by GCC (Ken Werner). LP: #643171. + * Build using GCC-4.5. + + [ Kees Cook ] + * Rearrange recent security patches: + - disable-ld_audit.diff: + - should live in patches/ubuntu for now. + - updated comments to include CVE-2010-3856. + - any/dst-expansion-fix.diff renamed to any/cvs-dst-expansion-fix.diff. + - series updated to move upstream fixes out of Ubuntu-specific section. + + -- Matthias Klose Tue, 21 Dec 2010 20:35:36 +0100 + +eglibc (2.12.1-0ubuntu10) maverick-proposed; urgency=low + + * any/cvs-at-pagesize.diff: Don't assume AT_PAGESIZE is always available. + LP: #672352. + * Fix issue #12159, x86-64 strchr propagation of search byte into all bytes + of SSE register. + * Fix issue12113, alignment of AVX safe area on x86_64. LP: #662511. + * Fix ifunc thunk for strspn on x86 in static libc. LP: #615953. + + -- Matthias Klose Sun, 14 Nov 2010 23:49:36 +0100 + +eglibc (2.12.1-0ubuntu9) maverick-proposed; urgency=low + + * debian/patches/any/cvs-getlogin_r-error-handling-1.patch, + debian/patches/any/cvs-getlogin_r-error-handling-2.patch, + debian/patches/any/cvs-getlogin_r-error-handling-3.patch: + Take upstream commits c8727fa6, 5305f9b0, d48b7607 from + release/2.12/master to fix a crash in getlogin(). (LP: #658907) + + -- Anders Kaseorg Mon, 01 Nov 2010 15:42:35 -0400 + +eglibc (2.12.1-0ubuntu8) maverick-security; urgency=low + + * SECURITY UPDATE: root escalation via LD_AUDIT DST expansion. + - debian/patches/any/dst-expansion-fix.diff: upstream fixes. + - CVE-2010-3847 + - debian/patches/any/disable-ld_audit.diff: turn off LD_AUDIT + for setuid binaries. + + -- Kees Cook Thu, 21 Oct 2010 12:45:24 -0700 + +eglibc (2.12.1-0ubuntu7) maverick-proposed; urgency=low + + * Fix issue #12092, strstr broken for some inputs on pre-SSE4 machines. + LP: #655463. + + -- Matthias Klose Thu, 07 Oct 2010 09:01:06 +0200 + +eglibc (2.12.1-0ubuntu6) maverick; urgency=low + + * Fix applying the local-syscall-mcount.diff. + + -- Matthias Klose Fri, 10 Sep 2010 18:47:31 +0200 + +eglibc (2.12.1-0ubuntu5) maverick; urgency=low + + [ Steve Langasek ] + * debian/patches/arm/local-syscall-mcount.diff: unset CALL_MCOUNT for + __libc_do_syscall. Thanks to Peter Pearse + . Closes LP: #605030. + + [ Matthias Klose ] + * Fix _FORITY_SOURCE version of longjmp for Linux/x86-64 (Chung-Lin Tang) + LP: #601030. + + -- Matthias Klose Fri, 10 Sep 2010 18:19:01 +0200 + +eglibc (2.12.1-0ubuntu4) maverick; urgency=low + + * Again, revert the upstream change from the last upload to + enable running java on the babbage boards. + + -- Matthias Klose Wed, 08 Sep 2010 00:02:11 +0200 + +eglibc (2.12.1-0ubuntu3) maverick; urgency=low + + * Reapply the upstream change (tested by Yao Qi). LP: #605042. + 2010-06-02 Kirill A. Shutemov + * elf/dl-reloc.c: Flush cache after solving TEXTRELs if arch + requires it. + + -- Matthias Klose Mon, 06 Sep 2010 12:33:53 +0200 + +eglibc (2.12.1-0ubuntu2) maverick; urgency=low + + [ Marcin Juszkiewicz ] + * Add build support to only build single stages. LP: #603498. + + -- Matthias Klose Mon, 23 Aug 2010 17:05:04 +0200 + +eglibc (2.12.1-0ubuntu1) maverick; urgency=low + + * Build eglibc_2.12.1.orig.tar.gz, based on 2.12 branch (r11211). + * Provide packaging rules in eglibc-source binary packag. LP: #609162. + * Don't patch the sources when PATCHED_SOURCES is set to `yes'. + LP: #612631. + + -- Matthias Klose Mon, 16 Aug 2010 09:55:40 +0200 + +eglibc (2.12-0ubuntu5) maverick; urgency=high + + * Revert upstream change: + 2010-06-02 Kirill A. Shutemov + * elf/dl-reloc.c: Flush cache after solving TEXTRELs if arch + requires it. + Breaks the OpenJDK ARM assembler interpreter. LP: #605042. + * expected-results-arm-linux-gnueabi-libc: Remove scanf15, scanf17 + and tst-eintr1, passing the tests on the buildds. + + -- Matthias Klose Wed, 14 Jul 2010 01:06:39 +0200 + +eglibc (2.12-0ubuntu4) maverick; urgency=low + + * Update to the eglibc 2.12 branch (r10817). + - patches/any/cvs-flush-cache-textrels.diff: Remove. + - patches/any/cvs-redirect-throw.diff: Remove. + * Merge with Debian (r4360, trunk, 2.11.2-2). + * On i386, don't build with -Wa,-mtune=i686. LP: #587186. + + -- Matthias Klose Mon, 28 Jun 2010 00:47:05 +0200 + +eglibc (2.12-0ubuntu3) maverick; urgency=low + + * Merge with Debian (r4318, trunk). + * Rebuild for i386. LP: #587186. + + -- Matthias Klose Fri, 04 Jun 2010 14:32:19 +0200 + +eglibc (2.12-0ubuntu2) maverick; urgency=low + + * Apply hppa/local-dlfptr.diff, containing architecture independent + chunks needed for ia64. + + -- Matthias Klose Sun, 30 May 2010 14:36:27 +0200 + +eglibc (2.12-0ubuntu1) maverick; urgency=low + + * Build eglibc_2.12.orig.tar.gz, based on 2.12 branch (r10591). + * Merge with Debian (r4299, trunk). + + -- Matthias Klose Sun, 30 May 2010 11:05:12 +0200 + +eglibc (2.12~20100519-0ubuntu1) maverick; urgency=low + + * Mark testcases as failing: + - ia64: tst-makecontext3.out. + - sparc: testgrp.out, tst-cancelx4.out, tst-cancelx5.out + + -- Matthias Klose Fri, 28 May 2010 14:19:11 +0200 + +eglibc (2.12~20100519-0ubuntu1~ppa1) maverick; urgency=low + + * Update to the eglibc 2.12 branch (r10508). + * Remove patches applied upstream: any/arm-syscalls-out-of-line.diff, + any/cvs-futimens.diff, any/cvs-malloc_info-init.diff, any/cvs-remove.diff, + any/cvs-resolv-bindv6only.diff, any/libc-arch-1.patch, + any/libc-arch-2.patch, any/libc-memcpy-1.patch, + any/libc-memcpy-ssse3-fixes.diff, any/local-ntp-update.diff, + any/submitted-stat-issock.diff, any/x86.git-*.patch, + localedata/fr_BE-first_weekday.diff, localedata/locale-es_CR.diff, + localedata/locale-et_EE.diff, localedata/submitted-pt_BR.diff, + sparc/cvs-sparcv9-memchr.diff, sparc/submitted-msgrcv.diff. + * Update patches: any/local-disable-test-tgmath2.diff, + any/local-ldso-disable-hwcap.diff, any/local-no-pagesize.diff, + any/submitted-futex_robust_pi.diff, any/submitted-longdouble.diff, + localedata/first_weekday.diff, localedata/locales-fr.diff, + localedata/sort-UTF8-first.diff. + * debian/shlibver: Bump to 2.12~ + * debian/symbols.wildcards: Update version. + * debian/debhelper.in/libc.{pre,post}inst: Restart services on update to 2.12. + + -- Matthias Klose Wed, 19 May 2010 12:21:27 +0200 + +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.11.1-0ubuntu9) maverick; urgency=low + + * Merge with Debian (r4267, trunk). + * Update to the eglibc 2.11 branch (r10490). + - patches/ia64/submitted-memchr.diff, patches/any/cvs-readdir_r.diff, + patches/any/submitted-confname.h.diff: Remove, applied upstream. + * Stop building libc6-i686 on architecture i386. + * Disable patches/any/arm-syscalls-out-of-line.diff to fix build + failure on armel. + + -- Matthias Klose Wed, 19 May 2010 12:21:27 +0200 + +eglibc (2.11.1-0ubuntu8) maverick; urgency=low + + * Apply from the 2.11-x86 branch: + - x86-64 SSE4 optimized memcmp. + * [armel] make syscalls out-of-line to improve debugging. LP: #571647 . + + -- Matthias Klose Sat, 01 May 2010 14:30:23 +0200 + +eglibc (2.11.1-0ubuntu7) lucid; urgency=low + + * Fix logic that tests if gdm needs a restart or a reload + to handle both the initscript and upstart cases. This fixes + a gdm restart during a hardy to lucid upgrade (LP: #568292) + + -- Michael Vogt Thu, 22 Apr 2010 10:40:19 +0200 + +eglibc (2.11.1-0ubuntu6) lucid; urgency=low + + [ Kees Cook ] + * [BZ #11333], Handle unnecessary padding in getdents64. LP: #392501. + + [ Matthias Klose ] + * Apply from the 2.11-x86 branch: + - Fix bugs in strcmp-sse4.S and strcmp-ssse3.S (H.J. Lu). LP: #563291. + - Fix bugs in memcpy-ssse3. LP: #560135. + * Assign global scope to RFC 1918 addresses in getaddrinfo(). Thanks + Tore Anderson. LP: #555210. + * Re-enable the local-ipv6-lookup patch. Addresses #417757. + + -- Matthias Klose Sun, 18 Apr 2010 00:05:05 +0200 + +eglibc (2.11.1-0ubuntu5) lucid; urgency=low + + * Apply from the 2.11-x86 branch: + - Append -U__i686 in ASFLAGS on x86. + - Backport 32bit SSSE3/SSE4 optimized memcmp and strcmp from trunk. + - Correct unwind info in strcmp-sse4.S. + - Fix sysdeps/i386/i686/multiarch/memcmp-ssse3.S. + * Extend logic to restart upstart based services on NSS upgrade. + LP: #505838. + + -- Matthias Klose Sun, 21 Mar 2010 15:11:00 +0100 + +eglibc (2.11.1-0ubuntu4) lucid; urgency=low + + * debian/patches/any/submitted-nis-shadow.diff: updated to fix + incorrect password overwriting (LP: #526530). + * debian/control.in/main: update already uploaded g++ version Depend. + + -- Kees Cook Wed, 03 Mar 2010 11:48:30 -0800 + +eglibc (2.11.1-0ubuntu3) lucid; urgency=low + + * Merge with Debian (r4205, trunk). + * Merge from debian-2.11 branch: + - Add debian/patches/arm/local-atomic.diff to fix the testsuite on arm. + + -- Matthias Klose Fri, 26 Feb 2010 05:14:17 +0100 + +eglibc (2.11.1-0ubuntu2) lucid; urgency=low + + * Update to the eglibc 2.11 branch (r9744). + + -- Matthias Klose Wed, 27 Jan 2010 11:40:07 +0100 + +eglibc (2.11.1-0ubuntu1) lucid; urgency=low + + * Build package as eglibc-2.11.1 (based on r9672). + * Merge with Debian (r4096, trunk). + + -- Matthias Klose Mon, 18 Jan 2010 17:48:39 +0100 + +eglibc (2.11~20100104-0ubuntu5) lucid; urgency=low + + * debian/*symbols*: Replace the upper dependency on (<< 2.11) with (<< 2.12). + dpkg-gensymbols didn't complain about missing symbols in earlier uploads. + LP: #508702. + * Add expected testsuite failures: + - tst-cputimer1.out (powerpc 64bit). + + -- Matthias Klose Sun, 17 Jan 2010 15:24:48 +0100 + +eglibc (2.11~20100104-0ubuntu4) lucid; urgency=low + + * Still build the package as a 2.11 pre-release; packages like + libglib2.0-0, libnih1 and upstart have 'libc6 (<< 2.11)' dependencies, + for whatever reason, but they already did fail to see the pre-release. + See LP: #508702. + * Backport from the trunk: Optimize 32bit memset/memcpy with SSE2/SSSE3 + (H.J. Lu). + + -- Matthias Klose Sun, 17 Jan 2010 12:42:12 +0100 + +eglibc (2.11~20100104-0ubuntu3) lucid; urgency=low + + * Upgrade the NSS min compat version to 2.11 in the maintainer scripts, to + force maintainer restarts. LP: #504847. + * debian/control: point Vcs-Bzr at a branch whose access rights match those + of the archive. + + -- Steve Langasek Fri, 08 Jan 2010 19:34:19 +0000 + +eglibc (2.11~20100104-0ubuntu2) lucid; urgency=low + + [ Matthias Klose ] + * Mark test-fenv.out as failing on powerpc again. + * Mark tst-backtrace2.out, tst-longjmp_chk2.out as failing on sparc64 + again. + * Call locale-gen --purge when updating from eglibc-2.10.x. LP: #504198. + * Merge with Debian (r4063, trunk, 2.10.2-4). + + [ Kees Cook ] + * debian/patches/ubuntu/*: update patch tags on patches recommended + to Debian (Debian bug 563637). + + -- Matthias Klose Thu, 07 Jan 2010 13:32:10 +0100 + +eglibc (2.11~20100104-0ubuntu1) lucid; urgency=low + + * Remove expected test failures: + - test-fenv.out (powerpc). + * Add expected testsuite failures: + - tst-cputimer1.out (powerpc 32bit), check-execstack.out (powerpc 64bit). + + -- Matthias Klose Wed, 06 Jan 2010 12:52:31 +0100 + +eglibc (2.11~20100104-0ubuntu1~ppa1) lucid; urgency=low + + * Test build, trunk 20100104 (r9600). + * Merge with Debian (r4046, trunk). + * Merge with Ubuntu 2.10.2-3ubuntu1. + * Don't apply the any/cvs-futimens.diff patch on powerpc. The powerpc + buildds still run linux-2.6.15. + + -- Matthias Klose Tue, 05 Jan 2010 10:45:37 +0100 + +eglibc (2.11~20091226-0ubuntu1~ppa3) lucid; urgency=low + + * Remove expected test failures: + - globtest.out (ix86). User and default group must exist in + /etc/{passwd,group}. + - tst-cputimer1.out, tst-nanosleep.out (powerpc). + - tst-cancel1.out, test-memchr.out (sparc, sparc64, sparcv9b). + * Add expected testsuite failures: + - tst-backtrace2.out, tst-longjmp_chk2.out (sparc64, sparcv9b). + + -- Matthias Klose Mon, 28 Dec 2009 01:44:39 +0100 + +eglibc (2.11~20091226-0ubuntu1~ppa2) lucid; urgency=low + + * ia64/submitted-siginfo.diff, s390/submitted-siginfo.diff: Remove, + applied upstream. + + -- Matthias Klose Sun, 27 Dec 2009 01:01:22 +0100 + +eglibc (2.11~20091226-0ubuntu1~ppa1) lucid; urgency=low + + * Merge with Debian (r4035, trunk). + * Test build, trunk 20091226 (r9539). + + -- Matthias Klose Sat, 26 Dec 2009 11:47:39 +0100 + +eglibc (2.11~20091201-0ubuntu1~ppa1) lucid; urgency=low + + * Test build, trunk 20091201 (r9153). + + -- Matthias Klose Tue, 01 Dec 2009 16:13:20 +0100 + +eglibc (2.11~20091028-0ubuntu1~ppa1) lucid; urgency=low + + * Test build, trunk 20091028 (r9153). + * Configure with --enable-multi-arch on ix86. + + -- Matthias Klose Wed, 28 Oct 2009 17:54:06 +0100 + +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-3ubuntu1) lucid; urgency=low + + * Merge with Debian (r4046, trunk). + + -- Matthias Klose Mon, 04 Jan 2010 10:10:22 +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-2ubuntu4) lucid; urgency=low + + * Update to r9527 from the eglibc-2.10 branch. + - LP: #425723. + * Merge with Debian (r4032, trunk). + * Rebuild to link with --hash-style=both on armel. + + -- Matthias Klose Wed, 23 Dec 2009 21:40:58 +0100 + +eglibc (2.10.2-2ubuntu3) lucid; urgency=low + + * Mark tst-eintr1 as failing on armel; fails on the buildd with -mthumb, + not reproducible with a local build. + + -- Matthias Klose Mon, 14 Dec 2009 17:34:20 +0100 + +eglibc (2.10.2-2ubuntu2) lucid; urgency=low + + * glibc-doc: Fix installation of manual files. + + -- Matthias Klose Mon, 30 Nov 2009 16:33:20 +0100 + +eglibc (2.10.2-2ubuntu1) lucid; urgency=low + + * Merge with Debian (r4021, trunk). + + -- Matthias Klose Sat, 28 Nov 2009 17:48:13 +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.10.1-0ubuntu15) karmic; urgency=low + + * Don't fail the build explicitely on any architecture (used for ppa + uploads to save buildd resources). + + -- Matthias Klose Tue, 06 Oct 2009 23:59:12 +0200 + +eglibc (2.10.1-0ubuntu14) karmic; urgency=low + + * Tighten build dependencies for binutils and gcc-4.4 with fix + for PR debug/40521. LP: #440172. + * On armel, don't explicitely build with -fno-dwarf2-cfi-asm. + * On armel, remove check-textrel.out test from expected to fail. + + -- Matthias Klose Tue, 06 Oct 2009 23:48:37 +0200 + +eglibc (2.10.1-0ubuntu13) karmic; urgency=low + + * On armel build with -fno-dwarf2-cfi-asm (will be the default with + gcc-4.4 (>= 4.4.1-5ubuntu1). + * Build-depend on binutils fixing PR ld/9863. + + -- Matthias Klose Thu, 01 Oct 2009 17:22:58 +0200 + +eglibc (2.10.1-0ubuntu12) karmic; urgency=low + + [ Steve Langasek ] + * Restore missing depends/conflicts/replaces handling for findutils and + belocs-locales-bin, lost in the latest merge. + * Move ldconfig trigger handling to libc-bin postinst, since that's where + ldconfig and the trigger are actually located. + * Drop debian/local/etc_init.d from the source, which is no longer shipped + in the package having been dropped in Debian + * debian/rules.d/debhelper.mk: revert breakage from Debian experimental; + pulling in file substitutions from script.in has to happen before + substituting other tokens, since script.in/nohwcap.sh contains other + tokens that have to be replaced. LP: #427288. + + [ Matthias Klose ] + * Don't apply hppa patches, don't apply + any/local-linuxthreads-kill_other.diff. + + -- Steve Langasek Mon, 14 Sep 2009 16:16:10 -0700 + +eglibc (2.10.1-0ubuntu11) karmic; urgency=low + + * Fix merge error resulting in a build failure of glibc-doc. + + -- Matthias Klose Sat, 12 Sep 2009 14:32:03 +0200 + +eglibc (2.10.1-0ubuntu10) karmic; urgency=low + + [ Matthias Klose ] + * Merge with Debian (r3833, eglibc-2.10 branch). + * Don't build libc6-vfp anymore. + * Update from the eglibc 2.10 maintainance branch (rev 8895). + - Remove patches/any/submitted-libgcc_s.so.diff. + * Move the ldconfig trigger from libc6 to libc-bin. + + [ Loïc Minier + * Update testsuite for armel since the real FPU on the buildds passes more + tests than the software emulation. + * Fix Vcs-Bzr URL to use https. + + -- Matthias Klose Sat, 12 Sep 2009 11:45:41 +0200 + +eglibc (2.10.1-0ubuntu9) karmic; urgency=low + + * debian/sysdeps/i386.mk: cherrypick fix from Debian, lost somewhere along + the way, that prevents /etc/ld.so.conf.d/xen.conf being added to the + libc6-xen package. LP: #427288. This still leaves us with a delta + relative to the Debian conffile name, which we ought to clean up at some + later date. + + -- Steve Langasek Sat, 12 Sep 2009 00:31:45 +0000 + +eglibc (2.10.1-0ubuntu8) karmic; urgency=low + + * Refresh debian/patches/ubuntu/retain-fatal-msg.diff to match the + final upstream commit. + + -- Kees Cook Fri, 28 Aug 2009 09:54:10 -0700 + +eglibc (2.10.1-0ubuntu7) karmic; urgency=low + + * patches/ubuntu/submitted-leading-zero-stack-guard.diff: require that + the stack guard start with a zero-byte to protect against str* + function more completely (LP: #413278). + + -- Kees Cook Wed, 12 Aug 2009 16:35:43 -0700 + +eglibc (2.10.1-0ubuntu6) karmic; urgency=low + + * patches/all/submitted-missing-etc-hosts.diff: a missing /etc/hosts should + be treated as a simple "not found", not as an internal error. + LP: #408901. + + -- Steve Langasek Tue, 11 Aug 2009 19:58:18 +0000 + +eglibc (2.10.1-0ubuntu5) karmic; urgency=low + + * Expected testsuite results on powerpc64: Mark test-fenv.out as + failing again. + + -- Matthias Klose Fri, 07 Aug 2009 12:05:04 +0200 + +eglibc (2.10.1-0ubuntu4) karmic; urgency=low + + * Expected testsuite results on powerpc: Mark tst-cputimer1.out as failing. + + -- Matthias Klose Fri, 07 Aug 2009 01:25:47 +0200 + +eglibc (2.10.1-0ubuntu3) karmic; urgency=low + + * Expected testsuite results on powerpc64: Mark test-fenv.out and + tst-timer5.out as succeeding, tst-cputimer1.out as failing. + + -- Matthias Klose Thu, 06 Aug 2009 18:14:20 +0200 + +eglibc (2.10.1-0ubuntu2) karmic; urgency=low + + * Merge with Debian (r3733, eglibc-2.10 branch). + * Update to r8758 from the eglibc-2.10 branch. + * Remove testcases from expected results, which don't fail anymore (ia64). + * Mark test-memchr.out as failing on sparc. + * patches/any/local-ipv6-lookup.diff: Don't apply. LP: #239701, #374674. + * Work around Ubuntu buildd limitation: allow just 2.6.15 for libc6 + installation, although 2.6.18 is required for some patches (requested by + soyuz maintainers). + + -- Matthias Klose Tue, 04 Aug 2009 00:36:31 +0200 + +eglibc (2.10.1-0ubuntu1) karmic; urgency=low + + * Rebuild .orig.tar.gz, based on revision 8733 of the eglibc-2.10 branch. + * Merge with Debian (r3733, eglibc-2.10 branch). + + -- Matthias Klose Mon, 03 Aug 2009 10:17:12 +0200 + +eglibc (2.10.1-0ubuntu1~ppa11) karmic; urgency=low + + * Merge with Debian (r3719, eglibc-2.10 branch). + + -- Matthias Klose Thu, 30 Jul 2009 19:09:16 +0200 + +eglibc (2.10.1-0ubuntu1~ppa10) karmic; urgency=low + + * Merge with Debian (r3641, eglibc-2.10 branch). + * Mark test cases as failing: + - armel: check-textrel + - sparc: tst-cancel1 + + -- Matthias Klose Fri, 24 Jul 2009 16:19:39 +0200 + +eglibc (2.10.1-0ubuntu1~ppa9) karmic; urgency=low + + * Update to r8680 from the eglibc-2.10 branch. + * Remove tst-fgetwc.out testcase as failing on all architectures; + fixed by update to the current eglibc-2.10 branch. + * Merge with Debian (r3625, eglibc-2.10 branch). + * Build using GCC-4.4. + + -- Matthias Klose Sat, 18 Jul 2009 18:12:57 +0200 + +eglibc (2.10.1-0ubuntu1~ppa8) karmic; urgency=low + + * Mark tst-fgetwc.out testcase as failing on all architectures; remove + testcases from expected results, which don't fail anymore. + + -- Matthias Klose Wed, 08 Jul 2009 15:39:50 +0200 + +eglibc (2.10.1-0ubuntu1~ppa7) karmic; urgency=low + + * Merge with Debian (r3600, eglibc-2.10 branch). + * Drop changes for Debian's /emul/ia32-linux to /usr/lib32 transition. + + -- Matthias Klose Tue, 07 Jul 2009 12:16:06 +0200 + +eglibc (2.10.1-0ubuntu1~ppa6) karmic; urgency=low + + [ Matthias Klose ] + * Merge with Debian (r3562, eglibc-2.10 branch). + * Drop changes for Debian's /emul/ia32-linux to /usr/lib32 transition. + + -- Matthias Klose Thu, 25 Jun 2009 10:14:41 +0200 + +eglibc (2.10.1-0ubuntu1~ppa4) UNRELEASED; urgency=low + + * Add debian/patches/ubuntu/retain-fatal-msg.diff: attempt to retain the + assert and internal error messages so they can be examined during core + dump analysis. + + -- Kees Cook Tue, 02 Jun 2009 11:56:21 -0700 + +eglibc (2.10.1-0ubuntu1~ppa3) karmic; urgency=low + + [ Kees Cook ] + * debian/patches/ubuntu/stack-guard-quick-randomization.diff: Update + and reenable. + + [ Matthias Klose ] + * Merge with Debian (r3498, eglibc-2.10 branch). + * Recognize sparcv9v2 and sparc64v2 as valid machine names. The configure.in + still supports these machines, and the Debian build system misuses this as + the name of the build directory. + * Build with -fno-stack-protector -U_FORTIFY_SOURCE on ia64. + + -- Matthias Klose Wed, 13 May 2009 10:58:16 +0200 + +eglibc (2.10.1-0ubuntu1~ppa2) karmic; urgency=low + + * Fix build failure on ia64. LP: #375509. + + -- Matthias Klose Tue, 12 May 2009 18:16:44 +0200 + +eglibc (2.10.1-0ubuntu1~ppa1) karmic; urgency=low + + * WARNING: Ignore regressions in the testsuite, install at your own risk. + + * Build .orig.tar.gz from eglibc-2_10 branch (r8444). + * Merge with Debian (r3494, eglibc-2.10 branch); remaining changes: + - Packaging: + + External tzdata + + Addition of Niagara and Niagara2 optimised libraries + + GFDL Documentation added back in, build glibc-doc from this source. + + Transition from /usr/include/ppc64-linux-gnu to powerpc64-linux-gnu + + Use dpkg triggers for ldconfig + + Do not die if extra libc libraries or symlinks found + + Do not do a test run of nscd when starting + + Only apply patches we actually use in Ubuntu + + Use /lib and /usr/lib for amd64 + + amd64 biarch is i686, not i486. + + Non-optimised i386 glibc is Xen-friendly. + + Support sparcv9v, v9v2, 64b, 64v, 64v2 + + Add support for lpia. + + Use .conf for files in /etc/ld.so.conf.d. + + Add vfp pass for armel. + + Set DEB_BUILD_OPTIMIZING_SIZE=0 on lpia. + - Patches: + + Applied any/local-ipv6-lookup. + + Not applied any/local-sysctl. + + Applied debian/patches/all/fedora-nss_dns-gethostbyname4-disable.diff. + + Updated arm/local-no-hwcap. + + Don't declare the fwrite and fwrite_unlocked functions with + __attribute__((warn_unused_result)). + * debian/patches/arm/local-memset.diff: Remove, applied upstream. + * debian/patches/arm/local-memset.diff: Likewise. + * debian/patches/ubuntu/stack-guard-quick-randomization.diff: Disable. + * debian/patches/ubuntu/no-sprintf-pre-truncate.diff: Update. + + -- Matthias Klose Tue, 12 May 2009 15:36:04 +0200 + +eglibc (2.9-27) unstable; urgency=low + + [ Aurelien Jarno ] + * Extend description of libc-bin, patch by Christoph Berg. Closes: + bug#544389. + * Strip *.o files manually (dh_strip does not do it) to prevent + leakage of the build directory. + * libc.postinst: re-add "telinit u", removed by accident in version + 2.9-24. Closes: bug#545179. + * nscd.init: set PATH to "/sbin:/usr/sbin:/bin:/usr/bin". Closes: + bug#544942. + * nscd.conf.5: add documentation for max-db-size and auto-propagate + options. Closes: bug#544544. + * Merge from the multiarch branch: + - allow to specify libdir and slibdir also for the main flavor. + - use real dependencies between the build_* and binaryinst_* + targets. + - simplify clean target. + * Set the minimum kernel version to 6.0.0 for biarch library on + kfreebsd-amd64 to match the main library. + * alpha/submitted-sock_nonblock.diff: adjust patch location (alpha is + still a main architecture in glibc 2.9). Closes: bug#540871. + + [ Samuel Thibault ] + * debian/debhelper.in/libc.install: Install libc/*-gnu*/ instead of + libc/*-*-gnu*/, to fix FTBFS on hurd-i386 due to it now being i486-gnu/. + * debian/patches/hurd-i386/submitted-null-pathname.diff: New patch to fix + chdir("") and chroot("") into returning ENOENT. + * debian/patches/hurd-i386/submitted-sbrk.diff: New patch to fix sbrk beyond + 128MB. + * debian/patches/hurd-i386/local-thread-cancel.diff: New patch to fix ext2fs + crash. + * debian/patches/hurd-i386/submitted-readlinkat.diff: New patch to add + support for readlinkat(), to fix insserv build. + * debian/patches/hurd-i386/cvs-termios-IXANY.patch: New patch to + define IXANY in XOpen environment too, to fix libgphoto2 build. + * debian/patches/hurd-i386/submitted-SOL_IP.patch: New patch to add SOL_IP + definition, to fix directfb build. + + [ Petr Salinger ] + * kfreebsd/local-sysdeps.diff: update to revision 2779 (from glibc-bsd). + + [ Clint Adams ] + * debian/rules.d/debhelper.mk: make sure that snippets are included + before doing CURRENT_VER substitution; fix thanks to Steve + Langasek. + * Bump to Standards-Version 3.8.3. + + -- Clint Adams 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-13ubuntu1~ppa1) karmic; urgency=low + + * WARNING: Ignore regressions in the testsuite, install at your own risk. + + * Build .orig.tar.gz from eglibc-2_9 branch (r7806). + * Merge with Debian (r3491, trunk); remaining changes: + - Packaging: + + External tzdata + + Addition of Niagara and Niagara2 optimised libraries + + GFDL Documentation added back in, build glibc-doc from this source. + + Transition from /usr/include/ppc64-linux-gnu to powerpc64-linux-gnu + + Use dpkg triggers for ldconfig + + Do not die if extra libc libraries or symlinks found + + Do not do a test run of nscd when starting + + Only apply patches we actually use in Ubuntu + + Use /lib and /usr/lib for amd64 + + amd64 biarch is i686, not i486. + + Non-optimised i386 glibc is Xen-friendly. + + Support sparcv9v, v9v2, 64b, 64v, 64v2 + + Add support for lpia. + + Use .conf for files in /etc/ld.so.conf.d. + + Add vfp pass for armel. + + Set DEB_BUILD_OPTIMIZING_SIZE=0 on lpia. + - Patches: + + Applied any/local-ipv6-lookup. + + Not applied any/local-sysctl. + + Applied debian/patches/all/fedora-nss_dns-gethostbyname4-disable.diff. + + Updated arm/local-no-hwcap. + + Don't declare the fwrite and fwrite_unlocked functions with + __attribute__((warn_unused_result)). + + -- Matthias Klose Mon, 11 May 2009 13:24:56 +0200 + +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-9ubuntu1) karmic; urgency=low + + * Merge with Debian (r3342, trunk); remaining changes: + - Packaging: + + External tzdata + + Addition of Niagara and Niagara2 optimised libraries + + GFDL Documentation added back in, build glibc-doc from this source. + + Transition from /usr/include/ppc64-linux-gnu to powerpc64-linux-gnu + + Use dpkg triggers for ldconfig + + Do not die if extra libc libraries or symlinks found + + Do not do a test run of nscd when starting + + Only apply patches we actually use in Ubuntu + + Use /lib and /usr/lib for amd64 + + amd64 biarch is i686, not i486. + + Non-optimised i386 glibc is Xen-friendly. + + Support sparcv9v, v9v2, 64b, 64v, 64v2 + + Add support for lpia. + + Use .conf for files in /etc/ld.so.conf.d. + + Add vfp pass for armel. + - Patches: + + Applied any/local-ipv6-lookup. + + Not applied any/local-sysctl. + + Applied debian/patches/all/fedora-nss_dns-gethostbyname4-disable.diff. + + Updated arm/local-no-hwcap. + + Don't declare the fwrite and fwrite_unlocked functions with + __attribute__((warn_unused_result)). + * Fix build failure with recent binutils. + * Set DEB_BUILD_OPTIMIZING_SIZE=0 on lpia. + + -- Matthias Klose Wed, 29 Apr 2009 18:20:17 +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-4ubuntu5) jaunty; urgency=low + + * This upload allows NEON hwcap usage; FFE LP: #343602. + * New patch, arm/local-hwcap-updates, add support for some recent ARM hwcaps + additions. + * Update patch arm/local-no-hwcap to also flag HWCAP_ARM_NEON as an + important hwcap; this adds /lib/neon, /usr/lib/neon etc. to the ldconfig + and ld.so search pathes. + + -- Loic Minier Tue, 31 Mar 2009 20:28:41 +0200 + +glibc (2.9-4ubuntu4) jaunty; urgency=low + + * Don't declare the fwrite and fwrite_unlocked functions with + __attribute__((warn_unused_result)). See + https://lists.ubuntu.com/archives/ubuntu-devel/2009-March/027832.html + + -- Matthias Klose Fri, 27 Mar 2009 21:17:24 +0100 + +glibc (2.9-4ubuntu3) jaunty; urgency=low + + [ Colin Watson ] + * Rename Debian's Vcs-* fields in debian/control to XS-Debian-Vcs-* to + reduce confusion. + + [ Loic Minier ] + * Add vfp pass for armel. + - sysdeps/armel.mk: add vfp pass with the same add-ons as the libc pass, + with "-mfpu=vfp -mfloat-abi=softfp" appended to CFLAGS, using + /lib/vfp as slibdir (could as well be /lib/tls/vfp but the armel port + was always NPTL which implies TLS), and configured with + --disable-profile like the other optimized passes. + - control.in/opt, control: add libc6-vfp package on armel. + - script.in/nohwcap.sh: list libc6-vfp in hwcappkgs on armel. + - testsuite-checking/expected-results-arm-linux-gnueabi-vfp: copied from + testsuite-checking/expected-results-arm-linux-gnueabi-libc. + + -- Loic Minier Thu, 19 Mar 2009 21:34:59 +0100 + +glibc (2.9-4ubuntu2) jaunty; urgency=low + + * Merge with Debian (r3342, trunk); remaining changes: + - Packaging: + + External tzdata + + Addition of Niagara and Niagara2 optimised libraries + + GFDL Documentation added back in, build glibc-doc from this source. + + Transition from /usr/include/ppc64-linux-gnu to powerpc64-linux-gnu + + Use dpkg triggers for ldconfig + + Do not die if extra libc libraries or symlinks found + + Do not do a test run of nscd when starting + + Only apply patches we actually use in Ubuntu + + Use /lib and /usr/lib for amd64 + + amd64 biarch is i686, not i486. + + Non-optimised i386 glibc is Xen-friendly. + + Support sparcv9v, v9v2, 64b, 64v, 64v2 + + Add support for lpia. + + Use .conf for files in /etc/ld.so.conf.d. + - Patches: + + Applied any/local-ipv6-lookup. + + Not applied any/local-sysctl. + + Applied debian/patches/all/fedora-nss_dns-gethostbyname4-disable.diff. + + Updated arm/local-no-hwcap. + * Remove some passing testcases from the expected test results. + + -- Matthias Klose Mon, 02 Mar 2009 08:57:05 +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.9-0ubuntu12) jaunty; urgency=low + + * debian/patches/all/fedora-nss_dns-gethostbyname4-disable.diff: Patch + from Fedora 2.9-3 to temporarily disable _nss_dns_gethostbyname4_r, + which caused problems for systems with broken IPv6 connectivity + (LP: #313218, https://bugzilla.redhat.com/show_bug.cgi?id=459756). + + -- Colin Watson Sat, 21 Feb 2009 07:40:16 +0000 + +glibc (2.9-0ubuntu11) jaunty; urgency=low + + * Update patch arm/local-no-hwcap to flag HWCAP_ARM_VFP as an important + hwcap; this adds /lib/vfp, /usr/lib/vfp etc. to the ldconfig and ld.so + search path. + * Update patch arm/local-no-hwcap to drop HWCAP_ARM_FAST_MULT from important + hwcaps as fastmult is even present on StrongARM according to Wookey; + suggested by Riku Voipio. + + -- Loic Minier Mon, 16 Feb 2009 13:32:55 +0100 + +glibc (2.9-0ubuntu10) jaunty; urgency=low + + * Move locale generation programs back to libc6, belocs-locales-bin + is dead upstream, and more and more incapable of building current + locale definitions: + - debhelper.in/libc.install: Install localedef, locale, + update-locale, and validlocale again. (locale-def will be + shipped in langpack-locales, since it is closely related to it). + - debhelper.in/libc.manpages: Install manpages for above programs. + - sysdeps/depflags.pl: Conflicts/Replaces: belocs-locales-bin. + * Merged current fixes from Debian's glibc-2.9 branch (r3269). + + -- Martin Pitt Fri, 13 Feb 2009 18:31:04 +0100 + +glibc (2.9-0ubuntu9) jaunty; urgency=low + + * Merge with Debian, glibc-2.9 branch, r3244. + - Fix testsuite failure in locale test. + + -- Matthias Klose Mon, 19 Jan 2009 21:42:02 +0100 + +glibc (2.9-0ubuntu8) jaunty; urgency=low + + * Merge with Debian, glibc-2.9 branch, r3241. + * Apply localedata patches. LP: #318507. + * Remove progressions from expected test results. + + -- Matthias Klose Mon, 19 Jan 2009 18:26:53 +0100 + +glibc (2.9-0ubuntu7) jaunty; urgency=low + + [ Matthias Klose ] + * Merge with Debian, glibc-2.9 branch, r3226. + + [ Kees Cook ] + * Added debian/patches/any/cvs-bz-9720-resource.diff: upstream + fixes for resource.h mis-compile (LP: #302087). + + -- Kees Cook Thu, 08 Jan 2009 13:27:48 -0800 + +glibc (2.9-0ubuntu6) jaunty; urgency=low + + [ Matthias Klose ] + * Merge with Debian, glibc-2.9 branch, r3200. + + [ Kees Cook ] + * Add debian/patches/ubuntu/no-sprintf-pre-truncate.diff: do not + pre-clear target buffers on sprintf to retain backward compatibility + (LP: #305901). + + -- Kees Cook Thu, 01 Jan 2009 13:28:59 -0800 + +glibc (2.9-0ubuntu5) jaunty; urgency=low + + * Mark tst-pselect.out as failing on armel. + + -- Matthias Klose Wed, 03 Dec 2008 23:16:24 +0100 + +glibc (2.9-0ubuntu4) jaunty; urgency=low + + * Mark tst-mqueue5.out as failing on sparcv9b. + * Mark tst-cpuclock2.out as failing on sparc. + + -- Matthias Klose Wed, 03 Dec 2008 01:33:20 +0100 + +glibc (2.9-0ubuntu3) jaunty; urgency=low + + * Update expected testsuite results for powerpc64. Fixes build failure + on powerpc. + * Build with gcc-4.3 on sparc again (still fails on the buildd, builds + on a T1000). + * debian/testsuite-checking/compare.sh: Robustify. + + -- Matthias Klose Sun, 30 Nov 2008 12:45:05 +0100 + +glibc (2.9-0ubuntu2) jaunty; urgency=low + + * Drop the build dependency on gcc-4.2-multilib on sparc for an initial build. + + -- Matthias Klose Sat, 29 Nov 2008 16:01:59 +0100 + +glibc (2.9-0ubuntu1) jaunty; urgency=low + + * New upstream, release, taken from the glibc-2_9-base tag. + - Remove patches applied upstream: any/cvs-bug-iconv6_tst-iconv7.diff, + sparc/cvs-context.diff, any/cvs-getaddrinfo.diff, + any/cvs-iconv-braces.diff, any/cvs-nscd-getservbyport.diff, + any/cvs-nscd-getservbyport.diff, any/cvs-tst-regex.diff, + any/cvs-regex_anchor.diff, hppa/submitted-atomic_h.diff, + hppa/submitted-fesetenv.diff, any/submitted-rpcgen-makefile.diff, + any/regexp_h___REPB_PREFIX.diff. + - Update patches: any/local-bashisms.diff, any/local-ipv6-lookup.diff. + - any/submitted-user_h.diff: Remove, replaced with #error stub. + - Use barriers and SMP-safe operations on ARM NPTL. LP: #303188. + * debian/symbols.wildcards: Update for 2.9. + * Add tst-tls6.out to expected test failures on sparc64. + * Merge with Debian, r3198. + * patches/arm/local-memset.diff: Performance improve on ARM memset. + + -- Matthias Klose Sat, 29 Nov 2008 15:25:22 +0100 + +glibc (2.8+20081027-0ubuntu10) jaunty; urgency=low + + * Mark tst-cancel7.out, tst-cancelx7.out, tst-cleanup0.out and tst-fmon.out + as failing on armel as well. + + -- Matthias Klose Sat, 15 Nov 2008 13:56:40 +0100 + +glibc (2.8+20081027-0ubuntu9) jaunty; urgency=low + + * debian/testsuite-checking/compare.sh: Output the contents of the failure + logs to the build log for non-regressions as well. + Report progressions as well. + * Mark test failures on armel as expected for a first build. + + -- Matthias Klose Sat, 15 Nov 2008 09:34:14 +0100 + +glibc (2.8+20081027-0ubuntu8) jaunty; urgency=low + + * debian/testsuite-checking/compare.sh: if there are regressions in + the test suite, output the contents of the failure logs to the build + log. (wanted for debugging current armel build failure) + + -- Steve Langasek Sat, 15 Nov 2008 00:44:59 +0000 + +glibc (2.8+20081027-0ubuntu7) jaunty; urgency=low + + * debian/sysdeps/ia64.mk, debian/sysdeps/sparc.mk, + debian/sysdeps/powerpc.mk, debian/sysdeps/linux.mk, + debian/script.in/kernelcheck.sh: make 2.6.15 the minimum kernel + version across all archs, because there are no major differences + between 2.6.15 and 2.6.18 for any architectures and this lets us run + jaunty chroots on kernels from Ubuntu 6.06 LTS. + + -- Steve Langasek Fri, 14 Nov 2008 19:22:19 +0000 + +glibc (2.8+20081027-0ubuntu6) jaunty; urgency=low + + * debian/script.in/kernelcheck.sh: Treat `uname -m` == powerpc* or ppc* as + powerpc. (Argh.) + + -- Colin Watson Tue, 04 Nov 2008 01:48:57 +0000 + +glibc (2.8+20081027-0ubuntu5) jaunty; urgency=low + + * debian/script.in/kernelcheck.sh: Treat `uname -m` == sparc64 as sparc. + + -- Colin Watson Mon, 03 Nov 2008 12:39:47 +0000 + +glibc (2.8+20081027-0ubuntu4) jaunty; urgency=low + + * debian/testsuite-checking/expected-results-ia64-linux-gnu-libc, + debian/testsuite-checking/expected-results-powerpc-linux-gnu-libc, + debian/testsuite-checking/expected-results-powerpc64-linux-ppc64, + debian/testsuite-checking/expected-results-sparc-linux-gnu-libc, + debian/testsuite-checking/expected-results-sparc64-linux-sparc64, + debian/testsuite-checking/expected-results-sparcv9b-linux-sparcv9b: Add + tst-pselect, since the Ubuntu buildds for these architectures are still + running 2.6.15 and pselect is racy there. + + -- Colin Watson Mon, 03 Nov 2008 11:50:33 +0000 + +glibc (2.8+20081027-0ubuntu3) jaunty; urgency=low + + * debian/sysdeps/ia64.mk, debian/sysdeps/sparc.mk, + script.in/kernelcheck.sh: Set the minimal kernel version to 2.6.15 for + ia64 and sparc, whose Ubuntu buildds are also still running 2.6.15. + * debian/patches/ubuntu/stack-guard-quick-randomization.diff: Add test + changes from Fedora patch by Jakub Jelinek: + - elf/tst-stackguard1.c (do_test): Don't fail if the poor man's + randomization doesn't work well enough. + * debian/testsuite-checking/expected-results-powerpc-linux-gnu-libc: + Expect failure from test-fenv, since it's been failing at least back to + Ubuntu 8.04 and this is probably due to use of an old kernel on the + Ubuntu powerpc buildds (LP: #292360). + + -- Colin Watson Sun, 02 Nov 2008 11:28:16 +0000 + +glibc (2.8+20081027-0ubuntu2) jaunty; urgency=low + + * Reapply changes from 2.8~20080505-0ubuntu7. + * debian/sysdeps/powerpc.mk, script.in/kernelcheck.sh: Set the + minimal kernel version to 2.6.15 for powerpc. + + -- Matthias Klose Sat, 01 Nov 2008 07:41:22 +0100 + +glibc (2.8+20081027-0ubuntu1) jaunty; urgency=low + + * Merge with Debian; remaining changes: + - Packaging: + + External tzdata + + Use external locale information + + Addition of Niagara and Niagara2 optimised libraries + + GFDL Documentation added back in, build glibc-doc from this source. + + Transition from /usr/include/ppc64-linux-gnu to powerpc64-linux-gnu + + Use dpkg triggers for ldconfig + + Do not die if extra libc libraries or symlinks found + + Do not do a test run of nscd when starting + + Only apply patches we actually use in Ubuntu + + Use /lib and /usr/lib for amd64 + + amd64 biarch is i686, not i486. + + Non-optimised i386 glibc is Xen-friendly. + + Support sparcv9v, v9v2, 64b, 64v, 64v2 + + Add support for lpia. + + Use .conf for files in /etc/ld.so.conf.d. + - Patches: + + Applied any/local-ipv6-lookup. + + Not applied any/local-sysctl. + * testsuite-checking: Use Debian's testsuite checking, sort expected and + current test results before comparing. + + -- Matthias Klose Fri, 31 Oct 2008 19:05:39 +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.8~20080505-0ubuntu7) intrepid; urgency=low + + * Add debian/patches/ubuntu/stack-guard-quick-randomization.diff: do + light-weight randomization of the stack guard value instead of using + a static sentinel (LP: #275493). + + -- Kees Cook Sun, 28 Sep 2008 09:30:01 -0700 + +glibc (2.8~20080505-0ubuntu6) intrepid; urgency=low + + [ Matthias Klose ] + * Add debian/patches/any/regexp_h___REPB_PREFIX.diff patch (LP: #234056): + fix xview FTBFS error (Devid Filoni). LP: #234056. + + [ Michael Vogt ] + * sysdeps/depflags.pl: + - really add "findutils (>= 4.4.0-2ubuntu2)" to the libc6 depends, + this needs to be done in sysdeps/depflags.pl the regular + depend lines in debian/control.in/libc are just ignored + (LP: #234345) + + -- Michael Vogt Fri, 20 Jun 2008 17:28:24 +0200 + +glibc (2.8~20080505-0ubuntu5) intrepid; urgency=low + + * Do not run the testsuite on hppa ("threading on hppa is kinda goofy, + so the thread-stressing testsuite breaks"). + + -- Matthias Klose Tue, 10 Jun 2008 14:37:08 +0200 + +glibc (2.8~20080505-0ubuntu4) intrepid; urgency=low + + [ Michael Vogt ] + * debian/control: + - add a depends on findutils (>= 4.4.0-2ubuntu2) to libc6 to ensure + that xargs is unpacked before the new libc6 is unpacked. The xargs + from hardy crashes with the libc6 from intrepid (LP: #234345) + + [ Matthias Klose ] + * Merge Debian 2.7-12: + + [ 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. + + -- Matthias Klose Tue, 03 Jun 2008 16:07:12 +0200 + +glibc (2.8~20080505-0ubuntu3) intrepid; urgency=low + + * Merge from Debian: + - 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. + + -- Matthias Klose Sun, 11 May 2008 13:09:59 +0200 + +glibc (2.8~20080505-0ubuntu2) intrepid; urgency=low + + * Don't build-depend on g++-multilib on lpia. + + -- Matthias Klose Fri, 09 May 2008 20:20:05 +0200 + +glibc (2.8~20080505-0ubuntu1) intrepid; urgency=low + + * New upstream version, built from a prerelease tarball. + - Remove patches applied upstream: amd64/cvs-vdso_clock_gettime.diff, + hppa/cvs-atomic.diff, hppa/hppalll.diff, sparc/submitted-v9v2.diff, + all/cvs-gai_conf.diff, any/cvs-epoll_h.diff, any/cvs-ether_line.diff, + any/cvs-ethertype.diff, any/cvs-fchmodat.diff, any/cvs-gcc-4.3.diff, + any/cvs-iconv-iso2022jp-loop-bug.diff, any/cvs-rfc3484.diff, + any/cvs-sched_h.diff, any/cvs-strtod.diff, any/cvs-tzfile.diff, + any/cvs-vfscanf.diff, any/cvs-wchar_h.diff, + any/cvs-sunrpc_rpc_thread.diff, any/cvs-strerror_r.diff, + any/cvs-short-for-fnstsw.diff, any/local-strfry.diff, + any/submitted-ieee754_h.diff, any/submitted-link-local_resolver.diff. + - Update patches: i386/submitted-i686-timing.diff. + * debian/*.symbols*: + - Add new symbols. + - Remove GLIBC_PRIVATE symbols not found anymore in 2.8: + _dl_tls_get_addr_soft@GLIBC_PRIVATE, __nss_services_lookup@GLIBC_PRIVATE. + * debhelper.in/libc.install: Relax file location for snapshot builds. + + -- Matthias Klose Fri, 09 May 2008 14:22:01 +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-11ubuntu1) intrepid; urgency=low + + * Merge with Debian (r2892:2919). + - Packaging: + + External tzdata + + Use external locale information + + Addition of Niagara and Niagara2 optimised libraries + + GFDL Documentation added back in, build glibc-doc from this source. + + Transition from /usr/include/ppc64-linux-gnu to powerpc64-linux-gnu + + Use dpkg triggers for ldconfig + + Do not die if extra libc libraries or symlinks found + + Do not do a test run of nscd when starting + + Only apply patches we actually use in Ubuntu + + Use /lib and /usr/lib for amd64 + + amd64 biarch is i686, not i486. + + Non-optimised i386 glibc is Xen-friendly. + + Support sparcv9v, v9v2, 64b, 64v, 64v2 + + Add support for lpia. + + Call `sync' before building the tarball of supported locales. + + Downgrade priority of debconf questions for RELEASE_UPGRADE_MODE=desktop. + + Use the package settings for *FLAGS, not the settings from the env. + + Fail the build when regressions are detected in the testsuite. + + Build with GCC-4.3 on amd64 and i386. + - Patches: + + sparc/submitted-v9v2 + + hppa/hppalll + + Applied any/local-ipv6-lookup. + + Not applied any/local-sysctl. + * any/cvs-short-for-fnstsw.diff: Backport from the trunk, fix build failure + with binutils from trunk. + + -- Matthias Klose Thu, 08 May 2008 12:06:01 +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-10ubuntu3) hardy; urgency=low + + * Probably built on the good buildds last time; pessimize expected + test results on ia64, i386. + * debian/expected_test_summary: Fix typos in expected sparc results. + + -- Matthias Klose Sat, 05 Apr 2008 00:03:19 +0200 + +glibc (2.7-10ubuntu2) hardy; urgency=low + + * Adjust debian/expected_test_summary: + - Fix typo for i386 xen. + - crypt/sha512c fails on i386 (log-test-i486-linux-gnu-libc), but not on + the PPA build. + - Add current results for ia64, powerpc, sparc. + + -- Matthias Klose Fri, 04 Apr 2008 09:09:37 +0200 + +glibc (2.7-10ubuntu1) hardy; urgency=low + + * Merge remaining changes from 2.7-10 (r2869:2892). + * If RELEASE_UPGRADE_MODE is set to `desktop', make the glibc/restart-services, + glibc/restart-failed and glibc/upgrade questions of medium priority (and + restarting the services automatically). LP: #174002. + Works as well around the upgrade errors mentioned in LP #205079 in a KDE + environment, when the upgrade is done using the update-manager. + * debian/rules: Always use the package settings for *FLAGS, not the settings + from the environment. + * Fail the build if regressions are found running the testsuite compared to + expected results from debian/expected_test_summary. Take initial values + from a PPA build predating this upload. + * Merge from Debian trunk: + - local/manpages/ld.so.8: fix libraries search order. Closes: #473458. + - Update Finish debconf translation, by Esko Arajärvi. Closes: #473802. + - Add any/cvs-strerror_r.diff to make strerror_r actually thread safe. + Closes: #456531. + * debian/rules.d/build.mk: Call `sync' before building the tarball of + supported locales. Our buildds trigger http://lkml.org/lkml/2007/8/1/337 + on every build. + + -- Matthias Klose Thu, 03 Apr 2008 21:50:42 +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-9ubuntu2) hardy; urgency=low + + * Clear out LDFLAGS when building; glibc isn't happy building with + -Wl,-Bsymbolic-functions. LP: #201673 + + -- Steve Langasek Thu, 13 Mar 2008 08:34:28 +0000 + +glibc (2.7-9ubuntu1) hardy; urgency=low + + * Merge with Debian (r2869); remaining changes: + - Packaging: + + External tzdata + + Use external locale information + + Addition of Niagara and Niagara2 optimised libraries + + GFDL Documentation added back in, build glibc-doc from this source. + + Transition from /usr/include/ppc64-linux-gnu to powerpc64-linux-gnu + + Use dpkg triggers for ldconfig + + Do not die if extra libc libraries or symlinks found + + Do not do a test run of nscd when starting + + Only apply patches we actually use in Ubuntu + + Use /lib and /usr/lib for amd64 + + amd64 biarch is i686, not i486. + + Non-optimised i386 glibc is Xen-friendly. + + Support sparcv9v, v9v2, 64b, 64v, 64v2 + + Add support for lpia. + - Patches: + + sparc/submitted-v9v2 + + hppa/hppalll + + Applied any/local-ipv6-lookup. + + Not applied any/local-sysctl. + * debian/sysdeps/*.mk: Still build main flavours with -O3 (using gcc-4.2). + * Use .conf for files in /etc/ld.so.conf.d. LP: #70315 + + * patches/any/local-ipv6-lookup.diff: Update (Tollef van Heen). + + [changes from Debian svn after -9] + * Update Chinese debconf translation, by LI Daobing. + * Update Dutch debconf translation, by Bart Cornelis. Closes: #468300. + * Update Polish debcon 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 Lica Monducci. Closes: #469985. + * control.in/main, sysdeps/*.mk, rules: build with gcc-4.3 by default, + except on alpha, arm, armel, hppa, s390 and hurd-i386. + * rules, rules.d/build.mk: fix parallel build. + * control.in/main: build-depends on gcc-4.3 (>= 4.3.0-2) to make sure a cld + instruction is emitted in the prologue of functions using stringops. + Closes: #469568. + * debian/rules.d/build.mk: disable testsuite on ARM machines running a + 2.6.21 to 2.6.24 kernel. + + -- Matthias Klose Wed, 12 Mar 2008 22:08: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-5ubuntu2) hardy; urgency=low + + * Really stop setting MAKEINFO to :, so that the info documentation is + built. + + -- Colin Watson Tue, 01 Jan 2008 12:10:28 +0000 + +glibc (2.7-5ubuntu1) hardy; urgency=low + + * Resynchronise with Debian. Remaining changes: + - Packaging: + + External tzdata + + Use external locale information + + Addition of Niagara and Niagara2 optimised libraries + + GFDL Documentation added back in. + + Transition from /usr/include/ppc64-linux-gnu to powerpc64-linux-gnu + + Use dpkg triggers for ldconfig + + Do not die if extra libc libraries or symlinks found + + Do not do a test run of nscd when starting + + Only apply patches we actually use in Ubuntu + + Use /lib and /usr/lib for amd64 + + amd64 biarch is i686, not i486. + + Non-optimised i386 glibc is Xen-friendly. + + Support sparcv9v, v9v2, 64b, 64v, 64v2 + + Add support for lpia. + - Patches: + + any/local-ipv6-sanity + + i386/local-clone + + amd64/local-clone + + sparc/submitted-v9v2 + + hppa/hppalll + * Debian any/cvs-vfscanf patch fixes LP: #178045. Actually add it to + debian/patches/series (forgotten in Debian). + * Stop setting MAKEINFO to :, which prevented the info documentation being + built. See also 2.5-0ubuntu3. + * any/submitted-rfc3484-sortv4: Return to disabling RFC3484 s6 rule 9 by + default. As requested by Ubuntu sysadmins, we want this regardless of + the Debian technical committee's decision. + + -- Colin Watson Mon, 24 Dec 2007 09:55:32 +0000 + +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-4ubuntu1) hardy; urgency=low + + * Merge with Debian; remaining changes (see 2.7-1ubuntu1) + + -- Matthias Klose Mon, 10 Dec 2007 10:34:38 +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-3ubuntu1) hardy; urgency=low + + [ Matthias Klose ] + * Merge with Debian; remaining changes (see 2.7-1ubuntu1) + * debian/rules.d/control.mk: Re-add support for lpia. + * debian/sysdeps/amd64.mk: Restore i386_includedir. + + [ Jeff Bailey ] + * debian/patches/hppa/hppalll.diff: Fix build failure on hppa. + + -- Matthias Klose Fri, 07 Dec 2007 23:21:12 +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-1ubuntu1) UNRELEASED; urgency=low + + * Merge changes from Debian. + Remaining changes: + * Packaging: + * External tzdata + * Use external locale information + * Addition of Niagara and Niagara2 optimised libraries + * GFDL Documentation added back in. + * Transition from /usr/include/ppc64-linux-gnu to powerpc64-linux-gnu + * Use dpkg triggers for ldconfig + * Do not die if extra libc libraries or symlinks found + * Do not do a test run of nscd when starting + * Only apply patches we actually use in Ubuntu + * Use /lib and /usr/lib for amd64 + * amd64 biarch is i686, not i486. + * Non-optimised i386 glibc is Xen-friendly. + * Support sparcv9v, v9v2, 64b, 64v, 64v2 + * Patches: + * any/local-ipv6-sanity + * i386/local-clone + * amd64/local-clone + * sparc/submitted-v9v2 + + -- Jeff Bailey Sun, 25 Nov 2007 17:44:13 -0800 + +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-6ubuntu2) hardy; urgency=low + + * Reapply any/local-ipv6-sanity.diff, lost when merging 2.6. LP: #156720. + + -- Matthias Klose Wed, 24 Oct 2007 18:15:43 +0200 + +glibc (2.6.1-6ubuntu1) hardy; urgency=low + + [Fabio M. Di Nitto] + * debian/patches/sparc/submitted-v9v2.diff: Add Niagara 2 optimized + memcpy support. + Code, patch and test done by David S. Miller. + * debian/patches/series: update. + * debian/sysdeps/sparc.mk: Add v9v2 32 and 64 bit targets. + * debian/control.in/opt: Add sparc64v2 and sparcv9v2 packages. + * debian/control: update. + * debian/script.in/nohwcap.sh: + memcpy support. + Code, patch and test done by David S. Miller. + * debian/patches/series: update. + * debian/sysdeps/sparc.mk: Add v9v2 32 and 64 bit targets. + * debian/control.in/opt: Add sparc64v2 and sparcv9v2 packages. + * debian/control: update. + * debian/script.in/nohwcap.sh: + - fix list of sparc optimized libc6. + - add v9v2 optimized packages. + + [Matthias Klose] + * Merge with Debian; remaining changes: + - Upstream tarball including GFDL'd documentation. + - Don't apply patches for architectures not found in Ubuntu. + - Build optimized sparc packages. + - Support lpia. + - No support for linuxthreads. + + -- Matthias Klose Fri, 19 Oct 2007 15:25:11 +0200 + +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-1ubuntu9) gutsy; urgency=low + + * Rebuild using g++-4.2 (>= 4.2.1-5ubuntu4). + + -- Matthias Klose Mon, 01 Oct 2007 00:04:19 +0200 + +glibc (2.6.1-1ubuntu8) gutsy; urgency=low + + * hppa/local-private-futex-lamont.diff: fix hppa FTBFS. + + -- LaMont Jones Thu, 27 Sep 2007 18:51:24 +0000 + +glibc (2.6.1-1ubuntu7) gutsy; urgency=low + + * any/submitted-rfc3484-sortv4.diff: new patch to allow bypassing RFC3484 + rule 9 for IPv4 adresses. Closes: bug#438179. + [ by Aurelien Jarno; imported from glibc 2.6.1-2 into Ubuntu by iwj ] + * any/submitted-rfc3484-sortv4.diff: disable RFC3484 s6 rule 9 by + default as requested by Ubuntu sysadmins and in anticipation of + that change in Debian (which looks likely). + + -- Ian Jackson Thu, 20 Sep 2007 14:49:50 +0100 + +glibc (2.6.1-1ubuntu6) gutsy; urgency=low + + * Do not print "ldconfig: wrapper deferring update (trigger activated)" + message (unless LDCONFIG_TRIGGER_DEBUG is set). + + -- Ian Jackson Thu, 20 Sep 2007 14:20:30 +0100 + +glibc (2.6.1-1ubuntu5) gutsy; urgency=low + + * Do not install the ppu symlinks in the powerpc packages. + + -- Matthias Klose Wed, 19 Sep 2007 00:27:46 +0200 + +glibc (2.6.1-1ubuntu4) gutsy; urgency=low + + * sysdeps/amd64.mk: uses x86_64 headers also for the i486 flavour now + that they are compatible. don't provide include symlink for bi-arch, + but only an empty directory. + + -- Matthias Klose Sun, 09 Sep 2007 21:09:21 +0200 + +glibc (2.6.1-1ubuntu3) gutsy; urgency=low + + * Actually exec ldconfig.real. (LP #137129.) + + -- Ian Jackson Mon, 03 Sep 2007 20:47:11 +0100 + +glibc (2.6.1-1ubuntu2) gutsy; urgency=low + + * Use dpkg-trigger to avoid multiple calls to ldconfig. + + -- Ian Jackson Mon, 03 Sep 2007 14:48:39 +0100 + +glibc (2.6.1-1ubuntu1) gutsy; urgency=low + + * Merge with Debian (outstanding changes for the final 2.6.1-1 package). + Remaining changes: + - Upstream tarball including GFDL'd documentation. + - Don't apply patches for architectures not found in Ubuntu. + - Build optimized sparc packages. + - Support lpia. + - No support for linuxthreads. + + * debian/patches/sparc/sparc-sparcv9.diff: sparc-sparcv9 directory fix + (David Miller). + + -- Matthias Klose Tue, 28 Aug 2007 13:04:00 +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.1-0ubuntu1) gutsy; urgency=low + + * New upstream version 2.6.1, including glibc-ports-2.6.1. + - Remove applied patches: patches/any/cvs-ports-glibc-2_6-branch.diff, + patches/arm/cvs-gscope_flag.diff, patches/mips/cvs-gscope_flag.diff, + patches/hppa/submitted-gscope_flag.diff. + * debian/wrapper/objcopy: Revert the workaround. + + -- Matthias Klose Mon, 06 Aug 2007 22:38:54 +0200 + +glibc (2.6.1~pre-0ubuntu1) gutsy; urgency=low + + * New upstream version 2.6.1, glibc-ports is still version 2.6. + * Remove patches applied upstream. + * Merge from the Debian repository. + * debian/wrapper/objcopy: Remove -R .debug_aranges, fixing broken + debug symbols. + + -- Matthias Klose Fri, 03 Aug 2007 12:22:19 +0200 + +glibc (2.6-5ubuntu1) gutsy; urgency=low + + * Merge with Debian. + - cvs-printf_fp.c.diff: new patch to print the wrong number of + digits with %#g. LP: #128355. + + -- Matthias Klose Sun, 29 Jul 2007 20:39:57 +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-4ubuntu3) gutsy; urgency=low + + * patches/lpia/local-i686-redefine.diff: Redefine __i686, which gets + clobbered to "1" by the compiler, causing the assembler to have a fit + + -- Adam Conrad Sat, 28 Jul 2007 05:30:06 +1000 + +glibc (2.6-4ubuntu2) gutsy; urgency=low + + * Fix gij memory hog on amd64, thanks to Aurelien Jarno. + * sparc/submitted-gscope_flag.diff: update from upstream. + + -- Matthias Klose Thu, 26 Jul 2007 23:28:49 +0200 + +glibc (2.6-4ubuntu1) gutsy; urgency=low + + * Merge with Debian; remaining changes: + - Upstream tarball including GFDL'd documentation. + - Don't apply patches for architectures not found in Ubuntu. + - Build optimized sparc packages. + - Support lpia. + - Minor differences to be cleaned up. + * glibc-doc: Install the documentation in info format. Closes: LP: #60607. + + * Merge changes from Debian: + * 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/control: Remove build-depend on gcc-4.1 on powerpc. + + -- Matthias Klose Thu, 26 Jul 2007 16:22:15 +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-3ubuntu3) gutsy; urgency=low + + * patches/sparc/submitted-gscope_flag.diff: New patch to fix build + on sparc (Aurelien Jarno). + + -- Matthias Klose Thu, 26 Jul 2007 00:56:49 +0200 + +glibc (2.6-3ubuntu2) gutsy; urgency=low + + * Build the 64bit powerpc library with gcc-4.1. + * Update to the glibc-2_6-branch 20070725. + - patches/any/cvs-libc-glibc-2_6-branch.diff: New. + - patches/any/cvs-ports-glibc-2_6-branch.diff: New. + - patches/any/cvs-ld-integer-overflow.diff: Remove. + - patches/any/cvs-malloc.diff: Remove. + - patches/any/cvs-nis-nss-default.diff: Remove. + - patches/any/cvs-nscd-short-replies.diff: Remove. + - patches/any/cvs-vfscanf.diff: Remove. + * Build-depend on g++-4.1-multilib/g++-4.2-multilib. + * debian/sysdeps/hppa.mk: Don't explicitely use gcc-4.2. + + -- Matthias Klose Wed, 25 Jul 2007 15:34:26 +0200 + +glibc (2.6-3ubuntu1) gutsy; urgency=low + + * Merge with Debian. + * debian/sysdeps/lpia.mk: Build using -march=i686 -mtune=i586 -g -O3. + + -- Matthias Klose Mon, 23 Jul 2007 15:02:03 +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-2ubuntu2) gutsy; urgency=low + + * debian/rules.d/control.mk: Add lpia to threads_archs and to libc6 list + * debian/sysdeps/lpia.mk: Add gcc-4.2 usage, but comment it out for now, + while we bootstrap with gcc-4.1 (because we're FTBFS with gcc-4.2) + + -- Adam Conrad Thu, 12 Jul 2007 13:36:23 +0100 + +glibc (2.6-2ubuntu1) gutsy; urgency=low + + * Merge Debian changes 2.6-1 -> 2.6-2. + + -- Matthias Klose Tue, 10 Jul 2007 14:18:22 +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-1ubuntu1) gutsy; urgency=low + + [Jeff Bailey] + * debian/sysdeps/hppa.mk: Use gcc-4.2 + * debian/control.in/main: Build-dep on gcc-4.2 [hppa] + * debian/control: Regenerate + + [Matthias Klose] + * Merge Debian changes 2.6-0exp3 -> 2.6-1. + * debian/sysdeps/lpia: New. + + -- Matthias Klose Mon, 9 Jul 2007 12:20:28 +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.6-0ubuntu1) gutsy; urgency=low + + * New upstream release. + * Merge with Debian; remaining changes: + - Include unmodified glibc-2.6 upstream tarball. + - Don't build locale* packages. + - TODO: list remaining changes. + + -- Matthias Klose Mon, 2 Jul 2007 13:29:33 +0200 + +glibc (2.5-11ubuntu1) gutsy; urgency=low + + * Merge Debian changes (2.5-10 - 2.5-11). + * Add ppu symlinks on powerpc. + + -- Matthias Klose Wed, 13 Jun 2007 17:20:14 +0200 + +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-10ubuntu2) gutsy; urgency=low + + * libc6-dev-ppc64: Install gnu-stubs-64.h in /usr/include/gnu. + + -- Matthias Klose Fri, 08 Jun 2007 12:01:55 +0000 + +glibc (2.5-10ubuntu1) gutsy; urgency=low + + * Merge Debian changes (2.5-9 - 2.5-10). + + -- Matthias Klose Mon, 4 Jun 2007 23:31:10 +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-8ubuntu1) gutsy; urgency=low + + * Merge Debian changes (2.5-7 - 2.5-8). + * Fix installation location of sparc64 headers. + + -- Matthias Klose Sun, 20 May 2007 15:01:08 +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-7ubuntu1) gutsy; urgency=low + + * Merge Debian changes (2.5-5 - 2.5-7). + + -- Matthias Klose Tue, 15 May 2007 17:31:45 +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-5ubuntu1) gutsy; urgency=low + + * Merge Debian changes (2.5-2 - 2.5-5). + + -- Matthias Klose Wed, 02 May 2007 09:04:02 +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-2ubuntu1) gutsy; urgency=low + + * Merge Debian changes (2.5-0exp6 - 2.5-2). + + -- Matthias Klose Wed, 18 Apr 2007 22:14:32 +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.5-0ubuntu21.2) toolchain-test; urgency=low + + * libc6-dev-sparc64: Copy headers into /usr/include/sparc64-linux-gnu. + A symlink to /usr/include works for libc6-dev-sparc64, but not for + other packages which install into /usr/include/sparc64-linux-gnu. + + -- Matthias Klose Fri, 6 Apr 2007 13:45:41 +0200 + +glibc (2.5-0ubuntu21.1) toolchain-test; urgency=low + + * Update to current glibc-2_5-branch. + - debian/patches/sparc/local-pthread-shlib.diff: Update. + - debian/patches/any/branch-pr3429.diff: Remove. + * Merge Debian changes (2.5-0exp3 - 2.5-0exp6). + + -- Matthias Klose Wed, 21 Mar 2007 17:22:13 +0100 + +glibc (2.5-0ubuntu14) feisty; urgency=low + + * Twiddle the diff a little so it actually applies. + + -- Tollef Fog Heen Tue, 3 Apr 2007 21:34:51 +0200 + +glibc (2.5-0ubuntu13) feisty; urgency=low + + * debian/patches/any/local-ipv6-sanity.diff: Only do AAAA lookups if we + have an interface with better than link-local addresses available. + + -- Tollef Fog Heen Tue, 3 Apr 2007 14:11:26 +0200 + +glibc (2.5-0ubuntu12) feisty; urgency=low + + * debian/patches/any/branch-pr3429.diff: Fix a race condition in + _dl_open with r_debug.r_state consistency check. Ubuntu #72639. + * debian/debhelper.in/nscd.init: Invalidate the hosts database as + well. Ubuntu #72647. + * debian/local/manpages/nscd.conf.5: Fix formatting. Ubuntu #55331. + * Fix typo in libc6-i686 package description. Ubuntu #81153. + * debian/patches/any/local-iconv-fix-trampoline.diff: Import from + Debian; new patch (fix iconvconfig segfault when run under exec-shield, + PaX or similar) from hlfs. Ubuntu #63353. + * Set Ubuntu maintainer address. + + -- Matthias Klose Wed, 21 Mar 2007 08:16:00 +0100 + +glibc (2.5-0ubuntu11) feisty; urgency=low + + * debian/patches/hppa/cvs-missing-cfi_procend.diff: New file to work around + FTBFS uncovered by January CVS binutils. + * debian/patches/series: Use it. + + -- Jeff Bailey Sun, 11 Feb 2007 08:51:24 -0700 + +glibc (2.5-0ubuntu10) feisty; urgency=low + + [ Colin Watson ] + * debian/debhelper.in/libc.postinst: Correct grammar of NSS reboot warning + (LP: #70567). + + [ Jeff Bailey ] + * debian/patches/hppa/submitted-nptl-carlos2.diff: New patch to add + STACK_GROWS_UP case to NPTL. + * debian/patches/series: Use it. + + -- Jeff Bailey Sat, 10 Feb 2007 12:03:41 -0500 + +glibc (2.5-0ubuntu9) feisty; urgency=low + + * debian/debhelper.in/libc.preinst: turn libc6 duplication + check from an error to a warning and point to the bug when + printing the warning. + (Closes Ubuntu: #81125) + + -- Fabio M. Di Nitto Sat, 06 Jan 2007 07:06:22 +0100 + +glibc (2.5-0ubuntu8) feisty; urgency=low + + * no change upload to rebuild with proper binutils/gcc-4.1 + + -- Fabio M. Di Nitto Sat, 06 Jan 2007 06:46:26 +0100 + +glibc (2.5-0ubuntu7) feisty; urgency=low + + [ Colin Watson ] + + * debian/debhelper.in/glibc-doc.links: Restore + /usr/share/doc/glibc-doc/html/index.html symlink. + + [ Fabio M. Di Nitto ] + + * debian/patches/sparc/local-pthread-shlib.diff: New file. + * debian/patches/series: Update. + + -- Fabio M. Di Nitto Thu, 04 Jan 2007 17:36:19 +0100 + +glibc (2.5-0ubuntu6) feisty; urgency=low + + * Rebuild using gcc 4.1.1-21ubuntu3. + + -- Fabio M. Di Nitto Thu, 21 Dec 2006 08:52:45 -0800 + +glibc (2.5-0ubuntu5) feisty; urgency=low + + * Rebuild using gcc 4.1.1-21ubuntu2. + + -- Matthias Klose Thu, 14 Dec 2006 14:12:56 +0000 + +glibc (2.5-0ubuntu4) feisty; urgency=low + + [ Fabio M. Di Nitto ] + * Fix path to patch in ubuntu2 changelog. + * debian/sysdeps/sparc.mk: re-enable testsuite on Niagara. + It was a kernel bug and fix is on the way upstream. + * debian/debhelper.in/libc.postinst: set back NSS version check. + It was bumped by mistake. + (Closes Ubuntu: #21117) + + -- Fabio M. Di Nitto Wed, 29 Nov 2006 06:26:46 +0100 + +glibc (2.5-0ubuntu3) feisty; urgency=low + + * debian/rules.d/build.mk: Do not define MAKEINFO to :, this prevented + generation of the info documentation, which we are happy to distribute. + * debian/control.in: + * main: + * glibc-doc Provides/Replaces/Conflicts glibc-doc-reference instead of + Suggests. Fix description. + * debian/control: Regenerate. + + -- Scott James Remnant Fri, 24 Nov 2006 14:05:17 +0000 + +glibc (2.5-0ubuntu2) feisty; urgency=low + + [ Jeff Bailey ] + * debian/patches/hppa/submitted-ustat.diff: New file. + * debian/patches/series: Update. + + -- Jeff Bailey Wed, 1 Nov 2006 14:53:41 -0500 + +glibc (2.5-0ubuntu1) feisty; urgency=low + + [ Jeff Bailey ] + * debian/rules: Define BUILD_CXX + * debian/sysdeps/sparc.mk: Define sparc64v_CXX, sparc64b_CXX, sparc64_CXX + * debian/sysdeps/powerpc.mk: Define ppc64_CXX. + * debian/sysdeps/i386.mk: Define amd64_CXX. + * debian/sysdeps/amd64.mk: Define i386_CXX. + * debian/control.in/main: Set minimum b-d version of linux-libc-dev to + 2.6.19-1.1 + Add build-dep on lib64c++6 for powerpc and sparc. + * debian/control: Regenerate. + * debian/patches/any/local-2.6.19-linux-libc-dev.diff: Patch to cope + with kernel headers from 2.6.19. + * debian/patches/series: Update. + Prune localedata, alpha, arm, hppa linuxthreads and kernel version + hurd, m68k, and mips patches. + + [ Fabio M. Di Nitto] + * use original glibc-2.5.tar.bz2 tarball from ftp.gnu.org: + * debian/patches/series: drop all/local-remove-manual.diff. + * debian/control.in: + * readd libc-dbg. + * main: + * readd Build-Depends: texinfo (>= 4.0), texi2html. + * change Build-Depends: linux-kernel-headers to linux-libc-dev. + * drop Build-Depends: lib32ssp0 and lib64ssp0. + * drop Conflicts: belocs-locales-bin, belocs-locales-data. + * opt: + * drop libc6-sparcv9. + * readd libc6-sparcv9v. + * readd libc6-sparc64b. + * readd libc6-sparc64v. + * merge descriptions from glibc 2.4 (WARNINGs and NPTL). + * Regenerate debian/control. + * debian/debhelper.in: + * readd glibc-doc.doc-base, glibc-doc.info and glibc-doc.install. + * readd libc-alt-dev.postinst. + * libc.install: drop usr/bin/locale nad usr/bin/localedef. + * libc.manpages: drop locale.1 and localedef.1. + * libc.postinst: + * fix $preversion quoting. + * bump version checking for $preversion to 2.5-0ubuntu1 for some cases. + * fix hwcappkgs lists for sparc. + * remove kernel version detection at startup. + * drop locales-all.* + * Merge debian/FAQ. + * debian/rules: + * drop locales-all and locales packages. + * readd CXX for cross-compiling. + * force -fno-stack-protector to disable automatic enablement from Ubuntu's + glibc. Glibc itself will enable it as necessary. + * debian/rules.d: + * build.mk: + * readd CXX for cross-compiling. + * drop localedir (requires check). + * readd manual generation (requires check). + * keep using /etc/ld.so.conf.d/$triplet. New debian packages use + triplet.conf, and that would require a conffile migration script. + * readd nptl bits. + * debhelper.mk: + * readd nptl bits. + * install $(libc)-dev-$$x.postinst from libc-alt-dev.postinst. + * debian/script.in/kernelcheck.sh: fix kernel version check on != m68k. + (this should be pushed to debian too) + * debian/shlibver: bump to 2.5-0ubuntu1. + * debian/sysdeps: + * amd64.mk: + * default to nptl for amd64. + * set i386 configure target to i686-linux. + * set i386 CC to use $(BUILD_CC). + * readd --disable-profile to i386_extra_config_options. + * readd i386_MAKEFLAGS to set gconvdir. + * set i386_extra_cflags back to -march=i686 -mtune=i686. + * drop i386_rtlddir (requires check). + * set i386_slibdir and _libdir to use */lib32. + * change symlinking for */lib32. + * depflags.pl: + * change linux-kernel-headers into linux-libc-dev. + * readd Recommends: tzdata. + * readd Depends: locales (>= 2.3.11). (requires review) + * readd hack to cope with */lib64. + * hppa.mk: enable nptl. + * i386.mk: + * readd no-tls-direct-seg-refs to generic libc cflags. + * make symlink absolute again. (requires review - might be droppable) + * restore nptl_* options. + * change i686_slibdir to /lib/tls/i686/cmov. + * change xen_slibdir to /lib/tls/i686/nosegneg. + * keep using /etc/ld.so.conf.d/xen.conf. New debian packages use + libc6-xen.conf, and that would require a conffile migration script. + * drop ldconfig from libc6-xen. + * linux.mk: + * readd comments about nptl. + * readd nptl config. + * powerpc.mk: revert change to fix bug #391858 that is a gcc bug + (already addressed in Ubuntu) and not a glibc one. + * sparc.mk: + * readd sparc64b pass. + * readd sparc64v pass. + * disable sparcv9 pass. + * readd sparcv9v pass. + * fix sparc64 headers install. + * dynamically disable testsuite when building on Niagara. + * debian/patches: + * port forward ubuntu dir from 2.4: + * drop local-dynamic-resolvconf.diff. now part of debian. + * readd local-altlocaledir.diff. + * series: update. + + -- Fabio M. Di Nitto Wed, 01 Nov 2006 12:49:55 +0100 + +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 --git a/debian/changelog.upstream b/debian/changelog.upstream new file mode 100644 index 00000000..8209ba3a --- /dev/null +++ b/debian/changelog.upstream @@ -0,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 --git a/debian/compat b/debian/compat new file mode 100644 index 00000000..f599e28b --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +10 diff --git a/debian/control b/debian/control new file mode 100644 index 00000000..9211a115 --- /dev/null +++ b/debian/control @@ -0,0 +1,920 @@ +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], systemtap-sdt-dev [linux-any], + libaudit-dev [linux-any], libcap-dev [linux-any], libselinux-dev [linux-any], + mig (>= 1.5-0) [hurd-i386], gnumach-dev (>= 2:1.8+git20181103-0) [hurd-i386], + hurd-dev (>= 1:0.9.git20191029) [hurd-i386] | hurd-headers-dev [hurd-i386], + hurd-dev (>= 1:0.9.git20191029) [hurd-i386] | libihash-dev [hurd-i386] , + kfreebsd-kernel-headers [kfreebsd-any], + binutils (>= 2.29), + g++-9, g++-9-multilib [amd64 armhf armel i386 kfreebsd-amd64 mips mipsel mipsn32 mipsn32el mips64 mips64el mipsr6 mipsr6el mipsn32r6 mipsn32r6el mips64r6 mips64r6el powerpc ppc64 s390x sparc sparc64 x32] , + python3:native, + libidn2-0 (>= 2.0.5~) , + libc-bin (>= 2.31) +Build-Depends-Indep: perl, po-debconf (>= 1.0) +Maintainer: Ubuntu Developers +XSBC-Original-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} +Suggests: 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 +Build-Profiles: +Description: GNU C Library: Development binaries + This package contains utility programs related to the GNU C Library + development package. + +Package: libc-l10n +Architecture: all +Section: localization +Priority: standard +Multi-Arch: foreign +Depends: ${misc:Depends} +Breaks: locales (<< 2.21-0) +Replaces: locales (<< 2.21-0) +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}, glibc-doc-reference (>= 2.18) +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 (<< 29~), cross-toolchain-base-ports (<< 25~) +Conflicts: eglibc-source +Replaces: eglibc-source +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), ${misc:Depends}, debconf | debconf-2.0 +Breaks: libc-bin (<< 2.23) +Replaces: libc-bin (<< 2.23), manpages-fr-extra (<< 20141022) +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: ${misc:Depends} +Breaks: locales (<< 2.13-0) +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-0), ${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~) +Suggests: glibc-doc, debconf | debconf-2.0, locales [!hurd-i386] +Provides: libc6-sparcv9b [sparc sparc64], libc0.1-i686 [kfreebsd-i386], libc0.3-i686 [hurd-i386], libc6-i686 [i386], libc6-xen [i386], libc6-armel [armel], libc6-armhf [armhf] +Conflicts: libc6-loongson2f [mipsel], libc0.1-i686 [kfreebsd-i386], libc6-i686 [i386], openrc (<< 0.27-0), libc6-xen [i386] +Breaks: nscd (<< 2.31), locales (<< 2.31), locales-all (<< 2.31), hurd (<< 1:0.9.git20170910-0), libtirpc1 (<< 0.2.3), r-cran-later (<< 0.7.5+dfsg-0), nocache (<< 1.1-0), iraf-fitsutil (<< 2018.07.06-0), wcc (<< 0.0.2+dfsg-0), openssh-server (<< 1:8.2p1-0) [armel armhf hppa i386 mips mipsel mipsn32 mipsn32el mipsr6 mipsr6el mipsn32r6 mipsn32r6el powerpc] +Replaces: libc6-amd64 [amd64], + libc6-i386 [i386], + libc0.1-i686 [kfreebsd-i386], + libc0.3-i686 [hurd-i386], + libc6-i686 [i386], + libc6-xen [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-0) [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-0) [hurd-i386] | hurd-headers-dev [hurd-i386], ${libcrypt-dev:Depends} +Replaces: hurd-dev (<< 20120408-0) [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], libc6-dev-armel [armel], libc6-dev-armhf [armhf] +Breaks: binutils (<< 2.26), binutils-gold (<< 2.20.1-0), cmake (<< 2.8.4+dfsg.1-0), gcc-4.4 (<< 4.4.6-0), gcc-4.5 (<< 4.5.3-0), gcc-4.6 (<< 4.6.0-0), make (<< 3.81-0), pkg-config (<< 0.26-0), libjna-java (<< 3.2.7-0), liblouis-dev (<< 2.3.0-0), liblouisxml-dev (<< 2.4.0-0), libhwloc-dev (<< 1.2-0), check (<< 0.9.10-0) [s390x], kfreebsd-kernel-headers (<< 10.3~4) [kfreebsd-amd64 kfreebsd-i386], libperl5.26 (<< 5.26.1-0) +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 +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-pic +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 +Conflicts: libc-pic +Provides: libc-pic, glibc-pic +Depends: libc6 (= ${binary:Version}), ${misc:Depends} +Build-Profiles: +Description: GNU C Library: PIC archive library + Contains an archive library (ar file) composed of individual shared objects. + This is used for creating a library which is a smaller subset of the + standard libc shared library. The reduced library is used by debian-installer + and may be useful for custom installation media and in embedded systems. + +Package: libc6-udeb +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~) +Suggests: glibc-doc, debconf | debconf-2.0, locales [!hurd-i386] +Provides: libc6-sparcv9b [sparc sparc64], libc0.1-i686 [kfreebsd-i386], libc0.3-i686 [hurd-i386], libc6-i686 [i386], libc6-xen [i386], libc6-armel [armel], libc6-armhf [armhf] +Conflicts: libc6-loongson2f [mipsel], libc0.1-i686 [kfreebsd-i386], libc6-i686 [i386], openrc (<< 0.27-0), libc6-xen [i386] +Breaks: nscd (<< 2.31), locales (<< 2.31), locales-all (<< 2.31), hurd (<< 1:0.9.git20170910-0), libtirpc1 (<< 0.2.3), r-cran-later (<< 0.7.5+dfsg-0), nocache (<< 1.1-0), iraf-fitsutil (<< 2018.07.06-0), wcc (<< 0.0.2+dfsg-0), openssh-server (<< 1:8.2p1-0) [armel armhf hppa i386 mips mipsel mipsn32 mipsn32el mipsr6 mipsr6el mipsn32r6 mipsn32r6el powerpc] +Replaces: libc6-amd64 [amd64], + libc6-i386 [i386], + libc0.1-i686 [kfreebsd-i386], + libc0.3-i686 [hurd-i386], + libc6-i686 [i386], + libc6-xen [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-0) [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-0) [hurd-i386] | hurd-headers-dev [hurd-i386], ${libcrypt-dev:Depends} +Replaces: hurd-dev (<< 20120408-0) [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], libc6-dev-armel [armel], libc6-dev-armhf [armhf] +Breaks: binutils (<< 2.26), binutils-gold (<< 2.20.1-0), cmake (<< 2.8.4+dfsg.1-0), gcc-4.4 (<< 4.4.6-0), gcc-4.5 (<< 4.5.3-0), gcc-4.6 (<< 4.6.0-0), make (<< 3.81-0), pkg-config (<< 0.26-0), libjna-java (<< 3.2.7-0), liblouis-dev (<< 2.3.0-0), liblouisxml-dev (<< 2.4.0-0), libhwloc-dev (<< 1.2-0), check (<< 0.9.10-0) [s390x], kfreebsd-kernel-headers (<< 10.3~4) [kfreebsd-amd64 kfreebsd-i386], libperl5.26 (<< 5.26.1-0) +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 +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-pic +Architecture: alpha ia64 +Section: libdevel +Priority: optional +Multi-Arch: same +Conflicts: libc-pic +Provides: libc-pic, glibc-pic +Depends: libc6.1 (= ${binary:Version}), ${misc:Depends} +Build-Profiles: +Description: GNU C Library: PIC archive library + Contains an archive library (ar file) composed of individual shared objects. + This is used for creating a library which is a smaller subset of the + standard libc shared library. The reduced library is used by debian-installer + and may be useful for custom installation media and in embedded systems. + +Package: libc6.1-udeb +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~) +Suggests: glibc-doc, debconf | debconf-2.0, locales [!hurd-i386] +Provides: libc6-sparcv9b [sparc sparc64], libc0.1-i686 [kfreebsd-i386], libc0.3-i686 [hurd-i386], libc6-i686 [i386], libc6-xen [i386], libc6-armel [armel], libc6-armhf [armhf] +Conflicts: libc6-loongson2f [mipsel], libc0.1-i686 [kfreebsd-i386], libc6-i686 [i386], openrc (<< 0.27-0), libc6-xen [i386] +Breaks: nscd (<< 2.31), locales (<< 2.31), locales-all (<< 2.31), hurd (<< 1:0.9.git20170910-0), libtirpc1 (<< 0.2.3), r-cran-later (<< 0.7.5+dfsg-0), nocache (<< 1.1-0), iraf-fitsutil (<< 2018.07.06-0), wcc (<< 0.0.2+dfsg-0), openssh-server (<< 1:8.2p1-0) [armel armhf hppa i386 mips mipsel mipsn32 mipsn32el mipsr6 mipsr6el mipsn32r6 mipsn32r6el powerpc] +Replaces: libc6-amd64 [amd64], + libc6-i386 [i386], + libc0.1-i686 [kfreebsd-i386], + libc0.3-i686 [hurd-i386], + libc6-i686 [i386], + libc6-xen [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-0) [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-0) [hurd-i386] | hurd-headers-dev [hurd-i386], ${libcrypt-dev:Depends} +Replaces: hurd-dev (<< 20120408-0) [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], libc6-dev-armel [armel], libc6-dev-armhf [armhf] +Breaks: binutils (<< 2.26), binutils-gold (<< 2.20.1-0), cmake (<< 2.8.4+dfsg.1-0), gcc-4.4 (<< 4.4.6-0), gcc-4.5 (<< 4.5.3-0), gcc-4.6 (<< 4.6.0-0), make (<< 3.81-0), pkg-config (<< 0.26-0), libjna-java (<< 3.2.7-0), liblouis-dev (<< 2.3.0-0), liblouisxml-dev (<< 2.4.0-0), libhwloc-dev (<< 1.2-0), check (<< 0.9.10-0) [s390x], kfreebsd-kernel-headers (<< 10.3~4) [kfreebsd-amd64 kfreebsd-i386], libperl5.26 (<< 5.26.1-0) +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 +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-pic +Architecture: hurd-i386 +Section: libdevel +Priority: optional +Multi-Arch: same +Conflicts: libc-pic +Provides: libc-pic, glibc-pic +Depends: libc0.3 (= ${binary:Version}), ${misc:Depends} +Build-Profiles: +Description: GNU C Library: PIC archive library + Contains an archive library (ar file) composed of individual shared objects. + This is used for creating a library which is a smaller subset of the + standard libc shared library. The reduced library is used by debian-installer + and may be useful for custom installation media and in embedded systems. + +Package: libc0.3-udeb +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~) +Suggests: glibc-doc, debconf | debconf-2.0, locales [!hurd-i386] +Provides: libc6-sparcv9b [sparc sparc64], libc0.1-i686 [kfreebsd-i386], libc0.3-i686 [hurd-i386], libc6-i686 [i386], libc6-xen [i386], libc6-armel [armel], libc6-armhf [armhf] +Conflicts: libc6-loongson2f [mipsel], libc0.1-i686 [kfreebsd-i386], libc6-i686 [i386], openrc (<< 0.27-0), libc6-xen [i386] +Breaks: nscd (<< 2.31), locales (<< 2.31), locales-all (<< 2.31), hurd (<< 1:0.9.git20170910-0), libtirpc1 (<< 0.2.3), r-cran-later (<< 0.7.5+dfsg-0), nocache (<< 1.1-0), iraf-fitsutil (<< 2018.07.06-0), wcc (<< 0.0.2+dfsg-0), openssh-server (<< 1:8.2p1-0) [armel armhf hppa i386 mips mipsel mipsn32 mipsn32el mipsr6 mipsr6el mipsn32r6 mipsn32r6el powerpc] +Replaces: libc6-amd64 [amd64], + libc6-i386 [i386], + libc0.1-i686 [kfreebsd-i386], + libc0.3-i686 [hurd-i386], + libc6-i686 [i386], + libc6-xen [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-0) [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-0) [hurd-i386] | hurd-headers-dev [hurd-i386], ${libcrypt-dev:Depends} +Replaces: hurd-dev (<< 20120408-0) [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], libc6-dev-armel [armel], libc6-dev-armhf [armhf] +Breaks: binutils (<< 2.26), binutils-gold (<< 2.20.1-0), cmake (<< 2.8.4+dfsg.1-0), gcc-4.4 (<< 4.4.6-0), gcc-4.5 (<< 4.5.3-0), gcc-4.6 (<< 4.6.0-0), make (<< 3.81-0), pkg-config (<< 0.26-0), libjna-java (<< 3.2.7-0), liblouis-dev (<< 2.3.0-0), liblouisxml-dev (<< 2.4.0-0), libhwloc-dev (<< 1.2-0), check (<< 0.9.10-0) [s390x], kfreebsd-kernel-headers (<< 10.3~4) [kfreebsd-amd64 kfreebsd-i386], libperl5.26 (<< 5.26.1-0) +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 +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-pic +Architecture: kfreebsd-amd64 kfreebsd-i386 +Section: libdevel +Priority: optional +Multi-Arch: same +Conflicts: libc-pic +Provides: libc-pic, glibc-pic +Depends: libc0.1 (= ${binary:Version}), ${misc:Depends} +Build-Profiles: +Description: GNU C Library: PIC archive library + Contains an archive library (ar file) composed of individual shared objects. + This is used for creating a library which is a smaller subset of the + standard libc shared library. The reduced library is used by debian-installer + and may be useful for custom installation media and in embedded systems. + +Package: libc0.1-udeb +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: 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. + +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. + +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. + +Package: libc6-lse +Architecture: arm64 +Section: libs +Priority: optional +Multi-Arch: same +Depends: libc6 (= ${binary:Version}), ${misc:Depends} +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. + . + This set of libraries is optimized to support Large System Extensions (LSE). + It only needs to be installed on ARM machine supporting LSE. If you install + this on an machine without LSE support, it won't be used. + diff --git a/debian/control.in/amd64 b/debian/control.in/amd64 new file mode 100644 index 00000000..d3b1f757 --- /dev/null +++ b/debian/control.in/amd64 @@ -0,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 --git a/debian/control.in/armel b/debian/control.in/armel new file mode 100644 index 00000000..1de4efb6 --- /dev/null +++ b/debian/control.in/armel @@ -0,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 --git a/debian/control.in/armhf b/debian/control.in/armhf new file mode 100644 index 00000000..ad32a06b --- /dev/null +++ b/debian/control.in/armhf @@ -0,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 --git a/debian/control.in/i386 b/debian/control.in/i386 new file mode 100644 index 00000000..86299262 --- /dev/null +++ b/debian/control.in/i386 @@ -0,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 --git a/debian/control.in/kfreebsd-i386 b/debian/control.in/kfreebsd-i386 new file mode 100644 index 00000000..1ddf7a28 --- /dev/null +++ b/debian/control.in/kfreebsd-i386 @@ -0,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 --git a/debian/control.in/libc b/debian/control.in/libc new file mode 100644 index 00000000..d4592576 --- /dev/null +++ b/debian/control.in/libc @@ -0,0 +1,91 @@ +Package: @libc@ +Architecture: @archs@ +Section: libs +Priority: optional +Multi-Arch: same +Depends: ${shlibs:Depends}, ${libgcc:Depends}, ${libcrypt:Depends} +Recommends: libidn2-0 (>= 2.0.5~) +Suggests: glibc-doc, debconf | debconf-2.0, locales [!hurd-i386] +Provides: libc6-sparcv9b [sparc sparc64], libc0.1-i686 [kfreebsd-i386], libc0.3-i686 [hurd-i386], libc6-i686 [i386], libc6-xen [i386], libc6-armel [armel], libc6-armhf [armhf] +Conflicts: libc6-loongson2f [mipsel], libc0.1-i686 [kfreebsd-i386], libc6-i686 [i386], openrc (<< 0.27-2~), libc6-xen [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.2p1-4) [armel armhf hppa i386 mips mipsel mipsn32 mipsn32el mipsr6 mipsr6el mipsn32r6 mipsn32r6el powerpc] +Replaces: libc6-amd64 [amd64], + libc6-i386 [i386], + libc0.1-i686 [kfreebsd-i386], + libc0.3-i686 [hurd-i386], + libc6-i686 [i386], + libc6-xen [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} +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], libc6-dev-armel [armel], libc6-dev-armhf [armhf] +Breaks: binutils (<< 2.26), binutils-gold (<< 2.20.1-11), cmake (<< 2.8.4+dfsg.1-5), gcc-4.4 (<< 4.4.6-4), gcc-4.5 (<< 4.5.3-2), gcc-4.6 (<< 4.6.0-12), make (<< 3.81-8.1), pkg-config (<< 0.26-1), libjna-java (<< 3.2.7-4), liblouis-dev (<< 2.3.0-2), liblouisxml-dev (<< 2.4.0-2), libhwloc-dev (<< 1.2-3), check (<< 0.9.10-6.1+b1) [s390x], kfreebsd-kernel-headers (<< 10.3~4) [kfreebsd-amd64 kfreebsd-i386], libperl5.26 (<< 5.26.1-3) +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 +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@-pic +Architecture: @archs@ +Section: libdevel +Priority: optional +Multi-Arch: same +Conflicts: libc-pic +Provides: libc-pic, glibc-pic +Depends: @libc@ (= ${binary:Version}), ${misc:Depends} +Build-Profiles: +Description: GNU C Library: PIC archive library + Contains an archive library (ar file) composed of individual shared objects. + This is used for creating a library which is a smaller subset of the + standard libc shared library. The reduced library is used by debian-installer + and may be useful for custom installation media and in embedded systems. + +Package: @libc@-udeb +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 --git a/debian/control.in/main b/debian/control.in/main new file mode 100644 index 00000000..561a288a --- /dev/null +++ b/debian/control.in/main @@ -0,0 +1,142 @@ +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], systemtap-sdt-dev [linux-any], + libaudit-dev [linux-any], libcap-dev [linux-any], libselinux-dev [linux-any], + mig (>= 1.5-3) [hurd-i386], gnumach-dev (>= 2:1.8+git20181103-1~) [hurd-i386], + hurd-dev (>= 1:0.9.git20191029) [hurd-i386] | hurd-headers-dev [hurd-i386], + hurd-dev (>= 1:0.9.git20191029) [hurd-i386] | libihash-dev [hurd-i386] , + kfreebsd-kernel-headers [kfreebsd-any], + binutils (>= 2.29), + g++-9, g++-9-multilib [amd64 armhf armel i386 kfreebsd-amd64 mips mipsel mipsn32 mipsn32el mips64 mips64el mipsr6 mipsr6el mipsn32r6 mipsn32r6el mips64r6 mips64r6el powerpc ppc64 s390x sparc sparc64 x32] , + python3:native, + libidn2-0 (>= 2.0.5~) , + libc-bin (>= @GLIBC_VERSION@) +Build-Depends-Indep: perl, po-debconf (>= 1.0) +Maintainer: Ubuntu Developers +XSBC-Original-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} +Suggests: 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 +Build-Profiles: +Description: GNU C Library: Development binaries + This package contains utility programs related to the GNU C Library + development package. + +Package: libc-l10n +Architecture: all +Section: localization +Priority: standard +Multi-Arch: foreign +Depends: ${misc:Depends} +Breaks: locales (<< 2.21-1) +Replaces: locales (<< 2.21-1) +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}, glibc-doc-reference (>= 2.18) +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 (<< 29~), cross-toolchain-base-ports (<< 25~) +Conflicts: eglibc-source +Replaces: eglibc-source +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@), ${misc:Depends}, debconf | debconf-2.0 +Breaks: libc-bin (<< 2.23) +Replaces: libc-bin (<< 2.23), manpages-fr-extra (<< 20141022) +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: ${misc:Depends} +Breaks: locales (<< 2.13-17) +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 --git a/debian/control.in/mips32 b/debian/control.in/mips32 new file mode 100644 index 00000000..7025b062 --- /dev/null +++ b/debian/control.in/mips32 @@ -0,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 --git a/debian/control.in/mips64 b/debian/control.in/mips64 new file mode 100644 index 00000000..aaf8a2d7 --- /dev/null +++ b/debian/control.in/mips64 @@ -0,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 --git a/debian/control.in/mipsn32 b/debian/control.in/mipsn32 new file mode 100644 index 00000000..d62f073d --- /dev/null +++ b/debian/control.in/mipsn32 @@ -0,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 --git a/debian/control.in/opt b/debian/control.in/opt new file mode 100644 index 00000000..526b3cde --- /dev/null +++ b/debian/control.in/opt @@ -0,0 +1,65 @@ +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. + +Package: libc6-lse +Architecture: arm64 +Section: libs +Priority: optional +Multi-Arch: same +Depends: libc6 (= ${binary:Version}), ${misc:Depends} +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. + . + This set of libraries is optimized to support Large System Extensions (LSE). + It only needs to be installed on ARM machine supporting LSE. If you install + this on an machine without LSE support, it won't be used. + diff --git a/debian/control.in/powerpc b/debian/control.in/powerpc new file mode 100644 index 00000000..774f4141 --- /dev/null +++ b/debian/control.in/powerpc @@ -0,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 --git a/debian/control.in/ppc64 b/debian/control.in/ppc64 new file mode 100644 index 00000000..f5042ca7 --- /dev/null +++ b/debian/control.in/ppc64 @@ -0,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 --git a/debian/control.in/s390 b/debian/control.in/s390 new file mode 100644 index 00000000..ca6b2630 --- /dev/null +++ b/debian/control.in/s390 @@ -0,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 --git a/debian/control.in/sparc b/debian/control.in/sparc new file mode 100644 index 00000000..ede4735a --- /dev/null +++ b/debian/control.in/sparc @@ -0,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 --git a/debian/control.in/sparc64 b/debian/control.in/sparc64 new file mode 100644 index 00000000..a8670d6c --- /dev/null +++ b/debian/control.in/sparc64 @@ -0,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 --git a/debian/control.in/x32 b/debian/control.in/x32 new file mode 100644 index 00000000..41e6f751 --- /dev/null +++ b/debian/control.in/x32 @@ -0,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 --git a/debian/copyright b/debian/copyright new file mode 100644 index 00000000..0517e768 --- /dev/null +++ b/debian/copyright @@ -0,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 --git a/debian/debhelper.in/glibc-doc.docs b/debian/debhelper.in/glibc-doc.docs new file mode 100644 index 00000000..cd9a0a24 --- /dev/null +++ b/debian/debhelper.in/glibc-doc.docs @@ -0,0 +1 @@ +ChangeLog.old/* diff --git a/debian/debhelper.in/glibc-doc.links b/debian/debhelper.in/glibc-doc.links new file mode 100644 index 00000000..046c4269 --- /dev/null +++ b/debian/debhelper.in/glibc-doc.links @@ -0,0 +1,17 @@ +usr/share/man/man3/pthread_condattr_init.3.gz usr/share/man/man3/pthread_condattr_destroy.3.gz +usr/share/man/man3/pthread_cond_init.3.gz usr/share/man/man3/pthread_cond_signal.3.gz +usr/share/man/man3/pthread_cond_init.3.gz usr/share/man/man3/pthread_cond_broadcast.3.gz +usr/share/man/man3/pthread_cond_init.3.gz usr/share/man/man3/pthread_cond_wait.3.gz +usr/share/man/man3/pthread_cond_init.3.gz usr/share/man/man3/pthread_cond_timedwait.3.gz +usr/share/man/man3/pthread_cond_init.3.gz usr/share/man/man3/pthread_cond_destroy.3.gz +usr/share/man/man3/pthread_key_create.3.gz usr/share/man/man3/pthread_getspecific.3.gz +usr/share/man/man3/pthread_key_create.3.gz usr/share/man/man3/pthread_key_delete.3.gz +usr/share/man/man3/pthread_key_create.3.gz usr/share/man/man3/pthread_setspecific.3.gz +usr/share/man/man3/pthread_mutexattr_init.3.gz usr/share/man/man3/pthread_mutexattr_destroy.3.gz +usr/share/man/man3/pthread_mutexattr_init.3.gz usr/share/man/man3/pthread_mutexattr_settype.3.gz +usr/share/man/man3/pthread_mutexattr_init.3.gz usr/share/man/man3/pthread_mutexattr_gettype.3.gz +usr/share/man/man3/pthread_mutexattr_setkind_np.3.gz usr/share/man/man3/pthread_mutexattr_getkind_np.3.gz +usr/share/man/man3/pthread_mutex_init.3.gz usr/share/man/man3/pthread_mutex_lock.3.gz +usr/share/man/man3/pthread_mutex_init.3.gz usr/share/man/man3/pthread_mutex_trylock.3.gz +usr/share/man/man3/pthread_mutex_init.3.gz usr/share/man/man3/pthread_mutex_unlock.3.gz +usr/share/man/man3/pthread_mutex_init.3.gz usr/share/man/man3/pthread_mutex_destroy.3.gz diff --git a/debian/debhelper.in/glibc-doc.manpages b/debian/debhelper.in/glibc-doc.manpages new file mode 100644 index 00000000..b706a124 --- /dev/null +++ b/debian/debhelper.in/glibc-doc.manpages @@ -0,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 --git a/debian/debhelper.in/glibc-source.install b/debian/debhelper.in/glibc-source.install new file mode 100644 index 00000000..683e4868 --- /dev/null +++ b/debian/debhelper.in/glibc-source.install @@ -0,0 +1 @@ +BUILD-TREE/glibc-*.tar.xz /usr/src/glibc diff --git a/debian/debhelper.in/glibc-source.lintian-overrides b/debian/debhelper.in/glibc-source.lintian-overrides new file mode 100644 index 00000000..1e917b43 --- /dev/null +++ b/debian/debhelper.in/glibc-source.lintian-overrides @@ -0,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 --git a/debian/debhelper.in/libc-alt.install b/debian/debhelper.in/libc-alt.install new file mode 100644 index 00000000..bbb75b55 --- /dev/null +++ b/debian/debhelper.in/libc-alt.install @@ -0,0 +1,5 @@ +# This file is used for biarch libraries. +TMPDIR/SLIBDIR/*.so* SLIBDIR +TMPDIR/LIBDIR/gconv/* LIBDIR/gconv/ + +TMPDIR/etc/ld.so.conf.d /etc diff --git a/debian/debhelper.in/libc-alt.lintian-overrides b/debian/debhelper.in/libc-alt.lintian-overrides new file mode 100644 index 00000000..f3f448c9 --- /dev/null +++ b/debian/debhelper.in/libc-alt.lintian-overrides @@ -0,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 + +# Those file are actually .o files not package in a ar archive, and +# thus should not be stripped +LIBC-FLAVOR: unstripped-binary-or-object */libmcheck.a + +# ld.so must be executable, otherwise the system will not work +LIBC-FLAVOR: shlib-with-executable-bit */ld-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 --git a/debian/debhelper.in/libc-alt.postrm b/debian/debhelper.in/libc-alt.postrm new file mode 100644 index 00000000..55c8b4ac --- /dev/null +++ b/debian/debhelper.in/libc-alt.postrm @@ -0,0 +1,21 @@ +#! /bin/sh +set -e + +if [ "$1" = remove ]; then + # Native multiarch packages declare a Replaces: on the corresponding + # biarch package. Therefore if both a biarch package and the corresponding + # multiarch package are installed, then the multiarch package is removed, + # and then the biarch package is removed, the dynamic linker symlink + # becomes a dangling symlink. Remove it in that case. + if [ -h RTLD_SO ] && [ ! -f RTLD_SO ]; then + rm RTLD_SO + fi +fi + +if [ "$1" = deconfigure ]; then + :; # blah, do something useful with ldso +fi + +#DEBHELPER# + +exit 0 diff --git a/debian/debhelper.in/libc-bin.dirs b/debian/debhelper.in/libc-bin.dirs new file mode 100644 index 00000000..60acff7c --- /dev/null +++ b/debian/debhelper.in/libc-bin.dirs @@ -0,0 +1,2 @@ +usr/lib/locale +usr/share/libc-bin diff --git a/debian/debhelper.in/libc-bin.install b/debian/debhelper.in/libc-bin.install new file mode 100644 index 00000000..dfab166b --- /dev/null +++ b/debian/debhelper.in/libc-bin.install @@ -0,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 --git a/debian/debhelper.in/libc-bin.lintian-overrides b/debian/debhelper.in/libc-bin.lintian-overrides new file mode 100644 index 00000000..b179eb71 --- /dev/null +++ b/debian/debhelper.in/libc-bin.lintian-overrides @@ -0,0 +1,26 @@ +# ldconfig must be executable even when the libc is not configured, and +# thus must be linked statically +libc-bin: statically-linked-binary sbin/ldconfig.real + +# 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 + +# ldconfig.real doesn't have a manpage, since it's just ldconfig renamed +libc-bin: binary-without-manpage sbin/ldconfig.real + +# ldconfig is called in the postinst for trigger support +libc-bin: postinst-has-useless-call-to-ldconfig + +# these manpages are provided by the manpages package +libc-bin: binary-without-manpage sbin/ldconfig +libc-bin: binary-without-manpage usr/bin/getent +libc-bin: binary-without-manpage usr/bin/iconv +libc-bin: binary-without-manpage usr/bin/ldd +libc-bin: binary-without-manpage usr/bin/locale +libc-bin: binary-without-manpage usr/bin/localedef +libc-bin: binary-without-manpage usr/bin/pldd +libc-bin: binary-without-manpage usr/bin/zdump +libc-bin: binary-without-manpage usr/sbin/iconvconfig +libc-bin: binary-without-manpage usr/sbin/zic diff --git a/debian/debhelper.in/libc-bin.manpages b/debian/debhelper.in/libc-bin.manpages new file mode 100644 index 00000000..82da9df2 --- /dev/null +++ b/debian/debhelper.in/libc-bin.manpages @@ -0,0 +1,3 @@ +debian/local/manpages/catchsegv.1 +debian/local/manpages/getconf.1 +debian/local/manpages/tzselect.1 diff --git a/debian/debhelper.in/libc-bin.postinst b/debian/debhelper.in/libc-bin.postinst new file mode 100644 index 00000000..bec90fb0 --- /dev/null +++ b/debian/debhelper.in/libc-bin.postinst @@ -0,0 +1,60 @@ +#!/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 + # base-files 3.0.0 to 3.1.15 + 109e33e2c91d1853b5bc56078a96aa18) + ;; + # base-files 3.1.8 and 3.1.9 + 3114ea9cf2f3bd8d120b4da96e3832d5) + ;; + # base-files 3.1.16 to 7.2 and libc-bin 2.19-18 to 2.22-11 + 295c15c4bdac80e50b37689ef08f359c) + ;; + # base-files 6.6 + 30b82cb1ce20d480703da2208a4607b4) + ;; + # base-files 7.3 and libc-bin 2.22-12 + f8e97bf611374634c7cb3a6085503ab5) + ;; + # 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_NOTRIGGER=y + export LDCONFIG_NOTRIGGER + ldconfig || ldconfig --verbose + exit 0 +fi + +#DEBHELPER# + +exit 0 + diff --git a/debian/debhelper.in/libc-bin.triggers b/debian/debhelper.in/libc-bin.triggers new file mode 100644 index 00000000..c57bf655 --- /dev/null +++ b/debian/debhelper.in/libc-bin.triggers @@ -0,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 --git a/debian/debhelper.in/libc-dev-alt.install b/debian/debhelper.in/libc-dev-alt.install new file mode 100644 index 00000000..d26e3cd3 --- /dev/null +++ b/debian/debhelper.in/libc-dev-alt.install @@ -0,0 +1,22 @@ +# 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/libnsl.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 --git a/debian/debhelper.in/libc-dev-alt.lintian-overrides b/debian/debhelper.in/libc-dev-alt.lintian-overrides new file mode 100644 index 00000000..2feb3022 --- /dev/null +++ b/debian/debhelper.in/libc-dev-alt.lintian-overrides @@ -0,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 --git a/debian/debhelper.in/libc-dev-bin.install b/debian/debhelper.in/libc-dev-bin.install new file mode 100644 index 00000000..0d760a7e --- /dev/null +++ b/debian/debhelper.in/libc-dev-bin.install @@ -0,0 +1,5 @@ +debian/tmp-libc/usr/bin/gencat usr/bin +debian/tmp-libc/usr/bin/mtrace usr/bin +debian/tmp-libc/usr/bin/rpcgen usr/bin +debian/tmp-libc/usr/bin/sotruss usr/bin +debian/tmp-libc/usr/bin/sprof usr/bin diff --git a/debian/debhelper.in/libc-dev-bin.lintian-overrides b/debian/debhelper.in/libc-dev-bin.lintian-overrides new file mode 100644 index 00000000..eedd7cbd --- /dev/null +++ b/debian/debhelper.in/libc-dev-bin.lintian-overrides @@ -0,0 +1,3 @@ +# these manpages are provided by the manpages package +libc-dev-bin: binary-without-manpage usr/bin/mtrace +libc-dev-bin: binary-without-manpage usr/bin/sprof diff --git a/debian/debhelper.in/libc-dev-bin.manpages b/debian/debhelper.in/libc-dev-bin.manpages new file mode 100644 index 00000000..c33123a0 --- /dev/null +++ b/debian/debhelper.in/libc-dev-bin.manpages @@ -0,0 +1,3 @@ +debian/local/manpages/gencat.1 +debian/local/manpages/rpcgen.1 +debian/local/manpages/sotruss.1 diff --git a/debian/debhelper.in/libc-dev.install b/debian/debhelper.in/libc-dev.install new file mode 100644 index 00000000..fcd6a364 --- /dev/null +++ b/debian/debhelper.in/libc-dev.install @@ -0,0 +1,23 @@ +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/libnsl.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 --git a/debian/debhelper.in/libc-dev.install.hurd-i386 b/debian/debhelper.in/libc-dev.install.hurd-i386 new file mode 100644 index 00000000..98c4e8dc --- /dev/null +++ b/debian/debhelper.in/libc-dev.install.hurd-i386 @@ -0,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/libnsl.a LIBDIR +TMPDIR/LIBDIR/libpthread.a LIBDIR +TMPDIR/LIBDIR/libpthread2.a LIBDIR +TMPDIR/LIBDIR/libresolv.a LIBDIR +TMPDIR/LIBDIR/librpcsvc.a LIBDIR +TMPDIR/LIBDIR/librt.a LIBDIR +TMPDIR/LIBDIR/libutil.a LIBDIR +TMPDIR/LIBDIR/*.o LIBDIR +TMPDIR/LIBDIR/*.so LIBDIR +TMPDIR/usr/include/* usr/include diff --git a/debian/debhelper.in/libc-dev.lintian-overrides b/debian/debhelper.in/libc-dev.lintian-overrides new file mode 100644 index 00000000..897ba724 --- /dev/null +++ b/debian/debhelper.in/libc-dev.lintian-overrides @@ -0,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 --git a/debian/debhelper.in/libc-l10n.install b/debian/debhelper.in/libc-l10n.install new file mode 100644 index 00000000..48a012b4 --- /dev/null +++ b/debian/debhelper.in/libc-l10n.install @@ -0,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 --git a/debian/debhelper.in/libc-otherbuild.install b/debian/debhelper.in/libc-otherbuild.install new file mode 100644 index 00000000..071d0e21 --- /dev/null +++ b/debian/debhelper.in/libc-otherbuild.install @@ -0,0 +1,3 @@ +# This file is used for making NPTL and other +# optimized libraries. +TMPDIR/SLIBDIR/*.so* SLIBDIR diff --git a/debian/debhelper.in/libc-otherbuild.lintian-overrides b/debian/debhelper.in/libc-otherbuild.lintian-overrides new file mode 100644 index 00000000..6a5e675b --- /dev/null +++ b/debian/debhelper.in/libc-otherbuild.lintian-overrides @@ -0,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: shlib-with-executable-bit */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 --git a/debian/debhelper.in/libc-otherbuild.postinst b/debian/debhelper.in/libc-otherbuild.postinst new file mode 100644 index 00000000..d4c1d59f --- /dev/null +++ b/debian/debhelper.in/libc-otherbuild.postinst @@ -0,0 +1,13 @@ +#!/bin/sh + +set -e + +if [ "$1" = "configure" ] +then + # /etc/ld.so.nohwcap code: + __NOHWCAP__ +fi + +#DEBHELPER# + +exit 0 diff --git a/debian/debhelper.in/libc-otherbuild.postrm b/debian/debhelper.in/libc-otherbuild.postrm new file mode 100644 index 00000000..bd644534 --- /dev/null +++ b/debian/debhelper.in/libc-otherbuild.postrm @@ -0,0 +1,12 @@ +#!/bin/sh + +set -e + +if [ "$1" = "remove" ]; then + # /etc/ld.so.nohwcap code + __NOHWCAP__ +fi + +#DEBHELPER# + +exit 0 diff --git a/debian/debhelper.in/libc-pic.install b/debian/debhelper.in/libc-pic.install new file mode 100644 index 00000000..4e8c0b6e --- /dev/null +++ b/debian/debhelper.in/libc-pic.install @@ -0,0 +1,3 @@ +TMPDIR/LIBDIR/*_pic.a LIBDIR +TMPDIR/LIBDIR/*.map LIBDIR +TMPDIR/LIBDIR/libc_pic LIBDIR diff --git a/debian/debhelper.in/libc-prof.install b/debian/debhelper.in/libc-prof.install new file mode 100644 index 00000000..86fd85e5 --- /dev/null +++ b/debian/debhelper.in/libc-prof.install @@ -0,0 +1 @@ +TMPDIR/LIBDIR/*_p.a LIBDIR diff --git a/debian/debhelper.in/libc-udeb.install b/debian/debhelper.in/libc-udeb.install new file mode 100644 index 00000000..a333dde1 --- /dev/null +++ b/debian/debhelper.in/libc-udeb.install @@ -0,0 +1,16 @@ +# FIXME: someday we may need to handle installing into non-lib. +TMPDIR/SLIBDIR/ld*.so* lib +TMPDIR/SLIBDIR/libm-*.so* lib +TMPDIR/SLIBDIR/libm.so* lib +TMPDIR/SLIBDIR/libmvec-* lib +TMPDIR/SLIBDIR/libmvec.so* lib +TMPDIR/SLIBDIR/libdl*.so* lib +TMPDIR/SLIBDIR/libresolv*.so* lib +TMPDIR/SLIBDIR/libc-*.so* lib +TMPDIR/SLIBDIR/libc.so* lib +TMPDIR/SLIBDIR/libutil* lib +TMPDIR/SLIBDIR/libcrypt* lib +TMPDIR/SLIBDIR/librt*.so* lib +TMPDIR/SLIBDIR/libpthread*.so* lib +TMPDIR/SLIBDIR/libnss_dns*.so* lib +TMPDIR/SLIBDIR/libnss_files*.so* lib diff --git a/debian/debhelper.in/libc.NEWS b/debian/debhelper.in/libc.NEWS new file mode 100644 index 00000000..0e71e0f6 --- /dev/null +++ b/debian/debhelper.in/libc.NEWS @@ -0,0 +1,95 @@ +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 --git a/debian/debhelper.in/libc.README.Debian b/debian/debhelper.in/libc.README.Debian new file mode 100644 index 00000000..c2d7bbec --- /dev/null +++ b/debian/debhelper.in/libc.README.Debian @@ -0,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 --git a/debian/debhelper.in/libc.dirs b/debian/debhelper.in/libc.dirs new file mode 100644 index 00000000..eff2b432 --- /dev/null +++ b/debian/debhelper.in/libc.dirs @@ -0,0 +1 @@ +etc/ld.so.conf.d diff --git a/debian/debhelper.in/libc.docs b/debian/debhelper.in/libc.docs new file mode 100644 index 00000000..93d9844b --- /dev/null +++ b/debian/debhelper.in/libc.docs @@ -0,0 +1,2 @@ +NEWS +hesiod/README.hesiod diff --git a/debian/debhelper.in/libc.install b/debian/debhelper.in/libc.install new file mode 100644 index 00000000..026b02fa --- /dev/null +++ b/debian/debhelper.in/libc.install @@ -0,0 +1,6 @@ +TMPDIR/lib/*.so* RTLDDIR +TMPDIR/SLIBDIR/*.so* SLIBDIR +TMPDIR/LIBDIR/gconv/* LIBDIR/gconv +TMPDIR/LIBDIR/audit/* LIBDIR/audit + +TMPDIR/etc/ld.so.conf.d /etc diff --git a/debian/debhelper.in/libc.lintian-overrides b/debian/debhelper.in/libc.lintian-overrides new file mode 100644 index 00000000..709d2432 --- /dev/null +++ b/debian/debhelper.in/libc.lintian-overrides @@ -0,0 +1,13 @@ +# libpthread must be stripped specially; GDB needs the non-dynamic +# symbol table in order to load the thread debugging library. +LIBC: unstripped-binary-or-object */libpthread-GLIBC_VERSION.so + +# ld.so must be executable, otherwise the system will not work +LIBC: shlib-with-executable-bit */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 --git a/debian/debhelper.in/libc.postinst b/debian/debhelper.in/libc.postinst new file mode 100644 index 00000000..36791688 --- /dev/null +++ b/debian/debhelper.in/libc.postinst @@ -0,0 +1,150 @@ +#!/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 + # We don't use a registry anymore, remove the old file + rm -f /etc/ld.so.hwcappkgs + + # /etc/ld.so.nohwcap code: + __NOHWCAP__ + + # Load debconf module if available + if [ -f /usr/share/debconf/confmodule ] ; then + . /usr/share/debconf/confmodule + fi + + if [ -n "$preversion" ] && [ -x "$(which ischroot)" ] && ! ischroot; then + if dpkg --compare-versions "$preversion" lt GLIBC_VERSION; then + check="" + [ -f /var/run/services.need_restart ] && check=$(sort -u /var/run/services.need_restart 2>/dev/null) + # Change service names back into package names, so that we can + # double-check package installation. + check=$(echo "$check" | \ + sed -e's/\batd\b/at/g' \ + -e's/\bdovecot\b/dovecot-common/g' \ + -e's/\bexim4\b/exim4-base/g' \ + -e's/\blpd\b/lpr/g' \ + -e's/\blpd-ppd\b/lpr-ppd/g' \ + -e's/\bmysql\b/mysql-server/g' \ + -e's/\bsaslauthd\b/sasl2-bin/g' \ + -e's/\bsmbd\b/samba/g' \ + -e's/\bpostgresql\b/postgresql-common/g' \ + ) + + # Check to see which of the services that were running at unpack + # time are still around + # the following substitution processes the check variable + # and returns results in the services variable + # NSS services check: + __NSS_CHECK__ + # If there are services that we *stopped* in the preinst, don't + # forget to restart them now + if [ -e /var/run/services.need_start ]; then + services="$(sort -u /var/run/services.need_start) $services" + fi + if [ -n "$services" ]; then + echo "Restarting services possibly affected by the upgrade:" + failed="" + for service in $services; do + case "$service" in + gdm*) + idlopt="reload" + ;; + *) + idlopt="restart" + ;; + esac + echo -n " $service: restarting..." + if invoke-rc.d ${service} $idlopt > /dev/null 2>&1; then + echo "done." + else + echo "FAILED! ($?)" + failed="$service $failed" + fi + 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" + if [ "$RELEASE_UPGRADE_MODE" = desktop ]; then + db_input medium glibc/restart-failed || true + else + db_input critical glibc/restart-failed || true + fi + 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." + rm -f /var/run/services.need_start /var/run/services.need_restart + 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 + # give a reboot notification on al upgrades (LP: #1546457) + if [ -x /usr/share/update-notifier/notify-reboot-required ]; then + /usr/share/update-notifier/notify-reboot-required + fi + 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 + elif [ -x "`which initctl`" ]; then + UPSTART=$(initctl version 2>/dev/null | awk '/upstart/ {print $3}' | tr -d ')') + if dpkg --compare-versions "$UPSTART" lt-nl 1.6.1; then + # This is an old upstart that can't re-exec statefully: + TELINIT=no + touch /var/run/init.upgraded + fi + fi + if [ "$TELINIT" = "yes" ]; then + telinit u 2>/dev/null || true ; sleep 1 + fi +fi + +#DEBHELPER# + +exit 0 diff --git a/debian/debhelper.in/libc.postrm b/debian/debhelper.in/libc.postrm new file mode 100644 index 00000000..4c5cc6e0 --- /dev/null +++ b/debian/debhelper.in/libc.postrm @@ -0,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 --git a/debian/debhelper.in/libc.preinst b/debian/debhelper.in/libc.preinst new file mode 100644 index 00000000..58dc1ab1 --- /dev/null +++ b/debian/debhelper.in/libc.preinst @@ -0,0 +1,483 @@ +#!/bin/sh +set -e +export LC_ALL=C + +type=$1 +preversion=$2 + +linux_compare_versions () { + verA=$(($(echo "$1" | sed 's/^\([0-9]*\.[0-9]*\)\([^.0-9]\|$\)/\1.0\2/; s/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1 \* 10000 + \2 \* 100 + \3/'))) + verB=$(($(echo "$3" | sed 's/^\([0-9]*\.[0-9]*\)\([^.0-9]\|$\)/\1.0\2/; s/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1 \* 10000 + \2 \* 100 + \3/'))) + + test $verA -$2 $verB +} + +kfreebsd_compare_versions () { + verA=$(($(echo "$1" | sed 's/\([0-9]*\)\.\([0-9]*\).*/\1 \* 100 + \2/'))) + verB=$(($(echo "$3" | sed 's/\([0-9]*\)\.\([0-9]*\).*/\1 \* 100 + \2/'))) + + test $verA -$2 $verB +} + +# Sanity check. +# If there are versions of glibc outside of the normal installation +# location (/lib, /lib64, etc.) then things may break very badly +# as soon as ld.so is replaced by a new version. This check is not +# foolproof, but it's pretty accurate. This script ignores libraries +# with different sonames, and libraries incompatible with the +# to-be-installed ld.so. +check_dir () { + msg=$1 + dir=$2 + + # Follow symlinks + dir=$(readlink -e $dir || true) + + # Ignore inexistent directories + if ! test -d "$dir" ; then + return + fi + + # Detect possible candidates + files=$(ls $dir | egrep '^(ld|lib(d|c|m|pthread|rt|dl))-2.*.so' 2>/dev/null || true) + if test -z "$files" ; then + return + fi + + for file in $files ; do + lib=$dir/$file + + # Skip if it is a symlink (as installed by lsb-core) + if test -L "$lib" ; then + continue + fi + + # Skip if it is the currently dynamic loader + if test "$lib" = "$ldfile" ; then + continue + fi + + # See if the found libraries are compatible with the system ld.so; + # if they aren't, they'll be ignored. Check e_ident, e_type (which + # will just be ET_DYN), and e_machine. If a match is found, there + # is a risk of breakage. + libbytes=`head -c 20 $lib | od -c` + if test "$ldbytes" != "$libbytes" ; then + continue + fi + + # Binaries owned packages are considered to do the right thing + # First try a quick lookup which should catch all cases on a + # normal system + if echo $libcfiles | grep -q "[ ^]$lib[ $]" ; then + continue + fi + + # Slower lookup to confirm + if dpkg-query -S "$lib" >/dev/null 2>&1 ; then + continue + fi + + # Output an error message and exit + echo + echo "A copy of the C library was found $msg:" + echo " '$lib'" + echo "It is not safe to upgrade the C library in this situation;" + echo "please remove that copy of the C library or get it out of" + echo "'$dir' and try again." + echo + exit 1 + done +} + +# libcrypt1 breaks/replaces libc6 (<< 2.31). cannot use a pre-depends on libcrypt1 +# call ldconfig unconditionally for the first libc6 depending on libcrypt1 +if [ -n "$preversion" ] && dpkg --compare-versions "$preversion" lt 2.31-0ubuntu2; then + LCONFIG_NOTRIGGER=y + export LDCONFIG_NOTRIGGER + ldconfig || ldconfig --verbose +fi + +if [ "$type" != abort-upgrade ] +then + # Load debconf module if available and usable + if [ -f /usr/share/debconf/confmodule ] && \ + ( [ "$DEBCONF_USE_CDEBCONF" ] || perl -e "" 2>/dev/null ) ; then + . /usr/share/debconf/confmodule + USE_DEBCONF=1 + 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 + # Test to make sure z < 255, in x.y.z-n form of kernel version + # Also make sure we don't trip on x.y.zFOO-n form + kernel_rev=$(uname -r | sed 's/\([0-9]*\.\)\{1,2\}\([0-9]*\)\(.*\)/\2/') + if [ "$kernel_rev" -ge 255 ] + then + echo "ERROR: Your kernel version indicates a revision number" + echo "of 255 or greater. Glibc has a number of built in" + echo "assumptions that this revision number is less than 255." + echo "If you\'ve built your own kernel, please make sure that any" + echo "custom version numbers are appended to the upstream" + echo "kernel number with a dash or some other delimiter." + echo + exit 1 + fi + + # sanity checking for the appropriate kernel on each architecture. + 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 linux_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 linux_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 kfreebsd_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 ] +then + # Try to detect copies of the libc library in the various places + # the dynamic linker uses. + ldfile=$(readlink -m RTLD_SO) + if test -f "$file"; then + ldbytes=$(head -c 20 RTLD_SO | od -c) + else + # If the symlink to the dynamic linker is dangling or missing, set + # ldbytes to an empty string, the test below will fail and all the + # libraries found will be ignored. + ldbytes="" + fi + libcfiles=$(dpkg-query -L ${DPKG_MAINTSCRIPT_PACKAGE}:${DPKG_MAINTSCRIPT_ARCH} 2>/dev/null) + + dirs="SLIBDIR /lib /lib/tls /lib32 /lib64 /usr/local/lib /usr/local/lib32 /usr/local/lib64" + for dir in $dirs ; do + check_dir "in an unexpected directory" $dir + done + + if test -n "$LD_LIBRARY_PATH"; then + dirs=$(echo $LD_LIBRARY_PATH | sed 's/:/ /g') + for dir in $dirs ; do + check_dir "via LD_LIBRARY_PATH" $dir + done + fi + + if test -e /etc/ld.so.conf; then + dirs=$(echo $(cat /etc/ld.so.conf)) + if test -n "$dirs" ; then + for dir in $dirs ; do + check_dir "via /etc/ld.so.conf" $dir + done + fi + fi + + if [ -e /lib/tls/i686/cmov/libc.so.6 ] || [ -e /lib/i686/cmov/libc.so.6 ] ; then + status_i686=$(dpkg -s libc6-i686 2>/dev/null | grep ^Status: | sed -e 's/^Status: \(.*\) \(.*\) \(.*\)/\3/g') + status_xen=$(dpkg -s libc6-xen 2>/dev/null | grep ^Status: | sed -e 's/^Status: \(.*\) \(.*\) \(.*\)/\3/g') + if ([ -z "$status_i686" ] || [ "$status_i686" = "not-installed" ] || [ "$status_i686" = "config-files" ]) && \ + ([ -z "$status_xen" ] || [ "$status_xen" = "not-installed" ] || [ "$status_xen" = "config-files" ]); then + echo + echo "A non-dpkg owned copy of the libc6-i686 package was found." + echo "It is not safe to upgrade the C library in this situation;" + echo "please remove that copy of the C library and try again." + echo + exit 1 + fi + fi + + 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" + # the following substitution processes the check variable + # and returns results in the services variable + # 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 + if [ "$RELEASE_UPGRADE_MODE" = desktop ]; then + db_input medium glibc/upgrade || true + else + db_input critical glibc/upgrade || true + fi + 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 + + services="" + check="apache2 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 postgresql-common proftpd postfix postfix-tls" + check="$check rsync samba sasl2-bin slapd smail sendmail snmpd ssh" + check="$check spamassassin vsftpd wu-ftpd wu-ftpd-academ wwwoffle" + check="$check webmin dropbear gdm gdm3" + # the following substitution processes the check variable + # and returns results in the services variable + # NSS services check: + __NSS_CHECK__ + if [ -n "$services" ]; then + if [ -f /usr/share/debconf/confmodule ] ; then + db_version 2.0 + if [ "$RELEASE_UPGRADE_MODE" = desktop ]; then + db_input medium libraries/restart-without-asking || true + else + db_input critical libraries/restart-without-asking || true + fi + db_go || true + + db_get libraries/restart-without-asking + if [ "$RET" != true ]; then + db_reset glibc/restart-services + db_set glibc/restart-services "$services" + if [ "$RELEASE_UPGRADE_MODE" = desktop ]; then + db_input medium glibc/restart-services || true + else + db_input critical glibc/restart-services || true + fi + db_go || true + db_get glibc/restart-services + services="$RET" + 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 + + if [ -n "$services" ]; then + echo "Stopping some services possibly affected by the upgrade (will be restarted later):" + for service in $services; do + case "$service" in + cron) + # See bug (LP: #508083) + echo -n " $service: stopping..." + if invoke-rc.d ${service} stop > /dev/null 2>&1; then + echo "done." + echo "$service" >> /var/run/services.need_start + else + echo "FAILED! ($?)" + echo "$service" >> /var/run/services.need_restart + fi + ;; + + *) + # log service details to allow postinst to handle the + # restart. + echo "$service" >> /var/run/services.need_restart + ;; + esac + done + + fi + echo + else + echo "Nothing to restart." + 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 /etc/ld.so.cache + rm -f /var/cache/ldconfig/aux-cache + fi +fi + +exit 0 diff --git a/debian/debhelper.in/libc.templates b/debian/debhelper.in/libc.templates new file mode 100644 index 00000000..44e4be81 --- /dev/null +++ b/debian/debhelper.in/libc.templates @@ -0,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 --git a/debian/debhelper.in/locales-all.NEWS b/debian/debhelper.in/locales-all.NEWS new file mode 100644 index 00000000..006de70b --- /dev/null +++ b/debian/debhelper.in/locales-all.NEWS @@ -0,0 +1,8 @@ +locales-all (2.7-1) unstable; urgency=low + + * Starting with locales 2.7-1 the deprecated no_NO locale has been + removed. Users who have not yet switched to nb_NO should do it + after the installation of this package. + + -- Aurelien Jarno Mon, 26 Nov 2007 18:56:32 +0100 + diff --git a/debian/debhelper.in/locales-all.dirs b/debian/debhelper.in/locales-all.dirs new file mode 100644 index 00000000..5f19b31d --- /dev/null +++ b/debian/debhelper.in/locales-all.dirs @@ -0,0 +1 @@ +usr/lib/locale diff --git a/debian/debhelper.in/locales-all.install b/debian/debhelper.in/locales-all.install new file mode 100644 index 00000000..392e822e --- /dev/null +++ b/debian/debhelper.in/locales-all.install @@ -0,0 +1 @@ +BUILD-TREE/locales-all/usr/lib/locale/* /usr/lib/locale diff --git a/debian/debhelper.in/locales-all.postinst b/debian/debhelper.in/locales-all.postinst new file mode 100644 index 00000000..6a95b00b --- /dev/null +++ b/debian/debhelper.in/locales-all.postinst @@ -0,0 +1,14 @@ +#!/bin/sh +set -e +export LC_ALL=C + +if [ "$1" = "configure" ]; then + # Remove existing locale-archive, otherwise they are prefered + # to the ones in this package + rm -f /usr/lib/locale/locale-archive 2>/dev/null || true +fi + +#DEBHELPER# + +exit 0 + diff --git a/debian/debhelper.in/locales-all.prerm b/debian/debhelper.in/locales-all.prerm new file mode 100644 index 00000000..382eb6a1 --- /dev/null +++ b/debian/debhelper.in/locales-all.prerm @@ -0,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 --git a/debian/debhelper.in/locales.NEWS b/debian/debhelper.in/locales.NEWS new file mode 100644 index 00000000..12b746a2 --- /dev/null +++ b/debian/debhelper.in/locales.NEWS @@ -0,0 +1,28 @@ +locales (2.7-3) unstable; urgency=low + + * Starting with locales 2.7-3, users can provide their own locales in + /usr/local/share/i18n. See /usr/share/doc/locales/README.Debian for + more information. + + -- Aurelien Jarno 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 --git a/debian/debhelper.in/locales.README.Debian b/debian/debhelper.in/locales.README.Debian new file mode 100644 index 00000000..3083b154 --- /dev/null +++ b/debian/debhelper.in/locales.README.Debian @@ -0,0 +1,17 @@ +locales +------- + + * Starting with locales 2.7-3, users can provide their own locales in + addition to the ones provided by the package. They will be handled + as other locales in the various scripts. + + Each user defined locale has to be provided as a single file and + placed in the /usr/local/share/i18n/locales/ directory. The list of + user defined locales should be placed, one by line, in the file + /usr/local/share/i18n/SUPPORTED. You can have a look to the locales + provided by the locales package in /usr/share/i18n/ for more details. + + To enable the new locales, just run 'dpkg-reconfigure locales' and + select the new locales. + + -- Aurelien Jarno Thu 29 Nov 2007 18:54:12 +0100 diff --git a/debian/debhelper.in/locales.config b/debian/debhelper.in/locales.config new file mode 100644 index 00000000..a0242c21 --- /dev/null +++ b/debian/debhelper.in/locales.config @@ -0,0 +1,109 @@ +#! /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 + +# This upgrades from Ubuntu << 16.04, where locale-gen wrote user locales +# to /var/lib/locales/supported.d/local, but we want them in /etc/locale.gen +if [ -f /var/lib/locales/supported.d/local ]; then + LOCAL_LOCALES="$(sed -e '/^[a-zA-Z]/!d' -e 's/ *$//g' /var/lib/locales/supported.d/local)" + LOCAL_LOCALES="$(convert_locale "$LOCAL_LOCALES")" + GEN_LOCALES=$(printf '%s\n' "$GEN_LOCALES" "$LOCAL_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 -o -f /var/lib/locales/supported.d/local ]; 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/ [^ ]*$//')" + for langpack in /var/lib/locales/supported.d/*; do + if [ -f $langpack ]; then + while read locale charset; do + DEFAULT_LOCALES="$DEFAULT_LOCALES, $locale" + done < $langpack + fi + done + 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 --git a/debian/debhelper.in/locales.dirs b/debian/debhelper.in/locales.dirs new file mode 100644 index 00000000..5f19b31d --- /dev/null +++ b/debian/debhelper.in/locales.dirs @@ -0,0 +1 @@ +usr/lib/locale diff --git a/debian/debhelper.in/locales.install b/debian/debhelper.in/locales.install new file mode 100644 index 00000000..17f45b5a --- /dev/null +++ b/debian/debhelper.in/locales.install @@ -0,0 +1,7 @@ +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 +debian/local/usr_share_locales/install-language-pack usr/share/locales +debian/local/usr_share_locales/remove-language-pack usr/share/locales diff --git a/debian/debhelper.in/locales.links b/debian/debhelper.in/locales.links new file mode 100644 index 00000000..01d3919e --- /dev/null +++ b/debian/debhelper.in/locales.links @@ -0,0 +1 @@ +etc/locale.alias usr/share/locale/locale.alias diff --git a/debian/debhelper.in/locales.manpages b/debian/debhelper.in/locales.manpages new file mode 100644 index 00000000..f7aca632 --- /dev/null +++ b/debian/debhelper.in/locales.manpages @@ -0,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 --git a/debian/debhelper.in/locales.postinst b/debian/debhelper.in/locales.postinst new file mode 100644 index 00000000..614d45a7 --- /dev/null +++ b/debian/debhelper.in/locales.postinst @@ -0,0 +1,85 @@ +#! /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 + # Remove cruft from locales from Ubuntu << 16.04: + if dpkg --compare-versions "$2" lt 2.23; then + rm -f /var/lib/locales/supported.d/local + rm -rf /var/lib/belocs + fi +fi + +#DEBHELPER# + +exit 0 diff --git a/debian/debhelper.in/locales.postrm b/debian/debhelper.in/locales.postrm new file mode 100644 index 00000000..3add654d --- /dev/null +++ b/debian/debhelper.in/locales.postrm @@ -0,0 +1,15 @@ +#!/bin/sh +set -e + +case "$1" in + purge) + rm -f /etc/locale.gen + rm -f /etc/default/locale + ;; + *) + ;; +esac + +#DEBHELPER# + +exit 0 diff --git a/debian/debhelper.in/locales.prerm b/debian/debhelper.in/locales.prerm new file mode 100644 index 00000000..30b3d6ba --- /dev/null +++ b/debian/debhelper.in/locales.prerm @@ -0,0 +1,19 @@ +#!/bin/sh +set -e + +case "$1" in + remove|purge) + # This test should be kept only for compatibility with old + # locales-all packages, new ones don't use locale-archive. + if ! [ -f /usr/lib/locales-all/supported.tar.lzma ] ; then + # If locales-all is not installed, clean the locales + rm -f /usr/lib/locale/locale-archive + fi + ;; + *) + ;; +esac + +#DEBHELPER# + +exit 0 diff --git a/debian/debhelper.in/locales.templates b/debian/debhelper.in/locales.templates new file mode 100644 index 00000000..2a3c5335 --- /dev/null +++ b/debian/debhelper.in/locales.templates @@ -0,0 +1,27 @@ +Template: locales/locales_to_be_generated +Type: multiselect +#flag:translate:1 +__Choices: All locales, ${locales} +_Description: Locales to be generated: + Locales are a framework to switch between multiple languages and + allow users to use their language, country, characters, collation + order, etc. + . + Please choose which locales to generate. UTF-8 locales should be + chosen by default, particularly for new installations. Other + character sets may be useful for backwards compatibility with older + systems and software. + +Template: locales/default_environment_locale +Type: select +#flag:translate:1 +__Choices: None, 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 --git a/debian/debhelper.in/nscd.dirs b/debian/debhelper.in/nscd.dirs new file mode 100644 index 00000000..4a278c4a --- /dev/null +++ b/debian/debhelper.in/nscd.dirs @@ -0,0 +1 @@ +var/cache/nscd diff --git a/debian/debhelper.in/nscd.init b/debian/debhelper.in/nscd.init new file mode 100644 index 00000000..4eeeb9e2 --- /dev/null +++ b/debian/debhelper.in/nscd.init @@ -0,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 --git a/debian/debhelper.in/nscd.install b/debian/debhelper.in/nscd.install new file mode 100644 index 00000000..440b39a5 --- /dev/null +++ b/debian/debhelper.in/nscd.install @@ -0,0 +1,3 @@ +debian/tmp-libc/usr/sbin/nscd usr/sbin +nscd/nscd.conf /etc + diff --git a/debian/debhelper.in/nscd.manpages b/debian/debhelper.in/nscd.manpages new file mode 100644 index 00000000..35d1692f --- /dev/null +++ b/debian/debhelper.in/nscd.manpages @@ -0,0 +1,2 @@ +debian/local/manpages/nscd.conf.5 +debian/local/manpages/nscd.8 diff --git a/debian/debhelper.in/nscd.postrm b/debian/debhelper.in/nscd.postrm new file mode 100644 index 00000000..899e0e6c --- /dev/null +++ b/debian/debhelper.in/nscd.postrm @@ -0,0 +1,14 @@ +#!/bin/sh +set -e + +case "$1" in + purge) + rm -rf /var/cache/nscd + ;; + *) + ;; +esac + +#DEBHELPER# + +exit 0 diff --git a/debian/generate-supported.mk b/debian/generate-supported.mk new file mode 100644 index 00000000..d2a28c2d --- /dev/null +++ b/debian/generate-supported.mk @@ -0,0 +1,11 @@ +#!/usr/bin/make + +include $(IN) + +all: + rm -f $(OUT) + touch $(OUT) + for locale in $(SUPPORTED-LOCALES); do \ + [ $$locale = true ] && continue; \ + echo $$locale | sed 's,/, ,' >> $(OUT); \ + done diff --git a/debian/glibc-source.filelist b/debian/glibc-source.filelist new file mode 100644 index 00000000..b17fcbd2 --- /dev/null +++ b/debian/glibc-source.filelist @@ -0,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 --git a/debian/libc0.1-i386.symbols.kfreebsd-amd64 b/debian/libc0.1-i386.symbols.kfreebsd-amd64 new file mode 100644 index 00000000..8e7f6277 --- /dev/null +++ b/debian/libc0.1-i386.symbols.kfreebsd-amd64 @@ -0,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 --git a/debian/libc0.1.symbols.common b/debian/libc0.1.symbols.common new file mode 100644 index 00000000..a20b91a1 --- /dev/null +++ b/debian/libc0.1.symbols.common @@ -0,0 +1,59 @@ +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" +libnss_nis.so.2 #PACKAGE# (>= 2.17-91), #PACKAGE# #MINVER# +#include "symbols.wildcards" +libnss_nisplus.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 --git a/debian/libc0.1.symbols.kfreebsd-amd64 b/debian/libc0.1.symbols.kfreebsd-amd64 new file mode 100644 index 00000000..a4636b30 --- /dev/null +++ b/debian/libc0.1.symbols.kfreebsd-amd64 @@ -0,0 +1,3 @@ +#include "libc0.1.symbols.common" +ld-kfreebsd-x86-64.so.1 #PACKAGE# (>= 2.17-91), #PACKAGE# #MINVER# +#include "symbols.wildcards" diff --git a/debian/libc0.1.symbols.kfreebsd-i386 b/debian/libc0.1.symbols.kfreebsd-i386 new file mode 100644 index 00000000..4268c43d --- /dev/null +++ b/debian/libc0.1.symbols.kfreebsd-i386 @@ -0,0 +1,3 @@ +#include "libc0.1.symbols.common" +ld.so.1 #PACKAGE# (>= 2.17-91), #PACKAGE# #MINVER# +#include "symbols.wildcards" diff --git a/debian/libc0.3.symbols.hurd-i386 b/debian/libc0.3.symbols.hurd-i386 new file mode 100644 index 00000000..93ccdbb4 --- /dev/null +++ b/debian/libc0.3.symbols.hurd-i386 @@ -0,0 +1,1140 @@ +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 +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" +libnss_nis.so.2 #PACKAGE# #MINVER# +#include "symbols.wildcards" +libnss_nisplus.so.2 #PACKAGE# #MINVER# +#include "symbols.wildcards" +libpcprofile.so #PACKAGE# #MINVER# + __cyg_profile_func_enter@Base 2.3.6 + __cyg_profile_func_exit@Base 2.3.6 +#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_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_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_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_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_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_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~ diff --git a/debian/libc6-amd64.symbols.i386 b/debian/libc6-amd64.symbols.i386 new file mode 100644 index 00000000..6d3201ff --- /dev/null +++ b/debian/libc6-amd64.symbols.i386 @@ -0,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 --git a/debian/libc6-amd64.symbols.x32 b/debian/libc6-amd64.symbols.x32 new file mode 100644 index 00000000..6d3201ff --- /dev/null +++ b/debian/libc6-amd64.symbols.x32 @@ -0,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 --git a/debian/libc6-i386.symbols.amd64 b/debian/libc6-i386.symbols.amd64 new file mode 100644 index 00000000..357d2f26 --- /dev/null +++ b/debian/libc6-i386.symbols.amd64 @@ -0,0 +1,5 @@ +#include "libc6.symbols.common" +ld-linux.so.2 #PACKAGE# #MINVER# +#include "symbols.wildcards" +libc.so.6 #PACKAGE# #MINVER# +#include "symbols.wildcards" diff --git a/debian/libc6-i386.symbols.x32 b/debian/libc6-i386.symbols.x32 new file mode 100644 index 00000000..442e5cd3 --- /dev/null +++ b/debian/libc6-i386.symbols.x32 @@ -0,0 +1,12 @@ +#include "libc6.symbols.common" +ld-linux.so.2 #PACKAGE# #MINVER# +#include "symbols.wildcards" +### TLS support enabled with Debian upload 2.3.6-6 + __tls_get_addr@GLIBC_2.3 2.3.6-6~ +libc.so.6 #PACKAGE# #MINVER# +#include "symbols.wildcards" +### +### Override headers already defined in libc6.symbols.common +### +libpthread.so.0 #PACKAGE# (>= 2.3.6-6~), #PACKAGE# #MINVER# +#include "symbols.wildcards" diff --git a/debian/libc6-mips32.symbols.mips64 b/debian/libc6-mips32.symbols.mips64 new file mode 100644 index 00000000..59332301 --- /dev/null +++ b/debian/libc6-mips32.symbols.mips64 @@ -0,0 +1,5 @@ +#include "libc6.symbols.common" +ld.so.1 #PACKAGE# #MINVER# +#include "symbols.wildcards" +libc.so.6 #PACKAGE# #MINVER# +#include "symbols.wildcards" diff --git a/debian/libc6-mips32.symbols.mips64el b/debian/libc6-mips32.symbols.mips64el new file mode 100644 index 00000000..59332301 --- /dev/null +++ b/debian/libc6-mips32.symbols.mips64el @@ -0,0 +1,5 @@ +#include "libc6.symbols.common" +ld.so.1 #PACKAGE# #MINVER# +#include "symbols.wildcards" +libc.so.6 #PACKAGE# #MINVER# +#include "symbols.wildcards" diff --git a/debian/libc6-mips32.symbols.mips64r6 b/debian/libc6-mips32.symbols.mips64r6 new file mode 100644 index 00000000..59332301 --- /dev/null +++ b/debian/libc6-mips32.symbols.mips64r6 @@ -0,0 +1,5 @@ +#include "libc6.symbols.common" +ld.so.1 #PACKAGE# #MINVER# +#include "symbols.wildcards" +libc.so.6 #PACKAGE# #MINVER# +#include "symbols.wildcards" diff --git a/debian/libc6-mips32.symbols.mips64r6el b/debian/libc6-mips32.symbols.mips64r6el new file mode 100644 index 00000000..59332301 --- /dev/null +++ b/debian/libc6-mips32.symbols.mips64r6el @@ -0,0 +1,5 @@ +#include "libc6.symbols.common" +ld.so.1 #PACKAGE# #MINVER# +#include "symbols.wildcards" +libc.so.6 #PACKAGE# #MINVER# +#include "symbols.wildcards" diff --git a/debian/libc6-mips32.symbols.mipsn32 b/debian/libc6-mips32.symbols.mipsn32 new file mode 100644 index 00000000..59332301 --- /dev/null +++ b/debian/libc6-mips32.symbols.mipsn32 @@ -0,0 +1,5 @@ +#include "libc6.symbols.common" +ld.so.1 #PACKAGE# #MINVER# +#include "symbols.wildcards" +libc.so.6 #PACKAGE# #MINVER# +#include "symbols.wildcards" diff --git a/debian/libc6-mips32.symbols.mipsn32el b/debian/libc6-mips32.symbols.mipsn32el new file mode 100644 index 00000000..59332301 --- /dev/null +++ b/debian/libc6-mips32.symbols.mipsn32el @@ -0,0 +1,5 @@ +#include "libc6.symbols.common" +ld.so.1 #PACKAGE# #MINVER# +#include "symbols.wildcards" +libc.so.6 #PACKAGE# #MINVER# +#include "symbols.wildcards" diff --git a/debian/libc6-mips32.symbols.mipsn32r6 b/debian/libc6-mips32.symbols.mipsn32r6 new file mode 100644 index 00000000..59332301 --- /dev/null +++ b/debian/libc6-mips32.symbols.mipsn32r6 @@ -0,0 +1,5 @@ +#include "libc6.symbols.common" +ld.so.1 #PACKAGE# #MINVER# +#include "symbols.wildcards" +libc.so.6 #PACKAGE# #MINVER# +#include "symbols.wildcards" diff --git a/debian/libc6-mips32.symbols.mipsn32r6el b/debian/libc6-mips32.symbols.mipsn32r6el new file mode 100644 index 00000000..59332301 --- /dev/null +++ b/debian/libc6-mips32.symbols.mipsn32r6el @@ -0,0 +1,5 @@ +#include "libc6.symbols.common" +ld.so.1 #PACKAGE# #MINVER# +#include "symbols.wildcards" +libc.so.6 #PACKAGE# #MINVER# +#include "symbols.wildcards" diff --git a/debian/libc6-mips64.symbols.mips b/debian/libc6-mips64.symbols.mips new file mode 100644 index 00000000..59332301 --- /dev/null +++ b/debian/libc6-mips64.symbols.mips @@ -0,0 +1,5 @@ +#include "libc6.symbols.common" +ld.so.1 #PACKAGE# #MINVER# +#include "symbols.wildcards" +libc.so.6 #PACKAGE# #MINVER# +#include "symbols.wildcards" diff --git a/debian/libc6-mips64.symbols.mipsel b/debian/libc6-mips64.symbols.mipsel new file mode 100644 index 00000000..59332301 --- /dev/null +++ b/debian/libc6-mips64.symbols.mipsel @@ -0,0 +1,5 @@ +#include "libc6.symbols.common" +ld.so.1 #PACKAGE# #MINVER# +#include "symbols.wildcards" +libc.so.6 #PACKAGE# #MINVER# +#include "symbols.wildcards" diff --git a/debian/libc6-mips64.symbols.mipsn32 b/debian/libc6-mips64.symbols.mipsn32 new file mode 100644 index 00000000..59332301 --- /dev/null +++ b/debian/libc6-mips64.symbols.mipsn32 @@ -0,0 +1,5 @@ +#include "libc6.symbols.common" +ld.so.1 #PACKAGE# #MINVER# +#include "symbols.wildcards" +libc.so.6 #PACKAGE# #MINVER# +#include "symbols.wildcards" diff --git a/debian/libc6-mips64.symbols.mipsn32el b/debian/libc6-mips64.symbols.mipsn32el new file mode 100644 index 00000000..59332301 --- /dev/null +++ b/debian/libc6-mips64.symbols.mipsn32el @@ -0,0 +1,5 @@ +#include "libc6.symbols.common" +ld.so.1 #PACKAGE# #MINVER# +#include "symbols.wildcards" +libc.so.6 #PACKAGE# #MINVER# +#include "symbols.wildcards" diff --git a/debian/libc6-mips64.symbols.mipsn32r6 b/debian/libc6-mips64.symbols.mipsn32r6 new file mode 100644 index 00000000..59332301 --- /dev/null +++ b/debian/libc6-mips64.symbols.mipsn32r6 @@ -0,0 +1,5 @@ +#include "libc6.symbols.common" +ld.so.1 #PACKAGE# #MINVER# +#include "symbols.wildcards" +libc.so.6 #PACKAGE# #MINVER# +#include "symbols.wildcards" diff --git a/debian/libc6-mips64.symbols.mipsn32r6el b/debian/libc6-mips64.symbols.mipsn32r6el new file mode 100644 index 00000000..59332301 --- /dev/null +++ b/debian/libc6-mips64.symbols.mipsn32r6el @@ -0,0 +1,5 @@ +#include "libc6.symbols.common" +ld.so.1 #PACKAGE# #MINVER# +#include "symbols.wildcards" +libc.so.6 #PACKAGE# #MINVER# +#include "symbols.wildcards" diff --git a/debian/libc6-mips64.symbols.mipsr6 b/debian/libc6-mips64.symbols.mipsr6 new file mode 100644 index 00000000..59332301 --- /dev/null +++ b/debian/libc6-mips64.symbols.mipsr6 @@ -0,0 +1,5 @@ +#include "libc6.symbols.common" +ld.so.1 #PACKAGE# #MINVER# +#include "symbols.wildcards" +libc.so.6 #PACKAGE# #MINVER# +#include "symbols.wildcards" diff --git a/debian/libc6-mips64.symbols.mipsr6el b/debian/libc6-mips64.symbols.mipsr6el new file mode 100644 index 00000000..59332301 --- /dev/null +++ b/debian/libc6-mips64.symbols.mipsr6el @@ -0,0 +1,5 @@ +#include "libc6.symbols.common" +ld.so.1 #PACKAGE# #MINVER# +#include "symbols.wildcards" +libc.so.6 #PACKAGE# #MINVER# +#include "symbols.wildcards" diff --git a/debian/libc6-mipsn32.symbols.mips b/debian/libc6-mipsn32.symbols.mips new file mode 100644 index 00000000..59332301 --- /dev/null +++ b/debian/libc6-mipsn32.symbols.mips @@ -0,0 +1,5 @@ +#include "libc6.symbols.common" +ld.so.1 #PACKAGE# #MINVER# +#include "symbols.wildcards" +libc.so.6 #PACKAGE# #MINVER# +#include "symbols.wildcards" diff --git a/debian/libc6-mipsn32.symbols.mips64 b/debian/libc6-mipsn32.symbols.mips64 new file mode 100644 index 00000000..59332301 --- /dev/null +++ b/debian/libc6-mipsn32.symbols.mips64 @@ -0,0 +1,5 @@ +#include "libc6.symbols.common" +ld.so.1 #PACKAGE# #MINVER# +#include "symbols.wildcards" +libc.so.6 #PACKAGE# #MINVER# +#include "symbols.wildcards" diff --git a/debian/libc6-mipsn32.symbols.mips64el b/debian/libc6-mipsn32.symbols.mips64el new file mode 100644 index 00000000..59332301 --- /dev/null +++ b/debian/libc6-mipsn32.symbols.mips64el @@ -0,0 +1,5 @@ +#include "libc6.symbols.common" +ld.so.1 #PACKAGE# #MINVER# +#include "symbols.wildcards" +libc.so.6 #PACKAGE# #MINVER# +#include "symbols.wildcards" diff --git a/debian/libc6-mipsn32.symbols.mips64r6 b/debian/libc6-mipsn32.symbols.mips64r6 new file mode 100644 index 00000000..59332301 --- /dev/null +++ b/debian/libc6-mipsn32.symbols.mips64r6 @@ -0,0 +1,5 @@ +#include "libc6.symbols.common" +ld.so.1 #PACKAGE# #MINVER# +#include "symbols.wildcards" +libc.so.6 #PACKAGE# #MINVER# +#include "symbols.wildcards" diff --git a/debian/libc6-mipsn32.symbols.mips64r6el b/debian/libc6-mipsn32.symbols.mips64r6el new file mode 100644 index 00000000..59332301 --- /dev/null +++ b/debian/libc6-mipsn32.symbols.mips64r6el @@ -0,0 +1,5 @@ +#include "libc6.symbols.common" +ld.so.1 #PACKAGE# #MINVER# +#include "symbols.wildcards" +libc.so.6 #PACKAGE# #MINVER# +#include "symbols.wildcards" diff --git a/debian/libc6-mipsn32.symbols.mipsel b/debian/libc6-mipsn32.symbols.mipsel new file mode 100644 index 00000000..59332301 --- /dev/null +++ b/debian/libc6-mipsn32.symbols.mipsel @@ -0,0 +1,5 @@ +#include "libc6.symbols.common" +ld.so.1 #PACKAGE# #MINVER# +#include "symbols.wildcards" +libc.so.6 #PACKAGE# #MINVER# +#include "symbols.wildcards" diff --git a/debian/libc6-mipsn32.symbols.mipsr6 b/debian/libc6-mipsn32.symbols.mipsr6 new file mode 100644 index 00000000..59332301 --- /dev/null +++ b/debian/libc6-mipsn32.symbols.mipsr6 @@ -0,0 +1,5 @@ +#include "libc6.symbols.common" +ld.so.1 #PACKAGE# #MINVER# +#include "symbols.wildcards" +libc.so.6 #PACKAGE# #MINVER# +#include "symbols.wildcards" diff --git a/debian/libc6-mipsn32.symbols.mipsr6el b/debian/libc6-mipsn32.symbols.mipsr6el new file mode 100644 index 00000000..59332301 --- /dev/null +++ b/debian/libc6-mipsn32.symbols.mipsr6el @@ -0,0 +1,5 @@ +#include "libc6.symbols.common" +ld.so.1 #PACKAGE# #MINVER# +#include "symbols.wildcards" +libc.so.6 #PACKAGE# #MINVER# +#include "symbols.wildcards" diff --git a/debian/libc6-ppc64.symbols.powerpc b/debian/libc6-ppc64.symbols.powerpc new file mode 100644 index 00000000..5c61fda8 --- /dev/null +++ b/debian/libc6-ppc64.symbols.powerpc @@ -0,0 +1,5 @@ +#include "libc6.symbols.common" +ld64.so.1 #PACKAGE# #MINVER# +#include "symbols.wildcards" +libc.so.6 #PACKAGE# #MINVER# +#include "symbols.wildcards" diff --git a/debian/libc6-s390.symbols.s390x b/debian/libc6-s390.symbols.s390x new file mode 100644 index 00000000..59332301 --- /dev/null +++ b/debian/libc6-s390.symbols.s390x @@ -0,0 +1,5 @@ +#include "libc6.symbols.common" +ld.so.1 #PACKAGE# #MINVER# +#include "symbols.wildcards" +libc.so.6 #PACKAGE# #MINVER# +#include "symbols.wildcards" diff --git a/debian/libc6-sparc.symbols.sparc64 b/debian/libc6-sparc.symbols.sparc64 new file mode 100644 index 00000000..8aabdce2 --- /dev/null +++ b/debian/libc6-sparc.symbols.sparc64 @@ -0,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 --git a/debian/libc6-sparc64.symbols.sparc b/debian/libc6-sparc64.symbols.sparc new file mode 100644 index 00000000..357d2f26 --- /dev/null +++ b/debian/libc6-sparc64.symbols.sparc @@ -0,0 +1,5 @@ +#include "libc6.symbols.common" +ld-linux.so.2 #PACKAGE# #MINVER# +#include "symbols.wildcards" +libc.so.6 #PACKAGE# #MINVER# +#include "symbols.wildcards" diff --git a/debian/libc6-x32.symbols.amd64 b/debian/libc6-x32.symbols.amd64 new file mode 100644 index 00000000..d2c11a5a --- /dev/null +++ b/debian/libc6-x32.symbols.amd64 @@ -0,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 --git a/debian/libc6-x32.symbols.i386 b/debian/libc6-x32.symbols.i386 new file mode 100644 index 00000000..d2c11a5a --- /dev/null +++ b/debian/libc6-x32.symbols.i386 @@ -0,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 --git a/debian/libc6.1.symbols.alpha b/debian/libc6.1.symbols.alpha new file mode 100644 index 00000000..17d1c58e --- /dev/null +++ b/debian/libc6.1.symbols.alpha @@ -0,0 +1,54 @@ +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" +libnss_nis.so.2 #PACKAGE# #MINVER# +#include "symbols.wildcards" +libnss_nisplus.so.2 #PACKAGE# #MINVER# +#include "symbols.wildcards" +libpcprofile.so #PACKAGE# #MINVER# + __cyg_profile_func_enter@Base 2.3.6 + __cyg_profile_func_exit@Base 2.3.6 +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 --git a/debian/libc6.symbols.amd64 b/debian/libc6.symbols.amd64 new file mode 100644 index 00000000..6d3201ff --- /dev/null +++ b/debian/libc6.symbols.amd64 @@ -0,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 --git a/debian/libc6.symbols.arm b/debian/libc6.symbols.arm new file mode 100644 index 00000000..7aaffeca --- /dev/null +++ b/debian/libc6.symbols.arm @@ -0,0 +1,12 @@ +#include "libc6.symbols.common" +ld-linux.so.2 #PACKAGE# #MINVER# +#include "symbols.wildcards" +### TLS support enabled in Debian upload 2.4 + __tls_get_addr@GLIBC_2.3 2.4 +libc.so.6 #PACKAGE# #MINVER# +#include "symbols.wildcards" +### +### Override headers already defined in libc6.symbols.common +### +libpthread.so.0 #PACKAGE# (>= 2.4), #PACKAGE# #MINVER# +#include "symbols.wildcards" diff --git a/debian/libc6.symbols.arm64 b/debian/libc6.symbols.arm64 new file mode 100644 index 00000000..9c58fbac --- /dev/null +++ b/debian/libc6.symbols.arm64 @@ -0,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 --git a/debian/libc6.symbols.armel b/debian/libc6.symbols.armel new file mode 100644 index 00000000..389631c2 --- /dev/null +++ b/debian/libc6.symbols.armel @@ -0,0 +1,9 @@ +#include "libc6.symbols.common" +ld-linux.so.3 #PACKAGE# #MINVER# +#include "symbols.wildcards" +libc.so.6 #PACKAGE# #MINVER# +#include "symbols.wildcards" + getcontext@GLIBC_2.4 2.13-31 + makecontext@GLIBC_2.4 2.13-31 + setcontext@GLIBC_2.4 2.13-31 + swapcontext@GLIBC_2.4 2.13-31 diff --git a/debian/libc6.symbols.armhf b/debian/libc6.symbols.armhf new file mode 100644 index 00000000..3a029db5 --- /dev/null +++ b/debian/libc6.symbols.armhf @@ -0,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 --git a/debian/libc6.symbols.common b/debian/libc6.symbols.common new file mode 100644 index 00000000..98514440 --- /dev/null +++ b/debian/libc6.symbols.common @@ -0,0 +1,50 @@ +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" +libnss_nis.so.2 #PACKAGE# #MINVER# +#include "symbols.wildcards" +libnss_nisplus.so.2 #PACKAGE# #MINVER# +#include "symbols.wildcards" +libpcprofile.so #PACKAGE# #MINVER# + __cyg_profile_func_enter@Base 2.3.6 + __cyg_profile_func_exit@Base 2.3.6 +#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 --git a/debian/libc6.symbols.hppa b/debian/libc6.symbols.hppa new file mode 100644 index 00000000..ed0026fd --- /dev/null +++ b/debian/libc6.symbols.hppa @@ -0,0 +1,33 @@ +#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" +libnss_nis.so.2 #PACKAGE# (>= 2.11), #PACKAGE# #MINVER# +#include "symbols.wildcards" diff --git a/debian/libc6.symbols.i386 b/debian/libc6.symbols.i386 new file mode 100644 index 00000000..442e5cd3 --- /dev/null +++ b/debian/libc6.symbols.i386 @@ -0,0 +1,12 @@ +#include "libc6.symbols.common" +ld-linux.so.2 #PACKAGE# #MINVER# +#include "symbols.wildcards" +### TLS support enabled with Debian upload 2.3.6-6 + __tls_get_addr@GLIBC_2.3 2.3.6-6~ +libc.so.6 #PACKAGE# #MINVER# +#include "symbols.wildcards" +### +### Override headers already defined in libc6.symbols.common +### +libpthread.so.0 #PACKAGE# (>= 2.3.6-6~), #PACKAGE# #MINVER# +#include "symbols.wildcards" diff --git a/debian/libc6.symbols.m68k b/debian/libc6.symbols.m68k new file mode 100644 index 00000000..59332301 --- /dev/null +++ b/debian/libc6.symbols.m68k @@ -0,0 +1,5 @@ +#include "libc6.symbols.common" +ld.so.1 #PACKAGE# #MINVER# +#include "symbols.wildcards" +libc.so.6 #PACKAGE# #MINVER# +#include "symbols.wildcards" diff --git a/debian/libc6.symbols.mips b/debian/libc6.symbols.mips new file mode 100644 index 00000000..bfe690b3 --- /dev/null +++ b/debian/libc6.symbols.mips @@ -0,0 +1,12 @@ +#include "libc6.symbols.common" +ld.so.1 #PACKAGE# #MINVER# +#include "symbols.wildcards" +### TLS support enabled in Debian upload 2.4 + __tls_get_addr@GLIBC_2.3 2.4 +libc.so.6 #PACKAGE# #MINVER# +#include "symbols.wildcards" +### +### Override headers already defined in libc6.symbols.common +### +libpthread.so.0 #PACKAGE# (>= 2.4), #PACKAGE# #MINVER# +#include "symbols.wildcards" diff --git a/debian/libc6.symbols.mips64 b/debian/libc6.symbols.mips64 new file mode 100644 index 00000000..59332301 --- /dev/null +++ b/debian/libc6.symbols.mips64 @@ -0,0 +1,5 @@ +#include "libc6.symbols.common" +ld.so.1 #PACKAGE# #MINVER# +#include "symbols.wildcards" +libc.so.6 #PACKAGE# #MINVER# +#include "symbols.wildcards" diff --git a/debian/libc6.symbols.mips64el b/debian/libc6.symbols.mips64el new file mode 100644 index 00000000..59332301 --- /dev/null +++ b/debian/libc6.symbols.mips64el @@ -0,0 +1,5 @@ +#include "libc6.symbols.common" +ld.so.1 #PACKAGE# #MINVER# +#include "symbols.wildcards" +libc.so.6 #PACKAGE# #MINVER# +#include "symbols.wildcards" diff --git a/debian/libc6.symbols.mips64r6 b/debian/libc6.symbols.mips64r6 new file mode 100644 index 00000000..59332301 --- /dev/null +++ b/debian/libc6.symbols.mips64r6 @@ -0,0 +1,5 @@ +#include "libc6.symbols.common" +ld.so.1 #PACKAGE# #MINVER# +#include "symbols.wildcards" +libc.so.6 #PACKAGE# #MINVER# +#include "symbols.wildcards" diff --git a/debian/libc6.symbols.mips64r6el b/debian/libc6.symbols.mips64r6el new file mode 100644 index 00000000..59332301 --- /dev/null +++ b/debian/libc6.symbols.mips64r6el @@ -0,0 +1,5 @@ +#include "libc6.symbols.common" +ld.so.1 #PACKAGE# #MINVER# +#include "symbols.wildcards" +libc.so.6 #PACKAGE# #MINVER# +#include "symbols.wildcards" diff --git a/debian/libc6.symbols.mipsel b/debian/libc6.symbols.mipsel new file mode 100644 index 00000000..bfe690b3 --- /dev/null +++ b/debian/libc6.symbols.mipsel @@ -0,0 +1,12 @@ +#include "libc6.symbols.common" +ld.so.1 #PACKAGE# #MINVER# +#include "symbols.wildcards" +### TLS support enabled in Debian upload 2.4 + __tls_get_addr@GLIBC_2.3 2.4 +libc.so.6 #PACKAGE# #MINVER# +#include "symbols.wildcards" +### +### Override headers already defined in libc6.symbols.common +### +libpthread.so.0 #PACKAGE# (>= 2.4), #PACKAGE# #MINVER# +#include "symbols.wildcards" diff --git a/debian/libc6.symbols.mipsn32 b/debian/libc6.symbols.mipsn32 new file mode 100644 index 00000000..59332301 --- /dev/null +++ b/debian/libc6.symbols.mipsn32 @@ -0,0 +1,5 @@ +#include "libc6.symbols.common" +ld.so.1 #PACKAGE# #MINVER# +#include "symbols.wildcards" +libc.so.6 #PACKAGE# #MINVER# +#include "symbols.wildcards" diff --git a/debian/libc6.symbols.mipsn32el b/debian/libc6.symbols.mipsn32el new file mode 100644 index 00000000..59332301 --- /dev/null +++ b/debian/libc6.symbols.mipsn32el @@ -0,0 +1,5 @@ +#include "libc6.symbols.common" +ld.so.1 #PACKAGE# #MINVER# +#include "symbols.wildcards" +libc.so.6 #PACKAGE# #MINVER# +#include "symbols.wildcards" diff --git a/debian/libc6.symbols.mipsn32r6 b/debian/libc6.symbols.mipsn32r6 new file mode 100644 index 00000000..59332301 --- /dev/null +++ b/debian/libc6.symbols.mipsn32r6 @@ -0,0 +1,5 @@ +#include "libc6.symbols.common" +ld.so.1 #PACKAGE# #MINVER# +#include "symbols.wildcards" +libc.so.6 #PACKAGE# #MINVER# +#include "symbols.wildcards" diff --git a/debian/libc6.symbols.mipsn32r6el b/debian/libc6.symbols.mipsn32r6el new file mode 100644 index 00000000..59332301 --- /dev/null +++ b/debian/libc6.symbols.mipsn32r6el @@ -0,0 +1,5 @@ +#include "libc6.symbols.common" +ld.so.1 #PACKAGE# #MINVER# +#include "symbols.wildcards" +libc.so.6 #PACKAGE# #MINVER# +#include "symbols.wildcards" diff --git a/debian/libc6.symbols.mipsr6 b/debian/libc6.symbols.mipsr6 new file mode 100644 index 00000000..59332301 --- /dev/null +++ b/debian/libc6.symbols.mipsr6 @@ -0,0 +1,5 @@ +#include "libc6.symbols.common" +ld.so.1 #PACKAGE# #MINVER# +#include "symbols.wildcards" +libc.so.6 #PACKAGE# #MINVER# +#include "symbols.wildcards" diff --git a/debian/libc6.symbols.mipsr6el b/debian/libc6.symbols.mipsr6el new file mode 100644 index 00000000..59332301 --- /dev/null +++ b/debian/libc6.symbols.mipsr6el @@ -0,0 +1,5 @@ +#include "libc6.symbols.common" +ld.so.1 #PACKAGE# #MINVER# +#include "symbols.wildcards" +libc.so.6 #PACKAGE# #MINVER# +#include "symbols.wildcards" diff --git a/debian/libc6.symbols.powerpc b/debian/libc6.symbols.powerpc new file mode 100644 index 00000000..a8f71670 --- /dev/null +++ b/debian/libc6.symbols.powerpc @@ -0,0 +1,12 @@ +#include "libc6.symbols.common" +ld.so.1 #PACKAGE# #MINVER# +#include "symbols.wildcards" +### TLS support enabled in Debian upload 2.3.5 + __tls_get_addr@GLIBC_2.3 2.3.5 +libc.so.6 #PACKAGE# #MINVER# +#include "symbols.wildcards" +### +### Override headers already defined in libc6.symbols.common +### +libpthread.so.0 #PACKAGE# (>= 2.3.5), #PACKAGE# #MINVER# +#include "symbols.wildcards" diff --git a/debian/libc6.symbols.ppc64 b/debian/libc6.symbols.ppc64 new file mode 100644 index 00000000..5c61fda8 --- /dev/null +++ b/debian/libc6.symbols.ppc64 @@ -0,0 +1,5 @@ +#include "libc6.symbols.common" +ld64.so.1 #PACKAGE# #MINVER# +#include "symbols.wildcards" +libc.so.6 #PACKAGE# #MINVER# +#include "symbols.wildcards" diff --git a/debian/libc6.symbols.ppc64el b/debian/libc6.symbols.ppc64el new file mode 100644 index 00000000..624aec17 --- /dev/null +++ b/debian/libc6.symbols.ppc64el @@ -0,0 +1,5 @@ +#include "libc6.symbols.common" +ld64.so.2 #PACKAGE# #MINVER# +#include "symbols.wildcards" +libc.so.6 #PACKAGE# #MINVER# +#include "symbols.wildcards" diff --git a/debian/libc6.symbols.riscv64 b/debian/libc6.symbols.riscv64 new file mode 100644 index 00000000..9e4205c8 --- /dev/null +++ b/debian/libc6.symbols.riscv64 @@ -0,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 --git a/debian/libc6.symbols.s390x b/debian/libc6.symbols.s390x new file mode 100644 index 00000000..5c61fda8 --- /dev/null +++ b/debian/libc6.symbols.s390x @@ -0,0 +1,5 @@ +#include "libc6.symbols.common" +ld64.so.1 #PACKAGE# #MINVER# +#include "symbols.wildcards" +libc.so.6 #PACKAGE# #MINVER# +#include "symbols.wildcards" diff --git a/debian/libc6.symbols.sparc b/debian/libc6.symbols.sparc new file mode 100644 index 00000000..0b46e5a5 --- /dev/null +++ b/debian/libc6.symbols.sparc @@ -0,0 +1,48 @@ +#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" +libnss_nis.so.2 #PACKAGE# (>= 2.6), #PACKAGE# #MINVER# +#include "symbols.wildcards" +libnss_nisplus.so.2 #PACKAGE# (>= 2.6), #PACKAGE# #MINVER# +#include "symbols.wildcards" +libpcprofile.so #PACKAGE# (>= 2.6), #PACKAGE# #MINVER# +#include "symbols.wildcards" +libresolv.so.2 #PACKAGE# (>= 2.6), #PACKAGE# #MINVER# +#include "symbols.wildcards" +librt.so.1 #PACKAGE# (>= 2.6), #PACKAGE# #MINVER# +#include "symbols.wildcards" +libutil.so.1 #PACKAGE# (>= 2.6), #PACKAGE# #MINVER# +#include "symbols.wildcards" +libanl.so.1 #PACKAGE# (>= 2.6), #PACKAGE# #MINVER# +#include "symbols.wildcards" +libpthread.so.0 #PACKAGE# (>= 2.6), #PACKAGE# #MINVER# +#include "symbols.wildcards" +libthread_db.so.1 #PACKAGE# (>= 2.6), #PACKAGE# #MINVER# +#include "symbols.wildcards" diff --git a/debian/libc6.symbols.sparc64 b/debian/libc6.symbols.sparc64 new file mode 100644 index 00000000..357d2f26 --- /dev/null +++ b/debian/libc6.symbols.sparc64 @@ -0,0 +1,5 @@ +#include "libc6.symbols.common" +ld-linux.so.2 #PACKAGE# #MINVER# +#include "symbols.wildcards" +libc.so.6 #PACKAGE# #MINVER# +#include "symbols.wildcards" diff --git a/debian/libc6.symbols.x32 b/debian/libc6.symbols.x32 new file mode 100644 index 00000000..d2c11a5a --- /dev/null +++ b/debian/libc6.symbols.x32 @@ -0,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 --git a/debian/local/etc/bindresvport.blacklist b/debian/local/etc/bindresvport.blacklist new file mode 100644 index 00000000..1dc056eb --- /dev/null +++ b/debian/local/etc/bindresvport.blacklist @@ -0,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 --git a/debian/local/etc/ld.so.conf b/debian/local/etc/ld.so.conf new file mode 100644 index 00000000..20c97630 --- /dev/null +++ b/debian/local/etc/ld.so.conf @@ -0,0 +1,2 @@ +include /etc/ld.so.conf.d/*.conf + diff --git a/debian/local/etc/ld.so.conf.d/libc.conf b/debian/local/etc/ld.so.conf.d/libc.conf new file mode 100644 index 00000000..463b8bb7 --- /dev/null +++ b/debian/local/etc/ld.so.conf.d/libc.conf @@ -0,0 +1,2 @@ +# libc default configuration +/usr/local/lib diff --git a/debian/local/etc/nsswitch.conf b/debian/local/etc/nsswitch.conf new file mode 100644 index 00000000..f20778e8 --- /dev/null +++ b/debian/local/etc/nsswitch.conf @@ -0,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 --git a/debian/local/manpages/Makefile b/debian/local/manpages/Makefile new file mode 100644 index 00000000..73265be4 --- /dev/null +++ b/debian/local/manpages/Makefile @@ -0,0 +1,20 @@ +#! /usr/bin/make -f + +DIRS := de es fr id pl pt_BR + +SGML_MAN = locale-gen.8 + +all: $(patsubst %.pod,%.1,$(wildcard *.pod)) $(SGML_MAN) po4a-man +%.1: %.pod + pod2man --center="Debian GNU/Linux" --release="etch" $< > $@ + +locale-gen.8: locale-gen.8.sgml + docbook-to-man $< > $@ + +po4a-man: + po4a -q po4a.cfg + +clean: + po4a -q po4a.cfg + $(foreach dir, $(DIRS), rm -rf $(dir)/*.8) + rm -f po/*~ diff --git a/debian/local/manpages/catchsegv.1 b/debian/local/manpages/catchsegv.1 new file mode 100644 index 00000000..4a831ff4 --- /dev/null +++ b/debian/local/manpages/catchsegv.1 @@ -0,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 --git a/debian/local/manpages/de/validlocale.de.8 b/debian/local/manpages/de/validlocale.de.8 new file mode 100644 index 00000000..885c1d25 --- /dev/null +++ b/debian/local/manpages/de/validlocale.de.8 @@ -0,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 --git a/debian/local/manpages/es/addendum.es b/debian/local/manpages/es/addendum.es new file mode 100644 index 00000000..2cf510dc --- /dev/null +++ b/debian/local/manpages/es/addendum.es @@ -0,0 +1,3 @@ + +.SH TRADUCTOR +Traducción de Rubén Porras Campo diff --git a/debian/local/manpages/es/validlocale.es.8 b/debian/local/manpages/es/validlocale.es.8 new file mode 100644 index 00000000..9ec4102c --- /dev/null +++ b/debian/local/manpages/es/validlocale.es.8 @@ -0,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 --git a/debian/local/manpages/fr/addendum.fr b/debian/local/manpages/fr/addendum.fr new file mode 100644 index 00000000..da2d2ffa --- /dev/null +++ b/debian/local/manpages/fr/addendum.fr @@ -0,0 +1,4 @@ +PO4A-HEADER:mode=after;position=AUTEUR;beginboundary=\.SH + +.SH "TRADUCTION" +Clément Stenac, 2005. Veuillez signaler toute erreur à diff --git a/debian/local/manpages/fr/validlocale.fr.8 b/debian/local/manpages/fr/validlocale.fr.8 new file mode 100644 index 00000000..605512dc --- /dev/null +++ b/debian/local/manpages/fr/validlocale.fr.8 @@ -0,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 --git a/debian/local/manpages/gencat.1 b/debian/local/manpages/gencat.1 new file mode 100644 index 00000000..b2210d2d --- /dev/null +++ b/debian/local/manpages/gencat.1 @@ -0,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 --git a/debian/local/manpages/getconf.1 b/debian/local/manpages/getconf.1 new file mode 100644 index 00000000..3184efe5 --- /dev/null +++ b/debian/local/manpages/getconf.1 @@ -0,0 +1,247 @@ +.rn '' }` +.\" $RCSfile: getconf.1,v $$Revision: 1.1.2.1 $$Date: 2003/09/22 21:33:35 $ +.\" +.\" $Log: getconf.1,v $ +.\" Revision 1.1.2.1 2003/09/22 21:33:35 jbailey +.\" New directory for things we add to the package +.\" +.\" +.de Sh +.br +.if t .Sp +.ne 5 +.PP +\fB\\$1\fR +.PP +.. +.de Sp +.if t .sp .5v +.if n .sp +.. +.de Ip +.br +.ie \\n(.$>=3 .ne \\$3 +.el .ne 3 +.IP "\\$1" \\$2 +.. +.de Vb +.ft CW +.nf +.ne \\$1 +.. +.de Ve +.ft R + +.fi +.. +.\" +.\" +.\" Set up \*(-- to give an unbreakable dash; +.\" string Tr holds user defined translation string. +.\" Bell System Logo is used as a dummy character. +.\" +.tr \(*W-|\(bv\*(Tr +.ie n \{\ +.ds -- \(*W- +.ds PI pi +.if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch +.if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch +.ds L" "" +.ds R" "" +.\" \*(M", \*(S", \*(N" and \*(T" are the equivalent of +.\" \*(L" and \*(R", except that they are used on ".xx" lines, +.\" such as .IP and .SH, which do another additional levels of +.\" double-quote interpretation +.ds M" """ +.ds S" """ +.ds N" """"" +.ds T" """"" +.ds L' ' +.ds R' ' +.ds M' ' +.ds S' ' +.ds N' ' +.ds T' ' +'br\} +.el\{\ +.ds -- \(em\| +.tr \*(Tr +.ds L" `` +.ds R" '' +.ds M" `` +.ds S" '' +.ds N" `` +.ds T" '' +.ds L' ` +.ds R' ' +.ds M' ` +.ds S' ' +.ds N' ` +.ds T' ' +.ds PI \(*p +'br\} +.\" If the F register is turned on, we'll generate +.\" index entries out stderr for the following things: +.\" TH Title +.\" SH Header +.\" Sh Subsection +.\" Ip Item +.\" X<> Xref (embedded +.\" Of course, you have to process the output yourself +.\" in some meaningful fashion. +.if \nF \{ +.de IX +.tm Index:\\$1\t\\n%\t"\\$2" +.. +.nr % 0 +.rr F +.\} +.TH GETCONF 1 "squeeze" "13/Jun/2010" "Debian GNU/Linux" +.UC +.if n .hy 0 +.if n .na +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.de CQ \" put $1 in typewriter font +.ft CW +'if n "\c +'if t \\&\\$1\c +'if n \\&\\$1\c +'if n \&" +\\&\\$2 \\$3 \\$4 \\$5 \\$6 \\$7 +'.ft R +.. +.\" @(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2 +. \" AM - accent mark definitions +.bd B 3 +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds ? ? +. ds ! ! +. ds / +. ds q +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds ? \s-2c\h'-\w'c'u*7/10'\u\h'\*(#H'\zi\d\s+2\h'\w'c'u*8/10' +. ds ! \s-2\(or\s+2\h'-\w'\(or'u'\v'-.8m'.\v'.8m' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +. ds q o\h'-\w'o'u*8/10'\s-4\v'.4m'\z\(*i\v'-.4m'\s+4\h'\w'o'u*8/10' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds v \\k:\h'-(\\n(.wu*9/10-\*(#H)'\v'-\*(#V'\*(#[\s-4v\s0\v'\*(#V'\h'|\\n:u'\*(#] +.ds _ \\k:\h'-(\\n(.wu*9/10-\*(#H+(\*(#F*2/3))'\v'-.4m'\z\(hy\v'.4m'\h'|\\n:u' +.ds . \\k:\h'-(\\n(.wu*8/10)'\v'\*(#V*4/10'\z.\v'-\*(#V*4/10'\h'|\\n:u' +.ds 3 \*(#[\v'.2m'\s-2\&3\s0\v'-.2m'\*(#] +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +.ds oe o\h'-(\w'o'u*4/10)'e +.ds Oe O\h'-(\w'O'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds v \h'-1'\o'\(aa\(ga' +. ds _ \h'-1'^ +. ds . \h'-1'. +. ds 3 3 +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +. ds oe oe +. ds Oe OE +.\} +.rm #[ #] #H #V #F C +.SH "NAME" +getconf \- Query system configuration variables +.SH "SYNOPSIS" +\fBgetconf\fR \-a +.P +\fBgetconf\fR [\fB\-v specification\fR] system_var +.PP +\fBgetconf\fR [\fB\-v specification\fR] path_var pathname +.SH "DESCRIPTION" +\fB\-a\fR +.PP +.Vb 2 +\& Displays all configuration variables for the current system +\& and their values. +.Ve +\fB\-v\fR +.PP +.Vb 2 +\& Indicate the specification and version for which to obtain +\& configuration variables. +.Ve +\fBsystem_var\fR +.PP +.Vb 2 +\& A system configuration variable, as defined by sysconf(3) or +\& confstr(3). +.Ve +\fBpath_var\fR +.PP +.Vb 2 +\& A system configuration variable as defined by pathconf(3). This +\& must be used with a pathname. +.Ve +.SH "AUTHOR" +\fIgetconf\fR was written by Roland McGrath for the GNU C Library +.PP +This man page was written by Ben Collins 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 --git a/debian/local/manpages/id/addendum.id b/debian/local/manpages/id/addendum.id new file mode 100644 index 00000000..a5d1ce1f --- /dev/null +++ b/debian/local/manpages/id/addendum.id @@ -0,0 +1,3 @@ + +.SH PENERJEMAH +Parlin Imanuel Toh diff --git a/debian/local/manpages/locale-gen.8 b/debian/local/manpages/locale-gen.8 new file mode 100644 index 00000000..2723b9d3 --- /dev/null +++ b/debian/local/manpages/locale-gen.8 @@ -0,0 +1,108 @@ +.\" 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. + +\fB/var/lib/locales/supported.d/\fP +.PP +A directory containing locale.gen snippets provided by language-pack +packages. Do not edit these manually, they will be overwritten on +package upgrades. +.PP + +.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 --git a/debian/local/manpages/locale-gen.8.sgml b/debian/local/manpages/locale-gen.8.sgml new file mode 100644 index 00000000..d03befc1 --- /dev/null +++ b/debian/local/manpages/locale-gen.8.sgml @@ -0,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 --git a/debian/local/manpages/locale.alias.5 b/debian/local/manpages/locale.alias.5 new file mode 100644 index 00000000..013d63a3 --- /dev/null +++ b/debian/local/manpages/locale.alias.5 @@ -0,0 +1,45 @@ +.\" -*- nroff -*- +.\" Copyright (C) 2002 Free Software Foundation, Inc. +.\" +.\" This program is free software; you can redistribute it and/or modify +.\" it under the terms of the GNU General Public License as published by +.\" the Free Software Foundation; either version 2, or (at your option) +.\" any later version. +.\" +.\" This program is distributed in the hope that it will be useful, +.\" but WITHOUT ANY WARRANTY; without even the implied warranty of +.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.\" GNU General Public License for more details. +.\" +.\" You should have received a copy of the GNU General Public License +.\" along with this program; if not, write to the Free Software Foundation, +.\" Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +.TH locale.alias 5 "January 2002" "Debian GNU/Linux" +.SH "NAME" +locale.alias \- Locale name alias data base +.SH "DESCRIPTION" +The locale.alias database file (/etc/locale.alias) is used by the +.B locale +command and the +.B X Window System +. +It describes aliases for the locales, with each line being of the +form + + + +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 --git a/debian/local/manpages/locale.gen.5 b/debian/local/manpages/locale.gen.5 new file mode 100644 index 00000000..3625018a --- /dev/null +++ b/debian/local/manpages/locale.gen.5 @@ -0,0 +1,41 @@ +.\" -*- nroff -*- +.\" Copyright (C) 2002, 2005 Free Software Foundation, Inc. +.\" +.\" This program is free software; you can redistribute it and/or modify +.\" it under the terms of the GNU General Public License as published by +.\" the Free Software Foundation; either version 2, or (at your option) +.\" any later version. +.\" +.\" This program is distributed in the hope that it will be useful, +.\" but WITHOUT ANY WARRANTY; without even the implied warranty of +.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.\" GNU General Public License for more details. +.\" +.\" You should have received a copy of the GNU General Public License +.\" along with this program; if not, write to the Free Software Foundation, +.\" Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +.TH locale.gen 5 "July 2005" "Debian GNU/Linux" +.SH "NAME" +locale.gen \- Configuration file for locale-gen +.SH "DESCRIPTION" +The file \fB/etc/locale.gen\fP lists the locales that are to be generated +by the \fBlocale-gen\fP command. + +Each line is of the form: + + + +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 --git a/debian/local/manpages/nscd.8 b/debian/local/manpages/nscd.8 new file mode 100644 index 00000000..bb254cca --- /dev/null +++ b/debian/local/manpages/nscd.8 @@ -0,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 --git a/debian/local/manpages/nscd.conf.5 b/debian/local/manpages/nscd.conf.5 new file mode 100644 index 00000000..8fc64987 --- /dev/null +++ b/debian/local/manpages/nscd.conf.5 @@ -0,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 --git a/debian/local/manpages/pl/validlocale.pl.8 b/debian/local/manpages/pl/validlocale.pl.8 new file mode 100644 index 00000000..0726dd2a --- /dev/null +++ b/debian/local/manpages/pl/validlocale.pl.8 @@ -0,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 --git a/debian/local/manpages/po/de.po b/debian/local/manpages/po/de.po new file mode 100644 index 00000000..cf0a6c29 --- /dev/null +++ b/debian/local/manpages/po/de.po @@ -0,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 --git a/debian/local/manpages/po/es.po b/debian/local/manpages/po/es.po new file mode 100644 index 00000000..af4bcfb7 --- /dev/null +++ b/debian/local/manpages/po/es.po @@ -0,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 --git a/debian/local/manpages/po/fr.po b/debian/local/manpages/po/fr.po new file mode 100644 index 00000000..883626da --- /dev/null +++ b/debian/local/manpages/po/fr.po @@ -0,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 --git a/debian/local/manpages/po/id.po b/debian/local/manpages/po/id.po new file mode 100644 index 00000000..74511177 --- /dev/null +++ b/debian/local/manpages/po/id.po @@ -0,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 --git a/debian/local/manpages/po/man.pot b/debian/local/manpages/po/man.pot new file mode 100644 index 00000000..12f75aa5 --- /dev/null +++ b/debian/local/manpages/po/man.pot @@ -0,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 --git a/debian/local/manpages/po/pl.po b/debian/local/manpages/po/pl.po new file mode 100644 index 00000000..376d4a84 --- /dev/null +++ b/debian/local/manpages/po/pl.po @@ -0,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 --git a/debian/local/manpages/po/pt_BR.po b/debian/local/manpages/po/pt_BR.po new file mode 100644 index 00000000..7a6ca5c2 --- /dev/null +++ b/debian/local/manpages/po/pt_BR.po @@ -0,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=iso-8859-1\n" +"Content-Transfer-Encoding: 8bit\n" + +# type: TH +#: validlocale.8:1 +#, no-wrap +msgid "validlocale" +msgstr "validlocale" + +# type: TH +#: validlocale.8:1 +#, no-wrap +msgid "0.1" +msgstr "0.1" + +# type: TH +#: validlocale.8:1 +#, no-wrap +msgid "Petter Reinholdtsen" +msgstr "Petter Reinholdtsen" + +# type: SH +#: validlocale.8:2 +#, no-wrap +msgid "NAME" +msgstr "NOME" + +# type: Plain text +#: validlocale.8:5 +msgid "validlocale - Test if a given locale is available" +msgstr "validlocale - Testa se uma dada locale est disponvel" + +# 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 "DESCRIO" + +# 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 vlida. Se no 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 "VARIVEIS 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 vlida como parmetro, a sada 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' vlida e est disponvel" + +# 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 invlida (no gerada ou no existente), a sada ser um " +"texto em stderr dizendo que a locale invlida, 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' no est disponvel" + +# 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 TAMBM" + +# 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 - Configurao 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 atravs das " +#~ "configuraes de seu sistema e baixando softwares adicionais, indo alm. " +#~ "O programa pode ser executado posteriormente a qualquer momento para gui-" +#~ "lo essencialmente atravs do mesmo processo novamente." + +# type: SH +#~ msgid "IMPLEMENTATION" +#~ msgstr "IMPLEMENTAO" + +# 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 opes a partir do contedo 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 instalaes (Only-New: true), ou o debconf " +#~ "pode j estar sendo executado quando o item executado (Debconf: true), " +#~ "um nmero Order controla a posio no menu. Se um arquivo .mnu contm " +#~ "\"Exit-Menu: true\", ento base-config ser terminado aps executar esse " +#~ "item do menu. Finalmente a linha \"Changes-Menu: true\" far com que " +#~ "base-config reconstrua o menu aps 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/ so executados quando base-" +#~ "config constri o menu e devem retornar verdadeiro para que apaream 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 so 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 instalao 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 cdigos de retorno de cada um dos programas. Se " +#~ "um programa retorna no-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 usurio avana 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 subseqente, ele pode escrever o nome " +#~ "do prximo item do menu para mostrar ao arquivo \"jump-to\" no diretrio " +#~ "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 execuo do base-config registrada em B. B contm as informaes de tempo que " +#~ "vo juntamente com o registro. Isso permite repeties da execuo do " +#~ "base-config usando o utilitrio 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 instalaes para obter valores do primeiroestgio de " +#~ "instalao 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 ttulos de menu no debconf, que sero adicionados ao menu. " +#~ "fortemente encorajado que qualquer programa desses comunique-se com o " +#~ "usurio inteiramente via debconf, de forma que a configurao da base " +#~ "mantenha a consistncia 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 distribuies customizadas /usr/share/base-config/" +#~ "debconf-seed. Se esse diretrio 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 tambm 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 variveis de ambiente influenciam B. Essas " +#~ "variveis podem ser definidas em tempo de execuo, ou para novas " +#~ "instalaes, podem ser passadas ao kernel na linha de comando do B" +#~ "(8) (ou outro gerenciador de boot). Consulte a documentao 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 vrias 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 configuraes " +#~ "de localizao, qual tipo de console est disponvel e executa um " +#~ "programa de terminal apropriado. Por exemplo, no console Linux e em uma " +#~ "localizao Japonesa, ele executa jfterm. O comando especificado " +#~ "executado dentro do programa de terminal (caso exista algum)." + +# type: SH +#~ msgid "OPTIONS" +#~ msgstr "OPES" + +# type: TP +#~ msgid "I<-nnt>" +#~ msgstr "I<-nnt>" + +# type: Plain text +#~ msgid "Don't run another terminal." +#~ msgstr "No 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 adio 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 padro 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 inicializao e adicione-o ao sources.list. Isto " +#~ "til em instalaes iniciais do debian para minimizar a interao com o " +#~ "usurio." + +# 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 instalao. Este parmetro permite ao apt-" +#~ "setup executar no modo no-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 --git a/debian/local/manpages/po4a.cfg b/debian/local/manpages/po4a.cfg new file mode 100644 index 00000000..61c7566c --- /dev/null +++ b/debian/local/manpages/po4a.cfg @@ -0,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 --git a/debian/local/manpages/pthread_atfork.3 b/debian/local/manpages/pthread_atfork.3 new file mode 100644 index 00000000..d8e806a7 --- /dev/null +++ b/debian/local/manpages/pthread_atfork.3 @@ -0,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 --git a/debian/local/manpages/pthread_cond_init.3 b/debian/local/manpages/pthread_cond_init.3 new file mode 100644 index 00000000..a872d08f --- /dev/null +++ b/debian/local/manpages/pthread_cond_init.3 @@ -0,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 --git a/debian/local/manpages/pthread_condattr_init.3 b/debian/local/manpages/pthread_condattr_init.3 new file mode 100644 index 00000000..23abb063 --- /dev/null +++ b/debian/local/manpages/pthread_condattr_init.3 @@ -0,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 --git a/debian/local/manpages/pthread_key_create.3 b/debian/local/manpages/pthread_key_create.3 new file mode 100644 index 00000000..4041fd5e --- /dev/null +++ b/debian/local/manpages/pthread_key_create.3 @@ -0,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 --git a/debian/local/manpages/pthread_mutex_init.3 b/debian/local/manpages/pthread_mutex_init.3 new file mode 100644 index 00000000..0d7f5dd5 --- /dev/null +++ b/debian/local/manpages/pthread_mutex_init.3 @@ -0,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 --git a/debian/local/manpages/pthread_mutexattr_init.3 b/debian/local/manpages/pthread_mutexattr_init.3 new file mode 100644 index 00000000..eea58952 --- /dev/null +++ b/debian/local/manpages/pthread_mutexattr_init.3 @@ -0,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 --git a/debian/local/manpages/pthread_mutexattr_setkind_np.3 b/debian/local/manpages/pthread_mutexattr_setkind_np.3 new file mode 100644 index 00000000..0daa0c43 --- /dev/null +++ b/debian/local/manpages/pthread_mutexattr_setkind_np.3 @@ -0,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 --git a/debian/local/manpages/pthread_once.3 b/debian/local/manpages/pthread_once.3 new file mode 100644 index 00000000..8ba47a36 --- /dev/null +++ b/debian/local/manpages/pthread_once.3 @@ -0,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 --git a/debian/local/manpages/rpcgen.1 b/debian/local/manpages/rpcgen.1 new file mode 100644 index 00000000..be9b3e68 --- /dev/null +++ b/debian/local/manpages/rpcgen.1 @@ -0,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 --git a/debian/local/manpages/sotruss.1 b/debian/local/manpages/sotruss.1 new file mode 100644 index 00000000..0705652a --- /dev/null +++ b/debian/local/manpages/sotruss.1 @@ -0,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 --git a/debian/local/manpages/tzselect.1 b/debian/local/manpages/tzselect.1 new file mode 100644 index 00000000..dbb6f7f3 --- /dev/null +++ b/debian/local/manpages/tzselect.1 @@ -0,0 +1,67 @@ +.\" Copyright 1998 Marcus Brinkmann (brinkmd@debian.org) +.\" +.\" Permission is granted to make and distribute verbatim copies of this +.\" manual provided the copyright notice and this permission notice are +.\" preserved on all copies. +.\" +.\" Permission is granted to copy and distribute modified versions of this +.\" manual under the conditions for verbatim copying, provided that the +.\" entire resulting derived work is distributed under the terms of a +.\" permission notice identical to this one +.\" +.\" Since the Linux kernel and libraries are constantly changing, this +.\" manual page may be incorrect or out-of-date. The author(s) assume no +.\" responsibility for errors or omissions, or for damages resulting from +.\" the use of the information contained herein. The author(s) may not +.\" have taken the same level of care in the production of this manual, +.\" which is licensed free of charge, as they might when working +.\" professionally. +.\" +.\" Formatted or processed versions of this manual, if unaccompanied by +.\" the source, must acknowledge the copyright and authors of this work. +.\" +.\" Modified Mon Jul 12 18:40:00 1998 by Marcus Brinkmann (brinkmd@debian.org) +.TH TZSELECT 1 "12 June 1998" "Debian" "Debian Timezone Configuration" +.SH NAME +tzselect \- view timezones +.SH SYNOPSIS +.B tzselect +.SH DESCRIPTION +This manual page explains how you can use the +.B "tzselect" +utility to view the installed timezone. It comes handy when you want to know what time it is in +other countries, or if you just wonder what timezones exist. + +.B tzselect +is called without any parameters from the shell. It shows a list of about one dozen geographic +areas one can roughly recognize as continents. After choosing a geographic area by number, a +list of countries and cities in this area will be shown. + +You can press the +.B Enter +key to reprint the list. To choose a timezone, just press the number left to it. +If your input is invalid, the list will be reprinted. + +You may press +.B Ctrl-C +to interrupt the script at any time. + +Note that +.B tzselect +will not actually change the timezone for you. Use 'dpkg-reconfigure tzdata' to achieve this. +.SH FILES +.I /usr/share/zoneinfo/ +.SH "SEE ALSO" +.BR hwclock (8) +.SH AUTHOR +Copyright 1998 Marcus Brinkmann + +Please see nroff source for legal notice. + + + + + + + + diff --git a/debian/local/manpages/update-locale.8 b/debian/local/manpages/update-locale.8 new file mode 100644 index 00000000..249ac43f --- /dev/null +++ b/debian/local/manpages/update-locale.8 @@ -0,0 +1,49 @@ +.TH UPDATE-LOCALE 8 "April 2006" "Debian GNU/Linux" +.SH "NAME" +.LP +update-locale \- Modify global locale settings +.SH "SYNTAX" +.LP +update-locale +.RI [ OPTIONS ] +[\fIvar\fP=\fIlocale\fP | \fIvar\fP] +[...] +.SH "DESCRIPTION" +.LP +This program can be called by maintainer scripts when Debian packages are +installed or removed, it updates the \fB/etc/default/locale\fP file to +reflect changes in system configuration related to global locale settings. +When variables have no value assigned, they are removed from the locale +file. +Some basic checks are performed to ensure that requested settings are valid. +.SH "OPTIONS" +.TP +.B \-\-help +Display an help message and exit. +.TP +.B \-\-reset +Variables which are not set on command-line are cleared out. +.TP +.BI \-\-locale\-file " FILE" +Define file containing locale variables. (Default: +.BR /etc/default/locale ) +.TP +.B \-\-no\-checks +Do not perform sanity checks on locale variables. +.SH "EXAMPLE" +.nf +The command +.ft B + update-locale LANG=en_CA.UTF-8 LANGUAGE +.ft R +sets \fBLANG\fP to \fBen_CA.UTF-8\fP and removes definitions for \fBLANGUAGE\fP. +.SH "FILES" +.TP +.B /etc/default/locale +File where global locale settings are stored. +.SH "AUTHOR" +.LP +Denis Barbier +.SH "SEE ALSO" +.LP +locale\-gen(8), locale(1) diff --git a/debian/local/manpages/validlocale.8 b/debian/local/manpages/validlocale.8 new file mode 100644 index 00000000..ad1d909d --- /dev/null +++ b/debian/local/manpages/validlocale.8 @@ -0,0 +1,49 @@ +.TH "validlocale" "8" "0.1" "Petter Reinholdtsen" "" +.SH "NAME" +.LP +validlocale \- Test if a given locale is available +.SH "SYNTAX" +.LP +validlocale <\fIlocale\fP> +.SH "DESCRIPTION" +.LP +Test if the locale given as argument is a valid locale. If it +isn't, print on stdout the string to add to /etc/locale.gen to make +locale\-gen generate the locale (if it exists at all). +.SH "FILES" +.LP +\fI/usr/sbin/validlocale\fP +.br +\fI/usr/share/i18n/SUPPORTED\fP +.SH "ENVIRONMENT VARIABLES" +.LP +.TP +\fBDEFAULTCHARSET\fP +Which charset to assume if the given locale is missing from the +list of supported locales. +.SH "EXAMPLES" +.LP +If you give a valid locale as parameter, it outputs a string +specifying this on stderr: +.LP +.IP +% validlocale C +.br +locale 'C' valid and available +.LP +When given a invalid (not generated or just nonexistent), it +outputs a string on stderr telling that this is an invalid locale, and a string to stdout with the string to add to /etc/locale.gen +to have this locale generated: +.LP +.IP +% validlocale de_AU@euro +.br +locale 'de_AU@euro' not available +.br +de_AU@euro ISO\-8859\-15 +.SH "AUTHORS" +.LP +Petter Reinholdtsen +.SH "SEE ALSO" +.LP +locale\-gen(8), localedef(1), locale(1) diff --git a/debian/local/sbin/ldconfig b/debian/local/sbin/ldconfig new file mode 100755 index 00000000..6ccdf0c2 --- /dev/null +++ b/debian/local/sbin/ldconfig @@ -0,0 +1,16 @@ +#!/bin/sh + +if test $# = 0 \ + && test x"$LDCONFIG_NOTRIGGER" = x \ + && test x"$DPKG_MAINTSCRIPT_PACKAGE" != x \ + && dpkg-trigger --check-supported 2>/dev/null +then + if dpkg-trigger --no-await ldconfig; then + if test x"$LDCONFIG_TRIGGER_DEBUG" != x; then + echo "ldconfig: wrapper deferring update (trigger activated)" + fi + exit 0 + fi +fi + +exec /sbin/ldconfig.real "$@" diff --git a/debian/local/usr_sbin/locale-gen b/debian/local/usr_sbin/locale-gen new file mode 100755 index 00000000..ff9be293 --- /dev/null +++ b/debian/local/usr_sbin/locale-gen @@ -0,0 +1,178 @@ +#!/bin/bash + +set -e + +LOCALEGEN=/etc/locale.gen +LOCALES=/usr/share/i18n/locales +USER_LOCALES=/usr/local/share/i18n/locales +SUPPORTED=/var/lib/locales/supported.d +ALIASES=/usr/share/locale/locale.alias +if [ -n "$POSIXLY_CORRECT" ]; then + unset POSIXLY_CORRECT +fi + + +[ -f $LOCALEGEN ] || exit 0; +[ -s $LOCALEGEN ] || exit 0; + +KEEP= +IS_LANG=no +ARCHIVE=yes + +# Handle command-line options +prev= +while true +do + option="$1" + if [ -n "$prev" ]; then + eval "$prev=\$option" + prev= + continue + fi + + case $option in + -h|--help) + cat </dev/null || true + done +fi + +umask 022 + +is_entry_ok() { + if [ -n "$locale" -a -n "$charset" ] ; then + true + else + echo "error: Bad entry '$locale $charset'" + false + fi +} + +add_to_locale_gen() { + echo "$1" | while read locale; do + if ! grep -q "^[# ]*$locale *\$" $LOCALEGEN; then + echo "# $locale" >> $LOCALEGEN + fi + sed -i -e "0,/^[# ]*$locale *$/ s/^[# ]*$locale *$/$locale/" $LOCALEGEN + done +} + +if [ -z "$1" ]; then + GENERATE="`cat $SUPPORTED/* $LOCALEGEN 2>/dev/null || true`" +else + GENERATE= + while [ -n "$1" ]; do + if [ -f "$SUPPORTED/$1" ]; then + GENERATE="$GENERATE\n`cat $SUPPORTED/$1`" + elif [ $IS_LANG = no ] && L=`grep "^${1/%.utf8/.UTF-8} " /usr/share/i18n/SUPPORTED`; then + # convert utf8 to UTF-8 and check if the requested locale exists + GENERATE="$GENERATE\n$L" + add_to_locale_gen "$L" + elif [ $IS_LANG = no ] && L=`grep "^${1%.[uU][tT][fF]*} UTF-8" /usr/share/i18n/SUPPORTED`; then + # recognize 'll_CC.UTF-8' or 'll_CC.utf8' as ll_CC without codeset + GENERATE="$GENERATE\n$L" + add_to_locale_gen "$L" + else + # try to come up with a sensible default + L=`grep -E "^${1}( |[._@][^[:space:]]* )UTF-8" /usr/share/i18n/SUPPORTED || true` + if [ -z "$L" ]; then + echo "Error: '$1' is not a supported language or locale" >&2 + exit 1 + fi + GENERATE="$GENERATE\n$L" + add_to_locale_gen "$L" + fi + shift + done +fi + +echo "Generating locales (this might take a while)..." +echo -e "$GENERATE" | sort -u | 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 $no_archive -i $input -c -f $charset $locale_alias $locale || :; \ + echo ' done'; \ +done +echo "Generation complete." diff --git a/debian/local/usr_sbin/update-locale b/debian/local/usr_sbin/update-locale new file mode 100755 index 00000000..3951cdd9 --- /dev/null +++ b/debian/local/usr_sbin/update-locale @@ -0,0 +1,129 @@ +#! /usr/bin/perl -w + +use strict; +use Getopt::Long; + +my $progname = "update-locale"; +my $locale_file = "/etc/default/locale"; + +my $help = 0; +my $reset = 0; +# Kept for compatibility reasons +my $remove = 0; +my $no_checks = 0; + +GetOptions( + 'reset' => \$reset, + 'remove' => \$remove, + 'locale-file=s' => \$locale_file, + 'no-checks' => \$no_checks, + 'h|help' => \$help, +); + +sub usage +{ + my $rc = shift; + print STDERR "Usage: $progname [OPTIONS] [LANG=locale] [LC_NUMERIC=locale] ... +Options: + --help display this message and exit + --reset ignore variables defined in the locale file + --locale-file=FILE file containing locale variables + (Default: /etc/default/locale) + --no-checks do not perform sanity checks on locale variables +"; + exit $rc; +} + +$help && usage(0); + +# Process command-line arguments +my %arg = (); +my $content = ''; +my $mode = 0644; +if (-r $locale_file) +{ + # Keep file mode + $mode = (stat($locale_file))[2] & 07777; + # Read current values + open(IN, "<", $locale_file) + or die "$progname: Unable to read $locale_file: $!\n"; + while () + { + $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 --git a/debian/local/usr_sbin/validlocale b/debian/local/usr_sbin/validlocale new file mode 100755 index 00000000..fadf7975 --- /dev/null +++ b/debian/local/usr_sbin/validlocale @@ -0,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 --git a/debian/local/usr_share_locales/install-language-pack b/debian/local/usr_share_locales/install-language-pack new file mode 100644 index 00000000..bbb27d40 --- /dev/null +++ b/debian/local/usr_share_locales/install-language-pack @@ -0,0 +1,19 @@ +#!/bin/sh -e + +if [ -z "$1" ]; then + echo "Usage: $0 []" + exit 0 +fi + +# install locales for base packages (not for gnome/kde) +if [ -z "$2" ]; then + # Update requested locales if locales-all is not installed + if dpkg-query -s locales-all >/dev/null 2>&1 ; then + echo "locales-all installed, skipping locales generation" + else + /usr/sbin/locale-gen --keep-existing "$1" + fi +fi + +# ensure that .desktop caches are up to date +dpkg-trigger gmenucache || true diff --git a/debian/local/usr_share_locales/remove-language-pack b/debian/local/usr_share_locales/remove-language-pack new file mode 100644 index 00000000..932e6cdc --- /dev/null +++ b/debian/local/usr_share_locales/remove-language-pack @@ -0,0 +1,68 @@ +#!/bin/sh -e + +if [ -z "$1" ]; then + echo "Usage: $0 []" + exit 0 +fi + +# Copied from locale-gen +normalize_locale() { + # Insert a leading x in case $1 begins with a dash + this_locale=x$1 + charset= + if echo $this_locale | LC_ALL=C grep '\.' > /dev/null 2>&1; then + charset=$(echo $this_locale | sed -e 's/^x//' -e 's/.*\(\.[^@]*\).*/\1/' | LC_ALL=C tr '[A-Z]' '[a-z]' | LC_ALL=C sed -e 's/[^a-z0-9.]//g') + fi + modifier= + if echo $this_locale | LC_ALL=C grep '@' > /dev/null 2>&1; then + modifier=$(echo $this_locale | sed -e 's/^x//' -e 's/.*\(@[^.]*\).*/\1/') + fi + main=$(echo $this_locale | sed -e 's/^x//' -e 's/[.@].*//') + echo $main$charset$modifier +} + +get_supported_local_normalized() { + [ -e /etc/locale.gen ] || return 0 + sort -u /etc/locale.gen | while read locale charset; do + case $locale in + \#*) continue ;; + "") continue ;; + esac + normalize_locale "$locale" + done +} + +remove_locale() { + this_locale=$(normalize_locale "$1") + if ! echo "$supported_local_normalized" | fgrep -qx "$this_locale"; then + if [ -e /usr/lib/locale/locale-archive ]; then + localedef --delete-from-archive "$this_locale" + fi + fi +} + +# remove binary locales +# do nothing for gnome/kde +if [ -z "$2" ]; then + # do not remove locales if we merely remove language-support-* without + # removing language-pack-* + if [ ! -e /var/lib/locales/supported.d/$1 ]; then + supported_local_normalized="$(get_supported_local_normalized)" + if [ "$1" = 'zh-hans' ]; then + remove_locale zh_CN.utf8 + remove_locale zh_SG.utf8 + elif [ "$1" = 'zh-hant' ]; then + remove_locale zh_HK.utf8 + remove_locale zh_TW.utf8 + else + if [ -e /usr/lib/locale/locale-archive ]; then + for l in $(localedef --list-archive|grep "^$1[._@]"); do + remove_locale "$l" + done + fi + fi + fi +fi + +# ensure that .desktop caches are up to date +dpkg-trigger gmenucache || true diff --git a/debian/patches/README b/debian/patches/README new file mode 100644 index 00000000..ee22d17a --- /dev/null +++ b/debian/patches/README @@ -0,0 +1,20 @@ +For the patch directory we follow this naming scheme: + + {ARCH|all|any}/{local|branch|cvs|submitted|unsubmitted}-"Description" + +Branch means commited in the upstream branch. +CVS means committed in the upstream trunk. +Submitted means we're hopeful that it will go in. +Unsubmitted means we have not submitted upstream yet because patch is not ready +for upstream yet, but we want to eventually +Local means that it's not going upstream. + +The goal is to get all patches to "Branch". Patches should be split by +arch so that it's easy to send just the relevant bits to various +arch maintainers if needed. + +The difference between 'all' and 'any' is that the latter touches several +architecture dependent files (usually in the sysdeps directory), whereas +the former only modifies architecture independent files. Porters are +supposed to have an eye on their arch patches and on 'any'. + diff --git a/debian/patches/all/local-alias-et_EE.diff b/debian/patches/all/local-alias-et_EE.diff new file mode 100644 index 00000000..5a020f0f --- /dev/null +++ b/debian/patches/all/local-alias-et_EE.diff @@ -0,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 --git a/debian/patches/all/local-ldd.diff b/debian/patches/all/local-ldd.diff new file mode 100644 index 00000000..85975e21 --- /dev/null +++ b/debian/patches/all/local-ldd.diff @@ -0,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 --git a/debian/patches/all/local-nis-shadow.diff b/debian/patches/all/local-nis-shadow.diff new file mode 100644 index 00000000..a6db8155 --- /dev/null +++ b/debian/patches/all/local-nis-shadow.diff @@ -0,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 --git a/debian/patches/all/local-remove-manual.diff b/debian/patches/all/local-remove-manual.diff new file mode 100644 index 00000000..30453f8c --- /dev/null +++ b/debian/patches/all/local-remove-manual.diff @@ -0,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 --git a/debian/patches/all/local-ru_RU.diff b/debian/patches/all/local-ru_RU.diff new file mode 100644 index 00000000..7b7c4f6a --- /dev/null +++ b/debian/patches/all/local-ru_RU.diff @@ -0,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 --git a/debian/patches/all/submitted-po-fr-fixes.diff b/debian/patches/all/submitted-po-fr-fixes.diff new file mode 100644 index 00000000..13557a18 --- /dev/null +++ b/debian/patches/all/submitted-po-fr-fixes.diff @@ -0,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 --git a/debian/patches/alpha/local-gcc4.1.diff b/debian/patches/alpha/local-gcc4.1.diff new file mode 100644 index 00000000..f01bbe83 --- /dev/null +++ b/debian/patches/alpha/local-gcc4.1.diff @@ -0,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 --git a/debian/patches/alpha/local-string-functions.diff b/debian/patches/alpha/local-string-functions.diff new file mode 100644 index 00000000..9d12e68a --- /dev/null +++ b/debian/patches/alpha/local-string-functions.diff @@ -0,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 --git a/debian/patches/alpha/submitted-dl-support.diff b/debian/patches/alpha/submitted-dl-support.diff new file mode 100644 index 00000000..bf7e5cff --- /dev/null +++ b/debian/patches/alpha/submitted-dl-support.diff @@ -0,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 --git a/debian/patches/alpha/submitted-fts64.diff b/debian/patches/alpha/submitted-fts64.diff new file mode 100644 index 00000000..3a6cc44f --- /dev/null +++ b/debian/patches/alpha/submitted-fts64.diff @@ -0,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 --git a/debian/patches/alpha/submitted-makecontext.diff b/debian/patches/alpha/submitted-makecontext.diff new file mode 100644 index 00000000..63e033ba --- /dev/null +++ b/debian/patches/alpha/submitted-makecontext.diff @@ -0,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 --git a/debian/patches/any/local-asserth-decls.diff b/debian/patches/any/local-asserth-decls.diff new file mode 100644 index 00000000..e4909d27 --- /dev/null +++ b/debian/patches/any/local-asserth-decls.diff @@ -0,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 --git a/debian/patches/any/local-bindresvport_blacklist.diff b/debian/patches/any/local-bindresvport_blacklist.diff new file mode 100644 index 00000000..f2ded6d7 --- /dev/null +++ b/debian/patches/any/local-bindresvport_blacklist.diff @@ -0,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 --git a/debian/patches/any/local-bootstrap-headers.diff b/debian/patches/any/local-bootstrap-headers.diff new file mode 100644 index 00000000..2d20170f --- /dev/null +++ b/debian/patches/any/local-bootstrap-headers.diff @@ -0,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 --git a/debian/patches/any/local-cudacc-float128.diff b/debian/patches/any/local-cudacc-float128.diff new file mode 100644 index 00000000..36b4454e --- /dev/null +++ b/debian/patches/any/local-cudacc-float128.diff @@ -0,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 --git a/debian/patches/any/local-disable-libnss-db.diff b/debian/patches/any/local-disable-libnss-db.diff new file mode 100644 index 00000000..c69d05af --- /dev/null +++ b/debian/patches/any/local-disable-libnss-db.diff @@ -0,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 --git a/debian/patches/any/local-fhs-linux-paths.diff b/debian/patches/any/local-fhs-linux-paths.diff new file mode 100644 index 00000000..ae4581b2 --- /dev/null +++ b/debian/patches/any/local-fhs-linux-paths.diff @@ -0,0 +1,33 @@ +# DP: Description: Correct linux paths for FHS +# DP: Author: Unknown +# DP: Upstream status: Debian-Specific +# DP: Status Details: GNU doesn't follow the FHS. +# DP: Date: Unknown + +--- + sysdeps/generic/paths.h | 2 +- + sysdeps/unix/sysv/linux/paths.h | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +--- a/sysdeps/unix/sysv/linux/paths.h ++++ b/sysdeps/unix/sysv/linux/paths.h +@@ -68,7 +68,7 @@ + /* Provide trailing slash, since mostly used for building pathnames. */ + #define _PATH_DEV "/dev/" + #define _PATH_TMP "/tmp/" +-#define _PATH_VARDB "/var/db/" ++#define _PATH_VARDB "/var/lib/misc/" + #define _PATH_VARRUN "/var/run/" + #define _PATH_VARTMP "/var/tmp/" + +--- a/sysdeps/generic/paths.h ++++ b/sysdeps/generic/paths.h +@@ -68,7 +68,7 @@ + /* Provide trailing slash, since mostly used for building pathnames. */ + #define _PATH_DEV "/dev/" + #define _PATH_TMP "/tmp/" +-#define _PATH_VARDB "/var/db/" ++#define _PATH_VARDB "/var/lib/misc/" + #define _PATH_VARRUN "/var/run/" + #define _PATH_VARTMP "/var/tmp/" + diff --git a/debian/patches/any/local-fhs-nscd.diff b/debian/patches/any/local-fhs-nscd.diff new file mode 100644 index 00000000..ad797103 --- /dev/null +++ b/debian/patches/any/local-fhs-nscd.diff @@ -0,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 --git a/debian/patches/any/local-ld-multiarch.diff b/debian/patches/any/local-ld-multiarch.diff new file mode 100644 index 00000000..ecec4899 --- /dev/null +++ b/debian/patches/any/local-ld-multiarch.diff @@ -0,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 --git a/debian/patches/any/local-ldconfig-ignore-ld.so.diff b/debian/patches/any/local-ldconfig-ignore-ld.so.diff new file mode 100644 index 00000000..5a200060 --- /dev/null +++ b/debian/patches/any/local-ldconfig-ignore-ld.so.diff @@ -0,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 --git a/debian/patches/any/local-ldconfig-multiarch.diff b/debian/patches/any/local-ldconfig-multiarch.diff new file mode 100644 index 00000000..261cbd7d --- /dev/null +++ b/debian/patches/any/local-ldconfig-multiarch.diff @@ -0,0 +1,55 @@ +Description: make ldconfig use the built-in system paths + Make ldconfig use the same view of built-in system paths that ld.so does, + instead of just using SLIBDIR and LIBDIR; this corrects a failure of + ldconfig to cache libraries in non-multiarch directories when building for + multiarch, even though they're on the system path. +Author: Steve Langasek +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 --git a/debian/patches/any/local-ldso-disable-hwcap.diff b/debian/patches/any/local-ldso-disable-hwcap.diff new file mode 100644 index 00000000..e5e199f9 --- /dev/null +++ b/debian/patches/any/local-ldso-disable-hwcap.diff @@ -0,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 --git a/debian/patches/any/local-libpic.diff b/debian/patches/any/local-libpic.diff new file mode 100644 index 00000000..7361abf8 --- /dev/null +++ b/debian/patches/any/local-libpic.diff @@ -0,0 +1,89 @@ +--- a/Makerules ++++ b/Makerules +@@ -610,6 +629,9 @@ + $(common-objpfx)libc.so: $(common-objpfx)libc.map + endif + common-generated += libc.so libc_pic.os ++ifndef subdir ++install-extras := soinit.o sofini.o ++endif + ifdef libc.so-version + $(common-objpfx)libc.so$(libc.so-version): $(common-objpfx)libc.so + $(make-link) +@@ -832,6 +854,7 @@ + installed-libcs := $(foreach o,$(filter-out .os,$(object-suffixes-for-libc)),\ + $(inst_libdir)/$(patsubst %,$(libtype$o),\ + $(libprefix)$(libc-name))) ++installed-libcs := $(installed-libcs) $(inst_libdir)/libc_pic.a + + .PHONY: check-install-supported + check-install-supported: +@@ -860,6 +883,22 @@ + install-lib.so-versioned := $(filter $(versioned), $(install-lib.so)) + install-lib.so-unversioned := $(filter-out $(versioned), $(install-lib.so)) + ++# Install the _pic.a files for versioned libraries, and corresponding ++# .map files. ++# libpthread_pic.a breaks mklibs, so don't install it and its map. ++install-lib := $(install-lib) $(install-lib.so-versioned:%.so=%_pic.a) ++install-lib := $(filter-out libpthread_pic.a,$(install-lib)) ++# Despite having a soname libhurduser and libmachuser do not use symbol ++# versioning, so don't install the corresponding .map files. ++ifeq ($(build-shared),yes) ++install-map := $(patsubst %.so,%.map,\ ++ $(foreach L,$(install-lib.so-versioned),$(notdir $L))) ++install-map := $(filter-out libhurduser.map libmachuser.map libpthread.map,$(install-map)) ++ifndef subdir ++install-map := $(install-map) libc.map ++endif ++endif ++ + # For versioned libraries, we install three files: + # $(inst_libdir)/libfoo.so -- for linking, symlink or ld script + # $(inst_slibdir)/libfoo.so.NN -- for loading by SONAME, symlink +@@ -1101,9 +1140,22 @@ + endif # headers-nonh + endif # headers + ++ifdef install-map ++$(addprefix $(inst_libdir)/,$(patsubst lib%.map,lib%_pic.map,$(install-map))): \ ++ $(inst_libdir)/lib%_pic.map: $(common-objpfx)lib%.map $(+force) ++ $(do-install) ++endif ++ ++ifdef install-extras ++$(addprefix $(inst_libdir)/libc_pic/,$(install-extras)): \ ++ $(inst_libdir)/libc_pic/%.o: $(elf-objpfx)/%.os $(+force) ++ $(do-install) ++endif ++ + .PHONY: install-bin-nosubdir install-bin-script-nosubdir \ + install-rootsbin-nosubdir install-sbin-nosubdir install-lib-nosubdir \ +- install-data-nosubdir install-headers-nosubdir ++ install-data-nosubdir install-headers-nosubdir install-map-nosubdir \ ++ install-extras-nosubdir + install-bin-nosubdir: $(addprefix $(inst_bindir)/,$(install-bin)) + install-bin-script-nosubdir: $(addprefix $(inst_bindir)/,$(install-bin-script)) + install-rootsbin-nosubdir: \ +@@ -1116,6 +1168,10 @@ + install-headers-nosubdir: $(addprefix $(inst_includedir)/,$(headers)) + install-others-nosubdir: $(install-others) + install-others-programs-nosubdir: $(install-others-programs) ++install-map-nosubdir: $(addprefix $(inst_libdir)/,\ ++ $(patsubst lib%.map,lib%_pic.map,$(install-map))) ++install-extras-nosubdir: $(addprefix $(inst_libdir)/libc_pic/,\ ++ $(install-extras)) + + # We need all the `-nosubdir' targets so that `install' in the parent + # doesn't depend on several things which each iterate over the subdirs. +@@ -1125,7 +1181,8 @@ + + .PHONY: install install-no-libc.a-nosubdir + install-no-libc.a-nosubdir: install-headers-nosubdir install-data-nosubdir \ +- install-lib-nosubdir install-others-nosubdir ++ install-lib-nosubdir install-others-nosubdir \ ++ install-map-nosubdir install-extras-nosubdir + ifeq ($(build-programs),yes) + install-no-libc.a-nosubdir: install-bin-nosubdir install-bin-script-nosubdir \ + install-rootsbin-nosubdir install-sbin-nosubdir \ + diff --git a/debian/patches/any/local-nss-overflow.diff b/debian/patches/any/local-nss-overflow.diff new file mode 100644 index 00000000..d47fe1ac --- /dev/null +++ b/debian/patches/any/local-nss-overflow.diff @@ -0,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 --git a/debian/patches/any/local-nss-upgrade.diff b/debian/patches/any/local-nss-upgrade.diff new file mode 100644 index 00000000..a9af8979 --- /dev/null +++ b/debian/patches/any/local-nss-upgrade.diff @@ -0,0 +1,33 @@ +# DP: This patch makes future upgrades easier. It resolves problems with +# DP: running daemons having NSS modules upgraded out from under them. + +--- + nss/nsswitch.c | 17 ++++++++++++++--- + 1 file changed, 14 insertions(+), 3 deletions(-) + +--- a/nss/nsswitch.c ++++ b/nss/nsswitch.c +@@ -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 --git a/debian/patches/any/local-revert-bz13979.diff b/debian/patches/any/local-revert-bz13979.diff new file mode 100644 index 00000000..71df364f --- /dev/null +++ b/debian/patches/any/local-revert-bz13979.diff @@ -0,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 --git a/debian/patches/any/local-rtlddir-cross.diff b/debian/patches/any/local-rtlddir-cross.diff new file mode 100644 index 00000000..7e38f452 --- /dev/null +++ b/debian/patches/any/local-rtlddir-cross.diff @@ -0,0 +1,29 @@ +Description: Install ld.so to slibdir instead of rtlddir to fix cross builds + When installing a cross-libc purely for linking purposes but not + runtime use, the linker shouldn't be installed in rtlddir, since + we won't actually be USING it, and thus referencing the rtlddir + path in libc.so ends up blowing up cross-compilers for no reason. +Author: Adam Conrad + +--- a/Makeconfig ++++ b/Makeconfig +@@ -161,7 +161,7 @@ + ifndef rtlddir + rtlddir = $(slibdir) + endif +-inst_rtlddir = $(install_root)$(rtlddir) ++inst_rtlddir = $(install_root)$(slibdir) + + # Prefix to put on files installed in $(libdir). For libraries `libNAME.a', + # the prefix is spliced between `lib' and the name, so the linker switch +--- a/Makerules ++++ b/Makerules +@@ -1168,7 +1168,7 @@ + cat $<; \ + echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \ + '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\ +- ' AS_NEEDED (' $(rtlddir)/$(rtld-installed-name) ') )' \ ++ ' AS_NEEDED (' $(slibdir)/$(rtld-installed-name) ') )' \ + ) > $@.new + ifeq ($(patsubst gnu%,,$(config-os)),) + echo 'INPUT ( AS_NEEDED ( -lmachuser -lhurduser ) )' >> $@.new diff --git a/debian/patches/any/local-stubs_h.diff b/debian/patches/any/local-stubs_h.diff new file mode 100644 index 00000000..86ad5925 --- /dev/null +++ b/debian/patches/any/local-stubs_h.diff @@ -0,0 +1,15 @@ +--- + include/stubs-prologue.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/include/stubs-prologue.h ++++ b/include/stubs-prologue.h +@@ -8,7 +8,7 @@ + every time called, usually setting errno to ENOSYS. */ + + #ifdef _LIBC +- #error Applications may not define the macro _LIBC ++# error Applications may not define the macro _LIBC + #endif + + @ Placeholder line so we remember to keep the preceding blank line here. diff --git a/debian/patches/any/local-tcsetaddr.diff b/debian/patches/any/local-tcsetaddr.diff new file mode 100644 index 00000000..0091dcb9 --- /dev/null +++ b/debian/patches/any/local-tcsetaddr.diff @@ -0,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 --git a/debian/patches/any/local-test-install.diff b/debian/patches/any/local-test-install.diff new file mode 100644 index 00000000..dbb0e6e3 --- /dev/null +++ b/debian/patches/any/local-test-install.diff @@ -0,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 --git a/debian/patches/any/submitted-bits-fcntl_h-at.diff b/debian/patches/any/submitted-bits-fcntl_h-at.diff new file mode 100644 index 00000000..d09ad971 --- /dev/null +++ b/debian/patches/any/submitted-bits-fcntl_h-at.diff @@ -0,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 --git a/debian/patches/any/submitted-ld.so-cache-new-format.diff b/debian/patches/any/submitted-ld.so-cache-new-format.diff new file mode 100644 index 00000000..9b96b281 --- /dev/null +++ b/debian/patches/any/submitted-ld.so-cache-new-format.diff @@ -0,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 --git a/debian/patches/any/submitted-missing-etc-hosts.diff b/debian/patches/any/submitted-missing-etc-hosts.diff new file mode 100644 index 00000000..590a869e --- /dev/null +++ b/debian/patches/any/submitted-missing-etc-hosts.diff @@ -0,0 +1,15 @@ +--- + nss/nss_files/files-hosts.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/nss/nss_files/files-hosts.c ++++ b/nss/nss_files/files-hosts.c +@@ -479,7 +479,7 @@ + else + { + *errnop = errno; +- *herrnop = NO_DATA; ++ *herrnop = HOST_NOT_FOUND; + } + + return status; diff --git a/debian/patches/any/submitted-nptl-invalid-td.patch b/debian/patches/any/submitted-nptl-invalid-td.patch new file mode 100644 index 00000000..00695114 --- /dev/null +++ b/debian/patches/any/submitted-nptl-invalid-td.patch @@ -0,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 --git a/debian/patches/any/submitted-resolv-unaligned.diff b/debian/patches/any/submitted-resolv-unaligned.diff new file mode 100644 index 00000000..e974c6bb --- /dev/null +++ b/debian/patches/any/submitted-resolv-unaligned.diff @@ -0,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 --git a/debian/patches/any/unsubmitted-ldso-machine-mismatch.diff b/debian/patches/any/unsubmitted-ldso-machine-mismatch.diff new file mode 100644 index 00000000..fc063a57 --- /dev/null +++ b/debian/patches/any/unsubmitted-ldso-machine-mismatch.diff @@ -0,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 --git a/debian/patches/arm/local-arm-futex.diff b/debian/patches/arm/local-arm-futex.diff new file mode 100644 index 00000000..7a0c80f9 --- /dev/null +++ b/debian/patches/arm/local-arm-futex.diff @@ -0,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 --git a/debian/patches/arm/local-sigaction.diff b/debian/patches/arm/local-sigaction.diff new file mode 100644 index 00000000..5211af3a --- /dev/null +++ b/debian/patches/arm/local-sigaction.diff @@ -0,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 --git a/debian/patches/arm/local-soname-hack.diff b/debian/patches/arm/local-soname-hack.diff new file mode 100644 index 00000000..f2c376d2 --- /dev/null +++ b/debian/patches/arm/local-soname-hack.diff @@ -0,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 --git a/debian/patches/arm/local-vfp-sysdeps.diff b/debian/patches/arm/local-vfp-sysdeps.diff new file mode 100644 index 00000000..fb70a187 --- /dev/null +++ b/debian/patches/arm/local-vfp-sysdeps.diff @@ -0,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 --git a/debian/patches/arm/unsubmitted-ldconfig-cache-abi.diff b/debian/patches/arm/unsubmitted-ldconfig-cache-abi.diff new file mode 100644 index 00000000..0a3f06a5 --- /dev/null +++ b/debian/patches/arm/unsubmitted-ldconfig-cache-abi.diff @@ -0,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 --git a/debian/patches/arm/unsubmitted-ldso-multilib.diff b/debian/patches/arm/unsubmitted-ldso-multilib.diff new file mode 100644 index 00000000..c7239649 --- /dev/null +++ b/debian/patches/arm/unsubmitted-ldso-multilib.diff @@ -0,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 --git a/debian/patches/git-updates.diff b/debian/patches/git-updates.diff new file mode 100644 index 00000000..5da1c472 --- /dev/null +++ b/debian/patches/git-updates.diff @@ -0,0 +1,2297 @@ +GIT update of https://sourceware.org/git/glibc.git/release/2.31/master from glibc-2.31 + +diff --git a/NEWS b/NEWS +index 292fbc595a..15c040a83e 100644 +--- a/NEWS ++++ b/NEWS +@@ -4,6 +4,30 @@ 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: ++ [20543] Please move from .gnu.linkonce to comdat ++ [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 ++ [25715] system() returns wrong errors when posix_spawn fails ++ ++Security related changes: ++ ++ 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. ++ + + Version 2.31 + +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/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/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/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/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-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/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/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/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/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/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/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/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/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/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/debian/patches/hppa/local-inlining.diff b/debian/patches/hppa/local-inlining.diff new file mode 100644 index 00000000..ea892fb5 --- /dev/null +++ b/debian/patches/hppa/local-inlining.diff @@ -0,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 --git a/debian/patches/hurd-i386/git-anon-mmap-shared.diff b/debian/patches/hurd-i386/git-anon-mmap-shared.diff new file mode 100644 index 00000000..e5e38836 --- /dev/null +++ b/debian/patches/hurd-i386/git-anon-mmap-shared.diff @@ -0,0 +1,36 @@ +Optimizing anonymous maps brings bugs, and does not optimize much anyway. + +https://sourceware.org/bugzilla/show_bug.cgi?id=19903 + +--- a/sysdeps/mach/hurd/mmap.c ++++ b/sysdeps/mach/hurd/mmap.c +@@ -44,29 +44,6 @@ __mmap (__ptr_t addr, size_t len, int pr + if ((mapaddr & (__vm_page_size - 1)) || (offset & (__vm_page_size - 1))) + return (void *) (long int) __hurd_fail (EINVAL); + +- if ((flags & (MAP_TYPE|MAP_INHERIT)) == MAP_ANON +- && prot == (PROT_READ|PROT_WRITE)) /* cf VM_PROT_DEFAULT */ +- { +- /* vm_allocate has (a little) less overhead in the kernel too. */ +- err = __vm_allocate (__mach_task_self (), &mapaddr, len, mapaddr == 0); +- +- if (err == KERN_NO_SPACE) +- { +- if (flags & MAP_FIXED) +- { +- /* XXX this is not atomic as it is in unix! */ +- /* The region is already allocated; deallocate it first. */ +- err = __vm_deallocate (__mach_task_self (), mapaddr, len); +- if (!err) +- err = __vm_allocate (__mach_task_self (), &mapaddr, len, 0); +- } +- else if (mapaddr != 0) +- err = __vm_allocate (__mach_task_self (), &mapaddr, len, 1); +- } +- +- return err ? (void *) (long int) __hurd_fail (err) : (void *) mapaddr; +- } +- + vmprot = VM_PROT_NONE; + if (prot & PROT_READ) + vmprot |= VM_PROT_READ; diff --git a/debian/patches/hurd-i386/git-barrier-1.diff b/debian/patches/hurd-i386/git-barrier-1.diff new file mode 100644 index 00000000..3be11c32 --- /dev/null +++ b/debian/patches/hurd-i386/git-barrier-1.diff @@ -0,0 +1,21 @@ +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 --git a/debian/patches/hurd-i386/git-fork-pthread_exit.diff b/debian/patches/hurd-i386/git-fork-pthread_exit.diff new file mode 100644 index 00000000..0ff3e460 --- /dev/null +++ b/debian/patches/hurd-i386/git-fork-pthread_exit.diff @@ -0,0 +1,36 @@ +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 --git a/debian/patches/hurd-i386/git-pthread_self.diff b/debian/patches/hurd-i386/git-pthread_self.diff new file mode 100644 index 00000000..709c9759 --- /dev/null +++ b/debian/patches/hurd-i386/git-pthread_self.diff @@ -0,0 +1,31 @@ +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 --git a/debian/patches/hurd-i386/git-register-atfork.diff b/debian/patches/hurd-i386/git-register-atfork.diff new file mode 100644 index 00000000..5758aaea --- /dev/null +++ b/debian/patches/hurd-i386/git-register-atfork.diff @@ -0,0 +1,330 @@ +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 --git a/debian/patches/hurd-i386/git-sem-intr.diff b/debian/patches/hurd-i386/git-sem-intr.diff new file mode 100644 index 00000000..6b0b4052 --- /dev/null +++ b/debian/patches/hurd-i386/git-sem-intr.diff @@ -0,0 +1,162 @@ +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 --git a/debian/patches/hurd-i386/git-spin_lock.diff b/debian/patches/hurd-i386/git-spin_lock.diff new file mode 100644 index 00000000..5415713f --- /dev/null +++ b/debian/patches/hurd-i386/git-spin_lock.diff @@ -0,0 +1,22 @@ +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 --git a/debian/patches/hurd-i386/local-ED.diff b/debian/patches/hurd-i386/local-ED.diff new file mode 100644 index 00000000..39bf76aa --- /dev/null +++ b/debian/patches/hurd-i386/local-ED.diff @@ -0,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 --git a/debian/patches/hurd-i386/local-clock_gettime_MONOTONIC.diff b/debian/patches/hurd-i386/local-clock_gettime_MONOTONIC.diff new file mode 100644 index 00000000..516c49e7 --- /dev/null +++ b/debian/patches/hurd-i386/local-clock_gettime_MONOTONIC.diff @@ -0,0 +1,56 @@ +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 +@@ -48,7 +48,7 @@ timer_create (clockid_t clock_id, struct + int + __clock_gettime (clockid_t clock_id, struct timespec *ts) + { +- if (clock_id != CLOCK_REALTIME) ++ if (clock_id != CLOCK_REALTIME && clock_id != CLOCK_MONOTONIC) + { + errno = EINVAL; + return -1; +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) + { + __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 diff --git a/debian/patches/hurd-i386/local-disable-ioctls.diff b/debian/patches/hurd-i386/local-disable-ioctls.diff new file mode 100644 index 00000000..0e8c7170 --- /dev/null +++ b/debian/patches/hurd-i386/local-disable-ioctls.diff @@ -0,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 --git a/debian/patches/hurd-i386/local-enable-ldconfig.diff b/debian/patches/hurd-i386/local-enable-ldconfig.diff new file mode 100644 index 00000000..44348e0e --- /dev/null +++ b/debian/patches/hurd-i386/local-enable-ldconfig.diff @@ -0,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 --git a/debian/patches/hurd-i386/local-exec_filename.diff b/debian/patches/hurd-i386/local-exec_filename.diff new file mode 100644 index 00000000..6a844ba6 --- /dev/null +++ b/debian/patches/hurd-i386/local-exec_filename.diff @@ -0,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 --git a/debian/patches/hurd-i386/local-fix-nss.diff b/debian/patches/hurd-i386/local-fix-nss.diff new file mode 100644 index 00000000..8b1393da --- /dev/null +++ b/debian/patches/hurd-i386/local-fix-nss.diff @@ -0,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 --git a/debian/patches/hurd-i386/local-mach_print.diff b/debian/patches/hurd-i386/local-mach_print.diff new file mode 100644 index 00000000..e9276e42 --- /dev/null +++ b/debian/patches/hurd-i386/local-mach_print.diff @@ -0,0 +1,20 @@ +--- 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 --git a/debian/patches/hurd-i386/local-madvise_warn.diff b/debian/patches/hurd-i386/local-madvise_warn.diff new file mode 100644 index 00000000..d0fad6d6 --- /dev/null +++ b/debian/patches/hurd-i386/local-madvise_warn.diff @@ -0,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 --git a/debian/patches/hurd-i386/local-no-bootstrap-fs-access.diff b/debian/patches/hurd-i386/local-no-bootstrap-fs-access.diff new file mode 100644 index 00000000..8379eaa1 --- /dev/null +++ b/debian/patches/hurd-i386/local-no-bootstrap-fs-access.diff @@ -0,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 --git a/debian/patches/hurd-i386/local-no_unsupported_ioctls.diff b/debian/patches/hurd-i386/local-no_unsupported_ioctls.diff new file mode 100644 index 00000000..f7df62f6 --- /dev/null +++ b/debian/patches/hurd-i386/local-no_unsupported_ioctls.diff @@ -0,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 --git a/debian/patches/hurd-i386/local-usr.diff b/debian/patches/hurd-i386/local-usr.diff new file mode 100644 index 00000000..8339378a --- /dev/null +++ b/debian/patches/hurd-i386/local-usr.diff @@ -0,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 --git a/debian/patches/hurd-i386/posix_openpt.diff b/debian/patches/hurd-i386/posix_openpt.diff new file mode 100644 index 00000000..a9686b72 --- /dev/null +++ b/debian/patches/hurd-i386/posix_openpt.diff @@ -0,0 +1,84 @@ +https://sourceware.org/ml/libc-alpha/2019-12/msg00799.html + +to commit after 2.31 is released + +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 --git a/sysdeps/unix/sysv/linux/getpt.c b/sysdeps/unix/sysv/linux/getpt.c +index cdde8377f5..1cb99d5185 100644 +--- a/sysdeps/unix/sysv/linux/getpt.c ++++ b/sysdeps/unix/sysv/linux/getpt.c +@@ -31,7 +31,7 @@ + #define _PATH_DEVPTS _PATH_DEV "pts" + + /* Prototype for function that opens BSD-style master pseudo-terminals. */ +-extern int __bsd_getpt (void) attribute_hidden; ++extern int __bsd_openpt (int oflag) attribute_hidden; + + /* Open a master pseudo terminal and return its file descriptor. */ + int +@@ -88,14 +88,15 @@ __getpt (void) + { + int fd = __posix_openpt (O_RDWR); + if (fd == -1) +- fd = __bsd_getpt (); ++ fd = __bsd_openpt (O_RDWR); + return fd; + } ++weak_alias (__getpt, getpt) + + + #define PTYNAME1 "pqrstuvwxyzabcde"; + #define PTYNAME2 "0123456789abcdef"; + +-#define __getpt __bsd_getpt ++#define HAVE_GETPT + #define HAVE_POSIX_OPENPT + #include diff --git a/debian/patches/hurd-i386/submitted-AF_LINK.diff b/debian/patches/hurd-i386/submitted-AF_LINK.diff new file mode 100644 index 00000000..e95a987d --- /dev/null +++ b/debian/patches/hurd-i386/submitted-AF_LINK.diff @@ -0,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 --git a/debian/patches/hurd-i386/submitted-bind_umask2.diff b/debian/patches/hurd-i386/submitted-bind_umask2.diff new file mode 100644 index 00000000..190085c4 --- /dev/null +++ b/debian/patches/hurd-i386/submitted-bind_umask2.diff @@ -0,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 --git a/debian/patches/hurd-i386/submitted-net.diff b/debian/patches/hurd-i386/submitted-net.diff new file mode 100644 index 00000000..9c6cd851 --- /dev/null +++ b/debian/patches/hurd-i386/submitted-net.diff @@ -0,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 --git a/debian/patches/hurd-i386/submitted-path_mounted.diff b/debian/patches/hurd-i386/submitted-path_mounted.diff new file mode 100644 index 00000000..40f85044 --- /dev/null +++ b/debian/patches/hurd-i386/submitted-path_mounted.diff @@ -0,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 --git a/debian/patches/hurd-i386/tg-EGREGIOUS-fr.diff b/debian/patches/hurd-i386/tg-EGREGIOUS-fr.diff new file mode 100644 index 00000000..1587985a --- /dev/null +++ b/debian/patches/hurd-i386/tg-EGREGIOUS-fr.diff @@ -0,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 --git a/debian/patches/hurd-i386/tg-EIEIO-fr.diff b/debian/patches/hurd-i386/tg-EIEIO-fr.diff new file mode 100644 index 00000000..e7b394d1 --- /dev/null +++ b/debian/patches/hurd-i386/tg-EIEIO-fr.diff @@ -0,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 --git a/debian/patches/hurd-i386/tg-bigmem.diff b/debian/patches/hurd-i386/tg-bigmem.diff new file mode 100644 index 00000000..7e45768e --- /dev/null +++ b/debian/patches/hurd-i386/tg-bigmem.diff @@ -0,0 +1,48 @@ +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. + +--- + 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 --git a/debian/patches/hurd-i386/tg-bits_atomic.h_multiple_threads.diff b/debian/patches/hurd-i386/tg-bits_atomic.h_multiple_threads.diff new file mode 100644 index 00000000..0f421574 --- /dev/null +++ b/debian/patches/hurd-i386/tg-bits_atomic.h_multiple_threads.diff @@ -0,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 --git a/debian/patches/hurd-i386/tg-bootstrap.diff b/debian/patches/hurd-i386/tg-bootstrap.diff new file mode 100644 index 00000000..86c06f2d --- /dev/null +++ b/debian/patches/hurd-i386/tg-bootstrap.diff @@ -0,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 --git a/debian/patches/hurd-i386/tg-eintr.diff b/debian/patches/hurd-i386/tg-eintr.diff new file mode 100644 index 00000000..e9aea13b --- /dev/null +++ b/debian/patches/hurd-i386/tg-eintr.diff @@ -0,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 --git a/debian/patches/hurd-i386/tg-glibc-2.24-restore-malloc-hook.diff b/debian/patches/hurd-i386/tg-glibc-2.24-restore-malloc-hook.diff new file mode 100644 index 00000000..a1a5a3e3 --- /dev/null +++ b/debian/patches/hurd-i386/tg-glibc-2.24-restore-malloc-hook.diff @@ -0,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 --git a/debian/patches/hurd-i386/tg-hooks.diff b/debian/patches/hurd-i386/tg-hooks.diff new file mode 100644 index 00000000..e2d156d0 --- /dev/null +++ b/debian/patches/hurd-i386/tg-hooks.diff @@ -0,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 --git a/debian/patches/hurd-i386/tg-hurdsig-SA_SIGINFO.diff b/debian/patches/hurd-i386/tg-hurdsig-SA_SIGINFO.diff new file mode 100644 index 00000000..e776578b --- /dev/null +++ b/debian/patches/hurd-i386/tg-hurdsig-SA_SIGINFO.diff @@ -0,0 +1,633 @@ +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 --git a/debian/patches/hurd-i386/tg-ifaddrs_v6.diff b/debian/patches/hurd-i386/tg-ifaddrs_v6.diff new file mode 100644 index 00000000..ac0ebd36 --- /dev/null +++ b/debian/patches/hurd-i386/tg-ifaddrs_v6.diff @@ -0,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 --git a/debian/patches/hurd-i386/tg-libc_rwlock_recursive.diff b/debian/patches/hurd-i386/tg-libc_rwlock_recursive.diff new file mode 100644 index 00000000..c6410d5b --- /dev/null +++ b/debian/patches/hurd-i386/tg-libc_rwlock_recursive.diff @@ -0,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 --git a/debian/patches/hurd-i386/tg-mach-hurd-link.diff b/debian/patches/hurd-i386/tg-mach-hurd-link.diff new file mode 100644 index 00000000..6ee98edf --- /dev/null +++ b/debian/patches/hurd-i386/tg-mach-hurd-link.diff @@ -0,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 --git a/debian/patches/hurd-i386/tg-pie-sbrk.diff b/debian/patches/hurd-i386/tg-pie-sbrk.diff new file mode 100644 index 00000000..ad2c6f1c --- /dev/null +++ b/debian/patches/hurd-i386/tg-pie-sbrk.diff @@ -0,0 +1,34 @@ +From: Samuel Thibault +Subject: Fix sbrk in PIE binaries + +In PIE mode, the program gets loaded at very low address, and thus _end is very +low, just before libraries, and thus initializing the brk to it does not make +sense, since there is no room left there. Hardcode the brk to 0x8000000 for now +as a workaround. + +Signed-off-by: Samuel Thibault + +--- + sysdeps/mach/hurd/brk.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/sysdeps/mach/hurd/brk.c b/sysdeps/mach/hurd/brk.c +index 1900277..fb74e83 100644 +--- a/sysdeps/mach/hurd/brk.c ++++ b/sysdeps/mach/hurd/brk.c +@@ -143,8 +143,12 @@ init_brk (void) + /* 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) ++ if (_hurd_brk == 0) { + _hurd_brk = (vm_address_t) &_end; ++ if (_hurd_brk < 0x8000000) ++ /* XXX: PIE case, get out of library area */ ++ _hurd_brk = 0x8000000; ++ } + + pagend = round_page (_hurd_brk); + +-- +tg: (4a7fa7e..) t/pie-sbrk (depends on: baseline) diff --git a/debian/patches/hurd-i386/tg-sendmsg-SCM_CREDS.diff b/debian/patches/hurd-i386/tg-sendmsg-SCM_CREDS.diff new file mode 100644 index 00000000..3f9c77c0 --- /dev/null +++ b/debian/patches/hurd-i386/tg-sendmsg-SCM_CREDS.diff @@ -0,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 --git a/debian/patches/hurd-i386/tg-sigstate_thread_reference.diff b/debian/patches/hurd-i386/tg-sigstate_thread_reference.diff new file mode 100644 index 00000000..a0bd90e0 --- /dev/null +++ b/debian/patches/hurd-i386/tg-sigstate_thread_reference.diff @@ -0,0 +1,118 @@ +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 --git a/debian/patches/hurd-i386/tg-sysvshm.diff b/debian/patches/hurd-i386/tg-sysvshm.diff new file mode 100644 index 00000000..a439515f --- /dev/null +++ b/debian/patches/hurd-i386/tg-sysvshm.diff @@ -0,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 --git a/debian/patches/hurd-i386/tg-thread-cancel.diff b/debian/patches/hurd-i386/tg-thread-cancel.diff new file mode 100644 index 00000000..a0c15c77 --- /dev/null +++ b/debian/patches/hurd-i386/tg-thread-cancel.diff @@ -0,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 --git a/debian/patches/hurd-i386/tg-unlockpt-chroot.diff b/debian/patches/hurd-i386/tg-unlockpt-chroot.diff new file mode 100644 index 00000000..a8f0d17b --- /dev/null +++ b/debian/patches/hurd-i386/tg-unlockpt-chroot.diff @@ -0,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 --git a/debian/patches/hurd-i386/unsubmitted-clock_t_centiseconds.diff b/debian/patches/hurd-i386/unsubmitted-clock_t_centiseconds.diff new file mode 100644 index 00000000..27db59ec --- /dev/null +++ b/debian/patches/hurd-i386/unsubmitted-clock_t_centiseconds.diff @@ -0,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 --git a/debian/patches/hurd-i386/unsubmitted-getaux_at_secure.diff b/debian/patches/hurd-i386/unsubmitted-getaux_at_secure.diff new file mode 100644 index 00000000..7c7dbaf9 --- /dev/null +++ b/debian/patches/hurd-i386/unsubmitted-getaux_at_secure.diff @@ -0,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 --git a/debian/patches/hurd-i386/unsubmitted-mremap.diff b/debian/patches/hurd-i386/unsubmitted-mremap.diff new file mode 100644 index 00000000..5e1932ee --- /dev/null +++ b/debian/patches/hurd-i386/unsubmitted-mremap.diff @@ -0,0 +1,29 @@ +MREMAP is unimplemented on GNU/Hurd for now + +--- 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 --git a/debian/patches/hurd-i386/unsubmitted-prof-eintr.diff b/debian/patches/hurd-i386/unsubmitted-prof-eintr.diff new file mode 100644 index 00000000..6358389d --- /dev/null +++ b/debian/patches/hurd-i386/unsubmitted-prof-eintr.diff @@ -0,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 --git a/debian/patches/i386/local-biarch.diff b/debian/patches/i386/local-biarch.diff new file mode 100644 index 00000000..7d9e3130 --- /dev/null +++ b/debian/patches/i386/local-biarch.diff @@ -0,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 --git a/debian/patches/i386/unsubmitted-quiet-ldconfig.diff b/debian/patches/i386/unsubmitted-quiet-ldconfig.diff new file mode 100644 index 00000000..0b085fa2 --- /dev/null +++ b/debian/patches/i386/unsubmitted-quiet-ldconfig.diff @@ -0,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 --git a/debian/patches/kfreebsd/local-config_h_in.patch b/debian/patches/kfreebsd/local-config_h_in.patch new file mode 100644 index 00000000..531cad2c --- /dev/null +++ b/debian/patches/kfreebsd/local-config_h_in.patch @@ -0,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 --git a/debian/patches/kfreebsd/local-fbtl-depends.diff b/debian/patches/kfreebsd/local-fbtl-depends.diff new file mode 100644 index 00000000..e249a3a6 --- /dev/null +++ b/debian/patches/kfreebsd/local-fbtl-depends.diff @@ -0,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 --git a/debian/patches/kfreebsd/local-fbtl.diff b/debian/patches/kfreebsd/local-fbtl.diff new file mode 100644 index 00000000..068c8757 --- /dev/null +++ b/debian/patches/kfreebsd/local-fbtl.diff @@ -0,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 --git a/debian/patches/kfreebsd/local-getaddrinfo-freebsd-kernel.diff b/debian/patches/kfreebsd/local-getaddrinfo-freebsd-kernel.diff new file mode 100644 index 00000000..c69f55fa --- /dev/null +++ b/debian/patches/kfreebsd/local-getaddrinfo-freebsd-kernel.diff @@ -0,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 --git a/debian/patches/kfreebsd/local-grantpt.diff b/debian/patches/kfreebsd/local-grantpt.diff new file mode 100644 index 00000000..72aa7424 --- /dev/null +++ b/debian/patches/kfreebsd/local-grantpt.diff @@ -0,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 --git a/debian/patches/kfreebsd/local-initgroups-order.diff b/debian/patches/kfreebsd/local-initgroups-order.diff new file mode 100644 index 00000000..722dc14f --- /dev/null +++ b/debian/patches/kfreebsd/local-initgroups-order.diff @@ -0,0 +1,38 @@ + + setgroups(size, groups) changes egid on kfreebsd, + precisely groups[0] is the new egid + + initgroups(user, gid) prepares the "groups" list + via internal_getgrouplist(). + It puts supplied gid as the first entry in all but NSCD cases. + Fix the remaining NSCD case, see #698102, #699593. + + +--- a/nscd/nscd_initgroups.c ++++ b/nscd/nscd_initgroups.c +@@ -145,15 +145,23 @@ + } + + /* Check whether GROUP is part of the mix. If not, add it. */ ++ /* The GROUP have to be in the first entry */ + if (retval >= 0) + { + int cnt; ++ gid_t sg, tg; ++ sg = group; + for (cnt = 0; cnt < retval; ++cnt) +- if ((*groupsp)[cnt] == group) ++ { ++ tg = (*groupsp)[cnt]; ++ (*groupsp)[cnt] = sg; ++ if (tg == group) + break; ++ sg = tg; ++ } + + if (cnt == retval) +- (*groupsp)[retval++] = group; ++ (*groupsp)[retval++] = sg; + } + + out_close: diff --git a/debian/patches/kfreebsd/local-memusage_no_mremap.diff b/debian/patches/kfreebsd/local-memusage_no_mremap.diff new file mode 100644 index 00000000..bd93869d --- /dev/null +++ b/debian/patches/kfreebsd/local-memusage_no_mremap.diff @@ -0,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 --git a/debian/patches/kfreebsd/local-no-execfn.diff b/debian/patches/kfreebsd/local-no-execfn.diff new file mode 100644 index 00000000..bd0c4646 --- /dev/null +++ b/debian/patches/kfreebsd/local-no-execfn.diff @@ -0,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 --git a/debian/patches/kfreebsd/local-scripts.diff b/debian/patches/kfreebsd/local-scripts.diff new file mode 100644 index 00000000..c00eda58 --- /dev/null +++ b/debian/patches/kfreebsd/local-scripts.diff @@ -0,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 --git a/debian/patches/kfreebsd/local-sys_queue_h.diff b/debian/patches/kfreebsd/local-sys_queue_h.diff new file mode 100644 index 00000000..1c2771eb --- /dev/null +++ b/debian/patches/kfreebsd/local-sys_queue_h.diff @@ -0,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 --git a/debian/patches/kfreebsd/local-sysdeps.diff b/debian/patches/kfreebsd/local-sysdeps.diff new file mode 100644 index 00000000..5512259a --- /dev/null +++ b/debian/patches/kfreebsd/local-sysdeps.diff @@ -0,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 --git a/debian/patches/kfreebsd/local-tst-auxv.diff b/debian/patches/kfreebsd/local-tst-auxv.diff new file mode 100644 index 00000000..97024065 --- /dev/null +++ b/debian/patches/kfreebsd/local-tst-auxv.diff @@ -0,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 --git a/debian/patches/kfreebsd/local-tst-unique.diff b/debian/patches/kfreebsd/local-tst-unique.diff new file mode 100644 index 00000000..f61d4753 --- /dev/null +++ b/debian/patches/kfreebsd/local-tst-unique.diff @@ -0,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 --git a/debian/patches/kfreebsd/local-undef-glibc.diff b/debian/patches/kfreebsd/local-undef-glibc.diff new file mode 100644 index 00000000..f0c9c2b9 --- /dev/null +++ b/debian/patches/kfreebsd/local-undef-glibc.diff @@ -0,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 --git a/debian/patches/kfreebsd/submitted-auxv.diff b/debian/patches/kfreebsd/submitted-auxv.diff new file mode 100644 index 00000000..b9928b29 --- /dev/null +++ b/debian/patches/kfreebsd/submitted-auxv.diff @@ -0,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 --git a/debian/patches/kfreebsd/submitted-waitid.diff b/debian/patches/kfreebsd/submitted-waitid.diff new file mode 100644 index 00000000..f2abb876 --- /dev/null +++ b/debian/patches/kfreebsd/submitted-waitid.diff @@ -0,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 @@ + /* Bits in the third argument to `waitpid'. */ + #define WNOHANG 1 /* Don't block waiting. */ + #define WUNTRACED 2 /* Report status of stopped children. */ ++ ++/* 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 --git a/debian/patches/locale/LC_IDENTIFICATION-optional-fields.diff b/debian/patches/locale/LC_IDENTIFICATION-optional-fields.diff new file mode 100644 index 00000000..7e98d412 --- /dev/null +++ b/debian/patches/locale/LC_IDENTIFICATION-optional-fields.diff @@ -0,0 +1,37 @@ +In LC_IDENTIFICATION, audience, application and abbreviation keywords +are optional, thus do not report an error if they are not defined. + +# DP: Dpatch author: Denis Barbier +# DP: Patch author: Denis Barbier +# DP: Upstream status: not submitted +# DP: Date: 2006-01-08 + +--- + locale/programs/ld-identification.c | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +--- a/locale/programs/ld-identification.c ++++ b/locale/programs/ld-identification.c +@@ -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 --git a/debian/patches/locale/check-unknown-symbols.diff b/debian/patches/locale/check-unknown-symbols.diff new file mode 100644 index 00000000..dbe8f363 --- /dev/null +++ b/debian/patches/locale/check-unknown-symbols.diff @@ -0,0 +1,37 @@ +Check for unknown symbols in collation rules. This is useful to detect +broken locales since unknown symbols are always wrong. + +This request has not been submitted upstream yet. + +# DP: Dpatch author: Denis Barbier +# DP: Patch author: Denis Barbier +# DP: Upstream status: not submitted +# DP: Date: 2006-01-08 + +--- + locale/programs/ld-collate.c | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +--- a/locale/programs/ld-collate.c ++++ b/locale/programs/ld-collate.c +@@ -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 --git a/debian/patches/locale/locale-print-LANGUAGE.diff b/debian/patches/locale/locale-print-LANGUAGE.diff new file mode 100644 index 00000000..b656d897 --- /dev/null +++ b/debian/patches/locale/locale-print-LANGUAGE.diff @@ -0,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 --git a/debian/patches/localedata/locale-C.diff b/debian/patches/localedata/locale-C.diff new file mode 100644 index 00000000..fd271d8b --- /dev/null +++ b/debian/patches/localedata/locale-C.diff @@ -0,0 +1,3235 @@ +--- /dev/null ++++ b/localedata/locales/C +@@ -0,0 +1,3232 @@ ++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 ++% The following is a copy of i18n with the following change: ++% - The "blank", "cntrl", "space" classes are defined as specified by POSIX ++ ++% The "upper" class reflects the uppercase characters of class "alpha" ++upper / ++ ..;..;..;;;/ ++ ;;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;;..;;;/ ++ ..;;..;..;/ ++ ..;..;..;..;/ ++ ..;;;..;;;/ ++ ..;..;;..;;/ ++ ..;..;..;;;/ ++ ;;;;;;;;;/ ++ ;;;;;;..;;/ ++ ..;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;;;..;..;/ ++ ;..;;;;;;;/ ++ ;;;..;;..;/ ++ ..;..;;..;;/ ++ ;;;;;;;;;/ ++ ;;;;..;..;/ ++ ;;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;;;;;;;/ ++ ..;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;..;..;;;/ ++ ..;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;;;;;;;;/ ++ ..;..;..;..;/ ++ ..;;;;;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ;;..;..;;/ ++ ..;;;;..;/ ++ ..;..;;..;;/ ++ ..;..;;..;;/ ++ ;;..;;;..;/ ++ ;;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;;..;;;;;/ ++ ;;;;;;;;;/ ++ ;;;;;..;/ ++ ..;;..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;;/ ++ ..;;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;;/ ++ ..;..;/ ++ ..;.. ++ ++% The "lower" class reflects the lowercase characters of class "alpha" ++lower / ++ ..;;;;..;/ ++ ..;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;..;;;;;;/ ++ ;;..;;;;;;/ ++ ;;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;..;;;;/ ++ ..;;;..;;;/ ++ ;;;..;;;;;/ ++ ..;..;..;..;/ ++ ..;;;;;;;;/ ++ ..;;;;;;;;/ ++ ;..;..;;;;/ ++ ;;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;;;;;;;;/ ++ ..;;..;;;;/ ++ ;;..;..;..;/ ++ ..;;;;;..;/ ++ ;..;..;..;;/ ++ ;;;;;;;;;/ ++ ;..;;;..;/ ++ ..;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;;;;;;..;/ ++ ;;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;;..;..;/ ++ ..;..;;;;;/ ++ ;;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;;;;;;..;/ ++ ;;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;;/ ++ ..;..;..;..;/ ++ ..;..;..;;;/ ++ ..;;..;;;;/ ++ ;..;..;;..;/ ++ ;..;..;;..;/ ++ ;;;;..;..;/ ++ ;;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;;;..;;;;/ ++ ..;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;;;..;;;;/ ++ ;;;..;;;;;/ ++ ;;;;;;;;;/ ++ ;;;;;;;;;/ ++ ;;;;;;;;/ ++ ..;;;;;;;;/ ++ ;;;..;;;;;/ ++ ;;;;;;;;/ ++ ..;..;..;..;/ ++ ..;..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;;/ ++ .. ++ ++% The "alpha" class of the "i18n" FDCC-set is reflecting ++% the recommendations in TR 10176 annex A ++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). ++digit / ++ .. ++ ++% The "outdigit" information is by default "0" to "9". We don't have to ++% provide it here since localedef will fill in the bits and it would ++% prevent locales copying this file define their own values. ++% outdigit / ++% .. ++ ++space / ++ ..; ++ ++cntrl / ++ ..; ++ ++punct / ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ;;..;..;..;/ ++ ;..;..;;;/ ++ ..;;;..;..;/ ++ ..;..;..;;;/ ++ ;;..;..;..;/ ++ ..;;..;;..;/ ++ ..;..;..;;/ ++ ..;..;..;..;/ ++ ;..;..;;..;/ ++ ..;;;..;..;/ ++ ;;;..;;;;;/ ++ ..;;;;..;;/ ++ ..;;..;;;;/ ++ ;..;..;;;;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;;..;..;/ ++ ..;..;..;;/ ++ ..;..;;..;/ ++ ..;..;;..;/ ++ ..;..;;..;/ ++ ..;..;..;;/ ++ ..;..;..;;/ ++ ..;;..;..;;/ ++ ..;;..;..;/ ++ ..;;;..;..;/ ++ ;..;..;..;/ ++ ..;..;..;..;/ ++ ;;..;..;;/ ++ ..;;..;..;/ ++ ..;..;..;;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;;/ ++ ..;..;;;;;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;;;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;;;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;;;/ ++ ;..;..;..;;/ ++ ..;..;..;;/ ++ ..;;;;..;/ ++ ..;;..;..;/ ++ ..;;;..;..;/ ++ ;;..;..;;/ ++ ..;..;..;..;/ ++ ..;..;..;;/ ++ ..;..;..;..;/ ++ ..;..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;;..;/ ++ ..;..;;/ ++ ;;..;/ ++ ..;..;/ ++ ..;..;;/ ++ ;..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;;/ ++ ..;;..;/ ++ ..;..;/ ++ ..;;..;/ ++ ;;..;/ ++ ..;;;/ ++ ..;;;/ ++ ..;;..;/ ++ ;..;..;/ ++ ..;;..;/ ++ ..;;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;;;;;/ ++ ;;;;;;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;;..;/ ++ ..;..;/ ++ ..;;;/ ++ ..;..;/ ++ ..;.. ++ ++graph / ++ ..;..;..;..;/ ++ ;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;;/ ++ ..;..;..;..;/ ++ ..;..;..;;/ ++ ..;..;..;..;/ ++ ;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ;..;..;..;;/ ++ ..;;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;;..;..;;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;;/ ++ ..;..;..;..;/ ++ ..;..;..;;;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ;..;;..;;/ ++ ..;..;..;..;/ ++ ..;..;;..;;/ ++ ;..;..;..;;/ ++ ;..;..;..;/ ++ ..;;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ;;..;..;..;/ ++ ;..;..;..;/ ++ ..;..;..;;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;;;;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;;;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;;..;/ ++ ..;..;/ ++ ..;;..;/ ++ ..;;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;;;/ ++ ..;..;/ ++ ..;..;;/ ++ ;..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;;/ ++ ..;..;/ ++ ..;;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;;/ ++ ;..;..;/ ++ ;;;;;;/ ++ ..;..;;/ ++ ;;;;;/ ++ ..;;..;/ ++ ..;..;/ ++ ..;;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;;..;/ ++ ..;..;/ ++ ..;;..;/ ++ ..;..;/ ++ ..;..;;/ ++ ..;..;/ ++ ..;.. ++ ++print / ++ ..;..;..;..;/ ++ ;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;;/ ++ ..;..;..;..;/ ++ ..;..;..;;/ ++ ..;..;..;..;/ ++ ;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ;..;..;..;;/ ++ ..;;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;;..;..;;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;;/ ++ ..;..;..;..;/ ++ ..;..;..;;;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ;..;;..;;/ ++ ..;..;..;..;/ ++ ..;..;;..;;/ ++ ;..;..;..;;/ ++ ;..;..;..;/ ++ ..;;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ;;..;..;..;/ ++ ;..;..;..;/ ++ ..;..;..;;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;;;;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ;;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;;/ ++ ..;..;/ ++ ..;..;;/ ++ ..;..;;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;;/ ++ ;..;..;/ ++ ..;..;;/ ++ ;..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;;/ ++ ..;..;/ ++ ..;;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;;/ ++ ;..;..;/ ++ ;;;;;;/ ++ ..;..;;/ ++ ;;;;;/ ++ ..;;..;/ ++ ..;..;/ ++ ..;;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;;..;/ ++ ..;..;/ ++ ..;;..;/ ++ ..;..;/ ++ ..;..;;/ ++ ..;..;/ ++ ..;.. ++ ++% The "xdigit" class must only contain the BASIC LATIN digits and A-F, a-f, ++% says ISO C 99 (sections 7.25.2.1.12 and 6.4.4.1). ++xdigit / ++ ..;..;.. ++ ++blank / ++ ; ++ ++toupper / ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,) ++ ++tolower / ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,) ++ ++map "totitle"; / ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);(,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,);(,);/ ++ (,) ++ ++% The "combining" class reflects ISO/IEC 10646-1 annex B.1 ++% That is, all combining characters (level 2+3). ++class "combining"; / ++ ..;..;..;;/ ++ ..;..;;..;/ ++ ..;;..;..;/ ++ ..;..;;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;;..;/ ++ ..;..;;..;/ ++ ..;;..;..;/ ++ ..;;..;;..;/ ++ ;..;..;..;/ ++ ..;..;;..;/ ++ ..;..;..;..;/ ++ ;..;..;..;;/ ++ ..;..;..;..;/ ++ ..;..;..;;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;;..;..;;/ ++ ..;;..;..;;/ ++ ..;..;;..;/ ++ ..;..;..;;;/ ++ ;..;..;..;/ ++ ..;..;;..;/ ++ ..;..;..;..;/ ++ ..;..;;..;/ ++ ..;..;..;..;/ ++ ..;..;;..;/ ++ ..;;..;..;/ ++ ..;..;..;;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;;..;/ ++ ..;..;..;..;/ ++ ..;;..;..;/ ++ ..;..;..;..;/ ++ ..;;;;..;/ ++ ..;..;..;..;/ ++ ..;..;..;;/ ++ ..;;..;..;;/ ++ ..;..;..;;/ ++ ..;..;..;..;/ ++ ;..;..;;;/ ++ ..;..;/ ++ ..;..;/ ++ ..;;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;;/ ++ ..;..;/ ++ ..;..;;/ ++ ..;..;;/ ++ ..;..;/ ++ ..;;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;;;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;.. ++ ++% The "combining_level3" class reflects ISO/IEC 10646-1 annex B.2 ++% That is, combining characters of level 3. ++class "combining_level3"; / ++ ..;;..;..;;/ ++ ..;;..;..;;/ ++ ;..;..;..;/ ++ ..;..;..;..;/ ++ ..;;..;..;/ ++ ..;;..;..;;/ ++ ..;..;..;;/ ++ ..;;..;;..;/ ++ ..;..;..;..;/ ++ ;..;..;..;/ ++ ..;..;;..;/ ++ ..;..;;..;/ ++ ..;..;..;..;/ ++ ..;..;;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ;..;..;;..;/ ++ ;..;..;;..;/ ++ ..;;..;..;/ ++ ..;..;..;;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;..;/ ++ ..;..;..;;/ ++ ..;..;..;..;/ ++ ..;..;;..;/ ++ ..;..;..;..;/ ++ ..;..;;..;/ ++ ..;;;;..;/ ++ ..;..;..;..;/ ++ ..;..;;..;;/ ++ ..;..;..;..;/ ++ ..;..;;..;/ ++ ..;..;;/ ++ ;;;..;/ ++ ..;..;/ ++ ..;..;;/ ++ ..;..;/ ++ ..;..;;/ ++ ..;..;;/ ++ ..;..;/ ++ ..;;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;..;/ ++ ..;;;/ ++ ..;..;;/ ++ .. ++ ++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 --git a/debian/patches/localedata/locale-en_DK.diff b/debian/patches/localedata/locale-en_DK.diff new file mode 100644 index 00000000..3c5f4de1 --- /dev/null +++ b/debian/patches/localedata/locale-en_DK.diff @@ -0,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 --git a/debian/patches/localedata/locale-eu_FR.diff b/debian/patches/localedata/locale-eu_FR.diff new file mode 100644 index 00000000..594e99c2 --- /dev/null +++ b/debian/patches/localedata/locale-eu_FR.diff @@ -0,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 --git a/debian/patches/localedata/locale-ku_TR.diff b/debian/patches/localedata/locale-ku_TR.diff new file mode 100644 index 00000000..d15e6288 --- /dev/null +++ b/debian/patches/localedata/locale-ku_TR.diff @@ -0,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 --git a/debian/patches/localedata/locale-zh_TW.diff b/debian/patches/localedata/locale-zh_TW.diff new file mode 100644 index 00000000..02612cfe --- /dev/null +++ b/debian/patches/localedata/locale-zh_TW.diff @@ -0,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 --git a/debian/patches/localedata/locales-fr.diff b/debian/patches/localedata/locales-fr.diff new file mode 100644 index 00000000..d7c54306 --- /dev/null +++ b/debian/patches/localedata/locales-fr.diff @@ -0,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 --git a/debian/patches/localedata/sort-UTF8-first.diff b/debian/patches/localedata/sort-UTF8-first.diff new file mode 100644 index 00000000..afc2f528 --- /dev/null +++ b/debian/patches/localedata/sort-UTF8-first.diff @@ -0,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 --git a/debian/patches/localedata/submitted-es_MX-decimal_point.diff b/debian/patches/localedata/submitted-es_MX-decimal_point.diff new file mode 100644 index 00000000..aeb0f7cb --- /dev/null +++ b/debian/patches/localedata/submitted-es_MX-decimal_point.diff @@ -0,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 --git a/debian/patches/localedata/supported.diff b/debian/patches/localedata/supported.diff new file mode 100644 index 00000000..458cf15d --- /dev/null +++ b/debian/patches/localedata/supported.diff @@ -0,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 --git a/debian/patches/localedata/tailor-iso14651_t1.diff b/debian/patches/localedata/tailor-iso14651_t1.diff new file mode 100644 index 00000000..4422f6c4 --- /dev/null +++ b/debian/patches/localedata/tailor-iso14651_t1.diff @@ -0,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 --git a/debian/patches/m68k/local-dwarf2-buildfix.diff b/debian/patches/m68k/local-dwarf2-buildfix.diff new file mode 100644 index 00000000..b189bf91 --- /dev/null +++ b/debian/patches/m68k/local-dwarf2-buildfix.diff @@ -0,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 --git a/debian/patches/m68k/local-reloc.diff b/debian/patches/m68k/local-reloc.diff new file mode 100644 index 00000000..3d25b1a2 --- /dev/null +++ b/debian/patches/m68k/local-reloc.diff @@ -0,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 --git a/debian/patches/m68k/submitted-gcc34-seccomment.diff b/debian/patches/m68k/submitted-gcc34-seccomment.diff new file mode 100644 index 00000000..59aad518 --- /dev/null +++ b/debian/patches/m68k/submitted-gcc34-seccomment.diff @@ -0,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 --git a/debian/patches/mips/submitted-rld_map.diff b/debian/patches/mips/submitted-rld_map.diff new file mode 100644 index 00000000..b26cb5df --- /dev/null +++ b/debian/patches/mips/submitted-rld_map.diff @@ -0,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 --git a/debian/patches/powerpc/local-powerpc8xx-dcbz.diff b/debian/patches/powerpc/local-powerpc8xx-dcbz.diff new file mode 100644 index 00000000..199c92a3 --- /dev/null +++ b/debian/patches/powerpc/local-powerpc8xx-dcbz.diff @@ -0,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 --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 00000000..dd01241b --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,137 @@ +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 + +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/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/tg-hurdsig-SA_SIGINFO.diff +hurd-i386/tg-hooks.diff +hurd-i386/local-usr.diff +hurd-i386/tg-pie-sbrk.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/tg-sigstate_thread_reference.diff +hurd-i386/submitted-bind_umask2.diff +hurd-i386/tg-bootstrap.diff +hurd-i386/local-mach_print.diff +#hurd-i386/git-anon-mmap-shared.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-pthread_self.diff + +i386/local-biarch.diff +i386/unsubmitted-quiet-ldconfig.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-rtlddir-cross.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-libpic.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 + +# Ubuntu patches live in their own little world, to maintain sanity +ubuntu/local-altlocaledir.diff +ubuntu/local-disable-ld_audit.diff +ubuntu/local-disable-nscd-netgroup-caching.diff +ubuntu/submitted-no-sprintf-pre-truncate.diff +ubuntu/localedata/ckb_IQ-new_locale.diff +ubuntu/localedata/en_IE-am_pm.diff +ubuntu/localedata/eo_US.diff +ubuntu/localedata/es_DO-am_pm.diff +ubuntu/localedata/lv_LV-currency.diff +ubuntu/localedata/sd_PK.diff +ubuntu/localedata/ug_CN@latin.diff +ubuntu/local-pldd-root.diff diff --git a/debian/patches/series.hurd-i386 b/debian/patches/series.hurd-i386 new file mode 100644 index 00000000..e28716ac --- /dev/null +++ b/debian/patches/series.hurd-i386 @@ -0,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 --git a/debian/patches/series.kfreebsd-amd64 b/debian/patches/series.kfreebsd-amd64 new file mode 100644 index 00000000..135b5e7d --- /dev/null +++ b/debian/patches/series.kfreebsd-amd64 @@ -0,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 --git a/debian/patches/series.kfreebsd-i386 b/debian/patches/series.kfreebsd-i386 new file mode 100644 index 00000000..135b5e7d --- /dev/null +++ b/debian/patches/series.kfreebsd-i386 @@ -0,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 --git a/debian/patches/sh4/local-fpscr_values.diff b/debian/patches/sh4/local-fpscr_values.diff new file mode 100644 index 00000000..f2bbfd94 --- /dev/null +++ b/debian/patches/sh4/local-fpscr_values.diff @@ -0,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 --git a/debian/patches/ubuntu/local-altlocaledir.diff b/debian/patches/ubuntu/local-altlocaledir.diff new file mode 100644 index 00000000..8899f3da --- /dev/null +++ b/debian/patches/ubuntu/local-altlocaledir.diff @@ -0,0 +1,38 @@ +# All lines beginning with `# DP:' are a description of the patch. +# DP: Description: support alternative gettext tree in +# DP: /usr/share/locale-langpack +# DP: Dpatch author: Martin Pitt +# DP: Patch author: Martin Pitt +# DP: Upstream status: Ubuntu-Specific +# DP: Date: 2004-12-06 20:44:10 CET +# DP: Updated: 2016-10-05 13:51:00 CET + +--- glibc-2.3.5.orig/intl/l10nflist.c ++++ glibc-2.3.5/intl/l10nflist.c +@@ -267,7 +267,7 @@ _nl_make_l10nflist (l10nfile_list, dirli + + retval = (struct loaded_l10nfile *) + malloc (sizeof (*retval) + (__argz_count (dirlist, dirlist_len) +- * (1 << pop (mask)) ++ * 2 * (1 << pop (mask)) + * sizeof (struct loaded_l10nfile *))); + if (retval == NULL) + { +@@ -310,6 +310,17 @@ _nl_make_l10nflist (l10nfile_list, dirli + language, territory, codeset, + normalized_codeset, modifier, filename, 1); + } ++ const char* langpack_dir = "/usr/share/locale-langpack"; ++ if (strncmp(filename, "LC_MESSAGES", strlen("LC_MESSAGES")) == 0) { ++ for (cnt = mask; cnt >= 0; --cnt) ++ if ((cnt & ~mask) == 0) ++ { ++ retval->successor[entries++] ++ = _nl_make_l10nflist (l10nfile_list, langpack_dir, strlen (langpack_dir) + 1, cnt, ++ language, territory, codeset, ++ normalized_codeset, modifier, filename, 1); ++ } ++ } + retval->successor[entries] = NULL; + + return retval; diff --git a/debian/patches/ubuntu/local-disable-ld_audit.diff b/debian/patches/ubuntu/local-disable-ld_audit.diff new file mode 100644 index 00000000..390135ec --- /dev/null +++ b/debian/patches/ubuntu/local-disable-ld_audit.diff @@ -0,0 +1,20 @@ +Description: pro-actively disable LD_AUDIT for setuid binaries, regardless + of where the libraries are loaded from. This is to try to make sure that + CVE-2010-3856 cannot sneak back in. Upstream is unlikely to take this, + since it limits the functionality of LD_AUDIT. +Author: Kees Cook +Author: Adam Conrad + +Index: eglibc-2.15/elf/rtld.c +=================================================================== +--- eglibc-2.15.orig/elf/rtld.c 2012-05-09 10:05:29.456899131 -0700 ++++ eglibc-2.15/elf/rtld.c 2012-05-09 10:38:53.952009069 -0700 +@@ -2442,7 +2442,7 @@ + char *p; + + while ((p = (strsep) (&str, ":")) != NULL) +- if (dso_name_valid_for_suid (p)) ++ if (! __glibc_unlikely (__libc_enable_secure) && dso_name_valid_for_suid (p)) + { + /* This is using the local malloc, not the system malloc. The + memory can never be freed. */ diff --git a/debian/patches/ubuntu/local-disable-nscd-netgroup-caching.diff b/debian/patches/ubuntu/local-disable-nscd-netgroup-caching.diff new file mode 100644 index 00000000..b21fb057 --- /dev/null +++ b/debian/patches/ubuntu/local-disable-nscd-netgroup-caching.diff @@ -0,0 +1,13 @@ +--- eglibc-2.16.orig/nscd/nscd.conf ++++ eglibc-2.16/nscd/nscd.conf +@@ -80,7 +80,9 @@ + shared services yes + max-db-size services 33554432 + +- enable-cache netgroup yes ++# netgroup caching is known-broken, so disable it in the default config, ++# see: https://bugs.launchpad.net/ubuntu/+source/eglibc/+bug/1068889 ++ enable-cache netgroup no + positive-time-to-live netgroup 28800 + negative-time-to-live netgroup 20 + suggested-size netgroup 211 diff --git a/debian/patches/ubuntu/local-pldd-root.diff b/debian/patches/ubuntu/local-pldd-root.diff new file mode 100644 index 00000000..f0beb9aa --- /dev/null +++ b/debian/patches/ubuntu/local-pldd-root.diff @@ -0,0 +1,10 @@ +Description: Run tst-pldd as root so we have CAP_SYS_PTRACE +Author: Adam Conrad +Forwarded: no +Last-Update: 2019-09-16 + +--- /dev/null ++++ glibc-2.30/elf/tst-pldd.script +@@ -0,0 +1,2 @@ ++# We need to run this as root on Ubuntu to get ptrace permissions: ++su diff --git a/debian/patches/ubuntu/localedata/ckb_IQ-new_locale.diff b/debian/patches/ubuntu/localedata/ckb_IQ-new_locale.diff new file mode 100644 index 00000000..5d19bf58 --- /dev/null +++ b/debian/patches/ubuntu/localedata/ckb_IQ-new_locale.diff @@ -0,0 +1,488 @@ +Description: Add the ckb_IQ locale +Bug-Ubuntu: https://launchpad.net/bugs/1388808 +Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=9809 +Author: Gunnar Hjalmarsson + +diff -Nru langpack-locales.orig/locales/ckb_IQ langpack-locales/locales/ckb_IQ +--- a/localedata/locales/ckb_IQ 1970-01-01 01:00:00.000000000 +0100 ++++ b/localedata/locales/ckb_IQ 2014-11-03 20:10:04.011565898 +0100 +@@ -0,0 +1,468 @@ ++comment_char % ++escape_char / ++% ++% ++%%%%%%%%%%%%%%%% local Definition ku_ckb | ckb_iq | ckb_ir %%%%%%%%%%%%%%%%%%%%%%% ++% FOR ALL KURDISH DIALECTS USING ARABIC ALPHABETS ++% Kurdish language locale for Iraq and Iran (using arabic letters): ++% KU_CKB, KU_BA, KU_HO, KU_LU ++% Contributed by Aras Noori ++% Filename: ckb_iq ++% Locale name: ckb_iq.UTF-8 ++% Language: kurdish sorani ++% Language abbrivation: KU-AR(Kurdish - Arabic letters) ++% Charset: UTF-8 ++% Creation Date: 2009-11-03 ++% History: ++% January 2009: Defining CKB locale ++% March 2009: Adding rule for CKB ++% October 2009: bug fixing and redefine ++% April 2010 fixing "not found category" problems ++% March 2011 fixing all bugs ++% Sept 2014: fixing alphabet and unicode bugs ++% Oct 2014: fixing Address and fmt_name issues ++ ++LC_IDENTIFICATION ++title "Kurdish language locale based on Arabic letters" ++source "Aras Noori" ++address "see e-mail" ++contact "Aras Noori" ++email "aras.noori@gmail.com" ++tel "+49 17629857380" ++fax "" ++language "Kurdish" ++territory "Iraq, Iran" ++revision "0.8" ++date "2014-09-20" ++ ++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 ++category "i18n:2012";LC_MEASUREMENT ++ ++END LC_IDENTIFICATION ++ ++LC_CTYPE ++copy "i18n" ++END LC_CTYPE ++ ++LC_COLLATE ++% The Kurdish Sorani, Bahdini, and others dialects is mainly written using a modified (Arabic-based alphabet) with 33 letters. ++% Unlike the regular Arabic alphabet, which is an abjad, kurdish is an alphabet in which vowels are mandatory, making the script easy to read. ++% ++% The kurdish alphabet order is: ++% in Latin: a, b, c, ç, d, e, ê, f, g, h, i, î, j, k, l, ll, m, n, o, p, q, r, rr, s, sh, t, u, uu, v, w, x, y, z ++% vowels: A, E, I, O, U, UU ++% ++% Copy the template from ISO/IEC 14651 ++ ++order_start forward; forward ++% ++% Kurdish numeric characters. ++% ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++% ++% Characters from space to / and from : to ~ and nbsp. ++% ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++% ++% Kurish alphabet order. ++% ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++% ++ % ++ % English numeric characters. ++ % ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ % ++ % ++ % English alphabet. ++ % ++ ; ++ ; ++ ; ++ ; ++ ; ++ ; ++ ; ++ ; ++ ; ++ ; ++ ; ++ ; ++ ; ++ ; ++ ; ++ ; ++ ; ++ ; ++ ; ++ ; ++ ; ++ ; ++ ; ++ ; ++ ; ++ ; ++ ; ++ ; ++ ; ++ ; ++ ; ++ ; ++ ; ++ ; ++ ; ++ ; ++ ; ++ ; ++ ; ++ ; ++ ; ++ ; ++ ; ++ ; ++ ; ++ ; ++ ; ++ ; ++ ; ++ ; ++ ; ++ ; ++ % ++ % ++ % Other control characters etc. upto order_end ++ % ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ IGNORE ++order_end ++ ++END LC_COLLATE ++ ++LC_MONETARY ++int_curr_symbol "" ++currency_symbol "" ++mon_decimal_point "" ++mon_thousands_sep "" ++mon_grouping 3 ++positive_sign "" ++negative_sign "" ++int_frac_digits 3 ++frac_digits 3 ++p_cs_precedes 1 ++p_sep_by_space 1 ++n_cs_precedes 1 ++n_sep_by_space 1 ++p_sign_posn 1 ++n_sign_posn 2 ++ ++END LC_MONETARY ++ ++ ++LC_NUMERIC ++% This is the POSIX Locale definition for the LC_NUMERIC category. ++decimal_point "" ++thousands_sep "" ++grouping 3 ++END LC_NUMERIC ++ ++ ++LC_TIME ++% This is the POSIX Locale definition for the LC_TIME category. ++% These are generated based on XML base Locale difintion file ++% ++% Abbreviated weekday names ++abday "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "" ++% ++% Full weekday names ++day "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "" ++% ++% Abbreviated month names ++abmon "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "" ++% ++% Full month names ++mon "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "" ++% ++% Equivalent of AM PM ++am_pm "";"" ++% ++% Appropriate date and time representation ++d_t_fmt "/ ++/ ++" ++% ++% Appropriate date representation(%x) ++% "%Oy/%Om/%Od" ++d_fmt "" ++% ++% Appropriate time representation ++% ++t_fmt "/ ++" ++% ++% Appropriate 12 h time representation ++t_fmt_ampm "/ ++" ++% ++% Appropriate date representation ++date_fmt "/ ++/ ++/ ++" ++ ++% FIXME: found in CLDR ++first_weekday 7 ++first_workday 7 ++cal_direction 3 ++END LC_TIME ++ ++ ++LC_MESSAGES ++yesexpr "" ++noexpr "" ++END LC_MESSAGES ++ ++ ++LC_PAPER ++% This is the ISO_IEC TR14652 Locale definition for the ++height 297 ++width 210 ++END LC_PAPER ++ ++ ++LC_NAME ++% This is the ISO_IEC TR14652 Locale definition for the ++% LC_NAME category. ++% ++name_fmt "/ ++" ++name_gen "" ++name_miss "" ++name_ms "" ++name_mrs "" ++name_mr "" ++END LC_NAME ++% ++LC_ADDRESS ++% This is the ISO_IEC TR14652 Locale definition for the ++postal_fmt "/ ++" ++country_ab2 "" ++country_ab3 "" ++country_post "" ++country_num 368 ++country_car "" ++% ++END LC_ADDRESS ++ ++ ++LC_TELEPHONE ++% ++tel_int_fmt "/ ++" ++tel_dom_fmt "" ++int_select "" ++int_prefix "" ++ ++END LC_TELEPHONE ++ ++ ++LC_MEASUREMENT ++% This is the ISO_IEC TR14652 Locale definition ++% ++measurement 1 ++ ++END LC_MEASUREMENT +diff -Nru langpack-locales.orig/SUPPORTED langpack-locales/SUPPORTED +--- a/localedata/SUPPORTED 2014-11-04 02:20:10.983097932 +0100 ++++ b/localedata/SUPPORTED 2014-11-04 02:29:38.337911294 +0100 +@@ -80,6 +80,7 @@ + ca_IT.UTF-8/UTF-8 \ + ca_IT/ISO-8859-15 \ + ce_RU/UTF-8 \ ++ckb_IQ/UTF-8 \ + chr_US/UTF-8 \ + cmn_TW/UTF-8 \ + crh_UA/UTF-8 \ diff --git a/debian/patches/ubuntu/localedata/en_IE-am_pm.diff b/debian/patches/ubuntu/localedata/en_IE-am_pm.diff new file mode 100644 index 00000000..04c538da --- /dev/null +++ b/debian/patches/ubuntu/localedata/en_IE-am_pm.diff @@ -0,0 +1,14 @@ +# Description: Add am_pm for en_IE. +# Ubuntu: https://launchpad.net/bugs/199899 +# Upstream: http://sourceware.org/bugzilla/show_bug.cgi?id=3236 +--- a/localedata/locales/en_IE ++++ b/localedata/locales/en_IE +@@ -111,7 +111,7 @@ d_t_fmt "%a %d %b %Y %T" + date_fmt "%a %d %b %Y %T %Z" + d_fmt "%d//%m//%y" + t_fmt "%T" +-am_pm "";"" ++am_pm "AM";"PM" + t_fmt_ampm "" + first_weekday 2 + week 7;19971130;4 diff --git a/debian/patches/ubuntu/localedata/eo_US.diff b/debian/patches/ubuntu/localedata/eo_US.diff new file mode 100644 index 00000000..feb8642f --- /dev/null +++ b/debian/patches/ubuntu/localedata/eo_US.diff @@ -0,0 +1,246 @@ +# Description: Add eo_US locale. +# Ubuntu: https://launchpad.net/bugs/1918 +Index: langpack-locales/locales/eo_US +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ b/localedata/locales/eo_US 2011-11-16 08:42:33.089335550 +0100 +@@ -0,0 +1,227 @@ ++comment_char % ++escape_char / ++ ++% Esperanto language locale for the USA ++% Contributed by David Mandelberg ++% based on eo_EO by Edmund GRIMLEY EVANS ++% with help from en_US by Ulrich Drepper ++ ++LC_IDENTIFICATION ++title "Esperanto locale for the USA" ++source "" ++address "" ++contact "" ++email "debian-esperanto@lists.debian.org" ++tel "" ++fax "" ++language "Esperanto" ++territory "USA" ++revision "draft" ++date "2005-08-27" ++% ++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 ++category "i18n:2012";LC_MEASUREMENT ++ ++END LC_IDENTIFICATION ++ ++LC_CTYPE ++copy "i18n" ++END LC_CTYPE ++ ++LC_COLLATE ++copy "iso14651_t1" ++ ++collating-symbol ++collating-symbol ++collating-symbol ++collating-symbol ++collating-symbol ++collating-symbol ++ ++reorder-after ++ ++reorder-after ++ ++reorder-after ++ ++reorder-after ++ ++reorder-after ++ ++reorder-after ++ ++ ++ ;;;IGNORE ++ ;;;IGNORE ++ ;;;IGNORE ++ ;;;IGNORE ++ ;;;IGNORE ++ ;;;IGNORE ++ ;;;IGNORE ++ ;;;IGNORE ++ ;;;IGNORE ++ ;;;IGNORE ++ ;;;IGNORE ++ ;;;IGNORE ++ ++reorder-end ++ ++END LC_COLLATE ++ ++LC_MONETARY ++int_curr_symbol "" % "USD " ++currency_symbol "" % "$" ++% "" ne eblas en ISO-8859-3 ++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 ++int_n_sep_by_space 1 ++n_sep_by_space 0 ++p_sign_posn 1 ++n_sign_posn 1 ++END LC_MONETARY ++ ++LC_NUMERIC ++decimal_point "" ++thousands_sep "" ++grouping 3;3 ++END LC_NUMERIC ++ ++LC_TIME ++ ++% "dim";"lun";"mar";"mer";"ĵaŭ";"ven";"sab" ++abday "";"";/ ++ "";"";/ ++ "";"";/ ++ "" ++ ++% "dimanĉo";"lundo";"mardo";"merkredo";"ĵaŭdo";"vendredo";"sabato" ++day "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "" ++ ++% "Jan";"Feb";"Mar";"Apr";"Maj";"Jun";"Jul";"Aŭg";"Sep";"Okt";"Nov";"Dec" ++abmon "";"";/ ++ "";"";/ ++ "";"";/ ++ "";"";/ ++ "";"";/ ++ "";"" ++ ++% "Januaro";"Februaro";"Marto";"Aprilo";"Majo";"Junio"; ++% "Julio";"Aŭgusto";"Septembro";"Oktobro";"Novembro";"Decembro" ++mon "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "" ++ ++am_pm "";"" ++ ++% "%a %d %b %Y %T %z" ++d_t_fmt "" ++ ++% "%m/%d/%Y" ++d_fmt "" ++ ++% "%r" ++t_fmt "" ++ ++% "%I:%M:%S %p" ++t_fmt_ampm "/ ++" ++ ++% "AM";"PM" ++am_pm "";"" ++ ++% "%a %b %e %H:%M:%S %Z %Y" ++date_fmt "/ ++/ ++" ++END LC_TIME ++ ++LC_MESSAGES ++% "^[JjYy].*" ++yesexpr "" ++% "^[Nn].*" ++noexpr "" ++END LC_MESSAGES ++ ++LC_PAPER ++height 279 ++width 216 ++END LC_PAPER ++ ++LC_TELEPHONE ++% "+%c (%a) %l" ++tel_int_fmt "/ ++" ++% "(%a) %l" ++tel_dom_fmt "" ++% "11" ++int_select "" ++% "1" ++int_prefix "" ++END LC_TELEPHONE ++ ++LC_MEASUREMENT ++measurement 2 ++END LC_MEASUREMENT ++ ++LC_NAME ++% "%d%t%g%t%m%t%f" ++name_fmt "/ ++" ++name_mr "" % "s-ro" ++name_mrs "" % "s-ino" ++name_ms "" % "s-ino" ++END LC_NAME ++ ++LC_ADDRESS ++% "%f%N%a%N%d%N%b%N%s %h %e %r%N%%z %T%N%c%N" ++postal_fmt "/ ++/ ++/ ++/ ++" ++country_name "" % "USA" ++country_post "" % "USA" ++country_ab2 "" % "US" ++country_ab3 "" % "USA" ++country_num 840 ++country_car "" % "USA" ++country_isbn 0 ++% "Esperanto" ++lang_name "" ++lang_ab "" % "eo" ++lang_term "" % "epo" ++lang_lib "" % "epo" ++END LC_ADDRESS +Index: langpack-locales/SUPPORTED +=================================================================== +--- a/localedata/SUPPORTED 2011-11-16 08:42:27.697335289 +0100 ++++ b/localedata/SUPPORTED 2011-11-16 08:42:33.093335550 +0100 +@@ -145,6 +145,7 @@ + en_ZW.UTF-8/UTF-8 \ + en_ZW/ISO-8859-1 \ + eo/UTF-8 \ ++eo_US.UTF-8/UTF-8 \ + es_AR.UTF-8/UTF-8 \ + es_AR/ISO-8859-1 \ + es_BO.UTF-8/UTF-8 \ diff --git a/debian/patches/ubuntu/localedata/es_DO-am_pm.diff b/debian/patches/ubuntu/localedata/es_DO-am_pm.diff new file mode 100644 index 00000000..d128161f --- /dev/null +++ b/debian/patches/ubuntu/localedata/es_DO-am_pm.diff @@ -0,0 +1,18 @@ +Description: Define 12-hours a.m./p.m. format +Bug-Ubuntu: https://launchpad.net/bugs/1288843 +Forwarded: http://sourceware.org/bugzilla/show_bug.cgi?id=16045 +Author: Gunnar Hjalmarsson + +--- a/localedata/locales/es_DO ++++ b/localedata/locales/es_DO +@@ -120,8 +120,8 @@ d_t_fmt "%a %d %b %Y %T" + date_fmt "%a %d %b %Y %T %Z" + d_fmt "%d//%m//%y" + t_fmt "%T" +-am_pm "";"" +-t_fmt_ampm "" ++am_pm "a.m.";"p.m." ++t_fmt_ampm "%I:%M:%S %p" + week 7;19971130;1 + END LC_TIME + diff --git a/debian/patches/ubuntu/localedata/lv_LV-currency.diff b/debian/patches/ubuntu/localedata/lv_LV-currency.diff new file mode 100644 index 00000000..c12f8e03 --- /dev/null +++ b/debian/patches/ubuntu/localedata/lv_LV-currency.diff @@ -0,0 +1,24 @@ +Description: Changed to currency EUR/‬€ +Bug-Ubuntu: https://launchpad.net/bugs/1264551 +Forwarded: https://sourceware.org/bugzilla/show_bug.cgi?id=16374 +Author: Gunnar Hjalmarsson + +--- a/localedata/locales/lv_LV 2012-03-06 10:10:19.000000000 +0100 ++++ b/localedata/locales/lv_LV 2014-09-28 22:37:43.021365004 +0200 +@@ -2131,12 +2133,12 @@ + negative_sign "-" + int_frac_digits 2 + frac_digits 2 +-p_cs_precedes 1 ++p_cs_precedes 0 + p_sep_by_space 1 +-n_cs_precedes 1 ++n_cs_precedes 0 + n_sep_by_space 1 +-p_sign_posn 3 +-n_sign_posn 3 ++p_sign_posn 1 ++n_sign_posn 1 + END LC_MONETARY + + LC_NUMERIC diff --git a/debian/patches/ubuntu/localedata/sd_PK.diff b/debian/patches/ubuntu/localedata/sd_PK.diff new file mode 100644 index 00000000..5a17267a --- /dev/null +++ b/debian/patches/ubuntu/localedata/sd_PK.diff @@ -0,0 +1,239 @@ +Description: Add sd_PK locale +Author: Abdul-Rahim Nizamani +Bug: http://sourceware.org/bugzilla/show_bug.cgi?id=11660 +Bug-Ubuntu: https://launchpad.net/bugs/588910 + +Index: langpack-locales/locales/sd_PK +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ a/localedata/locales/sd_PK 2011-11-16 08:42:42.133335987 +0100 +@@ -0,0 +1,217 @@ ++comment_char % ++escape_char / ++% Sindhi language locale for Pakistan. ++% Contributed by Abdul-Majid Bhurgri ++% and Abdul-Rahim Nizamani ++ ++LC_IDENTIFICATION ++ ++title "Sindhi language locale for Pakistan" ++source "Ubuntu, Sindh" ++address "USA" ++contact "" ++email "bug-glibc-locales@gnu.org" ++tel "" ++fax "" ++language "Sindhi" ++territory "Pakistan" ++revision "1.0" ++date "2010,June,5" ++% ++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 ++category "i18n:2012";LC_MEASUREMENT ++ ++END LC_IDENTIFICATION ++ ++ ++LC_CTYPE ++copy "i18n" ++ ++translit_start ++include "translit_combining";"" ++translit_end ++END LC_CTYPE ++ ++ ++LC_COLLATE ++% Copy the template from ISO/IEC 14651 ++copy "iso14651_t1" ++ ++END LC_COLLATE ++ ++ ++LC_MONETARY ++% This is the POSIX Locale definition the LC_MONETARY category ++% generated by IBM Basic CountryPack Transformer. ++% These are generated based on XML base Locale defintion file ++% for IBM Class for Unicode. ++% ++int_curr_symbol "" ++currency_symbol "" ++mon_decimal_point "" ++mon_thousands_sep "" ++mon_grouping 3;2 ++positive_sign "" ++negative_sign "" ++int_frac_digits 2 ++frac_digits 2 ++p_cs_precedes 1 ++p_sep_by_space 1 ++n_cs_precedes 1 ++n_sep_by_space 1 ++p_sign_posn 1 ++n_sign_posn 1 ++% ++END LC_MONETARY ++ ++ ++LC_NUMERIC ++decimal_point "" ++thousands_sep "" ++grouping 3;2 ++END LC_NUMERIC ++ ++ ++LC_TIME ++% This is the POSIX Locale definition for the LC_TIME category ++% generated by IBM Basic CountryPack Transformer. ++% These are generated based on XML base Locale definition file ++% for IBM Class for Unicode. ++% ++% Abbreviated weekday names (%a) ++ abday "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";"" ++ % ++% Full weekday names (%A) ++ day "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "" ++ % ++% Abbreviated month names (%b) ++ abmon "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "" ++ % ++% Full month names (%B) ++ mon "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "" ++ % ++% Equivalent of AM PM ++ am_pm "";"" ++% ++%Date and time format (%c) ++d_t_fmt "%A %d %B %Y %H:%M:%S" ++% ++%Date format (%x) ++d_fmt "%d/%m/%y" ++% ++%Time format (%X) ++t_fmt "%H:%M:%S" ++ ++% Time format with am_pm ++t_fmt_ampm "%I:%M:%S %p" ++era_year "" ++era_d_fmt "" ++ ++% Appropriate date representation (date(1)) "%a %b %e %H:%M:%S %Z %Y" ++date_fmt "%A %e %B %Y %H:%M:%S %Z" ++ ++% display columns right to left ++cal_direction 3 ++END LC_TIME ++ ++ ++LC_MESSAGES ++yesexpr "([yY][[:alpha:]]*)|()|(OK)" ++noexpr "([nN][[:alpha:]]*)|()" ++yesstr "" ++nostr "" ++END LC_MESSAGES ++ ++ ++LC_PAPER ++height 297 ++width 210 ++END LC_PAPER ++ ++LC_NAME ++% This is the ISO_IEC TR14652 Locale definition for the LC_NAME category ++% generated by IBM Basic CountryPack Transformer. ++% ++% ++name_fmt "" ++name_gen "" ++name_mr "" ++name_mrs "" ++name_miss "" ++name_ms "" ++ ++END LC_NAME ++ ++ ++LC_ADDRESS ++% This is the ISO_IEC TR14652 Locale definition for the LC_ADDRESS category ++% generated by IBM Basic CountryPack Transformer. ++postal_fmt "/ ++/ ++/ ++/ ++" ++ ++country_ab2 "" ++country_ab3 "" ++country_num 586 ++ ++END LC_ADDRESS ++ ++ ++LC_TELEPHONE ++tel_int_fmt "" ++int_prefix "" ++int_select "" ++END LC_TELEPHONE ++ ++ ++LC_MEASUREMENT ++measurement 1 ++END LC_MEASUREMENT ++ ++%%%%%%%%%%%%%%%%%%%% locale definition file "sd_PK" ends %%%%%%%%%%%%%%%%%%%%% ++ +Index: langpack-locales/SUPPORTED +=================================================================== +--- a/localedata/SUPPORTED 2011-11-16 08:42:41.229335945 +0100 ++++ b/localedata/SUPPORTED 2011-11-16 08:42:42.133335987 +0100 +@@ -361,6 +361,7 @@ + sc_IT/UTF-8 \ + sd_IN/UTF-8 \ + sd_IN@devanagari/UTF-8 \ ++sd_PK/UTF-8 \ + se_NO/UTF-8 \ + sgs_LT/UTF-8 \ + shn_MM/UTF-8 \ diff --git a/debian/patches/ubuntu/localedata/ug_CN@latin.diff b/debian/patches/ubuntu/localedata/ug_CN@latin.diff new file mode 100644 index 00000000..2eb9c681 --- /dev/null +++ b/debian/patches/ubuntu/localedata/ug_CN@latin.diff @@ -0,0 +1,164 @@ +Bug: http://sourceware.org/bugzilla/show_bug.cgi?id=13865 + +Index: langpack-locales/locales/ug_CN@latin +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ b/localedata/locales/ug_CN@latin 2012-04-04 12:01:25.459348798 +0200 +@@ -0,0 +1,145 @@ ++escape_char / ++comment_char % ++% ++% Uyghur Latin locale ++% Source: http://en.wikipedia.org/wiki/Uyghur_language ++% Contact: Eagle Burkut ++% Email: eagle.burkut@gmail.com ++% Language: ug ++% Territory: CN ++% Revision: 1.00 ++% Date: 2012-03-17 ++% Users: general ++% Charset: UTF-8 ++% Distribution and use is free, ++% also for commercial purposes. ++ ++LC_IDENTIFICATION ++title "Uyghur Latin locale" ++source "http://en.wikipedia.org/wiki/Uyghur_language" ++address "" ++contact "Eagle Burkut" ++email "eagle.burkut@gmail.com" ++tel "" ++fax "" ++language "Uyghur" ++territory "China" ++revision "1.00" ++date "2012-03-17" ++ ++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 ++category "i18n:2012";LC_MEASUREMENT ++ ++END LC_IDENTIFICATION ++ ++LC_COLLATE ++copy "iso14651_t1" ++END LC_COLLATE ++ ++LC_CTYPE ++copy "i18n" ++END LC_CTYPE ++ ++LC_MONETARY ++copy "ug_CN" ++END LC_MONETARY ++ ++LC_NUMERIC ++copy "ug_CN" ++END LC_NUMERIC ++ ++LC_TELEPHONE ++copy "ug_CN" ++END LC_TELEPHONE ++ ++LC_TIME ++ ++abday "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "" ++day "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "" ++abmon "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "" ++mon "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "" ++ ++% %a, %Y-%m-%d, %T (abday, YYYY-mm-dd, HH:MM:SS) (Ye, 2012-12-31, 23:08:59) ++d_t_fmt "/ ++" ++ ++% %a, %Y-%m-%d (abday, YYYY-mm-dd) (Ye, 2012-12-31) ++d_fmt "" ++ ++% %T (HH:MM:SS) ++t_fmt "" ++ ++am_pm "";"" ++ ++% %a, %Y-%m-%d, %T (abday, YYYY-mm-dd, HH:MM:SS) (Ye, 2012-12-31, 23:08:59) ++date_fmt "/ ++" ++ ++END LC_TIME ++ ++LC_MESSAGES ++yesexpr "" ++noexpr "" ++yesstr "" ++nostr "" ++END LC_MESSAGES ++ ++LC_PAPER ++copy "ug_CN" ++END LC_PAPER ++ ++LC_MEASUREMENT ++copy "ug_CN" ++END LC_MEASUREMENT ++ ++LC_NAME % to be fixed ++copy "ug_CN" ++END LC_NAME ++ ++LC_ADDRESS % to be fixed ++copy "ug_CN" ++END LC_ADDRESS +Index: langpack-locales/SUPPORTED +=================================================================== +--- a/localedata/SUPPORTED 2012-04-04 12:00:54.671347626 +0200 ++++ b/localedata/SUPPORTED 2012-04-04 12:01:34.139349128 +0200 +@@ -420,6 +420,7 @@ + tt_RU/UTF-8 \ + tt_RU@iqtelif/UTF-8 \ + ug_CN/UTF-8 \ ++ug_CN@latin/UTF-8 \ + uk_UA.UTF-8/UTF-8 \ + uk_UA/KOI8-U \ + unm_US/UTF-8 \ diff --git a/debian/patches/ubuntu/submitted-no-sprintf-pre-truncate.diff b/debian/patches/ubuntu/submitted-no-sprintf-pre-truncate.diff new file mode 100644 index 00000000..fd7628f1 --- /dev/null +++ b/debian/patches/ubuntu/submitted-no-sprintf-pre-truncate.diff @@ -0,0 +1,38 @@ +Description: when a program is compiled with -D_FORTIFY_SOURCE=2, the + vsprintf_chk function is called to handle sprintf/snprintf, but it + needlessly pretruncates the destination which changes the results of + sprintf(foo, "%sbar", baz). This patch restores the original behavior + that many programs have depended on. +Bug: http://sourceware.org/bugzilla/show_bug.cgi?id=7075 +Bug-Ubuntu: https://launchpad.net/bugs/305901 +Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=563637 +Author: Kees Cook +Author: Adam Conrad + +Index: glibc-2.9/libio/iovsprintf.c +=================================================================== +--- glibc-2.9.orig/libio/iovsprintf.c 2008-12-23 21:30:07.000000000 -0800 ++++ glibc-2.9/libio/iovsprintf.c 2008-12-23 21:30:19.000000000 -0800 +@@ -76,7 +76,6 @@ + if ((mode_flags & PRINTF_CHK) != 0) + { + _IO_JUMPS (&sf._sbf) = &_IO_str_chk_jumps; +- string[0] = '\0'; + } + else + _IO_JUMPS (&sf._sbf) = &_IO_str_jumps; +--- glibc-2.9.orig/libio/tst-sprintf-ub.c.orig 2019-02-20 02:25:11.467294842 -0700 ++++ glibc-2.9/libio/tst-sprintf-ub.c 2019-02-21 08:30:37.129814828 -0700 +@@ -38,12 +38,7 @@ + va_list args; + char *arg; + +- /* Expected results for fortified and non-fortified sprintf. */ +-#if defined _FORTIFY_SOURCE && _FORTIFY_SOURCE > 1 +- const char *expected = "CD"; +-#else + const char *expected = "ABCD"; +-#endif + + va_start (args, buf); + arg = va_arg (args, char *); diff --git a/debian/po/POTFILES.in b/debian/po/POTFILES.in new file mode 100644 index 00000000..914f3450 --- /dev/null +++ b/debian/po/POTFILES.in @@ -0,0 +1,2 @@ +[type: gettext/rfc822deb] debhelper.in/locales.templates +[type: gettext/rfc822deb] debhelper.in/libc.templates diff --git a/debian/po/ar.po b/debian/po/ar.po new file mode 100644 index 00000000..dbad7d86 --- /dev/null +++ b/debian/po/ar.po @@ -0,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 --git a/debian/po/ca.po b/debian/po/ca.po new file mode 100644 index 00000000..0ca4c2ae --- /dev/null +++ b/debian/po/ca.po @@ -0,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 --git a/debian/po/cs.po b/debian/po/cs.po new file mode 100644 index 00000000..1c756149 --- /dev/null +++ b/debian/po/cs.po @@ -0,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 --git a/debian/po/da.po b/debian/po/da.po new file mode 100644 index 00000000..87270789 --- /dev/null +++ b/debian/po/da.po @@ -0,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 --git a/debian/po/de.po b/debian/po/de.po new file mode 100644 index 00000000..a5336926 --- /dev/null +++ b/debian/po/de.po @@ -0,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=ISO-8859-15\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 knnen 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 whlen Sie aus, welche Locales erzeugt werden sollen. UTF-8-Locales " +"sollten standardmig ausgewhlt werden, insbesondere fr neue " +"Installationen. Andere Zeichenstze knnten fr Rckkompatibilitt mit " +"lteren Systemen und Software ntzlich 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 fr 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 fr die Benutzer " +"korrekten Sprache anzuzeigen. Sie knnen aus den generierten Locales einen " +"Standard fr Ihr System auswhlen." + +#. 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 whlt die Standardsprache fr 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 "Mchten Sie das Upgrade von Glibc jetzt durchfhren?" + +#. 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, mssen neu gestartet " +"werden, da sie andernfalls keine berprfungen oder Authentisierung mehr " +"durchfhren knnen. Der Installationsprozess kann einige Dienste neu starten " +"(wie Ssh oder Telnetd), aber andere Programme knnen nicht automatisch neu " +"gestartet werden. Eines dieser Programme, die nach dem Upgrade von Glibc ein " +"manuelles Stoppen und Neustarten bentigen, ist Xdm, da ein automatischer " +"Neustart Sie von Ihren aktiven X11-Sitzung trennen knnte." + +#. 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 mssen: ${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 spter Fortfahren mchten, " +"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, mssen neu gestartet " +"werden, da sie andernfalls keine berprfungen oder Authentisierung mehr " +"durchfhren knnen (fr Dienste wie ssh kann dies die Mglichkeit der " +"Anmeldung betreffen). Bitte prfen 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 beeintrchtigen." + +#. Type: error +#. Description +#: ../debhelper.in/libc.templates:3001 +msgid "Failure restarting some services for GNU libc upgrade" +msgstr "Fehler beim Neustarten einiger Dienste fr 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 fr 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 mssen diese manuell starten, indem Sie invoke-rc.d start " +"ausfhren." + +#. Type: error +#. Description +#: ../debhelper.in/libc.templates:4001 +msgid "xscreensaver and xlockmore must be restarted before upgrading" +msgstr "Xscreensaver und Xlockmore mssen 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 auerstande setzen, sich " +"gegenber diesen Programmen zu authentifizieren. Sie sollten dafr 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 Rckfrage 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 mssen. Da " +"diese Neustarts zu Unterbrechungen der Dienste fr dieses System fhren " +"knnen, werden Sie normalerweise bei jedem Upgrade ber die Liste der neu zu " +"startenden Dienste befragt. Sie knnen diese Option whlen, um diese Abfrage " +"zu vermeiden; stattdessen werden alle notwendigen Dienste-Neustarts fr 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 bentigt Kernel Version ${kernel_ver} oder neuer. " +"Bitte fhren 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 untersttzt" + +#. 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 bentigt Kernel Version ${kernel_ver} oder neuer. " +"ltere Versionen knnen funktionieren, werden aber nicht offiziell " +"durch Debian untersttzt. Bitte prfen Sie ein Upgrade Ihres Kernels." diff --git a/debian/po/el.po b/debian/po/el.po new file mode 100644 index 00000000..3107d7f8 --- /dev/null +++ b/debian/po/el.po @@ -0,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 --git a/debian/po/es.po b/debian/po/es.po new file mode 100644 index 00000000..0dde0e33 --- /dev/null +++ b/debian/po/es.po @@ -0,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 --git a/debian/po/eu.po b/debian/po/eu.po new file mode 100644 index 00000000..3f14d496 --- /dev/null +++ b/debian/po/eu.po @@ -0,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 --git a/debian/po/fi.po b/debian/po/fi.po new file mode 100644 index 00000000..3a02ec65 --- /dev/null +++ b/debian/po/fi.po @@ -0,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 --git a/debian/po/fr.po b/debian/po/fr.po new file mode 100644 index 00000000..8c740dbb --- /dev/null +++ b/debian/po/fr.po @@ -0,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 --git a/debian/po/gl.po b/debian/po/gl.po new file mode 100644 index 00000000..d8e4558d --- /dev/null +++ b/debian/po/gl.po @@ -0,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 --git a/debian/po/hu.po b/debian/po/hu.po new file mode 100644 index 00000000..d8451c48 --- /dev/null +++ b/debian/po/hu.po @@ -0,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 --git a/debian/po/it.po b/debian/po/it.po new file mode 100644 index 00000000..4db0dd7a --- /dev/null +++ b/debian/po/it.po @@ -0,0 +1,270 @@ +# Italian (it) translation of debconf templates for glibc +# This file is distributed under the same license as the glibc package. +# Luca Monducci , 2005-2014. +# +msgid "" +msgstr "" +"Project-Id-Version: glibc 2.19 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: 2014-08-31 18:55+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 "" + +#. 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 --git a/debian/po/ja.po b/debian/po/ja.po new file mode 100644 index 00000000..a35160b0 --- /dev/null +++ b/debian/po/ja.po @@ -0,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 --git a/debian/po/ko.po b/debian/po/ko.po new file mode 100644 index 00000000..2ca857f0 --- /dev/null +++ b/debian/po/ko.po @@ -0,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 --git a/debian/po/lt.po b/debian/po/lt.po new file mode 100644 index 00000000..a40a1fa8 --- /dev/null +++ b/debian/po/lt.po @@ -0,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 --git a/debian/po/ml.po b/debian/po/ml.po new file mode 100644 index 00000000..d1aa41d9 --- /dev/null +++ b/debian/po/ml.po @@ -0,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 --git a/debian/po/nb.po b/debian/po/nb.po new file mode 100644 index 00000000..57ddc1cf --- /dev/null +++ b/debian/po/nb.po @@ -0,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 --git a/debian/po/nl.po b/debian/po/nl.po new file mode 100644 index 00000000..58eb14d3 --- /dev/null +++ b/debian/po/nl.po @@ -0,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 --git a/debian/po/pl.po b/debian/po/pl.po new file mode 100644 index 00000000..4f289919 --- /dev/null +++ b/debian/po/pl.po @@ -0,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 --git a/debian/po/pt.po b/debian/po/pt.po new file mode 100644 index 00000000..65e13302 --- /dev/null +++ b/debian/po/pt.po @@ -0,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 --git a/debian/po/pt_BR.po b/debian/po/pt_BR.po new file mode 100644 index 00000000..b2252d7b --- /dev/null +++ b/debian/po/pt_BR.po @@ -0,0 +1,285 @@ +# 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-2015. +# +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: 2015-12-19 22:38-0200\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 +#, 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 "" +"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. Por favor, considere atualizar o seu kernel." diff --git a/debian/po/ro.po b/debian/po/ro.po new file mode 100644 index 00000000..56bc743d --- /dev/null +++ b/debian/po/ro.po @@ -0,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 --git a/debian/po/ru.po b/debian/po/ru.po new file mode 100644 index 00000000..2066f493 --- /dev/null +++ b/debian/po/ru.po @@ -0,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 --git a/debian/po/sk.po b/debian/po/sk.po new file mode 100644 index 00000000..1eeb265a --- /dev/null +++ b/debian/po/sk.po @@ -0,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 --git a/debian/po/sv.po b/debian/po/sv.po new file mode 100644 index 00000000..3bc38826 --- /dev/null +++ b/debian/po/sv.po @@ -0,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 --git a/debian/po/ta.po b/debian/po/ta.po new file mode 100644 index 00000000..28736ed6 --- /dev/null +++ b/debian/po/ta.po @@ -0,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 --git a/debian/po/templates.pot b/debian/po/templates.pot new file mode 100644 index 00000000..c04ef381 --- /dev/null +++ b/debian/po/templates.pot @@ -0,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 --git a/debian/po/tr.po b/debian/po/tr.po new file mode 100644 index 00000000..d5a23884 --- /dev/null +++ b/debian/po/tr.po @@ -0,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 --git a/debian/po/uk.po b/debian/po/uk.po new file mode 100644 index 00000000..9dd29408 --- /dev/null +++ b/debian/po/uk.po @@ -0,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 --git a/debian/po/vi.po b/debian/po/vi.po new file mode 100644 index 00000000..25715411 --- /dev/null +++ b/debian/po/vi.po @@ -0,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 --git a/debian/po/zh_CN.po b/debian/po/zh_CN.po new file mode 100644 index 00000000..fe70e7fe --- /dev/null +++ b/debian/po/zh_CN.po @@ -0,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 --git a/debian/quiltrc b/debian/quiltrc new file mode 100644 index 00000000..504225b8 --- /dev/null +++ b/debian/quiltrc @@ -0,0 +1,4 @@ +QUILT_PATCHES="debian/patches" +QUILT_PATCH_OPTS="--reject-format=unified" +QUILT_DIFF_ARGS="--no-timestamps --no-index" +QUILT_REFRESH_ARGS="-pab --no-timestamps --no-index --diffstat" diff --git a/debian/rules b/debian/rules new file mode 100755 index 00000000..0d9132a5 --- /dev/null +++ b/debian/rules @@ -0,0 +1,223 @@ +#! /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 ?= -9 + +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 +HOST_CFLAGS = -pipe -O2 -g $(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)-pic libc-bin libc-dev-bin + DEB_INDEP_REGULAR_PACKAGES = glibc-doc glibc-source 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 +DEBUG_libc6-lse = 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.* + +# Required Debian targets +build-arch: $(stamp)info \ + $(patsubst %,$(stamp)build_%,$(GLIBC_PASSES)) \ + $(patsubst %,$(stamp)check_%,$(filter-out $(GLIBC_PASSES_NOCHECK),$(GLIBC_PASSES))) +ifeq ($(filter stage1,$(DEB_BUILD_PROFILES)),) +build-arch: $(stamp)build_C.UTF-8 \ + $(stamp)build_locales-all +endif + +build-indep: $(stamp)source + +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 --git a/debian/rules.d/build.mk b/debian/rules.d/build.mk new file mode 100644 index 00000000..d46b9895 --- /dev/null +++ b/debian/rules.d/build.mk @@ -0,0 +1,358 @@ +# 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))) + +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 + echo "LIBGD = no" >> $(DEB_BUILDDIR)/configparms + 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 \ + --enable-obsolete-nsl \ + --with-pkgversion="Ubuntu GLIBC $(DEB_VERSION)" \ + --with-bugurl="https://bugs.launchpad.net/ubuntu/+source/glibc/+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="" 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 + +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/$(DEB_HOST_MULTIARCH)/finclude; \ + mv debian/tmp-$(curpass)/usr/include/finclude/math-vector-fortran.h debian/tmp-$(curpass)/usr/include/$(DEB_HOST_MULTIARCH)/finclude; \ + 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 to the multiarch directory + if [ $(curpass) = libc ]; then \ + rtld_so="$$(LANG=C LC_ALL=C readelf -l debian/tmp-$(curpass)/usr/bin/iconv | grep 'interpreter' | sed -e 's/.*interpreter: \(.*\)]/\1/g')" ; \ + rtld_so="$$(basename $$rtld_so)" ; \ + link_name="debian/tmp-$(curpass)/lib/$$rtld_so" ; \ + target="$(call xx,slibdir)/$$(readlink debian/tmp-$(curpass)/$(call xx,slibdir)/$$rtld_so)" ; \ + ln -s $$target $$link_name ; \ + fi + + $(call xx,extra_install) +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 --git a/debian/rules.d/control.mk b/debian/rules.d/control.mk new file mode 100644 index 00000000..8867bdcc --- /dev/null +++ b/debian/rules.d/control.mk @@ -0,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 --git a/debian/rules.d/debhelper.mk b/debian/rules.d/debhelper.mk new file mode 100644 index 00000000..24b41b2a --- /dev/null +++ b/debian/rules.d/debhelper.mk @@ -0,0 +1,292 @@ +# 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) + + if test "$(curpass)" = "libc-bin"; then \ + mv debian/$(curpass)/sbin/ldconfig \ + debian/$(curpass)/sbin/ldconfig.real; \ + install -m755 -o0 -g0 debian/local/sbin/ldconfig \ + debian/$(curpass)/sbin/ldconfig; \ + fi + + # 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_COMPAT=8 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 ; \ + $(DEB_HOST_GNU_TYPE)-strip --strip-debug --remove-section=.comment \ + --remove-section=.note $$f ; \ + done ; \ + else \ + DH_COMPAT=8 dh_strip -p$(curpass) -Xlibpthread; \ + fi ; \ + 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 + if [ $(curpass) = locales ] ; then \ + chmod +x debian/$(curpass)/usr/share/locales/*-language-pack ; \ + fi + # 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_COMPAT=8 dh_strip -p$(curpass) + + # when you want to install extra packages, use extra_pkg_install. + $(call xx,extra_pkg_install) + + dh_compress -p$(curpass) + dh_fixperms -p$(curpass) + find debian/$(curpass) -type f \( -regex '.*/ld.*so' \ + -o -regex '.*/libpthread-.*so' \ + -o -regex '.*/libc-.*so' \) \ + -exec chmod a+x '{}' ';' + dh_installdeb -p$(curpass) + # dh_shlibdeps -p$(curpass) + dh_gencontrol -p$(curpass) + dh_builddeb -p$(curpass) + + touch $@ + +debhelper: $(stamp)debhelper-common $(patsubst %,$(stamp)debhelper_%,$(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 (>= 1:4.4.10-10ubuntu4)' >> tmp.substvars + echo 'libcrypt-dev:Depends=libcrypt-dev' >> 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-pic 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 --git a/debian/rules.d/info.mk b/debian/rules.d/info.mk new file mode 100644 index 00000000..fe50e208 --- /dev/null +++ b/debian/rules.d/info.mk @@ -0,0 +1,16 @@ +# +# Add here instructions to dump useful debug information +# + +$(stamp)info: + @echo '------------------------------------------------------' + + uname -a + @echo + + if [ -f /proc/cpuinfo ] ; then cat /proc/cpuinfo ; fi + @echo + + @echo '------------------------------------------------------' + + touch $@ diff --git a/debian/rules.d/quilt.mk b/debian/rules.d/quilt.mk new file mode 100644 index 00000000..068111bd --- /dev/null +++ b/debian/rules.d/quilt.mk @@ -0,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 --git a/debian/rules.d/tarball.mk b/debian/rules.d/tarball.mk new file mode 100644 index 00000000..f17c740b --- /dev/null +++ b/debian/rules.d/tarball.mk @@ -0,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 --git a/debian/script.in/nohwcap.sh b/debian/script.in/nohwcap.sh new file mode 100644 index 00000000..b22f4077 --- /dev/null +++ b/debian/script.in/nohwcap.sh @@ -0,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 /etc/ld.so.nohwcap + fi diff --git a/debian/script.in/nsscheck.sh b/debian/script.in/nsscheck.sh new file mode 100644 index 00000000..c9154f19 --- /dev/null +++ b/debian/script.in/nsscheck.sh @@ -0,0 +1,27 @@ + 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 + [ -n "$check" ] && check=$(dpkg-query -W -f='${binary:Package} ${Status} ${Architecture}\n' $check 2> /dev/null | \ + grep -E "installed (all|${DPKG_MAINTSCRIPT_ARCH})$" | sed 's/[: ].*//') + # some init scripts don't match the package names + check=$(echo $check | \ + sed -e's/\bat\b/atd/g' \ + -e's/\bdovecot-common\b/dovecot/g' \ + -e's/\bexim4-base\b/exim4/g' \ + -e's/\blpr\b/lpd/g' \ + -e's/\blpr-ppd\b/lpd-ppd/g' \ + -e's/\bmysql-server\b/mysql/g' \ + -e's/\bsasl2-bin\b/saslauthd/g' \ + -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 --git a/debian/shlibs-add-udebs b/debian/shlibs-add-udebs new file mode 100755 index 00000000..f18e4c98 --- /dev/null +++ b/debian/shlibs-add-udebs @@ -0,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 --git a/debian/source/format b/debian/source/format new file mode 100644 index 00000000..163aaf8d --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debian/source/lintian-overrides b/debian/source/lintian-overrides new file mode 100644 index 00000000..aff4c819 --- /dev/null +++ b/debian/source/lintian-overrides @@ -0,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 --git a/debian/symbols.wildcards b/debian/symbols.wildcards new file mode 100644 index 00000000..5812217d --- /dev/null +++ b/debian/symbols.wildcards @@ -0,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 --git a/debian/sysdeps/alpha.mk b/debian/sysdeps/alpha.mk new file mode 100644 index 00000000..b88d7ce3 --- /dev/null +++ b/debian/sysdeps/alpha.mk @@ -0,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 --git a/debian/sysdeps/amd64.mk b/debian/sysdeps/amd64.mk new file mode 100644 index 00000000..33c7f7f6 --- /dev/null +++ b/debian/sysdeps/amd64.mk @@ -0,0 +1,67 @@ +# configuration options for all flavours +extra_config_options = --enable-multi-arch --enable-static-pie --enable-cet + +# main library +libc_mvec = yes +libc_extra_cflags = -O3 +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 + +mkdir -p debian/libc6-dev-i386/usr/include +ln -sf x86_64-linux-gnu/bits debian/libc6-dev-i386/usr/include/ +ln -sf x86_64-linux-gnu/gnu debian/libc6-dev-i386/usr/include/ +ln -sf x86_64-linux-gnu/fpu_control.h debian/libc6-dev-i386/usr/include/ + +mkdir -p debian/libc6-dev-i386/usr/include/x86_64-linux-gnu/gnu +cp -a debian/tmp-i386/usr/include/gnu/lib-names-32.h \ + debian/tmp-i386/usr/include/gnu/stubs-32.h \ + debian/libc6-dev-i386/usr/include/x86_64-linux-gnu/gnu + +mkdir -p debian/libc6-dev-i386/usr/include/sys +for i in `ls debian/tmp-libc/usr/include/x86_64-linux-gnu/sys` ; do \ + ln -sf ../x86_64-linux-gnu/sys/$$i debian/libc6-dev-i386/usr/include/sys/$$i ; \ +done + +endef + +define libc6-i386_extra_pkg_install +mkdir -p debian/libc6-i386/lib +ln -sf /lib32/ld-linux.so.2 debian/libc6-i386/lib +endef + +# 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 --git a/debian/sysdeps/arm64.mk b/debian/sysdeps/arm64.mk new file mode 100644 index 00000000..37803079 --- /dev/null +++ b/debian/sysdeps/arm64.mk @@ -0,0 +1,12 @@ +# configuration options for all flavours +extra_config_options = --enable-multi-arch + +ifeq (,$(filter stage1 stage2, $(DEB_BUILD_PROFILES))) +# build an LSE optimized library +GLIBC_PASSES += lse +GLIBC_PASSES_NOCHECK += lse +DEB_ARCH_REGULAR_PACKAGES += libc6-lse +lse_CC = $(CC) -march=armv8-a+lse +lse_CXX = $(CXX) -march=armv8-a+lse +lse_slibdir = /lib/$(DEB_HOST_MULTIARCH)/atomics +endif diff --git a/debian/sysdeps/armel.mk b/debian/sysdeps/armel.mk new file mode 100644 index 00000000..75e05c61 --- /dev/null +++ b/debian/sysdeps/armel.mk @@ -0,0 +1,41 @@ +# 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 + +mkdir -p debian/libc6-dev-armhf/usr/include +ln -sf arm-linux-gnueabi/bits debian/libc6-dev-armhf/usr/include/ +ln -sf arm-linux-gnueabi/gnu debian/libc6-dev-armhf/usr/include/ +ln -sf arm-linux-gnueabi/fpu_control.h debian/libc6-dev-armhf/usr/include/ + +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 + +mkdir -p debian/libc6-dev-armhf/usr/include/sys +for i in `ls debian/tmp-libc/usr/include/arm-linux-gnueabi/sys` ; do \ + ln -sf ../arm-linux-gnueabi/sys/$$i debian/libc6-dev-armhf/usr/include/sys/$$i ; \ +done + +endef + +define libc6-armhf_extra_pkg_install +mkdir -p debian/libc6-armhf$(armhf_slibdir) +ln -sf $(armhf_slibdir)/ld-linux-armhf.so.3 debian/libc6-armhf/lib +ln -sf ld-linux-armhf.so.3 debian/libc6-armhf$(armhf_slibdir)/ld-linux.so.3 +endef + +endif # multilib diff --git a/debian/sysdeps/armhf.mk b/debian/sysdeps/armhf.mk new file mode 100644 index 00000000..85934b94 --- /dev/null +++ b/debian/sysdeps/armhf.mk @@ -0,0 +1,51 @@ +# 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 + +mkdir -p debian/libc6-dev-armel/usr/include +ln -sf arm-linux-gnueabihf/bits debian/libc6-dev-armel/usr/include/ +ln -sf arm-linux-gnueabihf/gnu debian/libc6-dev-armel/usr/include/ +ln -sf arm-linux-gnueabihf/fpu_control.h debian/libc6-dev-armel/usr/include/ + +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 + +mkdir -p debian/libc6-dev-armel/usr/include/sys +for i in `ls debian/tmp-libc/usr/include/arm-linux-gnueabihf/sys` ; do \ + ln -sf ../arm-linux-gnueabihf/sys/$$i debian/libc6-dev-armel/usr/include/sys/$$i ; \ +done + +endef + +define libc6-armel_extra_pkg_install +mkdir -p debian/libc6-armel/lib +ln -sf $(armel_slibdir)/ld-linux.so.3 debian/libc6-armel/lib +endef + +endif # multilib diff --git a/debian/sysdeps/hppa.mk b/debian/sysdeps/hppa.mk new file mode 100644 index 00000000..e644c501 --- /dev/null +++ b/debian/sysdeps/hppa.mk @@ -0,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 --git a/debian/sysdeps/hurd-i386.mk b/debian/sysdeps/hurd-i386.mk new file mode 100644 index 00000000..c1472d8f --- /dev/null +++ b/debian/sysdeps/hurd-i386.mk @@ -0,0 +1,23 @@ +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 + +# 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 --git a/debian/sysdeps/hurd.mk b/debian/sysdeps/hurd.mk new file mode 100644 index 00000000..82ee0c20 --- /dev/null +++ b/debian/sysdeps/hurd.mk @@ -0,0 +1,50 @@ +# 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 \ + ln -s $(HURD_HEADERS)/$$path debian/include ; \ + 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 + +# Glibc should really do this for us. +define libc_extra_install +mkdir -p debian/tmp-$(curpass)/lib +ln -s ld.so.1 debian/tmp-$(curpass)/lib/ld.so +endef + +# Do not care about kernel versions for now. +define kernel_check +true +endef diff --git a/debian/sysdeps/i386.mk b/debian/sysdeps/i386.mk new file mode 100644 index 00000000..33651c28 --- /dev/null +++ b/debian/sysdeps/i386.mk @@ -0,0 +1,67 @@ +# configuration options for all flavours +extra_config_options = --enable-multi-arch --enable-static-pie --enable-cet +libc_extra_cflags = -mno-tls-direct-seg-refs + +# 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 + +mkdir -p debian/libc6-dev-amd64/usr/include +ln -sf i386-linux-gnu/bits debian/libc6-dev-amd64/usr/include/ +ln -sf i386-linux-gnu/gnu debian/libc6-dev-amd64/usr/include/ +ln -sf i386-linux-gnu/fpu_control.h debian/libc6-dev-amd64/usr/include/ + +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 + +mkdir -p debian/libc6-dev-amd64/usr/include/sys +for i in `ls debian/tmp-libc/usr/include/i386-linux-gnu/sys` ; do \ + ln -sf ../i386-linux-gnu/sys/$$i debian/libc6-dev-amd64/usr/include/sys/$$i ; \ +done + +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 --git a/debian/sysdeps/ia64.mk b/debian/sysdeps/ia64.mk new file mode 100644 index 00000000..941270a6 --- /dev/null +++ b/debian/sysdeps/ia64.mk @@ -0,0 +1,2 @@ +# configuration options for all flavours +libc = libc6.1 diff --git a/debian/sysdeps/kfreebsd-amd64.mk b/debian/sysdeps/kfreebsd-amd64.mk new file mode 100644 index 00000000..02514eb3 --- /dev/null +++ b/debian/sysdeps/kfreebsd-amd64.mk @@ -0,0 +1,44 @@ +# 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 + +mkdir -p debian/libc0.1-dev-i386/usr/include +ln -s x86_64-kfreebsd-gnu/bits debian/libc0.1-dev-i386/usr/include/ +ln -s x86_64-kfreebsd-gnu/gnu debian/libc0.1-dev-i386/usr/include/ +ln -s x86_64-kfreebsd-gnu/fpu_control.h debian/libc0.1-dev-i386/usr/include/ + +mkdir -p debian/libc0.1-dev-i386/usr/include/x86_64-kfreebsd-gnu/gnu +cp -a debian/tmp-i386/usr/include/gnu/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 + +mkdir -p debian/libc0.1-dev-i386/usr/include/sys +for i in `ls debian/tmp-libc/usr/include/x86_64-kfreebsd-gnu/sys` ; do \ + ln -s ../x86_64-kfreebsd-gnu/sys/$$i debian/libc0.1-dev-i386/usr/include/sys/$$i ; \ +done + +cp -a debian/tmp-i386/usr/include/sys/vm86.h \ + debian/libc0.1-dev-i386/usr/include/sys + +endef + +define libc0.1-i386_extra_pkg_install +mkdir -p debian/libc0.1-i386/lib +ln -sf /lib32/ld.so.1 debian/libc0.1-i386/lib +endef + +endif # multilib diff --git a/debian/sysdeps/kfreebsd.mk b/debian/sysdeps/kfreebsd.mk new file mode 100644 index 00000000..66dab018 --- /dev/null +++ b/debian/sysdeps/kfreebsd.mk @@ -0,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 --git a/debian/sysdeps/linux.mk b/debian/sysdeps/linux.mk new file mode 100644 index 00000000..7dacccfc --- /dev/null +++ b/debian/sysdeps/linux.mk @@ -0,0 +1,69 @@ +# 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 --enable-systemtap $(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 + + ln -s /usr/include/$(DEB_HOST_MULTIARCH)/sys/sdt.h debian/include/sys/sdt.h + ln -s /usr/include/$(DEB_HOST_MULTIARCH)/sys/sdt-config.h debian/include/sys/sdt-config.h + + # 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 --git a/debian/sysdeps/mips.mk b/debian/sysdeps/mips.mk new file mode 100644 index 00000000..49bf2851 --- /dev/null +++ b/debian/sysdeps/mips.mk @@ -0,0 +1,59 @@ +# 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 + +mkdir -p debian/libc6-dev-mips64/usr/include +ln -sf mips-linux-gnu/bits debian/libc6-dev-mips64/usr/include/ +ln -sf mips-linux-gnu/gnu debian/libc6-dev-mips64/usr/include/ +ln -sf mips-linux-gnu/fpu_control.h debian/libc6-dev-mips64/usr/include/ + +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 + +mkdir -p debian/libc6-dev-mips64/usr/include/sys +for i in `ls debian/tmp-libc/usr/include/mips-linux-gnu/sys` ; do \ + ln -sf ../mips-linux-gnu/sys/$$i debian/libc6-dev-mips64/usr/include/sys/$$i ; \ +done + +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 --git a/debian/sysdeps/mips64.mk b/debian/sysdeps/mips64.mk new file mode 100644 index 00000000..e624efb9 --- /dev/null +++ b/debian/sysdeps/mips64.mk @@ -0,0 +1,63 @@ +# 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 + +mkdir -p debian/libc6-dev-mipsn32/usr/include +ln -sf mips64-linux-gnuabi64/bits debian/libc6-dev-mipsn32/usr/include/ +ln -sf mips64-linux-gnuabi64/gnu debian/libc6-dev-mipsn32/usr/include/ +ln -sf mips64-linux-gnuabi64/fpu_control.h debian/libc6-dev-mipsn32/usr/include/ + +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 + +mkdir -p debian/libc6-dev-mipsn32/usr/include/sys +for i in `ls debian/tmp-libc/usr/include/mips64-linux-gnuabi64/sys` ; do \ + ln -sf ../mips64-linux-gnuabi64/sys/$$i debian/libc6-dev-mipsn32/usr/include/sys/$$i ; \ +done + +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 + +# create a symlink for the 32 bit dynamic linker in /lib +define libc6-mips32_extra_pkg_install +mkdir -p debian/libc6-mips32/lib +ln -sf /libo32/ld.so.1 debian/libc6-mips32/lib +endef + +endif # multilib diff --git a/debian/sysdeps/mips64el.mk b/debian/sysdeps/mips64el.mk new file mode 100644 index 00000000..e9ee1aae --- /dev/null +++ b/debian/sysdeps/mips64el.mk @@ -0,0 +1,63 @@ +# 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 + +mkdir -p debian/libc6-dev-mipsn32/usr/include +ln -sf mips64el-linux-gnuabi64/bits debian/libc6-dev-mipsn32/usr/include/ +ln -sf mips64el-linux-gnuabi64/gnu debian/libc6-dev-mipsn32/usr/include/ +ln -sf mips64el-linux-gnuabi64/fpu_control.h debian/libc6-dev-mipsn32/usr/include/ + +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 + +mkdir -p debian/libc6-dev-mipsn32/usr/include/sys +for i in `ls debian/tmp-libc/usr/include/mips64el-linux-gnuabi64/sys` ; do \ + ln -sf ../mips64el-linux-gnuabi64/sys/$$i debian/libc6-dev-mipsn32/usr/include/sys/$$i ; \ +done + +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 + +# create a symlink for the 32 bit dynamic linker in /lib +define libc6-mips32_extra_pkg_install +mkdir -p debian/libc6-mips32/lib +ln -sf /libo32/ld.so.1 debian/libc6-mips32/lib +endef + +endif # multilib diff --git a/debian/sysdeps/mips64r6.mk b/debian/sysdeps/mips64r6.mk new file mode 100644 index 00000000..6f3b8d91 --- /dev/null +++ b/debian/sysdeps/mips64r6.mk @@ -0,0 +1,63 @@ +# 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 + +mkdir -p debian/libc6-dev-mipsn32/usr/include +ln -sf mipsisa64r6-linux-gnuabi64/bits debian/libc6-dev-mipsn32/usr/include/ +ln -sf mipsisa64r6-linux-gnuabi64/gnu debian/libc6-dev-mipsn32/usr/include/ +ln -sf mipsisa64r6-linux-gnuabi64/fpu_control.h debian/libc6-dev-mipsn32/usr/include/ + +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 + +mkdir -p debian/libc6-dev-mipsn32/usr/include/sys +for i in `ls debian/tmp-libc/usr/include/mipsisa64r6-linux-gnuabi64/sys` ; do \ + ln -sf ../mipsisa64r6-linux-gnuabi64/sys/$$i debian/libc6-dev-mipsn32/usr/include/sys/$$i ; \ +done + +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 + +# create a symlink for the 32 bit dynamic linker in /lib +define libc6-mips32_extra_pkg_install +mkdir -p debian/libc6-mips32/lib +ln -sf /libo32/ld-linux-mipsn8.so.1 debian/libc6-mips32/lib +endef + +endif # multilib diff --git a/debian/sysdeps/mips64r6el.mk b/debian/sysdeps/mips64r6el.mk new file mode 100644 index 00000000..a209b77c --- /dev/null +++ b/debian/sysdeps/mips64r6el.mk @@ -0,0 +1,63 @@ +# 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 + +mkdir -p debian/libc6-dev-mipsn32/usr/include +ln -sf mipsisa64r6el-linux-gnuabi64/bits debian/libc6-dev-mipsn32/usr/include/ +ln -sf mipsisa64r6el-linux-gnuabi64/gnu debian/libc6-dev-mipsn32/usr/include/ +ln -sf mipsisa64r6el-linux-gnuabi64/fpu_control.h debian/libc6-dev-mipsn32/usr/include/ + +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 + +mkdir -p debian/libc6-dev-mipsn32/usr/include/sys +for i in `ls debian/tmp-libc/usr/include/mipsisa64r6el-linux-gnuabi64/sys` ; do \ + ln -sf ../mipsisa64r6el-linux-gnuabi64/sys/$$i debian/libc6-dev-mipsn32/usr/include/sys/$$i ; \ +done + +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 + +# create a symlink for the 32 bit dynamic linker in /lib +define libc6-mips32_extra_pkg_install +mkdir -p debian/libc6-mips32/lib +ln -sf /libo32/ld-linux-mipsn8.so.1 debian/libc6-mips32/lib +endef + +endif # multilib diff --git a/debian/sysdeps/mipsel.mk b/debian/sysdeps/mipsel.mk new file mode 100644 index 00000000..5c1f9d1c --- /dev/null +++ b/debian/sysdeps/mipsel.mk @@ -0,0 +1,59 @@ +# 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 + +mkdir -p debian/libc6-dev-mips64/usr/include +ln -sf mipsel-linux-gnu/bits debian/libc6-dev-mips64/usr/include/ +ln -sf mipsel-linux-gnu/gnu debian/libc6-dev-mips64/usr/include/ +ln -sf mipsel-linux-gnu/fpu_control.h debian/libc6-dev-mips64/usr/include/ + +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 + +mkdir -p debian/libc6-dev-mips64/usr/include/sys +for i in `ls debian/tmp-libc/usr/include/mipsel-linux-gnu/sys` ; do \ + ln -sf ../mipsel-linux-gnu/sys/$$i debian/libc6-dev-mips64/usr/include/sys/$$i ; \ +done + +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 --git a/debian/sysdeps/mipsn32.mk b/debian/sysdeps/mipsn32.mk new file mode 100644 index 00000000..87daf102 --- /dev/null +++ b/debian/sysdeps/mipsn32.mk @@ -0,0 +1,63 @@ +# 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 + +mkdir -p debian/libc6-dev-mips64/usr/include +ln -sf mips64-linux-gnuabin32/bits debian/libc6-dev-mips64/usr/include/ +ln -sf mips64-linux-gnuabin32/gnu debian/libc6-dev-mips64/usr/include/ +ln -sf mips64-linux-gnuabin32/fpu_control.h debian/libc6-dev-mips64/usr/include/ + +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 + +mkdir -p debian/libc6-dev-mips64/usr/include/sys +for i in `ls debian/tmp-libc/usr/include/mips64-linux-gnuabin32/sys` ; do \ + ln -sf ../mips64-linux-gnuabin32/sys/$$i debian/libc6-dev-mips64/usr/include/sys/$$i ; \ +done + +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 + +# create a symlink for the 32 bit dynamic linker in /lib +define libc6-mips32_extra_pkg_install +mkdir -p debian/libc6-mips32/lib +ln -sf /libo32/ld.so.1 debian/libc6-mips32/lib +endef + +endif # multilib diff --git a/debian/sysdeps/mipsn32el.mk b/debian/sysdeps/mipsn32el.mk new file mode 100644 index 00000000..15a81207 --- /dev/null +++ b/debian/sysdeps/mipsn32el.mk @@ -0,0 +1,63 @@ +# 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 + +mkdir -p debian/libc6-dev-mips64/usr/include +ln -sf mips64el-linux-gnuabin32/bits debian/libc6-dev-mips64/usr/include/ +ln -sf mips64el-linux-gnuabin32/gnu debian/libc6-dev-mips64/usr/include/ +ln -sf mips64el-linux-gnuabin32/fpu_control.h debian/libc6-dev-mips64/usr/include/ + +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 + +mkdir -p debian/libc6-dev-mips64/usr/include/sys +for i in `ls debian/tmp-libc/usr/include/mips64el-linux-gnuabin32/sys` ; do \ + ln -sf ../mips64el-linux-gnuabin32/sys/$$i debian/libc6-dev-mips64/usr/include/sys/$$i ; \ +done + +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 + +# create a symlink for the 32 bit dynamic linker in /lib +define libc6-mips32_extra_pkg_install +mkdir -p debian/libc6-mips32/lib +ln -sf /libo32/ld.so.1 debian/libc6-mips32/lib +endef + +endif # multilib diff --git a/debian/sysdeps/mipsn32r6.mk b/debian/sysdeps/mipsn32r6.mk new file mode 100644 index 00000000..d6991869 --- /dev/null +++ b/debian/sysdeps/mipsn32r6.mk @@ -0,0 +1,63 @@ +# 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 + +mkdir -p debian/libc6-dev-mips64/usr/include +ln -sf mipsisa64r6-linux-gnuabin32/bits debian/libc6-dev-mips64/usr/include/ +ln -sf mipsisa64r6-linux-gnuabin32/gnu debian/libc6-dev-mips64/usr/include/ +ln -sf mipsisa64r6-linux-gnuabin32/fpu_control.h debian/libc6-dev-mips64/usr/include/ + +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 + +mkdir -p debian/libc6-dev-mips64/usr/include/sys +for i in `ls debian/tmp-libc/usr/include/mipsisa64r6-linux-gnuabin32/sys` ; do \ + ln -sf ../mipsisa64r6-linux-gnuabin32/sys/$$i debian/libc6-dev-mips64/usr/include/sys/$$i ; \ +done + +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 + +# create a symlink for the 32 bit dynamic linker in /lib +define libc6-mips32_extra_pkg_install +mkdir -p debian/libc6-mips32/lib +ln -sf /libo32/ld-linux-mipsn8.so.1 debian/libc6-mips32/lib +endef + +endif # multilib diff --git a/debian/sysdeps/mipsn32r6el.mk b/debian/sysdeps/mipsn32r6el.mk new file mode 100644 index 00000000..e2531caa --- /dev/null +++ b/debian/sysdeps/mipsn32r6el.mk @@ -0,0 +1,63 @@ +# 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 + +mkdir -p debian/libc6-dev-mips64/usr/include +ln -sf mipsisa64r6el-linux-gnuabin32/bits debian/libc6-dev-mips64/usr/include/ +ln -sf mipsisa64r6el-linux-gnuabin32/gnu debian/libc6-dev-mips64/usr/include/ +ln -sf mipsisa64r6el-linux-gnuabin32/fpu_control.h debian/libc6-dev-mips64/usr/include/ + +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 + +mkdir -p debian/libc6-dev-mips64/usr/include/sys +for i in `ls debian/tmp-libc/usr/include/mipsisa64r6el-linux-gnuabin32/sys` ; do \ + ln -sf ../mipsisa64r6el-linux-gnuabin32/sys/$$i debian/libc6-dev-mips64/usr/include/sys/$$i ; \ +done + +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 + +# create a symlink for the 32 bit dynamic linker in /lib +define libc6-mips32_extra_pkg_install +mkdir -p debian/libc6-mips32/lib +ln -sf /libo32/ld-linux-mipsn8.so.1 debian/libc6-mips32/lib +endef + +endif # multilib diff --git a/debian/sysdeps/mipsr6.mk b/debian/sysdeps/mipsr6.mk new file mode 100644 index 00000000..f6ac7485 --- /dev/null +++ b/debian/sysdeps/mipsr6.mk @@ -0,0 +1,59 @@ +# 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 + +mkdir -p debian/libc6-dev-mips64/usr/include +ln -sf mipsisa32r6-linux-gnu/bits debian/libc6-dev-mips64/usr/include/ +ln -sf mipsisa32r6-linux-gnu/gnu debian/libc6-dev-mips64/usr/include/ +ln -sf mipsisa32r6-linux-gnu/fpu_control.h debian/libc6-dev-mips64/usr/include/ + +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 + +mkdir -p debian/libc6-dev-mips64/usr/include/sys +for i in `ls debian/tmp-libc/usr/include/mipsisa32r6-linux-gnu/sys` ; do \ + ln -sf ../mipsisa32r6-linux-gnu/sys/$$i debian/libc6-dev-mips64/usr/include/sys/$$i ; \ +done + +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 --git a/debian/sysdeps/mipsr6el.mk b/debian/sysdeps/mipsr6el.mk new file mode 100644 index 00000000..34a87ed5 --- /dev/null +++ b/debian/sysdeps/mipsr6el.mk @@ -0,0 +1,59 @@ +# 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 + +mkdir -p debian/libc6-dev-mips64/usr/include +ln -sf mipsisa32r6el-linux-gnu/bits debian/libc6-dev-mips64/usr/include/ +ln -sf mipsisa32r6el-linux-gnu/gnu debian/libc6-dev-mips64/usr/include/ +ln -sf mipsisa32r6el-linux-gnu/fpu_control.h debian/libc6-dev-mips64/usr/include/ + +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 + +mkdir -p debian/libc6-dev-mips64/usr/include/sys +for i in `ls debian/tmp-libc/usr/include/mipsisa32r6el-linux-gnu/sys` ; do \ + ln -sf ../mipsisa32r6el-linux-gnu/sys/$$i debian/libc6-dev-mips64/usr/include/sys/$$i ; \ +done + +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 --git a/debian/sysdeps/powerpc.mk b/debian/sysdeps/powerpc.mk new file mode 100644 index 00000000..1dc31801 --- /dev/null +++ b/debian/sysdeps/powerpc.mk @@ -0,0 +1,37 @@ +# 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 + +mkdir -p debian/libc6-dev-ppc64/usr/include +ln -s powerpc-linux-gnu/bits debian/libc6-dev-ppc64/usr/include/ +ln -s powerpc-linux-gnu/gnu debian/libc6-dev-ppc64/usr/include/ +ln -s powerpc-linux-gnu/fpu_control.h debian/libc6-dev-ppc64/usr/include/ + +mkdir -p debian/libc6-dev-ppc64/usr/include/powerpc-linux-gnu/gnu +cp -a debian/tmp-ppc64/usr/include/gnu/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 + +mkdir -p debian/libc6-dev-ppc64/usr/include/sys +for i in `ls debian/tmp-libc/usr/include/powerpc-linux-gnu/sys` ; do \ + ln -s ../powerpc-linux-gnu/sys/$$i debian/libc6-dev-ppc64/usr/include/sys/$$i ; \ +done + +endef + +endif # multilib diff --git a/debian/sysdeps/ppc64.mk b/debian/sysdeps/ppc64.mk new file mode 100644 index 00000000..141f2fb6 --- /dev/null +++ b/debian/sysdeps/ppc64.mk @@ -0,0 +1,47 @@ +# configuration options for all flavours +extra_config_options = --enable-multi-arch + +# main library +libc_rtlddir = /lib64 +libc_extra_cflags = -O3 -fno-tree-vectorize + +# 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_extra_cflags = -O3 -fno-tree-vectorize +powerpc_slibdir = /lib32 +powerpc_libdir = /usr/lib32 + +define libc6-dev-powerpc_extra_pkg_install + +mkdir -p debian/libc6-dev-powerpc/usr/include +ln -s powerpc64-linux-gnu/bits debian/libc6-dev-powerpc/usr/include/ +ln -s powerpc64-linux-gnu/gnu debian/libc6-dev-powerpc/usr/include/ +ln -s powerpc64-linux-gnu/fpu_control.h debian/libc6-dev-powerpc/usr/include/ + +mkdir -p debian/libc6-dev-powerpc/usr/include/powerpc64-linux-gnu/gnu +cp -a debian/tmp-powerpc/usr/include/gnu/lib-names-32.h \ + debian/tmp-powerpc/usr/include/gnu/stubs-32.h \ + debian/libc6-dev-powerpc/usr/include/powerpc64-linux-gnu/gnu + +mkdir -p debian/libc6-dev-powerpc/usr/include/sys +for i in `ls debian/tmp-libc/usr/include/powerpc64-linux-gnu/sys` ; do \ + ln -s ../powerpc64-linux-gnu/sys/$$i debian/libc6-dev-powerpc/usr/include/sys/$$i ; \ +done + +endef + +# create a symlink for the 32 bit dynamic linker in /lib +define libc6-powerpc_extra_pkg_install +mkdir -p debian/$(curpass)/lib +ln -s /lib32/ld.so.1 debian/$(curpass)/lib +endef + +endif # multilib diff --git a/debian/sysdeps/ppc64el.mk b/debian/sysdeps/ppc64el.mk new file mode 100644 index 00000000..67e16ef1 --- /dev/null +++ b/debian/sysdeps/ppc64el.mk @@ -0,0 +1,6 @@ +# configuration options for all flavours +extra_config_options = --enable-multi-arch --with-cpu=power8 + +# main library +libc_rtlddir = /lib64 +libc_extra_cflags = -O3 -fno-tree-vectorize diff --git a/debian/sysdeps/riscv64.mk b/debian/sysdeps/riscv64.mk new file mode 100644 index 00000000..d2ca48a9 --- /dev/null +++ b/debian/sysdeps/riscv64.mk @@ -0,0 +1,2 @@ +# riscv64 buildd are QEMU based and thus very slow +TIMEOUTFACTOR=100 diff --git a/debian/sysdeps/s390x.mk b/debian/sysdeps/s390x.mk new file mode 100644 index 00000000..d2a87b9e --- /dev/null +++ b/debian/sysdeps/s390x.mk @@ -0,0 +1,44 @@ +# configuration options for all flavours +extra_config_options = --enable-multi-arch + +# main library +libc_rtlddir = /lib + +# 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 + +mkdir -p debian/libc6-dev-s390/usr/include +ln -s s390x-linux-gnu/bits debian/libc6-dev-s390/usr/include/ +ln -s s390x-linux-gnu/gnu debian/libc6-dev-s390/usr/include/ +ln -s s390x-linux-gnu/fpu_control.h debian/libc6-dev-s390/usr/include/ + +mkdir -p debian/libc6-dev-s390/usr/include/s390x-linux-gnu/gnu +cp -a debian/tmp-s390/usr/include/gnu/lib-names-32.h \ + debian/tmp-s390/usr/include/gnu/stubs-32.h \ + debian/libc6-dev-s390/usr/include/s390x-linux-gnu/gnu + +mkdir -p debian/libc6-dev-s390/usr/include/sys +for i in `ls debian/tmp-libc/usr/include/s390x-linux-gnu/sys` ; do \ + ln -s ../s390x-linux-gnu/sys/$$i debian/libc6-dev-s390/usr/include/sys/$$i ; \ +done + +endef + +define libc6-s390_extra_pkg_install +mkdir -p debian/$(curpass)/lib +ln -s /lib32/ld.so.1 debian/$(curpass)/lib +endef + +endif # multilib diff --git a/debian/sysdeps/sh3.mk b/debian/sysdeps/sh3.mk new file mode 100644 index 00000000..412008c9 --- /dev/null +++ b/debian/sysdeps/sh3.mk @@ -0,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 --git a/debian/sysdeps/sh4.mk b/debian/sysdeps/sh4.mk new file mode 100644 index 00000000..412008c9 --- /dev/null +++ b/debian/sysdeps/sh4.mk @@ -0,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 --git a/debian/sysdeps/sparc.mk b/debian/sysdeps/sparc.mk new file mode 100644 index 00000000..7f666a3f --- /dev/null +++ b/debian/sysdeps/sparc.mk @@ -0,0 +1,40 @@ +# 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 + +mkdir -p debian/libc6-dev-sparc64/usr/include +ln -s sparc-linux-gnu/bits debian/libc6-dev-sparc64/usr/include/ +ln -s sparc-linux-gnu/gnu debian/libc6-dev-sparc64/usr/include/ +ln -s sparc-linux-gnu/fpu_control.h debian/libc6-dev-sparc64/usr/include/ + +mkdir -p debian/libc6-dev-sparc64/usr/include/sparc-linux-gnu/gnu +cp -a debian/tmp-sparc64/usr/include/gnu/lib-names-64.h \ + debian/tmp-sparc64/usr/include/gnu/stubs-64.h \ + debian/libc6-dev-sparc64/usr/include/sparc-linux-gnu/gnu + +mkdir -p debian/libc6-dev-sparc64/usr/include/sys +for i in `ls debian/tmp-libc/usr/include/sparc-linux-gnu/sys` ; do \ + ln -s ../sparc-linux-gnu/sys/$$i debian/libc6-dev-sparc64/usr/include/sys/$$i ; \ +done + +endef + +endif # multilib diff --git a/debian/sysdeps/sparc64.mk b/debian/sysdeps/sparc64.mk new file mode 100644 index 00000000..70ab9fa7 --- /dev/null +++ b/debian/sysdeps/sparc64.mk @@ -0,0 +1,47 @@ +# 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 + +mkdir -p debian/libc6-dev-sparc/usr/include +ln -s sparc64-linux-gnu/bits debian/libc6-dev-sparc/usr/include/ +ln -s sparc64-linux-gnu/gnu debian/libc6-dev-sparc/usr/include/ +ln -s sparc64-linux-gnu/fpu_control.h debian/libc6-dev-sparc/usr/include/ + +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 + +mkdir -p debian/libc6-dev-sparc/usr/include/sys +for i in `ls debian/tmp-libc/usr/include/sparc64-linux-gnu/sys` ; do \ + ln -s ../sparc64-linux-gnu/sys/$$i debian/libc6-dev-sparc/usr/include/sys/$$i ; \ +done + +endef + +define libc6-sparc_extra_pkg_install +mkdir -p debian/$(curpass)/lib +ln -s /lib32/ld-linux.so.2 debian/$(curpass)/lib +endef + +endif # multilib diff --git a/debian/sysdeps/x32.mk b/debian/sysdeps/x32.mk new file mode 100644 index 00000000..4b7b8604 --- /dev/null +++ b/debian/sysdeps/x32.mk @@ -0,0 +1,67 @@ +# configuration options for all flavours +extra_config_options = --enable-multi-arch --enable-static-pie --enable-cet + +# 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 + +mkdir -p debian/libc6-dev-amd64/usr/include +ln -s x86_64-linux-gnux32/bits debian/libc6-dev-amd64/usr/include/ +ln -s x86_64-linux-gnux32/gnu debian/libc6-dev-amd64/usr/include/ +ln -s x86_64-linux-gnux32/fpu_control.h debian/libc6-dev-amd64/usr/include/ + +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 + +mkdir -p debian/libc6-dev-amd64/usr/include/sys +for i in `ls debian/tmp-libc/usr/include/x86_64-linux-gnux32/sys`; do \ + ln -s ../x86_64-linux-gnux32/sys/$$i debian/libc6-dev-amd64/usr/include/sys/$$i ; \ +done + +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 + +define libc6-i386_extra_pkg_install +mkdir -p debian/libc6-i386/lib +ln -sf /lib32/ld-linux.so.2 debian/libc6-i386/lib +endef + +endif # multilib diff --git a/debian/tests/control b/debian/tests/control new file mode 100644 index 00000000..5bcfb763 --- /dev/null +++ b/debian/tests/control @@ -0,0 +1,3 @@ +Tests: rebuild +Depends: @builddeps@, fakeroot, binutils, linux-libc-dev [linux-any], gcc-9 +Restrictions: allow-stderr diff --git a/debian/tests/control.in b/debian/tests/control.in new file mode 100644 index 00000000..20ac0b5c --- /dev/null +++ b/debian/tests/control.in @@ -0,0 +1,3 @@ +Tests: rebuild +Depends: @builddeps@, fakeroot, @triggers@ +Restrictions: allow-stderr diff --git a/debian/tests/rebuild b/debian/tests/rebuild new file mode 100755 index 00000000..8a998500 --- /dev/null +++ b/debian/tests/rebuild @@ -0,0 +1,3 @@ +#!/bin/sh +set -e +dpkg-buildpackage -rfakeroot -us -uc -b diff --git a/debian/testsuite-xfail-debian.mk b/debian/testsuite-xfail-debian.mk new file mode 100644 index 00000000..3c8d6f2e --- /dev/null +++ b/debian/testsuite-xfail-debian.mk @@ -0,0 +1,1087 @@ +###################################################################### +# 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 + +# This test is skipped in chroots, and appears to fail on autopkgtest +# testbeds. I've run out of time to debug and fix it upstream for +# disco, so this will have to XFAIL for now: +test-xfail-tst-nss-test3 = yes + +# This test is flapping on all architectures, due to this upstream bug: +# https://sourceware.org/bugzilla/show_bug.cgi?id=19329 +test-xfail-tst-stack4 = yes + +# new upstream container tests that don't set up the environment right for +# Debian's multiarch paths. +test-xfail-tst-dlopen-self-container = yes +test-xfail-tst-dlopen-tlsmodid-container = yes +test-xfail-tst-ldconfig-bad-aux-cache = yes +test-xfail-tst-ldconfig-ld_so_conf-update = yes +test-xfail-tst-pldd = yes +test-xfail-tst-nss-db-endpwent = yes +test-xfail-tst-nss-db-endgrent = yes +test-xfail-tst-nss-files-hosts-long = yes +test-xfail-tst-system = 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 + +# These tests are currently known to fail under lxc, where we run our ARM +# regression tests, so pretend they fail on ARM: +test-xfail-tst-ttyname = yes +test-xfail-tst-support_descriptors = yes + +# This test fails due to a kernel bug when building armhf on an ARM64 +# machine. See bug #904385. +test-xfail-tst-signal6 = yes + +# This test has regressed with recent kernels +test-xfail-tst-thread-exit-clobber = yes + +# These (new in 2.29) tests appear to fail when building armhf on aarch64 +test-xfail-tst-minsigstksz-1 = yes +test-xfail-tst-minsigstksz-2 = yes +test-xfail-tst-minsigstksz-3 = yes +test-xfail-tst-minsigstksz-3a = yes +test-xfail-tst-minsigstksz-4 = yes +test-xfail-tst-xsigstack = 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 + +# These tests are currently known to fail under lxc, where we run our ARM +# regression tests, so pretend they fail on ARM: +test-xfail-tst-ttyname = yes +test-xfail-tst-support_descriptors = yes + +# This test fails due to a kernel bug when building armhf on an ARM64 +# machine. See bug #904385. +test-xfail-tst-signal6 = yes +test-xfail-tst-minsigstksz-1 = yes +test-xfail-tst-minsigstksz-2 = yes +test-xfail-tst-minsigstksz-3 = yes +test-xfail-tst-minsigstksz-3a = yes +test-xfail-tst-minsigstksz-4 = yes +test-xfail-tst-xsigstack = yes + +# This test has regressed with recent kernels +test-xfail-tst-thread-exit-clobber = 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-dynarray-fail + +# We don't provide /proc/cpuinfo yet +test-xfail-test-multiarch = yes + +# Need actual porting +test-xfail-exe = yes +test-xfail-tst-pselect = yes +test-xfail-tst-ptrguard1-static = yes +test-xfail-tst-ptrguard1 = yes + +# We don't provide ABI reference for these +test-xfail-check-abi-libhurduser = yes +test-xfail-check-abi-libmachuser = yes + +# Overzealous test +test-xfail-tst-pathconf = yes + +# Need investigation +test-xfail-tst-aio10 = yes +test-xfail-tst-aio9 = yes +test-xfail-tst-audit1 = yes +test-xfail-tst-audit2 = yes +test-xfail-tst-audit8 = yes +test-xfail-tst-backtrace4 = yes +test-xfail-tst-backtrace5 = yes +test-xfail-tst-fdopendir2 = yes +test-xfail-tst-fdopendir = yes +test-xfail-tst-getconf = yes +test-xfail-tst-grantpt = yes +test-xfail-tst-longjmp_chk2 = yes +test-xfail-tst-mallocfork2 = yes +test-xfail-tst-sprofil = yes +test-xfail-tst-stackguard1-static = yes +test-xfail-tst-stackguard1 = yes +test-xfail-tst-strtod-round = yes +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 + +# TODO: should be succeeding again with gnumach >= 2019-12-01 +test-xfail-test-fpucw = yes +test-xfail-test-fpucw-ieee = yes +test-xfail-test-fpucw-ieee-static = yes +test-xfail-test-fpucw-static = yes +test-xfail-test-fenv-x87 = yes +test-xfail-tst-wcstod-round = yes + +# new in 2.21 +test-xfail-test-misc = yes +test-xfail-tst-ptsname = yes +test-xfail-tst-audit9 = yes + +# new in 2.22 +test-xfail-tst-audit3 = yes +test-xfail-tst-prelink = yes +test-xfail-tst-tls-atexit = yes + +# new in 2.23 +test-xfail-tst-audit11 = yes +test-xfail-tst-audit12 = yes + +# need get_cpu_features +test-xfail-tst-get-cpu-features = yes +test-xfail-test-fenv-sse-2 = yes + +# new in 2.24 +test-xfail-tst-execvpe5 = yes +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 +test-xfail-tst-backtrace6 = yes +test-xfail-tst-waitid = 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-usable-static-tunables = yes +test-xfail-tst-malloc-usable-static = yes +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-fexecve = yes +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 +test-xfail-tst-malloc-too-large = yes +test-xfail-tst-spawn4 = yes +test-xfail-tst-spawn4-compat = yes + +# Tests failing to build +test-xfail-tst-copy_file_range = yes +test-xfail-tst-copy_file_range-compat = yes + +# new in 2.28 +test-xfail-tst-malloc-stats-cancellation = 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 + +test-xfail-ISO11/threads.h/conform = yes +test-xfail-ISO11/threads.h/linknamespace = yes + +# wants pthread_barrierattr_setpshared +test-xfail-tst-pututxline-cache = yes +test-xfail-tst-pututxline-lockfail = yes + +# wants /proc/self/fd +test-xfail-tst-updwtmpx = yes + +# new in 2.31 +test-xfail-tst-auditmany = yes +test-xfail-tst-dlopenfail = yes + +# actually never succeded +test-xfail-tst-create_format1 = yes +test-xfail-tst-getcwd-abspath = yes +test-xfail-tst-udp-error = yes +test-xfail-test-fesetexcept-traps = yes +test-xfail-tst-support_capture_subprocess = yes + +# Assumes that self-locks are exclusive +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 +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 + +# needs investigation, fail on launchpad +test-xfail-tst-mxfast = yes +test-xfail-tst-mutex10 = yes +endif + +###################################################################### +# s390 +###################################################################### +ifeq ($(config-machine)-$(config-os),s390-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 +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-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 + +###################################################################### +# Ubuntu additions +###################################################################### + +# fail on 32bit with the xenial kernel, working with bionic and focal +ifneq (,$(filter $(config-machine)-$(config-os), arm-linux-gnueabihf arm-linux-gnueabi i686-linux-gnu)) +test-xfail-test-sysvmsg = yes +test-xfail-test-sysvsem = yes +test-xfail-test-sysvshm = yes +endif diff --git a/debian/watch b/debian/watch new file mode 100644 index 00000000..7dbd0ca7 --- /dev/null +++ b/debian/watch @@ -0,0 +1,2 @@ +version=3 +ftp://ftp.gnu.org/gnu/glibc/glibc-([\d\.]+)\.tar\.gz debian uupdate