aboutsummaryrefslogtreecommitdiff
path: root/libiberty
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2022-11-24 12:30:22 +0000
committerNick Clifton <nickc@redhat.com>2022-11-24 12:31:46 +0000
commit0075c53724f78c78aa1692cc8e3bf1433eeb0b9f (patch)
tree473bdcbebbab3994b7658c2612cba3b88adb24c4 /libiberty
parentffbbab0b3a1000f862b6d4ce3d9a76ed14f08801 (diff)
downloadgdb-0075c53724f78c78aa1692cc8e3bf1433eeb0b9f.zip
gdb-0075c53724f78c78aa1692cc8e3bf1433eeb0b9f.tar.gz
gdb-0075c53724f78c78aa1692cc8e3bf1433eeb0b9f.tar.bz2
Impport libiberty commit: 885b6660c17f from gcc mainline. Fix gas's acinclude.m4 to stop a potwntial configure time warning message.
Diffstat (limited to 'libiberty')
-rw-r--r--libiberty/acinclude.m414
-rwxr-xr-xlibiberty/configure14
2 files changed, 22 insertions, 6 deletions
diff --git a/libiberty/acinclude.m4 b/libiberty/acinclude.m4
index 6bd127e..6bb6905 100644
--- a/libiberty/acinclude.m4
+++ b/libiberty/acinclude.m4
@@ -24,6 +24,8 @@ AC_CACHE_CHECK([for working strncmp], ac_cv_func_strncmp_works,
[AC_TRY_RUN([
/* Test by Jim Wilson and Kaveh Ghazi.
Check whether strncmp reads past the end of its string parameters. */
+#include <stdlib.h>
+#include <string.h>
#include <sys/types.h>
#ifdef HAVE_FCNTL_H
@@ -51,7 +53,8 @@ AC_CACHE_CHECK([for working strncmp], ac_cv_func_strncmp_works,
#define MAP_LEN 0x10000
-main ()
+int
+main (void)
{
#if defined(HAVE_MMAP) || defined(HAVE_MMAP_ANYWHERE)
char *p;
@@ -157,7 +160,10 @@ if test $ac_cv_os_cray = yes; then
fi
AC_CACHE_CHECK(stack direction for C alloca, ac_cv_c_stack_direction,
-[AC_TRY_RUN([find_stack_direction ()
+[AC_TRY_RUN([#include <stdlib.h>
+
+int
+find_stack_direction (void)
{
static char *addr = 0;
auto char dummy;
@@ -169,7 +175,9 @@ AC_CACHE_CHECK(stack direction for C alloca, ac_cv_c_stack_direction,
else
return (&dummy > addr) ? 1 : -1;
}
-main ()
+
+int
+main (void)
{
exit (find_stack_direction() < 0);
}],
diff --git a/libiberty/configure b/libiberty/configure
index 306c07bd..451af49 100755
--- a/libiberty/configure
+++ b/libiberty/configure
@@ -6919,7 +6919,10 @@ else
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-find_stack_direction ()
+#include <stdlib.h>
+
+int
+find_stack_direction (void)
{
static char *addr = 0;
auto char dummy;
@@ -6931,7 +6934,9 @@ find_stack_direction ()
else
return (&dummy > addr) ? 1 : -1;
}
-main ()
+
+int
+main (void)
{
exit (find_stack_direction() < 0);
}
@@ -7756,6 +7761,8 @@ else
/* Test by Jim Wilson and Kaveh Ghazi.
Check whether strncmp reads past the end of its string parameters. */
+#include <stdlib.h>
+#include <string.h>
#include <sys/types.h>
#ifdef HAVE_FCNTL_H
@@ -7783,7 +7790,8 @@ else
#define MAP_LEN 0x10000
-main ()
+int
+main (void)
{
#if defined(HAVE_MMAP) || defined(HAVE_MMAP_ANYWHERE)
char *p;