]> granicus.if.org Git - vim/commitdiff
patch 8.0.1749: VMS: 100% CPU use, redefining mch_open() fails v8.0.1749
authorBram Moolenaar <Bram@vim.org>
Mon, 23 Apr 2018 18:46:16 +0000 (20:46 +0200)
committerBram Moolenaar <Bram@vim.org>
Mon, 23 Apr 2018 18:46:16 +0000 (20:46 +0200)
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)

src/os_vms.c
src/version.c
src/vim.h

index 84f84ac710aa1ea56f2b9dfbd3ad1c6b98d74793..61db3a80b6fa9f23b86e9254f06f50e12589a1ac 100644 (file)
@@ -784,7 +784,7 @@ RealWaitForChar(
            return 0;
        } else if (msec < 0) {
            /* no time-out; wait on indefinitely */
-           continue;
+           return 1; /* fakeout to force a wait in vms_read() */
        } else {
            /* time-out needs to be checked */
            status = sys$gettim(&time_curr);
index 28a053a58e70014df839a97252f6a2cfcdf9525c..55892048d054a724d46584f6f48ce29c2d8fbb64 100644 (file)
@@ -761,6 +761,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1749,
 /**/
     1748,
 /**/
index 4b41857903d326206706e6dd06d1c487affc85ec..df396ec0516249df104b0a9a6c5b3a9a125b3f26 100644 (file)
--- a/src/vim.h
+++ b/src/vim.h
@@ -2154,8 +2154,9 @@ typedef enum {
 # define number_width(x) 7
 #endif
 
-/* This must come after including proto.h */
-#if !(defined(FEAT_MBYTE) && defined(WIN3264))
+/* This must come after including proto.h.
+ * For VMS this is defined in macros.h. */
+#if !(defined(FEAT_MBYTE) && defined(WIN3264)) && !defined(VMS)
 # define mch_open(n, m, p)     open((n), (m), (p))
 # define mch_fopen(n, p)       fopen((n), (p))
 #endif