summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2011-02-18 17:04:56 +0000
committerChris Lattner <sabre@nondot.org>2011-02-18 17:04:56 +0000
commitc37910ea28cfac1373870e462e275dc22a60aa3d (patch)
treea00d3dbf28b4e09b3757a6e463fcbe47b359d328 /llvm/lib/Support
parent7c0cb2bbf552d093ad8ff293a88200ebe67922d2 (diff)
downloadbcm5719-llvm-c37910ea28cfac1373870e462e275dc22a60aa3d.tar.gz
bcm5719-llvm-c37910ea28cfac1373870e462e275dc22a60aa3d.zip
improve support for OpenBSD, patch by Amit Kulkarni!
llvm-svn: 125943
Diffstat (limited to 'llvm/lib/Support')
-rw-r--r--llvm/lib/Support/Unix/Path.inc6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Support/Unix/Path.inc b/llvm/lib/Support/Unix/Path.inc
index bdd13a64b01..0f6e800505e 100644
--- a/llvm/lib/Support/Unix/Path.inc
+++ b/llvm/lib/Support/Unix/Path.inc
@@ -260,7 +260,8 @@ Path::GetCurrentDirectory() {
return Path(pathname);
}
-#if defined(__FreeBSD__) || defined (__NetBSD__) || defined(__minix)
+#if defined(__FreeBSD__) || defined (__NetBSD__) || \
+ defined(__OpenBSD__) || defined(__minix)
static int
test_dir(char buf[PATH_MAX], char ret[PATH_MAX],
const char *dir, const char *bin)
@@ -328,7 +329,8 @@ Path Path::GetMainExecutable(const char *argv0, void *MainAddr) {
if (realpath(exe_path, link_path))
return Path(link_path);
}
-#elif defined(__FreeBSD__) || defined (__NetBSD__) || defined(__minix)
+#elif defined(__FreeBSD__) || defined (__NetBSD__) || \
+ defined(__OpenBSD__) || defined(__minix)
char exe_path[PATH_MAX];
if (getprogpath(exe_path, argv0) != NULL)
OpenPOWER on IntegriCloud