summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorAlex Deucher <[email protected]>2009-10-19 12:10:59 -0400
committerAlex Deucher <[email protected]>2009-10-19 12:10:59 -0400
commit620270c76e7241fe4c391e31e3706468d708fe69 (patch)
treeda8664d287043ab9db78500609f460d2c6d0b59d /src/mesa/main
parent35b98e2884bd7c76c43fa08d5bb0a8f1396d3298 (diff)
parent16e21191e26084848c7e6e3ffd9e15ef670855c5 (diff)
Merge branch 'mesa_7_6_branch' of git+ssh://[email protected]/git/mesa/mesa
regenerated lex.yy.c
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/imports.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c
index 6ffaddcde96..87cb5ce0fbc 100644
--- a/src/mesa/main/imports.c
+++ b/src/mesa/main/imports.c
@@ -48,6 +48,10 @@
#include "context.h"
#include "version.h"
+#ifdef _GNU_SOURCE
+#include <locale.h>
+#endif
+
#define MAXSTRING 4000 /* for vsnprintf() */
@@ -908,7 +912,15 @@ _mesa_atoi(const char *s)
double
_mesa_strtod( const char *s, char **end )
{
+#ifdef _GNU_SOURCE
+ static locale_t loc = NULL;
+ if (!loc) {
+ loc = newlocale(LC_CTYPE_MASK, "C", NULL);
+ }
+ return strtod_l(s, end, loc);
+#else
return strtod(s, end);
+#endif
}
/** Compute simple checksum/hash for a string */