Skip to content

Commit de5e2c2

Browse files
committed
patch 8.0.0059
Problem: Vim does not build on VMS systems. Solution: Various changes for VMS. (Zoltan Arpadffy)
1 parent 91e44a3 commit de5e2c2

10 files changed

Lines changed: 105 additions & 34 deletions

File tree

src/Make_vms.mms

Lines changed: 43 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Makefile for Vim on OpenVMS
33
#
44
# Maintainer: Zoltan Arpadffy <[email protected]>
5-
# Last change: 2016 Jul 02
5+
# Last change: 2016 Nov 04
66
#
77
# This has script been tested on VMS 6.2 to 8.2 on DEC Alpha, VAX and IA64
88
# with MMS and MMK
@@ -38,7 +38,7 @@ MODEL = HUGE
3838
# GUI or terminal mode executable.
3939
# Comment out if you want just the character terminal mode only.
4040
# GUI with Motif
41-
# GUI = YES
41+
GUI = YES
4242

4343
# GUI with GTK
4444
# If you have GTK installed you might want to enable this option.
@@ -299,22 +299,22 @@ ALL_CFLAGS_VER = /def=($(MODEL_DEF)$(DEFS)$(DEBUG_DEF)$(PERL_DEF)$(PYTHON_DEF) -
299299
ALL_LIBS = $(LIBS) $(GUI_LIB_DIR) $(GUI_LIB) \
300300
$(PERL_LIB) $(PYTHON_LIB) $(TCL_LIB) $(RUBY_LIB)
301301

302-
SRC = arabic.c blowfish.c buffer.c charset.c crypt.c, crypt_zip.c diff.c digraph.c edit.c eval.c ex_cmds.c ex_cmds2.c \
303-
ex_docmd.c ex_eval.c ex_getln.c if_xcmdsrv.c farsi.c fileio.c fold.c getchar.c \
304-
hardcopy.c hashtab.c json.c main.c mark.c menu.c mbyte.c memfile.c memline.c message.c misc1.c \
302+
SRC = arabic.c blowfish.c buffer.c charset.c crypt.c crypt_zip.c dict.c diff.c digraph.c edit.c eval.c evalfunc.c \
303+
ex_cmds.c ex_cmds2.c ex_docmd.c ex_eval.c ex_getln.c if_cscope.c if_xcmdsrv.c farsi.c fileio.c fold.c getchar.c \
304+
hardcopy.c hashtab.c json.c list.c main.c mark.c menu.c mbyte.c memfile.c memline.c message.c misc1.c \
305305
misc2.c move.c normal.c ops.c option.c popupmnu.c quickfix.c regexp.c search.c sha256.c\
306-
spell.c syntax.c tag.c term.c termlib.c ui.c undo.c version.c screen.c \
306+
spell.c spellfile.c syntax.c tag.c term.c termlib.c ui.c undo.c userfunc.c version.c screen.c \
307307
window.c os_unix.c os_vms.c pathdef.c \
308308
$(GUI_SRC) $(PERL_SRC) $(PYTHON_SRC) $(TCL_SRC) \
309309
$(RUBY_SRC) $(HANGULIN_SRC) $(MZSCH_SRC)
310310

311-
OBJ = arabic.obj blowfish.obj buffer.obj charset.obj crypt.obj, crypt_zip.obj diff.obj digraph.obj edit.obj eval.obj \
312-
ex_cmds.obj ex_cmds2.obj ex_docmd.obj ex_eval.obj ex_getln.obj \
313-
if_xcmdsrv.obj farsi.obj fileio.obj fold.obj getchar.obj hardcopy.obj hashtab.obj json.obj main.obj mark.obj \
311+
OBJ = arabic.obj blowfish.obj buffer.obj charset.obj crypt.obj crypt_zip.obj dict.obj diff.obj digraph.obj edit.obj eval.obj \
312+
evalfunc.obj ex_cmds.obj ex_cmds2.obj ex_docmd.obj ex_eval.obj ex_getln.obj if_cscope.obj \
313+
if_xcmdsrv.obj farsi.obj fileio.obj fold.obj getchar.obj hardcopy.obj hashtab.obj json.obj list.obj main.obj mark.obj \
314314
menu.obj memfile.obj memline.obj message.obj misc1.obj misc2.obj \
315315
move.obj mbyte.obj normal.obj ops.obj option.obj popupmnu.obj quickfix.obj \
316-
regexp.obj search.obj sha256.obj spell.obj syntax.obj tag.obj term.obj termlib.obj \
317-
ui.obj undo.obj screen.obj version.obj window.obj os_unix.obj \
316+
regexp.obj search.obj sha256.obj spell.obj spellfile.obj syntax.obj tag.obj term.obj termlib.obj \
317+
ui.obj undo.obj userfunc.obj screen.obj version.obj window.obj os_unix.obj \
318318
os_vms.obj pathdef.obj if_mzsch.obj\
319319
$(GUI_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(TCL_OBJ) \
320320
$(RUBY_OBJ) $(HANGULIN_OBJ) $(MZSCH_OBJ)
@@ -496,6 +496,18 @@ charset.obj : charset.c vim.h [.auto]config.h feature.h os_unix.h \
496496
ascii.h keymap.h term.h macros.h structs.h regexp.h \
497497
gui.h gui_beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
498498
globals.h farsi.h arabic.h
499+
crypt.obj : crypt.c vim.h [.auto]config.h feature.h os_unix.h \
500+
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
501+
gui_beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
502+
globals.h farsi.h arabic.h
503+
crypt_zip.obj : crypt_zip.c vim.h [.auto]config.h feature.h os_unix.h \
504+
ascii.h keymap.h term.h macros.h option.h structs.h \
505+
regexp.h gui.h gui_beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h \
506+
proto.h globals.h farsi.h arabic.h
507+
dict.obj : dict.c vim.h [.auto]config.h feature.h os_unix.h \
508+
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
509+
gui_beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
510+
globals.h farsi.h arabic.h
499511
diff.obj : diff.c vim.h [.auto]config.h feature.h os_unix.h \
500512
ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h gui_beval.h \
501513
[.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h farsi.h \
@@ -512,6 +524,10 @@ eval.obj : eval.c vim.h [.auto]config.h feature.h os_unix.h \
512524
ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h gui_beval.h \
513525
[.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h farsi.h \
514526
arabic.h version.h
527+
evalfunc.obj : evalfunc.c vim.h [.auto]config.h feature.h os_unix.h \
528+
ascii.h keymap.h term.h macros.h option.h structs.h \
529+
regexp.h gui.h gui_beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h \
530+
proto.h globals.h farsi.h arabic.h version.h
515531
ex_cmds.obj : ex_cmds.c vim.h [.auto]config.h feature.h os_unix.h \
516532
ascii.h keymap.h term.h macros.h structs.h regexp.h \
517533
gui.h gui_beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
@@ -569,6 +585,10 @@ json.obj : json.c vim.h [.auto]config.h feature.h os_unix.h \
569585
ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h gui_beval.h \
570586
[.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h farsi.h \
571587
arabic.h version.h
588+
list.obj : list.c vim.h [.auto]config.h feature.h os_unix.h \
589+
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
590+
gui_beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
591+
globals.h farsi.h arabic.h
572592
main.obj : main.c vim.h [.auto]config.h feature.h os_unix.h \
573593
ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h gui_beval.h \
574594
[.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h farsi.h \
@@ -653,10 +673,18 @@ search.obj : search.c vim.h [.auto]config.h feature.h os_unix.h \
653673
ascii.h keymap.h term.h macros.h structs.h regexp.h \
654674
gui.h gui_beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
655675
globals.h farsi.h arabic.h
676+
sha256.obj : sha256.c vim.h [.auto]config.h feature.h os_unix.h \
677+
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
678+
gui_beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
679+
globals.h farsi.h arabic.h
656680
spell.obj : spell.c vim.h [.auto]config.h feature.h os_unix.h \
657681
ascii.h keymap.h term.h macros.h structs.h regexp.h \
658682
gui.h gui_beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
659683
globals.h farsi.h arabic.h
684+
spellfile.obj : spellfile.c vim.h [.auto]config.h feature.h os_unix.h \
685+
ascii.h keymap.h term.h macros.h option.h structs.h \
686+
regexp.h gui.h gui_beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h \
687+
proto.h globals.h farsi.h arabic.h
660688
syntax.obj : syntax.c vim.h [.auto]config.h feature.h os_unix.h \
661689
ascii.h keymap.h term.h macros.h structs.h regexp.h \
662690
gui.h gui_beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
@@ -681,6 +709,10 @@ undo.obj : undo.c vim.h [.auto]config.h feature.h os_unix.h \
681709
ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h gui_beval.h \
682710
[.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h farsi.h \
683711
arabic.h
712+
userfunc.obj : userfunc.c vim.h [.auto]config.h feature.h os_unix.h \
713+
ascii.h keymap.h term.h macros.h option.h structs.h \
714+
regexp.h gui.h gui_beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h \
715+
proto.h globals.h farsi.h arabic.h
684716
version.obj : version.c vim.h [.auto]config.h feature.h os_unix.h \
685717
ascii.h keymap.h term.h macros.h structs.h regexp.h \
686718
gui.h gui_beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \

src/json.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616

1717
#include "vim.h"
1818

19+
#ifdef VAX
20+
# undef FEAT_FLOAT // VAX does not handle well the Infinities
21+
#endif
22+
1923
#if defined(FEAT_EVAL) || defined(PROTO)
2024

2125
static int json_encode_item(garray_T *gap, typval_T *val, int copyID, int options);

src/macros.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@
177177
# define mch_fstat(n, p) fstat(vms_fixfilename(n), (p))
178178
/* VMS does not have lstat() */
179179
# define mch_stat(n, p) stat(vms_fixfilename(n), (p))
180+
# define mch_rmdir(n) rmdir(vms_fixfilename(n))
180181
#else
181182
# ifndef WIN32
182183
# define mch_access(n, p) access((n), (p))

src/os_unix.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ mch_inchar(
501501
/* no character available */
502502
#if !(defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H))
503503
/* estimate the elapsed time */
504-
elapsed += wait_time;
504+
elapsed_time += wait_time;
505505
#endif
506506

507507
if (do_resize /* interrupted by SIGWINCH signal */
@@ -2644,7 +2644,7 @@ fname_case(
26442644
DIR *dirp;
26452645
struct dirent *dp;
26462646

2647-
if (lstat((char *)name, &st) >= 0)
2647+
if (mch_lstat((char *)name, &st) >= 0)
26482648
{
26492649
/* Open the directory where the file is located. */
26502650
slash = vim_strrchr(name, '/');
@@ -2677,7 +2677,7 @@ fname_case(
26772677
vim_strncpy(newname, name, MAXPATHL);
26782678
vim_strncpy(newname + (tail - name), (char_u *)dp->d_name,
26792679
MAXPATHL - (tail - name));
2680-
if (lstat((char *)newname, &st2) >= 0
2680+
if (mch_lstat((char *)newname, &st2) >= 0
26812681
&& st.st_ino == st2.st_ino
26822682
&& st.st_dev == st2.st_dev)
26832683
{
@@ -3040,7 +3040,7 @@ mch_isrealdir(char_u *name)
30403040

30413041
if (*name == NUL) /* Some stat()s don't flag "" as an error. */
30423042
return FALSE;
3043-
if (lstat((char *)name, &statb))
3043+
if (mch_lstat((char *)name, &statb))
30443044
return FALSE;
30453045
#ifdef _POSIX_SOURCE
30463046
return (S_ISDIR(statb.st_mode) ? TRUE : FALSE);
@@ -4098,6 +4098,7 @@ mch_call_shell(
40984098
int tmode = cur_tmode;
40994099
#ifdef USE_SYSTEM /* use system() to start the shell: simple but slow */
41004100
char_u *newcmd; /* only needed for unix */
4101+
int x;
41014102

41024103
out_flush();
41034104

src/os_unix.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,6 @@
7575
# ifdef VMS
7676
# define mch_remove(x) delete((char *)(x))
7777
# define vim_mkdir(x, y) mkdir((char *)(x), y)
78-
# ifdef VAX
79-
# else
80-
# define mch_rmdir(x) rmdir((char *)(x))
81-
# endif
8278
# else
8379
# define vim_mkdir(x, y) mkdir((char *)(x), y)
8480
# define mch_rmdir(x) rmdir((char *)(x))

src/os_vms.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,8 @@ struct typeahead_st {
726726
RealWaitForChar(
727727
int fd UNUSED, /* always read from iochan */
728728
long msec,
729-
int *check_for_gpm UNUSED)
729+
int *check_for_gpm UNUSED,
730+
int *interrupted)
730731
{
731732
int status;
732733
struct _generic_64 time_curr;

src/os_vms_conf.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,20 +141,23 @@
141141
#undef HAVE_SYS_POLL_H
142142
#undef HAVE_PWD_H
143143
#undef HAVE_FCHDIR
144+
#undef HAVE_LSTAT
144145

145146
/* Hardware specific */
146147
#ifdef VAX
147148
#undef HAVE_GETTIMEOFDAY
148149
#undef HAVE_USLEEP
149150
#undef HAVE_STRCASECMP
150151
#undef HAVE_STRINGS_H
151-
#undef HAVE_SIGSETJMP
152+
#undef HAVE_SIGSETJMP
153+
#undef HAVE_ISNAN
152154
#else
153155
#define HAVE_GETTIMEOFDAY
154156
#define HAVE_USLEEP
155157
#define HAVE_STRCASECMP
156158
#define HAVE_STRINGS_H
157-
#define HAVE_SIGSETJMP
159+
#define HAVE_SIGSETJMP
160+
#define HAVE_ISNAN
158161
#endif
159162

160163
/* Compiler specific */

src/proto/os_vms.pro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ int mch_expand_wildcards(int num_pat, char_u **pat, int *num_file, char_u ***fil
1212
int mch_expandpath(garray_T *gap, char_u *path, int flags);
1313
void *vms_fixfilename(void *instring);
1414
void vms_remove_version(void *fname);
15-
int RealWaitForChar(int fd, long msec, int *check_for_gpm);
15+
int RealWaitForChar(int fd, long msec, int *check_for_gpm, int *interrupted);
1616
/* vim: set ft=c : */

src/testdir/Make_vms.mms

Lines changed: 42 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Authors: Zoltan Arpadffy, <[email protected]>
55
# Sandor Kopanyi, <[email protected]>
66
#
7-
# Last change: 2016 Aug 04
7+
# Last change: 2016 Nov 04
88
#
99
# This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
1010
# Edit the lines in the Configuration section below to select.
@@ -74,14 +74,45 @@
7474

7575
VIMPROG = <->vim.exe
7676

77-
default : all
78-
79-
# This probably doesn't work, please fix.
80-
.INCLUDE Make_all.mak
81-
8277
.SUFFIXES : .out .in
8378

84-
SCRIPT = $(SCRIPTS_ALL) $(SCRIPTS_MORE3)
79+
SCRIPT = test1.out test3.out test4.out test5.out \
80+
test7.out test8.out test9.out \
81+
test14.out test15.out \
82+
test19.out test20.out test22.out \
83+
test23.out test24.out test26.out \
84+
test28.out test29.out test30.out test31.out test32.out \
85+
test33.out test34.out test36.out test37.out \
86+
test38.out test39.out test40.out test41.out test42.out \
87+
test43.out test44.out test45.out \
88+
test48.out test49.out test51.out test53.out test54.out \
89+
test55.out test56.out test57.out test60.out \
90+
test64.out test65.out \
91+
test66.out test67.out test68.out test69.out \
92+
test72.out test75.out \
93+
test77a.out test78.out test79.out test80.out \
94+
test82.out test84.out test88.out test89.out \
95+
test90.out test91.out test92.out test93.out test94.out \
96+
test95.out test98.out test99.out \
97+
test103.out test104.out \
98+
test107.out test108.out\
99+
test_autocmd_option.out \
100+
test_autoformat_join.out \
101+
test_breakindent.out \
102+
test_changelist.out \
103+
test_close_count.out \
104+
test_comparators.out \
105+
test_erasebackword.out \
106+
test_eval.out \
107+
test_fixeol.out \
108+
test_getcwd.out \
109+
test_insertcount.out \
110+
test_listchars.out \
111+
test_listlbr.out \
112+
test_listlbr_utf8.out \
113+
test_search_mbyte.out \
114+
test_utf8.out \
115+
test_wordcount.out
85116

86117
# Known problems:
87118
# test17: ?
@@ -104,12 +135,12 @@ SCRIPT = $(SCRIPTS_ALL) $(SCRIPTS_MORE3)
104135
# On ODS-2 tests fail.
105136

106137
.IFDEF WANT_GUI
107-
SCRIPT_GUI =
138+
SCRIPT_GUI = test16.out
108139
GUI_OPTION = -g
109140
.ENDIF
110141

111142
.IFDEF WANT_UNIX
112-
SCRIPT_UNIX = test12.out test17.out test25.out test27.out test49.out test73.out
143+
SCRIPT_UNIX = test10.out test12.out test17.out test25.out test27.out test49.out test73.out
113144
.ENDIF
114145

115146
.IFDEF WANT_WIN
@@ -163,7 +194,7 @@ SCRIPT_PYTHON = test86.out test87.out
163194
-@ write sys$output " "$*" "
164195
-@ write sys$output "-----------------------------------------------"
165196
-@ !run the test
166-
-@ create/term/wait/nodetach mcr $(VIMPROG) $(GUI_OPTION) -u vms.vim $(NO_PLUGIN) -s dotest.in $*.in
197+
-@ create/term/wait/nodetach mcr $(VIMPROG) $(GUI_OPTION) -u vms.vim --noplugin -s dotest.in $*.in
167198
-@ !analyse the result
168199
-@ directory /size/date test.out
169200
-@ if "''F$SEARCH("test.out.*")'" .NES. "" then rename/nolog test.out $*.out
@@ -172,7 +203,7 @@ SCRIPT_PYTHON = test86.out test87.out
172203
-@ if "''F$SEARCH("Xdotest.*")'" .NES. "" then delete/noconfirm/nolog Xdotest.*.*
173204
-@ if "''F$SEARCH("Xtest.*")'" .NES. "" then delete/noconfirm/nolog Xtest.*.*
174205

175-
all : clean nolog $(SCRIPTS_FIRST) $(SCRIPT) $(SCRIPT_GUI) $(SCRIPT_UNIX) $(SCRIPT_WIN) $(SCRIPT_SPELL) $(SCRIPT_ODS5) $(SCRIPT_GZIP) \
206+
all : clean nolog $(START_WITH) $(SCRIPT) $(SCRIPT_GUI) $(SCRIPT_UNIX) $(SCRIPT_WIN) $(SCRIPT_SPELL) $(SCRIPT_ODS5) $(SCRIPT_GZIP) \
176207
$(SCRIPT_GDIFF) $(SCRIPT_MZSCH) $(SCRIPT_CKSUM) $(SCRIPT_ICONV) $(SCRIPT_LUA) $(SCRIPT_PYTHON) nolog
177208
-@ write sys$output " "
178209
-@ write sys$output "-----------------------------------------------"

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,8 @@ static char *(features[]) =
764764

765765
static int included_patches[] =
766766
{ /* Add new patch number below this line */
767+
/**/
768+
59,
767769
/**/
768770
58,
769771
/**/

0 commit comments

Comments
 (0)