aboutsummaryrefslogtreecommitdiffstats
path: root/ext/dl/extconf.rb
diff options
context:
space:
mode:
authorttate <ttate@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-11-08 04:48:35 +0000
committerttate <ttate@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-11-08 04:48:35 +0000
commit0f8d55fa98c37fb2b0925620c10fd305f63acd84 (patch)
tree29ee85a295913f4a3311225b21dadc7a0492feb4 /ext/dl/extconf.rb
parent3d337f360679bed00aafc40d77181016f902e862 (diff)
downloadruby-0f8d55fa98c37fb2b0925620c10fd305f63acd84.tar.gz
Add DL.win32_last_error and DL.last_error.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/dl/extconf.rb')
-rw-r--r--ext/dl/extconf.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/ext/dl/extconf.rb b/ext/dl/extconf.rb
index e712134448..beb15ab04c 100644
--- a/ext/dl/extconf.rb
+++ b/ext/dl/extconf.rb
@@ -127,6 +127,13 @@ if( $with_type_voidp )
$dlconfig_h << "#define WITH_TYPE_VOIDP\n"
end
+if( have_header("windows.h") )
+ have_library("kernel32")
+ have_func("GetLastError", "windows.h")
+ dlc_define("HAVE_WINDOWS_H")
+ have_windows_h = true
+end
+
if( have_header("dlfcn.h") )
dlc_define("HAVE_DLFCN_H")
have_library("dl")
@@ -136,8 +143,7 @@ if( have_header("dlfcn.h") )
if( have_func("dlerror") )
dlc_define("HAVE_DLERROR")
end
-elsif( have_header("windows.h") )
- dlc_define("HAVE_WINDOWS_H")
+elsif ( have_windows_h )
have_func("LoadLibrary")
have_func("FreeLibrary")
have_func("GetProcAddress")