[AC21.5] C++ fixes
Jerry James
james at xemacs.org
Thu Apr 8 11:22:29 EDT 2004
"Stephen J. Turnbull" <stephen at xemacs.org> wrote:
> C++ build is busted. This needs to be fixed.
Mats is right. There are too many combinations for me to keep up with
them all. There is gcc vs. g++ vs. icc, no bignums vs. GMP vs. BSD MP,
union type vs. no union type, modules vs. no modules, not to mention
that I have 3 platforms I can use, namely Linux, Solaris, and Cygwin
(althogh mostly Linux). I just don't have time to build and check all
of those combinations every time I make a change. I usually do build 2
or 3 combinations each time, trying to guess which ones might have been
impacted, but I haven't guessed right a few times recently.
Anyhow, here's a fix for the C++ breakage.
src/ChangeLog addition:
2004-04-08 Jerry James <james at xemacs.org>
* data.c: Use #ifndef for functions unused with new number types.
* data.c (digit_to_number): Unused when HAVE_BIGNUM.
* number.c: Remove multiply defined symbols Qintegerp & Qnumberp.
* number.c (syms_of_number): DEFSUBR(Ffloatingp) was omitted.
* print.c (print_internal): g++ thinks that specdepth might be
used undefined. It isn't, but the compiler can't tell.
xemacs-21.5 source patch:
Diff command: cvs -q diff -uN
Files affected: src/print.c src/number.c src/data.c
Index: src/data.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/data.c,v
retrieving revision 1.53
diff -d -u -r1.53 data.c
--- src/data.c 2004/04/07 03:49:00 1.53
+++ src/data.c 2004/04/08 15:07:48
@@ -836,6 +836,7 @@
/**********************************************************************/
/* Arithmetic functions */
/**********************************************************************/
+#ifndef WITH_NUMBER_TYPES
typedef struct
{
int int_p;
@@ -876,6 +877,7 @@
goto retry;
}
}
+#endif /* WITH_NUMBER_TYPES */
static EMACS_INT
integer_char_or_marker_to_int (Lisp_Object obj)
@@ -1213,6 +1215,7 @@
}
}
+#ifndef HAVE_BIGNUM
static int
digit_to_number (int character, int base)
{
@@ -1224,6 +1227,7 @@
return digit >= base ? -1 : digit;
}
+#endif
DEFUN ("string-to-number", Fstring_to_number, 1, 2, 0, /*
Convert STRING to a number by parsing it as a number in base BASE.
Index: src/number.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/number.c,v
retrieving revision 1.3
diff -d -u -r1.3 number.c
--- src/number.c 2004/04/07 14:55:34 1.3
+++ src/number.c 2004/04/08 15:07:49
@@ -24,7 +24,7 @@
#include <limits.h>
#include "lisp.h"
-Lisp_Object Qintegerp, Qrationalp, Qfloatingp, Qrealp, Qnumberp;
+Lisp_Object Qrationalp, Qfloatingp, Qrealp;
Lisp_Object Vdefault_float_precision;
Fixnum Vmost_negative_fixnum, Vmost_positive_fixnum;
static Lisp_Object Qunsupported_type;
@@ -707,11 +707,9 @@
#endif
/* Type predicates */
- DEFSYMBOL (Qintegerp);
DEFSYMBOL (Qrationalp);
DEFSYMBOL (Qfloatingp);
DEFSYMBOL (Qrealp);
- DEFSYMBOL (Qnumberp);
#ifndef HAVE_BIGNUM
DEFSYMBOL (Qbignump);
#endif
@@ -732,6 +730,7 @@
DEFSUBR (Fnumerator);
DEFSUBR (Fdenominator);
DEFSUBR (Fbigfloatp);
+ DEFSUBR (Ffloatingp);
DEFSUBR (Frealp);
DEFSUBR (Fcanonicalize_number);
DEFSUBR (Fcoerce_number);
Index: src/print.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/print.c,v
retrieving revision 1.48
diff -d -u -r1.48 print.c
--- src/print.c 2004/03/19 02:59:10 1.48
+++ src/print.c 2004/04/08 15:07:49
@@ -1514,7 +1514,7 @@
print_internal (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
{
/* This function can GC */
- int specdepth;
+ int specdepth = 0;
struct gcpro gcpro1, gcpro2;
QUIT;
--
Jerry James
http://www.ittc.ku.edu/~james/
More information about the XEmacs-Beta
mailing list