From 3d35a5610c2604ef8759b5ce8b4a326ff8f7c0fb Mon Sep 17 00:00:00 2001 From: Adam Fontenot Date: Sat, 20 Feb 2021 00:08:25 -0800 Subject: [PATCH] Fix compilation with ICU 68 nip2 depends on the ICU library via libxml2. ICU released version 68 on 2010-10-28, and switched to using the C99 bool type in its public headers. nip2 was using "bool" as the name for a gboolean in the ParseConst struct. This commit renames this to "boolean". --- src/compile.c | 4 ++-- src/lex.l | 4 ++-- src/tree.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/compile.c b/src/compile.c index bd9c6ae3..2d341db2 100644 --- a/src/compile.c +++ b/src/compile.c @@ -815,7 +815,7 @@ compile_graph( Compile *compile, ParseNode *pn, PElement *out ) break; case PARSE_CONST_BOOL: - PEPUTP( out, ELEMENT_BOOL, pn->con.val.bool ); + PEPUTP( out, ELEMENT_BOOL, pn->con.val.boolean ); break; case PARSE_CONST_ELIST: @@ -2523,7 +2523,7 @@ compile_pattern_condition( Compile *compile, int i; n.type = PARSE_CONST_BOOL; - n.val.bool = TRUE; + n.val.boolean = TRUE; node = tree_const_new( compile, n ); for( i = depth - 1; i >= 0; i-- ) { diff --git a/src/lex.l b/src/lex.l index db5d9935..de8a152f 100644 --- a/src/lex.l +++ b/src/lex.l @@ -207,7 +207,7 @@ TRUE { BEGIN BINARY; yylval.yy_const.type = PARSE_CONST_BOOL; - yylval.yy_const.val.bool = TRUE; + yylval.yy_const.val.boolean = TRUE; return( TK_CONST ); } @@ -216,7 +216,7 @@ FALSE { BEGIN BINARY; yylval.yy_const.type = PARSE_CONST_BOOL; - yylval.yy_const.val.bool = FALSE; + yylval.yy_const.val.boolean = FALSE; return( TK_CONST ); } diff --git a/src/tree.h b/src/tree.h index 2b18ef2a..9238a990 100644 --- a/src/tree.h +++ b/src/tree.h @@ -126,7 +126,7 @@ struct _ParseConst { union { double num; char *str; - gboolean bool; + gboolean boolean; int ch; } val; };