Build fixes for windows.

This commit is contained in:
Gunnar Beutner 2012-05-31 09:08:08 +02:00
parent 57be84ab04
commit 4bd4280737
2 changed files with 38 additions and 40 deletions

View File

@ -515,7 +515,9 @@ do { \
result = yyextra->Input->gcount(); \ result = yyextra->Input->gcount(); \
} while (0) } while (0)
#line 519 "icinga_lexer.cc" #define YY_NO_UNISTD_H
#line 521 "icinga_lexer.cc"
#define INITIAL 0 #define INITIAL 0
#define IN_C_COMMENT 1 #define IN_C_COMMENT 1
@ -762,9 +764,9 @@ YY_DECL
register int yy_act; register int yy_act;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
#line 21 "icinga_lexer.ll" #line 24 "icinga_lexer.ll"
#line 768 "icinga_lexer.cc" #line 770 "icinga_lexer.cc"
yylval = yylval_param; yylval = yylval_param;
@ -827,16 +829,12 @@ yy_match:
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
++yy_cp; ++yy_cp;
} }
while ( yy_base[yy_current_state] != 94 ); while ( yy_current_state != 64 );
yy_cp = yyg->yy_last_accepting_cpos;
yy_current_state = yyg->yy_last_accepting_state;
yy_find_action: yy_find_action:
yy_act = yy_accept[yy_current_state]; yy_act = yy_accept[yy_current_state];
if ( yy_act == 0 )
{ /* have to back up */
yy_cp = yyg->yy_last_accepting_cpos;
yy_current_state = yyg->yy_last_accepting_state;
yy_act = yy_accept[yy_current_state];
}
YY_DO_BEFORE_ACTION; YY_DO_BEFORE_ACTION;
@ -865,122 +863,122 @@ do_action: /* This label is used only to access EOF actions. */
case 1: case 1:
YY_RULE_SETUP YY_RULE_SETUP
#line 22 "icinga_lexer.ll" #line 25 "icinga_lexer.ll"
return T_ABSTRACT; return T_ABSTRACT;
YY_BREAK YY_BREAK
case 2: case 2:
YY_RULE_SETUP YY_RULE_SETUP
#line 23 "icinga_lexer.ll" #line 26 "icinga_lexer.ll"
return T_LOCAL; return T_LOCAL;
YY_BREAK YY_BREAK
case 3: case 3:
YY_RULE_SETUP YY_RULE_SETUP
#line 24 "icinga_lexer.ll" #line 27 "icinga_lexer.ll"
return T_OBJECT; return T_OBJECT;
YY_BREAK YY_BREAK
case 4: case 4:
YY_RULE_SETUP YY_RULE_SETUP
#line 25 "icinga_lexer.ll" #line 28 "icinga_lexer.ll"
return T_INCLUDE; return T_INCLUDE;
YY_BREAK YY_BREAK
case 5: case 5:
YY_RULE_SETUP YY_RULE_SETUP
#line 26 "icinga_lexer.ll" #line 29 "icinga_lexer.ll"
return T_INHERITS; return T_INHERITS;
YY_BREAK YY_BREAK
case 6: case 6:
YY_RULE_SETUP YY_RULE_SETUP
#line 27 "icinga_lexer.ll" #line 30 "icinga_lexer.ll"
return T_IDENTIFIER; return T_IDENTIFIER;
YY_BREAK YY_BREAK
case 7: case 7:
/* rule 7 can match eol */ /* rule 7 can match eol */
YY_RULE_SETUP YY_RULE_SETUP
#line 28 "icinga_lexer.ll" #line 31 "icinga_lexer.ll"
{ yytext[yyleng-1] = '\0'; yylval->text = strdup(yytext + 1); return T_STRING; } { yytext[yyleng-1] = '\0'; yylval->text = strdup(yytext + 1); return T_STRING; }
YY_BREAK YY_BREAK
case 8: case 8:
YY_RULE_SETUP YY_RULE_SETUP
#line 29 "icinga_lexer.ll" #line 32 "icinga_lexer.ll"
{ yylval->num = atoi(yytext); return T_NUMBER; } { yylval->num = atoi(yytext); return T_NUMBER; }
YY_BREAK YY_BREAK
case 9: case 9:
YY_RULE_SETUP YY_RULE_SETUP
#line 30 "icinga_lexer.ll" #line 33 "icinga_lexer.ll"
return T_OPEN_BRACE; return T_OPEN_BRACE;
YY_BREAK YY_BREAK
case 10: case 10:
YY_RULE_SETUP YY_RULE_SETUP
#line 31 "icinga_lexer.ll" #line 34 "icinga_lexer.ll"
return T_CLOSE_BRACE; return T_CLOSE_BRACE;
YY_BREAK YY_BREAK
case 11: case 11:
YY_RULE_SETUP YY_RULE_SETUP
#line 32 "icinga_lexer.ll" #line 35 "icinga_lexer.ll"
return T_OPEN_BRACKET; return T_OPEN_BRACKET;
YY_BREAK YY_BREAK
case 12: case 12:
YY_RULE_SETUP YY_RULE_SETUP
#line 33 "icinga_lexer.ll" #line 36 "icinga_lexer.ll"
return T_CLOSE_BRACKET; return T_CLOSE_BRACKET;
YY_BREAK YY_BREAK
case 13: case 13:
YY_RULE_SETUP YY_RULE_SETUP
#line 34 "icinga_lexer.ll" #line 37 "icinga_lexer.ll"
return T_COMMA; return T_COMMA;
YY_BREAK YY_BREAK
case 14: case 14:
YY_RULE_SETUP YY_RULE_SETUP
#line 35 "icinga_lexer.ll" #line 38 "icinga_lexer.ll"
return T_EQUAL; return T_EQUAL;
YY_BREAK YY_BREAK
case 15: case 15:
YY_RULE_SETUP YY_RULE_SETUP
#line 38 "icinga_lexer.ll" #line 41 "icinga_lexer.ll"
BEGIN(IN_C_COMMENT); BEGIN(IN_C_COMMENT);
YY_BREAK YY_BREAK
case 16: case 16:
YY_RULE_SETUP YY_RULE_SETUP
#line 42 "icinga_lexer.ll" #line 45 "icinga_lexer.ll"
BEGIN(INITIAL); BEGIN(INITIAL);
YY_BREAK YY_BREAK
case 17: case 17:
/* rule 17 can match eol */ /* rule 17 can match eol */
YY_RULE_SETUP YY_RULE_SETUP
#line 43 "icinga_lexer.ll" #line 46 "icinga_lexer.ll"
/* ignore comment */ /* ignore comment */
YY_BREAK YY_BREAK
case 18: case 18:
YY_RULE_SETUP YY_RULE_SETUP
#line 44 "icinga_lexer.ll" #line 47 "icinga_lexer.ll"
/* ignore star */ /* ignore star */
YY_BREAK YY_BREAK
case 19: case 19:
YY_RULE_SETUP YY_RULE_SETUP
#line 47 "icinga_lexer.ll" #line 50 "icinga_lexer.ll"
/* ignore C++-style comments */ /* ignore C++-style comments */
YY_BREAK YY_BREAK
case 20: case 20:
YY_RULE_SETUP YY_RULE_SETUP
#line 48 "icinga_lexer.ll" #line 51 "icinga_lexer.ll"
/* ignore shell-style comments */ /* ignore shell-style comments */
YY_BREAK YY_BREAK
case 21: case 21:
/* rule 21 can match eol */ /* rule 21 can match eol */
YY_RULE_SETUP YY_RULE_SETUP
#line 49 "icinga_lexer.ll" #line 52 "icinga_lexer.ll"
/* ignore whitespace */ /* ignore whitespace */
YY_BREAK YY_BREAK
case 22: case 22:
YY_RULE_SETUP YY_RULE_SETUP
#line 50 "icinga_lexer.ll" #line 53 "icinga_lexer.ll"
ECHO; ECHO;
YY_BREAK YY_BREAK
#line 984 "icinga_lexer.cc" #line 982 "icinga_lexer.cc"
case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(IN_C_COMMENT): case YY_STATE_EOF(IN_C_COMMENT):
yyterminate(); yyterminate();
@ -1048,7 +1046,8 @@ case YY_STATE_EOF(IN_C_COMMENT):
else else
{ {
yy_cp = yyg->yy_c_buf_p; yy_cp = yyg->yy_last_accepting_cpos;
yy_current_state = yyg->yy_last_accepting_state;
goto yy_find_action; goto yy_find_action;
} }
} }
@ -1551,10 +1550,6 @@ static void yy_load_buffer_state (yyscan_t yyscanner)
yyfree((void *) b ,yyscanner ); yyfree((void *) b ,yyscanner );
} }
#ifndef __cplusplus
extern int isatty (int );
#endif /* __cplusplus */
/* Initializes or reinitializes a buffer. /* Initializes or reinitializes a buffer.
* This function is sometimes called more than once on the same buffer, * This function is sometimes called more than once on the same buffer,
* such as during a yyrestart() or at EOF. * such as during a yyrestart() or at EOF.
@ -1579,7 +1574,7 @@ extern int isatty (int );
b->yy_bs_column = 0; b->yy_bs_column = 0;
} }
b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; b->yy_is_interactive = 0;
errno = oerrno; errno = oerrno;
} }
@ -2171,7 +2166,7 @@ void yyfree (void * ptr , yyscan_t yyscanner)
#define YYTABLES_NAME "yytables" #define YYTABLES_NAME "yytables"
#line 50 "icinga_lexer.ll" #line 53 "icinga_lexer.ll"

View File

@ -11,10 +11,13 @@ do { \
yyextra->Input->read(buf, max_size); \ yyextra->Input->read(buf, max_size); \
result = yyextra->Input->gcount(); \ result = yyextra->Input->gcount(); \
} while (0) } while (0)
#define YY_NO_UNISTD_H
%} %}
%option reentrant noyywrap yylineno %option reentrant noyywrap yylineno
%option bison-bridge bison-locations %option bison-bridge bison-locations
%option never-interactive
%x IN_C_COMMENT %x IN_C_COMMENT