From 4aee4413740bcb90b8eed09e2766e9b5ce181b51 Mon Sep 17 00:00:00 2001 From: Luis Diaz Mas Date: Mon, 31 Jul 2017 18:06:27 +0200 Subject: [PATCH] Handle HAVE_STDLIB_H variable in the new cmake file --- config/CMakeChecks.txt | 4 +--- config/config.h.cmake | 4 ++-- config/generateConfigFile.cmake | 1 + 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/config/CMakeChecks.txt b/config/CMakeChecks.txt index d7dac8a8..e1ccf63d 100644 --- a/config/CMakeChecks.txt +++ b/config/CMakeChecks.txt @@ -70,7 +70,6 @@ ENDIF( EXIV2_ENABLE_COMMERCIAL ) # checking for Header files check_include_file( "inttypes.h" have_inttypes_h ) -check_include_file( "stdlib.h" HAVE_STDLIB_H ) check_include_file( "string.h" HAVE_STRING_H ) check_include_file( "strings.h" HAVE_STRINGS_H ) check_include_file( "wchar.h" HAVE_WCHAR_H ) @@ -110,8 +109,7 @@ IF( NOT MSVC ) SET( HAVE_PID_T TRUE ) ENDIF( NOT MSVC ) -SET( EXV_SYMBOLS HAVE_STDLIB_H - HAVE_STRCHR +SET( EXV_SYMBOLS HAVE_STRCHR HAVE_STRCHR_R HAVE_STRERROR HAVE_STRERROR_R diff --git a/config/config.h.cmake b/config/config.h.cmake index d7fd3826..46120edd 100644 --- a/config/config.h.cmake +++ b/config/config.h.cmake @@ -71,8 +71,8 @@ #endif #endif -/* Define to 1 if you have the header file. */ -#cmakedefine EXV_HAVE_STDLIB_H 1 +// Definition to indicate if you have the header file. +#cmakedefine EXV_HAVE_STDLIB_H /* Define to 1 if you have the `strchr' function. */ #cmakedefine EXV_HAVE_STRCHR 1 diff --git a/config/generateConfigFile.cmake b/config/generateConfigFile.cmake index 39dff012..750be284 100644 --- a/config/generateConfigFile.cmake +++ b/config/generateConfigFile.cmake @@ -28,6 +28,7 @@ check_include_file( "memory.h" EXV_HAVE_MEMORY_H ) check_include_file( "process.h" EXV_HAVE_PROCESS_H ) check_include_file( "stdbool.h" EXV_HAVE_STDBOOL_H ) check_include_file( "stdint.h" EXV_HAVE_STDINT_H ) +check_include_file( "stdlib.h" EXV_HAVE_STDLIB_H ) if (NOT EXV_HAVE_LIBINTL_H) set(EXV_ENABLE_NLS 0)