[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-gawk] [PATCH 1/2] Fix dlsym() failures on OS/2 kLIBC
From: |
KO Myung-Hun |
Subject: |
[bug-gawk] [PATCH 1/2] Fix dlsym() failures on OS/2 kLIBC |
Date: |
Wed, 11 Oct 2017 22:32:24 +0900 |
OS/2 kLIBC prepends '_' to symbols.
---
ext.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/ext.c b/ext.c
index 027df697..eb50001b 100644
--- a/ext.c
+++ b/ext.c
@@ -35,7 +35,13 @@ extern SRCFILE *srcfiles;
#include <dlfcn.h>
-#define INIT_FUNC "dl_load"
+#ifdef __KLIBC__
+#define SYMBOL_PREFIX "_"
+#else
+#define SYMBOL_PREFIX
+#endif
+
+#define INIT_FUNC SYMBOL_PREFIX "dl_load"
/* load_ext --- load an external library */
@@ -61,7 +67,7 @@ load_ext(const char *lib_name)
dlerror());
/* Per the GNU Coding standards */
- gpl_compat = (int *) dlsym(dl, "plugin_is_GPL_compatible");
+ gpl_compat = (int *) dlsym(dl, SYMBOL_PREFIX
"plugin_is_GPL_compatible");
if (gpl_compat == NULL)
fatal(_("load_ext: library `%s': does not define
`plugin_is_GPL_compatible' (%s)\n"),
lib_name, dlerror());
--
2.13.3
- Re: [bug-gawk] [PATCH 2/2] Fix plugin load failure on OS/2, (continued)
- Re: [bug-gawk] [PATCH 2/2] Fix plugin load failure on OS/2, KO Myung-Hun, 2017/10/12
- Re: [bug-gawk] [PATCH 2/2] Fix plugin load failure on OS/2, Andrew J. Schorr, 2017/10/12
- Re: [bug-gawk] [PATCH 2/2] Fix plugin load failure on OS/2, Eli Zaretskii, 2017/10/12
- Re: [bug-gawk] [PATCH 2/2] Fix plugin load failure on OS/2, arnold, 2017/10/12
- Re: [bug-gawk] [PATCH 2/2] Fix plugin load failure on OS/2, KO Myung-Hun, 2017/10/12
- Re: [bug-gawk] [PATCH 2/2] Fix plugin load failure on OS/2, Eli Zaretskii, 2017/10/21
- Re: [bug-gawk] [PATCH 2/2] Fix plugin load failure on OS/2, arnold, 2017/10/21
- Re: [bug-gawk] [PATCH 2/2] Fix plugin load failure on OS/2, KO Myung-Hun, 2017/10/22
- Re: [bug-gawk] [PATCH 2/2] Fix plugin load failure on OS/2, arnold, 2017/10/23
- Re: [bug-gawk] [PATCH 2/2] Fix plugin load failure on OS/2, KO Myung-Hun, 2017/10/22
[bug-gawk] [PATCH 1/2] Fix dlsym() failures on OS/2 kLIBC,
KO Myung-Hun <=