[前][次][番号順一覧][スレッド一覧]

ruby-changes:70264

From: Nobuyoshi <ko1@a...>
Date: Fri, 17 Dec 2021 01:56:15 +0900 (JST)
Subject: [ruby-changes:70264] 06bdb41c45 (master): dln.c: refine preprocessor conditions by USE_DLN_DLOPEN and _WIN32

https://git.ruby-lang.org/ruby.git/commit/?id=06bdb41c45

From 06bdb41c4587a9cffacd09df473b66c285ed9813 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Fri, 17 Dec 2021 00:44:54 +0900
Subject: dln.c: refine preprocessor conditions by USE_DLN_DLOPEN and _WIN32

---
 dln.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/dln.c b/dln.c
index 7d0447db6c1..44e8c06d04b 100644
--- a/dln.c
+++ b/dln.c
@@ -200,13 +200,11 @@ dln_strerror(char *message, size_t size) https://github.com/ruby/ruby/blob/trunk/dln.c#L200
     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) https://github.com/ruby/ruby/blob/trunk/dln.c#L303
 #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) https://github.com/ruby/ruby/blob/trunk/dln.c#L493
 #endif
 
 #endif
-#if !defined(_AIX) && !defined(NeXT)
+#if defined(_WIN32) || defined(USE_DLN_DLOPEN)
   failed:
     dln_loaderror("%s - %s", error, file);
 #endif
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]