Re: Please fix regressions from your sim changes

Hans-Peter Nilsson
2012-03-20T16:30:31Z

> Date: Tue, 20 Mar 2012 17:15:55 +0100

> On Tuesday 20 March 2012 01:54:27 Hans-Peter Nilsson wrote:
> > nrun.o -MMD -MP -MF .deps/nrun.Tpo /tmp/r/sim/cris/../common/nrun.c
> > /tmp/r/sim/cris/../common/nrun.c: In function 'main':
> > /tmp/r/sim/cris/../common/nrun.c:206: warning: implicit declaration of
> > function 'strsignal' /tmp/r/sim/cris/../common/nrun.c:206: warning: format
> > '%s' expects type 'char *', but argument 4 has type 'int'
> > Don't you see that warning?
>
> the code compiles warning free for me

> the file should have a string.h include for the strsignal prototype, so i'll update that.
>
> > Instead, to #define _GNU_SOURCE in the Right Way AFAIK, there
> > should be an AC_GNU_SOURCE (missing) in a configure.* used by
> > all src/sim/* (common/configure.ac AFAICT), and an #include
> > "cconfig.h" in nrun.c followed later by the mantra:
>
> not entirely the right way. my guess is that your older glibc does not
> conform to the newer POSIX spec. strsignal() was added in the 2008 spec, but
> old glibc's provided it only when _GNU_SOURCE was defined.

It's be the right way to maintain interoperability even with old
systems not-fully-conformant-in-every-corner that *used* to
work, if there's a known way, like here, that doesn't introduce
a maintenance burden.

Please.

brgds, H-P