Author: cazfi
Date: Sun Nov  1 19:55:00 2015
New Revision: 30360

URL: http://svn.gna.org/viewcvs/freeciv?rev=30360&view=rev
Log:
Make sure that ws2tcpip.h is never included after windows.h by including it 
before when ever
it might be needed.

See bug #24000

Modified:
    branches/S2_6/client/client_main.c
    branches/S2_6/client/clinet.c
    branches/S2_6/client/connectdlg_common.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/server/civserver.c
    branches/S2_6/server/meta.c
    branches/S2_6/server/sernet.c
    branches/S2_6/server/srv_main.c
    branches/S2_6/utility/fcthread.h
    branches/S2_6/utility/ioz.c
    branches/S2_6/utility/netintf.c
    branches/S2_6/utility/netintf.h
    branches/S2_6/utility/shared.c
    branches/S2_6/utility/support.c

Modified: branches/S2_6/client/client_main.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/client_main.c?rev=30360&r1=30359&r2=30360&view=diff
==============================================================================
--- branches/S2_6/client/client_main.c  (original)
+++ branches/S2_6/client/client_main.c  Sun Nov  1 19:55:00 2015
@@ -15,6 +15,9 @@
 #include <fc_config.h>
 #endif
 
+#ifdef HAVE_WS2TCPIP_H
+#include <ws2tcpip.h>
+#endif
 #ifdef WIN32_NATIVE
 #include <windows.h>   /* LoadLibrary() */
 #endif

Modified: branches/S2_6/client/clinet.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/clinet.c?rev=30360&r1=30359&r2=30360&view=diff
==============================================================================
--- branches/S2_6/client/clinet.c       (original)
+++ branches/S2_6/client/clinet.c       Sun Nov  1 19:55:00 2015
@@ -52,6 +52,9 @@
 #endif
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
+#endif
+#ifdef HAVE_WS2TCPIP_H
+#include <ws2tcpip.h>
 #endif
 #ifdef HAVE_WINSOCK
 #include <winsock.h>

Modified: branches/S2_6/client/connectdlg_common.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/connectdlg_common.c?rev=30360&r1=30359&r2=30360&view=diff
==============================================================================
--- branches/S2_6/client/connectdlg_common.c    (original)
+++ branches/S2_6/client/connectdlg_common.c    Sun Nov  1 19:55:00 2015
@@ -20,6 +20,9 @@
 #include <string.h>
 #include <time.h>
 
+#ifdef HAVE_WS2TCPIP_H
+#include <ws2tcpip.h>
+#endif
 #ifdef WIN32_NATIVE
 #include <windows.h>
 #endif

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=30360&r1=30359&r2=30360&view=diff
==============================================================================
--- branches/S2_6/client/gui-sdl/gui_main.c     (original)
+++ branches/S2_6/client/gui-sdl/gui_main.c     Sun Nov  1 19:55:00 2015
@@ -33,6 +33,9 @@
 #include <unistd.h>
 #endif
 
+#ifdef HAVE_WS2TCPIP_H
+#include <ws2tcpip.h>
+#endif
 #ifdef HAVE_WINSOCK
 #include <winsock.h>
 #endif

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=30360&r1=30359&r2=30360&view=diff
==============================================================================
--- branches/S2_6/client/gui-sdl2/gui_main.c    (original)
+++ branches/S2_6/client/gui-sdl2/gui_main.c    Sun Nov  1 19:55:00 2015
@@ -33,6 +33,9 @@
 #include <unistd.h>
 #endif
 
+#ifdef HAVE_WS2TCPIP_H
+#include <ws2tcpip.h>
+#endif
 #ifdef HAVE_WINSOCK
 #include <winsock.h>
 #endif

Modified: branches/S2_6/client/servers.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/servers.c?rev=30360&r1=30359&r2=30360&view=diff
==============================================================================
--- branches/S2_6/client/servers.c      (original)
+++ branches/S2_6/client/servers.c      Sun Nov  1 19:55:00 2015
@@ -47,6 +47,9 @@
 #endif
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
+#endif
+#ifdef HAVE_WS2TCPIP_H
+#include <ws2tcpip.h>
 #endif
 #ifdef HAVE_WINSOCK
 #include <winsock.h>

Modified: branches/S2_6/common/connection.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/common/connection.c?rev=30360&r1=30359&r2=30360&view=diff
==============================================================================
--- branches/S2_6/common/connection.c   (original)
+++ branches/S2_6/common/connection.c   Sun Nov  1 19:55:00 2015
@@ -28,6 +28,9 @@
 #endif
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
+#endif
+#ifdef HAVE_WS2TCPIP_H
+#include <ws2tcpip.h>
 #endif
 #ifdef HAVE_WINSOCK
 #include <winsock.h>

Modified: branches/S2_6/common/dataio.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/common/dataio.c?rev=30360&r1=30359&r2=30360&view=diff
==============================================================================
--- branches/S2_6/common/dataio.c       (original)
+++ branches/S2_6/common/dataio.c       Sun Nov  1 19:55:00 2015
@@ -41,6 +41,9 @@
 #endif
 #ifdef HAVE_ARPA_INET_H
 #include <arpa/inet.h>
+#endif
+#ifdef HAVE_WS2TCPIP_H
+#include <ws2tcpip.h>
 #endif
 #ifdef HAVE_WINSOCK
 #include <winsock.h>

Modified: branches/S2_6/common/packets.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/common/packets.c?rev=30360&r1=30359&r2=30360&view=diff
==============================================================================
--- branches/S2_6/common/packets.c      (original)
+++ branches/S2_6/common/packets.c      Sun Nov  1 19:55:00 2015
@@ -25,6 +25,9 @@
 #endif
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
+#endif
+#ifdef HAVE_WS2TCPIP_H
+#include <ws2tcpip.h>
 #endif
 #ifdef HAVE_WINSOCK
 #include <winsock.h>

Modified: branches/S2_6/server/civserver.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/server/civserver.c?rev=30360&r1=30359&r2=30360&view=diff
==============================================================================
--- branches/S2_6/server/civserver.c    (original)
+++ branches/S2_6/server/civserver.c    Sun Nov  1 19:55:00 2015
@@ -32,6 +32,9 @@
 #include <Dialogs.h>
 #endif
 
+#ifdef HAVE_WS2TCPIP_H
+#include <ws2tcpip.h>
+#endif
 #ifdef WIN32_NATIVE
 #include <windows.h>
 #endif

Modified: branches/S2_6/server/meta.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/server/meta.c?rev=30360&r1=30359&r2=30360&view=diff
==============================================================================
--- branches/S2_6/server/meta.c (original)
+++ branches/S2_6/server/meta.c Sun Nov  1 19:55:00 2015
@@ -35,6 +35,9 @@
 #endif
 #ifdef HAVE_ARPA_INET_H
 #include <arpa/inet.h>
+#endif
+#ifdef HAVE_WS2TCPIP_H
+#include <ws2tcpip.h>
 #endif
 #ifdef HAVE_WINSOCK
 #include <winsock.h>

Modified: branches/S2_6/server/sernet.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/server/sernet.c?rev=30360&r1=30359&r2=30360&view=diff
==============================================================================
--- branches/S2_6/server/sernet.c       (original)
+++ branches/S2_6/server/sernet.c       Sun Nov  1 19:55:00 2015
@@ -54,6 +54,9 @@
 #endif
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
+#endif
+#ifdef HAVE_WS2TCPIP_H
+#include <ws2tcpip.h>
 #endif
 #ifdef HAVE_WINSOCK
 #include <winsock.h>

Modified: branches/S2_6/server/srv_main.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/server/srv_main.c?rev=30360&r1=30359&r2=30360&view=diff
==============================================================================
--- branches/S2_6/server/srv_main.c     (original)
+++ branches/S2_6/server/srv_main.c     Sun Nov  1 19:55:00 2015
@@ -38,6 +38,9 @@
 #endif
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
+#endif
+#ifdef HAVE_WS2TCPIP_H
+#include <ws2tcpip.h>
 #endif
 #ifdef HAVE_WINSOCK
 #include <winsock.h>

Modified: branches/S2_6/utility/fcthread.h
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/utility/fcthread.h?rev=30360&r1=30359&r2=30360&view=diff
==============================================================================
--- branches/S2_6/utility/fcthread.h    (original)
+++ branches/S2_6/utility/fcthread.h    Sun Nov  1 19:55:00 2015
@@ -23,6 +23,13 @@
 
 /* utility */
 #include "support.h" /* bool */
+
+
+/* No way needed by threading, but if the one including us will ever need it, 
it can't be included
+ * after we have included <windows.h> directly or indirectly. */
+#ifdef HAVE_WS2TCPIP_H
+#include <ws2tcpip.h>
+#endif
 
 
 #ifdef FREECIV_HAVE_C11_THREADS

Modified: branches/S2_6/utility/ioz.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/utility/ioz.c?rev=30360&r1=30359&r2=30360&view=diff
==============================================================================
--- branches/S2_6/utility/ioz.c (original)
+++ branches/S2_6/utility/ioz.c Sun Nov  1 19:55:00 2015
@@ -37,6 +37,10 @@
 #include <stdarg.h>
 #include <stdio.h>
 #include <string.h>
+
+#ifdef HAVE_WS2TCPIP_H
+#include <ws2tcpip.h>
+#endif
 
 #ifdef FREECIV_HAVE_LIBZ
 #include <zlib.h>

Modified: branches/S2_6/utility/netintf.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/utility/netintf.c?rev=30360&r1=30359&r2=30360&view=diff
==============================================================================
--- branches/S2_6/utility/netintf.c     (original)
+++ branches/S2_6/utility/netintf.c     Sun Nov  1 19:55:00 2015
@@ -42,6 +42,9 @@
 #endif
 #ifdef HAVE_SYS_SIGNAL_H
 #include <sys/signal.h>
+#endif
+#ifdef HAVE_WS2TCPIP_H
+#include <ws2tcpip.h>
 #endif
 #ifdef HAVE_WINSOCK
 #include <winsock.h>

Modified: branches/S2_6/utility/netintf.h
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/utility/netintf.h?rev=30360&r1=30359&r2=30360&view=diff
==============================================================================
--- branches/S2_6/utility/netintf.h     (original)
+++ branches/S2_6/utility/netintf.h     Sun Nov  1 19:55:00 2015
@@ -40,13 +40,14 @@
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
+#ifdef HAVE_WS2TCPIP_H
+#include <ws2tcpip.h>
+#endif
 #ifdef HAVE_WINSOCK
 #include <winsock.h>
 #endif
-#ifdef HAVE_WS2TCPIP_H
-#include <ws2tcpip.h>
-#endif
 
+/* utility */
 #include "ioz.h"
 #include "support.h"            /* bool type */
 

Modified: branches/S2_6/utility/shared.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/utility/shared.c?rev=30360&r1=30359&r2=30360&view=diff
==============================================================================
--- branches/S2_6/utility/shared.c      (original)
+++ branches/S2_6/utility/shared.c      Sun Nov  1 19:55:00 2015
@@ -39,6 +39,9 @@
 #endif
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
+#endif
+#ifdef HAVE_WS2TCPIP_H
+#include <ws2tcpip.h>
 #endif
 #ifdef WIN32_NATIVE
 #include <windows.h>

Modified: branches/S2_6/utility/support.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/utility/support.c?rev=30360&r1=30359&r2=30360&view=diff
==============================================================================
--- branches/S2_6/utility/support.c     (original)
+++ branches/S2_6/utility/support.c     Sun Nov  1 19:55:00 2015
@@ -76,6 +76,9 @@
 #endif
 #ifdef FREECIV_HAVE_LIBZ
 #include <zlib.h>
+#endif
+#ifdef HAVE_WS2TCPIP_H
+#include <ws2tcpip.h>
 #endif
 #ifdef WIN32_NATIVE
 #include <process.h>


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

Reply via email to