aboutsummaryrefslogtreecommitdiff
path: root/libiberty
diff options
context:
space:
mode:
authorJeffrey A Law <law@cygnus.com>1998-10-13 22:59:40 +0000
committerJeff Law <law@gcc.gnu.org>1998-10-13 16:59:40 -0600
commit73aeb2ff9b05da69dd92ad674608df424252593c (patch)
tree7383fe93eb4c73695e4a18dc994d58d7df6b3456 /libiberty
parentf096ce6675c52621eb6b9a7f802129de3c02f8b2 (diff)
downloadgcc-73aeb2ff9b05da69dd92ad674608df424252593c.zip
gcc-73aeb2ff9b05da69dd92ad674608df424252593c.tar.gz
gcc-73aeb2ff9b05da69dd92ad674608df424252593c.tar.bz2
getopt.c: Check HAVE_STRINGS_H before including 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. From-SVN: r23065
Diffstat (limited to 'libiberty')
-rw-r--r--libiberty/ChangeLog6
-rw-r--r--libiberty/config.in3
-rwxr-xr-xlibiberty/configure2
-rw-r--r--libiberty/configure.in2
-rw-r--r--libiberty/getopt.c4
5 files changed, 14 insertions, 3 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index 77e78b4..73e0dc8 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -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.
diff --git a/libiberty/config.in b/libiberty/config.in
index 4195348..51da798 100644
--- a/libiberty/config.in
+++ b/libiberty/config.in
@@ -181,6 +181,9 @@
/* 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
diff --git a/libiberty/configure b/libiberty/configure
index 6843ccf..52de547 100755
--- a/libiberty/configure
+++ b/libiberty/configure
@@ -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
diff --git a/libiberty/configure.in b/libiberty/configure.in
index 5ce8b60..57b9071 100644
--- a/libiberty/configure.in
+++ b/libiberty/configure.in
@@ -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.
diff --git a/libiberty/getopt.c b/libiberty/getopt.c
index 9207271..c41531e 100644
--- a/libiberty/getopt.c
+++ b/libiberty/getopt.c
@@ -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