From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id 813AE3858022 for ; Sun, 23 May 2021 21:40:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 813AE3858022 Received: from vapier.lan (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 90511335D48 for ; Sun, 23 May 2021 21:40:52 +0000 (UTC) From: Mike Frysinger To: gdb-patches@sourceware.org Subject: [PATCH/committed] sim: rl78: rename open symbol to avoid collisions Date: Sun, 23 May 2021 17:40:51 -0400 Message-Id: <20210523214051.15089-1-vapier@gentoo.org> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-10.6 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 May 2021 21:40:55 -0000 If the header files define open(), make sure our local open var doesn't shadow it. --- sim/rl78/ChangeLog | 6 ++++++ sim/rl78/gdb-if.c | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/sim/rl78/ChangeLog b/sim/rl78/ChangeLog index ecd9ed0fc76c..60102ee97a87 100644 --- a/sim/rl78/ChangeLog +++ b/sim/rl78/ChangeLog @@ -1,3 +1,9 @@ +2021-05-23 Mike Frysinger + + * gdb-if.c (open): Rename to ... + (is_open): ... this. + (sim_open, sim_close): Rename open to is_open. + 2021-05-16 Mike Frysinger * cpu.c, gdb-if.c, load.c, main.c, mem.c, rl78.c, trace.c: Replace diff --git a/sim/rl78/gdb-if.c b/sim/rl78/gdb-if.c index a2414f9a3557..ee799657076e 100644 --- a/sim/rl78/gdb-if.c +++ b/sim/rl78/gdb-if.c @@ -56,7 +56,7 @@ static struct sim_state the_minisim = { "This is the sole rl78 minisim instance." }; -static int open; +static int is_open; static struct host_callback_struct *host_callbacks; @@ -69,7 +69,7 @@ sim_open (SIM_OPEN_KIND kind, struct host_callback_struct *callback, struct bfd *abfd, char * const *argv) { - if (open) + if (is_open) fprintf (stderr, "rl78 minisim: re-opened sim\n"); /* The 'run' interface doesn't use this function, so we don't care @@ -88,7 +88,7 @@ sim_open (SIM_OPEN_KIND kind, trace = 0; sim_disasm_init (abfd); - open = 1; + is_open = 1; while (argv != NULL && *argv != NULL) { @@ -145,7 +145,7 @@ sim_close (SIM_DESC sd, int quitting) /* Not much to do. At least free up our memory. */ init_mem (); - open = 0; + is_open = 0; } /* Open the program to run; print a message if the program cannot -- 2.31.1