mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-30 08:56:40 +00:00
Apply a patch from Kees van Reeuwijk to add support for Minix.
Minix apparently doesn't like double-slash separators, and there's no apparent need for them here. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112844 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
66048c2169
commit
86759acf01
@ -282,14 +282,14 @@ Path::GetCurrentDirectory() {
|
||||
return Path(pathname);
|
||||
}
|
||||
|
||||
#if defined(__FreeBSD__) || defined (__NetBSD__)
|
||||
#if defined(__FreeBSD__) || defined (__NetBSD__) || defined(__minix)
|
||||
static int
|
||||
test_dir(char buf[PATH_MAX], char ret[PATH_MAX],
|
||||
const char *dir, const char *bin)
|
||||
{
|
||||
struct stat sb;
|
||||
|
||||
snprintf(buf, PATH_MAX, "%s//%s", dir, bin);
|
||||
snprintf(buf, PATH_MAX, "%s/%s", dir, bin);
|
||||
if (realpath(buf, ret) == NULL)
|
||||
return (1);
|
||||
if (stat(buf, &sb) != 0)
|
||||
@ -350,7 +350,7 @@ Path Path::GetMainExecutable(const char *argv0, void *MainAddr) {
|
||||
if (realpath(exe_path, link_path))
|
||||
return Path(std::string(link_path));
|
||||
}
|
||||
#elif defined(__FreeBSD__) || defined (__NetBSD__)
|
||||
#elif defined(__FreeBSD__) || defined (__NetBSD__) || defined(__minix)
|
||||
char exe_path[PATH_MAX];
|
||||
|
||||
if (getprogpath(exe_path, argv0) != NULL)
|
||||
|
Loading…
x
Reference in New Issue
Block a user