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

This commit is contained in:
Hans Leidekker 2008-01-07 14:23:46 +01:00 committed by Alexandre Julliard
parent 054132f931
commit 8d768b7713
3 changed files with 51 additions and 4 deletions

View File

@ -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*);

View File

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

View File

@ -541,6 +541,16 @@ MSVCRT_intptr_t CDECL _execlpe(const char* name, const char* arg0, ...)
return ret;
}
/*********************************************************************
* _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.@)
*
@ -552,6 +562,16 @@ MSVCRT_intptr_t CDECL _execv(const char* name, char* const* argv)
return _spawnve(MSVCRT__P_OVERLAY, name, (const char* const*) argv, NULL);
}
/*********************************************************************
* _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.@)
*
@ -563,6 +583,21 @@ MSVCRT_intptr_t CDECL MSVCRT__execve(const char* name, char* const* argv, const
return _spawnve(MSVCRT__P_OVERLAY, name, (const char* const*) argv, envv);
}
/*********************************************************************
* _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.@)
*
@ -578,6 +613,16 @@ MSVCRT_intptr_t CDECL _execvpe(const char* name, char* const* argv, const char*
(const char* const*) argv, envv);
}
/*********************************************************************
* _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.@)
*