gcc-2.95 NEED_DECLARATION_STRSTR

Jeffrey A Law law@cygnus.com
Wed Jun 30 23:15:00 GMT 1999


It looks like you've got two unrelated changes in this message.  Note the
libiberty changes at the end of your patch.

I believe the strstr stuff is probably OK and that inclusion of the libiberty
code was a mistake.  Can you confirm?

Thanks,
jeff


  In message < 199906060050.CAA02100@mail.macqel.be >you write:
  > 
  > Sun Jun  6 02:34:57 1999  Philippe De Muyter  <phdm@macqel.be>
  > 
  > 	* system.h (strstr): New external function declaration.
  > 	* acconfig.h (NEED_DECLARATION_STRSTR): New define slot.
  > 	* configure.in (GCC_NEED_DECLARATIONS): Check for strstr.
  > 
  > --- ./gcc/system.h	Sun Jun  6 02:33:53 1999
  > +++ ./gcc/system.h	Sun Jun  6 01:56:20 1999
  > @@ -330,6 +330,10 @@
  >  extern char *sbrk ();
  >  #endif
  >  
  > +#ifdef NEED_DECLARATION_STRSTR
  > +extern char *strstr ();
  > +#endif
  > +
  >  #ifdef HAVE_STRERROR
  >  # ifdef NEED_DECLARATION_STRERROR
  >  #  ifndef strerror
  > --- ./gcc/acconfig.h	Sun Jun  6 02:33:55 1999
  > +++ ./gcc/acconfig.h	Sun Jun  6 01:57:39 1999
  > @@ -93,6 +93,9 @@
  >  /* Whether strsignal must be declared even if <string.h> is included.  */
  >  #undef NEED_DECLARATION_STRSIGNAL
  >  
  > +/* Whether strstr must be declared even if <string.h> is included.  */
  > +#undef NEED_DECLARATION_STRSTR
  > +
  >  /* Whether getcwd must be declared even if <unistd.h> is included.  */
  >  #undef NEED_DECLARATION_GETCWD
  >  
  > ./gcc/configure.in
  > --- ./gcc/configure.in	Sun Jun  6 02:33:56 1999
  > +++ ./gcc/configure.in	Sun Jun  6 02:04:58 1999
  > @@ -406,7 +406,7 @@ AC_MSG_CHECKING(whether cpp understands 
  >  
  >  GCC_NEED_DECLARATIONS(malloc realloc calloc free bcopy bzero bcmp \
  >  	index rindex getenv atol sbrk abort atof strerror getcwd getwd \
  > -	strsignal putc_unlocked fputs_unlocked)
  > +	strsignal putc_unlocked fputs_unlocked strstr)
  >  
  >  GCC_NEED_DECLARATIONS(getrlimit setrlimit, [
  >  #include <sys/types.h>
  > ./libiberty/xstrdup.c
  > --- ./libiberty/xstrdup.c	Sun Jun  6 02:33:57 1999
  > +++ ./libiberty/xstrdup.c	Fri Jun  4 18:38:32 1999
  > @@ -5,6 +5,7 @@
  >  #ifdef HAVE_CONFIG_H
  >  #include "config.h"
  >  #endif
  > +#include <sys/types.h>
  >  #ifdef HAVE_STRING_H
  >  #include <string.h>
  >  #endif
  > ./libiberty/setenv.c
  > --- ./libiberty/setenv.c	Sun Jun  6 02:33:57 1999
  > +++ ./libiberty/setenv.c	Fri Jun  4 19:19:22 1999
  > @@ -30,6 +30,10 @@
  >  
  >  #if HAVE_STDLIB_H
  >  # include <stdlib.h>
  > +#else
  > +#include <sys/types.h>	/* For `size_t' */
  > +#include <stdio.h>	/* For `NULL' */
  > +char * malloc ();
  >  #endif
  >  #if HAVE_STRING_H
  >  # include <string.h>
  > 




More information about the Gcc-patches mailing list