Recent #defines of PACKAGE and VERSION in newlib.h pollutes namespace, causes errors
Jeff Johnston
jjohnstn@redhat.com
Tue Jan 24 17:26:00 GMT 2006
Hans-Peter Nilsson wrote:
> Can the part of the recent change that causes PACKAGE and
> VERSION in the newlib.h be reverted (cvs diff -D 'last week'
> newlib.hin). Or perhaps some change to avoid getting newlib.h
> included from system headers like in _ansi.h (from stdlib.h)?
>
> The recent change causes errors due to this namespace pollution,
> like in libffi tests where I see in the log:
>
> In file included from /home/hp/combined/combined/libffi/testsuite/libffi.call/ffitest.h:6,^M
> from /home/hp/combined/combined/libffi/testsuite/libffi.call/closure_fn0.c:10:^M
> /home/hp/combined/cris-sim/cris-elf/./libffi/include/../fficonfig.h:96:1: warning: "PACKAGE" redefined^M
> In file included from /home/hp/combined/combined/newlib/libc/include/_ansi.h:15,^M
> from /home/hp/combined/combined/newlib/libc/include/stdlib.h:10,^M
> from /home/hp/combined/combined/libffi/testsuite/libffi.call/ffitest.h:1,^M
> from /home/hp/combined/combined/libffi/testsuite/libffi.call/closure_fn0.c:10:^M
> /home/hp/combined/cris-sim/cris-elf/./newlib/targ-include/newlib.h:42:1: warning: this is the location of the previous definition\
>
> Yes, that's a clean "#include <stdlib.h>" causing PACKAGE and
> VERSION to be defined, which interferes with the fficonfig.h
> defines of the same-name macros later on.
>
> brgds, H-P
I just checked in the following patch which tells autoheader we don't
want PACKAGE and VERSION exported to newlib.hin.
2006-01-24 Jeff Johnston <jjohnstn@redhat.com>
* acinclude.m4: Add nodefine to AM_INIT_AUTOMAKE macro invocation
so as not to define PACKAGE and VERSION in newlib.h.
* aclocal.m4: Regenerated.
* configure: Ditto.
* newlib.hin: Ditto.
More information about the Newlib
mailing list