From: Guillaume Poirier Date: Thu, 3 Jan 2008 22:24:38 +0000 (+0000) Subject: use define _WIN32 instead of __WIN32__ or WIN32 defines. X-Git-Url: http://www.zmx.ovh/git.videolan.org/?a=commitdiff_plain;h=eb978d2202e2b99bdb3c73659470c0a9a312255d;p=x264.git use define _WIN32 instead of __WIN32__ or WIN32 defines. NSDN reference: http://msdn2.microsoft.com/en-us/library/b0084kay(VS.80).aspx Patch by BugMaster %BugMaster A narod P ru% Original thread: date: Dec 27, 2007 3:18 AM subject: [x264-devel] VS2008 compilation error (need of replacement __WIN32__ with _WIN32) git-svn-id: svn://svn.videolan.org/x264/trunk@715 df754926-b1dd-0310-bc7b-ec298dee348c --- diff --git a/common/cpu.c b/common/cpu.c index 504585ed..046950a3 100644 --- a/common/cpu.c +++ b/common/cpu.c @@ -219,7 +219,7 @@ int x264_cpu_num_processors( void ) #if !defined(HAVE_PTHREAD) return 1; -#elif defined(WIN32) +#elif defined(_WIN32) return pthread_num_processors_np(); #elif defined(SYS_LINUX) diff --git a/common/osdep.h b/common/osdep.h index 9527bc13..9635dd80 100644 --- a/common/osdep.h +++ b/common/osdep.h @@ -50,7 +50,7 @@ #if defined(_MSC_VER) || defined(SYS_SunOS) || defined(SYS_MACOSX) #define sqrtf sqrt #endif -#ifdef __WIN32__ +#ifdef _WIN32 #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)