Louis . Granboulan on Tue, 28 Apr 1998 20:59:55 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Sun C++ compiler |
Apply this patch to compile gp/pari with Sun's C++ compiler (version 4.2) *** pari-2.0.7.alpha/src/gp/gp.c.orig Sat Mar 21 04:31:18 1998 --- pari-2.0.7.alpha/src/gp/gp.c Tue Apr 28 19:57:17 1998 *************** *** 18,26 **** #else void init_readline(); BEGINEXTERN ! # include <readline.h> extern int isatty(int); ! extern void add_history(); ENDEXTERN #endif --- 18,31 ---- #else void init_readline(); BEGINEXTERN ! # if defined(__cplusplus) && defined(__SUNPRO_CC) ! /* readline.h gives a bad definition of readline() */ ! extern char*readline(char*); ! # else ! # include <readline.h> ! # endif extern int isatty(int); ! extern void add_history(char*); ENDEXTERN #endif *************** *** 1518,1524 **** long i=0, j=0, maxlen=0, nbcol,len,v, w = term_width(); while (list[i]) i++; ! qsort (list, i, sizeof(char *), (int(*)(ANYARG)) compare_str); for (v=0; list[v]; v++) { --- 1522,1528 ---- long i=0, j=0, maxlen=0, nbcol,len,v, w = term_width(); while (list[i]) i++; ! qsort (list, i, sizeof(char *), (int(*)(void*,void*)) compare_str); for (v=0; list[v]; v++) { *** pari-2.0.7.alpha/src/gp/gp_rl.c.orig Sat Mar 21 04:31:20 1998 --- pari-2.0.7.alpha/src/gp/gp_rl.c Tue Apr 28 19:58:30 1998 *************** *** 40,46 **** static char ** get_matches(int end, char *text, char* f(char*,int)) { ! char **matches = ((CF) completion_matches)(text, (char *(*)(ANYARG))f); if (matches && ! matches[1] /* only one match */ && ! current_ep /* this is not a variable */ --- 40,46 ---- static char ** get_matches(int end, char *text, char* f(char*,int)) { ! char **matches = ((CF) completion_matches)(text, (char *(*)())f); if (matches && ! matches[1] /* only one match */ && ! current_ep /* this is not a variable */ *** pari-2.0.7.alpha/src/basemath/alglin1.c.orig Sat Mar 21 04:30:42 1998 --- pari-2.0.7.alpha/src/basemath/alglin1.c Tue Apr 28 19:15:13 1998 *************** *** 1406,1412 **** for (i=0,j=1; j<=n; j++) if (d[j]) { i++; p1[i]=d[j]; p2[i]=j; } free(d); ! qsort(p1+1,r,sizeof(long),(int(*)(ANYARG))compare_long); } for (i=1;i<=r;i++) { p1[i]=lstoi(p1[i]); p2[i]=lstoi(p2[i]); } return res; --- 1406,1412 ---- for (i=0,j=1; j<=n; j++) if (d[j]) { i++; p1[i]=d[j]; p2[i]=j; } free(d); ! qsort(p1+1,r,sizeof(long),(int(*)(void*,void*))compare_long); } for (i=1;i<=r;i++) { p1[i]=lstoi(p1[i]); p2[i]=lstoi(p2[i]); } return res; *** pari-2.0.7.alpha/src/basemath/bibli2.c.orig Sat Mar 21 04:30:57 1998 --- pari-2.0.7.alpha/src/basemath/bibli2.c Tue Apr 28 19:21:44 1998 *************** *** 844,850 **** if (t1[i]) err(talker,"duplicated indeterminates in reorder"); t1[i] = 1; } ! qsort(varsort,lx,sizeof(int),(int(*)(ANYARG))compare_int); for (n=0; n<lx; n++) { --- 844,850 ---- if (t1[i]) err(talker,"duplicated indeterminates in reorder"); t1[i] = 1; } ! qsort(varsort,lx,sizeof(int),(int(*)(void*,void*))compare_int); for (n=0; n<lx; n++) { *** pari-2.0.7.alpha/src/modules/elliptic.c.orig Sat Mar 21 04:31:41 1998 --- pari-2.0.7.alpha/src/modules/elliptic.c Tue Apr 28 19:30:57 1998 *************** *** 1318,1324 **** table[i].x = fh.x; table[i].y = fh.y; table[i].i = i; addsell1(cp4, p, &fh, &f2, &fh); } ! qsort(table,s,sizeof(multiple),(int (*)(ANYARG))compare_multiples); powssell1(cp4, p, s, &f2, &fg); ftest = fg; for (com = 1; ; com++) { --- 1318,1324 ---- table[i].x = fh.x; table[i].y = fh.y; table[i].i = i; addsell1(cp4, p, &fh, &f2, &fh); } ! qsort(table,s,sizeof(multiple),(int (*)(void*,void*))compare_multiples); powssell1(cp4, p, s, &f2, &fg); ftest = fg; for (com = 1; ; com++) {