2 * vi configuration file
3 * We try to automatically configure to various compilers and operating
4 * systems. Extend the autoconf section as needed.
10 /*************************** autoconf section ************************/
15 # define COMPILED_BY "Manx Aztec C 5.2b"
18 /* standard unix V (?) */
23 /* xelos system, University of Ulm */
37 /* Microsoft C: sorry, Watcom does the same thing */
42 # define COMPILED_BY "IBM C/2 1.00"
45 # define COMPILED_BY "Microsoft C 5.10"
50 /* Borland's Turbo C */
55 # define COMPILED_BY "Borland C 2.00"
57 # define COMPILED_BY (__TURBOC__ >= 661 ? "Turbo C++ 1.00" : "Turbo C 2.00")
61 /* Tos Mark-Williams */
64 # define COMPILED_BY "Mark Williams C"
68 #if defined(__atarist__) && defined(__gem__)
70 # define COMPILED_BY "GNU-C " __VERSION__
75 # define COMPILED_BY "Microware C V2.3 Edition 40"
78 /* DEC Rainbow, running MS-DOS (handled by earlier MS-DOS tests) */
79 /* (would need -DRAINBOW in CFLAGS to compile a Rainbow-compatible .EXE) */
82 # define COMPILED_BY "VAX/VMS VAXC compiler"
87 /*************************** end of autoconf section ************************/
89 /* All undefined symbols are defined to zero here, to allow for older */
90 /* compilers which dont understand #if defined() or #if UNDEFINED_SYMBOL */
92 /*************************** operating systems *****************************/
95 # define BSD 0 /* UNIX - Berkeley 4.x */
99 # define UNIXV 0 /* UNIX - AT&T SYSV */
103 # define UNIX7 0 /* UNIX - version 7 */
107 # define MSDOS 0 /* PC */
111 # define TOS 0 /* Atari ST */
115 # define AMIGA 0 /* Commodore Amiga */
119 # define OSK 0 /* OS-9 / 68k */
123 # define COHERENT 0 /* Coherent */
126 #ifndef RAINBOW /* DEC Rainbow support, under MS-DOS */
131 # define VMS 0 /* VAX/VMS */
133 /* Minix has no predefines */
134 #if !BSD && !UNIXV && !UNIX7 && !MSDOS && !TOS && !AMIGA && !OSK && !COHERENT && !VMS
140 /* generic combination of Unices */
141 #if UNIXV || UNIX7 || BSD || MINIX || COHERENT
147 /*************************** compilers **************************************/
161 /******************************* Credit ************************************/
164 # define CREDIT "Ported to MS-DOS by Guntram Blohm & Martin Patzel"
166 # define CREDIT2 "Rainbow support added by Willett Kempton"
171 # define CREDIT "Ported to AmigaDOS 2.04 by Mike Rieser & Dale Rahn"
175 # define CREDIT "Ported to Atari/TOS by Guntram Blohm & Martin Patzel"
179 # define CREDIT "Ported to Microware OS9/68k by Peter Reinig"
183 # define CREDIT "Ported to Coherent by Esa Ahola"
187 # define CREDIT "Ported to VAX/VMS by John Campbell"
189 /*************************** functions depending on OS *********************/
191 /* There are two terminal-related functions that we need: ttyread() and
192 * ttywrite(). The ttyread() function implements read-with-timeout and is
193 * a true function on all systems. The ttywrite() function is almost always
197 # define ttywrite(buf, len) write(1, buf, (unsigned)(len)) /* raw write */
200 /* The strchr() function is an official standard now, so everybody has it
201 * except Unix version 7 (which is old) and BSD Unix (which is academic).
202 * Those guys use something called index() to do the same thing.
204 #if BSD || UNIX7 || OSK
205 # define strchr index
207 extern char *strchr();
209 /* BSD uses bcopy() instead of memcpy() */
211 # define memcpy(dest, src, siz) bcopy(src, dest, siz)
214 /* BSD uses getwd() instead of getcwd(). The arguments are a little different,
215 * but we'll ignore that and hope for the best; adding arguments to the macro
216 * would mess up an "extern" declaration of the function.
219 # define getcwd getwd
221 extern char *getcwd();
223 /* text versa binary mode for read/write */
225 #define tread(fd,buf,n) read(fd,buf,(unsigned)(n))
226 #define twrite(fd,buf,n) write(fd,buf,(unsigned)(n))
229 /**************************** Compiler quirks *********************************/
231 /* the UNIX version 7 and (some) TOS compilers, don't allow "void" */
236 /* as far as I know, all compilers except version 7 support unsigned char */
237 /* NEWFLASH: the Minix-ST compiler has subtle problems with unsigned char */
239 # define UCHAR(c) ((c) & 0xff)
242 # define UCHAR(c) ((unsigned char)(c))
243 # define uchar unsigned char
246 /* Some compilers prefer to have malloc declared as returning a (void *) */
248 extern void *malloc();
250 extern char *malloc();
253 /* everybody but Amiga wants lseek declared here */
258 /******************* Names of files and environment vars **********************/
263 # define TMPDIR "/tmp"
267 # define PRSVDIR "/usr/preserve" /* directory where preserved file live */
270 # define PRSVINDEX "/usr/preserve/Index" /* index of files in PRSVDIR */
273 # define EXRC ".exrc" /* init file in current directory */
275 # define SCRATCHOUT "%s/soXXXXXX" /* temp file used as input to filter */
277 # define SHELL "/bin/sh" /* default shell */
281 # define REDIRECT ">" /* Coherent CC writes errors to stdout */
286 #if AMIGA /* Specify AMIGA environment */
288 # define CC_COMMAND "cc" /* generic C compiler */
291 # define COLON ':' /* Amiga files can also end in `:' */
294 # define SYSEXRC "S:" EXRC /* name of ".exrc" file in system dir */
297 # define MAXRCLEN 2048 /* max size of a .exrc file */
300 # define NBUFS 10 /* must be at least 3 -- more is better */
303 # define NEEDSYNC TRUE /* assume ":se sync" by default */
306 # define PRSVDIR "Elvis:" /* directory where preserved file live */
309 # define PRSVINDEX "Elvis:Index" /* index of files in PRSVDIR */
312 # define REDIRECT ">" /* Amiga writes errors to stdout */
315 # define SCRATCHIN "%sSIXXXXXX"
318 # define SCRATCHOUT "%sSOXXXXXX"
321 # define SHELL "newshell" /* default shell */
324 # define TERMTYPE "amiga" /* default termtype */
326 # ifndef TMPDIR /* for AMIGA should end in `:' or `/' */
327 # define TMPDIR "T:" /* directory where temp files live */
330 # define TMPNAME "%selv_%x.%x" /* format of names for temp files */
335 /* do not change TMPNAME and SCRATCH*: they MUST begin with '%s\\'! */
337 # define TMPDIR "C:\\tmp" /* directory where temp files live */
340 # define PRSVDIR "C:\\preserve" /* directory where preserved file live */
343 # define PRSVINDEX "C:\\preserve\\Index" /* index of files in PRSVDIR */
345 # define TMPNAME "%s\\elv_%x.%x" /* temp file */
348 # define CC_COMMAND "cl -c" /* C compiler */
350 # if __BORLANDC__ /* Borland C */
351 # define CC_COMMAND "bcc" /* C compiler */
353 # if TURBOC /* Turbo C */
354 # define CC_COMMAND "tcc" /* C compiler */
356 # endif /* BORLANDC */
357 # endif /* MICROSOFT */
359 # define SCRATCHIN "%s\\siXXXXXX" /* DOS ONLY - output of filter program */
360 # define SCRATCHOUT "%s\\soXXXXXX" /* temp file used as input to filter */
364 # define SHELL "shell.ttp" /* default shell */
366 # define SHELL "command.com" /* default shell */
369 # define NEEDSYNC TRUE /* assume ":se sync" by default */
370 # if TOS && __GNUC__ /* probably on other systems, too */
371 # define REDIRECT "2>" /* GNUC reports on 2, others on 1 */
372 # define CC_COMMAND "gcc -c"
374 # define REDIRECT ">" /* shell's redirection of stderr */
379 /* do not change TMPNAME, and SCRATCH*: they MUST begin with '%s\\'! */
381 # define TMPDIR "sys$scratch:" /* directory where temp files live */
383 # define TMPNAME "%selv_%x.%x;1" /* temp file */
384 # define SCRATCHIN "%ssiXXXXXX" /* DOS ONLY - output of filter program */
385 # define SCRATCHOUT "%ssoXXXXXX" /* temp file used as input to filter */
386 # define SLASH '\:' /* Worry point... jdc */
388 # define SHELL "" /* default shell */
390 # define REDIRECT ">" /* shell's redirection of stderr */
391 # define tread(fd,buf,n) vms_read(fd,buf,(unsigned)(n))
392 # define close vms_close
393 # define lseek vms_lseek
394 # define unlink vms_delete
395 # define delete __delete /* local routine conflicts w/VMS rtl routine. */
396 # define rpipe vms_rpipe
397 # define rpclose vms_rpclose
398 # define ttyread vms_ttyread
399 /* There is no sync() on vms */
401 /* jdc -- seems VMS external symbols are case insensitive */
402 # define m_fWord m_fw_ord
403 # define m_bWord m_bw_ord
404 # define m_eWord m_ew_ord
405 # define m_Nsrch m_n_srch
406 # define m_Fch m_f_ch
407 # define m_Tch m_t_ch
408 # define v_Xchar v_x_char
409 /* jdc -- also, braindead vms curses always found by linker. */
410 # define LINES elvis_LINES
411 # define COLS elvis_COLS
412 # define curscr elvis_curscr
413 # define stdscr elvis_stdscr
414 # define initscr elvis_initscr
415 # define endwin elvis_endwin
416 # define wrefresh elvis_wrefresh
421 # define TMPDIR "/dd/tmp" /* directory where temp files live */
424 # define PRSVDIR "/dd/usr/preserve" /* directory where preserved file live */
427 # define PRSVINDEX "/dd/usr/preserve/Index" /* index of files in PRSVDIR */
430 # define CC_COMMAND "cc -r" /* name of the compiler */
433 # define EXRC ".exrc" /* init file in current directory */
435 # define SCRATCHOUT "%s/soXXXXXX" /* temp file used as input to filter */
437 # define SHELL "shell" /* default shell */
439 # define FILEPERMS (S_IREAD|S_IWRITE) /* file permissions used for creat() */
440 # define REDIRECT ">>-" /* shell's redirection of stderr */
441 # define sync() /* OS9 doesn't need a sync() */
445 # define TAGS "tags" /* name of the tags file */
449 # define TMPNAME "%s/elv_%x.%x" /* format of names for temp files */
453 # define EXINIT "EXINIT" /* name of EXINIT environment variable */
457 # define EXRC "elvis.rc" /* name of ".exrc" file in current dir */
461 # define HMEXRC EXRC /* name of ".exrc" file in home dir */
465 # define KEYWORDPRG "ref"
469 # define SCRATCHIN "%s/SIXXXXXX"
470 # define SCRATCHOUT "%s/SOXXXXXX"
474 # define ERRLIST "errlist"
482 # define SHELL "shell"
486 # define REG register
490 # define NEEDSYNC FALSE
494 # define FILEPERMS 0666
498 # define PRESERVE "elvprsv" /* name of the "preserve" program */
502 # define CC_COMMAND "cc -c"
506 # define MAKE_COMMAND "make"
510 # define REDIRECT "2>"
515 # define BLKSIZE 1024
517 # define BLKSIZE 2048
522 # define KEYBUFSIZE 1000
525 #endif /* ndef _CONFIG_H */