]> granicus.if.org Git - libx264/commitdiff
use define _WIN32 instead of __WIN32__ or WIN32 defines.
authorGuillaume Poirier <gpoirier@mplayerhq.hu>
Thu, 3 Jan 2008 22:24:38 +0000 (22:24 +0000)
committerGuillaume Poirier <gpoirier@mplayerhq.hu>
Thu, 3 Jan 2008 22:24:38 +0000 (22:24 +0000)
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

common/cpu.c
common/osdep.h

index 504585edf3338fdc5189ec643d91718150baef91..046950a3408f6fc0bf955b6f2c69d0172e870042 100644 (file)
@@ -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)
index 9527bc1359c7a6a262feac249fc77c0360d203d8..9635dd8021240b5e9d4d3ebc79dee6acdd78667b 100644 (file)
@@ -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)