diff --git a/StepmaniaCore.cmake b/StepmaniaCore.cmake index a5e6274005..664a61139b 100644 --- a/StepmaniaCore.cmake +++ b/StepmaniaCore.cmake @@ -84,16 +84,21 @@ include(CheckFunctionExists) include(CheckSymbolExists) include(CheckCXXSymbolExists) -if (WIN32 AND MSVC) - check_function_exists(_mkdir HAVE__MKDIR) - check_function_exists(_snprintf HAVE__SNPRINTF) -else() - 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_function_exists(waitpid HAVE_WAITPID) -endif() +# Mostly Windows functions. +check_function_exists(_mkdir HAVE__MKDIR) +check_cxx_symbol_exists(_snprintf cstdio HAVE__SNPRINTF) +#check_function_exists(_snprintf HAVE__SNPRINTF) + +# 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_function_exists(waitpid HAVE_WAITPID) + + +# Mostly universal symbols. check_cxx_symbol_exists(powf cmath HAVE_POWF) check_cxx_symbol_exists(sqrtf cmath HAVE_SQRTF) check_cxx_symbol_exists(sinf cmath HAVE_SINF) diff --git a/src/archutils/Win32/arch_setup.h b/src/archutils/Win32/arch_setup.h index 4fc0ace9dc..3724a58e31 100644 --- a/src/archutils/Win32/arch_setup.h +++ b/src/archutils/Win32/arch_setup.h @@ -62,10 +62,6 @@ C4355: 'this' : used in base member initializer list // Disable false deprecation warnings in VC2008. #define _CRT_NONSTDC_NO_WARNINGS -#if defined(_MSC_VER) && _MSC_VER >= 1400 // this is needed in VC8 but breaks VC7 -#define _HAS_EXCEPTIONS 0 -#endif - // Don't include windows.h everywhere; when we do eventually include it, use these: #define WIN32_LEAN_AND_MEAN #define VC_EXTRALEAN diff --git a/src/config.in.hpp b/src/config.in.hpp index 20571651ec..46e181f040 100644 --- a/src/config.in.hpp +++ b/src/config.in.hpp @@ -136,9 +136,10 @@ typedef long ssize_t; #endif /* Ensure we have a function that acts like a size limited sprintf. */ -#if defined(HAVE__SNPRINTF) +#if defined(HAVE_SNPRINTF) +#elif defined(HAVE__SNPRINTF) #define snprintf _snprintf -#elif !defined(HAVE_SNPRINTF) +#else #error "No size limited sprintf function available. Aborting." #endif