summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.0312
blob: 9db92c0d5c4af6df22cb868020e6c001389c2d74 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
To: vim_dev@googlegroups.com
Subject: Patch 8.1.0312
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------

Patch 8.1.0312
Problem:    Wrong type for flags used in signal handlers.
Solution:   Use sig_atomic_t. (Dominique Pelle, closes #3356)
Files:	    src/globals.h, src/os_unix.c, src/os_win32.h


*** ../vim-8.1.0311/src/globals.h	2018-08-14 13:38:12.744559267 +0200
--- src/globals.h	2018-08-21 19:32:32.566883918 +0200
***************
*** 518,524 ****
   *
   * volatile because it is used in signal handler sig_sysmouse().
   */
! EXTERN volatile int hold_gui_events INIT(= 0);
  
  /*
   * When resizing the shell is postponed, remember the new size, and call
--- 518,524 ----
   *
   * volatile because it is used in signal handler sig_sysmouse().
   */
! EXTERN volatile sig_atomic_t hold_gui_events INIT(= 0);
  
  /*
   * When resizing the shell is postponed, remember the new size, and call
***************
*** 655,661 ****
  				/* 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);
  				/* TRUE when doing full-screen output
  				 * otherwise only writing some messages */
  
--- 655,661 ----
  				/* TRUE when in or after free_all_mem() */
  #endif
  /* volatile because it is used in signal handler deathtrap(). */
! EXTERN volatile sig_atomic_t full_screen INIT(= FALSE);
  				/* TRUE when doing full-screen output
  				 * otherwise only writing some messages */
  
***************
*** 800,810 ****
  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
  				   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. */
  #endif
  
  #if defined(FEAT_MBYTE) || defined(FEAT_POSTSCRIPT)
--- 800,810 ----
  EXTERN JMP_BUF lc_jump_env;	/* argument to SETJMP() */
  # ifdef SIGHASARG
  /* volatile because it is used in signal handlers. */
! 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 sig_atomic_t lc_active INIT(= FALSE); /* TRUE when lc_jump_env is valid. */
  #endif
  
  #if defined(FEAT_MBYTE) || defined(FEAT_POSTSCRIPT)
***************
*** 1037,1043 ****
  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
  						signal occurred */
  #ifdef USE_TERM_CONSOLE
  EXTERN int	term_console INIT(= FALSE); /* set to TRUE when console used */
--- 1037,1043 ----
  EXTERN int	read_cmd_fd INIT(= 0);	    /* fd to read commands from */
  
  /* volatile because it is used in signal handler catch_sigint(). */
! 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 */
*** ../vim-8.1.0311/src/os_unix.c	2018-08-21 13:09:06.250115910 +0200
--- src/os_unix.c	2018-08-21 19:32:32.570883895 +0200
***************
*** 161,167 ****
  static int get_x11_icon(int);
  
  static char_u	*oldtitle = NULL;
! static volatile int oldtitle_outdated = FALSE;
  static int	did_set_title = FALSE;
  static char_u	*oldicon = NULL;
  static int	did_set_icon = FALSE;
--- 161,167 ----
  static int get_x11_icon(int);
  
  static char_u	*oldtitle = NULL;
! static volatile sig_atomic_t oldtitle_outdated = FALSE;
  static int	did_set_title = FALSE;
  static char_u	*oldicon = NULL;
  static int	did_set_icon = FALSE;
***************
*** 205,211 ****
  # define SET_SIG_ALARM
  static RETSIGTYPE sig_alarm SIGPROTOARG;
  /* volatile because it is used in signal handler sig_alarm(). */
! static volatile int sig_alarm_called;
  #endif
  static RETSIGTYPE deathtrap SIGPROTOARG;
  
--- 205,211 ----
  # define SET_SIG_ALARM
  static RETSIGTYPE sig_alarm SIGPROTOARG;
  /* volatile because it is used in signal handler sig_alarm(). */
! static volatile sig_atomic_t sig_alarm_called;
  #endif
  static RETSIGTYPE deathtrap SIGPROTOARG;
  
***************
*** 231,243 ****
  #endif
  
  /* volatile because it is used in signal handler sig_winch(). */
! static volatile int do_resize = FALSE;
  static char_u	*extra_shell_arg = NULL;
  static int	show_shell_mess = TRUE;
  /* volatile because it is used in signal handler deathtrap(). */
! static volatile int deadly_signal = 0;	    /* The signal we caught */
  /* volatile because it is used in signal handler deathtrap(). */
! static volatile int in_mch_delay = FALSE;    /* sleeping in mch_delay() */
  
  #if defined(FEAT_JOB_CHANNEL) && !defined(USE_SYSTEM)
  static int dont_check_job_ended = 0;
--- 231,243 ----
  #endif
  
  /* volatile because it is used in signal handler sig_winch(). */
! static volatile sig_atomic_t do_resize = FALSE;
  static char_u	*extra_shell_arg = NULL;
  static int	show_shell_mess = TRUE;
  /* volatile because it is used in signal handler deathtrap(). */
! static volatile sig_atomic_t deadly_signal = 0;	   /* The signal we caught */
  /* volatile because it is used in signal handler deathtrap(). */
! static volatile sig_atomic_t in_mch_delay = FALSE; /* sleeping in mch_delay() */
  
  #if defined(FEAT_JOB_CHANNEL) && !defined(USE_SYSTEM)
  static int dont_check_job_ended = 0;
***************
*** 1247,1253 ****
  
  #if defined(SIGCONT)
  static RETSIGTYPE sigcont_handler SIGPROTOARG;
! static volatile int in_mch_suspend = FALSE;
  
  /*
   * With multi-threading, suspending might not work immediately.  Catch the
--- 1247,1253 ----
  
  #if defined(SIGCONT)
  static RETSIGTYPE sigcont_handler SIGPROTOARG;
! static volatile sig_atomic_t in_mch_suspend = FALSE;
  
  /*
   * With multi-threading, suspending might not work immediately.  Catch the
***************
*** 1260,1266 ****
   *
   * volatile because it is used in signal handler sigcont_handler().
   */
! static volatile int sigcont_received;
  static RETSIGTYPE sigcont_handler SIGPROTOARG;
  
  /*
--- 1260,1266 ----
   *
   * volatile because it is used in signal handler sigcont_handler().
   */
! static volatile sig_atomic_t sigcont_received;
  static RETSIGTYPE sigcont_handler SIGPROTOARG;
  
  /*
*** ../vim-8.1.0311/src/os_win32.h	2017-02-01 13:08:19.000000000 +0100
--- src/os_win32.h	2018-08-21 19:32:32.570883895 +0200
***************
*** 89,94 ****
--- 89,95 ----
  
  #define FNAME_ILLEGAL "\"*?><|" /* illegal characters in a file name */
  
+ #include <signal.h>
  #include <stdlib.h>
  #include <time.h>
  #include <sys/types.h>
*** ../vim-8.1.0311/src/version.c	2018-08-21 19:22:00.366591999 +0200
--- src/version.c	2018-08-21 19:33:01.798710954 +0200
***************
*** 796,797 ****
--- 796,799 ----
  {   /* Add new patch number below this line */
+ /**/
+     312,
  /**/

-- 
OLD WOMAN: Well, how did you become king, then?
ARTHUR: The Lady of the Lake, her arm clad in the purest shimmering samite,
        held Excalibur aloft from the bosom of the water to signify by Divine
        Providence ...  that I, Arthur, was to carry Excalibur ...  That is
        why I am your king!
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///