This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl 5.0 alpha 9
[perl5.git] / config_h.SH
CommitLineData
8d063cd8
LW
1case $CONFIG in
2'')
2304df62
AD
3 if test -f config.sh; then TOP=.;
4 elif test -f ../config.sh; then TOP=..;
5 elif test -f ../../config.sh; then TOP=../..;
6 elif test -f ../../../config.sh; then TOP=../../..;
7 elif test -f ../../../../config.sh; then TOP=../../../..;
8 else
9 echo "Can't find config.sh."; exit 1
10 fi
11 . $TOP/config.sh
12 ;;
13esac
14case "$0" in
15*/*) cd `expr X$0 : 'X\(.*\)/'` ;;
8d063cd8
LW
16esac
17echo "Extracting config.h (with variable substitutions)"
2304df62
AD
18sed <<!GROK!THIS! >config.h -e 's!^#undef!/\*#define!' -e 's!^#un-def!#undef!'
19/*
20 * This file was produced by running the config_h.SH script, which
8d063cd8
LW
21 * gets its values from config.sh, which is generally produced by
22 * running Configure.
23 *
24 * Feel free to modify any of this as the need arises. Note, however,
25 * that running config.h.SH again will wipe out any changes you've made.
26 * For a more permanent change edit config.sh and rerun config.h.SH.
2304df62
AD
27 *
28 * \$Id: Config_h.U,v 3.0.1.2 1993/08/24 12:13:20 ram Exp $
8d063cd8
LW
29 */
30
2304df62
AD
31/* Configuration time: $cf_time
32 * Configured by: $cf_by
33 * Target system: $myuname
34 */
8d063cd8 35
2304df62
AD
36#ifndef _config_h_
37#define _config_h_
38
2304df62
AD
39/* BIN:
40 * This symbol holds the path of the bin directory where the package will
41 * be installed. Program must be prepared to deal with ~name substitution.
a687059c 42 */
2304df62 43#define BIN "$bin" /**/
a687059c 44
2304df62
AD
45/* BYTEORDER:
46 * This symbol hold the hexadecimal constant defined in byteorder,
47 * i.e. 0x1234 or 0x4321, etc...
a687059c 48 */
2304df62 49#define BYTEORDER 0x$byteorder /* large digits for MSB */
a687059c 50
2304df62 51/* CPPSTDIN:
36ce8bec
DFDL
52 * This symbol contains the first part of the string which will invoke
53 * the C preprocessor on the standard input and produce to standard
2304df62
AD
54 * output. Typical value of "cc -E" or "/lib/cpp", but it can also
55 * call a wrapper. See CPPRUN.
36ce8bec 56 */
2304df62 57/* CPPMINUS:
36ce8bec
DFDL
58 * This symbol contains the second part of the string which will invoke
59 * the C preprocessor on the standard input and produce to standard
378cc40b 60 * output. This symbol will have the value "-" if CPPSTDIN needs a minus
36ce8bec
DFDL
61 * to specify standard input, otherwise the value is "".
62 */
378cc40b 63#define CPPSTDIN "$cppstdin"
36ce8bec
DFDL
64#define CPPMINUS "$cppminus"
65
2304df62
AD
66/* HAS_BCMP:
67 * This symbol is defined if the bcmp() routine is available to
68 * compare blocks of memory.
a687059c 69 */
2304df62 70#$d_bcmp HAS_BCMP /**/
a687059c 71
2304df62
AD
72/* HAS_BCOPY:
73 * This symbol is defined if the bcopy() routine is available to
74 * copy blocks of memory.
c51b80d1 75 */
2304df62 76#$d_bcopy HAS_BCOPY /**/
c51b80d1 77
2304df62
AD
78/* HAS_BZERO:
79 * This symbol is defined if the bzero() routine is available to
80 * set a memory block to 0.
0d3e774c 81 */
2304df62 82#$d_bzero HAS_BZERO /**/
0d3e774c 83
2304df62
AD
84/* CASTNEGFLOAT:
85 * This symbol is defined if the C compiler can cast negative
86 * numbers to unsigned longs, ints and shorts.
b1248f16 87 */
2304df62 88/* CASTFLAGS:
7e1cf235
LW
89 * This symbol contains flags that say what difficulties the compiler
90 * has casting odd floating values to unsigned long:
2304df62 91 * 0 = ok
7e1cf235
LW
92 * 1 = couldn't cast < 0
93 * 2 = couldn't cast >= 0x80000000
94 */
2304df62
AD
95#$d_castneg CASTNEGFLOAT /**/
96#define CASTFLAGS $castflags /**/
ed6116ce 97
2304df62 98/* CHARSPRINTF:
8d063cd8
LW
99 * This symbol is defined if this system declares "char *sprintf()" in
100 * stdio.h. The trend seems to be to declare it as "int sprintf()". It
101 * is up to the package author to declare sprintf correctly based on the
102 * symbol.
103 */
104#$d_charsprf CHARSPRINTF /**/
105
2304df62 106/* HAS_CHSIZE:
87250799
LW
107 * This symbol, if defined, indicates that the chsize routine is available
108 * to truncate files. You might need a -lx to get this routine.
109 */
fe14fcc3 110#$d_chsize HAS_CHSIZE /**/
87250799 111
2304df62
AD
112/* HASCONST:
113 * This symbol, if defined, indicates that this C compiler knows about
114 * the const type. There is no need to actually test for that symbol
115 * within your programs. The mere use of the "const" keyword will
116 * trigger the necessary tests.
117 */
118#$d_const HASCONST /**/
119#ifndef HASCONST
120#define const
121#endif
122
123/* HAS_CRYPT:
2e1b3b7e
KK
124 * This symbol, if defined, indicates that the crypt routine is available
125 * to encrypt passwords and the like.
126 */
2304df62 127#$d_crypt HAS_CRYPT /**/
2e1b3b7e 128
2304df62 129/* CSH:
bf38876a
LW
130 * This symbol, if defined, indicates that the C-shell exists.
131 * If defined, contains the full pathname of csh.
132 */
133#$d_csh CSH "$csh" /**/
134
2304df62 135/* DOSUID:
13281fa4
LW
136 * This symbol, if defined, indicates that the C program should
137 * check the script that it is executing for setuid/setgid bits, and
138 * attempt to emulate setuid/setgid on systems that have disabled
139 * setuid #! scripts because the kernel can't do it securely.
140 * It is up to the package designer to make sure that this emulation
141 * is done securely. Among other things, it should do an fstat on
142 * the script it just opened to make sure it really is a setuid/setgid
143 * script, it should make sure the arguments passed correspond exactly
144 * to the argument on the #! line, and it should not trust any
145 * subprocesses to which it must pass the filename rather than the
146 * file descriptor of the script to be executed.
147 */
148#$d_dosuid DOSUID /**/
149
2304df62
AD
150/* HAS_DUP2:
151 * This symbol, if defined, indicates that the dup2 routine is
152 * available to duplicate file descriptors.
a687059c 153 */
2304df62 154#$d_dup2 HAS_DUP2 /**/
a687059c 155
2304df62 156/* HAS_FCHMOD:
378cc40b
LW
157 * This symbol, if defined, indicates that the fchmod routine is available
158 * to change mode of opened files. If unavailable, use chmod().
159 */
2304df62 160#$d_fchmod HAS_FCHMOD /**/
378cc40b 161
2304df62 162/* HAS_FCHOWN:
378cc40b
LW
163 * This symbol, if defined, indicates that the fchown routine is available
164 * to change ownership of opened files. If unavailable, use chown().
165 */
2304df62 166#$d_fchown HAS_FCHOWN /**/
378cc40b 167
2304df62 168/* HAS_FCNTL:
fe14fcc3
LW
169 * This symbol, if defined, indicates to the C program that
170 * the fcntl() function exists.
a687059c 171 */
2304df62 172#$d_fcntl HAS_FCNTL /**/
a687059c 173
2304df62 174/* FLEXFILENAMES:
7e1cf235
LW
175 * This symbol, if defined, indicates that the system supports filenames
176 * longer than 14 characters.
177 */
178#$d_flexfnam FLEXFILENAMES /**/
179
2304df62
AD
180/* HAS_FLOCK:
181 * This symbol, if defined, indicates that the flock routine is
a687059c
LW
182 * available to do file locking.
183 */
2304df62 184#$d_flock HAS_FLOCK /**/
a687059c 185
2304df62 186/* HAS_GETGROUPS:
378cc40b
LW
187 * This symbol, if defined, indicates that the getgroups() routine is
188 * available to get the list of process groups. If unavailable, multiple
189 * groups are probably not supported.
190 */
2304df62 191#$d_getgrps HAS_GETGROUPS /**/
378cc40b 192
2304df62
AD
193/* HAS_GETHOSTENT:
194 * This symbol, if defined, indicates that the gethostent routine is
a687059c
LW
195 * available to lookup host names in some data base or other.
196 */
2304df62
AD
197#$d_gethent HAS_GETHOSTENT /**/
198
199/* HAS_UNAME:
200 * This symbol, if defined, indicates that the C program may use the
201 * uname() routine to derive the host name. See also HAS_GETHOSTNAME
202 * and PHOSTNAME.
203 */
204#$d_uname HAS_UNAME /**/
a687059c 205
2304df62
AD
206/* HAS_GETPGRP:
207 * This symbol, if defined, indicates that the getpgrp routine is
a687059c
LW
208 * available to get the current process group.
209 */
2304df62 210#$d_getpgrp HAS_GETPGRP /**/
a687059c 211
2304df62 212/* HAS_GETPGRP2:
d8f2e4cc
LW
213 * This symbol, if defined, indicates that the getpgrp2() (as in DG/UX)
214 * routine is available to get the current process group.
215 */
2304df62 216#$d_getpgrp2 HAS_GETPGRP2 /**/
d8f2e4cc 217
2304df62
AD
218/* HAS_GETPRIORITY:
219 * This symbol, if defined, indicates that the getpriority routine is
a687059c
LW
220 * available to get a process's priority.
221 */
2304df62 222#$d_getprior HAS_GETPRIORITY /**/
a687059c 223
2304df62 224/* HAS_KILLPG:
378cc40b
LW
225 * This symbol, if defined, indicates that the killpg routine is available
226 * to kill process groups. If unavailable, you probably should use kill
227 * with a negative process number.
228 */
2304df62 229#$d_killpg HAS_KILLPG /**/
378cc40b 230
2304df62
AD
231/* HAS_LINK:
232 * This symbol, if defined, indicates that the link routine is
233 * available to create hard links.
0d3e774c 234 */
2304df62 235#$d_link HAS_LINK /**/
0d3e774c 236
2304df62
AD
237/* HAS_LSTAT:
238 * This symbol, if defined, indicates that the lstat routine is
239 * available to do file stats on symbolic links.
a687059c 240 */
2304df62 241#$d_lstat HAS_LSTAT /**/
a687059c 242
2304df62
AD
243/* HAS_MEMCMP:
244 * This symbol, if defined, indicates that the memcmp routine is available
245 * to compare blocks of memory.
378cc40b 246 */
2304df62
AD
247#$d_memcmp HAS_MEMCMP /**/
248
249/* HAS_MEMCPY:
9f971974 250 * This symbol, if defined, indicates that the memcpy routine is available
2304df62 251 * to copy blocks of memory.
9f971974 252 */
2304df62 253#$d_memcpy HAS_MEMCPY /**/
9f971974 254
2304df62 255/* HAS_MEMMOVE:
9f971974 256 * This symbol, if defined, indicates that the memmove routine is available
2304df62
AD
257 * to copy potentially overlapping blocks of memory. This should be used
258 * only when HAS_SAFE_BCOPY is not defined. If neither is there, roll your
259 * own version.
9f971974 260 */
2304df62 261#$d_memmove HAS_MEMMOVE /**/
9f971974 262
2304df62 263/* HAS_MEMSET:
9f971974 264 * This symbol, if defined, indicates that the memset routine is available
2304df62 265 * to set blocks of memory.
9f971974 266 */
2304df62 267#$d_memset HAS_MEMSET /**/
378cc40b 268
2304df62 269/* HAS_MKDIR:
a687059c
LW
270 * This symbol, if defined, indicates that the mkdir routine is available
271 * to create directories. Otherwise you should fork off a new process to
272 * exec /bin/mkdir.
273 */
2304df62 274#$d_mkdir HAS_MKDIR /**/
fe14fcc3 275
2304df62 276/* HAS_MSG:
fe14fcc3 277 * This symbol, if defined, indicates that the entire msg*(2) library is
2304df62 278 * supported (IPC mechanism based on message queues).
fe14fcc3 279 */
2304df62 280#$d_msg HAS_MSG /**/
fe14fcc3 281
2304df62 282/* HAS_MSGCTL:
fe14fcc3 283 * This symbol, if defined, indicates that the msgctl() routine is
2304df62 284 * available to perform message control operations.
fe14fcc3 285 */
2304df62 286#$d_msgctl HAS_MSGCTL /**/
a687059c 287
2304df62 288/* HAS_MSGGET:
fe14fcc3 289 * This symbol, if defined, indicates that the msgget() routine is
2304df62 290 * available to get a new message queue.
fe14fcc3 291 */
2304df62 292#$d_msgget HAS_MSGGET /**/
fe14fcc3 293
2304df62 294/* HAS_MSGRCV:
fe14fcc3 295 * This symbol, if defined, indicates that the msgrcv() routine is
2304df62 296 * available to extract a message from the message queue.
fe14fcc3 297 */
2304df62 298#$d_msgrcv HAS_MSGRCV /**/
fe14fcc3 299
2304df62 300/* HAS_MSGSND:
fe14fcc3 301 * This symbol, if defined, indicates that the msgsnd() routine is
2304df62 302 * available to send a message into the message queue.
a687059c 303 */
2304df62 304#$d_msgsnd HAS_MSGSND /**/
a687059c 305
2304df62 306/* HAS_OPEN3:
fe14fcc3
LW
307 * This manifest constant lets the C program know that the three
308 * argument form of open(2) is available.
309 */
2304df62 310#$d_open3 HAS_OPEN3 /**/
fe14fcc3 311
2304df62 312/* HAS_RENAME:
378cc40b
LW
313 * This symbol, if defined, indicates that the rename routine is available
314 * to rename files. Otherwise you should do the unlink(), link(), unlink()
315 * trick.
316 */
2304df62 317#$d_rename HAS_RENAME /**/
378cc40b 318
2304df62
AD
319/* HAS_RMDIR:
320 * This symbol, if defined, indicates that the rmdir routine is
321 * available to remove directories. Otherwise you should fork off a
322 * new process to exec /bin/rmdir.
9f971974 323 */
2304df62 324#$d_rmdir HAS_RMDIR /**/
9f971974 325
2304df62
AD
326/* HAS_SELECT:
327 * This symbol, if defined, indicates that the select routine is
328 * available to select active file descriptors. If the timeout field
329 * is used, <sys/time.h> may need to be included.
fe14fcc3 330 */
2304df62 331#$d_select HAS_SELECT /**/
a687059c 332
2304df62 333/* HAS_SEM:
fe14fcc3
LW
334 * This symbol, if defined, indicates that the entire sem*(2) library is
335 * supported.
336 */
2304df62 337#$d_sem HAS_SEM /**/
fe14fcc3 338
2304df62 339/* HAS_SEMCTL:
fe14fcc3 340 * This symbol, if defined, indicates that the semctl() routine is
2304df62 341 * available to perform semaphore control operations.
87250799 342 */
2304df62 343#$d_semctl HAS_SEMCTL /**/
87250799 344
2304df62 345/* HAS_SEMGET:
fe14fcc3 346 * This symbol, if defined, indicates that the semget() routine is
2304df62 347 * available to get a set of semaphores.
fe14fcc3 348 */
2304df62 349#$d_semget HAS_SEMGET /**/
fe14fcc3 350
2304df62 351/* HAS_SEMOP:
fe14fcc3 352 * This symbol, if defined, indicates that the semop() routine is
2304df62 353 * available to execute semaphore operations.
fe14fcc3 354 */
2304df62 355#$d_semop HAS_SEMOP /**/
fe14fcc3 356
2304df62 357/* HAS_SETEGID:
378cc40b
LW
358 * This symbol, if defined, indicates that the setegid routine is available
359 * to change the effective gid of the current program.
360 */
2304df62 361#$d_setegid HAS_SETEGID /**/
378cc40b 362
2304df62 363/* HAS_SETEUID:
378cc40b
LW
364 * This symbol, if defined, indicates that the seteuid routine is available
365 * to change the effective uid of the current program.
366 */
2304df62
AD
367#$d_seteuid HAS_SETEUID /**/
368
369/* HAS_SETPGID:
370 * This symbol, if defined, indicates that the setpgid routine is
371 * available to set process group ID.
372 */
373#$d_setpgid HAS_SETPGID /**/
378cc40b 374
2304df62
AD
375/* HAS_SETPGRP:
376 * This symbol, if defined, indicates that the setpgrp routine is
a687059c
LW
377 * available to set the current process group.
378 */
2304df62 379#$d_setpgrp HAS_SETPGRP /**/
a687059c 380
2304df62 381/* HAS_SETPGRP2:
d8f2e4cc
LW
382 * This symbol, if defined, indicates that the setpgrp2() (as in DG/UX)
383 * routine is available to set the current process group.
384 */
2304df62 385#$d_setpgrp2 HAS_SETPGRP2 /**/
d8f2e4cc 386
2304df62
AD
387/* HAS_SETPRIORITY:
388 * This symbol, if defined, indicates that the setpriority routine is
a687059c
LW
389 * available to set a process's priority.
390 */
2304df62 391#$d_setprior HAS_SETPRIORITY /**/
a687059c 392
2304df62 393/* HAS_SETREGID:
a687059c 394 * This symbol, if defined, indicates that the setregid routine is
2304df62
AD
395 * available to change the real and effective gid of the current
396 * process.
a687059c 397 */
2304df62 398/* HAS_SETRESGID:
a687059c
LW
399 * This symbol, if defined, indicates that the setresgid routine is
400 * available to change the real, effective and saved gid of the current
2304df62 401 * process.
a687059c 402 */
2304df62
AD
403#$d_setregid HAS_SETREGID /**/
404#$d_setresgid HAS_SETRESGID /**/
a687059c 405
2304df62 406/* HAS_SETREUID:
a687059c 407 * This symbol, if defined, indicates that the setreuid routine is
2304df62
AD
408 * available to change the real and effective uid of the current
409 * process.
a687059c 410 */
2304df62 411/* HAS_SETRESUID:
a687059c
LW
412 * This symbol, if defined, indicates that the setresuid routine is
413 * available to change the real, effective and saved uid of the current
2304df62 414 * process.
a687059c 415 */
2304df62
AD
416#$d_setreuid HAS_SETREUID /**/
417#$d_setresuid HAS_SETRESUID /**/
a687059c 418
2304df62 419/* HAS_SETRGID:
378cc40b
LW
420 * This symbol, if defined, indicates that the setrgid routine is available
421 * to change the real gid of the current program.
422 */
2304df62 423#$d_setrgid HAS_SETRGID /**/
378cc40b 424
2304df62 425/* HAS_SETRUID:
378cc40b
LW
426 * This symbol, if defined, indicates that the setruid routine is available
427 * to change the real uid of the current program.
428 */
2304df62
AD
429#$d_setruid HAS_SETRUID /**/
430
431/* HAS_SETSID:
432 * This symbol, if defined, indicates that the setsid routine is
433 * available to set the process group ID.
434 */
435#$d_setsid HAS_SETSID /**/
fe14fcc3 436
2304df62 437/* HAS_SHM:
fe14fcc3
LW
438 * This symbol, if defined, indicates that the entire shm*(2) library is
439 * supported.
440 */
2304df62 441#$d_shm HAS_SHM /**/
fe14fcc3 442
2304df62 443/* HAS_SHMCTL:
fe14fcc3 444 * This symbol, if defined, indicates that the shmctl() routine is
2304df62 445 * available to perform shared memory control operations.
fe14fcc3 446 */
2304df62 447#$d_shmctl HAS_SHMCTL /**/
378cc40b 448
2304df62 449/* HAS_SHMDT:
fe14fcc3 450 * This symbol, if defined, indicates that the shmdt() routine is
2304df62 451 * available to detach a shared memory segment from the process space.
fe14fcc3 452 */
2304df62 453#$d_shmdt HAS_SHMDT /**/
fe14fcc3 454
2304df62 455/* HAS_SHMGET:
fe14fcc3 456 * This symbol, if defined, indicates that the shmget() routine is
2304df62 457 * available to request a shared memory segment from the kernel.
fe14fcc3 458 */
2304df62 459#$d_shmget HAS_SHMGET /**/
fe14fcc3 460
2304df62 461/* HAS_SOCKET:
a687059c
LW
462 * This symbol, if defined, indicates that the BSD socket interface is
463 * supported.
464 */
2304df62
AD
465/* HAS_SOCKETPAIR:
466 * This symbol, if defined, indicates that the BSD socketpair() call is
a687059c
LW
467 * supported.
468 */
2304df62 469/* USE_OLDSOCKET:
a687059c 470 * This symbol, if defined, indicates that the 4.1c BSD socket interface
2304df62
AD
471 * is supported instead of the 4.2/4.3 BSD socket interface. For instance,
472 * there is no setsockopt() call.
a687059c 473 */
2304df62
AD
474#$d_socket HAS_SOCKET /**/
475#$d_sockpair HAS_SOCKETPAIR /**/
476#$d_oldsock USE_OLDSOCKET /**/
a687059c 477
2304df62 478/* USE_STAT_BLOCKS:
c51b80d1
LW
479 * This symbol is defined if this system has a stat structure declaring
480 * st_blksize and st_blocks.
481 */
2304df62 482#$d_statblks USE_STAT_BLOCKS /**/
c51b80d1 483
2304df62 484/* USE_STD_STDIO:
36ce8bec
DFDL
485 * This symbol is defined if this system has a FILE structure declaring
486 * _ptr and _cnt in stdio.h.
487 */
2304df62 488#$d_stdstdio USE_STD_STDIO /**/
36ce8bec 489
2304df62 490/* USE_STRUCT_COPY:
8d063cd8
LW
491 * This symbol, if defined, indicates that this C compiler knows how
492 * to copy structures. If undefined, you'll need to use a block copy
493 * routine of some sort instead.
494 */
2304df62 495#$d_strctcpy USE_STRUCT_COPY /**/
8d063cd8 496
2304df62 497/* HAS_SYMLINK:
2e1b3b7e
KK
498 * This symbol, if defined, indicates that the symlink routine is available
499 * to create symbolic links.
500 */
2304df62 501#$d_symlink HAS_SYMLINK /**/
2e1b3b7e 502
2304df62
AD
503/* HAS_SYSCALL:
504 * This symbol, if defined, indicates that the syscall routine is
505 * available to call arbitrary system calls. If undefined, that's tough.
a687059c 506 */
2304df62 507#$d_syscall HAS_SYSCALL /**/
e5d73d77 508
2304df62
AD
509/* HAS_SYSTEM:
510 * This symbol, if defined, indicates that the system routine is
511 * available to issue a shell command.
9f971974 512 */
2304df62 513#$d_system HAS_SYSTEM /**/
9f971974 514
85e6fe83
LW
515/* Time_t:
516 * This symbol holds the type returned by time(). It can be long,
517 * or time_t on BSD sites (in which case <sys/types.h> should be
518 * included).
519 */
520#define Time_t $timetype /* Time type */
521
2304df62
AD
522/* HAS_TIMES:
523 * This symbol, if defined, indicates that the times() routine exists.
524 * Note that this became obsolete on some systems (SUNOS), which now
525 * use getrusage(). It may be necessary to include <sys/times.h>.
526 */
527#$d_times HAS_TIMES /**/
528
529/* HAS_TRUNCATE:
87250799
LW
530 * This symbol, if defined, indicates that the truncate routine is
531 * available to truncate files.
532 */
2304df62 533#$d_truncate HAS_TRUNCATE /**/
87250799 534
2304df62
AD
535/* I_NDIR:
536 * This symbol, if defined, indicates that the program should include the
537 * system's version of ndir.h, rather than the one with this package.
538 */
539#$i_ndir I_NDIR /**/
540
2304df62
AD
541/* VOIDSIG:
542 * This symbol is defined if this system declares "void (*signal(...))()" in
543 * signal.h. The old way was to declare it as "int (*signal(...))()". It
36ce8bec
DFDL
544 * is up to the package author to declare things correctly based on the
545 * symbol.
546 */
2304df62 547#$d_voidsig VOIDSIG /**/
36ce8bec 548
2304df62 549/* HASVOLATILE:
afd9f252
LW
550 * This symbol, if defined, indicates that this C compiler knows about
551 * the volatile declaration.
552 */
553#$d_volatile HASVOLATILE /**/
2304df62
AD
554#ifndef HASVOLATILE
555#define volatile
556#endif
afd9f252 557
2304df62 558/* HAS_VPRINTF:
a687059c
LW
559 * This symbol, if defined, indicates that the vprintf routine is available
560 * to printf with a pointer to an argument list. If unavailable, you
561 * may need to write your own, probably in terms of _doprnt().
562 */
2304df62 563/* USE_CHAR_VSPRINTF:
a687059c
LW
564 * This symbol is defined if this system has vsprintf() returning type
565 * (char*). The trend seems to be to declare it as "int vsprintf()". It
566 * is up to the package author to declare vsprintf correctly based on the
567 * symbol.
568 */
2304df62
AD
569#$d_vprintf HAS_VPRINTF /**/
570#$d_charvspr USE_CHAR_VSPRINTF /**/
a687059c 571
2304df62 572/* HAS_WAIT4:
bf38876a
LW
573 * This symbol, if defined, indicates that wait4() exists.
574 */
2304df62 575#$d_wait4 HAS_WAIT4 /**/
bf38876a 576
2304df62
AD
577/* HAS_WAITPID:
578 * This symbol, if defined, indicates that the waitpid routine is
579 * available to wait for child process.
39c3038c 580 */
2304df62 581#$d_waitpid HAS_WAITPID /**/
39c3038c 582
2304df62
AD
583/* I_DBM:
584 * This symbol, if defined, indicates to the C program that it should
585 * include <dbm.h>.
378cc40b 586 */
2304df62 587#$i_dbm I_DBM /**/
378cc40b 588
2304df62
AD
589/* I_DIRENT:
590 * This symbol, if defined, indicates to the C program that it should
591 * include <dirent.h>. Using this symbol also triggers the definition
592 * of the Direntry_t define which ends up being 'struct dirent' or
593 * 'struct direct' depending on the availability of <dirent.h>.
1c3d792e 594 */
2304df62
AD
595/* DIRNAMLEN:
596 * This symbol, if defined, indicates to the C program that the length
597 * of directory entry names is provided by a d_namlen field. Otherwise
598 * you need to do strlen() on the d_name field.
599 */
600#$i_dirent I_DIRENT /**/
601#$d_dirnamlen DIRNAMLEN /**/
602#ifdef I_DIRENT
603#define Direntry_t struct dirent
604#else
605#define Direntry_t struct direct
606#endif
1c3d792e 607
2304df62 608/* I_FCNTL:
fe14fcc3 609 * This manifest constant tells the C program to include <fcntl.h>.
a687059c 610 */
2304df62 611#$i_fcntl I_FCNTL /**/
a687059c 612
2304df62 613/* I_GDBM:
fe14fcc3
LW
614 * This symbol, if defined, indicates that gdbm.h exists and should
615 * be included.
a687059c 616 */
2304df62 617#$i_gdbm I_GDBM /**/
a687059c 618
2304df62 619/* I_GRP:
a687059c 620 * This symbol, if defined, indicates to the C program that it should
2304df62 621 * include <grp.h>.
a687059c 622 */
2304df62 623#$i_grp I_GRP /**/
a687059c 624
2304df62
AD
625/* I_NDBM:
626 * This symbol, if defined, indicates that ndbm.h exists and should
627 * be included.
628 */
629#$i_ndbm I_NDBM /**/
630
631/* I_NETINET_IN:
03a14243 632 * This symbol, if defined, indicates to the C program that it should
2304df62 633 * include <netinet/in.h>. Otherwise, you may try <sys/in.h>.
03a14243 634 */
2304df62 635/* I_SYS_IN:
fe14fcc3 636 * This symbol, if defined, indicates to the C program that it should
2304df62 637 * include <sys/in.h> instead of <netinet/in.h>.
fe14fcc3 638 */
2304df62
AD
639#$i_niin I_NETINET_IN /**/
640#$i_sysin I_SYS_IN /**/
03a14243 641
2304df62
AD
642/* I_STDARG:
643 * This symbol, if defined, indicates that <stdarg.h> exists and should
644 * be included.
a687059c 645 */
2304df62 646#$i_stdarg I_STDARG /**/
a687059c 647
2304df62
AD
648/* I_STDDEF:
649 * This symbol, if defined, indicates that <stddef.h> exists and should
a687059c
LW
650 * be included.
651 */
2304df62 652#$i_stddef I_STDDEF /**/
a687059c 653
85e6fe83
LW
654/* I_STRING:
655 * This symbol, if defined, indicates to the C program that it should
656 * include <string.h> (USG systems) instead of <strings.h> (BSD systems).
657 */
658#$i_string I_STRING /**/
659
2304df62
AD
660/* I_SYS_DIR:
661 * This symbol, if defined, indicates to the C program that it should
662 * include <sys/dir.h>.
d8f2e4cc 663 */
2304df62
AD
664#$i_sysdir I_SYS_DIR /**/
665
666/* I_SYS_FILE:
667 * This symbol, if defined, indicates to the C program that it should
668 * include <sys/file.h> to get definition of R_OK and friends.
d8f2e4cc 669 */
2304df62
AD
670#$i_sysfile I_SYS_FILE /**/
671
672/* I_SYS_IOCTL:
673 * This symbol, if defined, indicates that <sys/ioctl.h> exists and should
674 * be included. Otherwise, include <sgtty.h> or <termio.h>.
d8f2e4cc 675 */
2304df62
AD
676#$i_sysioctl I_SYS_IOCTL /**/
677
678/* I_SYS_NDIR:
679 * This symbol, if defined, indicates to the C program that it should
680 * include <sys/ndir.h>.
681 */
682#$i_sysndir I_SYS_NDIR /**/
683
684/* I_SYS_SELECT:
685 * This symbol, if defined, indicates to the C program that it should
686 * include <sys/select.h> in order to get definition of struct timeval.
687 */
688#$i_sysselct I_SYS_SELECT /**/
689
690/* I_TIME:
691 * This symbol, if defined, indicates to the C program that it should
692 * include <time.h>.
693 */
694/* I_SYS_TIME:
695 * This symbol, if defined, indicates to the C program that it should
696 * include <sys/time.h>.
fe14fcc3 697 */
85e6fe83
LW
698/* I_SYS_TIME_KERNEL:
699 * This symbol, if defined, indicates to the C program that it should
700 * include <sys/time.h> with KERNEL defined.
701 */
2304df62
AD
702#$i_time I_TIME /**/
703#$i_systime I_SYS_TIME /**/
85e6fe83
LW
704#$i_systimek I_SYS_TIME_KERNEL /**/
705
706/* I_UNISTD:
707 * This symbol, if defined, indicates to the C program that it should
708 * include <unistd.h>.
709 */
710#$i_unistd I_UNISTD /**/
d8f2e4cc 711
2304df62 712/* I_UTIME:
d8f2e4cc 713 * This symbol, if defined, indicates to the C program that it should
2304df62 714 * include <utime.h>.
d8f2e4cc 715 */
2304df62 716#$i_utime I_UTIME /**/
d8f2e4cc 717
2304df62 718/* I_VARARGS:
a687059c 719 * This symbol, if defined, indicates to the C program that it should
2304df62 720 * include <varargs.h>.
a687059c 721 */
2304df62 722#$i_varargs I_VARARGS /**/
a687059c 723
2304df62 724/* INTSIZE:
a687059c
LW
725 * This symbol contains the size of an int, so that the C preprocessor
726 * can make decisions based on it.
727 */
728#define INTSIZE $intsize /**/
729
85e6fe83
LW
730/* Off_t:
731 * This symbol holds the type used to declare offsets in the kernel.
732 * It can be int, long, off_t, etc... It may be necessary to include
733 * <sys/types.h> to get any typedef'ed information.
734 */
735#define Off_t $lseektype /* <offset> type */
736
2304df62
AD
737/* PRIVLIB:
738 * This symbol contains the name of the private library for this package.
739 * The library is private in the sense that it needn't be in anyone's
740 * execution path, but it should be accessible by the world. The program
741 * should be prepared to do ~ expansion.
fe14fcc3 742 */
2304df62
AD
743#define PRIVLIB "$privlib" /**/
744
85e6fe83
LW
745/* PTRSIZE:
746 * This symbol contains the size of a pointer, so that the C preprocessor
747 * can make decisions based on it.
748 */
749#define PTRSIZE $ptrsize /**/
750
2304df62
AD
751/* RANDBITS:
752 * This symbol contains the number of bits of random number the rand()
753 * function produces. Usual values are 15, 16, and 31.
fe14fcc3 754 */
2304df62
AD
755#define RANDBITS $randbits /**/
756
757/* SCRIPTDIR:
758 * This symbol holds the name of the directory in which the user wants
759 * to put publicly executable scripts for the package in question. It
760 * is often a directory that is mounted across diverse architectures.
761 * Programs must be prepared to deal with ~name expansion.
fe14fcc3 762 */
2304df62
AD
763#define SCRIPTDIR "$scriptdir" /**/
764
2304df62
AD
765/* STDCHAR:
766 * This symbol is defined to be the type of char used in stdio.h.
767 * It has the values "unsigned char" or "char".
fe14fcc3 768 */
2304df62
AD
769#define STDCHAR $stdchar /**/
770
771/* Uid_t:
772 * This symbol holds the type used to declare user ids in the kernel.
773 * It can be int, ushort, uid_t, etc... It may be necessary to include
774 * <sys/types.h> to get any typedef'ed information.
fe14fcc3 775 */
2304df62 776#define Uid_t $uidtype /* UID type */
fe14fcc3 777
85e6fe83
LW
778/* EUNICE:
779 * This symbol, if defined, indicates that the program is being compiled
780 * under the EUNICE package under VMS. The program will need to handle
781 * things like files that don't go away the first time you unlink them,
782 * due to version numbering. It will also need to compensate for lack
783 * of a respectable link() command.
784 */
785/* VMS:
786 * This symbol, if defined, indicates that the program is running under
787 * VMS. It is currently only set in conjunction with the EUNICE symbol.
788 */
789#$d_eunice EUNICE /**/
790#$d_eunice VMS /**/
791
792/* MEM_ALIGNBYTES:
793 * This symbol contains the number of bytes required to align a
794 * double. Usual values are 2, 4 and 8.
795 */
796#define MEM_ALIGNBYTES $memalignbytes /**/
797
2304df62
AD
798/* CASTI32:
799 * This symbol is defined if the C compiler can cast negative
800 * or large floating point numbers to 32-bit ints.
db4e6270 801 */
2304df62
AD
802#$d_casti32 CASTI32 /**/
803
85e6fe83
LW
804/* HAS_HTONL:
805 * This symbol, if defined, indicates that the htonl() routine (and
806 * friends htons() ntohl() ntohs()) are available to do network
807 * order byte swapping.
808 */
809/* HAS_HTONS:
810 * This symbol, if defined, indicates that the htons() routine (and
811 * friends htonl() ntohl() ntohs()) are available to do network
812 * order byte swapping.
813 */
814/* HAS_NTOHL:
815 * This symbol, if defined, indicates that the ntohl() routine (and
816 * friends htonl() htons() ntohs()) are available to do network
817 * order byte swapping.
818 */
819/* HAS_NTOHS:
820 * This symbol, if defined, indicates that the ntohs() routine (and
821 * friends htonl() htons() ntohl()) are available to do network
822 * order byte swapping.
823 */
824#$d_htonl HAS_HTONL /**/
825#$d_htonl HAS_HTONS /**/
826#$d_htonl HAS_NTOHL /**/
827#$d_htonl HAS_NTOHS /**/
828
2304df62
AD
829/* HAS_ISASCII:
830 * This manifest constant lets the C program know that the
831 * isascii is available.
1c3d792e 832 */
2304df62 833#$d_isascii HAS_ISASCII /**/
db4e6270 834
85e6fe83
LW
835/* HAS_READDIR:
836 * This symbol, if defined, indicates that the readdir routine is
837 * available to read directory entries. You may have to include
838 * <dirent.h>. See I_DIRENT.
839 */
840#$d_readdir HAS_READDIR /**/
841
842/* HAS_SEEKDIR:
843 * This symbol, if defined, indicates that the seekdir routine is
844 * available. You may have to include <dirent.h>. See I_DIRENT.
845 */
846#$d_seekdir HAS_SEEKDIR /**/
847
848/* HAS_TELLDIR:
849 * This symbol, if defined, indicates that the telldir routine is
850 * available. You may have to include <dirent.h>. See I_DIRENT.
851 */
852#$d_telldir HAS_TELLDIR /**/
853
854/* HAS_REWINDDIR:
855 * This symbol, if defined, indicates that the rewinddir routine is
856 * available. You may have to include <dirent.h>. See I_DIRENT.
857 */
858#$d_rewinddir HAS_REWINDDIR /**/
859
860/* HAS_SAFE_BCOPY:
861 * This symbol, if defined, indicates that the bcopy routine is available
862 * to copy potentially overlapping memory blocks. Otherwise you should
863 * probably use memmove() or memcpy(). If neither is defined, roll your
864 * own version.
865 */
866#$d_safebcpy HAS_SAFE_BCOPY /**/
867
868/* HAS_SAFE_MEMCPY:
869 * This symbol, if defined, indicates that the memcpy routine is available
870 * to copy potentially overlapping memory blocks. Otherwise you should
871 * probably use memmove() or memcpy(). If neither is defined, roll your
872 * own version.
873 */
874#$d_safemcpy HAS_SAFE_MEMCPY /**/
875
2304df62
AD
876/* HAS_SETLOCALE:
877 * This symbol, if defined, indicates that the setlocale routine is
878 * available to handle locale-specific ctype implementations.
879 */
880#$d_setlocale HAS_SETLOCALE /**/
1c3d792e 881
85e6fe83
LW
882/* HAS_SHMAT:
883 * This symbol, if defined, indicates that the shmat() routine is
884 * available to attach a shared memory segment to the process space.
885 */
886#$d_shmat HAS_SHMAT /**/
887
888/* VOIDSHMAT:
889 * This symbol, if defined, indicates that the shmat() routine
890 * returns a pointer of type void*. Otherwise, char* is assumed.
891 */
892#$d_voidshmat VOIDSHMAT /**/
893
2304df62
AD
894/* HAS_STRERROR:
895 * This symbol, if defined, indicates that the strerror routine is
896 * available to translate error numbers to strings. See the writeup
897 * of Strerror() in this file before you try to define your own.
898 */
899/* HAS_SYS_ERRLIST:
900 * This symbol, if defined, indicates that the sys_errlist array is
901 * available to translate error numbers to strings. The extern int
902 * sys_nerr gives the size of that table.
903 */
904/* Strerror:
905 * This preprocessor symbol is defined as a macro if strerror() is
906 * not available to translate error numbers to strings but sys_errlist[]
907 * array is there.
908 */
909#$d_strerror HAS_STRERROR /**/
910#$d_syserrlst HAS_SYS_ERRLIST /**/
911#ifdef HAS_STRERROR
912# define Strerror strerror
913#else
914#$d_strerrm Strerror(e) ((e)<0||(e)>=sys_nerr?"unknown":sys_errlist[e]) /**/
915#endif
fe14fcc3 916
85e6fe83
LW
917/* HAS_VFORK:
918 * This symbol, if defined, indicates that vfork() exists.
919 */
920#$d_vfork HAS_VFORK /**/
921
2304df62
AD
922/* USE_DYNAMIC_LOADING:
923 * This symbol, if defined, indicates that dynamic loading of
924 * some sort is available.
a687059c 925 */
2304df62 926#$usedl USE_DYNAMIC_LOADING /**/
a687059c 927
2304df62
AD
928/* Gid_t:
929 * This symbol holds the return type of getgid() and the type of
930 * argument to setrgid() and related functions. Typically,
931 * it is the type of group ids in the kernel.
932 * It can be int, ushort, uid_t, etc... It may be necessary to include
933 * <sys/types.h> to get any typedef'ed information.
87250799 934 */
2304df62 935#define Gid_t $gidtype /* Type for getgid(), etc... */
87250799 936
2304df62
AD
937/* GROUPSTYPE:
938 * This symbol holds the type used for the second argument to
939 * getgroups(). Usually, this is the same of gidtype, but
940 * sometimes it isn't. It can be int, ushort, uid_t, etc...
941 * It may be necessary to include <sys/types.h> to get any
942 * typedef'ed information. This is only required if you have
943 * getgroups().
a687059c 944 */
2304df62
AD
945#ifdef HAS_GETGROUPS
946#define GROUPSTYPE $groupstype /* Type for 2nd arg to getgroups() */
947#endif
a687059c 948
85e6fe83
LW
949/* I_DLFCN:
950 * This symbol, if defined, indicates that <dlfcn.h> exists and should
951 * be included.
952 */
953#$i_dlfcn I_DLFCN /**/
954
955/* I_MEMORY:
956 * This symbol, if defined, indicates to the C program that it should
957 * include <memory.h>.
958 */
959#$i_memory I_MEMORY /**/
960
961/* I_NET_ERRNO:
962 * This symbol, if defined, indicates that <net/errno.h> exists and
963 * should be included.
964 */
965#$i_neterrno I_NET_ERRNO /**/
966
967/* I_PWD:
968 * This symbol, if defined, indicates to the C program that it should
969 * include <pwd.h>.
970 */
971/* PWQUOTA:
972 * This symbol, if defined, indicates to the C program that struct passwd
973 * contains pw_quota.
974 */
975/* PWAGE:
976 * This symbol, if defined, indicates to the C program that struct passwd
977 * contains pw_age.
978 */
979/* PWCHANGE:
980 * This symbol, if defined, indicates to the C program that struct passwd
981 * contains pw_change.
982 */
983/* PWCLASS:
984 * This symbol, if defined, indicates to the C program that struct passwd
985 * contains pw_class.
986 */
987/* PWEXPIRE:
988 * This symbol, if defined, indicates to the C program that struct passwd
989 * contains pw_expire.
990 */
991/* PWCOMMENT:
992 * This symbol, if defined, indicates to the C program that struct passwd
993 * contains pw_comment.
994 */
995#$i_pwd I_PWD /**/
996#$d_pwquota PWQUOTA /**/
997#$d_pwage PWAGE /**/
998#$d_pwchange PWCHANGE /**/
999#$d_pwclass PWCLASS /**/
1000#$d_pwexpire PWEXPIRE /**/
1001#$d_pwcomment PWCOMMENT /**/
1002
1003/* I_TERMIO:
1004 * This symbol, if defined, indicates that the program should include
1005 * <termio.h> rather than <sgtty.h>. There are also differences in
1006 * the ioctl() calls that depend on the value of this symbol.
1007 */
1008/* I_TERMIOS:
1009 * This symbol, if defined, indicates that the program should include
1010 * the POSIX termios.h rather than sgtty.h or termio.h.
1011 * There are also differences in the ioctl() calls that depend on the
1012 * value of this symbol.
1013 */
1014/* I_SGTTY:
1015 * This symbol, if defined, indicates that the program should include
1016 * <sgtty.h> rather than <termio.h>. There are also differences in
1017 * the ioctl() calls that depend on the value of this symbol.
1018 */
1019#$i_termio I_TERMIO /**/
1020#$i_termios I_TERMIOS /**/
1021#$i_sgtty I_SGTTY /**/
1022
1023/* I_VFORK:
1024 * This symbol, if defined, indicates to the C program that it should
1025 * include vfork.h.
1026 */
1027#$i_vfork I_VFORK /**/
1028
1029/* LOC_SED:
1030 * This symbol holds the complete pathname to the sed program.
1031 */
1032#define LOC_SED "$sed" /**/
1033
2304df62
AD
1034/* Malloc_t:
1035 * This symbol is the type of pointer returned by malloc and realloc.
36ce8bec 1036 */
2304df62 1037#define Malloc_t $malloctype /**/
36ce8bec 1038
85e6fe83
LW
1039/* MYMALLOC:
1040 * This symbol, if defined, indicates that we're using our own malloc.
1041 */
1042#$d_mymalloc MYMALLOC /**/
1043
2304df62
AD
1044/* CAN_PROTOTYPE:
1045 * If defined, this macro indicates that the C compiler can handle
1046 * function prototypes.
378cc40b 1047 */
2304df62
AD
1048#$prototype CAN_PROTOTYPE /**/
1049#ifdef CAN_PROTOTYPE
1050#else
1051#endif
378cc40b 1052
85e6fe83
LW
1053/* SIG_NAME:
1054 * This symbol contains a list of signal names in order. This is intended
1055 * to be used as a static array initialization, like this:
1056 * char *sig_name[] = { SIG_NAME };
1057 * The signals in the list are separated with commas, and each signal
1058 * is surrounded by double quotes. There is no leading SIG in the signal
1059 * name, i.e. SIGQUIT is known as "QUIT".
1060 */
1061#define SIG_NAME "`echo $sig_name | sed 's/ /","/g'`" /**/
1062
2304df62 1063/* VOIDFLAGS:
8d063cd8
LW
1064 * This symbol indicates how much support of the void type is given by this
1065 * compiler. What various bits mean:
1066 *
1067 * 1 = supports declaration of void
1068 * 2 = supports arrays of pointers to functions returning void
1069 * 4 = supports comparisons between pointers to void functions and
1070 * addresses of void functions
2304df62 1071 * 8 = suports declaration of generic void pointers
8d063cd8 1072 *
2304df62
AD
1073 * The package designer should define VOIDUSED to indicate the requirements
1074 * of the package. This can be done either by #defining VOIDUSED before
1075 * including config.h, or by defining defvoidused in Myinit.U. If the
1076 * latter approach is taken, only those flags will be tested. If the
1077 * level of void support necessary is not present, defines void to int.
1078 */
1079#ifndef VOIDUSED
85e6fe83 1080# define VOIDUSED $defvoidused
8d063cd8 1081#endif
2304df62
AD
1082#define VOIDFLAGS $voidflags
1083#if (VOIDFLAGS & VOIDUSED) != VOIDUSED
1084# define void int /* is void to be avoided? */
1085# define M_VOID /* Xenix strikes again */
1086# define VOID
fe14fcc3 1087#else
2304df62 1088# define VOID void
8d063cd8
LW
1089#endif
1090
2304df62
AD
1091/*
1092 * The following symbols are obsolete. They are mapped to the the new
1093 * symbols only to ease the transition process. The sources should be
1094 * updated so as to use the new symbols only, as the support for these
1095 * obsolete symbols may end without notice.
378cc40b 1096 */
2304df62 1097
85e6fe83
LW
1098#ifdef MEM_ALIGNBYTES
1099#define ALIGNBYTES MEM_ALIGNBYTES
1100#endif
1101
2304df62
AD
1102#ifdef USE_CHAR_VSPRINTF
1103#define CHARVSPRINTF USE_CHAR_VSPRINTF
1104#endif
1105
1106#ifdef Gid_t
1107#define GIDTYPE Gid_t
1108#endif
1109
1110#ifdef I_GDBM
1111#define HAS_GDBM I_GDBM
1112#endif
1113
85e6fe83
LW
1114#ifdef I_NDBM
1115#define HAS_NDBM I_NDBM
1116#endif
1117
1118#ifdef I_DBM
1119#define HAS_ODBM I_DBM
1120#endif
1121
1122#ifdef I_SYS_IOCTL
1123#define I_SYSIOCTL I_SYS_IOCTL
1124#endif
1125
1126#ifdef Malloc_t
1127#define MALLOCPTRTYPE Malloc_t
1128#endif
1129
1130#ifdef USE_OLDSOCKET
1131#define OLDSOCKET USE_OLDSOCKET
1132#endif
1133
2304df62
AD
1134#ifdef HAS_SAFE_BCOPY
1135#define SAFE_BCOPY HAS_SAFE_BCOPY
1136#endif
1137
85e6fe83
LW
1138#ifdef HAS_SAFE_MEMCPY
1139#define SAFE_MEMCPY HAS_SAFE_MEMCPY
1140#endif
1141
2304df62
AD
1142#ifdef USE_STAT_BLOCKS
1143#define STATBLOCKS USE_STAT_BLOCKS
1144#endif
1145
1146#ifdef USE_STD_STDIO
1147#define STDSTDIO USE_STD_STDIO
1148#endif
1149
85e6fe83
LW
1150#ifdef USE_STRUCT_COPY
1151#define STRUCTCOPY USE_STRUCT_COPY
1152#endif
1153
1154#ifdef HAS_SYSTEM
1155#define SYSTEM HAS_SYSTEM
1156#endif
1157
2304df62
AD
1158#ifdef Uid_t
1159#define UIDTYPE Uid_t
1160#endif
378cc40b 1161
fe14fcc3 1162#endif
8d063cd8 1163!GROK!THIS!