summaryrefslogtreecommitdiff
path: root/ext/dl/handle.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-02 02:01:48 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-02 02:01:48 +0000
commit033bed37c84cdc3ca5906b24f12a38779605b9d0 (patch)
tree72abc033de81c810b9f1b0db6910f815c9ed7119 /ext/dl/handle.c
parent46e06b572bca7e7e483a26750c59d8f85de5a2f8 (diff)
* ext/dl/dl.h (dlerror): fixed on Windows.
* ext/dl/handle.c (rb_dlhandle_initialize): returns handle to libruby if nil is given on Windows as dlopen. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/dl/handle.c')
-rw-r--r--ext/dl/handle.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/ext/dl/handle.c b/ext/dl/handle.c
index b8752004bc..c4ee0b9c14 100644
--- a/ext/dl/handle.c
+++ b/ext/dl/handle.c
@@ -67,6 +67,13 @@ rb_dlhandle_initialize(int argc, VALUE argv[], VALUE self)
rb_bug("rb_dlhandle_new");
}
+#if defined(HAVE_WINDOWS_H)
+ if( !clib ){
+ HANDLE rb_libruby_handle(void);
+ ptr = rb_libruby_handle();
+ }
+ else
+#endif
ptr = dlopen(clib, cflag);
#if defined(HAVE_DLERROR)
if( !ptr && (err = dlerror()) ){