Author: cazfi
Date: Sun Nov 15 14:39:18 2015
New Revision: 30615

URL: http://svn.gna.org/viewcvs/freeciv?rev=30615&view=rev
Log:
Use winsock2 on Windows builds.

See patch #6533

Modified:
    branches/S2_6/client/clinet.c
    branches/S2_6/client/gui-sdl/gui_main.c
    branches/S2_6/client/gui-sdl2/gui_main.c
    branches/S2_6/client/servers.c
    branches/S2_6/common/connection.c
    branches/S2_6/common/dataio.c
    branches/S2_6/common/packets.c
    branches/S2_6/configure.ac
    branches/S2_6/gen_headers/freeciv_config.h.in
    branches/S2_6/server/meta.c
    branches/S2_6/server/sernet.c
    branches/S2_6/server/srv_main.c
    branches/S2_6/utility/netintf.c
    branches/S2_6/utility/netintf.h
    branches/S2_6/utility/support.c

Modified: branches/S2_6/client/clinet.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/clinet.c?rev=30615&r1=30614&r2=30615&view=diff
==============================================================================
--- branches/S2_6/client/clinet.c       (original)
+++ branches/S2_6/client/clinet.c       Sun Nov 15 14:39:18 2015
@@ -57,7 +57,11 @@
 #include <ws2tcpip.h>
 #endif
 #ifdef FREECIV_HAVE_WINSOCK
+#ifdef FREECIV_HAVE_WINSOCK2
+#include <winsock2.h>
+#else
 #include <winsock.h>
+#endif
 #endif
 
 /* utility */

Modified: branches/S2_6/client/gui-sdl/gui_main.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-sdl/gui_main.c?rev=30615&r1=30614&r2=30615&view=diff
==============================================================================
--- branches/S2_6/client/gui-sdl/gui_main.c     (original)
+++ branches/S2_6/client/gui-sdl/gui_main.c     Sun Nov 15 14:39:18 2015
@@ -37,7 +37,11 @@
 #include <ws2tcpip.h>
 #endif
 #ifdef FREECIV_HAVE_WINSOCK
+#ifdef FREECIV_HAVE_WINSOCK2
+#include <winsock2.h>
+#else
 #include <winsock.h>
+#endif
 #endif
 
 /* SDL */

Modified: branches/S2_6/client/gui-sdl2/gui_main.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-sdl2/gui_main.c?rev=30615&r1=30614&r2=30615&view=diff
==============================================================================
--- branches/S2_6/client/gui-sdl2/gui_main.c    (original)
+++ branches/S2_6/client/gui-sdl2/gui_main.c    Sun Nov 15 14:39:18 2015
@@ -37,7 +37,11 @@
 #include <ws2tcpip.h>
 #endif
 #ifdef FREECIV_HAVE_WINSOCK
+#ifdef FREECIV_HAVE_WINSOCK2
+#include <winsock2.h>
+#else
 #include <winsock.h>
+#endif
 #endif
 
 /* SDL */

Modified: branches/S2_6/client/servers.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/servers.c?rev=30615&r1=30614&r2=30615&view=diff
==============================================================================
--- branches/S2_6/client/servers.c      (original)
+++ branches/S2_6/client/servers.c      Sun Nov 15 14:39:18 2015
@@ -52,7 +52,11 @@
 #include <ws2tcpip.h>
 #endif
 #ifdef FREECIV_HAVE_WINSOCK
+#ifdef FREECIV_HAVE_WINSOCK2
+#include <winsock2.h>
+#else
 #include <winsock.h>
+#endif
 #endif
 
 /* dependencies */

Modified: branches/S2_6/common/connection.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/common/connection.c?rev=30615&r1=30614&r2=30615&view=diff
==============================================================================
--- branches/S2_6/common/connection.c   (original)
+++ branches/S2_6/common/connection.c   Sun Nov 15 14:39:18 2015
@@ -33,7 +33,11 @@
 #include <ws2tcpip.h>
 #endif
 #ifdef FREECIV_HAVE_WINSOCK
+#ifdef FREECIV_HAVE_WINSOCK2
+#include <winsock2.h>
+#else
 #include <winsock.h>
+#endif
 #endif
 
 /* utility */

Modified: branches/S2_6/common/dataio.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/common/dataio.c?rev=30615&r1=30614&r2=30615&view=diff
==============================================================================
--- branches/S2_6/common/dataio.c       (original)
+++ branches/S2_6/common/dataio.c       Sun Nov 15 14:39:18 2015
@@ -46,7 +46,11 @@
 #include <ws2tcpip.h>
 #endif
 #ifdef FREECIV_HAVE_WINSOCK
+#ifdef FREECIV_HAVE_WINSOCK2
+#include <winsock2.h>
+#else
 #include <winsock.h>
+#endif
 #endif
 
 /* utility */

Modified: branches/S2_6/common/packets.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/common/packets.c?rev=30615&r1=30614&r2=30615&view=diff
==============================================================================
--- branches/S2_6/common/packets.c      (original)
+++ branches/S2_6/common/packets.c      Sun Nov 15 14:39:18 2015
@@ -30,7 +30,11 @@
 #include <ws2tcpip.h>
 #endif
 #ifdef FREECIV_HAVE_WINSOCK
+#ifdef FREECIV_HAVE_WINSOCK2
+#include <winsock2.h>
+#else
 #include <winsock.h>
+#endif
 #endif
 
 /* utility */

Modified: branches/S2_6/configure.ac
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/configure.ac?rev=30615&r1=30614&r2=30615&view=diff
==============================================================================
--- branches/S2_6/configure.ac  (original)
+++ branches/S2_6/configure.ac  Sun Nov 15 14:39:18 2015
@@ -604,8 +604,10 @@
     AC_DEFINE([ALWAYS_ROOT], [1], [Can execute program as root - Mingw32])
     AC_DEFINE([WIN32_NATIVE], [1], [Mingw32-specific setting - native])
     AC_DEFINE([FREECIV_HAVE_WINSOCK], [1], [Mingw32-specific setting - 
winsock])
+    AC_DEFINE([FREECIV_HAVE_WINSOCK2], [1], [Mingw32-specific setting - 
winsock2])
     AC_DEFINE([NONBLOCKING_SOCKETS], [1], [nonblocking sockets support])
-    LIBS="$LIBS -lwsock32"
+    dnl Without WINSOCK2, use: LIBS="$LIBS -lwsock32"
+    LIBS="${LIBS} -lws2_32"
     ;;
 
   *skyos*)

Modified: branches/S2_6/gen_headers/freeciv_config.h.in
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/gen_headers/freeciv_config.h.in?rev=30615&r1=30614&r2=30615&view=diff
==============================================================================
--- branches/S2_6/gen_headers/freeciv_config.h.in       (original)
+++ branches/S2_6/gen_headers/freeciv_config.h.in       Sun Nov 15 14:39:18 2015
@@ -80,8 +80,11 @@
 /* jansson network protocol in use */
 #undef FREECIV_JSON_CONNECTION
 
-/* uses winsock */
+/* uses some winsock version */
 #undef FREECIV_HAVE_WINSOCK
+
+/* uses winsock2 */
+#undef FREECIV_HAVE_WINSOCK2
 
 /* Extra debugging support */
 #undef FREECIV_DEBUG

Modified: branches/S2_6/server/meta.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/server/meta.c?rev=30615&r1=30614&r2=30615&view=diff
==============================================================================
--- branches/S2_6/server/meta.c (original)
+++ branches/S2_6/server/meta.c Sun Nov 15 14:39:18 2015
@@ -40,7 +40,11 @@
 #include <ws2tcpip.h>
 #endif
 #ifdef FREECIV_HAVE_WINSOCK
+#ifdef FREECIV_HAVE_WINSOCK2
+#include <winsock2.h>
+#else
 #include <winsock.h>
+#endif
 #endif
 
 /* utility */

Modified: branches/S2_6/server/sernet.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/server/sernet.c?rev=30615&r1=30614&r2=30615&view=diff
==============================================================================
--- branches/S2_6/server/sernet.c       (original)
+++ branches/S2_6/server/sernet.c       Sun Nov 15 14:39:18 2015
@@ -59,7 +59,11 @@
 #include <ws2tcpip.h>
 #endif
 #ifdef FREECIV_HAVE_WINSOCK
+#ifdef FREECIV_HAVE_WINSOCK2
+#include <winsock2.h>
+#else
 #include <winsock.h>
+#endif
 #endif
 
 /* utility */

Modified: branches/S2_6/server/srv_main.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/server/srv_main.c?rev=30615&r1=30614&r2=30615&view=diff
==============================================================================
--- branches/S2_6/server/srv_main.c     (original)
+++ branches/S2_6/server/srv_main.c     Sun Nov 15 14:39:18 2015
@@ -43,7 +43,11 @@
 #include <ws2tcpip.h>
 #endif
 #ifdef FREECIV_HAVE_WINSOCK
+#ifdef FREECIV_HAVE_WINSOCK2
+#include <winsock2.h>
+#else
 #include <winsock.h>
+#endif
 #endif
 
 /* utility */

Modified: branches/S2_6/utility/netintf.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/utility/netintf.c?rev=30615&r1=30614&r2=30615&view=diff
==============================================================================
--- branches/S2_6/utility/netintf.c     (original)
+++ branches/S2_6/utility/netintf.c     Sun Nov 15 14:39:18 2015
@@ -47,7 +47,11 @@
 #include <ws2tcpip.h>
 #endif
 #ifdef FREECIV_HAVE_WINSOCK
+#ifdef FREECIV_HAVE_WINSOCK2
+#include <winsock2.h>
+#else
 #include <winsock.h>
+#endif
 #endif
 #ifdef WIN32_NATIVE
 #include <windows.h>   /* GetTempPath */

Modified: branches/S2_6/utility/netintf.h
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/utility/netintf.h?rev=30615&r1=30614&r2=30615&view=diff
==============================================================================
--- branches/S2_6/utility/netintf.h     (original)
+++ branches/S2_6/utility/netintf.h     Sun Nov 15 14:39:18 2015
@@ -46,7 +46,11 @@
 #include <ws2tcpip.h>
 #endif
 #ifdef FREECIV_HAVE_WINSOCK
+#ifdef FREECIV_HAVE_WINSOCK2
+#include <winsock2.h>
+#else
 #include <winsock.h>
+#endif
 #endif
 
 /* utility */

Modified: branches/S2_6/utility/support.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/utility/support.c?rev=30615&r1=30614&r2=30615&view=diff
==============================================================================
--- branches/S2_6/utility/support.c     (original)
+++ branches/S2_6/utility/support.c     Sun Nov 15 14:39:18 2015
@@ -85,7 +85,11 @@
 #include <windows.h>
 #endif
 #ifdef FREECIV_HAVE_WINSOCK
+#ifdef FREECIV_HAVE_WINSOCK2
+#include <winsock2.h>
+#else
 #include <winsock.h>
+#endif
 #endif
 #ifdef HAVE_STRINGS_H
 #  include <strings.h>


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to