Commit 469a31a9 by Oleg Endo Committed by Jason Merrill

system.h: Include <cstdlib> as well as <stdlib.h>.

	* system.h: Include <cstdlib> as well as <stdlib.h>.

Co-Authored-By: Jason Merrill <jason@redhat.com>

From-SVN: r200265
parent 4ca5c232
2013-06-20 Oleg Endo <oleg.endo@t-online.de>
Jason Merrill <jason@redhat.com>
* system.h: Include <cstdlib> as well as <stdlib.h>.
2013-06-20 Uros Bizjak <ubizjak@gmail.com> 2013-06-20 Uros Bizjak <ubizjak@gmail.com>
PR target/57655 PR target/57655
......
...@@ -226,6 +226,14 @@ extern int errno; ...@@ -226,6 +226,14 @@ extern int errno;
# include <stdlib.h> # include <stdlib.h>
#endif #endif
/* When compiling C++ we need to include <cstdlib> as well as <stdlib.h> so
that it is processed before we poison "malloc"; otherwise, if a source
file uses a standard library header that includes <cstdlib>, we will get
an error about 'using std::malloc'. */
#ifdef __cplusplus
#include <cstdlib>
#endif
/* Undef vec_free from AIX stdlib.h header which conflicts with vec.h. */ /* Undef vec_free from AIX stdlib.h header which conflicts with vec.h. */
#undef vec_free #undef vec_free
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment