diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2022-03-24 23:06:58 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2022-03-24 23:06:58 -0700 |
commit | 6fc3b2c676022bc95eaf275e1c9d58bffedfbdad (patch) | |
tree | d0fbb374375c9cd13600cd3b500042a5f1edf7a4 | |
parent | 7ff3eec770fec644870762c31f433c497ee93f05 (diff) | |
download | cppawk-6fc3b2c676022bc95eaf275e1c9d58bffedfbdad.tar.gz cppawk-6fc3b2c676022bc95eaf275e1c9d58bffedfbdad.tar.bz2 cppawk-6fc3b2c676022bc95eaf275e1c9d58bffedfbdad.zip |
Pass -std=c99 to cpp to remove crap like #define linux.
-rwxr-xr-x | cppawk | 3 | ||||
-rw-r--r-- | testcases | 7 |
2 files changed, 8 insertions, 2 deletions
@@ -31,8 +31,9 @@ prepro=cpp incopt=-iquote # GNU extension: must be changed to -I for traditional cpp dumpopt=-dM # GNU cpp option to dump macros +stdopt=-std=c99 # GNU cpp option for standard conformance awk=gawk -prepro_opts="-D__gawk__=1 -D__cppawk_ver=20220324" +prepro_opts="-D__gawk__=1 -D__cppawk_ver=20220324 $stdopt" # globals bash=${BASH_VERSION+y} @@ -187,7 +187,7 @@ yes 33: $cppawk --prepro-only --prepro=./testdir/testcpp abc : -[-iq][-D_][-D_][-I.][-] +[-iq][-D_][-D_][-st][-I.][-] -- 34: $cppawk --prepro-only --awk=mawk mawk=__mawk__ | grep mawk @@ -245,3 +245,8 @@ testdir/name.cwk $cppawk --dump-macros '#define foo_bar 42' | grep foo_bar : #define foo_bar 42 +-- +43: +$cppawk --dump-macros x | (grep -q '#define [A-Za-z]' || echo "clean") +: +clean |