summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKO Myung-Hun <komh@chollian.net>2014-11-20 22:15:11 +0000
committerGary V. Vaughan <gary@gnu.org>2014-11-20 22:16:31 +0000
commit1d887c9b5002d8e9a4e65c192c8a1b7355cc356a (patch)
tree754ab4d81a05f3b26f1bbf03c1e08c2b87d7f337
parentbb0bc2920c90f7c7e32b697b52e4a84cfbabf1a9 (diff)
downloadm4-1d887c9b5002d8e9a4e65c192c8a1b7355cc356a.tar.gz
modules: fall-back to system dlopen search path.
* m4/module.c (m4__module_open): If the module search function cannot find a matching module, fall-back to the system dlopen search path. Signed-off-by: Gary V. Vaughan <gary@gnu.org>
-rw-r--r--m4/module.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/m4/module.c b/m4/module.c
index ac1b58c7..07e33519 100644
--- a/m4/module.c
+++ b/m4/module.c
@@ -273,6 +273,10 @@ m4__module_open (m4 *context, const char *name, m4_obstack *obs)
char *filepath = m4_path_search (context, name, suffixes);
void *handle = NULL;
+ /* Use system module search path if m4_path_search fails. */
+ if (!filepath)
+ filepath = xstrdup (name);
+
if (filepath)
{
handle = dlopen (filepath, RTLD_NOW|RTLD_GLOBAL);