aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2019-01-03termios: Consolidate termios.hAdhemerval Zanella9-295/+35
This patch consolidates the Linux termios.h by removing the arch-specific one. No semantic change is expected, checked on a build against x86_64-linux-gnu, alpha-linux-gnu, mips64-linux-gnu, and sparc64-linux-gnu. * sysdeps/unix/sysv/linux/Makefile (sysdep_headers): Add bits/termios-misc.h. * sysdeps/unix/sysv/linux/alpha/bits/termios.h: Remove file. * sysdeps/unix/sysv/linux/mips/bits/termios.h: Likewise. * sysdeps/unix/sysv/linux/sparc/bits/termios.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/bits/termios.h: Likewise. * sysdeps/unix/sysv/linux/bits/termios-misc.h: New file. * sysdeps/unix/sysv/linux/bits/termios.h: Include termios-misc.h.
2019-01-03termios: Add powerpc termios-miscAdhemerval Zanella4-50/+84
PowerPC termios.h header contains additional BSD terminal mode definitions (sgttyb, tchars, ltchars, and associated TIOCPKT_* symbolic constants). This patch moves all powerpc termios specific definition to its own header. No semantic change is expected, checked on a build against a powerpc64le-linux-gnu build. * sysdeps/unix/sysv/linux/powerpc/bits/termios-misc.h: New file. * sysdeps/unix/sysv/linux/powerpc/bits/termios.h [__USE_MISC] (struct sgtty, struct tchars, struct ltchars, TIOCPKT_DATA, TIOCPKT_FLUSHREAD, TIOCPKT_FLUSHWRITE, TIOCPKT_STOP, TIOCPKT_START, TIOCPKT_NOSTOP, TIOCPKT_DOSTOP, _VINTR, _VQUIT, _VERASE, _VKILL, _VEOF, _VMIN, _VEOL, _VTIME, _VEOL2, _VSWTC): Move to termios-misc.h. * sysdeps/unix/sysv/linux/powerpc/Makefile [$subdir == misc] (sysdep_headers): Add termios-misc.h.
2019-01-03termios: Remove Linux _IOT_termiosAdhemerval Zanella4-9/+4
It is used only on hurd. No semantic change is expected, checked on a build against x86_64-linux-gnu, alpha-linux-gnu, mips64-linux-gnu, and sparc64-linux-gnu. * sysdeps/unix/sysv/linux/bits/termios.h (_IOT_termios): Remove. * sysdeps/unix/sysv/linux/alpha/bits/termios.h: Likewise. * sysdeps/unix/sysv/linux/mips/bits/termios.h: Likewise.
2019-01-03termios: Consolidate tcflow symbolic constantsAdhemerval Zanella9-23/+69
This patch consolidates the termios symbolic constants for use with tcflow in its own header. The Linux generic implementation values match the kernel UAPI and each architecture with deviate values have their own implementation (currently only mips). No semantic change is expected, checked on a build against x86_64-linux-gnu, alpha-linux-gnu, mips64-linux-gnu, and sparc64-linux-gnu. * sysdeps/unix/sysv/linux/Makefile (sysdep_headers): Add termios-tcflow.h. * sysdeps/unix/sysv/linux/bits/termios-tcflow.h: New file. * sysdeps/unix/sysv/linux/mips/bits/termios-tcflow.h: Likewise. * sysdeps/unix/sysv/linux/bits/termios.h (TCSANOW, TCSADRAIN, TCSAFLUSH): Move to termios-tcflow.h. * sysdeps/unix/sysv/linux/alpha/bits/termios.h: Likewise. * sysdeps/unix/sysv/linux/mips/bits/termios.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/bits/termios.h: Likewise. * sysdeps/unix/sysv/linux/sparc/bits/termios.h: Likewise.
2019-01-03termios: Consolidate local mode definitionsAdhemerval Zanella11-120/+214
This patch consolidates the termios symbolic constants used for local mode with c_lflag member on its own header. The Linux generic implementation values match the kernel UAPI and each architecture with deviate values have their own implementation (in this case alpha, mips, and powerpc). No semantic change is expected, checked on a build against x86_64-linux-gnu, alpha-linux-gnu, mips64-linux-gnu, and sparc64-linux-gnu. * sysdeps/unix/sysv/linux/Makefile (sysdep_headers): Add termios-c_lflag.h. * sysdeps/unix/sysv/linux/bits/termios-c_lflag.h: New file. * sysdeps/unix/sysv/linux/alpha/bits/termios-c_lflag.h: Likewise. * sysdeps/unix/sysv/linux/mips/bits/termios-c_lflag.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/bits/termios-c_lflag.h: Likewise. * sysdeps/unix/sysv/linux/bits/termios.h (ISIG, ISCANON, ECHO, ECHOE, ECHOK, ECHONL, NOFLSH, TOSTOP, IEXTEN): Move to termios-c_lflag.h. [__USE_MISC || (__USE_XOPEN && !__USE_XOPEN2K)] (XCASE): Likewise. [__USE_MISC] (ECHOCTL, ECHOPRT, ECHOKE, FLUSHO, PENDIN, EXTPROC): Likewise. * sysdeps/unix/sysv/linux/alpha/bits/termios.h: Likewise. * sysdeps/unix/sysv/linux/mips/bits/termios.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/bits/termios.h: Likewise. * sysdeps/unix/sysv/linux/sparc/bits/termios.h: Likewise.
2019-01-03termios: Consolidate control mode definitionsAdhemerval Zanella10-60/+123
This patch consolidates the termios symbolic constants used for output mode with c_cflag memver on its own header. The Linux generic implementation values match the kernel UAPI and each architecture with deviate values have their own implementation (in this case alpha and powerpc). No semantic change is expected, checked on a build against x86_64-linux-gnu, alpha-linux-gnu, mips64-linux-gnu, and sparc64-linux-gnu. * sysdeps/unix/sysv/linux/Makefile (sysdep_headers): Add termios-c_cflag.h. * sysdeps/unix/sysv/linux/bits/termios-c_cflag.h: New file. * sysdeps/unix/sysv/linux/alpha/bits/termios-c_cflag.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/bits/termios-c_cflag.h: Likewise. * sysdeps/unix/sysv/linux/bits/termios.h (CSIZE, CS5, CS6, CS7, CS8, CSTOPB, CREAD, PARENB, PARODD, HUPCL, CLOCAL): Move to termios-c_cflag.h. * sysdeps/unix/sysv/linux/alpha/bits/termios.h: Likewise. * sysdeps/unix/sysv/linux/mips/bits/termios.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/bits/termios.h: Likewise. * sysdeps/unix/sysv/linux/sparc/bits/termios.h: Likewise.
2019-01-03termios: Consolidate Baud Rate Selection definitions (BZ#23783)Adhemerval Zanella11-131/+212
This patch consolidates the termios symbolic constants used for baud rates selection used along with speed_t on its own header. The Linux generic implementation values match the kernel UAPI and each architecture with deviate values have their own implementation (in this case alpha and powerpc). No semantic change is expected, checked on a build against x86_64-linux-gnu, alpha-linux-gnu, mips64-linux-gnu, and sparc64-linux-gnu. [BZ #23783] * sysdeps/unix/sysv/linux/Makefile (sysdep_headers): Add termios-baud.h. * sysdeps/unix/sysv/linux/bits/termios-baud.h: New file. * sysdeps/unix/sysv/linux/alpha/bits/termios-baud.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/bits/termios-baud.h: Likewise. * sysdeps/unix/sysv/linux/sparc/bits/termios-baud.h: Likewise. * sysdeps/unix/sysv/linux/alpha/bits/termios.h (B57600, B115200, B230400, B460800, B500000, B576000, B921600, B1000000, B1152000, B1500000, B2000000, B2500000, B3000000, B3500000, B4000000, __MAX_BAUD): Move to termios-baud.h. [__USE_MISC] (CBAUD, CBAUDEX): Likewise. * sysdeps/unix/sysv/linux/bits/termios.h: Likewise. * sysdeps/unix/sysv/linux/mips/bits/termios.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/bits/termios.h: Likewise. * sysdeps/unix/sysv/linux/sparc/bits/termios.h: Likewise.
2019-01-03termios: Consolidate Output Modes definitionsAdhemerval Zanella11-211/+280
This patch consolidates the termios symbolic constants used for ouput modes with c_oflag member on its own header. The Linux generic implementation values match the kernel UAPI and each architecture with deviate values have their own implementation (in this case alpha, powerpc, and sparc). No semantic change is expected, checked on a build against x86_64-linux-gnu, alpha-linux-gnu, mips64-linux-gnu, and sparc64-linux-gnu. * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add termios-c_oflag.h. * sysdeps/unix/sysv/linux/bits/termios-c_oflag.h: New file. * sysdeps/unix/sysv/linux/alpha/bits/termios-c_oflag.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/bits/termios-c_oflag.h: Likewise. * sysdeps/unix/sysv/linux/sparc/bits/termios-c_oflag.h: Likewise. * sysdeps/unix/sysv/linux/bits/termios.h (OPOST, OLCUC, ONLCR, OCRNL, ONOCR, ONLRET, OFILL, OFDEL, VTDLY, VT0, VT1): Move to termios-c_oflag.h. [__USE_MISC || __USE_XOPEN] (NLDLY, NL0, NL1, CRDLY, CR0, CR1, CR2, CR3, TABDLY, TAB0, TAB1, TAB2, TAB3, BSDLY, BS0, BS1, FFDLY, FF0, FFR1): Likewise. [USE_MISC] (XTABS): Likewise. * sysdeps/unix/sysv/linux/alpha/bits/termios.h: Likewise. * sysdeps/unix/sysv/linux/mips/bits/termios.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/bits/termios.h: Likewise. * sysdeps/unix/sysv/linux/sparc/bits/termios.h Likewise.
2019-01-03termios: Consolidate Input Modes definitions.Adhemerval Zanella10-86/+136
This patch consolidates the termios symbolic constants used for input modes with c_iflag member on its own header. The Linux generic implementation values match the kernel UAPI and each architecture with deviate values have their own implementation (in this case alpha and powerpc). No semantic change is expected, checked on a build against x86_64-linux-gnu, alpha-linux-gnu, mips64-linux-gnu, and sparc64-linux-gnu. * sysdeps/unix/sysv/linux/Makefile (sysdeps_headers): Add termios-c_iflag.h. * sysdeps/unix/sysv/linux/bits/termios-c_iflag.h: New file. * sysdeps/unix/sysv/linux/alpha/bits/termios-c_iflag.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/bits/termios-c_iflag.h: Likewise. * sysdeps/unix/sysv/linux/bits/termios.h (IGNBRK, BRKINT, IGNPAR, PARMRK, INPCK, ISTRIP, INLCR, IGNCR, ICRNL, IXON, IXOFF, IXANY, IUCLC, IMAXBEL, IUTF8): Move to termios-c_iflag.h. * sysdeps/unix/sysv/linux/alpha/bits/termios.h: Likewise. * sysdeps/unix/sysv/linux/mips/bits/termios.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/bits/termios.h: Likewise. * sysdeps/unix/sysv/linux/sparc/bits/termios.h: Likewise.
2019-01-03termios: Consolidate termios c_cc symbolic constantsAdhemerval Zanella12-103/+228
This patch consolidates the termios symbolic constants used as subscript for the array c_cc on its own header. The Linux generic implementation values match the kernel UAPI and each architecture with deviate values have their own implementation (in this case alpha, mips64, sparc64, and powerpc). No semantic change is expected, checked on a build against x86_64-linux-gnu, alpha-linux-gnu, mips64-linux-gnu, and sparc64-linux-gnu. * sysdeps/unix/sysv/linux/Makefile (sysdeps_headers): Add termios-cc.h. * sysdeps/unix/sysv/linux/bits/termios-c_cc.h: Likewise. * sysdeps/unix/sysv/linux/alpha/bits/termios-c_cc.h: New file. * sysdeps/unix/sysv/linux/mips/bits/termios-c_cc.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/bits/termios-c_cc.h: Likewise. * sysdeps/unix/sysv/linux/sparc/bits/termios-c_cc.h: Likewise. * sysdeps/unix/sysv/linux/bits/termios.h (VINTR, VQUIT, VERASE, VKILL, VEOF, VTIME, VMIN, VSWTC, VSTART, VSTOP, VSUSP, VEOL, VREPRINT, VDISCARD, VWERASE, VLNEXT, VEOLF2): Move to termios-cc.h. * sysdeps/unix/sysv/linux/alpha/bits/termios.h: Likewise. * sysdeps/unix/sysv/linux/mips/bits/termios.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/bits/termios.h: Likewise. * sysdeps/unix/sysv/linux/sparc/bits/termios.h: Likewise.
2019-01-03termios: Consolidate struct termiosAdhemerval Zanella17-76/+195
This patch consolidates the struct termios definition on its own header and adds arch-defined ones for ABIs that deviate from generic implementation. They are: - alpha which has a slight different layout than generic one (c_cc field is defined prior c_line). - sparc and mips which do not have the c_ispeed/c_ospeed fields. No semantic change is expected, checked on a build against x86_64-linux-gnu, alpha-linux-gnu, mips64-linux-gnu, and sparc64-linux-gnu. * sysdeps/unix/sysv/linux/alpha/bits/termios-struct.h: New file. * sysdeps/unix/sysv/linux/bits/termios-struct.h: Likewise. * sysdeps/unix/sysv/linux/mips/bits/termios-struct.h: Likewise. * sysdeps/unix/sysv/linux/sparc/bits/termios-struct.h: Likewise. * sysdeps/unix/sysv/linux/Makefile (sysdep_headers): Add termios-struct.h. * sysdeps/unix/sysv/linux/bits/termios.h (struct termios): Move to termios-struct.h. * sysdeps/unix/sysv/linux/alpha/bits/termios.h (struct termios): Likewise. * sysdeps/unix/sysv/linux/mips/bits/termios.h (struct termios): Likewise. * sysdeps/unix/sysv/linux/powerpc/bits/termios.h (struct termios): Likewise. * sysdeps/unix/sysv/linux/sparc/bits/termios.h (struct termios): Likewise. * sysdeps/unix/sysv/linux/kernel_termios.h (_HAVE_C_ISPEED, _HAVE_C_OSPEED): Define. * sysdeps/unix/sysv/linux/mips/kernel_termios.h (_HAVE_C_ISPEED, _HAVE_C_OSPEED): Likewise. * sysdeps/unix/sysv/linux/sparc/kernel_termios.h (_HAVE_C_ISPEED, _HAVE_C_OSPEED): Likewise. * sysdeps/unix/sysv/linux/speed.c [_HAVE_STRUCT_TERMIOS_C_OSPEED] (cfsetospeed): Check for define value instead of existence. [_HAVE_STRUCT_TERMIOS_C_ISPEED] (cfsetispeed): Likewise. * sysdeps/unix/sysv/linux/tcgetattr.c [_HAVE_STRUCT_TERMIOS_C_ISPEED && _HAVE_C_ISPEED] (__tcgetattr): Likewise. * sysdeps/unix/sysv/linux/tcsetattr.c [_HAVE_STRUCT_TERMIOS_C_ISPEED && _HAVE_C_ISPEED] (__tcsetattr): Likewise.
2019-01-03termios: Define TIOCSER_TEMT with __USE_MISC (BZ#17783)Adhemerval Zanella4-3/+20
This patch defines TIOCSER_TEMT on all architectures using the __USE_MISC guards similar to BZ#17782 fix. Latest Linux UAPI defines TIOCSER_TEMT with the same value for all architectures, so it is safe to use the value as default for all ABIs. Checked on x86_64linux-gnu and build against sparc64-linux-gnu and powerpc64le-linux-gnu. [BZ #17783] * sysdeps/unix/sysv/linux/bits/termios.h [__USE_MISC] (TIOCSER_TEMT): Define. * sysdeps/unix/sysv/linux/powerpc/bits/termios.h [__USE_MISC] (TIOCSER_TEMT): Likewise. * sysdeps/unix/sysv/linux/sparc/bits/termios.h [__USE_MISC] (TEOCSER_TEMT): Likewise.
2019-01-02bs_BA: Fix a small typo in comment (bug 24011).PanderMusubi2-1/+6
[BZ #24011] * localedata/locales/bs_BA (LC_TELEPHONE): Fix a typo in comment.
2019-01-02Update powerpc-nofpu libm-test-ulps.Joseph Myers2-44/+48
* sysdeps/powerpc/nofpu/libm-test-ulps: Update.
2019-01-02hurd: advertise *_setpshared as not supportedSamuel Thibault6-0/+18
The functions themselves return 0, but initializing a mutex/etc with . pshared set to 1 will fail anyway . * sysdeps/htl/pt-barrierattr-setpshared.c (pthread_barrierattr_setpshared): Add stub warning. * sysdeps/htl/pt-condattr-setpshared.c (pthread_condattr_setpshared): Likewise. * sysdeps/htl/pt-mutexattr-setpshared.c (pthread_mutexattr_setpshared): Likewise. * sysdeps/htl/pt-rwlockattr-setpshared.c (pthread_rwlockattr_setpshared): Likewise. * sysdeps/mach/hurd/htl/pt-mutexattr-setpshared.c (pthread_mutexattr_setpshared): Likewise.
2019-01-02Update Linux kernel version in tst-mman-consts.py.Joseph Myers2-1/+4
This patch updates the Linux kernel version in tst-mman-consts.py to 4.20 (meaning that's the version for which glibc is expected to have the same constants as the kernel, up to the exceptions listed in the test). (Once we have more such tests sharing common infrastructure, I expect the kernel version will be something set in the infrastructure shared by all such tests, rather than something needing updating separately for each test for each new kernel version.) Tested with build-many-glibcs.py. * sysdeps/unix/sysv/linux/tst-mman-consts.py (main): Expect constants to match with Linux 4.20.
2019-01-02Update MIPS libm-test-ulps.Joseph Myers3-88/+93
* sysdeps/mips/mips32/libm-test-ulps: Update. * sysdeps/mips/mips64/libm-test-ulps: Likewise.
2019-01-02ARM: fix kernel assisted atomics with GCC 8 (bug 24034)Aurelien Jarno2-5/+20
The pre-ARMv7 CPUs are missing atomic compare and exchange and/or barrier instructions. Therefore those are implemented using kernel assistance, calling a kernel function at a specific address, and passing the arguments in the r0 to r4 registers. This is done by specifying registers for local variables. The a_ptr variable is placed in the r2 register and declared with __typeof (mem). According to the GCC documentation on local register variables, if mem is a constant pointer, the compiler may substitute the variable with its initializer in asm statements, which may cause the corresponding operand to appear in a different register. This happens in __libc_start_main with the pointer to the thread counter for static binaries (but not the shared ones): # ifdef SHARED unsigned int *ptr = __libc_pthread_functions.ptr_nthreads; # ifdef PTR_DEMANGLE PTR_DEMANGLE (ptr); # endif # else extern unsigned int __nptl_nthreads __attribute ((weak)); unsigned int *const ptr = &__nptl_nthreads; # endif This causes static binaries using threads to crash when the GNU libc is built with GCC 8 and most notably tst-cancel21-static. To fix that, use the same trick than for the volatile qualifier, defining a_ptr as a union. Changelog: [BZ #24034] * sysdeps/unix/sysv/linux/arm/atomic-machine.h (__arm_assisted_compare_and_exchange_val_32_acq): Use uint32_t rather than __typeof (...) for the a_ptr variable.
2019-01-02Set behavior of sprintf-like functions with overlapping source and destinationGabriel F. T. Gomes8-4/+149
According to ISO C99, passing the same buffer as source and destination to sprintf, snprintf, vsprintf, or vsnprintf has undefined behavior. Until the commit commit 4e2f43f842ef5e253cc23383645adbaa03cedb86 Author: Zack Weinberg <zackw@panix.com> Date: Wed Mar 7 14:32:03 2018 -0500 Use PRINTF_FORTIFY instead of _IO_FLAGS2_FORTIFY (bug 11319) a call to sprintf or vsprintf with overlapping buffers, for instance vsprintf (buf, "%sTEXT", buf), would append `TEXT' into buf, while a call to snprintf or vsnprintf would override the contents of buf. After the aforementioned commit, the behavior of sprintf and vsprintf changed (so that they also override the contents of buf). This patch reverts this behavioral change, because it will likely break applications that rely on the previous behavior, even though it is undefined by ISO C. As noted by Szabolcs Nagy, this is used in SPEC2017 507.cactuBSSN_r/src/PUGH/PughUtils.c: sprintf(mess," Size:"); for (i=0;i<dim+1;i++) { sprintf(mess,"%s %d",mess,pughGH->GFExtras[dim]->nsize[i]); } More important to notice is the fact that the overwriting of the destination buffer is not the only behavior affected by the refactoring. Before the refactoring, sprintf and vsprintf would use _IO_str_jumps, whereas __sprintf_chk and __vsprintf_chk would use _IO_str_chk_jumps. After the refactoring, all use _IO_str_chk_jumps, which would make sprintf and vsprintf report buffer overflows and terminate the program. This patch also reverts this behavior, by installing the appropriate jump table for each *sprintf functions. Apart from reverting the changes, this patch adds a test case that has the old behavior hardcoded, so that regressions are noticed if something else unintentionally changes the behavior. Tested for powerpc64le.
2019-01-02Fix ChangeLog entryFlorian Weimer1-1/+1
2019-01-02intl: Do not return NULL on asprintf failure in gettext [BZ #24018]Florian Weimer2-1/+7
Fixes commit 9695dd0c9309712ed8e9c17a7040fe7af347f2dc ("DCIGETTEXT: Use getcwd, asprintf to construct absolute pathname").
2019-01-02nptl/tst-audit-threads: Switch to <support/test-driver.c>Florian Weimer2-8/+10
This is a new test, so it should use the test driver in the support subdirectory.
2019-01-01Add IPV6_MULTICAST_ALL from Linux 4.20 to bits/in.h.Joseph Myers2-0/+4
This patch adds the IPV6_MULTICAST_ALL constant from Linux 4.20 to bits/in.h. Tested for x86_64. * sysdeps/unix/sysv/linux/bits/in.h (IPV6_MULTICAST_ALL): New macro.
2019-01-01Add PACKET_IGNORE_OUTGOING from Linux 4.20 to netpacket/packet.h.Joseph Myers2-0/+4
This patch adds the PACKET_IGNORE_OUTGOING constant from Linux 4.20 to netpacket/packet.h. Tested for x86_64. * sysdeps/unix/sysv/linux/netpacket/packet.h (PACKET_IGNORE_OUTGOING): New macro.
2019-01-01Add HWCAP_SSBS from Linux 4.20 to AArch64 bits/hwcap.h.Joseph Myers2-0/+4
This patch adds the HWCAP_SSBS constant from Linux 4.20 to the AArch64 bits/hwcap.h. Tested with build-many-glibcs.py for aarch64-linux-gnu. * sysdeps/unix/sysv/linux/aarch64/bits/hwcap.h (HWCAP_SSBS): New macro.
2019-01-01Update syscall-names.list for Linux 4.20.Joseph Myers2-2/+7
This patch updates sysdeps/unix/sysv/linux/syscall-names.list for Linux 4.20. Although there are no new syscalls, the riscv_flush_icache syscall has moved to asm/unistd.h (previously in asm/syscalls.h) and so now needs to be added to the list. Tested with build-many-glibcs.py. * sysdeps/unix/sysv/linux/syscall-names.list: Update kernel version to 4.20. (riscv_flush_icache): New syscall.
2019-01-01Update miscellaneous files from upstream sources.Joseph Myers5-86/+37
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.
2019-01-01Update copyright dates not handled by scripts/update-copyrights.Joseph Myers28-27/+55
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.
2019-01-01Update copyright dates with scripts/update-copyrights.Joseph Myers10643-10643/+10649
* 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.
2018-12-31Update timezone code from tzcode 2018i.Joseph Myers3-5/+12
This patch updates files coming from tzcode to the versions in tzcode 2018i. No changes elsewhere in glibc were needed. Tested for x86_64. * timezone/zdump.c: Update from tzcode 2018i. * timezone/zic.c: Likewise.
2018-12-31regex: improve Gnulib port to AIXPaul Eggert2-12/+10
From the glibc point of view, this removes duplicate macro definitions and is obviously safe. From the Gnulib point of view, this pacifies xlc 12.01 on AIX 7.1. * posix/regex_internal.h: (__attribute__, __attribute_warn_unused_result__): Remove; already defined elsewhere.
2018-12-31malloc: Always call memcpy in _int_realloc [BZ #24027]Florian Weimer2-42/+8
This commit removes the custom memcpy implementation from _int_realloc for small chunk sizes. The ncopies variable has the wrong type, and an integer wraparound could cause the existing code to copy too few elements (leaving the new memory region mostly uninitialized). Therefore, removing this code fixes bug 24027.
2018-12-31riscv: Use __has_include__ to include <asm/syscalls.h> [BZ #24022]H.J. Lu2-1/+11
<asm/syscalls.h> has been removed by commit 27f8899d6002e11a6e2d995e29b8deab5aa9cc25 Author: David Abdurachmanov <david.abdurachmanov@gmail.com> Date: Thu Nov 8 20:02:39 2018 +0100 riscv: add asm/unistd.h UAPI header Marcin Juszkiewicz reported issues while generating syscall table for riscv using 4.20-rc1. The patch refactors our unistd.h files to match some other architectures. - Add asm/unistd.h UAPI header, which has __ARCH_WANT_NEW_STAT only for 64-bit - Remove asm/syscalls.h UAPI header and merge to asm/unistd.h - Adjust kernel asm/unistd.h So now asm/unistd.h UAPI header should show all syscalls for riscv. <asm/syscalls.h> may be restored by Subject: [PATCH] riscv: restore asm/syscalls.h UAPI header Date: Tue, 11 Dec 2018 09:09:35 +0100 UAPI header asm/syscalls.h was merged into UAPI asm/unistd.h header, which did resolve issue with missing syscalls macros resulting in glibc (2.28) build failure. It also broke glibc in a different way: asm/syscalls.h is being used by glibc. I noticed this while doing Fedora 30/Rawhide mass rebuild. The patch returns asm/syscalls.h header and incl. it into asm/unistd.h. I plan to send a patch to glibc to use asm/unistd.h instead of asm/syscalls.h In the meantime, we use __has_include__, which was added to GCC 5, to check if <asm/syscalls.h> exists before including it. Tested with build-many-glibcs.py for riscv against kernel 4.19.12 and 4.20-rc7. [BZ #24022] * sysdeps/unix/sysv/linux/riscv/flush-icache.c: Check if <asm/syscalls.h> exists with __has_include__ before including it.
2018-12-31Use Linux 4.20 in build-many-glibcs.py.Joseph Myers2-1/+6
* scripts/build-many-glibcs.py (Context.checkout): Default Linux version to 4.20.
2018-12-28hurd: Handle "pid" magical lookup retryJustus Winter2-13/+71
* hurd/lookup-retry: Include <unistd.h>. (__hurd_file_name_lookup_retry): Keep a ref on last result in `lastdir'. Release it on return. Handle "pid" magical lookup retry.
2018-12-28Multiple locales: Use the correct 12-hour time formats (bug 10496).Rafal Luzynski80-112/+245
It has been discovered that some locales use the 12-hour time formats but do not use any AM/PM indicator thus making the time ambiguous. This commit adds "%p" wherever it was missing. In some cases it has been identified that a locale should use 24-hour time format rather than 12-hour. All time formats come from CLDR but this commit introduces as few changes as possible (for example, it tries not to change the time zone display). For the locales which are not supported by CLDR the consistency with similar locales (which means the same language or the same country) has been preserved: if the time formats were the same before the change then they are still the same after the change. The time format updates can be roughly summarized as follows: * Most of the locales of Djibouti, Eritrea, and Ethiopia now use "%l:%M:%S %p". * Most of the locales of India and some surrounding countries (Bangladesh, Nepal etc.) now use "%I:%M:%S %p %Z". * Most of the Arabic locales now use "%Z %I:%M:%S %p". * Ge'ez language (Eritrea and Ethiopia) now uses "%l:%M:%S፡%p" (note the consistent use of Ethiopic wordspace character). * Tamil (India) now uses "%p %I:%M:%S %Z". * Chinese (Hong Kong) t_fmt now uses "%p %I<U6642>%M<U5206>%S<U79D2> %Z". * Additionally, the following locales have been switched from 12-hour time formats to 24-hour, according to CLDR: Arabic (Morocco), Maltese, Somali (Kenya), and Tamil (Sri Lanka). * Finally, the Bulgarian, Czech, and Slovak locales used 24-hour time format correctly but their t_fmt_ampm field was not empty containing 12-hour time format which was incorrect so it is now replaced with an empty string. [BZ #10496] * localedata/locales/aa_DJ (t_fmt): Set to "%l:%M:%S %p". (t_fmt_ampm): Likewise. * localedata/locales/aa_ER (t_fmt): Likewise. (t_fmt_ampm): Likewise. * localedata/locales/aa_ER@saaho (t_fmt): Likewise. (t_fmt_ampm): Likewise. * localedata/locales/aa_ET (t_fmt): Likewise. (t_fmt_ampm): Likewise. * localedata/locales/am_ET (t_fmt): Likewise. (t_fmt_ampm): Likewise. * localedata/locales/byn_ER (t_fmt): Likewise. (t_fmt_ampm): Likewise. * localedata/locales/om_ET (t_fmt): Likewise. (t_fmt_ampm): Likewise. * localedata/locales/sid_ET (t_fmt): Likewise. (t_fmt_ampm): Likewise. * localedata/locales/so_DJ (t_fmt): Likewise. (t_fmt_ampm): Likewise. * localedata/locales/so_ET (t_fmt): Likewise. (t_fmt_ampm): Likewise. * localedata/locales/so_SO (t_fmt): Likewise. (t_fmt_ampm): Likewise. * localedata/locales/ti_ER (t_fmt): Likewise. (t_fmt_ampm): Likewise. * localedata/locales/ti_ET (t_fmt): Likewise. (t_fmt_ampm): Likewise. * localedata/locales/tig_ER (t_fmt): Likewise. (t_fmt_ampm): Likewise. * localedata/locales/wal_ET (t_fmt): Likewise. (t_fmt_ampm): Likewise. * localedata/locales/anp_IN (t_fmt): Set to "%I:%M:%S %p %Z". * localedata/locales/ar_IN (t_fmt): Likewise. * localedata/locales/bhb_IN (t_fmt): Likewise. * localedata/locales/bho_IN (t_fmt): Likewise. * localedata/locales/bi_VU (t_fmt): Likewise. * localedata/locales/bn_BD (t_fmt): Likewise. * localedata/locales/bn_IN (t_fmt): Likewise. * localedata/locales/brx_IN (t_fmt): Likewise. * localedata/locales/doi_IN (t_fmt): Likewise. * localedata/locales/en_HK (t_fmt): Likewise. (t_fmt_ampm): Likewise. * localedata/locales/en_IN (t_fmt): Likewise. * localedata/locales/en_PH (t_fmt): Likewise. * localedata/locales/gu_IN (t_fmt): Likewise. * localedata/locales/hi_IN (t_fmt): Likewise. * localedata/locales/hif_FJ (t_fmt): Likewise. * localedata/locales/hne_IN (t_fmt): Likewise. * localedata/locales/kn_IN (t_fmt): Likewise. * localedata/locales/kok_IN (t_fmt): Likewise. * localedata/locales/ks_IN (t_fmt): Likewise. * localedata/locales/ks_IN@devanagari (t_fmt): Likewise. * localedata/locales/mag_IN (t_fmt): Likewise. * localedata/locales/mai_IN (t_fmt): Likewise. * localedata/locales/mjw_IN (t_fmt): Likewise. * localedata/locales/ml_IN (t_fmt): Likewise. * localedata/locales/mni_IN (t_fmt): Likewise. * localedata/locales/mr_IN (t_fmt): Likewise. * localedata/locales/ms_MY (t_fmt): Likewise. * localedata/locales/pa_IN (t_fmt): Likewise. * localedata/locales/raj_IN (t_fmt): Likewise. * localedata/locales/sa_IN (t_fmt): Likewise. * localedata/locales/sat_IN (t_fmt): Likewise. * localedata/locales/sd_IN (t_fmt): Likewise. * localedata/locales/sd_IN@devanagari (t_fmt): Likewise. * localedata/locales/tcy_IN (t_fmt): Likewise. * localedata/locales/the_NP (t_fmt): Likewise. * localedata/locales/to_TO (t_fmt): Likewise. * localedata/locales/ur_IN (t_fmt): Likewise. * localedata/locales/hif_FJ (d_t_fmt): Set to "%A %d %b %Y %I:%M:%S %p". (date_fmt): Add, set to "%A %d %b %Y %I:%M:%S %p %Z". * localedata/locales/ar_AE (t_fmt): Set to "%Z %I:%M:%S %p". * localedata/locales/ar_BH (t_fmt): Likewise. * localedata/locales/ar_DZ (t_fmt): Likewise. * localedata/locales/ar_EG (t_fmt): Likewise. * localedata/locales/ar_IQ (t_fmt): Likewise. * localedata/locales/ar_JO (t_fmt): Likewise. * localedata/locales/ar_KW (t_fmt): Likewise. * localedata/locales/ar_LB (t_fmt): Likewise. * localedata/locales/ar_LY (t_fmt): Likewise. * localedata/locales/ar_OM (t_fmt): Likewise. * localedata/locales/ar_QA (t_fmt): Likewise. * localedata/locales/ar_SD (t_fmt): Likewise. * localedata/locales/ar_SS (t_fmt): Likewise. * localedata/locales/ar_SY (t_fmt): Likewise. * localedata/locales/ar_TN (t_fmt): Likewise. * localedata/locales/ar_YE (t_fmt): Likewise. * localedata/locales/gez_ER (t_fmt): Set to "%l:%M:%S<U1361>%p". (t_fmt_ampm): Likewise. * localedata/locales/gez_ET (t_fmt): Likewise. (t_fmt_ampm): Likewise. * localedata/locales/ta_IN (t_fmt): Set to "%p %I:%M:%S %Z". (t_fmt_ampm): Likewise. (d_t_fmt): Set to "%A %d %B %Y %p %I:%M:%S %Z". * localedata/locales/zh_HK (t_fmt): Set to "%p %I<U6642>%M<U5206>%S<U79D2> %Z". * localedata/locales/ar_MA (t_fmt_ampm): Set to "" (empty string) because this locale does not use the 12-hour clock. (t_fmt): Set to "%Z %H:%M:%S". (d_t_fmt): Set to "%d %b, %Y %Z %H:%M:%S". * localedata/locales/mt_MT (t_fmt_ampm): Set to "" (empty string) because this locale does not use the 12-hour clock. (t_fmt): Set to "%H:%M:%S %Z". (d_t_fmt): Set to "%A, %d ta %b, %Y %H:%M:%S %Z". * localedata/locales/so_KE (t_fmt_ampm): Set to "" (empty string) because this locale does not use the 12-hour clock. (t_fmt): Set to "%T". (d_t_fmt): Set to "%A, %B %e, %Y %X %Z". (date_fmt): Set to "%A, %B %e, %X %Z %Y". * localedata/locales/ta_LK (t_fmt_ampm): Set to "" (empty string) because this locale does not use the 12-hour clock. (t_fmt): Set to "%H:%M:%S %Z". (d_t_fmt): Set to "%A %d %B %Y %H:%M:%S %Z". * localedata/locales/bg_BG (t_fmt_ampm): Set to "" (empty string) because this locale does not use the 12-hour clock. * localedata/locales/cs_CZ (t_fmt_ampm): Likewise. * localedata/locales/sk_SK (t_fmt_ampm): Likewise.
2018-12-28sq_AL: Use the correct date and time formats (bug 10496, 23724).Rafal Luzynski2-4/+17
Albanian locale uses the 12-hour clock but some time formats did not use any AM/PM indicator making the time ambiguous. This commit adds "%p" wherever it was missing. It also sets the correct date format because the old "%Y-%b-%d" produced rather weird results like "2018-Sht-28". All time formats come from CLDR but as few changes have been introduced by this commit as possible. Some articles from MSDN and other available online sources have been also taken into account. [BZ #10496] [BZ #23724] * localedata/locales/sq_AL (t_fmt): Set to "%I:%M:%S.%p %Z". (t_fmt_ampm): Likewise. (d_t_fmt): Set to "%a %-d %b %Y %I:%M:%S.%p". (date_fmt): Add, set to "%a %-d %b %Y %I:%M:%S.%p %Z". (d_fmt): Set to "%-d.%-m.%y".
2018-12-28NEWS: Fix another typo ("multithread..." -> "multi-threaded...").Rafal Luzynski1-1/+1
Thank you Florian Weimer and Paul Eggert for proofreading this.
2018-12-28Replace check_mul_overflow_size_t with __builtin_mul_overflowAdhemerval Zanella7-53/+21
Checked on x86_64-linux-gnu and i686-linux-gnu. * malloc/alloc_buffer_alloc_array.c (__libc_alloc_buffer_alloc_array): Use __builtin_mul_overflow in place of check_mul_overflow_size_t. * malloc/dynarray_emplace_enlarge.c (__libc_dynarray_emplace_enlarge): Likewise. * malloc/dynarray_resize.c (__libc_dynarray_resize): Likewise. * malloc/reallocarray.c (__libc_reallocarray): Likewise. * malloc/malloc-internal.h (check_mul_overflow_size_t): Remove function. * support/blob_repeat.c (check_mul_overflow_size_t, (minimum_stride_size, support_blob_repeat_allocate): Likewise.
2018-12-28Update Alpha libm-test-ulpsAurelien Jarno2-40/+52
Changelog: * sysdeps/alpha/fpu/libm-test-ulps: Regenerated.
2018-12-28NEWS: Fix a minor typo ("incosistent" -> "inconsistent").Rafal Luzynski1-1/+1
2018-12-27regex: simplify Gnulib portPaul Eggert5-30/+23
This simplifies the code, by removing stuff intended for porting to Gnulib but no longer needed there. * posix/regcomp.c [!_LIBC]: No need to put #ifdef _LIBC around uses of libc_hidden_def, weak_alias. * posix/regcomp.c, posix/regexec.c: Use __restrict rather than _Restrict_ except for public-facing headers. * posix/regex_internal.h (attribute_hidden) [!_LIBC]: Remove; already defined elsewhere. * posix/regex.c, posix/regex_internal.h: Use __GNUC_PREREQ instead of rolling our own. * posix/regex_internal.h (__GNUC_PREREQ): Remove duplicate defn.
2018-12-27Improve bench-strlenWilco Dijkstra2-14/+25
The current bench-strlen compares against a slow byte-oriented strlen which is not useful given it's too easy to beat. Remove it and compare against the generic C strlen version and memchr. * benchtests/bench-strlen.c (generic_strlen): New function. (memchr_strlen): New function.
2018-12-26x86-64: Remove s_sincosf-sse2.SH.J. Lu4-568/+8
The current s_sincosf.c is faster than s_sincosf-sse2.S. On Broadwell with FMA disabled, bench-sincosf shows: Before After Improvement max 154.032 114.517 34% min 6.25 5.609 11% mean 14.8728 12.8589 15% * sysdeps/x86_64/fpu/s_sincosf.S: Removed. * sysdeps/x86_64/fpu/multiarch/s_sincosf-sse2.S: Likewise. * sysdeps/x86_64/fpu/multiarch/s_sincosf-sse2.c: New file.
2018-12-26Regenerate sysdeps/x86_64/fpu/libm-test-ulpsH.J. Lu2-0/+10
* sysdeps/x86_64/fpu/libm-test-ulps: Regenerated.
2018-12-26x86-64: Vectorize sincosf_poly and update s_sincosf-fma.cH.J. Lu6-340/+278
Add <sincosf_poly.h> and include it in s_sincosf.h to allow vectorized sincosf_poly. Add x86 sincosf_poly.h to vectorize sincosf_poly. On Broadwell, bench-sincosf shows: Before After Improvement max 160.273 114.198 40% min 6.25 5.625 11% mean 13.0325 10.6462 22% Vectorized sincosf_poly shows Before After Improvement max 138.653 114.198 21% min 5.004 5.625 -11% mean 11.5934 10.6462 9% Tested on x86-64 and i686 as well as with build-many-glibcs.py. * sysdeps/ieee754/flt-32/s_sincosf.h: Include <sincosf_poly.h>. (sincos_t, sincosf_poly, sinf_poly): Moved to ... * sysdeps/ieee754/flt-32/sincosf_poly.h: Here. New file. * sysdeps/x86/fpu/s_sincosf_data.c: New file. * sysdeps/x86/fpu/sincosf_poly.h: Likewise. * sysdeps/x86_64/fpu/multiarch/s_sincosf-fma.c: Just include <sysdeps/ieee754/flt-32/s_sincosf.c>.
2018-12-21Update nios2, sparc32 localplt.data for difftime changes (bug 24023).Joseph Myers3-0/+11
The recent difftime changes introduced localplt test failures on nios2 and sparc32, two configurations where some soft-fp functions are defined in / exported from libc.so, and where the difftime changes affected the particular set of floating-point operations used in libc.so. This patch adds those functions to localplt.data, alongside other such functions already there. (In the sparc32 case, and more generally on any platform where long double is a software floating-point type, it would probably be more efficient to avoid using long double at all in difftime, but that's a pre-existing issue.) Tested with build-many-glibcs.py for its nios2 and sparcv9 configurations. [BZ #24023] * sysdeps/unix/sysv/linux/nios2/localplt.data: Allow __floatundidf PLT reference in libc.so. * sysdeps/unix/sysv/linux/sparc/sparc32/localplt.data: Allow _Q_lltoq and _Q_qtod PLT references in libc.so.
2018-12-21Refactor string benchtestsWilco Dijkstra22-207/+95
Refactor string benchtests by moving duplicated defines into bench-string.h. * benchtests/bench-memchr.c: Cleanup defines. * benchtests/bench-memcmp.c: Likewise. * benchtests/bench-memset.c: Likewise. * benchtests/bench-memset-large.c: Likewise. * benchtests/bench-memset-walk.c: Likewise. * benchtests/bench-stpcpy.c: Likewise. * benchtests/bench-stpncpy.c: Likewise. * benchtests/bench-strcat.c: Likewise. * benchtests/bench-strchr.c: Likewise. * benchtests/bench-strcmp.c: Likewise. * benchtests/bench-strcpy.c: Likewise. * benchtests/bench-strcspn.c: Likewise. * benchtests/bench-string.h: Likewise. * benchtests/bench-strlen.c: Likewise. * benchtests/bench-strncat.c: Likewise. * benchtests/bench-strncmp.c: Likewise. * benchtests/bench-strncpy.c: Likewise. * benchtests/bench-strnlen.c: Likewise. * benchtests/bench-strpbrk.c: Likewise. * benchtests/bench-strrchr.c: Likewise. * benchtests/bench-strspn.c: Likewise.
2018-12-21Update longlong.h.Joseph Myers2-58/+59
This patch updates longlong.h from GCC. There were no local changes in glibc (the previous version was identical to the r232143 GCC version, apart from copyright dates which had been updated in both places), so this patch makes it identical to the version in GCC again. Tested for x86_64 and x86. Also tested with build-many-glibcs.py for its RISC-V configurations, as the glibc architecture with the most substantial changes in longlong.h in this patch. * stdlib/longlong.h: Update from GCC.
2018-12-21Require GCC 5 or later to build glibc (bug 23993).Joseph Myers6-6/+21
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.