Commit Graph

15571 Commits

Author SHA1 Message Date
Richard Sandiford 08ffcf34d9 Fix some types in localedef. 2013-09-13 23:31:10 +00:00
Jia Liu ae7080d30c sunrpc/rpc/types.h: fix OS X and FreeBSD build problems
When I build arm-linux-gcc on OS X, I find glibc will get a build error
in sunrpc/rpc/types.h, so I add __APPLE_CC__ to make OS X build OK.
For FreeBSD, Add __FreeBSD__ to make it build OK, too.

URL: http://sourceware.org/ml/libc-alpha/2013-09/msg00155.html
URL: http://sourceware.org/ml/libc-alpha/2013-09/msg00217.html
URL: http://sourceware.org/ml/libc-alpha/2013-09/msg00240.html
Signed-off-by: Jia Liu <proljc@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-09-11 18:37:21 -04:00
Ondřej Bílka 5905e7b3e2 Faster strchr implementation. 2013-09-11 17:07:38 +02:00
Will Newton b987c77672 benchtests: Rename argument to TIMING_INIT macro.
The TIMING_INIT macro currently sets the number of loop iterations
to 1000, which limits usefulness. Make the argument a clock
resolution value and multiply by 1000 in bench-skeleton.c instead
to allow easier reuse.

ChangeLog:

2013-09-11  Will Newton  <will.newton@linaro.org>

	* benchtests/bench-timing.h (TIMING_INIT): Rename ITERS
	parameter to RES. Remove hardcoded 1000 value.
	* benchtests/bench-skeleton.c (main): Pass RES parameter
	to TIMING_INIT and multiply result by 1000.
2013-09-11 15:18:20 +01:00
Adhemerval Zanella ddf985af47 Update powerpc-fpu ULPs. 2013-09-11 07:38:57 -05:00
Andreas Schwab ffdd31816a Add O_TMPFILE to <fcntl.h> 2013-09-11 11:52:46 +02:00
Will Newton b73ed24778 malloc: Check for integer overflow in memalign.
A large bytes parameter to memalign could cause an integer overflow
and corrupt allocator internals. Check the overflow does not occur
before continuing with the allocation.

ChangeLog:

2013-09-11  Will Newton  <will.newton@linaro.org>

	[BZ #15857]
	* malloc/malloc.c (__libc_memalign): Check the value of bytes
	does not overflow.
2013-09-11 09:42:43 +01:00
Will Newton 55e17aadc1 malloc: Check for integer overflow in valloc.
A large bytes parameter to valloc could cause an integer overflow
and corrupt allocator internals. Check the overflow does not occur
before continuing with the allocation.

ChangeLog:

2013-09-11  Will Newton  <will.newton@linaro.org>

	[BZ #15856]
	* malloc/malloc.c (__libc_valloc): Check the value of bytes
	does not overflow.
2013-09-11 09:41:04 +01:00
Will Newton 1159a19369 malloc: Check for integer overflow in pvalloc.
A large bytes parameter to pvalloc could cause an integer overflow
and corrupt allocator internals. Check the overflow does not occur
before continuing with the allocation.

ChangeLog:

2013-09-11  Will Newton  <will.newton@linaro.org>

	[BZ #15855]
	* malloc/malloc.c (__libc_pvalloc): Check the value of bytes
	does not overflow.
2013-09-11 09:39:40 +01:00
Ondřej Bílka c7cabd1355 Remove DO_NOT_USE_THIS conditionals. 2013-09-10 19:15:33 +02:00
Allan McRae aa04af0078 Clarify documentation cross-reference
The end of the "Parsing of Floats" subsection currently reads:

   The GNU C Library also provides '_l' versions of these functions,
which take an additional argument, the locale to use in conversion.
*Note Parsing of Integers::.

Split the final note as it is unrelated to the above comment and
reference it with "See also" instead.
2013-09-10 14:13:40 +10:00
Allan McRae cdfc721b8d Update pt_chown sections of the manual
The pt-chown binary is discussed in the "Running make install" section
without clarification of the needed configure option.  Clarify this
and simplfy the discription which is already covered in the "Configuring
and compiling" section.
2013-09-10 14:11:39 +10:00
Maciej W. Rozycki 95e7cf295e Fix static-binary lazy FPU context allocation
Long ago static startup did not parse the auxiliary vector and therefore
could not get at any `AT_FPUCW' tag to check whether upon FPU context
allocation the kernel would use a FPU control word setting different to
that provided by the `__fpu_control' variable.  Static startup therefore
always initialized the FPU control word, forcing immediate FPU context
allocation even for binaries that otherwise never used the FPU.

As from GIT commit f8f900ecb9 static
startup supports parsing the auxiliary vector, so now it can avoid
explicit initialization of the FPU control word, just as can dynamic
startup, in the usual case where the setting written to the FPU control
word would be the same as the kernel uses.  This defers FPU context
allocation until the binary itself actually pokes at the FPU.

Note that the `AT_FPUCW' tag is usually absent from the auxiliary vector
in which case _FPU_DEFAULT is assumed to be the kernel default.
2013-09-09 22:36:57 +01:00
Allan McRae a9f5ce099c Fix typo in strcoll example 2013-09-09 22:56:38 +10:00
Allan McRae 34829bc28f Fix memory leak in stdlib/isomac.c 2013-09-09 22:53:46 +10:00
Allan McRae 3932737df1 Fix memory leaks in libio on allocation failure 2013-09-09 22:52:25 +10:00
Allan McRae 83e43bf0b7 Fix nesting of ifdefs in netgroupcache.c
Fixes unclosed '{' if HAVE_SENDFILE is defined (BZ #15895).
2013-09-09 20:25:01 +10:00
Will Newton 0c66b8e985 malloc: Add realloc test.
The current tests don't test the functionality of realloc in detail.
Add a new test for realloc that exercises some of the corner cases
that are not otherwise tested.

ChangeLog:

2013-09-09  Will Newton  <will.newton@linaro.org>

	* malloc/Makefile: Add tst-realloc to tests.
	* malloc/tst-realloc.c: New file.
2013-09-09 09:20:09 +01:00
Allan McRae f6b00fd115 Update to latest versions of GPL-2.0 and LGPL-2.1
Pull copies of these files directly from the GNU website:
  http://www.gnu.org/licenses/gpl-2.0.txt
  http://www.gnu.org/licenses/lgpl-2.1.txt

Fixes the address of the Free Software Foundation (BZ #15844). Also
includes some minor formatting changes and corrects references to
the GNU "Library" General Public License.
2013-09-09 12:52:48 +10:00
David S. Miller eec55e167f Update Chinese (traditional) translations.
* po/zh_TW.po: Update Chinese (traditional) translation from
	translation project.
2013-09-06 15:26:43 -04:00
Richard Sandiford 1ecbb381ae Make localedef output generation use more logical interfaces. 2013-09-06 17:20:45 +00:00
Adhemerval Zanella e029e2e5c5 benchtests: Add memrchr benchmark 2013-09-06 09:24:52 -03:00
Will Newton bbf6e8e4f4 benchtests/Makefile: Run benchmark for memcpy.
The benchmark for memcpy got disabled accidentally. Re-enable it.

ChangeLog:

2013-09-06   Will Newton  <will.newton@linaro.org>

	* benchtests/Makefile (string-bench): Add memcpy.
2013-09-06 11:59:00 +01:00
Carlos O'Donell 6c82a2f8d7 Coordinate IPv6 definitions for Linux and glibc
This change synchronizes the glibc headers with the Linux kernel
headers and arranges to coordinate the definition of structures
already defined the Linux kernel UAPI headers.

It is now safe to include glibc's netinet/in.h or Linux's linux/in6.h
in any order in a userspace application and you will get the same
ABI. The ABI is guaranteed by UAPI and glibc.
2013-09-06 01:02:30 -04:00
Adhemerval Zanella 5430fc65a1 PowerPC: fix POWER7 memrchr for some large inputs 2013-09-05 09:32:56 -05:00
Adhemerval Zanella 4660856c6f Add memrchr testcase 2013-09-05 09:52:08 -03:00
Mike Frysinger bb8ea71379 tst-fanotify: skip when we get back EPERM
Since fanotify_init requires CAP_SYS_ADMIN in order to work (which usually
means running as root), we need to handle that error case too.

Reported-by: Andreas Jaeger <aj@suse.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-09-05 03:04:01 -04:00
Joseph Myers b92a20b560 conformtest: Fix namespace testing. 2013-09-04 20:47:21 +00:00
Chris Leonard 9fc2e09ffa Update iso-1427.def and related occurrences. 2013-09-04 11:45:05 -04:00
Chris Leonard 7447ccd98e Update iso-1427.def and related occurrences. 2013-09-04 11:42:53 -04:00
Joseph Myers 3f2e46a494 Remove --disable-versioning. 2013-09-04 15:25:42 +00:00
Will Newton 44558701ff benchtests: Switch string benchmarks to use bench-timing.h.
Switch the string benchmarks to using bench-timing.h instead
of hp-timing.h directly. This allows the string benchmarks to
be run usefully on architectures such as ARM that do not have
support for hp-timing.h.

In order to do this the tests have been changed from timing each
individual call and picking the lowest execution time recorded to
timing a number of calls and taking the mean execution time.

ChangeLog:

2013-09-04   Will Newton  <will.newton@linaro.org>

	* benchtests/bench-timing.h (TIMING_PRINT_MEAN): New macro.
	* benchtests/bench-string.h: Include bench-timing.h instead
	of including hp-timing.h directly. (INNER_LOOP_ITERS): New
	define. (HP_TIMING_BEST): Delete macro. (test_init): Remove
	call to HP_TIMING_DIFF_INIT.
	* benchtests/bench-memccpy.c: Use bench-timing.h macros
	instead of hp-timing.h macros.
	* benchtests/bench-memchr.c: Likewise.
	* benchtests/bench-memcmp.c: Likewise.
	* benchtests/bench-memcpy.c: Likewise.
	* benchtests/bench-memmem.c: Likewise.
	* benchtests/bench-memmove.c: Likewise.
	* benchtests/bench-memset.c: Likewise.
	* benchtests/bench-rawmemchr.c: Likewise.
	* benchtests/bench-strcasecmp.c: Likewise.
	* benchtests/bench-strcasestr.c: Likewise.
	* benchtests/bench-strcat.c: Likewise.
	* benchtests/bench-strchr.c: Likewise.
	* benchtests/bench-strcmp.c: Likewise.
	* benchtests/bench-strcpy.c: Likewise.
	* benchtests/bench-strcpy_chk.c: Likewise.
	* benchtests/bench-strlen.c: Likewise.
	* benchtests/bench-strncasecmp.c: Likewise.
	* benchtests/bench-strncat.c: Likewise.
	* benchtests/bench-strncmp.c: Likewise.
	* benchtests/bench-strncpy.c: Likewise.
	* benchtests/bench-strnlen.c: Likewise.
	* benchtests/bench-strpbrk.c: Likewise.
	* benchtests/bench-strrchr.c: Likewise.
	* benchtests/bench-strspn.c: Likewise.
	* benchtests/bench-strstr.c: Likewise.
2013-09-04 15:40:12 +01:00
Will Newton cae16d6675 benchtests/Makefile: Use LDLIBS instead of LDFLAGS.
LDFLAGS puts the library too early in the command line if --as-needed
is being used. Use LDLIBS instead.

ChangeLog:

2013-09-04  Will Newton  <will.newton@linaro.org>

	* benchtests/Makefile: Use LDLIBS instead of LDFLAGS.
2013-09-04 15:38:41 +01:00
Joseph Myers ffa3cd7f1a Fix lgammaf spurious underflow (bug 15427). 2013-09-03 15:32:54 +00:00
Ondřej Bílka 8f02859f17 Add unaligned strcmp. 2013-09-03 16:27:10 +02:00
Mike Frysinger 18d4371683 hppa: add fanotify_mark
Another example of all the 64bit arches getting the definition via a
common file, but the 32bit ones all adding it by themselves and hppa
was missed.

I'm not entirely sure about the usage of GLIBC_2.19 symbols here.
We'd like to backport this so people can use it, but it means we'd
be releasing a glibc-2.17/glibc-2.18 with a GLIBC_2.19 symbol in it.
But maybe it won't be a big deal since you'd only get that 2.19 ref
if you actually used the symbol ?

There hasn't been a glibc release where hppa worked w/out a bunch of
patches, so in reality there's only two distros that matter -- Gentoo
and Debian.

Reported-by: Jeroen Roovers <jer@gentoo.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-09-02 23:22:24 -04:00
Mike Frysinger ac44401205 tst-fanotify: new simple test
Basic test for the fanotify functions.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-09-02 23:22:23 -04:00
Joseph Myers b7835e3223 Fix spurious jnf underflows (bug 14155). 2013-09-02 14:51:24 +00:00
Ondřej Bílka 8220f4f008 Fix typo. 2013-09-02 11:29:34 +02:00
Ondřej Bílka f24a6d086b Fix then/than typos. 2013-08-30 18:10:31 +02:00
Ondřej Bílka 382466e04e Fix typos. 2013-08-30 18:08:59 +02:00
Ondřej Bílka 0186c6e97e Fix rawmemchr regression on bulldozer. 2013-08-30 10:14:37 +02:00
Roland McGrath 99541e8077 Fix up ChangeLog formatting. 2013-08-29 14:15:45 -07:00
Ondřej Bílka d4e16af1ae Remove aix specific files. 2013-08-29 18:11:45 +02:00
Thomas Schwinge 8833598053 Hurd: Add ESUCCESS error_t value. 2013-08-29 12:22:30 +02:00
Samuel Thibault ed479b02c2 Hurd: Use __executable_start symbol instead of _start.
_start points to the first instruction, not to the ELF header.
__executable_start does point on the ELF header.
2013-08-29 12:22:19 +02:00
Thomas Schwinge d821f07c9e Support ELFOSABI_GNU on all GNU systems. 2013-08-29 12:22:18 +02:00
Thomas Schwinge c54290cf08 Use ELFOSABI_GNU instead of ELFOSABI_LINUX. 2013-08-29 12:22:17 +02:00
Thomas Schwinge 0007fc9bdd [BZ #15522] strtod ("nan(N)") returning a sNaN in some cases 2013-08-29 12:22:10 +02:00
Thomas Schwinge f1cc4c8654 math: Additional type conversion tests
These have helped me find and fix type conversion issues in QEMU's MIPS
hardware emulation.  While certainly glibc is not the best place for such
tests, they're just an enhancement of tests already present.
2013-08-29 12:21:07 +02:00