I cannot compile with C++ and get bignum support. The build ends
abruptly like this:
In file included from
/usr/lib/gcc/i386-redhat-linux/3.4.2/../../../../include/c++/3.4.2/iosfwd:50,
from /usr/include/gmp.h:26,
from /usr/src/xemacs/xemacs-21.5/src/number-gmp.h:38,
from /usr/src/xemacs/xemacs-21.5/src/number.h:62,
from /usr/src/xemacs/xemacs-21.5/src/lisp.h:3529,
from /usr/src/xemacs/xemacs-21.5/src/abbrev.c:36:
/usr/lib/gcc/i386-redhat-linux/3.4.2/../../../../include/c++/3.4.2/bits/postypes.h: In
member function `std::fpos<_StateT>&
std::fpos<_StateT>::operator+=(std::streamoff)':
/usr/lib/gcc/i386-redhat-linux/3.4.2/../../../../include/c++/3.4.2/bits/postypes.h:154:
error: `c_this' undeclared (first use this function)
The problem is that we define "this" to be "c_this" in both lisp.h
and
config.h.in (why both places?) in order to map valid C identifiers to
valid C++ identifiers. However, the latest gmp headers are C++ aware,
and we wind up mapping this to c_this in C++ code. How should we handle
this? Off the top of my head:
- #undef __cplusplus before #include <gmp.h>
- Remove the #define this c_this, compile with C++ and see what
breaks. Use that information to change all actual instances of
"this" in the XEmacs code to some other name.
--
Jerry James
http://www.ittc.ku.edu/~james/