Browse Source

build: remove HAVE_LIMITS_H check

.. because limits.h presence isn't optional, it's required by C89.

Ref: http://port70.net/~nsz/c/c89/c89-draft.html#2.2.4.2

Closes https://github.com/curl/curl/pull/2215
Jay Satiro 6 years ago
parent
commit
908a9a6742

+ 0 - 1
CMakeLists.txt

@@ -737,7 +737,6 @@ check_include_file_concat("ifaddrs.h"        HAVE_IFADDRS_H)
 check_include_file_concat("io.h"             HAVE_IO_H)
 check_include_file_concat("krb.h"            HAVE_KRB_H)
 check_include_file_concat("libgen.h"         HAVE_LIBGEN_H)
-check_include_file_concat("limits.h"         HAVE_LIMITS_H)
 check_include_file_concat("locale.h"         HAVE_LOCALE_H)
 check_include_file_concat("net/if.h"         HAVE_NET_IF_H)
 check_include_file_concat("netdb.h"          HAVE_NETDB_H)

+ 0 - 1
configure.ac

@@ -3359,7 +3359,6 @@ AC_CHECK_HEADERS(
         assert.h \
         unistd.h \
         stdlib.h \
-        limits.h \
         arpa/inet.h \
         net/if.h \
         netinet/in.h \

+ 0 - 1
lib/Makefile.netware

@@ -589,7 +589,6 @@ endif
 	@echo $(DL)#define HAVE_INET_ADDR 1$(DL) >> $@
 	@echo $(DL)#define HAVE_IOCTL 1$(DL) >> $@
 	@echo $(DL)#define HAVE_IOCTL_FIONBIO 1$(DL) >> $@
-	@echo $(DL)#define HAVE_LIMITS_H 1$(DL) >> $@
 	@echo $(DL)#define HAVE_LL 1$(DL) >> $@
 	@echo $(DL)#define HAVE_LOCALE_H 1$(DL) >> $@
 	@echo $(DL)#define HAVE_LOCALTIME_R 1$(DL) >> $@

+ 0 - 2
lib/asyn-ares.c

@@ -30,9 +30,7 @@
 
 #ifdef CURLRES_ARES
 
-#ifdef HAVE_LIMITS_H
 #include <limits.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif

+ 0 - 1
lib/config-dos.h

@@ -53,7 +53,6 @@
 #define HAVE_IOCTL_FIONBIO     1
 #define HAVE_IOCTLSOCKET       1
 #define HAVE_IOCTLSOCKET_FIONBIO   1
-#define HAVE_LIMITS_H          1
 #define HAVE_LOCALE_H          1
 #define HAVE_LONGLONG          1
 #define HAVE_MEMORY_H          1

+ 0 - 3
lib/config-symbian.h

@@ -318,9 +318,6 @@
 /* Define to 1 if you have the `ssl' library (-lssl). */
 /*#define HAVE_LIBSSL 1*/
 
-/* Define to 1 if you have the <limits.h> header file. */
-#define HAVE_LIMITS_H 1
-
 /* if your compiler supports LL */
 #define HAVE_LL 1
 

+ 0 - 3
lib/config-tpf.h

@@ -284,9 +284,6 @@
 /* if zlib is available */
 /* #undef HAVE_LIBZ */
 
-/* Define to 1 if you have the <limits.h> header file. */
-#define HAVE_LIMITS_H 1
-
 /* if your compiler supports LL */
 #define HAVE_LL 1
 

+ 0 - 3
lib/config-vxworks.h

@@ -384,9 +384,6 @@
 /* if zlib is available */
 #define HAVE_LIBZ 1
 
-/* Define to 1 if you have the <limits.h> header file. */
-#define HAVE_LIMITS_H 1
-
 /* if your compiler supports LL */
 #define HAVE_LL 1
 

+ 0 - 3
lib/config-win32.h

@@ -61,9 +61,6 @@
 /* Define if you have the <io.h> header file. */
 #define HAVE_IO_H 1
 
-/* Define if you have the <limits.h> header file. */
-#define HAVE_LIMITS_H 1
-
 /* Define if you have the <locale.h> header file. */
 #define HAVE_LOCALE_H 1
 

+ 0 - 3
lib/config-win32ce.h

@@ -54,9 +54,6 @@
 /* Define if you have the <io.h> header file.  */
 #define HAVE_IO_H 1
 
-/* Define if you have the <limits.h> header file.  */
-#define HAVE_LIMITS_H 1
-
 /* Define if you need the malloc.h header header file even with stdlib.h  */
 #define NEED_MALLOC_H 1
 

+ 0 - 3
lib/curl_config.h.cmake

@@ -398,9 +398,6 @@
 /* if zlib is available */
 #cmakedefine HAVE_LIBZ 1
 
-/* Define to 1 if you have the <limits.h> header file. */
-#cmakedefine HAVE_LIMITS_H 1
-
 /* if your compiler supports LL */
 #cmakedefine HAVE_LL 1
 

+ 0 - 2
lib/parsedate.c

@@ -75,9 +75,7 @@
 
 #include "curl_setup.h"
 
-#ifdef HAVE_LIMITS_H
 #include <limits.h>
-#endif
 
 #include <curl/curl.h>
 #include "strcase.h"

+ 0 - 2
lib/security.c

@@ -50,9 +50,7 @@
 #include <netdb.h>
 #endif
 
-#ifdef HAVE_LIMITS_H
 #include <limits.h>
-#endif
 
 #include "urldata.h"
 #include "curl_base64.h"

+ 0 - 2
lib/setopt.c

@@ -22,9 +22,7 @@
 
 #include "curl_setup.h"
 
-#ifdef HAVE_LIMITS_H
 #include <limits.h>
-#endif
 
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>

+ 0 - 2
lib/ssh-libssh.c

@@ -27,9 +27,7 @@
 
 #ifdef USE_LIBSSH
 
-#ifdef HAVE_LIMITS_H
 #include <limits.h>
-#endif
 
 #include <libssh/libssh.h>
 #include <libssh/sftp.h>

+ 1 - 3
lib/ssh.c

@@ -26,9 +26,7 @@
 
 #ifdef USE_LIBSSH2
 
-#ifdef HAVE_LIMITS_H
-#  include <limits.h>
-#endif
+#include <limits.h>
 
 #include <libssh2.h>
 #include <libssh2_sftp.h>

+ 0 - 2
lib/url.c

@@ -55,9 +55,7 @@
 #error "We can't compile without socket() support!"
 #endif
 
-#ifdef HAVE_LIMITS_H
 #include <limits.h>
-#endif
 
 #ifdef USE_LIBIDN2
 #include <idn2.h>

+ 0 - 2
lib/vtls/cyassl.c

@@ -76,9 +76,7 @@ and that's a problem since options.h hasn't been included yet. */
 #endif
 #endif
 
-#ifdef HAVE_LIMITS_H
 #include <limits.h>
-#endif
 
 #include "urldata.h"
 #include "sendf.h"

+ 0 - 2
lib/vtls/darwinssl.c

@@ -39,9 +39,7 @@
 #pragma clang diagnostic ignored "-Wtautological-pointer-compare"
 #endif /* __clang__ */
 
-#ifdef HAVE_LIMITS_H
 #include <limits.h>
-#endif
 
 #include <Security/Security.h>
 /* For some reason, when building for iOS, the omnibus header above does

+ 1 - 3
lib/vtls/gskit.c

@@ -61,9 +61,7 @@
 #endif
 
 
-#ifdef HAVE_LIMITS_H
-#  include <limits.h>
-#endif
+#include <limits.h>
 
 #include <curl/curl.h>
 #include "urldata.h"

+ 0 - 2
lib/vtls/openssl.c

@@ -34,9 +34,7 @@
 
 #ifdef USE_OPENSSL
 
-#ifdef HAVE_LIMITS_H
 #include <limits.h>
-#endif
 
 #include "urldata.h"
 #include "sendf.h"

+ 0 - 2
tests/libtest/lib1502.c

@@ -29,9 +29,7 @@
 
 #include "test.h"
 
-#ifdef HAVE_LIMITS_H
 #include <limits.h>
-#endif
 
 #include "testutil.h"
 #include "warnless.h"

+ 0 - 2
tests/libtest/lib518.c

@@ -27,9 +27,7 @@
 #ifdef HAVE_FCNTL_H
 #include <fcntl.h>
 #endif
-#ifdef HAVE_LIMITS_H
 #include <limits.h>
-#endif
 
 #include "warnless.h"
 #include "memdebug.h"

+ 0 - 2
tests/libtest/lib537.c

@@ -27,9 +27,7 @@
 #ifdef HAVE_FCNTL_H
 #include <fcntl.h>
 #endif
-#ifdef HAVE_LIMITS_H
 #include <limits.h>
-#endif
 
 #include "warnless.h"
 #include "memdebug.h"

+ 0 - 2
tests/libtest/lib540.c

@@ -30,9 +30,7 @@
 
 #include "test.h"
 
-#ifdef HAVE_LIMITS_H
 #include <limits.h>
-#endif
 
 #include "testutil.h"
 #include "warnless.h"

+ 0 - 2
tests/libtest/lib557.c

@@ -27,9 +27,7 @@
 
 #include "test.h"
 
-#ifdef HAVE_LIMITS_H
 #include <limits.h>
-#endif
 
 #ifdef HAVE_LOCALE_H
 #  include <locale.h> /* for setlocale() */

+ 0 - 2
tests/libtest/lib591.c

@@ -23,9 +23,7 @@
 
 /* lib591 is used for test cases 591, 592, 593 and 594 */
 
-#ifdef HAVE_LIMITS_H
 #include <limits.h>
-#endif
 
 #include <fcntl.h>
 

+ 0 - 2
tests/libtest/lib597.c

@@ -21,9 +21,7 @@
  ***************************************************************************/
 #include "test.h"
 
-#ifdef HAVE_LIMITS_H
 #include <limits.h>
-#endif
 
 #include "testutil.h"
 #include "warnless.h"

+ 0 - 2
tests/libtest/libntlmconnect.c

@@ -21,9 +21,7 @@
  ***************************************************************************/
 #include "test.h"
 
-#ifdef HAVE_LIMITS_H
 #include <limits.h>
-#endif
 #include <assert.h>
 
 #include "testutil.h"