summaryrefslogtreecommitdiff
path: root/src/util/os_installation.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-06-13 11:23:22 +0000
committerChristian Grothoff <christian@grothoff.org>2012-06-13 11:23:22 +0000
commit16f659aedbacb16d2861ac08b832d2336e583117 (patch)
tree1695215287d5ba136bd6c4ea47c2623f1356f890 /src/util/os_installation.c
parentec56f91ac361b2a95d78e7529ed60549b7e9ddf3 (diff)
downloadgnunet-16f659aedbacb16d2861ac08b832d2336e583117.tar.gz
gnunet-16f659aedbacb16d2861ac08b832d2336e583117.zip
-LRN: fix r21946 to work on W32
Diffstat (limited to 'src/util/os_installation.c')
-rw-r--r--src/util/os_installation.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/util/os_installation.c b/src/util/os_installation.c
index e42986173..c44f741f4 100644
--- a/src/util/os_installation.c
+++ b/src/util/os_installation.c
@@ -216,8 +216,13 @@ get_path_from_PATH (const char *binary)
216 p = getenv ("PATH"); 216 p = getenv ("PATH");
217 if (NULL == p) 217 if (NULL == p)
218 return NULL; 218 return NULL;
219#if WINDOWS
220 /* On W32 look in CWD first. */
221 GNUNET_asprintf (&path, ".%c%s", PATH_SEPARATOR, p);
222#else
219 path = GNUNET_strdup (p); /* because we write on it */ 223 path = GNUNET_strdup (p); /* because we write on it */
220 buf = GNUNET_malloc (strlen (path) + 20); 224#endif
225 buf = GNUNET_malloc (strlen (path) + strlen (binary) + 1 + 1);
221 pos = path; 226 pos = path;
222 while (NULL != (end = strchr (pos, PATH_SEPARATOR))) 227 while (NULL != (end = strchr (pos, PATH_SEPARATOR)))
223 { 228 {