This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] Convert aix386-core to iso-c


Check by building for i386-ibm-aix.
Gas fails to build because SEG_UNKNOWN is not defined.

(Should this target be deprecated ?)

Ok for trunk ?

Tristan.

bfd/
2011-04-22  Tristan Gingold  <gingold@adacore.com>

	* aix386-core.c: Convert to ISO-C.  Remove PARAMS and PTR macros.


diff --git a/bfd/aix386-core.c b/bfd/aix386-core.c
index 634d997..000ed13 100644
--- a/bfd/aix386-core.c
+++ b/bfd/aix386-core.c
@@ -66,11 +66,10 @@ struct trad_core_struct {
   asection *sections[MAX_CORE_SEGS];
 };
 
-static void swap_abort PARAMS ((void));
+static void swap_abort (void);
 
 static const bfd_target *
-aix386_core_file_p (abfd)
-     bfd *abfd;
+aix386_core_file_p (bfd *abfd)
 {
   int i, n;
   unsigned char longbuf[4];	/* Raw bytes of various header fields */
@@ -84,7 +83,7 @@ aix386_core_file_p (abfd)
   flagword flags;
 
   amt = sizeof (longbuf);
-  if (bfd_bread ((PTR) longbuf, amt, abfd) != amt)
+  if (bfd_bread ((void *) longbuf, amt, abfd) != amt)
     {
       if (bfd_get_error () != bfd_error_system_call)
 	bfd_set_error (bfd_error_wrong_format);
@@ -104,7 +103,7 @@ aix386_core_file_p (abfd)
 
   core = &mergem->internal_core;
 
-  if ((bfd_bread ((PTR) core, core_size, abfd)) != core_size)
+  if ((bfd_bread ((void *) core, core_size, abfd)) != core_size)
     {
       if (bfd_get_error () != bfd_error_system_call)
 	bfd_set_error (bfd_error_wrong_format);
@@ -196,15 +195,13 @@ aix386_core_file_p (abfd)
 }
 
 static char *
-aix386_core_file_failing_command (abfd)
-     bfd *abfd;
+aix386_core_file_failing_command (bfd *abfd)
 {
   return core_hdr (abfd)->cd_comm;
 }
 
 static int
-aix386_core_file_failing_signal (abfd)
-     bfd *abfd;
+aix386_core_file_failing_signal (bfd *abfd)
 {
   return core_hdr (abfd)->cd_cursig;
 }
@@ -216,7 +213,7 @@ aix386_core_file_failing_signal (abfd)
 /* If somebody calls any byte-swapping routines, shoot them.  */
 
 static void
-swap_abort ()
+swap_abort (void)
 {
   /* This way doesn't require any declaration for ANSI to fuck up.  */
   abort ();
@@ -268,5 +265,5 @@ const bfd_target aix386_core_vec = {
 
   NULL,
 
-  (PTR) 0
+  (void *) 0
 };


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]