* Convert some include/coff and include/elf to ISO C90
@ 2003-06-29 12:44 Andreas Jaeger
2003-06-29 13:20 ` Alan Modra
0 siblings, 1 reply; 2+ messages in thread
From: Andreas Jaeger @ 2003-06-29 12:44 UTC (permalink / raw)
To: binutils
This patch converts the include/coff and include/elf directories to
ISO C90 prototypes.
I've tested this with configure --enable-build-warnings
--enable-64-bit-bfd --enable-targets=all on a binutils tree.
Ok to commit?
Andreas
For include/coff/:
2003-06-29 Andreas Jaeger <aj@suse.de>
* xcoff.h (struct __rtinit ): Convert to ISO C90 prototypes.
* ecoff.h: Convert to ISO C90 prototypes. Replace PTR by void *.
For include/elf/:
2003-06-29 Andreas Jaeger <aj@suse.de>
* mmix.h: Convert to ISO C90 prototypes.
* reloc-macros.h (START_RELOC_NUMBERS): Convert to ISO C90
prototype.
============================================================
Index: include/coff/ecoff.h
--- coff/ecoff.h 30 Nov 2002 08:39:45 -0000 1.3
+++ coff/ecoff.h 29 Jun 2003 12:44:20 -0000
@@ -2,7 +2,7 @@
This does not include symbol information, found in sym.h and
symconst.h.
- Copyright 2001, 2002 Free Software Foundation, Inc.
+ Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -296,21 +296,21 @@ struct ecoff_debug_info
fields are also used by the assembler to output ECOFF debugging
information. */
unsigned char *line;
- PTR external_dnr; /* struct dnr_ext */
- PTR external_pdr; /* struct pdr_ext */
- PTR external_sym; /* struct sym_ext */
- PTR external_opt; /* struct opt_ext */
+ void *external_dnr; /* struct dnr_ext */
+ void *external_pdr; /* struct pdr_ext */
+ void *external_sym; /* struct sym_ext */
+ void *external_opt; /* struct opt_ext */
union aux_ext *external_aux;
char *ss;
char *ssext;
- PTR external_fdr; /* struct fdr_ext */
- PTR external_rfd; /* struct rfd_ext */
- PTR external_ext; /* struct ext_ext */
+ void *external_fdr; /* struct fdr_ext */
+ void *external_rfd; /* struct rfd_ext */
+ void *external_ext; /* struct ext_ext */
/* These fields are used when linking. They may disappear at some
point. */
char *ssext_end;
- PTR external_ext_end;
+ void *external_ext_end;
/* When linking, this field holds a mapping from the input FDR
numbers to the output numbers, and is used when writing out the
@@ -406,32 +406,31 @@ struct ecoff_debug_swap
bfd_size_type external_rfd_size;
bfd_size_type external_ext_size;
/* Functions to swap in external symbolic data. */
- void (*swap_hdr_in) PARAMS ((bfd *, PTR, HDRR *));
- void (*swap_dnr_in) PARAMS ((bfd *, PTR, DNR *));
- void (*swap_pdr_in) PARAMS ((bfd *, PTR, PDR *));
- void (*swap_sym_in) PARAMS ((bfd *, PTR, SYMR *));
- void (*swap_opt_in) PARAMS ((bfd *, PTR, OPTR *));
- void (*swap_fdr_in) PARAMS ((bfd *, PTR, FDR *));
- void (*swap_rfd_in) PARAMS ((bfd *, PTR, RFDT *));
- void (*swap_ext_in) PARAMS ((bfd *, PTR, EXTR *));
- void (*swap_tir_in) PARAMS ((int, const struct tir_ext *, TIR *));
- void (*swap_rndx_in) PARAMS ((int, const struct rndx_ext *, RNDXR *));
+ void (*swap_hdr_in) (bfd *, void *, HDRR *);
+ void (*swap_dnr_in) (bfd *, void *, DNR *);
+ void (*swap_pdr_in) (bfd *, void *, PDR *);
+ void (*swap_sym_in) (bfd *, void *, SYMR *);
+ void (*swap_opt_in) (bfd *, void *, OPTR *);
+ void (*swap_fdr_in) (bfd *, void *, FDR *);
+ void (*swap_rfd_in) (bfd *, void *, RFDT *);
+ void (*swap_ext_in) (bfd *, void *, EXTR *);
+ void (*swap_tir_in) (int, const struct tir_ext *, TIR *);
+ void (*swap_rndx_in) (int, const struct rndx_ext *, RNDXR *);
/* Functions to swap out external symbolic data. */
- void (*swap_hdr_out) PARAMS ((bfd *, const HDRR *, PTR));
- void (*swap_dnr_out) PARAMS ((bfd *, const DNR *, PTR));
- void (*swap_pdr_out) PARAMS ((bfd *, const PDR *, PTR));
- void (*swap_sym_out) PARAMS ((bfd *, const SYMR *, PTR));
- void (*swap_opt_out) PARAMS ((bfd *, const OPTR *, PTR));
- void (*swap_fdr_out) PARAMS ((bfd *, const FDR *, PTR));
- void (*swap_rfd_out) PARAMS ((bfd *, const RFDT *, PTR));
- void (*swap_ext_out) PARAMS ((bfd *, const EXTR *, PTR));
- void (*swap_tir_out) PARAMS ((int, const TIR *, struct tir_ext *));
- void (*swap_rndx_out) PARAMS ((int, const RNDXR *, struct rndx_ext *));
+ void (*swap_hdr_out) (bfd *, const HDRR *, void *);
+ void (*swap_dnr_out) (bfd *, const DNR *, void *);
+ void (*swap_pdr_out) (bfd *, const PDR *, void *);
+ void (*swap_sym_out) (bfd *, const SYMR *, void *);
+ void (*swap_opt_out) (bfd *, const OPTR *, void *);
+ void (*swap_fdr_out) (bfd *, const FDR *, void *);
+ void (*swap_rfd_out) (bfd *, const RFDT *, void *);
+ void (*swap_ext_out) (bfd *, const EXTR *, void *);
+ void (*swap_tir_out) (int, const TIR *, struct tir_ext *);
+ void (*swap_rndx_out) (int, const RNDXR *, struct rndx_ext *);
/* Function to read symbol data and set up pointers in
ecoff_debug_info structure. The section argument is used for
ELF, not straight ECOFF. */
- bfd_boolean (*read_debug_info)
- PARAMS ((bfd *, asection *, struct ecoff_debug_info *));
+ bfd_boolean (*read_debug_info) (bfd *, asection *, struct ecoff_debug_info *);
};
#endif /* ! defined (ECOFF_H) */
============================================================
Index: include/coff/xcoff.h
--- coff/xcoff.h 30 Nov 2002 08:39:45 -0000 1.10
+++ coff/xcoff.h 29 Jun 2003 12:44:21 -0000
@@ -1,6 +1,6 @@
/* Internal format of XCOFF object file data structures for BFD.
- Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
+ Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>, Cygnus Support.
@@ -424,7 +424,7 @@ struct __rtinit
{
/* Pointer to runtime linker.
XXX: Is the parameter really void? */
- int (*rtl) PARAMS ((void));
+ int (*rtl) (void);
/* Offset to array of init functions, 0 if none. */
int init_offset;
============================================================
Index: include/elf/mips.h
--- elf/mips.h 28 Jan 2003 00:01:08 -0000 1.19
+++ elf/mips.h 29 Jun 2003 12:44:21 -0000
@@ -1,5 +1,5 @@
/* MIPS ELF support for BFD.
- Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+ Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003
Free Software Foundation, Inc.
By Ian Lance Taylor, Cygnus Support, <ian@cygnus.com>, from
@@ -456,9 +456,9 @@ typedef struct
/* MIPS ELF .reginfo swapping routines. */
extern void bfd_mips_elf32_swap_reginfo_in
- PARAMS ((bfd *, const Elf32_External_RegInfo *, Elf32_RegInfo *));
+ (bfd *, const Elf32_External_RegInfo *, Elf32_RegInfo *);
extern void bfd_mips_elf32_swap_reginfo_out
- PARAMS ((bfd *, const Elf32_RegInfo *, Elf32_External_RegInfo *));
+ (bfd *, const Elf32_RegInfo *, Elf32_External_RegInfo *);
\f
/* Processor specific section flags. */
@@ -822,9 +822,9 @@ typedef struct
/* MIPS ELF option header swapping routines. */
extern void bfd_mips_elf_swap_options_in
- PARAMS ((bfd *, const Elf_External_Options *, Elf_Internal_Options *));
+ (bfd *, const Elf_External_Options *, Elf_Internal_Options *);
extern void bfd_mips_elf_swap_options_out
- PARAMS ((bfd *, const Elf_Internal_Options *, Elf_External_Options *));
+ (bfd *, const Elf_Internal_Options *, Elf_External_Options *);
/* Values which may appear in the kind field of an Elf_Options
structure. */
@@ -926,9 +926,9 @@ typedef struct
/* MIPS ELF reginfo swapping routines. */
extern void bfd_mips_elf64_swap_reginfo_in
- PARAMS ((bfd *, const Elf64_External_RegInfo *, Elf64_Internal_RegInfo *));
+ (bfd *, const Elf64_External_RegInfo *, Elf64_Internal_RegInfo *);
extern void bfd_mips_elf64_swap_reginfo_out
- PARAMS ((bfd *, const Elf64_Internal_RegInfo *, Elf64_External_RegInfo *));
+ (bfd *, const Elf64_Internal_RegInfo *, Elf64_External_RegInfo *);
/* Masks for the info work of an ODK_EXCEPTIONS descriptor. */
#define OEX_FPU_MIN 0x1f /* FPEs which must be enabled. */
============================================================
Index: include/elf/mmix.h
--- elf/mmix.h 30 Nov 2002 08:39:45 -0000 1.3
+++ elf/mmix.h 29 Jun 2003 12:44:25 -0000
@@ -1,5 +1,5 @@
/* MMIX support for BFD.
- Copyright 2001, 2002 Free Software Foundation, Inc.
+ Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -158,11 +158,11 @@ END_RELOC_NUMBERS (R_MMIX_max)
#ifdef BFD_ARCH_SIZE
extern bfd_boolean _bfd_mmix_prepare_linker_allocated_gregs
- PARAMS ((bfd *, struct bfd_link_info *));
+ (bfd *, struct bfd_link_info *);
extern bfd_boolean _bfd_mmix_finalize_linker_allocated_gregs
- PARAMS ((bfd *, struct bfd_link_info *));
+ (bfd *, struct bfd_link_info *);
extern bfd_boolean _bfd_mmix_check_all_relocs
- PARAMS ((bfd *, struct bfd_link_info *));
+ (bfd *, struct bfd_link_info *);
#endif
#endif /* ELF_MMIX_H */
============================================================
Index: include/elf/reloc-macros.h
--- elf/reloc-macros.h 14 Mar 2001 02:27:44 -0000 1.6
+++ elf/reloc-macros.h 29 Jun 2003 12:44:25 -0000
@@ -1,5 +1,5 @@
/* Generic relocation support for BFD.
- Copyright 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2003 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -46,10 +46,8 @@
If RELOC_MACROS_GEN_FUNC *is* defined, then instead the
following function will be generated:
- static const char * foo PARAMS ((unsigned long rtype));
static const char *
- foo (rtype)
- unsigned long rtype;
+ foo (unsigned long rtype)
{
switch (rtype)
{
@@ -70,10 +68,8 @@
the relocation is not recognised, NULL is returned. */
#define START_RELOC_NUMBERS(name) \
-static const char * name PARAMS ((unsigned long rtype)); \
static const char * \
-name (rtype) \
- unsigned long rtype; \
+name (unsigned long rtype) \
{ \
switch (rtype) \
{
--
Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj
SuSE Linux AG, Deutschherrnstr. 15-19, 90429 Nürnberg, Germany
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Convert some include/coff and include/elf to ISO C90
2003-06-29 12:44 Convert some include/coff and include/elf to ISO C90 Andreas Jaeger
@ 2003-06-29 13:20 ` Alan Modra
0 siblings, 0 replies; 2+ messages in thread
From: Alan Modra @ 2003-06-29 13:20 UTC (permalink / raw)
To: Andreas Jaeger; +Cc: binutils
On Sun, Jun 29, 2003 at 02:44:48PM +0200, Andreas Jaeger wrote:
> extern void bfd_mips_elf32_swap_reginfo_in
> - PARAMS ((bfd *, const Elf32_External_RegInfo *, Elf32_RegInfo *));
> + (bfd *, const Elf32_External_RegInfo *, Elf32_RegInfo *);
For functions parameter lists on the next line, I've been indenting by
two spaces.
> Index: include/elf/reloc-macros.h
You can also get rid of any code inside #ifndef __STDC__ (and the test
too, of course). OK to commit with this additional change. Please
yourself about the style change.
--
Alan Modra
IBM OzLabs - Linux Technology Centre
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-06-29 13:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-29 12:44 Convert some include/coff and include/elf to ISO C90 Andreas Jaeger
2003-06-29 13:20 ` Alan Modra
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).