summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalf Habacker <ralf.habacker@freenet.de>2007-03-08 08:17:25 +0000
committerRalf Habacker <ralf.habacker@freenet.de>2007-03-08 08:17:25 +0000
commit892780c35e6edc4103858c2df55547c4f07d5c4f (patch)
treeb866bf3737ace6b3fca544b3a1d935aec064673b
parent42fe5c9341e9493ed94b319bb00063f432dd0673 (diff)
* configure.in, cmake/ConfigureChecks.cmake: added check for setrlimit.
* test/test-segfault.c: only include setrlimit stuff only when available.
-rw-r--r--ChangeLog7
-rw-r--r--configure.in2
-rw-r--r--test/test-segfault.c5
3 files changed, 10 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 553cd1b5..797824bb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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);