Add checks for __OpenBSD__.

llvm-svn: 27761
This commit is contained in:
Jeff Cohen 2006-04-17 17:55:41 +00:00
parent 264c908e3a
commit e3955a05e4
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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 <alloca.h>\n"