Module: wine Branch: master Commit: 8d768b7713c69d0091138984800431b84f0afaf7 URL: http://source.winehq.org/git/wine.git/?a=commit;h=8d768b7713c69d009113898480...
Author: Hans Leidekker hans@it.vu.nl Date: Mon Jan 7 14:23:46 2008 +0100
msvcrt: Implement _wexecv{, e, p, pe}.
---
dlls/msvcrt/msvcrt.h | 2 ++ dlls/msvcrt/msvcrt.spec | 8 ++++---- dlls/msvcrt/process.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 51 insertions(+), 4 deletions(-)
diff --git a/dlls/msvcrt/msvcrt.h b/dlls/msvcrt/msvcrt.h index bc94284..951f7ad 100644 --- a/dlls/msvcrt/msvcrt.h +++ b/dlls/msvcrt/msvcrt.h @@ -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*); diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec index c4113aa..0877366 100644 --- a/dlls/msvcrt/msvcrt.spec +++ b/dlls/msvcrt/msvcrt.spec @@ -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 diff --git a/dlls/msvcrt/process.c b/dlls/msvcrt/process.c index d764eaf..9be2b94 100644 --- a/dlls/msvcrt/process.c +++ b/dlls/msvcrt/process.c @@ -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