Wikia

Wikihack

Source:NetHack 3.1.0/unixconf.h

2,032pages on
this wiki
Talk0

Below is the full text to unixconf.h from the source code of NetHack 3.1.0. To link to a particular line, write [[NetHack 3.1.0/unixconf.h#line123]], for example.

Warning! This is the source code from an old release. For the latest release, see Source code

The NetHack General Public License applies to screenshots, source code and other content from NetHack.
1.    /*	SCCS Id: @(#)unixconf.h	3.1	90/22/02	*/
2.    /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
3.    /* NetHack may be freely redistributed.  See license for details. */
4.    
5.    #ifdef UNIX
6.    #ifndef UNIXCONF_H
7.    #define UNIXCONF_H
8.    
9.    /*
10.    * Some include files are in a different place under SYSV
11.    *	BSD		   SYSV
12.    * <sys/time.h>		<time.h>
13.    * <sgtty.h>		<termio.h>
14.    *
15.    * Some routines are called differently
16.    * index		strchr
17.    * rindex		strrchr
18.    *
19.    */
20.   
21.   /* define exactly one of the following four choices */
22.   #define BSD		/* define for 4.n BSD  */
23.   			/* also for relatives like SunOS and DG/UX */
24.   /* #define ULTRIX	/* define for Ultrix v3.0 or higher (but not lower) */
25.   			/* Use BSD for < v3.0 */
26.   			/* "ULTRIX" not to be confused with "ultrix" */
27.   /* #define SYSV		/* define for System V */
28.   /* #define HPUX		/* Hewlett-Packard's Unix, version 6.5 or higher */
29.   			/* use SYSV for < v6.5 */
30.   
31.   
32.   /* define any of the following that are appropriate */
33.   /* #define SVR4		/* use in addition to SYSV for System V Release 4 */
34.   #define NETWORK	/* if running on a networked system */
35.   			/* e.g. Suns sharing a playground through NFS */
36.   #define SUNOS4	/* SunOS 4.x */
37.   /* #define GENIX	/* Yet Another Unix Clone */
38.   /* #define HISX		/* Bull Unix for XPS Machines */
39.   /* #define BOS		/* Bull Open Software - Unix for DPX/2 Machines */
40.   /* #define UNIXPC	/* use in addition to SYSV for AT&T 7300/3B1 */
41.   /* #define AIX_31	/* In AIX 3.1 (IBM RS/6000) use BSD ioctl's to gain
42.   			   job control (note that AIX is SYSV otherwise) */
43.   /* #define TEXTCOLOR	/* Use System V r3.2 terminfo color support */
44.   			/* or ANSI color support on termcap systems */
45.   			/* or X11 color	*/
46.   /* #define POSIX_JOB_CONTROL	/* use System V POSIX job control */
47.   /* #define POSIX_TYPES	/* use POSIX types for system calls and termios */
48.   
49.   
50.   /* #define OPENWINBUG	/* avoid a problem using OpenWindows 3.0 for X11
51.   			   on SunOS 4.1.x, x>= 2 */
52.   /* #define PYRAMID_BUG	/* avoid a bug on the Pyramid */
53.   /* #define BSD_43_BUG	/* for real 4.3BSD cc's without schain botch fix */
54.   /* #define MICROPORT_BUG /* problems with large arrays in structs */
55.   /* #define MICROPORT_286_BUG /* Changes needed in termcap.c to get it to
56.   			   run with Microport Sys V/AT version 2.4.
57.   			   By Jay Maynard */
58.   /* #define AIXPS_2BUG	/* avoid a problem with little_to_big() optimization */
59.   
60.   /* #define RANDOM	/* if neither random/srandom nor lrand48/srand48
61.   			   is available from your system */
62.   
63.   /* #define SYSV386MUSIC	/* Play real music through speaker on systems with
64.   			   music driver installed */
65.   
66.   
67.   /*
68.    * The next two defines are intended mainly for the Andrew File System,
69.    * which does not allow hard links.  If NO_FILE_LINKS is defined, lock files
70.    * will be created in LOCKDIR using open() instead of in the playground using
71.    * link().
72.    *		Ralf Brown, 7/26/89 (from v2.3 hack of 10/10/88)
73.    */
74.   
75.   /* #define NO_FILE_LINKS	/* if no hard links */
76.   /* #define LOCKDIR "/usr/games/lib/nethackdir"	/* where to put locks */
77.   
78.   
79.   /*
80.    * Define DEF_PAGER as your default pager, e.g. "/bin/cat" or "/usr/ucb/more"
81.    * If defined, it can be overridden by the environment variable PAGER.
82.    * Hack will use its internal pager if DEF_PAGER is not defined.
83.    * (This might be preferable for security reasons.)
84.    * #define DEF_PAGER	".../mydir/mypager"
85.    */
86.   
87.   
88.   
89.   /*
90.    * Define PORT_HELP to be the name of the port-specfic help file.
91.    * This file is found in HACKDIR. 
92.    * Normally, you shouldn't need to change this.
93.    * There is currently no port-specific help for Unix systems.
94.    */
95.   /* #define PORT_HELP "Unixhelp" */
96.   
97.   /*
98.    * If you define MAIL, then the player will be notified of new mail
99.    * when it arrives.  If you also define DEF_MAILREADER then this will
100.   * be the default mail reader, and can be overridden by the environment
101.   * variable MAILREADER; otherwise an internal pager will be used.
102.   * A stat system call is done on the mailbox every MAILCKFREQ moves.
103.   */
104.  
105.  #define MAIL			/* Deliver mail during the game */
106.  
107.  /* The Andrew Message System does mail a little differently from normal
108.   * UNIX.  Mail is deposited in the user's own directory in ~/Mailbox
109.   * (another directory).  MAILBOX is the element that will be added on to
110.   * the user's home directory path to generate the Mailbox path - just in
111.   * case other Andrew sites do it differently from CMU.
112.   *
113.   *		dan lovinger
114.   *		dl2n+@andrew.cmu.edu (dec 19 1989)
115.   */
116.  
117.  /* #define AMS			/* use Andrew message system for mail */
118.  
119.  /* NO_MAILREADER is for kerberos authentcating filesystems where it is
120.   * essentially impossible to securely exec child processes, like mail
121.   * readers, when the game is running under a special token.
122.   *
123.   *             dan
124.   */
125.  
126.  /* #define NO_MAILREADER	/* have mail daemon just tell player of mail */
127.  
128.  #ifdef	MAIL
129.  # if defined(BSD) || defined(ULTRIX)
130.  #  ifdef AMS
131.  #define AMS_MAILBOX	"/Mailbox"
132.  #  else
133.  #define DEF_MAILREADER	"/usr/ucb/Mail"
134.  #  endif
135.  #else
136.  # if defined(SYSV) || defined(DGUX) || defined(HPUX)
137.  #  ifdef M_XENIX
138.  #define DEF_MAILREADER	"/usr/bin/mail"
139.  #  else
140.  #define DEF_MAILREADER	"/usr/bin/mailx"
141.  #  endif
142.  # else
143.  #define DEF_MAILREADER	"/bin/mail"
144.  # endif
145.  #endif
146.  
147.  #define MAILCKFREQ	50
148.  #endif	/* MAIL */
149.  
150.  
151.  
152.  #ifdef COMPRESS
153.  /* Some implementations of compress need a 'quiet' option.
154.   * If you've got one of these versions, put -q here.
155.   * You can also include any other strange options your compress needs.
156.   * If you have a normal compress, just leave it commented out.
157.   */
158.  /* #define COMPRESS_OPTIONS	"-q"	/* */
159.  #endif
160.  
161.  #define FCMASK	0660	/* file creation mask */
162.  
163.  
164.  /*
165.   * The remainder of the file should not need to be changed.
166.   */
167.  
168.  #ifdef _AUX_SOURCE
169.  # ifdef AUX /* gcc ? */
170.  #  define _SYSV_SOURCE
171.  #  define _BSD_SOURCE
172.  #else
173.  #  define AUX
174.  # endif
175.  #endif /* _AUX_SOURCE */
176.  
177.  /*
178.   * BSD/ULTRIX systems are normally the only ones that can suspend processes.
179.   * Suspending NetHack processes cleanly should be easy to add to other systems
180.   * that have SIGTSTP in the Berkeley sense.  Currently the only such systems
181.   * known to work are HPUX and AIX 3.1; other systems will probably require
182.   * tweaks to unixtty.c and ioctl.c.
183.   *
184.   * POSIX defines a slightly different type of job control, which should be
185.   * equivalent for NetHack's purposes.  POSIX_JOB_CONTROL should work on
186.   * various recent SYSV versions (with possibly tweaks to unixtty.c again).
187.   */
188.  #ifndef POSIX_JOB_CONTROL
189.  # if defined(BSD) || defined(ULTRIX) || defined(HPUX) || defined(AIX_31)
190.  #  define BSD_JOB_CONTROL
191.  # else
192.  #  if defined(SVR4)
193.  #   define POSIX_JOB_CONTROL
194.  #  endif
195.  # endif
196.  #endif
197.  #if defined(BSD_JOB_CONTROL) || defined(POSIX_JOB_CONTROL) || defined(AUX)
198.  #define SUSPEND		/* let ^Z suspend the game */
199.  #endif
200.  
201.  
202.  #if defined(BSD) || defined(ULTRIX)
203.  #include	<sys/time.h>
204.  #else
205.  #include	<time.h>
206.  #endif
207.  
208.  #define HLOCK	"perm"	/* an empty file used for locking purposes */
209.  
210.  #ifndef REDO
211.  #define Getchar nhgetch
212.  #endif
213.  #define tgetch getchar
214.  
215.  #define SHELL		/* do not delete the '!' command */
216.  
217.  #include "system.h"
218.  
219.  #if defined(BSD) || defined(ULTRIX)
220.  # if !defined(DGUX) && !defined(SUNOS4)
221.  #define memcpy(d, s, n)		bcopy(s, d, n)
222.  #define memcmp(s1, s2, n)	bcmp(s2, s1, n)
223.  # endif
224.  #else	/* therefore SYSV */
225.  #define index	strchr
226.  #define rindex	strrchr
227.  #endif
228.  
229.  /* A safety check for BOS and AUX */
230.  #if (defined(BOS) || defined(AUX)) && defined(NHSTDC)
231.  # if defined(VISION_TABLES) && defined(BRACES)
232.  #  undef BRACES
233.  # endif
234.  #endif
235.  
236.  /* Use the high quality random number routines. */
237.  #if defined(BSD) || defined(ULTRIX) || defined(RANDOM)
238.  #define Rand()	random()
239.  #else
240.  #define Rand()	lrand48()
241.  #endif
242.  
243.  #ifdef hc	/* older versions of the MetaWare High-C compiler define this */
244.  # ifdef __HC__
245.  #  undef __HC__
246.  # endif
247.  # define __HC__ hc
248.  # undef hc
249.  #endif
250.  
251.  #endif /* UNIXCONF_H */
252.  #endif /* UNIX */

Around Wikia's network

Random Wiki