]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.0.1639: build failure without the crypt feature v9.0.1639
authorBram Moolenaar <Bram@vim.org>
Sat, 17 Jun 2023 14:35:03 +0000 (15:35 +0100)
committerBram Moolenaar <Bram@vim.org>
Sat, 17 Jun 2023 14:35:03 +0000 (15:35 +0100)
Problem:    Build failure without the crypt feature.
Solution:   Adjust #ifdefs

src/fileio.c
src/version.c

index 8b65baf62a5a101ea6f85d3dec00414e531cfb89..ac46a28239261956cf3e15e542819f293c381577 100644 (file)
@@ -218,7 +218,9 @@ readfile(
     int                using_b_ffname;
     int                using_b_fname;
     static char *msg_is_a_directory = N_("is a directory");
+#ifdef FEAT_CRYPT
     int                eof = FALSE;
+#endif
 #ifdef FEAT_SODIUM
     int                may_need_lseek = FALSE;
 #endif
@@ -1276,10 +1278,11 @@ retry:
                                if (!curbuf->b_p_eol)
                                    --tlen;
                                size = tlen;
+#ifdef FEAT_CRYPT
                                eof = TRUE;
+#endif
                                break;
                            }
-
                        }
                    }
                }
@@ -1288,7 +1291,7 @@ retry:
                    /*
                     * Read bytes from the file.
                     */
-# ifdef FEAT_SODIUM
+#ifdef FEAT_SODIUM
                    // Let the crypt layer work with a buffer size of 8192
                    //
                    // Sodium encryption requires a fixed block size to
@@ -1327,12 +1330,14 @@ retry:
                            may_need_lseek = FALSE;
                        }
                    }
-# endif
+#endif
                    long read_size = size;
                    size = read_eintr(fd, ptr, read_size);
                    filesize_count += size;
+#ifdef FEAT_CRYPT
                    // hit end of file
                    eof = (size < read_size || filesize_count == filesize_disk);
+#endif
                }
 
 #ifdef FEAT_CRYPT
index 9488cdac01f00be45677ae4199f7597282defdbd..364c6b6e319b154c9f7c84c517f5dc048d50ff52 100644 (file)
@@ -695,6 +695,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1639,
 /**/
     1638,
 /**/