diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2022-03-28 21:45:22 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2022-03-28 21:45:22 -0700 |
commit | a8020a1eebb56ae4f3303030b6baab608be695b3 (patch) | |
tree | aa339b7697833bbed15de58dae0f34129415f101 | |
parent | 307209981bb26d3472f5eea98b4174278a1ada0e (diff) | |
download | cppawk-a8020a1eebb56ae4f3303030b6baab608be695b3.tar.gz cppawk-a8020a1eebb56ae4f3303030b6baab608be695b3.tar.bz2 cppawk-a8020a1eebb56ae4f3303030b6baab608be695b3.zip |
Test for features not awks.
Let's start the practice of setting up some feature macros in
base.h. Then test for features elsewhere.
-rw-r--r-- | cppawk-include/base.h | 4 | ||||
-rw-r--r-- | cppawk-include/case-priv.h | 2 |
2 files changed, 5 insertions, 1 deletions
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: |