]> git.ipfire.org Git - thirdparty/glibc.git/log
thirdparty/glibc.git
9 years agoUpdate Ukrainian translation
Allan McRae [Tue, 26 Aug 2014 12:43:31 +0000 (22:43 +1000)] 
Update Ukrainian translation

9 years agoUpdate French translation
Allan McRae [Tue, 26 Aug 2014 12:42:36 +0000 (22:42 +1000)] 
Update French translation

9 years agoUpdate Russian translation
Allan McRae [Tue, 26 Aug 2014 12:41:48 +0000 (22:41 +1000)] 
Update Russian translation

9 years agoUpdate Polish translation
Allan McRae [Tue, 26 Aug 2014 12:41:00 +0000 (22:41 +1000)] 
Update Polish translation

9 years agoUpdate Czech translation
Allan McRae [Tue, 26 Aug 2014 12:39:33 +0000 (22:39 +1000)] 
Update Czech translation

9 years agoUpdate German translation
Allan McRae [Tue, 26 Aug 2014 12:38:47 +0000 (22:38 +1000)] 
Update German translation

9 years agoUpdate Bulgarian translation
Allan McRae [Tue, 26 Aug 2014 12:36:52 +0000 (22:36 +1000)] 
Update Bulgarian translation

9 years agoUpdate Sweedish translation
Allan McRae [Tue, 26 Aug 2014 12:33:50 +0000 (22:33 +1000)] 
Update Sweedish translation

9 years agoUpdate Dutch translation
Allan McRae [Tue, 26 Aug 2014 12:32:32 +0000 (22:32 +1000)] 
Update Dutch translation

9 years agoUpdate Spanish translation
Allan McRae [Tue, 26 Aug 2014 12:31:31 +0000 (22:31 +1000)] 
Update Spanish translation

9 years agoRemove NOT_IN_libc definition for pthread_atfork
Siddhesh Poyarekar [Thu, 21 Aug 2014 05:00:55 +0000 (10:30 +0530)] 
Remove NOT_IN_libc definition for pthread_atfork

pthread_atfork is already built in an extra-libs context, which gives
it NOT_IN_libc in its CPPFLAGS.  Adding the same definition to CFLAGS
is pointless.

Verified that the code is unchanged on x86_64.

9 years agoRemove redundant CPPFLAGS for some programs
Siddhesh Poyarekar [Thu, 21 Aug 2014 04:57:13 +0000 (10:27 +0530)] 
Remove redundant CPPFLAGS for some programs

These programs get the NOT_IN_libc twice, once through the 'other'
target and another explicitly.  Remove the explicitly added CPFLAG.

* catgets/Makefile (CPPFLAGS-gencat): Remove.
* iconv/Makefile (CPPFLAGS-iconv_prog): Likewise.
(CPPFLAGS-iconvconfig): Likewise.
* timezone/Makefile (CPPFLAGS-zic): Likewise.

9 years agoRemove unnecessary uses of NOT_IN_libc
Siddhesh Poyarekar [Thu, 21 Aug 2014 04:56:46 +0000 (10:26 +0530)] 
Remove unnecessary uses of NOT_IN_libc

If a IS_IN_* macro is defined, then NOT_IN_libc is always defined,
except obviously for IS_IN_libc.  There's no need to check for both.
Verified on x86_64 and i686 that the source is unchanged.

       * include/libc-symbols.h: Remove unnecessary check for
       NOT_IN_libc.
       * nptl/pthreadP.h: Likewise.
       * sysdeps/aarch64/setjmp.S: Likewise.
       * sysdeps/alpha/setjmp.S: Likewise.
       * sysdeps/arm/sysdep.h: Likewise.
       * sysdeps/i386/setjmp.S: Likewise.
       * sysdeps/m68k/setjmp.c: Likewise.
       * sysdeps/posix/getcwd.c: Likewise.
       * sysdeps/powerpc/powerpc32/setjmp-common.S: Likewise.
       * sysdeps/powerpc/powerpc64/setjmp-common.S: Likewise.
       * sysdeps/s390/s390-32/setjmp.S: Likewise.
       * sysdeps/s390/s390-64/setjmp.S: Likewise.
       * sysdeps/sh/sh3/setjmp.S: Likewise.
       * sysdeps/sh/sh4/setjmp.S: Likewise.
       * sysdeps/unix/alpha/sysdep.h: Likewise.
       * sysdeps/unix/sysv/linux/aarch64/sysdep.h: Likewise.
       * sysdeps/unix/sysv/linux/i386/sysdep.h: Likewise.
       * sysdeps/unix/sysv/linux/ia64/setjmp.S: Likewise.
       * sysdeps/unix/sysv/linux/ia64/sysdep.h: Likewise.
       * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h: Likewise.
       * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h: Likewise.
       * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h: Likewise.
       * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h: Likewise.
       * sysdeps/unix/sysv/linux/sh/sysdep.h: Likewise.
       * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h: Likewise.
       * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h: Likewise.
       * sysdeps/unix/sysv/linux/tile/sysdep.h: Likewise.
       * sysdeps/unix/sysv/linux/x86_64/sysdep.h: Likewise.
       * sysdeps/x86_64/setjmp.S: Likewise.

9 years agoMention fixes for BZs 16194 and 16275 in NEWS
H.J. Lu [Wed, 13 Aug 2014 15:04:54 +0000 (08:04 -0700)] 
Mention fixes for BZs 16194 and 16275 in NEWS

9 years agoFix powerpc32 __get_clockfreq for non-power4 (bug 17263).
Joseph Myers [Wed, 13 Aug 2014 16:06:18 +0000 (16:06 +0000)] 
Fix powerpc32 __get_clockfreq for non-power4 (bug 17263).

In my powerpc32 testing I've observed misc/test-gettimebasefreq
failing.

This is a glibc build (soft-float, though that's not relevant here)
without any --with-cpu and without any special configuration of the
default CPU for GCC either.  In particular, it's one not using
sysdeps/powerpc/powerpc32/power4/hp-timing.h (although in fact the
processor I'm using for testing is POWER4-based), so hp_timing_t is
32-bit not 64-bit.  But the VDSO call being used by
INTERNAL_VSYSCALL_NO_SYSCALL_FALLBACK is generating a 64-bit result
(high part in r3, low part in r4).  The code extracting that result,
however, expects a result of the type hp_timing_t as passed to
INTERNAL_VSYSCALL_NO_SYSCALL_FALLBACK, meaning that only r3 (= 0) is
used and the value in r4 is ignored.  This patch fixes this by always
using uint64_t as the type in INTERNAL_VSYSCALL_NO_SYSCALL_FALLBACK -
reflecting the actual ABI (unconditional in the kernel) of that VDSO
call.  This is the minimal change for this issue - no check for
overflow, no change of the type of the timebase_freq variable or the
return type of __get_clockfreq to something other than hp_timing_t
(such a change would simply move the implicit conversions to the over
callers of that function), no change to hp_timing_t itself.

Tested for powerpc32 soft float.

[BZ #17263]
* sysdeps/unix/sysv/linux/powerpc/get_clockfreq.c: Include
<stdint.h>.
(__get_clockfreq): Use uint64_t instead of hp_timing_t in
INTERNAL_VSYSCALL_NO_SYSCALL_FALLBACK call.

9 years agoFix comment error that Jakub pointed out but I forgot to fix
Siddhesh Poyarekar [Wed, 13 Aug 2014 13:16:41 +0000 (18:46 +0530)] 
Fix comment error that Jakub pointed out but I forgot to fix

9 years agoDisable x87 inline functions for x86_64 and SSE [BZ #17262]
Siddhesh Poyarekar [Wed, 13 Aug 2014 08:35:15 +0000 (14:05 +0530)] 
Disable x87 inline functions for x86_64 and SSE [BZ #17262]

Since:

commit 409e00bd69b8d8dd74d7327085351d26769ea6fc
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Wed Jan 29 07:51:41 2014 -0800

    Disable x87 inline functions for SSE2 math

    When i386 and x86-64 mathinline.h was merged into a single mathinline.h,
    "gcc -m32" enables x87 inline functions on x86-64 even when -mfpmath=sse
    and SSE2 is enabled.  It is a regression on x86-64.  We should check
    __SSE2_MATH__ instead of __x86_64__ when disabling x87 inline functions.

gcc-3.2 is unable to correctly compile x86_64 routines for llrint
since it gets redefined.  This is because gcc 3.2 does not set
__SSE2_MATH__ for x86_64, thus exposing the duplicate definition.

The correct fix ought to be to check for both __SSE2_MATH__ and
__x86_64__ and enable those bits only when neither are defined.

Tested fix with the reproducer for
409e00bd69b8d8dd74d7327085351d26769ea6fc as well as with gcc-3.2.

9 years agoReplace cpuid asm statement with __cpuid_count
H.J. Lu [Wed, 13 Aug 2014 00:02:51 +0000 (17:02 -0700)] 
Replace cpuid asm statement with __cpuid_count

The compiler doesn't know that the cpuid asm statement in intel_check_word
will trash RBX.  We are lucky that it doesn't cause any problems since
RBX is also used by compiler for other purposes so that RBX is saved and
restored.  This patch replaces it with __cpuid_count.

[BZ #17259]
* sysdeps/x86_64/cacheinfo.c (intel_check_word): Replace cpuid
asm statement with __cpuid_count.

9 years agodetect broken linker handling of __ehdr_start
Mike Frysinger [Thu, 7 Aug 2014 03:44:29 +0000 (23:44 -0400)] 
detect broken linker handling of __ehdr_start

Older versions of ld on ia64 support __ehdr_start, but generate relocs
when they shouldn't.  This causes the ld.so to not run because it tries
to resolve the __ehdr_start symbol (but it's not exported).

9 years agoFix powerpc-nofpu __fe_enabled_env and __fe_nonieee_env (bug 17261).
Joseph Myers [Tue, 12 Aug 2014 20:31:54 +0000 (20:31 +0000)] 
Fix powerpc-nofpu __fe_enabled_env and __fe_nonieee_env (bug 17261).

On powerpc, floating-point environment macros are defined as pointers
to constants in the library that contain the bit-patterns of the
desired environment, instead of being magic constants cast to pointer
type.

For soft-float, the bit-patterns used for fenv_t are not laid out the
same as for hard-float.  (e500 has a third layout used; that's not an
ABI issue because these values are only meaningful within a single
process, all of whose glibc libraries must come from the same build of
glibc.)  While the __fe_dfl_env value for soft-float was appropriate
for the soft-float fenv_t representation, the other two constants had
the same bit-patterns as for hard-float.  Those bit patterns had the
effect of having exceptions already raised, causing
math/test-fenv-return to fail; this patch fixes the patterns used.
(__fe_nonieee_env also had exceptions unmasked, though they should be
masked to match hard-float semantics.  Since there is no separate
non-IEEE mode for soft-float, it's most appropriate for
__fe_nonieee_env to be the same as __fe_dfl_env; this patch makes it
an alias.)

Tested for powerpc-nofpu.

[BZ #17261]
* sysdeps/powerpc/nofpu/fenv_const.c (__fe_enabled_env): Change
value to 0.
(__fe_nonieee_env): Define as an alias for __fe_dfl_env.

9 years agoNEWS: Mention x86-64 ld.so use of Intel MPX instructions.
Roland McGrath [Tue, 12 Aug 2014 16:49:58 +0000 (09:49 -0700)] 
NEWS: Mention x86-64 ld.so use of Intel MPX instructions.

9 years agoAdd BZ #16892 to NEWS
Will Newton [Tue, 12 Aug 2014 12:01:13 +0000 (13:01 +0100)] 
Add BZ #16892 to NEWS

9 years agoCheck value of futex before updating in __lll_timedlock
Bernard Ogden [Mon, 11 Aug 2014 14:26:48 +0000 (15:26 +0100)] 
Check value of futex before updating in __lll_timedlock

2014-08-12  Bernard Ogden  <bernie.ogden@linaro.org>

[BZ #16892]
* sysdeps/nptl/lowlevellock.h (__lll_timedlock): Use
atomic_compare_and_exchange_bool_acq rather than atomic_exchange_acq.

9 years agomalloc: fix comment typo
Sean Anderson [Tue, 12 Aug 2014 09:23:41 +0000 (05:23 -0400)] 
malloc: fix comment typo

9 years agoRegenerate libc.po
Allan McRae [Sat, 9 Aug 2014 07:14:35 +0000 (17:14 +1000)] 
Regenerate libc.po

9 years agotst-gettext2: make setup more robust
Mike Frysinger [Mon, 4 Aug 2014 14:31:27 +0000 (10:31 -0400)] 
tst-gettext2: make setup more robust

This test should be more robust about setting up its lang dirs.
I had two completely different systems (ia64 & x86_64) get wedged
in a way where the test just kept FAILing on me due to some of the
files missing.  This probably wasn't a big deal until the recent
commit which made checking of the locale dirs more robust (for
security reasons).

9 years agoThis patch adds new function libc_feholdsetround_noex_aarch64_ctx, enabling
Wilco Dijkstra [Thu, 7 Aug 2014 16:29:55 +0000 (16:29 +0000)] 
This patch adds new function libc_feholdsetround_noex_aarch64_ctx, enabling
further optimization. libc_feholdsetround_aarch64_ctx now only needs to
read the FPCR in the typical case, avoiding a redundant FPSR read.
Performance results show a good improvement (5-10% on sin()) on cores with
expensive FPCR/FPSR instructions.

9 years agoFix performance issue in misaligned strcpy.
Wilco [Thu, 7 Aug 2014 14:30:31 +0000 (14:30 +0000)] 
Fix performance issue in misaligned strcpy.

9 years agoPowerPC: Fix termios definitions
Adhemerval Zanella [Thu, 24 Jul 2014 12:28:57 +0000 (08:28 -0400)] 
PowerPC: Fix termios definitions

This patch fixes the incorrect guard by __USE_MISC of struct winsize and
struct termio in powerpc termios header.  Current states leads to build
failures if the program defines _XOPEN_SOURCE, but not _DEFAULT_SOURCE
or either _BSD_SOURCE or _SVID_SOURCE.  Without any definition,
__USE_MISC will not be defined and neither the struct definitions.

This patch copies the default Linux ioctl-types.h by adjusting only the
character control field (c_cc) size in struct termio.

9 years agoalpha: Fix exception raising from soft-fp
Richard Henderson [Tue, 5 Aug 2014 20:36:36 +0000 (13:36 -0700)] 
alpha: Fix exception raising from soft-fp

Use the SSI_IEEE_RAISE_EXCEPTION function as from feraiseexcept,
instead of __ieee_get+set_fp_status.  Always raise the FP exceptions
from float-to-integer conversion.

9 years agoalpha: Remove linux lowlevellock.h
Richard Henderson [Tue, 5 Aug 2014 16:06:36 +0000 (09:06 -0700)] 
alpha: Remove linux lowlevellock.h

For real this time.

9 years agoalpha: Remove linux lowlevellock.h
Richard Henderson [Tue, 5 Aug 2014 15:31:47 +0000 (08:31 -0700)] 
alpha: Remove linux lowlevellock.h

9 years agoMIPS - Remove mips lowlevellock.h.
Bernard Ogden [Mon, 4 Aug 2014 22:12:03 +0000 (22:12 +0000)] 
MIPS - Remove mips lowlevellock.h.

* sysdeps/unix/sysv/linux/mips/lowlevellock.h: Remove file.

9 years agoAArch64: Remove lowlevellock.h
Will Newton [Mon, 4 Aug 2014 15:01:31 +0000 (16:01 +0100)] 
AArch64: Remove lowlevellock.h

Remove lowlevellock.h in favour of the generic implementation. The
generic implementation was tested natively and introduces no
regressions.

ChangeLog:

2014-08-04  Will Newton  <will.newton@linaro.org>

* sysdeps/unix/sysv/linux/aarch64/lowlevellock.h: Remove
file.

9 years agoadd ChangeLog for previous commit
Mike Frysinger [Mon, 4 Aug 2014 14:31:01 +0000 (10:31 -0400)] 
add ChangeLog for previous commit

9 years agoia64: define nocancel entry points in PSEUDO
Mike Frysinger [Sun, 3 Aug 2014 16:14:35 +0000 (16:14 +0000)] 
ia64: define nocancel entry points in PSEUDO

The previous set of not-cancel.h headers (prior to the commit
2fbdf5339aaeaa423bd661524f7ec7af41fa2606) did not require the
arch to define nocancel entry points, so ia64 never did.
However, after the various files were merged, it became a hard
requirement for arches which mean ia64 failed to build.

Here we add dedicated entry points.  It'd be nice to merge
with the existing stubs like other arches do, but the ia64
asm does not lend itself to interleaving of functions.  If
someone has a suggestion on merging these, that'd be great,
but at least now we build & pass tests again.

9 years agoIA64: Consolidate nptl/ subdirectories under linux/...
Roland McGrath [Fri, 4 Jul 2014 05:19:41 +0000 (22:19 -0700)] 
IA64: Consolidate nptl/ subdirectories under linux/...

9 years agoIA64: Move NPTL public headers to sysdeps/ia64/nptl/.
Roland McGrath [Fri, 4 Jul 2014 04:51:13 +0000 (21:51 -0700)] 
IA64: Move NPTL public headers to sysdeps/ia64/nptl/.

9 years agoIA64: Define TLS_DEFINE_INIT_TP
Roland McGrath [Fri, 4 Jul 2014 04:51:01 +0000 (21:51 -0700)] 
IA64: Define TLS_DEFINE_INIT_TP

9 years agoIA64: Consolidate NPTL/non versions of vfork
Roland McGrath [Fri, 4 Jul 2014 05:09:33 +0000 (22:09 -0700)] 
IA64: Consolidate NPTL/non versions of vfork

9 years agoIA64: Consolidate NPTL/non versions of clone
Roland McGrath [Fri, 4 Jul 2014 04:50:50 +0000 (21:50 -0700)] 
IA64: Consolidate NPTL/non versions of clone

9 years agoFix missing <math_private.h> in ldbl-96 fma
Andreas Schwab [Mon, 4 Aug 2014 08:20:03 +0000 (10:20 +0200)] 
Fix missing <math_private.h> in ldbl-96 fma

9 years agoadd ChangeLog for previous commit
Mike Frysinger [Sun, 3 Aug 2014 15:12:35 +0000 (11:12 -0400)] 
add ChangeLog for previous commit

9 years agotst-setcontext: fix style
Mike Frysinger [Sun, 3 Aug 2014 12:55:20 +0000 (08:55 -0400)] 
tst-setcontext: fix style

9 years agoRemove sysdeps/unix/sysv/linux/arm/lowlevellock.h
Roland McGrath [Sat, 2 Aug 2014 01:59:48 +0000 (18:59 -0700)] 
Remove sysdeps/unix/sysv/linux/arm/lowlevellock.h

9 years agoForce eval for fma implementations
Richard Henderson [Fri, 1 Aug 2014 22:13:50 +0000 (12:13 -1000)] 
Force eval for fma implementations

9 years agoARM: Move PTR_MANGLE et al out of Linux-specific file.
Roland McGrath [Fri, 1 Aug 2014 18:28:49 +0000 (11:28 -0700)] 
ARM: Move PTR_MANGLE et al out of Linux-specific file.

9 years agoFix -Wundef warnings in regex_internal.h
Siddhesh Poyarekar [Fri, 1 Aug 2014 09:00:43 +0000 (14:30 +0530)] 
Fix -Wundef warnings in regex_internal.h

9 years agoCheck if DEBUG is defined in regex_internal.c
Siddhesh Poyarekar [Fri, 1 Aug 2014 08:54:41 +0000 (14:24 +0530)] 
Check if DEBUG is defined in regex_internal.c

The DEBUG macro is checked for its value in one place and if it is
defined in another.  Make this consistent across the two cases and use
the same style that we did in mktime.c, which is to check if the macro
is defined and it is set.

9 years agoFix -Wundef warnings in fnmatch.c
Siddhesh Poyarekar [Fri, 1 Aug 2014 08:53:38 +0000 (14:23 +0530)] 
Fix -Wundef warnings in fnmatch.c

Fixes -Wundef warnings for MBSTATE_T and HAVE_STRING_H.  The
HAVE_STRING_H bit is a merge from the gnulib fnmatch.c and the
MBSTATE_T fix has been posted to gnulib for inclusion.

9 years agoNEWS: Explain the s390 jmp_buf / ucontext_t ABI change reversal.
Stefan Liebler [Fri, 1 Aug 2014 07:48:17 +0000 (09:48 +0200)] 
NEWS: Explain the s390 jmp_buf / ucontext_t ABI change reversal.

9 years agoAdd __safe_fatal and use it in __pthread_unwind forwarder fallback.
Roland McGrath [Thu, 31 Jul 2014 21:00:33 +0000 (14:00 -0700)] 
Add __safe_fatal and use it in __pthread_unwind forwarder fallback.

9 years agoUse __builtin_trap for ABORT_INSTRUCTION.
Roland McGrath [Thu, 31 Jul 2014 20:07:19 +0000 (13:07 -0700)] 
Use __builtin_trap for ABORT_INSTRUCTION.

9 years agoSplit nptl-signals.h out from pthreadP.h
Roland McGrath [Thu, 31 Jul 2014 18:37:48 +0000 (11:37 -0700)] 
Split nptl-signals.h out from pthreadP.h

9 years ago[PATCH] S390: Fix remaining ONE_DIRECTION warning messages
Stefan Liebler [Thu, 31 Jul 2014 18:10:47 +0000 (20:10 +0200)] 
[PATCH] S390: Fix remaining ONE_DIRECTION warning messages

This patch fixes the remaining ONE_DIRECTION warnings for s390 specific conversions.
It defines ONE_DIRECTION to 0 like the patch from Steve Ellcey:
https://www.sourceware.org/ml/libc-alpha/2014-05/msg00039.html

    Changelog:
    * sysdeps/s390/s390-64/utf16-utf32-z9.c
    (ONE_DIRECTION): Define.
    * sysdeps/s390/s390-64/utf8-utf16-z9.c
    (ONE_DIRECTION): Define.
    * sysdeps/s390/s390-64/utf8-utf32-z9.c
    (ONE_DIRECTION): Define.

9 years agoS/390: Revert the jmp_buf/ucontext_t ABI change.
Stefan Liebler [Thu, 31 Jul 2014 18:04:54 +0000 (20:04 +0200)] 
S/390: Revert the jmp_buf/ucontext_t ABI change.

9 years agoFix -Wundef warning for HAVE_IFUNC
Andreas Schwab [Thu, 31 Jul 2014 10:46:14 +0000 (12:46 +0200)] 
Fix -Wundef warning for HAVE_IFUNC

9 years agoImprove 64bit memcpy performance for Haswell CPU with AVX instruction
Ling Ma [Mon, 14 Jul 2014 04:02:52 +0000 (00:02 -0400)] 
Improve 64bit memcpy performance for Haswell CPU with AVX instruction

In this patch we take advantage of HSW memory bandwidth, manage to
reduce miss branch prediction by avoiding using branch instructions and
force destination to be aligned with avx instruction.

The CPU2006 403.gcc benchmark indicates this patch improves performance
from 2% to 10%.

9 years agoPowerPC: Fix gprof entry point for LE
Adhemerval Zanella [Tue, 29 Jul 2014 18:56:44 +0000 (13:56 -0500)] 
PowerPC: Fix gprof entry point for LE

This patch fixes the ELFv2 gprof entry point since the ABI
does not define function descriptors.  It fixes BZ#17213.

9 years agofcntl-linux.h: add new definitions and manual updates for open file description locks
Jeff Layton [Wed, 23 Jul 2014 18:21:05 +0000 (14:21 -0400)] 
fcntl-linux.h: add new definitions and manual updates for open file description locks

Open file description locks have been merged into the Linux kernel for
v3.15.  Add the appropriate command-value definitions and an update to
the manual that describes their usage.

9 years agoUpdate Spanish translations
Allan McRae [Wed, 23 Jul 2014 07:06:01 +0000 (17:06 +1000)] 
Update Spanish translations

9 years agoAdd fixed bug to NEWS
Allan McRae [Wed, 23 Jul 2014 06:55:16 +0000 (16:55 +1000)] 
Add fixed bug to NEWS

Fixed in commit 7ee03f00.

9 years agoAdd missing changelog entry for commit ab7ac0f2
Allan McRae [Wed, 23 Jul 2014 06:52:13 +0000 (16:52 +1000)] 
Add missing changelog entry for commit ab7ac0f2

9 years agoRevert "aarch64: Add hp-timing.h"
Marcus Shawcroft [Tue, 22 Jul 2014 09:43:52 +0000 (10:43 +0100)] 
Revert "aarch64: Add hp-timing.h"

This reverts commit 4052993954d1dcb39cbd478ab59e75fe12903e9c.

Conflicts:
sysdeps/aarch64/hp-timing.h

9 years agom68k: use generic lowlevellock.h
Andreas Schwab [Fri, 18 Jul 2014 21:24:13 +0000 (23:24 +0200)] 
m68k: use generic lowlevellock.h

9 years ago[BZ #17078] ARM: R_ARM_TLS_DESC prelinker support
Maciej W. Rozycki [Thu, 17 Jul 2014 18:22:05 +0000 (19:22 +0100)] 
[BZ #17078] ARM: R_ARM_TLS_DESC prelinker support

This is a change to the dynamic linker to add prelinker support for the
R_ARM_TLS_DESC relocation.  Two cases can be considered here, the usual
one where lazy binding is in use and the less frequent one, where
immediate binding is requested via the use of the DF_BIND_NOW dynamic
flag (e.g. by using the GNU linker's "-z now" option).

This change only handles the first case.  In this scenario the prelinker
does what the dynamic linker would do, that is it preinitialises
R_ARM_TLS_DESC relocations with a pointer to the lazy specialization as
provided with the DT_TLSDESC_PLT dynamic tag.  A conflict is
additionally created and in the conflict resolution path the dynamic
linker complements the work by initialising the object's pointer as
indicated by the DT_TLSDESC_GOT dynamic tag to the linker's internal
lazy specialization worker function and also providing the associated
link map in the second entry of the GOT.  This step is required, because
if prelinking is successful at the run time, then the dynamic linker's
elf_machine_runtime_setup() function isn't called that would normally do
so.

The second case remains unresolved, because support for that scenario
has not been implemented in the prelinker.  In this case the lazy
specialization is unavailable and the DT_TLSDESC_PLT dynamic tag is not
present.

The prelinker could assume the common case of static specialization and
resolve the relocation, but that would require the exposure of dynamic
linker's specialization worker function.  Furthermore the dynamic linker
would have to handle the relocation in the conflict resolution path and
see if the dynamic specialization should be used instead.  This however
would require access to data structures currently not made available to
the conflict resolution path and therefore a redesign of this part of
the dynamic linker.

Alternatively the prelinker could defer all processing to the dynamic
linker's conflict resolution path, but that would require similar access
to the said data structures.

Therefore the prelinker issues an error instead and the dynamic linker
has assertions to check that DT_TLSDESC_PLT and DT_TLSDESC_GOT are in
use in its conflict resolution path.

This change resolves all TLS failures in the prelinker testsuite, as
noted in the bug report, as well as the small test case provided there.
Unfortunately we don't seem to have any hooks to factor in the prelinker
(if present on a system) to testing, so at this time this fix has to
rely on using the prelinker test suite and enabling TLS descriptors
there for coverage.

[BZ #17078]
* sysdeps/arm/dl-machine.h (elf_machine_rela)
[RESOLVE_CONFLICT_FIND_MAP]: Handle R_ARM_TLS_DESC relocation.
(elf_machine_lazy_rel): Handle prelinked R_ARM_TLS_DESC entries.

9 years agoFix fallback fesetenv and feupdateenv on FE_NOMASK_ENV (bug 17088).
Joseph Myers [Thu, 17 Jul 2014 17:56:43 +0000 (17:56 +0000)] 
Fix fallback fesetenv and feupdateenv on FE_NOMASK_ENV (bug 17088).

This patch fixes bug 17088, fallback fesetenv and feupdateenv not
giving an error for an FE_NOMASK_ENV argument when it requires traps
to be enabled.  (This is the bug tested for by test-fenv-return.c.)

Tested mips64 soft-float.

[BZ #17088]
* math/fesetenv.c (__fesetenv)
[FE_NOMASK_ENV && FE_ALL_EXCEPT != 0]: Return 1 for FE_NOMASK_ENV.
* math/feupdateenv.c (__feupdateenv)
[FE_NOMASK_ENV && FE_ALL_EXCEPT != 0]: Likewise.

9 years ago[PATCH 6/6] Split s390 out of main Linux kernel-features.h.
Joseph Myers [Thu, 17 Jul 2014 17:55:44 +0000 (17:55 +0000)] 
[PATCH 6/6] Split s390 out of main Linux kernel-features.h.

This patch splits s390 out of the main Linux kernel-features.h.

Not tested.

* sysdeps/unix/sysv/linux/s390/kernel-features.h: New file.
* sysdeps/unix/sysv/linux/kernel-features.h [__s390__]
(__ASSUME_SOCKETCALL): Do not define.

9 years ago[PATCH 5/6] Split sh out of main Linux kernel-features.h.
Joseph Myers [Thu, 17 Jul 2014 17:54:43 +0000 (17:54 +0000)] 
[PATCH 5/6] Split sh out of main Linux kernel-features.h.

This patch splits sh out of the main Linux kernel-features.h.

Not tested.

* sysdeps/unix/sysv/linux/sh/kernel-features.h: New file.
* sysdeps/unix/sysv/linux/kernel-features.h [__sh__]
(__ASSUME_SOCKETCALL): Do not define.
(__ASSUME_ST_INO_64_BIT): Define unconditionally.
[__LINUX_KERNEL_VERSION >= 0x020625 && __sh__]
(__ASSUME_ACCEPT4_SYSCALL): Do not define.
[__LINUX_KERNEL_VERSION >= 0x020625 && __sh__]
(__ASSUME_RECVMMSG_SYSCALL): Likewise.
[__LINUX_KERNEL_VERSION >= 0x030000 && __sh__]
(__ASSUME_SENDMMSG_SYSCALL): Likewise.
[__sh__] (__ASSUME_SENDMMSG_SYSCALL_WITH_SOCKETCALL): Likewise.

9 years ago[PATCH 4/6] Split powerpc out of main Linux kernel-features.h.
Joseph Myers [Thu, 17 Jul 2014 17:53:52 +0000 (17:53 +0000)] 
[PATCH 4/6] Split powerpc out of main Linux kernel-features.h.

This patch splits powerpc out of the main Linux kernel-features.h.

Not tested.

* sysdeps/unix/sysv/linux/powerpc/kernel-features.h: New file.
* sysdeps/unix/sysv/linux/kernel-features.h [__powerpc__]
(__ASSUME_SOCKETCALL): Do not define.
(__ASSUME_IPC64): Define unconditionally.
[__LINUX_KERNEL_VERSION >= 0x020625 && __powerpc__]
(__ASSUME_ACCEPT4_SYSCALL): Do not define.
[__LINUX_KERNEL_VERSION >= 0x020625 && __powerpc__]
(__ASSUME_RECVMMSG_SYSCALL): Likewise.
[__LINUX_KERNEL_VERSION >= 0x030000 && __powerpc__]
(__ASSUME_SENDMMSG_SYSCALL): Likewise.
[__powerpc__] (__ASSUME_SENDMMSG_SYSCALL_WITH_SOCKETCALL):
Likewise.

9 years ago[PATCH 3/6] Split sparc out of main Linux kernel-features.h.
Joseph Myers [Thu, 17 Jul 2014 17:52:58 +0000 (17:52 +0000)] 
[PATCH 3/6] Split sparc out of main Linux kernel-features.h.

This patch splits sparc out of the main Linux kernel-features.h.

Not tested.

* sysdeps/unix/sysv/linux/sparc/kernel-features.h: New file.
* sysdeps/unix/sysv/linux/kernel-features.h [__sparc__]
(__ASSUME_SOCKETCALL): Do not define.
(__ASSUME_SET_ROBUST_LIST): Define unconditionally.
(__ASSUME_FUTEX_LOCK_PI): Likewise.
[__sparc__] (__ASSUME_ACCEPT4_SYSCALL): Do not define.
[__sparc__] (__ASSUME_ACCEPT4_SYSCALL_WITH_SOCKETCALL): Likewise.
(__ASSUME_REQUEUE_PI): Define unconditionally.
[__LINUX_KERNEL_VERSION >= 0x020621 && __sparc__]
(__ASSUME_RECVMMSG_SYSCALL): Do not define.
[__sparc__] (__ASSUME_RECVMMSG_SYSCALL_WITH_SOCKETCALL): Likewise.
[__LINUX_KERNEL_VERSION >= 0x030000 && __sparc__]
(__ASSUME_SENDMMSG_SYSCALL): Likewise.
[__sparc__] (__ASSUME_SENDMMSG_SYSCALL_WITH_SOCKETCALL): Likewise.

9 years ago[PATCH 2/6] Split i386 out of main Linux kernel-features.h.
Joseph Myers [Thu, 17 Jul 2014 17:51:35 +0000 (17:51 +0000)] 
[PATCH 2/6] Split i386 out of main Linux kernel-features.h.

This patch splits i386 out of the main Linux kernel-features.h.

Tested x86 that there are no changes to disassembly of installed
shared libraries.

* sysdeps/unix/sysv/linux/i386/kernel-features.h: New file.
* sysdeps/unix/sysv/linux/kernel-features.h [__i386__]
(__ASSUME_SOCKETCALL): Do not define.
[__LINUX_KERNEL_VERSION >= 0x020621 && __i386__]
(__ASSUME_RECVMMSG_SYSCALL): Likewise.
[__i386__] (__ASSUME_RECVMMSG_SYSCALL_WITH_SOCKETCALL): Likewise.
[__LINUX_KERNEL_VERSION >= 0x030000 && __i386__]
(__ASSUME_SENDMMSG_SYSCALL): Likewise.
[__i386__] (__ASSUME_SENDMMSG_SYSCALL_WITH_SOCKETCALL): Likewise.

9 years ago[PATCH 1/6] Split x86_64 out of main Linux kernel-features.h.
Joseph Myers [Thu, 17 Jul 2014 17:49:45 +0000 (17:49 +0000)] 
[PATCH 1/6] Split x86_64 out of main Linux kernel-features.h.

This patch splits x86_64 out of the main Linux kernel-features.h.

Tested x86_64 that there are no changes to disassembly of installed
shared libraries.

* sysdeps/unix/sysv/linux/x86_64/kernel-features.h: New file.
* sysdeps/unix/sysv/linux/kernel-features.h [__x86_64__]
(__ASSUME_ACCEPT4_SYSCALL): Do not define.
[__LINUX_KERNEL_VERSION >= 0x020621 && __x86_64__]
(__ASSUME_RECVMMSG_SYSCALL): Likewise.
[__LINUX_KERNEL_VERSION >= 0x030000 && __x86_64__]
(__ASSUME_SENDMMSG_SYSCALL): Likewise.
[__x86_64__ && __LINUX_KERNEL_VERSION >= 0x030100]
(__ASSUME_GETCPU_SYSCALL): Likewise.

9 years agoRefactor handling of /lib64 etc. cases, move out of sysdeps/gnu/configure.ac.
Joseph Myers [Thu, 17 Jul 2014 14:35:48 +0000 (14:35 +0000)] 
Refactor handling of /lib64 etc. cases, move out of sysdeps/gnu/configure.ac.

This patch continues removing architecture-specific cases from
non-architecture-specific files by moving the logic to use directories
such as /lib64 out of sysdeps/gnu/configure.ac.

A new macro LIBC_SLIBDIR_RTLDDIR is created that sysdeps configure
scripts can use to declare the library directories to be used; the
logic was previously duplicated in configure fragments for aarch64,
mips and x32 as well as in sysdeps/gnu/configure.ac.  This macro is
used directly in sysdeps/gnu/configure.ac only to provide the /lib
default (the logic saying that with --prefix=/usr shared libraries go
in /lib not /usr/lib); the architecture cases formerly there are moved
into various new or existing configure.ac files.  The new macro is
also used in the various architecture fragments that already had such
logic.  In the x32 there was previously a configure fragment, but it
was a directly written one without a .ac file; now a .ac file is used
there instead to generate configure.

Tested x86_64 that the installed shared libraries, and the directory
structure of the installation, are unchanged by this patch.

There is an old bug report - bug 6441 - about library directories
changing after reconfiguring.  If this is still applicable - and I
haven't attempted to confirm it or review the old patch pointed to in
that bug - then this patch should reduce the number of places needing
changing in any fix.

* aclocal.m4 (LIBC_SLIBDIR_RTLDDIR): New macro.
* sysdeps/gnu/configure.ac: Use LIBC_SLIBDIR_RTLDDIR.  Remove
cases for individual architectures.
* sysdeps/gnu/configure: Regenerated.
* sysdeps/unix/sysv/linux/aarch64/configure.ac: Use
LIBC_SLIBDIR_RTLDDIR.
* sysdeps/unix/sysv/linux/aarch64/configure: Regenerated.
* sysdeps/unix/sysv/linux/mips/configure.ac: Use
LIBC_SLIBDIR_RTLDDIR.
* sysdeps/unix/sysv/linux/mips/configure: Regenerated.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac: Use
LIBC_SLIBDIR_RTLDDIR.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/configure:
Regenerated.
* sysdeps/unix/sysv/linux/s390/s390-64/configure.ac: New file.
* sysdeps/unix/sysv/linux/s390/s390-64/configure: New generated
file.
* sysdeps/unix/sysv/linux/sparc/sparc64/configure.ac: New file.
* sysdeps/unix/sysv/linux/sparc/sparc64/configure: New generated
file.
* sysdeps/unix/sysv/linux/x86_64/64/configure.ac: New file.
* sysdeps/unix/sysv/linux/x86_64/64/configure: New generated file.
* sysdeps/unix/sysv/linux/x86_64/x32/configure.ac: New file.
* sysdeps/unix/sysv/linux/x86_64/x32/configure: Generate.

9 years agoMove architecture shlib-versions files to Linux-specific directories.
Joseph Myers [Thu, 17 Jul 2014 14:31:12 +0000 (14:31 +0000)] 
Move architecture shlib-versions files to Linux-specific directories.

Various architectures have files such as sysdeps/<arch>/shlib-versions
whose contents are in fact entirely Linux-specific, relating only to
the symbol / shared library versions for the port to Linux on that
architecture, when any future port to a different OS on that
architecture would use the symbol version of the glibc release it goes
in, as standard for new ports.

This patch moves such files under sysdeps/unix/sysv/linux/, merging in
the contents of sysdeps/<arch>/nptl/shlib-versions in the process.
The only bits not moved are those relating to libgcc_s versions, which
don't appear OS-specific in the same way that glibc's symbol versions
so.  It deliberately does not change the regular expressions given for
matching configurations in each file; some match only Linux although
not Linux-specific, or match other OSes although Linux-specific.  It
is with a view to at least the following further cleanups:

* Move architecture-specific content from the toplevel shlib-versions
  and nptl/shlib-versions into sysdeps shlib-versions files, so
  eliminating another difference between ex-ports and non-ex-ports
  architectures.

* Likewise, for OS-specific content in shlib-versions files.

* At that point, the first field in shlib-versions files (the regular
  expression matching a configuration triplet) should be redundant, so
  eliminate that field and leave shlib-versions selection working
  purely on a sysdeps basis (with limited use of %ifdef in
  shlib-versions files when needed) rather than having its own
  separate mechanism to select what configuration information is
  relevant.

* Move the build of gnu/lib-names.h to a similar mechanism to that
  used for gnu/stubs.h (each library build installing a version of the
  header specifically for that build), so we can eliminate the
  duplication of soname information in the makefiles and get it purely
  from shlib-versions files again.

There may be other cleanups possible as well (in particular, I'm not
sure that all cases where the same "Earliest symbol set" information
is repeated for many different libraries actually should need to
repeat it rather than specifying it just once for DEFAULT for the
given configuration, and separately specifying any non-default choices
of soname).

Tested x86_64 that the installed shared libraries are unchanged by
this patch.

* sysdeps/aarch64/shlib-versions: Move to ...
* sysdeps/unix/sysv/linux/aarch64/shlib-versions: ... here.
* sysdeps/alpha/shlib-versions: Move to ...
* sysdeps/unix/sysv/linux/alpha/shlib-versions: ... here.
* sysdeps/arm/shlib-versions: Move to ...
* sysdeps/unix/sysv/linux/arm/shlib-versions: ... here.
* sysdeps/hppa/shlib-versions: Move all contents except for
libgcc_s entry to ...
* sysdeps/unix/sysv/linux/hppa/shlib-versions: ... here.  Merge in
entry from ...
* sysdeps/hppa/nptl/shlib-versions: ... here.  Remove file.
* sysdeps/ia64/shlib-versions: Move to ...
* sysdeps/unix/sysv/linux/ia64/shlib-versions: ... here.  Merge in
entry from ...
* sysdeps/ia64/nptl/shlib-versions: ... here.  Remove file.
* sysdeps/m68k/coldfire/shlib-versions: Move to ...
* sysdeps/unix/sysv/linux/m68k/coldfire/shlib-versions: ... here.
* sysdeps/microblaze/shlib-versions: Move to ...
* sysdeps/unix/sysv/linux/microblaze/shlib-versions: ... here.
* sysdeps/mips/shlib-versions: Move to ...
* sysdeps/unix/sysv/linux/mips/shlib-versions: ... here.  Merge in
entry from ...
* sysdeps/mips/nptl/shlib-versions: ... here.  Remove file.
* sysdeps/tile/shlib-versions: Move to ...
* sysdeps/unix/sysv/linux/tile/shlib-versions: ... here.
* sysdeps/unix/sysv/linux/x86_64/64/shlib-versions: Merge in entry
from ...
* sysdeps/x86_64/64/shlib-versions: ... here.  Remove file.
* sysdeps/unix/sysv/linux/x86_64/x32/shlib-versions: Merge in
entry from ...
* sysdeps/x86_64/x32/shlib-versions: ... here.  Remove file.

9 years agoARM: Fix compiler warnings from atomic.h
Will Newton [Fri, 4 Jul 2014 15:10:15 +0000 (16:10 +0100)] 
ARM: Fix compiler warnings from atomic.h

__arch_compare_and_exchange_bool_*_int return a boolean so in the
dummy implementations for 8, 16 and 64 bits return zero rather than
oldval. Zero is used rather than TRUE or FALSE to avoid needing to
including any headers for these dummy functions.

ChangeLog:

2014-07-17  Will Newton  <will.newton@linaro.org>

* sysdeps/arm/bits/atomic.h
(__arch_compare_and_exchange_bool_8_int): Evaluate to zero.
(__arch_compare_and_exchange_bool_16_int): Likewise.
(__arch_compare_and_exchange_bool_64_int): Likewise.

9 years agoiconv/loop.c: Fix -Wundef warning with !_STRING_ARCH_unaligned
Will Newton [Thu, 10 Jul 2014 08:18:03 +0000 (09:18 +0100)] 
iconv/loop.c: Fix -Wundef warning with !_STRING_ARCH_unaligned

If code is required to handle the unaligned case then loop.c includes
itself and relies on the #undefs at the end of the file to avoid
outputting two copies of LOOPFCT and gconv_btowc. However
MAX_NEEDED_INPUT is tested with #if so this causes a warning.
Reorder the code so that the function definitions are in an #else
block to make the behaviour clearer and fix the warning.

Verified that code is unchanged on x86_64 and arm.

ChangeLog:

2014-07-17  Will Newton  <will.newton@linaro.org>

* iconv/loop.c: Move definition of LOOPFCT and gconv_btowc
into an #else block.

9 years agoARM: Clean up EABI-related configury
Roland McGrath [Wed, 16 Jul 2014 22:18:36 +0000 (15:18 -0700)] 
ARM: Clean up EABI-related configury

9 years agoAdd generic/stub implementations of pthread_{kill,sigmask,sigqueue}.
Roland McGrath [Tue, 15 Jul 2014 22:48:18 +0000 (15:48 -0700)] 
Add generic/stub implementations of pthread_{kill,sigmask,sigqueue}.

9 years agoSeparate Linuxisms from lowlevellock.h, make a generic one
Roland McGrath [Tue, 15 Jul 2014 22:23:06 +0000 (15:23 -0700)] 
Separate Linuxisms from lowlevellock.h, make a generic one

9 years agoRemove declarations of two nonexistent variables from nptl/pthreadP.h.
Roland McGrath [Tue, 15 Jul 2014 21:44:47 +0000 (14:44 -0700)] 
Remove declarations of two nonexistent variables from nptl/pthreadP.h.

9 years agoEnable AVX2 optimized memset only if -mavx2 works
H.J. Lu [Mon, 14 Jul 2014 14:58:27 +0000 (07:58 -0700)] 
Enable AVX2 optimized memset only if -mavx2 works

* config.h.in (HAVE_AVX2_SUPPORT): New #undef.
* sysdeps/i386/configure.ac: Set HAVE_AVX2_SUPPORT and
config-cflags-avx2.
* sysdeps/x86_64/configure.ac: Likewise.
* sysdeps/i386/configure: Regenerated.
* sysdeps/x86_64/configure: Likewise.
* sysdeps/x86_64/multiarch/Makefile (sysdep_routines): Add
memset-avx2 only if config-cflags-avx2 is yes.
* sysdeps/x86_64/multiarch/ifunc-impl-list.c (__libc_ifunc_impl_list):
Tests for memset_chk and memset only if HAVE_AVX2_SUPPORT is
defined.
* sysdeps/x86_64/multiarch/memset.S: Define multiple versions
only if HAVE_AVX2_SUPPORT is defined.
* sysdeps/x86_64/multiarch/memset_chk.S: Likewise.

9 years agoCorrect DT_PPC64_NUM
Alan Modra [Mon, 14 Jul 2014 11:44:50 +0000 (21:14 +0930)] 
Correct DT_PPC64_NUM

[BZ #17153]
* elf/elf.h (DT_PPC64_NUM): Correct value.
* NEWS: Add to fixed bug list.

9 years agoChangeLog fix
Andreas Schwab [Mon, 14 Jul 2014 08:48:33 +0000 (10:48 +0200)] 
ChangeLog fix

9 years agoregex: don't deref NULL upon heap allocation failure
Jim Meyering [Sun, 13 Jul 2014 00:07:21 +0000 (17:07 -0700)] 
regex: don't deref NULL upon heap allocation failure

* posix/regcomp.c: (parse_dup_op): Handle duplicate_tree
failure in one more place.
To trigger the segfault, configure grep -with-included-regex,
build it, and run these commands:
( ulimit -v 300000; echo a|src/grep -E a+++++++++++++++++++++ )

9 years agom68k: update libm test ULPs
Andreas Schwab [Sun, 13 Jul 2014 09:20:44 +0000 (11:20 +0200)] 
m68k: update libm test ULPs

9 years agoaarch64: Update libm-test-ulps
Richard Henderson [Fri, 11 Jul 2014 17:56:42 +0000 (10:56 -0700)] 
aarch64: Update libm-test-ulps

9 years agonptl: Fix abort in case of set*id failure [BZ #17135]
Florian Weimer [Thu, 10 Jul 2014 15:34:46 +0000 (17:34 +0200)] 
nptl: Fix abort in case of set*id failure [BZ #17135]

If a call to the set*id functions fails in a multi-threaded program,
the abort introduced in commit 13f7fe35ae2b0ea55dc4b9628763aafdc8bdc30c
was triggered.

We address by checking that all calls to set*id on all threads give
the same result, and only abort if we see success followed by failure
(or vice versa).

9 years agoPowerPC: Fix build due missing lll_robust_trylock
Adhemerval Zanella [Thu, 10 Jul 2014 21:42:51 +0000 (16:42 -0500)] 
PowerPC: Fix build due missing lll_robust_trylock

Commit 887865f remove the lll_robust_trylock definition on all
architectures, however for powerpc both __lll_trylock and
__lll_cond_trylock were based on lll_robust_trylock definition.
This patch restore it with a different name.

9 years agoChangeLog fixup for last commit.
Roland McGrath [Thu, 10 Jul 2014 18:30:38 +0000 (11:30 -0700)] 
ChangeLog fixup for last commit.

9 years agoGet rid of lll_robust_dead.
Roland McGrath [Thu, 10 Jul 2014 18:21:54 +0000 (11:21 -0700)] 
Get rid of lll_robust_dead.

9 years agoGet rid of lll_robust_trylock.
Roland McGrath [Thu, 10 Jul 2014 17:57:57 +0000 (10:57 -0700)] 
Get rid of lll_robust_trylock.

9 years agomanual: Update the locale documentation
Florian Weimer [Wed, 28 May 2014 12:05:03 +0000 (14:05 +0200)] 
manual: Update the locale documentation

9 years ago_nl_find_locale: Improve handling of crafted locale names [BZ #17137]
Florian Weimer [Mon, 12 May 2014 13:24:12 +0000 (15:24 +0200)] 
_nl_find_locale: Improve handling of crafted locale names [BZ #17137]

Prevent directory traversal in locale-related environment variables
(CVE-2014-0475).

9 years agosetlocale: Use the heap for the copy of the locale argument
Florian Weimer [Wed, 28 May 2014 12:41:52 +0000 (14:41 +0200)] 
setlocale: Use the heap for the copy of the locale argument

This avoids alloca calls with potentially large arguments.

9 years agoSync up error.c with gnulib
Siddhesh Poyarekar [Thu, 10 Jul 2014 08:54:30 +0000 (14:24 +0530)] 
Sync up error.c with gnulib

Summary of changes:

- Use of !_LIBC instead of HAVE_CONFIG_H
- Code changes in [!_LIBC] that don't affect us
- Minor formatting changes
- Use __builtin_expect in shared code
- Define some macros in [_LIBC] that are used in gnulib but never
  defined in glibc
- Flip macro check for STRERROR_R_CHAR_P so that it does not throw a
  warning

9 years agoFix -Wundef warning for HAVE_LOCALTIME_R
Siddhesh Poyarekar [Thu, 10 Jul 2014 08:51:27 +0000 (14:21 +0530)] 
Fix -Wundef warning for HAVE_LOCALTIME_R

Define it to 0.  There is a gnulib copy for this, but it is out of
sync with our copy.

9 years agoFix Wundef warning for HAVE_STRFTIME
Siddhesh Poyarekar [Thu, 10 Jul 2014 08:50:42 +0000 (14:20 +0530)] 
Fix Wundef warning for HAVE_STRFTIME

Define it to 0

9 years agoFix -Wundef warning for HAVE_SYS_PARAM_H
Siddhesh Poyarekar [Thu, 10 Jul 2014 08:49:21 +0000 (14:19 +0530)] 
Fix -Wundef warning for HAVE_SYS_PARAM_H

Include sys/param.h unconditionally

9 years agoFix -Wundef warning for HAVE_OBSTACK
Siddhesh Poyarekar [Thu, 10 Jul 2014 08:48:13 +0000 (14:18 +0530)] 
Fix -Wundef warning for HAVE_OBSTACK

Remove the HAVE_OBSTACK macro check and include obstack check in
include path order since we don't have a copy of obstack.h in the
current directory.