aboutsummaryrefslogtreecommitdiffstats
path: root/include/ruby/win32.h
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-07-21 10:51:14 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-07-21 10:51:14 +0000
commit6f869a57feddab587f32b0bfa1908af9c3a10c9c (patch)
tree666e31055f564661909ec15112b5017e198a08be /include/ruby/win32.h
parentc0c20ccb519071802e82341f0bb584c9d833b3de (diff)
downloadruby-6f869a57feddab587f32b0bfa1908af9c3a10c9c.tar.gz
ruby/win32.h: include windows.h
* include/ruby/win32.h: include windows.h before winsock2.h, because mswsock.h included by the former uses SOCKET defined after it in the latter. fix a build failure with VC6. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51312 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include/ruby/win32.h')
-rw-r--r--include/ruby/win32.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/ruby/win32.h b/include/ruby/win32.h
index 9daea06323..7bf389d8e1 100644
--- a/include/ruby/win32.h
+++ b/include/ruby/win32.h
@@ -35,6 +35,9 @@ extern "C++" { /* template without extern "C++" */
#if !defined(_WIN64) && !defined(WIN32)
#define WIN32
#endif
+#if defined(_MSC_VER) && _MSC_VER <= 1200
+#include <windows.h>
+#endif
#include <winsock2.h>
#include <ws2tcpip.h>
#if !defined(_MSC_VER) || _MSC_VER >= 1400