aboutsummaryrefslogtreecommitdiff
path: root/ld/sysdep.h
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2021-04-05 15:31:53 +0930
committerAlan Modra <amodra@gmail.com>2021-04-05 15:31:53 +0930
commitc774eab1c82f49f0f719fd7e51e5988c62082118 (patch)
treee8f1d3c42cdf376a768fe11cca195261ddeb04ac /ld/sysdep.h
parent23d613801dfb97757f0e8eaf260d154f3e6750b1 (diff)
downloadgdb-c774eab1c82f49f0f719fd7e51e5988c62082118.zip
gdb-c774eab1c82f49f0f719fd7e51e5988c62082118.tar.gz
gdb-c774eab1c82f49f0f719fd7e51e5988c62082118.tar.bz2
C99 ld configury
* configure.ac: Move initfini-array arg handling earlier. Don't check for string.h, strings.h, stdlib.h, or locale.h. Do check for inttypes.h, stdint.h, sys/types.h. Don't check for setlocale, free, getev or strstr. (AC_ISC_POSIX): Don't invoke. * sysdep.h: Include string.h and stdlib.h unconditionally. Test HAVE_SYS_TYPE_H and HAVE_SYS_STAT_H. Remove strstr, free and getenv fallback declarations. * ld.h: Don't test HAVE_LOCALE_H. * ldmain.c: Don't test HAVE_SETLOCALE. * config.in: Regenerate. * configure: Regenerate.
Diffstat (limited to 'ld/sysdep.h')
-rw-r--r--ld/sysdep.h37
1 files changed, 5 insertions, 32 deletions
diff --git a/ld/sysdep.h b/ld/sysdep.h
index 27bce0a..a80ac13 100644
--- a/ld/sysdep.h
+++ b/ld/sysdep.h
@@ -28,30 +28,15 @@
#include "config.h"
#include <stdio.h>
+#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
-#include <sys/stat.h>
-#include <stdarg.h>
-
-#ifdef STRING_WITH_STRINGS
-#include <string.h>
-#include <strings.h>
-#else
-#ifdef HAVE_STRING_H
-#include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#else
-extern char *strchr ();
-extern char *strrchr ();
-#endif
#endif
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
#endif
-
-#ifdef HAVE_STDLIB_H
#include <stdlib.h>
-#endif
-
+#include <string.h>
+#include <stdarg.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
@@ -107,18 +92,6 @@ extern char *strrchr ();
#define SEEK_END 2
#endif
-#if !HAVE_DECL_STRSTR
-extern char *strstr ();
-#endif
-
-#if !HAVE_DECL_FREE
-extern void free ();
-#endif
-
-#if !HAVE_DECL_GETENV
-extern char *getenv ();
-#endif
-
#if !HAVE_DECL_ENVIRON
extern char **environ;
#endif