https://gcc.gnu.org/g:5a3b22d5ea01ee63804bf5a528b3d209fbe6767c
commit r17-5289-g5a3b22d5ea01ee63804bf5a528b3d209fbe6767c Author: Sam James <[email protected]> Date: Wed Oct 14 02:02:27 2026 +0100 fixincludes: assume C89 for abort, don't search for strings.h We can assume abort is available for C89. Also, don't search for strings.h as we already have the needed functions available with C89. fixincludes/ChangeLog: PR bootstrap/112422 * config.h.in: Regenerate. * configure: Regenerate. * configure.ac: Don't search for abort. Don't search for strings.h. * system.h: Drop abort fallback. Drop strings.h fallback. Diff: --- fixincludes/config.h.in | 4 ---- fixincludes/configure | 12 +----------- fixincludes/configure.ac | 4 ++-- fixincludes/system.h | 13 +------------ 4 files changed, 4 insertions(+), 29 deletions(-) diff --git a/fixincludes/config.h.in b/fixincludes/config.h.in index e0ca19d3dc83..c9fc392f9b7b 100644 --- a/fixincludes/config.h.in +++ b/fixincludes/config.h.in @@ -6,10 +6,6 @@ /* Define to 1 if you have the `clearerr_unlocked' function. */ #undef HAVE_CLEARERR_UNLOCKED -/* Define to 1 if you have the declaration of `abort', and to 0 if you don't. - */ -#undef HAVE_DECL_ABORT - /* Define to 1 if you have the declaration of `asprintf', and to 0 if you don't. */ #undef HAVE_DECL_ASPRINTF diff --git a/fixincludes/configure b/fixincludes/configure index 531e628e37ee..c98e0c90cf97 100755 --- a/fixincludes/configure +++ b/fixincludes/configure @@ -4866,7 +4866,7 @@ _ACEOF # Checks for header files. -for ac_header in strings.h unistd.h fcntl.h sys/file.h sys/stat.h +for ac_header in unistd.h fcntl.h sys/file.h sys/stat.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" @@ -4892,16 +4892,6 @@ _ACEOF fi done -ac_fn_c_check_decl "$LINENO" "abort" "ac_cv_have_decl_abort" "$ac_includes_default" -if test "x$ac_cv_have_decl_abort" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_ABORT $ac_have_decl -_ACEOF ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default" if test "x$ac_cv_have_decl_asprintf" = xyes; then : ac_have_decl=1 diff --git a/fixincludes/configure.ac b/fixincludes/configure.ac index 6f2049f44851..d59313f0eb98 100644 --- a/fixincludes/configure.ac +++ b/fixincludes/configure.ac @@ -88,14 +88,14 @@ AC_DEFINE_UNQUOTED([EXE_EXT], "$ac_exeext", [Defined to the executable file extension on the host system]) # Checks for header files. -AC_CHECK_HEADERS([strings.h unistd.h fcntl.h sys/file.h sys/stat.h]) +AC_CHECK_HEADERS([unistd.h fcntl.h sys/file.h sys/stat.h]) define(fixincludes_UNLOCKED_FUNCS, clearerr_unlocked feof_unlocked dnl ferror_unlocked fflush_unlocked fgetc_unlocked fgets_unlocked dnl fileno_unlocked fprintf_unlocked fputc_unlocked fputs_unlocked dnl fread_unlocked fwrite_unlocked getchar_unlocked getc_unlocked dnl putchar_unlocked putc_unlocked) AC_CHECK_FUNCS(fixincludes_UNLOCKED_FUNCS) -AC_CHECK_DECLS([abort, asprintf, basename(char *), errno, vasprintf, memmem]) +AC_CHECK_DECLS([asprintf, basename(char *), errno, 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 46c9f72e414c..9d006ba71a10 100644 --- a/fixincludes/system.h +++ b/fixincludes/system.h @@ -173,14 +173,7 @@ extern int errno; rely on (and therefore test) GCC's string builtins. */ #define __NO_STRING_INLINES -#ifdef HAVE_STRING_H -# include <string.h> -#else -# ifdef HAVE_STRINGS_H -# include <strings.h> -# endif -#endif - +#include <string.h> #include <stdlib.h> #ifdef HAVE_UNISTD_H @@ -200,10 +193,6 @@ extern int errno; here. These checks will be in the undefined state while configure is running so be careful to test "defined (HAVE_DECL_*)". */ -#if defined (HAVE_DECL_ABORT) && !HAVE_DECL_ABORT -extern void abort (void); -#endif - #if defined (HAVE_DECL_MEMMEM) && !HAVE_DECL_MEMMEM extern void *memmem (const void *, size_t, const void *, size_t); #endif
