From fd0115db1ebfce67d121a8ea750ec115ca70df85 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Wed, 17 Apr 2013 19:05:23 +1000 Subject: Attempt to fix up Windows yyparse issue, but ultimately fail, then notice it's possibly not being used anyway, so just commit it. --- linden/indra/lscript/lscript_compile/indra.l | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) (limited to 'linden') diff --git a/linden/indra/lscript/lscript_compile/indra.l b/linden/indra/lscript/lscript_compile/indra.l index 584087e..7f4cdc5 100644 --- a/linden/indra/lscript/lscript_compile/indra.l +++ b/linden/indra/lscript/lscript_compile/indra.l @@ -53,9 +53,16 @@ void parse_string(); #define ECHO do { } while (0) #if defined(__cplusplus) -extern "C" { int yylex( void ); } -extern "C" { int yyparse( void ); } -extern "C" { int yyerror(const char *fmt, ...); } +extern "C" { +#endif +int yyerror(const char *fmt, ...); +int yylex( void ); +// Windows defines this in indra.y.hpp, which is included above, and defines it differently. +#ifndef LL_WINDOWS +int yyparse( void ); +#endif +#if defined(__cplusplus) +} #endif %} @@ -722,9 +729,6 @@ L?\"(\\.|[^\\"])*\" { parse_string(); count(); return(STRING_CONSTANT); } LLScriptAllocationManager *gAllocationManager; LLScriptScript *gScriptp; -// Prototype for the yacc parser entry point -int yyparse(void); - int yyerror(const char *fmt, ...) { gErrorToText.writeError(yyout, gLine, gColumn, LSERROR_SYNTAX_ERROR); @@ -760,7 +764,13 @@ BOOL lscript_compile(const char* src_filename, const char* dst_filename, yyrestart(yyin); - b_parse_ok = !yyparse(); +// TODO - Try to fix this, but for now, no compiling LSL for Windows in SL. +// Actually, this seems to not actually be needed anymore? +// I thought it was needed to support ancient pre Mono LSL scripts, which only work in SL anyway, but they still work fine. Perhaps SL fixed it server side? +// If that's the case, we don't need any of this stuff. +#ifndef LL_WINDOWS +// b_parse_ok = !yyparse(); +#endif if (b_parse_ok) { -- cgit v1.1