1 /* SCCS Id: @(#)config1.h 3.4 1999/12/05 */
2 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
3 /* NetHack may be freely redistributed. See license for details. */
11 * Microsoft C auto-defines MSDOS,
12 * Borland C auto-defines __MSDOS__,
13 * DJGPP auto-defines MSDOS.
16 /* #define MSDOS */ /* use if not defined by compiler or cases below */
18 #ifdef __MSDOS__ /* for Borland C */
25 # define __MSC /* increase Borland C compatibility in libraries */
35 #ifdef macintosh /* Auto-defined symbol for MPW compilers (sc and mrc) */
39 #ifdef THINK_C /* Think C auto-defined symbol */
44 #ifdef __MWERKS__ /* defined by Metrowerks' Codewarrior compiler */
45 # ifndef __BEOS__ /* BeOS */
52 #if defined(MAC) || defined(__BEOS__)
65 #ifdef AZTEC_C /* Manx auto-defines this */
66 # ifdef MCH_AMIGA /* Manx auto-defines this for AMIGA */
68 #define AMIGA /* define for Commodore-Amiga */
69 # endif /* (SAS/C auto-defines AMIGA) */
70 #define AZTEC_50 /* define for version 5.0 of manx */
74 # define NEARDATA __near /* put some data close */
77 # define NEARDATA __near /* put some data close */
86 # define HACKDIR "NetHack:"
87 # define NO_MACRO_CPATH
91 * Atari auto-detection
109 * Windows NT Autodetection
123 # define NEED_VARARGS
133 #if defined(__linux__) && defined(__GNUC__) && !defined(_GNU_SOURCE)
134 /* ensure _GNU_SOURCE is defined before including any system headers */
138 #ifdef VMS /* really old compilers need special handling, detected here */
141 # ifndef __DECC_VER /* buggy early versions want widened prototypes */
142 # define NOTSTDC /* except when typedefs are involved */
148 # define _DECC_V4_SOURCE /* avoid some incompatible V5.x changes */
150 # undef __HIDE_FORBIDDEN_NAMES /* need non-ANSI library support functions */
152 # ifdef VAXC /* must use CC/DEFINE=ANCIENT_VAXC for vaxc v2.2 or older */
153 # ifdef ANCIENT_VAXC /* vaxc v2.2 and earlier [lots of warnings to come] */
154 # define KR1ED /* simulate defined() */
156 # else /* vaxc v2.3,2.4,or 3.x, or decc in vaxc mode */
157 # if defined(USE_PROTOTYPES) /* this breaks 2.2 (*forces* use of ANCIENT)*/
158 # define __STDC__ 0 /* vaxc is not yet ANSI compliant, but close enough */
159 # define signed /* well, almost close enough */
161 # define UNWIDENED_PROTOTYPES
167 # ifdef VERYOLD_VMS /* v4.5 or earlier; no longer available for testing */
168 # define USE_OLDARGS /* <varargs.h> is there, vprintf & vsprintf aren't */
179 /* just in case someone thinks a DECstation is a vax. It's not, it's a mips */
188 #ifdef KR1ED /* For compilers which cannot handle defined() */
189 #define defined(x) (-x-1 != -1)
191 * #define FOO => FOO={} => defined( ) => (-1 != - - 1) => 1
192 * #define FOO 1 or on command-line -DFOO
193 * => defined(1) => (-1 != - 1 - 1) => 1
194 * if FOO isn't defined, FOO=0. But some compilers default to 0 instead of 1
195 * for -DFOO, oh well.
196 * => defined(0) => (-1 != - 0 - 1) => 0
199 * defined("") => (-1 != - "" - 1)
200 * [which is an unavoidable catastrophe.]
204 #endif /* CONFIG1_H */