projects
/
oweals
/
gnunet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ec56f91
)
-LRN: fix r21946 to work on W32
author
Christian Grothoff
<christian@grothoff.org>
Wed, 13 Jun 2012 11:23:22 +0000
(11:23 +0000)
committer
Christian Grothoff
<christian@grothoff.org>
Wed, 13 Jun 2012 11:23:22 +0000
(11:23 +0000)
src/util/os_installation.c
patch
|
blob
|
history
diff --git
a/src/util/os_installation.c
b/src/util/os_installation.c
index e4298617323fa422d9c00d30522700e9afaa8764..c44f741f42c67e02817bed8a59209f85405e3425 100644
(file)
--- a/
src/util/os_installation.c
+++ b/
src/util/os_installation.c
@@
-216,8
+216,13
@@
get_path_from_PATH (const char *binary)
p = getenv ("PATH");
if (NULL == p)
return NULL;
+#if WINDOWS
+ /* On W32 look in CWD first. */
+ GNUNET_asprintf (&path, ".%c%s", PATH_SEPARATOR, p);
+#else
path = GNUNET_strdup (p); /* because we write on it */
- buf = GNUNET_malloc (strlen (path) + 20);
+#endif
+ buf = GNUNET_malloc (strlen (path) + strlen (binary) + 1 + 1);
pos = path;
while (NULL != (end = strchr (pos, PATH_SEPARATOR)))
{