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 <zoltan.arpadffy@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Zoltan Arpadffy
2026-05-16 08:42:47 +00:00
committed by Christian Brabandt
parent 88b00d1c57
commit d8c4774273
7 changed files with 52 additions and 32 deletions
+25 -23
View File
@@ -2,7 +2,7 @@
# Makefile for Vim on OpenVMS
#
# Maintainer: Zoltan Arpadffy <zoltan.arpadffy@gmail.com>
# Last change: 2025-07-04 Steven M. Schweda <sms@antinode.info>
# 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 \
+1 -1
View File
@@ -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(&reg_type, &yank_type, &block_len) == FAIL))
{
emsg(e_invalid_argument);
+1 -1
View File
@@ -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)
+4
View File
@@ -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);
+6 -1
View File
@@ -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
+13 -6
View File
@@ -58,9 +58,6 @@
// Define to `int' if <sys/types.h> 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 <sys/types.h> 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
+2
View File
@@ -729,6 +729,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
491,
/**/
490,
/**/