]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Fix libm mpone, mptwo namespace (bug 17616).
authorJoseph Myers <joseph@codesourcery.com>
Tue, 18 Nov 2014 15:40:56 +0000 (15:40 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Tue, 18 Nov 2014 15:40:56 +0000 (15:40 +0000)
libm uses symbols mpone and mptwo for internal purposes.  This patch
moves them to the implementation namespace (__mpone and __mptwo).

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

[BZ #17616]
* sysdeps/ieee754/dbl-64/mpa.c (mpone): Rename to __mpone.
(mptwo): Rename to __mptwo.
(__inv): Use __mptwo instead of mptwo.
* sysdeps/ieee754/dbl-64/mpa.h (mpone): Rename to __mpone.
(mptwo): Rename to __mptwo.
* sysdeps/ieee754/dbl-64/mpatan.c (__mpatan): Use __mpone instead
of mpone and __mptwo instead of mptwo.
* sysdeps/ieee754/dbl-64/mpatan2.c (__mpatan2): Use __mpone
instead of mpone.
* sysdeps/ieee754/dbl-64/mpexp.c (__mpexp): Likewise.
* sysdeps/ieee754/dbl-64/mplog.c (__mplog): Likewise.
* sysdeps/ieee754/dbl-64/sincos32.c (__c32): Use __mpone instead
of mpone and __mptwo instead of mptwo.
(__mpranred): Use __mpone instead of mpone.
* conform/Makefile (test-xfail-ISO/math.h/linknamespace): Remove
variable.
(test-xfail-ISO99/complex.h/linknamespace): Likewise.
(test-xfail-ISO99/math.h/linknamespace): Likewise.
(test-xfail-ISO99/tgmath.h/linknamespace): Likewise.
(test-xfail-ISO11/complex.h/linknamespace): Likewise.
(test-xfail-ISO11/math.h/linknamespace): Likewise.
(test-xfail-ISO11/tgmath.h/linknamespace): Likewise.
(test-xfail-XPG3/math.h/linknamespace): Likewise.
(test-xfail-XPG4/math.h/linknamespace): Likewise.
(test-xfail-POSIX/math.h/linknamespace): Likewise.
(test-xfail-UNIX98/math.h/linknamespace): Likewise.
(test-xfail-XOPEN2K/complex.h/linknamespace): Likewise.
(test-xfail-XOPEN2K/math.h/linknamespace): Likewise.
(test-xfail-XOPEN2K/tgmath.h/linknamespace): Likewise.
(test-xfail-POSIX2008/complex.h/linknamespace): Likewise.
(test-xfail-POSIX2008/math.h/linknamespace): Likewise.
(test-xfail-POSIX2008/tgmath.h/linknamespace): Likewise.
(test-xfail-XOPEN2K8/complex.h/linknamespace): Likewise.
(test-xfail-XOPEN2K8/math.h/linknamespace): Likewise.
(test-xfail-XOPEN2K8/tgmath.h/linknamespace): Likewise.

ChangeLog
NEWS
conform/Makefile
sysdeps/ieee754/dbl-64/mpa.c
sysdeps/ieee754/dbl-64/mpa.h
sysdeps/ieee754/dbl-64/mpatan.c
sysdeps/ieee754/dbl-64/mpatan2.c
sysdeps/ieee754/dbl-64/mpexp.c
sysdeps/ieee754/dbl-64/mplog.c
sysdeps/ieee754/dbl-64/sincos32.c

index d9bf09c700805b7679a6a7c8c16f1d4eb61543df..2e3359ac038eeb01723724d59c68d6198cef7d0c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,42 @@
+2014-11-18  Joseph Myers  <joseph@codesourcery.com>
+
+       [BZ #17616]
+       * sysdeps/ieee754/dbl-64/mpa.c (mpone): Rename to __mpone.
+       (mptwo): Rename to __mptwo.
+       (__inv): Use __mptwo instead of mptwo.
+       * sysdeps/ieee754/dbl-64/mpa.h (mpone): Rename to __mpone.
+       (mptwo): Rename to __mptwo.
+       * sysdeps/ieee754/dbl-64/mpatan.c (__mpatan): Use __mpone instead
+       of mpone and __mptwo instead of mptwo.
+       * sysdeps/ieee754/dbl-64/mpatan2.c (__mpatan2): Use __mpone
+       instead of mpone.
+       * sysdeps/ieee754/dbl-64/mpexp.c (__mpexp): Likewise.
+       * sysdeps/ieee754/dbl-64/mplog.c (__mplog): Likewise.
+       * sysdeps/ieee754/dbl-64/sincos32.c (__c32): Use __mpone instead
+       of mpone and __mptwo instead of mptwo.
+       (__mpranred): Use __mpone instead of mpone.
+       * conform/Makefile (test-xfail-ISO/math.h/linknamespace): Remove
+       variable.
+       (test-xfail-ISO99/complex.h/linknamespace): Likewise.
+       (test-xfail-ISO99/math.h/linknamespace): Likewise.
+       (test-xfail-ISO99/tgmath.h/linknamespace): Likewise.
+       (test-xfail-ISO11/complex.h/linknamespace): Likewise.
+       (test-xfail-ISO11/math.h/linknamespace): Likewise.
+       (test-xfail-ISO11/tgmath.h/linknamespace): Likewise.
+       (test-xfail-XPG3/math.h/linknamespace): Likewise.
+       (test-xfail-XPG4/math.h/linknamespace): Likewise.
+       (test-xfail-POSIX/math.h/linknamespace): Likewise.
+       (test-xfail-UNIX98/math.h/linknamespace): Likewise.
+       (test-xfail-XOPEN2K/complex.h/linknamespace): Likewise.
+       (test-xfail-XOPEN2K/math.h/linknamespace): Likewise.
+       (test-xfail-XOPEN2K/tgmath.h/linknamespace): Likewise.
+       (test-xfail-POSIX2008/complex.h/linknamespace): Likewise.
+       (test-xfail-POSIX2008/math.h/linknamespace): Likewise.
+       (test-xfail-POSIX2008/tgmath.h/linknamespace): Likewise.
+       (test-xfail-XOPEN2K8/complex.h/linknamespace): Likewise.
+       (test-xfail-XOPEN2K8/math.h/linknamespace): Likewise.
+       (test-xfail-XOPEN2K8/tgmath.h/linknamespace): Likewise.
+
 2014-11-18  Tom de Vries  <tom@codesoucery.com>
 
        * manual/signal.texi (Primitives Interrupted by Signals): In section,
diff --git a/NEWS b/NEWS
index 6ad946454a7404b25511684e2f7d2d6a6f70de5c..b152488cee36af93e018f0bdecaa358985a7329c 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -12,7 +12,7 @@ Version 2.21
   6652, 12926, 14132, 14138, 14171, 15215, 15884, 17266, 17344, 17363,
   17370, 17371, 17411, 17460, 17475, 17485, 17501, 17506, 17508, 17522,
   17555, 17570, 17571, 17572, 17573, 17574, 17582, 17583, 17584, 17585,
-  17589, 17594.
+  17589, 17594, 17616.
 
 * The minimum GCC version that can be used to build this version of the GNU
   C Library is GCC 4.6.  Older GCC versions, and non-GNU compilers, can
index b2806b16620c3ffceebac51e6ad40a3634bf9e88..cf54722b8e0f805541fd3453219be94f14a3ec1c 100644 (file)
@@ -325,23 +325,15 @@ test-xfail-XOPEN2K/ndbm.h/linknamespace = yes
 test-xfail-XOPEN2K8/ndbm.h/linknamespace = yes
 
 # Unsorted expected failures.
-test-xfail-ISO/math.h/linknamespace = yes
 test-xfail-ISO/stdio.h/linknamespace = yes
 test-xfail-ISO/time.h/linknamespace = yes
-test-xfail-ISO99/complex.h/linknamespace = yes
 test-xfail-ISO99/ctype.h/linknamespace = yes
-test-xfail-ISO99/math.h/linknamespace = yes
 test-xfail-ISO99/stdio.h/linknamespace = yes
-test-xfail-ISO99/tgmath.h/linknamespace = yes
-test-xfail-ISO11/complex.h/linknamespace = yes
 test-xfail-ISO11/ctype.h/linknamespace = yes
-test-xfail-ISO11/math.h/linknamespace = yes
 test-xfail-ISO11/stdio.h/linknamespace = yes
-test-xfail-ISO11/tgmath.h/linknamespace = yes
 test-xfail-XPG3/ctype.h/linknamespace = yes
 test-xfail-XPG3/fnmatch.h/linknamespace = yes
 test-xfail-XPG3/glob.h/linknamespace = yes
-test-xfail-XPG3/math.h/linknamespace = yes
 test-xfail-XPG3/regex.h/linknamespace = yes
 test-xfail-XPG3/search.h/linknamespace = yes
 test-xfail-XPG3/stdio.h/linknamespace = yes
@@ -354,7 +346,6 @@ test-xfail-XPG4/fnmatch.h/linknamespace = yes
 test-xfail-XPG4/glob.h/linknamespace = yes
 test-xfail-XPG4/grp.h/linknamespace = yes
 test-xfail-XPG4/libgen.h/linknamespace = yes
-test-xfail-XPG4/math.h/linknamespace = yes
 test-xfail-XPG4/netdb.h/linknamespace = yes
 test-xfail-XPG4/pwd.h/linknamespace = yes
 test-xfail-XPG4/regex.h/linknamespace = yes
@@ -370,7 +361,6 @@ test-xfail-XPG4/wordexp.h/linknamespace = yes
 test-xfail-POSIX/aio.h/linknamespace = yes
 test-xfail-POSIX/fnmatch.h/linknamespace = yes
 test-xfail-POSIX/glob.h/linknamespace = yes
-test-xfail-POSIX/math.h/linknamespace = yes
 test-xfail-POSIX/mqueue.h/linknamespace = yes
 test-xfail-POSIX/pthread.h/linknamespace = yes
 test-xfail-POSIX/regex.h/linknamespace = yes
@@ -387,7 +377,6 @@ test-xfail-UNIX98/fnmatch.h/linknamespace = yes
 test-xfail-UNIX98/glob.h/linknamespace = yes
 test-xfail-UNIX98/grp.h/linknamespace = yes
 test-xfail-UNIX98/libgen.h/linknamespace = yes
-test-xfail-UNIX98/math.h/linknamespace = yes
 test-xfail-UNIX98/mqueue.h/linknamespace = yes
 test-xfail-UNIX98/netdb.h/linknamespace = yes
 test-xfail-UNIX98/pthread.h/linknamespace = yes
@@ -406,14 +395,12 @@ test-xfail-UNIX98/unistd.h/linknamespace = yes
 test-xfail-UNIX98/wchar.h/linknamespace = yes
 test-xfail-UNIX98/wordexp.h/linknamespace = yes
 test-xfail-XOPEN2K/aio.h/linknamespace = yes
-test-xfail-XOPEN2K/complex.h/linknamespace = yes
 test-xfail-XOPEN2K/fcntl.h/linknamespace = yes
 test-xfail-XOPEN2K/fmtmsg.h/linknamespace = yes
 test-xfail-XOPEN2K/fnmatch.h/linknamespace = yes
 test-xfail-XOPEN2K/glob.h/linknamespace = yes
 test-xfail-XOPEN2K/grp.h/linknamespace = yes
 test-xfail-XOPEN2K/libgen.h/linknamespace = yes
-test-xfail-XOPEN2K/math.h/linknamespace = yes
 test-xfail-XOPEN2K/mqueue.h/linknamespace = yes
 test-xfail-XOPEN2K/net/if.h/linknamespace = yes
 test-xfail-XOPEN2K/netdb.h/linknamespace = yes
@@ -429,18 +416,15 @@ test-xfail-XOPEN2K/sys/mman.h/linknamespace = yes
 test-xfail-XOPEN2K/sys/statvfs.h/linknamespace = yes
 test-xfail-XOPEN2K/sys/wait.h/linknamespace = yes
 test-xfail-XOPEN2K/syslog.h/linknamespace = yes
-test-xfail-XOPEN2K/tgmath.h/linknamespace = yes
 test-xfail-XOPEN2K/time.h/linknamespace = yes
 test-xfail-XOPEN2K/ucontext.h/linknamespace = yes
 test-xfail-XOPEN2K/unistd.h/linknamespace = yes
 test-xfail-XOPEN2K/wordexp.h/linknamespace = yes
 test-xfail-POSIX2008/aio.h/linknamespace = yes
-test-xfail-POSIX2008/complex.h/linknamespace = yes
 test-xfail-POSIX2008/ctype.h/linknamespace = yes
 test-xfail-POSIX2008/dirent.h/linknamespace = yes
 test-xfail-POSIX2008/fcntl.h/linknamespace = yes
 test-xfail-POSIX2008/grp.h/linknamespace = yes
-test-xfail-POSIX2008/math.h/linknamespace = yes
 test-xfail-POSIX2008/mqueue.h/linknamespace = yes
 test-xfail-POSIX2008/net/if.h/linknamespace = yes
 test-xfail-POSIX2008/netdb.h/linknamespace = yes
@@ -450,17 +434,14 @@ test-xfail-POSIX2008/semaphore.h/linknamespace = yes
 test-xfail-POSIX2008/spawn.h/linknamespace = yes
 test-xfail-POSIX2008/sys/mman.h/linknamespace = yes
 test-xfail-POSIX2008/sys/statvfs.h/linknamespace = yes
-test-xfail-POSIX2008/tgmath.h/linknamespace = yes
 test-xfail-POSIX2008/time.h/linknamespace = yes
 test-xfail-POSIX2008/unistd.h/linknamespace = yes
 test-xfail-XOPEN2K8/aio.h/linknamespace = yes
-test-xfail-XOPEN2K8/complex.h/linknamespace = yes
 test-xfail-XOPEN2K8/dirent.h/linknamespace = yes
 test-xfail-XOPEN2K8/fcntl.h/linknamespace = yes
 test-xfail-XOPEN2K8/fmtmsg.h/linknamespace = yes
 test-xfail-XOPEN2K8/grp.h/linknamespace = yes
 test-xfail-XOPEN2K8/libgen.h/linknamespace = yes
-test-xfail-XOPEN2K8/math.h/linknamespace = yes
 test-xfail-XOPEN2K8/mqueue.h/linknamespace = yes
 test-xfail-XOPEN2K8/net/if.h/linknamespace = yes
 test-xfail-XOPEN2K8/netdb.h/linknamespace = yes
@@ -473,6 +454,5 @@ test-xfail-XOPEN2K8/spawn.h/linknamespace = yes
 test-xfail-XOPEN2K8/sys/mman.h/linknamespace = yes
 test-xfail-XOPEN2K8/sys/statvfs.h/linknamespace = yes
 test-xfail-XOPEN2K8/syslog.h/linknamespace = yes
-test-xfail-XOPEN2K8/tgmath.h/linknamespace = yes
 test-xfail-XOPEN2K8/time.h/linknamespace = yes
 test-xfail-XOPEN2K8/unistd.h/linknamespace = yes
index 9f7f44fa4863716d1a3ee8978e76c59e48edc7db..44659ccff49afa4e0ba5bed2b652bae0e6a448ca 100644 (file)
@@ -50,8 +50,8 @@
 #endif
 
 #ifndef NO__CONST
-const mp_no mpone = { 1, { 1.0, 1.0 } };
-const mp_no mptwo = { 1, { 1.0, 2.0 } };
+const mp_no __mpone = { 1, { 1.0, 1.0 } };
+const mp_no __mptwo = { 1, { 1.0, 2.0 } };
 #endif
 
 #ifndef NO___ACR
@@ -877,7 +877,7 @@ __inv (const mp_no *x, mp_no *y, int p)
     {
       __cpy (y, &w, p);
       __mul (x, &w, y, p);
-      __sub (&mptwo, y, &z, p);
+      __sub (&__mptwo, y, &z, p);
       __mul (&w, &z, y, p);
     }
 }
index bf1ad873d19af1792787eab92bcf9094048aede0..a4fb1d4f65845164951d50e4d49d35a20b0742a0 100644 (file)
@@ -71,8 +71,8 @@ typedef union
   double d;
 } number;
 
-extern const mp_no mpone;
-extern const mp_no mptwo;
+extern const mp_no __mpone;
+extern const mp_no __mptwo;
 
 #define  X   x->d
 #define  Y   y->d
index 49ecdd2d85a501dcd597bdabb9ed5ae89aac5e74..2f2c544458d4fa24d6b15d62f45c0835f1ac8bdf 100644 (file)
@@ -83,10 +83,10 @@ __mpatan (mp_no *x, mp_no *y, int p)
     {
       for (i = 0; i < m; i++)
        {
-         __add (&mpone, &mpsm, &mpt1, p);
+         __add (&__mpone, &mpsm, &mpt1, p);
          __mpsqrt (&mpt1, &mpt2, p);
          __add (&mpt2, &mpt2, &mpt1, p);
-         __add (&mptwo, &mpsm, &mpt2, p);
+         __add (&__mptwo, &mpsm, &mpt2, p);
          __add (&mpt1, &mpt2, &mpt3, p);
          __dvd (&mpsm, &mpt3, &mpt1, p);
          __cpy (&mpt1, &mpsm, p);
index 5249492666d94b312c2b25d2fe68e7e06c25eab1..c84a4b3cdb1dbe15dc2ac524462379d6ed924d2f 100644 (file)
@@ -52,7 +52,7 @@ __mpatan2 (mp_no *y, mp_no *x, mp_no *z, int p)
       __mul (&mpt1, &mpt1, &mpt2, p);
       if (mpt1.d[0] != 0)
        mpt1.d[0] = 1;
-      __add (&mpt2, &mpone, &mpt3, p);
+      __add (&mpt2, &__mpone, &mpt3, p);
       __mpsqrt (&mpt3, &mpt2, p);
       __add (&mpt1, &mpt2, &mpt3, p);
       mpt3.d[0] = Y[0];
index 0096afb8365ff25edd33135b444e38e8efe2ddf8..4a4ccdb032d1eed0a0d2ebff1d772de8795f77b4 100644 (file)
@@ -140,7 +140,7 @@ __mpexp (mp_no *x, mp_no *y, int p)
     }
   __dbl_mp (kf, &mpk, p);
   __dvd (&mpt2, &mpk, &mpt1, p);
-  __add (&mpone, &mpt1, &mpt2, p);
+  __add (&__mpone, &mpt1, &mpt2, p);
 
   /* Raise polynomial value to the power of 2**m. Put result in y.  */
   for (k = 0, j = 0; k < m;)
index 75adac9df68452c539fa20343312f90b87edd428..a0a37793bdc8ca711605c8a8178469159327c85a 100644 (file)
@@ -58,7 +58,7 @@ __mplog (mp_no *x, mp_no *y, int p)
       mpt1.d[0] = -mpt1.d[0];
       __mpexp (&mpt1, &mpt2, p);
       __mul (x, &mpt2, &mpt1, p);
-      __sub (&mpt1, &mpone, &mpt2, p);
+      __sub (&mpt1, &__mpone, &mpt2, p);
       __add (y, &mpt2, &mpt1, p);
       __cpy (&mpt1, y, p);
     }
index 6b2fa878a4abf561ea4f367332a4153562317394..52f7bbc7282e3a9388b4dd4bc028a37f1b2d3674 100644 (file)
@@ -118,11 +118,11 @@ __c32 (mp_no *x, mp_no *y, mp_no *z, int p)
       __mul (&c, &s, &t, p);
       __sub (&s, &t, &t1, p);
       __add (&t1, &t1, &s, p);
-      __sub (&mptwo, &c, &t1, p);
+      __sub (&__mptwo, &c, &t1, p);
       __mul (&t1, &c, &t2, p);
       __add (&t2, &t2, &c, p);
     }
-  __sub (&mpone, &c, y, p);
+  __sub (&__mpone, &c, y, p);
   __cpy (&s, z, p);
 }
 
@@ -352,7 +352,7 @@ __mpranred (double x, mp_no *y, int p)
       if (c.d[1] >= HALFRAD)
        {
          t += 1.0;
-         __sub (&c, &mpone, &b, p);
+         __sub (&c, &__mpone, &b, p);
          __mul (&b, &hp, y, p);
        }
       else