Index: src/os/win32/fosi.c =================================================================== --- src/os/win32/fosi.c (revision 30548) +++ src/os/win32/fosi.c (working copy) @@ -45,8 +45,10 @@ Sleep( s*1000 ); } +#if __GNUC__ != 4 void usleep(long us){ Sleep( us / 1000 ); } +#endif #endif Index: src/os/win32/fosi.cpp =================================================================== --- src/os/win32/fosi.cpp (revision 30548) +++ src/os/win32/fosi.cpp (working copy) @@ -52,9 +52,11 @@ Sleep(s*1000); } +#if __GNUC__ != 4 void usleep(long us){ Sleep( us / 1000 ); } +#endif #ifdef __cplusplus } Index: src/os/win32/fosi.h =================================================================== --- src/os/win32/fosi.h (revision 30548) +++ src/os/win32/fosi.h (working copy) @@ -33,10 +33,10 @@ #endif #define _XOPEN_SOURCE 600 // use all Posix features. +#include #ifdef _MSC_VER #include -#include #include #include #include @@ -66,7 +66,10 @@ #endif RTT_API void sleep(long s); + +#if __GNUC__ != 4 RTT_API void usleep(long us); +#endif typedef long long NANO_TIME; typedef long long TICK_TIME; @@ -91,7 +94,6 @@ #define ORO_SCHED_RT 0 /** Linux FIFO scheduler */ #define ORO_SCHED_OTHER 1 /** Linux normal scheduler */ -#ifdef _MSC_VER //conflicts with another struct under MSVC struct oro_timespec { long tv_sec; @@ -99,9 +101,6 @@ }; typedef struct oro_timespec TIME_SPEC; -#else // MINGW32 - typedef struct timespec TIME_SPEC; -#endif // high-resolution time to timespec // hrt is in ticks Index: src/rtt-config.h.in =================================================================== --- src/rtt-config.h.in (revision 30548) +++ src/rtt-config.h.in (working copy) @@ -57,8 +57,8 @@ # define RTT_HIDE __attribute__((visibility("hidden"))) # endif #else - // NOT GNU -# if defined( __MINGW__ ) || defined( WIN32 ) + // Win32 and NOT GNU +# if defined( WIN32 ) && !defined ( __MINGW32__ ) # if defined(RTT_DLL_EXPORT) # define RTT_API __declspec(dllexport) # define RTT_EXPORT __declspec(dllexport)