APPROVE COMMIT
NOTE: This patch has been committed.
# HG changeset patch
# User Aidan Kehoe <kehoea(a)parhasard.net>
# Date 1314459970 -3600
# Node ID c9d335183ef0519a6903f25f286f88b351e428b1
# Parent d20ffd0cf85df0423b9ab74f414904e3688cdae4
gtk_init() stomps on LC_NUMERIC; set it back to C after it's done.
src/ChangeLog.GTK addition:
2011-08-27 Aidan Kehoe <kehoea(a)parhasard.net>
* device-gtk.c:
* device-gtk.c (Fgtk_init):
Call setlocale (LC_NUMERIC, "C") after gtk_init(); the latter
stomps on LC_NUMERIC, taking the value from the environment, which
we explicitly don't want, because we use the C library functions
to parse Lisp floats and so on.
diff -r d20ffd0cf85d -r c9d335183ef0 src/ChangeLog.GTK
--- a/src/ChangeLog.GTK Fri Aug 26 16:34:16 2011 +0100
+++ b/src/ChangeLog.GTK Sat Aug 27 16:46:10 2011 +0100
@@ -1,3 +1,12 @@
+2011-08-27 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * device-gtk.c:
+ * device-gtk.c (Fgtk_init):
+ Call setlocale (LC_NUMERIC, "C") after gtk_init(); the latter
+ stomps on LC_NUMERIC, taking the value from the environment, which
+ we explicitly don't want, because we use the C library functions
+ to parse Lisp floats and so on.
+
2011-08-26 Aidan Kehoe <kehoea(a)parhasard.net>
* frame-gtk.c:
diff -r d20ffd0cf85d -r c9d335183ef0 src/device-gtk.c
--- a/src/device-gtk.c Fri Aug 26 16:34:16 2011 +0100
+++ b/src/device-gtk.c Sat Aug 27 16:46:10 2011 +0100
@@ -51,6 +51,8 @@
#include <bonobo.h>
#endif
+#include <locale.h>
+
Lisp_Object Qmake_device_early_gtk_entry_point,
Qmake_device_late_gtk_entry_point;
@@ -184,6 +186,11 @@
slow_down_interrupts ();
gtk_init (&argc, &argv);
+ /* Sigh, gtk_init stomped on LC_NUMERIC, which we need to be C. Otherwise
+ the Lisp reader doesn't necessarily understand the radix character for
+ floats, which is a problem. */
+ setlocale (LC_NUMERIC, "C");
+
#ifdef HAVE_BONOBO
orb = oaf_init (argc, argv);
--
‘Iodine deficiency was endemic in parts of the UK until, through what has been
described as “an unplanned and accidental public health triumph”, iodine was
added to cattle feed to improve milk production in the 1930s.’
(EN Pearce, Lancet, June 2011)
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches