gnumeric r17063 - in trunk: . src
- From: mortenw svn gnome org
- To: svn-commits-list gnome org
- Subject: gnumeric r17063 - in trunk: . src
- Date: Sun, 11 Jan 2009 17:09:26 +0000 (UTC)
Author: mortenw
Date: Sun Jan 11 17:09:26 2009
New Revision: 17063
URL: http://svn.gnome.org/viewvc/gnumeric?rev=17063&view=rev
Log:
2009-01-11 Morten Welinder <terra gnome org>
* src/gutils.c (gutils_init): Make detection of in-tree running
work with newer libtools.
Modified:
trunk/ChangeLog
trunk/src/gutils.c
Modified: trunk/src/gutils.c
==============================================================================
--- trunk/src/gutils.c (original)
+++ trunk/src/gutils.c Sun Jan 11 17:09:26 2009
@@ -56,8 +56,13 @@
g_free (dir);
#else
const char *argv0 = g_get_prgname ();
+ size_t l0 = argv0 ? strlen (argv0) : 0;
char *base = argv0 ? g_path_get_basename (argv0) : NULL;
- gboolean running_in_tree = base && strncmp (base, "lt-", 3) == 0;
+ const char *suff = "/.libs/gnumeric";
+ size_t lsuff = strlen (suff);
+ gboolean running_in_tree =
+ (l0 > lsuff && strcmp (argv0 + l0 - lsuff, suff) == 0) ||
+ (base && strncmp (base, "lt-", 3) == 0);
g_free (base);
if (running_in_tree) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]