Use cmake to determine which string func we need.

On a side note, better to default to linux names when possible.
This commit is contained in:
Jason Felds
2015-10-07 19:00:16 -04:00
parent dca80f91ae
commit d9a3c9cf97
9 changed files with 33 additions and 21 deletions
+3 -2
View File
@@ -87,14 +87,15 @@ include(CheckCXXSymbolExists)
# Mostly Windows functions.
check_function_exists(_mkdir HAVE__MKDIR)
check_cxx_symbol_exists(_snprintf cstdio HAVE__SNPRINTF)
#check_function_exists(_snprintf HAVE__SNPRINTF)
check_cxx_symbol_exists(stricmp cstring HAVE_STRICMP)
check_cxx_symbol_exists(_stricmp cstring HAVE__STRICMP)
# Mostly non-Windows functions.
check_function_exists(fcntl HAVE_FCNTL)
check_function_exists(fork HAVE_FORK)
check_function_exists(mkdir HAVE_MKDIR)
#check_function_exists(snprintf HAVE_SNPRINTF)
check_cxx_symbol_exists(snprintf cstdio HAVE_SNPRINTF)
check_cxx_symbol_exists(strcasecmp cstring HAVE_STRCASECMP)
check_function_exists(waitpid HAVE_WAITPID)