]>
Commit | Line | Data |
---|---|---|
9b1d76b7 AG |
1 | To: vim-dev@vim.org |
2 | Subject: patch 7.0.202 | |
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 7.0.202 | |
11 | Problem: Problems on Tandem systems while compiling and at runtime. | |
12 | Solution: Recognize root uid is 65535. Check select() return value for it | |
13 | not being supported. Avoid wrong function prototypes. Mention | |
14 | use of -lfloss. (Matthew Woehlke) | |
15 | Files: src/Makefile, src/ex_cmds.c, src/fileio.c, src/main.c, | |
16 | src/osdef1.h.in, src/osdef2.h.in, src/os_unix.c, src/pty.c, | |
17 | src/vim.h | |
18 | ||
19 | ||
20 | *** ../vim-7.0.201/src/Makefile Tue Feb 20 04:46:41 2007 | |
21 | --- src/Makefile Tue Feb 27 10:24:05 2007 | |
22 | *************** | |
23 | *** 201,206 **** | |
24 | --- 201,207 ---- | |
25 | #SunOS 4.1.x +X11 -GUI 5.1b (J) Bram Moolenaar | |
26 | #SunOS 4.1.3_U1 (sun4c) gcc +X11 +GUI Athena 5.0w (J) Darren Hiebert | |
27 | #SUPER-UX 6.2 (NEC SX-4) cc +X11R6 Motif,Athena4.6b (P) Lennart Schultz | |
28 | + #Tandem/NSK (c) Matthew Woehlke | |
29 | #Unisys 6035 cc +X11 Motif 5.3 (8) Glauber Ribeiro | |
30 | #ESIX V4.2 cc +X11 6.0 (a) Reinhard Wobst | |
31 | #Mac OS X 10.[23] gcc Carbon 6.2 (x) Bram Moolenaar | |
32 | *************** | |
33 | *** 251,256 **** | |
34 | --- 252,258 ---- | |
35 | # (a) See line with EXTRA_LIBS below. | |
36 | # (b) When using gcc with the Solaris linker, make sure you don't use GNU | |
37 | # strip, otherwise the binary may not run: "Cannot find ELF". | |
38 | + # (c) Add -lfloss to EXTRA_LIBS, see below. | |
39 | # (x) When you get warnings for precompiled header files, run | |
40 | # "sudo fixPrecomps". Also see CONF_OPT_DARWIN below. | |
41 | # }}} | |
42 | *************** | |
43 | *** 793,798 **** | |
44 | --- 796,804 ---- | |
45 | ||
46 | ### (a) ESIX V4.2 (Reinhard Wobst) | |
47 | #EXTRA_LIBS = -lnsl -lsocket -lgen -lXIM -lXmu -lXext | |
48 | + | |
49 | + ### (c) Tandem/NSK (Matthew Woehlke) | |
50 | + #EXTRA_LIBS = -lfloss | |
51 | ||
52 | ### If you want to use ncurses library instead of the automatically found one | |
53 | ### after changing this, you need to do "make reconfig". | |
54 | *** ../vim-7.0.201/src/ex_cmds.c Tue Feb 13 03:49:01 2007 | |
55 | --- src/ex_cmds.c Tue Feb 20 05:20:55 2007 | |
56 | *************** | |
57 | *** 1772,1778 **** | |
58 | */ | |
59 | st_old.st_dev = st_old.st_ino = 0; | |
60 | st_old.st_mode = 0600; | |
61 | ! if (mch_stat((char *)fname, &st_old) == 0 && getuid() | |
62 | && !(st_old.st_uid == getuid() | |
63 | ? (st_old.st_mode & 0200) | |
64 | : (st_old.st_gid == getgid() | |
65 | --- 1772,1779 ---- | |
66 | */ | |
67 | st_old.st_dev = st_old.st_ino = 0; | |
68 | st_old.st_mode = 0600; | |
69 | ! if (mch_stat((char *)fname, &st_old) == 0 | |
70 | ! && getuid() != ROOT_UID | |
71 | && !(st_old.st_uid == getuid() | |
72 | ? (st_old.st_mode & 0200) | |
73 | : (st_old.st_gid == getgid() | |
74 | *** ../vim-7.0.201/src/fileio.c Tue Jan 16 21:31:38 2007 | |
75 | --- src/fileio.c Wed Feb 21 06:04:39 2007 | |
76 | *************** | |
77 | *** 1122,1128 **** | |
78 | if (!skip_read) | |
79 | { | |
80 | #if SIZEOF_INT > 2 | |
81 | ! # ifdef __TANDEM | |
82 | size = SSIZE_MAX; /* use max I/O size, 52K */ | |
83 | # else | |
84 | size = 0x10000L; /* use buffer >= 64K */ | |
85 | --- 1122,1128 ---- | |
86 | if (!skip_read) | |
87 | { | |
88 | #if SIZEOF_INT > 2 | |
89 | ! # if defined(SSIZE_MAX) && (SSIZE_MAX < 0x10000L) | |
90 | size = SSIZE_MAX; /* use max I/O size, 52K */ | |
91 | # else | |
92 | size = 0x10000L; /* use buffer >= 64K */ | |
93 | *** ../vim-7.0.201/src/main.c Tue Nov 7 22:41:37 2006 | |
94 | --- src/main.c Tue Feb 20 05:22:33 2007 | |
95 | *************** | |
96 | *** 3280,3286 **** | |
97 | # ifdef FEAT_GUI | |
98 | (gui.in_use | |
99 | # ifdef UNIX | |
100 | ! && getuid() != 0 | |
101 | # endif | |
102 | ) || | |
103 | # endif | |
104 | --- 3280,3286 ---- | |
105 | # ifdef FEAT_GUI | |
106 | (gui.in_use | |
107 | # ifdef UNIX | |
108 | ! && getuid() != ROOT_UID | |
109 | # endif | |
110 | ) || | |
111 | # endif | |
112 | *** ../vim-7.0.201/src/osdef1.h.in Sun Jun 13 21:14:18 2004 | |
113 | --- src/osdef1.h.in Tue Feb 20 05:13:23 2007 | |
114 | *************** | |
115 | *** 98,104 **** | |
116 | --- 98,106 ---- | |
117 | ||
118 | #ifndef USE_SYSTEM | |
119 | extern int fork __ARGS((void)); | |
120 | + # ifndef __TANDEM | |
121 | extern int execvp __ARGS((const char *, const char **)); | |
122 | + # endif | |
123 | extern int wait __ARGS((int *)); /* will this break things ...? */ | |
124 | extern int waitpid __ARGS((pid_t, int *, int)); | |
125 | #endif | |
126 | *************** | |
127 | *** 123,132 **** | |
128 | ||
129 | extern int kill __ARGS((int, int)); | |
130 | ||
131 | extern int access __ARGS((char *, int)); | |
132 | extern int fsync __ARGS((int)); | |
133 | extern int fchown __ARGS((int, int, int)); | |
134 | ! #if defined(HAVE_GETCWD) && !defined(sun) | |
135 | extern char *getcwd __ARGS((char *, int)); | |
136 | #else | |
137 | extern char *getwd __ARGS((char *)); | |
138 | --- 125,136 ---- | |
139 | ||
140 | extern int kill __ARGS((int, int)); | |
141 | ||
142 | + #ifndef __TANDEM | |
143 | extern int access __ARGS((char *, int)); | |
144 | + #endif | |
145 | extern int fsync __ARGS((int)); | |
146 | extern int fchown __ARGS((int, int, int)); | |
147 | ! #if defined(HAVE_GETCWD) && !defined(sun) && !defined(__TANDEM) | |
148 | extern char *getcwd __ARGS((char *, int)); | |
149 | #else | |
150 | extern char *getwd __ARGS((char *)); | |
151 | *** ../vim-7.0.201/src/osdef2.h.in Sun Jun 13 17:19:40 2004 | |
152 | --- src/osdef2.h.in Tue Feb 20 05:14:50 2007 | |
153 | *************** | |
154 | *** 11,23 **** | |
155 | --- 11,29 ---- | |
156 | extern int setenv __ARGS((char *, char *, int)); | |
157 | extern int putenv __ARGS((const char *)); | |
158 | ||
159 | + #ifndef __TANDEM | |
160 | extern int gethostname __ARGS((char *, int)); | |
161 | + #endif | |
162 | extern void perror __ARGS((char *)); | |
163 | ||
164 | + #ifndef __TANDEM | |
165 | extern int sleep __ARGS((int)); | |
166 | + #endif | |
167 | extern int usleep __ARGS((unsigned int)); | |
168 | extern unsigned int alarm __ARGS((unsigned int)); | |
169 | + #ifndef __TANDEM | |
170 | extern int chdir __ARGS((char *)); | |
171 | + #endif | |
172 | extern int fchdir __ARGS((int)); | |
173 | #ifndef stat /* could be redefined to stat64() */ | |
174 | extern int stat __ARGS((const char *, struct stat *)); | |
175 | *************** | |
176 | *** 28,35 **** | |
177 | --- 34,43 ---- | |
178 | extern int fstat __ARGS((int, struct stat *)); | |
179 | extern int open __ARGS((const char *, int, ...)); | |
180 | extern int close __ARGS((int)); | |
181 | + #ifndef __TANDEM | |
182 | extern int read __ARGS((int, char *, size_t)); | |
183 | extern int write __ARGS((int, char *, size_t)); | |
184 | + #endif | |
185 | extern int pipe __ARGS((int *)); | |
186 | extern off_t lseek __ARGS((int, off_t, int)); | |
187 | extern void sync __ARGS((void)); | |
188 | *** ../vim-7.0.201/src/os_unix.c Tue Jan 9 15:15:36 2007 | |
189 | --- src/os_unix.c Tue Feb 20 05:17:23 2007 | |
190 | *************** | |
191 | *** 25,31 **** | |
192 | * Don't use it for the Mac, it causes a warning for precompiled headers. | |
193 | * TODO: use a configure check for precompiled headers? | |
194 | */ | |
195 | ! #ifndef __APPLE__ | |
196 | # define select select_declared_wrong | |
197 | #endif | |
198 | ||
199 | --- 25,31 ---- | |
200 | * Don't use it for the Mac, it causes a warning for precompiled headers. | |
201 | * TODO: use a configure check for precompiled headers? | |
202 | */ | |
203 | ! #if !defined(__APPLE__) && !defined(__TANDEM) | |
204 | # define select select_declared_wrong | |
205 | #endif | |
206 | ||
207 | *************** | |
208 | *** 48,56 **** | |
209 | /* | |
210 | * Use this prototype for select, some include files have a wrong prototype | |
211 | */ | |
212 | ! #undef select | |
213 | ! #ifdef __BEOS__ | |
214 | ! # define select beos_select | |
215 | #endif | |
216 | ||
217 | #if defined(HAVE_SELECT) | |
218 | --- 48,58 ---- | |
219 | /* | |
220 | * Use this prototype for select, some include files have a wrong prototype | |
221 | */ | |
222 | ! #ifndef __TANDEM | |
223 | ! # undef select | |
224 | ! # ifdef __BEOS__ | |
225 | ! # define select beos_select | |
226 | ! # endif | |
227 | #endif | |
228 | ||
229 | #if defined(HAVE_SELECT) | |
230 | *************** | |
231 | *** 4770,4775 **** | |
232 | --- 4772,4785 ---- | |
233 | # else | |
234 | ret = select(maxfd + 1, &rfds, NULL, &efds, tvp); | |
235 | # endif | |
236 | + # ifdef __TANDEM | |
237 | + if (ret == -1 && errno == ENOTSUP) | |
238 | + { | |
239 | + FD_ZERO(&rfds); | |
240 | + FD_ZERO(&efds); | |
241 | + ret = 0; | |
242 | + } | |
243 | + #endif | |
244 | # ifdef FEAT_MZSCHEME | |
245 | if (ret == 0 && mzquantum_used) | |
246 | /* loop if MzThreads must be scheduled and timeout occured */ | |
247 | *** ../vim-7.0.201/src/pty.c Wed Nov 1 18:12:46 2006 | |
248 | --- src/pty.c Tue Feb 20 05:21:22 2007 | |
249 | *************** | |
250 | *** 330,336 **** | |
251 | if ((f = open("/dev/ptc", O_RDWR | O_NOCTTY | O_EXTRA)) < 0) | |
252 | return -1; | |
253 | strncpy(TtyName, ttyname(f), sizeof(TtyName)); | |
254 | ! if (geteuid() && mch_access(TtyName, R_OK | W_OK)) | |
255 | { | |
256 | close(f); | |
257 | return -1; | |
258 | --- 330,336 ---- | |
259 | if ((f = open("/dev/ptc", O_RDWR | O_NOCTTY | O_EXTRA)) < 0) | |
260 | return -1; | |
261 | strncpy(TtyName, ttyname(f), sizeof(TtyName)); | |
262 | ! if (geteuid() != ROOT_UID && mch_access(TtyName, R_OK | W_OK)) | |
263 | { | |
264 | close(f); | |
265 | return -1; | |
266 | *************** | |
267 | *** 394,400 **** | |
268 | q[0] = *l; | |
269 | q[1] = *d; | |
270 | #ifndef MACOS | |
271 | ! if (geteuid() && mch_access(TtyName, R_OK | W_OK)) | |
272 | { | |
273 | close(f); | |
274 | continue; | |
275 | --- 394,400 ---- | |
276 | q[0] = *l; | |
277 | q[1] = *d; | |
278 | #ifndef MACOS | |
279 | ! if (geteuid() != ROOT_UID && mch_access(TtyName, R_OK | W_OK)) | |
280 | { | |
281 | close(f); | |
282 | continue; | |
283 | *** ../vim-7.0.201/src/vim.h Tue Jan 16 21:31:38 2007 | |
284 | --- src/vim.h Tue Feb 20 05:23:47 2007 | |
285 | *************** | |
286 | *** 50,55 **** | |
287 | --- 50,64 ---- | |
288 | # endif | |
289 | #endif | |
290 | ||
291 | + /* user ID of root is usually zero, but not for everybody */ | |
292 | + #ifdef __TANDEM | |
293 | + # define _TANDEM_SOURCE | |
294 | + # include <floss.h> | |
295 | + # define ROOT_UID 65535 | |
296 | + #else | |
297 | + # define ROOT_UID 0 | |
298 | + #endif | |
299 | + | |
300 | #ifdef __EMX__ /* hand-edited config.h for OS/2 with EMX */ | |
301 | # include "os_os2_cfg.h" | |
302 | #endif | |
303 | *** ../vim-7.0.201/src/version.c Tue Feb 20 04:46:32 2007 | |
304 | --- src/version.c Tue Feb 27 16:44:14 2007 | |
305 | *************** | |
306 | *** 668,669 **** | |
307 | --- 668,671 ---- | |
308 | { /* Add new patch number below this line */ | |
309 | + /**/ | |
310 | + 202, | |
311 | /**/ | |
312 | ||
313 | -- | |
314 | hundred-and-one symptoms of being an internet addict: | |
315 | 214. Your MCI "Circle of Friends" are all Hayes-compatible. | |
316 | ||
317 | /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ | |
318 | /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ | |
319 | \\\ download, build and distribute -- http://www.A-A-P.org /// | |
320 | \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |