summaryrefslogtreecommitdiff
path: root/gcc/fixincludes
diff options
context:
space:
mode:
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>1995-02-06 16:51:48 +0000
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>1995-02-06 16:51:48 +0000
commita675eeb4273aae77cc6756df0c8fd12ce0aea54b (patch)
treeca46aa144bd515a919fe3424d74fadd090045454 /gcc/fixincludes
parentef618fe47acd0b8db23562413ff7aecdd901d7fa (diff)
downloadgcc-a675eeb4273aae77cc6756df0c8fd12ce0aea54b.tar.gz
Only include <stdio.h> and <stdlib.h> in <assert.h> for C++
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@8873 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fixincludes')
-rwxr-xr-xgcc/fixincludes8
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/fixincludes b/gcc/fixincludes
index 059f73dfbf4..156afd82b59 100755
--- a/gcc/fixincludes
+++ b/gcc/fixincludes
@@ -2120,7 +2120,9 @@ if [ -r ${LIB}/$file ]; then
true
else
echo "Fixing $file (needs stdio.h)"
- echo '#include <stdio.h>' >>${LIB}/$file
+ echo '#ifdef __cplusplus
+#include <stdio.h>
+#endif' >>${LIB}/$file
fi
fi
if grep 'exit *(' ${LIB}/$file >/dev/null 2>/dev/null ||
@@ -2129,7 +2131,9 @@ if [ -r ${LIB}/$file ]; then
true
else
echo "Fixing $file (needs stdlib.h)"
- echo '#include <stdlib.h>' >>${LIB}/$file
+ echo '#ifdef __cplusplus
+#include <stdlib.h>
+#endif' >>${LIB}/$file
fi
fi
if cmp $file ${LIB}/$file >/dev/null 2>&1; then