Commit Graph

32625 Commits

Author SHA1 Message Date
Szabolcs Nagy
0ca3d1d6d0 [BZ #18572] arm: Disable lazy initialization of tlsdesc entries
Follow up to
https://sourceware.org/ml/libc-alpha/2015-11/msg00272.html

Always do tls descriptor initialization at load time during relocation
processing (as if DF_BIND_NOW were set for the binary) to avoid barriers
at every tls access.  This patch mimics bind-now semantics in the lazy
relocation code of the arm target (elf_machine_lazy_rel).

Ideally the static linker should be updated too to not emit tlsdesc
relocs in DT_REL*, so elf_machine_lazy_rel is not called on them at all.

	[BZ #18572]
	* sysdeps/arm/dl-machine.h (elf_machine_lazy_rel): Do symbol binding
	non-lazily for R_ARM_TLS_DESC.
2017-11-03 14:47:35 +00:00
Szabolcs Nagy
2c1d4e5fe4 [BZ #17078] arm: remove prelinker support for R_ARM_TLS_DESC
This patch reverts

commit 9c82da17b5
Author: Maciej W. Rozycki <macro@codesourcery.com>
Date:   2014-07-17 19:22:05 +0100

    [BZ #17078] ARM: R_ARM_TLS_DESC prelinker support

This only implemented support for the lazy binding case (and thus
closed the bugzilla ticket prematurely), however tlsdesc on arm is
not correct with lazy binding because there is a data race between
the lazy initialization code and tlsdesc resolver functions.

Lazy initialization of tlsdesc entries will be removed from arm to
fix the data races and thus this half-finished prelinker support
is no longer useful.

	[BZ #17078]
	* sysdeps/arm/dl-machine.h (elf_machine_rela): Remove the
	R_ARM_TLS_DESC case.
	(elf_machine_lazy_rel): Remove the prelink check.
2017-11-03 14:45:26 +00:00
Szabolcs Nagy
91c5a366d8 aarch64: Remove barriers from TLS descriptor functions
Remove ldar synchronization and most lazy TLSDESC initialization
related code.

	* sysdeps/aarch64/dl-machine.h (elf_machine_runtime_setup): Remove
	DT_TLSDESC_GOT initialization.
	* sysdeps/aarch64/dl-tlsdesc.S (_dl_tlsdesc_return_lazy): Remove.
	(_dl_tlsdesc_resolve_rela): Likewise.
	(_dl_tlsdesc_resolve_hold): Likewise.
	(_dl_tlsdesc_undefweak): Remove ldar.
	(_dl_tlsdesc_dynamic): Likewise.
	* sysdeps/aarch64/dl-tlsdesc.h (_dl_tlsdesc_return_lazy): Remove.
	(_dl_tlsdesc_resolve_rela): Likewise.
	(_dl_tlsdesc_resolve_hold): Likewise.
	* sysdeps/aarch64/tlsdesc.c (_dl_tlsdesc_resolve_rela_fixup): Remove.
	(_dl_tlsdesc_resolve_hold_fixup): Likewise.
	(_dl_tlsdesc_resolve_rela): Likewise.
	(_dl_tlsdesc_resolve_hold): Likewise.
2017-11-03 14:43:32 +00:00
Szabolcs Nagy
b7cf203b5c aarch64: Disable lazy symbol binding of TLSDESC
Always do TLS descriptor initialization at load time during relocation
processing to avoid barriers at every TLS access. In non-dlopened shared
libraries the overhead of tls access vs static global access is > 3x
bigger when lazy initialization is used (_dl_tlsdesc_return_lazy)
compared to bind-now (_dl_tlsdesc_return) so the barriers dominate tls
access performance.

TLSDESC relocs are in DT_JMPREL which are processed at load time using
elf_machine_lazy_rel which is only supposed to do lightweight
initialization using the DT_TLSDESC_PLT trampoline (the trampoline code
jumps to the entry point in DT_TLSDESC_GOT which does the lazy tlsdesc
initialization at runtime).  This patch changes elf_machine_lazy_rel
in aarch64 to do the symbol binding and initialization as if DF_BIND_NOW
was set, so the non-lazy code path of elf/do-rel.h was replicated.

The static linker could be changed to emit TLSDESC relocs in DT_REL*,
which are processed non-lazily, but the goal of this patch is to always
guarantee bind-now semantics, even if the binary was produced with an
old linker, so the barriers can be dropped in tls descriptor functions.

After this change the synchronizing ldar instructions can be dropped
as well as the lazy initialization machinery including the DT_TLSDESC_GOT
setup.

I believe this should be done on all targets, including ones where no
barrier is needed for lazy initialization.  There is very little gain in
optimizing for large number of symbolic tlsdesc relocations which is an
extremely uncommon case.  And currently the tlsdesc entries are only
readonly protected with -z now and some hardennings against writable
JUMPSLOT relocs don't work for TLSDESC so they are a security hazard.
(But to fix that the static linker has to be changed.)

	* sysdeps/aarch64/dl-machine.h (elf_machine_lazy_rel): Do symbol
	binding and initialization non-lazily for R_AARCH64_TLSDESC.
2017-11-03 14:41:35 +00:00
Szabolcs Nagy
0cc5b022f8 Mark lazy tlsdesc helper functions unused to avoid warnings
These static functions are not needed if a target does not do lazy
tlsdesc initialization.

	* elf/tlsdeschtab.h (_dl_tls_resolve_early_return_p): Mark unused.
	(_dl_tlsdesc_wake_up_held_fixups): Likewise.
2017-11-03 14:40:28 +00:00
Joseph Myers
43ddff2e36 Declare wcstof functions for more _FloatN, _FloatNx types.
Continuing the preparation for additional _FloatN / _FloatNx type
support, this patch arranges for <wchar.h> to declare wcstof functions
for all such types, similarly to the declarations already present for
_Float128.

Tested for x86_64.

	* wcsmbs/wchar.h [__HAVE_FLOAT16 && __USE_GNU] (wcstof16):
	Declare.
	[__HAVE_FLOAT32 && __USE_GNU] (wcstof32): Likewise.
	[__HAVE_FLOAT64 && __USE_GNU] (wcstof64): Likewise.
	[__HAVE_FLOAT32X && __USE_GNU] (wcstof32x): Likewise.
	[__HAVE_FLOAT64X && __USE_GNU] (wcstof64x): Likewise.
	[__HAVE_FLOAT128X && __USE_GNU] (wcstof128x): Likewise.
	[__HAVE_FLOAT16 && __USE_GNU] (wcstof16_l): Likewise.
	[__HAVE_FLOAT32 && __USE_GNU] (wcstof32_l): Likewise.
	[__HAVE_FLOAT64 && __USE_GNU] (wcstof64_l): Likewise.
	[__HAVE_FLOAT32X && __USE_GNU] (wcstof32x_l): Likewise.
	[__HAVE_FLOAT64X && __USE_GNU] (wcstof64x_l): Likewise.
	[__HAVE_FLOAT128X && __USE_GNU] (wcstof128x_l): Likewise.
2017-11-02 23:36:00 +00:00
Mike FABIAN
5baac970a8 tpi_PG locale: fix syntax error [BZ #22382]
[BZ #22382]
	* localedata/locales/tpi_PG (LC_TIME): Fix syntax error.
	* localedata/locales/tpi_PG: Add standard header.
2017-11-02 17:38:14 +01:00
Florian Weimer
ef11081fed test-errno-linux: quotactl can fail with EPERM in containers
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2017-11-02 13:55:51 +01:00
Florian Weimer
d10b132bf5 stdio-common: Use array_length and array_end macros 2017-11-02 12:45:20 +01:00
Florian Weimer
c94a5688fb <array_length.h>: New array_length and array_end macros 2017-11-02 12:45:20 +01:00
Rafal Luzynski
067f5d97b3 Fix ChangeLog typo
It's been confirmed by the original author: "01-31" should be "10-31".
2017-11-02 12:37:59 +01:00
Florian Weimer
2fac6a6cd5 posix/tst-glob-tilde.c: Add test for bug 22332 2017-11-02 11:06:45 +01:00
Joseph Myers
260fbd0a39 Include bits/cmathcalls.h for more _FloatN, _FloatNx types.
Continuing the preparation for additional _FloatN / _FloatNx type
support, this patch arranges for <bits/cmathcalls.h> to be included by
<complex.h> for each such type under conditions and with macros
defined corresponding to those used for _Float128.

Tested for x86_64.

	* math/complex.h
	[(__HAVE_DISTINCT_FLOAT16 || (__HAVE_FLOAT16 && !_LIBC))
	&& __GLIBC_USE (IEC_60559_TYPES_EXT)]: Include <bits/cmathcalls.h>
	with appropriate macros defined and undefined.
	[(__HAVE_DISTINCT_FLOAT32 || (__HAVE_FLOAT32 && !_LIBC))
	&& __GLIBC_USE (IEC_60559_TYPES_EXT)]: Likewise.
	[(__HAVE_DISTINCT_FLOAT64 || (__HAVE_FLOAT64 && !_LIBC))
	&& __GLIBC_USE (IEC_60559_TYPES_EXT)]: Likewise.
	[(__HAVE_DISTINCT_FLOAT32X || (__HAVE_FLOAT32X && !_LIBC))
	&& __GLIBC_USE (IEC_60559_TYPES_EXT)]: Likewise.
	[(__HAVE_DISTINCT_FLOAT64X || (__HAVE_FLOAT64X && !_LIBC))
	&& __GLIBC_USE (IEC_60559_TYPES_EXT)]: Likewise.
	[(__HAVE_DISTINCT_FLOAT128X || (__HAVE_FLOAT128X && !_LIBC))
	&& __GLIBC_USE (IEC_60559_TYPES_EXT)]: Likewise.
2017-11-01 23:42:31 +00:00
Joseph Myers
2f1b212e54 Clean up complex.h handling of float128.
This patch cleans up the way complex.h handles inclusion of
bits/cmathcalls.h for float128.  The inclusion was between those for
the types float and long double; the patch moves it after that for
long double, matching how bits/mathcalls.h and bits/math-finite.h
inclusions are ordered.  There is no need for the undefine and define
of _Mdouble_complex_ to be conditional, since __CFLOAT128 is always
defined by bits/floatn.h when _Float128 is supported, so the patch
removes the unnecessary conditionals.

Tested for x86_64.

	* math/complex.h
	[(__HAVE_DISTINCT_FLOAT128 || (__HAVE_FLOAT128 && !LIBC))
	&& __GLIBC_USE (IEC_60559_TYPES_EXT)]: Move conditional code after
	that for long double.  Do not condition define and undefine of
	_Mdouble_complex_ on [__CFLOAT128].
2017-11-01 17:03:58 +00:00
H.J. Lu
95b93c6e0d x86: Add sysdeps/x86/sysdep.h
Add a new header file, sysdeps/x86/sysdep.h, for common assembly code
macros between i386 and x86-64.  Tested on i686 and x86-64.  There are
no differences in outputs of "readelf -a" and "objdump -dw" on all glibc
shared objects before and after the patch.

	* sysdeps/i386/sysdep.h: Include <sysdeps/x86/sysdep.h> instead
	of <sysdeps/generic/sysdep.h>.
	(ALIGNARG): Removed.
	(ASM_SIZE_DIRECTIVE): Likewise.
	(ENTRY): Likewise.
	(END): Likewise.
	(ENTRY_CHK): Likewise.
	(END_CHK): Likewise.
	(syscall_error): Likewise.
	(mcount): Likewise.
	(PSEUDO_END): Likewise.
	(L): Likewise.
	(atom_text_section): Likewise.
	* sysdeps/x86/sysdep.h: New file.
	* sysdeps/x86_64/sysdep.h: Include <sysdeps/x86/sysdep.h> instead
	of <sysdeps/generic/sysdep.h>.
	(ALIGNARG): Removed.
	(ASM_SIZE_DIRECTIVE): Likewise.
	(ENTRY): Likewise.
	(END): Likewise.
	(ENTRY_CHK): Likewise.
	(END_CHK): Likewise.
	(syscall_error): Likewise.
	(mcount): Likewise.
	(PSEUDO_END): Likewise.
	(L): Likewise.
	(atom_text_section): Likewise.
2017-11-01 05:37:26 -07:00
Rafal Luzynski
1bb3653925 localedata: Once again correct and regenerate i18n_ctype.
Following the previous work by Carlos O'Donell the category of LC_CTYPE
is correctly set to "i18n:2012" rather than "unicode:2014" and the
i18n_ctype file is once again regenerated from scratch to make sure it
does not contain any manual additions except the copyright message.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>

	* localedata/unicode-gen/gen_unicode_ctype.py (output_head):
	category of LC_CTYPE set to "i18n:2012".
	* localedata/locales/i18n_ctype: Regenerate.
2017-10-31 23:54:47 +01:00
Yury Norov
87bbc4cf1e Remove useless #ifdefs from Linux sig*.c syscalls
sigprocmask.c, sigtimedwait.c, sigwait.c and sigwaitinfo.c files from
sysdeps/unix/sysv/linux include nptl-signals.h via nptl/pthreadP.h,
and so SIGCANCEL and SIGSETXID become defined unconditionally. But
later in the code, there are some checks weither symbols defined,
which is useless. This patch removes useless checks.

Checked on x86_64-linux-gnu.

	* sysdeps/unix/sysv/linux/sigprocmask.c: Remove useless #ifdefs.
	* sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.
	* sysdeps/unix/sysv/linux/sigwait.c: Likewise.
	* sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.

Signed-off-by: Yury Norov <ynorov@caviumnetworks.com>
Reviewed-by: Andreas Schwab <schwab@suse.de>
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2017-10-31 17:49:18 -02:00
Yury Norov
e8681faa01 Consolidate Linux sigpending() implementation
ia64, s390-64, sparc64 and x86_64 host their own implementation of
sigpending() in corresponding files, but they are identical to generic
linux file despite few comments. This patch removes that files, so the
implementation of sigpending() is taken from sysdeps/unix/sysv/linux
for all ports.

Build-tested on x86_64.

	* sysdeps/unix/sysv/linux/ia64/sigpending.c: Remove file.
	* sysdeps/unix/sysv/linux/s390/s390-64/sigpending.c: Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc64/sigpending.c: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/sigpending.c: Likewise.

Signed-off-by: Yury Norov <ynorov@caviumnetworks.com>
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2017-10-31 17:49:11 -02:00
Joseph Myers
43e662837c Define CMPLX macros for more _FloatN, _FloatNx types.
Continuing the preparation for additional _FloatN / _FloatNx type
support, this patch defines CMPLX* macros for all such types, as
already done for _Float128.

Tested for x86_64.

	* math/complex.h
	[__HAVE_FLOAT16 && __GLIBC_USE (IEC_60559_TYPES_EXT)] (CMPLXF16):
	New macro.
	[__HAVE_FLOAT32 && __GLIBC_USE (IEC_60559_TYPES_EXT)] (CMPLXF32):
	Likewise.
	[__HAVE_FLOAT64 && __GLIBC_USE (IEC_60559_TYPES_EXT)] (CMPLXF64):
	Likewise.
	[__HAVE_FLOAT32X && __GLIBC_USE (IEC_60559_TYPES_EXT)]
	(CMPLXF32X): Likewise.
	[__HAVE_FLOAT64X && __GLIBC_USE (IEC_60559_TYPES_EXT)]
	(CMPLXF64X): Likewise.
	[__HAVE_FLOAT128X && __GLIBC_USE (IEC_60559_TYPES_EXT)]
	(CMPLXF128X): Likewise.
2017-10-31 17:04:30 +00:00
Joseph Myers
540af6e2f1 Adjust __MATH_EVAL_FMT2 definition to handle _Float16 better.
Continuing the preparation for additional _FloatN / _FloatNx type
support, this patch adds an additional case in the definition of
__MATH_EVAL_FMT2, as used in defining iseqsig: when
__FLT_EVAL_METHOD__ is 0 or 32, it adds 0.0f to the arguments, so that
the correct function would be selected in the case of _Float16
arguments with excess precision (were glibc to support _Float16, which
of course __MATH_TG and other facilities do not at present - and
_Float16 support is not part of what this patch series is aiming for,
but this particular fix is simple so is included anyway).

Tested for x86_64.

	* math/math.h
	[__FLT_EVAL_METHOD__ == 0 || __FLT_EVAL_METHOD__ == 32]
	(__MATH_EVAL_FMT2): Define to add 0.0f.
2017-10-31 16:01:51 +00:00
Alan Modra
58af72b4e2 [PowerPC64] sysdep.h doesn't need to be included in multiarch files
When the .c/.S file neither uses nor modifies macros defined in
sysdep.h there is no point to #include it.  The same goes for
math_ldbl_opt.h except that it includes shlib-compat.h, and if
compat_symbol is redefined we need to include shlib-compat.h first.

	* sysdeps/powerpc/powerpc64/fpu/multiarch/e_expf-power8.S: Don't
	include sysdep.h.
	* sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceilf-power5+.S: Likewise.
	* sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceilf-ppc64.S: Likewise.
	* sysdeps/powerpc/powerpc64/fpu/multiarch/s_cosf-power8.S: Likewise.
	* sysdeps/powerpc/powerpc64/fpu/multiarch/s_cosf-ppc64.c: Likewise.
	* sysdeps/powerpc/powerpc64/fpu/multiarch/s_finite-power7.S: Likewise.
	* sysdeps/powerpc/powerpc64/fpu/multiarch/s_finite-power8.S: Likewise.
	* sysdeps/powerpc/powerpc64/fpu/multiarch/s_floor-power5+.S: Likewise.
	* sysdeps/powerpc/powerpc64/fpu/multiarch/s_floor-ppc64.S: Likewise.
	* sysdeps/powerpc/powerpc64/fpu/multiarch/s_roundf-power5+.S: Likewise.
	* sysdeps/powerpc/powerpc64/fpu/multiarch/s_roundf-ppc64.S: Likewise.
	* sysdeps/powerpc/powerpc64/fpu/multiarch/s_sinf-power8.S: Likewise.
	* sysdeps/powerpc/powerpc64/fpu/multiarch/s_sinf-ppc64.c: Likewise.
	* sysdeps/powerpc/powerpc64/fpu/multiarch/s_truncf-power5+.S: Likewise.
	* sysdeps/powerpc/powerpc64/fpu/multiarch/s_truncf-ppc64.S: Likewise.
	* sysdeps/powerpc/powerpc64/multiarch/memchr-power7.S: Likewise.
	* sysdeps/powerpc/powerpc64/multiarch/memchr-power8.S: Likewise.
	* sysdeps/powerpc/powerpc64/multiarch/memcmp-power4.S: Likewise.
	* sysdeps/powerpc/powerpc64/multiarch/memcmp-power7.S: Likewise.
	* sysdeps/powerpc/powerpc64/multiarch/memcmp-power8.S: Likewise.
	* sysdeps/powerpc/powerpc64/multiarch/memcpy-a2.S: Likewise.
	* sysdeps/powerpc/powerpc64/multiarch/memcpy-cell.S: Likewise.
	* sysdeps/powerpc/powerpc64/multiarch/memcpy-power4.S: Likewise.
	* sysdeps/powerpc/powerpc64/multiarch/memcpy-power6.S: Likewise.
	* sysdeps/powerpc/powerpc64/multiarch/memcpy-power7.S: Likewise.
	* sysdeps/powerpc/powerpc64/multiarch/memcpy-ppc64.S: Likewise.
	* sysdeps/powerpc/powerpc64/multiarch/memmove-power7.S: Likewise.
	* sysdeps/powerpc/powerpc64/multiarch/mempcpy-power7.S: Likewise.
	* sysdeps/powerpc/powerpc64/multiarch/memrchr-power7.S: Likewise.
	* sysdeps/powerpc/powerpc64/multiarch/memrchr-power8.S: Likewise.
	* sysdeps/powerpc/powerpc64/multiarch/memset-power4.S: Likewise.
	* sysdeps/powerpc/powerpc64/multiarch/memset-power6.S: Likewise.
	* sysdeps/powerpc/powerpc64/multiarch/memset-power7.S: Likewise.
	* sysdeps/powerpc/powerpc64/multiarch/memset-power8.S: Likewise.
	* sysdeps/powerpc/powerpc64/multiarch/rawmemchr-power7.S: Likewise.
	* sysdeps/powerpc/powerpc64/multiarch/stpcpy-power8.S: Likewise.
	* sysdeps/powerpc/powerpc64/multiarch/stpncpy-power7.S: Likewise.
	* sysdeps/powerpc/powerpc64/multiarch/stpncpy-power8.S: Likewise.
	* sysdeps/powerpc/powerpc64/multiarch/strcasecmp-power7.S: Likewise.
	* sysdeps/powerpc/powerpc64/multiarch/strcasecmp-power8.S: Likewise.
	* sysdeps/powerpc/powerpc64/multiarch/strcasecmp_l-power7.S: Likewise.
	* sysdeps/powerpc/powerpc64/multiarch/strcasestr-power8.S: Likewise.
	* sysdeps/powerpc/powerpc64/multiarch/strchr-power7.S: Likewise.
	* sysdeps/powerpc/powerpc64/multiarch/strchr-power8.S: Likewise.
	* sysdeps/powerpc/powerpc64/multiarch/strchr-ppc64.S: Likewise.
	* sysdeps/powerpc/powerpc64/multiarch/strchrnul-power7.S: Likewise.
	* sysdeps/powerpc/powerpc64/multiarch/strchrnul-power8.S: Likewise.
	* sysdeps/powerpc/powerpc64/multiarch/strcmp-power7.S: Likewise.
	* sysdeps/powerpc/powerpc64/multiarch/strcmp-power8.S: Likewise.
	* sysdeps/powerpc/powerpc64/multiarch/strcmp-power9.S: Likewise.
	* sysdeps/powerpc/powerpc64/multiarch/strcmp-ppc64.S: Likewise.
	* sysdeps/powerpc/powerpc64/multiarch/strcpy-power8.S: Likewise.
	* sysdeps/powerpc/powerpc64/multiarch/strcspn-power8.S: Likewise.
	* sysdeps/powerpc/powerpc64/multiarch/strlen-power7.S: Likewise.
	* sysdeps/powerpc/powerpc64/multiarch/strlen-power8.S: Likewise.
	* sysdeps/powerpc/powerpc64/multiarch/strlen-ppc64.S: Likewise.
	* sysdeps/powerpc/powerpc64/multiarch/strncase-power8.S: Likewise.
	* sysdeps/powerpc/powerpc64/multiarch/strncmp-power4.S: Likewise.
	* sysdeps/powerpc/powerpc64/multiarch/strncmp-power7.S: Likewise.
	* sysdeps/powerpc/powerpc64/multiarch/strncmp-power8.S: Likewise.
	* sysdeps/powerpc/powerpc64/multiarch/strncmp-power9.S: Likewise.
	* sysdeps/powerpc/powerpc64/multiarch/strncmp-ppc64.S: Likewise.
	* sysdeps/powerpc/powerpc64/multiarch/strncpy-power7.S: Likewise.
	* sysdeps/powerpc/powerpc64/multiarch/strncpy-power8.S: Likewise.
	* sysdeps/powerpc/powerpc64/multiarch/strnlen-power7.S: Likewise.
	* sysdeps/powerpc/powerpc64/multiarch/strnlen-power8.S: Likewise.
	* sysdeps/powerpc/powerpc64/multiarch/strrchr-power7.S: Likewise.
	* sysdeps/powerpc/powerpc64/multiarch/strrchr-power8.S: Likewise.
	* sysdeps/powerpc/powerpc64/multiarch/strspn-power8.S: Likewise.
	* sysdeps/powerpc/powerpc64/multiarch/strstr-power7.S: Likewise.

	* sysdeps/powerpc/powerpc64/fpu/multiarch/s_floorf-ppc64.S: Don't
	include sysdep.h and math_ldbl_opt.h.

	* sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceil-power5+.S: Don't
	include sysdep.h and math_ldbl_opt.h.  Include shlib-compat.h.
	* sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceil-ppc64.S: Likewise.
	* sysdeps/powerpc/powerpc64/fpu/multiarch/s_copysign-power6.S: Likewise.
	* sysdeps/powerpc/powerpc64/fpu/multiarch/s_copysign-ppc64.S: Likewise.
	* sysdeps/powerpc/powerpc64/fpu/multiarch/s_floorf-power5+.S: Likewise.
	* sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinf-power7.S: Likewise.
	* sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinf-power8.S: Likewise.
	* sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan-power5.S: Likewise.
	* sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan-power6.S: Likewise.
	* sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan-power6x.S: Likewise.
	* sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan-power7.S: Likewise.
	* sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan-power8.S: Likewise.
	* sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan-ppc64.S: Likewise.
	* sysdeps/powerpc/powerpc64/fpu/multiarch/s_llrint-power6x.S: Likewise.
	* sysdeps/powerpc/powerpc64/fpu/multiarch/s_llrint-power8.S: Likewise.
	* sysdeps/powerpc/powerpc64/fpu/multiarch/s_llrint-ppc64.S: Likewise.
	* sysdeps/powerpc/powerpc64/fpu/multiarch/s_llround-power5+.S: Likewise.
	* sysdeps/powerpc/powerpc64/fpu/multiarch/s_llround-power6x.S: Likewise.
	* sysdeps/powerpc/powerpc64/fpu/multiarch/s_llround-power8.S: Likewise.
	* sysdeps/powerpc/powerpc64/fpu/multiarch/s_llround-ppc64.S: Likewise.
	* sysdeps/powerpc/powerpc64/fpu/multiarch/s_llroundf-ppc64.S: Likewise.
	* sysdeps/powerpc/powerpc64/fpu/multiarch/s_round-power5+.S: Likewise.
	* sysdeps/powerpc/powerpc64/fpu/multiarch/s_round-ppc64.S: Likewise.
	* sysdeps/powerpc/powerpc64/fpu/multiarch/s_trunc-power5+.S: Likewise.
	* sysdeps/powerpc/powerpc64/fpu/multiarch/s_trunc-ppc64.S: Likewise.
2017-10-31 12:27:19 +10:30
Alan Modra
112f30b3f1 [PowerPC64] strncase_l-power7.c should use strncase_l.c
This is another one where we'll be wanting the base symbols for
powerpc64le rather than just a power7 variant.

	* sysdeps/powerpc/powerpc64/multiarch/strncase_l-power7.c: Include
	string/strncase_l.c, not string/strncase.c.
	(USE_IN_EXTENDED_LOCALE_MODEL): Don't define.
	(libc_hidden_def): Redefine.
2017-10-31 12:27:19 +10:30
Alan Modra
e9e7eced01 [PowerPC64] Tidy strcasecmp_l-power7.S symbols
The routine being assembled here is strcasecmp_l, so ask for that via
__STRCMP and STRCMP defines.  That change means tweaking the power7
override.  Needed for later powerpc64le changes where we want the base
symbols, not just a power7 variant.

	* sysdeps/powerpc/powerpc64/multiarch/strcasecmp_l-power7.S:
	(__STRCMP, STRCMP, __strcasecmp_l): Define.
	(__strcasecmp): Don't define.
2017-10-31 12:27:19 +10:30
Alan Modra
f7b465cfcb [PowerPC64] Wrap str{,n}cmp-power{8,9}.S in IS_IN(libc)
These functions aren't used in ld.so at the moment since we don't have
strcmp or strncmp ifuncs for them there.  Remove the ld.so bloat.

	* sysdeps/powerpc/powerpc64/multiarch/strcmp-power8.S: Wrap in
	IS_IN (libc).
	* sysdeps/powerpc/powerpc64/multiarch/strcmp-power9.S: Likewise.
	* sysdeps/powerpc/powerpc64/multiarch/strncmp-power8.S: Likewise.
	* sysdeps/powerpc/powerpc64/multiarch/strncmp-power9.S: Likewise.
2017-10-31 12:27:19 +10:30
Alan Modra
d46b09f988 [PowerPC64] Remove duplicate define in stpncpy-power8.S
USE_AS_STPNCPY is defined by sysdeps/powerpc/powerpc64/power8/stpncpy.S,
included by this file.

	* sysdeps/powerpc/powerpc64/multiarch/stpncpy-power8.S: Don't define
	USE_AS_STPNCPY.
2017-10-31 12:27:19 +10:30
Alan Modra
e9b8e19419 [PowerPC64] Don't define __GI_ variant of isnan for static lib
It seems to me that libc.a should not contain any of the __GI_
symbols, and certainly --enable-multi-arch ought to not add to the
list.  At the end of this patch series we have the following in both
--enable-multi-arch and --disable-multi-arch libc.a:
0000000000000000 T __GI___readdir64
0000000000000000 T __GI___fxstatat64
0000000000000000 T __GI_getrlimit
0000000000000000 T __GI___getrlimit

	* sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan-ppc64.S (hidden_def):
	Redefine only when SHARED.
2017-10-31 12:27:19 +10:30
Joseph Myers
b61afe8c81 Include bits/math-finite.h for more _FloatN, _FloatNx types.
Continuing the preparation for additional _FloatN / _FloatNx type
support, this patch extends the includes of <bits/math-finite.h> to
cover all such types, under conditions analogous to those for
_Float128.

Tested for x86_64.

	* math/math.h [__HAVE_DISTINCT_FLOAT16 || (__HAVE_FLOAT16 && !_LIBC)]:
	Include <bits/math-finite.h> with appropriate macros defined and
	undefined.
	[__HAVE_DISTINCT_FLOAT32 || (__HAVE_FLOAT32 && !_LIBC)]: Likewise.
	[__HAVE_DISTINCT_FLOAT64 || (__HAVE_FLOAT64 && !_LIBC)]: Likewise.
	[__HAVE_DISTINCT_FLOAT32X || (__HAVE_FLOAT32X && !_LIBC)]: Likewise.
	[__HAVE_DISTINCT_FLOAT64X || (__HAVE_FLOAT64X && !_LIBC)]: Likewise.
	[__HAVE_DISTINCT_FLOAT128X || (__HAVE_FLOAT128X && !_LIBC)]: Likewise.
2017-10-30 22:15:40 +00:00
Joseph Myers
eda162dd8a Remove _Mlong_double_ etc. macros.
math.h has a macro _Mlong_double_ for the type to use when declaring
long double functions, and similar macros for other types.
math/Makefile uses -D_Mlong_double_=double in the case of long double
having the same ABI as double.

This originates with:

Mon Jul  8 13:37:40 1996  Roland McGrath  <roland@delasyd.gnu.ai.mit.edu>

        * math/math.h (_Mfloat_, _Mlong_double_): New macros, defined iff not
        already defined to float, long double.  Use those macros for _Mdouble_
        defns when including mathcalls.h.
        * math/Makefile [$(long-double-fcts) != yes] (CPPFLAGS): Append
        -D_Mlong_double_=double.

However, math.h stopped declaring long double functions in the case of
long double having the same ABI as double (and thus probably stopped
actually needing the Makefile definition of _Mlong_double_) with:

1998-11-05  Ulrich Drepper  <drepper@cygnus.com>

        * math/math.h: Unconditionally include bits/mathdef.h.  Declare
        long double functions only if __NO_LONG_DOUBLE_MATH is not
        defined.
        * sysdeps/generic/bits/mathdef.h: Define only if __USE_ISOC9X.
        Define __NO_LONG_DOUBLE_MATH.
        * sysdeps/m68k/fpu/bits/mathdef.h: Define only if __USE_ISOC9X.
        * sysdeps/i386/fpu/bits/mathdef.h: Likewise.

The declarations were since restored for compiling user code, but
remain absent when _LIBC is defined, which is sufficient to avoid
problems declaring function aliases of incompatible types.  Thus the
indirection through the _Mlong_double_ macro is not needed (probably
since that 1998 patch), and this patch removes _Mlong_double_ and
associated macros for other types, leaving only the macro _Mdouble_
which is actually used as the type for which a given inclusion of
<bits/mathcalls.h> should declared functions.

Tested for x86_64, and tested with build-many-glibcs.py that installed
stripped shared libraries are unchanged by this patch.

	* math/math.h [!_Mfloat_] (_Mfloat_): Do not define.
	[!_Mlong_double_] (_Mlong_double_): Likewise.
	[!_Mfloat16_] (_Mfloat16_): Likewise.
	[!_Mfloat32_] (_Mfloat32_): Likewise.
	[!_Mfloat64_] (_Mfloat64_): Likewise.
	[!_Mfloat128_] (_Mfloat128_): Likewise.
	[!_Mfloat32x_] (_Mfloat32x_): Likewise.
	[!_Mfloat64x_] (_Mfloat64x_): Likewise.
	[!_Mfloat128x_] (_Mfloat128x_): Likewise.
	(_Mdouble_): Define without indirection through those macros.
	* math/complex.h [!_Mfloat_] (_Mfloat_): Do not define.
	[!_Mfloat128_] (_Mfloat128_): Likewise.
	[_Mlong_double_] (_Mlong_double_): Likewise.
	(_Mdouble_): Define without indirection through those macros.
	* math/Makefile [$(long-double-fcts) != yes] (math-CPPFLAGS): Do
	not add -D_Mlong_double_=double.
	* include/math.h [_ISOMAC] (_Mlong_double_): Do not undefine.
	* math/test-signgam-finite-c99.c (_Mlong_double_): Likewise.
2017-10-30 20:58:51 +00:00
H.J. Lu
4ad5106e3b sysdeps/x86/libc-start.c: Add /* !SHARED */
* sysdeps/x86/libc-start.c: Add /* !SHARED */.
2017-10-30 13:40:28 -07:00
H.J. Lu
fe326df7b0 Reformat sysdeps/x86/libc-start.c
* sysdeps/x86/libc-start.c: Reformat.
2017-10-30 13:01:18 -07:00
H.J. Lu
c5cc45148c i586: Use conditional branches in strcpy.S [BZ #22353]
i586 strcpy.S used a clever trick with LEA to implement jump table:

/* ECX has the last 2 bits of the address of source - 1.  */
	andl	$3, %ecx

        call    2f
2:      popl    %edx
	/* 0xb is the distance between 2: and 1:.  */
        leal    0xb(%edx,%ecx,8), %ecx
        jmp     *%ecx

        .align 8
1:  /* ECX == 0 */
        orb     (%esi), %al
        jz      L(end)
        stosb
        xorl    %eax, %eax
        incl    %esi
    /* ECX == 1 */
        orb     (%esi), %al
        jz      L(end)
        stosb
        xorl    %eax, %eax
        incl    %esi
    /* ECX == 2 */
        orb     (%esi), %al
        jz      L(end)
        stosb
        xorl    %eax, %eax
        incl    %esi
    /* ECX == 3 */
L(1):   movl    (%esi), %ecx
        leal    4(%esi),%esi

This fails if there are instruction length changes before L(1):.  This
patch replaces it with conditional branches:

	cmpb	$2, %cl
	je	L(Src2)
	ja	L(Src3)
	cmpb	$1, %cl
	je	L(Src1)

L(Src0):

which have similar performance and work with any instruction lengths.

Tested on i586 and i686 with and without --disable-multi-arch.

	[BZ #22353]
	* sysdeps/i386/i586/strcpy.S (STRCPY): Use conditional branches.
	(1): Renamed to ...
	(L(Src0)): This.
	(L(Src1)): New.
	(L(Src2)): Likewise.
	(L(1)): Renamed to ...
	(L(Src3)): This.
2017-10-30 10:02:30 -07:00
Joseph Myers
ce12269fac Add _FloatN, _FloatNx M_* constants.
Continuing the preparation for additional _FloatN / _FloatNx type
support, this patch adds M_* constants for such types.  The decimal
expansions used are all the same as used for _Float128; there's no
need to reduce the precision used.  In the case of _Float128x, #error
is used because the constants would need additional precision, but how
much is needed would depend on the actual _Float128x format used, so
it's not possible to add header support simply as part of code that
handles all _FloatN / _FloatNx types similarly.

Tested for x86_64.

	* math/math.h [__HAVE_FLOAT16 && __USE_GNU] (M_Ef16): New macro.
	[__HAVE_FLOAT16 && __USE_GNU] (M_LOG2Ef16): Likewise.
	[__HAVE_FLOAT16 && __USE_GNU] (M_LOG10Ef16): Likewise.
	[__HAVE_FLOAT16 && __USE_GNU] (M_LN2f16): Likewise.
	[__HAVE_FLOAT16 && __USE_GNU] (M_LN10f16): Likewise.
	[__HAVE_FLOAT16 && __USE_GNU] (M_PIf16): Likewise.
	[__HAVE_FLOAT16 && __USE_GNU] (M_PI_2f16): Likewise.
	[__HAVE_FLOAT16 && __USE_GNU] (M_PI_4f16): Likewise.
	[__HAVE_FLOAT16 && __USE_GNU] (M_1_PIf16): Likewise.
	[__HAVE_FLOAT16 && __USE_GNU] (M_2_PIf16): Likewise.
	[__HAVE_FLOAT16 && __USE_GNU] (M_2_SQRTPIf16): Likewise.
	[__HAVE_FLOAT16 && __USE_GNU] (M_SQRT2f16): Likewise.
	[__HAVE_FLOAT16 && __USE_GNU] (M_SQRT1_2f16): Likewise.
	[__HAVE_FLOAT32 && __USE_GNU] (M_Ef32): Likewise.
	[__HAVE_FLOAT32 && __USE_GNU] (M_LOG2Ef32): Likewise.
	[__HAVE_FLOAT32 && __USE_GNU] (M_LOG10Ef32): Likewise.
	[__HAVE_FLOAT32 && __USE_GNU] (M_LN2f32): Likewise.
	[__HAVE_FLOAT32 && __USE_GNU] (M_LN10f32): Likewise.
	[__HAVE_FLOAT32 && __USE_GNU] (M_PIf32): Likewise.
	[__HAVE_FLOAT32 && __USE_GNU] (M_PI_2f32): Likewise.
	[__HAVE_FLOAT32 && __USE_GNU] (M_PI_4f32): Likewise.
	[__HAVE_FLOAT32 && __USE_GNU] (M_1_PIf32): Likewise.
	[__HAVE_FLOAT32 && __USE_GNU] (M_2_PIf32): Likewise.
	[__HAVE_FLOAT32 && __USE_GNU] (M_2_SQRTPIf32): Likewise.
	[__HAVE_FLOAT32 && __USE_GNU] (M_SQRT2f32): Likewise.
	[__HAVE_FLOAT32 && __USE_GNU] (M_SQRT1_2f32): Likewise.
	[__HAVE_FLOAT64 && __USE_GNU] (M_Ef64): Likewise.
	[__HAVE_FLOAT64 && __USE_GNU] (M_LOG2Ef64): Likewise.
	[__HAVE_FLOAT64 && __USE_GNU] (M_LOG10Ef64): Likewise.
	[__HAVE_FLOAT64 && __USE_GNU] (M_LN2f64): Likewise.
	[__HAVE_FLOAT64 && __USE_GNU] (M_LN10f64): Likewise.
	[__HAVE_FLOAT64 && __USE_GNU] (M_PIf64): Likewise.
	[__HAVE_FLOAT64 && __USE_GNU] (M_PI_2f64): Likewise.
	[__HAVE_FLOAT64 && __USE_GNU] (M_PI_4f64): Likewise.
	[__HAVE_FLOAT64 && __USE_GNU] (M_1_PIf64): Likewise.
	[__HAVE_FLOAT64 && __USE_GNU] (M_2_PIf64): Likewise.
	[__HAVE_FLOAT64 && __USE_GNU] (M_2_SQRTPIf64): Likewise.
	[__HAVE_FLOAT64 && __USE_GNU] (M_SQRT2f64): Likewise.
	[__HAVE_FLOAT64 && __USE_GNU] (M_SQRT1_2f64): Likewise.
	[__HAVE_FLOAT32X && __USE_GNU] (M_Ef32x): Likewise.
	[__HAVE_FLOAT32X && __USE_GNU] (M_LOG2Ef32x): Likewise.
	[__HAVE_FLOAT32X && __USE_GNU] (M_LOG10Ef32x): Likewise.
	[__HAVE_FLOAT32X && __USE_GNU] (M_LN2f32x): Likewise.
	[__HAVE_FLOAT32X && __USE_GNU] (M_LN10f32x): Likewise.
	[__HAVE_FLOAT32X && __USE_GNU] (M_PIf32x): Likewise.
	[__HAVE_FLOAT32X && __USE_GNU] (M_PI_2f32x): Likewise.
	[__HAVE_FLOAT32X && __USE_GNU] (M_PI_4f32x): Likewise.
	[__HAVE_FLOAT32X && __USE_GNU] (M_1_PIf32x): Likewise.
	[__HAVE_FLOAT32X && __USE_GNU] (M_2_PIf32x): Likewise.
	[__HAVE_FLOAT32X && __USE_GNU] (M_2_SQRTPIf32x): Likewise.
	[__HAVE_FLOAT32X && __USE_GNU] (M_SQRT2f32x): Likewise.
	[__HAVE_FLOAT32X && __USE_GNU] (M_SQRT1_2f32x): Likewise.
	[__HAVE_FLOAT64X && __USE_GNU] (M_Ef64x): Likewise.
	[__HAVE_FLOAT64X && __USE_GNU] (M_LOG2Ef64x): Likewise.
	[__HAVE_FLOAT64X && __USE_GNU] (M_LOG10Ef64x): Likewise.
	[__HAVE_FLOAT64X && __USE_GNU] (M_LN2f64x): Likewise.
	[__HAVE_FLOAT64X && __USE_GNU] (M_LN10f64x): Likewise.
	[__HAVE_FLOAT64X && __USE_GNU] (M_PIf64x): Likewise.
	[__HAVE_FLOAT64X && __USE_GNU] (M_PI_2f64x): Likewise.
	[__HAVE_FLOAT64X && __USE_GNU] (M_PI_4f64x): Likewise.
	[__HAVE_FLOAT64X && __USE_GNU] (M_1_PIf64x): Likewise.
	[__HAVE_FLOAT64X && __USE_GNU] (M_2_PIf64x): Likewise.
	[__HAVE_FLOAT64X && __USE_GNU] (M_2_SQRTPIf64x): Likewise.
	[__HAVE_FLOAT64X && __USE_GNU] (M_SQRT2f64x): Likewise.
	[__HAVE_FLOAT64X && __USE_GNU] (M_SQRT1_2f64x): Likewise.
	[__HAVE_FLOAT128X && __USE_GNU]: Use #error.
2017-10-30 16:42:28 +00:00
Florian Weimer
4484b9e296 Assume that _DIRENT_HAVE_D_TYPE is always defined.
References remain in io/fts.c, io/ftw.c, posix/glob.c,
sysdeps/posix/getcwd.c.  These files are (potentially) externally
shared.
2017-10-30 15:48:33 +01:00
Florian Weimer
68fe16dd32 ffsl, ffsll: Declare under __USE_MISC, not just __USE_GNU
Recent BSDs declare these functions, too.
2017-10-30 13:59:59 +01:00
Florian Weimer
dadf23f06c tst-gnuglob64: New test for glob64 based on tst-gnuglob
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2017-10-30 13:31:30 +01:00
Mike FABIAN
fbcecc08c9 csb_PL locale: Fix “abmon” for March and use a better translation for March in “mon” [BZ #19485]
[BZ #19485]
	* localedata/locales/csb_PL (LC_TIME): Fix “abmon” for March
	and use a better translation for March in “mon”.
	* localedata/locales/csb_PL: Use more ASCII to improve the
	readability of the source.
2017-10-30 12:48:43 +01:00
Mike FABIAN
b110af8278 km_KH locale: remove tags which were using Lao characters [BZ #13953]
[BZ #13953]
	* localedata/locales/km_KH: Use ASCII as much
	as possible for better readability of the source and
	remove useless comments.
	* localedata/locales/km_KH (LC_TIME): Remove era stuff, it
	was commented out and apparently wrong anyway because it was
	using Lao characters. If Buddhist era should be used
	for km_KH, a native speaker should write the correct formaat
	for Khmer.
	* localedata/locales/km_KH (LC_TIME): Add first_weekday 1
	(According to CLDR, the first weekday for Cambodia is Sunday).
	* localedata/locales/km_KH (LC_NAME): Remove name_mr and name_mrs
	(These were using Lao characters which must be wrong. If we get
	the correct data from a native speaker, we could add it back, until
	then it is better not to have name_mr and name_mrs at all than
	having it wrong).
2017-10-30 11:46:05 +01:00
Rafal Luzynski
f301e53340 Correct the size of _nl_value_type_LC_... arrays.
There were several problems with checking the array size in the past,
for example BZ#356, caused by incorrectly assuming that every locale
token represents one element.  In fact, if a token represented
a subarray, for example an array of month names or characters category
and it appeared at the end of the array the compiler assumed that
the array ends just after the first element of the subarray.
A workaround used in the past was to skip some categories while testing,
for example LC_CTYPE.  Now when we are about to add alternative month
names to LC_TIME (BZ#10871) this will fail again.

	* locale/loadlocale.c: Correct size of
	_nl_value_type_LC_<category> arrays.

Reviewed-by: Zack Weinberg <zackw@panix.com>
2017-10-28 01:46:14 +02:00
Joseph Myers
7e9d70736b Include bits/mathcalls.h for more _FloatN, _FloatNx types.
Continuing the preparation for additional _FloatN / _FloatNx type
support, this patch arranges for <bits/mathcalls.h> and
<bits/mathcalls-helper-functions.h> to be included for each such type
under conditions and with macros defined corresponding to those
already present for _Float128.

Tested for x86_64.

	* math/math.h [__HAVE_DISTINCT_FLOAT16 || (__HAVE_FLOAT16 && !_LIBC)]:
	Include <bits/mathcalls-helper-functions.h> and <bits/mathcalls.h>
	with appropriate macros defined and undefined.
	[__HAVE_DISTINCT_FLOAT32 || (__HAVE_FLOAT32 && !_LIBC)]: Likewise.
	[__HAVE_DISTINCT_FLOAT64 || (__HAVE_FLOAT64 && !_LIBC)]: Likewise.
	[__HAVE_DISTINCT_FLOAT32X || (__HAVE_FLOAT32X && !_LIBC)]: Likewise.
	[__HAVE_DISTINCT_FLOAT64X || (__HAVE_FLOAT64X && !_LIBC)]: Likewise.
	[__HAVE_DISTINCT_FLOAT128X || (__HAVE_FLOAT128X && !_LIBC)]: Likewise.
2017-10-27 22:43:46 +00:00
H.J. Lu
63d3b468c1 i386: Regenerate libm-test-ulps for for gcc 7
Regenerate libm-test-ulps for gcc 7 with "-m32 -O2 -march=i586".

	* sysdeps/i386/fpu/libm-test-ulps: Regenerated for GCC 7 with
	"-O2 -march=i586".
2017-10-27 14:09:14 -07:00
Mike FABIAN
a4cc02c741 tt_RU locale: make yesstr and nostr agree with CLDR by starting with lower case letters
* localedata/locales/tt_RU (LC_MESSAGES): Start yesstr and nostr
	with lowercase letters to make it agree with CLDR.
2017-10-27 10:55:44 +02:00
Mike FABIAN
1e5971ec14 Fix all remaining issues of [BZ #15260]
[BZ #15260]
	* localedata/locales/doi_IN (LC_MESSAGES): Match only for the
	first letters of yesstr and nostr in yesexpr and noexpr,
	not for the full words.
	* localedata/locales/hne_IN (LC_MESSAGES): Likewise.
	* localedata/locales/kok_IN (LC_MESSAGES): Likewise.
	* localedata/locales/mr_IN (LC_MESSAGES): Likewise.
	* localedata/locales/sat_IN (LC_MESSAGES): Likewise.
	* localedata/locales/km_KH (LC_MESSAGES): Match also for the
	first letters of yesstr and nostr in yesexpr and noexpr,
	until now only English was matched in yesexpr and noexpr.
	* localedata/locales/tl_PH (LC_MESSAGES): Use “copy "fil_PH"”
	instead of “copy "en_US"”. CLDR has yesstr and nostr data for
	fil but not for tl. As tl and fil are very similar, using fil
	is probably better than using English.
2017-10-27 10:53:35 +02:00
Mike FABIAN
bc5fc7de21 br_FR locale: Use all lowercase in yesstr and nostr.
[BZ #21706]
	* localedata/locales/br_FR (LC_MESSAGES): Use all lowercase
	in yesstr and nostr.
2017-10-27 09:39:08 +02:00
Joseph Myers
ecc7da5bb8 Add SNAN macros for more _FloatN, _FloatNx types.
This patch continues the preparation for additional _FloatN / _FloatNx
type support by adding appropriately conditional definitions of SNAN*
macros, corresponding to the SNANF128 definition already present.

Tested for x86_64.

	* math/math.h [__HAVE_FLOAT16 && __GLIBC_USE
	(IEC_60559_TYPES_EXT)] (SNANF16): New macro.
	[__HAVE_FLOAT32 && __GLIBC_USE (IEC_60559_TYPES_EXT)] (SNANF32):
	Likewise.
	[__HAVE_FLOAT64 && __GLIBC_USE (IEC_60559_TYPES_EXT)] (SNANF64):
	Likewise.
	[__HAVE_FLOAT32X && __GLIBC_USE (IEC_60559_TYPES_EXT)] (SNANF32X):
	Likewise.
	[__HAVE_FLOAT64X && __GLIBC_USE (IEC_60559_TYPES_EXT)] (SNANF64X):
	Likewise.
	[__HAVE_FLOAT128X && __GLIBC_USE (IEC_60559_TYPES_EXT)]
	(SNANF128X): Likewise.
2017-10-26 23:34:55 +00:00
Joseph Myers
5d220788b3 Add HUGE_VAL macros for more _FloatN, _FloatNx types.
This patch continues the preparation for additional _FloatN / _FloatNx
type support by adding appropriately conditional definitions of
HUGE_VAL_* macros, corresponding to the HUGE_VAL_F128 definition
already present.

Tested for x86_64.

	* math/math.h [__HAVE_FLOAT16 && __GLIBC_USE
	(IEC_60559_TYPES_EXT)] (HUGE_VAL_F16): New macro.
	[__HAVE_FLOAT32 && __GLIBC_USE (IEC_60559_TYPES_EXT)]
	(HUGE_VAL_F32): Likewise.
	[__HAVE_FLOAT64 && __GLIBC_USE (IEC_60559_TYPES_EXT)]
	(HUGE_VAL_F64): Likewise.
	[__HAVE_FLOAT32X && __GLIBC_USE (IEC_60559_TYPES_EXT)]
	(HUGE_VAL_F32X): Likewise.
	[__HAVE_FLOAT64X && __GLIBC_USE (IEC_60559_TYPES_EXT)]
	(HUGE_VAL_F64X): Likewise.
	[__HAVE_FLOAT128X && __GLIBC_USE (IEC_60559_TYPES_EXT)]
	(HUGE_VAL_F128X): Likewise.
2017-10-26 23:11:18 +00:00
Thierry Vignaud
67ad7163bb add myself as contact for "br" locale
Pablo was l10n/i18n coordinator back in the old days but MandrakeSoft is
dead now

	* localedata/locales/br_FR (LC_IDENTIFICATON): Add
	Thierry Vignaud <thierry.vignaud@gmail.com> as the contact
	for the br_FR locale.
2017-10-26 15:03:59 +02:00
Thierry Vignaud
408dff7ee5 fix nostr for "br" [BZ #21706]
"Ket" is the the most used negative answer, as it's the negative answer
to a positively phrased question
It's used as it or with the verb ("Ne ran ket", ...)
As such, "Ket" is used in most translations.
"Nann" is less used as it's the negative answer to a negatively phrased
question

See https://en.wikipedia.org/wiki/Yes_and_no for explanations about
languages with 3 or 4 form systems.

We still keep "Nn" for short answers as:
- new learners are used to "Non" in french
- and they often misuses "Nann"
- for compatibility with english

	[BZ #21706]
	* localedata/locales/br_FR (LC_MESSAGES): Fix nostr.
2017-10-26 15:01:32 +02:00
Carlos O'Donell
02eec68167 localedef: Add --no-warnings/--warnings option
From localedef --help:

Output control:
...
      --no-warnings=<warnings>   Comma-separated list of warnings to disable;
                             supported warnings are: ascii, intcurrsym
...
      --warnings=<warnings>  Comma-separated list of warnings to enable;
                             supported warnings are: ascii, intcurrsym

Locales using SHIFT_JIS and SHIFT_JISX0213 character maps are not ASCII
compatible. In order to build locales using these character maps, and
have localedef exit with a status of 0, we add new option to localedef
to disable or enable specific warnings. The options are --no-warnings
and --warnings, to disable and enable specific warnings respectively.
The options take a comma-separated list of warning names. The warning
names are taken directly from the generated warning.  When a warning
that can be disabled is issued it will print something like this: foo is
not defined [--no-warnings=foo]

For the initial implementation we add two controllable warnings; first
'ascii' which is used by the localedata installation makefile target to
install SHIFT_JIS and SHIFT_JISX0213-using locales without error; second
'intcurrsym' which allows a program to use a non-standard international
currency symbol without triggering a warning.  The 'intcurrsym' is
useful in the future if country codes are added that are not in our
current ISO 4217 list, and the user wants to avoid the warning. Having
at least two warnings to control gives an example for how the changes
can be extended to more warnings if required in the future.

These changes allow ja_JP.SHIFT_JIS and ja_JP.SHIFT_JISX0213 to be
compiled without warnings using --no-warnings=ascii. The
localedata/Makefile $(INSTALL-SUPPORTED-LOCALES) target is adjusted to
automatically add `--no-warnings=ascii` for such charmaps, and likewise
localedata/gen-locale.sh is adjusted with similar logic.

v2: Bring verbose, be_quiet, and all warning control booleans into
record-status.c, and compile this object file to be used by locale,
iconv, and localedef. Any users include record-status.h.
v3: Fix an instance of boolean coercion in set_warning().

Signed-off-by: Carlos O'Donell <carlos@redhat.com>
2017-10-25 13:36:54 -07:00
Carlos O'Donell
56fa555a83 localedata: Locale and test name are the same.
The localedata collation test data is encoded in a particular
character set. We rename the test data to match the full locale
name with encoding, and adjust the Makefile and sort-test.sh
script. This allows us to have a future C.UTF-8 test that is
disambiguated from the built-in C locale.

Signed-off-by: Carlos O'Donell <carlos@redhat.com>
2017-10-25 12:24:31 -07:00
Carlos O'Donell
337ff3c501 localedata: Fix unicode-gen check target.
After the transition to generating a distinct file for Unicode ctype
information e.g. i18n_ctype, the check target was left with the wrong
target name. This patch fixes the check target and regenerates the
files with more information than previously used, filling in the the
LC_IDENTIFICATION data.

Tested on x86_64 by regenerating from Unicode source files, and
running checks. Tested by subsequently rebuilding all locales.
No regressions in testsuite.

Signed-off-by: Carlos O'Donell <carlos@redhat.com>
Reported-by: Rafal Luzynski <digitalfreak@lingonborough.com>
2017-10-25 09:17:46 -07:00