Don't check for headers guaranteed by C89.
libssp/ChangeLog:
PR bootstrap/112422
* config.h.in: Regenerate.
* configure: Regenerate.
* configure.ac: Don't search for string.h, stdio.h, or limits.h.
* gets-chk.c: Drop now-redundant ifdef guards.
* memcpy-chk.c: Ditto.
* memmove-chk.c: Ditto.
* mempcpy-chk.c: Ditto.
* memset-chk.c: Ditto.
* snprintf-chk.c: Ditto.
* sprintf-chk.c: Ditto.
* ssp.c: Ditto.
* stpcpy-chk.c: Ditto.
* strcat-chk.c: Ditto.
* strcpy-chk.c: Ditto.
* strncat-chk.c: Ditto.
* strncpy-chk.c: Ditto.
* vsnprintf-chk.c: Ditto.
* vsprintf-chk.c: Ditto.
---
libssp/config.h.in | 6 ------
libssp/configure | 2 +-
libssp/configure.ac | 2 +-
libssp/gets-chk.c | 16 ++++------------
libssp/memcpy-chk.c | 4 +---
libssp/memmove-chk.c | 4 +---
libssp/mempcpy-chk.c | 4 +---
libssp/memset-chk.c | 4 +---
libssp/snprintf-chk.c | 4 +---
libssp/sprintf-chk.c | 8 ++------
libssp/ssp.c | 8 ++------
libssp/stpcpy-chk.c | 4 +---
libssp/strcat-chk.c | 4 +---
libssp/strcpy-chk.c | 4 +---
libssp/strncat-chk.c | 4 +---
libssp/strncpy-chk.c | 4 +---
libssp/vsnprintf-chk.c | 4 +---
libssp/vsprintf-chk.c | 8 ++------
18 files changed, 23 insertions(+), 71 deletions(-)
@@ -19,9 +19,6 @@
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
-/* Define to 1 if you have the <limits.h> header file. */
-#undef HAVE_LIMITS_H
-
/* Define to 1 if you have the <malloc.h> header file. */
#undef HAVE_MALLOC_H
@@ -40,9 +37,6 @@
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
-/* Define to 1 if you have the <stdio.h> header file. */
-#undef HAVE_STDIO_H
-
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
@@ -4853,7 +4853,7 @@ fi
done
-for ac_header in alloca.h malloc.h paths.h syslog.h string.h unistd.h fcntl.h stdio.h limits.h
+for ac_header in alloca.h malloc.h paths.h syslog.h unistd.h fcntl.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"
@@ -124,7 +124,7 @@ AM_CONDITIONAL(LIBSSP_USE_SYMVER, [test "x$ssp_use_symver" != xno])
AM_CONDITIONAL(LIBSSP_USE_SYMVER_GNU, [test "x$ssp_use_symver" = xgnu])
AM_CONDITIONAL(LIBSSP_USE_SYMVER_SUN, [test "x$ssp_use_symver" = xsun])
-AC_CHECK_HEADERS(alloca.h malloc.h paths.h syslog.h string.h unistd.h fcntl.h stdio.h limits.h)
+AC_CHECK_HEADERS(alloca.h malloc.h paths.h syslog.h unistd.h fcntl.h)
if test x$gcc_no_link = xyes; then
# Presume the ISO C functions are available; add target-specific
@@ -34,22 +34,14 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include "config.h"
#include <ssp/ssp.h>
+#include <limits.h>
#include <stdarg.h>
-#ifdef HAVE_STDLIB_H
-# include <stdlib.h>
-#endif
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
#ifdef HAVE_ALLOCA_H
# include <alloca.h>
#endif
-#ifdef HAVE_LIMITS_H
-# include <limits.h>
-#endif
-#ifdef HAVE_STDIO_H
-# include <stdio.h>
-#endif
-#ifdef HAVE_STRING_H
-# include <string.h>
-#endif
#if !HAVE_DECL_GETS
extern char *gets (char *);
@@ -34,9 +34,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include "config.h"
#include <ssp/ssp.h>
-#ifdef HAVE_STRING_H
-# include <string.h>
-#endif
+#include <string.h>
extern void __chk_fail (void) __attribute__((__noreturn__));
@@ -34,9 +34,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include "config.h"
#include <ssp/ssp.h>
-#ifdef HAVE_STRING_H
-# include <string.h>
-#endif
+#include <string.h>
extern void __chk_fail (void) __attribute__((__noreturn__));
@@ -34,9 +34,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include "config.h"
#include <ssp/ssp.h>
-#ifdef HAVE_STRING_H
-# include <string.h>
-#endif
+#include <string.h>
extern void __chk_fail (void) __attribute__((__noreturn__));
@@ -34,9 +34,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include "config.h"
#include <ssp/ssp.h>
-#ifdef HAVE_STRING_H
-# include <string.h>
-#endif
+#include <string.h>
extern void __chk_fail (void) __attribute__((__noreturn__));
@@ -35,9 +35,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include "config.h"
#include <ssp/ssp.h>
#include <stdarg.h>
-#ifdef HAVE_STDIO_H
-# include <stdio.h>
-#endif
+#include <stdio.h>
extern void __chk_fail (void) __attribute__((__noreturn__));
@@ -35,12 +35,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include "config.h"
#include <ssp/ssp.h>
#include <stdarg.h>
-#ifdef HAVE_LIMITS_H
-# include <limits.h>
-#endif
-#ifdef HAVE_STDIO_H
-# include <stdio.h>
-#endif
+#include <limits.h>
+#include <stdio.h>
extern void __chk_fail (void) __attribute__((__noreturn__));
@@ -33,18 +33,14 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include "config.h"
+#include <stdlib.h>
+#include <string.h>
#ifdef HAVE_ALLOCA_H
# include <alloca.h>
#endif
#ifdef HAVE_MALLOC_H
# include <malloc.h>
#endif
-#ifdef HAVE_STDLIB_H
-# include <stdlib.h>
-#endif
-#ifdef HAVE_STRING_H
-# include <string.h>
-#endif
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
@@ -34,9 +34,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include "config.h"
#include <ssp/ssp.h>
-#ifdef HAVE_STRING_H
-# include <string.h>
-#endif
+#include <string.h>
extern void __chk_fail (void) __attribute__((__noreturn__));
@@ -34,9 +34,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include "config.h"
#include <ssp/ssp.h>
-#ifdef HAVE_STRING_H
-# include <string.h>
-#endif
+#include <string.h>
extern void __chk_fail (void) __attribute__((__noreturn__));
@@ -34,9 +34,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include "config.h"
#include <ssp/ssp.h>
-#ifdef HAVE_STRING_H
-# include <string.h>
-#endif
+#include <string.h>
extern void __chk_fail (void) __attribute__((__noreturn__));
@@ -34,9 +34,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include "config.h"
#include <ssp/ssp.h>
-#ifdef HAVE_STRING_H
-# include <string.h>
-#endif
+#include <string.h>
extern void __chk_fail (void) __attribute__((__noreturn__));
@@ -33,9 +33,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include "config.h"
#include <ssp/ssp.h>
-#ifdef HAVE_STRING_H
-# include <string.h>
-#endif
+#include <string.h>
extern void __chk_fail (void) __attribute__((__noreturn__));
@@ -34,9 +34,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include "config.h"
#include <ssp/ssp.h>
#include <stdarg.h>
-#ifdef HAVE_STDIO_H
-# include <stdio.h>
-#endif
+#include <stdio.h>
extern void __chk_fail (void) __attribute__((__noreturn__));
@@ -34,12 +34,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include "config.h"
#include <ssp/ssp.h>
#include <stdarg.h>
-#ifdef HAVE_LIMITS_H
-# include <limits.h>
-#endif
-#ifdef HAVE_STDIO_H
-# include <stdio.h>
-#endif
+#include <limits.h>
+#include <stdio.h>
extern void __chk_fail (void) __attribute__((__noreturn__));