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
This commit is contained in:
parent
4ca5c232d0
commit
469a31a98e
2 changed files with 13 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
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>
|
||||
|
||||
PR target/57655
|
||||
|
|
|
@ -226,6 +226,14 @@ extern int errno;
|
|||
# include <stdlib.h>
|
||||
#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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue