mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
dln.c: refine preprocessor conditions by USE_DLN_DLOPEN and _WIN32
This commit is contained in:
parent
fff058a8d6
commit
06bdb41c45
Notes:
git
2021-12-17 01:56:26 +09:00
1 changed files with 3 additions and 5 deletions
8
dln.c
8
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
|
||||
|
|
Loading…
Add table
Reference in a new issue