* external.h (GET_LINENO_LNNO): Use H_GET_32/16.
[deliverable/binutils-gdb.git] / binutils / bucomm.c
index 76ffa60a172a19ca1ba68a2236fdcc13b08e43e3..bf0f7993d31d36e71fe15987db2ee668d430fcd4 100644 (file)
@@ -1,5 +1,5 @@
 /* bucomm.c -- Bin Utils COMmon code.
-   Copyright (C) 1991, 92, 93, 94, 95, 97, 98, 2000
+   Copyright 1991, 1992, 1993, 1994, 1995, 1997, 1998, 2000, 2001
    Free Software Foundation, Inc.
 
    This file is part of GNU Binutils.
@@ -157,7 +157,7 @@ list_supported_targets (name, f)
      const char *name;
      FILE *f;
 {
-  extern bfd_target *bfd_target_vector[];
+  extern const bfd_target *const *bfd_target_vector;
   int t;
 
   if (name == NULL)
@@ -168,6 +168,25 @@ list_supported_targets (name, f)
     fprintf (f, " %s", bfd_target_vector[t]->name);
   fprintf (f, "\n");
 }
+
+/* List the supported architectures.  */
+
+void
+list_supported_architectures (name, f)
+     const char *name;
+     FILE *f;
+{
+  const char** arch;
+
+  if (name == NULL)
+    fprintf (f, _("Supported architectures:"));
+  else
+    fprintf (f, _("%s: supported architectures:"), name);
+
+  for (arch = bfd_arch_list (); *arch; arch++)
+    fprintf (f, " %s", *arch);
+  fprintf (f, "\n");
+}
 \f
 /* Display the archive header for an element as if it were an ls -l listing:
 
@@ -219,7 +238,7 @@ make_tempname (filename)
   {
     /* We could have foo/bar\\baz, or foo\\bar, or d:bar.  */
     char *bslash = strrchr (filename, '\\');
-    if (bslash > slash)
+    if (slash == NULL || (bslash != NULL && bslash > slash))
       slash = bslash;
     if (slash == NULL && filename[0] != '\0' && filename[1] == ':')
       slash = filename + 1;
This page took 0.023276 seconds and 4 git commands to generate.