forked from pool/ncurses
This commit is contained in:
committed by
Git OBS Bridge
parent
df503e6886
commit
fbf2352047
@@ -1,24 +0,0 @@
|
|||||||
--- ncurses/curses.priv.h
|
|
||||||
+++ ncurses/curses.priv.h 2005-07-22 12:52:22.000000000 +0200
|
|
||||||
@@ -693,8 +693,11 @@
|
|
||||||
(ch).chars[PUTC_i], &PUT_st); \
|
|
||||||
if (PUTC_ch == L'\0') \
|
|
||||||
--PUTC_n; \
|
|
||||||
- if (PUTC_n <= 0) \
|
|
||||||
+ if (PUTC_n <= 0) { \
|
|
||||||
+ if (PUTC_ch && is8bits(PUTC_ch)) \
|
|
||||||
+ putc(PUTC_ch,b); \
|
|
||||||
break; \
|
|
||||||
+ } \
|
|
||||||
fwrite(PUTC_buf, (unsigned) PUTC_n, 1, b); \
|
|
||||||
++PUTC_i; \
|
|
||||||
} while (PUTC_ch != L'\0'); \
|
|
||||||
@@ -741,7 +744,7 @@
|
|
||||||
#define ARG_CH_T NCURSES_CH_T
|
|
||||||
#define CARG_CH_T NCURSES_CH_T
|
|
||||||
#define PUTC_DATA int data = 0
|
|
||||||
-#define PUTC(a,b) do { data = CharOf(ch); putc(data,b); } while (0)
|
|
||||||
+#define PUTC(ch,b) do { data = CharOf(ch); putc(data,b); } while (0)
|
|
||||||
|
|
||||||
#define BLANK (' '|A_NORMAL)
|
|
||||||
#define ZEROS ('\0'|A_NORMAL)
|
|
@@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:4ea1735ad946700d3b69a110e2bcd38c32b9d48ccfd8cd94cc99ba0cb610c9ab
|
|
||||||
size 231118
|
|
@@ -1,205 +0,0 @@
|
|||||||
--- ncurses/SigAction.h
|
|
||||||
+++ ncurses/SigAction.h 2006-05-18 14:31:29.000000000 +0200
|
|
||||||
@@ -55,6 +55,36 @@
|
|
||||||
typedef struct sigaction sigaction_t;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
+#if defined _REENTRANT || defined _THREAD_SAFE
|
|
||||||
+# include <pthread.h>
|
|
||||||
+extern int pthread_sigmask(int, const sigset_t*, sigset_t*) __attribute__((weak));
|
|
||||||
+extern int pthread_kill(pthread_t, int) __attribute__((weak));
|
|
||||||
+extern pthread_t pthread_self(void) __attribute__((weak));
|
|
||||||
+extern int pthread_equal(pthread_t, pthread_t) __attribute__((weak));
|
|
||||||
+
|
|
||||||
+static inline int _nc__sigprocmask(int how, const sigset_t *newmask, sigset_t *oldmask)
|
|
||||||
+{
|
|
||||||
+ if (&pthread_sigmask)
|
|
||||||
+ return pthread_sigmask(how, newmask, oldmask);
|
|
||||||
+ else
|
|
||||||
+ return sigprocmask(how, newmask, oldmask);
|
|
||||||
+}
|
|
||||||
+#define sigprocmask _nc__sigprocmask
|
|
||||||
+
|
|
||||||
+static inline void _nc_kill(SCREEN *scan, int signal)
|
|
||||||
+{
|
|
||||||
+ if (!scan || !scan->_read_thread)
|
|
||||||
+ goto out;
|
|
||||||
+ if (!&pthread_kill || !&pthread_equal || !&pthread_self)
|
|
||||||
+ goto out;
|
|
||||||
+ if (pthread_equal(scan->_read_thread, pthread_self()))
|
|
||||||
+ goto out;
|
|
||||||
+ pthread_kill(scan->_read_thread, signal);
|
|
||||||
+out:
|
|
||||||
+ return;
|
|
||||||
+}
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
#else /* !HAVE_SIGACTION */
|
|
||||||
|
|
||||||
#if HAVE_SIGVEC
|
|
||||||
--- ncurses/curses.priv.h
|
|
||||||
+++ ncurses/curses.priv.h 2006-05-18 14:31:29.000000000 +0200
|
|
||||||
@@ -48,6 +48,10 @@
|
|
||||||
|
|
||||||
#include <ncurses_dll.h>
|
|
||||||
|
|
||||||
+#if defined _REENTRANT || defined _THREAD_SAFE
|
|
||||||
+# include <pthread.h>
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
@@ -538,6 +542,12 @@
|
|
||||||
#define _nc_windows SP->_nc_sp_windows
|
|
||||||
|
|
||||||
bool _sig_winch;
|
|
||||||
+#if USE_SIGWINCH
|
|
||||||
+ bool _unblock_sigwinch;
|
|
||||||
+#if defined _REENTRANT || defined _THREAD_SAFE
|
|
||||||
+ pthread_t _read_thread;
|
|
||||||
+#endif
|
|
||||||
+#endif
|
|
||||||
SCREEN *_next_screen;
|
|
||||||
|
|
||||||
/* hashes for old and new lines */
|
|
||||||
@@ -1143,6 +1153,9 @@
|
|
||||||
extern NCURSES_EXPORT(void) _nc_scroll_optimize (void);
|
|
||||||
extern NCURSES_EXPORT(void) _nc_set_buffer (FILE *, bool);
|
|
||||||
extern NCURSES_EXPORT(void) _nc_signal_handler (bool);
|
|
||||||
+#if USE_SIGWINCH
|
|
||||||
+extern NCURSES_EXPORT(void) _nc_unblock (SCREEN *, int);
|
|
||||||
+#endif
|
|
||||||
extern NCURSES_EXPORT(void) _nc_synchook (WINDOW *);
|
|
||||||
extern NCURSES_EXPORT(void) _nc_trace_tries (struct tries *);
|
|
||||||
|
|
||||||
--- ncurses/base/lib_getch.c
|
|
||||||
+++ ncurses/base/lib_getch.c 2006-05-18 14:31:29.000000000 +0200
|
|
||||||
@@ -237,6 +237,10 @@
|
|
||||||
if (win == 0 || SP == 0)
|
|
||||||
returnCode(ERR);
|
|
||||||
|
|
||||||
+#if USE_SIGWINCH
|
|
||||||
+ _nc_unblock(SP, SIGWINCH);
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
if (cooked_key_in_fifo()) {
|
|
||||||
if (wgetch_should_refresh(win))
|
|
||||||
wrefresh(win);
|
|
||||||
--- ncurses/tinfo/lib_setup.c
|
|
||||||
+++ ncurses/tinfo/lib_setup.c 2006-05-18 15:24:54.000000000 +0200
|
|
||||||
@@ -42,6 +42,7 @@
|
|
||||||
#include <curses.priv.h>
|
|
||||||
#include <tic.h> /* for MAX_NAME_SIZE */
|
|
||||||
#include <term_entry.h>
|
|
||||||
+#include <SigAction.h>
|
|
||||||
|
|
||||||
#if SVR4_TERMIO && !defined(_POSIX_SOURCE)
|
|
||||||
#define _POSIX_SOURCE
|
|
||||||
@@ -119,6 +120,13 @@
|
|
||||||
default:
|
|
||||||
/* record a SIGWINCH */
|
|
||||||
have_sigwinch = 1;
|
|
||||||
+# if defined _REENTRANT || defined _THREAD_SAFE
|
|
||||||
+ scan = _nc_screen_chain;
|
|
||||||
+ while (scan) {
|
|
||||||
+ _nc_kill(scan, SIGWINCH);
|
|
||||||
+ scan = scan->_next_screen;
|
|
||||||
+ }
|
|
||||||
+# endif
|
|
||||||
break;
|
|
||||||
case 0:
|
|
||||||
/* temporarily disable the next block */
|
|
||||||
--- ncurses/tty/lib_tstp.c
|
|
||||||
+++ ncurses/tty/lib_tstp.c 2006-05-18 15:53:04.000000000 +0200
|
|
||||||
@@ -142,6 +142,9 @@
|
|
||||||
#ifdef SIGTTOU
|
|
||||||
int sigttou_blocked;
|
|
||||||
#endif
|
|
||||||
+#if defined _REENTRANT || defined _THREAD_SAFE
|
|
||||||
+ pthread_t reader = (pthread_t)0;
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
T(("tstp() called"));
|
|
||||||
|
|
||||||
@@ -169,6 +172,10 @@
|
|
||||||
(void) sigaddset(&mask, SIGALRM);
|
|
||||||
#if USE_SIGWINCH
|
|
||||||
(void) sigaddset(&mask, SIGWINCH);
|
|
||||||
+#if defined _REENTRANT || defined _THREAD_SAFE
|
|
||||||
+ reader = SP->_read_thread;
|
|
||||||
+ SP->_read_thread = (pthread_t)0;
|
|
||||||
+#endif
|
|
||||||
#endif
|
|
||||||
(void) sigprocmask(SIG_BLOCK, &mask, &omask);
|
|
||||||
|
|
||||||
@@ -214,6 +221,10 @@
|
|
||||||
sigaction(SIGTSTP, &oact, NULL);
|
|
||||||
flushinp();
|
|
||||||
|
|
||||||
+#if defined _REENTRANT || defined _THREAD_SAFE
|
|
||||||
+ SP->_read_thread = reader;
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
/*
|
|
||||||
* If the user modified the tty state while suspended, he wants
|
|
||||||
* those changes to stick. So save the new "default" terminal state.
|
|
||||||
@@ -332,6 +343,17 @@
|
|
||||||
result = FALSE;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
+
|
|
||||||
+#if USE_SIGWINCH
|
|
||||||
+ if (result && sig == SIGWINCH) {
|
|
||||||
+ sigset_t sigset;
|
|
||||||
+
|
|
||||||
+ sigemptyset(&sigset);
|
|
||||||
+ sigaddset(&sigset, SIGWINCH);
|
|
||||||
+ sigprocmask(SIG_BLOCK, &sigset, NULL);
|
|
||||||
+ }
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
T(("CatchIfDefault - will %scatch %s",
|
|
||||||
result ? "" : "not ", signal_name(sig)));
|
|
||||||
return result;
|
|
||||||
@@ -386,6 +408,10 @@
|
|
||||||
CatchIfDefault(SIGINT, cleanup);
|
|
||||||
CatchIfDefault(SIGTERM, cleanup);
|
|
||||||
#if USE_SIGWINCH
|
|
||||||
+ SP->_unblock_sigwinch = false;
|
|
||||||
+# if defined _REENTRANT || defined _THREAD_SAFE
|
|
||||||
+ SP->_read_thread = (pthread_t)0;
|
|
||||||
+# endif
|
|
||||||
CatchIfDefault(SIGWINCH, sigwinch);
|
|
||||||
#endif
|
|
||||||
initialized = TRUE;
|
|
||||||
@@ -393,3 +419,29 @@
|
|
||||||
}
|
|
||||||
returnVoid;
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+#if USE_SIGWINCH
|
|
||||||
+/*
|
|
||||||
+ * This is invoked once at the beginning of reading, to remember
|
|
||||||
+ * which thread should be interrupted if the SIGWINCH handler is
|
|
||||||
+ * called.
|
|
||||||
+ */
|
|
||||||
+
|
|
||||||
+NCURSES_EXPORT(void)
|
|
||||||
+_nc_unblock(SCREEN *scan, int signal)
|
|
||||||
+{
|
|
||||||
+ sigset_t sigset;
|
|
||||||
+
|
|
||||||
+ if (scan->_unblock_sigwinch)
|
|
||||||
+ return;
|
|
||||||
+ sigemptyset(&sigset);
|
|
||||||
+ sigaddset(&sigset, signal);
|
|
||||||
+ sigprocmask(SIG_UNBLOCK, &sigset, NULL);
|
|
||||||
+# if defined _REENTRANT || defined _THREAD_SAFE
|
|
||||||
+ /* Remember the terminal reading thread */
|
|
||||||
+ if (&pthread_self)
|
|
||||||
+ scan->_read_thread = pthread_self();
|
|
||||||
+# endif
|
|
||||||
+ scan->_unblock_sigwinch = true;
|
|
||||||
+}
|
|
||||||
+#endif
|
|
@@ -1,19 +0,0 @@
|
|||||||
--- ncurses/base/lib_freeall.c
|
|
||||||
+++ ncurses/base/lib_freeall.c
|
|
||||||
@@ -51,6 +51,7 @@
|
|
||||||
{
|
|
||||||
WINDOWLIST *p, *q;
|
|
||||||
char *s;
|
|
||||||
+ va_list empty_va;
|
|
||||||
|
|
||||||
T((T_CALLED("_nc_freeall()")));
|
|
||||||
#if NO_LEAKS
|
|
||||||
@@ -99,7 +100,7 @@
|
|
||||||
if ((s = _nc_home_terminfo()) != 0)
|
|
||||||
free(s);
|
|
||||||
|
|
||||||
- (void) _nc_printf_string(0, 0);
|
|
||||||
+ (void) _nc_printf_string(0, empty_va);
|
|
||||||
#ifdef TRACE
|
|
||||||
(void) _nc_trace_buf(-1, 0);
|
|
||||||
#endif
|
|
@@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:a8cef88b5cbbd77a666bb03eb82795d845c2e25bdc5fb5a0d5186b9b504f7356
|
|
||||||
size 1723602
|
|
3
ncurses-5.6-20070128-patch.tar.bz2
Normal file
3
ncurses-5.6-20070128-patch.tar.bz2
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:322cb2dbbd37327df2e2cd90325d06c862f598a01ffcb0c72a2992d939775966
|
||||||
|
size 153357
|
237
ncurses-5.6-pthread.dif
Normal file
237
ncurses-5.6-pthread.dif
Normal file
@@ -0,0 +1,237 @@
|
|||||||
|
--- ncurses/SigAction.h
|
||||||
|
+++ ncurses/SigAction.h 2007-01-31 12:39:37.000000000 +0100
|
||||||
|
@@ -55,6 +55,53 @@
|
||||||
|
typedef struct sigaction sigaction_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+#if defined(__GNUC__) && defined(linux)
|
||||||
|
+# if defined __USE_ISOC99
|
||||||
|
+# define _cat_pragma(exp) _Pragma(#exp)
|
||||||
|
+# define _weak_pragma(exp) _cat_pragma(weak name)
|
||||||
|
+# else
|
||||||
|
+# define _weak_pragma(exp)
|
||||||
|
+# endif
|
||||||
|
+# define _declare(name) __extension__ extern __typeof__(name) name
|
||||||
|
+# define weak_symbol(name) _weak_pragma(name) _declare(name) __attribute__((weak))
|
||||||
|
+#else
|
||||||
|
+# if defined(linux) && (defined(_REENTRANT) || defined(_THREAD_SAFE))
|
||||||
|
+# error The ncurses library has to be NPTL thread safe (requires the GCC)
|
||||||
|
+# endif
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+#if defined(linux) && (defined(_REENTRANT) || defined(_THREAD_SAFE))
|
||||||
|
+# include <pthread.h>
|
||||||
|
+
|
||||||
|
+weak_symbol(pthread_sigmask);
|
||||||
|
+weak_symbol(pthread_kill);
|
||||||
|
+weak_symbol(pthread_self);
|
||||||
|
+weak_symbol(pthread_equal);
|
||||||
|
+
|
||||||
|
+static inline int _nc__sigprocmask(int how, const sigset_t *newmask, sigset_t *oldmask)
|
||||||
|
+{
|
||||||
|
+ if (&pthread_sigmask)
|
||||||
|
+ return pthread_sigmask(how, newmask, oldmask);
|
||||||
|
+ else
|
||||||
|
+ return sigprocmask(how, newmask, oldmask);
|
||||||
|
+}
|
||||||
|
+# undef sigprocmask
|
||||||
|
+# define sigprocmask _nc__sigprocmask
|
||||||
|
+
|
||||||
|
+static inline void _nc_kill(SCREEN *scan, int signal)
|
||||||
|
+{
|
||||||
|
+ if (!scan || !scan->_read_thread)
|
||||||
|
+ goto out;
|
||||||
|
+ if (!&pthread_kill || !&pthread_equal || !&pthread_self)
|
||||||
|
+ goto out;
|
||||||
|
+ if (pthread_equal(scan->_read_thread, pthread_self()))
|
||||||
|
+ goto out;
|
||||||
|
+ pthread_kill(scan->_read_thread, signal);
|
||||||
|
+out:
|
||||||
|
+ return;
|
||||||
|
+}
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
#else /* !HAVE_SIGACTION */
|
||||||
|
|
||||||
|
#if HAVE_SIGVEC
|
||||||
|
--- ncurses/curses.priv.h
|
||||||
|
+++ ncurses/curses.priv.h 2007-01-31 12:40:37.000000000 +0100
|
||||||
|
@@ -48,6 +48,10 @@
|
||||||
|
|
||||||
|
#include <ncurses_dll.h>
|
||||||
|
|
||||||
|
+#if defined(linux) && (defined(_REENTRANT) || defined(_THREAD_SAFE))
|
||||||
|
+# include <pthread.h>
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
@@ -594,6 +598,11 @@ struct screen {
|
||||||
|
#define _nc_windows SP->_nc_sp_windows
|
||||||
|
|
||||||
|
bool _sig_winch;
|
||||||
|
+#if USE_SIGWINCH
|
||||||
|
+# if defined(linux) && (defined(_REENTRANT) || defined(_THREAD_SAFE))
|
||||||
|
+ pthread_t _read_thread;
|
||||||
|
+# endif
|
||||||
|
+#endif
|
||||||
|
SCREEN *_next_screen;
|
||||||
|
|
||||||
|
/* hashes for old and new lines */
|
||||||
|
@@ -1214,6 +1223,9 @@ extern NCURSES_EXPORT(void) _nc_scroll_o
|
||||||
|
extern NCURSES_EXPORT(void) _nc_scroll_optimize (void);
|
||||||
|
extern NCURSES_EXPORT(void) _nc_set_buffer (FILE *, bool);
|
||||||
|
extern NCURSES_EXPORT(void) _nc_signal_handler (bool);
|
||||||
|
+#if USE_SIGWINCH
|
||||||
|
+extern NCURSES_EXPORT(void) _nc_thread(SCREEN *);
|
||||||
|
+#endif
|
||||||
|
extern NCURSES_EXPORT(void) _nc_synchook (WINDOW *);
|
||||||
|
extern NCURSES_EXPORT(void) _nc_trace_tries (TRIES *);
|
||||||
|
|
||||||
|
--- ncurses/base/lib_getch.c
|
||||||
|
+++ ncurses/base/lib_getch.c 2007-01-31 12:41:27.000000000 +0100
|
||||||
|
@@ -237,6 +237,10 @@ _nc_wgetch(WINDOW *win,
|
||||||
|
if (win == 0 || SP == 0)
|
||||||
|
returnCode(ERR);
|
||||||
|
|
||||||
|
+#if USE_SIGWINCH
|
||||||
|
+ _nc_thread(SP);
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
if (cooked_key_in_fifo()) {
|
||||||
|
if (wgetch_should_refresh(win))
|
||||||
|
wrefresh(win);
|
||||||
|
--- ncurses/base/lib_set_term.c
|
||||||
|
+++ ncurses/base/lib_set_term.c 2007-01-31 13:08:37.000000000 +0100
|
||||||
|
@@ -144,6 +144,12 @@ delscreen(SCREEN *sp)
|
||||||
|
free(sp->_setbuf);
|
||||||
|
}
|
||||||
|
|
||||||
|
+#if USE_SIGWINCH
|
||||||
|
+# if defined(linux) && (defined(_REENTRANT) || defined(_THREAD_SAFE))
|
||||||
|
+ sp->_read_thread = (pthread_t)0;
|
||||||
|
+# endif
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
free(sp);
|
||||||
|
|
||||||
|
/*
|
||||||
|
@@ -559,6 +565,15 @@ _nc_setupscreen(int slines,
|
||||||
|
returnCode(ERR);
|
||||||
|
SP->_stdscr = stdscr;
|
||||||
|
|
||||||
|
+#if USE_SIGWINCH
|
||||||
|
+# if defined(linux) && (defined(_REENTRANT) || defined(_THREAD_SAFE))
|
||||||
|
+ if (&pthread_self)
|
||||||
|
+ SP->_read_thread = pthread_self();
|
||||||
|
+ else
|
||||||
|
+ SP->_read_thread = (pthread_t)0;
|
||||||
|
+# endif
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
returnCode(OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
--- ncurses/tinfo/lib_setup.c
|
||||||
|
+++ ncurses/tinfo/lib_setup.c 2007-01-31 11:46:17.000000000 +0100
|
||||||
|
@@ -42,6 +42,7 @@
|
||||||
|
#include <curses.priv.h>
|
||||||
|
#include <tic.h> /* for MAX_NAME_SIZE */
|
||||||
|
#include <term_entry.h>
|
||||||
|
+#include <SigAction.h>
|
||||||
|
|
||||||
|
#if SVR4_TERMIO && !defined(_POSIX_SOURCE)
|
||||||
|
#define _POSIX_SOURCE
|
||||||
|
@@ -119,6 +120,13 @@ _nc_handle_sigwinch(int enable)
|
||||||
|
default:
|
||||||
|
/* record a SIGWINCH */
|
||||||
|
have_sigwinch = 1;
|
||||||
|
+# if defined(linux) && (defined(_REENTRANT) || defined(_THREAD_SAFE))
|
||||||
|
+ scan = _nc_screen_chain;
|
||||||
|
+ while (scan) {
|
||||||
|
+ _nc_kill(scan, SIGWINCH);
|
||||||
|
+ scan = scan->_next_screen;
|
||||||
|
+ }
|
||||||
|
+# endif
|
||||||
|
break;
|
||||||
|
case 0:
|
||||||
|
/* temporarily disable the next block */
|
||||||
|
--- ncurses/tty/lib_tstp.c
|
||||||
|
+++ ncurses/tty/lib_tstp.c 2007-01-31 13:14:40.000000000 +0100
|
||||||
|
@@ -142,6 +142,11 @@ tstp(int dummy GCC_UNUSED)
|
||||||
|
#ifdef SIGTTOU
|
||||||
|
int sigttou_blocked;
|
||||||
|
#endif
|
||||||
|
+#if USE_SIGWINCH
|
||||||
|
+# if defined(linux) && (defined(_REENTRANT) || defined(_THREAD_SAFE))
|
||||||
|
+ pthread_t reader = (pthread_t)0;
|
||||||
|
+# endif
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
T(("tstp() called"));
|
||||||
|
|
||||||
|
@@ -169,6 +174,10 @@ tstp(int dummy GCC_UNUSED)
|
||||||
|
(void) sigaddset(&mask, SIGALRM);
|
||||||
|
#if USE_SIGWINCH
|
||||||
|
(void) sigaddset(&mask, SIGWINCH);
|
||||||
|
+# if defined(linux) && (defined(_REENTRANT) || defined(_THREAD_SAFE))
|
||||||
|
+ reader = SP->_read_thread;
|
||||||
|
+ SP->_read_thread = (pthread_t)0;
|
||||||
|
+# endif
|
||||||
|
#endif
|
||||||
|
(void) sigprocmask(SIG_BLOCK, &mask, &omask);
|
||||||
|
|
||||||
|
@@ -214,6 +223,12 @@ tstp(int dummy GCC_UNUSED)
|
||||||
|
sigaction(SIGTSTP, &oact, NULL);
|
||||||
|
flushinp();
|
||||||
|
|
||||||
|
+#if USE_SIGWINCH
|
||||||
|
+# if defined(linux) && (defined(_REENTRANT) || defined(_THREAD_SAFE))
|
||||||
|
+ SP->_read_thread = reader;
|
||||||
|
+# endif
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
/*
|
||||||
|
* If the user modified the tty state while suspended, he wants
|
||||||
|
* those changes to stick. So save the new "default" terminal state.
|
||||||
|
@@ -386,6 +401,13 @@ _nc_signal_handler(bool enable)
|
||||||
|
CatchIfDefault(SIGINT, cleanup);
|
||||||
|
CatchIfDefault(SIGTERM, cleanup);
|
||||||
|
#if USE_SIGWINCH
|
||||||
|
+# if defined(linux) && (defined(_REENTRANT) || defined(_THREAD_SAFE))
|
||||||
|
+ if (&pthread_self && &pthread_equal) {
|
||||||
|
+ pthread_t current = pthread_self();
|
||||||
|
+ if (!pthread_equal(SP->_read_thread, current))
|
||||||
|
+ SP->_read_thread = current;
|
||||||
|
+ }
|
||||||
|
+# endif
|
||||||
|
CatchIfDefault(SIGWINCH, sigwinch);
|
||||||
|
#endif
|
||||||
|
initialized = TRUE;
|
||||||
|
@@ -393,3 +415,25 @@ _nc_signal_handler(bool enable)
|
||||||
|
}
|
||||||
|
returnVoid;
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+#if USE_SIGWINCH
|
||||||
|
+/*
|
||||||
|
+ * This is invoked once at the beginning of reading, to remember
|
||||||
|
+ * which thread should be interrupted if the SIGWINCH handler is
|
||||||
|
+ * called.
|
||||||
|
+ */
|
||||||
|
+
|
||||||
|
+NCURSES_EXPORT(void)
|
||||||
|
+_nc_thread(SCREEN *scan)
|
||||||
|
+{
|
||||||
|
+# if defined(linux) && (defined(_REENTRANT) || defined(_THREAD_SAFE))
|
||||||
|
+ if (&pthread_self && &pthread_equal) {
|
||||||
|
+ pthread_t current = pthread_self();
|
||||||
|
+ if (pthread_equal(SP->_read_thread, current))
|
||||||
|
+ return;
|
||||||
|
+ /* Remember the terminal reading thread */
|
||||||
|
+ scan->_read_thread = current;
|
||||||
|
+ }
|
||||||
|
+# endif
|
||||||
|
+}
|
||||||
|
+#endif
|
File diff suppressed because it is too large
Load Diff
3
ncurses-5.6.tar.bz2
Normal file
3
ncurses-5.6.tar.bz2
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:1b93eddefaddb052dbd43b1e68d690a8f4119f2b8c8aa446e8a4a210bccbf3ef
|
||||||
|
size 1792977
|
@@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jan 31 19:27:11 CET 2007 - werner@suse.de
|
||||||
|
|
||||||
|
- Update to 5.6-20070128
|
||||||
|
- Split of tack a its own sub package to be able to specify the
|
||||||
|
different licenses of ncurses and tack (bug #231835)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Nov 17 16:34:56 CET 2006 - werner@suse.de
|
Fri Nov 17 16:34:56 CET 2006 - werner@suse.de
|
||||||
|
|
||||||
|
84
ncurses.spec
84
ncurses.spec
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package ncurses (Version 5.5)
|
# spec file for package ncurses (Version 5.6)
|
||||||
#
|
#
|
||||||
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||||
# This file and all modifications and additions to the pristine
|
# This file and all modifications and additions to the pristine
|
||||||
# package are under the same license as the package itself.
|
# package are under the same license as the package itself.
|
||||||
#
|
#
|
||||||
@@ -15,21 +15,19 @@ Name: ncurses
|
|||||||
BuildRequires: ed gcc-c++
|
BuildRequires: ed gcc-c++
|
||||||
%define terminfo() %{_datadir}/%{0}/%{1}
|
%define terminfo() %{_datadir}/%{0}/%{1}
|
||||||
%define tabset() %{_datadir}/%{0}/%{1}
|
%define tabset() %{_datadir}/%{0}/%{1}
|
||||||
License: GNU General Public License (GPL), Other License(s), see package
|
License: X11/MIT
|
||||||
Group: System/Libraries
|
Group: System/Libraries
|
||||||
Autoreqprov: on
|
Autoreqprov: on
|
||||||
Version: 5.5
|
Version: 5.6
|
||||||
Release: 40
|
Release: 1
|
||||||
Summary: New curses Libraries
|
Summary: New curses Libraries
|
||||||
Source0: ncurses-%{version}.tar.bz2
|
Source0: ncurses-%{version}.tar.bz2
|
||||||
Url: http://invisible-island.net/ncurses/ncurses.html
|
Url: http://invisible-island.net/ncurses/ncurses.html
|
||||||
Source1: ncurses-%{version}-20060513-patch.tar.bz2
|
Source1: ncurses-%{version}-20070128-patch.tar.bz2
|
||||||
Source2: handle.linux
|
Source2: handle.linux
|
||||||
Patch0: ncurses-%{version}.dif
|
Patch0: ncurses-%{version}.dif
|
||||||
Patch1: ncurses-5.3-printw.dif
|
Patch1: ncurses-5.3-printw.dif
|
||||||
Patch2: ncurses-5.4-wide.dif
|
Patch2: ncurses-5.6-pthread.dif
|
||||||
Patch3: ncurses-5.5-pthread.dif
|
|
||||||
Patch4: ncurses-5.5-valist.dif
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@@ -45,34 +43,38 @@ Authors:
|
|||||||
--------
|
--------
|
||||||
Zeyd M. Ben-Halim <zmbenhal@netcom.com>
|
Zeyd M. Ben-Halim <zmbenhal@netcom.com>
|
||||||
Eric S. Raymond <esr@thyrsus.com>
|
Eric S. Raymond <esr@thyrsus.com>
|
||||||
Thomas Dickey <dickey@clark.net>
|
Thomas E. Dickey <dickey@invisible-island.net>
|
||||||
Juergen Pfeifer <Juergen.Pfeifer@t-online.de>
|
Juergen Pfeifer <Juergen.Pfeifer@t-online.de>
|
||||||
|
Pavel Curtis
|
||||||
|
|
||||||
%package -n terminfo
|
%package -n terminfo
|
||||||
Summary: A terminal descriptions database
|
Summary: A terminal descriptions database
|
||||||
|
License: Public Domain, Freeware
|
||||||
Group: System/Base
|
Group: System/Base
|
||||||
Autoreqprov: on
|
Autoreqprov: on
|
||||||
|
|
||||||
%description -n terminfo
|
%description -n terminfo
|
||||||
This is the terminfo reference database, maintained by Eric Raymond.
|
This is the terminfo reference database, maintained in the ncurses
|
||||||
This database is the official successor to the 4.4BSD termcap file and
|
package. This database is the official successor to the 4.4BSD termcap
|
||||||
contains information about any known terminal. The ncurses library
|
file and contains information about any known terminal. The ncurses
|
||||||
makes use of this database to use terminals correctly. If you just use
|
library makes use of this database to use terminals correctly. If you
|
||||||
the Linux console, xterm, and VT100, you probably will not need this
|
just use the Linux console, xterm, and VT100, you probably will not
|
||||||
database -- a minimal /usr/share/terminfo tree for these terminals is
|
need this database -- a minimal /usr/share/terminfo tree for these
|
||||||
already included in the ncurses package.
|
terminals is already included in the ncurses package.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Authors:
|
Authors:
|
||||||
--------
|
--------
|
||||||
Eric S. Raymond <esr@thyrsus.com>
|
Eric S. Raymond <esr@thyrsus.com>
|
||||||
|
Thomas E. Dickey <dickey@invisible-island.net>
|
||||||
|
|
||||||
%package -n ncurses-devel
|
%package -n ncurses-devel
|
||||||
Summary: Include Files and Libraries mandatory for Development
|
Summary: Include Files and Libraries mandatory for Development
|
||||||
|
License: X11/MIT
|
||||||
Group: Development/Libraries/C and C++
|
Group: Development/Libraries/C and C++
|
||||||
Provides: ncurses:/usr/include/ncurses.h
|
Provides: ncurses:/usr/include/ncurses.h
|
||||||
Requires: ncurses = %{version}-%{release}
|
Requires: ncurses = %{version}-%{release}, /usr/bin/tack
|
||||||
Autoreqprov: on
|
Autoreqprov: on
|
||||||
|
|
||||||
%description -n ncurses-devel
|
%description -n ncurses-devel
|
||||||
@@ -85,16 +87,37 @@ Authors:
|
|||||||
--------
|
--------
|
||||||
Zeyd M. Ben-Halim <zmbenhal@netcom.com>
|
Zeyd M. Ben-Halim <zmbenhal@netcom.com>
|
||||||
Eric S. Raymond <esr@thyrsus.com>
|
Eric S. Raymond <esr@thyrsus.com>
|
||||||
Thomas Dickey <dickey@clark.net>
|
Thomas E. Dickey <dickey@invisible-island.net>
|
||||||
Juergen Pfeifer <Juergen.Pfeifer@t-online.de>
|
Juergen Pfeifer <Juergen.Pfeifer@t-online.de>
|
||||||
|
Pavel Curtis
|
||||||
|
|
||||||
|
%package -n tack
|
||||||
|
Summary: Terminfo action checker
|
||||||
|
License: GNU General Public License (GPL)
|
||||||
|
Group: Development/Tools/Building
|
||||||
|
Provides: ncurses-devel:/usr/bin/tack
|
||||||
|
Requires: ncurses = %{version}-%{release}
|
||||||
|
Autoreqprov: on
|
||||||
|
|
||||||
|
%description -n tack
|
||||||
|
This package contains the tack utility to help to build a new terminfo
|
||||||
|
entry describing an unknown terminal. It can also be used to test the
|
||||||
|
correctness of an existing entry, and to develop the correct pad
|
||||||
|
timings needed to ensure that screen updates do not fall behind the
|
||||||
|
incoming data stream.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Authors:
|
||||||
|
--------
|
||||||
|
Daniel Weaver <danw@znyx.com>
|
||||||
|
Eric S. Raymond <esr@thyrsus.com>
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n ncurses-%{version} -b0
|
%setup -q -n ncurses-%{version} -b0
|
||||||
tar Oxfj %{SOURCE1} | patch -p1 -s
|
tar Oxfj %{SOURCE1} | patch -p1 -s
|
||||||
%patch -P 1 -p0 -b .va
|
%patch -P 1 -p0 -b .va
|
||||||
%patch -P 2 -p0 -b .wd
|
%patch -P 2 -p0 -b .pt
|
||||||
%patch -P 3 -p0 -b .pt
|
|
||||||
%patch -P 4 -p0 -b .val
|
|
||||||
%patch -P 0 -p0
|
%patch -P 0 -p0
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@@ -138,6 +161,10 @@ tar Oxfj %{SOURCE1} | patch -p1 -s
|
|||||||
# No --enable-xmc-glitch because this seems to break yast2
|
# No --enable-xmc-glitch because this seems to break yast2
|
||||||
# on console/konsole (no magic cookie support on those?)
|
# on console/konsole (no magic cookie support on those?)
|
||||||
#
|
#
|
||||||
|
# No --with-termlib=tinfo because libncurses depend on
|
||||||
|
# libtinfo (is linked with) and therefore there is no
|
||||||
|
# advantage about splitting of a libtinfo (IMHO).
|
||||||
|
#
|
||||||
touch --reference=README config.sub config.guess
|
touch --reference=README config.sub config.guess
|
||||||
%{?suse_update_config:%{suse_update_config}}
|
%{?suse_update_config:%{suse_update_config}}
|
||||||
./configure --build ${RPM_ARCH}-suse-linux \
|
./configure --build ${RPM_ARCH}-suse-linux \
|
||||||
@@ -170,6 +197,7 @@ tar Oxfj %{SOURCE1} | patch -p1 -s
|
|||||||
--mandir=${MANDIR} \
|
--mandir=${MANDIR} \
|
||||||
--includedir=${INCDIR} \
|
--includedir=${INCDIR} \
|
||||||
"${WITHCHTYPE}" \
|
"${WITHCHTYPE}" \
|
||||||
|
--with-ticlib=tic \
|
||||||
--with-install-prefix=${RPM_BUILD_ROOT}
|
--with-install-prefix=${RPM_BUILD_ROOT}
|
||||||
#
|
#
|
||||||
# This is a hack to be able to boot strap
|
# This is a hack to be able to boot strap
|
||||||
@@ -317,10 +345,10 @@ tar Oxfj %{SOURCE1} | patch -p1 -s
|
|||||||
|
|
||||||
%files -n ncurses-devel
|
%files -n ncurses-devel
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
|
/usr/bin/ncurses*-config
|
||||||
/usr/bin/captoinfo
|
/usr/bin/captoinfo
|
||||||
/usr/bin/infocmp
|
/usr/bin/infocmp
|
||||||
/usr/bin/infotocap
|
/usr/bin/infotocap
|
||||||
/usr/bin/tack
|
|
||||||
/usr/bin/tic
|
/usr/bin/tic
|
||||||
/usr/include/*.h
|
/usr/include/*.h
|
||||||
/usr/%{_lib}/lib*.a
|
/usr/%{_lib}/lib*.a
|
||||||
@@ -328,15 +356,23 @@ tar Oxfj %{SOURCE1} | patch -p1 -s
|
|||||||
%doc %{_mandir}/man1/captoinfo.1.gz
|
%doc %{_mandir}/man1/captoinfo.1.gz
|
||||||
%doc %{_mandir}/man1/infocmp.1.gz
|
%doc %{_mandir}/man1/infocmp.1.gz
|
||||||
%doc %{_mandir}/man1/infotocap.1.gz
|
%doc %{_mandir}/man1/infotocap.1.gz
|
||||||
%doc %{_mandir}/man1/tack.1.gz
|
|
||||||
%doc %{_mandir}/man1/tic.1.gz
|
%doc %{_mandir}/man1/tic.1.gz
|
||||||
%doc %{_mandir}/man3/*.gz
|
%doc %{_mandir}/man3/*.gz
|
||||||
%doc %{_mandir}/man7/*.gz
|
%doc %{_mandir}/man7/*.gz
|
||||||
|
|
||||||
|
%files -n tack
|
||||||
|
%defattr(-,root,root)
|
||||||
|
/usr/bin/tack
|
||||||
|
%doc %{_mandir}/man1/tack.1.gz
|
||||||
|
|
||||||
%files -f extension.list -n terminfo
|
%files -f extension.list -n terminfo
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
|
|
||||||
%changelog -n ncurses
|
%changelog -n ncurses
|
||||||
|
* Wed Jan 31 2007 - werner@suse.de
|
||||||
|
- Update to 5.6-20070128
|
||||||
|
- Split of tack a its own sub package to be able to specify the
|
||||||
|
different licenses of ncurses and tack (bug #231835)
|
||||||
* Fri Nov 17 2006 - werner@suse.de
|
* Fri Nov 17 2006 - werner@suse.de
|
||||||
- Revert broken change for rxvt from patchlevel 20051015 (#221259)
|
- Revert broken change for rxvt from patchlevel 20051015 (#221259)
|
||||||
* Wed Nov 15 2006 - werner@suse.de
|
* Wed Nov 15 2006 - werner@suse.de
|
||||||
|
Reference in New Issue
Block a user