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

ruby-changes:49460

From: nobu <ko1@a...>
Date: Wed, 3 Jan 2018 18:05:23 +0900 (JST)
Subject: [ruby-changes:49460] nobu:r61576 (trunk): dln.c: xmalloc_mismatch_p with dlopen

nobu	2018-01-03 18:05:18 +0900 (Wed, 03 Jan 2018)

  New Revision: 61576

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=61576

  Log:
    dln.c: xmalloc_mismatch_p with dlopen
    
    * dln.c (xmalloc_mismatch_p): define only when using dlopen,
      otherwise dlsym is not available too, and should be used then.

  Modified files:
    trunk/dln.c
Index: dln.c
===================================================================
--- dln.c	(revision 61575)
+++ dln.c	(revision 61576)
@@ -1243,7 +1243,8 @@ rb_w32_check_imported(HMODULE ext, HMODU https://github.com/ruby/ruby/blob/trunk/dln.c#L1243
 #define translit_separator(str) (void)(str)
 #endif
 
-MAYBE_UNUSED(static bool xmalloc_mismatch_p(void *handle));
+#ifdef USE_DLN_DLOPEN
+static bool xmalloc_mismatch_p(void *handle);
 
 #ifdef __clang__
 #pragma clang diagnostic push
@@ -1263,6 +1264,7 @@ xmalloc_mismatch_p(void *handle) https://github.com/ruby/ruby/blob/trunk/dln.c#L1264
 #elif defined(__GNUC__) && (__GNUC__ >= 5)
 #pragma GCC diagnostic pop
 #endif
+#endif
 
 void*
 dln_load(const char *file)

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

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