<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">--- gcc/system.h.orig	2020-03-12 08:07:21
+++ gcc/system.h	2024-06-07 00:58:02
@@ -194,27 +194,8 @@
 #undef fread_unlocked
 #undef fwrite_unlocked
 
-/* Include &lt;string&gt; before "safe-ctype.h" to avoid GCC poisoning
-   the ctype macros through safe-ctype.h */
-
-#ifdef __cplusplus
-#ifdef INCLUDE_STRING
-# include &lt;string&gt;
-#endif
-#endif
-
-/* There are an extraordinary number of issues with &lt;ctype.h&gt;.
-   The last straw is that it varies with the locale.  Use libiberty's
-   replacement instead.  */
-#include "safe-ctype.h"
-
-#include &lt;sys/types.h&gt;
-
-#include &lt;errno.h&gt;
-
-#if !defined (errno) &amp;&amp; defined (HAVE_DECL_ERRNO) &amp;&amp; !HAVE_DECL_ERRNO
-extern int errno;
-#endif
+/* Include C++ standard headers before "safe-ctype.h" to avoid GCC
+   poisoning the ctype macros through safe-ctype.h */
 
 #ifdef __cplusplus
 #if defined (INCLUDE_ALGORITHM) || !defined (HAVE_SWAP_IN_UTILITY)
@@ -229,6 +210,9 @@
 #ifdef INCLUDE_SET
 # include &lt;set&gt;
 #endif
+#ifdef INCLUDE_STRING
+# include &lt;string&gt;
+#endif
 #ifdef INCLUDE_VECTOR
 # include &lt;vector&gt;
 #endif
@@ -237,6 +221,19 @@
 # include &lt;utility&gt;
 #endif
 
+/* There are an extraordinary number of issues with &lt;ctype.h&gt;.
+   The last straw is that it varies with the locale.  Use libiberty's
+   replacement instead.  */
+#include "safe-ctype.h"
+
+#include &lt;sys/types.h&gt;
+
+#include &lt;errno.h&gt;
+
+#if !defined (errno) &amp;&amp; defined (HAVE_DECL_ERRNO) &amp;&amp; !HAVE_DECL_ERRNO
+extern int errno;
+#endif
+
 /* Some of glibc's string inlines cause warnings.  Plus we'd rather
    rely on (and therefore test) GCC's string builtins.  */
 #define __NO_STRING_INLINES
</pre></body></html>