Subject: Re: FreeBSD misses malloc.h
To: Julio M. Merino Vidal <jmmv@menta.net>
From: Lubomir Sedlacik <salo@Xtrmntr.org>
List: tech-pkg
Date: 07/23/2003 18:39:19
--+jhVVhN62yS6hEJ8
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Jul 23, 2003 at 06:34:47PM +0200, Julio M. Merino Vidal wrote:
> On Wed, 23 Jul 2003 09:29:19 -0700 (PDT), Jeremy C. Reed wrote:
> >=20
> > FreeBSD's ports/graphics/gle/Makefile has:
> >=20
> > post-patch:
> > .for file in ex_angle.c ex_cut_round.c ex_raw.c extrude.c round_cap.c s=
egment.c texgen.c
> >         @${REINPLACE_CMD} -e "s/malloc.h/stdlib.h/g" ${WRKSRC}/src/${fi=
le}
> > .endfor
> >=20
> > ports/games/tinymux/Makefile does similar:
> > @${REINPLACE_CMD} -e 's,<malloc.h>,<stdlib.h>,' ${WRKSRC}/udb_ochunk.c
> >=20
> > ports/graphics/ImageMagick uses:
> > @${REINPLACE_CMD} -e 's|<malloc.h>|<stdlib.h>|g' ${WRKSRC}/ltdl/ltdl.c
> >=20
> > And many other FreeBSD ports do this too.
>=20
> But what about systems that have the malloc.h header and need it?

#if defined(__FreeBSD__)
#include <stdlib.h>
#else
#include <malloc.h>
#endif


regards,

--=20
-- Lubomir Sedlacik <salo@Xtrmntr.org>                   --
--                  <salo@silcnet.org>                   --

--+jhVVhN62yS6hEJ8
Content-Type: application/pgp-signature
Content-Disposition: inline

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

iD8DBQE/Hro3iwjDDlS8cmMRAscgAJ0UpgEc30ozXL7C9nSL/vFVXN3JowCgkGo7
w4eJeKPzccWI53RR3F9q36o=
=HuAd
-----END PGP SIGNATURE-----

--+jhVVhN62yS6hEJ8--