1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
nobu 2015-07-21 10:51:14 +00:00
parent c0c20ccb51
commit 6f869a57fe
3 changed files with 9 additions and 0 deletions

View file

@ -66,6 +66,9 @@
#endif
#include <unistd.h>
#else
#if defined(_MSC_VER) && _MSC_VER <= 1200
#include <windows.h>
#endif
#include <winsock2.h>
#include <ws2tcpip.h>
#include <io.h>

View file

@ -59,6 +59,9 @@
#endif
#endif
#ifdef _WIN32
#if defined(_MSC_VER) && _MSC_VER <= 1200
#include <windows.h>
#endif
#include <winsock2.h>
#include <ws2tcpip.h>
#define snprintf _snprintf

View file

@ -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