From 40d1cc8671870ee13184d0fb5d96a6472886ad66 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Thu, 31 Mar 2022 20:52:16 -0700 Subject: iter: fix circular header inclusion issue. - Add forgotten define __CPPAWK_ITER_H. - This requires the include of "cons.h" to be moved a bit down, since that uses the doarray and whatnot. We move it above loop; "cons.h" doesn't use that. --- cppawk-include/iter.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'cppawk-include') diff --git a/cppawk-include/iter.h b/cppawk-include/iter.h index 57ff81e..8b6a3ce 100644 --- a/cppawk-include/iter.h +++ b/cppawk-include/iter.h @@ -26,15 +26,12 @@ // POSSIBILITY OF SUCH DAMAGE. #ifndef __CPPAWK_ITER_H +#define __CPPAWK_ITER_H #ifndef __CPPAWK_BASE_H #include "base.h" #endif -#ifndef __CPPAWK_CONS_H -#include "cons.h" -#endif - #ifndef __CPPAWK_NARG_PRIV_H #include "narg-priv.h" #endif @@ -53,6 +50,10 @@ for (index = 1; index <= NF; index++) \ if ((val = $ index) || 1) +#ifndef __CPPAWK_CONS_H +#include "cons.h" +#endif + #define loop(...) for (__loop_init(__VA_ARGS__); \ (__loop_test(__VA_ARGS__) || \ __loop_fini(__VA_ARGS__)) && \ -- cgit v1.2.3