From 033bed37c84cdc3ca5906b24f12a38779605b9d0 Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 2 Mar 2009 02:01:48 +0000 Subject: * 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 --- ext/dl/dl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/dl/dl.h') diff --git a/ext/dl/dl.h b/ext/dl/dl.h index 753bd1c976..fb904bc561 100644 --- a/ext/dl/dl.h +++ b/ext/dl/dl.h @@ -24,7 +24,7 @@ # include # define dlclose(ptr) FreeLibrary((HINSTANCE)ptr) # define dlopen(name,flag) ((void*)LoadLibrary(name)) -# define dlerror() "unknown error" +# define dlerror() strerror(rb_w32_map_errno(GetLastError())) # define dlsym(handle,name) ((void*)GetProcAddress(handle,name)) # define RTLD_LAZY -1 # define RTLD_NOW -1 -- cgit v1.2.3