X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=test%2Ftest.priv.h;h=b352ce7d016dbebcc54b6bd943f56af9c46b5657;hp=f0b660f434ce78c4cda936d3c5b1f7107eeb3671;hb=d61c3c6a831d18ef0ed6f797ac97d60fffc2f158;hpb=47d2fb4537d9ad5bb14f4810561a327930ca4280;ds=sidebyside diff --git a/test/test.priv.h b/test/test.priv.h index f0b660f4..b352ce7d 100644 --- a/test/test.priv.h +++ b/test/test.priv.h @@ -30,7 +30,7 @@ /**************************************************************************** * Author: Thomas E. Dickey 1996-on * ****************************************************************************/ -/* $Id: test.priv.h,v 1.185 2020/02/02 23:34:34 tom Exp $ */ +/* $Id: test.priv.h,v 1.187 2020/07/11 23:01:49 tom Exp $ */ #ifndef __TEST_PRIV_H #define __TEST_PRIV_H 1 @@ -437,6 +437,13 @@ extern int optind; #include #include +#if defined(_MSC_VER) +#undef popen +#define popen(s,n) _popen(s,n) +#undef pclose +#define pclose(s) _pclose(s) +#endif + #ifndef GCC_NORETURN #define GCC_NORETURN /* nothing */ #endif @@ -1022,6 +1029,12 @@ extern char *_nc_strstr(const char *, const char *); #define InitAndCatch(init,handler) do { init; CATCHALL(handler); } while (0) #endif +#if defined(_WIN32) || defined(USE_WIN32CON_DRIVER) +#define SetupAlarm(opt) (void)opt +#else +#define SetupAlarm(opt) if (opt) alarm((unsigned)opt) +#endif + /* * Workaround for clean(er) compile with Solaris's legacy curses. * The same would be needed for HPUX 10.20