summaryrefslogtreecommitdiffstats
path: root/src/glsl/glcpp
diff options
context:
space:
mode:
authorErik Faye-Lund <kusmabite@gmail.com>2015-06-28 14:51:08 +0200
committerMatt Turner <mattst88@gmail.com>2015-06-29 09:06:40 -0700
commitc61bc6ed844b39e600cc64e3e552c7bf1894d7ba (patch)
tree9339b5149a583451c69d4ddd0117508bd94244ad /src/glsl/glcpp
parentde3e323be1bdc40a2a7d724d0f3db7a81a93bbbb (diff)
downloadexternal_mesa3d-c61bc6ed844b39e600cc64e3e552c7bf1894d7ba.zip
external_mesa3d-c61bc6ed844b39e600cc64e3e552c7bf1894d7ba.tar.gz
external_mesa3d-c61bc6ed844b39e600cc64e3e552c7bf1894d7ba.tar.bz2
util: port _mesa_strto[df] to C
_mesa_strtod and _mesa_strtof are only used from the GLSL compiler and the ARB_[vertex|fragment]_program code, meaning that the locale doesn't need to be initialized before the first OpenGL context gets initialized. So let's use explicit initialization from the one-time init code instead of depending on a C++ compiler to initialize at image-load time. Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com>
Diffstat (limited to 'src/glsl/glcpp')
-rw-r--r--src/glsl/glcpp/glcpp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/glsl/glcpp/glcpp.c b/src/glsl/glcpp/glcpp.c
index 5144516..c62f4ef 100644
--- a/src/glsl/glcpp/glcpp.c
+++ b/src/glsl/glcpp/glcpp.c
@@ -29,6 +29,7 @@
#include "glcpp.h"
#include "main/mtypes.h"
#include "main/shaderobj.h"
+#include "util/strtod.h"
extern int glcpp_parser_debug;
@@ -168,6 +169,8 @@ main (int argc, char *argv[])
if (shader == NULL)
return 1;
+ _mesa_locale_init();
+
ret = glcpp_preprocess(ctx, &shader, &info_log, NULL, &gl_ctx);
printf("%s", shader);