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:
parent
c0c20ccb51
commit
6f869a57fe
3 changed files with 9 additions and 0 deletions
|
@ -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>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue