[mythtv] [mythtv-commits] mythtv commit: r17650 - in trunk by ijr

Mark Buechler mark.buechler at gmail.com
Mon Jun 30 16:59:47 UTC 2008


Hi

On Mon, Jun 30, 2008 at 1:08 AM, buzz <davidbuzz at gmail.com> wrote:

> Win32 now says 'sleep' and 'usleep' are a problem:
>
> cd libmythdb/ && make -f Makefile
> make[2]: Entering directory `/C/mythtv/mythtv/libs/libmythdb'
> g++ -c -march=k8 -g -Wall -Wno-switch -Wpointer-arith -Wredundant-decls
> -Wno-non
> DC_CONSTANT_MACROS -frtti -fexceptions -mthreads -DQT_LARGEFILE_SUPPORT
> -DUSING_
> IO -DUSING_D3D -DUSING_DIRECTX -DMMX -Di386 -DUSING_DIRECTX -D_GNU_SOURCE
> -D_FIL
> UNPREFIX=\"..\" -DQT_THREAD_SUPPORT -DQT_DLL -DQT_QT3SUPPORT_LIB
> -DQT3_SUPPORT -
> _LIB -DQT_NETWORK_LIB -DQT_CORE_LIB
> -I'../../../../msys/1.0/qt-win-opensource-sr
> re' -I'../../../../msys/1.0/qt-win-opensource-src-4.3.4/include/QtCore'
> -I'../..
> in-opensource-src-4.3.4/include/QtNetwork'
> -I'../../../../msys/1.0/qt-win-openso
> de/QtNetwork'
> -I'../../../../msys/1.0/qt-win-opensource-src-4.3.4/include/QtGui'
> /1.0/qt-win-opensource-src-4.3.4/include/QtGui'
> -I'../../../../msys/1.0/qt-win-o
> include/QtSql'
> -I'../../../../msys/1.0/qt-win-opensource-src-4.3.4/include/QtSql
> s/1.0/qt-win-opensource-src-4.3.4/include/Qt3Support'
> -I'../../../../msys/1.0/qt
> 4.3.4/include/Qt3Support'
> -I'../../../../msys/1.0/qt-win-opensource-src-4.3.4/in
> build//include'
> -I'c:/msys/1.0/qt-win-opensource-src-4.3.4/include/ActiveQt' -I'
> /../MSys/1.0/qt-win-opensource-src-4.3.4/mkspecs/win32-g++' -o mythdbcon.o
> mythd
> mythdbcon.cpp: In member function `bool MSqlDatabase::OpenDatabase()':
> mythdbcon.cpp:97: error: `sleep' was not declared in this scope
> mythdbcon.cpp:97: warning: unused variable 'sleep'
> mythdbcon.cpp: In member function `bool MSqlDatabase::KickDatabase()':
> mythdbcon.cpp:150: error: `usleep' was not declared in this scope
> mythdbcon.cpp:150: warning: unused variable 'usleep'
> make[2]: *** [mythdbcon.o] Error 1
> make[2]: Leaving directory `/C/mythtv/mythtv/libs/libmythdb'
> make[1]: *** [sub-libmythdb-make_default-ordered] Error 2
> make[1]: Leaving directory `/C/mythtv/mythtv/libs'
> make: *** [sub-libs-make_default-ordered] Error 2
>

There are quite a few usleeps in Myth's code but I only ran into the problem
in libs/libmythtv/remoteutil.cpp for some reason. This leads me to believe
it's been fixed but not in remoteutil.cpp. Anyway, I simply added:

#ifdef USING_MINGW
#define usleep(usec) (Sleep ((usec) / 1000), 0)
#endif

- Mark.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mythtv.org/pipermail/mythtv-dev/attachments/20080630/d59b013b/attachment.htm 


More information about the mythtv-dev mailing list