mirror of
https://github.com/neovim/neovim.git
synced 2025-09-13 06:48:17 +00:00
remove HAVE_SETJMP_H
This commit is contained in:

committed by
Thiago de Arruda

parent
f9b5ca8b85
commit
60a7ad8a47
@@ -62,7 +62,6 @@
|
|||||||
// TODO: add proper cmake check
|
// TODO: add proper cmake check
|
||||||
// #define HAVE_SELINUX 1
|
// #define HAVE_SELINUX 1
|
||||||
#define HAVE_SETENV 1
|
#define HAVE_SETENV 1
|
||||||
#define HAVE_SETJMP_H 1
|
|
||||||
#define HAVE_SETPGID 1
|
#define HAVE_SETPGID 1
|
||||||
#define HAVE_SETSID 1
|
#define HAVE_SETSID 1
|
||||||
#define HAVE_SGTTY_H 1
|
#define HAVE_SGTTY_H 1
|
||||||
|
@@ -592,7 +592,6 @@ EXTERN int orig_line_count INIT(= 0); /* Line count when "gR" started */
|
|||||||
EXTERN int vr_lines_changed INIT(= 0); /* #Lines changed by "gR" so far */
|
EXTERN int vr_lines_changed INIT(= 0); /* #Lines changed by "gR" so far */
|
||||||
|
|
||||||
|
|
||||||
#if defined(HAVE_SETJMP_H)
|
|
||||||
/*
|
/*
|
||||||
* Stuff for setjmp() and longjmp().
|
* Stuff for setjmp() and longjmp().
|
||||||
* Used to protect areas where we could crash.
|
* Used to protect areas where we could crash.
|
||||||
@@ -605,7 +604,6 @@ EXTERN volatile int lc_signal; /* caught signal number, 0 when no was signal
|
|||||||
# endif
|
# endif
|
||||||
/* volatile because it is used in signal handler deathtrap(). */
|
/* 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 int lc_active INIT(= FALSE); /* TRUE when lc_jump_env is valid. */
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* These flags are set based upon 'fileencoding'.
|
* These flags are set based upon 'fileencoding'.
|
||||||
|
@@ -340,7 +340,7 @@ catch_sigpwr SIGDEFARG(sigarg) {
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (defined(HAVE_SETJMP_H) && defined(FEAT_LIBCALL)) || defined(PROTO)
|
#if defined(FEAT_LIBCALL) || defined(PROTO)
|
||||||
/*
|
/*
|
||||||
* A simplistic version of setjmp() that only allows one level of using.
|
* A simplistic version of setjmp() that only allows one level of using.
|
||||||
* Don't call twice before calling mch_endjmp()!.
|
* Don't call twice before calling mch_endjmp()!.
|
||||||
@@ -401,21 +401,19 @@ deathtrap SIGDEFARG(sigarg) {
|
|||||||
int i;
|
int i;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(HAVE_SETJMP_H)
|
|
||||||
/*
|
/*
|
||||||
* Catch a crash in protected code.
|
* Catch a crash in protected code.
|
||||||
* Restores the environment saved in lc_jump_env, which looks like
|
* Restores the environment saved in lc_jump_env, which looks like
|
||||||
* SETJMP() returns 1.
|
* SETJMP() returns 1.
|
||||||
*/
|
*/
|
||||||
if (lc_active) {
|
if (lc_active) {
|
||||||
# if defined(SIGHASARG)
|
#if defined(SIGHASARG)
|
||||||
lc_signal = sigarg;
|
lc_signal = sigarg;
|
||||||
# endif
|
#endif
|
||||||
lc_active = FALSE; /* don't jump again */
|
lc_active = FALSE; /* don't jump again */
|
||||||
LONGJMP(lc_jump_env, 1);
|
LONGJMP(lc_jump_env, 1);
|
||||||
/* NOTREACHED */
|
/* NOTREACHED */
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef SIGHASARG
|
#ifdef SIGHASARG
|
||||||
# ifdef SIGQUIT
|
# ifdef SIGQUIT
|
||||||
@@ -3043,7 +3041,6 @@ int *number_result;
|
|||||||
|
|
||||||
/* If the handle is valid, try to get the function address. */
|
/* If the handle is valid, try to get the function address. */
|
||||||
if (hinstLib != NULL) {
|
if (hinstLib != NULL) {
|
||||||
# ifdef HAVE_SETJMP_H
|
|
||||||
/*
|
/*
|
||||||
* Catch a crash when calling the library function. For example when
|
* Catch a crash when calling the library function. For example when
|
||||||
* using a number where a string pointer is expected.
|
* using a number where a string pointer is expected.
|
||||||
@@ -3056,7 +3053,6 @@ int *number_result;
|
|||||||
# endif
|
# endif
|
||||||
mch_didjmp();
|
mch_didjmp();
|
||||||
} else
|
} else
|
||||||
# endif
|
|
||||||
{
|
{
|
||||||
retval_str = NULL;
|
retval_str = NULL;
|
||||||
retval_int = 0;
|
retval_int = 0;
|
||||||
@@ -3111,7 +3107,6 @@ int *number_result;
|
|||||||
*string_result = vim_strsave(retval_str);
|
*string_result = vim_strsave(retval_str);
|
||||||
}
|
}
|
||||||
|
|
||||||
# ifdef HAVE_SETJMP_H
|
|
||||||
mch_endjmp();
|
mch_endjmp();
|
||||||
# ifdef SIGHASARG
|
# ifdef SIGHASARG
|
||||||
if (lc_signal != 0) {
|
if (lc_signal != 0) {
|
||||||
@@ -3124,7 +3119,6 @@ int *number_result;
|
|||||||
EMSG2("E368: got SIG%s in libcall()", signal_info[i].name);
|
EMSG2("E368: got SIG%s in libcall()", signal_info[i].name);
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
# endif
|
|
||||||
|
|
||||||
# if defined(USE_DLOPEN)
|
# if defined(USE_DLOPEN)
|
||||||
/* "dlerr" must be used before dlclose() */
|
/* "dlerr" must be used before dlclose() */
|
||||||
|
@@ -287,17 +287,15 @@ int mch_rename(const char *src, const char *dest);
|
|||||||
# include <strings.h>
|
# include <strings.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(HAVE_SETJMP_H)
|
#include <setjmp.h>
|
||||||
# include <setjmp.h>
|
#ifdef HAVE_SIGSETJMP
|
||||||
# ifdef HAVE_SIGSETJMP
|
|
||||||
# define JMP_BUF sigjmp_buf
|
# define JMP_BUF sigjmp_buf
|
||||||
# define SETJMP(x) sigsetjmp((x), 1)
|
# define SETJMP(x) sigsetjmp((x), 1)
|
||||||
# define LONGJMP siglongjmp
|
# define LONGJMP siglongjmp
|
||||||
# else
|
#else
|
||||||
# define JMP_BUF jmp_buf
|
# define JMP_BUF jmp_buf
|
||||||
# define SETJMP(x) setjmp(x)
|
# define SETJMP(x) setjmp(x)
|
||||||
# define LONGJMP longjmp
|
# define LONGJMP longjmp
|
||||||
# endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define HAVE_DUP /* have dup() */
|
#define HAVE_DUP /* have dup() */
|
||||||
|
Reference in New Issue
Block a user