@@ -984,6 +984,7 @@ sig_alarm SIGDEFARG(sigarg)
984984 && ((defined(FEAT_X11 ) && defined(FEAT_XCLIPBOARD )) \
985985 || defined(FEAT_LIBCALL ))) \
986986 || defined(PROTO )
987+ # define USING_SETJMP 1
987988
988989// argument to SETJMP()
989990static JMP_BUF lc_jump_env ;
@@ -1023,9 +1024,9 @@ static volatile sig_atomic_t lc_active INIT(= FALSE);
10231024 static void
10241025mch_startjmp (void )
10251026{
1026- #ifdef SIGHASARG
1027+ # ifdef SIGHASARG
10271028 lc_signal = 0 ;
1028- #endif
1029+ # endif
10291030 lc_active = TRUE;
10301031}
10311032
@@ -1063,7 +1064,7 @@ deathtrap SIGDEFARG(sigarg)
10631064 int i ;
10641065#endif
10651066
1066- #if defined(HAVE_SETJMP_H )
1067+ #if defined(USING_SETJMP )
10671068 /*
10681069 * Catch a crash in protected code.
10691070 * Restores the environment saved in lc_jump_env, which looks like
@@ -1708,7 +1709,7 @@ x_connect_to_server(void)
17081709}
17091710
17101711#if defined(FEAT_X11 ) && defined(FEAT_XCLIPBOARD )
1711- # if defined(HAVE_SETJMP_H )
1712+ # if defined(USING_SETJMP )
17121713/*
17131714 * An X IO Error handler, used to catch error while opening the display.
17141715 */
@@ -2100,7 +2101,7 @@ get_x11_thing(
21002101 return retval ;
21012102}
21022103
2103- /* Xutf8 functions are not avaialble on older systems. Note that on some
2104+ /* Xutf8 functions are not available on older systems. Note that on some
21042105 * systems X_HAVE_UTF8_STRING may be defined in a header file but
21052106 * Xutf8SetWMProperties() is not in the X11 library. Configure checks for
21062107 * that and defines HAVE_XUTF8SETWMPROPERTIES. */
@@ -2953,7 +2954,7 @@ mch_copy_sec(char_u *from_file, char_u *to_file)
29532954 case ENOTSUP :
29542955 /* extended attributes aren't supported or enabled */
29552956 /* should a message be echoed? not sure... */
2956- return ; /* leave because it isn't usefull to continue */
2957+ return ; /* leave because it isn't useful to continue */
29572958
29582959 case ERANGE :
29592960 default :
@@ -7360,7 +7361,7 @@ mch_libcall(
73607361 /* If the handle is valid, try to get the function address. */
73617362 if (hinstLib != NULL )
73627363 {
7363- # ifdef HAVE_SETJMP_H
7364+ # ifdef USING_SETJMP
73647365 /*
73657366 * Catch a crash when calling the library function. For example when
73667367 * using a number where a string pointer is expected.
@@ -7435,7 +7436,7 @@ mch_libcall(
74357436 * string_result = vim_strsave (retval_str );
74367437 }
74377438
7438- # ifdef HAVE_SETJMP_H
7439+ # ifdef USING_SETJMP
74397440 mch_endjmp ();
74407441# ifdef SIGHASARG
74417442 if (lc_signal != 0 )
@@ -7494,7 +7495,7 @@ setup_term_clip(void)
74947495 if (app_context != NULL && xterm_Shell == (Widget )0 )
74957496 {
74967497 int (* oldhandler )();
7497- # if defined(HAVE_SETJMP_H )
7498+ # if defined(USING_SETJMP )
74987499 int (* oldIOhandler )();
74997500# endif
75007501# ifdef ELAPSED_FUNC
@@ -7507,7 +7508,7 @@ setup_term_clip(void)
75077508 /* Ignore X errors while opening the display */
75087509 oldhandler = XSetErrorHandler (x_error_check );
75097510
7510- # if defined(HAVE_SETJMP_H )
7511+ # if defined(USING_SETJMP )
75117512 /* Ignore X IO errors while opening the display */
75127513 oldIOhandler = XSetIOErrorHandler (x_IOerror_check );
75137514 mch_startjmp ();
@@ -7523,12 +7524,12 @@ setup_term_clip(void)
75237524 "vim_xterm" , "Vim_xterm" , NULL , 0 , & z , & strp );
75247525 if (xterm_dpy != NULL )
75257526 xterm_dpy_retry_count = 0 ;
7526- # if defined(HAVE_SETJMP_H )
7527+ # if defined(USING_SETJMP )
75277528 mch_endjmp ();
75287529# endif
75297530 }
75307531
7531- # if defined(HAVE_SETJMP_H )
7532+ # if defined(USING_SETJMP )
75327533 /* Now handle X IO errors normally. */
75337534 (void )XSetIOErrorHandler (oldIOhandler );
75347535# endif
0 commit comments