From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6593 invoked by alias); 2 Sep 2002 18:23:22 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 6586 invoked from network); 2 Sep 2002 18:23:21 -0000 Received: from unknown (HELO dr-evil.shagadelic.org) (208.176.2.174) by sources.redhat.com with SMTP; 2 Sep 2002 18:23:21 -0000 Received: by dr-evil.shagadelic.org (Postfix, from userid 7518) id C6E599869; Mon, 2 Sep 2002 11:23:20 -0700 (PDT) Date: Mon, 02 Sep 2002 11:23:00 -0000 From: Jason R Thorpe To: gdb-patches@sources.redhat.com Subject: [PATCH/RFA] yyrule, yyname remap in .y files Message-ID: <20020902112320.K4034@dr-evil.shagadelic.org> Mail-Followup-To: Jason R Thorpe , gdb-patches@sources.redhat.com Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="+9faIjRurCDpBc7U" Content-Disposition: inline User-Agent: Mutt/1.2.5i Organization: Wasabi Systems, Inc. X-SW-Source: 2002-09/txt/msg00020.txt.bz2 --+9faIjRurCDpBc7U Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 838 Accoring to the ChangeLogs, there was some excitement about this back in 1992. In any case, the fact remains that some versions of yacc(1) export yyrule and yyname when YYDEBUG is enabled. YYDEBUG is enabled by default in the .y files. This is worked around on the i386-openbsd host by setting MH_CFLAGS to -DYYDEBUG=0. Now, I could do that for every single NetBSD host, but it seems a little silly do have to work around this in multiple places for multiple hosts when we could just remap these symbols and just be done with it. This patch does that. OK to commit? * ada-exp.y (yyname, yyrule): Remap global variables that appear when YYDEBUG is set to 1. * c-exp.y: Likewise. * f-exp.y: Likewise. * jv-exp.y: Likewise. * m2-exp.y: Likewise. * p-exp.y: Likewise. -- -- Jason R. Thorpe --+9faIjRurCDpBc7U Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=yfile-patch Content-length: 3724 Index: ada-exp.y =================================================================== RCS file: /cvs/src/src/gdb/ada-exp.y,v retrieving revision 1.2 diff -c -r1.2 ada-exp.y *** ada-exp.y 21 Jun 2002 14:32:10 -0000 1.2 --- ada-exp.y 2 Sep 2002 18:10:14 -0000 *************** *** 90,95 **** --- 90,97 ---- #define yylloc ada_lloc #define yyreds ada_reds /* With YYDEBUG defined */ #define yytoks ada_toks /* With YYDEBUG defined */ + #define yyname ada_name /* With YYDEBUG defined */ + #define yyrule ada_rule /* With YYDEBUG defined */ #ifndef YYDEBUG #define YYDEBUG 1 /* Default to yydebug support */ Index: c-exp.y =================================================================== RCS file: /cvs/src/src/gdb/c-exp.y,v retrieving revision 1.11 diff -c -r1.11 c-exp.y *** c-exp.y 21 Jun 2002 14:32:10 -0000 1.11 --- c-exp.y 2 Sep 2002 18:10:19 -0000 *************** *** 89,94 **** --- 89,96 ---- #define yylloc c_lloc #define yyreds c_reds /* With YYDEBUG defined */ #define yytoks c_toks /* With YYDEBUG defined */ + #define yyname c_name /* With YYDEBUG defined */ + #define yyrule c_rule /* With YYDEBUG defined */ #define yylhs c_yylhs #define yylen c_yylen #define yydefred c_yydefred Index: f-exp.y =================================================================== RCS file: /cvs/src/src/gdb/f-exp.y,v retrieving revision 1.7 diff -c -r1.7 f-exp.y *** f-exp.y 21 Jun 2002 14:32:10 -0000 1.7 --- f-exp.y 2 Sep 2002 18:10:20 -0000 *************** *** 91,96 **** --- 91,98 ---- #define yylloc f_lloc #define yyreds f_reds /* With YYDEBUG defined */ #define yytoks f_toks /* With YYDEBUG defined */ + #define yyname f_name /* With YYDEBUG defined */ + #define yyrule f_rule /* With YYDEBUG defined */ #define yylhs f_yylhs #define yylen f_yylen #define yydefred f_yydefred Index: jv-exp.y =================================================================== RCS file: /cvs/src/src/gdb/jv-exp.y,v retrieving revision 1.8 diff -c -r1.8 jv-exp.y *** jv-exp.y 25 Jul 2002 04:33:24 -0000 1.8 --- jv-exp.y 2 Sep 2002 18:10:21 -0000 *************** *** 85,90 **** --- 85,92 ---- #define yylloc java_lloc #define yyreds java_reds /* With YYDEBUG defined */ #define yytoks java_toks /* With YYDEBUG defined */ + #define yyname java_name /* With YYDEBUG defined */ + #define yyrule java_rule /* With YYDEBUG defined */ #define yylhs java_yylhs #define yylen java_yylen #define yydefred java_yydefred Index: m2-exp.y =================================================================== RCS file: /cvs/src/src/gdb/m2-exp.y,v retrieving revision 1.5 diff -c -r1.5 m2-exp.y *** m2-exp.y 21 Jun 2002 14:32:10 -0000 1.5 --- m2-exp.y 2 Sep 2002 18:10:22 -0000 *************** *** 87,92 **** --- 87,94 ---- #define yylloc m2_lloc #define yyreds m2_reds /* With YYDEBUG defined */ #define yytoks m2_toks /* With YYDEBUG defined */ + #define yyname m2_name /* With YYDEBUG defined */ + #define yyrule m2_rule /* With YYDEBUG defined */ #define yylhs m2_yylhs #define yylen m2_yylen #define yydefred m2_yydefred Index: p-exp.y =================================================================== RCS file: /cvs/src/src/gdb/p-exp.y,v retrieving revision 1.12 diff -c -r1.12 p-exp.y *** p-exp.y 21 Jun 2002 14:32:10 -0000 1.12 --- p-exp.y 2 Sep 2002 18:10:23 -0000 *************** *** 93,98 **** --- 93,100 ---- #define yylloc pascal_lloc #define yyreds pascal_reds /* With YYDEBUG defined */ #define yytoks pascal_toks /* With YYDEBUG defined */ + #define yyname pascal_name /* With YYDEBUG defined */ + #define yyrule pascal_rule /* With YYDEBUG defined */ #define yylhs pascal_yylhs #define yylen pascal_yylen #define yydefred pascal_yydefred --+9faIjRurCDpBc7U--