summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authoreban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-04-19 08:08:13 +0000
committereban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-04-19 08:08:13 +0000
commitdf0320d8c214152fc32c30f793fceda26ed14d84 (patch)
tree72844436a9ed3ac853b113d850f4ce46eaa8c9df /ext
parentc35413f656c2b80142e2a51969fa4bbd8663f308 (diff)
* ext/socket/extconf.rb: include <windows.h>, <winsock.h> on _WIN32.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@2392 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/socket/extconf.rb28
1 files changed, 19 insertions, 9 deletions
diff --git a/ext/socket/extconf.rb b/ext/socket/extconf.rb
index c795d3f814..c329721029 100644
--- a/ext/socket/extconf.rb
+++ b/ext/socket/extconf.rb
@@ -121,11 +121,16 @@ EOS
end
if try_link(<<EOF)
-#include <sys/types.h>
-#include <netdb.h>
-#include <string.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
+#ifdef _WIN32
+# include <windows.h>
+# include <winsock.h>
+#endif
+# include <sys/types.h>
+# include <netdb.h>
+# include <string.h>
+# include <sys/socket.h>
+# include <netinet/in.h>
+#endif
int
main()
{
@@ -139,10 +144,15 @@ EOF
end
if try_link(<<EOF)
-#include <sys/types.h>
-#include <netdb.h>
-#include <string.h>
-#include <sys/socket.h>
+#ifdef _WIN32
+# include <windows.h>
+# include <winsock.h>
+#endif
+# include <sys/types.h>
+# include <netdb.h>
+# include <string.h>
+# include <sys/socket.h>
+#endif
int
main()
{