stacktrace, exec amd sys/mman.h are not available in windows
This commit is contained in:
@@ -62,7 +62,8 @@ AM_CONDITIONAL(HAVE_DIR, test "$have_dir" = "yes")
|
|||||||
AC_ARG_ENABLE(exec,
|
AC_ARG_ENABLE(exec,
|
||||||
AS_HELP_STRING([--disable-exec],
|
AS_HELP_STRING([--disable-exec],
|
||||||
[disable UNIX fork and execute with pipes]),
|
[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")
|
AM_CONDITIONAL(HAVE_EXEC, test "$have_exec" = "yes")
|
||||||
AC_ARG_ENABLE(regexp,
|
AC_ARG_ENABLE(regexp,
|
||||||
AS_HELP_STRING([--disable-regexp],
|
AS_HELP_STRING([--disable-regexp],
|
||||||
@@ -86,7 +87,8 @@ AC_ARG_ENABLE(dynamicstack,
|
|||||||
AC_ARG_ENABLE(stacktrace,
|
AC_ARG_ENABLE(stacktrace,
|
||||||
AS_HELP_STRING([--disable-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]),
|
[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")
|
AM_CONDITIONAL(HAVE_STACKTRACE, test "$have_stacktrace" = "yes")
|
||||||
if test "$have_stacktrace" = "yes"; then
|
if test "$have_stacktrace" = "yes"; then
|
||||||
# Hack for bug:
|
# Hack for bug:
|
||||||
@@ -169,8 +171,9 @@ AM_CONDITIONAL(HAVE_BOOST_THREAD, test -n "$BOOST_THREAD_LIB")
|
|||||||
# special dependencies for specific distros
|
# special dependencies for specific distros
|
||||||
AX_ALL_BUILD_DEPEND_DEV(binutils)
|
AX_ALL_BUILD_DEPEND_DEV(binutils)
|
||||||
AX_ALL_DEPEND_IFEXISTS_DEV(libiberty)
|
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(libboost-dev)
|
||||||
AX_DEB_BUILD_DEPEND(liblog4cxx-dev)
|
|
||||||
AX_DEB_BUILD_DEPEND(libz-dev)
|
AX_DEB_BUILD_DEPEND(libz-dev)
|
||||||
AX_RPM_BUILD_DEPEND(boost-devel)
|
AX_RPM_BUILD_DEPEND(boost-devel)
|
||||||
AX_RPM_BUILD_DEPEND(zlib-devel)
|
AX_RPM_BUILD_DEPEND(zlib-devel)
|
||||||
|
@@ -13,7 +13,9 @@
|
|||||||
#define __MRW_AUTO_HPP__
|
#define __MRW_AUTO_HPP__
|
||||||
|
|
||||||
#include <sys/types.h> // size_t
|
#include <sys/types.h> // size_t
|
||||||
|
#if !(defined(WIN32) || defined(_WIN32) || defined(__WIN32) || defined(__CYGWIN__))
|
||||||
# include <sys/mman.h> // munmap, PROT_READ, MAP_SHARED
|
# include <sys/mman.h> // munmap, PROT_READ, MAP_SHARED
|
||||||
|
#endif
|
||||||
#include <unistd.h> // close
|
#include <unistd.h> // close
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
@@ -374,6 +376,7 @@ namespace mrw {
|
|||||||
*/
|
*/
|
||||||
typedef mrw::AutoResource<int, int(*)(int), &close, int, -1> AutoFile;
|
typedef mrw::AutoResource<int, int(*)(int), &close, int, -1> AutoFile;
|
||||||
|
|
||||||
|
#if !(defined(WIN32) || defined(_WIN32) || defined(__WIN32) || defined(__CYGWIN__))
|
||||||
/** @brief Resource handle for @c mmap.
|
/** @brief Resource handle for @c mmap.
|
||||||
|
|
||||||
It integrates pointer and size of a memory mapped file similar
|
It integrates pointer and size of a memory mapped file similar
|
||||||
@@ -445,6 +448,7 @@ namespace mrw {
|
|||||||
/// Forbidden to instanciate.
|
/// Forbidden to instanciate.
|
||||||
Auto(); Auto(const Auto&);
|
Auto(); Auto(const Auto&);
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
//@}
|
//@}
|
||||||
}
|
}
|
||||||
|
@@ -72,6 +72,7 @@ namespace mrw {
|
|||||||
exit_catchUnexpected = true;
|
exit_catchUnexpected = true;
|
||||||
}
|
}
|
||||||
void testcase() {
|
void testcase() {
|
||||||
|
std::set_unexpected([]{throw std::bad_exception();});
|
||||||
catchUnexpected();
|
catchUnexpected();
|
||||||
CPPUNIT_ASSERT(enter_catchUnexpected &&
|
CPPUNIT_ASSERT(enter_catchUnexpected &&
|
||||||
enter_passUnexpected &&
|
enter_passUnexpected &&
|
||||||
|
@@ -71,6 +71,7 @@ namespace mrw {
|
|||||||
exit_catchUnexpected = true;
|
exit_catchUnexpected = true;
|
||||||
}
|
}
|
||||||
void testcase() {
|
void testcase() {
|
||||||
|
std::set_unexpected([]{throw std::bad_exception();});
|
||||||
catchUnexpected();
|
catchUnexpected();
|
||||||
CPPUNIT_ASSERT(enter_catchUnexpected &&
|
CPPUNIT_ASSERT(enter_catchUnexpected &&
|
||||||
enter_passUnexpected &&
|
enter_passUnexpected &&
|
||||||
|
Reference in New Issue
Block a user