mesa: use a prefix for the program lex
authorDave Airlie <airlied@redhat.com>
Fri, 14 Sep 2012 00:05:53 +0000 (10:05 +1000)
committerDave Airlie <airlied@gmail.com>
Fri, 14 Sep 2012 22:20:56 +0000 (08:20 +1000)
This avoids us making a global yylex symbol which will interfere will
all sorts of apps.

with libdricore which can't do symbol visibility currently we pollute
the namespace with this.

This is a candidate for 9.0 & stable branches.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/mesa/Makefile.am
src/mesa/program/program_lexer.l

index 57325afabf7532cd733cf4a7e39ceae51370cc97..8e4530da306a86fd5cf275ab13031e13ba07066d 100644 (file)
@@ -73,7 +73,7 @@ main/api_exec_es1.c: main/APIspec.xml main/es_generator.py main/APIspecutil.py m
 
 program/program_parse.tab.c program/program_parse.tab.h: program/program_parse.y
        $(MKDIR_P) program
-       $(AM_V_GEN) $(YACC) -v -d --output=program/program_parse.tab.c $<
+       $(AM_V_GEN) $(YACC) -p "_mesa_program_" -v -d --output=program/program_parse.tab.c $<
 
 program/lex.yy.c: program/program_lexer.l
        $(MKDIR_P) program
index 0a50dab97fd4fd48e5d342febf1b16f98bf20bcd..0947bb0462cb75dd0fc19929d8b01628b32ce71b 100644 (file)
@@ -165,6 +165,7 @@ szf    [HR]?
 cc     C?
 sat    (_SAT)?
 
+%option prefix="_mesa_program_"
 %option bison-bridge bison-locations reentrant noyywrap
 %%