2009/8/31 Richard Henderson <r...@redhat.com>: > On 08/29/2009 03:49 PM, Pedro Lamarão wrote: >> >> 2009/8/29 Magnus Fromreide<ma...@lysator.liu.se>: >>> >>> Why the changes to gcc/system.h where you unpoision malloc and realloc? >>> Why the changes to libcpp/system.h where you unpoision malloc, realloc, >>> calloc and strdup? >> >> Including<algorithm> requires them for some reason. >> I haven't really looked into it. > > You should simply include <algorithm> in system.h before > the poisoning.
Oh. Right. :-) For the record, this is the error message I get: In file included from /usr/lib/gcc/i586-redhat-linux/4.4.1/../../../../include/c++/4.4.1/bits/stl_algo.h:60, from /usr/lib/gcc/i586-redhat-linux/4.4.1/../../../../include/c++/4.4.1/algorithm:62, from ../../libcpp/pch.c:26: /usr/lib/gcc/i586-redhat-linux/4.4.1/../../../../include/c++/4.4.1/cstdlib:78:8: error: attempt to use poisoned "calloc" /usr/lib/gcc/i586-redhat-linux/4.4.1/../../../../include/c++/4.4.1/cstdlib:85:8: error: attempt to use poisoned "malloc" /usr/lib/gcc/i586-redhat-linux/4.4.1/../../../../include/c++/4.4.1/cstdlib:91:8: error: attempt to use poisoned "realloc" /usr/lib/gcc/i586-redhat-linux/4.4.1/../../../../include/c++/4.4.1/cstdlib:112:11: error: attempt to use poisoned "calloc" /usr/lib/gcc/i586-redhat-linux/4.4.1/../../../../include/c++/4.4.1/cstdlib:119:11: error: attempt to use poisoned "malloc" /usr/lib/gcc/i586-redhat-linux/4.4.1/../../../../include/c++/4.4.1/cstdlib:127:11: error: attempt to use poisoned "realloc" I'll try to include cstdlib in system.h to see if that's enough. -- P.