Skip to content

Commit

Permalink
fix some build error on darwin
Browse files Browse the repository at this point in the history
fixes issue #4
  • Loading branch information
chai2010 committed Jun 13, 2015
1 parent 1778213 commit b83c682
Show file tree
Hide file tree
Showing 5 changed files with 162 additions and 154 deletions.
16 changes: 8 additions & 8 deletions opencv110/cxcore/src/cxswitcher_new.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ icvInitProcessorInfo( CvProcessorInfo* cpu_info )
int id = 0;
int64 cpuid_val;
HKEY key = 0;
cpu_info->count = (int)sys.dwNumberOfProcessors;

cpu_info->count = (int)sys.dwNumberOfProcessors;
unsigned long freq = 0, sz = sizeof(freq);

if( RegOpenKeyEx( HKEY_LOCAL_MACHINE, "HARDWARE\\DESCRIPTION\\SYSTEM\\CentralProcessor\\0\\",
Expand All @@ -151,7 +151,7 @@ icvInitProcessorInfo( CvProcessorInfo* cpu_info )
id = (features & ICV_CPUID_W7 & -256) | family;

cpu_info->model = id == ICV_CPUID_W7 ? CV_PROC_IA32_WITH_SSE2 :
id == ICV_CPUID_A6 ? CV_PROC_IA32_WITH_SSE :
id == ICV_CPUID_A6 ? CV_PROC_IA32_WITH_SSE :
id == ICV_CPUID_M6 ? CV_PROC_IA32_WITH_MMX :
CV_PROC_IA32_GENERIC;
}
Expand All @@ -163,7 +163,7 @@ icvInitProcessorInfo( CvProcessorInfo* cpu_info )
sys.dwProcessorType == PROCESSOR_ARCHITECTURE_IA64 )
cpu_info->model = CV_PROC_IA64;
#endif
if( QueryPerformanceFrequency( &freq ) )
if( QueryPerformanceFrequency( &freq ) )
cpu_info->frequency = (double)freq.QuadPart;
}
#else
Expand Down Expand Up @@ -487,7 +487,7 @@ cvUseOptimized( int load_flag )
CvModuleInfo* module;
const CvProcessorInfo* cpu_info = icvGetProcessorInfo();
int arch = CV_GET_PROC_ARCH(cpu_info->model);

// TODO: implement some more elegant way
// to find the latest and the greatest IPP/MKL libraries
static const char* opencv_sfx[] = { "100", "099", "097", 0 };
Expand Down Expand Up @@ -555,7 +555,7 @@ cvUseOptimized( int load_flag )
break;
}
#ifndef WIN32
// temporary workaround for MacOSX
// temporary workaround for MacOSX
sprintf( plugins[i].name, DLL_PREFIX "%s%s" DLL_DEBUG_FLAG ".dylib",
plugins[i].basename, *suffix );

Expand Down Expand Up @@ -682,8 +682,8 @@ CV_IMPL int64 cvGetTickCount( void )
QueryPerformanceCounter( &counter );
return (int64)counter.QuadPart;
#else
timeval tv;
timezone tz;
struct timeval tv;
struct timezone tz;
gettimeofday( &tv, &tz );
return (int64)tv.tv_sec*1000000 + tv.tv_usec;
#endif
Expand Down
4 changes: 4 additions & 0 deletions opencv110/highgui/src/apple/cvcap_qt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@
#include "_highgui.h"
#include "cv.h"

#if 0

// Original implementation by Mark Asbach
// Institute of Communications Engineering
// RWTH Aachen University
Expand Down Expand Up @@ -1589,3 +1591,5 @@ CvVideoWriter* cvCreateVideoWriter_QT( const char* filename, int fourcc,
delete writer;
return 0;
}

#endif
Loading

0 comments on commit b83c682

Please sign in to comment.