summaryrefslogtreecommitdiffstats
path: root/win32/Makefile.sub
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-06-07 01:51:47 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-06-07 01:51:47 +0000
commit8282bdbf559929c9265bf15c8dc10bc350a895d4 (patch)
treefa8c32251e487def968f4e48e23c83d5cdf7d171 /win32/Makefile.sub
parent3a381c19bcff2ecccfe6e38b3d803a9440da22b3 (diff)
downloadruby-8282bdbf559929c9265bf15c8dc10bc350a895d4.tar.gz
ruby-8282bdbf559929c9265bf15c8dc10bc350a895d4.tar.xz
ruby-8282bdbf559929c9265bf15c8dc10bc350a895d4.zip
* win32/{configure.bat, setup.mak, Makefile.sub, win32.h}: add
support new configure option `--with-winsock2'. * win32/win32.c (StartSockets): ditto. * ext/socket/extconf.rb: ditto. * win32/win32.c (open_ifs_socket): new function. * win32/win32.c (StartSockets, rb_w32_socket): use open_ifs_socket() instead of socket(). ifs socket support is backported from trunk. git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@10223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'win32/Makefile.sub')
-rw-r--r--win32/Makefile.sub7
1 files changed, 7 insertions, 0 deletions
diff --git a/win32/Makefile.sub b/win32/Makefile.sub
index 0e1d4fedf..fa8e3dbfd 100644
--- a/win32/Makefile.sub
+++ b/win32/Makefile.sub
@@ -130,7 +130,11 @@ RFLAGS = -r
!if !defined(EXTLIBS)
EXTLIBS =
!endif
+!if !defined(USE_WINSOCK2)
LIBS = oldnames.lib user32.lib advapi32.lib wsock32.lib $(EXTLIBS)
+!else
+LIBS = oldnames.lib user32.lib advapi32.lib ws2_32.lib $(EXTLIBS)
+!endif
MISSING = acosh.obj crypt.obj erf.obj win32.obj
ARFLAGS = -machine:$(MACHINE) -out:
@@ -138,6 +142,9 @@ CC = $(CC) -nologo
LD = $(CC)
LDSHARED = $(LD) -LD
XCFLAGS = -DRUBY_EXPORT -I. -I$(srcdir) -I$(srcdir)/missing
+!if defined(USE_WINSOCK2)
+CPPFLAGS = $(CPPFLAGS) -DUSE_WINSOCK2
+!endif
!if $(MSC_VER) >= 1400
# Prevents VC++ 2005 (cl ver 14) warnings
CPPFLAGS = $(CPPFLAGS) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE