diff --git a/configure.ac b/configure.ac index b0bf103..9e4db77 100644 --- a/configure.ac +++ b/configure.ac @@ -59,10 +59,11 @@ AC_ARG_ENABLE(dir, AS_HELP_STRING([--disable-dir], [disable POSIX directory access]), [have_dir="$enableval"]) AM_CONDITIONAL(HAVE_DIR, test "$have_dir" = "yes") -AC_ARG_ENABLE(exec, +AC_ARG_ENABLE(exec, AS_HELP_STRING([--disable-exec], [disable UNIX fork and execute with pipes]), - [have_exec="$enableval"]) + [have_exec="$enableval"], + [if "$MINGW" = "1"; then have_exec="no"; else have_exec="yes"; fi]) AM_CONDITIONAL(HAVE_EXEC, test "$have_exec" = "yes") AC_ARG_ENABLE(regexp, AS_HELP_STRING([--disable-regexp], @@ -86,7 +87,8 @@ AC_ARG_ENABLE(dynamicstack, AC_ARG_ENABLE(stacktrace, AS_HELP_STRING([--disable-stacktrace], [disable stack trace, use this if you cannot compile the library on your system otherwise and you still want to use the other parts]), - [have_stacktrace="$enableval"], [have_stacktrace="yes"]) + [have_stacktrace="$enableval"], + [if "$MINGW" = "1"; then have_stacktrace="no"; else have_stacktrace="yes"; fi]) AM_CONDITIONAL(HAVE_STACKTRACE, test "$have_stacktrace" = "yes") if test "$have_stacktrace" = "yes"; then # Hack for bug: @@ -169,8 +171,9 @@ AM_CONDITIONAL(HAVE_BOOST_THREAD, test -n "$BOOST_THREAD_LIB") # special dependencies for specific distros AX_ALL_BUILD_DEPEND_DEV(binutils) AX_ALL_DEPEND_IFEXISTS_DEV(libiberty) +AX_ALL_DEPEND_IFEXISTS_DEV(liblog4cxx) +AX_ALL_DEPEND_IFEXISTS_DEV(liblog4cxx10) AX_DEB_BUILD_DEPEND(libboost-dev) -AX_DEB_BUILD_DEPEND(liblog4cxx-dev) AX_DEB_BUILD_DEPEND(libz-dev) AX_RPM_BUILD_DEPEND(boost-devel) AX_RPM_BUILD_DEPEND(zlib-devel) diff --git a/src/mrw/auto.hxx b/src/mrw/auto.hxx index f7834a9..0504d38 100644 --- a/src/mrw/auto.hxx +++ b/src/mrw/auto.hxx @@ -13,7 +13,9 @@ #define __MRW_AUTO_HPP__ #include // size_t -#include // munmap, PROT_READ, MAP_SHARED +#if !(defined(WIN32) || defined(_WIN32) || defined(__WIN32) || defined(__CYGWIN__)) +# include // munmap, PROT_READ, MAP_SHARED +#endif #include // close #include #include @@ -374,6 +376,7 @@ namespace mrw { */ typedef mrw::AutoResource AutoFile; +#if !(defined(WIN32) || defined(_WIN32) || defined(__WIN32) || defined(__CYGWIN__)) /** @brief Resource handle for @c mmap. It integrates pointer and size of a memory mapped file similar @@ -445,6 +448,7 @@ namespace mrw { /// Forbidden to instanciate. Auto(); Auto(const Auto&); }; +#endif //@} } diff --git a/test/mrwexclog4cxx_test.cxx b/test/mrwexclog4cxx_test.cxx index ff86c02..3aef7c2 100644 --- a/test/mrwexclog4cxx_test.cxx +++ b/test/mrwexclog4cxx_test.cxx @@ -72,6 +72,7 @@ namespace mrw { exit_catchUnexpected = true; } void testcase() { + std::set_unexpected([]{throw std::bad_exception();}); catchUnexpected(); CPPUNIT_ASSERT(enter_catchUnexpected && enter_passUnexpected && diff --git a/test/mrwexcstderr_test.cxx b/test/mrwexcstderr_test.cxx index e841cc2..230631f 100644 --- a/test/mrwexcstderr_test.cxx +++ b/test/mrwexcstderr_test.cxx @@ -71,6 +71,7 @@ namespace mrw { exit_catchUnexpected = true; } void testcase() { + std::set_unexpected([]{throw std::bad_exception();}); catchUnexpected(); CPPUNIT_ASSERT(enter_catchUnexpected && enter_passUnexpected &&