Commit 8d768b77 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

msvcrt: Implement _wexecv{, e, p, pe}.

parent 054132f9
......@@ -634,6 +634,8 @@ int MSVCRT__write(int,const void*,unsigned int);
int _getch(void);
int _ismbstrail(const unsigned char* start, const unsigned char* str);
MSVCRT_intptr_t _spawnve(int,const char*,const char* const *,const char* const *);
MSVCRT_intptr_t _wspawnve(int,const MSVCRT_wchar_t*,const MSVCRT_wchar_t* const *,const MSVCRT_wchar_t* const *);
MSVCRT_intptr_t _wspawnvpe(int,const MSVCRT_wchar_t*,const MSVCRT_wchar_t* const *,const MSVCRT_wchar_t* const *);
void _searchenv(const char*,const char*,char*);
int _getdrive(void);
char* _strdup(const char*);
......
......@@ -522,10 +522,10 @@
@ varargs _wexecle(wstr wstr)
@ varargs _wexeclp(wstr wstr)
@ varargs _wexeclpe(wstr wstr)
@ stub _wexecv #(wstr ptr)
@ stub _wexecve #(wstr ptr ptr)
@ stub _wexecvp #(wstr ptr)
@ stub _wexecvpe #(wstr ptr ptr)
@ cdecl _wexecv(wstr ptr)
@ cdecl _wexecve(wstr ptr ptr)
@ cdecl _wexecvp(wstr ptr)
@ cdecl _wexecvpe(wstr ptr ptr)
@ cdecl _wfdopen(long wstr) MSVCRT__wfdopen
@ cdecl _wfindfirst(wstr ptr) MSVCRT__wfindfirst
@ cdecl _wfindfirsti64(wstr ptr) MSVCRT__wfindfirsti64
......
......@@ -542,6 +542,16 @@ MSVCRT_intptr_t CDECL _execlpe(const char* name, const char* arg0, ...)
}
/*********************************************************************
* _wexecv (MSVCRT.@)
*
* Unicode version of _execv
*/
MSVCRT_intptr_t CDECL _wexecv(const MSVCRT_wchar_t* name, MSVCRT_wchar_t* const* argv)
{
return _wspawnve(MSVCRT__P_OVERLAY, name, (const MSVCRT_wchar_t* const*) argv, NULL);
}
/*********************************************************************
* _execv (MSVCRT.@)
*
* Like on Windows, this function does not handle arguments with spaces
......@@ -553,6 +563,16 @@ MSVCRT_intptr_t CDECL _execv(const char* name, char* const* argv)
}
/*********************************************************************
* _wexecve (MSVCRT.@)
*
* Unicode version of _execve
*/
MSVCRT_intptr_t CDECL _wexecve(const MSVCRT_wchar_t* name, MSVCRT_wchar_t* const* argv, const MSVCRT_wchar_t* const* envv)
{
return _wspawnve(MSVCRT__P_OVERLAY, name, (const MSVCRT_wchar_t* const*) argv, envv);
}
/*********************************************************************
* _execve (MSVCRT.@)
*
* Like on Windows, this function does not handle arguments with spaces
......@@ -564,6 +584,21 @@ MSVCRT_intptr_t CDECL MSVCRT__execve(const char* name, char* const* argv, const
}
/*********************************************************************
* _wexecvpe (MSVCRT.@)
*
* Unicode version of _execvpe
*/
MSVCRT_intptr_t CDECL _wexecvpe(const MSVCRT_wchar_t* name, MSVCRT_wchar_t* const* argv, const MSVCRT_wchar_t* const* envv)
{
static const MSVCRT_wchar_t path[] = {'P','A','T','H',0};
MSVCRT_wchar_t fullname[MAX_PATH];
_wsearchenv(name, path, fullname);
return _wspawnvpe(MSVCRT__P_OVERLAY, fullname[0] ? fullname : name,
(const MSVCRT_wchar_t* const*) argv, envv);
}
/*********************************************************************
* _execvpe (MSVCRT.@)
*
* Like on Windows, this function does not handle arguments with spaces
......@@ -579,6 +614,16 @@ MSVCRT_intptr_t CDECL _execvpe(const char* name, char* const* argv, const char*
}
/*********************************************************************
* _wexecvp (MSVCRT.@)
*
* Unicode version of _execvp
*/
MSVCRT_intptr_t CDECL _wexecvp(const MSVCRT_wchar_t* name, MSVCRT_wchar_t* const* argv)
{
return _wexecvpe(name, argv, NULL);
}
/*********************************************************************
* _execvp (MSVCRT.@)
*
* Like on Windows, this function does not handle arguments with spaces
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment