Add a test case for skip with inlined functions
[deliverable/binutils-gdb.git] / bfd / trad-core.c
index 4b9d14d87127af161e13c68e7e4c37b9aba631db..3c47099ced5845338f00ff6853e04366bfa68ed4 100644 (file)
@@ -1,7 +1,5 @@
 /* BFD back end for traditional Unix core files (U-area and raw sections)
-   Copyright 1988, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999,
-   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2011
-   Free Software Foundation, Inc.
+   Copyright (C) 1988-2019 Free Software Foundation, Inc.
    Written by John Gilmore of Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -24,7 +22,7 @@
 #include "sysdep.h"
 #include "bfd.h"
 #include "libbfd.h"
-#include "libaout.h"           /* BFD a.out internal data structures */
+#include "libaout.h"          /* BFD a.out internal data structures */
 
 #include <sys/param.h>
 #ifdef HAVE_DIRENT_H
@@ -60,26 +58,21 @@ struct trad_core_struct
   struct user u;
 };
 
-#define core_upage(bfd) (&((bfd)->tdata.trad_core_data->u))
-#define core_datasec(bfd) ((bfd)->tdata.trad_core_data->data_section)
+#define core_upage(bfd)  (&((bfd)->tdata.trad_core_data->u))
+#define core_datasec(bfd)  ((bfd)->tdata.trad_core_data->data_section)
 #define core_stacksec(bfd) ((bfd)->tdata.trad_core_data->stack_section)
-#define core_regsec(bfd) ((bfd)->tdata.trad_core_data->reg_section)
+#define core_regsec(bfd)   ((bfd)->tdata.trad_core_data->reg_section)
 
 /* forward declarations */
 
-const bfd_target *trad_unix_core_file_p PARAMS ((bfd *abfd));
-char * trad_unix_core_file_failing_command PARAMS ((bfd *abfd));
-int trad_unix_core_file_failing_signal PARAMS ((bfd *abfd));
 #define trad_unix_core_file_matches_executable_p generic_core_file_matches_executable_p
 #define trad_unix_core_file_pid _bfd_nocore_core_file_pid
-static void swap_abort PARAMS ((void));
 
-/* Handle 4.2-style (and perhaps also sysV-style) core dump file.  */
 
-const bfd_target *
-trad_unix_core_file_p (abfd)
-     bfd *abfd;
+/* Handle 4.2-style (and perhaps also sysV-style) core dump file.  */
 
+static const bfd_target *
+trad_unix_core_file_p (bfd *abfd)
 {
   int val;
   struct user u;
@@ -236,9 +229,8 @@ trad_unix_core_file_p (abfd)
   return NULL;
 }
 
-char *
-trad_unix_core_file_failing_command (abfd)
-     bfd *abfd;
+static char *
+trad_unix_core_file_failing_command (bfd *abfd)
 {
 #ifndef NO_CORE_COMMAND
   char *com = abfd->tdata.trad_core_data->u.u_comm;
@@ -249,9 +241,8 @@ trad_unix_core_file_failing_command (abfd)
     return 0;
 }
 
-int
-trad_unix_core_file_failing_signal (ignore_abfd)
-     bfd *ignore_abfd ATTRIBUTE_UNUSED;
+static int
+trad_unix_core_file_failing_signal (bfd *ignore_abfd ATTRIBUTE_UNUSED)
 {
 #ifdef TRAD_UNIX_CORE_FILE_FAILING_SIGNAL
   return TRAD_UNIX_CORE_FILE_FAILING_SIGNAL(ignore_abfd);
@@ -262,7 +253,7 @@ trad_unix_core_file_failing_signal (ignore_abfd)
 \f
 /* If somebody calls any byte-swapping routines, shoot them.  */
 static void
-swap_abort ()
+swap_abort (void)
 {
   abort (); /* This way doesn't require any declaration for ANSI to fuck up */
 }
@@ -274,7 +265,7 @@ swap_abort ()
 #define        NO_PUT64 ((void (*) (bfd_uint64_t, void *)) swap_abort)
 #define        NO_GETS64 ((bfd_int64_t (*) (const void *)) swap_abort)
 
-const bfd_target trad_core_vec =
+const bfd_target core_trad_vec =
   {
     "trad-core",
     bfd_target_unknown_flavour,
@@ -302,12 +293,16 @@ const bfd_target trad_core_vec =
       trad_unix_core_file_p            /* a core file */
     },
     {                          /* bfd_set_format */
-      bfd_false, bfd_false,
-      bfd_false, bfd_false
+      _bfd_bool_bfd_false_error,
+      _bfd_bool_bfd_false_error,
+      _bfd_bool_bfd_false_error,
+      _bfd_bool_bfd_false_error
     },
     {                          /* bfd_write_contents */
-      bfd_false, bfd_false,
-      bfd_false, bfd_false
+      _bfd_bool_bfd_false_error,
+      _bfd_bool_bfd_false_error,
+      _bfd_bool_bfd_false_error,
+      _bfd_bool_bfd_false_error
     },
 
     BFD_JUMP_TABLE_GENERIC (_bfd_generic),
@@ -322,5 +317,5 @@ const bfd_target trad_core_vec =
 
     NULL,
 
-    (PTR) 0                    /* backend_data */
+    NULL                       /* backend_data */
   };
This page took 0.027003 seconds and 4 git commands to generate.