summaryrefslogtreecommitdiff
path: root/libiberty
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1998-10-13 22:59:40 +0000
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1998-10-13 22:59:40 +0000
commit5dfe2c03cd9b3caa8ab8405bdf6ce652e47ae0a4 (patch)
tree7383fe93eb4c73695e4a18dc994d58d7df6b3456 /libiberty
parent9bf67ab7403e2c9858fb06da170f06a5c094c0ce (diff)
downloadgcc-5dfe2c03cd9b3caa8ab8405bdf6ce652e47ae0a4.tar.gz
* getopt.c: Check HAVE_STRINGS_H before including strings.h.
* configure.in (AC_CHECK_HEADERS): Check for strings.h too. * config.in, configure: Rebuilt. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@23065 138bc75d-0d04-0410-961f-82ee72b054a4
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 77e78b4c9e9..73e0dc8f281 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 4195348d537..51da7984749 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 6843ccf0366..52de547b8c5 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 5ce8b609aad..57b9071f25b 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 92072711415..c41531e667d 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