From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Philippe De Muyter" To: gdb-patches@cygnus.com (gdb-patches@cygnus.com) Subject: gdb : strstr prototype Date: Tue, 13 Apr 1999 16:29:00 -0000 Message-ID: <199904132328.BAA06720@mail.macqel.be> X-SW-Source: 1999-q2/msg00021.html Message-ID: <19990413162900.afQ7s05kV45NqE5tNA_vCTgCmwC27X0bc3Jc6vYE7ac@z> Wed Apr 14 01:18:37 1999 Philippe De Muyter * 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 is included. */ -#undef NEED_DECLARATION_MALLOC - -/* Whether realloc must be declared even if is included. */ -#undef NEED_DECLARATION_REALLOC - -/* Whether free must be declared even if is included. */ -#undef NEED_DECLARATION_FREE - -/* Whether strerror must be declared even if 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