mksh_abspath() on OS/2 now requires a dir separator after the drive letter

and colon for it to recognise a pathname as absolute, as it should be

XXX make_path() unreviewed wrt this change
This commit is contained in:
tg 2017-10-11 21:52:46 +00:00
parent 2cdd9d77de
commit d5a29d5e60
1 changed files with 3 additions and 2 deletions

5
sh.h
View File

@ -182,7 +182,7 @@
#endif
#ifdef EXTERN
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.845 2017/10/11 21:09:24 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.846 2017/10/11 21:52:46 tg Exp $");
#endif
#define MKSH_VERSION "R56 2017/08/29"
@ -2741,7 +2741,8 @@ extern int tty_init_fd(void); /* initialise tty_fd, tty_devtty */
#define mksh_abspath(s) __extension__({ \
const char *mksh_abspath_s = (s); \
(mksh_cdirsep(mksh_abspath_s[0]) || \
mksh_drvltr(mksh_abspath_s)); \
(mksh_drvltr(mksh_abspath_s) && \
mksh_cdirsep(mksh_abspath_s[2]))); \
})
#define mksh_cdirsep(c) __extension__({ \
char mksh_cdirsep_c = (c); \