mirror of
https://github.com/vim/vim.git
synced 2025-09-29 04:34:16 -04:00
patch 8.1.0312: wrong type for flags used in signal handlers
Problem: Wrong type for flags used in signal handlers. Solution: Use sig_atomic_t. (Dominique Pelle, closes #3356)
This commit is contained in:
@@ -518,7 +518,7 @@ EXTERN char *foreground_argument INIT(= NULL);
|
||||
*
|
||||
* volatile because it is used in signal handler sig_sysmouse().
|
||||
*/
|
||||
EXTERN volatile int hold_gui_events INIT(= 0);
|
||||
EXTERN volatile sig_atomic_t hold_gui_events INIT(= 0);
|
||||
|
||||
/*
|
||||
* When resizing the shell is postponed, remember the new size, and call
|
||||
@@ -655,7 +655,7 @@ EXTERN int entered_free_all_mem INIT(= FALSE);
|
||||
/* TRUE when in or after free_all_mem() */
|
||||
#endif
|
||||
/* volatile because it is used in signal handler deathtrap(). */
|
||||
EXTERN volatile int full_screen INIT(= FALSE);
|
||||
EXTERN volatile sig_atomic_t full_screen INIT(= FALSE);
|
||||
/* TRUE when doing full-screen output
|
||||
* otherwise only writing some messages */
|
||||
|
||||
@@ -800,11 +800,11 @@ EXTERN JMP_BUF x_jump_env;
|
||||
EXTERN JMP_BUF lc_jump_env; /* argument to SETJMP() */
|
||||
# ifdef SIGHASARG
|
||||
/* volatile because it is used in signal handlers. */
|
||||
EXTERN volatile int lc_signal; /* caught signal number, 0 when no was signal
|
||||
EXTERN volatile sig_atomic_t lc_signal; /* caught signal number, 0 when no was signal
|
||||
caught; used for mch_libcall() */
|
||||
# endif
|
||||
/* volatile because it is used in signal handler deathtrap(). */
|
||||
EXTERN volatile int lc_active INIT(= FALSE); /* TRUE when lc_jump_env is valid. */
|
||||
EXTERN volatile sig_atomic_t lc_active INIT(= FALSE); /* TRUE when lc_jump_env is valid. */
|
||||
#endif
|
||||
|
||||
#if defined(FEAT_MBYTE) || defined(FEAT_POSTSCRIPT)
|
||||
@@ -1037,7 +1037,7 @@ EXTERN FILE *scriptout INIT(= NULL); /* stream to write script to */
|
||||
EXTERN int read_cmd_fd INIT(= 0); /* fd to read commands from */
|
||||
|
||||
/* volatile because it is used in signal handler catch_sigint(). */
|
||||
EXTERN volatile int got_int INIT(= FALSE); /* set to TRUE when interrupt
|
||||
EXTERN volatile sig_atomic_t got_int INIT(= FALSE); /* set to TRUE when interrupt
|
||||
signal occurred */
|
||||
#ifdef USE_TERM_CONSOLE
|
||||
EXTERN int term_console INIT(= FALSE); /* set to TRUE when console used */
|
||||
|
Reference in New Issue
Block a user