From a63311a0f3f2669138d09ff8f618fd4d12fa0c3d Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Wed, 3 Apr 2013 10:50:59 +0200 Subject: More compatible path munging and handling code Centralize the path handling code, so we can remove unixy assumptions and have a chance of running on Windows. The current goal is to run all the tests on Windows. Includes some code from LRN https://bugs.freedesktop.org/show_bug.cgi?id=63062 --- tools/tool.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tools/tool.c') diff --git a/tools/tool.c b/tools/tool.c index 9ec41a4..961890d 100644 --- a/tools/tool.c +++ b/tools/tool.c @@ -38,6 +38,7 @@ #include "compat.h" #include "debug.h" #include "message.h" +#include "path.h" #include "p11-kit.h" #include @@ -201,7 +202,7 @@ exec_external (const char *command, /* Add our libexec directory to the path */ path = getenv ("PATH"); - if (!asprintf (&env, "PATH=%s%s%s", path ? path : "", path ? ":" : "", PKGDATADIR)) + if (!asprintf (&env, "PATH=%s%s%s", path ? path : "", path ? P11_PATH_SEP : "", PKGDATADIR)) return_if_reached (); putenv (env); -- cgit v1.1