* breakpoint.c (print_one_breakpoint_location): Revert Enb field
[deliverable/binutils-gdb.git] / binutils / windmc.c
index 5465b351cd77dd1ae6bb8a47a24e3e4a86424228..2c6da4283dbc18c057b7dab0f28389b9586ae1fc 100644 (file)
@@ -7,7 +7,7 @@
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
@@ -20,6 +20,7 @@
    Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
    02110-1301, USA.  */
 
+
 /* This program can read and comile Windows message format.
 
    It is based on information taken from the following sources:
@@ -244,18 +245,23 @@ set_endianess (bfd *abfd, const char *target)
   if (! target_vec)
     fatal ("Can't detect target endianess and architecture.");
   target_is_bigendian = ((target_vec->byteorder == BFD_ENDIAN_BIG) ? 1 : 0);
+
   {
-    const char *tname = target_vec->name;
-    const char **arch = bfd_arch_list ();
+    const char *  tname = target_vec->name;
+    const char ** arches = bfd_arch_list ();
 
-    if (arch && tname)
+    if (arches && tname)
       {
+       const char ** arch = arches;
+
        if (strchr (tname, '-') != NULL)
          tname = strchr (tname, '-') + 1;
+
        while (*arch != NULL)
          {
            const char *in_a = strstr (*arch, tname);
            char end_ch = (in_a ? in_a[strlen (tname)] : 0);
+
            if (in_a && (in_a == *arch || in_a[-1] == ':')
                && end_ch == 0)
              {
@@ -265,6 +271,9 @@ set_endianess (bfd *abfd, const char *target)
            arch++;
          }
       }
+
+    free (arches);
+
     if (! def_target_arch)
       fatal ("Can't detect architecture.");
   }
This page took 0.024109 seconds and 4 git commands to generate.