Browse Source

Fix ncnn error in MinGW compilation of windows system (#1645)

tags/20200413
新无止竞博客 GitHub 6 years ago
parent
commit
5ea683f202
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      src/platform.h.in

+ 4
- 4
src/platform.h.in View File

@@ -25,7 +25,7 @@
#cmakedefine01 NCNN_REQUANT #cmakedefine01 NCNN_REQUANT
#cmakedefine01 NCNN_AVX2 #cmakedefine01 NCNN_AVX2


#ifdef _WIN32
#if (defined _WIN32 && !(defined __MINGW32__))
#define WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN
#include <windows.h> #include <windows.h>
#include <process.h> #include <process.h>
@@ -39,7 +39,7 @@


namespace ncnn { namespace ncnn {


#ifdef _WIN32
#if (defined _WIN32 && !(defined __MINGW32__))
class Mutex class Mutex
{ {
public: public:
@@ -75,7 +75,7 @@ private:
Mutex& mutex; Mutex& mutex;
}; };


#if _WIN32
#if (defined _WIN32 && !(defined __MINGW32__))
class ConditionVariable class ConditionVariable
{ {
public: public:
@@ -101,7 +101,7 @@ private:
}; };
#endif // _WIN32 #endif // _WIN32


#if _WIN32
#if (defined _WIN32 && !(defined __MINGW32__))
static unsigned __stdcall start_wrapper(void* args); static unsigned __stdcall start_wrapper(void* args);
class Thread class Thread
{ {


Loading…
Cancel
Save