public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 2/3] remove uses of PARAMS from binutils
  2014-01-06 19:31 [PATCH 0/3] stop using ancient ansidecl.h macros Tom Tromey
  2014-01-06 19:31 ` [PATCH 3/3] remove VA_* from binutils Tom Tromey
  2014-01-06 19:31 ` [PATCH 1/3] remove ANSI_PROTOTYPES Tom Tromey
@ 2014-01-06 19:31 ` Tom Tromey
  2014-01-06 20:21   ` Michael Eager
  2014-01-07  5:45 ` [PATCH 0/3] stop using ancient ansidecl.h macros Alan Modra
  3 siblings, 1 reply; 9+ messages in thread
From: Tom Tromey @ 2014-01-06 19:31 UTC (permalink / raw)
  To: binutils; +Cc: Tom Tromey

This removes the last uses of PARAMS from binutils.

The two changes in binutils were tested by rebuilding.
I didn't rebuild the gas change but I think it is obviously correct.

2014-01-06  Tom Tromey  <tromey@redhat.com>

	* coffgrok.h (coff_ofile): Don't use PARAMS.
	* nlmheader.y (strerror): Don't use PARAMS.

2014-01-06  Tom Tromey  <tromey@redhat.com>

	* config/tc-microblaze.h (parse_cons_expression_microblaze): Don't
	use PARAMS.
---
 binutils/ChangeLog         | 5 +++++
 binutils/coffgrok.h        | 4 ++--
 binutils/nlmheader.y       | 4 ++--
 gas/ChangeLog              | 5 +++++
 gas/config/tc-microblaze.h | 4 ++--
 5 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/binutils/coffgrok.h b/binutils/coffgrok.h
index 44a49e2..00a4cc9 100644
--- a/binutils/coffgrok.h
+++ b/binutils/coffgrok.h
@@ -1,5 +1,5 @@
 /* coffgrok.h
-   Copyright 2001, 2002, 2003, 2005, 2007 Free Software Foundation, Inc.
+   Copyright 2001, 2002, 2003, 2005, 2007, 2013 Free Software Foundation, Inc.
 
    This file is part of GNU Binutils.
 
@@ -223,4 +223,4 @@ struct coff_sfile
      struct coff_sfile *sfile;
   };
 
-struct coff_ofile *coff_grok PARAMS ((bfd *));
+struct coff_ofile *coff_grok (bfd *);
diff --git a/binutils/nlmheader.y b/binutils/nlmheader.y
index 86744c4..163b66d 100644
--- a/binutils/nlmheader.y
+++ b/binutils/nlmheader.y
@@ -1,6 +1,6 @@
 %{/* nlmheader.y - parse NLM header specification keywords.
      Copyright 1993, 1994, 1995, 1997, 1998, 2001, 2002, 2003, 2005, 2007,
-     2010 Free Software Foundation, Inc.
+     2010, 2013 Free Software Foundation, Inc.
 
      This file is part of GNU Binutils.
 
@@ -494,7 +494,7 @@ string_list:
 /* If strerror is just a macro, we want to use the one from libiberty
    since it will handle undefined values.  */
 #undef strerror
-extern char *strerror PARAMS ((int));
+extern char *strerror (int);
 
 /* The lexer is simple, too simple for flex.  Keywords are only
    recognized at the start of lines.  Everything else must be an
diff --git a/gas/config/tc-microblaze.h b/gas/config/tc-microblaze.h
index 0651040..1fda6d0 100644
--- a/gas/config/tc-microblaze.h
+++ b/gas/config/tc-microblaze.h
@@ -1,6 +1,6 @@
 /* tc-microblaze.h -- Header file for tc-microblaze.c.
 
-   Copyright 2009 Free Software Foundation, Inc.
+   Copyright 2009, 2013 Free Software Foundation, Inc.
 
    This file is part of GAS, the GNU Assembler.
 
@@ -37,7 +37,7 @@
    of such expressions */
 #define TC_CONS_FIX_NEW cons_fix_new_microblaze
 #define TC_PARSE_CONS_EXPRESSION(EXP, NBYTES) parse_cons_expression_microblaze (EXP, NBYTES)
-extern void parse_cons_expression_microblaze PARAMS ((expressionS *, int));
+extern void parse_cons_expression_microblaze (expressionS *, int);
 
 #define TC_FORCE_RELOCATION_SECTION(FIXP,SEG) 1
 #define UNDEFINED_DIFFERENCE_OK 1
-- 
1.8.1.4

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/3] remove ANSI_PROTOTYPES
  2014-01-06 19:31 [PATCH 0/3] stop using ancient ansidecl.h macros Tom Tromey
  2014-01-06 19:31 ` [PATCH 3/3] remove VA_* from binutils Tom Tromey
@ 2014-01-06 19:31 ` Tom Tromey
  2014-01-06 22:40   ` Andreas Schwab
  2014-01-06 19:31 ` [PATCH 2/3] remove uses of PARAMS from binutils Tom Tromey
  2014-01-07  5:45 ` [PATCH 0/3] stop using ancient ansidecl.h macros Alan Modra
  3 siblings, 1 reply; 9+ messages in thread
From: Tom Tromey @ 2014-01-06 19:31 UTC (permalink / raw)
  To: binutils; +Cc: Tom Tromey

This removes the last use of ANSI_PROTOTYPES in the tree.
It appears in gas.

I didn't even rebuild this but I think it is obviously correct.

2014-01-06  Tom Tromey  <tromey@redhat.com>

	* config/tc-xc16x.h: Don't use ANSI_PROTOTYPES.
---
 gas/ChangeLog         | 4 ++++
 gas/config/tc-xc16x.h | 4 +---
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/gas/config/tc-xc16x.h b/gas/config/tc-xc16x.h
index 61230d1..8136f42 100644
--- a/gas/config/tc-xc16x.h
+++ b/gas/config/tc-xc16x.h
@@ -1,5 +1,5 @@
 /* This file is tc-xc16x.h
-   Copyright 2006, 2007 Free Software Foundation, Inc.
+   Copyright 2006, 2007, 2013 Free Software Foundation, Inc.
    Contributed by KPIT Cummins Infosystems 
 
    This file is part of GAS, the GNU Assembler.
@@ -32,10 +32,8 @@
 #define FAKE_LABEL_NAME     ".L0\001"
 #endif
 
-#if ANSI_PROTOTYPES
 struct fix;
 struct internal_reloc;
-#endif
 
 #define WORKING_DOT_WORD
 
-- 
1.8.1.4

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 3/3] remove VA_* from binutils
  2014-01-06 19:31 [PATCH 0/3] stop using ancient ansidecl.h macros Tom Tromey
@ 2014-01-06 19:31 ` Tom Tromey
  2014-01-06 19:31 ` [PATCH 1/3] remove ANSI_PROTOTYPES Tom Tromey
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 9+ messages in thread
From: Tom Tromey @ 2014-01-06 19:31 UTC (permalink / raw)
  To: binutils; +Cc: Tom Tromey

This removes the last uses of the obsolete VA_* macros from binutils.

All the binutils and bfd changes were tested by rebuilding.
I didn't rebuild the gas change but I think it is obviously correct.

2014-01-06  Tom Tromey  <tromey@redhat.com>

	* elf32-xtensa.c (vsprint_msg): Don't use old VA_* compatibility
	wrappers.

2014-01-06  Tom Tromey  <tromey@redhat.com>

	* bucomm.c (fatal, non_fatal): Replace obsolete VA_* macros with
	stdarg macros.
	* dlltool.c (inform): Replace obsolete VA_* macros with stdarg
	macros.
	* dllwrap.c (inform, warn): Replace obsolete VA_* macros with
	stdarg macros.

2014-01-06  Tom Tromey  <tromey@redhat.com>

	* config/tc-tic30.c (debug): Avoid old VA_* compatibility
	wrappers.
---
 bfd/ChangeLog         |  5 +++++
 bfd/elf32-xtensa.c    |  8 ++++----
 binutils/ChangeLog    |  9 +++++++++
 binutils/bucomm.c     | 20 +++++++++++---------
 binutils/dlltool.c    | 11 ++++++-----
 binutils/dllwrap.c    | 20 +++++++++++---------
 gas/ChangeLog         |  5 +++++
 gas/config/tc-tic30.c |  8 ++++----
 8 files changed, 55 insertions(+), 31 deletions(-)

diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c
index 75ccefe..c5c8b9d 100644
--- a/bfd/elf32-xtensa.c
+++ b/bfd/elf32-xtensa.c
@@ -1,5 +1,5 @@
 /* Xtensa-specific support for 32-bit ELF.
-   Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
+   Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013
    Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -2161,9 +2161,9 @@ vsprint_msg (const char *origmsg, const char *fmt, int arglen, ...)
   static char *message = NULL;
   bfd_size_type orig_len, len = 0;
   bfd_boolean is_append;
+  va_list ap;
 
-  VA_OPEN (ap, arglen);
-  VA_FIXEDARG (ap, const char *, origmsg);
+  va_start (ap, arglen);
 
   is_append = (origmsg == message);
 
@@ -2180,7 +2180,7 @@ vsprint_msg (const char *origmsg, const char *fmt, int arglen, ...)
 	memcpy (message, origmsg, orig_len);
       vsprintf (message + orig_len, fmt, ap);
     }
-  VA_CLOSE (ap);
+  va_end (ap);
   return message;
 }
 
diff --git a/binutils/bucomm.c b/binutils/bucomm.c
index bb3fb3f..3f83b75 100644
--- a/binutils/bucomm.c
+++ b/binutils/bucomm.c
@@ -1,6 +1,6 @@
 /* bucomm.c -- Bin Utils COMmon code.
    Copyright 1991, 1992, 1993, 1994, 1995, 1997, 1998, 2000, 2001, 2002,
-   2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
+   2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013
    Free Software Foundation, Inc.
 
    This file is part of GNU Binutils.
@@ -127,24 +127,26 @@ report (const char * format, va_list args)
 }
 
 void
-fatal VPARAMS ((const char *format, ...))
+fatal (const char *format, ...)
 {
-  VA_OPEN (args, format);
-  VA_FIXEDARG (args, const char *, format);
+  va_list args;
+
+  va_start (args, format);
 
   report (format, args);
-  VA_CLOSE (args);
+  va_end (args);
   xexit (1);
 }
 
 void
-non_fatal VPARAMS ((const char *format, ...))
+non_fatal (const char *format, ...)
 {
-  VA_OPEN (args, format);
-  VA_FIXEDARG (args, const char *, format);
+  va_list args;
+
+  va_start (args, format);
 
   report (format, args);
-  VA_CLOSE (args);
+  va_end (args);
 }
 
 /* Set the default BFD target based on the configured target.  Doing
diff --git a/binutils/dlltool.c b/binutils/dlltool.c
index 0da0011..af4cc03 100644
--- a/binutils/dlltool.c
+++ b/binutils/dlltool.c
@@ -1,6 +1,6 @@
 /* dlltool.c -- tool to generate stuff for PE style DLLs
    Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-   2005, 2006, 2007, 2008, 2009, 2011, 2012 Free Software Foundation, Inc.
+   2005, 2006, 2007, 2008, 2009, 2011, 2012, 2013 Free Software Foundation, Inc.
 
    This file is part of GNU Binutils.
 
@@ -881,17 +881,18 @@ dlltmp (char **buf, const char *fmt)
 }
 
 static void
-inform VPARAMS ((const char * message, ...))
+inform (const char * message, ...)
 {
-  VA_OPEN (args, message);
-  VA_FIXEDARG (args, const char *, message);
+  va_list args;
+
+  va_start (args, message);
 
   if (!verbose)
     return;
 
   report (message, args);
 
-  VA_CLOSE (args);
+  va_end (args);
 }
 
 static const char *
diff --git a/binutils/dllwrap.c b/binutils/dllwrap.c
index a6dae90..03eb3fe 100644
--- a/binutils/dllwrap.c
+++ b/binutils/dllwrap.c
@@ -1,6 +1,6 @@
 /* dllwrap.c -- wrapper for DLLTOOL and GCC to generate PE style DLLs
    Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2009,
-   2011, 2012 Free Software Foundation, Inc.
+   2011, 2012, 2013 Free Software Foundation, Inc.
    Contributed by Mumit Khan (khan@xraylith.wisc.edu).
 
    This file is part of GNU Binutils.
@@ -144,28 +144,30 @@ display (const char * message, va_list args)
 
 
 static void
-inform VPARAMS ((const char *message, ...))
+inform (const char *message, ...)
 {
-  VA_OPEN (args, message);
-  VA_FIXEDARG (args, const char *, message);
+  va_list args;
+
+  va_start (args, message);
 
   if (!verbose)
     return;
 
   display (message, args);
 
-  VA_CLOSE (args);
+  va_end (args);
 }
 
 static void
-warn VPARAMS ((const char *format, ...))
+warn (const char *format, ...)
 {
-  VA_OPEN (args, format);
-  VA_FIXEDARG (args, const char *, format);
+  va_list args;
+
+  va_start (args, format);
 
   display (format, args);
 
-  VA_CLOSE (args);
+  va_end (args);
 }
 
 /* Look for the program formed by concatenating PROG_NAME and the
diff --git a/gas/config/tc-tic30.c b/gas/config/tc-tic30.c
index 570c833..53fbf3b 100644
--- a/gas/config/tc-tic30.c
+++ b/gas/config/tc-tic30.c
@@ -1,5 +1,5 @@
 /* tc-c30.c -- Assembly code for the Texas Instruments TMS320C30
-   Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006, 2007, 2009
+   Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006, 2007, 2009, 2013
    Free Software Foundation, Inc.
    Contributed by Steven Haworth (steve@pm.cse.rmit.edu.au)
 
@@ -85,11 +85,11 @@ debug (const char *string, ...)
   if (flag_debug)
     {
       char str[100];
+      va_list argptr;
 
-      VA_OPEN (argptr, string);
-      VA_FIXEDARG (argptr, const char *, string);
+      va_start (argptr, string);
       vsprintf (str, string, argptr);
-      VA_CLOSE (argptr);
+      va_end (argptr);
       if (str[0] == '\0')
 	return (0);
       fputs (str, USE_STDOUT ? stdout : stderr);
-- 
1.8.1.4

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 0/3] stop using ancient ansidecl.h macros
@ 2014-01-06 19:31 Tom Tromey
  2014-01-06 19:31 ` [PATCH 3/3] remove VA_* from binutils Tom Tromey
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Tom Tromey @ 2014-01-06 19:31 UTC (permalink / raw)
  To: binutils

Hi.

ansidecl.h contains a bunch of obsolete macros.  Uses of these were
mostly removed from the tree years ago, but a few lingered on.

This patch series removes the remaining uses from binutils.
I think this is all pretty obvious, but I'm asking for approval anyhow.

It's perhaps worth noting that these changes don't affect portability,
because all the same constructs are used without the macros elsewhere
in the tree, sometimes in the same file.

Tom

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/3] remove uses of PARAMS from binutils
  2014-01-06 19:31 ` [PATCH 2/3] remove uses of PARAMS from binutils Tom Tromey
@ 2014-01-06 20:21   ` Michael Eager
  0 siblings, 0 replies; 9+ messages in thread
From: Michael Eager @ 2014-01-06 20:21 UTC (permalink / raw)
  To: Tom Tromey, binutils

On 01/06/14 11:31, Tom Tromey wrote:
> This removes the last uses of PARAMS from binutils.
>
> The two changes in binutils were tested by rebuilding.
> I didn't rebuild the gas change but I think it is obviously correct.
>
> 2014-01-06  Tom Tromey  <tromey@redhat.com>
>
> 	* coffgrok.h (coff_ofile): Don't use PARAMS.
> 	* nlmheader.y (strerror): Don't use PARAMS.
>
> 2014-01-06  Tom Tromey  <tromey@redhat.com>
>
> 	* config/tc-microblaze.h (parse_cons_expression_microblaze): Don't
> 	use PARAMS.


OK for MicroBlaze.


-- 
Michael Eager	 eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/3] remove ANSI_PROTOTYPES
  2014-01-06 19:31 ` [PATCH 1/3] remove ANSI_PROTOTYPES Tom Tromey
@ 2014-01-06 22:40   ` Andreas Schwab
  2014-01-07 16:08     ` Tom Tromey
  0 siblings, 1 reply; 9+ messages in thread
From: Andreas Schwab @ 2014-01-06 22:40 UTC (permalink / raw)
  To: Tom Tromey; +Cc: binutils

Tom Tromey <tromey@redhat.com> writes:

> diff --git a/gas/config/tc-xc16x.h b/gas/config/tc-xc16x.h
> index 61230d1..8136f42 100644
> --- a/gas/config/tc-xc16x.h
> +++ b/gas/config/tc-xc16x.h
> @@ -1,5 +1,5 @@
>  /* This file is tc-xc16x.h
> -   Copyright 2006, 2007 Free Software Foundation, Inc.
> +   Copyright 2006, 2007, 2013 Free Software Foundation, Inc.

Happy Old Year! :-)

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/3] stop using ancient ansidecl.h macros
  2014-01-06 19:31 [PATCH 0/3] stop using ancient ansidecl.h macros Tom Tromey
                   ` (2 preceding siblings ...)
  2014-01-06 19:31 ` [PATCH 2/3] remove uses of PARAMS from binutils Tom Tromey
@ 2014-01-07  5:45 ` Alan Modra
  2014-01-07 16:11   ` Tom Tromey
  3 siblings, 1 reply; 9+ messages in thread
From: Alan Modra @ 2014-01-07  5:45 UTC (permalink / raw)
  To: Tom Tromey; +Cc: binutils

On Mon, Jan 06, 2014 at 12:31:25PM -0700, Tom Tromey wrote:
> This patch series removes the remaining uses from binutils.
> I think this is all pretty obvious, but I'm asking for approval anyhow.

Looks fine to me.

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/3] remove ANSI_PROTOTYPES
  2014-01-06 22:40   ` Andreas Schwab
@ 2014-01-07 16:08     ` Tom Tromey
  0 siblings, 0 replies; 9+ messages in thread
From: Tom Tromey @ 2014-01-07 16:08 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: binutils

>>>>> "Andreas" == Andreas Schwab <schwab@linux-m68k.org> writes:

>> -   Copyright 2006, 2007 Free Software Foundation, Inc.
>> +   Copyright 2006, 2007, 2013 Free Software Foundation, Inc.

Andreas> Happy Old Year! :-)

:)
I fixed it.

Tom

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/3] stop using ancient ansidecl.h macros
  2014-01-07  5:45 ` [PATCH 0/3] stop using ancient ansidecl.h macros Alan Modra
@ 2014-01-07 16:11   ` Tom Tromey
  0 siblings, 0 replies; 9+ messages in thread
From: Tom Tromey @ 2014-01-07 16:11 UTC (permalink / raw)
  To: binutils

>>>>> "Alan" == Alan Modra <amodra@gmail.com> writes:

Alan> On Mon, Jan 06, 2014 at 12:31:25PM -0700, Tom Tromey wrote:
>> This patch series removes the remaining uses from binutils.
>> I think this is all pretty obvious, but I'm asking for approval anyhow.

Alan> Looks fine to me.

Thanks.  I'll push it shortly.

Tom

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-01-07 16:11 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-06 19:31 [PATCH 0/3] stop using ancient ansidecl.h macros Tom Tromey
2014-01-06 19:31 ` [PATCH 3/3] remove VA_* from binutils Tom Tromey
2014-01-06 19:31 ` [PATCH 1/3] remove ANSI_PROTOTYPES Tom Tromey
2014-01-06 22:40   ` Andreas Schwab
2014-01-07 16:08     ` Tom Tromey
2014-01-06 19:31 ` [PATCH 2/3] remove uses of PARAMS from binutils Tom Tromey
2014-01-06 20:21   ` Michael Eager
2014-01-07  5:45 ` [PATCH 0/3] stop using ancient ansidecl.h macros Alan Modra
2014-01-07 16:11   ` Tom Tromey

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).