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
On Sun, Aug 24, 2003 at 05:59:08PM +0200, Gabriel Dos Reis wrote:
> Chris Lattner <sabre@nondot.org> writes:
>
> | +#include <string.h>
> | +#include <malloc.h>
>
> <malloc.h> is not a standard header. The function malloc() is defined
> in <cstdlib>. Also, the headr for C-string functions should be
> <cstring> not <string.h>.
The docs/html/17_intro/HEADER_POLICY notes
Only standard headers <bits/std_xxxx.h> should sub-include
other headers.
If a header that doesn't match the above pattern needs malloc, whatever
includes that header should also include whatever it needs.
I'm aware that HEADER_POLICY hasn't been uniformly applied. Patches
welcome.
Nathan Myers
ncm-nospam@cantrip.org