]> rtime.felk.cvut.cz Git - opencv.git/commitdiff
fixed build on MSVC 2003
authorvp153 <vp153@73c94f0f-984f-4a5f-82bc-2d8db8d8ee08>
Mon, 5 Apr 2010 18:50:38 +0000 (18:50 +0000)
committervp153 <vp153@73c94f0f-984f-4a5f-82bc-2d8db8d8ee08>
Mon, 5 Apr 2010 18:50:38 +0000 (18:50 +0000)
git-svn-id: https://code.ros.org/svn/opencv/trunk@2993 73c94f0f-984f-4a5f-82bc-2d8db8d8ee08

opencv/src/cxcore/cxsystem.cpp
opencv/tests/cxts/cxts.cpp

index f3123428a7e11c1b49d34ec9c998f486c5be82f2..e250cc9da6f967c239d63f3dcabdad20c369d989 100644 (file)
 
 #if defined WIN32 || defined WIN64 || defined _WIN64 || defined WINCE
 #include <tchar.h>
-#ifdef _MSC_VER
-#include <intrin.h>
+#if defined _MSC_VER
+  #if _MSC_VER >= 1400
+    #include <intrin.h>
+  #elif defined _M_IX86 
+    static void __cpuid(int* cpuid_data, int)
+    {
+        __asm
+        {
+            push ebx
+            push edi
+            mov edi, cpuid_data
+            mov eax, 1
+            cpuid
+            mov [edi], eax
+            mov [edi + 4], ebx
+            mov [edi + 8], ecx
+            mov [edi + 12], edx
+            pop edi
+            pop ebx
+        }
+    }
+  #endif
 #endif
 #else
 #include <pthread.h>
index b160ac7f63aa69784d3b612977f3b2d7fd9bce6c..37c38cb42568c028bac72000f6fe55bdc9474996 100644 (file)
@@ -1783,6 +1783,10 @@ void CvTS::print_summary_tailer( int streams )
     }
 }
 
+#if defined _MSC_VER && _MSC_VER < 1400
+#undef vsnprintf
+#define vsnprintf _vsnprintf
+#endif
 
 void CvTS::vprintf( int streams, const char* fmt, va_list l )
 {