Path separator is ; on OS/2
This commit is contained in:
2
edit.c
2
edit.c
@ -771,7 +771,7 @@ glob_path(int flags, const char *pat, XPtrV *wp, const char *lpath)
|
|||||||
Xinit(xs, xp, patlen + 128, ATEMP);
|
Xinit(xs, xp, patlen + 128, ATEMP);
|
||||||
while (sp) {
|
while (sp) {
|
||||||
xp = Xstring(xs, xp);
|
xp = Xstring(xs, xp);
|
||||||
if (!(p = cstrchr(sp, ':')))
|
if (!(p = cstrchr(sp, PATH_SEP)))
|
||||||
p = sp + strlen(sp);
|
p = sp + strlen(sp);
|
||||||
pathlen = p - sp;
|
pathlen = p - sp;
|
||||||
if (pathlen) {
|
if (pathlen) {
|
||||||
|
2
exec.c
2
exec.c
@ -1271,7 +1271,7 @@ search_path(const char *name, const char *lpath,
|
|||||||
sp = lpath;
|
sp = lpath;
|
||||||
while (sp != NULL) {
|
while (sp != NULL) {
|
||||||
xp = Xstring(xs, xp);
|
xp = Xstring(xs, xp);
|
||||||
if (!(p = cstrchr(sp, ':')))
|
if (!(p = cstrchr(sp, PATH_SEP)))
|
||||||
p = sp + strlen(sp);
|
p = sp + strlen(sp);
|
||||||
if (p != sp) {
|
if (p != sp) {
|
||||||
XcheckN(xs, xp, p - sp);
|
XcheckN(xs, xp, p - sp);
|
||||||
|
2
main.c
2
main.c
@ -82,7 +82,7 @@ static const char *initcoms[] = {
|
|||||||
"nameref=\\typeset -n",
|
"nameref=\\typeset -n",
|
||||||
"nohup=nohup ",
|
"nohup=nohup ",
|
||||||
"r=\\builtin fc -e -",
|
"r=\\builtin fc -e -",
|
||||||
"source=PATH=$PATH:. \\command .",
|
"source=PATH=\"$PATH" PATH_SEP_STR ".\" \\command .",
|
||||||
"login=\\exec login",
|
"login=\\exec login",
|
||||||
NULL,
|
NULL,
|
||||||
/* this is what AT&T ksh seems to track, with the addition of emacs */
|
/* this is what AT&T ksh seems to track, with the addition of emacs */
|
||||||
|
2
misc.c
2
misc.c
@ -1636,7 +1636,7 @@ make_path(const char *cwd, const char *file,
|
|||||||
else if (use_cdpath) {
|
else if (use_cdpath) {
|
||||||
char *pend;
|
char *pend;
|
||||||
|
|
||||||
for (pend = plist; *pend && *pend != ':'; pend++)
|
for (pend = plist; *pend && *pend != PATH_SEP; pend++)
|
||||||
;
|
;
|
||||||
plen = pend - plist;
|
plen = pend - plist;
|
||||||
*cdpathp = *pend ? pend + 1 : NULL;
|
*cdpathp = *pend ? pend + 1 : NULL;
|
||||||
|
8
sh.h
8
sh.h
@ -299,6 +299,14 @@ struct rusage {
|
|||||||
} while (/* CONSTCOND */ 0)
|
} while (/* CONSTCOND */ 0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __OS2__
|
||||||
|
#define PATH_SEP ';'
|
||||||
|
#define PATH_SEP_STR ";"
|
||||||
|
#else
|
||||||
|
#define PATH_SEP ':'
|
||||||
|
#define PATH_SEP_STR ":"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef MKSH__NO_PATH_MAX
|
#ifdef MKSH__NO_PATH_MAX
|
||||||
#undef PATH_MAX
|
#undef PATH_MAX
|
||||||
#else
|
#else
|
||||||
|
Reference in New Issue
Block a user