about summary refs log tree commit diff
Commit message (Collapse)AuthorAgeFilesLines
* BZ#16469: resolv: skip leading dot in domain to searchAlexandre Oliva2014-11-212-3/+20
| | | | | | | | | | | | | This should only happen if the domain to search is the root, represented as "." rather than by an empty string. Skipping it here prevents libc_res_nquerydomain from duplicating the trailing dot, which would cause the domain name compression to fail. for ChangeLog [BZ #16469] * resolv/res_query.c (__libc_res_nsearch): Skip leading dot in search domain names.
* BZ#16469: don't drop trailing dot in res_nquerydomain(..., name, NULL, ...)Alexandre Oliva2014-11-215-16/+85
| | | | | | | | | | | | | | | | If we drop it here, we will fail to detect a duplicate trailing dot later on. Retaining, OTOH, has no ill effects whatsoever, and it even saves us the trouble of copying the domain name minus the trailing dot, like we used to do. for ChangeLog [BZ #16469] * NEWS: Update. * resolv/res_query.c (__libc_res_nquerydomain): Retain trailing dot. * posix/tst-getaddrinfo5.c: New. * posix/Makefile (tests): Add it.
* BZ#14498: fix infinite loop in nss_db_getservbynameAlexandre Oliva2014-11-214-9/+24
| | | | | | | | | | | | | | | | nss_db uses nss_files code for services, but a continue on protocol mismatch that doesn't affect nss_files skipped the code that advanced to the next db entry. Any one of these changes would suffice to fix it, but fixing both makes them both safer to reuse elsewhere. for ChangeLog [BZ #14498] * NEWS: Fixed. * nss/nss_db/db-XXX.c (_nss_db_get##name##_r): Update hidx after parsing line but before break_if_match. * nss/nss_files/files-service (DB_LOOKUP): Don't "continue;" if there is a protocol mismatch.
* manual: fix addmntent's MT-Safety race annotationMa Shimiao2014-11-212-1/+6
| | | | | | | for ChangeLog * manual/sysinfo.texi (addmntent): It is actually MT-Safe, because the potential race is on the user-supplied stream.
* ctermid: return string literal, document MT-Safety pitfallAlexandre Oliva2014-11-213-11/+21
| | | | | | | | | | for ChangeLog * sysdeps/posix/ctermid.c (ctermid): Return a pointer to a string literal if not passed a buffer. * manual/job.texi (ctermid): Update reasoning, note deviation from posix, suggest mtasurace when not passed a buffer, for future non-preliminary safety notes.
* manual: cuserid is mtasurace if not passed a stringAlexandre Oliva2014-11-212-2/+9
| | | | | | | | for ChangeLog * manual/users.texi (cuserid): Fix MT-Safety note for the case of not passing it a buffer. Reported by Peng Haitao.
* Require check-safety.sh to pass; wish for check that all fns are documentedAlexandre Oliva2014-11-213-1/+13
| | | | | | | | | for ChangeLog * manual/Makefile ($(objpfx)stamp-summary): Require check-safety.sh to pass. * manual/check-safety.sh: Wish for verification that every @deftypefn and @deftypefun is followed by a @safety remark.
* NPTL: Use __libc_fatal in unwind.c.Roland McGrath2014-11-202-5/+4
|
* NPTL: Conditionalize asynchronous cancellation support on [SIGCANCEL].Roland McGrath2014-11-203-7/+24
|
* NPTL: Refactor scheduler setup in pthread_create.Roland McGrath2014-11-204-15/+91
|
* Use C11 atomics in pthread_once.Torvald Riegel2014-11-202-14/+14
|
* Add tests for C11-like atomic operations.Torvald Riegel2014-11-202-1/+133
|
* Add atomic operations similar to those provided by C11.Torvald Riegel2014-11-202-0/+227
|
* Add arch-specific configuration for C11 atomics support.Torvald Riegel2014-11-2022-0/+119
| | | | | | | | This sets __HAVE_64B_ATOMICS if provided. It also sets USE_ATOMIC_COMPILER_BUILTINS to true if the existing atomic ops use the __atomic* builtins (aarch64, mips partially) or if this has been tested (x86_64); otherwise, this is set to false so that C11 atomics will be based on the existing atomic operations.
* NPTL: Don't (re)validate sched_priority in pthread_create.Roland McGrath2014-11-192-20/+5
|
* Test that pthread_create diagnoses invalid scheduling parameters.Roland McGrath2014-11-193-1/+104
|
* CVE-2014-7817: wordexp fails to honour WRDE_NOCMD.Carlos O'Donell2014-11-194-13/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | The function wordexp() fails to properly handle the WRDE_NOCMD flag when processing arithmetic inputs in the form of "$((... ``))" where "..." can be anything valid. The backticks in the arithmetic epxression are evaluated by in a shell even if WRDE_NOCMD forbade command substitution. This allows an attacker to attempt to pass dangerous commands via constructs of the above form, and bypass the WRDE_NOCMD flag. This patch fixes this by checking for WRDE_NOCMD in exec_comm(), the only place that can execute a shell. All other checks for WRDE_NOCMD are superfluous and removed. We expand the testsuite and add 3 new regression tests of roughly the same form but with a couple of nested levels. On top of the 3 new tests we add fork validation to the WRDE_NOCMD testing. If any forks are detected during the execution of a wordexp() call with WRDE_NOCMD, the test is marked as failed. This is slightly heuristic since vfork might be used in the future, but it provides a higher level of assurance that no shells were executed as part of command substitution with WRDE_NOCMD in effect. In addition it doesn't require libpthread or libdl, instead we use the public implementation namespace function __register_atfork (already part of the public ABI for libpthread). Tested on x86_64 with no regressions.
* Auto-generate libc-modules.hSiddhesh Poyarekar2014-11-196-47/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove libc-modules.h from the tree and auto-generate it from soversions.i and the list of modules in the built-modules variable defined in Makeconfig. Macros generated have increasing numbered values, with built-modules having lower values starting from 1, following which a separator value LIBS_BEGIN is added and then finally the library names from soversions.i are appended to the list. This allows us to conveniently differentiate between the versioned libraries and other built modules, which is needed in errno.h and netdb.h to decide whether to use an internal symbol or an external one. Verified that generated code remains unchanged on x86_64. * Makeconfig (built-modules): List non-library modules to be built. (module-cppflags): Include libc-modules.h for everything except shlib-versions.v.i. (CPPFLAGS): Use it. (before-compile): Add libc-modules.h. ($(common-objpfx)libc-modules.h, $(common-objpfx)libc-modules.stmp): New targets. (common-generated): Add libc-modules.h and libc-modules.stmp. ($(common-objpfx)Versions.v.i): Depend on libc-modules.h. * include/libc-symbols.h: Don't include libc-modules.h. * include/libc-modules.h: Remove file. * scripts/gen-libc-modules.awk: New script to generate libc-modules.h. * sysdeps/unix/Makefile ($(common-objpfx)sysd-syscalls): Depend on libc-modules.stmp.
* Fix -Wundef warning in SHLIB_COMPATSiddhesh Poyarekar2014-11-192-1/+3
| | | | | | | Replace the IS_IN_##lib with IS_IN(lib). Verified that the generated code remains the same. * include/shlib-compat.h (_SHLIB_COMPAT): Use IS_IN.
* Add new macro IN_MODULE to identify module in which source is builtSiddhesh Poyarekar2014-11-1918-28/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current scheme to identify which module a translation unit is built in depends on defining multiple macros IS_IN_* and also defining NOT_IN_libc if we're building a non-libc module. In addition, there is an IN_LIB macro that does effectively the same thing, but for different modules (notably the systemtap probes). This macro scheme unifies both ideas to use just one macro IN_MODULE and assign it a value depending on the module it is being built into. If the module is not defined, it defaults to MODULE_libc. Patches that follow will replace uses of IS_IN_* variables with the IS_IN() macro. libc-symbols.h has been converted already to give an example of how such a transition will look. Verified that there are no relevant binary changes. One source change that will crop up repeatedly is that of nscd_stat, since it uses the build timestamp as a constant in its logic. * Makeconfig (in-module): Get value of libof set for the translation unit. (CPPFLAGS): Use $(in-module). * Makerules: Don't suffix routine names for nonlib. * include/libc-modules.h: New file. * include/libc-symbols.h: Include libc-modules.h (IS_IN): New macro to replace IS_IN_* macros. * elf/Makefile: Set libof-* for each routine. * elf/rtld-Rules: Likewise. * extra-modules.mk: Likewise. * iconv/Makefile: Likewise. * iconvdata/Makefile: Likewise. * locale/Makefile: Likewise. * malloc/Makefile: Likewise. * nss/Makefile: Likewise. * sysdeps/gnu/Makefile: Likewise. * sysdeps/ieee754/ldbl-opt/Makefile: Likewise. * sysdeps/unix/sysv/linux/Makefile: Likewise. * sysdeps/s390/s390-64/Makefile: Likewise. * nscd/Makefile: Set libof-* for each routine. Set CFLAGS and CPPFLAGS for nscd instead of nonlib.
* NPTL: Add stub createthread.cRoland McGrath2014-11-182-0/+49
|
* NPTL: Move Linux-specific createthread.c to sysdeps.Roland McGrath2014-11-182-0/+3
|
* NPTL: Refactor createthread.cRoland McGrath2014-11-183-169/+240
|
* Fix libm mpone, mptwo namespace (bug 17616).Joseph Myers2014-11-1810-34/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | libm uses symbols mpone and mptwo for internal purposes. This patch moves them to the implementation namespace (__mpone and __mptwo). Tested for x86_64 (testsuite, and that installed stripped shared libraries are unchanged by the patch). [BZ #17616] * sysdeps/ieee754/dbl-64/mpa.c (mpone): Rename to __mpone. (mptwo): Rename to __mptwo. (__inv): Use __mptwo instead of mptwo. * sysdeps/ieee754/dbl-64/mpa.h (mpone): Rename to __mpone. (mptwo): Rename to __mptwo. * sysdeps/ieee754/dbl-64/mpatan.c (__mpatan): Use __mpone instead of mpone and __mptwo instead of mptwo. * sysdeps/ieee754/dbl-64/mpatan2.c (__mpatan2): Use __mpone instead of mpone. * sysdeps/ieee754/dbl-64/mpexp.c (__mpexp): Likewise. * sysdeps/ieee754/dbl-64/mplog.c (__mplog): Likewise. * sysdeps/ieee754/dbl-64/sincos32.c (__c32): Use __mpone instead of mpone and __mptwo instead of mptwo. (__mpranred): Use __mpone instead of mpone. * conform/Makefile (test-xfail-ISO/math.h/linknamespace): Remove variable. (test-xfail-ISO99/complex.h/linknamespace): Likewise. (test-xfail-ISO99/math.h/linknamespace): Likewise. (test-xfail-ISO99/tgmath.h/linknamespace): Likewise. (test-xfail-ISO11/complex.h/linknamespace): Likewise. (test-xfail-ISO11/math.h/linknamespace): Likewise. (test-xfail-ISO11/tgmath.h/linknamespace): Likewise. (test-xfail-XPG3/math.h/linknamespace): Likewise. (test-xfail-XPG4/math.h/linknamespace): Likewise. (test-xfail-POSIX/math.h/linknamespace): Likewise. (test-xfail-UNIX98/math.h/linknamespace): Likewise. (test-xfail-XOPEN2K/complex.h/linknamespace): Likewise. (test-xfail-XOPEN2K/math.h/linknamespace): Likewise. (test-xfail-XOPEN2K/tgmath.h/linknamespace): Likewise. (test-xfail-POSIX2008/complex.h/linknamespace): Likewise. (test-xfail-POSIX2008/math.h/linknamespace): Likewise. (test-xfail-POSIX2008/tgmath.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/complex.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/math.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/tgmath.h/linknamespace): Likewise.
* Fix crossreference to nonexistent node BSD HandlerTom de Vries2014-11-182-1/+5
| | | | | | | 2014-11-18 Tom de Vries <tom@codesoucery.com> * manual/signal.texi (Primitives Interrupted by Signals): In section, replace BSD Handler xref with BSD Signal Handling.
* alpha: Fix soft-fp breakageRichard Henderson2014-11-1714-62/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 5c0508a318af0a6c8be2a4cb2e3b76896218bf35 broke the Alpha port, as the extra parenthesis got in the way of some token pasting that we were doing in a redefined raw unpack macro. Avoid this situation in the future by not attempting to redefine a basic macro, but rather work from the outermost public interface. The compiler does in fact see through the added indirection. * sysdeps/alpha/soft-fp/local-soft-fp.h (_FP_UNPACK_RAW_2): Remove. (_FP_PACK_RAW_2): Remove. (AXP_DECL_RETURN_Q): Rename from FP_DECL_RETURN, use _FP_UNION_Q. (AXP_RETURN_Q): Rename from FP_RETURN, use _FP_UNION_Q. (AXP_UNPACK_RAW_Q, AXP_UNPACK_SEMIRAW_Q, AXP_UNPACK_Q): New. (AXP_PACK_RAW_Q, AXP_PACK_SEMIRAW_Q, AXP_PACK_Q): New. * sysdeps/alpha/soft-fp/ots_add.c (_OtsAddX): Update to match. * sysdeps/alpha/soft-fp/ots_cmp.c (internal_equality): Likewise. * sysdeps/alpha/soft-fp/ots_cmpe.c (internal_compare): Likewise. * sysdeps/alpha/soft-fp/ots_cvtqux.c (_OtsCvtQUX): Likewise. * sysdeps/alpha/soft-fp/ots_cvtqx.c (_OtsCvtQX): Likewise. * sysdeps/alpha/soft-fp/ots_cvttx.c (_OtsConvertFloatTX): Likewise. * sysdeps/alpha/soft-fp/ots_cvtxq.c (_OtsCvtXQ): Likewise. * sysdeps/alpha/soft-fp/ots_cvtxt.c (_OtsConvertFloatXT): Likewise. * sysdeps/alpha/soft-fp/ots_div.c (_OtsDivX): Likewise. * sysdeps/alpha/soft-fp/ots_mul.c (_OtsMulX): Likewise. * sysdeps/alpha/soft-fp/ots_nintxq.c (_OtsNintXQ): Likewise. * sysdeps/alpha/soft-fp/ots_sub.c (_OtsSubX): Likewise.
* Remove sigvec.Roland McGrath2014-11-1410-312/+209
|
* Remove x86_64 __GNUC_PREREQ (4, 6) conditional.Joseph Myers2014-11-142-10/+6
| | | | | | | | | | | | | | This patch removes a conditional on __GNUC_PREREQ (4, 6) in x86_64 code. Tested for x86_64 that installed shared libraries are unchanged by this patch. Committed (I think this file reasonably comes under math maintainership). * sysdeps/x86_64/fpu/dla.h [__FMA4__ && __GNUC_PREREQ (4, 6)] (DLA_FMS): Make definition conditional only on [__FMA4__]. [__FMA4__ && !__GNUC_PREREQ (4, 6)] (DLA_FMS): Remove conditional definition.
* Remove ARM __GNUC_PREREQ(4,4) conditionals.Joseph Myers2014-11-142-16/+8
| | | | | | | | | | | | | | | | This patch removes conditionals in ARM code on __GNUC_PREREQ(4,4), which were already obsolete even before the move from 4.4 to 4.6 as minimum GCC version for building glibc. Tested for ARM that installed shared libraries are unchanged by this patch. * sysdeps/arm/sysdep.h [PROF && __GNUC_PREREQ(4,4)] (CALL_MCOUNT): Make definition conditional only on [PROF]. [PROF && !__GNUC_PREREQ(4,4)] (CALL_MCOUNT): Remove conditional definition. [__GNUC_PREREQ(4,4)] (mcount): Make definition unconditional. [!__GNUC_PREREQ(4,4)] (mcount): Remove conditional definition.
* Only declare __sigpause in installed signal.h when necessary.Joseph Myers2014-11-144-5/+13
| | | | | | | | | | | | | | | | | | | | | | | This patch makes the installed signal.h declare __sigpause only when necessary (when a macro definition of sigpause makes use of __sigpause), rather than unconditionally. This fixes false positives in the linknamespace tests by making it visible to those tests that no use of ISO C functionality will actually bring in the definition of __sigpause and so bring in the other symbols defined in the same object. There is no bug filed in Bugzilla because this is fixing false positives rather than any user-visible bug. Tested for x86_64 (testsuite, and that installed stripped shared libraries are unchanged by this patch). * signal/signal.h (__sigpause): Only declare if [__USE_XOPEN && !__GNUC__]. * include/signal.h (__sigpause): Move declaration above call to libc_hidden_proto. * conform/Makefile (test-xfail-ISO/signal.h/linknamespace): Remove variable. (test-xfail-ISO99/signal.h/linknamespace): Likewise. (test-xfail-ISO11/signal.h/linknamespace): Likewise.
* Fix sparc build.David S. Miller2014-11-142-0/+6
| | | | | * sysdeps/sparc/sparc64/rtld-memcpy.c (NO_MEMPCPY_STPCPY_REDIRECT): Define before including <string/memcpy.c> and <string/mempcpy.c>.
* Require GCC 4.6 or later to build glibc.Joseph Myers2014-11-146-8/+25
| | | | | | | | | | | | | | | | | | | | | | | | As discussed in the thread starting at <https://sourceware.org/ml/libc-alpha/2014-10/msg00792.html>, and continuing into November, this patch increases the minimum GCC version for building glibc to 4.6 (there seemed to be no clear consensus for 4.7). In particular, this allows us to use #pragma GCC diagnostic for fine-grained warning control with -Werror (subject to establishing a suitable policy for that use). The documentation has a statement, as requested, about the most recent GCC version tested for building glibc, and I've updated <https://sourceware.org/glibc/wiki/Release> to refer to updating that statement. A NEWS entry is added for this change, although previous such changes didn't get them. Tested for x86_64 (testsuite, and that installed shared libraries are unchanged by this patch). * configure.ac (libc_cv_compiler_ok): Require GCC 4.6 or later. * configure: Regenerated. * manual/install.texi (Tools for Compilation): Document a requirement of GCC 4.6 or later and that GCC 4.9 is the newest compiler verified to work. * INSTALL: Regenerated.
* Fix build of C mempcpy and stpcpy.Joseph Myers2014-11-147-1/+22
| | | | | | | | | | | | | | | | | | | | | | This patch fixes the build of C mempcpy and stpcpy by disabling the redirection to __mempcpy and __stpcpy asm names if NO_MEMPCPY_STPCPY_REDIRECT is defined, and defining that macro in the relevant source files. Tested for powerpc32 that the build is fixed. * include/string.h [NO_MEMPCPY_STPCPY_REDIRECT] (mempcpy): Do not redeclare with asm name. [NO_MEMPCPY_STPCPY_REDIRECT] (stpcpy): Likewise. * string/mempcpy.c (NO_MEMPCPY_STPCPY_REDIRECT): Define before including <string.h>. * string/stpcpy.c (NO_MEMPCPY_STPCPY_REDIRECT): Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/mempcpy.c [!NOT_IN_libc] (NO_MEMPCPY_STPCPY_REDIRECT): Likewise. * sysdeps/powerpc/powerpc64/multiarch/mempcpy.c [!NOT_IN_libc] (NO_MEMPCPY_STPCPY_REDIRECT): Likewise. * sysdeps/powerpc/powerpc64/multiarch/stpcpy.c [SHARED && !NOT_IN_libc] (NO_MEMPCPY_STPCPY_REDIRECT): Likewise.
* Use prototype definition for __strtol.Joseph Myers2014-11-132-4/+3
| | | | | | | | | | This patch fixes those warnings by using a prototype definition for __strtol. Tested for x86_64 that stripped installed shared libraries are unchanged by this patch. * stdlib/strtol.c (__strtol): Use prototype definition.
* Fix strtoll / strtoull namespace for 32-bit (bug 17594).Joseph Myers2014-11-133-3/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For 32-bit platforms, strtoll and strtoull are strong symbols in libc, but they are not in ISO C90, and are brought in by references to __strtoll_internal / __strtoull_internal from scanf. (For 64-bit platforms, they are properly weak.) This patch makes them weak for 32-bit (it has a side-effect of making other symbols weak that don't need to be weak, such as strtol, but that's harmless). Tested for x86 (testsuite, and that the disassembly of installed shared libraries is unchanged by the patch). This fixes all 120 unXFAILed FAILs of the new linknamespace tests seen for x86 (in fact, there are now seven XPASSes of those tests for x86 XPASS: conform/POSIX2008/fcntl.h/linknamespace XPASS: conform/UNIX98/libgen.h/linknamespace XPASS: conform/XOPEN2K/fcntl.h/linknamespace XPASS: conform/XOPEN2K/libgen.h/linknamespace XPASS: conform/XOPEN2K8/fcntl.h/linknamespace XPASS: conform/XOPEN2K8/libgen.h/linknamespace XPASS: conform/XPG4/libgen.h/linknamespace so suggesting that the failures seen for those on x86_64 are in some way architecture-specific or 64-bit-specific). [BZ #17594] * stdlib/strtol.c (SYM__): New macro. (SYM__1): Likewise. (__strtol): Likewise. (strtol): Rename to __strtol and define as weak alias of __strtol. Use libc_hidden_weak.
* S/390: dl-machine.h: Use numbered labels in inline assembly.Stefan Liebler2014-11-132-9/+14
|
* S/390: Add SystemTap probes to longjmp and setjmp.Stefan Liebler2014-11-135-7/+56
|
* S/390: Get rid of warning unused variable in dl-machine.h.Stefan Liebler2014-11-132-1/+8
|
* S/390: Get rid of warning: the comparision will always evaluate as false.Stefan Liebler2014-11-133-11/+22
|
* NPTL: Move __libc_multiple_threads_ptr defn to nptl-init.cRoland McGrath2014-11-123-6/+11
|
* Add tests for namespace for static linking.Joseph Myers2014-11-126-11/+782
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | One thing we currently try to ensure manually is that glibc is namespace-clean for static linking; that is, if you only use features from a particular standard (including the set of features exposed by headers given feature test macros such as _DEFAULT_SOURCE that don't correspond to any written standard), the library objects brought in by the static linker will not define or use (strong) names that are reserved to the user in that standard. This patch implements automatic tests for this, using the same set of standards as for the header conformance tests (it would, however, be easy to add more standards for this testing, without them needing to have the definitions of expected header contents for the header tests). The tests are based on the functions declared in each header, as extracted using GCC's -aux-info option. The following comment from linknamespace.pl explains the caveats around this approach: Here's an example of the output for ISO (C90) assert.h, from before my recent fixes and whitelisting of cases that seem more complicated to fix: [initial] __assert_fail -> [libc.a(assert.o)] free -> [libc.a(malloc.o)] __get_nprocs -> [libc.a(getsysstats.o)] fgets_unlocked [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] __libc_setlocale_lock -> [libc.a(setlocale.o)] _nl_archive_subfreeres -> [libc.a(loadarchive.o)] __sysconf -> [libc.a(sysconf.o)] __tzname_max -> [libc.a(tzset.o)] __tzfile_compute -> [libc.a(tzfile.o)] fileno [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] __libc_setlocale_lock -> [libc.a(setlocale.o)] _nl_archive_subfreeres -> [libc.a(loadarchive.o)] __sysconf -> [libc.a(sysconf.o)] __tzname_max -> [libc.a(tzset.o)] __tzfile_compute -> [libc.a(tzfile.o)] fread_unlocked [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] __libc_setlocale_lock -> [libc.a(setlocale.o)] _nl_archive_subfreeres -> [libc.a(loadarchive.o)] __sysconf -> [libc.a(sysconf.o)] __tzname_max -> [libc.a(tzset.o)] __tzfile_compute -> [libc.a(tzfile.o)] ftello [initial] __assert_fail -> [libc.a(assert.o)] free -> [libc.a(malloc.o)] malloc_info [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] __libc_setlocale_lock -> [libc.a(setlocale.o)] _nl_default_locale_path -> [libc.a(findlocale.o)] memmem [initial] __assert_perror_fail -> [libc.a(assert-perr.o)] __strerror_r -> [libc.a(_strerror.o)] mempcpy [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] _nl_find_domain -> [libc.a(finddomain.o)] _nl_expand_alias -> [libc.a(localealias.o)] qsort -> [libc.a(msort.o)] qsort_r [initial] __assert_fail -> [libc.a(assert.o)] _dl_pagesize -> [libc.a(dl-support.o)] __rawmemchr -> [libc.a(rawmemchr.o)] rawmemchr [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] __getcwd -> [libc.a(getcwd.o)] rewinddir [initial] __assert_fail -> [libc.a(assert.o)] stderr [initial] __assert_fail -> [libc.a(assert.o)] stderr -> [libc.a(stdio.o)] stdin [initial] __assert_fail -> [libc.a(assert.o)] stderr -> [libc.a(stdio.o)] stdout [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] stpcpy [initial] __assert_fail -> [libc.a(assert.o)] __fxprintf -> [libc.a(fxprintf.o)] _IO_vfprintf -> [libc.a(vfprintf.o)] __printf_fp -> [libc.a(printf_fp.o)] wmemset Of the 161 XFAILs, seven are the inevitable varargs.h and ndbm.h failures; I think the remaining 154 mostly represent genuine bugs in glibc that should mostly be straightforward to fix (probably rather fewer than 154 bugs - issues generally affect multiple headers, for multiple standards). (When fixing, of course you need to file a bug in Bugzilla, and check for the possibility that the header conditionals are what's incorrect - that the first listed symbol shouldn't have been declared, or that the symbol finally brought in should have been declared.) * conform/GlibcConform.pm: New file. * conform/conformtest.pl: Use GlibcConform module. * conform/linknamespace.pl: New file. * conform/list-header-symbols.pl: Likewise. * conform/Makefile (linknamespace-symlists-base): New variable. (linknamespace-symlists-tests): Likewise. (linknamespace-header-base): Likewise. (linknamespace-header-tests): Likewise. (tests-special): Add new tests. ($(linknamespace-symlists-tests)): New rule. (linknamespace-libs): New variable. ($(objpfx)symlist-stdlibs): New rule. ($(linknamespace-header-tests)): Likewise. (test-xfail-XPG3/varargs.h/linknamespace): New variable. (test-xfail-XPG4/varargs.h/linknamespace): Likewise. (test-xfail-UNIX98/varargs.h/linknamespace): Likewise. (test-xfail-XPG4/ndbm.h/linknamespace): Likewise. (test-xfail-UNIX98/ndbm.h/linknamespace): Likewise. (test-xfail-XOPEN2K/ndbm.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/ndbm.h/linknamespace): Likewise. (test-xfail-ISO/math.h/linknamespace): Likewise. (test-xfail-ISO/signal.h/linknamespace): Likewise. (test-xfail-ISO/stdio.h/linknamespace): Likewise. (test-xfail-ISO/time.h/linknamespace): Likewise. (test-xfail-ISO99/complex.h/linknamespace): Likewise. (test-xfail-ISO99/ctype.h/linknamespace): Likewise. (test-xfail-ISO99/math.h/linknamespace): Likewise. (test-xfail-ISO99/signal.h/linknamespace): Likewise. (test-xfail-ISO99/stdio.h/linknamespace): Likewise. (test-xfail-ISO99/tgmath.h/linknamespace): Likewise. (test-xfail-ISO11/complex.h/linknamespace): Likewise. (test-xfail-ISO11/ctype.h/linknamespace): Likewise. (test-xfail-ISO11/math.h/linknamespace): Likewise. (test-xfail-ISO11/signal.h/linknamespace): Likewise. (test-xfail-ISO11/stdio.h/linknamespace): Likewise. (test-xfail-ISO11/tgmath.h/linknamespace): Likewise. (test-xfail-XPG3/ctype.h/linknamespace): Likewise. (test-xfail-XPG3/fnmatch.h/linknamespace): Likewise. (test-xfail-XPG3/glob.h/linknamespace): Likewise. (test-xfail-XPG3/math.h/linknamespace): Likewise. (test-xfail-XPG3/regex.h/linknamespace): Likewise. (test-xfail-XPG3/search.h/linknamespace): Likewise. (test-xfail-XPG3/stdio.h/linknamespace): Likewise. (test-xfail-XPG3/time.h/linknamespace): Likewise. (test-xfail-XPG3/unistd.h/linknamespace): Likewise. (test-xfail-XPG3/wordexp.h/linknamespace): Likewise. (test-xfail-XPG4/ctype.h/linknamespace): Likewise. (test-xfail-XPG4/fmtmsg.h/linknamespace): Likewise. (test-xfail-XPG4/fnmatch.h/linknamespace): Likewise. (test-xfail-XPG4/glob.h/linknamespace): Likewise. (test-xfail-XPG4/grp.h/linknamespace): Likewise. (test-xfail-XPG4/libgen.h/linknamespace): Likewise. (test-xfail-XPG4/math.h/linknamespace): Likewise. (test-xfail-XPG4/netdb.h/linknamespace): Likewise. (test-xfail-XPG4/pwd.h/linknamespace): Likewise. (test-xfail-XPG4/regex.h/linknamespace): Likewise. (test-xfail-XPG4/search.h/linknamespace): Likewise. (test-xfail-XPG4/stdio.h/linknamespace): Likewise. (test-xfail-XPG4/stdlib.h/linknamespace): Likewise. (test-xfail-XPG4/sys/mman.h/linknamespace): Likewise. (test-xfail-XPG4/sys/statvfs.h/linknamespace): Likewise. (test-xfail-XPG4/syslog.h/linknamespace): Likewise. (test-xfail-XPG4/time.h/linknamespace): Likewise. (test-xfail-XPG4/unistd.h/linknamespace): Likewise. (test-xfail-XPG4/wordexp.h/linknamespace): Likewise. (test-xfail-POSIX/aio.h/linknamespace): Likewise. (test-xfail-POSIX/fnmatch.h/linknamespace): Likewise. (test-xfail-POSIX/glob.h/linknamespace): Likewise. (test-xfail-POSIX/math.h/linknamespace): Likewise. (test-xfail-POSIX/mqueue.h/linknamespace): Likewise. (test-xfail-POSIX/pthread.h/linknamespace): Likewise. (test-xfail-POSIX/regex.h/linknamespace): Likewise. (test-xfail-POSIX/sched.h/linknamespace): Likewise. (test-xfail-POSIX/semaphore.h/linknamespace): Likewise. (test-xfail-POSIX/sys/mman.h/linknamespace): Likewise. (test-xfail-POSIX/time.h/linknamespace): Likewise. (test-xfail-POSIX/unistd.h/linknamespace): Likewise. (test-xfail-POSIX/wordexp.h/linknamespace): Likewise. (test-xfail-UNIX98/aio.h/linknamespace): Likewise. (test-xfail-UNIX98/ctype.h/linknamespace): Likewise. (test-xfail-UNIX98/fmtmsg.h/linknamespace): Likewise. (test-xfail-UNIX98/fnmatch.h/linknamespace): Likewise. (test-xfail-UNIX98/glob.h/linknamespace): Likewise. (test-xfail-UNIX98/grp.h/linknamespace): Likewise. (test-xfail-UNIX98/libgen.h/linknamespace): Likewise. (test-xfail-UNIX98/math.h/linknamespace): Likewise. (test-xfail-UNIX98/mqueue.h/linknamespace): Likewise. (test-xfail-UNIX98/netdb.h/linknamespace): Likewise. (test-xfail-UNIX98/pthread.h/linknamespace): Likewise. (test-xfail-UNIX98/pwd.h/linknamespace): Likewise. (test-xfail-UNIX98/regex.h/linknamespace): Likewise. (test-xfail-UNIX98/sched.h/linknamespace): Likewise. (test-xfail-UNIX98/search.h/linknamespace): Likewise. (test-xfail-UNIX98/semaphore.h/linknamespace): Likewise. (test-xfail-UNIX98/stdio.h/linknamespace): Likewise. (test-xfail-UNIX98/stdlib.h/linknamespace): Likewise. (test-xfail-UNIX98/sys/mman.h/linknamespace): Likewise. (test-xfail-UNIX98/sys/statvfs.h/linknamespace): Likewise. (test-xfail-UNIX98/syslog.h/linknamespace): Likewise. (test-xfail-UNIX98/time.h/linknamespace): Likewise. (test-xfail-UNIX98/unistd.h/linknamespace): Likewise. (test-xfail-UNIX98/wchar.h/linknamespace): Likewise. (test-xfail-UNIX98/wordexp.h/linknamespace): Likewise. (test-xfail-XOPEN2K/aio.h/linknamespace): Likewise. (test-xfail-XOPEN2K/complex.h/linknamespace): Likewise. (test-xfail-XOPEN2K/fcntl.h/linknamespace): Likewise. (test-xfail-XOPEN2K/fmtmsg.h/linknamespace): Likewise. (test-xfail-XOPEN2K/fnmatch.h/linknamespace): Likewise. (test-xfail-XOPEN2K/glob.h/linknamespace): Likewise. (test-xfail-XOPEN2K/grp.h/linknamespace): Likewise. (test-xfail-XOPEN2K/libgen.h/linknamespace): Likewise. (test-xfail-XOPEN2K/math.h/linknamespace): Likewise. (test-xfail-XOPEN2K/mqueue.h/linknamespace): Likewise. (test-xfail-XOPEN2K/net/if.h/linknamespace): Likewise. (test-xfail-XOPEN2K/netdb.h/linknamespace): Likewise. (test-xfail-XOPEN2K/pthread.h/linknamespace): Likewise. (test-xfail-XOPEN2K/pwd.h/linknamespace): Likewise. (test-xfail-XOPEN2K/regex.h/linknamespace): Likewise. (test-xfail-XOPEN2K/search.h/linknamespace): Likewise. (test-xfail-XOPEN2K/semaphore.h/linknamespace): Likewise. (test-xfail-XOPEN2K/signal.h/linknamespace): Likewise. (test-xfail-XOPEN2K/spawn.h/linknamespace): Likewise. (test-xfail-XOPEN2K/stdlib.h/linknamespace): Likewise. (test-xfail-XOPEN2K/sys/mman.h/linknamespace): Likewise. (test-xfail-XOPEN2K/sys/statvfs.h/linknamespace): Likewise. (test-xfail-XOPEN2K/sys/wait.h/linknamespace): Likewise. (test-xfail-XOPEN2K/syslog.h/linknamespace): Likewise. (test-xfail-XOPEN2K/tgmath.h/linknamespace): Likewise. (test-xfail-XOPEN2K/time.h/linknamespace): Likewise. (test-xfail-XOPEN2K/ucontext.h/linknamespace): Likewise. (test-xfail-XOPEN2K/unistd.h/linknamespace): Likewise. (test-xfail-XOPEN2K/wordexp.h/linknamespace): Likewise. (test-xfail-POSIX2008/aio.h/linknamespace): Likewise. (test-xfail-POSIX2008/complex.h/linknamespace): Likewise. (test-xfail-POSIX2008/ctype.h/linknamespace): Likewise. (test-xfail-POSIX2008/dirent.h/linknamespace): Likewise. (test-xfail-POSIX2008/fcntl.h/linknamespace): Likewise. (test-xfail-POSIX2008/grp.h/linknamespace): Likewise. (test-xfail-POSIX2008/math.h/linknamespace): Likewise. (test-xfail-POSIX2008/mqueue.h/linknamespace): Likewise. (test-xfail-POSIX2008/net/if.h/linknamespace): Likewise. (test-xfail-POSIX2008/netdb.h/linknamespace): Likewise. (test-xfail-POSIX2008/pthread.h/linknamespace): Likewise. (test-xfail-POSIX2008/regex.h/linknamespace): Likewise. (test-xfail-POSIX2008/semaphore.h/linknamespace): Likewise. (test-xfail-POSIX2008/spawn.h/linknamespace): Likewise. (test-xfail-POSIX2008/sys/mman.h/linknamespace): Likewise. (test-xfail-POSIX2008/sys/statvfs.h/linknamespace): Likewise. (test-xfail-POSIX2008/tgmath.h/linknamespace): Likewise. (test-xfail-POSIX2008/time.h/linknamespace): Likewise. (test-xfail-POSIX2008/unistd.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/aio.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/complex.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/dirent.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/fcntl.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/fmtmsg.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/grp.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/libgen.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/math.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/mqueue.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/net/if.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/netdb.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/pthread.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/pwd.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/regex.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/search.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/semaphore.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/spawn.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/sys/mman.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/sys/statvfs.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/syslog.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/tgmath.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/time.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/unistd.h/linknamespace): Likewise.
* Fix localealias.c fgets_unlocked namespace (bug 17589).Joseph Myers2014-11-123-2/+7
| | | | | | | | | | | | | intl/localealias.c is brought in by ISO C functions, but uses fgets_unlocked, which is not an ISO C function. This patch changes this to use __fgets_unlocked. Tested for x86_64 (testsuite, and that stripped installed shared libraries are unchanged by the patch). [BZ #17589] * intl/localealias.c [_LIBC] (FGETS): Use __fgets_unlocked instead of fgets_unlocked.
* Fix locale memmem namespace (bug 17585).Joseph Myers2014-11-125-6/+20
| | | | | | | | | | | | | | | | | | | | | | | | | Locale code, brought in by ISO C functions, calls memmem, which is not an ISO C function. This isn't an ISO C conformance bug, because all mem* names are reserved, but glibc practice is not to rely on that reservation (thus, memmem is only declared in string.h if __USE_GNU even though ISO C would allow it to be declared unconditionally, for example). This patch changes that code to use __memmem. Note: there are uses of memmem elsewhere in glibc that I didn't change, although it may turn out some of those also need to use __memmem. Tested for x86_64 (testsuite, and that disassembly of installed shared libraries is unchanged by this patch). [BZ #17585] * string/memmem.c [!_LIBC] (__memmem): Define to memmem. (memmem): Rename to __memmem and define as weak alias of __memmem. Use libc_hidden_weak. (__memmem): Use libc_hidden_def. * include/string.h (__memmem): Declare. Use libc_hidden_proto. * locale/findlocale.c (valid_locale_name): Use __memmem instead of memmem.
* Fix __get_nprocs fgets_unlocked namespace (bug 17582).Joseph Myers2014-11-128-6/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | __get_nprocs is called from malloc code, but calls fgets_unlocked, which is not an ISO C or POSIX function. This patch fixes it to call a new __fgets_unlocked name instead. Note: there are various other uses of fgets_unlocked in glibc's libraries, and I haven't yet investigated which others might also be problematic (called directly or indirectly from standard functions) and so need to change to use __fgets_unlocked. Tested for x86_64 (testsuite, and that disassembly of installed shared libraries is unchanged by the patch). [BZ #17582] * libio/iofgets.c [weak_alias && !_IO_MTSAFE_IO] (__fgets_unlocked): Add alias of _IO_fgets. Use libc_hidden_def. * libio/iofgets_u.c (fgets_unlocked): Rename to __fgets_unlocked and define as weak alias of __fgets_unlocked. Use libc_hidden_weak. (__fgets_unlocked): Use libc_hidden_def. * include/stdio.h (__fgets_unlocked): Declare. Use libc_hidden_proto. * sysdeps/unix/sysv/linux/getsysstats.c (phys_pages_info): Use __fgets_unlocked instead of fgets_unlocked. * sysdeps/unix/sysv/linux/alpha/getsysstats.c (GET_NPROCS_CONF_PARSER): Likewise. * sysdeps/unix/sysv/linux/sparc/getsysstats.c (GET_NPROCS_CONF_PARSER): Likewise.
* Fix __printf_fp wmemset namespace (bug 17574).Joseph Myers2014-11-125-4/+16
| | | | | | | | | | | | | | | | | __printf_fp calls wmemset, but that is not an ISO C90 function. This patch fixes it to call a new __wmemset name instead (with wmemset being a weak alias). Tested for x86_64 (testsuite, and that disassembly of installed shared libraries is unchanged by the patch). [BZ #17574] * wcsmbs/wmemset.c (wmemset): Rename to __wmemset and define as weak alias of __wmemset. Use libc_hidden_weak. (__wmemset): Use libc_hidden_def. * include/wchar.h (__wmemset): Declare. Use libc_hidden_proto. * stdio-common/printf_fp.c (___printf_fp): Call __wmemset instead of wmemset.
* Fix stpcpy / mempcpy namespace (bug 17573).Joseph Myers2014-11-123-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Various glibc functions call __stpcpy and __mempcpy for namespace reasons instead of plain stpcpy and mempcpy. But __stpcpy and __mempcpy are macros that call __builtin_stpcpy and __builtin_mempcpy, and unless GCC optimizes the calls, they end up calling the C functions stpcpy and mempcpy. For calls from within shared libc, libc_hidden_builtin_proto ensures that calls to those C functions are in turn mapped to call __GI_stpcpy and __GI_mempcpy. However, for static libc, and for calls from shared libraries other than libc, the ELF symbols stpcpy and mempcpy end up getting called, breaking the ISO C namespace (in the case of stpcpy) or glibc conventions about not relying on the "future library directions" reservations (in the case of mempcpy). This patch fixes this by adding declarations of these functions to include/string.h, under an appropriate condition, with __asm__ used to change the assembler name used for calls (the mempcpy case was previously discussed, and the approach for the fix is as I suggested in <https://sourceware.org/ml/libc-alpha/2013-02/msg00063.html>). Tested for x86_64 with the testsuite; also checked that dcigettext.o (an example previously noted of undesired calls to stpcpy and mempcpy) now calls __stpcpy and __mempcpy instead, as do non-libc shared libraries (__stpcpy and __mempcpy were already exported from shared libc). Disassembly of installed shared libraries isn't easy to compare because of reordered PLT entries resulting from the change in functions called (libnsl, libnss_compat, libnss_dns, libnss_files, libnss_hesiod, libnss_nis, libnss_nisplus, libpthread, librt all have such changes). [BZ #17573] * include/string.h [NOT_IN_libc || !SHARED] (mempcpy): Declare with asm name __mempcpy. [NOT_IN_libc || !SHARED] (stpcpy): Declare with asm name __stpcpy.
* Fix x86_64 rawmemchr namespace (bug 17572).Joseph Myers2014-11-123-4/+9
| | | | | | | | | | | | | | | | rawmemchr is not an ISO C function, but __rawmemchr is called from ISO C functions, so rawmemchr should be a weak alias. On most architecture it is, but x86_64 defines the function as rawmemchr with __rawmemchr as a strong alias. This patch makes x86_64 follow the same arrangements as other architectures. Tested for x86_64 (testsuite, and that disassembly of installed shared libraries is unchanged by the patch). [BZ #17572] * sysdeps/x86_64/rawmemchr.S (rawmemchr): Rename to __rawmemchr and define as weak alias of __rawmemchr. (__rawmemchr): Do not define as strong alias of rawmemchr.
* Fix qsort_r namespace (bug 17571).Joseph Myers2014-11-129-7/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | qsort_r is defined in the same file as qsort, but is not an ISO C function, so should be a weak alias for __qsort_r. The uses in getaddrinfo should also call __qsort_r, since getaddrinfo is a POSIX function and qsort_r isn't. This patch implements this. Because nscd uses the getaddrinfo sources outside libc, as do the tst-rfc3484 tests, a #define of __qsort_r to qsort_r is added there alongside the similar defines for other libc-internal symbols used in getaddrinfo. Tested for x86_64 (testsuite, and that disassembly of installed shared libraries is unchanged by the patch). [BZ #17571] * stdlib/msort.c (qsort_r): Rename to __qsort_r and define as weak alias of __qsort_r. (qsort): Call __qsort_r instead of qsort_r. * include/stdlib.h (qsort_r): Do not call libc_hidden_proto. (__qsort_r): Declare. Call libc_hidden_proto. * sysdeps/posix/getaddrinfo.c (getaddrinfo): Call __qsort_r instead of qsort_r. * nscd/gai.c (__qsort_r): Define to qsort_r. * posix/tst-rfc3484.c (__qsort_r): Likewise. * posix/tst-rfc3484-2.c (__qsort_r): Likewise. * posix/tst-rfc3484-3.c (__qsort_r): Likewise.
* Fix malloc_info namespace (bug 17570).Joseph Myers2014-11-123-2/+7
| | | | | | | | | | | | | malloc_info is defined in the same file as malloc and free, but is not an ISO C function, so should be a weak symbol. This patch makes it so. Tested for x86_64 (testsuite, and that disassembly of installed shared libraries is unchanged by the patch). [BZ #17570] * malloc/malloc.c (malloc_info): Rename to __malloc_info and define as weak alias of __malloc_info.
* Fix __getcwd rewinddir namespace (bug 17584).Joseph Myers2014-11-127-9/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | __getcwd is called from dcigettext.o (brought in by various ISO C functionality), but calls rewinddir, which is not an ISO C function. This patch makes __getcwd call __rewinddir instead and makes rewinddir a weak alias for __rewinddir. Since getcwd.c is shared with gnulib (albeit not merged in either direction for a long time, and omitted from gnulib's config/srclist.txt list of shared files) I put in a #ifndef _LIBC define of __rewinddir to rewinddir, although a future merged version of getcwd could end up looking significantly different. Tested for x86_64 (testsuite, and that disassembly of installed shared libraries is unchanged by this patch). [BZ #17584] * dirent/rewinddir.c (rewinddir): Rename to __rewinddir and define as weak alias of __rewinddir. Don't use libc_hidden_def. (__rewinddir): Use libc_hidden_def. * sysdeps/mach/hurd/rewinddir.c: Rename to __rewinddir and define as weak alias of __rewinddir. Don't use libc_hidden_def. (__rewinddir): Use libc_hidden_def. * sysdeps/posix/rewinddir.c: Rename to __rewinddir and define as weak alias of __rewinddir. Don't use libc_hidden_def. (__rewinddir): Use libc_hidden_def. * include/dirent.h (rewinddir): Don't use libc_hidden_proto. (__rewinddir): Use libc_hidden_proto. * sysdeps/posix/getcwd.c [!_LIBC] (__rewinddir): Define to rewinddir. (__getcwd): Use __rewinddir instead of rewinddir.