gdb : strstr prototype

Philippe De Muyter
1999-04-13T16:29:00Z

Wed Apr 14 01:18:37 1999 Philippe De Muyter <phdm@macqel.be>

* configure.in (BFD_NEED_DECLARATION): Check also for strstr.
* acconfig.h (NEED_DECLARATION_MALLOC): Define slot removed; it is
now generated automatically.
(NEED_DECLARATION_REALLOC, NEED_DECLARATION_FREE): Ditto.
(NEED_DECLARATION_STRERROR): Ditto.
* gdb_string.h (strstr): Provide function prototype if
NEED_DECLARATION_STRSTR.

--- ./gdb/acconfig.h Wed Apr 14 01:21:58 1999
+++ ./gdb/acconfig.h Tue Apr 13 20:02:59 1999
@@ -1,15 +1,3 @@
-
-/* Whether malloc must be declared even if <stdlib.h> is included. */
-#undef NEED_DECLARATION_MALLOC
-
-/* Whether realloc must be declared even if <stdlib.h> is included. */
-#undef NEED_DECLARATION_REALLOC
-
-/* 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 pstatus_t type is available */
--- ./gdb/gdb_string.h Wed Apr 14 01:21:59 1999
+++ ./gdb/gdb_string.h Tue Apr 13 19:50:02 1999
@@ -37,10 +37,6 @@
extern char *strrchr PARAMS ((const char *, int)); /* X3.159-1989 4.11.5.5 */
#endif

-#ifndef strstr
-extern char *strstr PARAMS ((const char *, const char *)); /* X3.159-1989 4.11.5.7 */
-#endif
-
#ifndef strtok
extern char *strtok PARAMS ((char *, const char *)); /* X3.159-1989 4.11.5.8 */
#endif
@@ -63,6 +59,12 @@

#ifdef NEED_DECLARATION_STRDUP
extern char *strdup (); /* full prototype collides w/ some OSes (AIX 3.2.5) */
+#endif
+
+#ifdef NEED_DECLARATION_STRSTR
+#ifndef strstr
+extern char *strstr PARAMS ((const char *, const char *)); /* X3.159-1989 4.11.5.7 */
+#endif
#endif

#endif /* !defined(GDB_STRING_H) */
--- ./gdb/configure.in Wed Apr 14 01:21:59 1999
+++ ./gdb/configure.in Tue Apr 13 19:52:09 1999
@@ -82,6 +82,7 @@ BFD_NEED_DECLARATION(realloc)
BFD_NEED_DECLARATION(free)
BFD_NEED_DECLARATION(strerror)
BFD_NEED_DECLARATION(strdup)
+BFD_NEED_DECLARATION(strstr)

# The following save_state_t checkery is only necessary for HPUX