Commit f823acaa authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

fdatasync is not documented on Snow Leopard and is not in unistd.h

CMake finds it as it is expored by system libraries, though attempts to
use it will result bring a warning. Fix by using CHECK_SYMBOL_EXISTS
instead of CHECK_FUNCTION_EXISTS
parent 9ceecebd
......@@ -21,6 +21,7 @@ INCLUDE (CheckLibraryExists)
INCLUDE (CheckFunctionExists)
INCLUDE (CheckCCompilerFlag)
INCLUDE (CheckCSourceRuns)
INCLUDE (CheckSymbolExists)
# Sometimes it is handy to know if PIC option
......@@ -521,7 +522,7 @@ ENDIF()
CHECK_FUNCTION_EXISTS_UNIX (fchmod HAVE_FCHMOD)
CHECK_FUNCTION_EXISTS_UNIX (fcntl HAVE_FCNTL)
CHECK_FUNCTION_EXISTS_UNIX (fconvert HAVE_FCONVERT)
CHECK_FUNCTION_EXISTS_UNIX (fdatasync HAVE_FDATASYNC)
CHECK_SYMBOL_EXISTS_UNIX(fdatasync "unistd.h" HAVE_FDATASYNC)
CHECK_FUNCTION_EXISTS_UNIX (fesetround HAVE_FESETROUND)
CHECK_FUNCTION_EXISTS_UNIX (fpsetmask HAVE_FPSETMASK)
CHECK_FUNCTION_EXISTS_UNIX (fseeko HAVE_FSEEKO)
......@@ -657,7 +658,7 @@ CHECK_FUNCTION_EXISTS_UNIX(rdtscll HAVE_RDTSCLL)
#
# Tests for symbols
#
INCLUDE (CheckSymbolExists)
CHECK_SYMBOL_EXISTS_UNIX(sys_errlist "stdio.h" HAVE_SYS_ERRLIST)
CHECK_SYMBOL_EXISTS_UNIX(madvise "sys/mman.h" HAVE_DECL_MADVISE)
CHECK_SYMBOL_EXISTS_UNIX(tzname "time.h" HAVE_TZNAME)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment