diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-11-10 13:41:43 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-11-10 13:41:43 +0000 |
commit | 2b8063b576a312fc3a8b7be9db6d3717e8151c31 (patch) | |
tree | 82e036e1cb0b2a7ce4231b925fb54df2edc06455 /src/util/os_installation.c | |
parent | 64e5c9e07deccefe03d6e6f1b118ca14ee4805d1 (diff) | |
download | gnunet-2b8063b576a312fc3a8b7be9db6d3717e8151c31.tar.gz gnunet-2b8063b576a312fc3a8b7be9db6d3717e8151c31.zip |
trying to fix #2645 -- support lib64/gnunet/libexec/ installations
Diffstat (limited to 'src/util/os_installation.c')
-rw-r--r-- | src/util/os_installation.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/util/os_installation.c b/src/util/os_installation.c index 035259ff6..b82060bca 100644 --- a/src/util/os_installation.c +++ b/src/util/os_installation.c | |||
@@ -143,6 +143,7 @@ DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) | |||
143 | return TRUE; | 143 | return TRUE; |
144 | } | 144 | } |
145 | 145 | ||
146 | |||
146 | /** | 147 | /** |
147 | * Try to determine path with win32-specific function | 148 | * Try to determine path with win32-specific function |
148 | * | 149 | * |
@@ -490,7 +491,8 @@ GNUNET_OS_installation_get_path (enum GNUNET_OS_InstallationPathKind dirkind) | |||
490 | ((0 == strcasecmp (&execpath[n - 5], "lib32")) || | 491 | ((0 == strcasecmp (&execpath[n - 5], "lib32")) || |
491 | (0 == strcasecmp (&execpath[n - 5], "lib64")))) | 492 | (0 == strcasecmp (&execpath[n - 5], "lib64")))) |
492 | { | 493 | { |
493 | if (GNUNET_OS_IPK_LIBDIR != dirkind) | 494 | if ( (GNUNET_OS_IPK_LIBDIR != dirkind) && |
495 | (GNUNET_OS_IPK_LIBEXECDIR != dirkind) ) | ||
494 | { | 496 | { |
495 | /* strip '/lib32' or '/lib64' */ | 497 | /* strip '/lib32' or '/lib64' */ |
496 | execpath[n - 5] = '\0'; | 498 | execpath[n - 5] = '\0'; |
@@ -544,9 +546,14 @@ GNUNET_OS_installation_get_path (enum GNUNET_OS_InstallationPathKind dirkind) | |||
544 | "gnunet" DIR_SEPARATOR_STR; | 546 | "gnunet" DIR_SEPARATOR_STR; |
545 | break; | 547 | break; |
546 | case GNUNET_OS_IPK_LIBEXECDIR: | 548 | case GNUNET_OS_IPK_LIBEXECDIR: |
547 | dirname = | 549 | if (isbasedir) |
550 | dirname = | ||
548 | DIR_SEPARATOR_STR "lib" DIR_SEPARATOR_STR "gnunet" DIR_SEPARATOR_STR \ | 551 | DIR_SEPARATOR_STR "lib" DIR_SEPARATOR_STR "gnunet" DIR_SEPARATOR_STR \ |
549 | "libexec" DIR_SEPARATOR_STR; | 552 | "libexec" DIR_SEPARATOR_STR; |
553 | else | ||
554 | dirname = | ||
555 | DIR_SEPARATOR_STR "gnunet" DIR_SEPARATOR_STR \ | ||
556 | "libexec" DIR_SEPARATOR_STR; | ||
550 | break; | 557 | break; |
551 | default: | 558 | default: |
552 | GNUNET_free (execpath); | 559 | GNUNET_free (execpath); |