config.h.SH revision 1.2 1 1.1 kamil case $CONFIG in
2 1.1 kamil '')
3 1.1 kamil if test ! -f config.sh; then
4 1.1 kamil ln ../config.sh . || \
5 1.1 kamil ln ../../config.sh . || \
6 1.1 kamil ln ../../../config.sh . || \
7 1.1 kamil (echo "Can't find config.sh."; exit 1)
8 1.1 kamil echo "Using config.sh from above..."
9 1.1 kamil fi
10 1.1 kamil . config.sh
11 1.1 kamil ;;
12 1.1 kamil esac
13 1.1 kamil echo "Extracting config.h (with variable substitutions)"
14 1.1 kamil cat <<!GROK!THIS! >config.h
15 1.1 kamil /* config.h
16 1.1 kamil * This file was produced by running the config.h.SH script, which
17 1.1 kamil * gets its values from config.sh, which is generally produced by
18 1.1 kamil * running Configure.
19 1.1 kamil *
20 1.1 kamil * Feel free to modify any of this as the need arises. Note, however,
21 1.1 kamil * that running config.h.SH again will wipe out any changes you've made.
22 1.1 kamil * For a more permanent change edit config.sh and rerun config.h.SH.
23 1.1 kamil */
24 1.1 kamil
25 1.1 kamil
26 1.1 kamil /* EUNICE:
27 1.1 kamil * This symbol, if defined, indicates that the program is being compiled
28 1.1 kamil * under the EUNICE package under VMS. The program will need to handle
29 1.1 kamil * things like files that don't go away the first time you unlink them,
30 1.1 kamil * due to version numbering. It will also need to compensate for lack
31 1.1 kamil * of a respectable link() command.
32 1.1 kamil */
33 1.1 kamil /* VMX:
34 1.1 kamil * This symbol, if defined, indicates that the program is running under
35 1.1 kamil * VMS. It is currently only set in conjunction with the EUNICE symbol.
36 1.1 kamil */
37 1.1 kamil #$d_eunice EUNICE /**/
38 1.1 kamil #$d_eunice VMS /**/
39 1.1 kamil
40 1.1 kamil /* CHARSPRINTF:
41 1.2 christos * This symbol is defined if this system declares "char *snprintf()" in
42 1.2 christos * stdio.h. The trend seems to be to declare it as "int snprintf()". It
43 1.2 christos * is up to the package author to declare snprintf correctly based on the
44 1.1 kamil * symbol.
45 1.1 kamil */
46 1.1 kamil #$d_charsprf CHARSPRINTF /**/
47 1.1 kamil
48 1.1 kamil /* FCNTL:
49 1.1 kamil * This symbol, if defined, indicates to the C program that it should
50 1.1 kamil * include fcntl.h.
51 1.1 kamil */
52 1.1 kamil #$d_fcntl FCNTL /**/
53 1.1 kamil
54 1.1 kamil /* FTIMER:
55 1.1 kamil * This symbol, if defined, indicates that the ftime() routine exists.
56 1.1 kamil */
57 1.1 kamil #$d_ftime FTIMER /**/
58 1.1 kamil
59 1.1 kamil /* GETHOSTNAME:
60 1.1 kamil * This symbol, if defined, indicates that the C program may use the
61 1.1 kamil * gethostname() routine to derive the host name. See also DOUNAME
62 1.1 kamil * and PHOSTNAME.
63 1.1 kamil */
64 1.1 kamil /* DOUNAME:
65 1.1 kamil * This symbol, if defined, indicates that the C program may use the
66 1.1 kamil * uname() routine to derive the host name. See also GETHOSTNAME and
67 1.1 kamil * PHOSTNAME.
68 1.1 kamil */
69 1.1 kamil /* PHOSTNAME:
70 1.1 kamil * This symbol, if defined, indicates that the C program may use the
71 1.1 kamil * contents of PHOSTNAME as a command to feed to the popen() routine
72 1.1 kamil * to derive the host name. See also GETHOSTNAME and DOUNAME.
73 1.1 kamil */
74 1.1 kamil #$d_gethname GETHOSTNAME /**/
75 1.1 kamil #$d_douname DOUNAME /**/
76 1.1 kamil #$d_phostname PHOSTNAME "$phostname" /**/
77 1.1 kamil
78 1.1 kamil /* GETPWENT:
79 1.1 kamil * This symbol, if defined, indicates that the getpwent() routine
80 1.1 kamil * should be used instead of the getpw() routine.
81 1.1 kamil */
82 1.1 kamil #$d_getpwent GETPWENT /**/
83 1.1 kamil
84 1.1 kamil /* HAVETERMLIB:
85 1.1 kamil * This symbol, when defined, indicates that termlib-style routines
86 1.1 kamil * are available. There is nothing to include.
87 1.1 kamil */
88 1.1 kamil #$d_havetlib HAVETERMLIB /**/
89 1.1 kamil
90 1.1 kamil /* index:
91 1.1 kamil * This preprocessor symbol is defined, along with rindex, if the system
92 1.1 kamil * uses the strchr and strrchr routines instead.
93 1.1 kamil */
94 1.1 kamil /* rindex:
95 1.1 kamil * This preprocessor symbol is defined, along with index, if the system
96 1.1 kamil * uses the strchr and strrchr routines instead.
97 1.1 kamil */
98 1.1 kamil #$d_index index strchr /* cultural */
99 1.1 kamil #$d_index rindex strrchr /* differences? */
100 1.1 kamil
101 1.1 kamil /* IOCTL:
102 1.1 kamil * This symbol, if defined, indicates that sys/ioctl.h exists and should
103 1.1 kamil * be included.
104 1.1 kamil */
105 1.1 kamil #$d_ioctl IOCTL /**/
106 1.1 kamil
107 1.1 kamil /* NORMSIG:
108 1.1 kamil * This symbol, if defined, indicates that normal signal handling routines
109 1.1 kamil * should be used, as opposed to the ones in 4.1bsd (sigset, etc.).
110 1.1 kamil */
111 1.1 kamil #$d_normsig NORMSIG /**/
112 1.1 kamil
113 1.1 kamil /* PORTABLE:
114 1.1 kamil * This symbol, if defined, indicates to the C program that it should
115 1.1 kamil * not assume that it is running on the machine it was compiled on.
116 1.1 kamil * The program should be prepared to look up the host name, translate
117 1.1 kamil * generic filenames, use PATH, etc.
118 1.1 kamil */
119 1.1 kamil #$d_portable PORTABLE /**/
120 1.1 kamil
121 1.1 kamil /* RDCHK:
122 1.1 kamil * This symbol, if defined, indicates that the rdchk routine is available
123 1.1 kamil * to find out if there is input pending on an IO channel. Generally
124 1.1 kamil * the routine is used only if FIONREAD and O_NDELAY aren't available.
125 1.1 kamil */
126 1.1 kamil #$d_rdchk RDCHK /**/
127 1.1 kamil
128 1.1 kamil /* SCOREFULL:
129 1.1 kamil * This symbol, if defined, indicates that any scoreboard kept by the
130 1.1 kamil * program should be kept on the basis of the user's full name as opposed
131 1.1 kamil * to the user's login name. If the user can change his full name he
132 1.1 kamil * can enter multiple scores if this is defined.
133 1.1 kamil */
134 1.1 kamil #$d_scorfl SCOREFULL /**/
135 1.1 kamil
136 1.1 kamil /* SIGNEDCHAR:
137 1.1 kamil * This symbol, if defined, indicates that characters are a signed type.
138 1.1 kamil * If not defined, things declared as signed characters (and that make
139 1.1 kamil * use of negative values) should probably be declared as shorts instead.
140 1.1 kamil */
141 1.1 kamil #$d_sgndchr SIGNEDCHAR /**/
142 1.1 kamil
143 1.1 kamil /* TERMIO:
144 1.1 kamil * This symbol, if defined, indicates that the program should include
145 1.1 kamil * termio.h rather than sgtty.h. There are also differences in the
146 1.1 kamil * ioctl() calls that depend on the value of this symbol.
147 1.1 kamil */
148 1.1 kamil #$d_termio TERMIO /**/
149 1.1 kamil
150 1.1 kamil /* USENDIR:
151 1.1 kamil * This symbol, if defined, indicates that the program should compile
152 1.1 kamil * the ndir.c code provided with the package.
153 1.1 kamil */
154 1.1 kamil /* LIBNDIR:
155 1.1 kamil * This symbol, if defined, indicates that the program should include the
156 1.1 kamil * system's version of ndir.h, rather than the one with this package.
157 1.1 kamil */
158 1.1 kamil #$d_usendir USENDIR /**/
159 1.1 kamil #$d_libndir LIBNDIR /**/
160 1.1 kamil
161 1.1 kamil /* WHOAMI:
162 1.1 kamil * This symbol, if defined, indicates that the program may include
163 1.1 kamil * whoami.h.
164 1.1 kamil */
165 1.1 kamil #$d_whoami WHOAMI /**/
166 1.1 kamil
167 1.1 kamil /* HOSTNAME:
168 1.1 kamil * This symbol contains name of the host the program is going to run on.
169 1.1 kamil * The domain is not kept with hostname, but must be gotten from MYDOMAIN.
170 1.1 kamil * The dot comes with MYDOMAIN, and need not be supplied by the program.
171 1.1 kamil * If gethostname() or uname() exist, HOSTNAME may be ignored.
172 1.1 kamil */
173 1.1 kamil /* MYDOMAIN:
174 1.1 kamil * This symbol contains the domain of the host the program is going to
175 1.1 kamil * run on. The domain must be appended to HOSTNAME to form a complete
176 1.1 kamil * host name. The dot comes with MYDOMAIN, and need not be supplied by
177 1.1 kamil * the program. If the host name is derived from PHOSTNAME, the domain
178 1.1 kamil * may or may not already be there, and the program should check.
179 1.1 kamil */
180 1.1 kamil #define HOSTNAME "$hostname" /**/
181 1.1 kamil #define MYDOMAIN "$mydomain" /**/
182 1.1 kamil
183 1.1 kamil /* PASSNAMES:
184 1.1 kamil * This symbol, if defined, indicates that full names are stored in
185 1.1 kamil * the /etc/passwd file.
186 1.1 kamil */
187 1.1 kamil /* BERKNAMES:
188 1.1 kamil * This symbol, if defined, indicates that full names are stored in
189 1.1 kamil * the /etc/passwd file in Berkeley format (name first thing, everything
190 1.1 kamil * up to first comma, with & replaced by capitalized login id, yuck).
191 1.1 kamil */
192 1.1 kamil /* USGNAMES:
193 1.1 kamil * This symbol, if defined, indicates that full names are stored in
194 1.1 kamil * the /etc/passwd file in USG format (everything after - and before ( is
195 1.1 kamil * the name).
196 1.1 kamil */
197 1.1 kamil #$d_passnames PASSNAMES /* (undef to take name from ~/.fullname) */
198 1.1 kamil #$d_berknames BERKNAMES /* (that is, ":name,stuff:") */
199 1.1 kamil #$d_usgnames USGNAMES /* (that is, ":stuff-name(stuff):") */
200 1.1 kamil
201 1.1 kamil /* PREFSHELL:
202 1.1 kamil * This symbol contains the full name of the preferred user shell on this
203 1.1 kamil * system. Usual values are /bin/csh, /bin/ksh, /bin/sh.
204 1.1 kamil */
205 1.1 kamil #define PREFSHELL "$prefshell" /**/
206 1.1 kamil
207 1.1 kamil /* RANDBITS:
208 1.1 kamil * This symbol contains the number of bits of random number the rand()
209 1.1 kamil * function produces. Usual values are 15, 16, and 31.
210 1.1 kamil */
211 1.1 kamil #define RANDBITS $randbits /**/
212 1.1 kamil
213 1.1 kamil /* Reg1:
214 1.1 kamil * This symbol, along with Reg2, Reg3, etc. is either the word "register"
215 1.1 kamil * or null, depending on whether the C compiler pays attention to this
216 1.1 kamil * many register declarations. The intent is that you don't have to
217 1.1 kamil * order your register declarations in the order of importance, so you
218 1.1 kamil * can freely declare register variables in sub-blocks of code and as
219 1.1 kamil * function parameters. Do not use Reg<n> more than once per routine.
220 1.1 kamil */
221 1.1 kamil
222 1.2 christos #define $reg1 /**/
223 1.2 christos #define $reg2 /**/
224 1.2 christos #define $reg3 /**/
225 1.2 christos #define $reg4 /**/
226 1.2 christos #define $reg5 /**/
227 1.2 christos #define $reg6 /**/
228 1.2 christos #define $reg7 /**/
229 1.2 christos #define $reg8 /**/
230 1.2 christos #define $reg9 /**/
231 1.1 kamil #define Reg10 $reg10 /**/
232 1.1 kamil #define Reg11 $reg11 /**/
233 1.1 kamil #define Reg12 $reg12 /**/
234 1.1 kamil #define Reg13 $reg13 /**/
235 1.1 kamil #define Reg14 $reg14 /**/
236 1.1 kamil #define Reg15 $reg15 /**/
237 1.1 kamil #define Reg16 $reg16 /**/
238 1.1 kamil
239 1.1 kamil /* ROOTID:
240 1.1 kamil * This symbol contains the uid of root, normally 0.
241 1.1 kamil */
242 1.1 kamil #define ROOTID $rootid /**/
243 1.1 kamil
244 1.1 kamil /* VOIDFLAGS:
245 1.1 kamil * This symbol indicates how much support of the void type is given by this
246 1.1 kamil * compiler. What various bits mean:
247 1.1 kamil *
248 1.1 kamil * 1 = supports declaration of void
249 1.1 kamil * 2 = supports arrays of pointers to functions returning void
250 1.1 kamil * 4 = supports comparisons between pointers to void functions and
251 1.1 kamil * addresses of void functions
252 1.1 kamil *
253 1.1 kamil * The package designer should define VOIDUSED to indicate the requirements
254 1.1 kamil * of the package. This can be done either by #defining VOIDUSED before
255 1.1 kamil * including config.h, or by defining defvoidused in Myinit.U.
256 1.1 kamil */
257 1.1 kamil #ifndef VOIDUSED
258 1.1 kamil #define VOIDUSED $defvoidused
259 1.1 kamil #endif
260 1.1 kamil #define VOIDFLAGS $voidflags
261 1.1 kamil #if (VOIDFLAGS & VOIDUSED) != VOIDUSED
262 1.1 kamil #$define void int /* is void to be avoided? */
263 1.1 kamil #$define M_VOID /* Xenix strikes again */
264 1.1 kamil #endif
265 1.1 kamil
266 1.1 kamil /* $package private library, may use ~ expansion, %x and %l */
267 1.1 kamil #define PRIVLIB "$privlib" /**/
268 1.1 kamil
269 1.1 kamil !GROK!THIS!
270