public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Tristan Gingold <gingold@adacore.com>
To: binutils <binutils@sourceware.org>
Cc: Nick Clifton <nickc@redhat.com>
Subject: [patch] Convert aix386-core to iso-c
Date: Fri, 22 Apr 2011 08:10:00 -0000	[thread overview]
Message-ID: <15BCAB15-09E4-46D0-8653-13589764E066@adacore.com> (raw)
In-Reply-To: <4DB03A7B.4090002@redhat.com>

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
 };

  parent reply	other threads:[~2011-04-22  8:10 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-18 12:21 [patch] Convert coff-rs6000.c " Tristan Gingold
2011-04-18 13:31 ` Nick Clifton
2011-04-18 14:00   ` Tristan Gingold
2011-04-21 10:22   ` Joseph S. Myers
2011-04-21 10:28     ` Tristan Gingold
2011-04-21 14:08     ` Nick Clifton
2011-04-22  8:02       ` [patch] Convert coff64-rs6000.c " Tristan Gingold
2011-04-22  8:19         ` Andreas Schwab
2011-04-22  8:24           ` Tristan Gingold
2011-04-26  8:47         ` Richard Sandiford
2011-04-26  9:14           ` Tristan Gingold
2011-04-22  8:10       ` Tristan Gingold [this message]
2011-04-26  8:49         ` [patch] Convert aix386-core " Richard Sandiford
2011-04-27  9:44           ` Nick Clifton
2011-04-21 21:22     ` [patch] Convert coff-rs6000.c " Ian Lance Taylor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=15BCAB15-09E4-46D0-8653-13589764E066@adacore.com \
    --to=gingold@adacore.com \
    --cc=binutils@sourceware.org \
    --cc=nickc@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).