Subject: Re: cannot build -current from Solaris 10
To: None <current-users@NetBSD.org>
From: Valeriy E. Ushakov <uwe@ptc.spbu.ru>
List: current-users
Date: 03/20/2006 02:33:31
On Sun, Mar 19, 2006 at 10:37:32 -0800, Garrett D'Amore wrote:
> Izumi Tsutsui wrote:
> > In article <20060319061909.5607D23402@thoreau.thistledown.com.au>
> > simonb@wasabisystems.com wrote:
> >
> >> I don't think that using <stdio.h> is the best fix. The tools stuff
> >> detects the presence of <sys/cdefs.h> - maybe we can use that instead?
Let me repeat my rhetorical question - why bother? :)
> Yes, I know that. But these tools don't follow the same "tools"
> framework. We can argue that they should, but I'm looking for the
> easiest, quickest fix.
Either make it congruent with other tools in tools/ subdirectory, or,
as I proposed, just hide the whole COPYRIGHT block to be ignored when
HOST_TOOL (hmm, and since we only even build them as HOST_TOOL...).
> > and there are ifdefs against __COPYRIGHT() and __RCSID() macroes later,
> > so maybe we could just change mkdctype.c in the same way.
>
> stdio.h includes sys/cdefs.h. This is how some *other* files in these
> directories make it work.
[...]
> You still need the #ifdef checks, and these files have them. But you
> *also* need to only include files that are going to exist on the host.
> sys/cdefs.h is not guaranteed. stdio.h *is* guaranteed.
>
> I don't understand why this change is controversial.
AFAICT, __RCSID is *BSD macro. Canonical way to use it is to include
<sys/cdefs.h>. Beginning of mkdctype.c is pretty much canonical way
to do it. Of course, that doesn't make much sense to do that on other
systems (e.g. Solaris), hence my suggestion to hide that block under
#ifndef HOST_TOOL.
And as I said, the point is moot b/c those tools are only used during
the build, so it's not *that* critical to embed copyright/rcsid
information into them.
SY, Uwe
--
uwe@ptc.spbu.ru | Zu Grunde kommen
http://snark.ptc.spbu.ru/~uwe/ | Ist zu Grunde gehen