This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug math/18967] math.h XSI POSIX namespace (gamma, isnan, scalb)


https://sourceware.org/bugzilla/show_bug.cgi?id=18967

--- Comment #2 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  de20571d405bfb873f63a8645f143aef2b1455a9 (commit)
      from  dfa0f62011b50cc36107df5fad4130c5368b11e1 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=de20571d405bfb873f63a8645f143aef2b1455a9

commit de20571d405bfb873f63a8645f143aef2b1455a9
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Tue Sep 15 22:12:40 2015 +0000

    Fix math.h, tgmath.h XSI POSIX namespace (gamma, isnan, scalb) (bug 18967).

    math.h incorrectly declares various functions for XSI POSIX 2001 and
    2008 editions.  gamma was removed in the 2001 edition but is still
    declared, along with gammaf and gammal which were never standard
    functions.  isnan is still declared as a function, along with isnanf
    and isnanl which were never standard functions, although in 2001 the
    function was replaced by the type-generic macro.  scalbf and scalbl
    are declared although never standard, and scalb was removed in the
    2008 edition but is still declared.  The scalb type-generic macro in
    tgmath.h shouldn't be present for any POSIX version, since POSIX never
    had such a type-generic macro.

    This patch disables all those declarations in the relevant cases (as a
    minimal fix, it leaves them enabled for __USE_MISC).  For the matter
    of declaring scalb but not scalbf or scalbl for the 2001 edition, a
    new macro __MATH_DECLARING_DOUBLE is added, defined by math.h around
    includes of bits/mathcalls.h, for bits/mathcalls.h to use to test
    which type's functions are being declared.

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

        [BZ #18967]
        * math/math.h (__MATH_DECLARING_DOUBLE): New macro.  Define and
        undefine around includes of <bits/mathcalls.h>.
        * math/bits/mathcalls.h [!__USE_MISC && __USE_XOPEN2K] (isnan): Do
        not declare function.
        [!__USE_MISC && __USE_XOPEN2K] (gamma): Likewise.
        [!__USE_MISC && (!__MATH_DECLARING_DOUBLE || __USE_XOPEN2K8)]
        (scalb): Likewise.
        * math/tgmath.h [!__USE_MISC && __USE_XOPEN_EXTENDED] (scalb): Do
        not define macro.
        * conform/Makefile (test-xfail-XOPEN2K/math.h/conform): Remove
        variable.
        (test-xfail-XOPEN2K/tgmath.h/conform): Likewise.
        (test-xfail-XOPEN2K8/math.h/conform): Likewise.
        (test-xfail-XOPEN2K8/tgmath.h/conform): Likewise.

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog             |   16 ++++++++++++++++
 NEWS                  |    2 +-
 conform/Makefile      |    4 ----
 math/bits/mathcalls.h |   10 +++++++---
 math/math.h           |    6 ++++++
 math/tgmath.h         |    2 +-
 6 files changed, 31 insertions(+), 9 deletions(-)

-- 
You are receiving this mail because:
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]