From 3365cb8d0fe270cc26d3104d3350af11883828f3 Mon Sep 17 00:00:00 2001 From: tg Date: Fri, 1 Oct 2010 19:04:38 +0000 Subject: [PATCH] =?UTF-8?q?=E2=80=A2=20Build.sh:=20fix=20a=20compiler=20wa?= =?UTF-8?q?rning=20which,=20had=20it=20not=20been=20irrelevant=20in=20=20?= =?UTF-8?q?=20a=20mirtoconf=20check,=20would=E2=80=99ve=20been=20a=20real?= =?UTF-8?q?=20problem=20on=20an=20LP64=20platform=20=E2=80=A2=20sh.h:=20wo?= =?UTF-8?q?rk=20around=20a=20bad=20interaction=20between=20-Wformat=20on?= =?UTF-8?q?=20gcc=20and=20manual=20=20=20string=20pooling=20for=20T=5Fsyne?= =?UTF-8?q?rr,=20which=20is=20used=20in=20place=20of=20a=20format=20string?= =?UTF-8?q?=20=20=20in=20some=20places?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Build.sh | 8 ++++---- check.t | 4 ++-- sh.h | 9 +++++++-- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/Build.sh b/Build.sh index 134e5f5..98bdde4 100644 --- a/Build.sh +++ b/Build.sh @@ -1,5 +1,5 @@ #!/bin/sh -srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.461 2010/09/14 21:26:04 tg Exp $' +srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.462 2010/10/01 19:04:35 tg Exp $' #- # Copyright (c) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 # Thorsten Glaser @@ -1137,14 +1137,14 @@ ac_testn sig_t <<-'EOF' #include #include #include - int main(void) { return ((int)(ptrdiff_t)(sig_t)kill(0,0)); } + int main(void) { return ((int)(ptrdiff_t)(sig_t)(ptrdiff_t)kill(0,0)); } EOF ac_testn sighandler_t '!' sig_t 0 <<-'EOF' #include #include #include - int main(void) { return ((int)(ptrdiff_t)(sighandler_t)kill(0,0)); } + int main(void) { return ((int)(ptrdiff_t)(sighandler_t)(ptrdiff_t)kill(0,0)); } EOF if test 1 = $HAVE_SIGHANDLER_T; then CPPFLAGS="$CPPFLAGS -Dsig_t=sighandler_t" @@ -1155,7 +1155,7 @@ ac_testn __sighandler_t '!' sig_t 0 <<-'EOF' #include #include #include - int main(void) { return ((int)(ptrdiff_t)(__sighandler_t)kill(0,0)); } + int main(void) { return ((int)(ptrdiff_t)(__sighandler_t)(ptrdiff_t)kill(0,0)); } EOF if test 1 = $HAVE___SIGHANDLER_T; then CPPFLAGS="$CPPFLAGS -Dsig_t=__sighandler_t" diff --git a/check.t b/check.t index 8b31b34..5cd5a27 100644 --- a/check.t +++ b/check.t @@ -1,4 +1,4 @@ -# $MirOS: src/bin/mksh/check.t,v 1.394 2010/09/19 19:28:21 tg Exp $ +# $MirOS: src/bin/mksh/check.t,v 1.395 2010/10/01 19:04:37 tg Exp $ # $OpenBSD: bksl-nl.t,v 1.2 2001/01/28 23:04:56 niklas Exp $ # $OpenBSD: history.t,v 1.5 2001/01/28 23:04:56 niklas Exp $ # $OpenBSD: read.t,v 1.3 2003/03/10 03:48:16 david Exp $ @@ -25,7 +25,7 @@ # http://www.research.att.com/~gsf/public/ifs.sh expected-stdout: - @(#)MIRBSD KSH R39 2010/09/19 + @(#)MIRBSD KSH R39 2010/10/01 description: Check version of shell. stdin: diff --git a/sh.h b/sh.h index 08a0e72..78f6a19 100644 --- a/sh.h +++ b/sh.h @@ -154,9 +154,9 @@ #endif #ifdef EXTERN -__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.416 2010/09/19 19:28:23 tg Exp $"); +__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.417 2010/10/01 19:04:38 tg Exp $"); #endif -#define MKSH_VERSION "R39 2010/09/19" +#define MKSH_VERSION "R39 2010/10/01" #ifndef MKSH_INCLUDES_ONLY @@ -631,7 +631,12 @@ extern const struct shoption options[]; EXTERN char null[] I__(""); /* helpers for string pooling */ EXTERN const char T_intovfl[] I__("integer overflow %lu %c %lu prevented"); +#if defined(__GNUC__) +/* trust this to have string pooling; -Wformat bitches otherwise */ +#define T_synerr "syntax error" +#else EXTERN const char T_synerr[] I__("syntax error"); +#endif EXTERN const char T_r_fc_e_[] I__("r=fc -e -"); #define T_fc_e_ (T_r_fc_e_ + 2) /* "fc -e -" */ #define Tn_fc_e_ 7 /* strlen(T_fc_e_) */