summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2001-09-26 01:55:19 +0000
committerAlan Modra <amodra@gmail.com>2001-09-26 01:55:19 +0000
commit451dad9c5866e6317e68a7997007cb9ed27ea15a (patch)
tree4c186f49f8579457d4cc0c731f6fcbd4ffe75b05 /binutils/bucomm.c
parent * arc-dis.c: Formatting fixes. (diff)
downloadbinutils-gdb-451dad9c5866e6317e68a7997007cb9ed27ea15a.tar.gz
binutils-gdb-451dad9c5866e6317e68a7997007cb9ed27ea15a.tar.bz2
binutils-gdb-451dad9c5866e6317e68a7997007cb9ed27ea15a.zip
* bucomm.c (fatal): Define using VPARAMS, VA_OPEN, VA_FIXEDARG,
VA_CLOSE. (non_fatal): Likewise. * objdump.c (objdump_sprintf): Likewise. * readelf.c (error): Likewise. (warn): Likewise.
Diffstat (limited to 'binutils/bucomm.c')
-rw-r--r--binutils/bucomm.c45
1 files changed, 8 insertions, 37 deletions
diff --git a/binutils/bucomm.c b/binutils/bucomm.c
index bf0f7993d31..aa3080fa753 100644
--- a/binutils/bucomm.c
+++ b/binutils/bucomm.c
@@ -70,55 +70,26 @@ report (format, args)
putc ('\n', stderr);
}
-#ifdef ANSI_PROTOTYPES
void
-fatal (const char *format, ...)
+fatal VPARAMS ((const char *format, ...))
{
- va_list args;
+ VA_OPEN (args, format);
+ VA_FIXEDARG (args, const char *, format);
- va_start (args, format);
report (format, args);
- va_end (args);
+ VA_CLOSE (args);
xexit (1);
}
void
-non_fatal (const char *format, ...)
+non_fatal VPARAMS ((const char *format, ...))
{
- va_list args;
+ VA_OPEN (args, format);
+ VA_FIXEDARG (args, const char *, format);
- va_start (args, format);
report (format, args);
- va_end (args);
+ VA_CLOSE (args);
}
-#else
-void
-fatal (va_alist)
- va_dcl
-{
- char *Format;
- va_list args;
-
- va_start (args);
- Format = va_arg (args, char *);
- report (Format, args);
- va_end (args);
- xexit (1);
-}
-
-void
-non_fatal (va_alist)
- va_dcl
-{
- char *Format;
- va_list args;
-
- va_start (args);
- Format = va_arg (args, char *);
- report (Format, args);
- va_end (args);
-}
-#endif
/* Set the default BFD target based on the configured target. Doing
this permits the binutils to be configured for a particular target,