]> git.pld-linux.org Git - packages/vim.git/blob - 7.2.338
- new
[packages/vim.git] / 7.2.338
1 To: vim-dev@vim.org
2 Subject: Patch 7.2.338
3 Fcc: outbox
4 From: Bram Moolenaar <Bram@moolenaar.net>
5 Mime-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8 ------------
9
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.
13 Files:      src/ex_cmds2.c
14
15
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
18 ***************
19 *** 2802,2821 ****
20   
21   static char_u *get_one_sourceline __ARGS((struct source_cookie *sp));
22   
23 ! #if defined(WIN32) && defined(FEAT_CSCOPE)
24   static FILE *fopen_noinh_readbin __ARGS((char *filename));
25   
26   /*
27    * Special function to open a file without handle inheritance.
28    */
29       static FILE *
30   fopen_noinh_readbin(filename)
31       char    *filename;
32   {
33 !     int       fd_tmp = mch_open(filename, O_RDONLY | O_BINARY | O_NOINHERIT, 0);
34   
35       if (fd_tmp == -1)
36         return NULL;
37       return fdopen(fd_tmp, READBIN);
38   }
39   #endif
40 --- 2802,2836 ----
41   
42   static char_u *get_one_sourceline __ARGS((struct source_cookie *sp));
43   
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));
47   
48   /*
49    * Special function to open a file without handle inheritance.
50 +  * When possible the handle is closed on exec().
51    */
52       static FILE *
53   fopen_noinh_readbin(filename)
54       char    *filename;
55   {
56 !     int       fd_tmp = mch_open(filename, O_RDONLY
57 ! # ifdef WIN32
58 !                         O_BINARY | O_NOINHERIT
59 ! # endif
60 !                         , 0);
61   
62       if (fd_tmp == -1)
63         return NULL;
64
65 + # ifdef HAVE_FD_CLOEXEC
66 +     {
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);
70 +     }
71 + # endif
72
73       return fdopen(fd_tmp, READBIN);
74   }
75   #endif
76 ***************
77 *** 2895,2901 ****
78       apply_autocmds(EVENT_SOURCEPRE, fname_exp, fname_exp, FALSE, curbuf);
79   #endif
80   
81 ! #if defined(WIN32) && defined(FEAT_CSCOPE)
82       cookie.fp = fopen_noinh_readbin((char *)fname_exp);
83   #else
84       cookie.fp = mch_fopen((char *)fname_exp, READBIN);
85 --- 2910,2916 ----
86       apply_autocmds(EVENT_SOURCEPRE, fname_exp, fname_exp, FALSE, curbuf);
87   #endif
88   
89 ! #ifdef USE_FOPEN_NOINH
90       cookie.fp = fopen_noinh_readbin((char *)fname_exp);
91   #else
92       cookie.fp = mch_fopen((char *)fname_exp, READBIN);
93 ***************
94 *** 2916,2922 ****
95                 *p = '.';
96             else
97                 *p = '_';
98 ! #if defined(WIN32) && defined(FEAT_CSCOPE)
99             cookie.fp = fopen_noinh_readbin((char *)fname_exp);
100   #else
101             cookie.fp = mch_fopen((char *)fname_exp, READBIN);
102 --- 2931,2937 ----
103                 *p = '.';
104             else
105                 *p = '_';
106 ! #ifdef USE_FOPEN_NOINH
107             cookie.fp = fopen_noinh_readbin((char *)fname_exp);
108   #else
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
112 ***************
113 *** 683,684 ****
114 --- 683,686 ----
115   {   /* Add new patch number below this line */
116 + /**/
117 +     338,
118   /**/
119
120 -- 
121 ~
122 ~
123 ~
124 ".signature" 4 lines, 50 characters written
125
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    ///
This page took 0.031946 seconds and 3 git commands to generate.