summaryrefslogtreecommitdiff
path: root/dln.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-12-17 00:44:54 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-12-17 00:44:54 +0900
commit06bdb41c4587a9cffacd09df473b66c285ed9813 (patch)
tree2d19b9816b629472f9192103edec872e8a1d56b1 /dln.c
parentfff058a8d6c2e5d7c3529484a1c9a636dbf66dc2 (diff)
dln.c: refine preprocessor conditions by USE_DLN_DLOPEN and _WIN32
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/5284
Diffstat (limited to 'dln.c')
-rw-r--r--dln.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/dln.c b/dln.c
index 7d0447db6c..44e8c06d04 100644
--- a/dln.c
+++ b/dln.c
@@ -200,13 +200,11 @@ dln_strerror(char *message, size_t size)
return message;
}
#define dln_strerror() dln_strerror(message, sizeof message)
-#elif ! defined _AIX
+#elif defined USE_DLN_DLOPEN
static const char *
dln_strerror(void)
{
-#ifdef USE_DLN_DLOPEN
return (char*)dlerror();
-#endif
}
#endif
@@ -305,7 +303,7 @@ dln_load(const char *file)
#if (defined _WIN32 || defined USE_DLN_DLOPEN) && defined RUBY_EXPORT
static const char incompatible[] = "incompatible library version";
#endif
-#if !defined(_AIX) && !defined(NeXT)
+#if defined _WIN32 || defined USE_DLN_DLOPEN
const char *error = 0;
#endif
@@ -495,7 +493,7 @@ dln_load(const char *file)
#endif
#endif
-#if !defined(_AIX) && !defined(NeXT)
+#if defined(_WIN32) || defined(USE_DLN_DLOPEN)
failed:
dln_loaderror("%s - %s", error, file);
#endif