From 811beb4b88cb3e017de56c38a1674ed587d04fe6 Mon Sep 17 00:00:00 2001 From: Stefan Farfeleder Date: Mon, 15 Aug 2005 17:49:38 +0000 Subject: [PATCH] Remove a hack for an ancient gdb. --- bin/sh/parser.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/bin/sh/parser.c b/bin/sh/parser.c index d40d28a072da..47711170c6e3 100644 --- a/bin/sh/parser.c +++ b/bin/sh/parser.c @@ -98,12 +98,6 @@ STATIC int startlinno; /* line # where last token started */ /* XXX When 'noaliases' is set to one, no alias expansion takes place. */ static int noaliases = 0; -#define GDB_HACK 1 /* avoid local declarations which gdb can't handle */ -#ifdef GDB_HACK -static const char argvars[5] = {CTLVAR, VSNORMAL|VSQUOTE, '@', '=', '\0'}; -static const char types[] = "}-+?="; -#endif - STATIC union node *list(int); STATIC union node *andor(void); @@ -384,13 +378,12 @@ TRACE(("expecting DO got %s %s\n", tokname[got], got == TWORD ? wordtext : "")); if (lasttoken != TNL && lasttoken != TSEMI) synexpect(-1); } else { -#ifndef GDB_HACK - static const char argvars[5] = {CTLVAR, VSNORMAL|VSQUOTE, - '@', '=', '\0'}; -#endif + static char argvars[5] = { + CTLVAR, VSNORMAL|VSQUOTE, '@', '=', '\0' + }; n2 = (union node *)stalloc(sizeof (struct narg)); n2->type = NARG; - n2->narg.text = (char *)argvars; + n2->narg.text = argvars; n2->narg.backquote = NULL; n2->narg.next = NULL; n1->nfor.args = n2; @@ -1186,9 +1179,7 @@ parsesub: { int typeloc; int flags; char *p; -#ifndef GDB_HACK static const char types[] = "}-+?="; -#endif int bracketed_name = 0; /* used to handle ${[0-9]*} variables */ c = pgetc();