[Box Backup-commit] COMMIT r3009 - in box/trunk: infrastructure/m4 lib/win32

subversion at boxbackup.org subversion at boxbackup.org
Sat Oct 8 13:06:34 BST 2011


Author: chris
Date: 2011-10-08 13:06:34 +0100 (Sat, 08 Oct 2011)
New Revision: 3009

Modified:
   box/trunk/infrastructure/m4/boxbackup_tests.m4
   box/trunk/infrastructure/m4/vl_lib_readline.m4
   box/trunk/lib/win32/emu.h
   box/trunk/lib/win32/getopt_long.cpp
Log:
Silence warnings from new MinGW headers that expect __MINGW_FEATURES__
to be defined.

Check for fcntl.h and include it if we have it, not just on MSVC, now
that MinGW also defines O_BINARY in newer versions.


Modified: box/trunk/infrastructure/m4/boxbackup_tests.m4
===================================================================
--- box/trunk/infrastructure/m4/boxbackup_tests.m4	2011-10-07 23:21:36 UTC (rev 3008)
+++ box/trunk/infrastructure/m4/boxbackup_tests.m4	2011-10-08 12:06:34 UTC (rev 3009)
@@ -126,7 +126,7 @@
 
 AC_HEADER_STDC
 AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS([dlfcn.h getopt.h process.h pwd.h signal.h])
+AC_CHECK_HEADERS([dlfcn.h fcntl.h getopt.h process.h pwd.h signal.h])
 AC_CHECK_HEADERS([syslog.h time.h cxxabi.h])
 AC_CHECK_HEADERS([netinet/in.h])
 AC_CHECK_HEADERS([sys/file.h sys/param.h sys/socket.h sys/time.h sys/types.h sys/wait.h])

Modified: box/trunk/infrastructure/m4/vl_lib_readline.m4
===================================================================
--- box/trunk/infrastructure/m4/vl_lib_readline.m4	2011-10-07 23:21:36 UTC (rev 3008)
+++ box/trunk/infrastructure/m4/vl_lib_readline.m4	2011-10-08 12:06:34 UTC (rev 3009)
@@ -91,9 +91,9 @@
 
 dnl VL_LIB_READLINE_CHECK(name, libraries, headers, history headers)
 AC_DEFUN([VL_LIB_READLINE_CHECK], [
+  ORIG_LIBS="$LIBS"
   AC_CACHE_CHECK([for $1 library],
                  [vl_cv_lib_$1], [
-    ORIG_LIBS="$LIBS"
     vl_cv_lib_$1=""
     for readline_lib in $2; do
       for termcap_lib in "" termcap curses ncurses pdcurses; do

Modified: box/trunk/lib/win32/emu.h
===================================================================
--- box/trunk/lib/win32/emu.h	2011-10-07 23:21:36 UTC (rev 3008)
+++ box/trunk/lib/win32/emu.h	2011-10-08 12:06:34 UTC (rev 3009)
@@ -15,6 +15,11 @@
 #if ! defined EMU_INCLUDE && defined WIN32
 #define EMU_INCLUDE
 
+// Shut up stupid new warnings. Thanks MinGW! Ever heard of "compatibility"?
+#ifdef __MINGW32__
+#	define __MINGW_FEATURES__ 0
+#endif
+
 // basic types, may be required by other headers since we
 // don't include sys/types.h
 

Modified: box/trunk/lib/win32/getopt_long.cpp
===================================================================
--- box/trunk/lib/win32/getopt_long.cpp	2011-10-07 23:21:36 UTC (rev 3008)
+++ box/trunk/lib/win32/getopt_long.cpp	2011-10-08 12:06:34 UTC (rev 3009)
@@ -58,6 +58,7 @@
  */
 
 // #include "Box.h"
+#include "emu.h"
 
 #include <errno.h>
 #include <stdarg.h>




More information about the Boxbackup-commit mailing list