diff --git a/source/eventcore/drivers/posix/driver.d b/source/eventcore/drivers/posix/driver.d index 10c9551..e56f6d9 100644 --- a/source/eventcore/drivers/posix/driver.d +++ b/source/eventcore/drivers/posix/driver.d @@ -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_threadCallbackMutex = mallocT!(shared(Mutex)); m_threadCallbacks = mallocT!(ConsumableQueue!ThreadCallbackEntry); m_threadCallbacks.reserve(1000); } diff --git a/source/eventcore/drivers/posix/sockets.d b/source/eventcore/drivers/posix/sockets.d index 4acb54f..8e03ae2 100644 --- a/source/eventcore/drivers/posix/sockets.d +++ b/source/eventcore/drivers/posix/sockets.d @@ -42,13 +42,7 @@ 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; + import core.sys.linux.netinet.in_ : IP_ADD_MEMBERSHIP, IP_MULTICAST_LOOP; // Linux-specific TCP options // https://github.com/torvalds/linux/blob/master/include/uapi/linux/tcp.h#L95 @@ -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; diff --git a/source/eventcore/drivers/threadedfile.d b/source/eventcore/drivers/threadedfile.d index 5b04421..c3b9dd4 100644 --- a/source/eventcore/drivers/threadedfile.d +++ b/source/eventcore/drivers/threadedfile.d @@ -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; + import core.sys.windows.stat; private { // TODO: use CreateFile/HANDLE instead of the Posix API on Windows diff --git a/source/eventcore/drivers/winapi/core.d b/source/eventcore/drivers/winapi/core.d index 16aa0a9..f7070da 100644 --- a/source/eventcore/drivers/winapi/core.d +++ b/source/eventcore/drivers/winapi/core.d @@ -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_threadCallbackMutex = mallocT!(shared(Mutex)); m_threadCallbacks = mallocT!(ConsumableQueue!ThreadCallbackEntry); m_threadCallbacks.reserve(1000); }