Mercurial > vim
diff src/globals.h @ 14597:27e814e21594 v8.1.0312
patch 8.1.0312: wrong type for flags used in signal handlers
commit https://github.com/vim/vim/commit/8e82c057ffb86cec3210ad8a22ad3f21d52e0953
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Aug 21 19:47:48 2018 +0200
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 https://github.com/vim/vim/issues/3356)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 21 Aug 2018 20:00:07 +0200 |
parents | 4caa51067cb8 |
children | f1b7d308de2f |
line wrap: on
line diff
--- a/src/globals.h +++ b/src/globals.h @@ -518,7 +518,7 @@ EXTERN char *foreground_argument INIT(= * * 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(= F /* 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); 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 */