Subject: Re: Cross compiling on FreeBSD 5.0, malloc.h is deprecated
To: None <email@example.com>
From: Aron Stansvik <firstname.lastname@example.org>
Date: 10/28/2003 22:50:05
On Tue, Oct 28, 2003 at 11:10:41PM +0300, Valeriy E. Ushakov wrote:
> On Tue, Oct 28, 2003 at 20:35:17 +0100, Aron Stansvik wrote:
> > And the only file that, from what I can tell (there might be more, but
> > my compilation bails out), that's affected is:
> > src/usr.bin/lex/flexdef.h
> > which on line 40 defines the __STDC__ macro and on line 61 includes the
> > deprecated header malloc.h. This gives a preprocessor error on my
> > system:
> Oh, it's only a warning on FreeBSD 4.x, so I never bothered...
> I think this:
> #ifdef HAVE_MALLOC_H
> #include <malloc.h>
> #ifdef STDC_HEADERS
> #include <stdlib.h>
> should be changed to only check/include malloc.h if STDC_HEADERS are
> not defined.
> Alternatively (as we don't run configure for lex), we can just
> undefine HAVE_MALLOC_H in config.h
I just saw that Christos Zoulas commited a fix, doing just that.
This is great.