aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver
diff options
context:
space:
mode:
authorSteve Ellcey <sje@cup.hp.com>2005-07-01 17:18:06 +0000
committerSteve Ellcey <sje@cup.hp.com>2005-07-01 17:18:06 +0000
commite122f1f5f1f443e5297d87eb971009456ac792cb (patch)
tree5d495990b4df5f9b9c7c49d847e7ef483e3d700d /gdb/gdbserver
parent3ad976515e1a91e67af131afc382317ffb7a40f7 (diff)
downloadgdb-e122f1f5f1f443e5297d87eb971009456ac792cb.zip
gdb-e122f1f5f1f443e5297d87eb971009456ac792cb.tar.gz
gdb-e122f1f5f1f443e5297d87eb971009456ac792cb.tar.bz2
* configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
* configure: Regenerate. * config.in: Regenerate. * server.h (NEED_DECLARATION_STRERROR): Replace with !HAVE_DECL_STRERROR.
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r--gdb/gdbserver/ChangeLog8
-rw-r--r--gdb/gdbserver/config.in7
-rwxr-xr-xgdb/gdbserver/configure48
-rw-r--r--gdb/gdbserver/configure.ac2
-rw-r--r--gdb/gdbserver/server.h2
5 files changed, 36 insertions, 31 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index 4c3e0fe..71a799d 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,11 @@
+2005-07-01 Steve Ellcey <sje@cup.hp.com>
+
+ * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
+ * configure: Regenerate.
+ * config.in: Regenerate.
+ * server.h (NEED_DECLARATION_STRERROR):
+ Replace with !HAVE_DECL_STRERROR.
+
2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
* linux-low.c (linux_wait, linux_send_signal): Don't test
diff --git a/gdb/gdbserver/config.in b/gdb/gdbserver/config.in
index 7e3f86f..b9ea6a1 100644
--- a/gdb/gdbserver/config.in
+++ b/gdb/gdbserver/config.in
@@ -1,5 +1,9 @@
/* config.in. Generated from configure.ac by autoheader. */
+/* Define to 1 if you have the declaration of `strerror', and to 0 if you
+ don't. */
+#undef HAVE_DECL_STRERROR
+
/* Define if <sys/procfs.h> has elf_fpregset_t. */
#undef HAVE_ELF_FPREGSET_T
@@ -79,9 +83,6 @@
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
-/* Define if strerror is not declared in system header files. */
-#undef NEED_DECLARATION_STRERROR
-
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
diff --git a/gdb/gdbserver/configure b/gdb/gdbserver/configure
index 0a5b6e5..69d666d 100755
--- a/gdb/gdbserver/configure
+++ b/gdb/gdbserver/configure
@@ -3081,9 +3081,9 @@ fi
done
-echo "$as_me:$LINENO: checking whether strerror must be declared" >&5
-echo $ECHO_N "checking whether strerror must be declared... $ECHO_C" >&6
-if test "${bfd_cv_decl_needed_strerror+set}" = set; then
+echo "$as_me:$LINENO: checking whether strerror is declared" >&5
+echo $ECHO_N "checking whether strerror is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_strerror+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
@@ -3092,25 +3092,14 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-
-#include <stdio.h>
-#ifdef HAVE_STRING_H
-#include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
+$ac_includes_default
int
main ()
{
-char *(*pfn) = (char *(*)) strerror
+#ifndef strerror
+ char *p = (char *) strerror;
+#endif
+
;
return 0;
}
@@ -3137,27 +3126,34 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- bfd_cv_decl_needed_strerror=no
+ ac_cv_have_decl_strerror=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-bfd_cv_decl_needed_strerror=yes
+ac_cv_have_decl_strerror=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_strerror" >&5
+echo "${ECHO_T}$ac_cv_have_decl_strerror" >&6
+if test $ac_cv_have_decl_strerror = yes; then
-echo "$as_me:$LINENO: result: $bfd_cv_decl_needed_strerror" >&5
-echo "${ECHO_T}$bfd_cv_decl_needed_strerror" >&6
-if test $bfd_cv_decl_needed_strerror = yes; then
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRERROR 1
+_ACEOF
-cat >>confdefs.h <<\_ACEOF
-#define NEED_DECLARATION_STRERROR 1
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRERROR 0
_ACEOF
+
fi
+
echo "$as_me:$LINENO: checking for socklen_t" >&5
echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
if test "${ac_cv_type_socklen_t+set}" = set; then
diff --git a/gdb/gdbserver/configure.ac b/gdb/gdbserver/configure.ac
index eda8882..68c5d84 100644
--- a/gdb/gdbserver/configure.ac
+++ b/gdb/gdbserver/configure.ac
@@ -38,7 +38,7 @@ AC_CHECK_HEADERS(sgtty.h termio.h termios.h sys/reg.h string.h dnl
proc_service.h sys/procfs.h thread_db.h linux/elf.h dnl
stdlib.h unistd.h)
-BFD_NEED_DECLARATION(strerror)
+AC_CHECK_DECLS(strerror)
AC_CHECK_TYPES(socklen_t, [], [],
[#include <sys/types.h>
diff --git a/gdb/gdbserver/server.h b/gdb/gdbserver/server.h
index 49161fb..4b146a1 100644
--- a/gdb/gdbserver/server.h
+++ b/gdb/gdbserver/server.h
@@ -34,7 +34,7 @@
#include <string.h>
#endif
-#ifdef NEED_DECLARATION_STRERROR
+#if !HAVE_DECL_STRERROR
#ifndef strerror
extern char *strerror (int); /* X3.159-1989 4.11.6.2 */
#endif