From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8076 invoked by alias); 22 Apr 2011 08:10:43 -0000 Received: (qmail 8062 invoked by uid 22791); 22 Apr 2011 08:10:41 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (194.98.77.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 22 Apr 2011 08:10:28 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 022A1CB0353; Fri, 22 Apr 2011 10:10:27 +0200 (CEST) Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kXPw1SDVkuEv; Fri, 22 Apr 2011 10:10:24 +0200 (CEST) Received: from ulanbator.act-europe.fr (ulanbator.act-europe.fr [10.10.1.67]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mel.act-europe.fr (Postfix) with ESMTP id F1C04CB0361; Fri, 22 Apr 2011 10:10:23 +0200 (CEST) Subject: [patch] Convert aix386-core to iso-c Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Tristan Gingold In-Reply-To: <4DB03A7B.4090002@redhat.com> Date: Fri, 22 Apr 2011 08:10:00 -0000 Cc: Nick Clifton Content-Transfer-Encoding: 7bit Message-Id: <15BCAB15-09E4-46D0-8653-13589764E066@adacore.com> References: <49F283B4-757D-4BFF-9FCB-94097A486783@adacore.com> <4DAC3D3A.7090106@redhat.com> <4DB03A7B.4090002@redhat.com> To: binutils X-IsSubscribed: yes Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2011-04/txt/msg00321.txt.bz2 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 * 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 };