gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r21951 - gnunet/src/util


From: gnunet
Subject: [GNUnet-SVN] r21951 - gnunet/src/util
Date: Wed, 13 Jun 2012 13:23:22 +0200

Author: grothoff
Date: 2012-06-13 13:23:22 +0200 (Wed, 13 Jun 2012)
New Revision: 21951

Modified:
   gnunet/src/util/os_installation.c
Log:
-LRN: fix r21946 to work on W32

Modified: gnunet/src/util/os_installation.c
===================================================================
--- gnunet/src/util/os_installation.c   2012-06-13 10:56:34 UTC (rev 21950)
+++ gnunet/src/util/os_installation.c   2012-06-13 11:23:22 UTC (rev 21951)
@@ -216,8 +216,13 @@
   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)))
   {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]