From 5b5662eea779eb744d214bd46fc4e4fed67b8d33 Mon Sep 17 00:00:00 2001 From: Danny Smith Date: Sun, 1 Aug 2004 04:29:31 +0000 Subject: [PATCH] configure.in [...] (SYSTEMSPEC): Remove -lwsock32. * configure.in [host *mingw*] (SYSTEMSPEC): Remove -lwsock32. * configure. Regenerate. * include/win32.h: Explicitly include winsock2.h * win32.cc (_Jv_platform_initialize): Require version 2.2 of Winsock api. From-SVN: r85401 --- libjava/ChangeLog | 9 +++++++++ libjava/configure | 2 +- libjava/configure.in | 2 +- libjava/include/win32.h | 2 ++ libjava/win32.cc | 2 +- 5 files changed, 14 insertions(+), 3 deletions(-) diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 213dbcf3998..a08c38662a7 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,12 @@ +2004-08-01 Danny Smith + + PR libgcj/16814 + * configure.in [host *mingw*] (SYSTEMSPEC): Remove -lwsock32. + * configure. Regenerate. + * include/win32.h: Explicitly include winsock2.h + * win32.cc (_Jv_platform_initialize): Require version 2.2 of + Winsock api. + 2004-07-30 Michael Koch * java/util/zip/GZIPInputStream.java diff --git a/libjava/configure b/libjava/configure index ddbb9b3dd43..79166413f58 100755 --- a/libjava/configure +++ b/libjava/configure @@ -3279,7 +3279,7 @@ test -d gnu/java/nio/channels || mkdir gnu/java/nio/channels case "${host}" in *mingw*) - SYSTEMSPEC="-lgdi32 -lwsock32 -lws2_32" + SYSTEMSPEC="-lgdi32 -lws2_32" if test "${with_win32_nlsapi}" = "unicows"; then SYSTEMSPEC="-lunicows $SYSTEMSPEC" fi diff --git a/libjava/configure.in b/libjava/configure.in index ebefa0115fc..dc7b8799353 100644 --- a/libjava/configure.in +++ b/libjava/configure.in @@ -481,7 +481,7 @@ AC_LINK_FILES(gnu/java/nio/channels/natFileChannel${FILE-${PLATFORM}}.cc, gnu/ja case "${host}" in *mingw*) - SYSTEMSPEC="-lgdi32 -lwsock32 -lws2_32" + SYSTEMSPEC="-lgdi32 -lws2_32" if test "${with_win32_nlsapi}" = "unicows"; then SYSTEMSPEC="-lunicows $SYSTEMSPEC" fi diff --git a/libjava/include/win32.h b/libjava/include/win32.h index 8dd2964e637..a660616ae4c 100644 --- a/libjava/include/win32.h +++ b/libjava/include/win32.h @@ -22,6 +22,8 @@ details. */ // Includes #define WIN32_LEAN_AND_MEAN +// Force Winsock 2 interface. +#include #include #undef WIN32_LEAN_AND_MEAN #undef STRICT diff --git a/libjava/win32.cc b/libjava/win32.cc index 027333be738..c337922d296 100644 --- a/libjava/win32.cc +++ b/libjava/win32.cc @@ -256,7 +256,7 @@ _Jv_platform_initialize (void) { // Initialise winsock for networking WSADATA data; - if (WSAStartup (MAKEWORD (1, 1), &data)) + if (WSAStartup (MAKEWORD (2, 2), &data)) MessageBox (NULL, _T("Error initialising winsock library."), _T("Error"), MB_OK | MB_ICONEXCLAMATION); -- 2.30.2