evil: Add execvp based on UCRT's _execvp

This commit is contained in:
Felipe Magno de Almeida 2020-12-15 15:43:55 -03:00
parent 04a25307c5
commit 81a1b4eac3
2 changed files with 18 additions and 0 deletions

View File

@ -14,6 +14,13 @@
#include "evil_private.h"
#ifdef _MSC_VER
EVIL_API int
execvp(const char *file, char *const argv[])
{
return _execvp(file, (const char *const *)argv);
}
#endif
LONGLONG _evil_time_freq;
LONGLONG _evil_time_count;

View File

@ -18,6 +18,17 @@
#include <io.h> // for read, write, access, close
#define execvp _ucrt_execvp // overriding execvp below
#include <process.h> // for _execvp (but not execvp), getpid
#undef execvp
EVIL_API int execvp(const char *file, char *const argv[]);
/* Values for the second argument to access. These may be OR'd together. */
#define R_OK 4 /* Test for read permission. */
#define W_OK 2 /* Test for write permission. */
#define X_OK 0 /* execute permission, originally '1', just a bypass here*/
#define F_OK 0 /* Test for existence. */
#endif // _MSC_VER
/*