From f0b1c507091902e7f500adf55706c13e590c837e Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 9 Oct 2022 20:02:18 +0100 Subject: [PATCH] Fix headers for C builds Fixes #1691 --- source/backend/CarlaBackend.h | 2 +- source/includes/CarlaDefines.h | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/source/backend/CarlaBackend.h b/source/backend/CarlaBackend.h index 45b560635..37f5d5fe3 100644 --- a/source/backend/CarlaBackend.h +++ b/source/backend/CarlaBackend.h @@ -340,7 +340,7 @@ static constexpr const uint PARAMETER_IS_ENABLED = 0x010; */ static constexpr const uint PARAMETER_IS_AUTOMATABLE = 0x020; -// for backwards compatibility +/* for backwards compatibility */ static constexpr const uint PARAMETER_IS_AUTOMABLE = PARAMETER_IS_AUTOMATABLE; /*! diff --git a/source/includes/CarlaDefines.h b/source/includes/CarlaDefines.h index afe2caf62..9daa0a2b1 100644 --- a/source/includes/CarlaDefines.h +++ b/source/includes/CarlaDefines.h @@ -76,8 +76,8 @@ # if __cplusplus >= 201103L || (defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 && defined(__GXX_EXPERIMENTAL_CXX0X__)) || __has_extension(cxx_noexcept) # define CARLA_PROPER_CPP11_SUPPORT # if (defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) < 407 && ! defined(__clang__)) || (defined(__clang__) && ! __has_extension(cxx_override_control)) -# define override // gcc4.7+ only -# define final // gcc4.7+ only +# define override /* gcc4.7+ only */ +# define final /* gcc4.7+ only */ # endif # endif #endif @@ -96,6 +96,7 @@ #else # include # include +# define constexpr /* note: constexpr is coming to C soon, but no compilers support it yet */ #endif /* Define various string format types */