* 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.
This commit is contained in:
Steve Ellcey 2005-07-01 17:18:06 +00:00
parent 3ad976515e
commit e122f1f5f1
5 changed files with 37 additions and 32 deletions

View File

@ -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

View File

@ -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

View File

@ -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 NEED_DECLARATION_STRERROR 1
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_STRERROR 1
_ACEOF
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

View File

@ -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>

View File

@ -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