diff --git a/lang/gcc8/files/patch-gcc_system.h b/lang/gcc8/files/patch-gcc_system.h new file mode 100644 index 0000000000000..28a6281c22cac --- /dev/null +++ b/lang/gcc8/files/patch-gcc_system.h @@ -0,0 +1,42 @@ +--- gcc/system.h.orig 2021-05-14 08:42:09 UTC ++++ gcc/system.h +@@ -203,19 +203,6 @@ extern int fprintf_unlocked (FILE *, const char *, ... + #endif + #endif + +-/* There are an extraordinary number of issues with . +- The last straw is that it varies with the locale. Use libiberty's +- replacement instead. */ +-#include "safe-ctype.h" +- +-#include +- +-#include +- +-#if !defined (errno) && defined (HAVE_DECL_ERRNO) && !HAVE_DECL_ERRNO +-extern int errno; +-#endif +- + #ifdef __cplusplus + #if defined (INCLUDE_ALGORITHM) || !defined (HAVE_SWAP_IN_UTILITY) + # include +@@ -235,6 +222,19 @@ extern int errno; + # include + # include + # include ++#endif ++ ++/* There are an extraordinary number of issues with . ++ The last straw is that it varies with the locale. Use libiberty's ++ replacement instead. */ ++#include "safe-ctype.h" ++ ++#include ++ ++#include ++ ++#if !defined (errno) && defined (HAVE_DECL_ERRNO) && !HAVE_DECL_ERRNO ++extern int errno; + #endif + + /* Some of glibc's string inlines cause warnings. Plus we'd rather diff --git a/lang/gcc9/files/patch-gcc_system.h b/lang/gcc9/files/patch-gcc_system.h new file mode 100644 index 0000000000000..e28d9e4acc58a --- /dev/null +++ b/lang/gcc9/files/patch-gcc_system.h @@ -0,0 +1,42 @@ +--- gcc/system.h.orig 2022-05-27 07:21:11 UTC ++++ gcc/system.h +@@ -203,19 +203,6 @@ extern int fprintf_unlocked (FILE *, const char *, ... + #endif + #endif + +-/* There are an extraordinary number of issues with . +- The last straw is that it varies with the locale. Use libiberty's +- replacement instead. */ +-#include "safe-ctype.h" +- +-#include +- +-#include +- +-#if !defined (errno) && defined (HAVE_DECL_ERRNO) && !HAVE_DECL_ERRNO +-extern int errno; +-#endif +- + #ifdef __cplusplus + #if defined (INCLUDE_ALGORITHM) || !defined (HAVE_SWAP_IN_UTILITY) + # include +@@ -235,6 +222,19 @@ extern int errno; + # include + # include + # include ++#endif ++ ++/* There are an extraordinary number of issues with . ++ The last straw is that it varies with the locale. Use libiberty's ++ replacement instead. */ ++#include "safe-ctype.h" ++ ++#include ++ ++#include ++ ++#if !defined (errno) && defined (HAVE_DECL_ERRNO) && !HAVE_DECL_ERRNO ++extern int errno; + #endif + + /* Some of glibc's string inlines cause warnings. Plus we'd rather