From 006c5daa682b5d951fb4a0d7945d45a722f0690b Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 16 Apr 2011 15:04:41 -0700 Subject: [PATCH] * process.c (keyboard_bit_set): Define only if SIGIO. (send_process_trap): Mark it with NO_RETURN if it doesn't return. (send_process): Repair possible setjmp clobbering. --- src/ChangeLog | 4 ++++ src/process.c | 11 +++++++++++ 2 files changed, 15 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 172fccc2dcf..e44331dcd4d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,9 @@ 2011-04-16 Paul Eggert + * process.c (keyboard_bit_set): Define only if SIGIO. + (send_process_trap): Mark it with NO_RETURN if it doesn't return. + (send_process): Repair possible setjmp clobbering. + * s/usg5-4-common.h (SETUP_SLAVE_PTY): Don't pass extra arg to 'fatal'. * eval.c: Include , for vsnprintf on non-GNU/Linux hosts. diff --git a/src/process.c b/src/process.c index c9c6ab6d4b3..d8851c56cf0 100644 --- a/src/process.c +++ b/src/process.c @@ -237,7 +237,9 @@ static int process_output_skip; static Lisp_Object Fget_process (Lisp_Object); static void create_process (Lisp_Object, char **, Lisp_Object); +#ifdef SIGIO static int keyboard_bit_set (SELECT_TYPE *); +#endif static void deactivate_process (Lisp_Object); static void status_notify (struct Lisp_Process *); static int read_process_output (Lisp_Object, int); @@ -5220,6 +5222,10 @@ read_process_output (Lisp_Object proc, register int channel) static jmp_buf send_process_frame; static Lisp_Object process_sent_to; +#ifndef FORWARD_SIGNAL_TO_MAIN_THREAD +static void send_process_trap (int) NO_RETURN; +#endif + static void send_process_trap (int ignore) { @@ -5360,6 +5366,8 @@ send_process (volatile Lisp_Object proc, const char *volatile buf, when returning with longjmp despite being declared volatile. */ if (!setjmp (send_process_frame)) { + p = XPROCESS (proc); /* Repair any setjmp clobbering. */ + process_sent_to = proc; while (len > 0) { @@ -6583,6 +6591,8 @@ delete_gpm_wait_descriptor (int desc) delete_keyboard_wait_descriptor (desc); } +# ifdef SIGIO + /* Return nonzero if *MASK has a bit set that corresponds to one of the keyboard input descriptors. */ @@ -6598,6 +6608,7 @@ keyboard_bit_set (fd_set *mask) return 0; } +# endif #else /* not subprocesses */ -- 2.39.2