summaryrefslogtreecommitdiff
path: root/dln_find.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-04-16 02:46:51 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-04-16 02:46:51 (GMT)
commit633def3c636ac61802a68fbfd018e7d9130d8d6e (patch)
tree1e04938fb4b415c11f70d73d340ecca4e9f6fc80 /dln_find.c
parenta39b88d2fddd4821d356766af1e861711f68a969 (diff)
dln_find.c: PATH_SEP
* dln_find.c (dln_find_exe_r): use PATH_SEP instead of hardcoding separators. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45596 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'dln_find.c')
-rw-r--r--dln_find.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/dln_find.c b/dln_find.c
index f41ceb0..56a1981 100644
--- a/dln_find.c
+++ b/dln_find.c
@@ -78,11 +78,12 @@ dln_find_exe_r(const char *fname, const char *path, char *buf, size_t size
}
if (!path) {
-#if defined(_WIN32)
- path = "/usr/local/bin;/usr/ucb;/usr/bin;/bin;.";
-#else
- path = "/usr/local/bin:/usr/ucb:/usr/bin:/bin:.";
-#endif
+ path =
+ "/usr/local/bin" PATH_SEP
+ "/usr/ucb" PATH_SEP
+ "/usr/bin" PATH_SEP
+ "/bin" PATH_SEP
+ ".";
}
buf = dln_find_1(fname, path, buf, size, 1 DLN_FIND_EXTRA_ARG);
if (envpath) free(envpath);