[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: gaf.git: branch: master updated (1.7.0-20110116-113-g4b8c674)
The branch, master has been updated
via 4b8c6745629f7c316c7ff9f09e4a6301a8d20a74 (commit)
from 2d1944bb44a2a6785f942e1d24999e64e7052f71 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
libgeda/src/s_basic.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
=================
Commit Messages
=================
commit 4b8c6745629f7c316c7ff9f09e4a6301a8d20a74
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Commit: Peter TB Brett <peter@xxxxxxxxxxxxx>
libgeda: Fix crash on startup on Windows.
If the GEDADATA environment variable was not set on Windows, libgeda
was unable to determine the gEDA system data directory. It would then
attempt to make a Scheme string from the resulting NULL pointer,
causing a crash.
This patch alters the behaviour on Windows. If GEDADATA is not set,
libgeda now guesses that the system data directory is the current
working directory.
Unfortunately, this will still prevent most gEDA programs from working
due to not being able to locate data files, but it will prevent an
uninformative segfault on startup.
Affects-bug: lp-795545
:100644 100644 fe1c419... 8b0fc91... M libgeda/src/s_basic.c
=========
Changes
=========
commit 4b8c6745629f7c316c7ff9f09e4a6301a8d20a74
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Commit: Peter TB Brett <peter@xxxxxxxxxxxxx>
libgeda: Fix crash on startup on Windows.
If the GEDADATA environment variable was not set on Windows, libgeda
was unable to determine the gEDA system data directory. It would then
attempt to make a Scheme string from the resulting NULL pointer,
causing a crash.
This patch alters the behaviour on Windows. If GEDADATA is not set,
libgeda now guesses that the system data directory is the current
working directory.
Unfortunately, this will still prevent most gEDA programs from working
due to not being able to locate data files, but it will prevent an
uninformative segfault on startup.
Affects-bug: lp-795545
diff --git a/libgeda/src/s_basic.c b/libgeda/src/s_basic.c
index fe1c419..8b0fc91 100644
--- a/libgeda/src/s_basic.c
+++ b/libgeda/src/s_basic.c
@@ -575,12 +575,14 @@ const char *s_path_sys_data () {
if (p == NULL) {
p = g_getenv ("GEDADATA");
}
-# if !defined (_WIN32)
if (p == NULL) {
+# if !defined (_WIN32)
p = GEDADATADIR;
+# else
+ p = g_get_current_dir ();
+# endif
g_setenv ("GEDADATA", p, FALSE);
}
-# endif
return p;
}
@@ -605,7 +607,7 @@ const char *s_path_sys_config () {
p = g_getenv ("GEDADATARC");
}
if (p == NULL) {
-#ifdef GEDARCDIR
+#if defined (GEDARCDIR) && !defined(_WIN32)
/* If available, use the rc directory set during configure. */
p = GEDARCDIR;
#else
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs