]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.2.0491: VMS: various build issues master v9.2.0491
authorZoltan Arpadffy <zoltan.arpadffy@gmail.com>
Sat, 16 May 2026 08:42:47 +0000 (08:42 +0000)
committerChristian Brabandt <cb@256bit.org>
Sat, 16 May 2026 08:42:47 +0000 (08:42 +0000)
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>
src/Make_vms.mms
src/clipboard.c
src/fuzzy.c
src/os_unix.c
src/os_vms.c
src/os_vms_conf.h
src/version.c

index a238a8ab9e884b7694d6b63823d532aee1fddf60..e019897fac817ff68ed3d06a655f5e595c562f02 100644 (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 \
index 745a8c47a23c51caa535f40336945485a5353245..902f9d6032c4b244eacabda9803de95252214fa8 100644 (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);
index 2847a2071cfdf5eb9b484c21df118cdc76462452..b6d595a7008253c33ac4a22c284229ec9de5c0b3 100644 (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)
index 12285b8e48c21c9ebf9721aef296d272ba0fb208..5cfc422b7a18c2a40934a00f04c667e9ed8b9fc8 100644 (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);
index bb93544f0947e982e7783a34fca300a5f41a377d..17fa067743e73a02f132b12dc12a62c43158f153 100644 (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
index 37be6ddfc6c3a177783500e7a0cb7a9158d93111..ddc83b3dc535b13c3db6aa68d8112ea087d3e0d1 100644 (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
 
 # 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
 #  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] */
 
 # define HAVE_LOCALE_H
 # define BROKEN_LOCALE
 # undef  DYNAMIC_ICONV
-# define       HAVE_STRFTIME
+# define HAVE_STRFTIME
 #endif
 
 #if defined(USE_ICONV)
 # 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
index 0a4a84e29fd13a39b6cd866e7846cf641ace5c61..7b05c7c4510511905ecc69afdfddc33914fde95d 100644 (file)
@@ -729,6 +729,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    491,
 /**/
     490,
 /**/