From f578d7cd10283fe5ec171712e6c7f25bf32c0490 Mon Sep 17 00:00:00 2001 From: tg Date: Wed, 11 Oct 2017 20:55:06 +0000 Subject: [PATCH] eval.c has the only mksh_sdirsep caller and uses it on substrings, so OS/2 drive letter checks are not correct there --- sh.h | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/sh.h b/sh.h index eedab88..76febad 100644 --- a/sh.h +++ b/sh.h @@ -182,7 +182,7 @@ #endif #ifdef EXTERN -__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.843 2017/10/11 20:50:46 tg Exp $"); +__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.844 2017/10/11 20:55:06 tg Exp $"); #endif #define MKSH_VERSION "R56 2017/08/29" @@ -2747,12 +2747,7 @@ extern int tty_init_fd(void); /* initialise tty_fd, tty_devtty */ char mksh_cdirsep_c = (c); \ (mksh_cdirsep_c == '/' || mksh_cdirsep_c == '\\'); \ }) -#define mksh_sdirsep(s) __extension__({ \ - const char *mksh_sdirsep_s = (s); \ - ((char *)((mksh_drvltr(mksh_sdirsep_s) && \ - !mksh_cdirsep(mksh_sdirsep_s[2])) ? \ - (mksh_sdirsep_s + 1) : strpbrk(mksh_sdirsep_s, "/\\"))); \ -}) +#define mksh_sdirsep(s) strpbrk((s), "/\\") #define mksh_vdirsep(s) __extension__({ \ const char *mksh_vdirsep_s = (s); \ ((char *)((mksh_drvltr(mksh_vdirsep_s) && \