[PATCH] Add startswith function and use it instead of CONST_STRNEQ.

Mike Frysinger vapier@gentoo.org
Tue Mar 23 04:49:10 GMT 2021


On 23 Mar 2021 10:32, Alan Modra wrote:
> On Mon, Mar 22, 2021 at 05:42:50PM +0100, Martin Liška wrote:
> > Anyway for the sim failures. What about directly including <string.h> in bfd-in.h?
> 
> That would be OK if we didn't care about really old systems.  See for
> example the way bfd/sysdep.h includes string.h.
> 
> But all of this horrible old code that likely hasn't been tested is
> eons should simply disappear.  Instead binutils should be using the
> gnulib import already available in the binutils-gdb repository to
> support old systems.  I've had that project on my todo list for quite
> a while.  We'd be able to include stdint.h and stdbool.h for example,
> throwing away bfd_stdint.h and replacing bfd_boolean with bool.

i agree with the idea that we've accumulated a lot of cruft that we never
test and it's unclear how many users still rely on it.  for the sim, i've
made C11 a requirement inline with GDB's C++11 requirement.  that means i
can assume <string.h> among other things.

> Meanwhile, this is a tidied version of the patch I sent you last
> night, Tom.  If you already have one of your own then please ignore
> this.

this fixes the sim for me, thanks
-mike


More information about the Binutils mailing list