Commit Graph

28426 Commits

Author SHA1 Message Date
Adhemerval Zanella 96d6fd6c40 powerpc: Optimized st{r,p}cpy for POWER8/PPC64
This patch adds an optimized POWER8 strcpy using unaligned accesses.
For strings up to 16 bytes the implementation first calculate the
string size, like strlen, and issues a memcpy.  For larger strings,
source is first aligned to 16 bytes and then tested over a loop that
reads 16 bytes am combine the cmpb results for speedup.  Special case is
added for page cross reads.

It shows 30%-60% improvement over the optimized POWER7 one that uses
only aligned accesses.
2015-01-13 11:28:30 -05:00
Leonhard Holz 0f9e585480 Fix memory handling in strxfrm_l [BZ #16009]
[Modified from the original email by Siddhesh Poyarekar]

This patch solves bug #16009 by implementing an additional path in
strxfrm that does not depend on caching the weight and rule indices.

In detail the following changed:

* The old main loop was factored out of strxfrm_l into the function
do_xfrm_cached to be able to alternativly use the non-caching version
do_xfrm.

* strxfrm_l allocates a a fixed size array on the stack. If this is not
sufficiant to store the weight and rule indices, the non-caching path is
taken. As the cache size is not dependent on the input there can be no
problems with integer overflows or stack allocations greater than
__MAX_ALLOCA_CUTOFF. Note that malloc-ing is not possible because the
definition of strxfrm does not allow an oom errorhandling.

* The uncached path determines the weight and rule index for every char
and for every pass again.

* Passing all the locale data array by array resulted in very long
parameter lists, so I introduced a structure that holds them.

* Checking for zero src string has been moved a bit upwards, it is
before the locale data initialization now.

* To verify that the non-caching path works correct I added a test run
to localedata/sort-test.sh & localedata/xfrm-test.c where all strings
are patched up with spaces so that they are too large for the caching path.
2015-01-13 11:33:56 +05:30
Torvald Riegel c60ec0e016 Fix wake-up in sysdeps/nptl/fork.c. 2015-01-13 01:09:29 +01:00
Joseph Myers 5a9e4c09a2 Fix ldbl-96 scalblnl underflowing results (bug 17803).
The ldbl-96 implementation of scalblnl (used for x86_64 and ia64) uses
a condition k <= -63 to determine when a standard underflowing result
tiny*__copysignl(tiny,x) should be returned.  However, that condition
corresponds to values with exponent -16446 or less, and in the case of
-16446, the correct result for round-to-nearest depends on whether the
value is exactly 0x1p-16446 (half the least subnormal) or more than
that.  This patch fixes the bug by changing the condition to k <= -64
and accordingly adjusting the exponent by 64 not 63 when converting to
a normal value.

Tested for x86_64.

	[BZ #17803]
	* sysdeps/ieee754/ldbl-96/s_scalblnl.c (twom63): Rename to
	twom64.  Adjust value to 0x1p-64L.
	(__scalblnl): Only return standard underflowing result for K <=
	-64 not K <= -63; adjust exponent for underflowing result by 64
	not 63.
	* math/libm-test.inc (scalbn_test_data): Add more tests.
	(scalbln_test_data): Likewise.
2015-01-12 23:02:14 +00:00
Joseph Myers 34e93d6c76 Fix ldbl-96 scalblnl for subnormal arguments (bug 17834).
The ldbl-96 implementation of scalblnl (used for x86_64 and ia64) is
incorrect for subnormal arguments (this is a separate bug from bug
17803, which is about underflowing results).  There are two problems
with the adjustments of subnormal arguments: the "two63" variable
multiplied by is actually 0x1p52L not 0x1p63L, so is insufficient to
make values normal, and then GET_LDOUBLE_EXP(es,x), used to extract
the new exponent, extracts it into a variable that isn't used, while
the value taken to by the new exponent is wrongly taken from the high
part of the mantissa before the adjustment (hx).  This patch fixes
both those problems and adds appropriate tests.

Tested for x86_64.

	[BZ #17834]
	* sysdeps/ieee754/ldbl-96/s_scalblnl.c (two63): Change value to
	0x1p63L.
	(__scalblnl): Get new exponent of adjusted subnormal value from ES
	not HX.
	* math/libm-test.inc (scalbn_test_data): Add more tests.
	(scalbln_test_data): Likewise.
2015-01-12 22:34:58 +00:00
Adhemerval Zanella ca677d3c3c Add x86 32 bit vDSO time function support
Linux 3.15 adds support for clock_gettime, gettimeofday, and time vDSO
(commit id 37c975545ec63320789962bf307f000f08fabd48).  This patch adds
GLIBC supports to use such symbol when they are avaiable.

Along with x86 vDSO support, this patch cleanup x86_64 code by moving
all common code to x86 common folder.  Only init-first.c is different
between implementations.
2015-01-12 16:03:58 -02:00
Adhemerval Zanella 49a9f6ab64 powerpc: Fix Copyright dates and CL entry
This patch fixes the copyright dates from files created by commit
8d2c0a5, 4b45943, and 56cf276.
2015-01-12 12:58:34 -05:00
Adhemerval Zanella 56cf276381 powerpc: abort transaction in syscalls
Linux kernel powerpc documentation states issuing a syscall inside a
transaction is not recommended and may lead to undefined behavior. It
also states syscalls does not abort transactoin neither they run in
transactional state.

To avoid side-effects being visible outside transactions, GLIBC with
lock elision enabled will issue a transaction abort instruction just
before all syscalls if hardware supports hardware transactions.
2015-01-12 06:32:08 -05:00
Adhemerval Zanella 4b45943a6f powerpc: Add adaptive elision to rwlocks
This patch adds support for lock elision using ISA 2.07 hardware
transactional memory for rwlocks.  The logic is similar to the
one presented in pthread_mutex lock elision.
2015-01-12 06:30:54 -05:00
Adhemerval Zanella 8d2c0a593b powerpc: Add the lock elision using HTM
This patch adds support for lock elision using ISA 2.07 hardware
transactional memory instructions for pthread_mutex primitives.
Similar to s390 version, the for elision logic defined in
'force-elision.h' is only enabled if ENABLE_LOCK_ELISION is defined.

Also, the lock elision code should be able to be built even with
a compiler that does not provide HTM support with builtins.
However I have noted the performance is sub-optimal due scheduling
pressures.
2015-01-12 06:30:19 -05:00
Andreas Schwab ec4fbd4800 Remove 17581 from NEWS 2015-01-12 10:28:09 +01:00
Roland McGrath bc0ed9f755 Fix shm-directory.h #include. 2015-01-09 16:08:14 -08:00
Chung-Lin Tang 585d9c182d Remove divide from _ELF_DYNAMIC_DO_RELOC in elf/dynamic-link.h. 2015-01-09 09:40:29 -08:00
Matthew Fortune aee6626c30 MicroBlaze: Fix BZ17791 - Remove fixed page size macros and others
Microblaze apparently has a variable page size (see thread below) and
should not hard-code any page-size related macros.
Also remove macros that are only used for BFD's trad-core support
which is not relavant for microblaze also according to the thread
starting here:

https://sourceware.org/ml/libc-ports/2013-11/msg00028.html

This patch is neither built nor tested but mirrors a MIPS patch that
fixes the same issue.

Thanks,
Matthew

     * sysdepsysdeps/unix/sysv/linux/microblaze/sys/user.h
     (PAGE_SHIFT, PAGE_SIZE, PAGE_MASK, NBPG, UPAGES): Remove.
     (HOST_TEXT_START_ADDR, HOST_STACK_END_ADDR): Remove.

Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com>
2015-01-09 17:34:46 +10:00
Torvald Riegel 9e560f4838 MicroBlaze: Remove custom lowlevellock.h.
2015-01-06  Torvald Riegel <triegel@redhat.com>

  * sysdeps/unix/sysv/linux/microblaze/lowlevellock.h: Delete file.

Signed-off-by: Torvald Riegel <triegel@redhat.com>
Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com>
2015-01-09 14:58:49 +10:00
Torvald Riegel e1cfbd0c37 MicroBlaze: Remove custom pthread_once implementation on microblaze.
2015-01-06  Torvald Riegel <triegel@redhat.com>

  * sysdeps/unix/sysv/linux/microblaze/pthread_once.c: Delete file.

Signed-off-by: Torvald Riegel <triegel@redhat.com>
Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com>
2015-01-09 14:56:33 +10:00
David Holsgrove cf71e44f1b MicroBlaze: Avoid pointer to integer conversion warning
2015-01-06  David Holsgrove <david.holsgrove@xilinx.com>

  * sysdeps/microblaze/jmpbuf-unwind.h (_jmpbuf_sp): Declare SP as void
    pointer and cast to uintptr_t.

Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com>
2015-01-09 14:49:27 +10:00
David Holsgrove b360ee62d2 MicroBlaze: Fix volatile-register-var warning in READ_THREAD_POINTER
Resolves warning: 'optimization may eliminate reads and/or writes to
register variables'

2015-01-06  David Holsgrove <david.holsgrove@xilinx.com>

  * sysdeps/microblaze/nptl/tls.h: Remove inline
    __microblaze_get_thread_area and update READ_THREAD_POINTER.

Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com>
2015-01-09 14:49:22 +10:00
David Holsgrove caff764e8c MicroBlaze: Fix integer-pointer conversion warning
2015-01-06  David Holsgrove <david.holsgrove@xilinx.com>

    * sysdeps/microblaze/nptl/tls.h (TLS_INIT_TP): Use NULL instead
      of 0.

Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com>
2015-01-09 14:30:11 +10:00
Roland McGrath c97d27f1bb Some #include cleanup in aio/timer code. 2015-01-08 15:38:15 -08:00
Roland McGrath 08734ccd98 Clean up allocrtsig code. 2015-01-08 15:31:15 -08:00
Roland McGrath 24abc20040 Fix copyright year on new stub sys/procfs.h file. 2015-01-08 14:29:45 -08:00
Roland McGrath 7b052e33dd NPTL: Fix generic pthread_sigmask. 2015-01-08 14:26:51 -08:00
Roland McGrath cc40d25e50 NPTL: Fixed missed conditionalization of setxid hooey. 2015-01-08 13:41:14 -08:00
Roland McGrath 9287adf089 Add stub sys/procfs.h file 2015-01-08 13:24:56 -08:00
Roland McGrath 59ff172f80 NPTL: Refactor cpu_set_t validation to be sysdeps-controlled
This removes Linuxisms related to cpu_set_t validation from the
generic NPTL code and puts them into a new sysdeps header file.
2015-01-08 10:49:40 -08:00
Richard Henderson b92058573b Add -Wno-trampolines as needed 2015-01-08 08:32:44 -08:00
Chung-Lin Tang 1a0a8d152d Add Nios II definitions to elf/elf.h. 2015-01-08 08:02:43 -08:00
Adhemerval Zanella dd6e8af6ba powerpc: Fix compiler warning on some syscalls
GCC 5.0 emits an warning when using sizeof on array function parameters
and powerpc internal syscall macros add a check for such cases.  More
specifically, on powerpc64 and powerpc32 sysdep.h:

  if (__builtin_classify_type (__arg3) != 5 && sizeof (__arg3) > 8) \
          __illegally_sized_syscall_arg3 (); \

And for sysdeps/unix/sysv/linux/utimensat.c build GCC emits:

error: ‘sizeof’ on array function parameter ‘tsp’ will return size of
‘const struct timespec *’

This patch uses the address of first struct member instead of the struct
itself in syscall macro.
2015-01-08 08:03:31 -05:00
Matthew Fortune 28c38448de NEWS for MIPS ABIs
* NEWS: Announce support for new MIPS ABI extensions.
2015-01-08 10:02:27 +00:00
Joseph Myers 8116321f65 Fix libm feupdateenv namespace (bug 17748).
Concluding the fixes for C90 libm functions calling C99 fe* functions,
this patch fixes the case of feupdateenv by making it a weak alias for
__feupdateenv and making the affected code call __feupdateenv.

Tested for x86_64 (testsuite, and that installed stripped shared
libraries are unchanged by the patch).  Also tested for ARM
(soft-float) that the math.h linknamespace tests now pass.

	[BZ #17748]
	* include/fenv.h (__feupdateenv): Use libm_hidden_proto.
	* math/feupdateenv.c (__feupdateenv): Use libm_hidden_def.
	* sysdeps/aarch64/fpu/feupdateenv.c (feupdateenv): Rename to
	__feupdateenv and define as weak alias of __feupdateenv.  Use
	libm_hidden_weak.
	* sysdeps/alpha/fpu/feupdateenv.c (__feupdateenv): Use
	libm_hidden_def.
	* sysdeps/arm/feupdateenv.c (feupdateenv): Rename to __feupdateenv
	and define as weak alias of __feupdateenv.  Use libm_hidden_weak.
	* sysdeps/hppa/fpu/feupdateenv.c (feupdateenv): Likewise.
	* sysdeps/i386/fpu/feupdateenv.c (__feupdateenv): Use
	libm_hidden_def.
	* sysdeps/ia64/fpu/feupdateenv.c (feupdateenv): Rename to
	__feupdateenv and define as weak alias of __feupdateenv.  Use
	libm_hidden_weak.
	* sysdeps/m68k/fpu/feupdateenv.c (__feupdateenv): Use
	libm_hidden_def.
	* sysdeps/mips/fpu/feupdateenv.c (feupdateenv): Rename to
	__feupdateenv and define as weak alias of __feupdateenv.  Use
	libm_hidden_weak.
	* sysdeps/powerpc/fpu/feupdateenv.c (__feupdateenv): Use
	libm_hidden_def.
	* sysdeps/powerpc/nofpu/feupdateenv.c (__feupdateenv): Likewise.
	* sysdeps/powerpc/powerpc32/e500/nofpu/feupdateenv.c
	(__feupdateenv): Likewise.
	* sysdeps/s390/fpu/feupdateenv.c (feupdateenv): Rename to
	__feupdateenv and define as weak alias of __feupdateenv.  Use
	libm_hidden_weak.
	* sysdeps/sh/sh4/fpu/feupdateenv.c (feupdateenv): Likewise.
	* sysdeps/sparc/fpu/feupdateenv.c (__feupdateenv): Use
	libm_hidden_def.
	* sysdeps/tile/math_private.h (__feupdateenv): New inline
	function.
	* sysdeps/x86_64/fpu/feupdateenv.c (__feupdateenv): Use
	libm_hidden_def.
	* sysdeps/generic/math_private.h (default_libc_feupdateenv): Call
	__feupdateenv instead of feupdateenv.
	(default_libc_feupdateenv_test): Likewise.
	(libc_feresetround_ctx): Likewise.
2015-01-07 19:01:20 +00:00
Adhemerval Zanella 882dfe184a mips: Fix __libc_pread prototype
This patch fixes the __libc_pread prototype change from
14bb4e57c0.
2015-01-07 16:26:26 -02:00
Chris Metcalf 39a12f8db4 posix/regcomp: initialize union structure tag to avoid warning
We see some surprising warnings on tilegx with gcc 4.8.2:

In file included from regex.c:66:0:
regcomp.c: In function ‘parse_expression’:
regcomp.c:2849:15: error: ‘end_elem’ may be used uninitialized in this
function [-Werror=maybe-uninitialized]
       else if (br_elem->type == COLL_SYM)
               ^
regcomp.c:3109:34: note: ‘end_elem’ was declared here
       bracket_elem_t start_elem, end_elem;
                                  ^
regcomp.c:3109:22: error: ‘start_elem’ may be used uninitialized in
this function [-Werror=maybe-uninitialized]
       bracket_elem_t start_elem, end_elem;
                      ^

These warnings are not seen on x86, and in fact if I compile the
preprocessed tile sources with the x86 gcc 4.8.2, I don't see the
warnings.  I do see eqiuvalent warnings if I compile the
x86-preprocessed source code with tilegx gcc 4.8.2.

The fix here is to initialize the union type field appropriately in
a couple of places where we pass a union pointer to a subroutine that
"knows" what type the union is.  Setting the type explicitly seems like
a more robust way to manage such a data structure in any case.
2015-01-07 12:32:40 -05:00
Richard Earnshaw dc400d7b73 AArch64: Optimized implementations of strcpy and stpcpy. 2015-01-07 11:31:10 +00:00
Richard Earnshaw ec582ca0f3 AArch64 optimized implementation of strrchr. 2015-01-07 11:26:13 +00:00
Siddhesh Poyarekar 60f046a82d Fix typo in ChangeLog 2015-01-07 16:15:24 +05:30
Eric Biggers d5b1c5ed8b setenv fix memory leak when setting large, duplicate string (BZ #17658)
glibc maintains a binary tree of environment strings it malloc()ed
itself.  However, it's possible for it to malloc() a string, then find
that an identical string is already in the tree.  In this case, the
memory is leaked and is not freed if the application later calls
__libc_freeres().  Fix this by freeing 'new_value' when it's unneeded.

Test case:
	#include <stdlib.h>
	#include <string.h>

	int main()
	{
		char *p = calloc(100000, 1);
		memset(p, 'A', 99999);
		setenv("TESTVAR", p, 1);
		setenv("TESTVAR", p, 1);
		free(p);
	}

Leak that was reported by valgrind:
	100,008 bytes in 1 blocks are definitely lost in loss record 1 of 1
	   at 0x4C29F90: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
	   by 0x4E6B3D4: __add_to_environ (setenv.c:176)
	   by 0x4C31B8F: setenv (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
	   by 0x400642: main (in /mnt/tmpfs/a.out)
2015-01-07 12:10:52 +05:30
Vladimir A. Nazarenko fb87ee96d7 Fix incorrect mount table entry parsing in __getmntent_r
When mount entry contains only four fields and have more then one space or
tab at the and, mp.mnt_freq and mp.mnt_passno will be set to some specific
values as side effect from parsing of previus mount entry. It is because
sscanf(""," %d %d ", &a, &b) returns -1, but this case is unprocessed.
Values of mp.mnt_freq and  mp.mnt_passno stays unchanged. This patch is
attempt to fix described issue by removing trailing tabs and spaces.
2015-01-06 19:51:01 -08:00
Joseph Myers 01238691bb Fix libm fesetround namespace (bug 17748).
Continuing the fixes for C90 libm functions calling C99 fe* functions,
this patch fixes the case of fesetround by making it a weak alias of
__fesetround and making the affected code call __fesetround.  An
existing __fesetround function in fenv_libc.h for powerpc is renamed
to __fesetround_inline.

Tested for x86_64 (testsuite, and that disassembly of installed shared
libraries is unchanged by the patch).  Also tested for ARM
(soft-float) that fesetround failures disappear from the linknamespace
test results (feupdateenv remains to be addressed to complete fixing
bug 17748).

	[BZ #17748]
	* include/fenv.h (__fesetround): Declare.  Use libm_hidden_proto.
	* math/fesetround.c (fesetround): Rename to __fesetround and
	define as weak alias of __fesetround.  Use libm_hidden_weak.
	* sysdeps/aarch64/fpu/fesetround.c (fesetround): Likewise.
	* sysdeps/alpha/fpu/fesetround.c (fesetround): Likewise.
	* sysdeps/arm/fesetround.c (fesetround): Likewise.
	* sysdeps/hppa/fpu/fesetround.c (fesetround): Likewise.
	* sysdeps/i386/fpu/fesetround.c (fesetround): Likewise.
	* sysdeps/ia64/fpu/fesetround.c (fesetround): Likewise.
	* sysdeps/m68k/fpu/fesetround.c (fesetround): Likewise.
	* sysdeps/mips/fpu/fesetround.c (fesetround): Likewise.
	* sysdeps/powerpc/fpu/fenv_libc.h (__fesetround): Rename to
	__fesetround_inline.
	* sysdeps/powerpc/fpu/fenv_private.h (libc_fesetround_ppc): Call
	__fesetround_inline instead of __fesetround.
	* sysdeps/powerpc/fpu/fesetround.c (fesetround): Rename to
	__fesetround and define as weak alias of __fesetround.  Use
	libm_hidden_weak.  Call __fesetround_inline instead of
	__fesetround.
	* sysdeps/powerpc/nofpu/fesetround.c (fesetround): Rename to
	__fesetround and define as weak alias of __fesetround.  Use
	libm_hidden_weak.
	* sysdeps/powerpc/powerpc32/e500/nofpu/fesetround.c (fesetround):
	Likewise.
	* sysdeps/s390/fpu/fesetround.c (fesetround): Likewise.
	* sysdeps/sh/sh4/fpu/fesetround.c (fesetround): Likewise.
	* sysdeps/sparc/fpu/fesetround.c (fesetround): Likewise.
	* sysdeps/tile/math_private.h (__fesetround): New inline function.
	* sysdeps/x86_64/fpu/fesetround.c (fesetround): Rename to
	__fesetround and define as weak alias of __fesetround.  Use
	libm_hidden_weak.
	* sysdeps/generic/math_private.h (default_libc_fesetround): Call
	__fesetround instead of fesetround.
	(default_libc_feholdexcept_setround): Likewise.
	(libc_feholdsetround_ctx): Likewise.
	(libc_feholdsetround_noex_ctx): Likewise.
2015-01-07 00:41:23 +00:00
Joseph Myers cd42798aef Fix libm fesetenv namespace (bug 17748).
Continuing the fixes for C90 libm functions calling C99 fe* functions,
this patch fixes the case of fesetenv by making it a weak alias of
__fesetenv and making the affected code (including various copies of
feupdateenv which also gets called from C90 functions) call
__fesetenv.

Tested for x86_64 (testsuite, and that disassembly of installed shared
libraries is unchanged by the patch).  Also tested for ARM
(soft-float) that fesetenv failures disappear from the linknamespace
test results (fsetround and feupdateenv remain to be addressed to
complete fixing bug 17748).

	[BZ #17748]
	* include/fenv.h (__fesetenv): Use libm_hidden_proto.
	* math/fesetenv.c (__fesetenv): Use libm_hidden_def.
	* sysdeps/aarch64/fpu/fesetenv.c (fesetenv): Rename to __fesetenv
	and define as weak alias of __fesetenv.  Use libm_hidden_weak.
	* sysdeps/alpha/fpu/fesetenv.c (__fesetenv): Use libm_hidden_def.
	* sysdeps/arm/fesetenv.c (fesetenv): Rename to __fesetenv and
	define as weak alias of __fesetenv.  Use libm_hidden_weak.
	* sysdeps/hppa/fpu/fesetenv.c (fesetenv): Likewise.
	* sysdeps/i386/fpu/fesetenv.c (__fesetenv): Use libm_hidden_def.
	* sysdeps/ia64/fpu/fesetenv.c (fesetenv): Rename to __fesetenv and
	define as weak alias of __fesetenv.  Use libm_hidden_weak.
	* sysdeps/m68k/fpu/fesetenv.c (__fesetenv): Use libm_hidden_def.
	* sysdeps/mips/fpu/fesetenv.c (fesetenv): Rename to __fesetenv and
	define as weak alias of __fesetenv.  Use libm_hidden_weak.
	* sysdeps/powerpc/fpu/fesetenv.c (__fesetenv): Use
	libm_hidden_def.
	* sysdeps/powerpc/nofpu/fesetenv.c (__fesetenv): Likewise.
	* sysdeps/powerpc/powerpc32/e500/nofpu/fesetenv.c (__fesetenv):
	Likewise.
	* sysdeps/s390/fpu/fesetenv.c (fesetenv): Rename to __fesetenv and
	define as weak alias of __fesetenv.  Use libm_hidden_weak.
	* sysdeps/sh/sh4/fpu/fesetenv.c (fesetenv): Likewise.
	* sysdeps/sparc/fpu/fesetenv.c (__fesetenv): Use libm_hidden_def.
	* sysdeps/tile/math_private.h (__fesetenv): New inline function.
	* sysdeps/x86_64/fpu/fesetenv.c (fesetenv): Rename to __fesetenv
	and define as weak alias of __fesetenv.  Use libm_hidden_weak.
	* sysdeps/generic/math_private.h (default_libc_fesetenv): Use
	__fesetenv instead of fesetenv.
	(libc_feresetround_noex_ctx): Likewise.
	* sysdeps/alpha/fpu/feupdateenv.c (__feupdateenv): Likewise.
	* sysdeps/hppa/fpu/feupdateenv.c (feupdateenv): Likewise.
	* sysdeps/i386/fpu/feupdateenv.c (__feupdateenv): Likewise.
	* sysdeps/ia64/fpu/feupdateenv.c (feupdateenv): Likewise.
	* sysdeps/m68k/fpu/feupdateenv.c (__feupdateenv): Likewise.
	* sysdeps/mips/fpu/feupdateenv.c (feupdateenv): Likewise.
	* sysdeps/powerpc/nofpu/feupdateenv.c (__feupdateenv): Likewise.
	* sysdeps/powerpc/powerpc32/e500/nofpu/feupdateenv.c
	(__feupdateenv): Likewise.
	* sysdeps/s390/fpu/feupdateenv.c (feupdateenv): Likewise.
	* sysdeps/sh/sh4/fpu/feupdateenv.c (feupdateenv): Likewise.
	* sysdeps/sparc/fpu/feupdateenv.c (__feupdateenv): Likewise.
	* sysdeps/x86_64/fpu/feupdateenv.c (__feupdateenv): Likewise.
2015-01-06 23:36:20 +00:00
Ondřej Bílka 500bfbd492 Revert "Suppress warning in string/tester.c for gcc 4.9"
This reverts commit 9300797ee9.
2015-01-06 18:43:28 +01:00
H.J. Lu 1cf98e27a7 Mention bug fix for BZ #17806 2015-01-06 09:32:41 -08:00
Aurelien Jarno 38949026b3 resolv: fix rotate option
The rotate option doesn't work correctly, and only send the query to the
same server (the second in the list). The rotation code in itself is not
broken, but the nsaddrs structure is reinitialized each time at the
beginning of __libc_res_nsend unless RES_STAYOPEN is enabled.

This is due to a call to __res_iclose from the end of __libc_res_nsend
when answers from the name server have been received. This function
closes all the sockets, but doesn't free the addresses (it can do that,
but in that case the second argument is false).

This patch change the code of __res_iclose to clear statp->_u._ext.nsinit
 only when the addresses are actually freed.

	* resolv/res_init.c (__res_iclose): Only clear nsinit if the
	addresses have been freed.
2015-01-06 09:00:20 -08:00
Aurelien Jarno 5fe55e9c65 resolv: improve comments about nserv and nservall
The current comments concerning nserv and nservall are not really clear
and lead to confusion when reviewing an already complex code. Improve
them, there real meaning have been confirmed by a code analysis.

	* resolv/res_init.c (__res_vinit): Improve comments about nserv
	and nservall.
2015-01-06 09:00:20 -08:00
Ondřej Bílka 9300797ee9 Suppress warning in string/tester.c for gcc 4.9 2015-01-06 17:43:09 +01:00
Ondřej Bílka dc8ab01832 Add changelog 2015-01-06 17:35:24 +01:00
Ondřej Bílka 4790d9a2c0 Clean up check_pf allocation pattern. addresses
We simplify allocation strategy there so instead of using temporary linked list
and then copying entries to output array we keep them in resizable
array.
2015-01-06 17:26:44 +01:00
Adhemerval Zanella 14bb4e57c0 Function declaration cleanup
This patch changes the some function declaration from K&R style to
default ANSI C.

	* nptl/pthread_cancel.c (pthread_cancel): Use ANSI prototype.
	* nptl/pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
	* nptl/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
	* nptl/pthread_exit.c (__pthread_exit): Likewise.
	* nptl/pthread_join.c (pthread_join): Likewise.
	* nptl/pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
	* sysdeps/posix/waitid.c (__waitid): Likewise.
	* sysdeps/unix/sysv/linux/arm/pread.c (__libc_pread): Likewise.
	* sysdeps/unix/sysv/linux/arm/pread64.c (__libc_pread64): Likewise.
	* sysdeps/unix/sysv/linux/arm/pwrite.c (__libc_pwrite): Likewise.
	* sysdeps/unix/sysv/linux/arm/pwrite64.c (__libc_pwrite64): Likewise.
	* sysdeps/unix/sysv/linux/generic/wordsize-32/pread.c (__libc_pread):
	Likewise.
	* sysdeps/unix/sysv/linux/generic/wordsize-32/pread64.c
	(__libc_pread64): Likewise.
	* sysdeps/unix/sysv/linux/generic/wordsize-32/pwrite.c
	(__libc_pwrite): Likewise.
	* sysdeps/unix/sysv/linux/generic/wordsize-32/pwrite64.c
	(__libc_pwrite64): Likewsie.
	* sysdeps/unix/sysv/linux/mips/pread.c (__libc_pread): Likewise.
	* sysdeps/unix/sysv/linux/mips/pread64.c (__libc_pread64): Likewise.
	* sysdeps/unix/sysv/linux/mips/pwrite.c (__libc_pwrite): Likewise.
	* sysdeps/unix/sysv/linux/mips/pwrite64.c (__libc_pwrite64): Likewise.
	* sysdeps/unix/sysv/linux/msgrcv.c (__libc_msgrcv): Likewise.
	* sysdeps/unix/sysv/linux/msgsnd.c (__libc_msgsnd): Likewise.
	* sysdeps/unix/sysv/linux/openat.c (OPENAT_NOT_CANCEL): Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/pread.c (__libc_pread):
	Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/pread64.c
	(__libc_pread64): Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite.c (__libc_pwrite):
	Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite64.c
	(__libc_pwrite64): Likewise.
	* sysdeps/unix/sysv/linux/pread.c (__libc_pread): Likewise.
	* sysdeps/unix/sysv/linux/pread64.c (__libc_pread64): Likewise.
	* sysdeps/unix/sysv/linux/preadv.c (PREADV): Likewise.
	* sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Likewise.
	* sysdeps/unix/sysv/linux/pwrite.c (__libc_pwrite): Likewise.
	* sysdeps/unix/sysv/linux/pwrite64.c (__libc_pwrite64): Likewise.
	* sysdeps/unix/sysv/linux/pwritev.c (__libc_pwritev): Likewise.
	* sysdeps/unix/sysv/linux/sh/pread.c (__libc_pread): Likewise.
	* sysdeps/unix/sysv/linux/sh/pread64.c (__libc_pread64): Likewise.
	* sysdeps/unix/sysv/linux/sh/pwrite.c (__libc_pwrite): Likewise.
	* sysdeps/unix/sysv/linux/sh/pwrite64.c (__libc_write64): Likewise.
	* sysdeps/unix/sysv/linux/sigsuspend.c (__sigsuspend): Likewise.
	* sysdeps/unix/sysv/linux/sigtimedwait.c (__sigtimedwait): Likewise.
	* sysdeps/unix/sysv/linux/sigwait.c (__sigwait): Likewise.
	* sysdeps/unix/sysv/linux/sigwaitinfo.c (__sigwaitinfo): Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc64/msgrcv.c (__libc_msgrcv):
	Likewise.
2015-01-06 08:23:58 -08:00
Andrew Senkevich 10a5e112b6 Remove duplicated -frounding-math
No need to add -frounding-math.  math-flags in Makeconfig includes
-frounding-math.

	* math/Makefile (CFLAGS-test-float.c): Remove -frounding-math.
	(CFLAGS-test-double.c): Likewise.
	(CFLAGS-test-ldouble.c): Likewise.
	(CPPFLAGS-test-ifloat.c): Likewise.
	(CPPFLAGS-test-idouble.c): Likewise.
	(CPPFLAGS-test-ildoubl.c): Likewise.
	(CFLAGS-test-test-fenv.c): Remove variable.
	(CFLAGS-test-misc.c): Likewise.
2015-01-06 06:32:03 -08:00
H.J. Lu 57ada0e7e7 Define CLOCKS_PER_SEC type to the type clock_t
C99 specifies that CLOCKS_PER_SEC is an expression with the type clock_t.
This patch adds a generic <bits/time2.h> to define CLOCKS_PER_SEC and
provides the Linux/x86-64 version of <bits/time2.h> to support x32.

	[BZ #17797]
	* bits/time.h (CLOCKS_PER_SEC): Changed to ((clock_t) 1000000).
	* sysdeps/unix/sysv/linux/bits/time.h (CLOCKS_PER_SEC): Likewise.
	* sysdeps/unix/sysv/linux/clock.c (clock): _Static_assert
	CLOCKS_PER_SEC == 1000000.
	* time/clocktest.c (main): Replace %ld with %jd and cast to
	intmax_t.
2015-01-06 04:59:13 -08:00