BUG: fix stack limit size on mac OSX

This commit is contained in:
Bill Hoffman 2002-10-24 15:39:25 -04:00
parent 5b9b793dde
commit 8ff7c13227
1 changed files with 18 additions and 0 deletions

View File

@ -36,8 +36,26 @@
#include <stdio.h>
#ifdef __APPLE__
#include <sys/types.h>
#include <sys/time.h>
#include <sys/resource.h>
#endif
cmake::cmake()
{
#ifdef __APPLE__
struct rlimit rlp;
if(!getrlimit(RLIMIT_STACK, &rlp))
{
if(rlp.rlim_cur != rlp.rlim_max)
{
rlp.rlim_cur = rlp.rlim_max;
setrlimit(RLIMIT_STACK, &rlp);
}
}
#endif
m_Local = false;
m_Verbose = false;
m_InTryCompile = false;