Uses ISO _strdup() instead of POSIX strdup() if possible

This commit is contained in:
Tsuda Kageyu
2013-06-11 12:06:29 +09:00
parent 25590fe70c
commit 804f882e38
3 changed files with 50 additions and 14 deletions

View File

@ -238,6 +238,16 @@ if(NOT HAVE_SNPRINTF)
" HAVE_SPRINTF_S)
endif()
# Check which your compiler supports ISO _strdup.
check_cxx_source_compiles("
#include <cstring>
int main() {
_strdup(0);
return 0;
}
" HAVE_ISO_STRDUP)
# Determine whether your compiler supports codecvt.
check_cxx_source_compiles("