aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Sokolov <msokolov@ivan.Harhan.ORG>2000-07-23 19:13:46 +0000
committerJeff Law <law@gcc.gnu.org>2000-07-23 13:13:46 -0600
commitcd44736010929b5e06f932279960a16165c59449 (patch)
tree64868a9a44b9667e36f20169a0e9c39e713a113e
parent0fac482ed6eba252d1b1753f48a49da7fa9175cc (diff)
downloadgcc-cd44736010929b5e06f932279960a16165c59449.zip
gcc-cd44736010929b5e06f932279960a16165c59449.tar.gz
gcc-cd44736010929b5e06f932279960a16165c59449.tar.bz2
configure.in (AC_CHECK_HEADERS): Add limits.h.
* configure.in (AC_CHECK_HEADERS): Add limits.h. * configure, config.in: Regenerate. * sort.c: Portably #include <limits.h> and/or <sys/param.h>. * strtol.c, strtoul.c: #include "config.h". Portably #include <limits.h> and/or <sys/param.h>. * Makefile.in (strtol.o, strtoul.o): Update dependencies. Co-Authored-By: Jeffrey A Law <law@cygnus.com> From-SVN: r35211
-rw-r--r--libiberty/ChangeLog8
-rw-r--r--libiberty/Makefile.in2
-rw-r--r--libiberty/config.in3
-rwxr-xr-xlibiberty/configure2
-rw-r--r--libiberty/configure.in2
-rw-r--r--libiberty/sort.c5
-rw-r--r--libiberty/strtol.c8
-rw-r--r--libiberty/strtoul.c8
8 files changed, 36 insertions, 2 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index feee642..da6798c 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -5,6 +5,14 @@
(demangle_array_type): Handle empty and non-constant array length.
2000-07-23 Michael Sokolov <msokolov@ivan.Harhan.ORG>
+ Jeff Law <law@cygnus.com>
+
+ * configure.in (AC_CHECK_HEADERS): Add limits.h.
+ * configure, config.in: Regenerate.
+ * sort.c: Portably #include <limits.h> and/or <sys/param.h>.
+ * strtol.c, strtoul.c: #include "config.h". Portably #include
+ <limits.h> and/or <sys/param.h>.
+ * Makefile.in (strtol.o, strtoul.o): Update dependencies.
* aclocal.m4 (libiberty_AC_DECLARE_ERRNO): New macro.
* configure.in (libiberty_AC_DECLARE_ERRNO): Add check.
diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in
index 1926bad..68aba71 100644
--- a/libiberty/Makefile.in
+++ b/libiberty/Makefile.in
@@ -286,6 +286,8 @@ spaces.o: $(INCDIR)/libiberty.h
splay-tree.o: config.h $(INCDIR)/libiberty.h $(INCDIR)/splay-tree.h $(INCDIR)/ansidecl.h
strerror.o: config.h $(INCDIR)/libiberty.h
strsignal.o: config.h $(INCDIR)/libiberty.h
+strtol.o: config.h
+strtoul.o: config.h
vasprintf.o: config.h
xatexit.o: $(INCDIR)/libiberty.h
xexit.o: config.h $(INCDIR)/libiberty.h
diff --git a/libiberty/config.in b/libiberty/config.in
index f9895c7..ca4a90a 100644
--- a/libiberty/config.in
+++ b/libiberty/config.in
@@ -202,6 +202,9 @@
/* Define if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
+/* Define if you have the <limits.h> header file. */
+#undef HAVE_LIMITS_H
+
/* Define if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
diff --git a/libiberty/configure b/libiberty/configure
index 168bd8f..78ab2f5 100755
--- a/libiberty/configure
+++ b/libiberty/configure
@@ -1058,7 +1058,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 strings.h sys/time.h sys/resource.h sys/stat.h sys/mman.h fcntl.h
+for ac_hdr in sys/file.h sys/param.h limits.h stdlib.h string.h unistd.h strings.h sys/time.h sys/resource.h sys/stat.h sys/mman.h fcntl.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 ecae1b1..63aa9e0 100644
--- a/libiberty/configure.in
+++ b/libiberty/configure.in
@@ -109,7 +109,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 strings.h sys/time.h sys/resource.h sys/stat.h sys/mman.h fcntl.h)
+AC_CHECK_HEADERS(sys/file.h sys/param.h limits.h stdlib.h string.h unistd.h strings.h sys/time.h sys/resource.h sys/stat.h sys/mman.h fcntl.h)
AC_HEADER_SYS_WAIT
libiberty_AC_DECLARE_ERRNO
diff --git a/libiberty/sort.c b/libiberty/sort.c
index da2d660..90c97e0 100644
--- a/libiberty/sort.c
+++ b/libiberty/sort.c
@@ -24,7 +24,12 @@ Boston, MA 02111-1307, USA. */
#endif
#include "libiberty.h"
#include "sort.h"
+#ifdef HAVE_LIMITS_H
#include <limits.h>
+#endif
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
diff --git a/libiberty/strtol.c b/libiberty/strtol.c
index b4c66c4..c05d0dd 100644
--- a/libiberty/strtol.c
+++ b/libiberty/strtol.c
@@ -28,7 +28,15 @@
* SUCH DAMAGE.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+#ifdef HAVE_LIMITS_H
#include <limits.h>
+#endif
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
#include <ctype.h>
#include <errno.h>
#ifdef NEED_DECLARATION_ERRNO
diff --git a/libiberty/strtoul.c b/libiberty/strtoul.c
index 59d428c..87fa3ff 100644
--- a/libiberty/strtoul.c
+++ b/libiberty/strtoul.c
@@ -28,7 +28,15 @@
* SUCH DAMAGE.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+#ifdef HAVE_LIMITS_H
#include <limits.h>
+#endif
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
#include <ctype.h>
#include <errno.h>
#ifdef NEED_DECLARATION_ERRNO