util: port _mesa_strto[df] to C
authorErik Faye-Lund <kusmabite@gmail.com>
Sun, 28 Jun 2015 12:51:08 +0000 (14:51 +0200)
committerMatt Turner <mattst88@gmail.com>
Mon, 29 Jun 2015 16:06:40 +0000 (09:06 -0700)
commitc61bc6ed844b39e600cc64e3e552c7bf1894d7ba
tree9339b5149a583451c69d4ddd0117508bd94244ad
parentde3e323be1bdc40a2a7d724d0f3db7a81a93bbbb
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>
src/glsl/glcpp/glcpp.c
src/glsl/main.cpp
src/mesa/main/context.c
src/util/Makefile.sources
src/util/strtod.c [moved from src/util/strtod.cpp with 89% similarity]
src/util/strtod.h