index 359572239163a132dce0ff5759475ac5c91b81f3..916330ca83a600955f3af8bf51dc40c8e056f1b5 100644 (file)
@@ -178,6 +178,7 @@ extern void m4__builtin_print (m4_obstack *, const m4__builtin *, bool,
/* Representation of a loaded m4 module. */
struct m4_module
{
+ const char *name; /* Name of the module. */
lt_dlhandle handle; /* All ltdl module information. */
m4__builtin *builtins; /* Sorted array of builtins. */
m4_macro *macros; /* Unsorted array of macros. */
index a2215f0e4d7a9c52a8a604be5af2670234927247..db26198a55d4bb83921f5658c37b82a81a67168e 100644 (file)
@@ -79,13 +79,8 @@ static lt_dlinterface_id iface_id = NULL;
const char *
m4_get_module_name (const m4_module *module)
{
- const lt_dlinfo *info;
-
- assert (module && module->handle);
-
- info = lt_dlgetinfo (module->handle);
-
- return info ? info->name : NULL;
+ assert (module);
+ return module->name;
}
void *
@@ -212,7 +207,7 @@ install_macro_table (m4 *context, m4_module *module)
m4_debug_message (context, M4_DEBUG_TRACE_MODULE,
_("module %s: macros loaded"),
- m4_get_module_name (module));
+ m4_get_module_name (module));
}
}
@@ -229,7 +224,7 @@ m4_module_load (m4 *context, const char *name, m4_obstack *obs)
{
install_builtin_table (context, module);
install_macro_table (context, module);
- }
+ }
}
return module;
@@ -417,6 +412,7 @@ m4__module_open (m4 *context, const char *name, m4_obstack *obs)
const char *err;
module = (m4_module *) xzalloc (sizeof *module);
+ module->name = xstrdup (name);
module->handle = handle;
/* clear out any stale errors, since we have to use
index c69cdbac933159507e053efb71450fc77b627c61..9437e936c9941f844dd7d9c9a66be09a830449a5 100644 (file)
@@ -299,7 +299,7 @@ m4_load_filename (m4 *context, const m4_call_info *caller,
&& suffix
&& (STREQ (suffix, LT_MODULE_EXT) || STREQ (suffix, ".la")))
{
- m4_module_load (context, filepath, obs);
+ m4_module_load (context, filename, obs);
}
else
{