/****************************************************************************
- * Copyright 2020,2021 Thomas E. Dickey *
+ * Copyright 2020-2021,2022 Thomas E. Dickey *
* Copyright 1998-2014,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
#include <SigAction.h>
-MODULE_ID("$Id: lib_tstp.c,v 1.51 2021/09/04 10:54:35 tom Exp $")
+MODULE_ID("$Id: lib_tstp.c,v 1.52 2022/08/13 14:36:43 tom Exp $")
#if defined(SIGTSTP) && (HAVE_SIGACTION || HAVE_SIGVEC)
#define USE_SIGTSTP 1
}
#if USE_SIGWINCH
+
+# ifndef _nc_set_read_thread
+NCURSES_EXPORT(void)
+_nc_set_read_thread(bool enable)
+{
+ if (enable) {
+# if USE_WEAK_SYMBOLS
+ if ((pthread_self) && (pthread_kill) && (pthread_equal))
+# endif
+ _nc_globals.read_thread = pthread_self();
+ } else {
+ _nc_globals.read_thread = 0;
+ }
+}
+# endif
+
static void
handle_SIGWINCH(int sig GCC_UNUSED)
{