From 606291beabab14c85a141c7a4225fbcab8d19fbd Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Wed, 23 Sep 2009 23:15:43 +0200 Subject: *: more portability fixes by Dan Fandrich Signed-off-by: Denys Vlasenko --- shell/ash.c | 2 +- shell/bbsh.c | 2 +- shell/hush.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'shell') diff --git a/shell/ash.c b/shell/ash.c index db28af7d3..b7c643195 100644 --- a/shell/ash.c +++ b/shell/ash.c @@ -5042,7 +5042,7 @@ struct redirtab { struct redirtab *next; int nullredirs; int pair_count; - struct two_fd_t two_fd[0]; + struct two_fd_t two_fd[]; }; #define redirlist (G_var.redirlist) diff --git a/shell/bbsh.c b/shell/bbsh.c index ad875abf5..c3726263a 100644 --- a/shell/bbsh.c +++ b/shell/bbsh.c @@ -54,7 +54,7 @@ struct command { int flags; // exit, suspend, && || int pid; // pid (or exit code) int argc; - char *argv[0]; + char *argv[]; }; // A collection of processes piped into/waiting on each other. diff --git a/shell/hush.c b/shell/hush.c index eaf911458..9db2091dd 100644 --- a/shell/hush.c +++ b/shell/hush.c @@ -787,7 +787,7 @@ static void xxfree(void *ptr) * HUSH_DEBUG >= 2 prints line number in this file where it was detected. */ #if HUSH_DEBUG < 2 -# define die_if_script(lineno, fmt...) die_if_script(fmt) +# define die_if_script(lineno, ...) die_if_script(__VA_ARGS__) # define syntax_error(lineno, msg) syntax_error(msg) # define syntax_error_at(lineno, msg) syntax_error_at(msg) # define syntax_error_unterm_ch(lineno, ch) syntax_error_unterm_ch(ch) @@ -856,7 +856,7 @@ static void syntax_error_unexpected_ch(unsigned lineno, int ch) # undef syntax_error_unterm_str # undef syntax_error_unexpected_ch #else -# define die_if_script(fmt...) die_if_script(__LINE__, fmt) +# define die_if_script(...) die_if_script(__LINE__, __VA_ARGS__) # define syntax_error(msg) syntax_error(__LINE__, msg) # define syntax_error_at(msg) syntax_error_at(__LINE__, msg) # define syntax_error_unterm_ch(ch) syntax_error_unterm_ch(__LINE__, ch) -- cgit v1.2.3