about summary refs log tree commit diff
path: root/manual
Commit message (Collapse)AuthorAgeFilesLines
...
* strftime: Set the default width of "%Ey" to 2 [BZ #23758]TAMUKI Shoichi2019-01-241-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Japanese locales, strftime's alternative year format (%Ey) produces a year numbered within a time period called an _era_. A new era typically begins when a new emperor is enthroned. The result of "%Ey" is therefore usually a one- or two-digit number. Many programs that display Japanese era dates assume that the era year is two digits wide. To improve how these programs display dates during the first nine years of a new era, change "%Ey" to pad one- digit numbers on the left with a zero. This change applies to all locales. It is expected to be harmless for other locales that use the alternative year format (e.g. lo_LA and th_TH, in which "%Ey" produces the year of the Buddhist calendar) as those calendars' year numbers are already more than two digits wide, and this is not expected to change. This change needs to be in place before 2019-05-01 CE, as a new era is scheduled to begin on that date. Reviewed-by: Zack Weinberg <zackw@panix.com> Reviewed-by: Rafal Luzynski <digitalfreak@lingonborough.com> ChangeLog: [BZ #23758] * manual/time.texi (strftime): Document "%Ey". * time/strftime_l.c (__strftime_internal): Set the default width padding with zero of "%Ey" to 2.
* manual: Fix the wording to "alternative" rather than "alternate"TAMUKI Shoichi2019-01-181-3/+3
| | | | | | | ChangeLog: * manual/time.texi (strftime): Fix the wording to "alternative" rather than "alternate".
* [AArch64] Add ifunc support for AresWilco Dijkstra2019-01-091-1/+1
| | | | | | | | | | | | | | | Add Ares to the midr_el0 list and support ifunc dispatch. Since Ares supports 2 128-bit loads/stores, use Neon registers for memcpy by selecting __memcpy_falkor by default (we should rename this to __memcpy_simd or similar). * manual/tunables.texi (glibc.cpu.name): Add ares tunable. * sysdeps/aarch64/multiarch/memcpy.c (__libc_memcpy): Use __memcpy_falkor for ares. * sysdeps/unix/sysv/linux/aarch64/cpu-features.h (IS_ARES): Add new define. * sysdeps/unix/sysv/linux/aarch64/cpu-features.c (cpu_list): Add ares cpu.
* manual: Use @code{errno} instead of @var{errno} [BZ #24063]Florian Weimer2019-01-0711-31/+31
| | | | | | @var is intended for placeholders (such as function parameters). Actual variables need to use @code because @var causes upper-case output, resulting in a different C identifier.
* Fix the manual for old texinfoSzabolcs Nagy2019-01-041-4/+4
| | | | | | | | | | | | | | | | | | | | | Installing the manual fails with texinfo 4.13: /S/manual/maint.texi:288: Unknown command `lbracechar'. /S/manual/maint.texi:288: Misplaced {. /S/manual/maint.texi:288: Misplaced }. /S/manual/maint.texi:290: Unknown command `rbracechar'. /S/manual/maint.texi:290: Misplaced {. /S/manual/maint.texi:290: Misplaced }. /S/manual/maint.texi:302: Unknown command `lbracechar'. /S/manual/maint.texi:302: Misplaced {. /S/manual/maint.texi:302: Misplaced }. /S/manual/maint.texi:305: Unknown command `rbracechar'. /S/manual/maint.texi:305: Misplaced {. /S/manual/maint.texi:305: Misplaced }. makeinfo: Removing output file `/B/manual/libc.info' due to errors; use --force to preserve. make[2]: *** [Makefile:142: /B/manual/libc.info] Error 1 * manual/maint.texi: Use @{ and @}.
* Update miscellaneous files from upstream sources.Joseph Myers2019-01-011-65/+6
| | | | | | | | | | | | | | This patch updates some miscellaneous files from their upstream sources (thereby bringing in copyright date updates for some of those files). Tested for x86_64, including "make pdf". * manual/texinfo.tex: Update to version 2018-12-28.17 with trailing whitespace removed. * scripts/config.guess: Update to version 2019-01-01. * scripts/config.sub: Update to version 2019-01-01. * scripts/move-if-change: Update from gnulib.
* Update copyright dates not handled by scripts/update-copyrights.Joseph Myers2019-01-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I've updated copyright dates in glibc for 2019. This is the patch for the changes not generated by scripts/update-copyrights and subsequent build / regeneration of generated files. Please remember to include 2019 in the dates for any new files added in future (which means updating any existing uncommitted patches you have that add new files to use the new copyright dates in them). * NEWS: Update copyright dates. * catgets/gencat.c (print_version): Likewise. * csu/version.c (banner): Likewise. * debug/catchsegv.sh: Likewise. * debug/pcprofiledump.c (print_version): Likewise. * debug/xtrace.sh (do_version): Likewise. * elf/ldconfig.c (print_version): Likewise. * elf/ldd.bash.in: Likewise. * elf/pldd.c (print_version): Likewise. * elf/sotruss.sh: Likewise. * elf/sprof.c (print_version): Likewise. * iconv/iconv_prog.c (print_version): Likewise. * iconv/iconvconfig.c (print_version): Likewise. * locale/programs/locale.c (print_version): Likewise. * locale/programs/localedef.c (print_version): Likewise. * login/programs/pt_chown.c (print_version): Likewise. * malloc/memusage.sh (do_version): Likewise. * malloc/memusagestat.c (print_version): Likewise. * malloc/mtrace.pl: Likewise. * manual/libc.texinfo: Likewise. * nptl/version.c (banner): Likewise. * nscd/nscd.c (print_version): Likewise. * nss/getent.c (print_version): Likewise. * nss/makedb.c (print_version): Likewise. * posix/getconf.c (main): Likewise. * scripts/test-installation.pl: Likewise. * sysdeps/unix/sysv/linux/lddlibc4.c (main): Likewise.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2019-01-0146-46/+46
| | | | | | | * All files with FSF copyright notices: Update copyright dates using scripts/update-copyrights. * locale/programs/charmap-kw.h: Regenerated. * locale/programs/locfile-kw.h: Likewise.
* Require GCC 5 or later to build glibc (bug 23993).Joseph Myers2018-12-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | We know that building glibc with GCC 4.9 is broken on various platforms (bug 23993). As it's more than a year since we last increased the minimum GCC version to build glibc, this patch changes the requirement to be GCC 5 or later (indeed, based on 4.9 having been required for building 2.26, it would be consistent in terms of timing to require GCC 6 or later from the 2.30 release onwards). It deliberately just updates the configure test and corresponding documentation, leaving removal of no-longer-needed __GNUC_PREREQ tests for a separate patch. In the NEWS entry, the requirement for a newer GCC version for powerpc64le is reiterated (as in the entry for the 4.9 requirement in 2.26) to avoid suggesting the version requirement there has gone down. (If that version goes up further as part of support for binary128 long double, of course the wording would change at that time.) Tested for x86_64. [BZ #23993] * configure.ac (libc_cv_compiler_ok): Require GCC 5 or later. * configure: Regenerated. * manual/install.texi (Tools for Compilation): Update minimum GCC version. * INSTALL: Regenerated.
* manual/examples: Remove redundant "if not"H.J. Lu2018-12-2041-41/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace "if not, if not," with "if not,". * manual/examples/add.c: Remove redundant "if not". * manual/examples/argp-ex1.c: Likewise. * manual/examples/argp-ex2.c: Likewise. * manual/examples/argp-ex3.c: Likewise. * manual/examples/argp-ex4.c: Likewise. * manual/examples/atexit.c: Likewise. * manual/examples/db.c: Likewise. * manual/examples/dir.c: Likewise. * manual/examples/dir2.c: Likewise. * manual/examples/execinfo.c: Likewise. * manual/examples/filecli.c: Likewise. * manual/examples/filesrv.c: Likewise. * manual/examples/fmtmsgexpl.c: Likewise. * manual/examples/genpass.c: Likewise. * manual/examples/inetcli.c: Likewise. * manual/examples/inetsrv.c: Likewise. * manual/examples/isockad.c: Likewise. * manual/examples/longopt.c: Likewise. * manual/examples/memopen.c: Likewise. * manual/examples/memstrm.c: Likewise. * manual/examples/mkdirent.c: Likewise. * manual/examples/mkfsock.c: Likewise. * manual/examples/mkisock.c: Likewise. * manual/examples/mygetpass.c: Likewise. * manual/examples/pipe.c: Likewise. * manual/examples/popen.c: Likewise. * manual/examples/rprintf.c: Likewise. * manual/examples/search.c: Likewise. * manual/examples/select.c: Likewise. * manual/examples/setjmp.c: Likewise. * manual/examples/sigh1.c: Likewise. * manual/examples/sigusr.c: Likewise. * manual/examples/stpcpy.c: Likewise. * manual/examples/strdupa.c: Likewise. * manual/examples/strftim.c: Likewise. * manual/examples/subopt.c: Likewise. * manual/examples/swapcontext.c: Likewise. * manual/examples/termios.c: Likewise. * manual/examples/testopt.c: Likewise. * manual/examples/testpass.c: Likewise. * manual/examples/timeval_subtract.c: Likewise.
* locale: Rewrite locale/gen-translit.pl in PythonFlorian Weimer2018-12-181-4/+3
| | | | | | This commit does not change the generated output file. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* Fix __TIMERSIZE and @theglibcadj typosAlbert ARIBAUD (3ADEV)2018-12-181-1/+1
| | | | | | Fix following typos in parent commit: - ChangeLog: __TIMERSIZE should be __TIMESIZE - manual/maint.texi: @theglibcadj should be @glibcadj
* Y2038: add function __localtime64Albert ARIBAUD (3ADEV)2018-12-171-0/+125
| | | | | | | | | | | Tested with 'make check' on x86_64-linux-gnu and i686-linux.gnu. * include/time.h (__localtime64): Add. * manual/maint.texi: Document Y2038 symbol handling. * time/localtime.c (__localtime64): Add. [__TIMERSIZE != 64] (__localtime): Turn into a wrapper.
* manual: Document thread/task IDs for LinuxFlorian Weimer2018-12-142-18/+46
| | | | Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* Use gen-as-const.py to process .pysym files.Joseph Myers2018-12-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch eliminates the gen-py-const.awk variant of gen-as-const, switching to use of gnu-as-const.py (with a new --python option) to process .pysym files (i.e., to generate nptl_lock_constants.py), as the syntax of those files is identical to that of .sym files. Note that the generated nptl_lock_constants.py is *not* identical to the version generated by the awk script. Apart from the trivial changes (comment referencing the new script, and output being sorted), the constant FUTEX_WAITERS, PTHREAD_MUTEXATTR_FLAG_BITS, PTHREAD_MUTEXATTR_FLAG_PSHARED and PTHREAD_MUTEX_PRIO_CEILING_MASK are now output as positive rather than negative constants (on x86_64 anyway; maybe not necessarily on 32-bit systems): < FUTEX_WAITERS = -2147483648 --- > FUTEX_WAITERS = 2147483648 < PTHREAD_MUTEXATTR_FLAG_BITS = -251662336 < PTHREAD_MUTEXATTR_FLAG_PSHARED = -2147483648 --- > PTHREAD_MUTEXATTR_FLAG_BITS = 4043304960 > PTHREAD_MUTEXATTR_FLAG_PSHARED = 2147483648 < PTHREAD_MUTEX_PRIO_CEILING_MASK = -524288 --- > PTHREAD_MUTEX_PRIO_CEILING_MASK = 4294443008 This is because gen-as-const has a cast of the constant value to long int, which gen-py-const lacks. I think the positive values are more logically correct, since the constants in question are in fact unsigned in C. But to reliably produce gen-as-const.py output for constants that always (in C and Python) reflects the signedness of values with the high bit of "long int" set would mean more complicated logic needs to be used in computing values. The more correct positive values by themselves produce a failure of nptl/test-mutexattr-printers, because masking with ~PTHREAD_MUTEXATTR_FLAG_BITS & ~PTHREAD_MUTEX_NO_ELISION_NP now leaves a bit -1 << 32 in the Python value, resulting in a KeyError exception. To avoid that, places masking with ~ of one of the constants in question are changed to mask with 0xffffffff as well (this reflects how ~ in Python applies to an infinite-precision integer whereas ~ in C does not do any promotions beyond the width of int). Tested for x86_64. * scripts/gen-as-const.py (main): Handle --python option. * scripts/gen-py-const.awk: Remove. * Makerules (py-const-script): Use gen-as-const.py. ($(py-const)): Likewise. * nptl/nptl-printers.py (MutexPrinter.read_status_no_robust): Mask with 0xffffffff together with ~(PTHREAD_MUTEX_PRIO_CEILING_MASK). (MutexAttributesPrinter.read_values): Mask with 0xffffffff together with ~PTHREAD_MUTEXATTR_FLAG_BITS and ~PTHREAD_MUTEX_NO_ELISION_NP. * manual/README.pretty-printers: Update reference to gen-py-const.awk.
* Add getcpuH.J. Lu2018-12-071-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add #include <sched.h> int getcpu (unsigned int *cpu, unsigned int *node); to return currently used CPU and NUMA node. Tested on x86-64, x32 and i686 as well as with build-many-glibcs.py. * NEWS: Mention getcpu. * include/sched.h (__getcpu): New libc_hidden_proto. * manual/resource.texi: Document getcpu. * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add getcpu. * sysdeps/unix/sysv/linux/Versions (GLIBC_2.29): Add getcpu. * sysdeps/unix/sysv/linux/aarch64/libc.abilist: Add getcpu. * sysdeps/unix/sysv/linux/alpha/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/arm/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/hppa/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/i386/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/ia64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/microblaze/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.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/powerpc/powerpc32/fpu/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.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/riscv/rv64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/sh/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/x86_64/64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/bits/sched.h (getcpu): New prototype. * sysdeps/unix/sysv/linux/getcpu.c: New file. * sysdeps/unix/sysv/linux/tst-skeleton-affinity.c (test_size): Also check getcpu.
* Update miscellaneous files from upstream sources.Joseph Myers2018-12-061-5/+47
| | | | | | | | | | | | | | | This patch updates various miscellaneous files from their upstream sources. Tested for x86_64, including "make pdf". * manual/texinfo.tex: Update to version 2018-09-21.20 with trailing whitespace removed. * scripts/config.guess: Update to version 2018-11-28. * scripts/config.sub: Update to version 2018-11-28. * scripts/install-sh: Update to version 2018-03-11.20. * scripts/mkinstalldirs: Update to version 2018-03-07.03. * scripts/move-if-change: Update to version 2018-03-07 03:47.
* Mutex: Add pthread mutex tunablesKemi Wang2018-12-011-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch does not have any functionality change, we only provide a spin count tunes for pthread adaptive spin mutex. The tunable glibc.pthread.mutex_spin_count tunes can be used by system administrator to squeeze system performance according to different hardware capabilities and workload characteristics. The maximum value of spin count is limited to 32767 to avoid the overflow of mutex->__data.__spins variable with the possible type of short in pthread_mutex_lock (). The default value of spin count is set to 100 with the reference to the previous number of times of spinning via trylock. This value would be architecture-specific and can be tuned with kinds of benchmarks to fit most cases in future. I would extend my appreciation sincerely to H.J.Lu for his help to refine this patch series. * manual/tunables.texi (POSIX Thread Tunables): New node. * nptl/Makefile (libpthread-routines): Add pthread_mutex_conf. * nptl/nptl-init.c: Include pthread_mutex_conf.h (__pthread_initialize_minimal_internal) [HAVE_TUNABLES]: Call __pthread_tunables_init. * nptl/pthreadP.h (MAX_ADAPTIVE_COUNT): Remove. (max_adaptive_count): Define. * nptl/pthread_mutex_conf.c: New file. * nptl/pthread_mutex_conf.h: New file. * sysdeps/generic/adaptive_spin_count.h: New file. * sysdeps/nptl/dl-tunables.list: New file. * nptl/pthread_mutex_lock.c (__pthread_mutex_lock): Use max_adaptive_count () not MAX_ADAPTIVE_COUNT. * nptl/pthread_mutex_timedlock.c (__pthrad_mutex_timedlock): Likewise. Suggested-by: Andi Kleen <andi.kleen@intel.com> Reviewed-by: Carlos O'Donell <carlos@redhat.com> Signed-off-by: Kemi.wang <kemi.wang@intel.com>
* malloc: tcache double free checkDJ Delorie2018-11-201-0/+12
| | | | | | | | | | | | | * malloc/malloc.c (tcache_entry): Add key field. (tcache_put): Set it. (tcache_get): Likewise. (_int_free): Check for double free in tcache. * malloc/tst-tcfree1.c: New. * malloc/tst-tcfree2.c: New. * malloc/Makefile: Run the new tests. * manual/probes.texi: Document memory_tcache_double_free probe. * dlfcn/dlerror.c (check_free): Prevent double frees.
* Use STRFMON_LDBL_IS_DBL instead of __ldbl_is_dbl.Zack Weinberg2018-11-161-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | On platforms where long double used to have the same format as double, but later switched to a different format (alpha, s390, sparc, and powerpc), accessing the older behavior is possible and it happens via __nldbl_* functions (not on the API, but accessible from header redirection and from compat symbols). These functions write to the global flag __ldbl_is_dbl, which tells other functions that long double variables should be handled as double. This patch takes the first step towards removing this global flag and creates __vstrfmon_l_internal, which takes an explicit flags parameter. This change arguably makes the generated code slightly worse on architectures where __ldbl_is_dbl is never true; right now, on those architectures, it's a compile-time constant; after this change, the compiler could theoretically prove that __vstrfmon_l_internal was never called with a nonzero flags argument, but it would probably need LTO to do it. This is not performance critical code and I tend to think that the maintainability benefits of removing action at a distance are worth it. However, we _could_ wrap the runtime flag check with a macro that was defined to ignore its argument and always return false on architectures where __ldbl_is_dbl is never true, if people think the codegen benefits are important. Tested for powerpc and powerpc64le.
* Fix typo in the documentation of gcvtGabriel F. T. Gomes2018-11-011-1/+1
| | | | | | | In the description of gcvt, add missing closing parenthesis in the comparison with sprintf. * manual/arith.texi (gcvt): Add missing closing parenthesis.
* hurd: Fix errno* generationSamuel Thibault2018-10-311-0/+13
| | | | | | | | * sysdeps/mach/hurd/errnos.awk: Avoid printing errnos.d. * sysdeps/gnu/errlist.c (EIEIO): Move text to... * manual/errno.texi (EIEIO): ... here. * sysdeps/gnu/errlist.c (EIEIO): Regenerate. * sysdeps/mach/hurd/bits/errno.h: Regenerate.
* Patch to require Python 3.4 or later to build glibc.Joseph Myers2018-10-292-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes Python 3.4 or later a required tool for building glibc, so allowing changes of awk, perl etc. code used in the build and test to Python code without any such changes needing makefile conditionals or to handle older Python versions. This patch makes the configure test for Python check the version and give an error if Python is missing or too old, and removes makefile conditionals that are no longer needed. It does not itself convert any code from another language to Python, and does not remove any compatibility with older Python versions from existing scripts. Tested for x86_64. * configure.ac (PYTHON_PROG): Use AC_CHECK_PROG_VER. Set critic_missing for versions before 3.4. * configure: Regenerated. * manual/install.texi (Tools for Compilation): Document requirement for Python to build glibc. * INSTALL: Regenerated. * Rules [PYTHON]: Make code unconditional. * benchtests/Makefile [PYTHON]: Likewise. * conform/Makefile [PYTHON]: Likewise. * manual/Makefile [PYTHON]: Likewise. * math/Makefile [PYTHON]: Likewise.
* Use gen-libm-test.py to generate ulps table for manual.Joseph Myers2018-10-243-213/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch extends gen-libm-test.py to generate the ulps table for the manual, so meaning there is only a single ulps file parser needed and another Perl script is eliminated. As with the introduction of gen-libm-test.py, this is designed to generate exactly the same libm-err.texi as libm-err-tab.pl did. (gen-libm-test.py is still shorter in lines than the old gen-libm-test.pl even after this patch.) Note that this introduces a Python dependency for building the manual, which is thus noted in install.texi and NEWS. Tested building html / info / pdf versions of the manual. * math/gen-libm-test.py: Import os. (ALL_FLOATS_MANUAL): New constant. (ALL_FLOATS_SUFFIX): Likewise. (Ulps.all_functions): New function. (real_all_ulps): Likewise. (generate_err_table_sub): Likewise. (generate_err_table): Likewise. (main): Handle -s and -m options. * manual/libm-err-tab.pl: Remove. * manual/Makefile ($(objpfx)stamp-libm-err): Use gen-libm-test.py instead of libm-err-tab.pl. [$(PERL) != no]: Change condition to [$(if $(PYTHON),$(PERL),no) != no]. * manual/install.texi (Tools for Compilation): Document requirement for Python to build manual. * INSTALL: Regenerated.
* [manual] Job control is no longer optional.Zack Weinberg2018-10-172-29/+11
| | | | | | | | | | | | | | | Job control was made mandatory in POSIX.1-2001: compare <http://pubs.opengroup.org/onlinepubs/7990989775/xsh/unistd.h.html> with <http://pubs.opengroup.org/onlinepubs/009695399/basedefs/unistd.h.html>. Seventeen years later, we need not devote an entire manual @node to warning people that this was once an optional POSIX feature. * manual/job.texi (Job Control is Optional): Remove node, as job control has not been optional in quite some time. (Job Control): Mention briefly that systems older than POSIX.1-2001 might not support job control. * manual/conf.texi (_POSIX_JOB_CONTROL): Will always be defined on systems conforming to POSIX.1-2001.
* Don't build libnsl for new ABIsAndreas Schwab2018-09-241-0/+3
| | | | | | For architectures and ABIs that are added in version 2.29 or later the option --enable-obsolete-nsl is no longer available, and no libnsl compatibility library is built.
* Add --with-nonshared-cflags option to configureFlorian Weimer2018-08-171-0/+14
|
* Update install.texi documentation of uses of Perl and Python.Joseph Myers2018-08-131-37/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The install.texi documentation of uses of Perl and Python is substantially out of date. The description of Perl is "to test the installation" (which I interpret as referring to test-installation.pl), but it's used for more tests than that, and to build the manual, and to regenerate one file in the source tree. The description of Python is only for pretty-printer tests, but it's used for other tests / benchmarks as well (and for other internal uses such as updating Unicode data, for which we already require Python 3, but I think install.texi only needs to describe uses from the main glibc Makefiles). This patch updates the descriptions of what those tools are used for. The Python information (and information about other tools for testing pretty printers) was awkwardly in the middle of the general description of building and testing glibc, rather than with the rest of information about tools used in glibc build and test; this patch moves the information about those tools into the main list. Tested with regeneration of INSTALL as well as "make info" and "make pdf". * manual/install.texi (Configuring and compiling): Do not list tools used for testing pretty printers here. (Tools for Compilation): List Python, PExpect and GDB here. Update descriptions of uses of Perl and Python. * INSTALL: Regenerate.
* Add convenience target 'install-locale-files'.Carlos O'Donell2018-08-021-7/+24
| | | | | | | | | The convenience install target 'install-locale-files' is created to allow distributions to install all of the SUPPORTED locales as files instead of into the locale-archive. You invoke the new convenience target like this: make localedata/install-locale-files DESTDIR=<prefix>
* Rename the glibc.tune namespace to glibc.cpuSiddhesh Poyarekar2018-08-022-23/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The glibc.tune namespace is vaguely named since it is a 'tunable', so give it a more specific name that describes what it refers to. Rename the tunable namespace to 'cpu' to more accurately reflect what it encompasses. Also rename glibc.tune.cpu to glibc.cpu.name since glibc.cpu.cpu is weird. * NEWS: Mention the change. * elf/dl-tunables.list: Rename tune namespace to cpu. * sysdeps/powerpc/dl-tunables.list: Likewise. * sysdeps/x86/dl-tunables.list: Likewise. * sysdeps/aarch64/dl-tunables.list: Rename tune.cpu to cpu.name. * elf/dl-hwcaps.c (_dl_important_hwcaps): Adjust. * elf/dl-hwcaps.h (GET_HWCAP_MASK): Likewise. * manual/README.tunables: Likewise. * manual/tunables.texi: Likewise. * sysdeps/powerpc/cpu-features.c: Likewise. * sysdeps/unix/sysv/linux/aarch64/cpu-features.c (init_cpu_features): Likewise. * sysdeps/x86/cpu-features.c: Likewise. * sysdeps/x86/cpu-features.h: Likewise. * sysdeps/x86/cpu-tunables.c: Likewise. * sysdeps/x86_64/Makefile: Likewise. * sysdeps/x86/dl-cet.c: Likewise. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* Update tooling versions verified to work with glibc.Carlos O'Donell2018-07-311-10/+21
|
* Update contrib.texi contributions.Carlos O'Donell2018-07-311-12/+29
|
* Add manual documentation for threads.hRical Jasan2018-07-243-9/+554
| | | | | | | | | | | | This patch updates the manual and adds a new chapter to the manual, explaining types macros, constants and functions defined by ISO C11 threads.h standard. [BZ# 14092] * manual/debug.texi: Update adjacent chapter name. * manual/probes.texi: Likewise. * manual/threads.texi (ISO C Threads): New section. (POSIX Threads): Convert to a section.
* INSTALL: Add a note for Intel CET statusH.J. Lu2018-07-191-0/+5
| | | | | | * NEWS: Add a note for Intel CET status. * manual/install.texi: Likewise. * INSTALL: Regenerated.
* x86/CET: Document glibc.tune.x86_ibt and glibc.tune.x86_shstkH.J. Lu2018-07-181-0/+28
| | | | | * manual/tunables.texi: Document glibc.tune.x86_ibt and glibc.tune.x86_shstk.
* Intel CET: Document --enable-cetH.J. Lu2018-07-181-0/+11
| | | | | | * NEWS: Mention --enable-cet. * manual/install.texi: Document --enable-cet. * INSTALL: Regenerated.
* Add the statx functionFlorian Weimer2018-07-101-0/+1
|
* Add renameat2 function [BZ #17662]Florian Weimer2018-07-051-0/+1
| | | | | | | The implementation falls back to renameat if renameat2 is not available in the kernel (or in the kernel headers) and the flags argument is zero. Without kernel support, a non-zero argument returns EINVAL, not ENOSYS. This mirrors what the kernel does for invalid renameat2 flags.
* testrun.sh: Implement --tool=strace, --tool=valgrindFlorian Weimer2018-07-041-7/+1
| | | | | | | | $(file …) appears to be the only convenient way to create files with newlines and make substitution variables. This needs make 4.0 (released in 2013), so update the requirement to match. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* Document interaction with GCC built-ins in the Customizing PrintfMartin Sebor2018-06-291-4/+12
| | | | section of the manual.
* New configure option --disable-crypt.Zack Weinberg2018-06-291-0/+11
| | | | | | | | Some Linux distributions are experimenting with a new, separately maintained and hopefully more agile implementation of the crypt API. To facilitate this, add a configure option which disables glibc's embedded libcrypt. When this option is given, libcrypt.* and crypt.h will not be built nor installed.
* manual: Revise crypt.texi.Zack Weinberg2018-06-2911-197/+351
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a major rewrite of the description of 'crypt', 'getentropy', and 'getrandom'. A few highlights of the content changes: - Throughout the manual, public headers, and user-visible messages, I replaced the term "password" with "passphrase", the term "password database" with "user database", and the term "encrypt(ion)" with "(one-way) hashing" whenever it was applied to passphrases. I didn't bother making this change in internal code or tests. The use of the term "password" in ruserpass.c survives, because that refers to a keyword in netrc files, but it is adjusted to make this clearer. There is a note in crypt.texi explaining that they were traditionally called passwords but single words are not good enough anymore, and a note in users.texi explaining that actual passphrase hashes are found in a "shadow" database nowadays. - There is a new short introduction to the "Cryptographic Functions" section, explaining how we do not intend to be a general-purpose cryptography library, and cautioning that there _are_, or have been, legal restrictions on the use of cryptography in many countries, without getting into any kind of detail that we can't promise to keep up to date. - I added more detail about what a "one-way function" is, and why they are used to obscure passphrases for storage. I removed the paragraph saying that systems not connected to a network need no user authentication, because that's a pretty rare situation nowadays. (It still says "sometimes it is necessary" to authenticate the user, though.) - I added documentation for all of the hash functions that glibc actually supports, but not for the additional hash functions supported by libxcrypt. If we're going to keep this manual section around after the transition is more advanced, it would probably make sense to add them then. - There is much more detailed discussion of how to generate a salt, and the failure behavior for crypt is documented. (Returning an invalid hash on failure is what libxcrypt does; Solar Designer's notes say that this was done "for compatibility with old programs that assume crypt can never fail".) - As far as I can tell, the header 'crypt.h' is entirely a GNU invention, and never existed on any other Unix lineage. The function 'crypt', however, was in Issue 1 of the SVID and is now in the XSI component of POSIX. I tried to make all of the @standards annotations consistent with this, but I'm not sure I got them perfectly right. - The genpass.c example has been improved to use getentropy instead of the current time to generate the salt, and to use a SHA-256 hash instead of MD5. It uses more random bytes than is strictly necessary because I didn't want to complicate the code with proper base64 encoding. - The testpass.c example has three hardwired hashes now, to demonstrate that different one-way functions produce different hashes for the same input. It also demonstrates how DES hashing only pays attention to the first eight characters of the input. - There is new text explaining in more detail how a CSPRNG differs from a regular random number generator, and how getentropy/getrandom are not exactly a CSPRNG. I tried not to make specific falsifiable claims here. I also tried to make the blocking/cancellation/error behavior of both getentropy and getrandom clearer.
* manual: Reorganize crypt.texi.Zack Weinberg2018-06-292-119/+73
| | | | | | | | | | | | | | | | | | In preparation for a major revision of the documentation for crypt(_r), getentropy, and getrandom, reorganize crypt.texi. This patch does not change any text; it only deletes and moves text. The description of 'getpass' moves to terminal.texi, since all it does is read a password from the controlling terminal with echo disabled. The "Legal Problems" section of crypt.texi is dropped, and the introductory text is shifted down to the "Encrypting Passwords" section; the next patch will add some new introductory text. Also, it is no longer true that crypt.texi's top @node needs to have no pointers. That was a vestige of crypt/ being an add-on. (makeinfo itself doesn't need @node pointers anymore, but the scripts that assemble the libc manual's topmost node rely on each chapter-level node having them.)
* Disallow use of DES encryption functions in new programs.Zack Weinberg2018-06-293-242/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The functions encrypt, setkey, encrypt_r, setkey_r, cbc_crypt, ecb_crypt, and des_setparity should not be used in new programs, because they use the DES block cipher, which is unacceptably weak by modern standards. Demote all of them to compatibility symbols, and remove their prototypes from installed headers. cbc_crypt, ecb_crypt, and des_setparity were already compat symbols when glibc was configured with --disable-obsolete-rpc. POSIX requires encrypt and setkey to be available when _XOPEN_CRYPT is defined, so this change also removes the definition of X_OPEN_CRYPT from <unistd.h>. The entire "DES Encryption" section is dropped from the manual, as is the mention of AUTH_DES and FIPS 140-2 in the introduction to crypt.texi. The documentation of 'memfrob' cross-referenced the DES Encryption section, which is replaced by a hyperlink to libgcrypt, and while I was in there I spruced up the actual documentation of 'memfrob' and 'strfry' a little. It's still fairly jokey, because those functions _are_ jokes, but they do also have real use cases, so people trying to use them for real should have all the information they need. DES-based authentication for Sun RPC is also insecure and should be deprecated or even removed, but maybe that can be left as TI-RPC's problem.
* Fix documentation build with old makeinfoSzabolcs Nagy2018-06-281-1/+1
| | | | | | With old makeinfo '@code {' fails because of the extra space. * manual/llio.texi: Remove spurious space.
* Remove macros extend_alloca, extend_alloca_account [BZ #18023]Florian Weimer2018-06-271-1/+0
| | | | | The unused macro definition in posix/glob.c comes from gnulib and will have to be removed there.
* Fix Linux fcntl OFD locks for non-LFS architectures (BZ#20251)Adhemerval Zanella2018-06-261-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the OFD ("file private") locks for architectures that support non-LFS flock definition (__USE_FILE_OFFSET64 not defined). The issue in this case is both F_OFD_{GETLK,SETLK,SETLKW} and F_{SET,GET}L{W}K64 expects a flock64 argument and when using old F_OFD_* flags with a non LFS flock argument the kernel might interpret the underlying data wrongly. Kernel idea originally was to avoid using such flags in non-LFS syscall, but since GLIBC uses fcntl with LFS semantic as default it is possible to provide the functionality and avoid the bogus struct kernel passing by adjusting the struct manually for the required flags. The idea follows other LFS interfaces that provide two symbols: 1. A new LFS fcntl64 is added on default ABI with the usual macros to select it for FILE_OFFSET_BITS=64. 2. The Linux non-LFS fcntl use a stack allocated struct flock64 for F_OFD_{GETLK,SETLK,SETLKW} copy the results on the user provided struct. 3. Keep a compat symbol with old broken semantic for architectures that do not define __OFF_T_MATCHES_OFF64_T. So for architectures which defines __USE_FILE_OFFSET64, fcntl64 will aliased to fcntl and no adjustment would be required. So to actually use F_OFD_* with LFS support the source must be built with LFS support (_FILE_OFFSET_BITS=64). Also F_OFD_SETLKW command is handled a cancellation point, as for F_SETLKW{64}. Checked on x86_64-linux-gnu and i686-linux-gnu. [BZ #20251] * NEWS: Mention fcntl64 addition. * csu/check_fds.c: Replace __fcntl_nocancel by __fcntl64_nocancel. * login/utmp_file.c: Likewise. * sysdeps/posix/fdopendir.c: Likewise. * sysdeps/posix/opendir.c: Likewise. * sysdeps/unix/pt-fcntl.c: Likewise. * include/fcntl.h (__libc_fcntl64, __fcntl64, __fcntl64_nocancel_adjusted): New prototype. (__fcntl_nocancel_adjusted): Remove prototype. * io/Makefile (routines): Add fcntl64. (CFLAGS-fcntl64.c): New rule. * io/Versions [GLIBC_2.28] (fcntl64): New symbol. [GLIBC_PRIVATE] (__libc_fcntl): Rename to __libc_fcntl64. * io/fcntl.h (fcntl64): Add prototype and redirect if __USE_FILE_OFFSET64 is defined. * io/fcntl64.c: New file. * manual/llio.text: Add a note for which commands fcntl acts a cancellation point. * nptl/Makefile (CFLAGS-fcntl64.c): New rule. * sysdeps/mach/hurd/fcntl.c: Alias fcntl to fcntl64 symbols. * sysdeps/mach/hurd/i386/libc.abilist [GLIBC_2.28] (fcntl, fcntl64): New symbols. * sysdeps/unix/sysv/linux/fcntl.c (__libc_fcntl): Fix F_GETLK64, F_OFD_GETLK, F_SETLK64, F_SETLKW64, F_OFD_SETLK, and F_OFD_SETLKW for non-LFS case. * sysdeps/unix/sysv/linux/fcntl64.c: New file. * sysdeps/unix/sysv/linux/fcntl_nocancel.c (__fcntl_nocancel): Rename to __fcntl64_nocancel. (__fcntl_nocancel_adjusted): Rename to __fcntl64_nocancel_adjusted. * sysdeps/unix/sysv/linux/not-cancel.h (__fcntl_nocancel): Rename to __fcntl64_nocancel. * sysdeps/unix/sysv/linux/tst-ofdlocks.c: New file. * sysdeps/unix/sysv/linux/tst-ofdlocks-compat.c: Likewise. * sysdeps/unix/sysv/linux/Makefile (tests): Add tst-ofdlocks. (tests-internal): Add tst-ofdlocks-compat. * sysdeps/unix/sysv/linux/aarch64/libc.abilist [GLIBC_2.28] (fcntl64): New symbol. * sysdeps/unix/sysv/linux/alpha/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/ia64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/libc-le.abilist: Likewise. * sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/x86_64/64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/arm/libc.abilist [GLIBC_2.28] (fcntl, fcntl64): Likewise. * sysdeps/unix/sysv/linux/hppa/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/i386/libc.abilis: Likewise. * sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/microblaze/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/nios2/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/sh/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist: Likewise.
* Run thread shutdown functions in an explicit orderFlorian Weimer2018-06-261-1/+1
| | | | | | | This removes the __libc_thread_subfreeres hook in favor of explict calls. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* Add narrowing divide functions.Joseph Myers2018-05-171-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the narrowing divide functions from TS 18661-1 to glibc's libm: fdiv, fdivl, ddivl, f32divf64, f32divf32x, f32xdivf64 for all configurations; f32divf64x, f32divf128, f64divf64x, f64divf128, f32xdivf64x, f32xdivf128, f64xdivf128 for configurations with _Float64x and _Float128; __nldbl_ddivl for ldbl-opt. The changes are mostly essentially the same as for the other narrowing functions, so the description of those generally applies to this patch as well. Tested for x86_64, x86, mips64 (all three ABIs, both hard and soft float) and powerpc, and with build-many-glibcs.py. * math/Makefile (libm-narrow-fns): Add div. (libm-test-funcs-narrow): Likewise. * math/Versions (GLIBC_2.28): Add narrowing divide functions. * math/bits/mathcalls-narrow.h (div): Use __MATHCALL_NARROW. * math/gen-auto-libm-tests.c (test_functions): Add div. * math/math-narrow.h (CHECK_NARROW_DIV): New macro. (NARROW_DIV_ROUND_TO_ODD): Likewise. (NARROW_DIV_TRIVIAL): Likewise. * sysdeps/ieee754/float128/float128_private.h (__fdivl): New macro. (__ddivl): Likewise. * sysdeps/ieee754/ldbl-opt/Makefile (libnldbl-calls): Add fdiv and ddiv. (CFLAGS-nldbl-ddiv.c): New variable. (CFLAGS-nldbl-fdiv.c): Likewise. * sysdeps/ieee754/ldbl-opt/Versions (GLIBC_2.28): Add __nldbl_ddivl. * sysdeps/ieee754/ldbl-opt/nldbl-compat.h (__nldbl_ddivl): New prototype. * manual/arith.texi (Misc FP Arithmetic): Document fdiv, fdivl, ddivl, fMdivfN, fMdivfNx, fMxdivfN and fMxdivfNx. * math/auto-libm-test-in: Add tests of div. * math/auto-libm-test-out-narrow-div: New generated file. * math/libm-test-narrow-div.inc: New file. * sysdeps/i386/fpu/s_f32xdivf64.c: Likewise. * sysdeps/ieee754/dbl-64/s_f32xdivf64.c: Likewise. * sysdeps/ieee754/dbl-64/s_fdiv.c: Likewise. * sysdeps/ieee754/float128/s_f32divf128.c: Likewise. * sysdeps/ieee754/float128/s_f64divf128.c: Likewise. * sysdeps/ieee754/float128/s_f64xdivf128.c: Likewise. * sysdeps/ieee754/ldbl-128/s_ddivl.c: Likewise. * sysdeps/ieee754/ldbl-128/s_f64xdivf128.c: Likewise. * sysdeps/ieee754/ldbl-128/s_fdivl.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/s_ddivl.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/s_fdivl.c: Likewise. * sysdeps/ieee754/ldbl-96/s_ddivl.c: Likewise. * sysdeps/ieee754/ldbl-96/s_fdivl.c: Likewise. * sysdeps/ieee754/ldbl-opt/nldbl-ddiv.c: Likewise. * sysdeps/ieee754/ldbl-opt/nldbl-fdiv.c: Likewise. * sysdeps/ieee754/soft-fp/s_ddivl.c: Likewise. * sysdeps/ieee754/soft-fp/s_fdiv.c: Likewise. * sysdeps/ieee754/soft-fp/s_fdivl.c: Likewise. * sysdeps/powerpc/fpu/libm-test-ulps: Update. * sysdeps/mach/hurd/i386/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/aarch64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/alpha/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/arm/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/hppa/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/i386/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/ia64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/m68k/coldfire/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/m68k/m680x0/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/microblaze/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/mips/mips32/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/mips/mips64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/nios2/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.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/riscv/rv64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/sh/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/x86_64/64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/x86_64/x32/libm.abilist: Likewise.
* math: Merge strtod_nan_*.h into math-type-macros-*.hFlorian Weimer2018-05-161-1/+1
| | | | | This change will eventually make it possible to compile stdlib/strtod_nan_main.c as part of math/s_nan_template.c.