>>>>"RR" == Rick Rankin
<rrankin1424-xemacs(a)yahoo.com> writes:
RR> --- Ben Wing wrote:
> this patch looks fine to me. sorry, i've been building on
cygwin
> without modules because i was getting massive numbers of errors. i
> think they were related to inline.c, and stephen may have fixed it
> with his recent patch. stephen, can you commit this patch?
RR> With this patch, I'm having no problems building on Cygwin from
RR> the latest CVS sources with modules enabled. You might want to
RR> give it try again when it's convenient for you.
The Cygwin modules do not work --with-error-checking, because then the
API imports/exports list in src/xemacs.def.in.in lacks many
error-checking related symbols that are only used when
ERROR_CHECK_TYPES is on. It is trivial to add these to
src/xemacs.def.in.in.
But additionally, the error_check_* functions of Lisp objects that are
defined _within_ the modules have to be imported/exported, too. These
cannot be added to src/xemacs.def.in.in, since they are only defined
in the modules and not known at the time when src/ is compiled.
My solution to this problem is to add a xemacs.def.in file to every
module. These files contain only the error_check_* functions of the
module's Lisp objects, conditioned on ERROR_CHECK_TYPES. The
xemacs.def.in files eventually are compiled to import libraries for
every module. Buidling the modules with Cygwin and error-checking
enabled works with this patch.
However, I'd like to have someone else look over the patch. I am not
sure if this is really the best way to deal with this problem. I made
this patch a while ago when I tested the new GC with Cygwin. This
problem was never reported by anyone else, so it was just sitting
here... Rick, are you interested in taking it from here?
modules/ChangeLog addition:
2005-11-27 Marcus Crestani <crestani(a)xemacs.org>
* canna/.cvsignore: Add xemacs.def.
* canna/xemacs.def.in: New.
* ldap/.cvsignore: Add xemacs.def
* ldap/xemacs.def.in: New.
* postgresql/.cvsignore: Add xemacs.def.
* postgresql/xemacs.def.in: New.
* common/Makefile.common:
* common/Makefile.common (MODULE_IMPORT_LIB): New target.
* common/Makefile.common ($(MODNAME).ell): Add MODULE_IMPORT_LIB.
Add per module import/export API to fix cygwin modules.
src/ChangeLog addition:
2005-11-27 Marcus Crestani <crestani(a)xemacs.org>
* xemacs.def.in.in: Add error_check_* functions.
diff -NaurX diff-exclude-gen -x ChangeLog xemacs-21.5/modules/canna/.cvsignore
modules-xemacs-21.5/modules/canna/.cvsignore
--- xemacs-21.5/modules/canna/.cvsignore 2005-11-02 04:33:18.000000000 +0100
+++ modules-xemacs-21.5/modules/canna/.cvsignore 2005-11-27 22:53:12.000000000 +0100
@@ -3,3 +3,4 @@
GNUmakefile
Makefile
Makefile.in
+xemacs.def
diff -NaurX diff-exclude-gen -x ChangeLog xemacs-21.5/modules/canna/xemacs.def.in
modules-xemacs-21.5/modules/canna/xemacs.def.in
--- xemacs-21.5/modules/canna/xemacs.def.in 1970-01-01 01:00:00.000000000 +0100
+++ modules-xemacs-21.5/modules/canna/xemacs.def.in 2005-11-27 22:22:10.000000000 +0100
@@ -0,0 +1,14 @@
+/* Put the usual header here */
+/* This file contains the symbols that this modules imports/exports
+ additionally to the ones defined in src/xemacs.def.in.in.
+ Currently (as of 2005-11-27) this file only has to contain the
+ error_check_* functions of the Lisp objects defined in the module
+ (put these between #ifdef ERROR_CHECK_TYPES). */
+#define NOT_C_CODE
+#include <config.h>
+NAME xemacs.exe
+EXPORTS
+/* Exported functions */
+#ifdef ERROR_CHECK_TYPES
+/* No Lisp objects defined in this module */
+#endif
diff -NaurX diff-exclude-gen -x ChangeLog xemacs-21.5/modules/common/Makefile.common
modules-xemacs-21.5/modules/common/Makefile.common
--- xemacs-21.5/modules/common/Makefile.common 2005-11-22 08:14:54.000000000 +0100
+++ modules-xemacs-21.5/modules/common/Makefile.common 2005-11-27 12:06:48.000000000
+0100
@@ -61,6 +61,7 @@
LIBSTDCPP=@LIBSTDCPP@
#ifdef HAVE_MS_WINDOWS
IMPORT_LIB=../../src/xemacs-import.a
+MODULE_IMPORT_LIB=$(MODNAME)-import.a
#endif
.PHONY: install
@@ -69,27 +70,33 @@
.c.o:
$(MODCC) $(MODCFLAGS) -c $<
-$(MODNAME).ell: $(OBJS) $(MODNAME)_i.o $(IMPORT_LIB)
+$(MODNAME).ell: $(OBJS) $(MODNAME)_i.o $(IMPORT_LIB) $(MODULE_IMPORT_LIB)
$(MODCC) --mode=link --mode=verbose --mod-output=$@ \
- $(OBJS) $(MODNAME)_i.o $(IMPORT_LIB) $(LDFLAGS) $(LIBSTDCPP)
+ $(OBJS) $(MODNAME)_i.o $(IMPORT_LIB) $(LDFLAGS) $(LIBSTDCPP) \
+ $(MODULE_IMPORT_LIB)
$(MODNAME)_i.c: $(SRCS)
ELLMAKEDOC=$(MAKE_DOCFILE) $(MODCC) --mode=init --mod-output=$@ \
--mod-name=$(MODNAME) --mod-version=$(MODVER) \
--mod-title=$(MODTITLE) $(SRC_SRCS)
+#ifdef HAVE_MS_WINDOWS
+$(MODULE_IMPORT_LIB): xemacs.def
+ dlltool -D xemacs-${version}.exe -d $< -l $(MODNAME)-import.a -e $@
+#endif
+
.PHONY: mostlyclean clean distclean realclean extraclean
.PHONY: distclean-noconfig realclean-noconfig extraclean-noconfig
mostlyclean:
-$(RM) $(OBJS) $(MODNAME)_i.* core
clean: mostlyclean
- -$(RM) $(MODNAME).ell
+ -$(RM) $(MODNAME).ell $(MODULE_IMPORT_LIB)
distclean-noconfig: clean
-$(RM) config.* TAGS
## This is used in making a distribution.
## Do not use it on development directories!
distclean: distclean-noconfig
- -$(RM) GNUmakefile Makefile Makefile.in configure
+ -$(RM) GNUmakefile Makefile Makefile.in configure xemacs.def
realclean-noconfig: distclean-noconfig
realclean: distclean
extraclean-noconfig: realclean-noconfig
diff -NaurX diff-exclude-gen -x ChangeLog xemacs-21.5/modules/ldap/.cvsignore
modules-xemacs-21.5/modules/ldap/.cvsignore
--- xemacs-21.5/modules/ldap/.cvsignore 2005-06-15 11:28:44.000000000 +0200
+++ modules-xemacs-21.5/modules/ldap/.cvsignore 2005-11-27 22:52:58.000000000 +0100
@@ -3,3 +3,4 @@
GNUmakefile
Makefile
Makefile.in
+xemacs.def
diff -NaurX diff-exclude-gen -x ChangeLog xemacs-21.5/modules/ldap/xemacs.def.in
modules-xemacs-21.5/modules/ldap/xemacs.def.in
--- xemacs-21.5/modules/ldap/xemacs.def.in 1970-01-01 01:00:00.000000000 +0100
+++ modules-xemacs-21.5/modules/ldap/xemacs.def.in 2005-11-27 22:22:48.000000000 +0100
@@ -0,0 +1,14 @@
+/* Put the usual header here */
+/* This file contains the symbols that this modules imports/exports
+ additionally to the ones defined in src/xemacs.def.in.in.
+ Currently (as of 2005-11-27) this file only has to contain the
+ error_check_* functions of the Lisp objects defined in the module
+ (put these between #ifdef ERROR_CHECK_TYPES). */
+#define NOT_C_CODE
+#include <config.h>
+NAME xemacs.exe
+EXPORTS
+/* Exported functions */
+#ifdef ERROR_CHECK_TYPES
+error_check_ldap
+#endif
diff -NaurX diff-exclude-gen -x ChangeLog xemacs-21.5/modules/postgresql/.cvsignore
modules-xemacs-21.5/modules/postgresql/.cvsignore
--- xemacs-21.5/modules/postgresql/.cvsignore 2003-03-16 22:02:06.000000000 +0100
+++ modules-xemacs-21.5/modules/postgresql/.cvsignore 2005-11-26 16:22:38.000000000 +0100
@@ -3,3 +3,4 @@
GNUmakefile
Makefile
Makefile.in
+xemacs.def
diff -NaurX diff-exclude-gen -x ChangeLog xemacs-21.5/modules/postgresql/xemacs.def.in
modules-xemacs-21.5/modules/postgresql/xemacs.def.in
--- xemacs-21.5/modules/postgresql/xemacs.def.in 1970-01-01 01:00:00.000000000 +0100
+++ modules-xemacs-21.5/modules/postgresql/xemacs.def.in 2005-11-27 22:22:46.000000000
+0100
@@ -0,0 +1,15 @@
+/* Put the usual header here */
+/* This file contains the symbols that this modules imports/exports
+ additionally to the ones defined in src/xemacs.def.in.in.
+ Currently (as of 2005-11-27) this file only has to contain the
+ error_check_* functions of the Lisp objects defined in the module
+ (put these between #ifdef ERROR_CHECK_TYPES). */
+#define NOT_C_CODE
+#include <config.h>
+NAME xemacs.exe
+EXPORTS
+/* Exported functions */
+#ifdef ERROR_CHECK_TYPES
+error_check_pgconn
+error_check_pgresult
+#endif
diff -NaurX diff-exclude-gen -x ChangeLog xemacs-21.5/src/xemacs.def.in.in
modules-xemacs-21.5/src/xemacs.def.in.in
--- xemacs-21.5/src/xemacs.def.in.in 2005-10-25 10:32:50.000000000 +0200
+++ modules-xemacs-21.5/src/xemacs.def.in.in 2005-11-27 18:08:20.000000000 +0100
@@ -83,6 +83,17 @@
#ifdef DEBUG_XEMACS
eq_with_ebola_notice /* EQ_WITH_EBOLA_NOTICE */
#endif
+#ifdef ERROR_CHECK_TYPES
+error_check_cons
+error_check_opaque_ptr
+error_check_string
+#ifdef NEW_GC
+error_check_string_direct_data
+error_check_string_indirect_data
+#endif
+wrap_record_1
+XINT_1
+#endif
free_opaque_ptr
get_coding_system_for_text_file
intern
--
Marcus