mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 8.1.0649: setjmp() variables defined globally are used in one file
Problem: setjmp() variables defined globally are used in one file. Solution: Move the declarations to that file.
This commit is contained in:
parent
c8c8849267
commit
b7a7e039b4
@ -798,21 +798,6 @@ EXTERN int vr_lines_changed INIT(= 0); /* #Lines changed by "gR" so far */
|
|||||||
EXTERN JMP_BUF x_jump_env;
|
EXTERN JMP_BUF x_jump_env;
|
||||||
#endif
|
#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)
|
#if defined(FEAT_MBYTE) || defined(FEAT_POSTSCRIPT)
|
||||||
/*
|
/*
|
||||||
* These flags are set based upon 'fileencoding'.
|
* These flags are set based upon 'fileencoding'.
|
||||||
|
@ -980,13 +980,25 @@ sig_alarm SIGDEFARG(sigarg)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (defined(HAVE_SETJMP_H) \
|
#if defined(HAVE_SETJMP_H) || defined(PROTO)
|
||||||
&& ((defined(FEAT_X11) && defined(FEAT_XCLIPBOARD)) \
|
// argument to SETJMP()
|
||||||
|| defined(FEAT_LIBCALL))) \
|
static JMP_BUF lc_jump_env;
|
||||||
|| defined(PROTO)
|
|
||||||
|
# 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.
|
* 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()!.
|
* Don't call twice before calling mch_endjmp()!.
|
||||||
|
*
|
||||||
* Usage:
|
* Usage:
|
||||||
* mch_startjmp();
|
* mch_startjmp();
|
||||||
* if (SETJMP(lc_jump_env) != 0)
|
* if (SETJMP(lc_jump_env) != 0)
|
||||||
@ -1023,8 +1035,8 @@ mch_endjmp(void)
|
|||||||
mch_didjmp(void)
|
mch_didjmp(void)
|
||||||
{
|
{
|
||||||
# if defined(HAVE_SIGALTSTACK) || defined(HAVE_SIGSTACK)
|
# if defined(HAVE_SIGALTSTACK) || defined(HAVE_SIGSTACK)
|
||||||
/* On FreeBSD the signal stack has to be reset after using siglongjmp(),
|
// On FreeBSD the signal stack has to be reset after using siglongjmp(),
|
||||||
* otherwise catching the signal only works once. */
|
// otherwise catching the signal only works once.
|
||||||
init_signal_stack();
|
init_signal_stack();
|
||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
|
@ -799,6 +799,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
649,
|
||||||
/**/
|
/**/
|
||||||
648,
|
648,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user