From 77b8455903d53df9a0b509540b91d4883351de96 Mon Sep 17 00:00:00 2001 From: "Kaveh R. Ghazi" Date: Tue, 13 Mar 2001 19:55:18 +0000 Subject: system.h (malloc, [...]): Only poison these tokens when IN_GCC is defined. * system.h (malloc, realloc, calloc, strdup): Only poison these tokens when IN_GCC is defined. From-SVN: r40443 --- gcc/system.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gcc/system.h') diff --git a/gcc/system.h b/gcc/system.h index a18e34c..24abf91 100644 --- a/gcc/system.h +++ b/gcc/system.h @@ -584,11 +584,17 @@ typedef char _Bool; #if (GCC_VERSION >= 3000) +/* Note autoconf checks for prototype declarations and includes + system.h while doing so. Only poison these tokens if actually + compiling gcc, so that the autoconf declaration tests for malloc + etc don't spuriously fail. */ +#ifdef IN_GCC #undef malloc #undef realloc #undef calloc #undef strdup #pragma GCC poison malloc realloc calloc strdup +#endif /* IN_GCC */ /* Note: not all uses of `bcopy' and `index' (esp. variable names) have been eliminated. */ -- cgit v1.1