Subject: Re: constifying stdlib.h made building stable tools fail on current
To: Jukka Salmi <jukka-netbsd@2004.salmi.ch>
From: Christos Zoulas <christos@zoulas.com>
List: current-users
Date: 05/24/2004 19:25:05
On May 25, 12:41am, jukka-netbsd@2004.salmi.ch (Jukka Salmi) wrote:
-- Subject: Re: constifying stdlib.h made building stable tools fail on curre

| Christos Zoulas --> current-users (2004-05-24 17:12:54 +0000):
| > I don't know. Providing backwards compatibility for something like this
| > seems to require a lot of overhead. Why not upgrade to the current tools
| > if you are going to be using current?
| 
| The machine I'm doing builds on runs current. I'd like to be able to
| build NetBSD stable sources for some embedded systems (slow CPUs, no
| writable storage...) on that current system.

Ok.

| Until stdlib.h revision 1.64 that could be done very easily: on my
| build machine there was a current and a stable source tree, from which
| I built current and stable tools, which I used to build current and
| stable releases.

Yes, we were lucky and there were no api changes; it worked by chance.

| Right now (stdlib.h revision 1.66) building stable tools on a current
| system fails because some prototypes in stdlib.h don't match the
| stable sources anymore.
| 
| Couldn't this problem be avoided by having ${NETBSDSRCDIR}/include
| searched for include files before /usr/include? I tried setting
| 
| 	HOST_CPPFLAGS+= -I${NETBSDSRCDIR}/include
| 
| in /etc/mk.conf; seems to work fine at first, but fails later in groff
| with
| 
| /usr/src/include/stdlib.h:57: error: redeclaration of C++ built-in type `
|    wchar_t'

That would be a valid problem; maybe this needs to be protected with 
#ifndef __cplusplus? Ask Klaus, he's the standards guy.

christos