diff options
author | Vladislav Vaintroub <wlad@mariadb.com> | 2019-11-13 21:12:48 +0100 |
---|---|---|
committer | Vladislav Vaintroub <wlad@mariadb.com> | 2019-11-15 15:39:31 +0100 |
commit | 6df0bb7d382fa7a6043fc7e9587889d3b53976b7 (patch) | |
tree | e0fa65ed84199f0f62b097c3e481a550def6c4bc /include/my_sys.h | |
parent | 89ae01fd0085cf0d1af272eca545e49fdadf4538 (diff) | |
download | mariadb-git-6df0bb7d382fa7a6043fc7e9587889d3b53976b7.tar.gz |
MDEV-21062 Buildbot, Windows - sporadically missing lines from mtr's "exec"
Provide own version of popen/pclose, in attempt to workaround
sporadic erratic behavior of UCRT's one.
Diffstat (limited to 'include/my_sys.h')
-rw-r--r-- | include/my_sys.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/my_sys.h b/include/my_sys.h index 8f0d98f68bb..19faf320b24 100644 --- a/include/my_sys.h +++ b/include/my_sys.h @@ -994,6 +994,16 @@ void *my_mmap(void *, size_t, int, int, int, my_off_t); int my_munmap(void *, size_t); #endif +#ifdef _WIN32 +extern FILE* my_win_popen(const char*, const char*); +extern int my_win_pclose(FILE*); +#define my_popen(A,B) my_win_popen(A,B) +#define my_pclose(A) my_win_pclose(A) +#else +#define my_popen(A,B) popen(A,B) +#define my_pclose(A) pclose(A) +#endif + /* my_getpagesize */ #ifdef HAVE_GETPAGESIZE #define my_getpagesize() getpagesize() |