[gnumeric] Compilation: test for features, not OSs.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Compilation: test for features, not OSs.
- Date: Mon, 22 Dec 2014 17:33:05 +0000 (UTC)
commit 4a202c918acc0f3407b28f857c19fca9e463eabc
Author: Morten Welinder <terra gnome org>
Date: Mon Dec 22 12:32:35 2014 -0500
Compilation: test for features, not OSs.
configure.ac | 2 +-
src/libgnumeric.c | 6 ++++--
2 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 605c348..80e3662 100644
--- a/configure.ac
+++ b/configure.ac
@@ -563,7 +563,7 @@ unset SAVE_LIBS
AC_HEADER_SYS_WAIT
dnl Check for some functions
-AC_CHECK_FUNCS(uname)
+AC_CHECK_FUNCS(uname setenv putenv)
dnl FIXME: Does this really belong here?
AC_CHECK_FUNC(bind_textdomain_codeset,,[AC_CHECK_LIB(intl,bind_textdomain_codeset)])
diff --git a/src/libgnumeric.c b/src/libgnumeric.c
index 26dadd0..feebeb1 100644
--- a/src/libgnumeric.c
+++ b/src/libgnumeric.c
@@ -183,10 +183,12 @@ gnm_pre_parse_init (int argc, gchar const **argv)
/* Default value is bogus, see 732184. */
if (!getenv ("G_ENABLE_DIAGNOSTIC")) {
-#ifdef WIN32
+#ifdef HAVE_SETENV
+ setenv ("G_ENABLE_DIAGNOSTIC", "0", FALSE);
+#elif defined(HAVE_PUTENV)
putenv ("G_ENABLE_DIAGNOSTIC=0");
#else
- setenv ("G_ENABLE_DIAGNOSTIC", "0", FALSE);
+ /* No big deal. */
#endif
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]