From cba5771c0cf08a4c2c2d9ad76eba270be3635eae Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Fri, 19 Mar 2021 14:30:54 +0100 Subject: [PATCH] [limits.h] limits.h can be included uncoditionally --- config2.h.in | 3 --- meson.build | 1 - src/intl/gettext/dcigettext.c | 2 -- src/intl/gettext/gettext.h | 2 -- src/network/ssl/ssl.c | 2 -- src/osdep/generic.h | 2 -- src/osdep/types.h | 2 -- src/protocol/http/http.c | 2 -- src/util/conv.c | 2 -- 9 files changed, 18 deletions(-) diff --git a/config2.h.in b/config2.h.in index 1e793ac7..707af844 100644 --- a/config2.h.in +++ b/config2.h.in @@ -512,9 +512,6 @@ /* Define to 1 if you have the `socket' library (-lsocket). */ #mesondefine HAVE_LIBSOCKET -/* Define to 1 if you have the header file. */ -#mesondefine HAVE_LIMITS_H - /* Define to 1 if you have the header file. */ #mesondefine HAVE_LOCALE_H diff --git a/meson.build b/meson.build index bb9330d2..b9cf5043 100644 --- a/meson.build +++ b/meson.build @@ -165,7 +165,6 @@ endif conf_data.set10('HAVE_WCHAR_H', compiler.has_header('wchar.h')) conf_data.set10('HAVE_WCTYPE_H', compiler.has_header('wctype.h')) conf_data.set10('HAVE_FCNTL_H', compiler.has_header('fcntl.h')) -conf_data.set10('HAVE_LIMITS_H', compiler.has_header('limits.h')) conf_data.set10('HAVE_UNISTD_H', compiler.has_header('unistd.h')) conf_data.set10('HAVE_SIGACTION_H', compiler.has_header('sigaction.h')) conf_data.set10('HAVE_ARPA_INET_H', compiler.has_header('arpa/inet.h')) diff --git a/src/intl/gettext/dcigettext.c b/src/intl/gettext/dcigettext.c index 8d0d0056..112bf505 100644 --- a/src/intl/gettext/dcigettext.c +++ b/src/intl/gettext/dcigettext.c @@ -77,9 +77,7 @@ extern int errno; /* Non-POSIX BSD systems might have gcc's limits.h, which doesn't define PATH_MAX but might cause redefinition warnings when sys/param.h is later included (as on MORE/BSD 4.3). */ -#if defined _POSIX_VERSION || defined HAVE_LIMITS_H #include -#endif #ifndef _POSIX_PATH_MAX #define _POSIX_PATH_MAX 255 diff --git a/src/intl/gettext/gettext.h b/src/intl/gettext/gettext.h index 7ab6ba44..6bbd0c1e 100644 --- a/src/intl/gettext/gettext.h +++ b/src/intl/gettext/gettext.h @@ -18,9 +18,7 @@ #ifndef _GETTEXT_H #define _GETTEXT_H 1 -#ifdef HAVE_LIMITS_H #include -#endif #ifdef __cplusplus extern "C" { diff --git a/src/network/ssl/ssl.c b/src/network/ssl/ssl.c index 1938fe5d..b0ac4bbd 100644 --- a/src/network/ssl/ssl.c +++ b/src/network/ssl/ssl.c @@ -19,9 +19,7 @@ #error "Huh?! You have SSL enabled, but not OPENSSL nor GNUTLS!! And then you want exactly *what* from me?" #endif -#ifdef HAVE_LIMITS_H #include -#endif #include "elinks.h" diff --git a/src/osdep/generic.h b/src/osdep/generic.h index c044b3bd..a61bac06 100644 --- a/src/osdep/generic.h +++ b/src/osdep/generic.h @@ -7,9 +7,7 @@ #include #endif -#ifdef HAVE_LIMITS_H #include /* may contain PIPE_BUF definition on some systems */ -#endif #ifdef HAVE_STDDEF_H #include /* may contain offsetof() */ diff --git a/src/osdep/types.h b/src/osdep/types.h index f1c42f83..b8feb5d6 100644 --- a/src/osdep/types.h +++ b/src/osdep/types.h @@ -9,9 +9,7 @@ #include #endif -#ifdef HAVE_LIMITS_H #include -#endif #ifdef HAVE_STDINT_H #include diff --git a/src/protocol/http/http.c b/src/protocol/http/http.c index 761dd22c..5f0efe00 100644 --- a/src/protocol/http/http.c +++ b/src/protocol/http/http.c @@ -8,9 +8,7 @@ #include #include #include -#ifdef HAVE_LIMITS_H #include -#endif #include "elinks.h" diff --git a/src/util/conv.c b/src/util/conv.c index 87e50fd7..144706d3 100644 --- a/src/util/conv.c +++ b/src/util/conv.c @@ -7,9 +7,7 @@ #include #include -#ifdef HAVE_LIMITS_H #include -#endif #include #include