platform/upstream/linaro-glibc.git
11 years agoFix stub setrlimit implementation.
Roland McGrath [Mon, 6 May 2013 21:58:00 +0000 (14:58 -0700)]
Fix stub setrlimit implementation.

11 years agoClean up POSIX.1 implementation of truncate.
Roland McGrath [Mon, 6 May 2013 21:56:13 +0000 (14:56 -0700)]
Clean up POSIX.1 implementation of truncate.

11 years agoInitialize x in frexp, modf, remqou tests.
Joseph Myers [Mon, 6 May 2013 20:23:40 +0000 (20:23 +0000)]
Initialize x in frexp, modf, remqou tests.

11 years agoConsistently use TEST_f_f1 in gamma tests.
Joseph Myers [Mon, 6 May 2013 20:23:01 +0000 (20:23 +0000)]
Consistently use TEST_f_f1 in gamma tests.

11 years agoARM: Add missing sfi_breg prefix in _dl_tlsdesc_dynamic code.
Roland McGrath [Mon, 6 May 2013 19:52:05 +0000 (12:52 -0700)]
ARM: Add missing sfi_breg prefix in _dl_tlsdesc_dynamic code.

11 years agoPowerPC: fix hypot/hypof FP exceptions
Adhemerval Zanella [Mon, 6 May 2013 19:40:17 +0000 (14:40 -0500)]
PowerPC: fix hypot/hypof FP exceptions

This patch fixes hypot/hypotf spurious floating-point exceptions
generate by internal operations.

11 years agoSplit _dl_writev out from _dl_debug_vdprintf.
Roland McGrath [Mon, 6 May 2013 18:30:41 +0000 (11:30 -0700)]
Split _dl_writev out from _dl_debug_vdprintf.

11 years agoRemove unused libm-test expected-failure mechanism.
Joseph Myers [Sat, 4 May 2013 16:45:15 +0000 (16:45 +0000)]
Remove unused libm-test expected-failure mechanism.

11 years agoUse static initializers for constant variables in libm-test.inc.
Joseph Myers [Sat, 4 May 2013 13:08:34 +0000 (13:08 +0000)]
Use static initializers for constant variables in libm-test.inc.

11 years agoConsolidate definitions of _FORTIFY_SOURCE wrappers for open{,64}{,at}.
Roland McGrath [Fri, 3 May 2013 23:33:26 +0000 (16:33 -0700)]
Consolidate definitions of _FORTIFY_SOURCE wrappers for open{,64}{,at}.

11 years agoFix NEED_DL_SYSINFO{,_DSO} conditionalization in _dl_sysdep_start.
Roland McGrath [Fri, 3 May 2013 22:09:48 +0000 (15:09 -0700)]
Fix NEED_DL_SYSINFO{,_DSO} conditionalization in _dl_sysdep_start.

11 years agoPowerPC: Add time vDSO support
Adhemerval Zanella [Fri, 3 May 2013 20:00:31 +0000 (15:00 -0500)]
PowerPC: Add time vDSO support

PowerPC kernel now provides a vDSO implementation for time syscall
(commit fcb41a2030abe0eb716ef0798035ef9562097f42). This patch changes
time syscall wrapper to use the vDSO when available. It also changes
the default non vDSO time on PowerPC to use sysdeps/posix/time.c
(since gettimeofday is a vDSO call).

11 years agoConsistently use TEST_f_f1 in lgamma tests.
Joseph Myers [Fri, 3 May 2013 19:05:37 +0000 (19:05 +0000)]
Consistently use TEST_f_f1 in lgamma tests.

11 years agoDon't use IGNORE_ZERO_INF_SIGN in hypot tests.
Joseph Myers [Fri, 3 May 2013 19:04:52 +0000 (19:04 +0000)]
Don't use IGNORE_ZERO_INF_SIGN in hypot tests.

11 years agoSync with Linux 3.9
Andreas Jaeger [Fri, 3 May 2013 18:51:27 +0000 (20:51 +0200)]
Sync with Linux 3.9

* sysdeps/gnu/netinet/tcp.h (TCP_TIMESTAMP): New value, from
Linux 3.9.
* sysdeps/unix/sysv/linux/bits/socket.h (PF_VSOCK, AF_VSOCK):
Add.
(PF_MAX): Adjust for VSOCK change.

11 years agoUpdate powerpc libm-test ULPs
Adhemerval Zanella [Fri, 3 May 2013 12:33:49 +0000 (07:33 -0500)]
Update powerpc libm-test ULPs

11 years agoAdd yesstr and nostr to en_CA, es_AR, and es_ES
Carlos O'Donell [Fri, 3 May 2013 03:24:21 +0000 (23:24 -0400)]
Add yesstr and nostr to en_CA, es_AR, and es_ES

We add yesstr and nostr to three more locales.
We ignore the issue of capitalization of the first
character in yesstr and nostr. All locales will need
to be revisited to make this uniform policy change.

---

2013-05-02  Carlos O'Donell  <carlos@redhat.com>

[BZ #15264]
* localedata/locales/en_CA (LC_MESSAGES): Define yesstr and nostr.
* localedata/locales/es_AR (LC_MESSAGES): Copy es_ES.
* localedata/locales/es_ES (LC_MESSAGES): Define yesstr and nostr.

11 years agoAdd bug 14952 to ChangeLog and NEWS
Allan McRae [Fri, 3 May 2013 01:14:43 +0000 (11:14 +1000)]
Add bug 14952 to ChangeLog and NEWS

Fixed with commit 0695940b.

11 years agoUpdate Sparc ULPs.
David S. Miller [Thu, 2 May 2013 19:25:28 +0000 (12:25 -0700)]
Update Sparc ULPs.

* sysdeps/sparc/fpu/libm-test-ulps: Update.

11 years agoRemove duplicate __strcmp_cg
Ondrej Bilka [Wed, 1 May 2013 18:55:06 +0000 (20:55 +0200)]
Remove duplicate __strcmp_cg

The __strcmp_cg code was duplicate of of __strcmp_gc. This patch unifies
these two cases into one.

11 years agoAdd missing #include in sysdeps/posix/opendir.c.
Roland McGrath [Wed, 1 May 2013 16:27:09 +0000 (09:27 -0700)]
Add missing #include in sysdeps/posix/opendir.c.

11 years agoUse __gnu_inline__ for __extern_always_inline in g++-4.2
Richard Smith [Wed, 1 May 2013 10:32:38 +0000 (20:32 +1000)]
Use __gnu_inline__ for __extern_always_inline in g++-4.2

Use the __gnu_inline__ attribute in _FORTIFY_SOURCE's __extern_always_inline
macro whenever the compiler supports it. Previously this macro only included
the __gnu_inline__ attribute in C++ mode for gcc >= 4.3. However,
__gnu_inline__ semantics are always desired for the __extern_always_inline
functions, and are available in g++ 4.2 (and some releases of g++ 4.1, and
also in Clang, which claims to be g++ 4.2).

This change stops g++-4.2 from emitting weak definitions for the fortify
wrapper functions if they can't be inlined, and also improves Clang
compatibility.

11 years agoFix catan, catanh spurious underflows (bug 15423).
Joseph Myers [Wed, 1 May 2013 10:07:00 +0000 (10:07 +0000)]
Fix catan, catanh spurious underflows (bug 15423).

11 years agoUpdate powerpc libm-test ULPs
Adhemerval Zanella [Tue, 30 Apr 2013 13:51:02 +0000 (08:51 -0500)]
Update powerpc libm-test ULPs

11 years agoAdd bug 15416 to NEWS.
Joseph Myers [Tue, 30 Apr 2013 11:29:32 +0000 (11:29 +0000)]
Add bug 15416 to NEWS.

11 years agoFix catan, catanh inaccuracy from atan2 denominators near 0 (bug 15416).
Joseph Myers [Tue, 30 Apr 2013 11:27:35 +0000 (11:27 +0000)]
Fix catan, catanh inaccuracy from atan2 denominators near 0 (bug 15416).

11 years agoFormat s_sin.c
Siddhesh Poyarekar [Tue, 30 Apr 2013 08:48:57 +0000 (14:18 +0530)]
Format s_sin.c

11 years agoAllow multiple input domains to be run in the same benchmark program
Siddhesh Poyarekar [Tue, 30 Apr 2013 08:47:57 +0000 (14:17 +0530)]
Allow multiple input domains to be run in the same benchmark program

Some math functions have distinct performance characteristics in
specific domains of inputs, where some inputs return via a fast path
while other inputs require multiple precision calculations, that too
at different precision levels.  The way to implement different domains
was to have a separate source file and benchmark definition, resulting
in separate programs.

This clutters up the benchmark, so this change allows these domains to
be consolidated into the same input file.  To do this, the input file
format is now enhanced to allow comments with a preceding # and
directives with two # at the begining of a line.  A directive that
looks like:

tells the benchmark generation script that what follows is a different
domain of inputs.  The value of the 'name' directive (in this case,
foo) is used in the output.  The two input domains are then executed
sequentially and their results collated separately.  with the above
directive, there would be two lines in the result that look like:

func(): ....
func(foo): ...

11 years agoMaintain runtime of each benchmark at ~10 seconds
Siddhesh Poyarekar [Tue, 30 Apr 2013 08:40:20 +0000 (14:10 +0530)]
Maintain runtime of each benchmark at ~10 seconds

The idea to run benchmarks for a constant number of iterations is
problematic.  While the benchmarks may run for 10 seconds on x86_64,
they could run for about 30 seconds on powerpc and worse, over 3
minutes on arm.  Besides that, adding a new benchmark is cumbersome
since one needs to find out the number of iterations needed for a
sufficient runtime.

A better idea would be to run each benchmark for a specific amount of
time.  This patch does just that.  The run time defaults to 10 seconds
and it is configurable at command line:

  make BENCH_DURATION=5 bench

11 years agoMake stub fchdir.c define __fchdir.
Roland McGrath [Mon, 29 Apr 2013 21:30:37 +0000 (14:30 -0700)]
Make stub fchdir.c define __fchdir.

11 years agoIntegrate errno testing better in libm-test.inc.
Joseph Myers [Mon, 29 Apr 2013 20:36:48 +0000 (20:36 +0000)]
Integrate errno testing better in libm-test.inc.

11 years agoBZ#15084: Apparent typos in strings in res_debug.c
Andreas Jaeger [Mon, 29 Apr 2013 19:15:44 +0000 (21:15 +0200)]
BZ#15084: Apparent typos in strings in res_debug.c

[BZ #15084]
* resolv/res_debug.c (p_option): Fix strings for RES_USEBSTRING
and RES_USEVC.

11 years agoBZ#15085: Fix comments/strings for RES_NOCHECKNAME
Andreas Jaeger [Mon, 29 Apr 2013 19:11:13 +0000 (21:11 +0200)]
BZ#15085: Fix comments/strings for RES_NOCHECKNAME

[BZ #15085]
* resolv/resolv.h (RES_NOCHECKNAME): Mark as unimplemented.
* resolv/res_debug.c (p_option): Mark RES_NOCHECKNAME as
unimplemented.

11 years agoBZ#15380: Fix initstate error return
Andreas Jaeger [Mon, 29 Apr 2013 19:02:16 +0000 (21:02 +0200)]
BZ#15380: Fix initstate error return

[BZ #15380]
* stdlib/random.c (__initstate): Return NULL if
__initstate fails.

11 years agoBZ#15086: Fix res_debug printing of options
Andreas Jaeger [Mon, 29 Apr 2013 19:00:57 +0000 (21:00 +0200)]
BZ#15086: Fix res_debug printing of options

[BZ# 15086]
* resolv/res_debug.c (p_option): Handle RES_NOALIASES,
RES_KEEPTSIG, RES_BLAST, RES_NOIP6DOTINT, RES_SNGLKUP,
RES_SNGLKUPREOP.

11 years agoUpdate powerpc libm-test ULPs
Adhemerval Zanella [Mon, 29 Apr 2013 17:10:03 +0000 (12:10 -0500)]
Update powerpc libm-test ULPs

11 years agoAdd missing semicolons to libm-test.inc tests.
Joseph Myers [Mon, 29 Apr 2013 13:48:19 +0000 (13:48 +0000)]
Add missing semicolons to libm-test.inc tests.

11 years agoFix catan, catanh spurious overflows (bug 15409).
Joseph Myers [Sat, 27 Apr 2013 14:56:34 +0000 (14:56 +0000)]
Fix catan, catanh spurious overflows (bug 15409).

11 years agoFix ia_FR postal format
Nik Kalach [Sat, 27 Apr 2013 14:54:14 +0000 (16:54 +0200)]
Fix ia_FR postal format

2013-04-27  Nik Kalach  <nikka@fedoraproject.org>

[BZ #15221]
* locales/ia_FR: Fix postal_fmt definition.

11 years agoFix guards for qecvt
Andreas Jaeger [Sat, 27 Apr 2013 14:17:55 +0000 (16:17 +0200)]
Fix guards for qecvt

[BZ #15007]
* stdlib/stdlib.h: Update guards for qecvt.
* stdlib/bits/stdlib-ldbl.h: Sync guards for qecvt etc with
<stdlib.h>.

11 years agoUpdate i386 libm-test ULPs
Allan McRae [Sat, 27 Apr 2013 05:13:12 +0000 (15:13 +1000)]
Update i386 libm-test ULPs

11 years agoFix catan, catanh missing underflows (bug 15406).
Joseph Myers [Fri, 26 Apr 2013 19:26:22 +0000 (19:26 +0000)]
Fix catan, catanh missing underflows (bug 15406).

11 years agoFix csin, csinh, ccos, ccosh missing underflows (bug 15405).
Joseph Myers [Fri, 26 Apr 2013 19:25:19 +0000 (19:25 +0000)]
Fix csin, csinh, ccos, ccosh missing underflows (bug 15405).

11 years agoPowerPC: modf optimization fix
Adhemerval Zanella [Fri, 26 Apr 2013 18:00:56 +0000 (13:00 -0500)]
PowerPC: modf optimization fix

This patch fix the 3c0265394d9ffedff2b0de508602dc52e077ce5c commits
by correctly setting minimum architecture for modf PPC optimization
to power5+ instead of power5 (since only on power5+ round/ceil will
be inline to inline assembly).

11 years agoUpdate x86_64 ULPs
Markus Trippelsdorf [Fri, 26 Apr 2013 07:30:46 +0000 (09:30 +0200)]
Update x86_64 ULPs

2013-04-26  Markus Trippelsdorf  <markus@trippelsdorf.de>

* sysdeps/x86_64/fpu/libm-test-ulps: Update.

11 years agoAdd missing bug numbers to NEWS.
Joseph Myers [Thu, 25 Apr 2013 19:34:30 +0000 (19:34 +0000)]
Add missing bug numbers to NEWS.

11 years agoMove x86_64-specific audit tests to sysdeps/x86_64/.
Joseph Myers [Thu, 25 Apr 2013 19:23:11 +0000 (19:23 +0000)]
Move x86_64-specific audit tests to sysdeps/x86_64/.

11 years agoGet rid of __STDC_FORMAT_MACROS, __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS
Paul Pluzhnikov [Thu, 25 Apr 2013 18:08:31 +0000 (11:08 -0700)]
Get rid of __STDC_FORMAT_MACROS, __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS

11 years agoDeclare __ehdr_start with hidden visibility.
Maciej W. Rozycki [Thu, 25 Apr 2013 15:09:19 +0000 (16:09 +0100)]
Declare __ehdr_start with hidden visibility.

This avoids a linker bug triggering for MIPS SVR4 binaries:

http://sourceware.org/bugzilla/show_bug.cgi?id=15365

and regardless serves as a documentation of intent.

11 years agosoft-fp: s/sNAN/NAN/ -- no sNaNs are ever produced.
Maciej W. Rozycki [Thu, 25 Apr 2013 15:01:21 +0000 (16:01 +0100)]
soft-fp: s/sNAN/NAN/ -- no sNaNs are ever produced.

11 years agomath: Use accurate answers for cos and sincos.
Carlos O'Donell [Wed, 24 Apr 2013 20:29:33 +0000 (16:29 -0400)]
math: Use accurate answers for cos and sincos.

Use the most accurate hex literals possible for the answers to the
cos and sincos tests that vary according to the error in the rounding
of PI/2.

---

2013-04-24  Carlos O'Donell  <carlos@redhat.com>

* math/libm-test.inc (cos_test): Use accurate hex constants.
(sincost_test): Likewise.

11 years agoAdd catan, catanh tests at +/- 1 and +/- i.
Joseph Myers [Wed, 24 Apr 2013 20:14:15 +0000 (20:14 +0000)]
Add catan, catanh tests at +/- 1 and +/- i.

11 years agoUse suffixed floating-point constants in float and long double catan/catanh.
Joseph Myers [Wed, 24 Apr 2013 18:59:37 +0000 (18:59 +0000)]
Use suffixed floating-point constants in float and long double catan/catanh.

11 years agoFix catan, catanh inaccuracy through use of log (bug 15394).
Joseph Myers [Wed, 24 Apr 2013 18:49:13 +0000 (18:49 +0000)]
Fix catan, catanh inaccuracy through use of log (bug 15394).

11 years agoMention files in which fast/slow paths of math functions are implemented
Siddhesh Poyarekar [Wed, 24 Apr 2013 08:36:02 +0000 (14:06 +0530)]
Mention files in which fast/slow paths of math functions are implemented

11 years agoFix name space use in last commit.
Roland McGrath [Tue, 23 Apr 2013 22:57:25 +0000 (15:57 -0700)]
Fix name space use in last commit.

11 years agoAdd generic POSIX implementation of C11 timespec_get.
Roland McGrath [Tue, 23 Apr 2013 22:28:59 +0000 (15:28 -0700)]
Add generic POSIX implementation of C11 timespec_get.

11 years agoPowerPC: modf optimization
Adhemerval Zanella [Mon, 25 Mar 2013 21:10:06 +0000 (16:10 -0500)]
PowerPC: modf optimization

This patch implements modf/modff optimization for POWER by focus
on FP operations instead of relying in integer ones.

11 years agoConsistently use ISSPACE to check for whitespace
Siddhesh Poyarekar [Tue, 23 Apr 2013 10:02:42 +0000 (15:32 +0530)]
Consistently use ISSPACE to check for whitespace

Resolves #14888.

This only really manifests itself when there are no spaces between
format specifiers, which is not allowed by POSIX, but is allowed by
the glibc implementation.

11 years agoRemove non-standard initialisation of flexible array member
Andreas Schwab [Sat, 20 Apr 2013 10:12:35 +0000 (12:12 +0200)]
Remove non-standard initialisation of flexible array member

This avoids GCC bug 28865.

11 years agoS/390: Change struct statfs[64] member types to unsigned values
Heiko Carstens [Tue, 23 Apr 2013 06:53:44 +0000 (08:53 +0200)]
S/390: Change struct statfs[64] member types to unsigned values

Kay Sievers reported that coreutils' stat tool has a problem with
s390's statfs[64] definition:

> The definition of struct statfs::f_type needs a fix. s390 is the only
> architecture in the kernel that uses an int and expects magic
> constants lager than INT_MAX to fit into.
>
> A fix is needed to make Fedora boot on s390, it currently fails to do
> so. Userspace does not want to add code to paper-over this issue.

[...]

> Even coreutils cannot handle it:
>   #define RAMFS_MAGIC  0x858458f6
>   # stat -f -c%t /
>   ffffffff858458f6
>
>   #define BTRFS_SUPER_MAGIC 0x9123683E
>   # stat -f -c%t /mnt
>   ffffffff9123683e

The bug is caused by an implicit sign extension within the stat tool:

out_uint_x (pformat, prefix_len, statfsbuf->f_type);

where the format finally will be "%lx".
A similar problem can be found in the 'tail' tool.
s390 is the only architecture which has an int type f_type member in
struct statfs[64]. Other architectures have either unsigned ints or
long values, so that the problem doesn't occur there.

Therefore change the type of the f_type member to unsigned int, so
that we get zero extension instead sign extension when assignment to
a long value happens.

Reported-by: Kay Sievers <kay@vrfy.org>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
11 years agoFix getent to call endspent rather than endpwent for shadow database.
Jan-Benedict Glaw [Mon, 22 Apr 2013 17:44:31 +0000 (10:44 -0700)]
Fix getent to call endspent rather than endpwent for shadow database.

11 years agoConsolidate pthread_attr value validation
Siddhesh Poyarekar [Mon, 22 Apr 2013 04:58:31 +0000 (10:28 +0530)]
Consolidate pthread_attr value validation

Define inline functions that wrap around validation for each of the
pthread attributes to reduce duplication in code.

11 years agoMinor cleanup in getaddrinfo
Siddhesh Poyarekar [Mon, 22 Apr 2013 04:54:00 +0000 (10:24 +0530)]
Minor cleanup in getaddrinfo

Replace repeated computations of alloca size with a local variable
that stores the computed value.

11 years agoRussian translations update.
David S. Miller [Sun, 21 Apr 2013 19:36:14 +0000 (15:36 -0400)]
Russian translations update.

* po/ru.po: Update Russion translation from translation project.

11 years agoARM: Macroize assembly use of EABI unwind directives.
Roland McGrath [Fri, 19 Apr 2013 18:33:01 +0000 (11:33 -0700)]
ARM: Macroize assembly use of EABI unwind directives.

11 years agoRemove __wur from setfsuid and setfsgid.
Adam Conrad [Fri, 19 Apr 2013 05:58:16 +0000 (23:58 -0600)]
Remove __wur from setfsuid and setfsgid.

11 years agoMicroBlaze Port
David Holsgrove [Tue, 10 Jan 2012 05:38:42 +0000 (15:38 +1000)]
MicroBlaze Port

Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
11 years agoUpdate ChangeLog.
Carlos O'Donell [Thu, 18 Apr 2013 00:17:59 +0000 (17:17 -0700)]
Update ChangeLog.

Update ChangeLog for 0f122b8d12875181a4fba3449e3549d34d3dc398.

11 years agoConfiguring for i386 is no longer supported.
Carlos O'Donell [Thu, 18 Apr 2013 00:13:20 +0000 (17:13 -0700)]
Configuring for i386 is no longer supported.

We no longer support configuring for i386, nor do we
elide such a configuration to i686. Configuring with
i386-* is a failure, and we provide an example of
how to fix that.

---

2013-04-17  Carlos O'Donell  <carlos@redhat.com>

* configure.in: Remove i386 configure warning. Remove i386 case.
* configure: Regenerate.
* sysdeps/i386/configure.in: Raise error if config_machine is i386.
Add example to error message.
* sysdeps/i386/configure: Regenerate.

11 years agoAdd benchmark inputs for cos and tan
Siddhesh Poyarekar [Wed, 17 Apr 2013 12:15:55 +0000 (17:45 +0530)]
Add benchmark inputs for cos and tan

11 years agoDon't test O_RDONLY case in tst-aio7.
Roland McGrath [Tue, 16 Apr 2013 19:11:26 +0000 (12:11 -0700)]
Don't test O_RDONLY case in tst-aio7.

11 years agoDefine NOT_IN_libc when compiling benchmark programs
Siddhesh Poyarekar [Tue, 16 Apr 2013 13:04:03 +0000 (18:34 +0530)]
Define NOT_IN_libc when compiling benchmark programs

11 years agoAdd target bench-clean
Siddhesh Poyarekar [Tue, 16 Apr 2013 08:37:21 +0000 (14:07 +0530)]
Add target bench-clean

11 years agoAdding MicroBlaze support to elf/elf.h
David Holsgrove [Wed, 4 Jan 2012 03:56:48 +0000 (13:56 +1000)]
Adding MicroBlaze support to elf/elf.h

Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com>
11 years agoFix coding-style violation.
Thomas Schwinge [Mon, 15 Apr 2013 20:11:30 +0000 (22:11 +0200)]
Fix coding-style violation.

Introduced in commit ee091edf1a16312fff0cc3c6ae0116aded7f1dbf.

11 years agoProperly check for short writes when sending the response in nscd
Andreas Schwab [Tue, 4 Dec 2012 15:14:13 +0000 (16:14 +0100)]
Properly check for short writes when sending the response in nscd

11 years agoWrite to bench.out-tmp only once
Siddhesh Poyarekar [Mon, 15 Apr 2013 08:22:26 +0000 (13:52 +0530)]
Write to bench.out-tmp only once

Appending benchmark program output on every run could result in a case
where the benchmark run was cancelled, resulting in a partially
written file.  This file gets used again on the next run, resulting in
results being appended to old results.

It could have been possible to remove the file before every benchmark
run, but it is easier to just write the output to bench.out-tmp only
once.

11 years agonscd: don't fork twice
Andreas Schwab [Sun, 23 Dec 2012 08:45:07 +0000 (09:45 +0100)]
nscd: don't fork twice

11 years agoFix off-by-one bug in tst-fwrite-error
Siddhesh Poyarekar [Mon, 15 Apr 2013 06:05:43 +0000 (11:35 +0530)]
Fix off-by-one bug in tst-fwrite-error

tst-fwrite-error did not allocate enough space for the string 'world'
and its NULL terminator.  Fixed.

11 years agoRebuild benchmark sources when Makefile is updated
Siddhesh Poyarekar [Mon, 15 Apr 2013 05:47:01 +0000 (11:17 +0530)]
Rebuild benchmark sources when Makefile is updated

Benchmark programs are generated using parameters from the Makefile,
so it is necessary to rebuild them whenever the parameters in the
Makefile are updated.  Hence, added a dependency for the generated C
source on the Makefile so that it gets regenerated when the Makefile
is updated.

11 years agoBZ#15361: Make aio_fsync not check open modes.
Roland McGrath [Fri, 12 Apr 2013 20:11:20 +0000 (13:11 -0700)]
BZ#15361: Make aio_fsync not check open modes.

11 years agoMove bench target to benchtests
Siddhesh Poyarekar [Fri, 12 Apr 2013 09:31:44 +0000 (15:01 +0530)]
Move bench target to benchtests

The bench target will only be used within the benchtests directory.

11 years agom68k: update libm test ULPs
Andreas Schwab [Thu, 11 Apr 2013 14:32:31 +0000 (16:32 +0200)]
m68k: update libm test ULPs

11 years agolibm-test.inc: Fix tests where cos(PI/2) != 0.
Carlos O'Donell [Thu, 11 Apr 2013 12:52:18 +0000 (08:52 -0400)]
libm-test.inc: Fix tests where cos(PI/2) != 0.

The value of PI is never exactly PI in any floating point representation,
and the value of PI/2 is never PI/2. It is wrong to expect cos(M_PI_2l)
to return 0, instead it will return an answer that is  non-zero because
M_PI_2l doesn't round to exactly PI/2 in the type used.

That is to say that the correct answer is to do the following:
* Take PI or PI/2.
* Round to the floating point representation.
* Take the rounded value and compute an infinite precision cos or sin.
* Use the rounded result of the infinite precision cos or sin as the
  answer to the test.

I used printf to do the type rounding, and Wolfram's Alpha to do the
infinite precision cos calculations.

The following changes bring x86-64 and x86 to 1/2 ulp for two tests.
It shows that the x86 cos implementation is quite good, and that
our test are flawed.

Unfortunately given that the rounding errors are type dependent we
need to fix this for each type. No regressions on x86-64 or x86.

---

2013-04-11  Carlos O'Donell  <carlos@redhat.com>

* math/libm-test.inc (cos_test): Fix PI/2 test.
(sincos_test): Likewise.
* sysdeps/x86_64/fpu/libm-test-ulps: Regenerate.
* sysdeps/i386/fpu/libm-test-ulps: Regenerate.

11 years agoExtend i486 pthread_cond_timedwait to use futex syscall with absolute timeout
Andreas Schwab [Thu, 22 Nov 2012 11:57:37 +0000 (12:57 +0100)]
Extend i486 pthread_cond_timedwait to use futex syscall with absolute timeout

11 years agoDon't accept exp char without preceding digits in scanf float parsing
Andreas Schwab [Mon, 14 Jan 2013 16:32:20 +0000 (17:32 +0100)]
Don't accept exp char without preceding digits in scanf float parsing

11 years agoFix invalid free of memory allocated during rtld init
Andreas Schwab [Tue, 15 Jan 2013 15:39:07 +0000 (16:39 +0100)]
Fix invalid free of memory allocated during rtld init

11 years agoDon't use run-via-rtld-prefix for anything other than tests
Siddhesh Poyarekar [Thu, 11 Apr 2013 04:07:50 +0000 (09:37 +0530)]
Don't use run-via-rtld-prefix for anything other than tests

run-via-rtld-prefix checks whether the program to be run is a static
test and skips if it is.  This is fine, except that it assumes that
the program to be run is the second $^, which is true only for tests.

This change creates an rtld-prefix, which is simply the dynamic linker
prefix with the necessary arguments and uses that in the non-test
targets.

11 years agoRemove eval
Siddhesh Poyarekar [Thu, 11 Apr 2013 03:45:52 +0000 (09:15 +0530)]
Remove eval

It's not needed.

11 years agoAccept leading and trailing spaces in getdate input string
Siddhesh Poyarekar [Wed, 10 Apr 2013 06:01:46 +0000 (11:31 +0530)]
Accept leading and trailing spaces in getdate input string

Fixes #15346.

The POSIX description of getdate allows for extra spaces in the
getdate input string.  __getdate_r uses strptime internally, which
works fine with extra spaces between format strings (and hence within
an input string) but not with leading and trailing spaces.  So we trim
off the leading and trailing spaces before we pass it on to strptime.

11 years agoBZ#14280: Fix Hurd ioctl macro to avoid warning.
Roland McGrath [Mon, 8 Apr 2013 21:31:38 +0000 (14:31 -0700)]
BZ#14280: Fix Hurd ioctl macro to avoid warning.

11 years agosem_post.c: Include atomic.h.
Carlos O'Donell [Sun, 7 Apr 2013 20:13:02 +0000 (16:13 -0400)]
sem_post.c: Include atomic.h.

The sem_post.c file uses atomic functions without including
atomic.h. Add `#include <atomic.h>' to the file to prevent
any compile time warnings when other headers change and
atomic.h isn't implicitly included.

---
nptl/

2013-04-07  Carlos O'Donell  <carlos@redhat.com>

* sysdeps/unix/sysv/linux/sem_post.c: Include atomic.h.

11 years agoREADME.libm-test: Use testrun.sh to run libm test.
Carlos O'Donell [Sat, 6 Apr 2013 21:13:19 +0000 (17:13 -0400)]
README.libm-test: Use testrun.sh to run libm test.

Document the use of the convenience testrun.sh script for
running the libm test.

---

2013-04-06  Carlos O'Donell  <carlos@redhat.com>

* math/README.libm-test (How can I generate "libm-test-ulps"?):
Use testrun.sh to run libm tests.

11 years agodl_open_worker: Memset all of seen array.
Carlos O'Donell [Sat, 6 Apr 2013 21:00:02 +0000 (17:00 -0400)]
dl_open_worker: Memset all of seen array.

The seen array was doubled in size recently, but the memset to clear
the array was not adjusted. We adjust the memset to always be correct
regardless of the size of seen.

---

2013-04-06  Carlos O'Donell  <carlos@redhat.com>

[BZ #15309]
* elf/dl-open.c (dl_open_worker): memset all of seen array.

11 years agofi_FI: Define yesstr, nostr
Marko Myllynen [Sat, 6 Apr 2013 20:33:26 +0000 (16:33 -0400)]
fi_FI: Define yesstr, nostr

Define yesstr/nostr in fi_FI (as "Kyllä" and "Ei").

Fixes part of BZ#15264.

---

2013-04-06  Marko Myllynen  <myllynen@redhat.com>

[BZ #15264]
* locales/fi_FI (LC_MESSAGES): Define yesstr and nostr.

11 years agoNew Makefile target `regen-ulps'.
Carlos O'Donell [Sat, 6 Apr 2013 20:22:47 +0000 (16:22 -0400)]
New Makefile target `regen-ulps'.

The wiki "Regeneration" page has this to say about update ULPs.

"The libm-test-ulps files are semiautomatically updated. To
update an ulps baseline, run each of the failing tests (test-float,
 test-double, etc.) with -u; this will generate a file called ULPs;
concatenate each of those files with the existing libm-test-ulps
file, after removing any entries for particularly huge numbers of
ulps that you do not want to mark as expected. Then run
gen-libm-test.pl -n -u FILE where FILE is the concatenated file
produced in the previous step. This generates a file called
NewUlps which is the new sorted version of libm-test-ulps."

The same information is listed in math/README.libm-test, and is a
lot of manual work that you often want to run over-and-over again
while working on a particular test.

The `regen-ulps' convenience target does this automatically for
developers.

We strictly assume the source tree is readonly and add a
new --output-dir option to libm-test.inc to allow for writing
out ULPs to $(objpfx).

When run the new target does the following:
* Starts with the baseline ULPs file.
* Runs each of the libm math tests with -u.
* Adds new changes seen with -u to the baseline.
* Sorts and prepares the test output with gen-libm-test.pl.
* Leaves math/NewUlps in your build tree to copy to your source
  tree, cleanup, and checkin.

The math test documentation in math/README.libm-test is updated
document the new Makefile target.

---

2013-04-06  Carlos O'Donell  <carlos@redhat.com>

* Makefile.in (regen-ulps): New target.
* math/Makefile [ifneq (no,$(PERL)]: Declare regen-ulps with .PHONY.
[ifneq (no,$(PERL)] (run-regen-ulps): New variable.
[ifneq (no,$(PERL)] (regen-ulps): New target.
[ifeq (no,$(PERL)] (regen-ulps): New target.
* math/libm-test.inc (ulps_file_name): Define.
(output_dir): New variable.
(options): Add "output-dir" option.
(parse_opt): Handle 'o' case.
(main): If output_dir is non-NULL use it as a prefix
otherwise use "".
* math/README.libm-test: Update `How can I generate "libm-test-ulps"?'

11 years agoi386: Fail at configure time for i386 builds.
Carlos O'Donell [Sat, 6 Apr 2013 16:00:35 +0000 (12:00 -0400)]
i386: Fail at configure time for i386 builds.

This change does two things:

* Treats a target i386-* as if it were i686.
* Fails configure if the user is generating code
  for i386.

We no longer support i386 code-generation because the i386
lacks the atomic operations we need in glibc.

You can still configure for i386-*, but you get i686 code.

You can't build with --march=i386, --mtune=i386 or a compiler
that defaults to i386 code-generation.

I've added two i386 entries in the master todo list to discuss
merging and renaming:
http://sourceware.org/glibc/wiki/Development_Todo/Master#i386

The failure modes are fail-safe here. You compile for i386,
get i686, and try to run on i386 and it fails. The configure
log has a warning saying we elided to i686. There is no situation
that I can see where we run into any serious problems.

The patch makes the current state better in that we get less
confused users and we build successfully in more default
configurations.

The next enhancement would be to add --march=i?86
as suggested in #c20 of BZ#10062 for any i?86-* builds, which
would solve the problem of a 32-bit compiler that defaults to
i386 code-gen and glibc configured for i686-* target. Which
previously failed at build time, and now will fail at configure
time (requires adding --march=i686).

Updated NEWS with BZ #10060 and #10062.

No regressions.

---

2013-04-06  Carlos O'Donell  <carlos@redhat.com>

[BZ #10060, #10062]
* aclocal.m4 (LIBC_COMPILER_BUILTIN_INLINED): New macro.
* sysdeps/i386/configure.in: Use LIBC_COMPILER_BUILTIN_INLINED and
fail configure if __sync_val_compare_and_swap is not inlined.
* sysdeps/i386/configure: Regenerate.
* configure.in: Build for i686 when configured for i386.
* configure: Regenerate.
* README: Remove i386 reference.

11 years agoUpdate ChangeLog.
Carlos O'Donell [Sat, 6 Apr 2013 15:41:44 +0000 (11:41 -0400)]
Update ChangeLog.

Update ChangeLog for commit:
24116fcdbe55d58aa35fc77444ae71a9dec9fff6

11 years agos390/s390x: Undef PSEUDO before redef.
Carlos O'Donell [Sat, 6 Apr 2013 14:53:54 +0000 (10:53 -0400)]
s390/s390x: Undef PSEUDO before redef.

The s390 and s390x sysdep.h files include the more generic sysdep.h.
The more generic sysdep.h defines PSEUDO. This causes an annoying
CPP warning saying the PSEUDO was redefined. This patch removes the
warning by undefining PSEUDO before the redefinition. This is in line
with what all the other machines do.

---

2013-04-06  Carlos O'Donell  <carlos@redhat.com>

* sysdeps/s390/s390-32/sysdep.h: Undefine PSEUDO before redefinition.
* sysdeps/s390/s390-64/sysdep.h: Likewise.