diff --git a/ChangeLog b/ChangeLog index fe8fc495fa..ccf75b642f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +Fri Jun 6 21:51:46 2008 NAKAMURA Usaku + + * win32/Makefile.sub (COMMON_HEADERS): include ws2tcpip.h. + + * ext/socket/addrinfo.h (addrinfo, getaddrinfo, getnameinfo, + freehostent, freeaddrinfo): undef before define because these are + macros in some versions of Windows SDK. + + merged from ruby_1_8. + Fri Jun 6 18:25:43 2008 Nobuyoshi Nakada * test/iconv/utils.rb (default_test): override not to croak. diff --git a/ext/socket/addrinfo.h b/ext/socket/addrinfo.h index a22615ee00..e93adafba6 100644 --- a/ext/socket/addrinfo.h +++ b/ext/socket/addrinfo.h @@ -61,10 +61,15 @@ #undef NI_NUMERICSERV #undef NI_DGRAM +#undef addrinfo #define addrinfo addrinfo__compat +#undef getaddrinfo #define getaddrinfo getaddrinfo__compat +#undef getnameinfo #define getnameinfo getnameinfo__compat +#undef freehostent #define freehostent freehostent__compat +#undef freeaddrinfo #define freeaddrinfo freeaddrinfo__compat #ifndef __P diff --git a/win32/Makefile.sub b/win32/Makefile.sub index d7166f8015..2f90b31a02 100644 --- a/win32/Makefile.sub +++ b/win32/Makefile.sub @@ -261,7 +261,7 @@ COMMON_LIBS = m COMMON_MACROS = WIN32_LEAN_AND_MEAN WIN32 !endif !ifndef COMMON_HEADERS -COMMON_HEADERS = winsock2.h windows.h +COMMON_HEADERS = winsock2.h ws2tcpip.h windows.h !endif arch_hdrdir = $(EXTOUT)/include/$(arch)