Commit 7567ceb1 authored by Jonas Stienen's avatar Jonas Stienen

Making all WINNT defines tentative

parent 1d8dcb17
......@@ -21,12 +21,12 @@
#include <ITABaseDefinitions.h>
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0500
#endif
#include <string>
#ifdef WIN32
#ifndef _WIN32_WINNT // @todo: remove
#define _WIN32_WINNT 0x0500
#endif
#include <windows.h>
#else
#include <stdio.h>
......
......@@ -21,7 +21,9 @@
#include <ITAUncopyable.h>
#define _WIN32_WINNT 0x0500
#ifndef _WIN32_WINNT // @todo: remove
#define _WIN32_WINNT 0x0500
#endif
#include <windows.h>
......
......@@ -33,8 +33,8 @@
#endif
// Weitere Includes
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0500
#ifndef _WIN32_WINNT // @todo: remove
#define _WIN32_WINNT 0x0500
#endif
// Vorwrtsdeklarationen
......
#include <ITAAtomicOps.h>
#define _WIN32_WINNT 0x0500
#ifndef _WIN32_WINNT // @todo: remove
#define _WIN32_WINNT 0x0500
#endif
#include <windows.h>
typedef union
......
......@@ -3,27 +3,41 @@
#include "ITACriticalSectionImpl.h"
#ifndef _WIN32_WINNT // @todo: remove
#define _WIN32_WINNT 0x0500
#endif
#include <windows.h>
class ITACriticalSectionWin32Impl : public ITACriticalSectionImpl {
class ITACriticalSectionWin32Impl : public ITACriticalSectionImpl
{
public:
ITACriticalSectionWin32Impl() {
InitializeCriticalSection((CRITICAL_SECTION*) &_cs);
}
~ITACriticalSectionWin32Impl() {
EnterCriticalSection((CRITICAL_SECTION*) &_cs);
DeleteCriticalSection((CRITICAL_SECTION*) &_cs);
}
bool tryenter() const {return (TryEnterCriticalSection((CRITICAL_SECTION*) &_cs) != 0);}
void enter() const { EnterCriticalSection((CRITICAL_SECTION*) &_cs); }
void leave() const { LeaveCriticalSection((CRITICAL_SECTION*) &_cs); }
inline ITACriticalSectionWin32Impl()
{
InitializeCriticalSection( ( CRITICAL_SECTION* ) &_cs );
};
inline ~ITACriticalSectionWin32Impl() {
EnterCriticalSection( ( CRITICAL_SECTION* ) &_cs );
DeleteCriticalSection( ( CRITICAL_SECTION* ) &_cs );
};
inline bool tryenter() const
{
return ( TryEnterCriticalSection( ( CRITICAL_SECTION* ) &_cs ) != 0 );
};
inline void enter() const
{
EnterCriticalSection( ( CRITICAL_SECTION* ) &_cs );
};
inline void leave() const
{
LeaveCriticalSection( ( CRITICAL_SECTION* ) &_cs );
};
private:
CRITICAL_SECTION _cs;
};
#endif // INCLUDE_WATCHER_ITA_CRITICALSECTION_WIN32IMPL
......@@ -12,7 +12,9 @@
#include <cmath>
#define _WIN32_WINNT 0x0500
#ifndef _WIN32_WINNT // @todo: remove
#define _WIN32_WINNT 0x0500
#endif
#include <windows.h>
#include "ITAException.h"
......
......@@ -4,7 +4,9 @@
#include <ITAException.h>
#define _WIN32_WINNT 0x0500
#ifndef _WIN32_WINNT // @todo: remove
#define _WIN32_WINNT 0x0500
#endif
#include <windows.h>
ITAWinPCClock* ITAWinPCClock::m_pInstance = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment