Index: common/cpu.c =================================================================== --- common/cpu.c (revision 671) +++ common/cpu.c (working copy) @@ -203,7 +203,7 @@ #if !defined(HAVE_PTHREAD) return 1; -#elif defined(WIN32) +#elif defined(SYS_WIN) return pthread_num_processors_np(); #elif defined(SYS_LINUX) Index: common/osdep.h =================================================================== --- common/osdep.h (revision 671) +++ common/osdep.h (working copy) @@ -47,10 +47,17 @@ #ifdef SYS_OPENBSD #define isfinite finite #endif + + +#if defined(WIN32) || defined(_WIN32) || defined(__WIN32) || defined(__WIN32__) || defined(_WIN64) +#define SYS_WIN +#endif + #if defined(_MSC_VER) || defined(SYS_SunOS) || defined(SYS_MACOSX) #define sqrtf sqrt #endif -#ifdef __WIN32__ + +#ifdef SYS_WIN #define rename(src,dst) (unlink(dst), rename(src,dst)) // POSIX says that rename() removes the destination, but win32 doesn't. #ifndef strtok_r #define strtok_r(str,delim,save) strtok(str,delim) @@ -70,7 +77,7 @@ #endif /* threads */ -#if defined(__WIN32__) && defined(HAVE_PTHREAD) +#if defined(SYS_WIN) && defined(HAVE_PTHREAD) #include #define USE_CONDITION_VAR