From cd44736010929b5e06f932279960a16165c59449 Mon Sep 17 00:00:00 2001 From: Michael Sokolov Date: Sun, 23 Jul 2000 19:13:46 +0000 Subject: configure.in (AC_CHECK_HEADERS): Add limits.h. * configure.in (AC_CHECK_HEADERS): Add limits.h. * configure, config.in: Regenerate. * sort.c: Portably #include and/or . * strtol.c, strtoul.c: #include "config.h". Portably #include and/or . * Makefile.in (strtol.o, strtoul.o): Update dependencies. Co-Authored-By: Jeffrey A Law From-SVN: r35211 --- libiberty/ChangeLog | 8 ++++++++ libiberty/Makefile.in | 2 ++ libiberty/config.in | 3 +++ libiberty/configure | 2 +- libiberty/configure.in | 2 +- libiberty/sort.c | 5 +++++ libiberty/strtol.c | 8 ++++++++ libiberty/strtoul.c | 8 ++++++++ 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 + Jeff Law + + * configure.in (AC_CHECK_HEADERS): Add limits.h. + * configure, config.in: Regenerate. + * sort.c: Portably #include and/or . + * strtol.c, strtoul.c: #include "config.h". Portably #include + and/or . + * 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 header file. */ #undef HAVE_FCNTL_H +/* Define if you have the header file. */ +#undef HAVE_LIMITS_H + /* Define if you have the 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 +#endif +#ifdef HAVE_SYS_PARAM_H +#include +#endif #ifdef HAVE_STDLIB_H #include #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 +#endif +#ifdef HAVE_SYS_PARAM_H +#include +#endif #include #include #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 +#endif +#ifdef HAVE_SYS_PARAM_H +#include +#endif #include #include #ifdef NEED_DECLARATION_ERRNO -- cgit v1.1