diff lib-src/ellcc.c @ 1706:9fc738581a9d

[xemacs-hg @ 2003-09-22 03:21:12 by james] Remove GNU DLD support, fix the C++ build, make eval-related functions visible to modules, and fix minor Windows-related problems.
author james
date Mon, 22 Sep 2003 03:21:19 +0000
parents 4d97756f2fbe
children 543769b89fed
line wrap: on
line diff
--- a/lib-src/ellcc.c	Sun Sep 21 21:52:23 2003 +0000
+++ b/lib-src/ellcc.c	Mon Sep 22 03:21:19 2003 +0000
@@ -715,13 +715,20 @@
     }
   fprintf (mout, "/* DO NOT EDIT - AUTOMATICALLY GENERATED */\n\n");
   fprintf (mout, "#include <emodules.h>\n\n");
+  fprintf (mout, "#ifdef __cplusplus\n");
+  fprintf (mout, "extern \"C\" {\n");
+  fprintf (mout, "#endif\n");
+  fprintf (mout, "extern const long emodule_compiler;\n");
+  fprintf (mout, "extern const char *emodule_name, *emodule_version, *emodule_title;\n");
+  fprintf (mout, "extern void docs_of_%s (void);\n", SSTR(mod_name));
+  fprintf (mout, "#ifdef __cplusplus\n");
+  fprintf (mout, "}\n");
+  fprintf (mout, "#endif\n\n");
   fprintf (mout, "const long emodule_compiler = %ld;\n", EMODULES_REVISION);
   fprintf (mout, "const char *emodule_name = \"%s\";\n", SSTR(mod_name));
   fprintf (mout, "const char *emodule_version = \"%s\";\n", SSTR(mod_version));
-  fprintf (mout, "const char *emodule_title = \"%s\";\n", SSTR(mod_title));
-  fprintf (mout, "\n\n");
-  fprintf (mout, "void docs_of_%s (void);\n", SSTR(mod_name));
-  fprintf (mout, "void docs_of_%s (void)\n", SSTR(mod_name));
+  fprintf (mout, "const char *emodule_title = \"%s\";\n\n", SSTR(mod_title));
+  fprintf (mout, "void docs_of_%s ()\n", SSTR(mod_name));
   if (fclose (mout) != 0)
     {
       fatal ("Failed to close output file %s", mod_output);