From 8afd927d609faf44fcf70e7870bbc201cffde0fd Mon Sep 17 00:00:00 2001 From: whitequark Date: Mon, 11 Nov 2019 08:25:56 +0000 Subject: Make use of setrlimit conditional on ABC_NO_RLIMIT. This is useful for POSIX-like platforms that do not have rlimit, such as WASI. --- src/base/main/mainReal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/base') diff --git a/src/base/main/mainReal.c b/src/base/main/mainReal.c index be099be4..922e0521 100644 --- a/src/base/main/mainReal.c +++ b/src/base/main/mainReal.c @@ -132,7 +132,7 @@ int Abc_RealMain( int argc, char * argv[] ) break; case 'm': { -#ifndef WIN32 +#if !defined(WIN32) && !defined(ABC_NO_RLIMIT) int maxMb = atoi(globalUtilOptarg); printf("Limiting memory use to %d MB\n", maxMb); struct rlimit limit = { @@ -144,7 +144,7 @@ int Abc_RealMain( int argc, char * argv[] ) break; } case 'l': { -#ifndef WIN32 +#if !defined(WIN32) && !defined(ABC_NO_RLIMIT) rlim_t maxTime = atoi(globalUtilOptarg); printf("Limiting time to %d seconds\n", (int)maxTime); struct rlimit limit = { -- cgit v1.2.3