dln.c: dln_incompatible_library_p
* dln.c (dln_incompatible_library_p): renamed as the error message with dln prefix, since it is not bound to xmalloc restrictively. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61577 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
21a2146e1d
commit
44cf5baa62
8
dln.c
8
dln.c
@ -1244,8 +1244,6 @@ rb_w32_check_imported(HMODULE ext, HMODULE mine)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef USE_DLN_DLOPEN
|
#ifdef USE_DLN_DLOPEN
|
||||||
static bool xmalloc_mismatch_p(void *handle);
|
|
||||||
|
|
||||||
#ifdef __clang__
|
#ifdef __clang__
|
||||||
#pragma clang diagnostic push
|
#pragma clang diagnostic push
|
||||||
#pragma clang diagnostic ignored "-Wpedantic"
|
#pragma clang diagnostic ignored "-Wpedantic"
|
||||||
@ -1253,8 +1251,8 @@ static bool xmalloc_mismatch_p(void *handle);
|
|||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wpedantic"
|
#pragma GCC diagnostic ignored "-Wpedantic"
|
||||||
#endif
|
#endif
|
||||||
bool
|
static bool
|
||||||
xmalloc_mismatch_p(void *handle)
|
dln_incompatible_library_p(void *handle)
|
||||||
{
|
{
|
||||||
void *ex = dlsym(handle, EXTERNAL_PREFIX"ruby_xmalloc");
|
void *ex = dlsym(handle, EXTERNAL_PREFIX"ruby_xmalloc");
|
||||||
return ex && ex != ruby_xmalloc;
|
return ex && ex != ruby_xmalloc;
|
||||||
@ -1353,7 +1351,7 @@ dln_load(const char *file)
|
|||||||
}
|
}
|
||||||
# if defined RUBY_EXPORT
|
# if defined RUBY_EXPORT
|
||||||
{
|
{
|
||||||
if (xmalloc_mismatch_p(handle)) {
|
if (dln_incompatible_library_p(handle)) {
|
||||||
|
|
||||||
# if defined __APPLE__ && \
|
# if defined __APPLE__ && \
|
||||||
defined(MAC_OS_X_VERSION_MIN_REQUIRED) && \
|
defined(MAC_OS_X_VERSION_MIN_REQUIRED) && \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user