aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGlenn Morris2011-03-26 19:27:11 -0700
committerGlenn Morris2011-03-26 19:27:11 -0700
commit9af30bdf17f8371664bc0c5854c91c2e46257b5e (patch)
treeef68d0a44cbdc312405a65101dbc5df41316c71a /src
parent7a097943f7d3433a5d053eee4b2f3254230fee64 (diff)
downloademacs-9af30bdf17f8371664bc0c5854c91c2e46257b5e.tar.gz
emacs-9af30bdf17f8371664bc0c5854c91c2e46257b5e.zip
Remove (RET)SIGTYPE; it is identical to void on all supported systems.
Ref: http://lists.gnu.org/archive/html/emacs-devel/2011-03/msg01068.html * configure.in (AC_TYPE_SIGNAL): Remove obsolete macro. (AH_BOTTOM): Do not define SIGTYPE. * lib-src/emacsclient.c: Replace SIGTYPE with void. * nt/config.nt: Remove RETSIGTYPE, SIGTYPE (identical to void). * src/syssignal.h: Replace RETSIGTYPE with void. * src/atimer.c, src/data.c, src/dispnew.c, src/emacs.c, src/floatfns.c: * src/keyboard.c, src/keyboard.h, src/lisp.h, src/process.c, src/sysdep.c: * src/xterm.c: Replace SIGTYPE with void everywhere. * src/s/template.h (SIGTYPE): Remove commented out definition. * src/s/usg5-4-common.h (SIGTYPE): Remove definition. * admin/CPP-DEFINES: Remove SIGTYPE.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog9
-rw-r--r--src/atimer.c4
-rw-r--r--src/data.c2
-rw-r--r--src/dispnew.c2
-rw-r--r--src/emacs.c4
-rw-r--r--src/floatfns.c6
-rw-r--r--src/keyboard.c12
-rw-r--r--src/keyboard.h2
-rw-r--r--src/lisp.h2
-rw-r--r--src/process.c8
-rw-r--r--src/s/template.h9
-rw-r--r--src/s/usg5-4-common.h3
-rw-r--r--src/sysdep.c4
-rw-r--r--src/syssignal.h2
-rw-r--r--src/xterm.c6
15 files changed, 36 insertions, 39 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 06972a5bcb1..54b24c50a1c 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,12 @@
12011-03-27 Glenn Morris <rgm@gnu.org>
2
3 * syssignal.h: Replace RETSIGTYPE with void.
4 * atimer.c, data.c, dispnew.c, emacs.c, floatfns.c, keyboard.c:
5 * keyboard.h, lisp.h, process.c, sysdep.c, xterm.c:
6 Replace SIGTYPE with void everywhere.
7 * s/usg5-4-common.h (SIGTYPE): Remove definition.
8 * s/template.h (SIGTYPE): Remove commented out definition.
9
12011-03-26 Eli Zaretskii <eliz@gnu.org> 102011-03-26 Eli Zaretskii <eliz@gnu.org>
2 11
3 * xdisp.c (redisplay_window): Don't check buffer's clip_changed 12 * xdisp.c (redisplay_window): Don't check buffer's clip_changed
diff --git a/src/atimer.c b/src/atimer.c
index e10add961eb..b947ea59ccd 100644
--- a/src/atimer.c
+++ b/src/atimer.c
@@ -64,7 +64,7 @@ static void set_alarm (void);
64static void schedule_atimer (struct atimer *); 64static void schedule_atimer (struct atimer *);
65static struct atimer *append_atimer_lists (struct atimer *, 65static struct atimer *append_atimer_lists (struct atimer *,
66 struct atimer *); 66 struct atimer *);
67SIGTYPE alarm_signal_handler (int signo); 67void alarm_signal_handler (int signo);
68 68
69 69
70/* Start a new atimer of type TYPE. TIME specifies when the timer is 70/* Start a new atimer of type TYPE. TIME specifies when the timer is
@@ -388,7 +388,7 @@ run_timers (void)
388/* Signal handler for SIGALRM. SIGNO is the signal number, i.e. 388/* Signal handler for SIGALRM. SIGNO is the signal number, i.e.
389 SIGALRM. */ 389 SIGALRM. */
390 390
391SIGTYPE 391void
392alarm_signal_handler (int signo) 392alarm_signal_handler (int signo)
393{ 393{
394#ifndef SYNC_INPUT 394#ifndef SYNC_INPUT
diff --git a/src/data.c b/src/data.c
index 01aafbcede4..36a64d888de 100644
--- a/src/data.c
+++ b/src/data.c
@@ -3300,7 +3300,7 @@ syms_of_data (void)
3300 XSYMBOL (intern_c_string ("most-negative-fixnum"))->constant = 1; 3300 XSYMBOL (intern_c_string ("most-negative-fixnum"))->constant = 1;
3301} 3301}
3302 3302
3303static SIGTYPE 3303static void
3304arith_error (int signo) 3304arith_error (int signo)
3305{ 3305{
3306 sigsetmask (SIGEMPTYMASK); 3306 sigsetmask (SIGEMPTYMASK);
diff --git a/src/dispnew.c b/src/dispnew.c
index 093ed9524e4..a15b5f45e60 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -5566,7 +5566,7 @@ marginal_area_string (struct window *w, enum window_part part,
5566 5566
5567#ifdef SIGWINCH 5567#ifdef SIGWINCH
5568 5568
5569static SIGTYPE 5569static void
5570window_change_signal (int signalnum) /* If we don't have an argument, */ 5570window_change_signal (int signalnum) /* If we don't have an argument, */
5571 /* some compilers complain in signal calls. */ 5571 /* some compilers complain in signal calls. */
5572{ 5572{
diff --git a/src/emacs.c b/src/emacs.c
index 0382ade728d..6bdd2550ed1 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -308,7 +308,7 @@ pthread_t main_thread;
308 308
309 309
310/* Handle bus errors, invalid instruction, etc. */ 310/* Handle bus errors, invalid instruction, etc. */
311SIGTYPE 311void
312fatal_error_signal (int sig) 312fatal_error_signal (int sig)
313{ 313{
314 SIGNAL_THREAD_CHECK (sig); 314 SIGNAL_THREAD_CHECK (sig);
@@ -345,7 +345,7 @@ fatal_error_signal (int sig)
345#ifdef SIGDANGER 345#ifdef SIGDANGER
346 346
347/* Handler for SIGDANGER. */ 347/* Handler for SIGDANGER. */
348SIGTYPE 348void
349memory_warning_signal (sig) 349memory_warning_signal (sig)
350 int sig; 350 int sig;
351{ 351{
diff --git a/src/floatfns.c b/src/floatfns.c
index bc03509b757..1232fc0afa1 100644
--- a/src/floatfns.c
+++ b/src/floatfns.c
@@ -103,7 +103,7 @@ extern double logb (double);
103#endif 103#endif
104 104
105#ifdef FLOAT_CATCH_SIGILL 105#ifdef FLOAT_CATCH_SIGILL
106static SIGTYPE float_error (); 106static void float_error ();
107#endif 107#endif
108 108
109/* Nonzero while executing in floating point. 109/* Nonzero while executing in floating point.
@@ -126,7 +126,7 @@ static const char *float_error_fn_name;
126 Handle errors which may result in signals or may set errno. 126 Handle errors which may result in signals or may set errno.
127 127
128 Note that float_error may be declared to return void, so you can't 128 Note that float_error may be declared to return void, so you can't
129 just cast the zero after the colon to (SIGTYPE) to make the types 129 just cast the zero after the colon to (void) to make the types
130 check properly. */ 130 check properly. */
131 131
132#ifdef FLOAT_CHECK_ERRNO 132#ifdef FLOAT_CHECK_ERRNO
@@ -960,7 +960,7 @@ Rounds the value toward zero. */)
960} 960}
961 961
962#ifdef FLOAT_CATCH_SIGILL 962#ifdef FLOAT_CATCH_SIGILL
963static SIGTYPE 963static void
964float_error (signo) 964float_error (signo)
965 int signo; 965 int signo;
966{ 966{
diff --git a/src/keyboard.c b/src/keyboard.c
index c4ef2795f6a..06f375e0d9c 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -434,15 +434,15 @@ static void restore_getcjmp (jmp_buf);
434static Lisp_Object apply_modifiers (int, Lisp_Object); 434static Lisp_Object apply_modifiers (int, Lisp_Object);
435static void clear_event (struct input_event *); 435static void clear_event (struct input_event *);
436static Lisp_Object restore_kboard_configuration (Lisp_Object); 436static Lisp_Object restore_kboard_configuration (Lisp_Object);
437static SIGTYPE interrupt_signal (int signalnum); 437static void interrupt_signal (int signalnum);
438#ifdef SIGIO 438#ifdef SIGIO
439static SIGTYPE input_available_signal (int signo); 439static void input_available_signal (int signo);
440#endif 440#endif
441static void handle_interrupt (void); 441static void handle_interrupt (void);
442static void timer_start_idle (void); 442static void timer_start_idle (void);
443static void timer_stop_idle (void); 443static void timer_stop_idle (void);
444static void timer_resume_idle (void); 444static void timer_resume_idle (void);
445static SIGTYPE handle_user_signal (int); 445static void handle_user_signal (int);
446static char *find_user_signal_name (int); 446static char *find_user_signal_name (int);
447static int store_user_signal_events (void); 447static int store_user_signal_events (void);
448 448
@@ -7082,7 +7082,7 @@ process_pending_signals (void)
7082#ifdef SIGIO /* for entire page */ 7082#ifdef SIGIO /* for entire page */
7083/* Note SIGIO has been undef'd if FIONREAD is missing. */ 7083/* Note SIGIO has been undef'd if FIONREAD is missing. */
7084 7084
7085static SIGTYPE 7085static void
7086input_available_signal (int signo) 7086input_available_signal (int signo)
7087{ 7087{
7088 /* Must preserve main program's value of errno. */ 7088 /* Must preserve main program's value of errno. */
@@ -7160,7 +7160,7 @@ add_user_signal (int sig, const char *name)
7160 signal (sig, handle_user_signal); 7160 signal (sig, handle_user_signal);
7161} 7161}
7162 7162
7163static SIGTYPE 7163static void
7164handle_user_signal (int sig) 7164handle_user_signal (int sig)
7165{ 7165{
7166 int old_errno = errno; 7166 int old_errno = errno;
@@ -10712,7 +10712,7 @@ clear_waiting_for_input (void)
10712 SIGINT was generated by C-g, so we call handle_interrupt. 10712 SIGINT was generated by C-g, so we call handle_interrupt.
10713 Otherwise, the handler kills Emacs. */ 10713 Otherwise, the handler kills Emacs. */
10714 10714
10715static SIGTYPE 10715static void
10716interrupt_signal (int signalnum) /* If we don't have an argument, some */ 10716interrupt_signal (int signalnum) /* If we don't have an argument, some */
10717 /* compilers complain in signal calls. */ 10717 /* compilers complain in signal calls. */
10718{ 10718{
diff --git a/src/keyboard.h b/src/keyboard.h
index ba3c909c4dd..2ff370306b6 100644
--- a/src/keyboard.h
+++ b/src/keyboard.h
@@ -485,7 +485,7 @@ extern void push_frame_kboard (struct frame *);
485extern void pop_kboard (void); 485extern void pop_kboard (void);
486extern void temporarily_switch_to_single_kboard (struct frame *); 486extern void temporarily_switch_to_single_kboard (struct frame *);
487extern void record_asynch_buffer_change (void); 487extern void record_asynch_buffer_change (void);
488extern SIGTYPE input_poll_signal (int); 488extern void input_poll_signal (int);
489extern void start_polling (void); 489extern void start_polling (void);
490extern void stop_polling (void); 490extern void stop_polling (void);
491extern void set_poll_suppress_count (int); 491extern void set_poll_suppress_count (int);
diff --git a/src/lisp.h b/src/lisp.h
index e98172ec104..8c7d4da8aa9 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -3181,7 +3181,7 @@ extern Lisp_Object decode_env_path (const char *, const char *);
3181extern Lisp_Object empty_unibyte_string, empty_multibyte_string; 3181extern Lisp_Object empty_unibyte_string, empty_multibyte_string;
3182extern Lisp_Object Qfile_name_handler_alist; 3182extern Lisp_Object Qfile_name_handler_alist;
3183extern void (*fatal_error_signal_hook) (void); 3183extern void (*fatal_error_signal_hook) (void);
3184extern SIGTYPE fatal_error_signal (int); 3184extern void fatal_error_signal (int);
3185EXFUN (Fkill_emacs, 1) NO_RETURN; 3185EXFUN (Fkill_emacs, 1) NO_RETURN;
3186#if HAVE_SETLOCALE 3186#if HAVE_SETLOCALE
3187void fixup_locale (void); 3187void fixup_locale (void);
diff --git a/src/process.c b/src/process.c
index 639b6a49fce..148f5b59f8a 100644
--- a/src/process.c
+++ b/src/process.c
@@ -5470,7 +5470,7 @@ read_process_output (Lisp_Object proc, register int channel)
5470jmp_buf send_process_frame; 5470jmp_buf send_process_frame;
5471Lisp_Object process_sent_to; 5471Lisp_Object process_sent_to;
5472 5472
5473static SIGTYPE 5473static void
5474send_process_trap (int ignore) 5474send_process_trap (int ignore)
5475{ 5475{
5476 SIGNAL_THREAD_CHECK (SIGPIPE); 5476 SIGNAL_THREAD_CHECK (SIGPIPE);
@@ -5497,7 +5497,7 @@ send_process (volatile Lisp_Object proc, const char *volatile buf,
5497 EMACS_INT rv; 5497 EMACS_INT rv;
5498 struct coding_system *coding; 5498 struct coding_system *coding;
5499 struct gcpro gcpro1; 5499 struct gcpro gcpro1;
5500 SIGTYPE (*volatile old_sigpipe) (int); 5500 void (*volatile old_sigpipe) (int);
5501 5501
5502 GCPRO1 (object); 5502 GCPRO1 (object);
5503 5503
@@ -5619,7 +5619,7 @@ send_process (volatile Lisp_Object proc, const char *volatile buf,
5619 while (this > 0) 5619 while (this > 0)
5620 { 5620 {
5621 int outfd = p->outfd; 5621 int outfd = p->outfd;
5622 old_sigpipe = (SIGTYPE (*) (int)) signal (SIGPIPE, send_process_trap); 5622 old_sigpipe = (void (*) (int)) signal (SIGPIPE, send_process_trap);
5623#ifdef DATAGRAM_SOCKETS 5623#ifdef DATAGRAM_SOCKETS
5624 if (DATAGRAM_CHAN_P (outfd)) 5624 if (DATAGRAM_CHAN_P (outfd))
5625 { 5625 {
@@ -6379,7 +6379,7 @@ process has been transmitted to the serial port. */)
6379 indirectly; if it does, that is a bug */ 6379 indirectly; if it does, that is a bug */
6380 6380
6381#ifdef SIGCHLD 6381#ifdef SIGCHLD
6382static SIGTYPE 6382static void
6383sigchld_handler (int signo) 6383sigchld_handler (int signo)
6384{ 6384{
6385 int old_errno = errno; 6385 int old_errno = errno;
diff --git a/src/s/template.h b/src/s/template.h
index ee5afa81de4..4e0400e99e3 100644
--- a/src/s/template.h
+++ b/src/s/template.h
@@ -77,15 +77,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
77 a file that someone else has modified in his Emacs. */ 77 a file that someone else has modified in his Emacs. */
78#define CLASH_DETECTION 78#define CLASH_DETECTION
79 79
80/* Define this if your operating system declares signal handlers to
81 have a type other than the usual. `The usual' is `void' for ANSI C
82 systems (i.e. when the __STDC__ macro is defined), and `int' for
83 pre-ANSI systems. If you're using GCC on an older system, __STDC__
84 will be defined, but the system's include files will still say that
85 signal returns int or whatever; in situations like that, define
86 this to be what the system's include files want. */
87/* #define SIGTYPE int */
88
89/* If the character used to separate elements of the executable path 80/* If the character used to separate elements of the executable path
90 is not ':', #define this to be the appropriate character constant. */ 81 is not ':', #define this to be the appropriate character constant. */
91/* #define SEPCHAR ':' */ 82/* #define SEPCHAR ':' */
diff --git a/src/s/usg5-4-common.h b/src/s/usg5-4-common.h
index aeedd7f4b15..236f71e3007 100644
--- a/src/s/usg5-4-common.h
+++ b/src/s/usg5-4-common.h
@@ -38,9 +38,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
38/* The docs for system V/386 suggest v.3 has sigpause, so let's try it. */ 38/* The docs for system V/386 suggest v.3 has sigpause, so let's try it. */
39#define HAVE_SYSV_SIGPAUSE 39#define HAVE_SYSV_SIGPAUSE
40 40
41/* On USG systems signal handlers return void. */
42#define SIGTYPE void
43
44/* Get FIONREAD from <sys/filio.h>. Get <sys/ttold.h> to get struct tchars. 41/* Get FIONREAD from <sys/filio.h>. Get <sys/ttold.h> to get struct tchars.
45 But get <termio.h> first to make sure ttold.h doesn't interfere. 42 But get <termio.h> first to make sure ttold.h doesn't interfere.
46 And don't try to use SIGIO yet. */ 43 And don't try to use SIGIO yet. */
diff --git a/src/sysdep.c b/src/sysdep.c
index 14db0fd26d0..1bb400421f0 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -449,7 +449,7 @@ child_setup_tty (int out)
449struct save_signal 449struct save_signal
450{ 450{
451 int code; 451 int code;
452 SIGTYPE (*handler) (int); 452 void (*handler) (int);
453}; 453};
454 454
455static void save_signal_handlers (struct save_signal *); 455static void save_signal_handlers (struct save_signal *);
@@ -608,7 +608,7 @@ save_signal_handlers (struct save_signal *saved_handlers)
608 while (saved_handlers->code) 608 while (saved_handlers->code)
609 { 609 {
610 saved_handlers->handler 610 saved_handlers->handler
611 = (SIGTYPE (*) (int)) signal (saved_handlers->code, SIG_IGN); 611 = (void (*) (int)) signal (saved_handlers->code, SIG_IGN);
612 saved_handlers++; 612 saved_handlers++;
613 } 613 }
614} 614}
diff --git a/src/syssignal.h b/src/syssignal.h
index 7b4070322d6..03768168e20 100644
--- a/src/syssignal.h
+++ b/src/syssignal.h
@@ -69,7 +69,7 @@ extern sigset_t sys_sigmask ();
69 69
70/* Whether this is what all systems want or not, this is what 70/* Whether this is what all systems want or not, this is what
71 appears to be assumed in the source, for example data.c:arith_error. */ 71 appears to be assumed in the source, for example data.c:arith_error. */
72typedef RETSIGTYPE (*signal_handler_t) (int); 72typedef void (*signal_handler_t) (int);
73 73
74signal_handler_t sys_signal (int signal_number, signal_handler_t action); 74signal_handler_t sys_signal (int signal_number, signal_handler_t action);
75sigset_t sys_sigblock (sigset_t new_mask); 75sigset_t sys_sigblock (sigset_t new_mask);
diff --git a/src/xterm.c b/src/xterm.c
index f87c22912a4..0b18356b0a3 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -349,7 +349,7 @@ static int handle_one_xevent (struct x_display_info *, XEvent *,
349 int *, struct input_event *); 349 int *, struct input_event *);
350/* Don't declare this NO_RETURN because we want no 350/* Don't declare this NO_RETURN because we want no
351 interference with debugging failing X calls. */ 351 interference with debugging failing X calls. */
352static SIGTYPE x_connection_closed (Display *, const char *); 352static void x_connection_closed (Display *, const char *);
353 353
354 354
355/* Flush display of frame F, or of all frames if F is null. */ 355/* Flush display of frame F, or of all frames if F is null. */
@@ -7650,7 +7650,7 @@ x_trace_wire (void)
7650 SIGPIPE will fail, causing Xlib to invoke the X IO error handler, 7650 SIGPIPE will fail, causing Xlib to invoke the X IO error handler,
7651 which will do the appropriate cleanup for us. */ 7651 which will do the appropriate cleanup for us. */
7652 7652
7653static SIGTYPE 7653static void
7654x_connection_signal (int signalnum) /* If we don't have an argument, */ 7654x_connection_signal (int signalnum) /* If we don't have an argument, */
7655 /* some compilers complain in signal calls. */ 7655 /* some compilers complain in signal calls. */
7656{ 7656{
@@ -7673,7 +7673,7 @@ static char *error_msg;
7673/* Handle the loss of connection to display DPY. ERROR_MESSAGE is 7673/* Handle the loss of connection to display DPY. ERROR_MESSAGE is
7674 the text of an error message that lead to the connection loss. */ 7674 the text of an error message that lead to the connection loss. */
7675 7675
7676static SIGTYPE 7676static void
7677x_connection_closed (Display *dpy, const char *error_message) 7677x_connection_closed (Display *dpy, const char *error_message)
7678{ 7678{
7679 struct x_display_info *dpyinfo = x_display_info_for_display (dpy); 7679 struct x_display_info *dpyinfo = x_display_info_for_display (dpy);