Skip to content

Commit 6537c42

Browse files
committed
patch 8.0.1749: VMS: 100% CPU use, redefining mch_open() fails
Problem: VMS: 100% CPU use, redefining mch_open() and mch_fopen() fails. Solution: Do not wait indefinitely in RealWaitForChar(). (Neil Rieck) Do not redefine mch_open() and mch_fopen() on VMS. (Zoltan Arpadffy)
1 parent a4baf5b commit 6537c42

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

‎src/os_vms.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -784,7 +784,7 @@ RealWaitForChar(
784784
return 0;
785785
} else if (msec < 0) {
786786
/* no time-out; wait on indefinitely */
787-
continue;
787+
return 1; /* fakeout to force a wait in vms_read() */
788788
} else {
789789
/* time-out needs to be checked */
790790
status = sys$gettim(&time_curr);

‎src/version.c‎

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

762762
static int included_patches[] =
763763
{ /* Add new patch number below this line */
764+
/**/
765+
1749,
764766
/**/
765767
1748,
766768
/**/

‎src/vim.h‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2154,8 +2154,9 @@ typedef enum {
21542154
# define number_width(x) 7
21552155
#endif
21562156

2157-
/* This must come after including proto.h */
2158-
#if !(defined(FEAT_MBYTE) && defined(WIN3264))
2157+
/* This must come after including proto.h.
2158+
* For VMS this is defined in macros.h. */
2159+
#if !(defined(FEAT_MBYTE) && defined(WIN3264)) && !defined(VMS)
21592160
# define mch_open(n, m, p) open((n), (m), (p))
21602161
# define mch_fopen(n, p) fopen((n), (p))
21612162
#endif

0 commit comments

Comments
 (0)