Subject: Re: cannot build -current from Solaris 10
To: Izumi Tsutsui <>
From: Garrett D'Amore <>
List: current-users
Date: 03/19/2006 10:37:32
Izumi Tsutsui wrote:
> In article <>
> 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?
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.

I'm also guessing that this problem reflects that folks don't
cross-compile userland.  So maybe I'm breaking "new" ground here. :-)  
Or at least walking on ground not trodden for the last 8 years.

> All other sources in usr.bin/tn3270/tools/mk*.c have
>>> #include <stdio.h>
>>> #include <string.h>
>>> #include <ctype.h>
> 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.

    -- Garrett
> ---
> Izumi Tsutsui

Garrett D'Amore, Principal Software Engineer
Tadpole Computer / Computing Technologies Division,
General Dynamics C4 Systems
Phone: 951 325-2134  Fax: 951 325-2191