Ticket #14295: singular-3-1-5.p4-p5.diff

File singular-3-1-5.p4-p5.diff, 2.6 KB (added by leif, 9 years ago)

Diff between the p4 and my p5. For reference / review only.

  • .hgtags

    diff --git a/.hgtags b/.hgtags
    a b  
    991d25aa640ae8670e79f8ffef18601bb6e33592ca singular-3-1-5.p1
    1010c3f28fc8aa34bf05eecb74585b3a4eaa8446b1b0 singular-3-1-5.p3
    1111fe02fee0b347822ed215ee7d512ebd61527ca750 singular-3-1-5.p4
     127ff81d6afac4586081b6a702e4cf779b15b5840b singular-3-1-5.p5
  • SPKG.txt

    diff --git a/SPKG.txt b/SPKG.txt
    a b  
    5858   that fixes one memory corruption (writing out of bound).
    5959 * cygwin-makefile.patch: simple fix for Cygwin, see
    6060   http://www.singular.uni-kl.de:8002/trac/ticket/476/
     61 * sage_trac_14295.patch: Fix for GCC 4.7.x on Solaris; see
     62   http://trac.sagemath.org/sage_trac/ticket/14295 and the changelog
     63   entry for singular-3-1-5.p5 below.
    6164   
    6265Other notes
    6366 * The option '--without-dynamic-kernel' is used on *all*
     
    8588
    8689== ChangeLog ==
    8790
     91=== singular-3-1-5.p5 (Leif Leonhardy, March 18th 2013) ===
     92 * #14295: Singular fails to build with GCC 4.7.x on Solaris.
     93   On Solaris, with `__cplusplus >= 199711L`, `floor()` and `log10()` are
     94   overloaded functions which get pulled into the global namespace,
     95   such that calling them with an `int` gets ambiguous.
     96   Patch `kernel/bigintmat.cc` (`patches/sage_trac_14295.patch`)
     97   to cast parameters to `floor()` and `log10()` from `int` to
     98   `double`, making the calls unambiguous.
     99
    88100=== singular-3-1-5.p4 (Jean-Pierre Flori, 12 February 2013) ===
    89101 * Trac #14033: prevent Singular from always linking to ncurses on
    90102   Cygwin.
  • new file patches/sage_trac_14295.patch

    diff --git a/patches/sage_trac_14295.patch b/patches/sage_trac_14295.patch
    new file mode 100644
    - +  
     1--- src/kernel/bigintmat.cc     2012-06-20 17:00:07.000000000 +0200
     2+++ src/kernel/bigintmat.cc     2013-03-18 16:18:26.281905612 +0100
     3@@ -344,7 +344,7 @@
     4     int index = cols*i+j;
     5     if ((a[index] > sndlong) && (a[index] < l))
     6     {
     7-      int min = floor(log10(cols))+floor(log10(rows))+5;
     8+      int min = floor(log10((double)cols))+floor(log10((double)rows))+5;
     9       if ((a[index] < min) && (min < l))
     10         sndlong = min;
     11       else
     12@@ -353,7 +353,7 @@
     13   }
     14   if (sndlong == 0)
     15   {
     16-    int min = floor(log10(cols))+floor(log10(rows))+5;
     17+    int min = floor(log10((double)cols))+floor(log10((double)rows))+5;
     18     if (min < l)
     19       sndlong = min;
     20     else
     21@@ -424,7 +424,7 @@
     22       if (nl > colwid[cj])
     23       {
     24         StringSetS("");
     25-        int ci = floor(i/col);
     26+        int ci = floor((double)(i/col)); // actually the same as ci = i/col
     27         StringAppend("[%d,%d]", ci+1, cj+1);
     28         char *tmp = StringAppendS("");
     29         char * ph = omStrDup(tmp);