Skip to content

Commit

Permalink
Merge changes from ruby_1_8 that fixes build with Visual C++ 8 with
Browse files Browse the repository at this point in the history
Winsock2.

* 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.

* win32/setup.mak: maybe commit miss.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@16866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
knu committed Jun 6, 2008
1 parent 2b785b0 commit 9e469fb
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 4 deletions.
10 changes: 10 additions & 0 deletions ChangeLog
@@ -1,3 +1,13 @@
Fri Jun 6 21:16:55 2008 NAKAMURA Usaku <usa@ruby-lang.org>

* 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.

* win32/setup.mak: maybe commit miss.

Fri Jun 6 19:34:22 2008 Akinori MUSHA <knu@iDaemons.org>

* mkconfig.rb: hide build path from rbconfig.rb.
Expand Down
5 changes: 5 additions & 0 deletions ext/socket/addrinfo.h
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion version.h
Expand Up @@ -2,7 +2,7 @@
#define RUBY_RELEASE_DATE "2008-06-06"
#define RUBY_VERSION_CODE 187
#define RUBY_RELEASE_CODE 20080606
#define RUBY_PATCHLEVEL 9
#define RUBY_PATCHLEVEL 10

#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 8
Expand Down
2 changes: 1 addition & 1 deletion win32/Makefile.sub
Expand Up @@ -249,7 +249,7 @@ COMMON_MACROS = WIN32_LEAN_AND_MEAN WIN32
!if !defined(USE_WINSOCK2)
COMMON_HEADERS = winsock.h
!else
COMMON_HEADERS = winsock2.h
COMMON_HEADERS = winsock2.h ws2tcpip.h
!endif
COMMON_HEADERS = $(COMMON_HEADERS) windows.h
!endif
Expand Down
4 changes: 2 additions & 2 deletions win32/setup.mak
Expand Up @@ -41,8 +41,8 @@ MAKE = nmake
srcdir = $(srcdir:\=/)
prefix = $(prefix:\=/)
EXTSTATIC = $(EXTSTATIC)
!if "$(USE_WINSOCK2)" != "0"
USE_WINSOCK2 = 1
!if defined(USE_WINSOCK2)
USE_WINSOCK2 = $(USE_WINSOCK2)
!endif
!if defined(RDOCTARGET)
RDOCTARGET = $(RDOCTARGET)
Expand Down

0 comments on commit 9e469fb

Please sign in to comment.