platform/upstream/glibc.git
9 years agoPreserve bound registers in _dl_runtime_resolve
H.J. Lu [Mon, 16 Mar 2015 21:58:43 +0000 (14:58 -0700)]
Preserve bound registers in _dl_runtime_resolve

We need to add a BND prefix before indirect branch at the end of
_dl_runtime_resolve to preserve bound registers.

[BZ #18134]
* sysdeps/x86_64/dl-trampoline.S (PRESERVE_BND_REGS_PREFIX): New.
(_dl_runtime_resolve): Add a BND prefix before indirect branch.

9 years ago* stdlib/setenv.c (__add_to_environ): Revert previous change.
Paul Eggert [Mon, 16 Mar 2015 00:06:21 +0000 (17:06 -0700)]
* stdlib/setenv.c (__add_to_environ): Revert previous change.

9 years agom68k: fix 64-bit arithmetic in atomic operations (bug 18128)
Andreas Schwab [Fri, 13 Mar 2015 17:21:55 +0000 (18:21 +0100)]
m68k: fix 64-bit arithmetic in atomic operations (bug 18128)

9 years ago* stdlib/setenv.c (__add_to_environ):
Paul Eggert [Thu, 12 Mar 2015 22:57:07 +0000 (15:57 -0700)]
* stdlib/setenv.c (__add_to_environ):

Dump core quickly if setenv (..., NULL, ...) is called.

9 years agoARM: Rewrite sysdeps/arm/tls-macros.h
Roland McGrath [Fri, 13 Mar 2015 17:10:09 +0000 (10:10 -0700)]
ARM: Rewrite sysdeps/arm/tls-macros.h

9 years agoEnhance nscd's inotify support (Bug 14906).
Carlos O'Donell [Fri, 13 Mar 2015 13:49:24 +0000 (09:49 -0400)]
Enhance nscd's inotify support (Bug 14906).

In bug 14906 the user complains that the inotify support in nscd
is not sufficient when it comes to detecting changes in the
configurationfiles that should be watched for the various databases.

The current nscd implementation uses inotify to watch for changes in
the configuration files, but adds watches only for IN_DELETE_SELF and
IN_MODIFY. These watches are insufficient to cover even the most basic
uses by a system administrator. For example using emacs or vim to edit
a configuration file should trigger a reload but it might not if
the editors use move to atomically update the file. This atomic update
changes the inode and thus removes the notification on the file (as
inotify is based on inodes). Thus the inotify support in nscd for
configuration files is insufficient to account for the average use
cases of system administrators and users.

The inotify support is significantly enhanced and described here:
https://www.sourceware.org/ml/libc-alpha/2015-02/msg00504.html

Tested on x86_64 with and without inotify support.

9 years agosoft-fp: Define and use _FP_STATIC_ASSERT.
Joseph Myers [Thu, 12 Mar 2015 18:43:21 +0000 (18:43 +0000)]
soft-fp: Define and use _FP_STATIC_ASSERT.

This patch makes soft-fp use static assertions in place of conditional
calls to abort, in places where there are checks for conditions (on
the types for which a macro is used) that the code is not prepared to
handle.  The fallback definition of _FP_STATIC_ASSERT (for kernel use
only, as only relevant to compilers not supported for building glibc)
is as in misc/sys/cdefs.h.

This means that soft-fp only ever calls abort for _FP_UNREACHABLE
calls in builds with GCC versions before 4.5.  Thus, there is no need
for an abort declaration or <stdlib.h> include, since the kernel code
handles defining abort as a macro itself - and so this avoids any need
for an __KERNEL__ condition on the abort declaration to avoid it
breaking with the kernel's macro definition.  That is, this patch is
intended to make glibc's soft-fp code suitable for kernel use with no
kernel-local changes to the soft-fp code needed at all.

Tested for powerpc-nofpu that installed stripped shared libraries are
unchanged by the patch.  One explicit <stdlib.h> include had to be
added to a file that was relying on the include from soft-fp.h.

* soft-fp/soft-fp.h (_FP_STATIC_ASSERT): New macro.
[_LIBC]: Do not include <stdlib.h>.
[!_LIBC] (abort): Remove declaration.
* soft-fp/op-2.h (_FP_MUL_MEAT_2_120_240_double): Use
_FP_STATIC_ASSERT instead of conditionally calling abort.
* soft-fp/op-common.h (_FP_FROM_INT): Likewise.
(_FP_EXTEND_CNAN): Likewise.
(FP_TRUNC): Likewise.
(__FP_CLZ): Likewise.
* sysdeps/powerpc/nofpu/flt-rounds.c: Include <stdlib.h>.

9 years agomanual: fix XPG basename prototype
Yaakov Selkowitz [Thu, 12 Mar 2015 08:20:35 +0000 (03:20 -0500)]
manual: fix XPG basename prototype

* manual/string.texi (XPG basename): Fix prototype.

9 years agoS/390: Fix setcontext/swapcontext which are not restoring sigmask.
Stefan Liebler [Thu, 12 Mar 2015 10:08:11 +0000 (11:08 +0100)]
S/390: Fix setcontext/swapcontext which are not restoring sigmask.

9 years agoS/390: Regenerate ULPs
Stefan Liebler [Thu, 12 Mar 2015 10:04:13 +0000 (11:04 +0100)]
S/390: Regenerate ULPs

9 years agoFix ldconfig segmentation fault with corrupted cache (Bug 18093).
Aurelien Jarno [Thu, 12 Mar 2015 01:03:50 +0000 (21:03 -0400)]
Fix ldconfig segmentation fault with corrupted cache (Bug 18093).

ldconfig is using an aux-cache to speed up the ld.so.cache update. It
is read by mmaping the file to a structure which contains data offsets
used as pointers. As they are not checked, it is not hard to get
ldconfig to segfault with a corrupted file. This happens for instance if
the file is truncated, which is common following a filesystem check
following a system crash.

This can be reproduced for example by truncating the file to roughly
half of it's size.

There is already some code in elf/cache.c (load_aux_cache) to check
for a corrupted aux cache, but it happens to be broken and not enough.
The test (aux_cache->nlibs >= aux_cache_size) compares the number of
libs entry with the cache size. It's a non sense, as it basically
assumes that each library entry is a 1 byte... Instead this commit
computes the theoretical cache size using the headers and compares it
to the real size.

9 years agoFix BZ #18043 comment # 19: don't call undefined setenv(..., NULL, 1).
Paul Pluzhnikov [Wed, 11 Mar 2015 15:55:50 +0000 (08:55 -0700)]
Fix BZ #18043 comment # 19: don't call undefined setenv(..., NULL, 1).

9 years agopowerpc: Remove HAVE_ASM_GLOBAL_DOT_NAME define
Adhemerval Zanella [Tue, 3 Feb 2015 12:41:25 +0000 (07:41 -0500)]
powerpc: Remove HAVE_ASM_GLOBAL_DOT_NAME define

With AIX port deprecated there is no need to check/define
HAVE_ASM_GLOBAL_DOT_NAME anymore since the current minimum binutils
supported (2.22) does not emit global symbol with dot.

This patch removes all the HAVE_ASM_GLOBAL_DOT_NAME definition and
checks for powerpc64 port.

9 years agohppa: update __O_SYNC fix with [BZ #18068]
Mike Frysinger [Wed, 11 Mar 2015 07:33:07 +0000 (03:33 -0400)]
hppa: update __O_SYNC fix with [BZ #18068]

9 years agohppa: Fix feupdateenv and fesetexceptflag (Bug 18111).
Carlos O'Donell [Wed, 11 Mar 2015 06:42:27 +0000 (02:42 -0400)]
hppa: Fix feupdateenv and fesetexceptflag (Bug 18111).

The function feupdateenv has been fixed to correctly handle FE_DFL_ENV
and FE_NOMASK_ENV.

The fesetexceptflag function has been fixed to correctly handle setting
the new flags instead of just OR-ing the existing flags.

This fixes the test-fenv-return and test-fenvinline failures on hppa.

9 years agohppa: Fix feholdexcpt and fesetenv (Bug 18110).
John David Anglin [Wed, 11 Mar 2015 03:43:50 +0000 (23:43 -0400)]
hppa: Fix feholdexcpt and fesetenv (Bug 18110).

The constraints in the inline assembly in feholdexcept and fesetenv
are incorrect. The assembly modifies the buffer pointer, but doesn't
express that in the constraints. The simple fix is to remove the
modification of the buffer pointer which is no longer required by
the existing code, and adjust the one constraint that did express
the modification of bufptr.

The change fixes test-fenv when glibc is compiled with recent gcc.

9 years agosoft-fp: Add _FP_UNREACHABLE.
Joseph Myers [Wed, 11 Mar 2015 01:14:15 +0000 (01:14 +0000)]
soft-fp: Add _FP_UNREACHABLE.

This patch makes soft-fp use a new macro _FP_UNREACHABLE in place of
calling abort in unreachable default cases of switch statements.
_FP_UNREACHABLE expands to call __builtin_unreachable for GCC 4.5 and
later; the fallback to abort is thus only for kernel use.

Tested for powerpc-nofpu that installed stripped shared libraries are
unchanged by this patch.  Also tested with the math/ tests for mips64
(in the case of fma there *was* previously an abort call generated,
unlike for the other operations - one switch only deals with a subset
of classes for one operand based on what could have been generated in
the earlier part of fma, whereas the other switches deal with all
combinations of two classes - and this is apparently too complicated
for the default case to have been optimized away).

* soft-fp/soft-fp.h (_FP_UNREACHABLE): New macro.
* soft-fp/op-common.h (_FP_MUL): Use _FP_UNREACHABLE instead of
abort.
(_FP_FMA): Likewise.
(_FP_DIV): Likewise.

9 years agoLet tests result in UNSUPPORTED; use that for unbuildable C++ cases
Roland McGrath [Tue, 10 Mar 2015 22:13:14 +0000 (15:13 -0700)]
Let tests result in UNSUPPORTED; use that for unbuildable C++ cases

9 years agoHarmonize posix/regcomp.c with gnulib: comment formatting
Roland McGrath [Tue, 10 Mar 2015 20:53:34 +0000 (13:53 -0700)]
Harmonize posix/regcomp.c with gnulib: comment formatting

9 years agohppa: Update libm-test-ulps.
Carlos O'Donell [Tue, 10 Mar 2015 20:09:37 +0000 (16:09 -0400)]
hppa: Update libm-test-ulps.

9 years agoAdd test for bug 18104.
Joseph Myers [Tue, 10 Mar 2015 17:53:40 +0000 (17:53 +0000)]
Add test for bug 18104.

[BZ #18104]
* math/auto-libm-test-in: Add another test of pow.
* math/auto-libm-test-out: Regenerated.

9 years agopowerpc: Fix incorrect results for pow when using FMA
Adhemerval Zanella [Tue, 10 Mar 2015 13:38:54 +0000 (09:38 -0400)]
powerpc: Fix incorrect results for pow when using FMA

This patch adds no FMA generation for e_pow to avoid precision issues
for powerpc.  This fixes BZ#18104.

9 years agosoft-fp: Use multiple-include guards.
Joseph Myers [Tue, 10 Mar 2015 00:32:29 +0000 (00:32 +0000)]
soft-fp: Use multiple-include guards.

This patch makes soft-fp headers consistently use multiple-include
guards, something previously done mainly only in the Linux kernel
version.  The guard macros aren't the same as those used in the Linux
kernel, but there seems to be enough variation in such guards in Linux
kernel code that hopefully this version will be acceptable there.

Tested for powerpc-nofpu that installed stripped shared libraries are
unchanged by this patch.

* soft-fp/double.h [SOFT_FP_DOUBLE_H]: New multiple-include guard.
* soft-fp/extended.h [SOFT_FP_EXTENDED_H]: Likewise.
* soft-fp/op-1.h [SOFT_FP_OP_1_H]: Likewise.
* soft-fp/op-2.h [SOFT_FP_OP_2_H]: Likewise.
* soft-fp/op-4.h [SOFT_FP_OP_4_H]: Likewise.
* soft-fp/op-8.h [SOFT_FP_OP_8_H]: Likewise.
* soft-fp/op-common.h [SOFT_FP_OP_COMMON_H]: Likewise.
* soft-fp/quad.h [SOFT_FP_QUAD_H]: Likewise.
* soft-fp/single.h [SOFT_FP_SINGLE_H]: Likewise.
* soft-fp/soft-fp.h (SOFT_FP_H): Define to 1 rather than empty.
Add comment on closing #endif.

9 years agoMinor refactoring:
Paul Pluzhnikov [Mon, 9 Mar 2015 21:41:35 +0000 (14:41 -0700)]
Minor refactoring:

* posix/wordexp.c (CHAR_IN_SET): New macro.
(parse_param): Use it.

9 years agoUpdate powerpc-fpu ULPs.
Adhemerval Zanella [Mon, 9 Mar 2015 17:26:48 +0000 (13:26 -0400)]
Update powerpc-fpu ULPs.

9 years agoFix BZ #18043 (c4): buffer-overflow (read past the end) in wordexp/parse_dollars...
Paul Pluzhnikov [Mon, 9 Mar 2015 14:22:36 +0000 (07:22 -0700)]
Fix BZ #18043 (c4): buffer-overflow (read past the end) in wordexp/parse_dollars/parse_param

9 years agoMention BZ #18042 in NEWS.
Paul Pluzhnikov [Mon, 9 Mar 2015 04:58:26 +0000 (21:58 -0700)]
Mention BZ #18042 in NEWS.

9 years agoFix off-by-one which caused BZ #18042 and add a test for it.
Paul Pluzhnikov [Mon, 9 Mar 2015 04:55:13 +0000 (21:55 -0700)]
Fix off-by-one which caused BZ #18042 and add a test for it.

9 years agoRefactor wordexp-test.c such that words always ends at the edge of
Paul Pluzhnikov [Mon, 9 Mar 2015 04:37:31 +0000 (21:37 -0700)]
Refactor wordexp-test.c such that words always ends at the edge of
unreadable page.

This makes it easy to catch overflows, such as BZ #18043 (and BZ #18042).

9 years agoCleanup: in preparation for fixing BZ #16734, fix memory leaks exposed by
Paul Pluzhnikov [Sun, 8 Mar 2015 16:46:53 +0000 (09:46 -0700)]
Cleanup: in preparation for fixing BZ #16734, fix memory leaks exposed by
switching fopen()ed streams from mmap to malloc.

9 years agohurd: Make libc able to call pthread stubs
Samuel Thibault [Sun, 8 Mar 2015 10:26:57 +0000 (11:26 +0100)]
hurd: Make libc able to call pthread stubs

* sysdeps/mach/hurd/bits/libc-lock.h [_LIBC]: Include
<bits/libc-lockP.h>

9 years agosoft-fp: Support conditional zero-initialization in declarations.
Joseph Myers [Sat, 7 Mar 2015 01:39:42 +0000 (01:39 +0000)]
soft-fp: Support conditional zero-initialization in declarations.

In the Linux kernel, some architectures have a single function that
uses different kinds of unpacking and packing depending on the
instruction being emulated, meaning it is not readily visible to the
compiler that variables from _FP_DECL and _FP_FRAC_DECL_* macros are
only used in cases where they were initialized.  The existing copy of
soft-fp in the Linux kernel uses zero-initialization to avoid warnings
in this case, so while frowned upon as a warning suppression mechanism
in code built for glibc it seems appropriate to have such
zero-initialization conditional on __KERNEL__.  This patch duly adds
it, via a macro _FP_ZERO_INIT that expands to empty for non-kernel
compilations.

Tested for powerpc-nofpu that installed stripped shared libraries are
unchanged by this patch.

* soft-fp/soft-fp.h (_FP_ZERO_INIT): New macro.  Define depending
on [__KERNEL__].
* soft-fp/op-1.h (_FP_FRAC_DECL_1): Use _FP_ZERO_INIT.
* soft-fp/op-2.h (_FP_FRAC_DECL_2): Likewise.
* soft-fp/op-common.h (_FP_DECL): Likewise.

9 years agoReplace __attribute__((visibility("protected")))
H.J. Lu [Fri, 6 Mar 2015 12:55:56 +0000 (04:55 -0800)]
Replace __attribute__((visibility("protected")))

With copy relocation, address of protected data defined in the shared
library may be external.  Compiler shouldn't asssume protected data will
be local.  But due to

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65248

__attribute__((visibility("protected"))) doesn't work correctly, we need
to use asm (".protected xxx") instead.

* elf/ifuncdep2.c (global): Replace
__attribute__((visibility("protected"))) with
asm (".protected global").
* elf/ifuncmod1.c (global): Likewise.
* elf/ifuncmod5.c (global): Likewise.

9 years agoFix /* in comment in previous commit.
Joseph Myers [Sat, 7 Mar 2015 00:59:56 +0000 (00:59 +0000)]
Fix /* in comment in previous commit.

9 years agosoft-fp: Condition sfp-machine.h include path on __KERNEL__.
Joseph Myers [Sat, 7 Mar 2015 00:36:02 +0000 (00:36 +0000)]
soft-fp: Condition sfp-machine.h include path on __KERNEL__.

My Linux kernel patch to update the kernel to current glibc soft-fp
<https://sourceware.org/ml/libc-alpha/2015-02/msg00107.html> still
leaves a few small differences between the two copies of soft-fp.

I think it's desirable to avoid such differences completely if
possible by having one set of sources suitable for use in both places.
To that end, this patch introduces a conditional on __KERNEL__ for the
path by which sfp-machine.h is included.

Tested for powerpc-nofpu that installed stripped shared libraries are
unchanged by this patch.

* soft-fp/soft-fp.h [!_LIBC && __KERNEL__]: Include
<asm/sfp-machine.h> instead of <sfp-machine.h>.

9 years agoDocument test-wrapper-env-only in INSTALL.
Roland McGrath [Fri, 6 Mar 2015 18:59:15 +0000 (10:59 -0800)]
Document test-wrapper-env-only in INSTALL.

9 years agoChangeLog format
Roland McGrath [Fri, 6 Mar 2015 18:52:53 +0000 (10:52 -0800)]
ChangeLog format

9 years agoFix BZ #18043: buffer-overflow (read past the end) in wordexp/parse_dollars/parse_param
Paul Pluzhnikov [Fri, 6 Mar 2015 17:13:16 +0000 (09:13 -0800)]
Fix BZ #18043: buffer-overflow (read past the end) in wordexp/parse_dollars/parse_param

9 years agotime: ensure failing strptime() tests are reported correctly
Vincent Bernat [Fri, 6 Mar 2015 11:01:52 +0000 (12:01 +0100)]
time: ensure failing strptime() tests are reported correctly

9 years agoFix aio_error thread-safety.
Samuel Thibault [Fri, 6 Mar 2015 10:32:24 +0000 (11:32 +0100)]
Fix aio_error thread-safety.

* sysdeps/pthread/aio_error.c: New file
* sysdeps/pthread/aio_misc.c: Remove optimistic comment about
synchronization.

9 years agovfprintf: Define WORK_BUFFER_SIZE
Florian Weimer [Sun, 1 Mar 2015 20:52:15 +0000 (21:52 +0100)]
vfprintf: Define WORK_BUFFER_SIZE

This constant will allow us to refer to the number of elements in
work_buffer across a function call boundary.

9 years agovfprintf: Introduce JUMP_TABLE_BASE_LABEL
Florian Weimer [Sun, 1 Mar 2015 20:47:31 +0000 (21:47 +0100)]
vfprintf: Introduce JUMP_TABLE_BASE_LABEL

This makes the offset handling more explicit and avoids
cross-references between the jump tables.

9 years agovfprintf: Introduce THOUSANDS_SEP_T
Florian Weimer [Fri, 6 Mar 2015 09:26:58 +0000 (10:26 +0100)]
vfprintf: Introduce THOUSANDS_SEP_T

This avoids preprocessor conditionals in function declarations.

9 years agomanual: complete example in error message documentation
Rical Jasan [Fri, 6 Mar 2015 05:59:49 +0000 (00:59 -0500)]
manual: complete example in error message documentation

The manual gives "an example showing how to handle failure to open a
file correctly."  The example function, open_sesame, uses the
newly-introduced strerror function and errno and
program_invocation_short_name variables.  It fails to specify GNU
extensions, however, so attempts to use it in the following way:

    int main (void) {open_sesame ("badname");}

fail during compilation with "error: â€˜program_invocation_short_name’
undeclared", indicating the example is incomplete.  The presence of
"#include"s suggest everything neccesary for the function to work should
be present.  For completeness, the example is lacking the following line:

    #define _GNU_SOURCE

as the declarations of program_invocation_*name in errno.h are wrapped
in an "#ifdef __USE_GNU" conditional.

The documentation of the variables is also expanded, adding that their
definition lies in errno.h and noting specifically they are GNU
extensions.

9 years agomanual: drop strerror C89 compatibility note
Mike Frysinger [Thu, 5 Mar 2015 19:09:50 +0000 (14:09 -0500)]
manual: drop strerror C89 compatibility note

Mentioning systems that are old and don't support C89 is probably
a waste of time nowadays.  Drop the note.

9 years agoAvoid re-exec-self in bug-setlocale1.
Roland McGrath [Thu, 5 Mar 2015 20:58:49 +0000 (12:58 -0800)]
Avoid re-exec-self in bug-setlocale1.

9 years agoReplace ELF_RTYPE_CLASS_NOCOPY with ELF_RTYPE_CLASS_COPY
H.J. Lu [Thu, 5 Mar 2015 16:26:21 +0000 (08:26 -0800)]
Replace ELF_RTYPE_CLASS_NOCOPY with ELF_RTYPE_CLASS_COPY

ELF_RTYPE_CLASS_NOCOPY in comments is a typo.  It should be
ELF_RTYPE_CLASS_COPY.

[BZ #18082]
* sysdeps/alpha/dl-machine.h (elf_machine_type_class): Replace
ELF_RTYPE_CLASS_NOCOPY with ELF_RTYPE_CLASS_COPY in comments.
* sysdeps/arm/dl-machine.h (elf_machine_type_class): Likewise.
* sysdeps/hppa/dl-machine.h (elf_machine_type_class): Likewise.
* sysdeps/i386/dl-machine.h (elf_machine_type_class): Likewise.
* sysdeps/ia64/dl-machine.h (elf_machine_type_class): Likewise.
* sysdeps/m68k/dl-machine.h (elf_machine_type_class): Likewise.
* sysdeps/microblaze/dl-machine.h (elf_machine_type_class):
Likewise.
* sysdeps/nios2/dl-machine.h (elf_machine_type_class): Likewise.
* sysdeps/powerpc/powerpc32/dl-machine.h (elf_machine_type_class):
Likewise.
* sysdeps/powerpc/powerpc64/dl-machine.h (elf_machine_type_class):
Likewise.
* sysdeps/s390/s390-32/dl-machine.h (elf_machine_type_class):
Likewise.
* sysdeps/s390/s390-64/dl-machine.h (elf_machine_type_class):
Likewise.
* sysdeps/sh/dl-machine.h (elf_machine_type_class): Likewise.
* sysdeps/sparc/sparc32/dl-machine.h (elf_machine_type_class):
Likewise.
* sysdeps/sparc/sparc64/dl-machine.h (elf_machine_type_class):
Likewise.
* sysdeps/tile/dl-machine.h (elf_machine_type_class): Likewise.
* sysdeps/x86_64/dl-machine.h (elf_machine_type_class): Likewise.

9 years agoDefine ETH_ALEN in generic <netinet/if_ether.h>.
Roland McGrath [Thu, 5 Mar 2015 00:11:31 +0000 (16:11 -0800)]
Define ETH_ALEN in generic <netinet/if_ether.h>.

9 years agoSplit rpcent tests out of tst-netdb.
Roland McGrath [Wed, 4 Mar 2015 23:55:38 +0000 (15:55 -0800)]
Split rpcent tests out of tst-netdb.

9 years agoConditionalize some test code for SIGRTMIN, SA_SIGINFO.
Roland McGrath [Wed, 4 Mar 2015 23:14:56 +0000 (15:14 -0800)]
Conditionalize some test code for SIGRTMIN, SA_SIGINFO.

9 years agoAvoid more C++ tests.
Roland McGrath [Wed, 4 Mar 2015 22:11:39 +0000 (14:11 -0800)]
Avoid more C++ tests.

9 years agoAvoid C++ tests when the C++ cannot be linked.
Roland McGrath [Wed, 4 Mar 2015 21:52:45 +0000 (13:52 -0800)]
Avoid C++ tests when the C++ cannot be linked.

9 years agoDon't define __CORRECT_ISO_CPP_STRING_H_PROTO for non-GCC compilers (bug 17631)
Andreas Schwab [Wed, 10 Dec 2014 10:28:51 +0000 (11:28 +0100)]
Don't define __CORRECT_ISO_CPP_STRING_H_PROTO for non-GCC compilers (bug 17631)

The implementation of __CORRECT_ISO_CPP_STRING_H_PROTO requires
support for asm aliases.

9 years agopowerpc: Fix inline feraiseexcept, feclearexcept macros
Adhemerval Zanella [Wed, 28 Jan 2015 11:10:41 +0000 (06:10 -0500)]
powerpc: Fix inline feraiseexcept, feclearexcept macros

This patch fixes the inline feraiseexcept and feclearexcept macros for
powerpc by casting the input argument to integer before operation on it.

It fixes BZ#17776.

9 years agoFix localplt test breakage with new readelf
Alan Modra [Fri, 20 Feb 2015 04:53:28 +0000 (15:23 +1030)]
Fix localplt test breakage with new readelf

Since 2014-11-24 binutils git commit bb4d2ac2, readelf has appended
the symbol version to symbols shown in reloc dumps.

[BZ #16512]
* scripts/localplt.awk: Strip off symbol version.
* NEWS: Mention bug fix.

9 years agoDeglobalize internal variables in timer_routines.c.
Roland McGrath [Mon, 2 Mar 2015 23:44:27 +0000 (15:44 -0800)]
Deglobalize internal variables in timer_routines.c.

9 years agoCorrect __ASSUME_PRLIMIT64 for hppa/microblaze/sh (bug 17779).
Joseph Myers [Mon, 2 Mar 2015 23:05:55 +0000 (23:05 +0000)]
Correct __ASSUME_PRLIMIT64 for hppa/microblaze/sh (bug 17779).

__ASSUME_PRLIMIT64 is defined in kernel-features.h for kernels 2.6.36
and later, but hppa, microblaze and sh did not add the prlimit64
syscall until 2.6.37.  This patch adds corresponding undefines of
__ASSUME_PRLIMIT64 to those architectures' kernel-features.h files.

(This concludes the kernel-features.h fixes arising out of the review
- limited to macros defined in the architecture-independent
kernel-features.h file - I did in connection with the move to 2.6.32
minimum kernel version.  For that subset of macros - I didn't check
any purely architecture-specific macros - I think they are now defined
for the correct kernel versions on each architecture after this
patch.)

[BZ #17779]
* sysdeps/unix/sysv/linux/hppa/kernel-features.h
[__LINUX_KERNEL_VERSION < 0x020625] (__ASSUME_PRLIMIT64):
Undefine.
* sysdeps/unix/sysv/linux/microblaze/kernel-features.h
[__LINUX_KERNEL_VERSION < 0x020625] (__ASSUME_PRLIMIT64):
Likewise.
* sysdeps/unix/sysv/linux/sh/kernel-features.h
[__LINUX_KERNEL_VERSION < 0x020625] (__ASSUME_PRLIMIT64):
Likewise.

9 years agoFix BZ 18036 buffer overflow (read past end of buffer) in internal_fnmatch
Paul Pluzhnikov [Mon, 2 Mar 2015 21:34:22 +0000 (13:34 -0800)]
Fix BZ 18036 buffer overflow (read past end of buffer) in internal_fnmatch

9 years agoFix parallel build error
Andreas Schwab [Mon, 2 Mar 2015 14:47:56 +0000 (15:47 +0100)]
Fix parallel build error

9 years ago_nss_nis_initgroups_dyn: Return status instead of NSS_STATUS_SUCCESS
Florian Weimer [Mon, 2 Mar 2015 09:07:12 +0000 (10:07 +0100)]
_nss_nis_initgroups_dyn: Return status instead of NSS_STATUS_SUCCESS

9 years agoAvoid unsafe loc_name type casts with additional variable
Alexandre Oliva [Sat, 28 Feb 2015 01:18:56 +0000 (22:18 -0300)]
Avoid unsafe loc_name type casts with additional variable

for  ChangeLog

[BZ #15969]
* locale/findlocale.c (_nl_find_locale): Introduce const
version of loc_name and drop unsafe type casts.

9 years agoConvert dlfcn/tststatic2 to use test-skeleton.
Roland McGrath [Fri, 27 Feb 2015 23:21:03 +0000 (15:21 -0800)]
Convert dlfcn/tststatic2 to use test-skeleton.

9 years agoCompile vismain with -fPIE and link with -pie
H.J. Lu [Fri, 27 Feb 2015 21:56:44 +0000 (13:56 -0800)]
Compile vismain with -fPIE and link with -pie

Protocted symbol in shared library can only be accessed from PIE
or shared library.  Linker in binutils 2.26 enforces it.  We must
compile vismain with -fPIE and link it with -pie.

[BZ #17711]
* elf/Makefile (tests): Add vismain only if PIE is enabled.
(tests-pie): Add vismain.
(CFLAGS-vismain.c): New.
* elf/vismain.c: Add comments for PIE requirement.

9 years agoFix ldbl-96, ldbl-128ibm atanhl inaccuracy (bug 18046, bug 18047).
Joseph Myers [Fri, 27 Feb 2015 17:48:37 +0000 (17:48 +0000)]
Fix ldbl-96, ldbl-128ibm atanhl inaccuracy (bug 18046, bug 18047).

The threshold in ldbl-96 atanhl for when to return the argument,
0x1p-28, is a bit too big, and that in ldbl-128ibm atanhl is much too
big (the relevant condition being x^3/3 being < 0.5ulp of x),
resulting in errors a bit above the limits of those considered
acceptable in glibc in the ldbl-96 case, and in large errors in the
ldbl-128ibm case.  This patch changes those implementations to use
more appropriate thresholds and adds tests around the thresholds for
various formats.

Tested for x86_64, x86 and powerpc.  x86_64 and x86 ulps updated
accordingly.

[BZ #18046]
[BZ #18047]
* sysdeps/ieee754/ldbl-128ibm/e_atanhl.c (__ieee754_atanhl): Use
0x1p-56L as threshold for just returning the argument.
* sysdeps/ieee754/ldbl-96/e_atanhl.c (__ieee754_atanhl): Use
0x1p-32L as threshold for just returning the argument.
* math/auto-libm-test-in: Add more tests of atanh.
* math/auto-libm-test-out: Regenerated.
* sysdeps/i386/fpu/libm-test-ulps: Update.
* sysdeps/x86_64/fpu/libm-test-ulp: Likewise.

9 years agoRather than using a C implementation of memmove, directly call memmove, which
Wilco Dijkstra [Fri, 27 Feb 2015 14:44:41 +0000 (14:44 +0000)]
Rather than using a C implementation of memmove, directly call memmove, which
typically has a much faster optimized implementation.

9 years agoRather than using a C implementation of memset, directly call memset, which
Wilco Dijkstra [Fri, 27 Feb 2015 14:41:46 +0000 (14:41 +0000)]
Rather than using a C implementation of memset, directly call memset, which
typically has a much faster optimized implementation.

9 years agohppa: fix __O_SYNC to match the kernel
John David Anglin [Sun, 10 Aug 2014 14:00:23 +0000 (10:00 -0400)]
hppa: fix __O_SYNC to match the kernel

9 years agoAdd comment to CSTR macro in k_standard.c.
Joseph Myers [Fri, 27 Feb 2015 01:12:19 +0000 (01:12 +0000)]
Add comment to CSTR macro in k_standard.c.

* sysdeps/ieee754/k_standard.c (CSTR): Add comment.

9 years agoAvoid -Wno-write-strings for k_standard.c.
Joseph Myers [Thu, 26 Feb 2015 22:50:54 +0000 (22:50 +0000)]
Avoid -Wno-write-strings for k_standard.c.

We want to avoid -Wno- options in makefiles as far as possible, by
cleaning up the underlying issues if possible or failing that by using
diagnostic pragmas.  This patch eliminates the use of
-Wno-write-strings for sysdeps/ieee754/k_standard.c by using casts in
the source file to cast away const; those casts are encapsulated in a
macro that also deals with the choice of strings for float / double /
long double functions (for which the logic was previously replicated
many times).

Tested for x86_64; the only change to disassembly of installed
stripped shared libraries was a line number in an assertion.

* sysdeps/ieee754/k_standard.c (CSTR): New macro.
(__kernel_standard): Use CSTR macro when setting exc.name.
* sysdeps/ieee754/Makefile [$(subdir) = math]
(CFLAGS-k_standard.c): Remove variable.

9 years agoAvoid uninitialized warnings in Bessel functions.
Joseph Myers [Thu, 26 Feb 2015 21:49:19 +0000 (21:49 +0000)]
Avoid uninitialized warnings in Bessel functions.

math/Makefile currently has:

  # The fdlibm code generates a lot of these warnings but is otherwise clean.
  override CFLAGS += -Wno-uninitialized

This is of course undesirable; warnings should be disabled as narrowly
as possible.  To remove this override, we need to fix files that
generate such warnings, or put warning-disabling pragmas in them.
This patch does so for Bessel function implementations, one of the
cases that have the warnings if the override is removed.  The warnings
arise because functions set pointer variables p and q only for certain
values of the function argument, then use them unconditionally.  As
the static functions in question only get called for arguments that
satisfy the last condition in the if/else chain, the natural fix is to
change the last "else if" to just "else", which this patch does.  (The
ldbl-128 / ldbl-128ibm implementation of these functions is
substantially different and looks like it already does use "else" in
the last case in the nearest corresponding code.)

Tested for x86_64 and x86.

* sysdeps/ieee754/dbl-64/e_j0.c (pzero): Change last case for
setting p and q from "else if" to "else".
(qzero): Likewise.
* sysdeps/ieee754/dbl-64/e_j1.c (pone): Likewise.
(qone): Likewise.
* sysdeps/ieee754/flt-32/e_j0f.c (pzerof): Likewise.
(qzerof): Likewise.
* sysdeps/ieee754/flt-32/e_j1f.c (ponef): Likewise.
(qonef): Likewise.
* sysdeps/ieee754/ldbl-96/e_j0l.c (pzero): Likewise.
(qzero): Likewise.
* sysdeps/ieee754/ldbl-96/e_j1l.c (pone): Likewise.
(qone): Likewise.

9 years agoFix ldbl-128/ldbl-128ibm acosl inaccuracy (bug 18038, bug 18039).
Joseph Myers [Thu, 26 Feb 2015 21:06:34 +0000 (21:06 +0000)]
Fix ldbl-128/ldbl-128ibm acosl inaccuracy (bug 18038, bug 18039).

The ldbl-128 and ldbl-128ibm implementations of acosl have similar
bugs, using a threshold of 0x1p-57L to determine when they just return
pi/2.  Since the result pi/2 - asinl (x) is roughly pi/2 - x for small
x, the relevant cut-off is actually x being < 0.5ulp of 1.  This patch
fixes the implementations to use that cut-off and adds tests of small
acos arguments.

Tested for powerpc and mips64.  Also tested for x86_64 and x86; no
ulps updates needed.

[BZ #18038]
[BZ #18039]
* sysdeps/ieee754/ldbl-128/e_acosl.c (__ieee754_acosl): Only
return pi/2 for arguments below 0x1p-113L.
* sysdeps/ieee754/ldbl-128ibm/e_acosl.c (__ieee754_acosl): Only
return pi/2 for arguments below 0x1p-106L.
* math/auto-libm-test-in: Add more tests of acos.
* math/auto-libm-test-out: Regenerated.

9 years agoFix asin missing underflows (bug 16351).
Joseph Myers [Thu, 26 Feb 2015 17:18:54 +0000 (17:18 +0000)]
Fix asin missing underflows (bug 16351).

Similar to various other bugs in this area, some asin implementations
do not raise the underflow exception for subnormal arguments, when the
result is tiny and inexact.  This patch forces the exception in a
similar way to previous fixes.

Tested for x86_64, x86, powerpc and mips64.

[BZ #16351]
* sysdeps/i386/fpu/e_asin.S (dbl_min): New object.
(MO): New macro.
(__ieee754_asin): Force underflow exception for results with small
absolute value.
* sysdeps/i386/fpu/e_asinf.S (flt_min): New object.
(MO): New macro.
(__ieee754_asinf): Force underflow exception for results with
small absolute value.
* sysdeps/ieee754/dbl-64/e_asin.c: Include <float.h> and <math.h>.
(__ieee754_asin): Force underflow exception for results with small
absolute value.
* sysdeps/ieee754/flt-32/e_asinf.c: Include <float.h>.
(__ieee754_asinf): Force underflow exception for results with
small absolute value.
* sysdeps/ieee754/ldbl-128/e_asinl.c: Include <float.h>.
(__ieee754_asinl): Force underflow exception for results with
small absolute value.
* sysdeps/ieee754/ldbl-128ibm/e_asinl.c: Include <float.h>.
(__ieee754_asinl): Force underflow exception for results with
small absolute value.
* sysdeps/ieee754/ldbl-96/e_asinl.c: Include <float.h>.
(__ieee754_asinl): Force underflow exception for results with
small absolute value.
* sysdeps/x86_64/fpu/multiarch/e_asin.c [HAVE_FMA4_SUPPORT]:
Include <math.h>.
* math/auto-libm-test-in: Do not mark underflow exceptions as
possibly missing for bug 16351.
* math/auto-libm-test-out: Regenerated.

9 years agoFix ldbl-128ibm logbl near powers of 2 (bug 18030).
Joseph Myers [Thu, 26 Feb 2015 15:13:22 +0000 (15:13 +0000)]
Fix ldbl-128ibm logbl near powers of 2 (bug 18030).

The ldbl-128ibm implementation of logbl produces incorrect results
when the high part of the argument is a power of 2 and the low part a
nonzero number with the opposite sign (and so the returned exponent
should be 1 less than that of the high part).  For example, logbl
(0x1.ffffffffffffffp1L) returns 2 but should return 1.  (This is
similar to (fixed) bug 16740 for frexpl, and (fixed) bug 18029 for
ilogbl.)  This patch adds checks for that case.

Tested for powerpc.

[BZ #18030]
* sysdeps/ieee754/ldbl-128ibm/s_logbl.c (__logbl): Adjust exponent
of power of 2 down when low part has opposite sign.
* math/libm-test.inc (logb_test_data): Add more tests.

9 years agoFix read past end of pattern in fnmatch (bug 18032)
Andreas Schwab [Thu, 26 Feb 2015 13:55:24 +0000 (14:55 +0100)]
Fix read past end of pattern in fnmatch (bug 18032)

9 years agoFix ldbl-128ibm ilogbl near powers of 2 (bug 18029).
Joseph Myers [Thu, 26 Feb 2015 12:57:21 +0000 (12:57 +0000)]
Fix ldbl-128ibm ilogbl near powers of 2 (bug 18029).

The ldbl-128ibm implementation of ilogbl produces incorrect results
when the high part of the argument is a power of 2 and the low part a
nonzero number with the opposite sign (and so the returned exponent
should be 1 less than that of the high part).  For example, ilogbl
(0x1.ffffffffffffffp1L) returns 2 but should return 1.  (This is
similar to (fixed) bug 16740 for frexpl, and bug 18030 for logbl.)
This patch adds checks for that case.

Tested for powerpc.

[BZ #18029]
* sysdeps/ieee754/ldbl-128ibm/e_ilogbl.c (__ieee754_ilogbl):
Adjust exponent of power of 2 down when low part has opposite
sign.
* math/libm-test.inc (ilogb_test_data): Add more tests.

9 years agoFix constness error just introduced in findlocale.
Alexandre Oliva [Thu, 26 Feb 2015 05:46:02 +0000 (02:46 -0300)]
Fix constness error just introduced in findlocale.

for  ChangeLog

[BZ #15969]
* locale/findlocale.c (_nl_find_locale): Fix constness error in
the previous change.

9 years agoBZ #15969: search locale archive again after alias expansion
Alexandre Oliva [Tue, 18 Nov 2014 00:00:58 +0000 (22:00 -0200)]
BZ #15969: search locale archive again after alias expansion

If a locale alias is defined in locale.alias but not in an archive,
and the referenced locale is only present in the archive, setlocale
will fail if given the alias name.  This is unintuitive.  This patch
fixes it, arranging for the locale archive to be searched again after
alias expansion.

for  ChangeLog

[BZ #15969]
* locale/findlocale.c (_nl_find_locale): Retry archive search
after alias expansion.

9 years agoConvert tst-iconv3 to use test-skeleton.
Roland McGrath [Thu, 26 Feb 2015 00:01:13 +0000 (16:01 -0800)]
Convert tst-iconv3 to use test-skeleton.

9 years agoConvert tst-iconv5 to use test-skeleton.
Roland McGrath [Wed, 25 Feb 2015 23:55:08 +0000 (15:55 -0800)]
Convert tst-iconv5 to use test-skeleton.

9 years agoDon't crash in iconv setup when getcwd fails.
Roland McGrath [Wed, 25 Feb 2015 23:41:31 +0000 (15:41 -0800)]
Don't crash in iconv setup when getcwd fails.

9 years agoFix minor formatting violation.
Paul Pluzhnikov [Wed, 25 Feb 2015 21:11:26 +0000 (13:11 -0800)]
Fix minor formatting violation.

9 years agopowerpc: Fix memmove static build
Adhemerval Zanella [Wed, 25 Feb 2015 12:49:51 +0000 (07:49 -0500)]
powerpc: Fix memmove static build

This patch fixes the missing "__memcpy_ppc" symbol for memmove-ppc64
object in static builds.  Since memcpy ifunc is not enabled in static
mode, the specialized symbols are not provided.  The patch changed the
it to just "__memcpy" instead.

9 years agoFix ldbl-128ibm asinhl inaccuracy (bug 18020).
Joseph Myers [Wed, 25 Feb 2015 11:13:41 +0000 (11:13 +0000)]
Fix ldbl-128ibm asinhl inaccuracy (bug 18020).

The ldbl-128ibm implementation of asinhl uses cut-offs of 0x1p28 and
0x1p-29 to determine when to use simpler formulas that avoid possible
overflow / underflow.  Both those cut-offs are inappropriate for this
format, resulting in large errors.  This patch changes the code to use
more appropriate cut-offs of 0x1p56 and 0x1p-56, adding tests around
the cut-offs for various floating-point formats.

Tested for powerpc.  Also tested for x86_64 and x86 and updated ulps.

[BZ #18020]
* sysdeps/ieee754/ldbl-128ibm/s_asinhl.c (__asinhl): Use 2**56 and
2**-56 not 2**28 and 2**-29 as thresholds for simpler formulas.
* math/auto-libm-test-in: Add more tests of asinh.
* math/auto-libm-test-out: Regenerated.
* sysdeps/i386/fpu/libm-test-ulps: Update.
* sysdeps/x86_64/fpu/libm-test-ulps: Likewise.

9 years agoin.h: Coordinate in6_pktinfo and ip6_mtuinfo for kernel and glibc [BZ #15850]
Cong Wang [Wed, 7 Jan 2015 00:13:19 +0000 (16:13 -0800)]
in.h: Coordinate in6_pktinfo and ip6_mtuinfo for kernel and glibc [BZ #15850]

Similarly to what we did for in6_addr, we need a macro
to guard in6_pktinfo and ip6_mtuinfo too.

Cc: Carlos O'Donell <carlos@redhat.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
9 years agosprof: Make an error message identical to two others, and more accurate.
Benno Schulenberg [Sun, 25 Jan 2015 16:12:05 +0000 (17:12 +0100)]
sprof: Make an error message identical to two others, and more accurate.

9 years agoReduce lock contention in __tz_convert() [BZ #16145] (partial fix)
Kevin Easton [Wed, 25 Feb 2015 04:57:07 +0000 (23:57 -0500)]
Reduce lock contention in __tz_convert() [BZ #16145] (partial fix)

This patch is an "easy win" partial fix for BZ #16145, which notes
the heavy contention on tzset_lock when multiple threads are converting
times with localtime_r().

In __tz_convert(), the lock does not need to be held after
__tzfile_compute() / __tz_compute() have been called, so we can move the
unlock up.  At this point there is still significant work to be done in
__offtime(), so we see some improvement (in my testing with 8 cores
banging on localtime_r(), ~20% improvement in throughput).

9 years agoUpdate timex.h for ADJ_SETOFFSET.
Miroslav Lichvar [Tue, 16 Dec 2014 15:26:14 +0000 (16:26 +0100)]
Update timex.h for ADJ_SETOFFSET.

ADJ_SETOFFSET is a new adjtimex() mode that can be used to precisely
step the clock. It was introduced in kernel 2.6.39.

9 years agoFix ldbl-128ibm acoshl inaccuracy (bug 18019).
Joseph Myers [Wed, 25 Feb 2015 00:01:15 +0000 (00:01 +0000)]
Fix ldbl-128ibm acoshl inaccuracy (bug 18019).

The ldbl-128ibm implementation of acoshl uses a cut-off of 0x1p28 to
determine when to use log(x) + log(2) as a formula.  That cut-off is
too small for this format, resulting in large errors.  This patch
changes it to a more appropriate cut-off of 0x1p56, adding tests
around the cut-offs for various floating-point formats.

Tested for powerpc.  Also tested for x86_64 and x86 and updated ulps.

[BZ #18019]
* sysdeps/ieee754/ldbl-128ibm/e_acoshl.c (__ieee754_acoshl): Use
2**56 not 2**28 as threshold for log (2x) formula.
* math/auto-libm-test-in: Add more tests of acosh.
* math/auto-libm-test-out: Regenerated.
* sysdeps/i386/fpu/libm-test-ulps: Update.
* sysdeps/x86_64/fpu/libm-test-ulps: Likewise.

9 years agoalloca: fix buf interaction
Mike Frysinger [Tue, 24 Feb 2015 05:15:41 +0000 (00:15 -0500)]
alloca: fix buf interaction

The stack-grows-down case is missing paren around the buf cast.

The stack-grows-up case is missing a cast with the buf assignment.
This leads to build failures due to -Werror:
vfprintf.c: In function '_IO_vfprintf_internal':
vfprintf.c:1738:16: error: initialization from incompatible pointer type [-Werror]

9 years agoFix x86/x86_64 scalb (qNaN, -Inf) (bug 16783).
Joseph Myers [Tue, 24 Feb 2015 17:30:02 +0000 (17:30 +0000)]
Fix x86/x86_64 scalb (qNaN, -Inf) (bug 16783).

Various x86 / x86_64 versions of scalb / scalbf / scalbl produce
spurious "invalid" exceptions for (qNaN, -Inf) arguments, because this
is wrongly handled like (+/-Inf, -Inf) which *should* raise such an
exception.  (In fact the NaN case of the code determining whether to
quietly return a zero or a NaN for second argument -Inf was
accidentally dead since the code had been made to return a NaN with
exception.)  This patch fixes the code to do the proper test for an
infinity as distinct from a NaN.

(Since the existing code does nothing to distinguish qNaNs and sNaNs
here, this patch doesn't either.  If in future we systematically
implement proper sNaN semantics following TS 18661-1:2014, there will
be lots of bugs to address - Thomas found lots of issues with his
patch <https://sourceware.org/ml/libc-ports/2013-04/msg00008.html> to
add SNaN tests (which never went in and would now require significant
reworking).)

Tested for x86_64 and x86.  Committed.

[BZ #16783]
* sysdeps/i386/fpu/e_scalb.S (__ieee754_scalb): Do not handle
arguments (NaN, -Inf) the same as (+/-Inf, -Inf).
* sysdeps/i386/fpu/e_scalbf.S (__ieee754_scalbf): Likewise.
* sysdeps/i386/fpu/e_scalbl.S (__ieee754_scalbl): Likewise.
* sysdeps/x86_64/fpu/e_scalbl.S (__ieee754_scalbl): Likewise.
* math/libm-test.inc (scalb_test_data): Add more tests.

9 years agoFix BZ #17916 - fopen unbounded stack usage for ccs= modes
Paul Pluzhnikov [Tue, 24 Feb 2015 16:05:34 +0000 (08:05 -0800)]
Fix BZ #17916 - fopen unbounded stack usage for ccs= modes

9 years agolinux: open and openat ignore 'mode' with O_TMPFILE in flags
Eric Rannaud [Tue, 24 Feb 2015 07:42:26 +0000 (13:12 +0530)]
linux: open and openat ignore 'mode' with O_TMPFILE in flags

Both open and openat load their last argument 'mode' lazily, using
va_arg() only if O_CREAT is found in oflag. This is wrong, mode is also
necessary if O_TMPFILE is in oflag.

By chance on x86_64, the problem wasn't evident when using O_TMPFILE
with open, as the 3rd argument of open, even when not loaded with
va_arg, is left untouched in RDX, where the syscall expects it.

However, openat was not so lucky, and O_TMPFILE couldn't be used: mode
is the 4th argument, in RCX, but the syscall expects its 4th argument in
a different register than the glibc wrapper, in R10.

Introduce a macro __OPEN_NEEDS_MODE (oflag) to test if either O_CREAT or
O_TMPFILE is set in oflag.

Tested on Linux x86_64.

[BZ #17523]
* io/fcntl.h (__OPEN_NEEDS_MODE): New macro.
* io/bits/fcntl2.h (open): Use it.
(openat): Likewise.
* io/open.c (__libc_open): Likewise.
* io/open64.c (__libc_open64): Likewise.
* io/open64_2.c (__open64_2): Likewise.
* io/open_2.c (__open_2): Likewise.
* io/openat.c (__openat): Likewise.
* io/openat64.c (__openat64): Likewise.
* io/openat64_2.c (__openat64_2): Likewise.
* io/openat_2.c (__openat_2): Likewise.
* sysdeps/mach/hurd/open.c (__libc_open): Likewise.
* sysdeps/mach/hurd/openat.c (__openat): Likewise.
* sysdeps/posix/open64.c (__libc_open64): Likewise.
* sysdeps/unix/sysv/linux/dl-openat64.c (openat64): Likewise.
* sysdeps/unix/sysv/linux/generic/open.c (__libc_open): Likewise.
(__open_nocancel): Likewise.
* sysdeps/unix/sysv/linux/generic/open64.c (__libc_open64): Likewise.
* sysdeps/unix/sysv/linux/open64.c (__libc_open64): Likewise.
* sysdeps/unix/sysv/linux/openat.c (__OPENAT): Likewise.

9 years agoSkip logging for DNSSEC responses [BZ 14841]
Siddhesh Poyarekar [Tue, 24 Feb 2015 07:27:26 +0000 (12:57 +0530)]
Skip logging for DNSSEC responses [BZ 14841]

DNSSEC defines a number of response types that one me expect when the
DO bit is set.  We don't process any of them, but since we do allow
setting the DO bit, skip them without logging an error since it is
only a nuisance.

Tested on x86_64.

[BZ #14841]
* resolv/gethnamaddr.c (getanswer): Skip logging if
RES_USE_DNSSEC is set.
* resolv/nss_dns/dns-host.c (getanswer_r): Likewise.

9 years agoadd changelog for previous commit
Mike Frysinger [Tue, 24 Feb 2015 05:15:23 +0000 (00:15 -0500)]
add changelog for previous commit

9 years agohppa: fix build failure with RTLD_PRIVATE_ERRNO
Mike Frysinger [Tue, 24 Feb 2015 05:10:42 +0000 (00:10 -0500)]
hppa: fix build failure with RTLD_PRIVATE_ERRNO

Pull in dl-sysdep.h like every other linux sysdep.h header does when it
wants to use RTLD_PRIVATE_ERRNO.

9 years agoAmendments to Unicode 7 update.
Alexandre Oliva [Mon, 23 Feb 2015 14:22:37 +0000 (11:22 -0300)]
Amendments to Unicode 7 update.

for  ChangeLog

* include/stdc-predef.h (__STDC_ISO_10646__): Update to
201304L, for Unicode 7.

for  localedata/ChangeLog

* unicode-gen/ctype_compatibility.py: Use date ranges in
copyright notice.
* unicode-gen/ctype_compatibility_test_cases.py: Likewise.
* unicode-gen/gen_unicode_ctype.py: Likewise.
* unicode-gen/utf8_compatibility.py: Likewise.
* unicode-gen/utf8_gen.py: Likewise.  Use upper case for
global variables, use tuples for global constant arrays.  From
Mike FABIAN.  Suggested by Mike Frysinger <vapier@gentoo.org>.

9 years agoCompile gcrt1.o with -fPIC
H.J. Lu [Mon, 23 Feb 2015 14:28:18 +0000 (06:28 -0800)]
Compile gcrt1.o with -fPIC

We compile gcrt1.o with -fPIC to support both "gcc -pg" and "gcc -pie -pg".

[BZ #17836]
* csu/Makefile (extra-objs): Add gmon-start.o if not builing
shared library.  Add gmon-start.os otherwise.
($(objpfx)g$(start-installed-name)): Use $(objpfx)S%
$(objpfx)gmon-start.os if builing shared library.
($(objpfx)g$(static-start-installed-name)): Likewise.

9 years agoFix failure of elf/tst-audit2 when compiled with GCC-5
Andreas Schwab [Thu, 22 Jan 2015 16:54:21 +0000 (17:54 +0100)]
Fix failure of elf/tst-audit2 when compiled with GCC-5

9 years agoFix BZ #17269 -- _IO_wstr_overflow integer overflow
Paul Pluzhnikov [Sun, 22 Feb 2015 20:01:47 +0000 (12:01 -0800)]
Fix BZ #17269 -- _IO_wstr_overflow integer overflow

9 years agoAdjust timeouts for some tests, to accommodate slow processors,
Chung-Lin Tang [Sun, 22 Feb 2015 09:05:02 +0000 (01:05 -0800)]
Adjust timeouts for some tests, to accommodate slow processors,
often without FPUs.