[gnumeric] win32: don't use setenv
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] win32: don't use setenv
- Date: Sat, 20 Dec 2014 04:02:27 +0000 (UTC)
commit 19b3a3ea082700ffa16a74f6a2247831b5cea8e5
Author: Morten Welinder <terra gnome org>
Date: Fri Dec 19 23:01:59 2014 -0500
win32: don't use setenv
ChangeLog | 5 +++++
src/libgnumeric.c | 7 ++++++-
2 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 631838b..02f3bc0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-12-19 Morten Welinder <terra gnome org>
+
+ * src/libgnumeric.c (gnm_pre_parse_init): Use putenv for win32
+ (before g_setenv is available).
+
2014-12-16 Morten Welinder <terra gnome org>
* src/sstest.c (test_insdel_rowcol_names): Use column name, not
diff --git a/src/libgnumeric.c b/src/libgnumeric.c
index 9435a19..26dadd0 100644
--- a/src/libgnumeric.c
+++ b/src/libgnumeric.c
@@ -182,8 +182,13 @@ gnm_pre_parse_init (int argc, gchar const **argv)
#endif
/* Default value is bogus, see 732184. */
- if (!getenv ("G_ENABLE_DIAGNOSTIC"))
+ if (!getenv ("G_ENABLE_DIAGNOSTIC")) {
+#ifdef WIN32
+ putenv ("G_ENABLE_DIAGNOSTIC=0");
+#else
setenv ("G_ENABLE_DIAGNOSTIC", "0", FALSE);
+#endif
+ }
/* We cannot use gnm_debug_flag yet. See 627840. */
gnm_debug = getenv ("GNM_DEBUG");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]