From a8020a1eebb56ae4f3303030b6baab608be695b3 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Mon, 28 Mar 2022 21:45:22 -0700 Subject: Test for features not awks. Let's start the practice of setting up some feature macros in base.h. Then test for features elsewhere. --- cppawk-include/base.h | 4 ++++ cppawk-include/case-priv.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'cppawk-include') diff --git a/cppawk-include/base.h b/cppawk-include/base.h index 1f060cb..aa8cada 100644 --- a/cppawk-include/base.h +++ b/cppawk-include/base.h @@ -40,4 +40,8 @@ #define __present(arg) ((arg) != "" || (arg) != 0) +#if __gawk__ +#define __have_switch 1 +#endif + #endif diff --git a/cppawk-include/case-priv.h b/cppawk-include/case-priv.h index e0572ba..9a62647 100644 --- a/cppawk-include/case-priv.h +++ b/cppawk-include/case-priv.h @@ -36,7 +36,7 @@ #include "base.h" #endif -#if __gawk__ +#if __have_switch #define __casx(x) case x: -- cgit v1.2.3