3 #ifndef INCLUDED_H_CONFIG_H
4 #define INCLUDED_H_CONFIG_H
7 * Choose the hardware, operating system, and compiler.
8 * Also, choose various "system level" compilation options.
9 * A lot of these definitions take effect in "h-system.h"
11 * Note that you may find it simpler to define some of these
12 * options in the "Makefile", especially any options describing
13 * what "system" is being used.
18 * no system definitions are needed for 4.3BSD, SUN OS, DG/UX
22 * OPTION: Compile on a Macintosh (see "A-mac-h" or "A-mac-pch")
23 * Automatic for Mac MPW compilation
26 /* #define MACINTOSH */
30 * OPTION: Compile on Windows (automatic)
37 * Extract the "MAC_MPW" flag from the compiler
39 #if defined(__SC__) || defined(__MRC__)
52 * OPTION: Compile on an IBM (automatic)
59 /* Use the new SVGA code */
68 * OPTION: Compile on a SYS III version of UNIX
75 * OPTION: Compile on a SYS V version of UNIX (not Solaris)
82 * OPTION: Compile on a HPUX version of UNIX
89 * OPTION: Compile on an SGI running IRIX
96 * OPTION: Compile on a SunOS machine
103 * OPTION: Compile on a Solaris machine
106 /* #define SOLARIS */
110 * OPTION: Compile on an ultrix/4.2BSD/Dynix/etc. version of UNIX,
111 * Do not define this if you are on any kind of SunOS.
120 * Extract the "SUNOS" flag from the compiler
129 * Extract the "ULTRIX" flag from the compiler
131 #if defined(ultrix) || defined(Pyramid)
138 * Extract the "ATARI" flag from the compiler [cjh]
140 #if defined(__atarist) || defined(__atarist__)
147 * Extract the "ACORN" flag from the compiler
156 * Extract the "SGI" flag from the compiler
165 * Extract the "MSDOS" flag from the compiler
174 * Extract the "WINDOWS" flag from the compiler
176 #if defined(_Windows) || defined(__WINDOWS__) || \
177 defined(__WIN32__) || defined(WIN32) || \
178 defined(__WINNT__) || defined(__NT__)
187 * OPTION: Define "L64" if a "long" is 64-bits. See "h-types.h".
188 * The only such platform that angband is ported to is currently
189 * DEC Alpha AXP running OSF/1 (OpenVMS uses 32-bit longs).
191 #if defined(__alpha) && defined(__osf__)
198 * OPTION: set "SET_UID" if the machine is a "multi-user" machine.
199 * This option is used to verify the use of "uids" and "gids" for
200 * various "Unix" calls, and of "pids" for getting a random seed,
201 * and of the "umask()" call for various reasons, and to guess if
202 * the "kill()" function is available, and for permission to use
203 * functions to extract user names and expand "tildes" in filenames.
204 * It is also used for "locking" and "unlocking" the score file.
205 * Basically, SET_UID should *only* be set for "Unix" machines,
206 * or for the "Atari" platform which is Unix-like, apparently
208 #if !defined(MACINTOSH) && !defined(WINDOWS) && \
209 !defined(MSDOS) && !defined(USE_EMX) && \
210 !defined(AMIGA) && !defined(ACORN) && !defined(VM)
216 * OPTION: Set "USG" for "System V" versions of Unix
217 * This is used to choose a "lock()" function, and to choose
218 * which header files ("string.h" vs "strings.h") to include.
219 * It is also used to allow certain other options, such as options
220 * involving userid's, or multiple users on a single machine, etc.
223 # if defined(SYS_III) || defined(SYS_V) || defined(SOLARIS) || \
224 defined(HPUX) || defined(SGI) || defined(ATARI)
233 * Every system seems to use its own symbol as a path separator.
234 * Default to the standard Unix slash, but attempt to change this
235 * for various other systems. Note that any system that uses the
236 * "period" as a separator (i.e. ACORN) will have to pretend that
237 * it uses the slash, and do its own mapping of period <-> slash.
238 * Note that the VM system uses a "flat" directory, and thus uses
239 * the empty string for "PATH_SEP".
245 # define PATH_SEP ":"
247 #if defined(WINDOWS) || defined(WINNT)
249 # define PATH_SEP "\\"
251 #if defined(MSDOS) || defined(OS2) || defined(USE_EMX)
253 # define PATH_SEP "\\"
257 # define PATH_SEP "/"
261 # define PATH_SEP "/"
270 * The Macintosh allows the use of a "file type" when creating a file
272 #if defined(MACINTOSH)
273 # define FILE_TYPE_TEXT 'TEXT'
274 # define FILE_TYPE_DATA 'DATA'
275 # define FILE_TYPE_SAVE 'SAVE'
276 # define FILE_TYPE(X) (_ftype = (X))
278 # define FILE_TYPE(X) ((void)0)
283 * OPTION: Hack -- Make sure "strchr()" and "strrchr()" will work
285 #if defined(SYS_III) || defined(SYS_V) || defined(MSDOS)
286 # if !defined(__TURBOC__) && !defined(__WATCOMC__) && !defined(__DJGPP__)
287 # define strchr index
288 # define strrchr rindex
294 * OPTION: Define "HAS_STRICMP" only if "stricmp()" exists.
295 * Note that "stricmp()" is not actually used by Angband.
297 /* #define HAS_STRICMP */
300 * Linux has "stricmp()" with a different name
304 # define stricmp strcasecmp
309 * OPTION: Define "HAVE_USLEEP" only if "usleep()" exists.
311 * Note that this is only relevant for "SET_UID" machines.
312 * Note that new "SOLARIS" and "SGI" machines have "usleep()".
314 #if defined(SET_UID) && !defined(HAVE_CONFIG_H)
315 # if !defined(HPUX) && !defined(ULTRIX) && !defined(ISC)
322 # define HAVE_USLEEP /* Set for gcc (djgpp-v2), TY */
328 # define iskanji(x) ((((int)(x) & 0xff) >= 0xa1 && ((int)(x) & 0xff) <= 0xfe) || ((int)(x) & 0xff) == 0x8e)
329 # define iskana(x) (0)
331 # define iskanji(x) ((0x81<=((int)(x) & 0xff) && ((int)(x) & 0xff)<=0x9f)|| (0xe0<=((int)(x) & 0xff) && ((int)(x) & 0xff)<=0xfc))
332 # define iskana(x) ((((int)(x) & 0xff) >= 0xA0) && (((int)(x) & 0xff)<= 0xDF))
333 # elif defined(MSDOS)
336 # error Oops! Please define "EUC" or "SJIS" for kanji-code of your system.
340 #endif /* INCLUDED_H_CONFIG_H */