4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
10 Patch 7.2.338 (after 7.2.300)
11 Problem: Part of FD_CLOEXEC change is missing.
12 Solution: Include source file skipped because of typo.
16 *** ../vim-7.2.337/src/ex_cmds2.c 2010-01-19 16:12:53.000000000 +0100
17 --- src/ex_cmds2.c 2010-01-19 16:02:53.000000000 +0100
21 static char_u *get_one_sourceline __ARGS((struct source_cookie *sp));
23 ! #if defined(WIN32) && defined(FEAT_CSCOPE)
24 static FILE *fopen_noinh_readbin __ARGS((char *filename));
27 * Special function to open a file without handle inheritance.
30 fopen_noinh_readbin(filename)
33 ! int fd_tmp = mch_open(filename, O_RDONLY | O_BINARY | O_NOINHERIT, 0);
37 return fdopen(fd_tmp, READBIN);
42 static char_u *get_one_sourceline __ARGS((struct source_cookie *sp));
44 ! #if (defined(WIN32) && defined(FEAT_CSCOPE)) || defined(HAVE_FD_CLOEXEC)
45 ! # define USE_FOPEN_NOINH
46 static FILE *fopen_noinh_readbin __ARGS((char *filename));
49 * Special function to open a file without handle inheritance.
50 + * When possible the handle is closed on exec().
53 fopen_noinh_readbin(filename)
56 ! int fd_tmp = mch_open(filename, O_RDONLY
58 ! O_BINARY | O_NOINHERIT
65 + # ifdef HAVE_FD_CLOEXEC
67 + int fdflags = fcntl(fd_tmp, F_GETFD);
68 + if (fdflags >= 0 && (fdflags & FD_CLOEXEC) == 0)
69 + fcntl(fd_tmp, F_SETFD, fdflags | FD_CLOEXEC);
73 return fdopen(fd_tmp, READBIN);
78 apply_autocmds(EVENT_SOURCEPRE, fname_exp, fname_exp, FALSE, curbuf);
81 ! #if defined(WIN32) && defined(FEAT_CSCOPE)
82 cookie.fp = fopen_noinh_readbin((char *)fname_exp);
84 cookie.fp = mch_fopen((char *)fname_exp, READBIN);
86 apply_autocmds(EVENT_SOURCEPRE, fname_exp, fname_exp, FALSE, curbuf);
89 ! #ifdef USE_FOPEN_NOINH
90 cookie.fp = fopen_noinh_readbin((char *)fname_exp);
92 cookie.fp = mch_fopen((char *)fname_exp, READBIN);
98 ! #if defined(WIN32) && defined(FEAT_CSCOPE)
99 cookie.fp = fopen_noinh_readbin((char *)fname_exp);
101 cookie.fp = mch_fopen((char *)fname_exp, READBIN);
106 ! #ifdef USE_FOPEN_NOINH
107 cookie.fp = fopen_noinh_readbin((char *)fname_exp);
109 cookie.fp = mch_fopen((char *)fname_exp, READBIN);
110 *** ../vim-7.2.337/src/version.c 2010-01-19 16:12:53.000000000 +0100
111 --- src/version.c 2010-01-19 16:20:08.000000000 +0100
115 { /* Add new patch number below this line */
124 ".signature" 4 lines, 50 characters written
126 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
127 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
128 \\\ download, build and distribute -- http://www.A-A-P.org ///
129 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///