This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [PATCH??] libstdc++-v3/config/locale/gnu/c_locale.h
- From: Jonathan Lennox <lennox at cs dot columbia dot edu>
- To: libstdc++ at gcc dot gnu dot org, Chris Lattner <sabre at nondot dot org>
- Date: Fri, 22 Aug 2003 13:16:55 -0400
- Subject: Re: [PATCH??] libstdc++-v3/config/locale/gnu/c_locale.h
- References: <Pine.LNX.4.44.0308221027310.9384-100000@nondot.org>
Chris Lattner writes:
> --- c_locale.h 23 Jan 2003 18:56:00 -0000 1.6
> +++ c_locale.h 22 Aug 2003 15:15:04 -0000
> @@ -42,6 +42,8 @@
> +#include <string.h>
> +#include <malloc.h>
On FreeBSD, malloc.h is:
#if __GNUC__
#warning "this file includes <malloc.h> which is deprecated, use <stdlib.h> instead"
#endif
#include <stdlib.h>
It's certainly better to use <stdlib.h> for malloc() and free() prototypes,
if it's available. (Does libstdc++ support any platforms where it isn't?)
--
Jonathan Lennox
lennox@cs.columbia.edu