aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>2000-07-23 19:13:46 +0000
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>2000-07-23 19:13:46 +0000
commita451eef0cb4c54cbe5ec2d32f7cb773e999d564d (patch)
tree64868a9a44b9667e36f20169a0e9c39e713a113e
parent65bcf503de49123432d4f9ff8344af729b738bb5 (diff)
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35211 138bc75d-0d04-0410-961f-82ee72b054a4
-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 feee6424513..da6798c48e7 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 1926bad7e64..68aba712032 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 f9895c7c57a..ca4a90a4c0e 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 168bd8fc7a5..78ab2f56ed8 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 ecae1b1b63b..63aa9e07b4d 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 da2d660b6f5..90c97e04e07 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 b4c66c403f7..c05d0dd76a2 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 59d428cd49e..87fa3ffdf93 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