catch MSYS dash printf builtin not working

This commit is contained in:
tg 2012-12-01 14:22:09 +00:00
parent b868c517b7
commit 6e41c9c2ee

View File

@ -1,5 +1,5 @@
#!/bin/sh #!/bin/sh
srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.594 2012/12/01 01:36:16 tg Exp $' srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.595 2012/12/01 14:22:09 tg Exp $'
#- #-
# Copyright (c) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, # Copyright (c) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
# 2011, 2012 # 2011, 2012
@ -1481,7 +1481,7 @@ else
#define EXTERN #define EXTERN
#define MKSH_INCLUDES_ONLY #define MKSH_INCLUDES_ONLY
#include "sh.h" #include "sh.h"
__RCSID("$MirOS: src/bin/mksh/Build.sh,v 1.594 2012/12/01 01:36:16 tg Exp $"); __RCSID("$MirOS: src/bin/mksh/Build.sh,v 1.595 2012/12/01 14:22:09 tg Exp $");
int main(void) { printf("Hello, World!\n"); return (0); } int main(void) { printf("Hello, World!\n"); return (0); }
EOF EOF
case $cm in case $cm in
@ -1983,6 +1983,7 @@ mksh_cfg= NSIG
esac esac
printf=printf printf=printf
(printf hallo) >/dev/null 2>&1 || printf=echo (printf hallo) >/dev/null 2>&1 || printf=echo
test $printf = echo || test "`printf %d 42`" = 42 || printf=echo
test $printf = echo || NSIG=`printf %d "$NSIG" 2>/dev/null` test $printf = echo || NSIG=`printf %d "$NSIG" 2>/dev/null`
$printf "NSIG=$NSIG ... " $printf "NSIG=$NSIG ... "
sigs="INT SEGV ABRT KILL ALRM BUS CHLD CLD CONT DIL EMT FPE HUP ILL" sigs="INT SEGV ABRT KILL ALRM BUS CHLD CLD CONT DIL EMT FPE HUP ILL"