summaryrefslogtreecommitdiff
path: root/ext/extmk.rb.in
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-06-05 08:46:59 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-06-05 08:46:59 +0000
commitecd1aab5266315f947b0568cb56fab4f63453c83 (patch)
tree01d36aee863b377fd1d10902e134e4483d647597 /ext/extmk.rb.in
parent76d09411e9db597c537bd39124db47cde2d6f3c4 (diff)
2000-06-05
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/extmk.rb.in')
-rw-r--r--ext/extmk.rb.in16
1 files changed, 16 insertions, 0 deletions
diff --git a/ext/extmk.rb.in b/ext/extmk.rb.in
index 0c134671ec..44232da7a1 100644
--- a/ext/extmk.rb.in
+++ b/ext/extmk.rb.in
@@ -174,8 +174,16 @@ def have_library(lib, func="main")
#include <windows.h>
#include <winsock.h>
int main() { return 0; }
+int t() { #{func}(); return 0; }
+SRC
+ unless r
+ r = try_link(<<"SRC", libs)
+#include <windows.h>
+#include <winsock.h>
+int main() { return 0; }
int t() { void ((*p)()); p = (void ((*)()))#{func}; return 0; }
SRC
+ end
else
r = try_link(<<"SRC", libs)
int main() { return 0; }
@@ -218,8 +226,16 @@ def have_func(func)
#include <windows.h>
#include <winsock.h>
int main() { return 0; }
+int t() { #{func}(); return 0; }
+SRC
+ unless r
+ r = try_link(<<"SRC", libs)
+#include <windows.h>
+#include <winsock.h>
+int main() { return 0; }
int t() { void ((*p)()); p = (void ((*)()))#{func}; return 0; }
SRC
+ end
else
r = try_link(<<"SRC", libs)
int main() { return 0; }