[PATCH] Warning roundup - ld/

Daniel Jacobowitz drow@mvista.com
Sun Feb 10 11:34:00 GMT 2002


[Figures... as soon as I decide things are obvious, I start making
mistakes.  Apologies.]

On Sun, Feb 10, 2002 at 11:16:08AM -0800, Ian Lance Taylor wrote:
> Daniel Jacobowitz <drow@mvista.com> writes:
> 
> > +#ifndef HAVE_STDLIB_H
> > +/* If we have <stdlib.h>, assume it defines strtoul.  */
> >  /* Omit args to avoid the possibility of clashing with a system header
> >     that might disagree about consts.  */
> >  unsigned long strtoul ();
> > +#endif
> 
> This is not a safe assumption, as I believe some versions of SunOS
> have <stdlib.h> but do not have strtoul().

I checked as far back as I could, which only went back to early Solaris
and not SunOS 4.

> However, I don't know lexsup.c is bothering to declare strtoul() at
> all.

Shall I:
 - just kill the declaration?  Presumably somewhere we aren't
  picking it up, which is why it was present.
 - Leave my patch - even if it is not a safe assumption it is just as safe
  as not defining it at all.

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer



More information about the Binutils mailing list