mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
iphlpapi is unavailable with older VC
* include/ruby/win32.h, win32/Makefile.sub, win32/win32.c: iphlpapi is not available with older Visual C. works with VC9 or later at least. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40724 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e6589b2b55
commit
cd9165458b
3 changed files with 9 additions and 1 deletions
|
@ -37,7 +37,9 @@ extern "C++" { /* template without extern "C++" */
|
|||
#endif
|
||||
#include <winsock2.h>
|
||||
#include <ws2tcpip.h>
|
||||
#if !defined(_MSC_VER) || _MSC_VER >= 1400
|
||||
#include <iphlpapi.h>
|
||||
#endif
|
||||
#if defined(__cplusplus) && defined(_MSC_VER)
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -227,7 +227,11 @@ EXTLIBS =
|
|||
EXTSOLIBS =
|
||||
!endif
|
||||
!if !defined(LIBS)
|
||||
LIBS = oldnames.lib user32.lib advapi32.lib shell32.lib ws2_32.lib iphlpapi.lib imagehlp.lib shlwapi.lib $(EXTLIBS)
|
||||
LIBS = oldnames.lib user32.lib advapi32.lib shell32.lib ws2_32.lib
|
||||
!if $(MSC_VER) >= 1400
|
||||
LIBS = $(LIBS) iphlpapi.lib
|
||||
!endif
|
||||
LIBS = $(LIBS) imagehlp.lib shlwapi.lib $(EXTLIBS)
|
||||
!endif
|
||||
!if !defined(MISSING)
|
||||
MISSING = acosh.obj cbrt.obj crypt.obj erf.obj ffs.obj langinfo.obj lgamma_r.obj strlcat.obj strlcpy.obj tgamma.obj win32/win32.obj win32/file.obj setproctitle.obj
|
||||
|
|
|
@ -3736,6 +3736,7 @@ socketpair(int af, int type, int protocol, int *sv)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#if !defined(_MSC_VER) || _MSC_VER >= 1400
|
||||
/* License: Ruby's */
|
||||
static void
|
||||
str2guid(const char *str, GUID *guid)
|
||||
|
@ -3879,6 +3880,7 @@ freeifaddrs(struct ifaddrs *ifp)
|
|||
ifp = next;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
//
|
||||
// Networking stubs
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue