From: Zoltan Arpadffy Date: Sat, 16 May 2026 08:42:47 +0000 (+0000) Subject: patch 9.2.0491: VMS: various build issues X-Git-Tag: v9.2.0491^0 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d8c4774273eff95eb07a6723f92f388108efb487;p=thirdparty%2Fvim.git patch 9.2.0491: VMS: various build issues Problem: VMS: various build issues Solution: Fix issues for VMS (Zoltan Arpadffy) closes: #20131 Signed-off-by: Zoltan Arpadffy Signed-off-by: Christian Brabandt --- diff --git a/src/Make_vms.mms b/src/Make_vms.mms index a238a8ab9e..e019897fac 100644 --- a/src/Make_vms.mms +++ b/src/Make_vms.mms @@ -2,7 +2,7 @@ # Makefile for Vim on OpenVMS # # Maintainer: Zoltan Arpadffy -# Last change: 2025-07-04 Steven M. Schweda +# Last change: 2026-05-04 # # This script has been tested on VMS 6.2 to 9.2 on VAX, ALPHA, IA64 and X86_64 # with MMS and MMK @@ -49,6 +49,10 @@ MODEL = HUGE # If you have XPM installed you might want to build Motif version with toolbar # XPM = YES +# Large-file support. Unavailable on VAX and very old Alpha. +# To disable, define NOLARGE. +# NOLARGE = YES + # Comment out if you want the compiler version with :ver command. # NOTE: This part can make some complications if you're using some # predefined symbols/flags for your compiler. If does, just leave behind @@ -108,23 +112,23 @@ ALPHA_X_ALPHA = 1 IA64_X_IA64 = 1 VAX_X_VAX = 1 X86_64_X_X86_64 = 1 -.IFDEF ARCH # ARCH +.IFDEF ARCH # ARCH ARCH_NAME = $(ARCH) -.ELSE # ARCH +.ELSE # ARCH ARCH_NAME = $(MMS$ARCH_NAME) -.ENDIF # ARCH -.IFDEF $(ARCH_NAME)_X_ALPHA # $(ARCH_NAME)_X_ALPHA +.ENDIF # ARCH +.IFDEF $(ARCH_NAME)_X_ALPHA # $(ARCH_NAME)_X_ALPHA __ALPHA__ = 1 -.ENDIF # $(ARCH_NAME)_X_ALPHA -.IFDEF $(ARCH_NAME)_X_IA64 # $(ARCH_NAME)_X_IA64 +.ENDIF # $(ARCH_NAME)_X_ALPHA +.IFDEF $(ARCH_NAME)_X_IA64 # $(ARCH_NAME)_X_IA64 __IA64__ = 1 -.ENDIF # $(ARCH_NAME)_X_IA64 -.IFDEF $(ARCH_NAME)_X_VAX # $(ARCH_NAME)_X_VAX +.ENDIF # $(ARCH_NAME)_X_IA64 +.IFDEF $(ARCH_NAME)_X_VAX # $(ARCH_NAME)_X_VAX __VAX__ = 1 -.ENDIF # $(ARCH_NAME)_X_VAX -.IFDEF $(ARCH_NAME)_X_X86_64 # $(ARCH_NAME)_X_X86_64 +.ENDIF # $(ARCH_NAME)_X_VAX +.IFDEF $(ARCH_NAME)_X_X86_64 # $(ARCH_NAME)_X_X86_64 __X86_64__ = 1 -.ENDIF # $(ARCH_NAME)_X_X86_64 +.ENDIF # $(ARCH_NAME)_X_X86_64 .ELSE # MMS$ARCH_NAME .IFDEF __MMK__ # __MMK__ .IFDEF ARCH # ARCH @@ -234,8 +238,7 @@ PREFIX = /prefix=all/name=(upper,short) /repository=[.$(DEST)] # This makes Alpha consistent. FLOAT = /float = ieee_float /ieee_mode = denorm_results -# Large-file support. Unavailable on VAX and very old Alpha. To -# disable, define NOLARGE. +# Large-file support. Unavailable on VAX and very old Alpha. .IFDEF NOLARGE .ELSE LARGE_DEF = , "_LARGEFILE" @@ -811,15 +814,14 @@ $(TARGET) : $(OBJ) .c.obj : # Override /optimize for selected modules on VAX. .IFDEF __VAX__ # __VAX__ - @ mod = f$parse( "$@", , , "NAME", "SYNTAX_ONLY") - @ mod = "+"+ f$edit( mod, "LOWERCASE")+ "+" - @ optim_qual = "" - @ if (f$locate( mod, "+$(VAX_NOOPTIM_LIST)+") .lt. - + -@ mod = f$parse( "$@", , , "NAME", "SYNTAX_ONLY") + -@ mod = "+"+ f$edit( mod, "LOWERCASE")+ "+" + -@ optim_qual = "" + -@ if (f$locate( mod, "+$(VAX_NOOPTIM_LIST)+") .lt. - f$length( "+$(VAX_NOOPTIM_LIST)+")) then optim_qual = "/nooptim" - @ if (f$locate( mod, "+$(VAX_NOOPTIM_LIST)+") .lt. - + -@ if (f$locate( mod, "+$(VAX_NOOPTIM_LIST)+") .lt. - f$length( "+$(VAX_NOOPTIM_LIST)+")) then - - @ write sys$output - - " *** NOTE: USING SPECIAL /NOOPTIMIZE RULE. ***" + write sys$output "*** NOTE: USING SPECIAL /NOOPTIMIZE RULE. ***" $(CC_DEF) $(ALL_CFLAGS) 'optim_qual' $< /object = $@ .ELSE # __VAX__ $(CC_DEF) $(ALL_CFLAGS) $< /object = $@ @@ -1468,8 +1470,8 @@ lua_env : [.$(DEST)]gui_gtk_x11.obj : gui_gtk_x11.c vim.h [.$(DEST)]config.h feature.h os_unix.h \ ascii.h keymap.h termdefs.h macros.h structs.h regexp.h \ gui.h beval.h option.h ex_cmds.h proto.h \ - errors.h globals.h gui_gtk_f.h [-.runtime]vim32x32_png.h \ - [-.runtime]vim16x16_png.h [-.runtime]vim48x48_png.h version.h + errors.h globals.h gui_gtk_f.h [-.runtime]vim32x32.xpm \ + [-.runtime]vim16x16.xpm [-.runtime]vim48x48.xpm version.h [.$(DEST)]gui_x11.obj : gui_x11.c vim.h [.$(DEST)]config.h feature.h os_unix.h \ ascii.h keymap.h termdefs.h macros.h structs.h regexp.h \ gui.h beval.h option.h ex_cmds.h proto.h \ diff --git a/src/clipboard.c b/src/clipboard.c index 745a8c47a2..902f9d6032 100644 --- a/src/clipboard.c +++ b/src/clipboard.c @@ -3611,7 +3611,7 @@ clip_provider_paste(char_u *reg, char_u *provider) } *curval++ = NULL; - if (*reg_type != NUL && (STRLEN(reg_type) <= 0 + if (*reg_type != NUL && (STRLEN(reg_type) == 0 || get_yank_type(®_type, &yank_type, &block_len) == FAIL)) { emsg(e_invalid_argument); diff --git a/src/fuzzy.c b/src/fuzzy.c index 2847a2071c..b6d595a700 100644 --- a/src/fuzzy.c +++ b/src/fuzzy.c @@ -31,7 +31,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ - +#define USING_FLOAT_STUFF #include "vim.h" #if defined(FEAT_EVAL) || defined(FEAT_PROTO) diff --git a/src/os_unix.c b/src/os_unix.c index 12285b8e48..5cfc422b7a 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -5950,7 +5950,11 @@ mch_get_cmd_output_direct( } BLOCK_SIGNALS(&curset); +# ifdef VMS + pid = 0; // VMS does not have fork +# else pid = fork(); +# endif if (pid == -1) { UNBLOCK_SIGNALS(&curset); diff --git a/src/os_vms.c b/src/os_vms.c index bb93544f09..17fa067743 100644 --- a/src/os_vms.c +++ b/src/os_vms.c @@ -858,7 +858,12 @@ RealWaitForChar( * appropriate time conversion function accordingly. */ #if __IEEE_FLOAT -# define LIB_CVTX_TO_INTERNAL_TIME lib$cvts_to_internal_time // IEEE +// allow fallback for older Alphas +# ifdef lib$cvts_to_internal_time +# define LIB_CVTX_TO_INTERNAL_TIME lib$cvts_to_internal_time // IEEE +# else +# define LIB_CVTX_TO_INTERNAL_TIME lib$cvtf_to_internal_time +# endif #else # define LIB_CVTX_TO_INTERNAL_TIME lib$cvtf_to_internal_time // VAX #endif // __IEEE_FLOAT CVTS diff --git a/src/os_vms_conf.h b/src/os_vms_conf.h index 37be6ddfc6..ddc83b3dc5 100644 --- a/src/os_vms_conf.h +++ b/src/os_vms_conf.h @@ -58,9 +58,6 @@ // Define to `int' if doesn't define. // #undef uid_t -// Define to `unsigned int' or other type that is 32 bit. -#define UINT32_T unsigned int - // Define to `int' if doesn't define. // #undef gid_t @@ -169,7 +166,6 @@ # define ULONG_LONG_MAX (4294967295U) #else // ALPHA, IA64, X86_64 -# define HAVE_FSEEKO /* Use off_t. */ # define HAVE_GETTIMEOFDAY # define HAVE_USLEEP # define HAVE_STRCASECMP @@ -186,7 +182,11 @@ # define HAVE_ISNAN # endif -# define HAVE_XOS_R_H +# if defined(X86_64) +# define HAVE_FSEEKO +# define HAVE_STDINT_H +# define HAVE_XOS_R_H +# endif #endif /* VAX [else] */ @@ -208,7 +208,7 @@ # define HAVE_LOCALE_H # define BROKEN_LOCALE # undef DYNAMIC_ICONV -# define HAVE_STRFTIME +# define HAVE_STRFTIME #endif #if defined(USE_ICONV) @@ -231,3 +231,10 @@ # define USE_FONTSET # undef X_LOCALE #endif + +// Define needed types from stdint - older VMS do not have stdint.h +#ifndef HAVE_STDINT_H + typedef unsigned char uint8_t; + typedef unsigned short uint16_t; + typedef unsigned int uint32_t; +#endif diff --git a/src/version.c b/src/version.c index 0a4a84e29f..7b05c7c451 100644 --- a/src/version.c +++ b/src/version.c @@ -729,6 +729,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 491, /**/ 490, /**/