summaryrefslogtreecommitdiff
path: root/ext/socket
diff options
context:
space:
mode:
authoreban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-04-19 07:29:59 +0000
committereban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-04-19 07:29:59 +0000
commit71e36853ee248929fe5a16a6fd08f906a42a034d (patch)
treeaa1dab9b37fa56bd720f0e8a374f61223a6c55ff /ext/socket
parente7daa72a6a51539121c28a67ed5e7687f1e52a93 (diff)
* ext/socket/extconf.rb: include <windows.h>, <winsock.h> on _WIN32.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket')
-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 46557682a7..c288408946 100644
--- a/ext/socket/extconf.rb
+++ b/ext/socket/extconf.rb
@@ -157,11 +157,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()
{
@@ -175,10 +180,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>
+#else
+# include <sys/types.h>
+# include <netdb.h>
+# include <string.h>
+# include <sys/socket.h>
+#endif
int
main()
{