about summary refs log tree commit diff
path: root/manual
Commit message (Collapse)AuthorAgeFilesLines
* Documentation for ARC portVineet Gupta2020-07-101-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (a) ABI doc: https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/wiki/files/ARCv2_ABI.pdf (b) Programmer's Reference Manual (PRM) : needs a download request to be filled https://www.synopsys.com/dw/ipdir.php?ds=arc-hs44-hs46-hs48 https://www.synopsys.com/dw/doc.php/ds/cc/programmers-reference-manual-ARC-HS.pdf As of port merge (and Florian's patch to fix static TLS), glibc testsuite (cross-test setup) has following failures: FAIL: elf/tst-audit14 FAIL: elf/tst-audit15 FAIL: elf/tst-audit16 FAIL: elf/tst-ldconfig-ld_so_conf-update FAIL: elf/tst-libc_dlvsym FAIL: elf/tst-libc_dlvsym-static FAIL: iconv/test-iconvconfig # Needs gconv installed FAIL: io/ftwtest # Requires execution by non-root FAIL: io/tst-lockf FAIL: libio/tst-wfile-sync FAIL: locale/tst-localedef-path-norm FAIL: nptl/test-cond-printers # needs Python3 and target GDB on target FAIL: nptl/test-condattr-printers # ditto FAIL: nptl/test-mutex-printers # ditto FAIL: nptl/test-mutexattr-printers # ditto FAIL: nptl/test-rwlock-printers # ditto FAIL: nptl/test-rwlockattr-printers # ditto FAIL: nptl/tst-umask1 # passes if run natively on target (NFS ACLv3 support needed) FAIL: nss/bug-erange FAIL: nss/tst-nss-files-hosts-getent FAIL: nss/tst-nss-files-hosts-multi FAIL: posix/bug-ga2 FAIL: posix/globtest # require same user on target and host FAIL: posix/tst-getaddrinfo5 FAIL: stdio-common/tst-vfprintf-width-prec FAIL: stdio-common/tst-vfprintf-width-prec-alloc FAIL: stdio-common/tst-vfprintf-width-prec-mem FAIL: string/tst-strerror FAIL: string/tst-strsignal FAIL: sunrpc/bug20790 # missing cpp on target FAIL: timezone/tst-tzset Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* rtld: Avoid using up static TLS surplus for optimizations [BZ #25051]Szabolcs Nagy2020-07-081-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | On some targets static TLS surplus area can be used opportunistically for dynamically loaded modules such that the TLS access then becomes faster (TLSDESC and powerpc TLS optimization). However we don't want all surplus TLS to be used for this optimization because dynamically loaded modules with initial-exec model TLS can only use surplus TLS. The new contract for surplus static TLS use is: - libc.so can have up to 192 bytes of IE TLS, - other system libraries together can have up to 144 bytes of IE TLS. - Some "optional" static TLS is available for opportunistic use. The optional TLS is now tunable: rtld.optional_static_tls, so users can directly affect the allocated static TLS size. (Note that module unloading with dlclose does not reclaim static TLS. After the optional TLS runs out, TLS access is no longer optimized to use static TLS.) The default setting of rtld.optional_static_tls is 512 so the surplus TLS is 3*192 + 4*144 + 512 = 1664 by default, the same as before. Fixes BZ #25051. Tested on aarch64-linux-gnu and x86_64-linux-gnu. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* rtld: Account static TLS surplus for audit modulesSzabolcs Nagy2020-07-081-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | The new static TLS surplus size computation is surplus_tls = 192 * (nns-1) + 144 * nns + 512 where nns is controlled via the rtld.nns tunable. This commit accounts audit modules too so nns = rtld.nns + audit modules. rtld.nns should only include the namespaces required by the application, namespaces for audit modules are accounted on top of that so audit modules don't use up the static TLS that is reserved for the application. This allows loading many audit modules without tuning rtld.nns or using up static TLS, and it fixes FAIL: elf/tst-auditmany Note that DL_NNS is currently a hard upper limit for nns, and if rtld.nns + audit modules go over the limit that's a fatal error. By default rtld.nns is 4 which allows 12 audit modules. Counting the audit modules is based on existing audit string parsing code, we cannot use GLRO(dl_naudit) before the modules are actually loaded.
* rtld: Add rtld.nns tunable for the number of supported namespacesSzabolcs Nagy2020-07-081-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TLS_STATIC_SURPLUS is 1664 bytes currently which is not enough to support DL_NNS (== 16) number of dynamic link namespaces, if we assume 192 bytes of TLS are reserved for libc use and 144 bytes are reserved for other system libraries that use IE TLS. A new tunable is introduced to control the number of supported namespaces and to adjust the surplus static TLS size as follows: surplus_tls = 192 * (rtld.nns-1) + 144 * rtld.nns + 512 The default is rtld.nns == 4 and then the surplus TLS size is the same as before, so the behaviour is unchanged by default. If an application creates more namespaces than the rtld.nns setting allows, then it is not guaranteed to work, but the limit is not checked. So existing usage will continue to work, but in the future if an application creates more than 4 dynamic link namespaces then the tunable will need to be set. In this patch DL_NNS is a fixed value and provides a maximum to the rtld.nns setting. Static linking used fixed 2048 bytes surplus TLS, this is changed so the same contract is used as for dynamic linking. With static linking DL_NNS == 1 so rtld.nns tunable is forced to 1, so by default the surplus TLS is reduced to 144 + 512 = 656 bytes. This change is not expected to cause problems. Tested on aarch64-linux-gnu and x86_64-linux-gnu. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* Remove --enable-obsolete-nsl configure flagPetr Vorel2020-07-083-28/+13
| | | | | | | | | | | | | | | | | | | this means that *always* libnsl is only built as shared library for backward compatibility and the NSS modules libnss_nis and libnss_nisplus are not built at all, libnsl's headers aren't installed. This compatibility is kept only for architectures and ABIs that have been added in or before version 2.28. Replacement implementations based on TIRPC, which additionally support IPv6, are available from <https://github.com/thkukuk/>. This change does not affect libnss_compat which does not depended on libnsl since 2.27 and thus can be used without NIS. libnsl code depends on Sun RPC, e.g. on --enable-obsolete-rpc (installed libnsl headers use installed Sun RPC headers), which will be removed in the following commit.
* string: Add strerrorname_np and strerrordesc_npAdhemerval Zanella2020-07-071-0/+23
| | | | | | | | | | | | | | | | | The strerrorname_np returns error number name (e.g. "EINVAL" for EINVAL) while strerrordesc_np returns string describing error number (e.g "Invalid argument" for EINVAL). Different than strerror, strerrordesc_np does not attempt to translate the return description, both functions return NULL for an invalid error number. They should be used instead of sys_errlist and sys_nerr, both are thread and async-signal safe. These functions are GNU extensions. Checked on x86-64-linux-gnu, i686-linux-gnu, powerpc64le-linux-gnu, and s390x-linux-gnu. Tested-by: Carlos O'Donell <carlos@redhat.com> Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* string: Add sigabbrev_np and sigdescr_npAdhemerval Zanella2020-07-071-0/+24
| | | | | | | | | | | | | | | | | | The sigabbrev_np returns the abbreviated signal name (e.g. "HUP" for SIGHUP) while sigdescr_np returns the string describing the error number (e.g "Hangup" for SIGHUP). Different than strsignal, sigdescr_np does not attempt to translate the return description and both functions return NULL for an invalid signal number. They should be used instead of sys_siglist or sys_sigabbrev and they are both thread and async-signal safe. They are added as GNU extensions on string.h header (same as strsignal). Checked on x86-64-linux-gnu, i686-linux-gnu, powerpc64le-linux-gnu, and s390x-linux-gnu. Tested-by: Carlos O'Donell <carlos@redhat.com> Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* signal: Move sys_siglist to a compat symbolAdhemerval Zanella2020-07-071-5/+0
| | | | | | | | | | | | | | | | | | | The symbol was deprecated by strsignal and its usage imposes issues such as copy relocations. Its internal name is changed to __sys_siglist and __sys_sigabbrev to avoid static linking usage. The compat code is also refactored, since both Linux and Hurd usage the same strategy: export the same array with different object sizes. The libSegfault change avoids calling strsignal on the SIGFAULT signal handler (the current usage is already sketchy, adding a call that potentially issue locale internal function is even sketchier). Checked on x86_64-linux-gnu and i686-linux-gnu. I also run a check-abi on all affected platforms. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* x86: Add thresholds for "rep movsb/stosb" to tunablesH.J. Lu2020-07-061-0/+16
| | | | | | | | | | Add x86_rep_movsb_threshold and x86_rep_stosb_threshold to tunables to update thresholds for "rep movsb" and "rep stosb" at run-time. Note that the user specified threshold for "rep movsb" smaller than the minimum threshold will be ignored. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* Use C2x return value from getpayload of non-NaN (bug 26073).Joseph Myers2020-07-061-3/+4
| | | | | | | | | | | | | | | In TS 18661-1, getpayload had an unspecified return value for a non-NaN argument, while C2x requires the return value -1 in that case. This patch implements the return value of -1. I don't think this is worth having a new symbol version that's an alias of the old one, although occasionally we do that in such cases where the new function semantics are a refinement of the old ones (to avoid programs relying on the new semantics running on older glibc versions but not behaving as intended). Tested for x86_64 and x86; also ran math/ tests for aarch64 and powerpc.
* manual: Document __libc_single_threadedFlorian Weimer2020-07-061-0/+113
| | | | | Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com> Reviewed-by: DJ Delorie <dj@redhat.com>
* Linux: Perform rseq registration at C startup and thread creationMathieu Desnoyers2020-07-061-0/+64
| | | | | | | | | | | | | | | | | | | Register rseq TLS for each thread (including main), and unregister for each thread (excluding main). "rseq" stands for Restartable Sequences. See the rseq(2) man page proposed here: https://lkml.org/lkml/2018/9/19/647 Those are based on glibc master branch commit 3ee1e0ec5c. The rseq system call was merged into Linux 4.18. The TLS_STATIC_SURPLUS define is increased to leave additional room for dlopen'd initial-exec TLS, which keeps elf/tst-auditmany working. The increase (76 bytes) is larger than 32 bytes because it has not been increased in quite a while. The cost in terms of additional TLS storage is quite significant, but it will also obscure some initial-exec-related dlopen failures.
* manual: Show copyright information not just in the printed manualFlorian Weimer2020-07-031-9/+11
| | | | | | | | | | | | | | | @insertcopying was not used at all in the Info and HTML versions. As a result, the notices that need to be present according to the GNU Free Documentation License were missing. This commit shows these notices above the table of contents in the HTML version, and as part of the Main Menu node in the Info version. Remove the "This file documents" line because it is redundant with the following line. Tested-by: Carlos O'Donell <carlos@redhat.com> Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* manual: Add pthread_attr_setsigmask_np, pthread_attr_getsigmask_npFlorian Weimer2020-06-151-0/+72
| | | | And the PTHREAD_ATTR_NO_SIGMASK_NP constant.
* manual/jobs.texi: remove unused var from example codeAurélien Aptel2020-06-031-1/+0
| | | | | | The do_job_notification() function defines a variable without using it. Remove it. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* mbstowcs: Document, test, and fix null pointer dst semantics (Bug 25219)Carlos O'Donell2020-06-011-4/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The function mbstowcs, by an XSI extension to POSIX, accepts a null pointer for the destination wchar_t array. This API behaviour allows you to use the function to compute the length of the required wchar_t array i.e. does the conversion without storing it and returns the number of wide characters required. We remove the __write_only__ markup for the first argument because it is not true since the destination may be a null pointer, and so the length argument may not apply. We remove the markup otherwise the new test case cannot be compiled with -Werror=nonnull. We add a new test case for mbstowcs which exercises the destination is a null pointer behaviour which we have now explicitly documented. The mbsrtowcs and mbsnrtowcs behave similarly, and mbsrtowcs is documented as doing this in C11, even if the standard doesn't come out and call out this specific use case. We add one note to each of mbsrtowcs and mbsnrtowcs to call out that they support a null pointer for the destination. The wcsrtombs function behaves similarly but in the other way around and allows you to use a null destination pointer to compute how many bytes you would need to convert the wide character input. We document this particular case also, but leave wcsnrtombs as a references to wcsrtombs, so the reader must still read the details of the semantics for wcsrtombs.
* manual: Fix backtraces code example [BZ #10441]Girish Joshi2020-05-291-6/+7
| | | | | | | | | | | | Validation for pointer returned by backtrace_symbols () added. Type of variables size and i is changed from size_t to int. Variable size is used to collect the result from backtrace () that is an int. i is the loop counter variable so it can be an int. Since, size_t size is changed to int size, in printf %zd is changed to %d. Reviewed-by: DJ Delorie <dj@redhat.com>
* signal: Deprecate additional legacy signal handling functionsFlorian Weimer2020-05-251-0/+6
| | | | | | | | | | This needs a few test adjustments: In some cases, sigignore was used for convenience (replaced with xsignal with SIG_IGN). Tests for the deprecated functions need to disable -Wdeprecated-declarations, and for the sigmask deprecation, -Wno-error. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* manual: Add missing section and node for clockid_t wait functionsFlorian Weimer2020-05-201-0/+8
| | | | | | | | | | Without this, these functions appear under the node Default Thread Attributes, which is confusing. Eventually, the documentation should be merged with the (yet to be documented) standardized functions. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* x86: Add --enable-cet=permissiveH.J. Lu2020-05-181-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | When CET is enabled, it is an error to dlopen a non CET enabled shared library in CET enabled application. It may be desirable to make CET permissive, that is disable CET when dlopening a non CET enabled shared library. With the new --enable-cet=permissive configure option, CET is disabled when dlopening a non CET enabled shared library. Add DEFAULT_DL_X86_CET_CONTROL to config.h.in: /* The default value of x86 CET control. */ #define DEFAULT_DL_X86_CET_CONTROL cet_elf_property which enables CET features based on ELF property note. --enable-cet=permissive it to /* The default value of x86 CET control. */ #define DEFAULT_DL_X86_CET_CONTROL cet_permissive which enables CET features permissively. Update tst-cet-legacy-5a, tst-cet-legacy-5b, tst-cet-legacy-6a and tst-cet-legacy-6b to check --enable-cet and --enable-cet=permissive.
* manual: Document the O_NOFOLLOW open flagFlorian Weimer2020-05-051-0/+7
|
* powerpc64le: blacklist broken GCC compilers (e.g GCC 7.5.0)Paul E. Murphy2020-04-301-2/+8
| | | | | | | | | | | GCC 7.5.0 (PR94200) will refuse to compile if both -mabi=% and -mlong-double-128 are passed on the command line. Surprisingly, it will work happily if the latter is not. For the sake of maintaining status quo, test for and blacklist such compilers. Tested with a GCC 8.3.1 and GCC 7.5.0 compiler for ppc64le. Reviewed-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
* powerpc64le: bump binutils version requirement to >= 2.26Paul E. Murphy2020-04-301-0/+4
| | | | | | | This is a small step up from 2.25 which brings in support for rewriting the .gnu.attributes section of libc/libm.so. Reviewed-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
* powerpc64le: raise GCC requirement to 7.4 for long double transitionPaul E. Murphy2020-04-301-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add compiler feature tests to ensure we can build ieee128 long double. These test for -mabi=ieeelongdouble, -mno-gnu-attribute, and -Wno-psabi. Likewise, verify some compiler bugs have been addressed. These aren't helpful for building glibc, but may cause test failures when testing the new long double. See notes below from Raji. On powerpc64le, some older compiler versions give error for the function signbit() for 128-bit floating point types. This is fixed by PR83862 in gcc 8.0 and backported to gcc6 and gcc7. This patch adds a test to check compiler version to avoid compiler errors during make check. Likewise, test for -mno-gnu-attribute support which was On powerpc64le, a few files are built on IEEE long double mode (-mabi=ieeelongdouble), whereas most are built on IBM long double mode (-mabi=ibmlongdouble, the default for -mlong-double-128). Since binutils 2.31, linking object files with different long double modes causes errors similar to: ld: libc_pic.a(s_isinfl.os) uses IBM long double, libc_pic.a(ieee128-qefgcvt.os) uses IEEE long double. collect2: error: ld returned 1 exit status make[2]: *** [../Makerules:649: libc_pic.os] Error 1 The warnings are fair and correct, but in order for glibc to have support for both long double modes on powerpc64le, they have to be ignored. This can be accomplished with the use of -mno-gnu-attribute option when building the few files that require IEEE long double mode. However, -mno-gnu-attribute is not available in GCC 6, the minimum version required to build glibc, so this patch adds a test for this feature in powerpc64le builds, and fails early if it's not available. Co-Authored-By: Rajalakshmi Srinivasaraghavan <raji@linux.vnet.ibm.com> Co-Authored-By: Gabriel F. T. Gomes <gabrielftg@linux.ibm.com> Reviewed-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
* manual: Fix typos in the fexecve descriptionFlorian Weimer2020-04-291-1/+1
| | | | Reported by Michael Kerrisk.
* manual: Document the fexecve functionFlorian Weimer2020-04-271-0/+13
|
* Remove __NO_MATH_INLINESAdhemerval Zanella2020-04-171-6/+0
| | | | | | With fenvinline.h removal the flag is not used anymore. Checked on x86_64-linux-gnu.
* Linux: Remove <sys/sysctl.h> and the sysctl functionFlorian Weimer2020-04-151-144/+0
| | | | | | | | | | | | | | | Linux 5.5 remove the system call in commit 61a47c1ad3a4dc6882f01ebdc88138ac62d0df03 ("Linux: Remove <sys/sysctl.h>"). Therefore, the compat function is just a stub that sets ENOSYS. Due to SHLIB_COMPAT, new ports will not add the sysctl function anymore automatically. x32 already lacks the sysctl function, so an empty sysctl.c file is used to suppress it. Otherwise, a new compat symbol would be added. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Add GRND_INSECURE from Linux 5.6 to sys/random.hJoseph Myers2020-04-091-0/+3
| | | | | | | | | | This patch adds the GRND_INSECURE constant from Linux 5.6 to glibc's sys/random.h. This is also added to the documentation. The constant acts as a no-op for the Hurd implementation (as that doesn't check whether the flags are known), which is semantically fine, while older Linux kernels reject unknown flags with an EINVAL error. Tested for x86_64.
* Extended Char Intro: Use getwc in example (Bug 25626)Carlos O'Donell2020-03-201-1/+1
| | | | | | | | In the "Extended Char Intro" the example incorrectly uses a function called wgetc which doesn't exist. The example is corrected to use getwc, which is correct for the use in this case. Reported-by: Toomas Rosin <toomas@rosin.ee>
* manual: Fix inconsistent declaration of wcsrchr [BZ #24655]Girish Joshi2020-03-131-1/+1
| | | | Reviewed-by: DJ Delorie <dj@redhat.com>
* manual: Fix wrong declaration of wcschr [BZ #24654]Girish Joshi2020-03-051-1/+1
|
* manual: Fix typo in parse_printf_format example [BZ #24638]Girish Joshi2020-03-041-1/+1
|
* Update newest tested versions of dependencies in install.texiSiddhesh Poyarekar2020-02-011-5/+5
| | | | Updated versions of gcc, binutils, awk, bison and perl.
* Add more contributors to the manualSiddhesh Poyarekar2020-02-011-0/+18
|
* Fix tst-pkey.c pkey_alloc return checks and manualLucas A. M. Magalhaes2020-01-171-0/+4
| | | | | | | | | | | | This test was failing in some powerpc systems as it was not checking for ENOSPC return. As said on the Linux man-pages and can be observed by the implementation at mm/mprotect.c in the Linux Kernel source. The syscall pkey_alloc can return EINVAL or ENOSPC. ENOSPC will indicate either that all keys are in use or that the kernel does not support pkeys. Reviewed-by: Gabriel F. T. Gomes <gabriel@inconstante.net.br>
* Update copyright dates with scripts/update-copyrights.Joseph Myers2020-01-0148-48/+48
|
* aarch64: Add Huawei Kunpeng to tunable cpu listXuelei Zhang2019-12-191-1/+1
| | | | | | | | | | | Kunpeng processer is a 64-bit Arm-compatible CPU released by Huawei, and we have already signed a copyright assignement with the FSF. This patch adds its to cpu list, and related macro for IFUNC. Checked on aarch64-linux-gnu. Reviewed-by: Szabolcs Nagy <Szabolcs.Nagy@arm.com>
* manual: clarify fopen with the x flagPaul Eggert2019-12-111-1/+3
| | | | | * manual/stdio.texi (Opening Streams): Say how glibc's implementation of fopen with "x" follows ISO C11.
* nptl: Fix niggles with pthread_clockjoin_npMike Crowe2019-11-041-1/+1
| | | | | | | | | | | | | | | | | | | Joseph Myers spotted[1] that 69ca4b54c151cec42ccca5e05790efc1a8206b47 added pthread_clockjoin_np to sysdeps/nptl/pthread.h but not to its hppa-specific equivalent sysdeps/unix/sysv/linux/hppa/pthread.h. Rafal Luzynski spotted[2] typos in the NEWS entry and manual updates too. Florian Weimer spotted[3] that the clockid parameter was not using a reserved identifier in pthread.h. [1] https://sourceware.org/ml/libc-alpha/2019-11/msg00016.html [2] https://sourceware.org/ml/libc-alpha/2019-11/msg00019.html [3] https://sourceware.org/ml/libc-alpha/2019-11/msg00022.html Reviewed-by: Joseph Myers <joseph@codesourcery.com> Reviewed-by: Rafal Luzynski <digitalfreak@lingonborough.com> Reviewed-by: Florian Weimer <fw@deneb.enyo.de>
* nptl: Add pthread_clockjoin_npMike Crowe2019-11-011-0/+12
| | | | | | | | | | | Introduce pthread_clockjoin_np as a version of pthread_timedjoin_np that accepts a clockid_t parameter to indicate which clock the timeout should be measured against. This mirrors the recently-added POSIX-proposed "clock" wait functions. Checked on x86_64-linux-gnu. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* manual: Add documentation for pthread_tryjoin_np and pthread_timedjoin_npMike Crowe2019-11-011-2/+24
| | | | Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Revise the documentation of simple calendar time.Zack Weinberg2019-10-304-471/+611
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a thorough revision of all the material relating to the functions time, stime, gettimeofday, settimeofday, clock_gettime, clock_getres, clock_settime, and difftime, spilling over into the discussion of time-related data types (which now get their own section) and touching the adjtime family as well (which deserves its own thorough revision, but I'd have to do a bunch of research first). Substantive changes are: * Document clock_gettime, clock_getres, and clock_settime. (Only CLOCK_REALTIME and CLOCK_MONOTONIC are documented; the others are either a bit too Linux-specific, or have more to do with measuring CPU/processor time. That section _also_ deserves its own thorough revision but again I'd have to do a bunch of research first.) * Present gettimeofday, settimeofday, and struct timeval as obsolete relative to clock_*. * Remove the documentation of struct timezone. Matching POSIX, say that the type of the second argument to gettimeofday and settimeofday is [const] void *. * Clarify ISO C and POSIX's requirements on time_t. Clarify the circumstances under which difftime is equivalent to simple subtraction. * Consolidate documentation of most of the time-related data types into a new section "Time Types," right after "Time Basics." (The exceptions are struct tm, which stays in "Broken-down Time," and struct times, which stays in "Processor And CPU Time." * The "Elapsed Time" section is now called "Calculating Elapsed Time" and includes only difftime and the discussion of how to compute timeval differences by hand. * Fold the "Simple Calendar Time," "High Resolution Calendar," and "High Accuracy Clock" sections together into two new sections titled "Getting the Time" and "Setting and Adjusting the Time."
* manual: Remove warning in the documentation of the abort functionFlorian Weimer2019-10-111-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The warning is confusing to those who do not understand the context, and the warning is easy to misunderstand: A reader needs to know that it was written by someone who is generally skeptical of government influence and control, otherwise it reads as an affirmation of the U.S. government's role as the ultimate editor of the manual. This is precisely the opposite of what the warning intends to convey. (Reportedly, it criticizes that several U.S. administrations have tried to restrict the medical advice that U.S.-funded health care workers can provide abroad, considering that censorship.) The warning is also misleading on a technical level. A reader who makes the connection to pregnancy termination will get the wrong impression that calling the abort function will terminate subprocesses of the current process, but this is not what generally happens. Finally, for both GNU and the FSF, it is inappropriate to use female reproductive health as mere joke material, since these organizations do not concern themselves with such issues otherwise, and the warning is purportedly about something else entirely. This reinstates commit 340d9652b9d0e1d4136588f18b726662d195777c ("manual/startup.texi (Aborting a Program): Remove inappropriate joke."), effectively reverting the revert in commit ffa81c22a3ac0fb75ad9bf2b1c3cdbf9eafa0bc9 ("Revert:"). Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org> Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* Prefer https to http for gnu.org and fsf.org URLsPaul Eggert2019-09-0748-48/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also, change sources.redhat.com to sourceware.org. This patch was automatically generated by running the following shell script, which uses GNU sed, and which avoids modifying files imported from upstream: sed -ri ' s,(http|ftp)(://(.*\.)?(gnu|fsf|sourceware)\.org($|[^.]|\.[^a-z])),https\2,g s,(http|ftp)(://(.*\.)?)sources\.redhat\.com($|[^.]|\.[^a-z]),https\2sourceware.org\4,g ' \ $(find $(git ls-files) -prune -type f \ ! -name '*.po' \ ! -name 'ChangeLog*' \ ! -path COPYING ! -path COPYING.LIB \ ! -path manual/fdl-1.3.texi ! -path manual/lgpl-2.1.texi \ ! -path manual/texinfo.tex ! -path scripts/config.guess \ ! -path scripts/config.sub ! -path scripts/install-sh \ ! -path scripts/mkinstalldirs ! -path scripts/move-if-change \ ! -path INSTALL ! -path locale/programs/charmap-kw.h \ ! -path po/libc.pot ! -path sysdeps/gnu/errlist.c \ ! '(' -name configure \ -execdir test -f configure.ac -o -f configure.in ';' ')' \ ! '(' -name preconfigure \ -execdir test -f preconfigure.ac ';' ')' \ -print) and then by running 'make dist-prepare' to regenerate files built from the altered files, and then executing the following to cleanup: chmod a+x sysdeps/unix/sysv/linux/riscv/configure # Omit irrelevant whitespace and comment-only changes, # perhaps from a slightly-different Autoconf version. git checkout -f \ sysdeps/csky/configure \ sysdeps/hppa/configure \ sysdeps/riscv/configure \ sysdeps/unix/sysv/linux/csky/configure # Omit changes that caused a pre-commit check to fail like this: # remote: *** error: sysdeps/powerpc/powerpc64/ppc-mcount.S: trailing lines git checkout -f \ sysdeps/powerpc/powerpc64/ppc-mcount.S \ sysdeps/unix/sysv/linux/s390/s390-64/syscall.S # Omit change that caused a pre-commit check to fail like this: # remote: *** error: sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S: last line does not end in newline git checkout -f sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S
* Correct the spelling of more contributorsPaul Eggert2019-08-291-1/+2
| | | | | Correct the spellings of Rafael Ávila de Espíndola, Uroš Bizjak, Alexandra Hájková, and Rafał Lużyński.
* Don't put non-ASCII into installed headersPaul Eggert2019-08-231-0/+9
| | | | | | | | Move non-ASCII contributor names from installed headers into contrib.texi when possible, and when it's not (the copyright notice in sysdeps/unix/sysv/linux/mips/sys/user.h) go back to ASCIIfied names. Problem reported by Joseph Myers in: https://www.sourceware.org/ml/libc-alpha/2019-08/msg00646.html
* Fix spellings of contributor names in comments and docPaul Eggert2019-08-231-1/+1
|
* Document strftime %Ob and %OB as C2X features.Joseph Myers2019-08-221-5/+11
| | | | | | | | | | | | | | | C2X standardizes strftime %Ob and %OB support. This patch updates the glibc manual to say these are C2X features, while noting that the details of what is the alternative form of a month name are not specified in C2X. Note: C2X seems unclear to me about whether %h being equivalent to %b means %Oh is thereby allowed and equivalent to %Ob; I've asked WG14. Tested with "make info" and "make pdf". * manual/time.texi (strftime): Document %Ob and %OB as C2X features.
* nss: Make nsswitch.conf more distribution friendly.Carlos O'Donell2019-08-191-5/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current default nsswitch.conf file provided by glibc is not very distribution friendly. The file contains some minimal directives that no real distribution uses. This update aims to provide a rich set of comments which are useful for all distributions, and a broader set of service defines which should work for all distributions. Tested defaults on x86_64 and they work. The nsswitch.conf file more closely matches what we have in Fedora now, and I'll adjust Fedora to use this version with minor changes to enable Fedora-specific service providers. v2 - Add missing databases to manual. - Add link to manual from default nsswitch.conf. - Sort nsswitch.conf according to most used database first. v3 - Only mention implemented services in 'NSS Basics.' - Mention 'automount' in 'Services in the NSS configuration.' - Sort services in alphabetical order. v4 - Project name is 'Samba'. v5 - Fix typo in manual/nss.texi. v6 - Fix another typo in manual/nss.texi. Ran spell checker this time.