Source:SLASH'EM 0.0.7E7F2/config1.h

From NetHackWiki
Jump to navigation Jump to search

Below is the full text to config1.h from the source code of SLASH'EM 0.0.7E7F2. To link to a particular line, write [[SLASH'EM 0.0.7E7F2/config1.h#line123]], for example.

The latest source code for vanilla NetHack is at Source code.


The NetHack General Public License applies to screenshots, source code and other content from NetHack.

This content was modified from the original NetHack source code distribution (by splitting up NetHack content between wiki pages, and possibly further editing). See the page history for a list of who changed it, and on what dates.

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. */
4.    
5.    #ifndef CONFIG1_H
6.    #define CONFIG1_H
7.    
8.    /*
9.     * MS DOS - compilers
10.    *
11.    * Microsoft C auto-defines MSDOS,
12.    * Borland C   auto-defines __MSDOS__,
13.    * DJGPP       auto-defines MSDOS.
14.    */
15.   
16.   /* #define MSDOS */	/* use if not defined by compiler or cases below */
17.   
18.   #ifdef __MSDOS__	/* for Borland C */
19.   # ifndef MSDOS
20.   # define MSDOS
21.   # endif
22.   #endif
23.   
24.   #ifdef __TURBOC__
25.   # define __MSC		/* increase Borland C compatibility in libraries */
26.   #endif
27.   
28.   #ifdef MSDOS
29.   # undef UNIX
30.   #endif
31.   
32.   /*
33.    * Mac Stuff.
34.    */
35.   #if defined(__SC__) || defined(__MRC__) /* MPW compilers, but not Metrowerks */
36.   # define MAC
37.   # define MAC_MPW
38.   #endif
39.   
40.   #ifdef THINK_C		/* Think C auto-defined symbol */
41.   # define MAC
42.   # define NEED_VARARGS
43.   #endif
44.   
45.   #ifdef __MWERKS__	/* defined by Metrowerks' Codewarrior compiler */
46.   # ifndef __BEOS__	/* BeOS */
47.   #  define MAC
48.   # endif
49.   # define NEED_VARARGS
50.   # define USE_STDARG
51.   #endif
52.   
53.   #if defined(MAC) || defined(__BEOS__)
54.   # define DLB
55.   # undef UNIX
56.   #endif
57.   
58.   #ifdef __BEOS__
59.   # define NEED_VARARGS
60.   #endif
61.   
62.   #ifdef __APPLE__        /* defined by GCC on Mac OS X */
63.   # define OSX
64.   #endif
65.   
66.   /*
67.    * Amiga setup.
68.    */
69.   #ifdef AZTEC_C	/* Manx auto-defines this */
70.   # ifdef MCH_AMIGA	/* Manx auto-defines this for AMIGA */
71.   #  ifndef AMIGA
72.   #define AMIGA		/* define for Commodore-Amiga */
73.   #  endif		/* (SAS/C auto-defines AMIGA) */
74.   #define AZTEC_50	/* define for version 5.0 of manx */
75.   # endif
76.   #endif
77.   #ifdef __SASC_60
78.   # define NEARDATA __near /* put some data close */
79.   #else
80.   # ifdef _DCC
81.   # define NEARDATA __near /* put some data close */
82.   # else
83.   # define NEARDATA
84.   # endif
85.   #endif
86.   #ifdef AMIGA
87.   # define NEED_VARARGS
88.   # undef UNIX
89.   # define DLB
90.   # define HACKDIR "NetHack:"
91.   # define NO_MACRO_CPATH
92.   #endif
93.   
94.   /*
95.    * Atari auto-detection
96.    */
97.   
98.   #ifdef atarist
99.   # undef UNIX
100.  # ifndef TOS
101.  # define TOS
102.  # endif
103.  #else
104.  # ifdef __MINT__
105.  #  undef UNIX
106.  #  ifndef TOS
107.  #  define TOS
108.  #  endif
109.  # endif
110.  #endif
111.  
112.  /*
113.   * Windows NT Autodetection
114.   *
115.   */
116.  #ifdef _WIN32_WCE
117.  #define WIN_CE
118.  # ifndef WIN32
119.  # define WIN32
120.  # endif
121.  #endif
122.  
123.  #if defined(__CYGWIN__) && !defined(UNIX)
124.  # define WIN32
125.  #endif
126.  #ifdef WIN32
127.  # undef UNIX
128.  # undef MSDOS
129.  # define NHSTDC
130.  # define USE_STDARG
131.  # define NEED_VARARGS
132.  
133.  #ifndef WIN_CE
134.  # define STRNCMPI
135.  # define STRCMPI
136.  #endif
137.  
138.  #endif
139.  
140.  
141.  #if defined(__linux__) && defined(__GNUC__) && !defined(_GNU_SOURCE)
142.  /* ensure _GNU_SOURCE is defined before including any system headers */
143.  # define _GNU_SOURCE
144.  #endif
145.  
146.  #ifdef VMS	/* really old compilers need special handling, detected here */
147.  # undef UNIX
148.  # ifdef __DECC
149.  #  ifndef __DECC_VER	/* buggy early versions want widened prototypes */
150.  #   define NOTSTDC	/* except when typedefs are involved		*/
151.  #   define USE_VARARGS
152.  #  else
153.  #   define NHSTDC
154.  #   define USE_STDARG
155.  #   define POSIX_TYPES
156.  #   define _DECC_V4_SOURCE	/* avoid some incompatible V5.x changes */
157.  #  endif
158.  #  undef __HIDE_FORBIDDEN_NAMES /* need non-ANSI library support functions */
159.  # else
160.  #  ifdef VAXC	/* must use CC/DEFINE=ANCIENT_VAXC for vaxc v2.2 or older */
161.  #   ifdef ANCIENT_VAXC	/* vaxc v2.2 and earlier [lots of warnings to come] */
162.  #    define KR1ED	/* simulate defined() */
163.  #    define USE_VARARGS
164.  #   else		/* vaxc v2.3,2.4,or 3.x, or decc in vaxc mode */
165.  #     if defined(USE_PROTOTYPES) /* this breaks 2.2 (*forces* use of ANCIENT)*/
166.  #      define __STDC__ 0 /* vaxc is not yet ANSI compliant, but close enough */
167.  #      define signed	/* well, almost close enough */
168.  #include <stddef.h>
169.  #      define UNWIDENED_PROTOTYPES
170.  #     endif
171.  #     define USE_STDARG
172.  #   endif
173.  #  endif /*VAXC*/
174.  # endif /*__DECC*/
175.  # ifdef VERYOLD_VMS	/* v4.5 or earlier; no longer available for testing */
176.  #  define USE_OLDARGS	/* <varargs.h> is there, vprintf & vsprintf aren't */
177.  #  ifdef USE_VARARGS
178.  #   undef USE_VARARGS
179.  #  endif
180.  #  ifdef USE_STDARG
181.  #   undef USE_STDARG
182.  #  endif
183.  # endif
184.  #endif /*VMS*/
185.  
186.  #ifdef vax
187.  /* just in case someone thinks a DECstation is a vax. It's not, it's a mips */
188.  # ifdef ULTRIX_PROTO
189.  #  undef ULTRIX_PROTO
190.  # endif
191.  # ifdef ULTRIX_CC20
192.  #  undef ULTRIX_CC20
193.  # endif
194.  #endif
195.  
196.  #ifdef KR1ED		/* For compilers which cannot handle defined() */
197.  #define defined(x) (-x-1 != -1)
198.  /* Because:
199.   * #define FOO => FOO={} => defined( ) => (-1 != - - 1) => 1
200.   * #define FOO 1 or on command-line -DFOO
201.   *	=> defined(1) => (-1 != - 1 - 1) => 1
202.   * if FOO isn't defined, FOO=0. But some compilers default to 0 instead of 1
203.   * for -DFOO, oh well.
204.   *	=> defined(0) => (-1 != - 0 - 1) => 0
205.   *
206.   * But:
207.   * defined("") => (-1 != - "" - 1)
208.   *   [which is an unavoidable catastrophe.]
209.   */
210.  #endif
211.  
212.  #if defined(__OS2__) || defined(__EMX__)
213.  # ifndef OS2
214.  #  define OS2
215.  # endif
216.  # undef UNIX
217.  #endif
218.  
219.  #endif	/* CONFIG1_H */