about summary refs log tree commit diff
Commit message (Collapse)AuthorAgeFilesLines
...
* aarch64: Optimized memcmp for medium to large sizesSiddhesh Poyarekar2018-03-062-21/+58
| | | | | | | | | | | | | This improved memcmp provides a fast path for compares up to 16 bytes and then compares 16 bytes at a time, thus optimizing loads from both sources. The glibc memcmp microbenchmark retains performance (with an error of ~1ns) for smaller compare sizes and reduces up to 31% of execution time for compares up to 4K on the APM Mustang. On Qualcomm Falkor this improves to almost 48%, i.e. it is almost 2x improvement for sizes of 2K and above. * sysdeps/aarch64/memcmp.S: Widen comparison to 16 bytes at a time.
* Add ChangeLog entry for last 3 commitsSiddhesh Poyarekar2018-03-061-0/+11
| | | | Apparently I've forgotten how to commit to glibc.
* benchtests: Don't benchmark 0 length calls for strncmpSiddhesh Poyarekar2018-03-061-24/+0
| | | | | | | | The 0 length strncmp is interesting for correctness but not for performance. * benchtests/bench-strncmp.c (test_main): Remove 0 length tests. (do_test_limit): Likewise.
* benchtests: Reallocate buffers for every strncmp implementationSiddhesh Poyarekar2018-03-061-44/+53
| | | | | | | | | | Don't reuse buffers for different strncmp implementations since the earlier implementation will end up warming the cache for the later one. Eventually there should be a more elegant way to do this. * benchtests/bench-strncmp.c (do_test_limit): Reallocate buffers for every implementation. (do_test): Likewise.
* benchtests: Convert strncmp benchmark output to jsonSiddhesh Poyarekar2018-03-061-60/+96
| | | | | | Make the output usable through the compare_strings.py script. * benchtests/bench-strncmp.c: Convert output to json.
* Add missing start-of-file descriptive comment.Samuel Thibault2018-03-0613-12/+38
| | | | | | | | | | | | | | | * io/futimens.c: Add missing start-of-file descriptive comment. * io/utime.c: Likewise. * misc/futimesat.c: Likewise. * misc/utimes.c: Likewise. * sysdeps/mach/hurd/futimesat.c: Likewise. * sysdeps/mach/hurd/utimes.c: Likewise. * sysdeps/posix/utime.c: Likewise. * sysdeps/posix/utimes.c: Likewise. * sysdeps/unix/sysv/linux/futimesat.c: Likewise. * sysdeps/unix/sysv/linux/generic/futimesat.c: Likewise. * sysdeps/unix/sysv/linux/generic/utimes.c: Likewise. * sysdeps/unix/sysv/linux/utimes.c: Likewise.
* hurd: Add futimesat and utimensat supportSamuel Thibault2018-03-067-36/+181
| | | | | | | | | | | | | | * sysdeps/mach/hurd/utime-helper.c (hurd_futimens): Rename function to hurd_futimes. * sysdeps/mach/hurd/utimes.c (__utimes): Update call accordingly. * sysdeps/mach/hurd/lutimes.c (__lutimes): Likewise. * sysdeps/mach/hurd/futimens.c: Include "utime-helper.c". (__futimens): Move implementation to... * sysdeps/mach/hurd/utime-helper.c (utime_ts_from_tspec, utime_tvalue_from_tspec): ... new helper functions. (hurd_futimens): New function. * sysdeps/mach/hurd/futimesat.c: New file. * sysdeps/mach/hurd/utimensat.c: New file.
* hurd: Define and pass UTIME_NOW and UTIME_OMIT to new file_utimens RPCFlávio Cruz2018-03-057-53/+164
| | | | | | | | | | | | | | | * sysdeps/mach/hurd/bits/stat.h [__USE_ATFILE] (UTIME_NOW, UTIME_OMIT): New macros. * sysdeps/mach/hurd/futimens.c (__futimens): Try to use __file_utimens before reverting to converting time spec to time value and calling __file_utimes. * sysdeps/mach/hurd/utime-helper.c: New file. * sysdeps/mach/hurd/futimes.c: Include "utime-helper.c". (__futimes): Try to use utime_ts_from_tval and __file_utimens before reverting to utime_tvalue_from_tval and __file_utimes. * sysdeps/mach/hurd/lutimes.c: Include "utime-helper.c". (__lutimes): Just call hurd_futimens after lookup. * sysdeps/mach/hurd/utimes.c: Likewise.
* hurd: Fix includability of <hurd/signal.h> in all standardsSamuel Thibault2018-03-0511-0/+59
| | | | | | | | | | | | | * bits/sigaction.h: Add include guard. * sysdeps/unix/sysv/linux/alpha/bits/sigaction.h: Likewise. * sysdeps/unix/sysv/linux/bits/sigaction.h: Likewise. * sysdeps/unix/sysv/linux/hppa/bits/sigaction.h: Likewise. * sysdeps/unix/sysv/linux/ia64/bits/sigaction.h: Likewise. * sysdeps/unix/sysv/linux/mips/bits/sigaction.h: Likewise. * sysdeps/unix/sysv/linux/s390/bits/sigaction.h: Likewise. * sysdeps/unix/sysv/linux/sparc/bits/sigaction.h: Likewise. * sysdeps/unix/sysv/linux/tile/bits/sigaction.h: Likewise. * hurd/hurd/signal.h: Include <bits/sigaction.h>.
* Fix s390 -Os iconv build.Joseph Myers2018-03-053-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Building glibc for s390 with -Os (32-bit only, with GCC 7) fails with: In file included from ../sysdeps/s390/multiarch/8bit-generic.c:370:0, from ebcdic-at-de.c:28: ../iconv/loop.c: In function '__to_generic_vx': ../iconv/loop.c:264:22: error: 'ch' may be used uninitialized in this function [-Werror=maybe-uninitialized] if (((Character) >> 7) == (0xe0000 >> 7)) \ ^~ In file included from ebcdic-at-de.c:28:0: ../sysdeps/s390/multiarch/8bit-generic.c:340:15: note: 'ch' was declared here uint32_t ch; \ ^ ../iconv/loop.c:325:7: note: in expansion of macro 'BODY' BODY ^~~~ It's fairly easy to see, looking at the (long) expansion of the BODY macro, that this is a false positive and the relevant variable 'ch' is always initialized before use, in one of two possible places. As such, disabling the warning for -Os with the DIAG_* macros is the natural approach to fix this build failure. However, because of the location at which the warning is reported, the disabling needs to go in iconv/loop.c, around the definition of UNICODE_TAG_HANDLER (not inside the definition), as that macro definition is where the uninitialized use is reported, whereas the code that needs to be reasoned about to see that the warning is a false positive is in the definition of BODY elsewhere. Thus, the patch adds such disabling in iconv/loop.c, with a comment pointing to the s390-specific code and a comment in the s390-specific code pointing to the generic file to alert people to the possible need to update one place when changing the other. It would be possible if desired to use #ifdef __s390__ around the disabling, though in general we try to avoid that sort of thing in generic files. (Or some extremely specialized macros for "disable -Wmaybe-uninitialized in this particular place" could be specified, defined to 0 in a lot of different files that include iconv/loop.c and to 1 in that particular s390 file.) Tested that this fixed -Os compilation for s390-linux-gnu with build-many-glibcs.py. * iconv/loop.c (UNICODE_TAG_HANDLER): Disable -Wmaybe-uninitialized for -Os. * sysdeps/s390/multiarch/8bit-generic.c (BODY): Add comment about this disabling.
* Define _DIRENT_MATCHES_DIRENT64 regardlessAdhemerval Zanella2018-03-0513-10/+29
| | | | | | | | | | | | | | | | | | | | | | This patch defines _DIRENT_MATCHES_DIRENT64 to either 0 or 1 and adjust its usage from checking its definition to its value. Checked on a build for major Linux abis. * bits/dirent.h (__INO_T_MATCHES_INO64_T): Define regardless whether __INO_T_MATCHES_INO64_T is defined. * sysdeps/unix/sysv/linux/bits/dirent.h: Likewise. * dirent/alphasort.c: Check _DIRENT_MATCHES_DIRENT64 value instead of definition. * dirent/alphasort64.c: Likewise. * dirent/scandir.c: Likewise. * dirent/scandir64-tail.c: Likewise. * dirent/scandir64.c: Likewise. * dirent/scandirat.c: Likewise. * dirent/scandirat64.c: Likewise. * dirent/versionsort.c: Likewise. * dirent/versionsort64.c: Likewise. * include/dirent.h: Likewise.
* nptl: Fix tst-cancel4 sendto testsAdhemerval Zanella2018-03-056-48/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that send might be implemented calling sendto syscall on Linux, I am seeing some issue in some kernel configurations where tst-cancel4 sendto do not block as expected. The socket used to force the syscall blocking is used with default system configuration for buffer sending size, which might not be suffice to force blocking. This patch fixes it by explicit setting buffer socket lower than the buffer size used. It also enables sendto cancellation tests to work in both ways (since internally send is implemented routing to sendto on Linux kernel). The patch also removes unrequired make rules on some archictures for send/recv. The generic nptl Makefile already set the compiler flags required on some architectures for correct unwinding and libc object are not strictly required to support unwind (since pthread_cancel requires linking against libpthread). Checked on aarch64-linux-gnu and x86_64-linux-gnu. I also did a sniff test with tst-cancel{4,5} on a simulated mips64-linux-gnu. * nptl/tst-cancel4-common.h (set_socket_buffer): New function. * nptl/tst-cancel4-common.c (do_test): Call set_socket_buffer for socketpair endpoint. * nptl/tst-cancel4.c (tf_send): Call set_socket_buffer and use WRITE_BUFFER_SIZE as buffer size for sending socket. (tf_sendto): Use SOCK_STREAM instead of SOCK_DGRAM and fix an issue on system where send is implemented with sendto syscall. * sysdeps/unix/sysv/linux/mips/mips64/Makefile [$(subdir) = socket] (CFLAGS-recv.c, CFLAGS-send.c): Remove rules. [$(subdir) = nptl] (CFLAGS-recv.c, CFLAGS-send.c): Likewise. * sysdeps/unix/sysv/linux/riscv/rv64/Makefile: Remove file.
* i386: Fix i386 sigaction sa_restorer initialization (BZ#21269)Adhemerval Zanella2018-03-054-1/+246
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the i386 sa_restorer field initialization for sigaction syscall for kernel with vDSO. As described in bug report, i386 Linux (and compat on x86_64) interprets SA_RESTORER clear with nonzero sa_restorer as a request for stack switching if the SS segment is 'funny'. This means that anything that tries to mix glibc's signal handling with segmentation (for instance through modify_ldt syscall) is randomly broken depending on what values lands in sa_restorer. The testcase added is based on Linux test tools/testing/selftests/x86/ldt_gdt.c, more specifically in do_multicpu_tests function. The main changes are: - C11 atomics instead of plain access. - Remove x86_64 support which simplifies the syscall handling and fallbacks. - Replicate only the test required to trigger the issue. Checked on i686-linux-gnu. [BZ #21269] * sysdeps/unix/sysv/linux/i386/Makefile (tests): Add tst-bz21269. * sysdeps/unix/sysv/linux/i386/sigaction.c (SET_SA_RESTORER): Clear sa_restorer for vDSO case. * sysdeps/unix/sysv/linux/i386/tst-bz21269.c: New file.
* hurd: Add futimens supportSamuel Thibault2018-03-042-0/+51
| | | | * sysdeps/mach/hurd/futimens.c: New file.
* Separate out error_t definitionSamuel Thibault2018-03-0414-23/+77
| | | | | | | | | | | | | | | | | | so interfaces needing it can get it. * stdlib/errno.h (error_t): Move definition to... * bits/types/error_t.h: ... new header. * stdlib/Makefile (headers): Add bits/types/error_t.h. * sysdeps/mach/hurd/bits/errno.h (error_t): Move definition to... * sysdeps/mach/hurd/bits/types/error_t.h: ... new header. * sysdeps/mach/hurd/errnos.awk (error_t): Likewise. * hurd/hurd.h: Include <bits/types/error_t.h> * hurd/hurd/fd.h: Include <bits/types/error_t.h> * hurd/hurd/id.h: Include <errno.h> and <bits/types/error_t.h> * hurd/hurd/lookup.h: Include <errno.h> and <bits/types/error_t.h> * hurd/hurd/resource.h: Include <bits/types/error_t.h> * hurd/hurd/signal.h: Include <bits/types/error_t.h> * hurd/hurd/sigpreempt.h: Include <bits/types/error_t.h>
* hurd: Make almost all hurd headers includable in all standardsSamuel Thibault2018-03-045-14/+29
| | | | | | | | | | | | | | * hurd/hurd.h: Include <bits/types/sigset_t.h> * hurd/hurd/fd.h: Include <sys/select.h> and <bits/types/sigset_t.h> (_hurd_fd_read, _hurd_fd_write): Use __loff_t instead of loff_t. * hurd/hurd/signal.h: Include <bits/types/stack_t.h> and <bits/types/sigset_t.h>. [!defined __USE_GNU]: Do not #error out. (struct hurd_sigstate): Use _NSIG instead of NSIG. * hurd/hurd/sigpreempt.h (__need_size_t): Define. Include <stddef.h> and <bits/types/sigset_t.h> (struct hurd_signal_preemptor, hurd_catch_signal): Use __sighandler_t instead of sighandler_t.
* hurd: Fix inclusion of mach headers in all standardsSamuel Thibault2018-03-043-20/+4
| | | | | | | | mig_support does not actually inline the stpncpy any more. * mach/mach/mig_support.h [defined __USE_GNU]: Do not #error out. * scripts/check-installed-headers.sh: Do not ignore Hurd and Mach headers.
* hurd: Avoid using ino64_t and loff_t in headersSamuel Thibault2018-03-043-1/+7
| | | | | | * mach/Machrules ($(patsubst %,$(objpfx)%.h,$(user-interfaces)): Process mig output through $(migheaderpipe). * hurd/Makefile (migheaderpipe): Define variable.
* hurd: Add missing includeSamuel Thibault2018-03-042-0/+2
| | | | * sysdeps/mach/hurd/dl-sysdep.c: Include <mach/machine/vm_param.h>.
* hurd: fix header conformitySamuel Thibault2018-03-042-1/+3
| | | | | * hurd/hurd/fd.h (_hurd_fd_error): Fix struct initializer to be trivial, for C++ conformity.
* hurd: avoid including hurd/signal.h when not neededSamuel Thibault2018-03-043-2/+8
| | | | | | | | | thus making <hurd/port.h> and <hurd/userlink.h> includable without _GNU_SOURCE. * hurd/hurd/port.h: Do not include <hurd/signal.h>. * hurd/hurd/userlink.h [!defined __USE_EXTERN_INLINES || !defined _LIBC || !IS_IN (libc)]: Do not include <hurd/signal.h>.
* hurd: Move mach/param.h to bits/mach/param.hSamuel Thibault2018-03-044-3/+8
| | | | | | | | * mach/Makefile (headers): Move mach/param.h to bits/mach/param.h. * sysdeps/mach/i386/mach/param.h: Move file to ... * sysdeps/mach/i386/bits/mach/param.h: ... here. Update path in #error. * sysdeps/mach/hurd/bits/param.h: Include <bits/mach/param.h> instead of <mach/param.h>.
* hurd: Add missing includesSamuel Thibault2018-03-042-3/+8
| | | | | * mach/Makefile ($(objpfx)mach-shortcuts.h): Make it include <mach/mach_types.h> and <mach/message.h>.
* hurd: Add missing includesSamuel Thibault2018-03-034-0/+7
| | | | | | * hurd/hurd/id.h: Include <hurd/hurd_types.h> * hurd/hurd/ioctl.h: Include <mach/port.h> * hurd/hurd/lookup.h: Include <hurd/hurd_types.h>
* hurd: do not check Mach and Hurd headersSamuel Thibault2018-03-032-0/+11
| | | | | | as they are not standard. * scripts/check-installed-headers.sh: Ignore Hurd and Mach headers.
* Fix multiple definitions of __nss_*_database (bug 22918)Andreas Schwab2018-03-037-5/+21
|
* Fix powerpc ifunc-sel.h build for -Os.Joseph Myers2018-03-022-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | Compiling the testsuite for powerpc (multi-arch configurations) with -Os with GCC 7 fails with: In file included from ifuncmod1.c:7:0, from ifuncdep1.c:3: ../sysdeps/powerpc/ifunc-sel.h: In function 'ifunc_sel': ../sysdeps/powerpc/ifunc-sel.h:12:3: error: asm operand 2 probably doesn't match constraints [-Werror] __asm__ ("mflr 12\n\t" ^~~~~~~ ../sysdeps/powerpc/ifunc-sel.h:12:3: error: asm operand 3 probably doesn't match constraints [-Werror] ../sysdeps/powerpc/ifunc-sel.h:12:3: error: asm operand 4 probably doesn't match constraints [-Werror] ../sysdeps/powerpc/ifunc-sel.h:12:3: error: impossible constraint in 'asm' The "i" constraints on function pointers require the function call to be inlined so the compiler can see the constant function pointer arguments passed to the asm. This patch marks the relevant functions as always_inline accordingly. Tested that this fixes the -Os testsuite build for powerpc-linux-gnu-power4, powerpc64-linux-gnu, powerpc64le-linux-gnu with build-many-glibcs.py. * sysdeps/powerpc/ifunc-sel.h (ifunc_sel): Make always_inline. (ifunc_one): Likewise.
* [BZ #22342] Fix netgroup cache keys.DJ Delorie2018-03-012-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unlike other nscd caches, the netgroup cache contains two types of records - those for "iterate through a netgroup" (i.e. setnetgrent()) and those for "is this user in this netgroup" (i.e. innetgr()), i.e. full and partial records. The timeout code assumes these records have the same key for the group name, so that the collection of records that is "this netgroup" can be expired as a unit. However, the keys are not the same, as the in-netgroup key is generated by nscd rather than being passed to it from elsewhere, and is generated without the trailing NUL. All other keys have the trailing NUL, and as noted in the linked BZ, debug statements confirm that two keys for the same netgroup are added to the cache with two different lengths. The result of this is that as records in the cache expire, the purge code only cleans out one of the two types of entries, resulting in stale, possibly incorrect, and possibly inconsistent cache data. The patch simply includes the existing NUL in the computation for the key length ('key' points to the char after the NUL, and 'group' to the first char of the group, so 'key-group' includes the first char to the NUL, inclusive). [BZ #22342] * nscd/netgroupcache.c (addinnetgrX): Include trailing NUL in key value. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* nptl_db: Remove stale `match_pid' parameter from `iterate_thread_list'Maciej W. Rozycki2018-03-012-4/+9
| | | | | | | | | | Complement commit c579f48edba8 ("Remove cached PID/TID in clone") and remove the `match_pid' parameter not used by `iterate_thread_list' any longer. Update call sites accordingly. * nptl_db/td_ta_thr_iter.c (iterate_thread_list): Remove `match_pid' parameter. (td_ta_thr_iter): Update accordingly.
* nptl: Turn libpthread.so into a symbolic link to the real DSOFlorian Weimer2018-03-012-19/+6
| | | | The linker script is no longer needed.
* an_ES locale: update some locale data [BZ #22896]Mike FABIAN2018-03-012-35/+29
| | | | | | | [BZ #22896] * localedata/locales/an_ES: update month and day names, improve d_fmt, improve postal_fmt, add country_post, add country_isbn
* bg_BG locale: Fix a typo in a commentMike FABIAN2018-03-012-1/+6
| | | | | * localedata/locales/bg_BG (LC_COLLATE): The comment mentioned Ukrainian instead of Bulgarian.
* nptl: Drop libpthread_nonshared.a from libpthread.soFlorian Weimer2018-03-012-1/+5
| | | | | Fixes commit bd60ce86520b781ca24b99b2555e2ad389bbfeaa (nptl: Move pthread_atfork to libc_nonshared.a).
* nptl: Move pthread_atfork to libc_nonshared.aFlorian Weimer2018-03-014-16/+23
| | | | | | | | | | | | | libpthread_nonshared.a is unused after this, so remove it from the build. There is no ABI impact because pthread_atfork was implemented using __register_atfork in libc even before this change. pthread_atfork has to be a weak alias because pthread_* names are not reserved in libc. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* Fix i386 fenv_private.h float128 for 32-bit --with-fpmath=sse (bug 22902).Joseph Myers2018-02-282-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As discussed in bug 22902, the i386 fenv_private.h implementation has problems for float128 for the case of 32-bit glibc built with libgcc from GCC configured using --with-fpmath=sse. The optimized floating-point state handling in fenv_private.h needs to know which floating-point state - x87 or SSE - is used for each floating-point type, so that only one state needs updating / testing for libm code using that state internally. On 32-bit x86, the x87 rounding mode is always used for float128, but the x87 exception flags are only used when libgcc is built using x87 floating-point arithmetic; if libgcc is built for SSE arithmetic, the SSE exception flags are used. The choice of arithmetic with which libgcc is built is independent of that with which glibc is built. Thus, since glibc cannot tell the choice used in libgcc, the default implementations of libc_feholdexcept_setroundf128 and libc_feupdateenv_testf128 (which use the <fenv.h> functions, thus using both x87 and SSE state on processors that have both) need to be used; this patch updates the code accordingly. Tested for 32-bit x86; HJ reports testing in the --with-fpmath=sse case. [BZ #22902] * sysdeps/i386/fpu/fenv_private.h [!__x86_64__] (libc_feholdexcept_setroundf128): New macro. [!__x86_64__] (libc_feupdateenv_testf128): Likewise.
* Use libc_hidden_* for strtoumax (bug 15105).Joseph Myers2018-02-284-0/+16
| | | | | | | | | | | | | | | | | | | On sparc, localplt test failures appear when building with -Os because of a call to strtoumax from sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c, and strtoumax is not inlined when building with -Os. This patch fixes those failures by using libc_hidden_proto and libc_hidden_def for strtoumax. Tested with build-many-glibcs.py for sparc64-linux-gnu-disable-multi-arch, sparc64-linux-gnu, sparcv9-linux-gnu-disable-multi-arch, sparcv9-linux-gnu that this fixes that test failure with -Os. [BZ #15105] * sysdeps/wordsize-32/strtoumax.c (strtoumax): Use libc_hidden_def. * sysdeps/wordsize-64/strtoumax.c (strtoumax): Likewise. * include/inttypes.h: New file.
* Fix two more -Os strcoll / wcscoll build failures.Joseph Myers2018-02-272-0/+20
| | | | | | | | | | | | | | | | Continuing fixes for -Os build issues shown with build-many-glibcs.py, this patch adds uses of DIAG_* to disable -Wmaybe-uninitialized in two more places where code inlined from strcoll / wcscoll is wrongly diagnosed as possibly using uninitialized structure fields. (All these warnings in different places for these functions are I think essentially the same bug.) Tested with build-many-glibcs.py for alpha-linux-gnu and mips-linux-gnu that this fixes the -Os build failures for those configurations with GCC 7. * locale/weightwc.h (findidx): Ignore -Wmaybe-uninitialized for -Os in two more places.
* Remove the lines from cmn_TW.UTF-8.in which cannot work at the moment.Mike FABIAN2018-02-272-670/+6
| | | | | | | | | | | | | | See this bug https://sourceware.org/bugzilla/show_bug.cgi?id=22898 These lines don’t yet work because of a glibc bug, not because of problems in the locale data. No matter what sorting rules one uses, these characters cannot be sorted at all at the moment. As soon as that bug is fixed, these lines should be added back to the test file. * localedata/cmn_TW.UTF-8.in: Remove the lines which cannot be sorted correctly at the moment because of a bug.
* Adapt collation in several locales to the new iso14651_t1_common fileMike FABIAN2018-02-27139-5497/+112738
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [BZ #22550] - es_ES locale (and other es_* locales): collation should treat ñ as a primary different character, sync the collation for Spanish with CLDR [BZ #21547] - Tibetan script collation broken (Dzongkha and Tibetan) * localedata/Makefile: Add new test files. * localedata/lv_LV.UTF-8.in: Adapt test file to new collation order. * localedata/sv_SE.ISO-8859-1.in: Adapt test file to new collation order. * localedata/uk_UA.UTF-8.in: Adapt test file to new collation order. * localedata/am_ET.UTF-8.in: New test file. * localedata/az_AZ.UTF-8.in: Likewise. * localedata/be_BY.UTF-8.in: Likewise. * localedata/ber_DZ.UTF-8.in: Likewise. * localedata/ber_MA.UTF-8.in: Likewise. * localedata/bg_BG.UTF-8.in: Likewise. * localedata/br_FR.UTF-8.in: Likewise. * localedata/cmn_TW.UTF-8.in: Likewise. * localedata/crh_UA.UTF-8.in: Likewise. * localedata/csb_PL.UTF-8.in: Likewise. * localedata/cv_RU.UTF-8.in: Likewise. * localedata/cy_GB.UTF-8.in: Likewise. * localedata/dz_BT.UTF-8.in: Likewise. * localedata/eo.UTF-8.in: Likewise. * localedata/es_ES.UTF-8.in: Likewise. * localedata/fa_IR.UTF-8.in: Likewise. * localedata/fi_FI.UTF-8.in: Likewise. * localedata/fil_PH.UTF-8.in: Likewise. * localedata/fur_IT.UTF-8.in: Likewise. * localedata/gez_ER.UTF-8@abegede.in: Likewise. * localedata/ha_NG.UTF-8.in: Likewise. * localedata/ig_NG.UTF-8.in: Likewise. * localedata/ik_CA.UTF-8.in: Likewise. * localedata/kk_KZ.UTF-8.in: Likewise. * localedata/ku_TR.UTF-8.in: Likewise. * localedata/ky_KG.UTF-8.in: Likewise. * localedata/ln_CD.UTF-8.in: Likewise. * localedata/mi_NZ.UTF-8.in: Likewise. * localedata/ml_IN.UTF-8.in: Likewise. * localedata/mn_MN.UTF-8.in: Likewise. * localedata/mr_IN.UTF-8.in: Likewise. * localedata/mt_MT.UTF-8.in: Likewise. * localedata/nb_NO.UTF-8.in: Likewise. * localedata/om_KE.UTF-8.in: Likewise. * localedata/os_RU.UTF-8.in: Likewise. * localedata/ps_AF.UTF-8.in: Likewise. * localedata/ro_RO.UTF-8.in: Likewise. * localedata/ru_RU.UTF-8.in: Likewise. * localedata/sc_IT.UTF-8.in: Likewise. * localedata/se_NO.UTF-8.in: Likewise. * localedata/sq_AL.UTF-8.in: Likewise. * localedata/sv_SE.UTF-8.in: Likewise. * localedata/szl_PL.UTF-8.in: Likewise. * localedata/tg_TJ.UTF-8.in: Likewise. * localedata/tk_TM.UTF-8.in: Likewise. * localedata/tt_RU.UTF-8.in: Likewise. * localedata/tt_RU.UTF-8@iqtelif.in: Likewise. * localedata/ug_CN.UTF-8.in: Likewise. * localedata/uz_UZ.UTF-8.in: Likewise. * localedata/vi_VN.UTF-8.in: Likewise. * localedata/yi_US.UTF-8.in: Likewise. * localedata/yo_NG.UTF-8.in: Likewise. * localedata/zh_CN.UTF-8.in: Likewise. * localedata/locales/am_ET: Adapt collation rules to new iso14651_t1_common file and fix bugs in the collation. * localedata/locales/az_AZ: Likewise. * localedata/locales/be_BY: Likewise. * localedata/locales/ber_DZ: Likewise. * localedata/locales/ber_MA: Likewise. * localedata/locales/bg_BG: Likewise. * localedata/locales/br_FR: Likewise. * localedata/locales/br_FR@euro: Likewise. * localedata/locales/ca_ES: Likewise. * localedata/locales/cns11643_stroke: Likewise. * localedata/locales/crh_UA: Likewise. * localedata/locales/cs_CZ: Likewise. * localedata/locales/csb_PL: Likewise. * localedata/locales/cv_RU: Likewise. * localedata/locales/cy_GB: Likewise. * localedata/locales/da_DK: Likewise. * localedata/locales/dz_BT: Likewise. * localedata/locales/en_CA: Likewise. * localedata/locales/eo: Likewise. * localedata/locales/es_CU: Likewise. * localedata/locales/es_EC: Likewise. * localedata/locales/es_ES: Likewise. * localedata/locales/es_US: Likewise. * localedata/locales/et_EE: Likewise. * localedata/locales/fa_IR: Likewise. * localedata/locales/fi_FI: Likewise. * localedata/locales/fil_PH: Likewise. * localedata/locales/fur_IT: Likewise. * localedata/locales/gez_ER@abegede: Likewise. * localedata/locales/ha_NG: Likewise. * localedata/locales/hr_HR: Likewise. * localedata/locales/hsb_DE: Likewise. * localedata/locales/hu_HU: Likewise. * localedata/locales/ig_NG: Likewise. * localedata/locales/ik_CA: Likewise. * localedata/locales/is_IS: Likewise. * localedata/locales/iso14651_t1_pinyin: Likewise. * localedata/locales/kk_KZ: Likewise. * localedata/locales/ku_TR: Likewise. * localedata/locales/ky_KG: Likewise. * localedata/locales/ln_CD: Likewise. * localedata/locales/lt_LT: Likewise. * localedata/locales/lv_LV: Likewise. * localedata/locales/mi_NZ: Likewise. * localedata/locales/ml_IN: Likewise. * localedata/locales/mn_MN: Likewise. * localedata/locales/mr_IN: Likewise. * localedata/locales/mt_MT: Likewise. * localedata/locales/nb_NO: Likewise. * localedata/locales/om_KE: Likewise. * localedata/locales/os_RU: Likewise. * localedata/locales/pl_PL: Likewise. * localedata/locales/ps_AF: Likewise. * localedata/locales/ro_RO: Likewise. * localedata/locales/ru_RU: Likewise. * localedata/locales/ru_UA: Likewise. * localedata/locales/sc_IT: Likewise. * localedata/locales/se_NO: Likewise. * localedata/locales/si_LK: Likewise. * localedata/locales/sq_AL: Likewise. * localedata/locales/sv_FI: Likewise. * localedata/locales/sv_FI@euro: Likewise. * localedata/locales/sv_SE: Likewise. * localedata/locales/szl_PL: Likewise. * localedata/locales/tg_TJ: Likewise. * localedata/locales/ti_ER: Likewise. * localedata/locales/tk_TM: Likewise. * localedata/locales/tl_PH: Likewise. * localedata/locales/tr_TR: Likewise. * localedata/locales/tt_RU: Likewise. * localedata/locales/tt_RU@iqtelif: Likewise. * localedata/locales/ug_CN: Likewise. * localedata/locales/uk_UA: Likewise. * localedata/locales/uz_UZ: Likewise. * localedata/locales/uz_UZ@cyrillic: Likewise. * localedata/locales/vi_VN: Likewise. * localedata/locales/yi_US: Likewise. * localedata/locales/yo_NG: Likewise.
* Improve gen-locales.mk and gen-locale.sh to make test files with @ options workMike FABIAN2018-02-273-4/+11
| | | | | | | | | With out this, adding collation test files like localedata/gez_ER.UTF-8@abegede.in does not work for locales which contain @ modifiers. * gen-locales.mk: Make test files which contain @ modifiers in their name work. * localedata/gen-locale.sh: Likewise.
* Fix test cases tst-fnmatch and tst-regexloc for the new iso14651_t1_common file.Mike FABIAN2018-02-273-18/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See: http://pubs.opengroup.org/onlinepubs/7908799/xbd/re.html > A range expression represents the set of collating elements that fall > between two elements in the current collation sequence, > inclusively. It is expressed as the starting point and the ending > point separated by a hyphen (-). > > Range expressions must not be used in portable applications because > their behaviour is dependent on the collating sequence. Ranges will be > treated according to the current collating sequence, and include such > characters that fall within the range based on that collating > sequence, regardless of character values. This, however, means that > the interpretation will differ depending on collating sequence. If, > for instance, one collating sequence defines ä as a variant of a, > while another defines it as a letter following z, then the expression > [ä-z] is valid in the first language and invalid in the second. Therefore, using [a-z] does not make much sense except in the C/POSIX locale. The new iso14651_t1_common lists upper case and lower case Latin characters in a different order than the old one which causes surprising results for example in the de_DE locale: [a-z] now includes A because A comes after a in iso14651_t1_common but does not include Z because that comes after z in iso14651_t1_common. * posix/tst-fnmatch.input: Fix results for range expressions for non C locales. * posix/tst-regexloc.c: Do not use a range expression for de_DE.ISO-8859-1 locale.
* Fix posix/bug-regex5.c test case, adapt to iso14651_t1_common upateMike FABIAN2018-02-272-2/+9
| | | | | | | | | | | | | | | | | | | | | | | This test case tests how many collating elements are defined in da_DK.ISO-8859-1 locale. The da_DK locale source defines 4: collating-element <A-A> from "<U0041><U0041>" collating-element <A-a> from "<U0041><U0061>" collating-element <a-A> from "<U0061><U0041>" collating-element <a-a> from "<U0061><U0061>" The new iso14651_t1_common file defines more collating elements, two of them are in the ISO-8859-1 range: collating-element <U004C_00B7> from "<U004C><U00B7>" % decomposition of LATIN CAPITAL LETTER L WITH MIDDLE DOT collating-element <U006C_00B7> from "<U006C><U00B7>" % decomposition of LATIN SMALL LETTER L WITH MIDDLE DOT So the total count is now 6 instead of 4. * posix/bug-regex5.c: Fix test case because with the new iso14651_t1_common file, the da_DK locale now has 6 collating elements in the ISO-8859-1 range instead of 4 with the old iso14651_t1_common file.
* Collation order of @-. and space has changed in new iso14651_t1_common file, ↵Mike FABIAN2018-02-275-12/+23
| | | | | | | | | | | adapt test files * localedata/da_DK.ISO-8859-1.in: In the new iso14651_t1_common file downloaded from ISO, the collation order of @-. and space has changed. Therefore, this test file needed to be adapted. * localedata/fr_CA.UTF-8.in: Likewise. * localedata/fr_FR.UTF-8.in: Likewise. * localedata/uk_UA.UTF-8.in: Likewise.
* Collation order of ȥ has changed in new iso14651_t1_common file, adapt test ↵Mike FABIAN2018-02-273-4/+10
| | | | | | | | files * localedata/cs_CZ.UTF-8.in: adapt this test file to the collation order of ȥ in the new iso14651_t1_common file. * localedata/pl_PL.UTF-8.in: Likewise.
* Add sections for various scripts to the iso14651_t1_common fileMike FABIAN2018-02-272-9/+73
| | | | | * localedata/locales/iso14651_t1_common: Add sections for various scripts to the iso14651_t1_common file.
* iso14651_t1_common: make the fourth level the codepoint for characters which ↵Mike FABIAN2018-02-272-457/+463
| | | | | | | | | | | | | | | | | | | | | | are ignorable on all 4 levels Entries for characters which have “IGNORE” on all 4 levels like: <U0001> IGNORE;IGNORE;IGNORE;IGNORE % START OF HEADING (in ISO 6429) are changed into: <U0001> IGNORE;IGNORE;IGNORE;<U0001> % START OF HEADING (in ISO 6429) i.e. putting the code point of the character into the fourth level instead of “IGNORE”. Without that change, all such characters would compare equal which would make a wcscoll test case fail. It is better to have a clearly defined sort order even for characters like this so it is good to use the code point as a tie-break. * localedata/locales/iso14651_t1_common: Use the code point of a character in the fourth collation level instead of IGNORE for all entries which have IGNORE on all 4 levels.
* Add convenience symbols like <AFTER-A>, <BEFORE-A> to iso14651_t1_commonMike FABIAN2018-02-272-0/+126
| | | | | | * localedata/locales/iso14651_t1_common: Add some convenient collation symbols like <AFTER-A>, <BEFORE-A> to make tailoring easier using rules similar to those in CLDR.
* Fixing syntax errors after updating the iso14651_t1_common fileMike FABIAN2018-02-272-4/+32817
| | | | | | * localedata/locales/iso14651_t1_common: The new version of this file downloaded from ISO contained several syntax errors which are fixed by this patch.
* iso14651_t1_common: <U\([0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F]\)> → <U000\1>Mike FABIAN2018-02-272-13294/+13299
| | | | | * localedata/locales/iso14651_t1_common: replace all <U.....> with <U000.....> because glibc understands only 4 digit or 8 digit
* Necessary changes after updating the iso14651_t1_common fileMike FABIAN2018-02-272-8/+21
| | | | | * localedata/locales/iso14651_t1_common: Necessary changes to make the file downloaded from ISO usable by glibc.