From e3f20294799d727107012d40f6c973975084e4e6 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Wed, 20 Aug 2014 14:40:22 +0800 Subject: util: add _mesa_strtod and _mesa_strtof Both core mesa and glsl have their own wrappers for strtof_l. Merge and move them to util/. They are compiled with a C++ compiler so that we can make them thread-safe in a following commit. Signed-off-by: Chia-I Wu Reviewed-by: Kenneth Graunke --- src/glsl/glsl_lexer.ll | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/glsl/glsl_lexer.ll') diff --git a/src/glsl/glsl_lexer.ll b/src/glsl/glsl_lexer.ll index e66a935..ad6d32f 100644 --- a/src/glsl/glsl_lexer.ll +++ b/src/glsl/glsl_lexer.ll @@ -23,7 +23,7 @@ */ #include #include -#include "strtod.h" +#include "util/strtod.h" #include "ast.h" #include "glsl_parser_extras.h" #include "glsl_parser.h" @@ -451,23 +451,23 @@ layout { } [0-9]+\.[0-9]+([eE][+-]?[0-9]+)?[fF]? { - yylval->real = glsl_strtof(yytext, NULL); + yylval->real = _mesa_strtof(yytext, NULL); return FLOATCONSTANT; } \.[0-9]+([eE][+-]?[0-9]+)?[fF]? { - yylval->real = glsl_strtof(yytext, NULL); + yylval->real = _mesa_strtof(yytext, NULL); return FLOATCONSTANT; } [0-9]+\.([eE][+-]?[0-9]+)?[fF]? { - yylval->real = glsl_strtof(yytext, NULL); + yylval->real = _mesa_strtof(yytext, NULL); return FLOATCONSTANT; } [0-9]+[eE][+-]?[0-9]+[fF]? { - yylval->real = glsl_strtof(yytext, NULL); + yylval->real = _mesa_strtof(yytext, NULL); return FLOATCONSTANT; } [0-9]+[fF] { - yylval->real = glsl_strtof(yytext, NULL); + yylval->real = _mesa_strtof(yytext, NULL); return FLOATCONSTANT; } -- cgit v1.1