Author: cazfi
Date: Tue Dec  8 11:21:02 2015
New Revision: 30879

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

See patch #6533

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

Modified: branches/S2_5/client/clinet.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/clinet.c?rev=30879&r1=30878&r2=30879&view=diff
==============================================================================
--- branches/S2_5/client/clinet.c       (original)
+++ branches/S2_5/client/clinet.c       Tue Dec  8 11:21:02 2015
@@ -54,8 +54,12 @@
 #include <unistd.h>
 #endif
 #ifdef HAVE_WINSOCK
+#ifdef HAVE_WINSOCK2
+#include <winsock2.h>
+#else  /* HAVE_WINSOCK2 */
 #include <winsock.h>
-#endif
+#endif /* HAVE_WINSOCK2 */
+#endif /* HAVE_WINSOCK */
 
 /* utility */
 #include "capstr.h"

Modified: branches/S2_5/client/gui-sdl/gui_main.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/gui-sdl/gui_main.c?rev=30879&r1=30878&r2=30879&view=diff
==============================================================================
--- branches/S2_5/client/gui-sdl/gui_main.c     (original)
+++ branches/S2_5/client/gui-sdl/gui_main.c     Tue Dec  8 11:21:02 2015
@@ -34,8 +34,12 @@
 #endif
 
 #ifdef HAVE_WINSOCK
+#ifdef HAVE_WINSOCK2
+#include <winsock2.h>
+#else  /* HAVE_WINSOCK2 */
 #include <winsock.h>
-#endif
+#endif /* HAVE_WINSOCK2 */
+#endif /* HAVE_WINSOCK */
 
 #include "SDL.h"
 

Modified: branches/S2_5/client/servers.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/servers.c?rev=30879&r1=30878&r2=30879&view=diff
==============================================================================
--- branches/S2_5/client/servers.c      (original)
+++ branches/S2_5/client/servers.c      Tue Dec  8 11:21:02 2015
@@ -49,8 +49,12 @@
 #include <unistd.h>
 #endif
 #ifdef HAVE_WINSOCK
+#ifdef HAVE_WINSOCK2
+#include <winsock2.h>
+#else  /* HAVE_WINSOCK2 */
 #include <winsock.h>
-#endif
+#endif /* HAVE_WINSOCK2 */
+#endif /* HAVE_WINSOCK */
 
 /* dependencies */
 #include "cvercmp.h"

Modified: branches/S2_5/common/connection.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/common/connection.c?rev=30879&r1=30878&r2=30879&view=diff
==============================================================================
--- branches/S2_5/common/connection.c   (original)
+++ branches/S2_5/common/connection.c   Tue Dec  8 11:21:02 2015
@@ -30,8 +30,12 @@
 #include <unistd.h>
 #endif
 #ifdef HAVE_WINSOCK
+#ifdef HAVE_WINSOCK2
+#include <winsock2.h>
+#else  /* HAVE_WINSOCK2 */
 #include <winsock.h>
-#endif
+#endif /* HAVE_WINSOCK2 */
+#endif /* HAVE_WINSOCK */
 
 /* utility */
 #include "fcintl.h"

Modified: branches/S2_5/common/dataio.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/common/dataio.c?rev=30879&r1=30878&r2=30879&view=diff
==============================================================================
--- branches/S2_5/common/dataio.c       (original)
+++ branches/S2_5/common/dataio.c       Tue Dec  8 11:21:02 2015
@@ -43,8 +43,12 @@
 #include <arpa/inet.h>
 #endif
 #ifdef HAVE_WINSOCK
+#ifdef HAVE_WINSOCK2
+#include <winsock2.h>
+#else  /* HAVE_WINSOCK2 */
 #include <winsock.h>
-#endif
+#endif /* HAVE_WINSOCK2 */
+#endif /* HAVE_WINSOCK */
 
 /* utility */
 #include "bitvector.h"

Modified: branches/S2_5/common/packets.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/common/packets.c?rev=30879&r1=30878&r2=30879&view=diff
==============================================================================
--- branches/S2_5/common/packets.c      (original)
+++ branches/S2_5/common/packets.c      Tue Dec  8 11:21:02 2015
@@ -27,8 +27,12 @@
 #include <netinet/in.h>
 #endif
 #ifdef HAVE_WINSOCK
+#ifdef HAVE_WINSOCK2
+#include <winsock2.h>
+#else  /* HAVE_WINSOCK2 */
 #include <winsock.h>
-#endif
+#endif /* HAVE_WINSOCK2 */
+#endif /* HAVE_WINSOCK */
 
 /* utility */
 #include "capability.h"

Modified: branches/S2_5/configure.ac
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/configure.ac?rev=30879&r1=30878&r2=30879&view=diff
==============================================================================
--- branches/S2_5/configure.ac  (original)
+++ branches/S2_5/configure.ac  Tue Dec  8 11:21:02 2015
@@ -664,8 +664,10 @@
     AC_DEFINE([ALWAYS_ROOT], [1], [Can execute program as root - Mingw32])
     AC_DEFINE([WIN32_NATIVE], [1], [Mingw32-specific setting - native])
     AC_DEFINE([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_5/server/meta.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/server/meta.c?rev=30879&r1=30878&r2=30879&view=diff
==============================================================================
--- branches/S2_5/server/meta.c (original)
+++ branches/S2_5/server/meta.c Tue Dec  8 11:21:02 2015
@@ -37,8 +37,12 @@
 #include <arpa/inet.h>
 #endif
 #ifdef HAVE_WINSOCK
+#ifdef HAVE_WINSOCK2
+#include <winsock2.h>
+#else  /* HAVE_WINSOCK2 */
 #include <winsock.h>
-#endif
+#endif /* HAVE_WINSOCK2 */
+#endif /* HAVE_WINSOCK */
 
 /* utility */
 #include "fcintl.h"

Modified: branches/S2_5/server/sernet.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/server/sernet.c?rev=30879&r1=30878&r2=30879&view=diff
==============================================================================
--- branches/S2_5/server/sernet.c       (original)
+++ branches/S2_5/server/sernet.c       Tue Dec  8 11:21:02 2015
@@ -56,8 +56,12 @@
 #include <unistd.h>
 #endif
 #ifdef HAVE_WINSOCK
+#ifdef HAVE_WINSOCK2
+#include <winsock2.h>
+#else  /* HAVE_WINSOCK2 */
 #include <winsock.h>
-#endif
+#endif /* HAVE_WINSOCK2 */
+#endif /* HAVE_WINSOCK */
 
 /* utility */
 #include "capability.h"

Modified: branches/S2_5/server/srv_main.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/server/srv_main.c?rev=30879&r1=30878&r2=30879&view=diff
==============================================================================
--- branches/S2_5/server/srv_main.c     (original)
+++ branches/S2_5/server/srv_main.c     Tue Dec  8 11:21:02 2015
@@ -40,8 +40,12 @@
 #include <unistd.h>
 #endif
 #ifdef HAVE_WINSOCK
+#ifdef HAVE_WINSOCK2
+#include <winsock2.h>
+#else  /* HAVE_WINSOCK2 */
 #include <winsock.h>
-#endif
+#endif /* HAVE_WINSOCK2 */
+#endif /* HAVE_WINSOCK */
 
 /* utility */
 #include "astring.h"

Modified: branches/S2_5/utility/netintf.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/utility/netintf.c?rev=30879&r1=30878&r2=30879&view=diff
==============================================================================
--- branches/S2_5/utility/netintf.c     (original)
+++ branches/S2_5/utility/netintf.c     Tue Dec  8 11:21:02 2015
@@ -44,8 +44,12 @@
 #include <sys/signal.h>
 #endif
 #ifdef HAVE_WINSOCK
+#ifdef HAVE_WINSOCK2
+#include <winsock2.h>
+#else  /* HAVE_WINSOCK2 */
 #include <winsock.h>
-#endif
+#endif /* HAVE_WINSOCK2 */
+#endif /* HAVE_WINSOCK */
 #ifdef WIN32_NATIVE
 #include <windows.h>   /* GetTempPath */
 #endif

Modified: branches/S2_5/utility/netintf.h
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/utility/netintf.h?rev=30879&r1=30878&r2=30879&view=diff
==============================================================================
--- branches/S2_5/utility/netintf.h     (original)
+++ branches/S2_5/utility/netintf.h     Tue Dec  8 11:21:02 2015
@@ -41,8 +41,12 @@
 #include <unistd.h>
 #endif
 #ifdef HAVE_WINSOCK
+#ifdef HAVE_WINSOCK2
+#include <winsock2.h>
+#else  /* HAVE_WINSOCK2 */
 #include <winsock.h>
-#endif
+#endif /* HAVE_WINSOCK2 */
+#endif /* HAVE_WINSOCK */
 
 /* utility */
 #include "ioz.h"

Modified: branches/S2_5/utility/support.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/utility/support.c?rev=30879&r1=30878&r2=30879&view=diff
==============================================================================
--- branches/S2_5/utility/support.c     (original)
+++ branches/S2_5/utility/support.c     Tue Dec  8 11:21:02 2015
@@ -82,8 +82,12 @@
 #include <windows.h>
 #endif
 #ifdef HAVE_WINSOCK
+#ifdef HAVE_WINSOCK2
+#include <winsock2.h>
+#else  /* HAVE_WINSOCK2 */
 #include <winsock.h>
-#endif
+#endif /* HAVE_WINSOCK2 */
+#endif /* HAVE_WINSOCK */
 #ifdef HAVE_STRINGS_H
 #  include <strings.h>
 #endif


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

Reply via email to