Commit d95857d6 authored by Alexandre Julliard's avatar Alexandre Julliard

msvcrt: Constify the arguments of execv functions.

parent e2d35536
...@@ -600,9 +600,9 @@ MSVCRT_intptr_t CDECL _execlpe(const char* name, const char* arg0, ...) ...@@ -600,9 +600,9 @@ MSVCRT_intptr_t CDECL _execlpe(const char* name, const char* arg0, ...)
* *
* Unicode version of _execv * 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* ...@@ -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 * Like on Windows, this function does not handle arguments with spaces
* or double-quotes. * 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) ...@@ -621,9 +621,9 @@ MSVCRT_intptr_t CDECL _execv(const char* name, char* const* argv)
* *
* Unicode version of _execve * 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 ...@@ -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 * Like on Windows, this function does not handle arguments with spaces
* or double-quotes. * 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 ...@@ -642,9 +642,9 @@ MSVCRT_intptr_t CDECL MSVCRT__execve(const char* name, char* const* argv, const
* *
* Unicode version of _execvpe * 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 ...@@ -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 * Like on Windows, this function does not handle arguments with spaces
* or double-quotes. * 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* ...@@ -663,7 +663,7 @@ MSVCRT_intptr_t CDECL _execvpe(const char* name, char* const* argv, const char*
* *
* Unicode version of _execvp * 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); return _wexecvpe(name, argv, NULL);
} }
...@@ -674,7 +674,7 @@ MSVCRT_intptr_t CDECL _wexecvp(const MSVCRT_wchar_t* name, MSVCRT_wchar_t* const ...@@ -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 * Like on Windows, this function does not handle arguments with spaces
* or double-quotes. * 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); return _execvpe(name, argv, NULL);
} }
......
...@@ -36,10 +36,10 @@ intptr_t __cdecl _execl(const char*,const char*,...); ...@@ -36,10 +36,10 @@ intptr_t __cdecl _execl(const char*,const char*,...);
intptr_t __cdecl _execle(const char*,const char*,...); intptr_t __cdecl _execle(const char*,const char*,...);
intptr_t __cdecl _execlp(const char*,const char*,...); intptr_t __cdecl _execlp(const char*,const char*,...);
intptr_t __cdecl _execlpe(const char*,const char*,...); intptr_t __cdecl _execlpe(const char*,const char*,...);
intptr_t __cdecl _execv(const char*,char* const *); intptr_t __cdecl _execv(const char*,const char* const *);
intptr_t __cdecl _execve(const char*,char* const *,const char* const *); intptr_t __cdecl _execve(const char*,const char* const *,const char* const *);
intptr_t __cdecl _execvp(const char*,char* const *); intptr_t __cdecl _execvp(const char*,const char* const *);
intptr_t __cdecl _execvpe(const char*,char* const *,const char* const *); intptr_t __cdecl _execvpe(const char*,const char* const *,const char* const *);
int __cdecl _getpid(void); int __cdecl _getpid(void);
intptr_t __cdecl _spawnl(int,const char*,const char*,...); intptr_t __cdecl _spawnl(int,const char*,const char*,...);
intptr_t __cdecl _spawnle(int,const char*,const char*,...); intptr_t __cdecl _spawnle(int,const char*,const char*,...);
...@@ -94,10 +94,10 @@ int __cdecl _wsystem(const wchar_t*); ...@@ -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 intptr_t cwait(int *status, intptr_t pid, int action) { return _cwait(status, pid, action); }
static inline int getpid(void) { return _getpid(); } 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 execv(const char* name, const 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 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, char* const* argv) { return _execvp(name, argv); } static inline intptr_t execvp(const char* name, const 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 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 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 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); } static inline intptr_t spawnvp(int flags, const char* name, const char* const* argv) { return _spawnvp(flags, name, argv); }
......
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