aboutsummaryrefslogtreecommitdiffstats
path: root/src/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/util')
-rw-r--r--src/util/strtod.c8
-rw-r--r--src/util/strtod.h3
2 files changed, 11 insertions, 0 deletions
diff --git a/src/util/strtod.c b/src/util/strtod.c
index a4a60e0404a..ea7d395e2da 100644
--- a/src/util/strtod.c
+++ b/src/util/strtod.c
@@ -45,6 +45,14 @@ _mesa_locale_init(void)
#endif
}
+void
+_mesa_locale_fini(void)
+{
+#if defined(_GNU_SOURCE) && defined(HAVE_XLOCALE_H)
+ freelocale(loc);
+#endif
+}
+
/**
* Wrapper around strtod which uses the "C" locale so the decimal
* point is always '.'
diff --git a/src/util/strtod.h b/src/util/strtod.h
index b7e2beb5f30..60e15cfa0eb 100644
--- a/src/util/strtod.h
+++ b/src/util/strtod.h
@@ -34,6 +34,9 @@ extern "C" {
extern void
_mesa_locale_init(void);
+extern void
+_mesa_locale_fini(void);
+
extern double
_mesa_strtod(const char *s, char **end);