diff options
author | Zoltan Arpadffy <zoltan.arpadffy@gmail.com> | 2023-12-05 16:04:23 +0100 |
---|---|---|
committer | Christian Brabandt <cb@256bit.org> | 2023-12-05 16:04:23 +0100 |
commit | 1c8e233cb8357b4f218bfa777f6d81456d0b43a2 (patch) | |
tree | ef890f7e574316dae810da55080bb58b4fbe328f /src | |
parent | 668971958c126d5e105fd44b60a4efcaf2c4b55c (diff) |
patch 9.0.2153: no support to build on OpenVMSv9.0.2153
Problem: no support to build on OpenVMS
Solution: Add OpenVMS X86_64 platform port
closes: #13623
Co-authored-by: errael <errael@raelity.com>
Co-authored-by: K.Takata <kentkt@csc.jp>
Signed-off-by: Zoltan Arpadffy <zoltan.arpadffy@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/INSTALLvms.txt | 46 | ||||
-rw-r--r-- | src/Make_vms.mms | 60 | ||||
-rw-r--r-- | src/crypt.c | 2 | ||||
-rw-r--r-- | src/gui.h | 10 | ||||
-rw-r--r-- | src/macros.h | 4 | ||||
-rw-r--r-- | src/map.c | 2 | ||||
-rw-r--r-- | src/optionstr.c | 6 | ||||
-rw-r--r-- | src/os_vms_conf.h | 37 | ||||
-rw-r--r-- | src/proto/crypt.pro | 2 | ||||
-rw-r--r-- | src/term.c | 2 | ||||
-rw-r--r-- | src/version.c | 2 | ||||
-rw-r--r-- | src/vim.h | 9 | ||||
-rw-r--r-- | src/xdiff/xmacros.h | 2 |
13 files changed, 141 insertions, 43 deletions
diff --git a/src/INSTALLvms.txt b/src/INSTALLvms.txt index c235151165..97406ab535 100644 --- a/src/INSTALLvms.txt +++ b/src/INSTALLvms.txt @@ -1,7 +1,7 @@ INSTALLvms.txt - Installation of Vim on OpenVMS -Maintainer: Zoltan Arpadffy <arpadffy@polarhome.com> -Last change: 2008 Jan 06 +Maintainer: Zoltan Arpadffy <zoltan.arpadffy@gmail.com> +Last change: 2023 Nov 29 This file contains instructions for compiling Vim on Openvms. If you already have an executable version of Vim, you don't need this. @@ -40,6 +40,9 @@ Contents: where X.X is the version number. +You may want to clone the latest source code from https://github/vim/vim +Or the last tested on OpenVMS from http://polarhome.com/vim/files/source/vms/ + 1.2. Expand the three archives. 1.3. Apply patches if they exist. (Patch files are found in the ftp @@ -81,7 +84,7 @@ from CVS mirror ftp://ftp.polarhome.com/pub/cvs/SOURCE/ NORMAL - A default selection of features enabled (OpenVMS default) HUGE - All possible features enabled. - Uncommented - will default to NORMAL + Uncommented - will default to HUGE Default : MODEL = NORMAL Parameter name : GUI @@ -117,7 +120,7 @@ from CVS mirror ftp://ftp.polarhome.com/pub/cvs/SOURCE/ Default : CCVER = YES Parameter name : DEBUG - Description : Building a debug version + Description : Building a debug version (DVIM.EXE) Options: : YES - debug version will be built Uncommented - building normal executable Default : Uncommented @@ -163,6 +166,36 @@ from CVS mirror ftp://ftp.polarhome.com/pub/cvs/SOURCE/ Uncommented - build without support. Default : Uncommented + Parameter name : VIM_RUBY + Description : Add Ruby support + Options: : YES - Build with support + Uncommented - build without support. + Default : Uncommented + + Parameter name : VIM_LUA + Description : Add Lua support + Options: : YES - Build with support + Uncommented - build without support. + Default : Uncommented + + Parameter name : VIM_MZSCHEME + Description : Add support for FEATURE_MZSCHEM + Options: : YES - Build with support + Uncommented - build without FEATURE_MZSCHEM. + Default : Uncommented + + Parameter name : VIM_ICONV + Description : Build with using the ICONV library + Options: : YES - Build with support + Uncommented - build without support. + Default : Uncommented + + Parameter name : MODIFIED_BY + Description : Add note if you modified the code + Options: : YES - Build with adding the MODIFIED_BY define + Uncommented - build without the define + Default : Uncommented + You can edit the *_INC and *_LIB qualifiers, but it is really not recommended for beginners. @@ -184,6 +217,11 @@ from CVS mirror ftp://ftp.polarhome.com/pub/cvs/SOURCE/ mms /descrip=Make_vms.mms clean + The build will stop if any error or warning is encontered. In some cases + the warnings can be ignored. Use: + + mms /descrip=Make_vms.mms /ignore=warning + 4. Compilation VAXC 4.1. VAXC compiler is not fully ANSI C compatible in pre-processor directives diff --git a/src/Make_vms.mms b/src/Make_vms.mms index 8dd5454e15..4c206018fc 100644 --- a/src/Make_vms.mms +++ b/src/Make_vms.mms @@ -2,9 +2,9 @@ # Makefile for Vim on OpenVMS # # Maintainer: Zoltan Arpadffy <arpadffy@polarhome.com> -# Last change: 2021 Dec 20 +# Last change: 2023 Nov 27 # -# This script has been tested on VMS 6.2 to 8.4 on DEC Alpha, VAX and IA64 +# This script has been tested on VMS 6.2 to 9.2 on VAX, ALPHA, IA64 and X86_64 # with MMS and MMK # # The following could be built: @@ -81,7 +81,11 @@ CCVER = YES # VIM_MZSCHEME = YES # Use ICONV -# VIM_ICONV = YES +# VIM_ICONV = YES + +# If you modified the source code and plan to distribute the build +# please, let the users know that. +# MODIFIED_BY = "name surname <your@email.com>" ###################################################################### # Directory, library and include files configuration section. @@ -104,12 +108,14 @@ PREFIX = OPTIMIZE= /noopt CCVER = .ENDIF -.ELSE # AXP and IA64 with DECC +.ELSE # AXP, IA64, X86 with DECC CC_DEF = cc PREFIX = /prefix=all/name=(upper,short) OPTIMIZE= /opt +.IFDEF MMSX86_64 # This is needed because of getline function name used in stucts like ex_cmds.h +ARCH_DEF= ,__CRTL_VER_OVERRIDE=80400000 +.ENDIF .ENDIF - LD_DEF = link C_INC = [.proto] @@ -162,9 +168,9 @@ GTK = "" # please note: directory should end with . in order to /trans=conc work # This value for GTK_DIR is an example. GTK_DIR = DKA0:[WORK.GTK1210.] -DEFS = "HAVE_CONFIG_H","FEAT_GUI_GTK" +DEFS = ,"HAVE_CONFIG_H","FEAT_GUI_GTK" LIBS = ,OS_VMS_GTK.OPT/OPT -GUI_FLAG = /float=ieee/ieee=denorm +GUI_FLAG = /float=ieee/ieee=denorm/WARNINGS=(DISABLE=MACROREDEF) GUI_SRC = gui.c gui_gtk.c gui_gtk_f.c gui_gtk_x11.c gui_beval.c pty.c GUI_OBJ = gui.obj gui_gtk.obj gui_gtk_f.obj gui_gtk_x11.obj gui_beval.obj pty.obj GUI_INC = ,"/gtk_root/gtk","/gtk_root/glib" @@ -174,15 +180,15 @@ GUI_INC_VER= ,\""/gtk_root/gtk\"",\""/gtk_root/glib\"" .ELSE MOTIF = YES .IFDEF XPM -DEFS = "HAVE_CONFIG_H","FEAT_GUI_MOTIF","HAVE_XPM" +DEFS = ,"HAVE_CONFIG_H","FEAT_GUI_MOTIF","HAVE_XPM" XPM_INC = ,[.xpm.include] XPM_LIB = ,OS_VMS_XPM.OPT/OPT .ELSE -DEFS = "HAVE_CONFIG_H","FEAT_GUI_MOTIF" +DEFS = ,"HAVE_CONFIG_H","FEAT_GUI_MOTIF" XPM_INC = .ENDIF LIBS = ,OS_VMS_MOTIF.OPT/OPT -GUI_FLAG = +GUI_FLAG = /WARNINGS=(DISABLE=MACROREDEF) GUI_SRC = gui.c gui_motif.c gui_x11.c gui_beval.c gui_xmdlg.c gui_xmebw.c GUI_OBJ = gui.obj gui_motif.obj gui_x11.obj gui_beval.obj gui_xmdlg.obj gui_xmebw.obj GUI_INC = @@ -195,7 +201,7 @@ GUI_INC_DIR = ,decw$include: .ELSE # Character terminal only executable -DEFS = "HAVE_CONFIG_H" +DEFS = ,"HAVE_CONFIG_H" LIBS = .ENDIF @@ -269,12 +275,18 @@ XDIFF_SRC = xdiffi.c,xemit.c,xprepare.c,xutils.c,xhistogram.c,xpatience.c XDIFF_OBJ = xdiffi.obj,xemit.obj,xprepare.obj,xutils.obj,xhistogram.obj,xpatience.obj XDIFF_INC = ,[.xdiff] +.IFDEF MODIFIED_BY +DEF_MODIFIED = YES +.ELSE +DEF_MODIFIED = NO +.ENDIF + ###################################################################### # End of configuration section. # Please, do not change anything below without programming experience. ###################################################################### -MODEL_DEF = "FEAT_$(MODEL)", +MODEL_DEF = "FEAT_$(MODEL)" # These go into pathdef.c VIMUSER = "''F$EDIT(F$GETJPI(" ","USERNAME"),"TRIM")'" @@ -284,7 +296,7 @@ VIMHOST = "''F$TRNLNM("SYS$NODE")'''F$TRNLNM("UCX$INET_HOST")'.''F$TRNLNM("UCX$I ALL_CFLAGS = /def=($(MODEL_DEF)$(DEFS)$(DEBUG_DEF)$(PERL_DEF)$(PYTHON_DEF) - $(TCL_DEF)$(RUBY_DEF)$(LUA_DEF)$(XIM_DEF)$(TAG_DEF)$(MZSCH_DEF) - - $(ICONV_DEF)) - + $(ICONV_DEF)$(ARCH_DEF)) - $(CFLAGS)$(GUI_FLAG) - /include=($(C_INC)$(GUI_INC_DIR)$(GUI_INC)$(PERL_INC)$(PYTHON_INC) - $(TCL_INC)$(XDIFF_INC)$(XPM_INC)) @@ -295,7 +307,7 @@ ALL_CFLAGS = /def=($(MODEL_DEF)$(DEFS)$(DEBUG_DEF)$(PERL_DEF)$(PYTHON_DEF) - # Otherwise should not be any other difference. ALL_CFLAGS_VER = /def=($(MODEL_DEF)$(DEFS)$(DEBUG_DEF)$(PERL_DEF)$(PYTHON_DEF) - $(TCL_DEF)$(RUBY_DEF)$(LUA_DEF)$(XIM_DEF)$(TAG_DEF)$(MZSCH_DEF) - - $(ICONV_DEF)) - + $(ICONV_DEF)$(ARCH_DEF)) - $(CFLAGS)$(GUI_FLAG) - /include=($(C_INC)$(GUI_INC_DIR)$(GUI_INC_VER)$(PERL_INC)$(PYTHON_INC) - $(TCL_INC)$(XDIFF_INC)$(XPM_INC)) @@ -314,6 +326,7 @@ SRC = \ buffer.c \ bufwrite.c \ change.c \ + channel.c \ charset.c \ cindent.c \ clientserver.c \ @@ -354,6 +367,7 @@ SRC = \ if_xcmdsrv.c \ indent.c \ insexpand.c \ + job.c \ json.c \ list.c \ locale.c \ @@ -381,6 +395,7 @@ SRC = \ popupmenu.c \ popupwin.c \ profiler.c \ + pty.c \ quickfix.c \ regexp.c \ register.c \ @@ -390,6 +405,7 @@ SRC = \ session.c \ sha256.c \ sign.c \ + sound.c \ spell.c \ spellfile.c \ spellsuggest.c \ @@ -397,6 +413,7 @@ SRC = \ syntax.c \ tag.c \ term.c \ + terminal.c \ termlib.c \ testing.c \ textformat.c \ @@ -439,6 +456,7 @@ OBJ = \ buffer.obj \ bufwrite.obj \ change.obj \ + channel.obj \ charset.obj \ cindent.obj \ clientserver.obj \ @@ -480,6 +498,7 @@ OBJ = \ if_xcmdsrv.obj \ indent.obj \ insexpand.obj \ + job.obj \ json.obj \ list.obj \ locale.obj \ @@ -507,6 +526,7 @@ OBJ = \ popupmenu.obj \ popupwin.obj \ profiler.obj \ + pty.obj \ quickfix.obj \ regexp.obj \ register.obj \ @@ -516,6 +536,7 @@ OBJ = \ session.obj \ sha256.obj \ sign.obj \ + sound.obj \ spell.obj \ spellfile.obj \ spellsuggest.obj \ @@ -523,6 +544,7 @@ OBJ = \ syntax.obj \ tag.obj \ term.obj \ + terminal.obj \ termlib.obj \ testing.obj \ textformat.obj \ @@ -560,6 +582,11 @@ all : [.auto]config.h mmk_compat motif_env gtk_env perl_env python_env tcl_env r [.auto]config.h : $(CONFIG_H) copy/nolog $(CONFIG_H) [.auto]config.h + -@ open/append ac [.auto]config.h + -@ hash[0,8]=35 + -@ quotes[0,8]=34 + -@ if ""$(DEF_MODIFIED)"" .EQS. "YES" then write ac ''hash',"define MODIFIED_BY ",''quotes',$(MODIFIED_BY),''quotes' + -@ close ac mmk_compat : -@ open/write pd pathdef.c @@ -772,6 +799,7 @@ charset.obj : charset.c vim.h [.auto]config.h feature.h os_unix.h \ ascii.h keymap.h termdefs.h macros.h structs.h regexp.h \ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \ errors.h globals.h +channel.obj : channel.c vim.h [.auto]config.h feature.h cindent.obj : cindent.c vim.h [.auto]config.h feature.h os_unix.h \ ascii.h keymap.h termdefs.h macros.h structs.h regexp.h \ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \ @@ -921,6 +949,7 @@ if_mzsch.obj : if_mzsch.c vim.h [.auto]config.h feature.h os_unix.h \ errors.h globals.h if_mzsch.h indent.obj : indent.c vim.h [.auto]config.h feature.h os_unix.h insexpand.obj : insexpand.c vim.h [.auto]config.h feature.h os_unix.h +job.obj : job.c vim.h [.auto]config.h feature.h os_unix.h json.obj : json.c vim.h [.auto]config.h feature.h os_unix.h \ ascii.h keymap.h termdefs.h macros.h structs.h regexp.h gui.h beval.h \ [.proto]gui_beval.pro option.h ex_cmds.h proto.h errors.h globals.h @@ -1015,6 +1044,7 @@ popupwin.obj : popupwin.c vim.h [.auto]config.h feature.h os_unix.h \ ascii.h keymap.h termdefs.h macros.h structs.h regexp.h \ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \ errors.h globals.h +pty.obj : pty.c vim.h [.auto]config.h feature.h os_unix.h profiler.obj : profiler.c vim.h [.auto]config.h feature.h os_unix.h \ ascii.h keymap.h termdefs.h macros.h structs.h regexp.h \ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \ @@ -1055,6 +1085,7 @@ sign.obj : sign.c vim.h [.auto]config.h feature.h os_unix.h \ ascii.h keymap.h termdefs.h macros.h option.h structs.h regexp.h gui.h \ beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \ errors.h globals.h +sound.obj : sound.c vim.h [.auto]config.h feature.h spell.obj : spell.c vim.h [.auto]config.h feature.h os_unix.h \ ascii.h keymap.h termdefs.h macros.h structs.h regexp.h \ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \ @@ -1081,6 +1112,7 @@ tag.obj : tag.c vim.h [.auto]config.h feature.h os_unix.h \ term.obj : term.c vim.h [.auto]config.h feature.h os_unix.h \ ascii.h keymap.h termdefs.h macros.h structs.h regexp.h gui.h beval.h \ [.proto]gui_beval.pro option.h ex_cmds.h proto.h errors.h globals.h +terminal.obj : terminal.c vim.h [.auto]config.h feature.h os_unix.h termlib.obj : termlib.c vim.h [.auto]config.h feature.h os_unix.h \ ascii.h keymap.h termdefs.h macros.h structs.h regexp.h gui.h beval.h \ [.proto]gui_beval.pro option.h ex_cmds.h proto.h errors.h globals.h diff --git a/src/crypt.c b/src/crypt.c index d5d216b35f..09e9011964 100644 --- a/src/crypt.c +++ b/src/crypt.c @@ -1308,7 +1308,7 @@ crypt_sodium_init(void) return sodium_init(); } - uint32_t + UINT32_T crypt_sodium_randombytes_random(void) { return randombytes_random(); @@ -12,15 +12,9 @@ #endif #ifdef FEAT_GUI_GTK -# ifdef VMS // undef MIN and MAX because Intrinsic.h redefines them anyway -# ifdef MAX -# undef MAX -# endif -# ifdef MIN -# undef MIN -# endif +# ifdef VMS # include "gui_gtk_vms.h" -# endif // VMS +# endif # include <X11/Intrinsic.h> # pragma GCC diagnostic push # pragma GCC diagnostic ignored "-Wstrict-prototypes" diff --git a/src/macros.h b/src/macros.h index cc2d11fdd1..caacd3ae7a 100644 --- a/src/macros.h +++ b/src/macros.h @@ -278,6 +278,10 @@ static inline int isnan(double x) { return x != x; } # endif +# if defined(VMS) && defined(X86_64) + static inline int isinf(double x) + { return !isnan(x) && !finite(x); } +# endif # ifndef HAVE_ISINF static inline int isinf(double x) { return !isnan(x) && isnan(x - x); } @@ -3114,7 +3114,7 @@ did_set_langmap(optset_T *args UNUSED) { if (p[0] != ',') { - snprintf(args->os_errbuf, args->os_errbuflen, + vim_snprintf(args->os_errbuf, args->os_errbuflen, _(e_langmap_extra_characters_after_semicolon_str), p); return args->os_errbuf; diff --git a/src/optionstr.c b/src/optionstr.c index d8e22c0378..ad1dc81a84 100644 --- a/src/optionstr.c +++ b/src/optionstr.c @@ -233,7 +233,7 @@ illegal_char(char *errbuf, size_t errbuflen, int c) { if (errbuf == NULL) return ""; - snprintf((char *)errbuf, errbuflen, _(e_illegal_character_str), + vim_snprintf((char *)errbuf, errbuflen, _(e_illegal_character_str), (char *)transchar(c)); return errbuf; } @@ -1541,7 +1541,7 @@ did_set_complete(optset_T *args) { if (args->os_errbuf != NULL) { - snprintf((char *)args->os_errbuf, args->os_errbuflen, + vim_snprintf((char *)args->os_errbuf, args->os_errbuflen, _(e_illegal_character_after_chr), *--s); return args->os_errbuf; } @@ -4069,7 +4069,7 @@ did_set_viminfo(optset_T *args) { if (args->os_errbuf != NULL) { - snprintf(args->os_errbuf, args->os_errbuflen, + vim_snprintf(args->os_errbuf, args->os_errbuflen, _(e_missing_number_after_angle_str_angle), transchar_byte(*(s - 1))); errmsg = args->os_errbuf; diff --git a/src/os_vms_conf.h b/src/os_vms_conf.h index 7de117c704..c1e1ea11b0 100644 --- a/src/os_vms_conf.h +++ b/src/os_vms_conf.h @@ -1,7 +1,14 @@ /* * os_vms_conf.h. Replaces auto/config.h for VMS + * */ +#if defined(__VMS) || defined(__vms) +#if !defined(VMS) +#define VMS +#endif +#endif + #define CASE_INSENSITIVE_FILENAME // Open VMS is case insensitive #define SPACE_IN_FILENAME // There could be space between user and passwd #define FNAME_ILLEGAL "|*#?%" // Illegal characters in a file name @@ -25,9 +32,6 @@ // Define when __DATE__ " " __TIME__ can be used #define HAVE_DATE_TIME -// Defined to the size of an int -#define VIM_SIZEOF_INT 4 - // #undef USEBCOPY #define USEMEMMOVE // #undef USEMEMCPY @@ -138,8 +142,11 @@ #undef HAVE_LSTAT #undef HAVE_STDINT_H +// Default features +#define FEAT_IPV6 + // Hardware specific -#ifdef VAX +#if defined(__VAX) || defined(VAX) #undef HAVE_GETTIMEOFDAY #undef HAVE_USLEEP #undef HAVE_STRCASECMP @@ -148,27 +155,39 @@ #undef HAVE_ISNAN #undef HAVE_XOS_R_H #define HAVE_NO_LONG_LONG +#define VIM_SIZEOF_INT 4 #define VIM_SIZEOF_LONG 4 #define LONG_LONG_MIN (-2147483647-1) #define LONG_LONG_MAX (2147483647) #define ULONG_LONG_MAX (4294967295U) -#else // AXP and IA64 + +#else // ALPHA, IA64, X86_64 #define HAVE_GETTIMEOFDAY #define HAVE_USLEEP #define HAVE_STRCASECMP #define HAVE_STRINGS_H #define HAVE_SIGSETJMP #define HAVE_ISNAN -#define HAVE_XOS_R_H -#define HAVE_NO_LONG_LONG +#undef HAVE_XOS_R_H +#undef HAVE_NO_LONG_LONG +#define VIM_SIZEOF_INT 4 #define VIM_SIZEOF_LONG 8 #define LONG_LONG_MIN (-9223372036854775807-1) #define LONG_LONG_MAX (9223372036854775807) #define ULONG_LONG_MAX (18446744073709551615U) + +#if defined(__x86_64) || defined(__x86_64__) +#if !defined(X86_64) +#define X86_64 +#endif +#define HAVE_ISNAN +#define HAVE_ISINF +#define HAVE_XOS_R_H +#endif #endif // Compiler specific -#ifdef VAXC +#if defined(VAXC) || defined(__VAXC) #undef HAVE_SELECT #undef HAVE_FCNTL_H #undef HAVE_UNISTD_H @@ -202,7 +221,7 @@ #define XUSE_MTSAFE_API #define HAVE_X11 #define WANT_X11 -#ifdef HAVE_XPM +#ifdef HAVE_XPM #define HAVE_X11_XPM_H #endif #define USE_FONTSET diff --git a/src/proto/crypt.pro b/src/proto/crypt.pro index e3ef693c72..f710800dbc 100644 --- a/src/proto/crypt.pro +++ b/src/proto/crypt.pro @@ -30,5 +30,5 @@ void crypt_sodium_lock_key(char_u *key); int crypt_sodium_munlock(void *const addr, const size_t len); void crypt_sodium_randombytes_buf(void *const buf, const size_t size); int crypt_sodium_init(void); -uint32_t crypt_sodium_randombytes_random(void); +UINT32_T crypt_sodium_randombytes_random(void); /* vim: set ft=c : */ diff --git a/src/term.c b/src/term.c index b414e42d4b..0fdb33e6d7 100644 --- a/src/term.c +++ b/src/term.c @@ -2983,7 +2983,7 @@ term_delete_lines(int line_count) OUT_STR(tgoto((char *)T_CDL, 0, line_count)); } -#if defined(UNIX) || defined(PROTO) +#if defined(UNIX) || defined(VMS) || defined(PROTO) void term_enable_mouse(int enable) { diff --git a/src/version.c b/src/version.c index 86505b1328..dc39b5ca21 100644 --- a/src/version.c +++ b/src/version.c @@ -705,6 +705,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 2153, +/**/ 2152, /**/ 2151, @@ -439,7 +439,12 @@ typedef unsigned int u8char_T; // int is 32 bits or more * The vimlong_T has sizeof(vimlong_T) >= 2 * sizeof(int). * One use is simple handling of overflow in int calculations. */ +#if defined(VMS) && defined(VAX) +// unsupported compiler +typedef long vimlong_T; +#else typedef long long vimlong_T; +#endif #ifndef UNIX // For Unix this is included in os_unix.h # include <stdio.h> @@ -499,6 +504,10 @@ typedef long long vimlong_T; # include <wctype.h> #endif #include <stdarg.h> +// older compilers do not define va_copy +#ifndef va_copy +# define va_copy(dst, src) ((dst) = (src)) +#endif // for offsetof() #include <stddef.h> diff --git a/src/xdiff/xmacros.h b/src/xdiff/xmacros.h index f58cf08e73..028ca6e417 100644 --- a/src/xdiff/xmacros.h +++ b/src/xdiff/xmacros.h @@ -24,7 +24,7 @@ #define XMACROS_H -#ifdef __hpux +#if defined(__hpux) || defined(VMS) # ifndef SIZE_MAX # define SIZE_MAX ((size_t)(-1)) # endif |