Author: cazfi
Date: Thu Jan 28 02:02:22 2016
New Revision: 31645

URL: http://svn.gna.org/viewcvs/freeciv?rev=31645&view=rev
Log:
Added configure check to make sure direct.h is available before trying to 
include it.

See bug #24292

Modified:
    branches/S2_5/configure.ac
    branches/S2_5/utility/shared.c

Modified: branches/S2_5/configure.ac
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/configure.ac?rev=31645&r1=31644&r2=31645&view=diff
==============================================================================
--- branches/S2_5/configure.ac  (original)
+++ branches/S2_5/configure.ac  Thu Jan 28 02:02:22 2016
@@ -688,6 +688,8 @@
     AC_DEFINE([HAVE_WINSOCK], [1], [Mingw32-specific setting - winsock])
     AC_DEFINE([HAVE_WINSOCK2], [1], [Mingw32-specific setting - winsock2])
     AC_DEFINE([NONBLOCKING_SOCKETS], [1], [nonblocking sockets support])
+    AC_CHECK_HEADERS([direct.h])
+
     dnl Without WINSOCK2, use: LIBS="$LIBS -lwsock32"
     LIBS="${LIBS} -lws2_32"
     ;;

Modified: branches/S2_5/utility/shared.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/utility/shared.c?rev=31645&r1=31644&r2=31645&view=diff
==============================================================================
--- branches/S2_5/utility/shared.c      (original)
+++ branches/S2_5/utility/shared.c      Thu Jan 28 02:02:22 2016
@@ -54,8 +54,10 @@
 #include <windows.h>
 #include <lmcons.h>    /* UNLEN */
 #include <shlobj.h>
+#ifdef HAVE_DIRECT_H
 #include <direct.h>
-#endif
+#endif /* HAVE_DIRECT_H */
+#endif /* WIN32_NATIVE */
 
 /* utility */
 #include "astring.h"


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

Reply via email to