From: Peter Kokot Date: Wed, 5 Sep 2018 03:42:32 +0000 (+0200) Subject: Remove HAVE_STDLIB_H X-Git-Tag: v6.9.1~49^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=06ed08664919d8f2eca3868160ea1b2ef1d71e37;p=onig Remove HAVE_STDLIB_H The `` header file is part of the standard C89 headers [1] and on current systems there is no need to do a manual check if header is present anymore [2]. Build systems used to check for the presence of the header file and defined the `HAVE_STDLIB_H` symbol: - Autoconf in configure.ac - Cmake in CMakeLists.txt This patch removes these checks and prepares for another patch to remove the obsolescent `AC_HEADER_STDC` Autoconf macro and the obsolescent `STDC_HEADERS` symbol. Refs: [1] https://port70.net/~nsz/c/c89/c89-draft.html#4.1.2 [2] http://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/headers.m4 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 04d8ae8..4a4571b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,7 +36,6 @@ check_include_files(alloca.h HAVE_ALLOCA_H) set(HAVE_PROTOTYPES 1) check_include_files(stdarg.h HAVE_STDARG_PROTOTYPES) 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(sys/times.h HAVE_SYS_TIMES_H) diff --git a/configure.ac b/configure.ac index 5c9a086..10dae12 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 sys/time.h unistd.h sys/times.h) +AC_CHECK_HEADERS(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 f562a6b..d51a7b7 100644 --- a/src/config.h.cmake.in +++ b/src/config.h.cmake.in @@ -22,9 +22,6 @@ /* Define to 1 if you have the header file. */ #cmakedefine HAVE_STDINT_H ${HAVE_STDINT_H} -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_STDLIB_H ${HAVE_STDLIB_H} - /* Define to 1 if you have the header file. */ #cmakedefine HAVE_STRINGS_H ${HAVE_STRINGS_H} diff --git a/src/config.h.win32 b/src/config.h.win32 index 975ee6c..ead0994 100644 --- a/src/config.h.win32 +++ b/src/config.h.win32 @@ -1,7 +1,6 @@ #define STDC_HEADERS 1 #define HAVE_SYS_TYPES_H 1 #define HAVE_SYS_STAT_H 1 -#define HAVE_STDLIB_H 1 #define HAVE_STRING_H 1 #define HAVE_MEMORY_H 1 #define HAVE_OFF_T 1 @@ -26,7 +25,6 @@ #endif #define HAVE_DECL_SYS_NERR 1 #define STDC_HEADERS 1 -#define HAVE_STDLIB_H 1 #define HAVE_STRING_H 1 #define HAVE_FCNTL_H 1 #define HAVE_SYS_UTIME_H 1 diff --git a/src/config.h.win64 b/src/config.h.win64 index ddadd30..2a7b868 100644 --- a/src/config.h.win64 +++ b/src/config.h.win64 @@ -1,7 +1,6 @@ #define STDC_HEADERS 1 #define HAVE_SYS_TYPES_H 1 #define HAVE_SYS_STAT_H 1 -#define HAVE_STDLIB_H 1 #define HAVE_STRING_H 1 #define HAVE_MEMORY_H 1 #define HAVE_OFF_T 1 @@ -26,7 +25,6 @@ #endif #define HAVE_DECL_SYS_NERR 1 #define STDC_HEADERS 1 -#define HAVE_STDLIB_H 1 #define HAVE_STRING_H 1 #define HAVE_FCNTL_H 1 #define HAVE_SYS_UTIME_H 1 diff --git a/src/config.h.windows.in b/src/config.h.windows.in index 497f9a7..f808806 100644 --- a/src/config.h.windows.in +++ b/src/config.h.windows.in @@ -1,7 +1,6 @@ #define STDC_HEADERS 1 #define HAVE_SYS_TYPES_H 1 #define HAVE_SYS_STAT_H 1 -#define HAVE_STDLIB_H 1 #define HAVE_STRING_H 1 #define HAVE_MEMORY_H 1 #define HAVE_OFF_T 1 @@ -30,7 +29,6 @@ #endif #define HAVE_DECL_SYS_NERR 1 #define STDC_HEADERS 1 -#define HAVE_STDLIB_H 1 #define HAVE_STRING_H 1 #define HAVE_FCNTL_H 1 #define HAVE_SYS_UTIME_H 1 diff --git a/src/regint.h b/src/regint.h index 8fa210b..3d381a1 100644 --- a/src/regint.h +++ b/src/regint.h @@ -153,10 +153,7 @@ #include #include - -#ifdef HAVE_STDLIB_H #include -#endif #ifdef HAVE_STDINT_H #include