diff --git a/src/common/autoconfig-win.h b/src/common/autoconfig-win.h index 749d9375..79746592 100644 --- a/src/common/autoconfig-win.h +++ b/src/common/autoconfig-win.h @@ -19,9 +19,6 @@ /* Path to the file program */ #define FILE_PROG "/usr/bin/file" -/* "Have C++0x" */ -#define HAVE_CXX0X_UNORDERED 1 - /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H @@ -45,8 +42,14 @@ /* Define to 1 if you have the `z' library (-lz). */ #define HAVE_LIBZ 1 +/* Define to 1 if you have the header file. */ +#undef HAVE_MALLOC_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_MALLOC_MALLOC_H + /* Define to 1 if you have the `malloc_trim' function. */ -/* #undef HAVE_MALLOC_TRIM */ +#undef HAVE_MALLOC_TRIM /* Define to 1 if you have the header file. */ #define HAVE_MEMORY_H 1 @@ -60,12 +63,6 @@ /* Define to 1 if you have the `setrlimit' function. */ #define HAVE_SETRLIMIT 1 -/* Has std::shared_ptr */ -#define HAVE_SHARED_PTR_STD - -/* Has std::tr1::shared_ptr */ -/* #undef HAVE_SHARED_PTR_TR1 */ - /* Define to 1 if you have the header file. */ #define HAVE_SPAWN_H 1 @@ -102,9 +99,6 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_VFS_H */ -/* "Have tr1" */ -/* #undef HAVE_TR1_UNORDERED */ - /* Define to 1 if you have the header file. */ /* #undef HAVE_UNISTD_H */ diff --git a/src/common/autoconfig.h.in b/src/common/autoconfig.h.in index e46b702e..c4afb414 100644 --- a/src/common/autoconfig.h.in +++ b/src/common/autoconfig.h.in @@ -18,9 +18,6 @@ /* Path to the file program */ #undef FILE_PROG -/* "Have C++0x" */ -#undef HAVE_CXX0X_UNORDERED - /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H @@ -45,6 +42,12 @@ /* Define to 1 if you have the `z' library (-lz). */ #undef HAVE_LIBZ +/* Define to 1 if you have the header file. */ +#undef HAVE_MALLOC_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_MALLOC_MALLOC_H + /* Define to 1 if you have the `malloc_trim' function. */ #undef HAVE_MALLOC_TRIM @@ -60,12 +63,6 @@ /* Define to 1 if you have the `setrlimit' function. */ #undef HAVE_SETRLIMIT -/* Has std::shared_ptr */ -#undef HAVE_SHARED_PTR_STD - -/* Has std::tr1::shared_ptr */ -#undef HAVE_SHARED_PTR_TR1 - /* Define to 1 if you have the header file. */ #undef HAVE_SPAWN_H @@ -102,9 +99,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_VFS_H -/* "Have tr1" */ -#undef HAVE_TR1_UNORDERED - /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H diff --git a/src/configure.ac b/src/configure.ac index e47eecae..7b791c8e 100644 --- a/src/configure.ac +++ b/src/configure.ac @@ -37,7 +37,6 @@ AC_SYS_LARGEFILE # OpenBSD needs sys/param.h for mount.h to compile AC_CHECK_HEADERS([sys/param.h, spawn.h]) -AC_CHECK_FUNCS([posix_spawn setrlimit kqueue vsnprintf malloc_trim]) if test "x$ac_cv_func_posix_spawn" = xyes; then : AC_ARG_ENABLE(posix_spawn, @@ -49,35 +48,14 @@ if test X$posixSpawnEnabled = Xyes ; then AC_DEFINE(USE_POSIX_SPAWN, 1, [Use posix_spawn()]) fi -# Check for where to find unordered_map etc. -AC_LANG_PUSH([C++]) -AC_CHECK_HEADER(tr1/unordered_map,[AC_DEFINE([HAVE_TR1_UNORDERED], - [],["Have tr1"])],[]) -AC_CHECK_HEADER(unordered_map,[AC_DEFINE([HAVE_CXX0X_UNORDERED], - [],["Have C++0x"])],[]) -AC_TRY_COMPILE([ - #include - ],[ - std::shared_ptr ptr; - ], rcl_shared_ptr_std="1", rcl_shared_ptr_std="0") -AC_TRY_COMPILE([ - #include - ],[ - std::tr1::shared_ptr ptr; - ], rcl_shared_ptr_tr1="1", rcl_shared_ptr_tr1="0") -if test X$rcl_shared_ptr_std = X1; then - AC_DEFINE(HAVE_SHARED_PTR_STD, [], [Has std::shared_ptr]) -elif test X$rcl_shared_ptr_tr1 = X1; then - AC_DEFINE(HAVE_SHARED_PTR_TR1, [], [Has std::tr1::shared_ptr]) -fi -AC_LANG_POP([C++]) - -AC_CHECK_HEADERS([sys/mount.h sys/statfs.h sys/statvfs.h sys/vfs.h], [], [], +AC_CHECK_HEADERS([sys/mount.h sys/statfs.h sys/statvfs.h sys/vfs.h malloc.h malloc/malloc.h], [], [], [#ifdef HAVE_SYS_PARAM_H # include #endif ]) +AC_CHECK_FUNCS([posix_spawn setrlimit kqueue vsnprintf malloc_trim]) + # Use specific 'file' command ? (Useful on solaris to specify # /usr/local/bin/file instead of the system's which doesn't understand '-i' AC_ARG_WITH(file-command, diff --git a/src/internfile/mh_xslt.cpp b/src/internfile/mh_xslt.cpp index f350e77f..6b36e886 100644 --- a/src/internfile/mh_xslt.cpp +++ b/src/internfile/mh_xslt.cpp @@ -16,7 +16,11 @@ */ #include "autoconfig.h" +#if defined(HAVE_MALLOC_H) #include +#elif defined(HAVE_MALLOC_MALLOC_H) +#include +#endif #include #include diff --git a/src/windows/dirent.h b/src/windows/dirent.h index 521fdeae..94e0968d 100644 --- a/src/windows/dirent.h +++ b/src/windows/dirent.h @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include