Pino Toscano [Mon, 19 Nov 2012 23:49:11 +0000 (00:49 +0100)]
Hurd: fixes for ptsname and ptsname_r
ptsname_r on failure returns the value that is also set as errno; furthermore,
add more checks to it:
- set errno and return it on __term_get_peername failure
- set errno to ERANGE other than returning it
- change the type of PEERNAME to string_t, and check its length with __strnlen
In ptsname:
- change the type of PEERNAME to string_t
- do not set errno manually, since ptsname_r has set it already
David S. Miller [Mon, 19 Nov 2012 23:26:52 +0000 (15:26 -0800)]
Fix spurious underflows in ldbl-128 atan implementation.
With help from Joseph Myers.
* sysdeps/ieee754/ldbl-128/s_atanl.c (__atanl): Handle tiny and
very large arguments properly.
* math/libm-test.inc (atan_test): New tests.
(atan2_test): New tests.
* sysdeps/sparc/fpu/libm-test-ulps: Update.
* sysdeps/x86_64/fpu/libm-test-ulps: Update.
Pino Toscano [Mon, 19 Nov 2012 19:01:00 +0000 (20:01 +0100)]
muntrace: reset file and hooks before finalizing the stream
fclose will call free, invoking its hook, then fprintf which would indirectly
try to allocate a buffer, and this can cause malloc to be used (thus its hook
to be invoked) if libio uses malloc instead of mmap; given any malloc/free hook
locks the internal lock, this leads to a deadlock.
To prevent this hook roundtrip at muntrace, first unset MALLSTREAM and the
hooks, and only after that close the trace file.
Peng Haitao [Mon, 19 Nov 2012 06:53:07 +0000 (01:53 -0500)]
bindresvport() uses two static variables port and startport which are not
protected. It is not safe when in multithread circumstance.
bindresvport() select a port number from the range 512 to 1023, when in
multithread circumstance, the port may be 1024. So the static variables will be
protected.
Signed-off-by: Peng Haitao <penght@cn.fujitsu.com> Reviewed-by: Carlos O'Donell <carlos@systemhalted.org>
David S. Miller [Sun, 18 Nov 2012 20:33:53 +0000 (12:33 -0800)]
Correct tinyness handling in long-double and float y0/y1.
With help from Joseph Myers.
* sysdeps/ieee754/flt-32/e_j0f.c (__ieee754_y0f): Adjust tinyness
cutoff to 2**-13.
* sysdeps/ieee754/flt-32/e_j1f.c (__ieee754_y1f): Adjust tinyness
cutoff to 2**-25.
* sysdeps/ieee754/ldbl-128/e_j0l.c (U0): New constant.
( __ieee754_y0l): Avoid arithmetic underflow when 'x' is very
small.
* sysdeps/ieee754/ldbl-128/e_j1l.c (__ieee754_y1l): Likewise.
* math/libm-test.inc (y0_test): New tests.
(y1_test): New tests.
* sysdeps/i386/fpu/libm-test-ulps: Update.
* sysdeps/x86_64/fpu/libm-test-ulps: Update.
* sysdeps/sparc/fpu/libm-test-ulps: Update.
Andreas Jaeger [Fri, 16 Nov 2012 14:22:11 +0000 (15:22 +0100)]
Add szl_PL
[BZ #14368]
* locales/szl_PL: New Silesian Language Locale for Poland.
Contributed by Przemyslaw Buczkowski <przemub@yahoo.pl>.
* localedata/SUPPORTED (SUPPORTED-LOCALES): Add szl_PL.
Andreas Jaeger [Fri, 16 Nov 2012 08:39:10 +0000 (09:39 +0100)]
Add ayc_PE locale
[BZ # 14828]
* locales/ayc_PE: Add Aymara locale for Peru
contributed by Chris Leonard <cjl@sugarlabs.org> and
Amos Batto <amosbatto@yahoo.com>.
* SUPPORTED (SUPPORTED-LOCALES): Add ayc_PE.
David S. Miller [Mon, 12 Nov 2012 23:17:31 +0000 (15:17 -0800)]
Add support for sparc cryptographic hash opcodes.
* crypt/Makefile: Move test targets after toplevel Rules
inclusion. Grab any necessary sysdep routines when linking.
* crypt/md5.c (md5_process_block): Remove define, we will always
name it __md5_process_block.
(md5_finish_ctx): Update md5_process_block call.
(md5_stream): Likewise.
(md5_process_bytes): Likewise.
(md5_process_block): Rename to __md5_process_block and move to ...
* crypt/md5-block.c: ... here.
* crypt/sha256.c (sha256_process_block): Move to ...
* crypt/sha256-block.c: ... here.
* crypt/sha512.c (sha512_process_block): Move to ...
* crypt/sha512-block.c: ... here.
* locale/Makefile (CFLAGS-md5.c): Define to add crypt/ to include
path.
* sysdeps/sparc/sparc-ifunc.c (sparc_libc_ifunc): Define.
* sysdeps/sparc/sparc64/multiarch/Makefile
(libcrypt-sysdep_routines): Add crypto assembler sysdeps when in
crypt subdir.
(localedef-aux): Add md5 crypto assembler when in locale subdir.
* sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile: Mirror sparc64
multiarch changes.
* sysdeps/sparc/sparc64/multiarch/md5-block.c: New file.
* sysdeps/sparc/sparc64/multiarch/md5-crop.S: New file.
* sysdeps/sparc/sparc64/multiarch/sha256-block.c: New file.
* sysdeps/sparc/sparc64/multiarch/sha256-crop.S: New file.
* sysdeps/sparc/sparc64/multiarch/sha512-block.c: New file.
* sysdeps/sparc/sparc64/multiarch/sha512-crop.S: New file.
* sysdeps/sparc/sparc32/sparcv9/multiarch/md5-block.c: New file.
* sysdeps/sparc/sparc32/sparcv9/multiarch/md5-crop.S: New file.
* sysdeps/sparc/sparc32/sparcv9/multiarch/sha256-block.c: New
file.
* sysdeps/sparc/sparc32/sparcv9/multiarch/sha256-crop.S: New file.
* sysdeps/sparc/sparc32/sparcv9/multiarch/sha512-block.c: New
file.
* sysdeps/sparc/sparc32/sparcv9/multiarch/sha512-crop.S: New file.
David S. Miller [Sun, 11 Nov 2012 23:46:01 +0000 (15:46 -0800)]
Fix check-localplt regressions on sparc.
* sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c: Include
inttypes.h
(__get_clockfreq_via_proc_openprom): Use __open, __read, and
__close rather than their public counterparts.
Andreas Jaeger [Fri, 9 Nov 2012 15:41:38 +0000 (16:41 +0100)]
PowerPC: Use <bits/fcntl-linux.h>
* sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h: Remove all
definitions and declarations that are provided by
<bits/fcntl-linux.h> and include <bits/fcntl-linux.h>.
David S. Miller [Thu, 8 Nov 2012 05:00:09 +0000 (21:00 -0800)]
Fix NULL ucontext->uc_link handling on sparc64.
* sysdeps/unix/sysv/linux/sparc/sparc64/__start_context.S: New file.
* sysdeps/unix/sysv/linux/sparc/sparc64/makecontext.c
(__start_context): Declare.
(__makecontext_ret): Delete.
(__makecontext): Hook up __start_context instead of
__makecontext_ret.
* sysdeps/unix/sysv/linux/sparc/sparc64/Makefile
(sysdep_routines): Add __start_context when in stdlib.
Jeff Law [Wed, 7 Nov 2012 18:58:37 +0000 (11:58 -0700)]
2012-11-07 Andreas Jaeger <aj@suse.de>
[BZ #14809]
* sysdeps/unix/sysv/linux/sys/sysctl.h (_UAPI_LINUX_KERNEL_H)
(_UAPI_LINUX_TYPES_H): Starting with Linux 3.7, the include header
guards are changed. Only define if not yet defined, #undef back
after including linux/sysctl.h if defined here.