diff src/emodules.c @ 2078:0bcc1e4dfd91

[xemacs-hg @ 2004-05-14 15:34:36 by james] Add support for loading modules with LTDL, the libtool library.
author james
date Fri, 14 May 2004 15:34:40 +0000
parents 3fe1a35b705d
children ecf1ebac70d8
line wrap: on
line diff
--- a/src/emodules.c	Thu May 13 21:50:28 2004 +0000
+++ b/src/emodules.c	Fri May 14 15:34:40 2004 +0000
@@ -20,6 +20,9 @@
 
 #include "emodules.h"
 #include "sysdll.h"
+#ifdef HAVE_LTDL
+#include <ltdl.h>
+#endif
 
 /* Load path */
 static Lisp_Object Vmodule_load_path;
@@ -587,6 +590,13 @@
 
   reinit_vars_of_module ();
 
+#ifdef HAVE_LTDL
+  lt_dlinit ();
+  lt_dlmalloc = (lt_ptr (*) (size_t)) xmalloc;
+  lt_dlrealloc = (lt_ptr (*) (lt_ptr, size_t)) xrealloc;
+  lt_dlfree = (void (*) (lt_ptr)) xfree_1;
+#endif
+
   DEFVAR_LISP ("module-version", &Vmodule_version /*
 Emacs dynamic loading mechanism version, as a string.