https://gcc.gnu.org/g:d57cc2b674a38df8f65608f2ca0c9dbd2c3017fa
commit r17-5294-gd57cc2b674a38df8f65608f2ca0c9dbd2c3017fa Author: Sam James <[email protected]> Date: Wed Oct 14 02:40:33 2026 +0100 fixincludes: assume errno C89. fixincludes/ChangeLog: PR bootstrap/112422 * config.h.in: Regenerate. * configure: Regenerate. * configure.ac: Don't check for errno. * system.h: Drop errno fallback. Diff: --- fixincludes/config.h.in | 4 ---- fixincludes/configure | 10 ---------- fixincludes/configure.ac | 2 +- fixincludes/system.h | 4 ---- 4 files changed, 1 insertion(+), 19 deletions(-) diff --git a/fixincludes/config.h.in b/fixincludes/config.h.in index c9fc392f9b7b..459a68275f06 100644 --- a/fixincludes/config.h.in +++ b/fixincludes/config.h.in @@ -18,10 +18,6 @@ you don't. */ #undef HAVE_DECL_CLEARERR_UNLOCKED -/* Define to 1 if you have the declaration of `errno', and to 0 if you don't. - */ -#undef HAVE_DECL_ERRNO - /* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you don't. */ #undef HAVE_DECL_FEOF_UNLOCKED diff --git a/fixincludes/configure b/fixincludes/configure index c98e0c90cf97..651a8ef7ce72 100755 --- a/fixincludes/configure +++ b/fixincludes/configure @@ -4913,16 +4913,6 @@ fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_BASENAME $ac_have_decl _ACEOF -ac_fn_c_check_decl "$LINENO" "errno" "ac_cv_have_decl_errno" "$ac_includes_default" -if test "x$ac_cv_have_decl_errno" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_ERRNO $ac_have_decl -_ACEOF ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default" if test "x$ac_cv_have_decl_vasprintf" = xyes; then : ac_have_decl=1 diff --git a/fixincludes/configure.ac b/fixincludes/configure.ac index d59313f0eb98..9493f412bffb 100644 --- a/fixincludes/configure.ac +++ b/fixincludes/configure.ac @@ -95,7 +95,7 @@ define(fixincludes_UNLOCKED_FUNCS, clearerr_unlocked feof_unlocked dnl fread_unlocked fwrite_unlocked getchar_unlocked getc_unlocked dnl putchar_unlocked putc_unlocked) AC_CHECK_FUNCS(fixincludes_UNLOCKED_FUNCS) -AC_CHECK_DECLS([asprintf, basename(char *), errno, vasprintf, memmem]) +AC_CHECK_DECLS([asprintf, basename(char *), vasprintf, memmem]) AC_CHECK_DECLS(m4_split(m4_normalize(fixincludes_UNLOCKED_FUNCS))) # Checks for library functions. diff --git a/fixincludes/system.h b/fixincludes/system.h index 9d006ba71a10..0fb630271a38 100644 --- a/fixincludes/system.h +++ b/fixincludes/system.h @@ -165,10 +165,6 @@ extern int fprintf_unlocked (FILE *, const char *, ...); #include <sys/types.h> #include <errno.h> -#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 rely on (and therefore test) GCC's string builtins. */ #define __NO_STRING_INLINES
