This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: src/binutils ChangeLog coffdump.c nlmconv.c nl ...
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: binutils at sources dot redhat dot com
- Cc: drow at sources dot redhat dot com
- Date: Sun, 10 Feb 2002 14:34:32 -0500
- Subject: Re: src/binutils ChangeLog coffdump.c nlmconv.c nl ...
- References: <20020210184749.28549.qmail@sources.redhat.com> <si4rkpdubi.fsf@daffy.airs.com> <20020210142202.A29532@nevyn.them.org>
On Sun, Feb 10, 2002 at 02:22:02PM -0500, Daniel Jacobowitz wrote:
> On Sun, Feb 10, 2002 at 11:13:05AM -0800, Ian Lance Taylor wrote:
> > drow@sources.redhat.com writes:
> >
> > > * nlmconv.c: Add PARAMS ((const time_t *)) to localtime
> > > prototype. Prototype main.
> > > * nlmheader.y: Add PARAMS ((int)) to strerror prototype.
> >
> > Please don't make these changes. The localtime change in particular
> > will cause the binutils to fail to compile on some platforms, those on
> > which localtime is declare in the system header files to take time_t *
> > rather than const time_t *.
> >
> > Never use a full prototype when declaring functions provided the
> > system. It can only cause conflicts and, except in the case of a
> > prototype which uses an ellipsis, can never help. If you feel that
> > you must use a full prototype, you must add a configure test to
> > confirm that it will compile correctly.
>
> I assume you're referring to localtime here; strerror was already
> handled this way in nlmconv.c, directly above where I added a prototype
> for localtime.
>
> In this case, should we turn off the warning I was fixing,
> -Wstrict-prototypes, or should I add configury for localtime's
> declaration?
Or just kill the declaration of localtime? bfd/ieee.c already uses it
without needing such a declaration.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer