From d5a29d5e608822fa28529514265d62eb0ba9619e Mon Sep 17 00:00:00 2001 From: tg Date: Wed, 11 Oct 2017 21:52:46 +0000 Subject: [PATCH] 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 --- sh.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sh.h b/sh.h index d645f8d..b76bd6c 100644 --- a/sh.h +++ b/sh.h @@ -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); \