From d95857d6698b0b4d6bbd7427a3ba3f6febf27b27 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Tue, 9 Apr 2013 13:45:48 +0200 Subject: [PATCH] msvcrt: Constify the arguments of execv functions. --- dlls/msvcrt/process.c | 28 ++++++++++++++-------------- include/msvcrt/process.h | 16 ++++++++-------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/dlls/msvcrt/process.c b/dlls/msvcrt/process.c index 872edf8e7db..b61eea190cd 100644 --- a/dlls/msvcrt/process.c +++ b/dlls/msvcrt/process.c @@ -600,9 +600,9 @@ MSVCRT_intptr_t CDECL _execlpe(const char* name, const char* arg0, ...) * * Unicode version of _execv */ -MSVCRT_intptr_t CDECL _wexecv(const MSVCRT_wchar_t* name, MSVCRT_wchar_t* const* argv) +MSVCRT_intptr_t CDECL _wexecv(const MSVCRT_wchar_t* name, const MSVCRT_wchar_t* const* argv) { - return MSVCRT__wspawnve(MSVCRT__P_OVERLAY, name, (const MSVCRT_wchar_t* const*) argv, NULL); + return MSVCRT__wspawnve(MSVCRT__P_OVERLAY, name, argv, NULL); } /********************************************************************* @@ -611,9 +611,9 @@ MSVCRT_intptr_t CDECL _wexecv(const MSVCRT_wchar_t* name, MSVCRT_wchar_t* const* * Like on Windows, this function does not handle arguments with spaces * or double-quotes. */ -MSVCRT_intptr_t CDECL _execv(const char* name, char* const* argv) +MSVCRT_intptr_t CDECL _execv(const char* name, const char* const* argv) { - return MSVCRT__spawnve(MSVCRT__P_OVERLAY, name, (const char* const*) argv, NULL); + return MSVCRT__spawnve(MSVCRT__P_OVERLAY, name, argv, NULL); } /********************************************************************* @@ -621,9 +621,9 @@ MSVCRT_intptr_t CDECL _execv(const char* name, char* const* argv) * * 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) +MSVCRT_intptr_t CDECL _wexecve(const MSVCRT_wchar_t* name, const MSVCRT_wchar_t* const* argv, const MSVCRT_wchar_t* const* envv) { - return MSVCRT__wspawnve(MSVCRT__P_OVERLAY, name, (const MSVCRT_wchar_t* const*) argv, envv); + return MSVCRT__wspawnve(MSVCRT__P_OVERLAY, name, argv, envv); } /********************************************************************* @@ -632,9 +632,9 @@ MSVCRT_intptr_t CDECL _wexecve(const MSVCRT_wchar_t* name, MSVCRT_wchar_t* const * Like on Windows, this function does not handle arguments with spaces * or double-quotes. */ -MSVCRT_intptr_t CDECL MSVCRT__execve(const char* name, char* const* argv, const char* const* envv) +MSVCRT_intptr_t CDECL MSVCRT__execve(const char* name, const char* const* argv, const char* const* envv) { - return MSVCRT__spawnve(MSVCRT__P_OVERLAY, name, (const char* const*) argv, envv); + return MSVCRT__spawnve(MSVCRT__P_OVERLAY, name, argv, envv); } /********************************************************************* @@ -642,9 +642,9 @@ MSVCRT_intptr_t CDECL MSVCRT__execve(const char* name, char* const* argv, const * * 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) +MSVCRT_intptr_t CDECL _wexecvpe(const MSVCRT_wchar_t* name, const MSVCRT_wchar_t* const* argv, const MSVCRT_wchar_t* const* envv) { - return MSVCRT__wspawnvpe(MSVCRT__P_OVERLAY, name, (const MSVCRT_wchar_t* const*) argv, envv); + return MSVCRT__wspawnvpe(MSVCRT__P_OVERLAY, name, argv, envv); } /********************************************************************* @@ -653,9 +653,9 @@ MSVCRT_intptr_t CDECL _wexecvpe(const MSVCRT_wchar_t* name, MSVCRT_wchar_t* cons * Like on Windows, this function does not handle arguments with spaces * or double-quotes. */ -MSVCRT_intptr_t CDECL _execvpe(const char* name, char* const* argv, const char* const* envv) +MSVCRT_intptr_t CDECL _execvpe(const char* name, const char* const* argv, const char* const* envv) { - return MSVCRT__spawnvpe(MSVCRT__P_OVERLAY, name, (const char* const*) argv, envv); + return MSVCRT__spawnvpe(MSVCRT__P_OVERLAY, name, argv, envv); } /********************************************************************* @@ -663,7 +663,7 @@ MSVCRT_intptr_t CDECL _execvpe(const char* name, char* const* argv, const char* * * Unicode version of _execvp */ -MSVCRT_intptr_t CDECL _wexecvp(const MSVCRT_wchar_t* name, MSVCRT_wchar_t* const* argv) +MSVCRT_intptr_t CDECL _wexecvp(const MSVCRT_wchar_t* name, const MSVCRT_wchar_t* const* argv) { return _wexecvpe(name, argv, NULL); } @@ -674,7 +674,7 @@ MSVCRT_intptr_t CDECL _wexecvp(const MSVCRT_wchar_t* name, MSVCRT_wchar_t* const * Like on Windows, this function does not handle arguments with spaces * or double-quotes. */ -MSVCRT_intptr_t CDECL _execvp(const char* name, char* const* argv) +MSVCRT_intptr_t CDECL _execvp(const char* name, const char* const* argv) { return _execvpe(name, argv, NULL); } diff --git a/include/msvcrt/process.h b/include/msvcrt/process.h index 7530ab00e3c..f9ab2a41723 100644 --- a/include/msvcrt/process.h +++ b/include/msvcrt/process.h @@ -36,10 +36,10 @@ intptr_t __cdecl _execl(const char*,const char*,...); intptr_t __cdecl _execle(const char*,const char*,...); intptr_t __cdecl _execlp(const char*,const char*,...); intptr_t __cdecl _execlpe(const char*,const char*,...); -intptr_t __cdecl _execv(const char*,char* const *); -intptr_t __cdecl _execve(const char*,char* const *,const char* const *); -intptr_t __cdecl _execvp(const char*,char* const *); -intptr_t __cdecl _execvpe(const char*,char* const *,const char* const *); +intptr_t __cdecl _execv(const char*,const char* const *); +intptr_t __cdecl _execve(const char*,const char* const *,const char* const *); +intptr_t __cdecl _execvp(const char*,const char* const *); +intptr_t __cdecl _execvpe(const char*,const char* const *,const char* const *); int __cdecl _getpid(void); intptr_t __cdecl _spawnl(int,const char*,const char*,...); intptr_t __cdecl _spawnle(int,const char*,const char*,...); @@ -94,10 +94,10 @@ int __cdecl _wsystem(const wchar_t*); static inline intptr_t cwait(int *status, intptr_t pid, int action) { return _cwait(status, pid, action); } static inline int getpid(void) { return _getpid(); } -static inline intptr_t execv(const char* name, char* const* argv) { return _execv(name, argv); } -static inline intptr_t execve(const char* name, char* const* argv, const char* const* envv) { return _execve(name, argv, envv); } -static inline intptr_t execvp(const char* name, char* const* argv) { return _execvp(name, argv); } -static inline intptr_t execvpe(const char* name, char* const* argv, const char* const* envv) { return _execvpe(name, argv, envv); } +static inline intptr_t execv(const char* name, const char* const* argv) { return _execv(name, argv); } +static inline intptr_t execve(const char* name, const char* const* argv, const char* const* envv) { return _execve(name, argv, envv); } +static inline intptr_t execvp(const char* name, const char* const* argv) { return _execvp(name, argv); } +static inline intptr_t execvpe(const char* name, const char* const* argv, const char* const* envv) { return _execvpe(name, argv, envv); } static inline intptr_t spawnv(int flags, const char* name, const char* const* argv) { return _spawnv(flags, name, argv); } static inline intptr_t spawnve(int flags, const char* name, const char* const* argv, const char* const* envv) { return _spawnve(flags, name, argv, envv); } static inline intptr_t spawnvp(int flags, const char* name, const char* const* argv) { return _spawnvp(flags, name, argv); }