summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.0787
blob: ff0ec63ea7595fda83742703bf1f9572f5060e0d (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
To: vim_dev@googlegroups.com
Subject: Patch 8.1.0787
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.0787
Problem:    Compiler warning for unused function. (Tony Mechelynck)
Solution:   Tune #ifdef around setjmp functions.
Files:	    src/os_unix.c


*** ../vim-8.1.0786/src/os_unix.c	2019-01-20 15:30:36.893328693 +0100
--- src/os_unix.c	2019-01-20 18:36:56.137592218 +0100
***************
*** 980,986 ****
  }
  #endif
  
! #if defined(HAVE_SETJMP_H) || defined(PROTO)
  // argument to SETJMP()
  static JMP_BUF lc_jump_env;
  
--- 980,990 ----
  }
  #endif
  
! #if (defined(HAVE_SETJMP_H) \
! 	&& ((defined(FEAT_X11) && defined(FEAT_XCLIPBOARD)) \
! 	    || defined(FEAT_LIBCALL))) \
!     || defined(PROTO)
! 
  // argument to SETJMP()
  static JMP_BUF lc_jump_env;
  
***************
*** 7490,7498 ****
      if (app_context != NULL && xterm_Shell == (Widget)0)
      {
  	int (*oldhandler)();
! #if defined(HAVE_SETJMP_H)
  	int (*oldIOhandler)();
! #endif
  # ifdef ELAPSED_FUNC
  	elapsed_T start_tv;
  
--- 7494,7502 ----
      if (app_context != NULL && xterm_Shell == (Widget)0)
      {
  	int (*oldhandler)();
! # if defined(HAVE_SETJMP_H)
  	int (*oldIOhandler)();
! # endif
  # ifdef ELAPSED_FUNC
  	elapsed_T start_tv;
  
***************
*** 7503,7509 ****
  	/* Ignore X errors while opening the display */
  	oldhandler = XSetErrorHandler(x_error_check);
  
! #if defined(HAVE_SETJMP_H)
  	/* Ignore X IO errors while opening the display */
  	oldIOhandler = XSetIOErrorHandler(x_IOerror_check);
  	mch_startjmp();
--- 7507,7513 ----
  	/* Ignore X errors while opening the display */
  	oldhandler = XSetErrorHandler(x_error_check);
  
! # if defined(HAVE_SETJMP_H)
  	/* Ignore X IO errors while opening the display */
  	oldIOhandler = XSetIOErrorHandler(x_IOerror_check);
  	mch_startjmp();
***************
*** 7513,7533 ****
  	    xterm_dpy = NULL;
  	}
  	else
! #endif
  	{
  	    xterm_dpy = XtOpenDisplay(app_context, xterm_display,
  		    "vim_xterm", "Vim_xterm", NULL, 0, &z, &strp);
  	    if (xterm_dpy != NULL)
  		xterm_dpy_retry_count = 0;
! #if defined(HAVE_SETJMP_H)
  	    mch_endjmp();
! #endif
  	}
  
! #if defined(HAVE_SETJMP_H)
  	/* Now handle X IO errors normally. */
  	(void)XSetIOErrorHandler(oldIOhandler);
! #endif
  	/* Now handle X errors normally. */
  	(void)XSetErrorHandler(oldhandler);
  
--- 7517,7537 ----
  	    xterm_dpy = NULL;
  	}
  	else
! # endif
  	{
  	    xterm_dpy = XtOpenDisplay(app_context, xterm_display,
  		    "vim_xterm", "Vim_xterm", NULL, 0, &z, &strp);
  	    if (xterm_dpy != NULL)
  		xterm_dpy_retry_count = 0;
! # if defined(HAVE_SETJMP_H)
  	    mch_endjmp();
! # endif
  	}
  
! # if defined(HAVE_SETJMP_H)
  	/* Now handle X IO errors normally. */
  	(void)XSetIOErrorHandler(oldIOhandler);
! # endif
  	/* Now handle X errors normally. */
  	(void)XSetErrorHandler(oldhandler);
  
*** ../vim-8.1.0786/src/version.c	2019-01-20 18:25:50.313911236 +0100
--- src/version.c	2019-01-20 18:37:56.629192312 +0100
***************
*** 793,794 ****
--- 793,796 ----
  {   /* Add new patch number below this line */
+ /**/
+     787,
  /**/

-- 
ARTHUR: This new learning amazes me, Sir Bedevere.  Explain again how sheep's
        bladders may be employed to prevent earthquakes.
                 "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    ///