* configure.ac: Use AC_CHECK_DECLS instead of gcc_AC_CHECK_DECLS

and BFD_NEED_DECLARATION.  Don't check if a declaration of strdup
is necessary.
* configure, config.in: Regenerate.
* utils.c: Adjust for usage of AC_CHECK_DECLS instead of
BFD_NEED_DECLARATION.  Never provide a prototype for
caninicalize_file_name.
* gdb_string.h: Adjust for usage of AC_CHECK_DECLS instead of
BFD_NEED_DECLARATION.
This commit is contained in:
Mark Kettenis 2005-01-21 13:14:02 +00:00
parent b717d30eb5
commit a3828db05a
6 changed files with 433 additions and 629 deletions

View file

@ -1,5 +1,15 @@
2005-01-21 Mark Kettenis <kettenis@gnu.org> 2005-01-21 Mark Kettenis <kettenis@gnu.org>
* configure.ac: Use AC_CHECK_DECLS instead of gcc_AC_CHECK_DECLS
and BFD_NEED_DECLARATION. Don't check if a declaration of strdup
is necessary.
* configure, config.in: Regenerate.
* utils.c: Adjust for usage of AC_CHECK_DECLS instead of
BFD_NEED_DECLARATION. Never provide a prototype for
caninicalize_file_name.
* gdb_string.h: Adjust for usage of AC_CHECK_DECLS instead of
BFD_NEED_DECLARATION.
* configure.ac (targ_archs): Use standard autoconf check for * configure.ac (targ_archs): Use standard autoconf check for
"struct stat.st_blocks" instead of rolling our own. "struct stat.st_blocks" instead of rolling our own.
* configure: Regenerated. * configure: Regenerated.

View file

@ -212,12 +212,34 @@
/* Define to 1 if you have the `dcgettext' function. */ /* Define to 1 if you have the `dcgettext' function. */
#undef HAVE_DCGETTEXT #undef HAVE_DCGETTEXT
/* Define to 1 if we found this declaration otherwise define to 0. */ /* Define to 1 if you have the declaration of `free', and to 0 if you don't.
*/
#undef HAVE_DECL_FREE
/* Define to 1 if you have the declaration of `getopt', and to 0 if you don't.
*/
#undef HAVE_DECL_GETOPT #undef HAVE_DECL_GETOPT
/* Define to 1 if we found this declaration otherwise define to 0. */ /* Define to 1 if you have the declaration of `malloc', and to 0 if you don't.
*/
#undef HAVE_DECL_MALLOC
/* Define to 1 if you have the declaration of `ptrace', and to 0 if you don't.
*/
#undef HAVE_DECL_PTRACE #undef HAVE_DECL_PTRACE
/* Define to 1 if you have the declaration of `realloc', and to 0 if you
don't. */
#undef HAVE_DECL_REALLOC
/* Define to 1 if you have the declaration of `strerror', and to 0 if you
don't. */
#undef HAVE_DECL_STRERROR
/* Define to 1 if you have the declaration of `strstr', and to 0 if you don't.
*/
#undef HAVE_DECL_STRSTR
/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'. /* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
*/ */
#undef HAVE_DIRENT_H #undef HAVE_DIRENT_H
@ -569,27 +591,6 @@
/* Define as const if the declaration of iconv() needs const. */ /* Define as const if the declaration of iconv() needs const. */
#undef ICONV_CONST #undef ICONV_CONST
/* Define if canonicalize_file_name is not declared in system header files. */
#undef NEED_DECLARATION_CANONICALIZE_FILE_NAME
/* Define if free is not declared in system header files. */
#undef NEED_DECLARATION_FREE
/* Define if malloc is not declared in system header files. */
#undef NEED_DECLARATION_MALLOC
/* Define if realloc is not declared in system header files. */
#undef NEED_DECLARATION_REALLOC
/* Define if strdup is not declared in system header files. */
#undef NEED_DECLARATION_STRDUP
/* Define if strerror is not declared in system header files. */
#undef NEED_DECLARATION_STRERROR
/* Define if strstr is not declared in system header files. */
#undef NEED_DECLARATION_STRSTR
/* Name of this package. */ /* Name of this package. */
#undef PACKAGE #undef PACKAGE

970
gdb/configure vendored

File diff suppressed because it is too large Load diff

View file

@ -424,7 +424,9 @@ AC_CHECK_HEADERS(ctype.h time.h)
# Checks for declarations. # # Checks for declarations. #
# ------------------------- # # ------------------------- #
gcc_AC_CHECK_DECLS(getopt) AC_CHECK_DECLS([free, malloc, realloc])
AC_CHECK_DECLS([strerror, strstr])
AC_CHECK_DECLS(getopt)
# ----------------------- # # ----------------------- #
# Checks for structures. # # Checks for structures. #
@ -477,7 +479,7 @@ gdb_ptrace_headers='
#endif #endif
' '
# There is no point in checking if we don't have a prototype. # There is no point in checking if we don't have a prototype.
gcc_AC_CHECK_DECLS(ptrace, , [ AC_CHECK_DECLS(ptrace, [], [
: ${gdb_cv_func_ptrace_ret='int'} : ${gdb_cv_func_ptrace_ret='int'}
: ${gdb_cv_func_ptrace_args='int,int,long,long'} : ${gdb_cv_func_ptrace_args='int,int,long,long'}
], $gdb_ptrace_headers) ], $gdb_ptrace_headers)
@ -694,14 +696,6 @@ if test $gdb_cv_have_uintptr_t = yes; then
AC_DEFINE(HAVE_UINTPTR_T, 1, [Define if <stdint.h> provides the uintptr_t type.]) AC_DEFINE(HAVE_UINTPTR_T, 1, [Define if <stdint.h> provides the uintptr_t type.])
fi fi
BFD_NEED_DECLARATION(malloc)
BFD_NEED_DECLARATION(realloc)
BFD_NEED_DECLARATION(free)
BFD_NEED_DECLARATION(strerror)
BFD_NEED_DECLARATION(strdup)
BFD_NEED_DECLARATION(strstr)
BFD_NEED_DECLARATION(canonicalize_file_name)
# If we are configured native on GNU/Linux, work around problems with # If we are configured native on GNU/Linux, work around problems with
# sys/procfs.h # sys/procfs.h
# Also detect which type of /proc is in use, such as for Unixware or Solaris. # Also detect which type of /proc is in use, such as for Unixware or Solaris.

View file

@ -1,5 +1,7 @@
/* Portable <string.h> /* Portable <string.h>
Copyright 1995, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
Copyright 1995, 1998, 1999, 2000, 2001, 2004
Free Software Foundation, Inc.
This file is part of GDB. This file is part of GDB.
@ -52,13 +54,13 @@ extern int memcmp ();
#endif #endif
#endif /* STDC_HEADERS */ #endif /* STDC_HEADERS */
#ifdef NEED_DECLARATION_STRERROR #if !HAVE_DECL_STRERROR
#ifndef strerror #ifndef strerror
extern char *strerror (int); /* X3.159-1989 4.11.6.2 */ extern char *strerror (int); /* X3.159-1989 4.11.6.2 */
#endif #endif
#endif #endif
#ifdef NEED_DECLARATION_STRSTR #if !HAVE_DECL_STRSTR
#ifndef strstr #ifndef strstr
extern char *strstr (const char *, const char *); /* X3.159-1989 4.11.5.7 */ extern char *strstr (const char *, const char *); /* X3.159-1989 4.11.5.7 */
#endif #endif

View file

@ -62,20 +62,15 @@
#include "readline/readline.h" #include "readline/readline.h"
#ifdef NEED_DECLARATION_MALLOC #if !HAVE_DECL_MALLOC
extern PTR malloc (); /* OK: PTR */ extern PTR malloc (); /* OK: PTR */
#endif #endif
#ifdef NEED_DECLARATION_REALLOC #if !HAVE_DECL_REALLOC
extern PTR realloc (); /* OK: PTR */ extern PTR realloc (); /* OK: PTR */
#endif #endif
#ifdef NEED_DECLARATION_FREE #if !HAVE_DECL_FREE
extern void free (); extern void free ();
#endif #endif
/* Actually, we'll never have the decl, since we don't define _GNU_SOURCE. */
#if defined(HAVE_CANONICALIZE_FILE_NAME) \
&& defined(NEED_DECLARATION_CANONICALIZE_FILE_NAME)
extern char *canonicalize_file_name (const char *);
#endif
/* readline defines this. */ /* readline defines this. */
#undef savestring #undef savestring