demo: kill warning on Windows #2062

This commit is contained in:
nick black 2021-08-26 02:05:37 -04:00
parent 1879ecbaff
commit 6d72fedca9
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC
2 changed files with 2 additions and 1 deletions

View File

@ -41,7 +41,6 @@ typedef struct siginfo_t {
} siginfo_t; } siginfo_t;
// not declared in MSYS2 header files, but implemented...? // not declared in MSYS2 header files, but implemented...?
int faccessat(int dirfd, const char *pathname, int mode, int flags); int faccessat(int dirfd, const char *pathname, int mode, int flags);
#define sigemptyset(s)
#define sigset_t int #define sigset_t int
#define nl_langinfo(x) "UTF-8" #define nl_langinfo(x) "UTF-8"
#define ppoll(w, x, y, z) WSAPoll((w), (x), (y)) #define ppoll(w, x, y, z) WSAPoll((w), (x), (y))

View File

@ -489,11 +489,13 @@ scrub_stdplane(struct notcurses* nc){
} }
int main(int argc, char** argv){ int main(int argc, char** argv){
#ifndef __MINGW64__
sigset_t sigmask; sigset_t sigmask;
// ensure SIGWINCH is delivered only to a thread doing input // ensure SIGWINCH is delivered only to a thread doing input
sigemptyset(&sigmask); sigemptyset(&sigmask);
sigaddset(&sigmask, SIGWINCH); sigaddset(&sigmask, SIGWINCH);
pthread_sigmask(SIG_BLOCK, &sigmask, NULL); pthread_sigmask(SIG_BLOCK, &sigmask, NULL);
#endif
const char* spec; const char* spec;
FILE* json = NULL; // emit JSON summary to this file? (-J) FILE* json = NULL; // emit JSON summary to this file? (-J)
notcurses_options nopts = {}; notcurses_options nopts = {};