Mercurial > vim
annotate src/os_unix.h @ 15543:dd725a8ab112 v8.1.0779
patch 8.1.0779: argument for message functions is inconsistent
commit https://github.com/vim/vim/commit/32526b3c1846025f0e655f41efd4e5428da16b6c
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jan 19 17:43:09 2019 +0100
patch 8.1.0779: argument for message functions is inconsistent
Problem: Argument for message functions is inconsistent.
Solution: Make first argument to msg() "char *".
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 19 Jan 2019 17:45:07 +0100 |
parents | 54d2905bd5ab |
children | 2d8fa45b341d |
rev | line source |
---|---|
10042
4aead6a9b7a9
commit https://github.com/vim/vim/commit/edf3f97ae2af024708ebb4ac614227327033ca47
Christian Brabandt <cb@256bit.org>
parents:
9669
diff
changeset
|
1 /* vi:set ts=8 sts=4 sw=4 noet: |
7 | 2 * |
3 * VIM - Vi IMproved by Bram Moolenaar | |
4 * | |
5 * Do ":help uganda" in Vim to read copying and usage conditions. | |
6 * Do ":help credits" in Vim to see a list of people who contributed. | |
7 */ | |
8 | |
9 /* | |
10 * NextStep has a problem with configure, undefine a few things: | |
11 */ | |
12 #ifdef NeXT | |
13 # ifdef HAVE_UTIME | |
14 # undef HAVE_UTIME | |
15 # endif | |
16 # ifdef HAVE_SYS_UTSNAME_H | |
17 # undef HAVE_SYS_UTSNAME_H | |
18 # endif | |
19 #endif | |
20 | |
21 #include <stdio.h> | |
22 #include <ctype.h> | |
23 | |
24 #ifdef VAXC | |
25 # include <types.h> | |
26 # include <stat.h> | |
27 #else | |
28 # include <sys/types.h> | |
29 # include <sys/stat.h> | |
30 #endif | |
31 | |
32 #ifdef HAVE_STDLIB_H | |
33 # include <stdlib.h> | |
34 #endif | |
35 | |
36 #if defined(__CYGWIN__) || defined(__CYGWIN32__) | |
37 # define WIN32UNIX /* Compiling for Win32 using Unix files. */ | |
38 # define BINARY_FILE_IO | |
585 | 39 |
40 # define CASE_INSENSITIVE_FILENAME | |
41 # define USE_FNAME_CASE /* Fix filename case differences. */ | |
7 | 42 #endif |
43 | |
44 /* On AIX 4.2 there is a conflicting prototype for ioctl() in stropts.h and | |
45 * unistd.h. This hack should fix that (suggested by Jeff George). | |
46 * But on AIX 4.3 it's alright (suggested by Jake Hamby). */ | |
47 #if defined(FEAT_GUI) && defined(_AIX) && !defined(_AIX43) && !defined(_NO_PROTO) | |
48 # define _NO_PROTO | |
49 #endif | |
50 | |
51 #ifdef HAVE_UNISTD_H | |
1879 | 52 # include <unistd.h> |
7 | 53 #endif |
54 | |
55 #ifdef HAVE_LIBC_H | |
56 # include <libc.h> /* for NeXT */ | |
57 #endif | |
58 | |
59 #ifdef HAVE_SYS_PARAM_H | |
60 # include <sys/param.h> /* defines BSD, if it's a BSD system */ | |
61 #endif | |
62 | |
63 /* | |
64 * Using getcwd() is preferred, because it checks for a buffer overflow. | |
65 * Don't use getcwd() on systems do use system("sh -c pwd"). There is an | |
66 * autoconf check for this. | |
67 * Use getcwd() anyway if getwd() isn't present. | |
68 */ | |
69 #if defined(HAVE_GETCWD) && !(defined(BAD_GETCWD) && defined(HAVE_GETWD)) | |
70 # define USE_GETCWD | |
71 #endif | |
72 | |
73 /* always use unlink() to remove files */ | |
74 #ifndef PROTO | |
75 # ifdef VMS | |
76 # define mch_remove(x) delete((char *)(x)) | |
77 # define vim_mkdir(x, y) mkdir((char *)(x), y) | |
78 # else | |
79 # define vim_mkdir(x, y) mkdir((char *)(x), y) | |
80 # define mch_rmdir(x) rmdir((char *)(x)) | |
81 # define mch_remove(x) unlink((char *)(x)) | |
82 # endif | |
83 #endif | |
84 | |
85 /* The number of arguments to a signal handler is configured here. */ | |
86 /* It used to be a long list of almost all systems. Any system that doesn't | |
87 * have an argument??? */ | |
88 #define SIGHASARG | |
89 | |
90 /* List 3 arg systems here. I guess __sgi, please test and correct me. jw. */ | |
91 #if defined(__sgi) && defined(HAVE_SIGCONTEXT) | |
92 # define SIGHAS3ARGS | |
93 #endif | |
94 | |
95 #ifdef SIGHASARG | |
96 # ifdef SIGHAS3ARGS | |
97 # define SIGPROTOARG (int, int, struct sigcontext *) | |
98 # define SIGDEFARG(s) (s, sig2, scont) int s, sig2; struct sigcontext *scont; | |
99 # define SIGDUMMYARG 0, 0, (struct sigcontext *)0 | |
100 # else | |
101 # define SIGPROTOARG (int) | |
1877 | 102 # define SIGDEFARG(s) (s) int s UNUSED; |
7 | 103 # define SIGDUMMYARG 0 |
104 # endif | |
105 #else | |
106 # define SIGPROTOARG (void) | |
107 # define SIGDEFARG(s) () | |
108 # define SIGDUMMYARG | |
109 #endif | |
110 | |
111 #ifdef HAVE_DIRENT_H | |
112 # include <dirent.h> | |
113 # ifndef NAMLEN | |
114 # define NAMLEN(dirent) strlen((dirent)->d_name) | |
115 # endif | |
116 #else | |
117 # define dirent direct | |
118 # define NAMLEN(dirent) (dirent)->d_namlen | |
119 # if HAVE_SYS_NDIR_H | |
120 # include <sys/ndir.h> | |
121 # endif | |
122 # if HAVE_SYS_DIR_H | |
123 # include <sys/dir.h> | |
124 # endif | |
125 # if HAVE_NDIR_H | |
126 # include <ndir.h> | |
127 # endif | |
128 #endif | |
129 | |
130 #if !defined(HAVE_SYS_TIME_H) || defined(TIME_WITH_SYS_TIME) | |
131 # include <time.h> /* on some systems time.h should not be | |
132 included together with sys/time.h */ | |
133 #endif | |
134 #ifdef HAVE_SYS_TIME_H | |
135 # include <sys/time.h> | |
136 #endif | |
137 | |
138 #include <signal.h> | |
139 | |
140 #if defined(DIRSIZ) && !defined(MAXNAMLEN) | |
141 # define MAXNAMLEN DIRSIZ | |
142 #endif | |
143 | |
144 #if defined(UFS_MAXNAMLEN) && !defined(MAXNAMLEN) | |
145 # define MAXNAMLEN UFS_MAXNAMLEN /* for dynix/ptx */ | |
146 #endif | |
147 | |
148 #if defined(NAME_MAX) && !defined(MAXNAMLEN) | |
149 # define MAXNAMLEN NAME_MAX /* for Linux before .99p3 */ | |
150 #endif | |
151 | |
152 /* | |
153 * Note: if MAXNAMLEN has the wrong value, you will get error messages | |
154 * for not being able to open the swap file. | |
155 */ | |
156 #if !defined(MAXNAMLEN) | |
157 # define MAXNAMLEN 512 /* for all other Unix */ | |
158 #endif | |
159 | |
160 #define BASENAMELEN (MAXNAMLEN - 5) | |
161 | |
162 #ifdef HAVE_PWD_H | |
163 # include <pwd.h> | |
164 #endif | |
165 | |
166 #if (defined(HAVE_SYS_RESOURCE_H) && defined(HAVE_GETRLIMIT)) \ | |
167 || (defined(HAVE_SYS_SYSINFO_H) && defined(HAVE_SYSINFO)) \ | |
168 || defined(HAVE_SYSCTL) || defined(HAVE_SYSCONF) | |
169 # define HAVE_TOTAL_MEM | |
170 #endif | |
171 | |
3927 | 172 |
173 #ifndef PROTO | |
174 | |
7 | 175 #ifdef VMS |
819 | 176 # include <unixio.h> |
177 # include <unixlib.h> | |
178 # include <signal.h> | |
179 # include <file.h> | |
180 # include <ssdef.h> | |
181 # include <descrip.h> | |
182 # include <libclidef.h> | |
183 # include <lnmdef.h> | |
184 # include <psldef.h> | |
185 # include <prvdef.h> | |
186 # include <dvidef.h> | |
187 # include <dcdef.h> | |
188 # include <stsdef.h> | |
189 # include <iodef.h> | |
190 # include <ttdef.h> | |
191 # include <tt2def.h> | |
192 # include <jpidef.h> | |
193 # include <rms.h> | |
194 # include <trmdef.h> | |
195 # include <string.h> | |
196 # include <starlet.h> | |
197 # include <socket.h> | |
198 # include <lib$routines.h> | |
5541 | 199 # include <libdef.h> |
200 # include <libdtdef.h> | |
819 | 201 |
202 # ifdef FEAT_GUI_GTK | |
203 # include "gui_gtk_vms.h" | |
204 # endif | |
3927 | 205 #endif |
7 | 206 |
3927 | 207 #endif /* PROTO */ |
208 | |
209 #ifdef VMS | |
7 | 210 typedef struct dsc$descriptor DESC; |
211 #endif | |
212 | |
213 /* | |
214 * Unix system-dependent file names | |
215 */ | |
216 #ifndef SYS_VIMRC_FILE | |
217 # define SYS_VIMRC_FILE "$VIM/vimrc" | |
218 #endif | |
219 #ifndef SYS_GVIMRC_FILE | |
220 # define SYS_GVIMRC_FILE "$VIM/gvimrc" | |
221 #endif | |
222 #ifndef DFLT_HELPFILE | |
223 # define DFLT_HELPFILE "$VIMRUNTIME/doc/help.txt" | |
224 #endif | |
225 #ifndef FILETYPE_FILE | |
226 # define FILETYPE_FILE "filetype.vim" | |
227 #endif | |
228 #ifndef FTPLUGIN_FILE | |
229 # define FTPLUGIN_FILE "ftplugin.vim" | |
230 #endif | |
231 #ifndef INDENT_FILE | |
232 # define INDENT_FILE "indent.vim" | |
233 #endif | |
234 #ifndef FTOFF_FILE | |
235 # define FTOFF_FILE "ftoff.vim" | |
236 #endif | |
237 #ifndef FTPLUGOF_FILE | |
238 # define FTPLUGOF_FILE "ftplugof.vim" | |
239 #endif | |
240 #ifndef INDOFF_FILE | |
241 # define INDOFF_FILE "indoff.vim" | |
242 #endif | |
243 #ifndef SYS_MENU_FILE | |
244 # define SYS_MENU_FILE "$VIMRUNTIME/menu.vim" | |
245 #endif | |
246 | |
247 #ifndef USR_EXRC_FILE | |
248 # ifdef VMS | |
249 # define USR_EXRC_FILE "sys$login:.exrc" | |
250 # else | |
251 # define USR_EXRC_FILE "$HOME/.exrc" | |
252 # endif | |
253 #endif | |
254 | |
255 #if !defined(USR_EXRC_FILE2) && defined(VMS) | |
256 # define USR_EXRC_FILE2 "sys$login:_exrc" | |
257 #endif | |
258 | |
259 #ifndef USR_VIMRC_FILE | |
260 # ifdef VMS | |
261 # define USR_VIMRC_FILE "sys$login:.vimrc" | |
262 # else | |
263 # define USR_VIMRC_FILE "$HOME/.vimrc" | |
264 # endif | |
265 #endif | |
266 | |
4863
c4d4f0fc12b9
updated for version 7.3.1178
Bram Moolenaar <bram@vim.org>
parents:
3927
diff
changeset
|
267 |
6783 | 268 #if !defined(USR_VIMRC_FILE2) |
7408
1886f2863437
commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents:
6783
diff
changeset
|
269 # ifdef VMS |
1886f2863437
commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents:
6783
diff
changeset
|
270 # define USR_VIMRC_FILE2 "sys$login:vimfiles/vimrc" |
4863
c4d4f0fc12b9
updated for version 7.3.1178
Bram Moolenaar <bram@vim.org>
parents:
3927
diff
changeset
|
271 # else |
7408
1886f2863437
commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents:
6783
diff
changeset
|
272 # define USR_VIMRC_FILE2 "~/.vim/vimrc" |
4863
c4d4f0fc12b9
updated for version 7.3.1178
Bram Moolenaar <bram@vim.org>
parents:
3927
diff
changeset
|
273 # endif |
7 | 274 #endif |
4863
c4d4f0fc12b9
updated for version 7.3.1178
Bram Moolenaar <bram@vim.org>
parents:
3927
diff
changeset
|
275 |
c4d4f0fc12b9
updated for version 7.3.1178
Bram Moolenaar <bram@vim.org>
parents:
3927
diff
changeset
|
276 #if !defined(USR_VIMRC_FILE3) && defined(VMS) |
c4d4f0fc12b9
updated for version 7.3.1178
Bram Moolenaar <bram@vim.org>
parents:
3927
diff
changeset
|
277 # define USR_VIMRC_FILE3 "sys$login:_vimrc" |
7 | 278 #endif |
279 | |
280 #ifndef USR_GVIMRC_FILE | |
281 # ifdef VMS | |
282 # define USR_GVIMRC_FILE "sys$login:.gvimrc" | |
283 # else | |
284 # define USR_GVIMRC_FILE "$HOME/.gvimrc" | |
285 # endif | |
286 #endif | |
287 | |
4863
c4d4f0fc12b9
updated for version 7.3.1178
Bram Moolenaar <bram@vim.org>
parents:
3927
diff
changeset
|
288 #ifndef USR_GVIMRC_FILE2 |
7408
1886f2863437
commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents:
6783
diff
changeset
|
289 # ifdef VMS |
1886f2863437
commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents:
6783
diff
changeset
|
290 # define USR_GVIMRC_FILE2 "sys$login:vimfiles/gvimrc" |
4863
c4d4f0fc12b9
updated for version 7.3.1178
Bram Moolenaar <bram@vim.org>
parents:
3927
diff
changeset
|
291 # else |
7408
1886f2863437
commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents:
6783
diff
changeset
|
292 # define USR_GVIMRC_FILE2 "~/.vim/gvimrc" |
4863
c4d4f0fc12b9
updated for version 7.3.1178
Bram Moolenaar <bram@vim.org>
parents:
3927
diff
changeset
|
293 # endif |
c4d4f0fc12b9
updated for version 7.3.1178
Bram Moolenaar <bram@vim.org>
parents:
3927
diff
changeset
|
294 #endif |
c4d4f0fc12b9
updated for version 7.3.1178
Bram Moolenaar <bram@vim.org>
parents:
3927
diff
changeset
|
295 |
7 | 296 #ifdef VMS |
4863
c4d4f0fc12b9
updated for version 7.3.1178
Bram Moolenaar <bram@vim.org>
parents:
3927
diff
changeset
|
297 # ifndef USR_GVIMRC_FILE3 |
c4d4f0fc12b9
updated for version 7.3.1178
Bram Moolenaar <bram@vim.org>
parents:
3927
diff
changeset
|
298 # define USR_GVIMRC_FILE3 "sys$login:_gvimrc" |
7 | 299 # endif |
300 #endif | |
301 | |
9669
284b4eb307fc
commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
9536
diff
changeset
|
302 #ifndef VIM_DEFAULTS_FILE |
284b4eb307fc
commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
9536
diff
changeset
|
303 # define VIM_DEFAULTS_FILE "$VIMRUNTIME/defaults.vim" |
284b4eb307fc
commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
9536
diff
changeset
|
304 #endif |
284b4eb307fc
commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
9536
diff
changeset
|
305 |
7 | 306 #ifndef EVIM_FILE |
307 # define EVIM_FILE "$VIMRUNTIME/evim.vim" | |
308 #endif | |
309 | |
310 #ifdef FEAT_VIMINFO | |
311 # ifndef VIMINFO_FILE | |
312 # ifdef VMS | |
313 # define VIMINFO_FILE "sys$login:.viminfo" | |
314 # else | |
315 # define VIMINFO_FILE "$HOME/.viminfo" | |
316 # endif | |
317 # endif | |
318 # if !defined(VIMINFO_FILE2) && defined(VMS) | |
319 # define VIMINFO_FILE2 "sys$login:_viminfo" | |
320 # endif | |
321 #endif | |
322 | |
323 #ifndef EXRC_FILE | |
324 # define EXRC_FILE ".exrc" | |
325 #endif | |
326 | |
327 #ifndef VIMRC_FILE | |
328 # define VIMRC_FILE ".vimrc" | |
329 #endif | |
330 | |
331 #ifdef FEAT_GUI | |
332 # ifndef GVIMRC_FILE | |
333 # define GVIMRC_FILE ".gvimrc" | |
334 # endif | |
335 #endif | |
336 | |
337 #ifndef SYNTAX_FNAME | |
338 # define SYNTAX_FNAME "$VIMRUNTIME/syntax/%s.vim" | |
339 #endif | |
340 | |
341 #ifndef DFLT_BDIR | |
7408
1886f2863437
commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents:
6783
diff
changeset
|
342 # ifdef VMS |
1886f2863437
commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents:
6783
diff
changeset
|
343 # define DFLT_BDIR "./,sys$login:,tmp:" |
7 | 344 # else |
7408
1886f2863437
commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents:
6783
diff
changeset
|
345 # define DFLT_BDIR ".,~/tmp,~/" /* default for 'backupdir' */ |
7 | 346 # endif |
347 #endif | |
348 | |
349 #ifndef DFLT_DIR | |
7408
1886f2863437
commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents:
6783
diff
changeset
|
350 # ifdef VMS |
1886f2863437
commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents:
6783
diff
changeset
|
351 # define DFLT_DIR "./,sys$login:,tmp:" |
7 | 352 # else |
7408
1886f2863437
commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents:
6783
diff
changeset
|
353 # define DFLT_DIR ".,~/tmp,/var/tmp,/tmp" /* default for 'directory' */ |
7 | 354 # endif |
355 #endif | |
356 | |
357 #ifndef DFLT_VDIR | |
7408
1886f2863437
commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents:
6783
diff
changeset
|
358 # ifdef VMS |
1886f2863437
commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents:
6783
diff
changeset
|
359 # define DFLT_VDIR "sys$login:vimfiles/view" |
7 | 360 # else |
7408
1886f2863437
commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents:
6783
diff
changeset
|
361 # define DFLT_VDIR "$HOME/.vim/view" /* default for 'viewdir' */ |
7 | 362 # endif |
363 #endif | |
364 | |
365 #define DFLT_ERRORFILE "errors.err" | |
366 | |
7408
1886f2863437
commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents:
6783
diff
changeset
|
367 #ifdef VMS |
1886f2863437
commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents:
6783
diff
changeset
|
368 # define DFLT_RUNTIMEPATH "sys$login:vimfiles,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,sys$login:vimfiles/after" |
13361
65c29bd4548b
patch 8.0.1554: custom plugins loaded with --clean
Christian Brabandt <cb@256bit.org>
parents:
10702
diff
changeset
|
369 # define CLEAN_RUNTIMEPATH "$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after" |
7 | 370 #else |
7408
1886f2863437
commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents:
6783
diff
changeset
|
371 # ifdef RUNTIME_GLOBAL |
15205
54d2905bd5ab
patch 8.1.0612: cannot use two global runtime dirs with configure
Bram Moolenaar <Bram@vim.org>
parents:
14509
diff
changeset
|
372 # ifdef RUNTIME_GLOBAL_AFTER |
54d2905bd5ab
patch 8.1.0612: cannot use two global runtime dirs with configure
Bram Moolenaar <Bram@vim.org>
parents:
14509
diff
changeset
|
373 # define DFLT_RUNTIMEPATH "~/.vim," RUNTIME_GLOBAL ",$VIMRUNTIME," RUNTIME_GLOBAL_AFTER ",~/.vim/after" |
54d2905bd5ab
patch 8.1.0612: cannot use two global runtime dirs with configure
Bram Moolenaar <Bram@vim.org>
parents:
14509
diff
changeset
|
374 # define CLEAN_RUNTIMEPATH RUNTIME_GLOBAL ",$VIMRUNTIME," RUNTIME_GLOBAL_AFTER |
54d2905bd5ab
patch 8.1.0612: cannot use two global runtime dirs with configure
Bram Moolenaar <Bram@vim.org>
parents:
14509
diff
changeset
|
375 # else |
54d2905bd5ab
patch 8.1.0612: cannot use two global runtime dirs with configure
Bram Moolenaar <Bram@vim.org>
parents:
14509
diff
changeset
|
376 # define DFLT_RUNTIMEPATH "~/.vim," RUNTIME_GLOBAL ",$VIMRUNTIME," RUNTIME_GLOBAL "/after,~/.vim/after" |
54d2905bd5ab
patch 8.1.0612: cannot use two global runtime dirs with configure
Bram Moolenaar <Bram@vim.org>
parents:
14509
diff
changeset
|
377 # define CLEAN_RUNTIMEPATH RUNTIME_GLOBAL ",$VIMRUNTIME," RUNTIME_GLOBAL "/after" |
54d2905bd5ab
patch 8.1.0612: cannot use two global runtime dirs with configure
Bram Moolenaar <Bram@vim.org>
parents:
14509
diff
changeset
|
378 # endif |
7 | 379 # else |
7408
1886f2863437
commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents:
6783
diff
changeset
|
380 # define DFLT_RUNTIMEPATH "~/.vim,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,~/.vim/after" |
13361
65c29bd4548b
patch 8.0.1554: custom plugins loaded with --clean
Christian Brabandt <cb@256bit.org>
parents:
10702
diff
changeset
|
381 # define CLEAN_RUNTIMEPATH "$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after" |
7 | 382 # endif |
383 #endif | |
384 | |
7408
1886f2863437
commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents:
6783
diff
changeset
|
385 #ifdef VMS |
1886f2863437
commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents:
6783
diff
changeset
|
386 # ifndef VAX |
1886f2863437
commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents:
6783
diff
changeset
|
387 # define VMS_TEMPNAM /* to fix default .LIS extension */ |
1886f2863437
commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents:
6783
diff
changeset
|
388 # endif |
1886f2863437
commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents:
6783
diff
changeset
|
389 # define TEMPNAME "TMP:v?XXXXXX.txt" |
1886f2863437
commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents:
6783
diff
changeset
|
390 # define TEMPNAMELEN 28 |
7 | 391 #else |
7408
1886f2863437
commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents:
6783
diff
changeset
|
392 /* Try several directories to put the temp files. */ |
1886f2863437
commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents:
6783
diff
changeset
|
393 # define TEMPDIRNAMES "$TMPDIR", "/tmp", ".", "$HOME" |
1886f2863437
commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents:
6783
diff
changeset
|
394 # define TEMPNAMELEN 256 |
7 | 395 #endif |
396 | |
397 /* Special wildcards that need to be handled by the shell */ | |
398 #define SPECIAL_WILDCHAR "`'{" | |
399 | |
400 #ifndef HAVE_OPENDIR | |
401 # define NO_EXPANDPATH | |
402 #endif | |
403 | |
404 /* | |
405 * Unix has plenty of memory, use large buffers | |
406 */ | |
407 #define CMDBUFFSIZE 1024 /* size of the command processing buffer */ | |
1611 | 408 |
409 /* Use the system path length if it makes sense. */ | |
410 #if defined(PATH_MAX) && (PATH_MAX > 1000) | |
411 # define MAXPATHL PATH_MAX | |
412 #else | |
413 # define MAXPATHL 1024 | |
414 #endif | |
7 | 415 |
416 #define CHECK_INODE /* used when checking if a swap file already | |
417 exists for a file */ | |
418 #ifdef VMS /* Use less memory because of older systems */ | |
419 # ifndef DFLT_MAXMEM | |
420 # define DFLT_MAXMEM (2*1024) | |
421 # endif | |
422 # ifndef DFLT_MAXMEMTOT | |
423 # define DFLT_MAXMEMTOT (5*1024) | |
424 # endif | |
425 #else | |
426 # ifndef DFLT_MAXMEM | |
427 # define DFLT_MAXMEM (5*1024) /* use up to 5 Mbyte for a buffer */ | |
428 # endif | |
429 # ifndef DFLT_MAXMEMTOT | |
430 # define DFLT_MAXMEMTOT (10*1024) /* use up to 10 Mbyte for Vim */ | |
431 # endif | |
432 #endif | |
433 | |
10702
24a1fbd78b76
patch 8.0.0241: fallback implementation of mch_memmove is unused
Christian Brabandt <cb@256bit.org>
parents:
10328
diff
changeset
|
434 /* memmove() is not present on all systems, use memmove, bcopy or memcpy. |
24a1fbd78b76
patch 8.0.0241: fallback implementation of mch_memmove is unused
Christian Brabandt <cb@256bit.org>
parents:
10328
diff
changeset
|
435 * Some systems have (void *) arguments, some (char *). If we use (char *) it |
7 | 436 * works for all */ |
10702
24a1fbd78b76
patch 8.0.0241: fallback implementation of mch_memmove is unused
Christian Brabandt <cb@256bit.org>
parents:
10328
diff
changeset
|
437 #if defined(USEMEMMOVE) || (!defined(USEBCOPY) && !defined(USEMEMCPY)) |
7 | 438 # define mch_memmove(to, from, len) memmove((char *)(to), (char *)(from), len) |
439 #else | |
440 # ifdef USEBCOPY | |
441 # define mch_memmove(to, from, len) bcopy((char *)(from), (char *)(to), len) | |
442 # else | |
10702
24a1fbd78b76
patch 8.0.0241: fallback implementation of mch_memmove is unused
Christian Brabandt <cb@256bit.org>
parents:
10328
diff
changeset
|
443 /* ifdef USEMEMCPY */ |
7 | 444 # define mch_memmove(to, from, len) memcpy((char *)(to), (char *)(from), len) |
445 # endif | |
446 #endif | |
447 | |
448 #ifndef PROTO | |
449 # ifdef HAVE_RENAME | |
450 # define mch_rename(src, dst) rename(src, dst) | |
451 # else | |
7807
1a5d34492798
commit https://github.com/vim/vim/commit/d99df423c559d85c17779b3685426c489554908c
Christian Brabandt <cb@256bit.org>
parents:
7598
diff
changeset
|
452 int mch_rename(const char *src, const char *dest); |
7 | 453 # endif |
454 # ifndef VMS | |
455 # ifdef __MVS__ | |
1204 | 456 /* on OS390 Unix getenv() doesn't return a pointer to persistent |
7 | 457 * storage -> use __getenv() */ |
458 # define mch_getenv(x) (char_u *)__getenv((char *)(x)) | |
459 # else | |
460 # define mch_getenv(x) (char_u *)getenv((char *)(x)) | |
461 # endif | |
462 # define mch_setenv(name, val, x) setenv(name, val, x) | |
463 # endif | |
464 #endif | |
465 | |
466 /* Note: Some systems need both string.h and strings.h (Savage). However, | |
467 * some systems can't handle both, only use string.h in that case. */ | |
468 #ifdef HAVE_STRING_H | |
469 # include <string.h> | |
470 #endif | |
471 #if defined(HAVE_STRINGS_H) && !defined(NO_STRINGS_WITH_STRING_H) | |
472 # include <strings.h> | |
473 #endif | |
474 | |
475 #if defined(HAVE_SETJMP_H) | |
476 # include <setjmp.h> | |
477 # ifdef HAVE_SIGSETJMP | |
478 # define JMP_BUF sigjmp_buf | |
479 # define SETJMP(x) sigsetjmp((x), 1) | |
480 # define LONGJMP siglongjmp | |
481 # else | |
482 # define JMP_BUF jmp_buf | |
483 # define SETJMP(x) setjmp(x) | |
484 # define LONGJMP longjmp | |
485 # endif | |
486 #endif | |
487 | |
5743 | 488 #ifndef HAVE_DUP |
489 # define HAVE_DUP /* have dup() */ | |
490 #endif | |
7 | 491 #define HAVE_ST_MODE /* have stat.st_mode */ |
492 | |
493 /* We have three kinds of ACL support. */ | |
494 #define HAVE_ACL (HAVE_POSIX_ACL || HAVE_SOLARIS_ACL || HAVE_AIX_ACL) |