Changed String::number() to use a standard function

This commit is contained in:
Tsuda Kageyu
2013-05-19 14:39:45 +09:00
parent 79f3edebc0
commit bbec1c7f81
3 changed files with 36 additions and 18 deletions

View File

@ -183,6 +183,20 @@ if(NOT HAVE_GCC_BYTESWAP_16 OR NOT HAVE_GCC_BYTESWAP_32 OR NOT HAVE_GCC_BYTESWAP
endif()
endif()
# Determine whether your compiler supports some safer version of sprintf.
check_cxx_source_compiles("
#include <cstdio>
int main() { char buf[20]; snprintf(buf, 20, \"%d\", 1); return 0; }
" HAVE_SNPRINTF)
if(NOT HAVE_SNPRINTF)
check_cxx_source_compiles("
#include <cstdio>
int main() { char buf[20]; sprintf_s(buf, \"%d\", 1); return 0; }
" HAVE_SPRINTF_S)
endif()
# Determine whether your compiler supports codecvt.
check_cxx_source_compiles("