diff options
Diffstat (limited to 'lib/System')
| -rw-r--r-- | lib/System/Makefile | 2 | ||||
| -rw-r--r-- | lib/System/Unix/Program.inc | 7 | ||||
| -rw-r--r-- | lib/System/Unix/Signals.inc | 11 | ||||
| -rw-r--r-- | lib/System/Win32/Program.inc | 5 |
4 files changed, 22 insertions, 3 deletions
diff --git a/lib/System/Makefile b/lib/System/Makefile index d4fd60eee5f6..bb013b9f1f16 100644 --- a/lib/System/Makefile +++ b/lib/System/Makefile @@ -10,7 +10,7 @@ LEVEL = ../.. LIBRARYNAME = LLVMSystem BUILD_ARCHIVE = 1 - +REQUIRES_RTTI = 1 include $(LEVEL)/Makefile.config ifeq ($(HOST_OS),MingW) diff --git a/lib/System/Unix/Program.inc b/lib/System/Unix/Program.inc index 43c3606d9831..c10498a375ac 100644 --- a/lib/System/Unix/Program.inc +++ b/lib/System/Unix/Program.inc @@ -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; @@ -323,4 +323,9 @@ bool Program::ChangeStdoutToBinary(){ return false; } +bool Program::ChangeStderrToBinary(){ + // Do nothing, as Unix doesn't differentiate between text and binary. + return false; +} + } diff --git a/lib/System/Unix/Signals.inc b/lib/System/Unix/Signals.inc index 676e1e5356c8..c8ec68aab17f 100644 --- a/lib/System/Unix/Signals.inc +++ b/lib/System/Unix/Signals.inc @@ -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 SIGXFSZ + , SIGXFSZ +#endif #ifdef SIGEMT , SIGEMT #endif diff --git a/lib/System/Win32/Program.inc b/lib/System/Win32/Program.inc index a69826fdcef4..a3b40d0e3650 100644 --- a/lib/System/Win32/Program.inc +++ b/lib/System/Win32/Program.inc @@ -379,4 +379,9 @@ bool Program::ChangeStdoutToBinary(){ return result == -1; } +bool Program::ChangeStderrToBinary(){ + int result = _setmode( _fileno(stderr), _O_BINARY ); + return result == -1; +} + } |
