X-Git-Url: https://ncurses.scripts.mit.edu/?a=blobdiff_plain;ds=sidebyside;f=test%2Ftest.priv.h;h=b8feb27ba67610cd5bb3a044b7d76f8a8f9d1a9c;hb=5899b5e464ecec4b1613f6fef8cb7b75793c88e3;hp=7a884fe32fafdaad4aad871f65a8970a4655e323;hpb=02f1dee48fe8af6ce054388fba739aa4f975004e;p=ncurses.git diff --git a/test/test.priv.h b/test/test.priv.h index 7a884fe3..b8feb27b 100644 --- a/test/test.priv.h +++ b/test/test.priv.h @@ -1,5 +1,6 @@ /**************************************************************************** - * Copyright (c) 1998-2018,2019 Free Software Foundation, Inc. * + * Copyright 2018-2019,2020 Thomas E. Dickey * + * Copyright 1998-2017,2018 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -29,7 +30,7 @@ /**************************************************************************** * Author: Thomas E. Dickey 1996-on * ****************************************************************************/ -/* $Id: test.priv.h,v 1.184 2019/12/14 23:25:29 tom Exp $ */ +/* $Id: test.priv.h,v 1.188 2020/07/25 22:56:33 tom Exp $ */ #ifndef __TEST_PRIV_H #define __TEST_PRIV_H 1 @@ -390,6 +391,10 @@ #include #endif +#if !(defined(NCURSES_WGETCH_EVENTS) && defined(NEED_KEY_EVENT)) +#undef KEY_EVENT /* reduce compiler-warnings with Visual C++ */ +#endif + #if defined(HAVE_XCURSES) || defined(PDCURSES) /* no other headers */ #undef HAVE_SETUPTERM /* nonfunctional */ @@ -436,6 +441,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 @@ -1021,6 +1033,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