This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Recent #defines of PACKAGE and VERSION in newlib.h pollutes namespace, causes errors


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.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]