]>
Commit | Line | Data |
---|---|---|
193cbe32 AG |
1 | To: vim-dev@vim.org |
2 | Subject: Patch 6.3.047 (extra) | |
3 | Fcc: outbox | |
4 | From: Bram Moolenaar <Bram@moolenaar.net> | |
5 | Mime-Version: 1.0 | |
6 | Content-Type: text/plain; charset=ISO-8859-1 | |
7 | Content-Transfer-Encoding: 8bit | |
8 | ------------ | |
9 | ||
10 | Patch 6.3.047 (extra) | |
11 | Problem: Win32 with Borland C 5.5 on Windows XP: A new file is created with | |
12 | read-only attributes. (Tony Mechelynck) | |
13 | Solution: Don't use the _wopen() function for Borland. | |
14 | Files: src/os_win32.c | |
15 | ||
16 | ||
17 | *** ../vim-6.3.046/src/os_win32.c Wed Jun 9 14:56:26 2004 | |
18 | --- src/os_win32.c Wed Dec 15 15:35:41 2004 | |
19 | *************** | |
20 | *** 4460,4474 **** | |
21 | int | |
22 | mch_open(char *name, int flags, int mode) | |
23 | { | |
24 | WCHAR *wn; | |
25 | int f; | |
26 | ||
27 | ! if (enc_codepage >= 0 && (int)GetACP() != enc_codepage | |
28 | ! # ifdef __BORLANDC__ | |
29 | ! /* Wide functions of Borland C 5.5 do not work on Windows 98. */ | |
30 | ! && g_PlatformId == VER_PLATFORM_WIN32_NT | |
31 | ! # endif | |
32 | ! ) | |
33 | { | |
34 | wn = enc_to_ucs2(name, NULL); | |
35 | if (wn != NULL) | |
36 | --- 4460,4471 ---- | |
37 | int | |
38 | mch_open(char *name, int flags, int mode) | |
39 | { | |
40 | + /* _wopen() does not work with Borland C 5.5: creates a read-only file. */ | |
41 | + # ifndef __BORLANDC__ | |
42 | WCHAR *wn; | |
43 | int f; | |
44 | ||
45 | ! if (enc_codepage >= 0 && (int)GetACP() != enc_codepage) | |
46 | { | |
47 | wn = enc_to_ucs2(name, NULL); | |
48 | if (wn != NULL) | |
49 | *************** | |
50 | *** 4482,4487 **** | |
51 | --- 4479,4485 ---- | |
52 | * the _wopen() fails for missing wide functions. */ | |
53 | } | |
54 | } | |
55 | + # endif | |
56 | ||
57 | return open(name, flags, mode); | |
58 | } | |
59 | *** ../vim-6.3.046/src/version.c Sat Dec 11 16:14:41 2004 | |
60 | --- src/version.c Wed Dec 15 15:35:51 2004 | |
61 | *************** | |
62 | *** 643,644 **** | |
63 | --- 643,646 ---- | |
64 | { /* Add new patch number below this line */ | |
65 | + /**/ | |
66 | + 47, | |
67 | /**/ | |
68 | ||
69 | -- | |
70 | hundred-and-one symptoms of being an internet addict: | |
71 | 60. As your car crashes through the guardrail on a mountain road, your first | |
72 | instinct is to search for the "back" button. | |
73 | ||
74 | /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ | |
75 | /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ | |
76 | \\\ Project leader for A-A-P -- http://www.A-A-P.org /// | |
77 | \\\ Buy LOTR 3 and help AIDS victims -- http://ICCF.nl/lotr.html /// |