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

On Wed, 23 Jul 2003 13:33:57 +0200
"Julio M. Merino Vidal" <jmmv@menta.net> 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>"
#else
#include <stdlib.h>
#endif

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

--- 
Juan RP		<jrp@hispabsd.org>
--

--=.,sdmKi8nc2D34k
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (NetBSD)

iD8DBQE/HqhVmOEpHEa5ttcRAkydAJ9/6HfzMVNyCwtddjAPeRwwrhaqjQCfX2+X
YSCp1HLLCsbNfkJEQ7DV78c=
=7SM5
-----END PGP SIGNATURE-----

--=.,sdmKi8nc2D34k--