This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

libiberty fix installed



This keeps getopt from choking on systems without string. and strings.h.

	* getopt.c: Check HAVE_STRINGS_H before including strings.h.
	* configure.in (AC_CHECK_HEADERS): Check for strings.h too.
	* config.in, configure: Rebuilt.
 
Index: config.in
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/./libiberty/config.in,v
retrieving revision 1.2
diff -c -3 -p -r1.2 config.in
*** config.in	1998/05/21 07:52:40	1.2
--- config.in	1998/10/14 05:58:31
***************
*** 181,186 ****
--- 181,189 ----
  /* Define if you have the <string.h> header file.  */
  #undef HAVE_STRING_H
  
+ /* Define if you have the <strings.h> header file.  */
+ #undef HAVE_STRINGS_H
+ 
  /* Define if you have the <sys/file.h> header file.  */
  #undef HAVE_SYS_FILE_H
  
Index: configure
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/./libiberty/configure,v
retrieving revision 1.4
diff -c -3 -p -r1.4 configure
*** configure	1998/10/08 22:48:51	1.4
--- configure	1998/10/14 05:58:34
*************** else
*** 1027,1033 ****
  fi
  echo "$ac_t""$CPP" 1>&6
  
! for ac_hdr in sys/file.h sys/param.h stdlib.h string.h unistd.h
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
--- 1027,1033 ----
  fi
  echo "$ac_t""$CPP" 1>&6
  
! for ac_hdr in sys/file.h sys/param.h stdlib.h string.h unistd.h strings.h
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Index: configure.in
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/./libiberty/configure.in,v
retrieving revision 1.6
diff -c -3 -p -r1.6 configure.in
*** configure.in	1998/10/08 22:48:52	1.6
--- configure.in	1998/10/14 05:58:34
*************** AC_SUBST_FILE(host_makefile_frag)
*** 106,112 ****
  # It's OK to check for header files.  Although the compiler may not be
  # able to link anything, it had better be able to at least compile
  # something.
! AC_CHECK_HEADERS(sys/file.h sys/param.h stdlib.h string.h unistd.h)
  
  # This is the list of functions which libiberty will provide if they
  # are not available on the host.
--- 106,112 ----
  # It's OK to check for header files.  Although the compiler may not be
  # able to link anything, it had better be able to at least compile
  # something.
! AC_CHECK_HEADERS(sys/file.h sys/param.h stdlib.h string.h unistd.h strings.h)
  
  # This is the list of functions which libiberty will provide if they
  # are not available on the host.
Index: getopt.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/./libiberty/getopt.c,v
retrieving revision 1.4
diff -c -3 -p -r1.4 getopt.c
*** getopt.c	1998/09/05 12:10:24	1.4
--- getopt.c	1998/10/14 05:58:36
*************** static char *posixly_correct;
*** 204,210 ****
  # if HAVE_STRING_H
  #  include <string.h>
  # else
! #  include <strings.h>
  # endif
  
  /* Avoid depending on library functions or files
--- 204,212 ----
  # if HAVE_STRING_H
  #  include <string.h>
  # else
! #  if HAVE_STRINGS_H
! #   include <strings.h>
! #  endif
  # endif
  
  /* Avoid depending on library functions or files


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]