mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
a39b88d2fd
commit
633def3c63
1 changed files with 6 additions and 5 deletions
11
dln_find.c
11
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);
|
||||
|
|
Loading…
Reference in a new issue