Commit Graph

32375 Commits

Author SHA1 Message Date
Adhemerval Zanella c66c908230 posix: Sync glob with gnulib [BZ #1062]
This patch syncs posix/glob.c implementation with gnulib version
b5ec983 (glob: simplify symlink detection).  The only difference
to gnulib code is

  * DT_UNKNOWN, DT_DIR, and DT_LNK definition in the case there
    were not already defined.  Gnulib code which uses
    HAVE_STRUCT_DIRENT_D_TYPE will redefine them wrongly because
    GLIBC does not define HAVE_STRUCT_DIRENT_D_TYPE.  Instead
    the patch check for each definition instead.

Also, the patch requires additional globfree and globfree64 files
for compatibility version on some architectures.  Also the code
simplification leads to not macro simplification (not need for
NO_GLOB_PATTERN_P anymore).

Checked on x86_64-linux-gnu and on a build using build-many-glibcs.py
for all major architectures.

	[BZ #1062]
	* posix/Makefile (routines): Add globfree, globfree64, and
	glob_pattern_p.
	* posix/flexmember.h: New file.
	* posix/glob_internal.h: Likewise.
	* posix/glob_pattern_p.c: Likewise.
	* posix/globfree.c: Likewise.
	* posix/globfree64.c: Likewise.
	* sysdeps/gnu/globfree64.c: Likewise.
	* sysdeps/unix/sysv/linux/alpha/globfree.c: Likewise.
	* sysdeps/unix/sysv/linux/mips/mips64/n64/globfree64.c: Likewise.
	* sysdeps/unix/sysv/linux/oldglob.c: Likewise.
	* sysdeps/unix/sysv/linux/wordsize-64/globfree64.c: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/x32/globfree.c: Likewise.
	* sysdeps/wordsize-64/globfree.c: Likewise.
	* sysdeps/wordsize-64/globfree64.c: Likewise.
	* posix/glob.c (HAVE_CONFIG_H): Use !_LIBC instead.
	[NDEBUG): Remove comments.
	(GLOB_ONLY_P, _AMIGA, VMS): Remove define.
	(dirent_type): New type.  Use uint_fast8_t not
	uint8_t, as C99 does not require uint8_t.
	(DT_UNKNOWN, DT_DIR, DT_LNK): New macros.
	(struct readdir_result): Use dirent_type.  Do not define skip_entry
	unless it is needed; this saves a byte on platforms lacking d_ino.
	(readdir_result_type, readdir_result_skip_entry):
	New functions, replacing ...
	(readdir_result_might_be_symlink, readdir_result_might_be_dir):
	 these functions, which were removed.  This makes the callers
	easier to read.  All callers changed.
	(D_INO_TO_RESULT): Now empty if there is no d_ino.
	(size_add_wrapv, glob_use_alloca): New static functions.
	(glob, glob_in_dir): Check for size_t overflow in several places,
	and fix some size_t checks that were not quite right.
	Remove old code using SHELL since Bash no longer
	uses this.
	(glob, prefix_array): Separate MS code better.
	(glob_in_dir): Remove old Amiga and VMS code.
	(globfree, __glob_pattern_type, __glob_pattern_p): Move to
	separate files.
	(glob_in_dir): Do not rely on undefined behavior in accessing
	struct members beyond their bounds.  Use a flexible array member
	instead
	(link_stat): Rename from link_exists2_p and return -1/0 instead of
	0/1.  Caller changed.
	(glob): Fix memory leaks.
	* posix/glob64 (globfree64): Move to separate file.
	* sysdeps/gnu/glob64.c (NO_GLOB_PATTERN_P): Remove define.
	(globfree64): Remove hidden alias.
	* sysdeps/unix/sysv/linux/Makefile (sysdeps_routines): Add
	oldglob.
	* sysdeps/unix/sysv/linux/alpha/glob.c (__new_globfree): Move to
	separate file.
	* sysdeps/unix/sysv/linux/i386/glob64.c (NO_GLOB_PATTERN_P): Remove
	define.
	Move compat code to separate file.
	* sysdeps/wordsize-64/glob.c (globfree): Move definitions to
	separate file.
2017-09-08 09:39:13 +02:00
H.J. Lu 78bfa877b3 Use "static const char domain[] ="
* resolv/tst-resolv-qtypes.c (domain): Changed to
	"const char domain[] =".
2017-09-07 13:57:15 -07:00
Joseph Myers 85bec0f2a0 Use MPFR 3.1.6 in build-many-glibcs.py.
* scripts/build-many-glibcs.py (Context.checkout): Default MPFR
	version to 3.1.6.
2017-09-07 14:50:32 +00:00
Joseph Myers 5c23ee6eb8 Update netinet/tcp.h from Linux 4.13.
This patch updates sysdeps/gnu/netinet/tcp.h to include new
definitions from include/uapi/linux/tcp.h in Linux 4.13.

Tested for x86_64.

	* sysdeps/gnu/netinet/tcp.h (TCP_ULP): New macro.
	(TCP_MD5SIG_EXT): Likewise.
	(TCP_MD5SIG_FLAG_PREFIX): Likewise.
	(struct tcp_md5sig): Replace __tcpm_pad1 by tcpm_flags and
	tcpm_prefixlen.  Rename __tcpm_pad2 to __tcpm_pad.
2017-09-07 14:29:38 +00:00
Joseph Myers 05f0011fb0 Add SOL_TLS definition from Linux 4.13.
This patch adds the new SOL_TLS constant from Linux 4.13 to the Linux
bits/socket.h.

Tested for x86_64.

	* sysdeps/unix/sysv/linux/bits/socket.h (SOL_TLS): New macro.
2017-09-07 14:28:36 +00:00
Mike FABIAN 7c9c5be96f Use ASCII in LC_TIME of om_ET for better readability
* localedata/locales/om_ET (LC_TIME): use ASCII for better readability.
2017-09-07 09:44:50 +02:00
Akhilesh Kumar ae214523ee Remove redundant LC_TIME data in om_KE which is identical to the data in om_ET
[BZ #22100]
	* locales/om_KE (LC_TIME): copy "om_ET".
2017-09-07 09:44:49 +02:00
Samuel Thibault 507fe02799 hurd: fix gethostname(NULL, 0)
* hurd/get-host.c (_hurd_get_host_config): Also check that more == 0
	before assuming that the file is empty.  Avoid testing buffer content
	when nread == 0.
2017-09-07 00:51:17 +02:00
Adhemerval Zanella 7bbbb4b9f7 Add ChangeLog bugzilla mark for previous commit 2017-09-06 14:53:03 -03:00
Adhemerval Zanella 65687ac76c Remove remaining _HAVE_STRING_ARCH_* definitions (BZ #18858)
Since the removal of bits/string.h, _HAVE_STRING_ARCH_* are no
longer used.  This patch removes the unused macros from i686
and x86_64 sysdeps folder.

Checked on x86_64-linux-gnu and i686-linux-gnu.

	* sysdeps/i386/i686/multiarch/strncpy.c (_HAVE_STRING_ARCH_strncpy):
	Remove define.
	* sysdeps/x86_64/multiarch/stpcpy.c (_HAVE_STRING_ARCH_stpcpy):
	Likewise.
	* sysdeps/x86_64/multiarch/strcspn.c (_HAVE_STRING_ARCH_strcspn):
	Likewise.
	* sysdeps/x86_64/multiarch/strncat.c (_HAVE_STRING_ARCH_strncat):
	Likewise.
	* sysdeps/x86_64/multiarch/strncpy.c (_HAVE_STRING_ARCH_strncpy):
	Likewise.
	* sysdeps/x86_64/multiarch/strpbrk.c (_HAVE_STRING_ARCH_strpbrk):
	Likewise.
	* sysdeps/x86_64/multiarch/strspn.c (_HAVE_STRING_ARCH_strspn):
	Likewise.
2017-09-06 14:35:23 -03:00
Florian Weimer ab5ac271e6 __libc_dynarray_emplace_enlarge: Add missing else
Before, arrays of small elements received a starting allocation size of
8, not 16.
2017-09-06 16:03:28 +02:00
Florian Weimer a830473081 resolv: __resolv_conf_attach must not free passed conf object [BZ #22096] 2017-09-06 15:32:43 +02:00
Florian Weimer 5670c4ab25 resolv: Fix memory leak with OOM during resolv.conf parsing [BZ #22095] 2017-09-06 15:20:25 +02:00
Florian Weimer c77eb96925 nss_dns: Remove dead PTR IPv4-to-IPv6 mapping code 2017-09-06 15:11:44 +02:00
Florian Weimer 5e9c4d17fe tst-res_use_inet6: Enhance test to cover IPv4-to-IPv6 address mapping
This requires more control over the response data, so it is now
determined by flags embedded in the query name.
2017-09-06 13:45:19 +02:00
Mike FABIAN 2ae5be041d Improve utf8_gen.py to set the width for characters with Prepended_Concatenation_Mark property to 1
[BZ #22070]
	* localedata/unicode-gen/utf8_gen.py: Set the width for
	characters with Prepended_Concatenation_Mark property to 1
	* localedata/charmaps/UTF-8: Updated using the improved script.
2017-09-06 12:39:49 +02:00
Mike FABIAN af83ed5c46 Write all ranges of neighbouring characters with the same width using the range notation in charmaps/UTF-8
Writing ranges of neighbouring characters with the same with like this

    <U000E0100>...<U000E01EF>	0

in charmaps/UTF-8 is more efficient than writing many single character lines
like:

    <U000E0100>	0
    <U000E0101>	0
    ...

	[BZ #21750]
	* unicode-gen/utf8_gen.py: Write all ranges of neighbouring characters
	with the same width using the range notation in charmaps/UTF-8.
2017-09-06 12:37:49 +02:00
Joseph Myers 4f3647e46e Prefer new libm function wrappers for !LIBM_SVID_COMPAT.
The initial obsoletion of SVID libm error handling left the old
wrappers and __kernel_standard still being used for new ports and
static linking, just with macro definitions of _LIB_VERSION and
matherr that meant symbols with those names were never actually used
and the code for different error handling variants could be optimized
out.

This patch cleans things up further by eliminating the
__kernel_standard use for new ports and static linking.  Now, the old
wrappers no longer generate any code in the !LIBM_SVID_COMPAT case,
while the new errno-only wrappers that were added for float128 support
are now also used for float, double and long double in that case.

The changes are generally straightforward.  The w_scalb*_compat
wrappers continue to be used (scalb is obsolescent in the sense of not
being supported for float128, but is present in supported standards -
the 2001 edition of POSIX and earlier XSI versions - so remains
supported for static linking and new ports, as do the float and long
double variants that are existing GNU extensions).  Those wrappers
would only call __kernel_standard in the _LIB_VERSION == _SVID_ case.
Since we would like to be able to compile most of glibc without
optimization, relying on a static function whose only use is under an
if (0) condition being optimized away to avoid an undefined
__kernel_standard reference may not be a good idea.  Thus, the
relevant code in the scalb wrappers has LIBM_SVID_COMPAT conditionals
added to guarantee it's not built at all in the case where
__kernel_standard does not exist.

Just as i386 has its own w_sqrt_compat.c, so w_sqrt.c is also added.
ia64 gets dummy w_*.c to prevent those files being built where they
would conflict with the ia64 libm, as with its existing w_*_compat.c.

Conditions disabling code for !LIBM_SVID_COMPAT are needed in both the
math/ wrappers and in the long double wrappers in ldbl-opt (to avoid
them setting up aliases and symbol versions for undefined symbols).  I
hope that future cleanups to how libm function aliases and symbol
versioning are done will eliminate the need for most of the ldbl-opt
wrappers.

Tested for x86_64 and x86, and with build-many-glibcs.py.

	* sysdeps/generic/math-type-macros-double.h: Include
	<math-svid-compat.h>.
	(__USE_WRAPPER_TEMPLATE): Define to !LIBM_SVID_COMPAT.
	* sysdeps/generic/math-type-macros-float.h: Include
	<math-svid-compat.h>.
	(__USE_WRAPPER_TEMPLATE): Define to !LIBM_SVID_COMPAT.
	* sysdeps/generic/math-type-macros-ldouble.h: Include
	<math-svid-compat.h>.
	(__USE_WRAPPER_TEMPLATE): Define to !LIBM_SVID_COMPAT.
	* math/lgamma-compat.h (BUILD_LGAMMA): Include LIBM_SVID_COMPAT
	condition.
	* math/w_acos_compat.c: Condition contents on [LIBM_SVID_COMPAT].
	* math/w_acosf_compat.c: Likewise.
	* math/w_acosh_compat.c: Likewise.
	* math/w_acoshf_compat.c: Likewise.
	* math/w_acoshl_compat.c: Likewise.
	* math/w_acosl_compat.c: Likewise.
	* math/w_asin_compat.c: Likewise.
	* math/w_asinf_compat.c: Likewise.
	* math/w_asinl_compat.c: Likewise.
	* math/w_atan2_compat.c: Likewise.
	* math/w_atan2f_compat.c: Likewise.
	* math/w_atan2l_compat.c: Likewise.
	* math/w_atanh_compat.c: Likewise.
	* math/w_atanhf_compat.c: Likewise.
	* math/w_atanhl_compat.c: Likewise.
	* math/w_cosh_compat.c: Likewise.
	* math/w_coshf_compat.c: Likewise.
	* math/w_coshl_compat.c: Likewise.
	* math/w_exp10_compat.c: Likewise.
	* math/w_exp10f_compat.c: Likewise.
	* math/w_exp10l_compat.c: Likewise.
	* math/w_exp2_compat.c: Likewise.
	* math/w_exp2f_compat.c: Likewise.
	* math/w_exp2l_compat.c: Likewise.
	* math/w_fmod_compat.c: Likewise.
	* math/w_fmodf_compat.c: Likewise.
	* math/w_fmodl_compat.c: Likewise.
	* math/w_hypot_compat.c: Likewise.
	* math/w_hypotf_compat.c: Likewise.
	* math/w_hypotl_compat.c: Likewise.
	* math/w_j0_compat.c: Likewise.
	* math/w_j0f_compat.c: Likewise.
	* math/w_j0l_compat.c: Likewise.
	* math/w_j1_compat.c: Likewise.
	* math/w_j1f_compat.c: Likewise.
	* math/w_j1l_compat.c: Likewise.
	* math/w_jn_compat.c: Likewise.
	* math/w_jnf_compat.c: Likewise.
	* math/w_jnl_compat.c: Likewise.
	* math/w_lgamma_r_compat.c: Likewise.
	* math/w_lgammaf_r_compat.c: Likewise.
	* math/w_lgammal_r_compat.c: Likewise.
	* math/w_log10_compat.c: Likewise.
	* math/w_log10f_compat.c: Likewise.
	* math/w_log10l_compat.c: Likewise.
	* math/w_log2_compat.c: Likewise.
	* math/w_log2f_compat.c: Likewise.
	* math/w_log2l_compat.c: Likewise.
	* math/w_log_compat.c: Likewise.
	* math/w_logf_compat.c: Likewise.
	* math/w_logl_compat.c: Likewise.
	* math/w_pow_compat.c: Likewise.
	* math/w_powf_compat.c: Likewise.
	* math/w_powl_compat.c: Likewise.
	* math/w_remainder_compat.c: Likewise.
	* math/w_remainderf_compat.c: Likewise.
	* math/w_remainderl_compat.c: Likewise.
	* math/w_sinh_compat.c: Likewise.
	* math/w_sinhf_compat.c: Likewise.
	* math/w_sinhl_compat.c: Likewise.
	* math/w_sqrt_compat.c: Likewise.
	* math/w_sqrtf_compat.c: Likewise.
	* math/w_sqrtl_compat.c: Likewise.
	* math/w_tgamma_compat.c: Likewise.
	* math/w_tgammaf_compat.c: Likewise.
	* math/w_tgammal_compat.c: Likewise.
	* math/w_scalb_compat.c (sysv_scalb): Condition definition on
	[LIBM_SVID_COMPAT].
	(__scalb): Condition call to sysv_scalb on [LIBM_SVID_COMPAT].
	* math/w_scalbf_compat.c (sysv_scalbf): Condition definition on
	[LIBM_SVID_COMPAT].
	(__scalbf): Condition call to sysv_scalbf on [LIBM_SVID_COMPAT].
	* math/w_scalbl_compat.c (sysv_scalbl): Condition definition on
	[LIBM_SVID_COMPAT].
	(__scalbl): Condition call to sysv_scalbl on [LIBM_SVID_COMPAT].
	* sysdeps/i386/fpu/w_sqrt.c: New file.
	* sysdeps/ia64/fpu/w_acos.c: Likewise.
	* sysdeps/ia64/fpu/w_acosf.c: Likewise.
	* sysdeps/ia64/fpu/w_acosh.c: Likewise.
	* sysdeps/ia64/fpu/w_acoshf.c: Likewise.
	* sysdeps/ia64/fpu/w_acoshl.c: Likewise.
	* sysdeps/ia64/fpu/w_acosl.c: Likewise.
	* sysdeps/ia64/fpu/w_asin.c: Likewise.
	* sysdeps/ia64/fpu/w_asinf.c: Likewise.
	* sysdeps/ia64/fpu/w_asinl.c: Likewise.
	* sysdeps/ia64/fpu/w_atan2.c: Likewise.
	* sysdeps/ia64/fpu/w_atan2f.c: Likewise.
	* sysdeps/ia64/fpu/w_atan2l.c: Likewise.
	* sysdeps/ia64/fpu/w_atanh.c: Likewise.
	* sysdeps/ia64/fpu/w_atanhf.c: Likewise.
	* sysdeps/ia64/fpu/w_atanhl.c: Likewise.
	* sysdeps/ia64/fpu/w_cosh.c: Likewise.
	* sysdeps/ia64/fpu/w_coshf.c: Likewise.
	* sysdeps/ia64/fpu/w_coshl.c: Likewise.
	* sysdeps/ia64/fpu/w_exp.c: Likewise.
	* sysdeps/ia64/fpu/w_exp10.c: Likewise.
	* sysdeps/ia64/fpu/w_exp10f.c: Likewise.
	* sysdeps/ia64/fpu/w_exp10l.c: Likewise.
	* sysdeps/ia64/fpu/w_exp2.c: Likewise.
	* sysdeps/ia64/fpu/w_exp2f.c: Likewise.
	* sysdeps/ia64/fpu/w_exp2l.c: Likewise.
	* sysdeps/ia64/fpu/w_expf.c: Likewise.
	* sysdeps/ia64/fpu/w_expl.c: Likewise.
	* sysdeps/ia64/fpu/w_fmod.c: Likewise.
	* sysdeps/ia64/fpu/w_fmodf.c: Likewise.
	* sysdeps/ia64/fpu/w_fmodl.c: Likewise.
	* sysdeps/ia64/fpu/w_hypot.c: Likewise.
	* sysdeps/ia64/fpu/w_hypotf.c: Likewise.
	* sysdeps/ia64/fpu/w_hypotl.c: Likewise.
	* sysdeps/ia64/fpu/w_lgamma_r.c: Likewise.
	* sysdeps/ia64/fpu/w_lgammaf_r.c: Likewise.
	* sysdeps/ia64/fpu/w_lgammal_r.c: Likewise.
	* sysdeps/ia64/fpu/w_log.c: Likewise.
	* sysdeps/ia64/fpu/w_log10.c: Likewise.
	* sysdeps/ia64/fpu/w_log10f.c: Likewise.
	* sysdeps/ia64/fpu/w_log10l.c: Likewise.
	* sysdeps/ia64/fpu/w_log2.c: Likewise.
	* sysdeps/ia64/fpu/w_log2f.c: Likewise.
	* sysdeps/ia64/fpu/w_log2l.c: Likewise.
	* sysdeps/ia64/fpu/w_logf.c: Likewise.
	* sysdeps/ia64/fpu/w_logl.c: Likewise.
	* sysdeps/ia64/fpu/w_pow.c: Likewise.
	* sysdeps/ia64/fpu/w_powf.c: Likewise.
	* sysdeps/ia64/fpu/w_powl.c: Likewise.
	* sysdeps/ia64/fpu/w_remainder.c: Likewise.
	* sysdeps/ia64/fpu/w_remainderf.c: Likewise.
	* sysdeps/ia64/fpu/w_remainderl.c: Likewise.
	* sysdeps/ia64/fpu/w_sinh.c: Likewise.
	* sysdeps/ia64/fpu/w_sinhf.c: Likewise.
	* sysdeps/ia64/fpu/w_sinhl.c: Likewise.
	* sysdeps/ia64/fpu/w_sqrt.c: Likewise.
	* sysdeps/ia64/fpu/w_sqrtf.c: Likewise.
	* sysdeps/ia64/fpu/w_sqrtl.c: Likewise.
	* sysdeps/ia64/fpu/w_tgamma.c: Likewise.
	* sysdeps/ia64/fpu/w_tgammaf.c: Likewise.
	* sysdeps/ia64/fpu/w_tgammal.c: Likewise.
	* sysdeps/ieee754/dbl-64/w_exp_compat.c: Condition contents on
	[LIBM_SVID_COMPAT].
	* sysdeps/ieee754/flt-32/w_expf_compat.c: Likewise.
	* sysdeps/ieee754/k_standard.c: Likewise.
	* sysdeps/ieee754/k_standardf.c: Likewise.
	* sysdeps/ieee754/k_standardl.c: Likewise.
	* sysdeps/ieee754/ldbl-128/w_expl_compat.c: Likewise.
	* sysdeps/ieee754/ldbl-128ibm/w_expl_compat.c: Likewise.
	* sysdeps/ieee754/ldbl-96/w_expl_compat.c: Likewise.
	* sysdeps/ieee754/ldbl-64-128/w_expl_compat.c: Condition
	long_double_symbol call on [LIBM_SVID_COMPAT].
	* sysdeps/ieee754/ldbl-opt/w_acoshl_compat.c: Likewise.
	* sysdeps/ieee754/ldbl-opt/w_acosl_compat.c: Likewise.
	* sysdeps/ieee754/ldbl-opt/w_asinl_compat.c: Likewise.
	* sysdeps/ieee754/ldbl-opt/w_atan2l_compat.c: Likewise.
	* sysdeps/ieee754/ldbl-opt/w_atanhl_compat.c: Likewise.
	* sysdeps/ieee754/ldbl-opt/w_coshl_compat.c: Likewise.
	* sysdeps/ieee754/ldbl-opt/w_fmodl_compat.c: Likewise.
	* sysdeps/ieee754/ldbl-opt/w_hypotl_compat.c: Likewise.
	* sysdeps/ieee754/ldbl-opt/w_j0l_compat.c: Likewise.
	* sysdeps/ieee754/ldbl-opt/w_j1l_compat.c: Likewise.
	* sysdeps/ieee754/ldbl-opt/w_jnl_compat.c: Likewise.
	* sysdeps/ieee754/ldbl-opt/w_lgammal_r_compat.c: Likewise.
	* sysdeps/ieee754/ldbl-opt/w_log10l_compat.c: Likewise.
	* sysdeps/ieee754/ldbl-opt/w_log2l_compat.c: Likewise.
	* sysdeps/ieee754/ldbl-opt/w_logl_compat.c: Likewise.
	* sysdeps/ieee754/ldbl-opt/w_powl_compat.c: Likewise.
	* sysdeps/ieee754/ldbl-opt/w_remainderl_compat.c: Likewise.
	* sysdeps/ieee754/ldbl-opt/w_sinhl_compat.c: Likewise.
	* sysdeps/ieee754/ldbl-opt/w_sqrtl_compat.c: Likewise.
	* sysdeps/ieee754/ldbl-opt/w_tgammal_compat.c: Likewise.
	* sysdeps/ieee754/ldbl-opt/w_exp10l_compat.c: Condition
	long_double_symbol and compat_symbol calls on [LIBM_SVID_COMPAT].
2017-09-05 23:35:55 +00:00
Steve Ellcey 05b38d64b1 Fix tests that are testing obsoleted functionality
* include/shlib-compat.h (TEST_COMPAT): New Macro.
	* malloc/tst-mallocstate.c: Convert from test-skeleton
	to test-driver.  Ifdef code using TEST_COMPAT macro.
	* math/test-matherr-2.c: Ifdef test using TEST_COMPAT macro.
	* math/test-matherr.c: Likewise.
2017-09-05 12:24:00 -07:00
Joseph Myers 99d6791899 Fix pcprofiledump cross-endian condition (bug 22086).
debug/pcprofiledump.c contains code that tries to handle other-endian
data.  This uses a condition "(word & 0xfffffff0) == bswap_32
(0xdeb00000)".  This condition is always false (the LHS always has the
low four bits zero, the RHS doesn't); a correct comparison would use
0x0fffffff.  This results in -Werror=tautological-compare build
failures with the tile version of bits/byteswap.h and mainline GCC.

https://sourceware.org/ml/libc-testresults/2017-q3/msg00400.html

pcprofiledump.c: In function 'main':
pcprofiledump.c:118:39: error: bitwise comparison always evaluates to false
[-Werror=tautological-compare]
   int must_swap = (word & 0xfffffff0) == bswap_32 (0xdeb00000);
                                       ^~

This patch fixes the condition.  Tested for x86_64, and with
build-many-glibcs.py that it fixes the build for tilegx-linux-gnu.
(Note that I have not tested the actual pcprofiledump functionality,
native or cross endian, which lacks any testsuite coverage.)

	[BZ #22086]
	* debug/pcprofiledump.c (main): Use byte-swapped mask when
	comparing word with byte-swapped constant.
2017-09-05 15:14:09 +00:00
Mike FABIAN 3f802aeb34 Add miq_NI locale for Miskito
[BZ #20498]
	* locale/iso-639.def: add Miskito.
	* localedata/SUPPORTED: Add miq_NI/UTF-8.
	* localedata/locales/miq_NI: New file.
2017-09-05 15:04:23 +02:00
H.J. Lu 0a587a8a98 Hide __chmod and __mkdir [BZ #18822]
Hide internal __chmod and __mkdir functions to allow direct access
within libc.so and libc.a without using GOT nor PLT.

	[BZ #18822]
	* include/sys/stat.h (__chmod): Add libc_hidden_proto.
	(__mkdir): Likewise.
	* io/chmod.c (__chmod): Add libc_hidden_def.
	* io/mkdir.c (__mkdir): Likewise.
	* sysdeps/mach/hurd/chmod.c (__chmod): Likewise.
	* sysdeps/mach/hurd/mkdir.c (__mkdir): Likewise.
	* sysdeps/unix/sysv/linux/generic/chmod.c (__chmod): Likewise.
	* sysdeps/unix/sysv/linux/generic/mkdir.c (__mkdir): Likewise.
2017-09-04 13:38:51 -07:00
Joseph Myers 1650e19265 Update kernel version in syscall-names.list to 4.13.
As far as I can tell Linux 4.13 does not add any new syscalls not
included in syscall-names.list.  This patch updates the version number
in that file accordingly.

	* sysdeps/unix/sysv/linux/syscall-names.list: Update kernel
	version to 4.13.
2017-09-04 20:16:07 +00:00
Joseph Myers f3a129b872 Fix bits/math-finite.h exp10 condition (bug 22082).
bits/math-finite.h handles exp10 if __USE_GNU.  It should use the
condition __GLIBC_USE (IEC_60559_FUNCS_EXT), as in bits/mathcalls.h.
This patch fixes the condition.

Tested for x86_64.

	[BZ #22082]
	* math/bits/math-finite.h (exp10): Redirect if [__GLIBC_USE
	(IEC_60559_FUNCS_EXT)], not [__USE_GNU].
2017-09-04 16:28:23 +00:00
Florian Weimer b38042f514 math.h: Warn about an already-defined log macro
This is a common programming error, and the cause of the problem is not
always obvious.

<tgmath.h> defines a log macro, but it includes <math.h> before that, so
that is compatible with the warning.
2017-09-04 17:56:31 +02:00
Joseph Myers 059b64046e Use Linux 4.13 in build-many-glibcs.py.
* scripts/build-many-glibcs.py (Context.checkout): Default Linux
	kernel version to 4.13.
2017-09-04 15:34:58 +00:00
Samuel Thibault 6547ec0ad8 hurd: fix resolv/tst-resolv-res_init-skeleton.c build
* resolv/tst-resolv-res_init-skeleton.c (run_res_init)
	[!CLONE_NEWUTS]: Fail as unsupported if hostname is not NULL.
2017-09-03 19:44:07 +02:00
Samuel Thibault 492cbbed86 hurd: Fix build ot misc/tst-preadvwritev2-common.c
* misc/tst-preadvwritev2-common.c (RWF_HIPRI, RWF_DSYNC, RWF_SYNC,
	RWF_NOWAIT): Define to 0 if undefined already.
	(do_test_with_invalid_flags): Set invalid_flag to 2 if RWF_SUPPORTED
	boils down to 0.
2017-09-03 17:51:15 +02:00
Samuel Thibault cae3d71212 hurd: Fix rtld's strtoul_internal use through hurdlookup
* sysdeps/mach/hurd/dl-sysdep.c (__strtoul_internal): New
	function.
2017-09-03 14:33:35 +02:00
Samuel Thibault 77e7ba3201 hurd: fix overriding rtld's __sbrk with the real implementation
* sysdeps/mach/hurd/dl-sysdep.c (__sbrk): Add weak_function
	qualifier.
2017-09-03 14:19:21 +02:00
Samuel Thibault 2ce1f9efd6 hurd: mach/hurd/x86 also needs x86 tunables
* sysdeps/mach/hurd/x86/dl-sysdep.c: New file.
2017-09-03 13:39:33 +02:00
Samuel Thibault 56bf5497c5 hurd: mach/hurd/i386 also needs mach/hurd/x86
* sysdeps/mach/hurd/i386/Implies: Add mach/hurd/x86.
2017-09-03 13:38:09 +02:00
Samuel Thibault 1946d950f2 hurd: fix libm link
* sysdeps/x86/fpu/include/bits/fenv.h [NO_HIDDEN]: Redirect
	__feraiseexcept_renamed to feraiseexcept instead of
	__GI_feraiseexcept.
2017-09-03 05:32:10 +02:00
Samuel Thibault f85958a74d hurd: Fix libc link
This follows db3d848 ('Build divdi3 only for architecture that required
it').

	* sysdeps/mach/hurd/i386/Makefile
	[$(subdir) = csu] (sysdep_routines): New rule: divdi3 object.
	[$(subdir) = csu] (sysdep-only-routines): Likewise.
	[$(subdir) = csu] (CFLAGS-divdi3.c): Likewise.
2017-09-03 04:58:00 +02:00
Samuel Thibault 127e7773b4 hurd: Fix libc link
* sysdeps/posix/pause.c: Include <sigsetops.h>.
	* sysdeps/posix/system.c: Include <sigsetops.h>.
2017-09-03 04:36:29 +02:00
Samuel Thibault b96aca4d05 hurd: Fix rtld link
* sysdeps/mach/hurd/dl-sysdep.c (__sbrk): New function.
2017-09-03 04:26:31 +02:00
Samuel Thibault 819ea3347e hurd: Fix rtld link
dl-tunables.c now uses __access_noerrno in addition to __access.

	* sysdeps/mach/hurd/dl-sysdep.c (__access_noerrno): New function.
2017-09-03 04:09:54 +02:00
Samuel Thibault 2263ca7ce8 hurd: Fix p{read,write}{,v64}v2.c build
* misc/preadv2.c: Include <errno.h>.
	* misc/preadv64v2.c: Include <errno.h>.
	* misc/pwritev2.c: Include <errno.h>.
	* misc/pwritev64v2.c: Include <errno.h>.
	* sysdeps/posix/preadv2.c: Include <errno.h>.
	* sysdeps/posix/preadv64v2.c: Include <errno.h>.
	Fix <unistd.h> inclusion.
	* sysdeps/posix/pwritev2.c: Include <errno.h>.
	* sysdeps/posix/pwritev64v2.c: Include <errno.h>.
2017-09-03 03:03:40 +02:00
Samuel Thibault ed95bf5638 hurd: Fix p{read,write}v64v2.c build
* sysdeps/posix/preadv64v2.c: Use off64_t instead of off_t.
	* sysdeps/posix/pwritev64v2.c: Use off64_t instead of off_t.
2017-09-03 03:00:55 +02:00
Samuel Thibault dd2b31dec0 hurd: Fix p{read,write}{,v64}v2.c build
* sysdeps/posix/preadv2.c: Use off_t instead of OFF_T.
	* sysdeps/posix/preadv64v2.c: Use off_t instead of OFF_T.
	* sysdeps/posix/pwritev2.c: Use off_t instead of OFF_T.
	* sysdeps/posix/pwritev64v2.c: Use off_t instead of OFF_T.
2017-09-03 02:45:06 +02:00
Samuel Thibault 01969395db hurd: Fix getting ssize_t for <sys/socket.h>
* sysdeps/mach/hurd/bits/socket.h: Include <sys/types.h> instead of
	just <bits/types.h>.
2017-09-03 02:22:00 +02:00
Samuel Thibault 06cf9d31d7 hurd: Fix sigsetops.h macros
* sysdeps/generic/sigsetops.h: Remove spurious #endif.
	(__sigismember, __sigaddset, __sigdelset): Fix referencing set
	parameter.
2017-09-03 01:45:19 +02:00
Samuel Thibault b794e16bcc sysdeps/generic/sigsetops.h: Remove spurious #endif 2017-09-03 01:08:49 +02:00
Joseph Myers 5a80d39d0d Obsolete pow10 functions.
This patch obsoletes the pow10, pow10f and pow10l functions (makes
them into compat symbols, not available for new ports or static
linking).  The exp10 names for these functions are standardized (in TS
18661-4) and were added in the same glibc version (2.1) as pow10 so
source code can change to use them without any loss of portability.
Since pow10 is deliberately not provided for _Float128, only exp10,
this slightly simplifies moving to the new wrapper templates in the
!LIBM_SVID_COMPAT case, by avoiding needing to arrange for pow10,
pow10f and pow10l to be defined by those templates.

Tested for x86_64, and with build-many-glibcs.py.

	* manual/math.texi (pow10): Do not document.
	(pow10f): Likewise.
	(pow10l): Likewise.
	* math/bits/mathcalls.h [__USE_GNU] (pow10): Do not declare.
	* math/bits/math-finite.h [__USE_GNU] (pow10): Likewise.
	* math/libm-test-exp10.inc (pow10_test): Remove.
	(do_test): Do not call pow10.
	* math/w_exp10_compat.c (pow10): Make into compat symbol.
	[NO_LONG_DOUBLE] (pow10l): Likewise.
	* math/w_exp10f_compat.c (pow10f): Likewise.
	* math/w_exp10l_compat.c (pow10l): Likewise.
	* sysdeps/ia64/fpu/e_exp10.S: Include <shlib-compat.h>.
	(pow10): Make into compat symbol.
	* sysdeps/ia64/fpu/e_exp10f.S: Include <shlib-compat.h>.
	(pow10f): Make into compat symbol.
	* sysdeps/ia64/fpu/e_exp10l.S: Include <shlib-compat.h>.
	(pow10l): Make into compat symbol.
	* sysdeps/ieee754/ldbl-opt/Makefile (libnldbl-calls): Remove
	pow10.
	(CFLAGS-nldbl-pow10.c): Remove variable..
	* sysdeps/ieee754/ldbl-opt/nldbl-pow10.c: Remove file.
	* sysdeps/ieee754/ldbl-opt/w_exp10_compat.c (pow10l): Condition on
	[SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_27)].
	* sysdeps/ieee754/ldbl-opt/w_exp10l_compat.c (compat_symbol):
	Undefine and redefine.
	(pow10l): Make into compat symbol.
	* sysdeps/aarch64/libm-test-ulps: Remove pow10 ulps.
	* sysdeps/alpha/fpu/libm-test-ulps: Likewise.
	* sysdeps/arm/libm-test-ulps: Likewise.
	* sysdeps/hppa/fpu/libm-test-ulps: Likewise.
	* sysdeps/i386/fpu/libm-test-ulps: Likewise.
	* sysdeps/i386/i686/fpu/multiarch/libm-test-ulps: Likewise.
	* sysdeps/microblaze/libm-test-ulps: Likewise.
	* sysdeps/mips/mips32/libm-test-ulps: Likewise.
	* sysdeps/mips/mips64/libm-test-ulps: Likewise.
	* sysdeps/nios2/libm-test-ulps: Likewise.
	* sysdeps/powerpc/fpu/libm-test-ulps: Likewise.
	* sysdeps/powerpc/nofpu/libm-test-ulps: Likewise.
	* sysdeps/s390/fpu/libm-test-ulps: Likewise.
	* sysdeps/sh/libm-test-ulps: Likewise.
	* sysdeps/sparc/fpu/libm-test-ulps: Likewise.
	* sysdeps/tile/libm-test-ulps: Likewise.
	* sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
2017-09-01 21:13:18 +00:00
Paul Pluzhnikov 3824fc3891 2017-09-01 Paul Pluzhnikov <ppluzhnikov@google.com>
* stdlib/tst-atexit-common.c (crumbs): Ensure correct size.
2017-09-01 11:35:55 -07:00
H.J. Lu b30082799d Update tst-regex.c/tst-regex2.c for old ChangeLog move
* posix/tst-regex.c (do_test): Replace "../ChangeLog.8" with
	"../ChangeLog.old/ChangeLog.8".
	* posix/tst-regex2.c (do_test): Replace "../ChangeLog.14" with
	"../ChangeLog.old/ChangeLog.14".
2017-09-01 10:20:49 -07:00
H.J. Lu 136fa185fd Credit Ulrich Drepper for libpthread in contrib.texi
* manual/contrib.texi: Credit Ulrich Drepper for the POSIX
	Threads Library.
2017-09-01 10:19:07 -07:00
Joseph Myers c18d50a23b Include <string.h> for strcmp call from sysdeps/unix/sysv/linux/gentempfd.c.
* sysdeps/unix/sysv/linux/gentempfd.c: Include <string.h>.
2017-09-01 17:14:43 +00:00
H.J. Lu bedbd85972 Remove Roland McGrath/Ulrich Drepper et al. from DSO banner
* csu/version.c (banner): Remove "by Roland McGrath et al.".
	* nptl/Banner: Remove "by Ulrich Drepper et al.".
2017-09-01 10:09:21 -07:00
Paul Pluzhnikov 50c66c7acd 2017-09-01 Paul Pluzhnikov <ppluzhnikov@google.com>
* stdlib/tst-atexit-common.c (do_test): Test support for at least
	32 atexit handlers.
2017-09-01 09:31:13 -07:00