This is the mail archive of the gdb-patches@sourceware.cygnus.com mailing list for the GDB project. See the GDB home page for more information.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
This is a fix for the only warning I get when compiling gdb-4.16.98 with gcc on m68k-motorola-sysv. The warning messages are at the end of this mail. Do'nt forget to regenerate configure and config.in. Wed Apr 22 03:35:28 1998 Philippe De Muyter <phdm@macqel.be> * configure.in (strerror): Check if function must be declared. * acconfig.h (NEED_DECLARATION_STRERROR): New define slot. * gdb_string.h (strerror): Function declaration issued if NEED_DECLARATION_STRERROR. * configure, config.in : Files regenerated. --- ./gdb/gdb_string.h Wed Apr 22 03:32:52 1998 +++ ./gdb/gdb_string.h Wed Apr 22 02:29:35 1998 @@ -45,10 +45,6 @@ extern char *strtok PARAMS ((char *, const char *)); /* X3.159-1989 4.11.5.8 */ #endif -#ifndef strerror -extern char *strerror PARAMS ((int)); /* X3.159-1989 4.11.6.2 */ -#endif - # ifdef HAVE_MEMORY_H # include <memory.h> # else @@ -57,6 +53,12 @@ extern void *memmove(); extern int memcmp(); # endif +#endif /* STDC_HEADERS */ + +#ifdef NEED_DECLARATION_STRERROR +#ifndef strerror +extern char *strerror PARAMS ((int)); /* X3.159-1989 4.11.6.2 */ +#endif #endif #ifndef strdup --- ./gdb/configure.in Wed Apr 22 03:32:53 1998 +++ ./gdb/configure.in Wed Apr 22 02:28:35 1998 @@ -195,6 +195,8 @@ BFD_NEED_DECLARATION(malloc) BFD_NEED_DECLARATION(realloc) BFD_NEED_DECLARATION(free) +BFD_NEED_DECLARATION(strerror) + dnl See if thread_db library is around for Solaris thread debugging. Note that dnl we must explicitly test for version 1 of the library because version 0 dnl (present on Solaris 2.4 or earlier) doesn't have the same API. --- ./gdb/acconfig.h Wed Apr 22 03:32:54 1998 +++ ./gdb/acconfig.h Wed Apr 22 02:39:58 1998 @@ -7,6 +7,9 @@ /* Whether free must be declared even if <stdlib.h> is included. */ #undef NEED_DECLARATION_FREE + +/* Whether strerror must be declared even if <string.h> is included. */ +#undef NEED_DECLARATION_STRERROR @TOP@ /* Define if fpregset_t type is available. */ gdb/utils.c: In function `safe_strerror': gdb/utils.c:499: warning: assignment makes pointer from integer without a cast