[llvm-commits] [llvm] r125943 - /llvm/trunk/lib/Support/Unix/Path.inc
Chris Lattner
sabre at nondot.org
Fri Feb 18 09:04:56 PST 2011
Author: lattner
Date: Fri Feb 18 11:04:56 2011
New Revision: 125943
URL: http://llvm.org/viewvc/llvm-project?rev=125943&view=rev
Log:
improve support for OpenBSD, patch by Amit Kulkarni!
Modified:
llvm/trunk/lib/Support/Unix/Path.inc
Modified: llvm/trunk/lib/Support/Unix/Path.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Unix/Path.inc?rev=125943&r1=125942&r2=125943&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Unix/Path.inc (original)
+++ llvm/trunk/lib/Support/Unix/Path.inc Fri Feb 18 11:04:56 2011
@@ -260,7 +260,8 @@
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 @@
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)
More information about the llvm-commits
mailing list