diff options
author | Bram Moolenaar <Bram@vim.org> | 2004-12-19 22:46:22 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2004-12-19 22:46:22 +0000 |
commit | 1cd871b5341bf43ee99e136844e3131014880f92 (patch) | |
tree | 6bd9573dbc14de3c4ec85e424cbec9c8d1ee0ed8 /src/os_win32.c | |
parent | 46c9c73de8def79baf8f0a34a12549f6c14944f3 (diff) | |
download | vim-git-1cd871b5341bf43ee99e136844e3131014880f92.tar.gz |
updated for version 7.0023v7.0023
Diffstat (limited to 'src/os_win32.c')
-rw-r--r-- | src/os_win32.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/os_win32.c b/src/os_win32.c index 23a31f36e..40544b20c 100644 --- a/src/os_win32.c +++ b/src/os_win32.c @@ -4345,9 +4345,9 @@ mch_rename( * filename.asc.txt by its SFN, filena~1.txt. If we rename filena~1.txt * to filena~1.txt~ (i.e., we're making a backup while writing it), the * SFN for filena~1.txt~ will be filena~1.txt, by default, which will - * cause all sorts of problems later in buf_write. So, we create an empty - * file called filena~1.txt and the system will have to find some other - * SFN for filena~1.txt~, such as filena~2.txt + * cause all sorts of problems later in buf_write(). So, we create an + * empty file called filena~1.txt and the system will have to find some + * other SFN for filena~1.txt~, such as filena~2.txt */ if ((hf = CreateFile(pszOldFile, GENERIC_WRITE, 0, NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, NULL)) == INVALID_HANDLE_VALUE) @@ -4538,15 +4538,12 @@ getout: int mch_open(char *name, int flags, int mode) { + /* _wopen() does not work with Borland C 5.5: creates a read-only file. */ +# ifndef __BORLANDC__ WCHAR *wn; int f; - if (enc_codepage >= 0 && (int)GetACP() != enc_codepage -# ifdef __BORLANDC__ - /* Wide functions of Borland C 5.5 do not work on Windows 98. */ - && g_PlatformId == VER_PLATFORM_WIN32_NT -# endif - ) + if (enc_codepage >= 0 && (int)GetACP() != enc_codepage) { wn = enc_to_ucs2(name, NULL); if (wn != NULL) @@ -4560,6 +4557,7 @@ mch_open(char *name, int flags, int mode) * the _wopen() fails for missing wide functions. */ } } +# endif return open(name, flags, mode); } |