Skip to content

Commit

Permalink
make sure to not include windows.h in simde
Browse files Browse the repository at this point in the history
Signed-off-by: falkTX <[email protected]>
  • Loading branch information
falkTX committed Nov 25, 2022
1 parent 0e904c7 commit c39e9f9
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 3 deletions.
3 changes: 2 additions & 1 deletion include/mingw-compat/condition_variable
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* DISTRHO Cardinal Plugin
* Copyright (C) 2021 Filipe Coelho <[email protected]>
* Copyright (C) 2021-2022 Filipe Coelho <[email protected]>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
Expand All @@ -19,6 +19,7 @@
#include_next <condition_variable>
#include "mingw.condition_variable.h"

// fix macro pollution from Windows headers
#undef IN
#undef OUT
#undef far
Expand Down
1 change: 1 addition & 0 deletions include/mingw-compat/future
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include_next <future>
#include "mingw.future.h"

// fix macro pollution from Windows headers
#undef IN
#undef OUT
#undef far
Expand Down
3 changes: 2 additions & 1 deletion include/mingw-compat/mutex
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* DISTRHO Cardinal Plugin
* Copyright (C) 2021 Filipe Coelho <[email protected]>
* Copyright (C) 2021-2022 Filipe Coelho <[email protected]>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
Expand All @@ -19,6 +19,7 @@
#include_next <mutex>
#include "mingw.mutex.h"

// fix macro pollution from Windows headers
#undef IN
#undef OUT
#undef far
Expand Down
3 changes: 2 additions & 1 deletion include/mingw-compat/thread
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* DISTRHO Cardinal Plugin
* Copyright (C) 2021 Filipe Coelho <[email protected]>
* Copyright (C) 2021-2022 Filipe Coelho <[email protected]>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
Expand All @@ -19,6 +19,7 @@
#include_next <thread>
#include "mingw.thread.h"

// fix macro pollution from Windows headers
#undef IN
#undef OUT
#undef far
Expand Down
12 changes: 12 additions & 0 deletions include/simd-compat/pmmintrin.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,20 @@
// bring in extra SSE3 support via simde
# define SIMDE_X86_SSE2_NATIVE
# define SIMDE_X86_SSE3_ENABLE_NATIVE_ALIASES

// make sure to not include windows.h here
# ifdef _WIN32
# define _WIN32_WAS_DEFINED
# undef _WIN32
# endif

# include "../simde/simde/x86/sse3.h"

# ifdef _WIN32_WAS_DEFINED
# define _WIN32
# undef _WIN32_WAS_DEFINED
# endif

#elif defined(__EMSCRIPTEN__)
# include_next <pmmintrin.h>

Expand Down

0 comments on commit c39e9f9

Please sign in to comment.