--- "Stephen J. Turnbull" <stephen(a)xemacs.org> wrote:
APPROVE COMMIT 21.5
Per recommendation of Ben. This is not meant to block Marcus's
"xemacs.def.in in modules" patch, but it does work for Mac OS X.
This seems to have snuck in with the Xft merge commit. Sorry!
2005-11-07 Stephen J. Turnbull <stephen(a)xemacs.org>
* inline.c: Include modules headers regardless of HAVE_SHLIB.
Reproducing the patch (which was originally sent to xemacs-beta for
discussion).
In the lrecord code, if error checking is turned on, each Lisp object
type automatically gets a error_check_TYPE_name function defined using
DECLARE_INLINE_HEADER. For reasons I don't understand well at all, at
least on Mac OS X 10.3.9 with GCC 3.3 these functions don't get
instantiated for the PostgreSQL and LDAP modules.
The patch below wins for me, but it's not very pleasant as it seems to
imply it's not possible to get an error-checking build outside of the
XEmacs tree.
Comments appreciated.
diff -rN -u old-xft-integration-new/src/inline.c
new-xft-integration-new/src/inline.c
--- old-xft-integration-new/src/inline.c 2005-11-05
00:45:16.000000000 +0900
+++ new-xft-integration-new/src/inline.c 2005-11-05 00:45:24.000000000 +0900
@@ -67,11 +67,13 @@
#include "syntax.h"
#include "window.h"
-#if defined (HAVE_LDAP) && !defined (HAVE_SHLIB)
+/* if we demand !define (HAVE_SHLIB) the inlines don't get instantiated */
+#if defined (HAVE_LDAP)
#include "../modules/ldap/eldap.h"
#endif
-#if defined (HAVE_POSTGRESQL) && !defined (HAVE_SHLIB)
+/* if we demand !define (HAVE_SHLIB) the inlines don't get instantiated */
+#if defined (HAVE_POSTGRESQL)
#include "../modules/postgresql/postgresql.h"
#endif
When I turn on error checking and build on Cygwin with this patch applied, I
(still) get lots of unresolved externals in the modules, mostly functions named
error_check_*. I've added those symbols xemacs.def.in.in and generated a new
patch. With the modified xemacs.def.in.in, I'm able to build on Cygwin with
both error checking enabled and disabled.
I have no idea whether or not this is the right thing to do, but it works for
Cygwin.
--Rick
Index: src/xemacs.def.in.in
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/xemacs.def.in.in,v
retrieving revision 1.11
diff -u -r1.11 xemacs.def.in.in
--- src/xemacs.def.in.in 2005/11/28 16:39:54 1.11
+++ src/xemacs.def.in.in 2005/11/29 04:06:01
@@ -82,6 +82,12 @@
eputenv
#ifdef DEBUG_XEMACS
eq_with_ebola_notice /* EQ_WITH_EBOLA_NOTICE */
+error_check_cons
+error_check_ldap
+error_check_opaque_ptr
+error_check_pgconn
+error_check_pgresult
+error_check_string
#endif
free_opaque_ptr
get_coding_system_for_text_file
@@ -144,6 +150,9 @@
vector2
vector3
warn_when_safe
+#ifdef DEBUG_XEMACS
+wrap_record_1
+#endif
write_c_string
write_fmt_string
write_fmt_string_lisp
@@ -187,6 +196,9 @@
Fsignal
Fthrow
Fvector
+#ifdef DEBUG_XEMACS
+XINT_1
+#endif
/* Exported variables */
__temp_alloca_size__ /* ALLOCA */