Subject: Re: FreeBSD misses malloc.h
To: Julio M. Merino Vidal <>
From: Juan RP <>
List: tech-pkg
Date: 07/23/2003 17:22:58
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

On Wed, 23 Jul 2003 13:33:57 +0200
"Julio M. Merino Vidal" <> wrote:

> Hi all,
> I see several PRs that attempt to fix the build of packages in FreeBSD.
> This system does not include a malloc.h header, so programs need to include
> stdlib.h.  In NetBSD we have a compatibility malloc.h header that simply
> includes stdlib.h.
> I wonder if we could generate such header on the fly inside the buildlink
> directory when the OS is FreeBSD so that packages can be compiled without
> extra patching (which may be very large, some times).  If this seems ok,
> where could it be done?  On a package basis?  (doing it automatically for
> *all* packages seems wrong to me as their configure script, if any, could
> be doing the right thing already).

malloc.h in FreeBSD -current:

#if __STDC__
#error "<malloc.h> has been replaced by <stdlib.h>"
#include <stdlib.h>

The problem here is that __STDC__ always is defined. 
No idea how fix it.

Juan RP		<>

Content-Type: application/pgp-signature

Version: GnuPG v1.2.2 (NetBSD)