Export argvtos() as win32argvtos()

This commit is contained in:
Ramiro Polla 2010-09-21 22:06:27 -03:00 committed by Joel Rosdahl
parent 6fc46e5403
commit 4b0f4f6d99
2 changed files with 4 additions and 3 deletions

View File

@ -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

View File

@ -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) {