summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.0649
blob: 68c4479051dcd44381830fa96abb47c8d06250cc (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
To: vim_dev@googlegroups.com
Subject: Patch 8.1.0649
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.0649
Problem:    setjmp() variables defined globally are used in one file.
Solution:   Move the declarations to that file.
Files:	    src/globals.h, src/os_unix.c


*** ../vim-8.1.0648/src/globals.h	2018-12-27 23:44:34.797953474 +0100
--- src/globals.h	2018-12-28 16:54:10.327379790 +0100
***************
*** 798,818 ****
  EXTERN JMP_BUF x_jump_env;
  #endif
  
- #if defined(HAVE_SETJMP_H)
- /*
-  * Stuff for setjmp() and longjmp().
-  * Used to protect areas where we could crash.
-  */
- 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)
  /*
   * These flags are set based upon 'fileencoding'.
--- 798,803 ----
*** ../vim-8.1.0648/src/os_unix.c	2018-12-21 16:04:16.320437461 +0100
--- src/os_unix.c	2018-12-28 17:00:11.740193430 +0100
***************
*** 980,992 ****
  }
  #endif
  
! #if (defined(HAVE_SETJMP_H) \
! 	&& ((defined(FEAT_X11) && defined(FEAT_XCLIPBOARD)) \
! 	    || defined(FEAT_LIBCALL))) \
!     || defined(PROTO)
  /*
   * A simplistic version of setjmp() that only allows one level of using.
   * Don't call twice before calling mch_endjmp()!.
   * Usage:
   *	mch_startjmp();
   *	if (SETJMP(lc_jump_env) != 0)
--- 980,1004 ----
  }
  #endif
  
! #if defined(HAVE_SETJMP_H) || defined(PROTO)
! // argument to SETJMP()
! static JMP_BUF lc_jump_env;
! 
! # ifdef SIGHASARG
! // Caught signal number, 0 when no was signal caught; used for mch_libcall().
! // Volatile because it is used in signal handlers.
! static volatile sig_atomic_t lc_signal;
! # endif
! 
! // TRUE when lc_jump_env is valid.
! // Volatile because it is used in signal handler deathtrap().
! static volatile sig_atomic_t lc_active INIT(= FALSE);
! 
  /*
   * A simplistic version of setjmp() that only allows one level of using.
+  * Used to protect areas where we could crash.
   * Don't call twice before calling mch_endjmp()!.
+  *
   * Usage:
   *	mch_startjmp();
   *	if (SETJMP(lc_jump_env) != 0)
***************
*** 1023,1030 ****
  mch_didjmp(void)
  {
  # if defined(HAVE_SIGALTSTACK) || defined(HAVE_SIGSTACK)
!     /* On FreeBSD the signal stack has to be reset after using siglongjmp(),
!      * otherwise catching the signal only works once. */
      init_signal_stack();
  # endif
  }
--- 1035,1042 ----
  mch_didjmp(void)
  {
  # if defined(HAVE_SIGALTSTACK) || defined(HAVE_SIGSTACK)
!     // On FreeBSD the signal stack has to be reset after using siglongjmp(),
!     // otherwise catching the signal only works once.
      init_signal_stack();
  # endif
  }
*** ../vim-8.1.0648/src/version.c	2018-12-27 23:44:34.797953474 +0100
--- src/version.c	2018-12-28 16:53:54.427521974 +0100
***************
*** 801,802 ****
--- 801,804 ----
  {   /* Add new patch number below this line */
+ /**/
+     649,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
64. The remote to the T.V. is missing...and you don't even care.

 /// 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    ///