Explorar o código

Common: Make MinGW build use Windows Fibers instead of fcontext_t

Fernando Sahmkow %!s(int64=6) %!d(string=hai) anos
pai
achega
3398f701ee
Modificáronse 2 ficheiros con 4 adicións e 4 borrados
  1. 2 2
      src/common/fiber.cpp
  2. 2 2
      src/common/fiber.h

+ 2 - 2
src/common/fiber.cpp

@@ -4,7 +4,7 @@
 
 #include "common/assert.h"
 #include "common/fiber.h"
-#ifdef _MSC_VER
+#if defined(_WIN32) || defined(WIN32)
 #include <windows.h>
 #else
 #include <boost/context/detail/fcontext.hpp>
@@ -12,7 +12,7 @@
 
 namespace Common {
 
-#ifdef _MSC_VER
+#if defined(_WIN32) || defined(WIN32)
 
 struct Fiber::FiberImpl {
     LPVOID handle = nullptr;

+ 2 - 2
src/common/fiber.h

@@ -10,7 +10,7 @@
 #include "common/common_types.h"
 #include "common/spin_lock.h"
 
-#ifndef _MSC_VER
+#if !defined(_WIN32) && !defined(WIN32)
 namespace boost::context::detail {
 struct transfer_t;
 }
@@ -57,7 +57,7 @@ public:
 private:
     Fiber();
 
-#ifdef _MSC_VER
+#if defined(_WIN32) || defined(WIN32)
     void start();
     static void FiberStartFunc(void* fiber_parameter);
 #else