From 3af76d7f9492a78aeb0f4709c917e2576f08ccb0 Mon Sep 17 00:00:00 2001 From: KO Myung-Hun Date: Sat, 16 May 2015 19:51:12 +0900 Subject: [PATCH] Check sh.exe on OS/2 intead of sh --- main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/main.c b/main.c index ced65d7..49c6583 100644 --- a/main.c +++ b/main.c @@ -263,8 +263,13 @@ main_init(int argc, const char *argv[], Source **sp, struct block **lp) return (1); #if defined(MKSH_BINSHPOSIX) || defined(MKSH_BINSHREDUCED) +#ifdef __OS2__ +#define EXE_EXT ".exe" +#else +#define EXE_EXT "" +#endif /* are we called as -sh or /bin/sh or so? */ - if (!strcmp(ccp, "sh")) { + if (!strcmp(ccp, "sh" EXE_EXT)) { /* either also turns off braceexpand */ #ifdef MKSH_BINSHPOSIX /* enable better POSIX conformance */