On Thu, Oct 8, 2026 at 8:53 PM Sam James <[email protected]> wrote:
>
> We can assume C89.
>
> fixincludes/ChangeLog:
>         PR bootstrap/112422
>
>         * config.h.in: Regenerate.
>         * configure: Regenerate.
>         * configure.ac: Don't search for stddef.h or stdlib.h.
>         * system.h (HAVE_STDDEF_H): Delete.
>         Include stddef.h unconditionally.
>         (HAVE_STDLIB_H): Delete.
>         Include stdlib.h unconditionally.


Ok.

> ---
>  fixincludes/config.h.in  | 3 ---
>  fixincludes/configure    | 3 +--
>  fixincludes/configure.ac | 3 +--
>  fixincludes/system.h     | 9 ++-------
>  4 files changed, 4 insertions(+), 14 deletions(-)
>
> diff --git a/fixincludes/config.h.in b/fixincludes/config.h.in
> index 0fd21b721b9c..70d766b3e139 100644
> --- a/fixincludes/config.h.in
> +++ b/fixincludes/config.h.in
> @@ -157,9 +157,6 @@
>  /* Define to 1 if you have the `putc_unlocked' function. */
>  #undef HAVE_PUTC_UNLOCKED
>
> -/* Define to 1 if you have the <stddef.h> header file. */
> -#undef HAVE_STDDEF_H
> -
>  /* Define to 1 if you have the <stdint.h> header file. */
>  #undef HAVE_STDINT_H
>
> diff --git a/fixincludes/configure b/fixincludes/configure
> index 6b2690614357..243d03787644 100755
> --- a/fixincludes/configure
> +++ b/fixincludes/configure
> @@ -4865,8 +4865,7 @@ _ACEOF
>
>
>  # Checks for header files.
> -for ac_header in stddef.h stdlib.h strings.h unistd.h fcntl.h sys/file.h \
> -       sys/stat.h
> +for ac_header in strings.h 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"
> diff --git a/fixincludes/configure.ac b/fixincludes/configure.ac
> index 08424da10ce1..b9b43ec88a1c 100644
> --- a/fixincludes/configure.ac
> +++ b/fixincludes/configure.ac
> @@ -87,8 +87,7 @@ AC_DEFINE_UNQUOTED([EXE_EXT], "$ac_exeext",
>    [Defined to the executable file extension on the host system])
>
>  # Checks for header files.
> -AC_CHECK_HEADERS([stddef.h stdlib.h strings.h unistd.h fcntl.h sys/file.h \
> -       sys/stat.h])
> +AC_CHECK_HEADERS([strings.h 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
> diff --git a/fixincludes/system.h b/fixincludes/system.h
> index 687fb2e2025d..46c9f72e414c 100644
> --- a/fixincludes/system.h
> +++ b/fixincludes/system.h
> @@ -25,10 +25,7 @@ along with GCC; see the file COPYING3.  If not see
>
>  /* We must include stdarg.h before stdio.h.  */
>  #include <stdarg.h>
> -
> -#ifdef HAVE_STDDEF_H
> -# include <stddef.h>
> -#endif
> +#include <stddef.h>
>
>  #include <stdio.h>
>
> @@ -184,9 +181,7 @@ extern int errno;
>  # endif
>  #endif
>
> -#ifdef HAVE_STDLIB_H
> -# include <stdlib.h>
> -#endif
> +#include <stdlib.h>
>
>  #ifdef HAVE_UNISTD_H
>  # include <unistd.h>
> --
> 2.56.0
>

Reply via email to