summaryrefslogtreecommitdiffstats
path: root/src/globals.h
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-08-21 19:47:48 +0200
committerBram Moolenaar <Bram@vim.org>2018-08-21 19:47:48 +0200
commit8e82c057ffb86cec3210ad8a22ad3f21d52e0953 (patch)
tree096ec9398f1c11cfbbc13b4e3531c9723d608be6 /src/globals.h
parent8c5e0093c9badced73e382915fb024a5c3ea463b (diff)
patch 8.1.0312: wrong type for flags used in signal handlersv8.1.0312
Problem: Wrong type for flags used in signal handlers. Solution: Use sig_atomic_t. (Dominique Pelle, closes #3356)
Diffstat (limited to 'src/globals.h')
-rw-r--r--src/globals.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/globals.h b/src/globals.h
index 09820cfdf2..fa5b493e8a 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -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 */