Mercurial > vim
changeset 32615:8c5edad9b7a5 v9.0.1639
patch 9.0.1639: build failure without the crypt feature
Commit: https://github.com/vim/vim/commit/bc385a150f9d812bb3e54ff0d5db75d3c6c3bb43
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jun 17 15:35:03 2023 +0100
patch 9.0.1639: build failure without the crypt feature
Problem: Build failure without the crypt feature.
Solution: Adjust #ifdefs
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 17 Jun 2023 16:45:03 +0200 |
parents | 9601a65e84e3 |
children | ef667e18e5c1 |
files | src/fileio.c src/version.c |
diffstat | 2 files changed, 10 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/fileio.c +++ b/src/fileio.c @@ -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