diff options
author | Guy Harris <guy@alum.mit.edu> | 2018-09-09 20:36:27 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2018-09-09 20:36:27 -0700 |
commit | 3a57e7d0d3be1b223d8014b16d4dfaac283c4d6f (patch) | |
tree | 51b147f8ada564371f99c01cb9aa5659c1c44a8f | |
parent | f33291aa9b1510944af6c1861d67c4138f8fe883 (diff) |
Assume we have limits.h.
It's in C90 (and I think it was in C89); if you don't have it, you have
an environment that's too old, especially given that we require a
C99-capable compiler on UN*X.
-rw-r--r-- | CMakeLists.txt | 1 | ||||
-rw-r--r-- | cmakeconfig.h.in | 3 | ||||
-rw-r--r-- | config.h.in | 3 | ||||
-rwxr-xr-x | configure | 2 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | fad-gifc.c | 5 | ||||
-rw-r--r-- | pcap-dlpi.c | 5 | ||||
-rw-r--r-- | pcap.c | 4 | ||||
-rw-r--r-- | sockutils.c | 6 |
9 files changed, 3 insertions, 28 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 63a8e499..95a0f88a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -358,7 +358,6 @@ if(NOT WIN32) check_include_file(sys/sockio.h HAVE_SYS_SOCKIO_H) check_include_file(sys/select.h HAVE_SYS_SELECT_H) endif(NOT WIN32) -check_include_file(limits.h HAVE_LIMITS_H) if(NOT WIN32) check_include_file(netpacket/packet.h HAVE_NETPACKET_PACKET_H) check_include_files("sys/types.h;sys/socket.h;net/if.h;net/pfvar.h" HAVE_NET_PFVAR_H) diff --git a/cmakeconfig.h.in b/cmakeconfig.h.in index 0d8c500d..a173cce5 100644 --- a/cmakeconfig.h.in +++ b/cmakeconfig.h.in @@ -75,9 +75,6 @@ /* libnl has new-style socket api */ #cmakedefine HAVE_LIBNL_SOCKETS 1 -/* Define to 1 if you have the <limits.h> header file. */ -#cmakedefine HAVE_LIMITS_H 1 - /* Define to 1 if you have the <linux/compiler.h> header file. */ #cmakedefine HAVE_LINUX_COMPILER_H 1 diff --git a/config.h.in b/config.h.in index eb40b28b..adc6edc7 100644 --- a/config.h.in +++ b/config.h.in @@ -84,9 +84,6 @@ /* libnl has new-style socket api */ #undef HAVE_LIBNL_SOCKETS -/* Define to 1 if you have the <limits.h> header file. */ -#undef HAVE_LIMITS_H - /* Define to 1 if you have the <linux/compiler.h> header file. */ #undef HAVE_LINUX_COMPILER_H @@ -4854,7 +4854,7 @@ fi done -for ac_header in sys/ioccom.h sys/sockio.h limits.h +for ac_header in sys/ioccom.h sys/sockio.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" diff --git a/configure.ac b/configure.ac index bb5abd6e..ad55305e 100644 --- a/configure.ac +++ b/configure.ac @@ -47,7 +47,7 @@ dnl in "aclocal.m4" uses it, so we would still have to test for it dnl and set "HAVE_SYS_IOCCOM_H" if we have it, otherwise dnl "AC_LBL_FIXINCLUDES" wouldn't work on some platforms such as Solaris. dnl -AC_CHECK_HEADERS(sys/ioccom.h sys/sockio.h limits.h) +AC_CHECK_HEADERS(sys/ioccom.h sys/sockio.h) AC_CHECK_HEADERS(netpacket/packet.h) AC_CHECK_HEADERS(net/pfvar.h, , , [#include <sys/types.h> #include <sys/socket.h> @@ -56,12 +56,7 @@ struct rtentry; /* declarations in <net/if.h> */ #include <stdlib.h> #include <string.h> #include <unistd.h> - -#ifdef HAVE_LIMITS_H #include <limits.h> -#else -#define INT_MAX 2147483647 -#endif #include "pcap-int.h" diff --git a/pcap-dlpi.c b/pcap-dlpi.c index 430051e8..09cb6d44 100644 --- a/pcap-dlpi.c +++ b/pcap-dlpi.c @@ -108,12 +108,7 @@ #include <string.h> #include <stropts.h> #include <unistd.h> - -#ifdef HAVE_LIMITS_H #include <limits.h> -#else -#define INT_MAX 2147483647 -#endif #include "pcap-int.h" #include "dlpisubs.h" @@ -62,11 +62,7 @@ struct rtentry; /* declarations in <net/if.h> */ #endif #include <fcntl.h> #include <errno.h> -#ifdef HAVE_LIMITS_H #include <limits.h> -#else -#define INT_MAX 2147483647 -#endif #ifdef HAVE_OS_PROTO_H #include "os-proto.h" diff --git a/sockutils.c b/sockutils.c index ef3fe764..e01bd967 100644 --- a/sockutils.c +++ b/sockutils.c @@ -56,11 +56,7 @@ #include <errno.h> /* for the errno variable */ #include <stdio.h> /* for the stderr file */ #include <stdlib.h> /* for malloc() and free() */ -#ifdef HAVE_LIMITS_H -#include <limits.h> -#else -#define INT_MAX 2147483647 -#endif +#include <limits.h> /* for INT_MAX */ #include "pcap-int.h" |