summaryrefslogtreecommitdiff
path: root/gcc/system.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/system.h')
-rw-r--r--gcc/system.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/system.h b/gcc/system.h
index ba2e96364f1..445073c5cae 100644
--- a/gcc/system.h
+++ b/gcc/system.h
@@ -198,8 +198,10 @@ extern int fprintf_unlocked (FILE *, const char *, ...);
the ctype macros through safe-ctype.h */
#ifdef __cplusplus
+#ifdef INCLUDE_STRING
# include <string>
#endif
+#endif
/* There are an extraordinary number of issues with <ctype.h>.
The last straw is that it varies with the locale. Use libiberty's
@@ -215,8 +217,11 @@ extern int errno;
#endif
#ifdef __cplusplus
+#if defined (INCLUDE_ALGORITHM) || !defined (HAVE_SWAP_IN_UTILITY)
# include <algorithm>
+#endif
# include <cstring>
+# include <new>
# include <utility>
#endif