summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwchang0222%aol.com <devnull@localhost>2004-03-23 00:40:17 +0000
committerwchang0222%aol.com <devnull@localhost>2004-03-23 00:40:17 +0000
commitc87b8f31bdd53308d72a7b56da1f56232d516ba6 (patch)
treeecde79ce1c587f2e822f8b0058fc9c447f377d7f
parent4dca2fb272a5ce9d8c49806b3faa5a227bdf6a45 (diff)
downloadnspr-hg-c87b8f31bdd53308d72a7b56da1f56232d516ba6.tar.gz
Bugzilla bug 237870: we figured out how to link the MinGW build against
wsock32.dll (Winsock 1) instead of ws2_32.dll (Winsock 2). r=cls. a=dbaron for mozilla 1.7 final. Modified Files: Tag: NSPRPUB_PRE_4_2_CLIENT_BRANCH pr/src/Makefile.in pr/src/io/prmapopt.c pr/tests/Makefile.in
-rw-r--r--pr/src/Makefile.in2
-rw-r--r--pr/src/io/prmapopt.c15
-rw-r--r--pr/tests/Makefile.in2
3 files changed, 12 insertions, 7 deletions
diff --git a/pr/src/Makefile.in b/pr/src/Makefile.in
index 0969b816..600640cb 100644
--- a/pr/src/Makefile.in
+++ b/pr/src/Makefile.in
@@ -193,7 +193,7 @@ endif
ifeq ($(OS_ARCH),WINNT)
ifdef NS_USE_GCC
-OS_LIBS = -ladvapi32 -lws2_32
+OS_LIBS = -ladvapi32 -lwsock32
else
OS_LIBS = advapi32.lib wsock32.lib
endif
diff --git a/pr/src/io/prmapopt.c b/pr/src/io/prmapopt.c
index d8570ccb..2e6d219a 100644
--- a/pr/src/io/prmapopt.c
+++ b/pr/src/io/prmapopt.c
@@ -46,13 +46,18 @@
* includes winsock.h, with _WIN32_WINNT undefined.
*/
-#ifdef WIN32
-#ifdef __MINGW32__
-#include <winsock2.h>
-#include <ws2tcpip.h>
-#elif defined(WINNT)
+#if defined(WINNT) || defined(__MINGW32__)
#include <winsock.h>
#endif
+
+/* MinGW doesn't define these in its winsock.h. */
+#ifdef __MINGW32__
+#ifndef IP_TTL
+#define IP_TTL 7
+#endif
+#ifndef IP_TOS
+#define IP_TOS 8
+#endif
#endif
#include "primpl.h"
diff --git a/pr/tests/Makefile.in b/pr/tests/Makefile.in
index d340a4b7..58222546 100644
--- a/pr/tests/Makefile.in
+++ b/pr/tests/Makefile.in
@@ -221,7 +221,7 @@ INCLUDES = -I$(dist_includedir) -I$(topsrcdir)/pr/include -I$(topsrcdir)/pr/incl
ifeq ($(OS_ARCH), WINNT)
ifdef NS_USE_GCC
- EXTRA_LIBS += -lws2_32
+ EXTRA_LIBS += -lwsock32
else
EXTRA_LIBS += wsock32.lib
LDOPTS = -NOLOGO -DEBUG -DEBUGTYPE:CV -INCREMENTAL:NO