From: Jeff Cohen Date: Mon, 17 Apr 2006 17:55:41 +0000 (+0000) Subject: Add checks for __OpenBSD__. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=3c280bf4d1bca59f75cb21d6a3b88d6d567c7f3c;p=oota-llvm.git Add checks for __OpenBSD__. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27761 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/System/Mutex.cpp b/lib/System/Mutex.cpp index 33dff053315..abcf77e6751 100644 --- a/lib/System/Mutex.cpp +++ b/lib/System/Mutex.cpp @@ -75,7 +75,7 @@ Mutex::Mutex( bool recursive) errorcode = pthread_mutexattr_settype(&attr, kind); assert(errorcode == 0); -#ifndef __FreeBSD__ +#if !defined(__FreeBSD__) && !defined(__OpenBSD__) // Make it a process local mutex errorcode = pthread_mutexattr_setpshared(&attr, PTHREAD_PROCESS_PRIVATE); #endif diff --git a/lib/Target/CBackend/CBackend.cpp b/lib/Target/CBackend/CBackend.cpp index 4e86c6fec0d..904101287ab 100644 --- a/lib/Target/CBackend/CBackend.cpp +++ b/lib/Target/CBackend/CBackend.cpp @@ -813,7 +813,7 @@ static void generateCompilerSpecificCode(std::ostream& Out) { << "extern void *__builtin_alloca(unsigned int);\n" << "#endif\n" << "#define alloca(x) __builtin_alloca(x)\n" - << "#elif defined(__FreeBSD__)\n" + << "#elif defined(__FreeBSD__) || defined(__OpenBSD__)\n" << "#define alloca(x) __builtin_alloca(x)\n" << "#elif !defined(_MSC_VER)\n" << "#include \n" diff --git a/lib/Target/CBackend/Writer.cpp b/lib/Target/CBackend/Writer.cpp index 4e86c6fec0d..904101287ab 100644 --- a/lib/Target/CBackend/Writer.cpp +++ b/lib/Target/CBackend/Writer.cpp @@ -813,7 +813,7 @@ static void generateCompilerSpecificCode(std::ostream& Out) { << "extern void *__builtin_alloca(unsigned int);\n" << "#endif\n" << "#define alloca(x) __builtin_alloca(x)\n" - << "#elif defined(__FreeBSD__)\n" + << "#elif defined(__FreeBSD__) || defined(__OpenBSD__)\n" << "#define alloca(x) __builtin_alloca(x)\n" << "#elif !defined(_MSC_VER)\n" << "#include \n"