diff options
author | Ralf Habacker <ralf.habacker@freenet.de> | 2007-03-08 08:17:25 +0000 |
---|---|---|
committer | Ralf Habacker <ralf.habacker@freenet.de> | 2007-03-08 08:17:25 +0000 |
commit | 892780c35e6edc4103858c2df55547c4f07d5c4f (patch) | |
tree | b866bf3737ace6b3fca544b3a1d935aec064673b | |
parent | 42fe5c9341e9493ed94b319bb00063f432dd0673 (diff) |
* configure.in, cmake/ConfigureChecks.cmake: added check for setrlimit.
* test/test-segfault.c: only include setrlimit stuff only when available.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | configure.in | 2 | ||||
-rw-r--r-- | test/test-segfault.c | 5 |
3 files changed, 10 insertions, 4 deletions
@@ -1,3 +1,10 @@ +2007-03-08 Ralf Habacker <ralf.habacker@freenet.de> + + * configure.in, cmake/ConfigureChecks.cmake: added check + for setrlimit. + * test/test-segfault.c: only include setrlimit stuff only + when available. + 2007-03-07 Ralf Habacker <ralf.habacker@freenet.de> * test/test-segfault.c: unix compile fix. diff --git a/configure.in b/configure.in index 0a1e1d14..6d63729e 100644 --- a/configure.in +++ b/configure.in @@ -529,7 +529,7 @@ fi AC_CHECK_LIB(socket,socket) AC_CHECK_FUNC(gethostbyname,,[AC_CHECK_LIB(nsl,gethostbyname)]) -AC_CHECK_FUNCS(vsnprintf vasprintf nanosleep usleep poll setenv unsetenv socketpair getgrouplist fpathconf) +AC_CHECK_FUNCS(vsnprintf vasprintf nanosleep usleep poll setenv unsetenv socketpair getgrouplist fpathconf setrlimit) AC_MSG_CHECKING(for dirfd) AC_TRY_LINK([ diff --git a/test/test-segfault.c b/test/test-segfault.c index dd1c87fe..bf4d964b 100644 --- a/test/test-segfault.c +++ b/test/test-segfault.c @@ -3,8 +3,7 @@ #include <stdlib.h> #include <signal.h> -#if !defined(DBUS_WIN) && !defined(DBUS_WINCE) -#include <sys/time.h> +#ifdef HAVE_SETRLIMIT #include <sys/resource.h> #endif @@ -13,7 +12,7 @@ main (int argc, char **argv) { char *p; -#if !defined(DBUS_WIN) && !defined(DBUS_WINCE) +#if HAVE_SETRLIMIT struct rlimit r = { 0, }; getrlimit (RLIMIT_CORE, &r); |