improve support for minix, PR6280, patch by
authorChris Lattner <sabre@nondot.org>
Fri, 12 Feb 2010 00:37:46 +0000 (00:37 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 12 Feb 2010 00:37:46 +0000 (00:37 +0000)
Kees van Reeuwijk!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95946 91177308-0d34-0410-b5e6-96231b3b80d8

lib/System/Unix/Program.inc
lib/System/Unix/Signals.inc

index e8c28062478881b9376cf70686b392d02a1ed9c7..c10498a375ac812e465bfc69828c0f9a52d4ca17 100644 (file)
@@ -126,7 +126,7 @@ static void TimeOutHandler(int Sig) {
 
 static void SetMemoryLimits (unsigned size)
 {
-#if HAVE_SYS_RESOURCE_H
+#if HAVE_SYS_RESOURCE_H && HAVE_GETRLIMIT && HAVE_SETRLIMIT
   struct rlimit r;
   __typeof__ (r.rlim_cur) limit = (__typeof__ (r.rlim_cur)) (size) * 1048576;
 
index 676e1e5356c8cff9ee1e13d8286f001a1cf79717..7bd752649a44da767b01a5775bbfb1aa414f682b 100644 (file)
@@ -52,7 +52,16 @@ static const int *const IntSigsEnd =
 // KillSigs - Signals that are synchronous with the program that will cause it
 // to die.
 static const int KillSigs[] = {
-  SIGILL, SIGTRAP, SIGABRT, SIGFPE, SIGBUS, SIGSEGV, SIGSYS, SIGXCPU, SIGXFSZ
+  SIGILL, SIGTRAP, SIGABRT, SIGFPE, SIGBUS, SIGSEGV
+#ifdef SIGSYS
+  , SIGSYS
+#endif
+#ifdef SIGXCPU
+  , SIGXCPU
+#endif
+#ifdef SIGEMT
+  , SIGXFSZ
+#endif
 #ifdef SIGEMT
   , SIGEMT
 #endif