glibc:carlos/dlmopen

Last commit made on 2015-09-18
Get this branch:
git clone -b carlos/dlmopen https://git.launchpad.net/glibc

Branch merges

Branch information

Name:
carlos/dlmopen
Repository:
lp:glibc

Recent commits

f3f30c9... by Carlos O'Donell <email address hidden>

Initial implemenation of full dlmopen support.

8a44513... by Mike Frysinger

alpha: drop __ASSUME_FDATASYNC

Since we require a new enough kernel all the time, the __ASSUME_FDATASYNC
define has been hardcoded to 1. That means we can delete the alpha file
for fdatasync now and rely on the syscalls list like other ports.

a435cc4... by Joseph Myers <email address hidden>

Test for weak undefined symbols in linknamespace.pl.

This patch makes linknamespace.pl require weak undefined symbols to be
within the standard namespace. (It remains the case that
linknamespace.pl does not look for definitions of such symbols or
require symbols used in those definitions to be within the standard
namespace.)

Tested for x86_64 and x86.

 * conform/linknamespace.pl: Require weak undefined symbols to be
 in the standard namespace.
 (%strong_syms): Rename to %seen_syms.
 (%strong_seen): Rename to %seen_where.

e5d19c0... by "H.J. Lu" <email address hidden>

Use __pthread_setcancelstate in libc.a

This patch references __pthread_setcancelstate instead of
pthread_setcancelstate in libc.a.

 [BZ #18970]
 * misc/error.c (error): Replace pthread_setcancelstate with
 __pthread_setcancelstate.
 (error_at_line): Likewise.
 * posix/wordexp.c (parse_comm): Likewise.
 * stdlib/fmtmsg.c (fmtmsg): Likewise.
 * nptl/forward.c (pthread_setcancelstate): Renamed to ...
 (__pthread_setcancelstate): This.
 (pthread_setcancelstate): Add an alias.
 * nptl/nptl-init.c (pthread_functions): Replace
 ptr_pthread_setcancelstate with ptr___pthread_setcancelstate.
 * sysdeps/nptl/pthread-functions.h (pthread_functions): Likewise.
 * nptl/pthreadP.h (__pthread_setcancelstate): Mark it with
 hidden_proto.
 * nptl/pthread_setcancelstate.c (__pthread_setcancelstate): Mark
 it with hidden_def.
 * sysdeps/nptl/libc-lockP.h (__pthread_setcancelstate): New.
 (pthread_setcancelstate): Renamed to ...
 (__pthread_setcancelstate): This.
 * sysdeps/unix/sysv/linux/fatal-prepare.h (FATAL_PREPARE): Use
 __libc_ptf_call with __pthread_setcancelstate.

61f8937... by Joseph Myers <email address hidden>

Fix sign of zero part from ctan / ctanh when argument infinite (bug 17118).

C99/C11 Annex G specifies the sign of the zero part of the result of
ctan (x +/- i * Inf) and ctanh (+/-Inf + i * y). This patch fixes glibc
to follow that specification, along the lines I described in my review
of Andreas's previous patch for this issue
<https://sourceware.org/ml/libc-alpha/2014-08/msg00142.html>.

Tested for x86_64.

2015-09-17 Joseph Myers <email address hidden>
     Andreas Schwab <email address hidden>

 [BZ #17118]
 * math/s_ctan.c (__ctan): Determine sign of zero real part of
 result when imaginary part of argument is infinite using sine and
 cosine.
 * math/s_ctanf.c (__ctanf): Likewise.
 * math/s_ctanl.c (__ctanl): Likewise.
 * math/s_ctanh.c (__ctanh): Determine sign of zero imaginary part
 of result when real part of argument is infinite using sine and
 cosine.
 * math/s_ctanhf.c (__ctanhf): Likewise.
 * math/s_ctanhl.c (__ctanhl): Likewise.
 * math/libm-test.inc (ctan_test_data): Add more tests of ctan.
 (ctanh_test_data): Add more tests of ctanh.

b868239... by Joseph Myers <email address hidden>

Reduce number of constants in __finite* (bug 15384).

Bug 15384 notes that in __finite, two different constants are used
that could be the same constant (the result only depends on the
exponent of the floating-point representation), and that using the
same constant is better for architectures where constants need loading
from a constant pool. This patch implements that change.

Tested for x86_64, mips64 and powerpc.

 [BZ #15384]
 * sysdeps/ieee754/dbl-64/s_finite.c (FINITE): Use same constant as
 bit-mask as in subtraction.
 * sysdeps/ieee754/dbl-64/wordsize-64/s_finite.c (__finite):
 Likewise.
 * sysdeps/ieee754/flt-32/s_finitef.c (FINITEF): Likewise.
 * sysdeps/ieee754/ldbl-128/s_finitel.c (__finitel): Likewise.
 * sysdeps/ieee754/ldbl-128ibm/s_finitel.c (__finitel): Likewise.

46f74e1... by Joseph Myers <email address hidden>

Fix tgamma missing underflows (bug 18951).

Similar to various other bugs in this area, tgamma functions can fail
to raise the underflow exception when the result is tiny and inexact
but one or more low bits of the intermediate result that is scaled
down are zero. This patch forces the exception in a similar way to
previous fixes.

Tested for x86_64, x86, mips64 and powerpc.

 [BZ #18951]
 * sysdeps/ieee754/dbl-64/e_gamma_r.c (__ieee754_gamma_r): Force
 underflow exception for small results.
 * sysdeps/ieee754/flt-32/e_gammaf_r.c (__ieee754_gammaf_r):
 Likewise.
 * sysdeps/ieee754/ldbl-128/e_gammal_r.c (__ieee754_gammal_r):
 Likewise.
 * sysdeps/ieee754/ldbl-128ibm/e_gammal_r.c (__ieee754_gammal_r):
 Likewise.
 * sysdeps/ieee754/ldbl-96/e_gammal_r.c (__ieee754_gammal_r):
 Likewise.
 * math/auto-libm-test-in: Add more tests of tgamma.
 * math/auto-libm-test-out: Regenerated.

e67dc1b... by Andreas Schwab <email address hidden>

Restore sparc64 implementation of semctl

The sparc64 variant of the ipc syscall does not dereference the pointer
argument for the SEMCTL operation.

1f11365... by Joseph Myers <email address hidden>

Don't declare float / long double Bessel functions for XSI POSIX (bug 18977).

The float and long double versions of Bessel function (j0f, y1l, etc.)
are not in POSIX; only the double versions are. This patch
accordingly limits the declarations of those functions to __USE_MISC,
and fixes the conform/ test expectations which matched the previous
incorrect declarations.

Tested for x86_64 and x86 (testsuite, and that installed stripped
shared libraries are unchanged by this patch).

 [BZ #18977]
 * math/bits/mathcalls.h
 [!__USE_MISC && __USE_XOPEN && !__MATH_DECLARING_DOUBLE] (j0): Do
 not declare.
 [!__USE_MISC && __USE_XOPEN && !__MATH_DECLARING_DOUBLE] (j1):
 Likewise.
 [!__USE_MISC && __USE_XOPEN && !__MATH_DECLARING_DOUBLE] (jn):
 Likewise.
 [!__USE_MISC && __USE_XOPEN && !__MATH_DECLARING_DOUBLE] (y0):
 Likewise.
 [!__USE_MISC && __USE_XOPEN && !__MATH_DECLARING_DOUBLE] (y1):
 Likewise.
 [!__USE_MISC && __USE_XOPEN && !__MATH_DECLARING_DOUBLE] (yn):
 Likewise.
 * conform/data/math.h-data
 [!ISO99 && !ISO11 && !POSIX && !POSIX2008] (j0f): Do not expect
 function.
 [!ISO99 && !ISO11 && !POSIX && !POSIX2008] (j1f): Likewise.
 [!ISO99 && !ISO11 && !POSIX && !POSIX2008] (jnf): Likewise.
 [!ISO99 && !ISO11 && !POSIX && !POSIX2008] (y0f): Likewise.
 [!ISO99 && !ISO11 && !POSIX && !POSIX2008] (y1f): Likewise.
 [!ISO99 && !ISO11 && !POSIX && !POSIX2008] (ynf): Likewise.
 [!ISO99 && !ISO11 && !POSIX && !POSIX2008] (j0l): Likewise.
 [!ISO99 && !ISO11 && !POSIX && !POSIX2008] (j1l): Likewise.
 [!ISO99 && !ISO11 && !POSIX && !POSIX2008] (jnl): Likewise.
 [!ISO99 && !ISO11 && !POSIX && !POSIX2008] (y0l): Likewise.
 [!ISO99 && !ISO11 && !POSIX && !POSIX2008] (y1l): Likewise.
 [!ISO99 && !ISO11 && !POSIX && !POSIX2008] (ynl): Likewise.

da2f4f2... by Joseph Myers <email address hidden>

Make scalbn set errno (bug 6803).

As noted in bug 6803, scalbn fails to set errno on overflow and
underflow. This patch fixes this by making scalbn an alias of ldexp,
which has exactly the same semantics (for floating-point types with
radix 2) and already has wrappers that deal with setting errno,
instead of an alias of the internal __scalbn (which ldexp calls).

Notes:

* Where compat symbols were defined for scalbn functions, I didn't
  change what they point to (to keep the patch minimal), so such
  compat symbols continue to go directly to the non-errno-setting
  functions.

* Mike, I didn't do anything with the IA64 versions of these
  functions, where I think both the ldexp and scalbn functions already
  deal with setting errno. As a cleanup (not needed to fix this bug)
  however you might want to make those functions into aliases for
  IA64; there is no need for them to be separate function
  implementations at all.

* This concludes the fix for bug 6803 since the scalb and scalbln
  cases of that bug were fixed some time ago.

Tested for x86_64, x86, mips64 and powerpc.

 [BZ #6803]
 * math/s_ldexp.c (scalbn): Define as weak alias of __ldexp.
 [NO_LONG_DOUBLE] (scalbnl): Define as weak alias of __ldexp.
 * math/s_ldexpf.c (scalbnf): Define as weak alias of __ldexpf.
 * math/s_ldexpl.c (scalbnl): Define as weak alias of __ldexpl.
 * sysdeps/i386/fpu/s_scalbn.S (scalbn): Remove alias.
 * sysdeps/i386/fpu/s_scalbnf.S (scalbnf): Likewise.
 * sysdeps/i386/fpu/s_scalbnl.S (scalbnl): Likewise.
 * sysdeps/ieee754/dbl-64/s_scalbn.c (scalbn): Likewise.
 [NO_LONG_DOUBLE] (scalbnl): Likewise.
 * sysdeps/ieee754/dbl-64/wordsize-64/s_scalbn.c (scalbn):
 Likewise.
 [NO_LONG_DOUBLE] (scalbnl): Likewise.
 * sysdeps/ieee754/flt-32/s_scalbnf.c (scalbnf): Likewise.
 * sysdeps/ieee754/ldbl-128/s_scalbnl.c (scalbnl): Likewise.
 * sysdeps/ieee754/ldbl-128ibm/s_scalbnl.c (scalbnl): Remove
 long_double_symbol calls.
 * sysdeps/ieee754/ldbl-64-128/s_scalbnl.c (scalbnl): Likewise.
 * sysdeps/ieee754/ldbl-opt/s_ldexpl.c (__ldexpl_2): Define as
 strong alias of __ldexpl.
 (scalbnl): Define using long_double_symbol.
 * sysdeps/m68k/m680x0/fpu/s_scalbn.c (__CONCATX(scalbn,suffix)):
 Remove alias.
 * sysdeps/sparc/sparc64/soft-fp/s_scalbnl.c (scalbnl): Likewise.
 * sysdeps/x86_64/fpu/s_scalbnl.S (scalbnl): Likewise.
 * math/libm-test.inc (scalbn_test_data): Add errno expectations.
 (scalbln_test_data): Add more errno expectations.