Browse Source

Alternative approach to undef win32 macro pollution

Signed-off-by: falkTX <falktx@falktx.com>
tags/22.02
falkTX 3 years ago
parent
commit
a6cb9a8e18
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
4 changed files with 15 additions and 33 deletions
  1. +5
    -0
      include/mingw-compat/condition_variable
  2. +5
    -0
      include/mingw-compat/mutex
  3. +5
    -0
      include/mingw-compat/thread
  4. +0
    -33
      include/rack.hpp

+ 5
- 0
include/mingw-compat/condition_variable View File

@@ -18,3 +18,8 @@
#pragma once
#include_next <condition_variable>
#include "mingw.condition_variable.h"

#undef IN
#undef OUT
#undef far
#undef near

+ 5
- 0
include/mingw-compat/mutex View File

@@ -18,3 +18,8 @@
#pragma once
#include_next <mutex>
#include "mingw.mutex.h"
#undef IN
#undef OUT
#undef far
#undef near

+ 5
- 0
include/mingw-compat/thread View File

@@ -18,3 +18,8 @@
#pragma once
#include_next <thread>
#include "mingw.thread.h"

#undef IN
#undef OUT
#undef far
#undef near

+ 0
- 33
include/rack.hpp View File

@@ -1,33 +0,0 @@
/*
* DISTRHO Cardinal Plugin
* Copyright (C) 2021 Filipe Coelho <falktx@falktx.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 3 of
* the License, or any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* For a full copy of the GNU General Public License see the LICENSE file.
*/

#pragma once

#include_next "rack.hpp"

// If building for Windows, make sure to import the windows header now so we can undef some stuff
#ifdef _WIN32
# include <windows.h>
# undef IN
# undef OUT
# undef VOID
# undef far
# undef near
# define ABC ABC_
# define Chord Chord_
# define VOID VOID_
#endif

Loading…
Cancel
Save