diff options
author | Guy Harris <guy@alum.mit.edu> | 2014-12-20 00:23:05 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2014-12-20 08:23:53 +0000 |
commit | a61f6e4745d478a9badf77810b9e474133570dd1 (patch) | |
tree | 6f6c389d486898a8784b070b4a21ef0c6f225d16 /ConfigureChecks.cmake | |
parent | 4b8639f049e98870a48a1e2c250dd7234080568f (diff) |
When checking for floorl(), include math.h.
It's not being found with MSVC, but is apparently present; perhaps
math.h does something magic, e.g. defining it as a macro, so try using
check_symbol_exists with "math.h".
Change-Id: Idaecac641fb0b87d399807d8bf1fcb74e7251a4e
Reviewed-on: https://code.wireshark.org/review/5911
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'ConfigureChecks.cmake')
-rw-r--r-- | ConfigureChecks.cmake | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index a6c9d85775..26ff93d06f 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -63,6 +63,7 @@ check_include_file("winsock2.h" HAVE_WINSOCK2_H) #Functions include(CheckFunctionExists) +include(CheckSymbolExists) check_function_exists("chown" HAVE_CHOWN) cmake_push_check_state() @@ -79,7 +80,11 @@ set(CMAKE_REQUIRED_LIBRARIES %{CMAKE_DL_LIBS}) check_function_exists("dladdr" HAVE_DLADDR) cmake_pop_check_state() -check_function_exists("floorl" HAVE_FLOORL) +# +# Use check_symbol_exists just in case math.h does something magic +# and there's not actually a function named floorl() +# +check_symbol_exists("floorl" "math.h" HAVE_FLOORL) check_function_exists("gethostbyname2" HAVE_GETHOSTBYNAME2) check_function_exists("getopt" HAVE_GETOPT) check_function_exists("getprotobynumber" HAVE_GETPROTOBYNUMBER) @@ -108,7 +113,6 @@ check_struct_has_member("struct stat" st_flags sys/stat.h HAVE_ST_FLAGS) check_struct_has_member("struct tm" tm_zone time.h HAVE_TM_ZONE) #Symbols but NOT enums or types -include(CheckSymbolExists) check_symbol_exists(tzname "time.h" HAVE_TZNAME) # Check for stuff that isn't testable via the tests above |