diff --git a/source/lib/config.h b/source/lib/config.h index df0d53efb3..61d9d550fd 100755 --- a/source/lib/config.h +++ b/source/lib/config.h @@ -13,18 +13,24 @@ #endif -// HAVE_C99: check if compiler advertises support for C99 -// (make sure it's #defined before testing value to avoid ICC warning) -#undef HAVE_C99 -#ifdef __STDC_VERSION__ -# if __STDC_VERSION__ >= 199901L -# define HAVE_C99 -# endif -#endif +#undef HAVE_C99 // compiler advertises support for C99 + +#undef HAVE_ASM #undef HAVE_GETTIMEOFDAY #undef HAVE_X +#undef CONFIG_DISABLE_EXCEPTIONS + + +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +# define HAVE_C99 +#endif + +#ifdef _MSC_VER +# define HAVE_ASM +#endif + #ifdef OS_UNIX # define HAVE_GETTIMEOFDAY #endif @@ -33,4 +39,4 @@ # define HAVE_X #endif -#undef CONFIG_DISABLE_EXCEPTIONS + diff --git a/source/lib/memcpy.cpp b/source/lib/memcpy.cpp index 1a3059b1dc..10be9188eb 100755 --- a/source/lib/memcpy.cpp +++ b/source/lib/memcpy.cpp @@ -5,8 +5,9 @@ */ #include "precompiled.h" +#include "config.h" -#if _MSC_VER >= 0x1300 +#ifdef HAVE_ASM void memcpy_nt(void* dst, void* src, int len) { @@ -29,7 +30,7 @@ prefetch_loop: mov eax, [esi-64] mov eax, [esi-128] sub esi, 128 - test esi, 4095 ; CHUNK_SIZE-1 (icc doesn't preprocess asm) + test esi, 4095 ; CHUNK_SIZE-1 (icc doesnt preprocess asm) jnz prefetch_loop @@ -66,4 +67,4 @@ write_loop: } } -#endif // #if _MSC_VER >= 0x1300 \ No newline at end of file +#endif // #ifdef HAVE_ASM \ No newline at end of file