* We try to automatically configure to various compilers and operating
* systems. Extend the autoconf section as needed.
/*************************** autoconf section ************************/
# define COMPILED_BY "Manx Aztec C 5.2b"
/* standard unix V (?) */
/* xelos system, University of Ulm */
/* Microsoft C: sorry, Watcom does the same thing */
# define COMPILED_BY "IBM C/2 1.00"
# define COMPILED_BY "Microsoft C 5.10"
# define COMPILED_BY "Borland C 2.00"
# define COMPILED_BY (__TURBOC__ >= 661 ? "Turbo C++ 1.00" : "Turbo C 2.00")
# define COMPILED_BY "Mark Williams C"
# define COMPILED_BY "GNU-C " __VERSION__
# define COMPILED_BY "Microware C V2.3 Edition 40"
/* DEC Rainbow, running MS-DOS (handled by earlier MS-DOS tests) */
/* (would need -DRAINBOW in CFLAGS to compile a Rainbow-compatible .EXE) */
# define COMPILED_BY "VAX/VMS VAXC compiler"
/*************************** end of autoconf section ************************/
/* All undefined symbols are defined to zero here, to allow for older */
/* compilers which dont understand #if defined() or #if UNDEFINED_SYMBOL */
/*************************** operating systems *****************************/
# define BSD 0 /* UNIX - Berkeley 4.x */
# define UNIXV 0 /* UNIX - AT&T SYSV */
# define UNIX7 0 /* UNIX - version 7 */
# define MSDOS 0 /* PC */
# define TOS 0 /* Atari ST */
# define AMIGA 0 /* Commodore Amiga */
# define OSK 0 /* OS-9 / 68k */
# define COHERENT 0 /* Coherent */
#ifndef RAINBOW /* DEC Rainbow support, under MS-DOS */
# define VMS 0 /* VAX/VMS */
/* Minix has no predefines */
#if !BSD && !UNIXV && !UNIX7 && !MSDOS && !TOS && !AMIGA && !OSK && !COHERENT && !VMS
/* generic combination of Unices */
#if UNIXV || UNIX7 || BSD || MINIX || COHERENT
/*************************** compilers **************************************/
/* Should we use "new style" ANSI C prototypes? */
/******************************* Credit ************************************/
# define CREDIT "Ported to MS-DOS by Guntram Blohm & Martin Patzel"
# define CREDIT2 "Rainbow support added by Willett Kempton"
# define CREDIT "Ported to AmigaDOS 2.04 by Mike Rieser & Dale Rahn"
# define CREDIT "Ported to Atari/TOS by Guntram Blohm & Martin Patzel"
# define CREDIT "Ported to Microware OS9/68k by Peter Reinig"
# define CREDIT "Ported to Coherent by Esa Ahola"
# define CREDIT "Ported to VAX/VMS by John Campbell"
/*************************** functions depending on OS *********************/
/* There are two terminal-related functions that we need: ttyread() and
* ttywrite(). The ttyread() function implements read-with-timeout and is
* a true function on all systems. The ttywrite() function is almost always
# define ttywrite(buf, len) write(1, buf, (unsigned)(len)) /* raw write */
/* The strchr() function is an official standard now, so everybody has it
* except Unix version 7 (which is old) and BSD Unix (which is academic).
* Those guys use something called index() to do the same thing.
/* BSD uses bcopy() instead of memcpy() */
# define memcpy(dest, src, siz) bcopy(src, dest, siz)
/* BSD uses getwd() instead of getcwd(). The arguments are a little different,
* but we'll ignore that and hope for the best; adding arguments to the macro
* would mess up an "extern" declaration of the function.
* Also, the Coherent-286 uses getwd(), but Coherent-386 uses getcwd()
/* text versa binary mode for read/write */
#define tread(fd,buf,n) read(fd,buf,(unsigned)(n))
#define twrite(fd,buf,n) write(fd,buf,(unsigned)(n))
/**************************** Compiler quirks *********************************/
/* the UNIX version 7 and (some) TOS compilers, don't allow "void" */
/* as far as I know, all compilers except version 7 support unsigned char */
/* NEWFLASH: the Minix-ST compiler has subtle problems with unsigned char */
# define UCHAR(c) ((c) & 0xff)
# define UCHAR(c) ((unsigned char)(c))
# define uchar unsigned char
/* Some compilers prefer to have malloc declared as returning a (void *) */
/* ANSI, on the other hand, needs the arguments to free() to be cast */
# if BSD || AMIGA || MINIX
# define _free_(ptr) free((void *)ptr)
# define _free_(ptr) free((char *)ptr)
# define _free_(ptr) free((void *)ptr)
/* everybody but Amiga wants lseek declared here */
/* ANSI C has getenv() declared in stdlib.h, which we've already included.
* Other compilers will need it declared here, though.
/* Signal handler functions used to return an int value, which was ignored.
* On newer systems, signal handlers are void functions. Here, we try to
* guess the proper return type for this system.
# define SIGTYPE void /* Note: This is wrong for SCO Xenix. */
/******************* Names of files and environment vars **********************/
# define TMPDIR "/usr/tmp" /* Keep elvis' temp files off RAM disk! */
# define TMPDIR "/var/tmp" /* directory where temp files live */
# define PRSVDIR "/var/preserve" /* directory where preserved file live */
# define PRSVINDEX "/var/preserve/Index" /* index of files in PRSVDIR */
# define EXRC ".exrc" /* init file in current directory */
# define SCRATCHOUT "%s/soXXXXXX" /* temp file used as input to filter */
# define SHELL "/bin/sh" /* default shell */
# define REDIRECT ">" /* Coherent CC writes errors to stdout */
# define gethome(x) getenv("HOME")
#if AMIGA /* Specify AMIGA environment */
# define CC_COMMAND "cc" /* generic C compiler */
# define COLON ':' /* Amiga files can also end in `:' */
# define SYSEXRC "S:" EXRC /* name of ".exrc" file in system dir */
# define MAXRCLEN 2048 /* max size of a .exrc file */
# define NBUFS 10 /* must be at least 3 -- more is better */
# define NEEDSYNC TRUE /* assume ":se sync" by default */
# define PRSVDIR "Elvis:" /* directory where preserved file live */
# define PRSVINDEX "Elvis:Index" /* index of files in PRSVDIR */
# define REDIRECT ">" /* Amiga writes errors to stdout */
# define SCRATCHIN "%sSIXXXXXX"
# define SCRATCHOUT "%sSOXXXXXX"
# define SHELL "newshell" /* default shell */
# define TERMTYPE "amiga" /* default termtype */
# ifndef TMPDIR /* for AMIGA should end in `:' or `/' */
# define TMPDIR "T:" /* directory where temp files live */
# define TMPNAME "%selv_%x.%x" /* format of names for temp files */
# define gethome(x) getenv("HOME")
/* do not change TMPNAME and SCRATCH*: they MUST begin with '%s\\'! */
# define TMPDIR "C:\\tmp" /* directory where temp files live */
# define PRSVDIR "C:\\preserve" /* directory where preserved file live */
# define PRSVINDEX "C:\\preserve\\Index" /* index of files in PRSVDIR */
# define TMPNAME "%s\\elv_%x.%x" /* temp file */
# define CC_COMMAND "cl -c" /* C compiler */
# if __BORLANDC__ /* Borland C */
# define CC_COMMAND "bcc" /* C compiler */
# if TURBOC /* Turbo C */
# define CC_COMMAND "tcc" /* C compiler */
# define SCRATCHIN "%s\\siXXXXXX" /* DOS ONLY - output of filter program */
# define SCRATCHOUT "%s\\soXXXXXX" /* temp file used as input to filter */
# define SHELL "shell.ttp" /* default shell */
# define SHELL "command.com" /* default shell */
# define NEEDSYNC TRUE /* assume ":se sync" by default */
# if TOS && __GNUC__ /* probably on other systems, too */
# define REDIRECT "2>" /* GNUC reports on 2, others on 1 */
# define CC_COMMAND "gcc -c"
# define REDIRECT ">" /* shell's redirection of stderr */
/* do not change TMPNAME, and SCRATCH*: they MUST begin with '%s\\'! */
# define TMPDIR "sys$scratch:" /* directory where temp files live */
# define TMPNAME "%selv_%x.%x;1" /* temp file */
# define SCRATCHIN "%ssiXXXXXX" /* DOS ONLY - output of filter program */
# define SCRATCHOUT "%ssoXXXXXX" /* temp file used as input to filter */
# define SLASH '\:' /* Worry point... jdc */
# define SHELL "" /* default shell */
# define REDIRECT ">" /* shell's redirection of stderr */
# define tread(fd,buf,n) vms_read(fd,buf,(unsigned)(n))
# define unlink vms_delete
# define delete __delete /* local routine conflicts w/VMS rtl routine. */
# define rpclose vms_rpclose
# define ttyread vms_ttyread
# define gethome(x) getenv("HOME")
/* There is no sync() on vms */
/* jdc -- seems VMS external symbols are case insensitive */
# define m_fWord m_fw_ord
# define m_bWord m_bw_ord
# define m_eWord m_ew_ord
# define m_Nsrch m_n_srch
# define v_Xchar v_x_char
/* jdc -- also, braindead vms curses always found by linker. */
# define LINES elvis_LINES
# define curscr elvis_curscr
# define stdscr elvis_stdscr
# define initscr elvis_initscr
# define endwin elvis_endwin
# define wrefresh elvis_wrefresh
# define TMPDIR "/dd/tmp" /* directory where temp files live */
# define PRSVDIR "/dd/usr/preserve" /* directory where preserved file live */
# define PRSVINDEX "/dd/usr/preserve/Index" /* index of files in PRSVDIR */
# define CC_COMMAND "cc -r" /* name of the compiler */
# define EXRC ".exrc" /* init file in current directory */
# define SCRATCHOUT "%s/soXXXXXX" /* temp file used as input to filter */
# define SHELL "shell" /* default shell */
# define FILEPERMS (S_IREAD|S_IWRITE) /* file permissions used for creat() */
# define REDIRECT ">>-" /* shell's redirection of stderr */
# define sync() /* OS9 doesn't need a sync() */
# define gethome(x) getenv("HOME")
# define TAGS "tags" /* name of the tags file */
# define TMPNAME "%s/elv_%x.%x" /* format of names for temp files */
# define EXINIT "EXINIT" /* name of EXINIT environment variable */
# define EXRC "elvis.rc" /* name of ".exrc" file in current dir */
# define HMEXRC EXRC /* name of ".exrc" file in home dir */
# define KEYWORDPRG "ref"
# define SCRATCHIN "%s/SIXXXXXX"
# define SCRATCHOUT "%s/SOXXXXXX"
# define PRESERVE "/usr/libexec/elvispreserve" /* name of the "preserve" program */
# define CC_COMMAND "cc -c"
# define MAKE_COMMAND "make"
#endif /* ndef _CONFIG_H */