Core/Config: Rename WINDOWS_VISTA option to WINDOWS_NT6
Former-commit-id: 9d0c33b7d79521e074aa84684d09d7855956d1df [formerly 7400f0dc41845e0bf275e7a631ec760857db6009] [formerly 9bc38d067febb9723119adf811922642b1f7b782 [formerly e7b9f3e327d422a9ed1e01cdc9439170a67bf7d2]] Former-commit-id: 8614882bef71668ed10cd7fedbf4a058073e6389 [formerly 1bbf4a90092509565475a1709c82dc696f8b8a04] Former-commit-id: 0b6c22973bfa60dca69902388244d4d40fc9b554
This commit is contained in:
parent
7529855fc0
commit
c61b4598e8
|
|
@ -72,8 +72,8 @@
|
||||||
// Number of spinlocks to use with the Windows critical sections (0 to disable)
|
// Number of spinlocks to use with the Windows critical sections (0 to disable)
|
||||||
#define NAZARA_CORE_WINDOWS_CS_SPINLOCKS 4096
|
#define NAZARA_CORE_WINDOWS_CS_SPINLOCKS 4096
|
||||||
|
|
||||||
// Optimize the Windows implementation with technologies of Windows vista (and greater) (Break the compatibility with XP)
|
// Optimize the Windows implementation with technologies of Windows NT 6.0 (and greater) (Break the compatibility with Windows XP)
|
||||||
#define NAZARA_CORE_WINDOWS_VISTA 0
|
#define NAZARA_CORE_WINDOWS_NT6 0
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -74,7 +74,7 @@
|
||||||
#error Nazara requires a C++11 compliant compiler
|
#error Nazara requires a C++11 compliant compiler
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Version du moteur
|
// Nazara version macro
|
||||||
#define NAZARA_VERSION_MAJOR 0
|
#define NAZARA_VERSION_MAJOR 0
|
||||||
#define NAZARA_VERSION_MINOR 1
|
#define NAZARA_VERSION_MINOR 1
|
||||||
|
|
||||||
|
|
@ -97,7 +97,7 @@
|
||||||
#define NOMINMAX
|
#define NOMINMAX
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if NAZARA_CORE_WINDOWS_VISTA
|
#if NAZARA_CORE_WINDOWS_NT6
|
||||||
// Version de Windows minimale : Vista
|
// Version de Windows minimale : Vista
|
||||||
#define NAZARA_WINNT 0x0600
|
#define NAZARA_WINNT 0x0600
|
||||||
#else
|
#else
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ namespace Nz
|
||||||
{
|
{
|
||||||
ConditionVariableImpl::ConditionVariableImpl()
|
ConditionVariableImpl::ConditionVariableImpl()
|
||||||
{
|
{
|
||||||
#if NAZARA_CORE_WINDOWS_VISTA
|
#if NAZARA_CORE_WINDOWS_NT6
|
||||||
InitializeConditionVariable(&m_cv);
|
InitializeConditionVariable(&m_cv);
|
||||||
#else
|
#else
|
||||||
m_count = 0;
|
m_count = 0;
|
||||||
|
|
@ -21,7 +21,7 @@ namespace Nz
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !NAZARA_CORE_WINDOWS_VISTA
|
#if !NAZARA_CORE_WINDOWS_NT6
|
||||||
ConditionVariableImpl::~ConditionVariableImpl()
|
ConditionVariableImpl::~ConditionVariableImpl()
|
||||||
{
|
{
|
||||||
CloseHandle(m_events[BROADCAST]);
|
CloseHandle(m_events[BROADCAST]);
|
||||||
|
|
@ -31,7 +31,7 @@ namespace Nz
|
||||||
|
|
||||||
void ConditionVariableImpl::Signal()
|
void ConditionVariableImpl::Signal()
|
||||||
{
|
{
|
||||||
#if NAZARA_CORE_WINDOWS_VISTA
|
#if NAZARA_CORE_WINDOWS_NT6
|
||||||
WakeConditionVariable(&m_cv);
|
WakeConditionVariable(&m_cv);
|
||||||
#else
|
#else
|
||||||
if (m_count > 0)
|
if (m_count > 0)
|
||||||
|
|
@ -41,7 +41,7 @@ namespace Nz
|
||||||
|
|
||||||
void ConditionVariableImpl::SignalAll()
|
void ConditionVariableImpl::SignalAll()
|
||||||
{
|
{
|
||||||
#if NAZARA_CORE_WINDOWS_VISTA
|
#if NAZARA_CORE_WINDOWS_NT6
|
||||||
WakeAllConditionVariable(&m_cv);
|
WakeAllConditionVariable(&m_cv);
|
||||||
#else
|
#else
|
||||||
if (m_count > 0)
|
if (m_count > 0)
|
||||||
|
|
@ -56,7 +56,7 @@ namespace Nz
|
||||||
|
|
||||||
bool ConditionVariableImpl::Wait(MutexImpl* mutex, UInt32 timeout)
|
bool ConditionVariableImpl::Wait(MutexImpl* mutex, UInt32 timeout)
|
||||||
{
|
{
|
||||||
#if NAZARA_CORE_WINDOWS_VISTA
|
#if NAZARA_CORE_WINDOWS_NT6
|
||||||
return SleepConditionVariableCS(&m_cv, &mutex->m_criticalSection, timeout) == TRUE;
|
return SleepConditionVariableCS(&m_cv, &mutex->m_criticalSection, timeout) == TRUE;
|
||||||
#else
|
#else
|
||||||
m_count++;
|
m_count++;
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ namespace Nz
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ConditionVariableImpl();
|
ConditionVariableImpl();
|
||||||
#if NAZARA_CORE_WINDOWS_VISTA
|
#if NAZARA_CORE_WINDOWS_NT6
|
||||||
~ConditionVariableImpl() = default;
|
~ConditionVariableImpl() = default;
|
||||||
#else
|
#else
|
||||||
~ConditionVariableImpl();
|
~ConditionVariableImpl();
|
||||||
|
|
@ -34,7 +34,7 @@ namespace Nz
|
||||||
bool Wait(MutexImpl* mutex, UInt32 timeout);
|
bool Wait(MutexImpl* mutex, UInt32 timeout);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
#if NAZARA_CORE_WINDOWS_VISTA
|
#if NAZARA_CORE_WINDOWS_NT6
|
||||||
CONDITION_VARIABLE m_cv;
|
CONDITION_VARIABLE m_cv;
|
||||||
#else
|
#else
|
||||||
enum
|
enum
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ namespace Nz
|
||||||
{
|
{
|
||||||
namespace Detail
|
namespace Detail
|
||||||
{
|
{
|
||||||
#if NAZARA_CORE_WINDOWS_VISTA
|
#if NAZARA_CORE_WINDOWS_NT6
|
||||||
using addrinfoImpl = addrinfoW;
|
using addrinfoImpl = addrinfoW;
|
||||||
|
|
||||||
int GetAddressInfo(const String& hostname, const String& service, const addrinfoImpl* hints, addrinfoImpl** results)
|
int GetAddressInfo(const String& hostname, const String& service, const addrinfoImpl* hints, addrinfoImpl** results)
|
||||||
|
|
@ -105,7 +105,7 @@ namespace Nz
|
||||||
return IpAddress::Invalid;
|
return IpAddress::Invalid;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if NAZARA_CORE_WINDOWS_VISTA
|
#if NAZARA_CORE_WINDOWS_NT6
|
||||||
IpAddress IpAddressImpl::FromAddrinfo(const addrinfoW* info)
|
IpAddress IpAddressImpl::FromAddrinfo(const addrinfoW* info)
|
||||||
{
|
{
|
||||||
switch (info->ai_family)
|
switch (info->ai_family)
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ namespace Nz
|
||||||
~IpAddressImpl() = delete;
|
~IpAddressImpl() = delete;
|
||||||
|
|
||||||
static IpAddress FromAddrinfo(const addrinfo* info);
|
static IpAddress FromAddrinfo(const addrinfo* info);
|
||||||
#if NAZARA_CORE_WINDOWS_VISTA
|
#if NAZARA_CORE_WINDOWS_NT6
|
||||||
static IpAddress FromAddrinfo(const addrinfoW* info);
|
static IpAddress FromAddrinfo(const addrinfoW* info);
|
||||||
#endif
|
#endif
|
||||||
static IpAddress FromSockAddr(const sockaddr* address);
|
static IpAddress FromSockAddr(const sockaddr* address);
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
#include <Nazara/Network/IpAddress.hpp>
|
#include <Nazara/Network/IpAddress.hpp>
|
||||||
#include <winsock2.h>
|
#include <winsock2.h>
|
||||||
|
|
||||||
#define NAZARA_NETWORK_POLL_SUPPORT NAZARA_CORE_WINDOWS_VISTA
|
#define NAZARA_NETWORK_POLL_SUPPORT NAZARA_CORE_WINDOWS_NT6
|
||||||
|
|
||||||
namespace Nz
|
namespace Nz
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue