diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-12-17 00:44:54 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-12-17 00:44:54 +0900 |
commit | 06bdb41c4587a9cffacd09df473b66c285ed9813 (patch) | |
tree | 2d19b9816b629472f9192103edec872e8a1d56b1 /dln.c | |
parent | fff058a8d6c2e5d7c3529484a1c9a636dbf66dc2 (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.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -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 |