about summary refs log tree commit diff
path: root/stdlib/Versions
Commit message (Collapse)AuthorAgeFilesLines
* Implement C23 <stdbit.h>Joseph Myers2024-01-031-0/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | C23 adds a header <stdbit.h> with various functions and type-generic macros for bit-manipulation of unsigned integers (plus macro defines related to endianness). Implement this header for glibc. The functions have both inline definitions in the header (referenced by macros defined in the header) and copies with external linkage in the library (which are implemented in terms of those macros to avoid duplication). They are documented in the glibc manual. Tests, as well as verifying results for various inputs (of both the macros and the out-of-line functions), verify the types of those results (which showed up a bug in an earlier version with the type-generic macro stdc_has_single_bit wrongly returning a promoted type), that the macros can be used at top level in a source file (so don't use ({})), that they evaluate their arguments exactly once, and that the macros for the type-specific functions have the expected implicit conversions to the relevant argument type. Jakub previously referred to -Wconversion warnings in type-generic macros, so I've included a test with -Wconversion (but the only warnings I saw and fixed from that test were actually in inline functions in the <stdbit.h> header - not anything coming from use of the type-generic macros themselves). This implementation of the type-generic macros does not handle unsigned __int128, or unsigned _BitInt types with a width other than that of a standard integer type (and C23 doesn't require the header to handle such types either). Support for those types, using the new type-generic built-in functions Jakub's added for GCC 14, can reasonably be added in a followup (along of course with associated tests). This implementation doesn't do anything special to handle C++, or have any tests of functionality in C++ beyond the existing tests that all headers can be compiled in C++ code; it's not clear exactly what form this header should take in C++, but probably not one using macros. DIS ballot comment AT-107 asks for the word "count" to be added to the names of the stdc_leading_zeros, stdc_leading_ones, stdc_trailing_zeros and stdc_trailing_ones functions and macros. I don't think it's likely to be accepted (accepting any technical comments would mean having an FDIS ballot), but if it is accepted at the WG14 meeting (22-26 January in Strasbourg, starting with DIS ballot comment handling) then there would still be time to update glibc for the renaming before the 2.39 release. The new functions and header are placed in the stdlib/ directory in glibc, rather than creating a new toplevel stdbit/ or putting them in string/ alongside ffs. Tested for x86_64 and x86.
* C2x strtol binary constant handlingJoseph Myers2023-02-161-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | C2x adds binary integer constants starting with 0b or 0B, and supports those constants in strtol-family functions when the base passed is 0 or 2. Implement that strtol support for glibc. As discussed at <https://sourceware.org/pipermail/libc-alpha/2020-December/120414.html>, this is incompatible with previous C standard versions, in that such an input string starting with 0b or 0B was previously required to be parsed as 0 (with the rest of the string unprocessed). Thus, as proposed there, this patch adds 20 new __isoc23_* functions with appropriate header redirection support. This patch does *not* do anything about scanf %i (which will need 12 new functions per long double variant, so 12, 24 or 36 depending on the glibc configuration), instead leaving that for a future patch. The function names would remain as __isoc23_* even if C2x ends up published in 2024 rather than 2023. Making this change leads to the question of what should happen to internal uses of these functions in glibc and its tests. The header redirection (which applies for _GNU_SOURCE or any other feature test macros enabling C2x features) has the effect of redirecting internal uses but without those uses then ending up at a hidden alias (see the comment in include/stdio.h about interaction with libc_hidden_proto). It seems desirable for the default for internal uses to be the same versions used by normal code using _GNU_SOURCE, so rather than doing anything to disable that redirection, similar macro definitions to those in include/stdio.h are added to the include/ headers for the new functions. Given that the default for uses in glibc is for the redirections to apply, the next question is whether the C2x semantics are correct for all those uses. Uses with the base fixed to 10, 16 or any other value other than 0 or 2 can be ignored. I think this leaves the following internal uses to consider (an important consideration for review of this patch will be both whether this list is complete and whether my conclusions on all entries in it are correct): benchtests/bench-malloc-simple.c benchtests/bench-string.h elf/sotruss-lib.c math/libm-test-support.c nptl/perf.c nscd/nscd_conf.c nss/nss_files/files-parse.c posix/tst-fnmatch.c posix/wordexp.c resolv/inet_addr.c rt/tst-mqueue7.c soft-fp/testit.c stdlib/fmtmsg.c support/support_test_main.c support/test-container.c sysdeps/pthread/tst-mutex10.c I think all of these places are OK with the new semantics, except for resolv/inet_addr.c, where the POSIX semantics of inet_addr do not allow for binary constants; thus, I changed that file (to use __strtoul_internal, whose semantics are unchanged) and added a test for this case. In the case of posix/wordexp.c I think accepting binary constants is OK since POSIX explicitly allows additional forms of shell arithmetic expressions, and in stdlib/fmtmsg.c SEV_LEVEL is not in POSIX so again I think accepting binary constants is OK. Functions such as __strtol_internal, which are only exported for compatibility with old binaries from when those were used in inline functions in headers, have unchanged semantics; the __*_l_internal versions (purely internal to libc and not exported) have a new argument to specify whether to accept binary constants. As well as for the standard functions, the header redirection also applies to the *_l versions (GNU extensions), and to legacy functions such as strtoq, to avoid confusing inconsistency (the *q functions redirect to __isoc23_*ll rather than needing their own __isoc23_* entry points). For the functions that are only declared with _GNU_SOURCE, this means the old versions are no longer available for normal user programs at all. An internal __GLIBC_USE_C2X_STRTOL macro is used to control the redirections in the headers, and cases in glibc that wish to avoid the redirections - the function implementations themselves and the tests of the old versions of the GNU functions - then undefine and redefine that macro to allow the old versions to be accessed. (There would of course be greater complexity should we wish to make any of the old versions into compat symbols / avoid them being defined at all for new glibc ABIs.) strtol_l.c has some similarity to strtol.c in gnulib, but has already diverged some way (and isn't listed at all at https://sourceware.org/glibc/wiki/SharedSourceFiles unlike strtoll.c and strtoul.c); I haven't made any attempts at gnulib compatibility in the changes to that file. I note incidentally that inttypes.h and wchar.h are missing the __nonnull present on declarations of this family of functions in stdlib.h; I didn't make any changes in that regard for the new declarations added.
* inet: Turn __ivaliduser into a compatibility symbolFlorian Weimer2022-08-101-0/+2
| | | | | It is not declared in a header file, and as the comment indicates, it is not expected to be used.
* stdlib: Add arc4random, arc4random_buf, and arc4random_uniform (BZ #4417)Adhemerval Zanella Netto2022-07-221-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The implementation is based on scalar Chacha20 with per-thread cache. It uses getrandom or /dev/urandom as fallback to get the initial entropy, and reseeds the internal state on every 16MB of consumed buffer. To improve performance and lower memory consumption the per-thread cache is allocated lazily on first arc4random functions call, and if the memory allocation fails getentropy or /dev/urandom is used as fallback. The cache is also cleared on thread exit iff it was initialized (so if arc4random is not called it is not touched). Although it is lock-free, arc4random is still not async-signal-safe (the per thread state is not updated atomically). The ChaCha20 implementation is based on RFC8439 [1], omitting the final XOR of the keystream with the plaintext because the plaintext is a stream of zeros. This strategy is similar to what OpenBSD arc4random does. The arc4random_uniform is based on previous work by Florian Weimer, where the algorithm is based on Jérémie Lumbroso paper Optimal Discrete Uniform Generation from Coin Flips, and Applications (2013) [2], who credits Donald E. Knuth and Andrew C. Yao, The complexity of nonuniform random number generation (1976), for solving the general case. The main advantage of this method is the that the unit of randomness is not the uniform random variable (uint32_t), but a random bit. It optimizes the internal buffer sampling by initially consuming a 32-bit random variable and then sampling byte per byte. Depending of the upper bound requested, it might lead to better CPU utilization. Checked on x86_64-linux-gnu, aarch64-linux, and powerpc64le-linux-gnu. Co-authored-by: Florian Weimer <fweimer@redhat.com> Reviewed-by: Yann Droneaud <ydroneaud@opteya.com> [1] https://datatracker.ietf.org/doc/html/rfc8439 [2] https://arxiv.org/pdf/1304.1916.pdf
* Move mcheck symbol from stdlib to mallocSiddhesh Poyarekar2021-07-081-1/+1
| | | | | It is defined in malloc, so it belongs there. Verified on x86_64 that the built libraries are identical despite this change.
* Move __fentry__ version definition to sysdeps/{i386,x86_64}Ilya Leoshkevich2018-08-101-3/+0
| | | | | | | | | | | | | | __fentry__ symbol is currently not defined for other architectures. Attempts to introduce it cause abicheck to fail, because it will be available since 2.29 earliest, and not 2.13, which is the case for Intel. With the new code, abicheck passes for i686-linux-gnu, x86_64-linux-gnu and x86_64-linux-gnu32 triples. ChangeLog: * stdlib/Versions: Remove __fentry__. * sysdeps/i386/Versions: Add __fentry__. * sysdeps/x86_64/Versions: Add __fentry__.
* Add _Float32 function aliases.Joseph Myers2017-12-071-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch concludes filling out TS 18661-3 support for different types by adding *f32 function aliases of float functions to support _Float32. As with _Float64 and _Float32x, this is supported for all glibc configurations. As with the previous such patches there are some x86 ulps updates because of inline functions present for float but not for _Float32. The patch also has the usual bits/floatn-common.h update, symbol versions, ABI baselines updates, test enablement and documentation. Tested for x86_64 and x86, and with build-many-glibcs.py, with both GCC 6 and GCC 7. * bits/floatn-common.h (__HAVE_FLOAT32): Define to 1. * manual/math.texi (Mathematics): Document support for _Float32. * math/Makefile (test-types): Add float32. * math/Versions (GLIBC_2.27): Add _Float32 functions. * stdlib/Versions (GLIBC_2.27): Likewise. * wcsmbs/Versions (GLIBC_2.27): Likewise. * sysdeps/unix/sysv/linux/aarch64/libc.abilist: Update. * sysdeps/unix/sysv/linux/aarch64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/alpha/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/alpha/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/arm/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/arm/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/hppa/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/hppa/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/i386/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/i386/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/ia64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/ia64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/m68k/coldfire/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/m68k/m680x0/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/microblaze/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/microblaze/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/mips/mips32/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/mips/mips64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/nios2/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/nios2/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/libc-le.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/libm-le.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/sh/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/sh/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/tile/tilepro/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/tile/tilepro/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/x86_64/64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/x86_64/64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/x86_64/x32/libm.abilist: Likewise. * sysdeps/i386/fpu/libm-test-ulps: Likewise. * sysdeps/i386/i686/fpu/multiarch/libm-test-ulps: Likewise.
* Add _Float64, _Float32x function aliases.Joseph Myers2017-12-061-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch continues filling out TS 18661-3 support by adding *f64 and *f32x function aliases, supporting _Float64 and _Float32x, as aliases for double functions. These types are supported for all glibc configurations. The API corresponds exactly to that for _Float128 and _Float64x. _Float32 aliases to float functions remain to be added in subsequent patches to complete this process (then there are a few miscellaneous functions in TS 18661-3 to implement that aren't simply versions of existing functions for new types). The patch enables the feature in bits/floatn-common.h, adds symbol versions and documentation with updates to ABI baselines, and arranges for the libm functions for the new types to be tested. As with the _Float64x changes there are some x86 ulps updates because of header inlines not used for the new types (and one other change to the non-multiarch libm-test-ulps, which I suppose comes from using a different compiler version / configuration from when it was last regenerated). Tested for x86_64 and x86, and with build-many-glibcs.py, with both GCC 6 and GCC 7. * bits/floatn-common.h (__HAVE_FLOAT64): Define to 1. (__HAVE_FLOAT32X): Likewise. * manual/math.texi (Mathematics): Document support for _Float64 and _Float32x. * math/Makefile (test-types): Add float64 and float32x. * math/Versions (GLIBC_2.27): Add _Float64 and _Float32x functions. * stdlib/Versions (GLIBC_2.27): Likewise. * wcsmbs/Versions (GLIBC_2.27): Likewise. * sysdeps/unix/sysv/linux/aarch64/libc.abilist: Update. * sysdeps/unix/sysv/linux/aarch64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/alpha/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/alpha/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/arm/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/arm/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/hppa/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/hppa/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/i386/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/i386/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/ia64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/ia64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/m68k/coldfire/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/m68k/m680x0/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/microblaze/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/microblaze/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/mips/mips32/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/mips/mips64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/nios2/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/nios2/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/libc-le.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/libm-le.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/sh/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/sh/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/tile/tilepro/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/tile/tilepro/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/x86_64/64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/x86_64/64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/x86_64/x32/libm.abilist: Likewise. * sysdeps/i386/fpu/libm-test-ulps: Likewise. * sysdeps/i386/i686/fpu/multiarch/libm-test-ulps: Likewise.
* Add _Float64x function aliases.Joseph Myers2017-11-271-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch continues filling out TS 18661-3 support by adding *f64x function aliases on platforms with _Float64x support. (It so happens the set of such platforms is exactly the same as the set of platforms with _Float128 support, although on x86_64, x86 and ia32 the _Float64x format is Intel extended rather than binary128.) The API provided corresponds exactly to that provided for _Float128, mostly coming from TS 18661-3. As these functions always alias those for another type (long double, _Float128 or both), __* function names are not provided, as in other cases of alias types. Given the preparation done in previous patches, this one just enables the feature via Makeconfig and bits/floatn.h, adds symbol versions, and updates documentation and ABI baselines. The symbol versions are present unconditionally as GLIBC_2.27 in the relevant Versions files, as it's OK for those to specify versions for functions that may not be present in some configurations; no additional complexity is needed unless in future some configuration gains support for this type that didn't have such support in 2.27. The Makeconfig additions for ia64 and x86 aren't strictly needed, as those configurations also get float64x-alias-fcts definitions from sysdeps/ieee754/float128/Makeconfig, but still seem appropriate given that _Float64x is not _Float128 for those configurations. A libm-test-ulps update for x86 is included. This is because bits/mathinline.h does not have _Float64x support added and for two functions the use of out-of-line functions results in increased ulps (ifloat64x shares ulps with ildouble / ifloat128 as appropriate). Given that we'd like generally to eliminate bits/mathinline.h optimizations, preferring to have such optimizations in GCC instead, it seems reasonable not to add such support there for new types. GCC support for _FloatN / _FloatNx built-in functions is limited, but has been improved in GCC 8, and at some point I hope the full set of libm built-in functions in GCC, and other optimizations with per-floating-type aspects, will be enabled for all _FloatN / _FloatNx types. Tested for x86_64 and x86, and with build-many-glibcs.py, with both GCC 6 and GCC 7. * sysdeps/ia64/Makeconfig (float64x-alias-fcts): New variable. * sysdeps/ieee754/float128/Makeconfig (float64x-alias-fcts): Likewise. * sysdeps/ieee754/ldbl-128/Makeconfig (float64x-alias-fcts): Likewise. * sysdeps/x86/Makeconfig: New file. * bits/floatn-common.h (__HAVE_FLOAT64X): Remove macro. (__HAVE_FLOAT64X_LONG_DOUBLE): Likewise. * bits/floatn.h (__HAVE_FLOAT64X): New macro. (__HAVE_FLOAT64X_LONG_DOUBLE): Likewise. * sysdeps/ia64/bits/floatn.h (__HAVE_FLOAT64X): Likewise. (__HAVE_FLOAT64X_LONG_DOUBLE): Likewise. * sysdeps/ieee754/ldbl-128/bits/floatn.h (__HAVE_FLOAT64X): Likewise. (__HAVE_FLOAT64X_LONG_DOUBLE): Likewise. * sysdeps/mips/ieee754/bits/floatn.h (__HAVE_FLOAT64X): Likewise. (__HAVE_FLOAT64X_LONG_DOUBLE): Likewise. * sysdeps/powerpc/bits/floatn.h (__HAVE_FLOAT64X): Likewise. (__HAVE_FLOAT64X_LONG_DOUBLE): Likewise. * sysdeps/x86/bits/floatn.h (__HAVE_FLOAT64X): Likewise. (__HAVE_FLOAT64X_LONG_DOUBLE): Likewise. * manual/math.texi (Mathematics): Document support for _Float64x. * math/Versions (GLIBC_2.27): Add _Float64x functions. * stdlib/Versions (GLIBC_2.27): Likewise. * wcsmbs/Versions (GLIBC_2.27): Likewise. * sysdeps/unix/sysv/linux/aarch64/libc.abilist: Update. * sysdeps/unix/sysv/linux/aarch64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/alpha/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/alpha/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/i386/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/i386/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/ia64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/ia64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/mips/mips64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/libc-le.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/libm-le.abilist: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/x86_64/64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/x86_64/64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/x86_64/x32/libm.abilist: Likewise. * sysdeps/i386/fpu/libm-test-ulps: Likewise. * sysdeps/i386/i686/fpu/multiarch/libm-test-ulps: Likewise.
* Move wcstof128 symbol versions to wcsmbs/Versions.Joseph Myers2017-11-241-2/+0
| | | | | | | | | | | | | | This patch moves wcstof128 and wcstof128_l Versions file entries from stdlib/Versions to wcsmbs/Versions, which is a more appropriate place for them. Tested for x86_64, and with build-many-glibcs.py that installed stripped shared libraries are unchanged by the patch. * stdlib/Versions (libc): Move entries for wcstof128 and wcstof128_l to .... * wcsmbs/Versions (libc): ... here. Include <float128-abi.h>.
* Move some float128 symbol version definitions.Joseph Myers2017-10-161-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With support for _Float128 functions on platforms where that type has the same ABI as long double, as well as on platforms where it is ABI-distinct, those functions will need to be exported from glibc's shared libraries at appropriate symbol versions in each case. This patch avoids duplication of lists of symbols to export by moving the symbols other than __* to math/Versions and stdlib/Versions. There, they are conditional on <float128-abi.h> defining FLOAT128_VERSION and a default version of that header is added that does not define that macro. Enabling the float128 function aliases will then include adding a sysdeps/ieee754/ldbl-128/float128-abi.h that defines FLOAT128_VERSION to GLIBC_2.27. Symbols __* remain in sysdeps/ieee754/float128/Versions; those symbols should be present only once per floating-point format, not once per type. Note that if any platforms currently lacking support for a type with binary128 format get glibc support for such a type in future (whether only as _Float128, or also as a new long double format), and new libm functions (present for all types) have been added by then, additional macros will be needed to allow such functions to get a version of the form "GLIBC_2.28 if the platform had _Float128 support by then, or the later version at which that platform had _Float128 support added". This is not however a preexisting condition, but would have applied equally to the existing support for _Float128 as an ABI-distinct type. New all-type libm functions should just be added to the appropriate symbol version (currently GLIBC_2.27) for all types, with such special-case handling for _Float128 versions (and _Float64x as well in future) waiting until someone actually wants to add support for _Float128 to an existing platform after a release in which that platform and a post-2.26 libm function had support but that platform lacked _Float128 support. Tested with build-many-glibcs.py that installed stripped shared libraries are unchanged by this patch. Also tested in conjunction with the remaining changes to enable float128 aliases. * sysdeps/generic/float128-abi.h: New file. * sysdeps/ieee754/float128/Versions (FLOAT128_VERSION): Move non-__prefixed symbols to .... * math/Versions: ... here. Include <float128-abi.h>. * stdlib/Versions ... and here. Include <float128-abi.h>
* Do not use wildcard symbol names for public versions in Versions files.Joseph Myers2017-04-201-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As noted in <https://sourceware.org/ml/libc-alpha/2012-12/msg00240.html>, stdlib/Versions and wcsmbs/Versions list some functions as __strto*_internal and __wcsto*_internal rather than explicitly listing the symbols to be exported (so any new internal function matching one of those patterns would be wrongly added to version GLIBC_2.0), which seems like a bad idea. This patch changes those files to list the exported symbols explicitly. There are still entries in sysdeps/nacl/Versions for __nacl_irt_*, but as GLIBC_PRIVATE symbols that seems less significant. Tested with build-many-glibcs.py that installed stripped shared libraries are unchanged by the patch. * stdlib/Versions (__strtod_internal): List explicitly, not as wildcard. (__strtof_internal): Likewise. (__strtold_internal): Likewise. (__strtol_internal): Likewise. (__strtoll_internal): Likewise. (__strtoul_internal): Likewise. (__strtoull_internal): Likewise. (__strtoq_internal): Likewise. (__strtouq_internal): Likewise. * wcsmbs/Versions (__wcstod_internal): Likewise. (__wcstof_internal): Likewise. (__wcstold_internal): Likewise. (__wcstol_internal): Likewise. (__wcstoll_internal): Likewise. (__wcstoul_internal): Likewise. (__wcstoull_internal): Likewise.
* Add getentropy, getrandom, <sys/random.h> [BZ #17252]Florian Weimer2016-12-121-0/+1
|
* Add strfromd, strfromf, and strfroml functionsGabriel F. T. Gomes2016-10-251-0/+4
| | | | | | | ISO/IEC TS 18661-1 adds several functions in the strfrom family to stdlib. This patch adds strfromd, strfromf, and strfroml. This is being done in preparation for the new floating-point type, float128. The added functions convert a floating-point value into a string, with configurable format.
* Bug 20198: quick_exit should not call destructors.Carlos O'Donell2016-06-061-0/+3
| | | | | | | | | | | | | | | | | | In C++11 18.5.12 says "Objects shall not be destroyed as a result of calling quick_exit." In C11 quick_exit is silent about thread object destruction. Therefore to make glibc C++ compliant we do not call any thread local destructors. A new regression test verifies the fix. I will note that C++11 18.5.3 makes it clear that C++ defines additional requirements for _Exit() to prevent it from executing destructors. Given that the point of _Exit() is to terminate the process immediately it makes sense the C and C++ should line up and avoid calling destructors. No failures. New regtest passes.
* Fix nan functions handling of payload strings (bug 16961, bug 16962).Joseph Myers2015-12-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The nan, nanf and nanl functions handle payload strings by doing e.g.: if (tagp[0] != '\0') { char buf[6 + strlen (tagp)]; sprintf (buf, "NAN(%s)", tagp); return strtod (buf, NULL); } This is an unbounded stack allocation based on the length of the argument. Furthermore, if the argument starts with an n-char-sequence followed by ')', that n-char-sequence is wrongly treated as significant for determining the payload of the resulting NaN, when ISO C says the call should be equivalent to strtod ("NAN", NULL), without being affected by that initial n-char-sequence. This patch fixes both those problems by using the __strtod_nan etc. functions recently factored out of strtod etc. for that purpose, with those functions being exported from libc at version GLIBC_PRIVATE. Tested for x86_64, x86, mips64 and powerpc. [BZ #16961] [BZ #16962] * math/s_nan.c (__nan): Use __strtod_nan instead of constructing a string on the stack for strtod. * math/s_nanf.c (__nanf): Use __strtof_nan instead of constructing a string on the stack for strtof. * math/s_nanl.c (__nanl): Use __strtold_nan instead of constructing a string on the stack for strtold. * stdlib/Versions (libc): Add __strtof_nan, __strtod_nan and __strtold_nan to GLIBC_PRIVATE. * math/test-nan-overflow.c: New file. * math/test-nan-payload.c: Likewise. * math/Makefile (tests): Add test-nan-overflow and test-nan-payload.
* C++11 thread_local destructors supportSiddhesh Poyarekar2013-02-181-0/+4
| | | | | | | | | | | This feature is specifically for the C++ compiler to offload calling thread_local object destructors on thread program exit, to glibc. This is to overcome the possible complication of destructors of thread_local objects getting called after the DSO in which they're defined is unloaded by the dynamic linker. The DSO is marked as 'unloadable' if it has a constructed thread_local object and marked as 'unloadable' again when all the constructed thread_local objects defined in it are destroyed.
* Rename __secure_getenv to secure_getenvFlorian Weimer2012-07-251-1/+6
|
* x86: Add support for frame pointer less mcountAndi Kleen2010-08-071-0/+3
|
* Preserve message printed before abort.Ulrich Drepper2009-06-151-0/+2
| | | | | | | The terminal output etc is not visible in a core file. The new libc-internal variable __abort_msg will point to a string with the message which has been printed before the abort in case abort is called from inside libc. BZ #10217
* * stdlib/Makefile (routines): Add quick_exit, at_quick_exit, andUlrich Drepper2009-03-081-0/+3
| | | | | | | | | | | | | | | | | | | | | cxa_at_quick_exit. (static-only-routines): Add at_quick_exit. * stdlib/Versions: Export quick_exit and __cxa_at_quick_exit for GLIBC_2.10. * stdlib/quick_exit.c: New file. * stdlib/at_quick_exit.c: New file. * stdlib/cxa_at_quick_exit.c: New file. * stdlib/cxa_atexit.c (__cxa_atexit): Move body to new function. Call it appropriately. (__internal_atexit): New function. (__new_exitfn): Now takes parameter to point to the list to use. * stdlib/cxa_finalize.c: Remove quick_exit handlers, don't call them. * stdlib/exit.c (__run_exit_handlers): New function. Split from... (exit): ...here. Just call __run_exit_handlers appropriately. * stdlib/exit.h: Declare __quick_exit_funcs, __run_exit_handlers, __internal_atexit, __cxa_at_quick_exit. Adjust __new_exitfn. * stdlib/on_exit.c: Adjust call to __new_exitfn. * stdlib/stdlib.h: Declare at_quick_exit and quick_exit.
* * stdlib/stdlib.h: Define __compar_d_fn_t. Declare qsort_r.Ulrich Drepper2007-11-131-0/+3
| | | | | | | | | | | | * include/stdlib.h: Add hidden_proto for qsort_t and adjust protoype for _quicksort. * stdlib/msort.c (qsort): Now a wrapper around qsort_r. (qsort_r): Renamed from qsort. Take additional parameter and pass it on as third parameter to compare function and _quicksort. * stdlib/qsort.c (_quicksort): Take additional parameter and pass on to the compare function. * stdlib/Versions [libc] (GLIBC_2.8): Add qsort_r. * Versions.def: Add GLIBC_2.8 for libc.
* Update.Ulrich Drepper2004-05-031-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2004-05-03 Jakub Jelinek <jakub@redhat.com> * sysdeps/unix/bsd/bits/fcntl.h (F_SETOWN, F_GETOWN): Define if __USE_BSD or __USE_UNIX98. * sysdeps/unix/bsd/ultrix4/bits/fcntl.h (F_SETOWN, F_GETOWN): Likewise. * sysdeps/unix/bsd/bsd4.4/bits/fcntl.h (F_SETOWN, F_GETOWN): Likewise. * sysdeps/unix/bsd/sun/sunos4/bits/fcntl.h (F_SETOWN, F_GETOWN): Likewise. * sysdeps/unix/common/bits/fcntl.h (F_SETOWN, F_GETOWN): Likewise. * sysdeps/unix/sysv/aix/bits/fcntl.h (F_SETOWN, F_GETOWN): Likewise. * sysdeps/unix/sysv/irix4/bits/fcntl.h (F_SETOWN, F_GETOWN): Likewise. * sysdeps/unix/sysv/linux/alpha/bits/fcntl.h (F_SETOWN, F_GETOWN): Likewise. * sysdeps/unix/sysv/linux/s390/bits/fcntl.h (F_SETOWN, F_GETOWN): Likewise. * sysdeps/unix/sysv/linux/cris/bits/fcntl.h (F_SETOWN, F_GETOWN): Likewise. *sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h (F_SETOWN, F_GETOWN): Likewise. * sysdeps/unix/sysv/linux/sparc/bits/fcntl.h (F_SETOWN, F_GETOWN): Likewise. * sysdeps/unix/sysv/linux/mips/bits/fcntl.h (F_SETOWN, F_GETOWN): Likewise. * sysdeps/unix/sysv/linux/sh/bits/fcntl.h (F_SETOWN, F_GETOWN): Likewise. * sysdeps/unix/sysv/linux/i386/bits/fcntl.h (F_SETOWN, F_GETOWN): Likewise. * sysdeps/unix/sysv/linux/m68k/bits/fcntl.h (F_SETOWN, F_GETOWN): Likewise. * sysdeps/unix/sysv/linux/ia64/bits/fcntl.h (F_SETOWN, F_GETOWN): Likewise. * sysdeps/unix/sysv/linux/arm/bits/fcntl.h (F_SETOWN, F_GETOWN): Likewise. * sysdeps/unix/sysv/linux/hppa/bits/fcntl.h (F_SETOWN, F_GETOWN): Likewise. * sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h (F_SETOWN, F_GETOWN): Likewise. * sysdeps/generic/bits/fcntl.h (F_SETOWN, F_GETOWN): Likewise. * sysdeps/mach/hurd/bits/fcntl.h (F_SETOWN, F_GETOWN): Likewise. * io/sys/stat.h (S_ISSOCK, S_IFSOCK): Likewise. 2004-05-01 Jakub Jelinek <jakub@redhat.com> * posix/Versions (libc): Remove __libc_wait, __libc_waitpid, __libc_pause, __libc_nanosleep, __libc_pread, __libc_pread64, __libc_pwrite64, __waitid and __pselect @@GLIBC_PRIVATE. * stdlib/Versions (libc): Remove __on_exit@@GLIBC_PRIVATE. * sysdeps/unix/sysv/linux/Versions (libc): Remove __libc_sigaction@@GLIBC_PRIVATE. * sysdeps/unix/sysv/linux/x86_64/Versions (libc): Remove __modify_ldt@@GLIBC_PRIVATE. * socket/Versions (libc): Remove __libc_accept, __libc_send, __libc_recvfrom, __libc_recvmsg, __libc_sendmsg, __libc_recv, __libc_sendto and __libc_connect @@GLIBC_PRIVATE. * stdio-common/Versions (libc): Remove _itoa_upper_digits@@GLIBC_PRIVATE. * resolv/Versions (libresolv): Remove __ns_samename@@GLIBC_PRIVATE. * misc/Versions (libc): Remove __libc_fsync, __libc_msync, __libc_readv and __libc_writev @@GLIBC_PRIVATE. * termios/Versions (libc): Remove __libc_tcdrain@@GLIBC_PRIVATE. * io/Versions (libc): Remove __libc_open, __libc_close, __libc_read, __libc_write, __libc_lseek, __libc_fcntl, __libc_open64 and __libc_lseek64 @@GLIBC_PRIVATE. 2004-04-30 Jakub Jelinek <jakub@redhat.com> * elf/dl-load.c (open_verify): Move e_phentsize check after e_type check. 2004-04-29 Steven Munroe <sjmunroe@us.ibm.com> * sysdeps/powerpc/powerpc64/fpu/s_ceil.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_ceilf.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_floor.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_floorf.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_llrint.c: Removed. * sysdeps/powerpc/powerpc64/fpu/s_llrint.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_llrintf.c: Removed. * sysdeps/powerpc/powerpc64/fpu/s_llrintf.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_llround.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_llroundf.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_lround.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_lroundf.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_rint.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_rintf.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_round.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_roundf.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_trunc.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_truncf.S: New file. * math/test-misc.c [LDBL_MANT_DIG == 106](main): Correct LDBL_MAX mantissa for AIX long double format. * misc/qefgcvt.c [LDBL_MANT_DIG == 106] (NDIGIT_MAX): Define for AIX long double format. * misc/qefgcvt_r.c [LDBL_MANT_DIG == 106] (NDIGIT_MAX): Likewise. * stdlib/fpioconst.c [!__NO_LONG_DOUBLE_MATH && __LDBL_MAX_EXP__>1024] (_fpioconst_pow10): AIX long double format has same exponent range as double. * stdlib/fpioconst.h [!__NO_LONG_DOUBLE_MATH && __LDBL_MAX_EXP__>1024] (LDBL_MAX_10_EXP_LOG): AIX long double format has same exponent range as double. 2004-04-23 Art Haas <ahaas@airmail.net> * sysdeps/unix/sysv/linux/kernel-features.h: Add 'defined'.
* Update.Ulrich Drepper2002-07-111-0/+4
| | | | | | | | | 2002-07-11 Ulrich Drepper <drepper@redhat.com> * Versions.def (libc): Add GLIBC_2.3. * stdlib/Versions [libc] (GLIBC_2.3): Add realpath. * stdlib/canonicalize.c: Add compatibility version for realpath and make new code available in GLIBC_2.3.
* Update.Ulrich Drepper2002-02-281-1/+4
| | | | | | | 2002-02-28 Ulrich Drepper <drepper@redhat.com> * login/login.c (login): Always initialize ut_line field [PR libc/2991].
* Update.Ulrich Drepper2002-02-191-2/+2
| | | | | | 2002-02-19 Ulrich Drepper <drepper@redhat.com.> * stdlib/Versions: Move __on_exit to GLIBC_PRIVATE.
* Update.Ulrich Drepper2002-02-011-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-02-01 Jakub Jelinek <jakub@redhat.com> * Versions.def (libc): Add GLIBC_PRIVATE. (libdb, libnss_db, libdb1): Remove. (libnss_compat, libnss_dns, libnss_files, libnss_hesiod, libnss_nis, libnss_nisplus): Move all symbols to GLIBC_PRIVATE. (libpthread): Add GLIBC_PRIVATE. (libresolv): Likewise, remove GLIBC_2.1. (ld): Add GLIBC_PRIVATE, remove GLIBC_2.1.1, GLIBC_2.2, GLIBC_2.2.1, GLIBC_2.2.3, GLIBC_2.3. * catgets/Versions (__open_catalog): Move to GLIBC_PRIVATE. * elf/Versions (_dl_open, _dl_close, _dl_addr, _dl_init_first, _dl_sym, _dl_vsym): Likewise. (__libc_enable_secure, __libc_stack_end, _dl_argv, _dl_catch_error, _dl_check_all_versions, _dl_check_map_versions, _dl_debug_initialize, _dl_debug_printf, _dl_debug_state, _dl_dst_count, _dl_dst_substitute, _dl_init, _dl_lookup_symbol, _dl_lookup_symbol_skip, _dl_lookup_versioned_symbol, _dl_lookup_versioned_symbol_skip, _dl_map_object, _dl_map_object_deps, _dl_out_of_memory, _dl_relocate_object, _dl_signal_error, _dl_start_profile, _dl_starting_up, _dl_sysdep_start, _dl_unload_cache, _rtld_global): Likewise. (_dl_object_relocation_scope): Remove. * hesiod/Versions: Move all symbols to GLIBC_PRIVATE. * iconv/Versions (__gconv_alias_db, __gconv_modules_db, __gconv_cache): Move to GLIBC_PRIVATE. * inet/Versions (__internal_endnetgrent, __internal_getnetgrent_r, __internal_setnetgrent): Likewise. * io/Versions (__libc_open, __libc_close, __libc_read, __libc_write, __libc_lseek, __libc_fcntl, __libc_open64, __libc_lseek64): Likewise. * locale/Versions (__collate_element_hash, __collate_element_strings, __collate_symbol_classes, __collate_symbol_hash, __collate_symbol_strings, _nl_current_LC_COLLATE, _nl_current_LC_CTYPE): Likewise. * misc/Versions (__libc_fsync, __libc_msync): Likewise. * nis/Versions (libnss_compat): Move all symbols to GLIBC_PRIVATE. (libnss_nis, libnss_nisplus): Likewise. * nss/Versions (_nss_files_parse_grent, _nss_files_parse_pwent, _nss_files_parse_spent): Move to GLIBC_PRIVATE. (libnss_files): Move all symbols to GLIBC_PRIVATE. * posix/Versions (__libc_wait, __libc_waitpid, __libc_pause, __libc_nanosleep, __libc_fork, __libc_pread, __libc_pread64, __libc_pwrite, __libc_pwrite64): Move to GLIBC_PRIVATE. * resolv/Versions (__gai_sigqueue, __ns_name_unpack, __ns_name_ntop, __ns_get16, __ns_samename): Likewise. (libnss_dns): Move all symbols to GLIBC_PRIVATE. * setjmp/Versions (__libc_longjmp, __libc_siglongjmp): Move to GLIBC_PRIVATE. * socket/Versions (__libc_accept, __libc_send, __libc_recvfrom, __libc_recvmsg, __libc_sendmsg, __libc_recv, __libc_sendto, __libc_connect): Likewise. * stdio-common/Versions (_itoa_lower_digits, _itoa_upper_digits): Likewise. * stdlib/Versions (__libc_system): Likewise. * sunrpc/Versions (__rpc_thread_destroy): Likewise. * sysdeps/hppa/Versions: Move all symbols to GLIBC_PRIVATE. * sysdeps/ia64/fpu/Versions: Likewise. * sysdeps/ia64/Versions: Likewise. * sysdeps/unix/sysv/linux/ia64/Versions: Likewise. * sysdeps/unix/sysv/linux/i386/Versions (__modify_ldt): Move to GLIBC_PRIVATE. * sysdeps/unix/sysv/linux/x86_64/Versions (__modify_ldt): Likewise. * sysdeps/unix/sysv/linux/Versions (__syscall_rt_sigqueueinfo, __libc_sigaction): Likewise. * termios/Versions (__libc_tcdrain): Likewise. * misc/sys/cdefs (__attribute_noinline__): Define. * elf/dl-lookup.c (_dl_do_lookup, _dl_do_lookup_versioned): Add __attribute_noinline__. * elf/Makefile (rtld-routines): Add dl-xstat64, dl-fxstat64. * elf/dl-xstat64.c: New file. * elf/dl-fxstat64.c: New file. * sysdeps/unix/sysv/linux/fxstat64.c: If RTLD_STAT64 is defined, don't export __fxstat64 at multiple versions. * sysdeps/unix/sysv/linux/lxstat64.c: Similarly. * sysdeps/unix/sysv/linux/xstat64.c: Similarly.
* Remove __new_exitfn.Ulrich Drepper2001-03-051-4/+0
|
* Update.Ulrich Drepper2001-02-261-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-02-26 Ulrich Drepper <drepper@redhat.com> * dlfcn/Makefile (distribute): Add modatexit.c and modcxaatexit.c. (tests): Add tstatexit and tstcxaatexit. (module-names): Add modatexit and modcxaatexit. Add rules to build and run tstatexit and tstcxaatexit. * dlfcn/modatexit.c: New file. * dlfcn/modcxaatexit.c: New file. * dlfcn/tstatexit.c: New file. * dlfcn/tstcxaatexit.c: New file. * io/Makefile: Pass -DHAVE_DOT_HIDDEN to stat and mknod functions if .hidden is available. * io/stat.c: If .hidden is available use it to avoid exporting functions. * io/fstat.c: Likewise. * io/lstat.c: Likewise. * io/stat64.c: Likewise. * io/fstat64.c: Likewise. * io/lstat64.c: Likewise. * sysdeps/generic/mknod.c: Likewise. * malloc/mtrace.c: Use __cxa_atexit and not atexit. * sysdeps/generic/bb_init_func.c: Likewise. * sysdeps/generic/libc-start.c: Likewise. * stdlib/atexit.c (__new_exitfn): Move to cxa_atexit.c. (atexit): Implement using __cxa_atexit. Use .hidden if availble to avoid exporting atexit. * stdlib/cxa_atexit.c (__new_exitfn): Moved to here from atexit.c. * stdlib/Versions: Export __new_exitfn for GLIBC_2.2.3. * stdlib/Makefile (routines): Add old_atexit. (static-only-routines): Add atexit. Pass -DHAVE_DOT_HIDDEN for atexit.c if .hidden is available. * stdlib/old_atexit.c: New file. * intl/Makefile: Remove bogus endif.
* Update.Ulrich Drepper2001-01-121-4/+0
| | | | | | | | | | | | | | | 2001-01-11 Jakub Jelinek <jakub@redhat.com> * stdlib/cxa_atexit.c (__cxa_atexit): Cast to (void *, int) func. * stdlib/cxa_finalize.c (__cxa_finalize): Add hidden second argument. * stdlib/cxa_on_exit.c: Remove. * stdlib/Makefile: Revert last patch. * stdlib/Versions: Likewise. * include/stdlib.h: Likewise. * stdlib/exit.h: Revert last patch. (struct exit_function): Add second argument to cxa fn. * stdlib/exit.c: Revert last patch. (exit): Add hidden second argument.
* Update.Ulrich Drepper2001-01-111-0/+4
| | | | | | | | | | | | | | 2001-01-11 Ulrich Drepper <drepper@redhat.com> * stdlib/Makefile (routines): Add cxa_on_exit. * stdlib/Versions [libc] (GLIBC_2.2.1): Add __cxa_on_exit. * stdlib/cxa_on_exit.c: New file. * include/stdlib.h: Add prototype for __cxa_on_exit. * stdlib/exit.c: Handle ef_cxa2. * stdlib/exit.h (enum): Add ef_cxa2. (struct exit_function): Add cxa2. * Versions.def [ld]: Add GLIBC_2.2.1.
* Update.Ulrich Drepper1999-12-271-0/+4
| | | | | | | | | | | | | | | 1999-12-17 Andreas Jaeger <aj@suse.de> * stdlib/Versions: Export __cxa_atexit and __cxa_finalize. 1999-12-16 Mark Mitchell <mark@codesourcery.com> * stdlib/Makefile (routines): Add cxa_atexit and cxa_finalize. * stdlib/exit.h (flavor): Add ef_cxa. (exit_function): Add cxa variant. * stdlib/exit.c (exit): Handle ef_cxa exit functions. * stdlib/cxa_atexit.c: New file. * stdlib/cxa_finalize.c: New file.
* Update.Ulrich Drepper1999-02-071-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1999-02-07 Ulrich Drepper <drepper@cygnus.com> * Versions.def: New version GLIBC_2.1.1 for libc. * stdlib/Versions: Add _Exit, imaxdiv, and imaxdiv to GLIBC_2.1.1. * stdlib/labs.c: Moved to... * sysdeps/generic/labs.c: ...here. * stdlib/llabs.c: Moved to... * sysdeps/generic/llabs.c: ...here. * stdlib/stdlib.h: Allow definition of ldiv_t and lldiv_t in other header. Declare _Exit. * sysdeps/generic/_exit.c: Add alias _Exit. * sysdeps/mach/hurd/_exit.c: Likewise. * sysdeps/standalone/i386/force_cpu386/_exit.c: Likewise. * sysdeps/standalone/i960/nindy960/_exit.c: Likewise. * sysdeps/standalone/m68k/m68020/mvme136/_exit.c: Likewise. * sysdeps/unix/_exit.c: Likewise. * sysdeps/wordsize-32/inttypes.h: Define imaxdiv_t and declare imaxdiv and imaxabs. Declare lldiv_t if necessary. * sysdeps/wordsize-64/inttypes.h: Likewise. * sysdeps/wordsize-32/llabs.c: New file. * sysdeps/wordsize-32/lldiv.c: New file. * sysdeps/wordsize-64/labs.c: New file. * sysdeps/wordsize-64/ldiv.c: New file. * manual/arith.texi: Document imaxabs, imaxdiv_t, and imaxdiv. * manual/startup.texi: Document _Exit. 1999-02-07 Andreas Jaeger <aj@arthur.rhein-neckar.de> * nscd/cache.c: Include <arpa/inet.h> for inet_ntop.
* Update.Ulrich Drepper1998-07-021-0/+86
1998-07-02 21:51 Ulrich Drepper <drepper@cygnus.com> * Makeconfig: Define list of subdirs as all-subdirs and make subdirs a copy. * Makefile: Add rules to generate map files. (distribute): Remove libc.map, add Versions.def and versions.awk. * Makerules: Change rules to find map files on common-objpfx. * elf/Makefile: Likewise. * md5-crypt/Makefile: Likewise. * nis/Makefile (libnsl-map): Remove. * Versions.def: New file. * versions.awk: New file. * argp/Versions: New file. * assert/Versions: New file. * catgets/Versions: New file. * csu/Versions: New file. * ctype/Versions: New file. * db/Versions: New file. * debug/Versions: New file. * dirent/Versions: New file. * elf/Versions: New file. * gmon/Versions: New file. * grp/Versions: New file. * hesiod/Versions: New file. * hurd/Versions: New file. * iconv/Versions: New file. * inet/Versions: New file. * intl/Versions: New file. * io/Versions: New file. * libio/Versions: New file. * linuxthreads/Versions: New file. * locale/Versions: New file. * login/Versions: New file. * malloc/Versions: New file. * math/Versions: New file. * md5-crypt/Versions: New file. * misc/Versions: New file. * nis/Versions: New file. * nss/Versions: New file. * posix/Versions: New file. * pwd/Versions: New file. * resolv/Versions: New file. * resource/Versions: New file. * rt/Versions: New file. * setjmp/Versions: New file. * shadow/Versions: New file. * signal/Versions: New file. * socket/Versions: New file. * stdio/Versions: New file. * stdio-common/Versions: New file. * stdlib/Versions: New file. * streams/Versions: New file. * string/Versions: New file. * sunrpc/Versions: New file. * sysdeps/alpha/Versions: New file. * sysdeps/alpha/fpu/Versions: New file. * sysdeps/i386/Versions: New file. * sysdeps/sparc/Versions: New file. * sysdeps/unix/sysv/Versions: New file. * sysdeps/unix/sysv/linux/Versions: New file. * sysdeps/unix/sysv/linux/alpha/Versions: New file. * sysdeps/unix/sysv/linux/i386/Versions: New file. * sysdeps/unix/sysv/linux/mips/Versions: New file. * sysvipc/Versions: New file. * termios/Versions: New file. * time/Versions: New file. * wcsmbs/Versions: New file. * wctype/Versions: New file. * libc.map: Removed. * db/libdb.map: Removed. * elf/libdl.map: Removed. * hesiod/libnss_hesiod.map: Removed. * hurd/libhurduser.map: Removed. * hurd/libmachuser.map: Removed. * linuxthreads/libpthread.map: Removed. * locale/libBrokenLocale.map: Removed. * login/libutil.map: Removed. * math/libm.map: Removed. * md5-crypt/libcrypt.map: Removed. * nis/libnsl.map: Removed. * nis/libnsl_compat.map: Removed. * nis/libnss_nis.map: Removed. * nis/libnss_nisplus.map: Removed. * nss/libnss_db.map: Removed. * nss/libnss_files.map: Removed. * resolv/libnss_dns.map: Removed. * resolv/libresolv.map: Removed. * rt/librt.map: Removed. * elf/dl-load.c (fillin_rpath): Fix test for trusted directory. Fix typos. * elf/rtld.c (process_dl_debug): Recognize 'all'. (process_envvars): LD_BIND_NOW must be followed by y, Y, or 1. * sysdeps/generic/elf/backtracesyms.c: Allocate string memory of correct size. * sysdeps/unix/sysv/linux/getsysstats.c (get_proc_path): Fix typo in comment.