Subject: Re: Commit to src/lib/libc/stdio/fparseln.c breaks foreign crossbuilds
To: Christian Limpach <chris@pin.lu>
From: James Chacon <jmc@NetBSD.org>
List: tech-toolchain
Date: 05/11/2004 09:27:28
On Tue, May 11, 2004 at 12:58:52PM +0200, Christian Limpach wrote:
> Hi,
> 
> > > Could you try to add a "reentrant.h" to src/tools/compat
> > > which just contains the lines:
> > > #define FLOCKFILE(fp)
> > > #define FUNLOCKFILE(fp)
> >
> > Did this, and the tools are building fine now.   Danke.
> 
> This still breaks on a Linux host since besides reentrant.h, local.h is
> newly included and it includes fileext.h which needs struct __sbuf to be
> defined.
> I'm using using the following fix for now in
> lib/libc/stdio/{fgetln,fparseln}.c:
> +#ifndef HAVE_NBTOOL_CONFIG_H
>  #include "reentrant.h"
>  #include "local.h"
> +#else
> +#define        FLOCKFILE(fp)
> +#define        FUNLOCKFILE(fp)
> +#endif
> 

This looks cleanest for now (since that's all those files need).

James