getopt.c: Check HAVE_STRINGS_H before including strings.h.
authorJeffrey A Law <law@cygnus.com>
Tue, 13 Oct 1998 22:59:40 +0000 (22:59 +0000)
committerJeff Law <law@gcc.gnu.org>
Tue, 13 Oct 1998 22:59:40 +0000 (16:59 -0600)
        * getopt.c: Check HAVE_STRINGS_H before including strings.h.
        * configure.in (AC_CHECK_HEADERS): Check for strings.h too.
        * config.in, configure: Rebuilt.

From-SVN: r23065

libiberty/ChangeLog
libiberty/config.in
libiberty/configure
libiberty/configure.in
libiberty/getopt.c

index 77e78b4c9e9814fb5840b0cdbc5391a3596b860f..73e0dc8f2811656e0fa682256e886c24e9cc31b8 100644 (file)
@@ -1,3 +1,9 @@
+Tue Oct 13 23:51:51 1998  Jeffrey A Law  (law@cygnus.com)
+
+       * getopt.c: Check HAVE_STRINGS_H before including strings.h.
+       * configure.in (AC_CHECK_HEADERS): Check for strings.h too.
+       * config.in, configure: Rebuilt.
+
 Sun Oct 11 17:36:06 1998  Michael Tiemann  <tiemann@holodeck.cygnus.com>
 
        * Makefile.in (cplus-dem.o, obstack.o): Depend upon config.h.
index 4195348d537ca6f4b28072be45cf52013e328c83..51da79847498293ca14042ffb0c07a6b24c00cbb 100644 (file)
 /* 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 6843ccf0366a6384a371f5406b1ac98a55adc9e4..52de547b8c5c9e97162ef4858fe68c08b26df576 100755 (executable)
@@ -1027,7 +1027,7 @@ else
 fi
 echo "$ac_t""$CPP" 1>&6
 
-for ac_hdr in sys/file.h sys/param.h stdlib.h string.h unistd.h
+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 5ce8b609aad84a70333a56a91cb11873cb49e11f..57b9071f25bb48787e7368080797648e71d7e64b 100644 (file)
@@ -106,7 +106,7 @@ AC_SUBST_FILE(host_makefile_frag)
 # 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)
+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 920727114151683d8663aa49a7e3e5a76ad1ce40..c41531e667d8abfb07c8336506ed70c17ac6fd84 100644 (file)
@@ -204,7 +204,9 @@ static char *posixly_correct;
 # if HAVE_STRING_H
 #  include <string.h>
 # else
-#  include <strings.h>
+#  if HAVE_STRINGS_H
+#   include <strings.h>
+#  endif
 # endif
 
 /* Avoid depending on library functions or files