Skip to content
Snippets Groups Projects
Commit 7567ceb1 authored by Jonas Stienen's avatar Jonas Stienen
Browse files

Making all WINNT defines tentative

parent 1d8dcb17
No related branches found
No related tags found
No related merge requests found
......@@ -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>
#ifndef _WIN32_WINNT // @todo: remove
#define _WIN32_WINNT 0x0500
#endif
#include <windows.h>
......
......@@ -33,7 +33,7 @@
#endif
// Weitere Includes
#ifndef _WIN32_WINNT
#ifndef _WIN32_WINNT // @todo: remove
#define _WIN32_WINNT 0x0500
#endif
......
#include <ITAAtomicOps.h>
#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() {
inline ITACriticalSectionWin32Impl()
{
InitializeCriticalSection( ( CRITICAL_SECTION* ) &_cs );
}
};
~ITACriticalSectionWin32Impl() {
inline ~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 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>
#ifndef _WIN32_WINNT // @todo: remove
#define _WIN32_WINNT 0x0500
#endif
#include <windows.h>
#include "ITAException.h"
......
......@@ -4,7 +4,9 @@
#include <ITAException.h>
#ifndef _WIN32_WINNT // @todo: remove
#define _WIN32_WINNT 0x0500
#endif
#include <windows.h>
ITAWinPCClock* ITAWinPCClock::m_pInstance = NULL;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment