diff options
author | Peter Kokot <peterkokot@gmail.com> | 2018-09-05 02:05:32 +0200 |
---|---|---|
committer | Peter Kokot <peterkokot@gmail.com> | 2018-09-05 02:05:32 +0200 |
commit | f0b4ac1bf90a55822239c3560a4e105c720d64e8 (patch) | |
tree | 791ea23e66e44470f2aa6b21c765bb581fbd0b14 | |
parent | 5f75d30f458e819df3c5a68f8b4e184deb76fa02 (diff) | |
download | oniguruma-f0b4ac1bf90a55822239c3560a4e105c720d64e8.zip oniguruma-f0b4ac1bf90a55822239c3560a4e105c720d64e8.tar.gz oniguruma-f0b4ac1bf90a55822239c3560a4e105c720d64e8.tar.bz2 |
Remove HAVE_LIMITS_H
The `<limits.h>` header file is part of the standard C89 headers [1] and
on current systems there is no need to do a manual check anymore if
header is present.
Build systems checked for the presence of the header file and defined
the `HAVE_LIMITS_H` symbol:
- Autoconf in configure.a [2]
- cmake in CMakeLists.txt
Refs:
[1] https://port70.net/~nsz/c/c89/c89-draft.html#4.1.4
[2] http://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/headers.m4
-rw-r--r-- | CMakeLists.txt | 1 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | src/config.h.cmake.in | 3 | ||||
-rw-r--r-- | src/config.h.win32 | 1 | ||||
-rw-r--r-- | src/config.h.win64 | 1 | ||||
-rw-r--r-- | src/config.h.windows.in | 1 | ||||
-rw-r--r-- | src/regint.h | 3 |
7 files changed, 1 insertions, 11 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 6aae87b..04d8ae8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,7 +39,6 @@ check_include_files(stdint.h HAVE_STDINT_H) check_include_files(stdlib.h HAVE_STDLIB_H) check_include_files(strings.h HAVE_STRINGS_H) check_include_files(string.h HAVE_STRING_H) -check_include_files(limits.h HAVE_LIMITS_H) check_include_files(sys/times.h HAVE_SYS_TIMES_H) check_include_files(sys/time.h HAVE_SYS_TIME_H) check_include_files(sys/types.h HAVE_SYS_TYPES_H) diff --git a/configure.ac b/configure.ac index fef00cd..5c9a086 100644 --- a/configure.ac +++ b/configure.ac @@ -50,7 +50,7 @@ dnl Checks for libraries. dnl Checks for header files. AC_HEADER_STDC -AC_CHECK_HEADERS(stdlib.h string.h strings.h limits.h sys/time.h unistd.h sys/times.h) +AC_CHECK_HEADERS(stdlib.h string.h strings.h sys/time.h unistd.h sys/times.h) dnl Checks for typedefs, structures, and compiler characteristics. AC_CHECK_SIZEOF(int, 4) diff --git a/src/config.h.cmake.in b/src/config.h.cmake.in index b59cc8d..f562a6b 100644 --- a/src/config.h.cmake.in +++ b/src/config.h.cmake.in @@ -31,9 +31,6 @@ /* Define to 1 if you have the <string.h> header file. */ #cmakedefine HAVE_STRING_H ${HAVE_STRING_H} -/* Define to 1 if you have the <limits.h> header file. */ -#cmakedefine HAVE_LIMITS_H ${HAVE_LIMITS_H} - /* Define to 1 if you have the <sys/times.h> header file. */ #cmakedefine HAVE_SYS_TIMES_H ${HAVE_SYS_TIMES_H} diff --git a/src/config.h.win32 b/src/config.h.win32 index 12609df..244dcc3 100644 --- a/src/config.h.win32 +++ b/src/config.h.win32 @@ -29,7 +29,6 @@ #define STDC_HEADERS 1
#define HAVE_STDLIB_H 1
#define HAVE_STRING_H 1
-#define HAVE_LIMITS_H 1
#define HAVE_FCNTL_H 1
#define HAVE_SYS_UTIME_H 1
#define HAVE_MEMORY_H 1
diff --git a/src/config.h.win64 b/src/config.h.win64 index e892086..5e89aec 100644 --- a/src/config.h.win64 +++ b/src/config.h.win64 @@ -29,7 +29,6 @@ #define STDC_HEADERS 1
#define HAVE_STDLIB_H 1
#define HAVE_STRING_H 1
-#define HAVE_LIMITS_H 1
#define HAVE_FCNTL_H 1
#define HAVE_SYS_UTIME_H 1
#define HAVE_MEMORY_H 1
diff --git a/src/config.h.windows.in b/src/config.h.windows.in index 57fb426..31ccbdb 100644 --- a/src/config.h.windows.in +++ b/src/config.h.windows.in @@ -33,7 +33,6 @@ #define STDC_HEADERS 1
#define HAVE_STDLIB_H 1
#define HAVE_STRING_H 1
-#define HAVE_LIMITS_H 1
#define HAVE_FCNTL_H 1
#define HAVE_SYS_UTIME_H 1
#define HAVE_MEMORY_H 1
diff --git a/src/regint.h b/src/regint.h index c3d1ee1..8fa210b 100644 --- a/src/regint.h +++ b/src/regint.h @@ -152,10 +152,7 @@ #include <stddef.h> - -#ifdef HAVE_LIMITS_H #include <limits.h> -#endif #ifdef HAVE_STDLIB_H #include <stdlib.h> |