Remove some always-true conditions (versions not supported anymore)
This commit is contained in:
parent
e564bba215
commit
26060a6e0b
|
@ -191,13 +191,7 @@ final class PosixEventDriverCore(Loop : PosixEventLoop, Timers : EventDriverTime
|
|||
m_events = events;
|
||||
m_processes = processes;
|
||||
m_wakeupEvent = events.createInternal();
|
||||
|
||||
static if (__VERSION__ >= 2074)
|
||||
m_threadCallbackMutex = mallocT!(shared(Mutex));
|
||||
else {
|
||||
() @trusted { m_threadCallbackMutex = cast(shared)mallocT!Mutex; } ();
|
||||
}
|
||||
|
||||
m_threadCallbacks = mallocT!(ConsumableQueue!ThreadCallbackEntry);
|
||||
m_threadCallbacks.reserve(1000);
|
||||
}
|
||||
|
|
|
@ -42,12 +42,6 @@ version (linux) {
|
|||
static if (!is(typeof(SOCK_CLOEXEC)))
|
||||
enum SOCK_CLOEXEC = 0x80000;
|
||||
|
||||
static if (__VERSION__ < 2077)
|
||||
{
|
||||
enum IP_ADD_MEMBERSHIP = 35;
|
||||
enum IP_MULTICAST_LOOP = 34;
|
||||
}
|
||||
else
|
||||
import core.sys.linux.netinet.in_ : IP_ADD_MEMBERSHIP, IP_MULTICAST_LOOP;
|
||||
|
||||
// Linux-specific TCP options
|
||||
|
@ -65,18 +59,12 @@ version (linux) {
|
|||
enum TCP_USER_TIMEOUT = 18;
|
||||
}
|
||||
version (OSX) {
|
||||
static if (__VERSION__ < 2077) {
|
||||
enum IP_ADD_MEMBERSHIP = 12;
|
||||
enum IP_MULTICAST_LOOP = 11;
|
||||
} else import core.sys.darwin.netinet.in_ : IP_ADD_MEMBERSHIP, IP_MULTICAST_LOOP;
|
||||
import core.sys.darwin.netinet.in_ : IP_ADD_MEMBERSHIP, IP_MULTICAST_LOOP;
|
||||
|
||||
static if (!is(typeof(ESHUTDOWN))) enum ESHUTDOWN = 58;
|
||||
}
|
||||
version (FreeBSD) {
|
||||
static if (__VERSION__ < 2077) {
|
||||
enum IP_ADD_MEMBERSHIP = 12;
|
||||
enum IP_MULTICAST_LOOP = 11;
|
||||
} else import core.sys.freebsd.netinet.in_ : IP_ADD_MEMBERSHIP, IP_MULTICAST_LOOP;
|
||||
import core.sys.freebsd.netinet.in_ : IP_ADD_MEMBERSHIP, IP_MULTICAST_LOOP;
|
||||
}
|
||||
version (DragonFlyBSD) {
|
||||
import core.sys.dragonflybsd.netinet.in_ : IP_ADD_MEMBERSHIP, IP_MULTICAST_LOOP;
|
||||
|
|
|
@ -13,10 +13,7 @@ version (Posix) {
|
|||
import core.sys.posix.unistd;
|
||||
}
|
||||
version (Windows) {
|
||||
static if (__VERSION__ >= 2070)
|
||||
import core.sys.windows.stat;
|
||||
else
|
||||
import std.c.windows.stat;
|
||||
|
||||
private {
|
||||
// TODO: use CreateFile/HANDLE instead of the Posix API on Windows
|
||||
|
|
|
@ -45,12 +45,7 @@ final class WinAPIEventDriverCore : EventDriverCore {
|
|||
m_fileCompletionEvent = () @trusted { return CreateEventW(null, false, false, null); } ();
|
||||
registerEvent(m_fileCompletionEvent);
|
||||
m_ioEvents = mallocT!(ConsumableQueue!IOEvent);
|
||||
|
||||
static if (__VERSION__ >= 2074)
|
||||
m_threadCallbackMutex = mallocT!(shared(Mutex));
|
||||
else {
|
||||
() @trusted { m_threadCallbackMutex = cast(shared)mallocT!Mutex; } ();
|
||||
}
|
||||
m_threadCallbacks = mallocT!(ConsumableQueue!ThreadCallbackEntry);
|
||||
m_threadCallbacks.reserve(1000);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue