1
0
Fork 0
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:
nobu 2014-04-16 02:46:51 +00:00
parent a39b88d2fd
commit 633def3c63

View file

@ -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);