]> granicus.if.org Git - onig/commitdiff
Remove HAVE_STDLIB_H
authorPeter Kokot <peterkokot@gmail.com>
Wed, 5 Sep 2018 03:42:32 +0000 (05:42 +0200)
committerPeter Kokot <peterkokot@gmail.com>
Wed, 5 Sep 2018 03:42:32 +0000 (05:42 +0200)
The `<stdlib.h>` 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

CMakeLists.txt
configure.ac
src/config.h.cmake.in
src/config.h.win32
src/config.h.win64
src/config.h.windows.in
src/regint.h

index 04d8ae88b0db2f437aba0f24c19c7596e558788a..4a4571bc725a33847cd3206be31c0d3cebc3c25b 100644 (file)
@@ -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)
index 5c9a086bd783ae490dd9feaf1873f7d2fc4f2bba..10dae1244419f736dbea62741b719be2d083e992 100644 (file)
@@ -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)
index f562a6bb4a4735db7295010e5f379cb7e11b5099..d51a7b7309b817ca7079f69e32975bbdb3677553 100644 (file)
@@ -22,9 +22,6 @@
 /* Define to 1 if you have the <stdint.h> header file. */
 #cmakedefine HAVE_STDINT_H  ${HAVE_STDINT_H}
 
-/* Define to 1 if you have the <stdlib.h> header file. */
-#cmakedefine HAVE_STDLIB_H  ${HAVE_STDLIB_H}
-
 /* Define to 1 if you have the <strings.h> header file. */
 #cmakedefine HAVE_STRINGS_H  ${HAVE_STRINGS_H}
 
index 975ee6c347deef2a5079167309ab75ba40f4822e..ead09941b450f24c253935c17762e37601aac3e1 100644 (file)
@@ -1,7 +1,6 @@
 #define STDC_HEADERS 1\r
 #define HAVE_SYS_TYPES_H 1\r
 #define HAVE_SYS_STAT_H 1\r
-#define HAVE_STDLIB_H 1\r
 #define HAVE_STRING_H 1\r
 #define HAVE_MEMORY_H 1\r
 #define HAVE_OFF_T 1\r
@@ -26,7 +25,6 @@
 #endif\r
 #define HAVE_DECL_SYS_NERR 1\r
 #define STDC_HEADERS 1\r
-#define HAVE_STDLIB_H 1\r
 #define HAVE_STRING_H 1\r
 #define HAVE_FCNTL_H 1\r
 #define HAVE_SYS_UTIME_H 1\r
index ddadd30e9435b5fd3e7852ef16e56d292a846341..2a7b86842d48e80e1849169ace279b3aa49781a4 100644 (file)
@@ -1,7 +1,6 @@
 #define STDC_HEADERS 1\r
 #define HAVE_SYS_TYPES_H 1\r
 #define HAVE_SYS_STAT_H 1\r
-#define HAVE_STDLIB_H 1\r
 #define HAVE_STRING_H 1\r
 #define HAVE_MEMORY_H 1\r
 #define HAVE_OFF_T 1\r
@@ -26,7 +25,6 @@
 #endif\r
 #define HAVE_DECL_SYS_NERR 1\r
 #define STDC_HEADERS 1\r
-#define HAVE_STDLIB_H 1\r
 #define HAVE_STRING_H 1\r
 #define HAVE_FCNTL_H 1\r
 #define HAVE_SYS_UTIME_H 1\r
index 497f9a799be71f9a3dfe9da93a30f6e5e054bee3..f80880665522f426aaff15626f2e8a8711045e78 100644 (file)
@@ -1,7 +1,6 @@
 #define STDC_HEADERS 1\r
 #define HAVE_SYS_TYPES_H 1\r
 #define HAVE_SYS_STAT_H 1\r
-#define HAVE_STDLIB_H 1\r
 #define HAVE_STRING_H 1\r
 #define HAVE_MEMORY_H 1\r
 #define HAVE_OFF_T 1\r
@@ -30,7 +29,6 @@
 #endif\r
 #define HAVE_DECL_SYS_NERR 1\r
 #define STDC_HEADERS 1\r
-#define HAVE_STDLIB_H 1\r
 #define HAVE_STRING_H 1\r
 #define HAVE_FCNTL_H 1\r
 #define HAVE_SYS_UTIME_H 1\r
index 8fa210bcfe4fdca3c0d72560cf7ef0ebe829ffe4..3d381a1dbd09f4ac6000b68a62b16c572482ecdb 100644 (file)
 
 #include <stddef.h>
 #include <limits.h>
-
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
 
 #ifdef HAVE_STDINT_H
 #include <stdint.h>