From 6cef95a25d82b76b8c65c295bf3c5e469bab53e5 Mon Sep 17 00:00:00 2001 From: Luis Diaz Mas Date: Mon, 31 Jul 2017 18:37:24 +0200 Subject: [PATCH] Handle HAVE_STRTOL 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 36ecc467..c5c78c98 100644 --- a/config/CMakeChecks.txt +++ b/config/CMakeChecks.txt @@ -77,7 +77,6 @@ check_include_file( "sys/types.h" HAVE_SYS_TYPES_H ) check_include_file( "sys/mman.h" HAVE_SYS_MMAN_H ) check_include_file( "regex.h" HAVE_REGEX ) -check_function_exists( strtol HAVE_STRTOL ) check_function_exists( timegm HAVE_TIMEGM ) check_function_exists( vprintf HAVE_VPRINTF ) @@ -103,8 +102,7 @@ IF( NOT MSVC ) SET( HAVE_PID_T TRUE ) ENDIF( NOT MSVC ) -SET( EXV_SYMBOLS HAVE_STRTOL - HAVE_SYS_MMAN_H +SET( EXV_SYMBOLS HAVE_SYS_MMAN_H HAVE_SYS_STAT_H HAVE_SYS_TIME_H HAVE_SYS_TYPES_H diff --git a/config/config.h.cmake b/config/config.h.cmake index 531cce63..1464c6d7 100644 --- a/config/config.h.cmake +++ b/config/config.h.cmake @@ -89,8 +89,8 @@ // Definition to indicate if you have the header file. #cmakedefine EXV_HAVE_STRINGS_H -/* Define to 1 if you have the `strtol' function. */ -#cmakedefine EXV_HAVE_STRTOL 1 +// Definition to indicate if you have the `strtol' function. +#cmakedefine EXV_HAVE_STRTOL // Definition to indicate if you have the `mmap' function. #cmakedefine EXV_HAVE_MMAP diff --git a/config/generateConfigFile.cmake b/config/generateConfigFile.cmake index cdae47b0..93f969fb 100644 --- a/config/generateConfigFile.cmake +++ b/config/generateConfigFile.cmake @@ -23,6 +23,7 @@ check_function_exists( munmap EXV_HAVE_MUNMAP ) check_function_exists( strchr EXV_HAVE_STRCHR ) check_function_exists( strerror EXV_HAVE_STRERROR ) check_function_exists( strerror_r EXV_HAVE_STRERROR_R ) +check_function_exists( strtol EXV_HAVE_STRTOL ) # TODO : Do something about EXV_STRERROR_R_CHAR_P