From 4b0f4f6d99ab71460d6c4f4377447148e4849b39 Mon Sep 17 00:00:00 2001 From: Ramiro Polla Date: Tue, 21 Sep 2010 22:06:27 -0300 Subject: [PATCH] Export argvtos() as win32argvtos() --- ccache.h | 1 + execute.c | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ccache.h b/ccache.h index 9643b6c..38126ed 100644 --- a/ccache.h +++ b/ccache.h @@ -238,6 +238,7 @@ typedef int (*COMPAR_FN_T)(const void *, const void *); #endif #ifdef _WIN32 +char *win32argvtos(char *prefix, char **argv); int win32execute(char *path, char **argv, int doreturn, const char *path_stdout, const char *path_stderr); # ifndef _WIN32_WINNT diff --git a/execute.c b/execute.c index a972391..73fdde2 100644 --- a/execute.c +++ b/execute.c @@ -26,8 +26,8 @@ find_executable_in_path(const char *name, const char *exclude_name, char *path); * Re-create a win32 command line string based on **argv. * http://msdn.microsoft.com/en-us/library/17w5ykft.aspx */ -static char * -argvtos(char *prefix, char **argv) +char * +win32argvtos(char *prefix, char **argv) { char *arg; char *ptr; @@ -137,7 +137,7 @@ win32execute(char *path, char **argv, int doreturn, si.hStdError == INVALID_HANDLE_VALUE) return -1; } - args = argvtos(sh, argv); + args = win32argvtos(sh, argv); ret = CreateProcess(path, args, NULL, NULL, 1, 0, NULL, NULL, &si, &pi); free(args); if (path_stdout) {