]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
sim: rl78: rename open symbol to avoid collisions
authorMike Frysinger <vapier@gentoo.org>
Sun, 23 May 2021 04:41:21 +0000 (00:41 -0400)
committerMike Frysinger <vapier@gentoo.org>
Sun, 23 May 2021 21:40:32 +0000 (17:40 -0400)
If the header files define open(), make sure our local open var
doesn't shadow it.

sim/rl78/ChangeLog
sim/rl78/gdb-if.c

index ecd9ed0fc76c733b3ef21b70110eb2db79e6c9ad..60102ee97a8741fdde8814d25aeef44a40e26a1b 100644 (file)
@@ -1,3 +1,9 @@
+2021-05-23  Mike Frysinger  <vapier@gentoo.org>
+
+       * gdb-if.c (open): Rename to ...
+       (is_open): ... this.
+       (sim_open, sim_close): Rename open to is_open.
+
 2021-05-16  Mike Frysinger  <vapier@gentoo.org>
 
        * cpu.c, gdb-if.c, load.c, main.c, mem.c, rl78.c, trace.c: Replace
index a2414f9a35573fce0e780f751a7269281ff06e6f..ee799657076ed57c7b10c81b3f228785401babbb 100644 (file)
@@ -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