From: Manuel Sanmartin (no email) Date: Mon, 23 Nov 2009 20:57:29 +0000 (+0100) Subject: liboconfig: Rename the “TRUE” and “FALSE” tokens. X-Git-Tag: collectd-4.9.0~27^2~10 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=5a755809bac6e3b0070abbaa02f65abdd318d2ec;p=collectd.git liboconfig: Rename the “TRUE” and “FALSE” tokens. They are defines in under AIX. --- diff --git a/src/liboconfig/parser.y b/src/liboconfig/parser.y index 49cd139d..5b7aa94a 100644 --- a/src/liboconfig/parser.y +++ b/src/liboconfig/parser.y @@ -46,7 +46,7 @@ extern char *c_file; } %token NUMBER -%token TRUE FALSE +%token BTRUE BFALSE %token QUOTED_STRING UNQUOTED_STRING %token SLASH OPENBRAC CLOSEBRAC EOL @@ -76,8 +76,8 @@ string: argument: NUMBER {$$.value.number = $1; $$.type = OCONFIG_TYPE_NUMBER;} - | TRUE {$$.value.boolean = 1; $$.type = OCONFIG_TYPE_BOOLEAN;} - | FALSE {$$.value.boolean = 0; $$.type = OCONFIG_TYPE_BOOLEAN;} + | BTRUE {$$.value.boolean = 1; $$.type = OCONFIG_TYPE_BOOLEAN;} + | BFALSE {$$.value.boolean = 0; $$.type = OCONFIG_TYPE_BOOLEAN;} | string {$$.value.string = $1; $$.type = OCONFIG_TYPE_STRING;} ; diff --git a/src/liboconfig/scanner.l b/src/liboconfig/scanner.l index b559e863..9f0cd8e3 100644 --- a/src/liboconfig/scanner.l +++ b/src/liboconfig/scanner.l @@ -69,8 +69,8 @@ IPV4_ADDR {IP_BYTE}\.{IP_BYTE}\.{IP_BYTE}\.{IP_BYTE}(:{PORT})? "/" {return (SLASH);} "<" {return (OPENBRAC);} ">" {return (CLOSEBRAC);} -{BOOL_TRUE} {yylval.boolean = 1; return (TRUE);} -{BOOL_FALSE} {yylval.boolean = 0; return (FALSE);} +{BOOL_TRUE} {yylval.boolean = 1; return (BTRUE);} +{BOOL_FALSE} {yylval.boolean = 0; return (BFALSE);} {IPV4_ADDR} {yylval.string = yytext; return (UNQUOTED_STRING);}