diff options
author | Eric Christopher <echristo@apple.com> | 2012-08-06 20:52:18 +0000 |
---|---|---|
committer | Eric Christopher <echristo@apple.com> | 2012-08-06 20:52:18 +0000 |
commit | b0f6759ab93b42570d71665b13d24ca2c4a5f276 (patch) | |
tree | 6920fa759c64cd88d004d81c19040160321f1dfa /lib/Support/Unix | |
parent | f8f77466879d10638e9f790dd61851319f6daca9 (diff) | |
download | external_llvm-b0f6759ab93b42570d71665b13d24ca2c4a5f276.zip external_llvm-b0f6759ab93b42570d71665b13d24ca2c4a5f276.tar.gz external_llvm-b0f6759ab93b42570d71665b13d24ca2c4a5f276.tar.bz2 |
Add support for the OpenBSD for Bitrig.
Patch by David Hill.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161344 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/Unix')
-rw-r--r-- | lib/Support/Unix/Path.inc | 4 | ||||
-rw-r--r-- | lib/Support/Unix/Process.inc | 7 |
2 files changed, 6 insertions, 5 deletions
diff --git a/lib/Support/Unix/Path.inc b/lib/Support/Unix/Path.inc index b41390a..6bddbdf 100644 --- a/lib/Support/Unix/Path.inc +++ b/lib/Support/Unix/Path.inc @@ -260,7 +260,7 @@ Path::GetCurrentDirectory() { return Path(pathname); } -#if defined(__FreeBSD__) || defined (__NetBSD__) || \ +#if defined(__FreeBSD__) || defined (__NetBSD__) || defined(__Bitrig__) || \ defined(__OpenBSD__) || defined(__minix) || defined(__FreeBSD_kernel__) static int test_dir(char buf[PATH_MAX], char ret[PATH_MAX], @@ -329,7 +329,7 @@ Path Path::GetMainExecutable(const char *argv0, void *MainAddr) { if (realpath(exe_path, link_path)) return Path(link_path); } -#elif defined(__FreeBSD__) || defined (__NetBSD__) || \ +#elif defined(__FreeBSD__) || defined (__NetBSD__) || defined(__Bitrig__) || \ defined(__OpenBSD__) || defined(__minix) || defined(__FreeBSD_kernel__) char exe_path[PATH_MAX]; diff --git a/lib/Support/Unix/Process.inc b/lib/Support/Unix/Process.inc index 174112e..5204147 100644 --- a/lib/Support/Unix/Process.inc +++ b/lib/Support/Unix/Process.inc @@ -20,9 +20,10 @@ #ifdef HAVE_SYS_RESOURCE_H #include <sys/resource.h> #endif -// DragonFly BSD has deprecated <malloc.h> for <stdlib.h> instead, -// Unix.h includes this for us already. -#if defined(HAVE_MALLOC_H) && !defined(__DragonFly__) +// DragonFlyBSD, OpenBSD, and Bitrig have deprecated <malloc.h> for +// <stdlib.h> instead. Unix.h includes this for us already. +#if defined(HAVE_MALLOC_H) && !defined(__DragonFly__) && \ + !defined(__OpenBSD__) && !defined(__Bitrig__) #include <malloc.h> #endif #ifdef HAVE_MALLOC_MALLOC_H |