This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Updated to match current Configure.
[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,
1aef975c
AD
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 27 *
4633a7c4 28 * \$Id: Config_h.U,v 3.0.1.4 1995/09/25 09:10:49 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
a0d0e21e
LW
39/* MEM_ALIGNBYTES:
40 * This symbol contains the number of bytes required to align a
41 * double. Usual values are 2, 4 and 8.
42 */
43#define MEM_ALIGNBYTES $alignbytes /**/
44
2304df62
AD
45/* BIN:
46 * This symbol holds the path of the bin directory where the package will
47 * be installed. Program must be prepared to deal with ~name substitution.
a687059c 48 */
2304df62 49#define BIN "$bin" /**/
a687059c 50
ecfc5424
AD
51/* CAT2:
52 * This macro catenates 2 tokens together.
53 */
ecfc5424
AD
54#if $cpp_stuff == 1
55#define CAT2(a,b)a/**/b
56#define CAT3(a,b,c)a/**/b/**/c
57#define CAT4(a,b,c,d)a/**/b/**/c/**/d
58#define CAT5(a,b,c,d,e)a/**/b/**/c/**/d/**/e
59#define STRINGIFY(a)"a"
60 /* If you can get stringification with catify, tell me how! */
61#endif
62#if $cpp_stuff == 42
63#define CAT2(a,b)a ## b
64#define CAT3(a,b,c)a ## b ## c
65#define CAT4(a,b,c,d)a ## b ## c ## d
66#define CAT5(a,b,c,d,e)a ## b ## c ## d ## e
67#define StGiFy(a)# a
68#define STRINGIFY(a)StGiFy(a)
69#define SCAT2(a,b)StGiFy(a) StGiFy(b)
70#define SCAT3(a,b,c)StGiFy(a) StGiFy(b) StGiFy(c)
71#define SCAT4(a,b,c,d)StGiFy(a) StGiFy(b) StGiFy(c) StGiFy(d)
72#define SCAT5(a,b,c,d,e)StGiFy(a) StGiFy(b) StGiFy(c) StGiFy(d) StGiFy(e)
73#endif
74#ifndef CAT2
75#include "Bletch: How does this C preprocessor catenate tokens?"
76#endif
77
2304df62 78/* CPPSTDIN:
36ce8bec
DFDL
79 * This symbol contains the first part of the string which will invoke
80 * the C preprocessor on the standard input and produce to standard
2304df62
AD
81 * output. Typical value of "cc -E" or "/lib/cpp", but it can also
82 * call a wrapper. See CPPRUN.
36ce8bec 83 */
2304df62 84/* CPPMINUS:
36ce8bec
DFDL
85 * This symbol contains the second part of the string which will invoke
86 * the C preprocessor on the standard input and produce to standard
378cc40b 87 * output. This symbol will have the value "-" if CPPSTDIN needs a minus
36ce8bec
DFDL
88 * to specify standard input, otherwise the value is "".
89 */
378cc40b 90#define CPPSTDIN "$cppstdin"
36ce8bec
DFDL
91#define CPPMINUS "$cppminus"
92
a0d0e21e
LW
93/* HAS_ALARM:
94 * This symbol, if defined, indicates that the alarm routine is
95 * available.
96 */
97#$d_alarm HAS_ALARM /**/
98
ecfc5424
AD
99/* HASATTRIBUTE:
100 * This symbol indicates the C compiler can check for function attributes,
101 * such as printf formats. This is normally only supported by GNU cc.
102 */
103#$d_attribut HASATTRIBUTE /**/
104#ifndef HASATTRIBUTE
105#define __attribute__(_arg_)
106#endif
107
2304df62
AD
108/* HAS_BCMP:
109 * This symbol is defined if the bcmp() routine is available to
110 * compare blocks of memory.
a687059c 111 */
2304df62 112#$d_bcmp HAS_BCMP /**/
a687059c 113
2304df62
AD
114/* HAS_BCOPY:
115 * This symbol is defined if the bcopy() routine is available to
116 * copy blocks of memory.
c51b80d1 117 */
2304df62 118#$d_bcopy HAS_BCOPY /**/
c51b80d1 119
2304df62
AD
120/* HAS_BZERO:
121 * This symbol is defined if the bzero() routine is available to
122 * set a memory block to 0.
0d3e774c 123 */
2304df62 124#$d_bzero HAS_BZERO /**/
0d3e774c 125
a0d0e21e
LW
126/* CASTI32:
127 * This symbol is defined if the C compiler can cast negative
128 * or large floating point numbers to 32-bit ints.
129 */
130#$d_casti32 CASTI32 /**/
131
2304df62
AD
132/* CASTNEGFLOAT:
133 * This symbol is defined if the C compiler can cast negative
134 * numbers to unsigned longs, ints and shorts.
b1248f16 135 */
2304df62 136/* CASTFLAGS:
7e1cf235
LW
137 * This symbol contains flags that say what difficulties the compiler
138 * has casting odd floating values to unsigned long:
2304df62 139 * 0 = ok
7e1cf235
LW
140 * 1 = couldn't cast < 0
141 * 2 = couldn't cast >= 0x80000000
232e078e 142 * 4 = couldn't cast in argument expression list
7e1cf235 143 */
2304df62
AD
144#$d_castneg CASTNEGFLOAT /**/
145#define CASTFLAGS $castflags /**/
ed6116ce 146
a0d0e21e
LW
147/* HAS_CHOWN:
148 * This symbol, if defined, indicates that the chown routine is
149 * available.
150 */
151#$d_chown HAS_CHOWN /**/
152
153/* HAS_CHROOT:
154 * This symbol, if defined, indicates that the chroot routine is
155 * available.
156 */
157#$d_chroot HAS_CHROOT /**/
158
2304df62 159/* HAS_CHSIZE:
87250799
LW
160 * This symbol, if defined, indicates that the chsize routine is available
161 * to truncate files. You might need a -lx to get this routine.
162 */
fe14fcc3 163#$d_chsize HAS_CHSIZE /**/
87250799 164
ecfc5424
AD
165/* VOID_CLOSEDIR:
166 * This symbol, if defined, indicates that the closedir() routine
167 * does not return a value.
168 */
169#$d_void_closedir VOID_CLOSEDIR /**/
170
2304df62
AD
171/* HASCONST:
172 * This symbol, if defined, indicates that this C compiler knows about
173 * the const type. There is no need to actually test for that symbol
174 * within your programs. The mere use of the "const" keyword will
175 * trigger the necessary tests.
176 */
177#$d_const HASCONST /**/
178#ifndef HASCONST
179#define const
180#endif
181
182/* HAS_CRYPT:
2e1b3b7e
KK
183 * This symbol, if defined, indicates that the crypt routine is available
184 * to encrypt passwords and the like.
185 */
2304df62 186#$d_crypt HAS_CRYPT /**/
2e1b3b7e 187
a0d0e21e
LW
188/* HAS_CUSERID:
189 * This symbol, if defined, indicates that the cuserid routine is
190 * available to get character login names.
13281fa4 191 */
a0d0e21e
LW
192#$d_cuserid HAS_CUSERID /**/
193
194/* HAS_DBL_DIG:
195 * This symbol, if defined, indicates that this system's <float.h>
196 * or <limits.h> defines the symbol DBL_DIG, which is the number
197 * of significant digits in a double precision number. If this
198 * symbol is not defined, a guess of 15 is usually pretty good.
199 */
200#$d_dbl_dig HAS_DBL_DIG /* */
201
202/* HAS_DIFFTIME:
203 * This symbol, if defined, indicates that the difftime routine is
204 * available.
205 */
206#$d_difftime HAS_DIFFTIME /**/
13281fa4 207
ecfc5424
AD
208/* HAS_DLERROR:
209 * This symbol, if defined, indicates that the dlerror routine is
210 * available to return a string describing the last error that
211 * occurred from a call to dlopen(), dlclose() or dlsym().
212 */
213#$d_dlerror HAS_DLERROR /**/
214
215/* SETUID_SCRIPTS_ARE_SECURE_NOW:
216 * This symbol, if defined, indicates that the bug that prevents
217 * setuid scripts from being secure is not present in this kernel.
218 */
219/* DOSUID:
220 * This symbol, if defined, indicates that the C program should
221 * check the script that it is executing for setuid/setgid bits, and
222 * attempt to emulate setuid/setgid on systems that have disabled
223 * setuid #! scripts because the kernel can't do it securely.
224 * It is up to the package designer to make sure that this emulation
225 * is done securely. Among other things, it should do an fstat on
226 * the script it just opened to make sure it really is a setuid/setgid
227 * script, it should make sure the arguments passed correspond exactly
228 * to the argument on the #! line, and it should not trust any
229 * subprocesses to which it must pass the filename rather than the
230 * file descriptor of the script to be executed.
231 */
232#$d_suidsafe SETUID_SCRIPTS_ARE_SECURE_NOW /**/
233#$d_dosuid DOSUID /**/
234
2304df62
AD
235/* HAS_DUP2:
236 * This symbol, if defined, indicates that the dup2 routine is
237 * available to duplicate file descriptors.
a687059c 238 */
2304df62 239#$d_dup2 HAS_DUP2 /**/
a687059c 240
2304df62 241/* HAS_FCHMOD:
378cc40b
LW
242 * This symbol, if defined, indicates that the fchmod routine is available
243 * to change mode of opened files. If unavailable, use chmod().
244 */
2304df62 245#$d_fchmod HAS_FCHMOD /**/
378cc40b 246
2304df62 247/* HAS_FCHOWN:
378cc40b
LW
248 * This symbol, if defined, indicates that the fchown routine is available
249 * to change ownership of opened files. If unavailable, use chown().
250 */
2304df62 251#$d_fchown HAS_FCHOWN /**/
378cc40b 252
2304df62 253/* HAS_FCNTL:
fe14fcc3
LW
254 * This symbol, if defined, indicates to the C program that
255 * the fcntl() function exists.
a687059c 256 */
2304df62 257#$d_fcntl HAS_FCNTL /**/
a687059c 258
a0d0e21e
LW
259/* HAS_FGETPOS:
260 * This symbol, if defined, indicates that the fgetpos routine is
261 * available to get the file position indicator, similar to ftell().
262 */
263#$d_fgetpos HAS_FGETPOS /**/
264
2304df62 265/* FLEXFILENAMES:
7e1cf235
LW
266 * This symbol, if defined, indicates that the system supports filenames
267 * longer than 14 characters.
268 */
269#$d_flexfnam FLEXFILENAMES /**/
270
2304df62
AD
271/* HAS_FLOCK:
272 * This symbol, if defined, indicates that the flock routine is
a687059c
LW
273 * available to do file locking.
274 */
2304df62 275#$d_flock HAS_FLOCK /**/
a687059c 276
a0d0e21e
LW
277/* HAS_FORK:
278 * This symbol, if defined, indicates that the fork routine is
279 * available.
280 */
281#$d_fork HAS_FORK /**/
282
283/* HAS_FSETPOS:
284 * This symbol, if defined, indicates that the fsetpos routine is
285 * available to set the file position indicator, similar to fseek().
286 */
287#$d_fsetpos HAS_FSETPOS /**/
288
2304df62 289/* HAS_GETGROUPS:
378cc40b
LW
290 * This symbol, if defined, indicates that the getgroups() routine is
291 * available to get the list of process groups. If unavailable, multiple
292 * groups are probably not supported.
293 */
2304df62 294#$d_getgrps HAS_GETGROUPS /**/
378cc40b 295
2304df62
AD
296/* HAS_GETHOSTENT:
297 * This symbol, if defined, indicates that the gethostent routine is
a687059c
LW
298 * available to lookup host names in some data base or other.
299 */
2304df62
AD
300#$d_gethent HAS_GETHOSTENT /**/
301
302/* HAS_UNAME:
303 * This symbol, if defined, indicates that the C program may use the
304 * uname() routine to derive the host name. See also HAS_GETHOSTNAME
305 * and PHOSTNAME.
306 */
307#$d_uname HAS_UNAME /**/
a687059c 308
a0d0e21e
LW
309/* HAS_GETLOGIN:
310 * This symbol, if defined, indicates that the getlogin routine is
311 * available to get the login name.
312 */
313#$d_getlogin HAS_GETLOGIN /**/
314
2304df62
AD
315/* HAS_GETPGRP:
316 * This symbol, if defined, indicates that the getpgrp routine is
a687059c
LW
317 * available to get the current process group.
318 */
2304df62 319#$d_getpgrp HAS_GETPGRP /**/
a687059c 320
2304df62 321/* HAS_GETPGRP2:
d8f2e4cc
LW
322 * This symbol, if defined, indicates that the getpgrp2() (as in DG/UX)
323 * routine is available to get the current process group.
324 */
2304df62 325#$d_getpgrp2 HAS_GETPGRP2 /**/
d8f2e4cc 326
a0d0e21e
LW
327/* HAS_GETPPID:
328 * This symbol, if defined, indicates that the getppid routine is
329 * available to get the parent process ID.
330 */
331#$d_getppid HAS_GETPPID /**/
332
2304df62
AD
333/* HAS_GETPRIORITY:
334 * This symbol, if defined, indicates that the getpriority routine is
a687059c
LW
335 * available to get a process's priority.
336 */
2304df62 337#$d_getprior HAS_GETPRIORITY /**/
a687059c 338
a0d0e21e
LW
339/* HAS_HTONL:
340 * This symbol, if defined, indicates that the htonl() routine (and
341 * friends htons() ntohl() ntohs()) are available to do network
342 * order byte swapping.
343 */
344/* HAS_HTONS:
345 * This symbol, if defined, indicates that the htons() routine (and
346 * friends htonl() ntohl() ntohs()) are available to do network
347 * order byte swapping.
348 */
349/* HAS_NTOHL:
350 * This symbol, if defined, indicates that the ntohl() routine (and
351 * friends htonl() htons() ntohs()) are available to do network
352 * order byte swapping.
353 */
354/* HAS_NTOHS:
355 * This symbol, if defined, indicates that the ntohs() routine (and
356 * friends htonl() htons() ntohl()) are available to do network
357 * order byte swapping.
358 */
359#$d_htonl HAS_HTONL /**/
360#$d_htonl HAS_HTONS /**/
361#$d_htonl HAS_NTOHL /**/
362#$d_htonl HAS_NTOHS /**/
363
ecfc5424
AD
364/* HAS_ISASCII:
365 * This manifest constant lets the C program know that isascii
366 * is available.
367 */
368#$d_isascii HAS_ISASCII /**/
369
2304df62 370/* HAS_KILLPG:
378cc40b
LW
371 * This symbol, if defined, indicates that the killpg routine is available
372 * to kill process groups. If unavailable, you probably should use kill
373 * with a negative process number.
374 */
2304df62 375#$d_killpg HAS_KILLPG /**/
378cc40b 376
2304df62
AD
377/* HAS_LINK:
378 * This symbol, if defined, indicates that the link routine is
379 * available to create hard links.
0d3e774c 380 */
2304df62 381#$d_link HAS_LINK /**/
0d3e774c 382
ecfc5424
AD
383/* HAS_LOCALECONV:
384 * This symbol, if defined, indicates that the localeconv routine is
385 * available for numeric and monetary formatting conventions.
386 */
387#$d_locconv HAS_LOCALECONV /**/
388
a0d0e21e
LW
389/* HAS_LOCKF:
390 * This symbol, if defined, indicates that the lockf routine is
391 * available to do file locking.
392 */
393#$d_lockf HAS_LOCKF /**/
394
2304df62
AD
395/* HAS_LSTAT:
396 * This symbol, if defined, indicates that the lstat routine is
397 * available to do file stats on symbolic links.
a687059c 398 */
2304df62 399#$d_lstat HAS_LSTAT /**/
a687059c 400
a0d0e21e
LW
401/* HAS_MBLEN:
402 * This symbol, if defined, indicates that the mblen routine is available
403 * to find the number of bytes in a multibye character.
404 */
405#$d_mblen HAS_MBLEN /**/
406
407/* HAS_MBSTOWCS:
408 * This symbol, if defined, indicates that the mbstowcs routine is
409 * available to covert a multibyte string into a wide character string.
410 */
411#$d_mbstowcs HAS_MBSTOWCS /**/
412
413/* HAS_MBTOWC:
414 * This symbol, if defined, indicates that the mbtowc routine is available
415 * to covert a multibyte to a wide character.
416 */
417#$d_mbtowc HAS_MBTOWC /**/
418
2304df62
AD
419/* HAS_MEMCMP:
420 * This symbol, if defined, indicates that the memcmp routine is available
421 * to compare blocks of memory.
378cc40b 422 */
2304df62
AD
423#$d_memcmp HAS_MEMCMP /**/
424
425/* HAS_MEMCPY:
9f971974 426 * This symbol, if defined, indicates that the memcpy routine is available
2304df62 427 * to copy blocks of memory.
9f971974 428 */
2304df62 429#$d_memcpy HAS_MEMCPY /**/
9f971974 430
2304df62 431/* HAS_MEMMOVE:
9f971974 432 * This symbol, if defined, indicates that the memmove routine is available
2304df62
AD
433 * to copy potentially overlapping blocks of memory. This should be used
434 * only when HAS_SAFE_BCOPY is not defined. If neither is there, roll your
435 * own version.
9f971974 436 */
2304df62 437#$d_memmove HAS_MEMMOVE /**/
9f971974 438
2304df62 439/* HAS_MEMSET:
9f971974 440 * This symbol, if defined, indicates that the memset routine is available
2304df62 441 * to set blocks of memory.
9f971974 442 */
2304df62 443#$d_memset HAS_MEMSET /**/
378cc40b 444
2304df62 445/* HAS_MKDIR:
a687059c
LW
446 * This symbol, if defined, indicates that the mkdir routine is available
447 * to create directories. Otherwise you should fork off a new process to
448 * exec /bin/mkdir.
449 */
2304df62 450#$d_mkdir HAS_MKDIR /**/
fe14fcc3 451
ecfc5424
AD
452/* HAS_MKFIFO:
453 * This symbol, if defined, indicates that the mkfifo routine is
454 * available to create FIFOs. Otherwise, mknod should be able to
455 * do it for you. However, if mkfifo is there, mknod might require
456 * super-user privileges which mkfifo will not.
457 */
458#$d_mkfifo HAS_MKFIFO /**/
459
a0d0e21e
LW
460/* HAS_MKTIME:
461 * This symbol, if defined, indicates that the mktime routine is
462 * available.
463 */
464#$d_mktime HAS_MKTIME /**/
465
2304df62 466/* HAS_MSG:
fe14fcc3 467 * This symbol, if defined, indicates that the entire msg*(2) library is
2304df62 468 * supported (IPC mechanism based on message queues).
fe14fcc3 469 */
2304df62 470#$d_msg HAS_MSG /**/
fe14fcc3 471
a0d0e21e
LW
472/* HAS_NICE:
473 * This symbol, if defined, indicates that the nice routine is
474 * available.
fe14fcc3 475 */
a0d0e21e 476#$d_nice HAS_NICE /**/
a687059c 477
a0d0e21e
LW
478/* HAS_OPEN3:
479 * This manifest constant lets the C program know that the three
480 * argument form of open(2) is available.
fe14fcc3 481 */
a0d0e21e 482#$d_open3 HAS_OPEN3 /**/
fe14fcc3 483
ecfc5424
AD
484/* HAS_PATHCONF:
485 * This symbol, if defined, indicates that pathconf() is available
486 * to determine file-system related limits and options associated
487 * with a given filename.
488 */
489/* HAS_FPATHCONF:
490 * This symbol, if defined, indicates that pathconf() is available
491 * to determine file-system related limits and options associated
492 * with a given open file descriptor.
493 */
494#$d_pathconf HAS_PATHCONF /**/
495#$d_fpathconf HAS_FPATHCONF /**/
496
a0d0e21e
LW
497/* HAS_PAUSE:
498 * This symbol, if defined, indicates that the pause routine is
499 * available to suspend a process until a signal is received.
a687059c 500 */
a0d0e21e 501#$d_pause HAS_PAUSE /**/
a687059c 502
a0d0e21e
LW
503/* HAS_PIPE:
504 * This symbol, if defined, indicates that the pipe routine is
505 * available to create an inter-process channel.
fe14fcc3 506 */
a0d0e21e
LW
507#$d_pipe HAS_PIPE /**/
508
8e07c86e
AD
509/* HAS_POLL:
510 * This symbol, if defined, indicates that the poll routine is
511 * available to poll active file descriptors.
512 */
513#$d_poll HAS_POLL /**/
514
a0d0e21e
LW
515/* HAS_READDIR:
516 * This symbol, if defined, indicates that the readdir routine is
517 * available to read directory entries. You may have to include
518 * <dirent.h>. See I_DIRENT.
519 */
520#$d_readdir HAS_READDIR /**/
521
522/* HAS_SEEKDIR:
523 * This symbol, if defined, indicates that the seekdir routine is
524 * available. You may have to include <dirent.h>. See I_DIRENT.
525 */
526#$d_seekdir HAS_SEEKDIR /**/
527
528/* HAS_TELLDIR:
529 * This symbol, if defined, indicates that the telldir routine is
530 * available. You may have to include <dirent.h>. See I_DIRENT.
531 */
532#$d_telldir HAS_TELLDIR /**/
533
534/* HAS_REWINDDIR:
535 * This symbol, if defined, indicates that the rewinddir routine is
536 * available. You may have to include <dirent.h>. See I_DIRENT.
537 */
538#$d_rewinddir HAS_REWINDDIR /**/
539
540/* HAS_READLINK:
541 * This symbol, if defined, indicates that the readlink routine is
542 * available to read the value of a symbolic link.
543 */
544#$d_readlink HAS_READLINK /**/
fe14fcc3 545
2304df62 546/* HAS_RENAME:
378cc40b
LW
547 * This symbol, if defined, indicates that the rename routine is available
548 * to rename files. Otherwise you should do the unlink(), link(), unlink()
549 * trick.
550 */
2304df62 551#$d_rename HAS_RENAME /**/
378cc40b 552
2304df62
AD
553/* HAS_RMDIR:
554 * This symbol, if defined, indicates that the rmdir routine is
555 * available to remove directories. Otherwise you should fork off a
556 * new process to exec /bin/rmdir.
9f971974 557 */
2304df62 558#$d_rmdir HAS_RMDIR /**/
9f971974 559
ecfc5424
AD
560/* HAS_SAFE_BCOPY:
561 * This symbol, if defined, indicates that the bcopy routine is available
562 * to copy potentially overlapping memory blocks. Otherwise you should
563 * probably use memmove() or memcpy(). If neither is defined, roll your
564 * own version.
565 */
566#$d_safebcpy HAS_SAFE_BCOPY /**/
567
568/* HAS_SAFE_MEMCPY:
569 * This symbol, if defined, indicates that the memcpy routine is available
570 * to copy potentially overlapping memory blocks. Otherwise you should
571 * probably use memmove() or memcpy(). If neither is defined, roll your
572 * own version.
573 */
574#$d_safemcpy HAS_SAFE_MEMCPY /**/
575
2304df62
AD
576/* HAS_SELECT:
577 * This symbol, if defined, indicates that the select routine is
578 * available to select active file descriptors. If the timeout field
579 * is used, <sys/time.h> may need to be included.
fe14fcc3 580 */
2304df62 581#$d_select HAS_SELECT /**/
a687059c 582
2304df62 583/* HAS_SEM:
fe14fcc3
LW
584 * This symbol, if defined, indicates that the entire sem*(2) library is
585 * supported.
586 */
2304df62 587#$d_sem HAS_SEM /**/
fe14fcc3 588
2304df62 589/* HAS_SETEGID:
378cc40b
LW
590 * This symbol, if defined, indicates that the setegid routine is available
591 * to change the effective gid of the current program.
592 */
2304df62 593#$d_setegid HAS_SETEGID /**/
378cc40b 594
2304df62 595/* HAS_SETEUID:
378cc40b
LW
596 * This symbol, if defined, indicates that the seteuid routine is available
597 * to change the effective uid of the current program.
598 */
2304df62
AD
599#$d_seteuid HAS_SETEUID /**/
600
a0d0e21e
LW
601/* HAS_SETLINEBUF:
602 * This symbol, if defined, indicates that the setlinebuf routine is
603 * available to change stderr or stdout from block-buffered or unbuffered
604 * to a line-buffered mode.
605 */
606#$d_setlinebuf HAS_SETLINEBUF /**/
607
608/* HAS_SETLOCALE:
609 * This symbol, if defined, indicates that the setlocale routine is
610 * available to handle locale-specific ctype implementations.
611 */
612#$d_setlocale HAS_SETLOCALE /**/
613
2304df62
AD
614/* HAS_SETPGID:
615 * This symbol, if defined, indicates that the setpgid routine is
616 * available to set process group ID.
617 */
618#$d_setpgid HAS_SETPGID /**/
378cc40b 619
ecfc5424
AD
620/* HAS_SETPGRP:
621 * This symbol, if defined, indicates that the setpgrp routine is
622 * available to set the current process group.
623 */
624/* USE_BSDPGRP:
625 * This symbol, if defined, indicates that the BSD notion of process
626 * group is to be used. For instance, you have to say setpgrp(pid, pgrp)
627 * instead of the USG setpgrp().
628 */
629#$d_setpgrp HAS_SETPGRP /**/
630#$d_bsdpgrp USE_BSDPGRP /**/
631
2304df62 632/* HAS_SETPGRP2:
d8f2e4cc
LW
633 * This symbol, if defined, indicates that the setpgrp2() (as in DG/UX)
634 * routine is available to set the current process group.
635 */
2304df62 636#$d_setpgrp2 HAS_SETPGRP2 /**/
d8f2e4cc 637
2304df62
AD
638/* HAS_SETPRIORITY:
639 * This symbol, if defined, indicates that the setpriority routine is
a687059c
LW
640 * available to set a process's priority.
641 */
2304df62 642#$d_setprior HAS_SETPRIORITY /**/
a687059c 643
2304df62 644/* HAS_SETREGID:
a687059c 645 * This symbol, if defined, indicates that the setregid routine is
2304df62
AD
646 * available to change the real and effective gid of the current
647 * process.
a687059c 648 */
2304df62 649/* HAS_SETRESGID:
a687059c
LW
650 * This symbol, if defined, indicates that the setresgid routine is
651 * available to change the real, effective and saved gid of the current
2304df62 652 * process.
a687059c 653 */
2304df62
AD
654#$d_setregid HAS_SETREGID /**/
655#$d_setresgid HAS_SETRESGID /**/
a687059c 656
2304df62 657/* HAS_SETREUID:
a687059c 658 * This symbol, if defined, indicates that the setreuid routine is
2304df62
AD
659 * available to change the real and effective uid of the current
660 * process.
a687059c 661 */
2304df62 662/* HAS_SETRESUID:
a687059c
LW
663 * This symbol, if defined, indicates that the setresuid routine is
664 * available to change the real, effective and saved uid of the current
2304df62 665 * process.
a687059c 666 */
2304df62
AD
667#$d_setreuid HAS_SETREUID /**/
668#$d_setresuid HAS_SETRESUID /**/
a687059c 669
2304df62 670/* HAS_SETRGID:
378cc40b
LW
671 * This symbol, if defined, indicates that the setrgid routine is available
672 * to change the real gid of the current program.
673 */
2304df62 674#$d_setrgid HAS_SETRGID /**/
378cc40b 675
2304df62 676/* HAS_SETRUID:
378cc40b
LW
677 * This symbol, if defined, indicates that the setruid routine is available
678 * to change the real uid of the current program.
679 */
2304df62
AD
680#$d_setruid HAS_SETRUID /**/
681
682/* HAS_SETSID:
683 * This symbol, if defined, indicates that the setsid routine is
684 * available to set the process group ID.
685 */
686#$d_setsid HAS_SETSID /**/
fe14fcc3 687
2304df62 688/* HAS_SHM:
fe14fcc3
LW
689 * This symbol, if defined, indicates that the entire shm*(2) library is
690 * supported.
691 */
2304df62 692#$d_shm HAS_SHM /**/
fe14fcc3 693
a0d0e21e
LW
694/* Shmat_t:
695 * This symbol holds the return type of the shmat() system call.
696 * Usually set to 'void *' or 'char *'.
fe14fcc3 697 */
a0d0e21e
LW
698/* HAS_SHMAT_PROTOTYPE:
699 * This symbol, if defined, indicates that the sys/shm.h includes
700 * a prototype for shmat(). Otherwise, it is up to the program to
701 * guess one. Shmat_t shmat _((int, Shmat_t, int)) is a good guess,
702 * but not always right so it should be emitted by the program only
703 * when HAS_SHMAT_PROTOTYPE is not defined to avoid conflicting defs.
fe14fcc3 704 */
a0d0e21e
LW
705#define Shmat_t $shmattype /**/
706#$d_shmatprototype HAS_SHMAT_PROTOTYPE /**/
fe14fcc3 707
568ef1f6
PP
708/* HAS_SIGACTION:
709 * This symbol, if defined, indicates that Vr4's sigaction() routine
710 * is available.
711 */
712#$d_sigaction HAS_SIGACTION /**/
713
2304df62 714/* HAS_SOCKET:
a687059c
LW
715 * This symbol, if defined, indicates that the BSD socket interface is
716 * supported.
717 */
2304df62
AD
718/* HAS_SOCKETPAIR:
719 * This symbol, if defined, indicates that the BSD socketpair() call is
a687059c
LW
720 * supported.
721 */
2304df62
AD
722#$d_socket HAS_SOCKET /**/
723#$d_sockpair HAS_SOCKETPAIR /**/
a687059c 724
2304df62 725/* USE_STAT_BLOCKS:
c51b80d1
LW
726 * This symbol is defined if this system has a stat structure declaring
727 * st_blksize and st_blocks.
728 */
2304df62 729#$d_statblks USE_STAT_BLOCKS /**/
c51b80d1 730
16d20bd9
AD
731/* USE_STDIO_PTR:
732 * This symbol is defined if the _ptr and _cnt fields (or similar)
733 * of the stdio FILE structure can be used to access the stdio buffer
734 * for a file handle. If this is defined, then the FILE_ptr(fp)
735 * and FILE_cnt(fp) macros will also be defined and should be used
736 * to access these fields.
737 */
738/* USE_STDIO_BASE:
739 * This symbol is defined if the _base field (or similar) of the
740 * stdio FILE structure can be used to access the stdio buffer for
741 * a file handle. If this is defined, then the FILE_base(fp) macro
742 * will also be defined and should be used to access this field.
743 * Also, the FILE_bufsiz(fp) macro will be defined and should be used
744 * to determine the number of bytes in the buffer. USE_STDIO_BASE
745 * will never be defined unless USE_STDIO_PTR is.
746 */
747#$d_stdstdio USE_STDIO_PTR /**/
748#$d_stdiobase USE_STDIO_BASE /**/
749
750/* FILE_ptr:
751 * This macro is used to access the _ptr field (or equivalent) of the
752 * FILE structure pointed to by its argument. This macro will always be
753 * defined if USE_STDIO_PTR is defined.
754 */
c2960299
AD
755/* STDIO_PTR_LVALUE:
756 * This symbol is defined if the FILE_ptr macro can be used as an
757 * lvalue.
758 */
16d20bd9
AD
759/* FILE_cnt:
760 * This macro is used to access the _cnt field (or equivalent) of the
761 * FILE structure pointed to by its argument. This macro will always be
762 * defined if USE_STDIO_PTR is defined.
763 */
c2960299
AD
764/* STDIO_CNT_LVALUE:
765 * This symbol is defined if the FILE_cnt macro can be used as an
766 * lvalue.
767 */
16d20bd9
AD
768#ifdef USE_STDIO_PTR
769#define FILE_ptr(fp) $stdio_ptr
4aa0a1f7 770#$d_stdio_ptr_lval STDIO_PTR_LVALUE /**/
16d20bd9 771#define FILE_cnt(fp) $stdio_cnt
4aa0a1f7 772#$d_stdio_cnt_lval STDIO_CNT_LVALUE /**/
16d20bd9
AD
773#endif
774
775/* FILE_base:
776 * This macro is used to access the _base field (or equivalent) of the
777 * FILE structure pointed to by its argument. This macro will always be
778 * defined if USE_STDIO_BASE is defined.
779 */
780/* FILE_bufsiz:
781 * This macro is used to determine the number of bytes in the I/O
782 * buffer pointed to by _base field (or equivalent) of the FILE
783 * structure pointed to its argument. This macro will always be defined
784 * if USE_STDIO_BASE is defined.
36ce8bec 785 */
16d20bd9
AD
786#ifdef USE_STDIO_BASE
787#define FILE_base(fp) $stdio_base
788#define FILE_bufsiz(fp) $stdio_bufsiz
789#endif
36ce8bec 790
a0d0e21e
LW
791/* HAS_STRCHR:
792 * This symbol is defined to indicate that the strchr()/strrchr()
793 * functions are available for string searching. If not, try the
794 * index()/rindex() pair.
795 */
796/* HAS_INDEX:
797 * This symbol is defined to indicate that the index()/rindex()
798 * functions are available for string searching.
799 */
800#$d_strchr HAS_STRCHR /**/
801#$d_index HAS_INDEX /**/
802
803/* HAS_STRCOLL:
804 * This symbol, if defined, indicates that the strcoll routine is
805 * available to compare strings using collating information.
806 */
807#$d_strcoll HAS_STRCOLL /**/
808
2304df62 809/* USE_STRUCT_COPY:
8d063cd8
LW
810 * This symbol, if defined, indicates that this C compiler knows how
811 * to copy structures. If undefined, you'll need to use a block copy
812 * routine of some sort instead.
813 */
2304df62 814#$d_strctcpy USE_STRUCT_COPY /**/
8d063cd8 815
a0d0e21e
LW
816/* HAS_STRERROR:
817 * This symbol, if defined, indicates that the strerror routine is
818 * available to translate error numbers to strings. See the writeup
819 * of Strerror() in this file before you try to define your own.
820 */
821/* HAS_SYS_ERRLIST:
822 * This symbol, if defined, indicates that the sys_errlist array is
823 * available to translate error numbers to strings. The extern int
824 * sys_nerr gives the size of that table.
825 */
826/* Strerror:
827 * This preprocessor symbol is defined as a macro if strerror() is
828 * not available to translate error numbers to strings but sys_errlist[]
829 * array is there.
830 */
831#$d_strerror HAS_STRERROR /**/
832#$d_syserrlst HAS_SYS_ERRLIST /**/
833#define Strerror(e) $d_strerrm
834
835/* HAS_STRXFRM:
836 * This symbol, if defined, indicates that the strxfrm() routine is
837 * available to transform strings.
838 */
839#$d_strxfrm HAS_STRXFRM /**/
840
2304df62 841/* HAS_SYMLINK:
2e1b3b7e
KK
842 * This symbol, if defined, indicates that the symlink routine is available
843 * to create symbolic links.
844 */
2304df62 845#$d_symlink HAS_SYMLINK /**/
2e1b3b7e 846
2304df62
AD
847/* HAS_SYSCALL:
848 * This symbol, if defined, indicates that the syscall routine is
849 * available to call arbitrary system calls. If undefined, that's tough.
a687059c 850 */
2304df62 851#$d_syscall HAS_SYSCALL /**/
e5d73d77 852
ecfc5424
AD
853/* HAS_SYSCONF:
854 * This symbol, if defined, indicates that sysconf() is available
855 * to determine system related limits and options.
856 */
857#$d_sysconf HAS_SYSCONF /**/
858
2304df62
AD
859/* HAS_SYSTEM:
860 * This symbol, if defined, indicates that the system routine is
861 * available to issue a shell command.
9f971974 862 */
2304df62 863#$d_system HAS_SYSTEM /**/
9f971974 864
a0d0e21e
LW
865/* HAS_TCGETPGRP:
866 * This symbol, if defined, indicates that the tcgetpgrp routine is
867 * available to get foreground process group ID.
85e6fe83 868 */
a0d0e21e
LW
869#$d_tcgetpgrp HAS_TCGETPGRP /**/
870
871/* HAS_TCSETPGRP:
872 * This symbol, if defined, indicates that the tcsetpgrp routine is
873 * available to set foreground process group ID.
874 */
875#$d_tcsetpgrp HAS_TCSETPGRP /**/
85e6fe83 876
ecfc5424
AD
877/* Time_t:
878 * This symbol holds the type returned by time(). It can be long,
879 * or time_t on BSD sites (in which case <sys/types.h> should be
880 * included).
881 */
882#define Time_t $timetype /* Time type */
883
2304df62
AD
884/* HAS_TIMES:
885 * This symbol, if defined, indicates that the times() routine exists.
886 * Note that this became obsolete on some systems (SUNOS), which now
887 * use getrusage(). It may be necessary to include <sys/times.h>.
888 */
889#$d_times HAS_TIMES /**/
890
891/* HAS_TRUNCATE:
87250799
LW
892 * This symbol, if defined, indicates that the truncate routine is
893 * available to truncate files.
894 */
2304df62 895#$d_truncate HAS_TRUNCATE /**/
87250799 896
a0d0e21e
LW
897/* HAS_TZNAME:
898 * This symbol, if defined, indicates that the tzname[] array is
899 * available to access timezone names.
900 */
901#$d_tzname HAS_TZNAME /**/
902
903/* HAS_UMASK:
904 * This symbol, if defined, indicates that the umask routine is
905 * available to set and get the value of the file creation mask.
906 */
907#$d_umask HAS_UMASK /**/
908
909/* HAS_VFORK:
910 * This symbol, if defined, indicates that vfork() exists.
2304df62 911 */
a0d0e21e 912#$d_vfork HAS_VFORK /**/
2304df62 913
ecfc5424
AD
914/* Signal_t:
915 * This symbol's value is either "void" or "int", corresponding to the
916 * appropriate return type of a signal handler. Thus, you can declare
917 * a signal handler using "Signal_t (*handler)()", and define the
918 * handler using "Signal_t handler(sig)".
919 */
ecfc5424 920#define Signal_t $signal_t /* Signal handler's return type */
36ce8bec 921
2304df62 922/* HASVOLATILE:
afd9f252
LW
923 * This symbol, if defined, indicates that this C compiler knows about
924 * the volatile declaration.
925 */
926#$d_volatile HASVOLATILE /**/
2304df62
AD
927#ifndef HASVOLATILE
928#define volatile
929#endif
afd9f252 930
2304df62 931/* HAS_VPRINTF:
a687059c
LW
932 * This symbol, if defined, indicates that the vprintf routine is available
933 * to printf with a pointer to an argument list. If unavailable, you
934 * may need to write your own, probably in terms of _doprnt().
935 */
2304df62 936/* USE_CHAR_VSPRINTF:
a687059c
LW
937 * This symbol is defined if this system has vsprintf() returning type
938 * (char*). The trend seems to be to declare it as "int vsprintf()". It
939 * is up to the package author to declare vsprintf correctly based on the
940 * symbol.
941 */
2304df62
AD
942#$d_vprintf HAS_VPRINTF /**/
943#$d_charvspr USE_CHAR_VSPRINTF /**/
a687059c 944
2304df62 945/* HAS_WAIT4:
bf38876a
LW
946 * This symbol, if defined, indicates that wait4() exists.
947 */
2304df62 948#$d_wait4 HAS_WAIT4 /**/
bf38876a 949
2304df62
AD
950/* HAS_WAITPID:
951 * This symbol, if defined, indicates that the waitpid routine is
952 * available to wait for child process.
39c3038c 953 */
2304df62 954#$d_waitpid HAS_WAITPID /**/
39c3038c 955
a0d0e21e
LW
956/* HAS_WCSTOMBS:
957 * This symbol, if defined, indicates that the wcstombs routine is
958 * available to convert wide character strings to multibyte strings.
959 */
960#$d_wcstombs HAS_WCSTOMBS /**/
961
962/* HAS_WCTOMB:
963 * This symbol, if defined, indicates that the wctomb routine is available
964 * to covert a wide character to a multibyte.
965 */
966#$d_wctomb HAS_WCTOMB /**/
967
968/* Fpos_t:
969 * This symbol holds the type used to declare file positions in libc.
970 * It can be fpos_t, long, uint, etc... It may be necessary to include
971 * <sys/types.h> to get any typedef'ed information.
972 */
973#define Fpos_t $fpostype /* File position type */
974
975/* Gid_t:
976 * This symbol holds the return type of getgid() and the type of
977 * argument to setrgid() and related functions. Typically,
978 * it is the type of group ids in the kernel. It can be int, ushort,
979 * uid_t, etc... It may be necessary to include <sys/types.h> to get
980 * any typedef'ed information.
378cc40b 981 */
a0d0e21e 982#define Gid_t $gidtype /* Type for getgid(), etc... */
378cc40b 983
ecfc5424
AD
984/* Groups_t:
985 * This symbol holds the type used for the second argument to
986 * getgroups(). Usually, this is the same of gidtype, but
987 * sometimes it isn't. It can be int, ushort, uid_t, etc...
988 * It may be necessary to include <sys/types.h> to get any
989 * typedef'ed information. This is only required if you have
990 * getgroups().
991 */
992#ifdef HAS_GETGROUPS
993#define Groups_t $groupstype /* Type for 2nd arg to getgroups() */
994#endif
995
232e078e
AD
996/* DB_Prefix_t:
997 * This symbol contains the type of the prefix structure element
998 * in the <db.h> header file. In older versions of DB, it was
999 * int, while in newer ones it is u_int32_t.
1000 */
1001/* DB_Hash_t:
1002 * This symbol contains the type of the prefix structure element
1003 * in the <db.h> header file. In older versions of DB, it was
1004 * int, while in newer ones it is size_t.
1005 */
1006#define DB_Hash_t $db_hashtype /**/
1007#define DB_Prefix_t $db_prefixtype /**/
1008
2304df62
AD
1009/* I_DIRENT:
1010 * This symbol, if defined, indicates to the C program that it should
1011 * include <dirent.h>. Using this symbol also triggers the definition
1012 * of the Direntry_t define which ends up being 'struct dirent' or
1013 * 'struct direct' depending on the availability of <dirent.h>.
1c3d792e 1014 */
2304df62
AD
1015/* DIRNAMLEN:
1016 * This symbol, if defined, indicates to the C program that the length
1017 * of directory entry names is provided by a d_namlen field. Otherwise
1018 * you need to do strlen() on the d_name field.
1019 */
a0d0e21e
LW
1020/* Direntry_t:
1021 * This symbol is set to 'struct direct' or 'struct dirent' depending on
1022 * whether dirent is available or not. You should use this pseudo type to
1023 * portably declare your directory entries.
1024 */
2304df62
AD
1025#$i_dirent I_DIRENT /**/
1026#$d_dirnamlen DIRNAMLEN /**/
a0d0e21e
LW
1027#define Direntry_t $direntrytype
1028
1029/* I_DLFCN:
1030 * This symbol, if defined, indicates that <dlfcn.h> exists and should
1031 * be included.
1032 */
1033#$i_dlfcn I_DLFCN /**/
1c3d792e 1034
2304df62 1035/* I_FCNTL:
fe14fcc3 1036 * This manifest constant tells the C program to include <fcntl.h>.
a687059c 1037 */
2304df62 1038#$i_fcntl I_FCNTL /**/
a687059c 1039
a0d0e21e
LW
1040/* I_FLOAT:
1041 * This symbol, if defined, indicates to the C program that it should
1042 * include <float.h> to get definition of symbols like DBL_MAX or
1043 * DBL_MIN, i.e. machine dependent floating point values.
a687059c 1044 */
a0d0e21e 1045#$i_float I_FLOAT /**/
a687059c 1046
2304df62 1047/* I_GRP:
a687059c 1048 * This symbol, if defined, indicates to the C program that it should
2304df62 1049 * include <grp.h>.
a687059c 1050 */
2304df62 1051#$i_grp I_GRP /**/
a687059c 1052
a0d0e21e
LW
1053/* I_LIMITS:
1054 * This symbol, if defined, indicates to the C program that it should
1055 * include <limits.h> to get definition of symbols like WORD_BIT or
1056 * LONG_MAX, i.e. machine dependant limitations.
1057 */
1058#$i_limits I_LIMITS /**/
1059
1060/* I_MATH:
1061 * This symbol, if defined, indicates to the C program that it should
1062 * include <math.h>.
1063 */
1064#$i_math I_MATH /**/
1065
1066/* I_MEMORY:
1067 * This symbol, if defined, indicates to the C program that it should
1068 * include <memory.h>.
1069 */
1070#$i_memory I_MEMORY /**/
1071
232e078e 1072/* I_NDBM:
16d20bd9 1073 * This symbol, if defined, indicates that <ndbm.h> exists and should
232e078e
AD
1074 * be included.
1075 */
1076#$i_ndbm I_NDBM /**/
1077
ecfc5424
AD
1078/* I_NET_ERRNO:
1079 * This symbol, if defined, indicates that <net/errno.h> exists and
1080 * should be included.
2304df62 1081 */
ecfc5424 1082#$i_neterrno I_NET_ERRNO /**/
2304df62
AD
1083
1084/* I_NETINET_IN:
03a14243 1085 * This symbol, if defined, indicates to the C program that it should
2304df62 1086 * include <netinet/in.h>. Otherwise, you may try <sys/in.h>.
03a14243 1087 */
2304df62 1088#$i_niin I_NETINET_IN /**/
03a14243 1089
a0d0e21e
LW
1090/* I_PWD:
1091 * This symbol, if defined, indicates to the C program that it should
1092 * include <pwd.h>.
a687059c 1093 */
a0d0e21e
LW
1094/* PWQUOTA:
1095 * This symbol, if defined, indicates to the C program that struct passwd
1096 * contains pw_quota.
1097 */
1098/* PWAGE:
1099 * This symbol, if defined, indicates to the C program that struct passwd
1100 * contains pw_age.
1101 */
1102/* PWCHANGE:
1103 * This symbol, if defined, indicates to the C program that struct passwd
1104 * contains pw_change.
1105 */
1106/* PWCLASS:
1107 * This symbol, if defined, indicates to the C program that struct passwd
1108 * contains pw_class.
1109 */
1110/* PWEXPIRE:
1111 * This symbol, if defined, indicates to the C program that struct passwd
1112 * contains pw_expire.
1113 */
1114/* PWCOMMENT:
1115 * This symbol, if defined, indicates to the C program that struct passwd
1116 * contains pw_comment.
1117 */
1118#$i_pwd I_PWD /**/
1119#$d_pwquota PWQUOTA /**/
1120#$d_pwage PWAGE /**/
1121#$d_pwchange PWCHANGE /**/
1122#$d_pwclass PWCLASS /**/
1123#$d_pwexpire PWEXPIRE /**/
1124#$d_pwcomment PWCOMMENT /**/
a687059c 1125
2304df62
AD
1126/* I_STDDEF:
1127 * This symbol, if defined, indicates that <stddef.h> exists and should
a687059c
LW
1128 * be included.
1129 */
2304df62 1130#$i_stddef I_STDDEF /**/
a687059c 1131
a0d0e21e
LW
1132/* I_STDLIB:
1133 * This symbol, if defined, indicates that <stdlib.h> exists and should
1134 * be included.
1135 */
1136#$i_stdlib I_STDLIB /**/
1137
1138/* I_STRING:
85e6fe83
LW
1139 * This symbol, if defined, indicates to the C program that it should
1140 * include <string.h> (USG systems) instead of <strings.h> (BSD systems).
1141 */
1142#$i_string I_STRING /**/
1143
2304df62
AD
1144/* I_SYS_DIR:
1145 * This symbol, if defined, indicates to the C program that it should
1146 * include <sys/dir.h>.
d8f2e4cc 1147 */
2304df62
AD
1148#$i_sysdir I_SYS_DIR /**/
1149
1150/* I_SYS_FILE:
1151 * This symbol, if defined, indicates to the C program that it should
1152 * include <sys/file.h> to get definition of R_OK and friends.
d8f2e4cc 1153 */
2304df62
AD
1154#$i_sysfile I_SYS_FILE /**/
1155
1156/* I_SYS_IOCTL:
1157 * This symbol, if defined, indicates that <sys/ioctl.h> exists and should
1158 * be included. Otherwise, include <sgtty.h> or <termio.h>.
d8f2e4cc 1159 */
2304df62
AD
1160#$i_sysioctl I_SYS_IOCTL /**/
1161
1162/* I_SYS_NDIR:
1163 * This symbol, if defined, indicates to the C program that it should
1164 * include <sys/ndir.h>.
1165 */
1166#$i_sysndir I_SYS_NDIR /**/
1167
a0d0e21e
LW
1168/* I_SYS_PARAM:
1169 * This symbol, if defined, indicates to the C program that it should
1170 * include <sys/param.h>.
1171 */
1172#$i_sysparam I_SYS_PARAM /**/
1173
2304df62
AD
1174/* I_SYS_SELECT:
1175 * This symbol, if defined, indicates to the C program that it should
1176 * include <sys/select.h> in order to get definition of struct timeval.
1177 */
1178#$i_sysselct I_SYS_SELECT /**/
1179
a0d0e21e
LW
1180/* I_SYS_TIMES:
1181 * This symbol, if defined, indicates to the C program that it should
1182 * include <sys/times.h>.
1183 */
1184#$i_systimes I_SYS_TIMES /**/
1185
fed7345c
AD
1186/* I_SYS_TYPES:
1187 * This symbol, if defined, indicates to the C program that it should
1188 * include <sys/types.h>.
1189 */
1190#$i_systypes I_SYS_TYPES /**/
1191
25f94b33
AD
1192/* I_SYS_UN:
1193 * This symbol, if defined, indicates to the C program that it should
1194 * include <sys/un.h> to get UNIX domain socket definitions.
1195 */
1196#$i_sysun I_SYS_UN /**/
1197
a0d0e21e
LW
1198/* I_TERMIO:
1199 * This symbol, if defined, indicates that the program should include
1200 * <termio.h> rather than <sgtty.h>. There are also differences in
1201 * the ioctl() calls that depend on the value of this symbol.
1202 */
1203/* I_TERMIOS:
1204 * This symbol, if defined, indicates that the program should include
1205 * the POSIX termios.h rather than sgtty.h or termio.h.
1206 * There are also differences in the ioctl() calls that depend on the
1207 * value of this symbol.
1208 */
1209/* I_SGTTY:
1210 * This symbol, if defined, indicates that the program should include
1211 * <sgtty.h> rather than <termio.h>. There are also differences in
1212 * the ioctl() calls that depend on the value of this symbol.
1213 */
1214#$i_termio I_TERMIO /**/
1215#$i_termios I_TERMIOS /**/
1216#$i_sgtty I_SGTTY /**/
1217
2304df62
AD
1218/* I_TIME:
1219 * This symbol, if defined, indicates to the C program that it should
1220 * include <time.h>.
1221 */
1222/* I_SYS_TIME:
1223 * This symbol, if defined, indicates to the C program that it should
1224 * include <sys/time.h>.
fe14fcc3 1225 */
85e6fe83
LW
1226/* I_SYS_TIME_KERNEL:
1227 * This symbol, if defined, indicates to the C program that it should
1228 * include <sys/time.h> with KERNEL defined.
1229 */
2304df62
AD
1230#$i_time I_TIME /**/
1231#$i_systime I_SYS_TIME /**/
85e6fe83
LW
1232#$i_systimek I_SYS_TIME_KERNEL /**/
1233
1234/* I_UNISTD:
1235 * This symbol, if defined, indicates to the C program that it should
1236 * include <unistd.h>.
1237 */
1238#$i_unistd I_UNISTD /**/
d8f2e4cc 1239
2304df62 1240/* I_UTIME:
d8f2e4cc 1241 * This symbol, if defined, indicates to the C program that it should
2304df62 1242 * include <utime.h>.
d8f2e4cc 1243 */
2304df62 1244#$i_utime I_UTIME /**/
d8f2e4cc 1245
a0d0e21e
LW
1246/* I_STDARG:
1247 * This symbol, if defined, indicates that <stdarg.h> exists and should
1248 * be included.
1249 */
2304df62 1250/* I_VARARGS:
a687059c 1251 * This symbol, if defined, indicates to the C program that it should
2304df62 1252 * include <varargs.h>.
a687059c 1253 */
a0d0e21e
LW
1254#$i_stdarg I_STDARG /**/
1255#$i_varargs I_VARARGS /**/
1256
1257/* I_VFORK:
1258 * This symbol, if defined, indicates to the C program that it should
1259 * include vfork.h.
1260 */
1261#$i_vfork I_VFORK /**/
a687059c 1262
85e6fe83
LW
1263/* Off_t:
1264 * This symbol holds the type used to declare offsets in the kernel.
1265 * It can be int, long, off_t, etc... It may be necessary to include
1266 * <sys/types.h> to get any typedef'ed information.
1267 */
1268#define Off_t $lseektype /* <offset> type */
1269
ecfc5424
AD
1270/* Mode_t:
1271 * This symbol holds the type used to declare file modes
1272 * for systems calls. It is usually mode_t, but may be
1273 * int or unsigned short. It may be necessary to include <sys/types.h>
1274 * to get any typedef'ed information.
1275 */
1276#define Mode_t $modetype /* file mode parameter for system calls */
1277
8e07c86e
AD
1278/* VAL_O_NONBLOCK:
1279 * This symbol is to be used during open() or fcntl(F_SETFL) to turn on
1280 * non-blocking I/O for the file descriptor. Note that there is no way
1281 * back, i.e. you cannot turn it blocking again this way. If you wish to
1282 * alternatively switch between blocking and non-blocking, use the
1283 * ioctl(FIOSNBIO) call instead, but that is not supported by all devices.
1284 */
1285/* VAL_EAGAIN:
1286 * This symbol holds the errno error code set by read() when no data was
1287 * present on the non-blocking file descriptor.
1288 */
1289/* RD_NODATA:
1290 * This symbol holds the return code from read() when no data is present
1291 * on the non-blocking file descriptor. Be careful! If EOF_NONBLOCK is
1292 * not defined, then you can't distinguish between no data and EOF by
1293 * issuing a read(). You'll have to find another way to tell for sure!
1294 */
1295/* EOF_NONBLOCK:
1296 * This symbol, if defined, indicates to the C program that a read() on
1297 * a non-blocking file descriptor will return 0 on EOF, and not the value
1298 * held in RD_NODATA (-1 usually, in that case!).
1299 */
1300#define VAL_O_NONBLOCK $o_nonblock
1301#define VAL_EAGAIN $eagain
1302#define RD_NODATA $rd_nodata
1303#$d_eofnblk EOF_NONBLOCK
1304
a0d0e21e
LW
1305/* CAN_PROTOTYPE:
1306 * If defined, this macro indicates that the C compiler can handle
1307 * function prototypes.
85e6fe83 1308 */
a0d0e21e
LW
1309/* _:
1310 * This macro is used to declare function parameters for folks who want
1311 * to make declarations with prototypes using a different style than
1312 * the above macros. Use double parentheses. For example:
1313 *
1314 * int main _((int argc, char *argv[]));
1315 */
1316#$prototype CAN_PROTOTYPE /**/
1317#ifdef CAN_PROTOTYPE
1318#define _(args) args
1319#else
1320#define _(args) ()
1321#endif
85e6fe83 1322
2304df62
AD
1323/* RANDBITS:
1324 * This symbol contains the number of bits of random number the rand()
1325 * function produces. Usual values are 15, 16, and 31.
fe14fcc3 1326 */
2304df62
AD
1327#define RANDBITS $randbits /**/
1328
1329/* SCRIPTDIR:
1330 * This symbol holds the name of the directory in which the user wants
1331 * to put publicly executable scripts for the package in question. It
1332 * is often a directory that is mounted across diverse architectures.
1333 * Programs must be prepared to deal with ~name expansion.
fe14fcc3 1334 */
2304df62
AD
1335#define SCRIPTDIR "$scriptdir" /**/
1336
a0d0e21e
LW
1337/* Select_fd_set_t:
1338 * This symbol holds the type used for the 2nd, 3rd, and 4th
1339 * arguments to select. Usually, this is 'fd_set *', if HAS_FD_SET
1340 * is defined, and 'int *' otherwise. This is only useful if you
1341 * have select(), of course.
1342 */
1343#define Select_fd_set_t $selecttype /**/
1344
a0d0e21e
LW
1345/* Size_t:
1346 * This symbol holds the type used to declare length parameters
1347 * for string functions. It is usually size_t, but may be
1348 * unsigned long, int, etc. It may be necessary to include
1349 * <sys/types.h> to get any typedef'ed information.
1350 */
1351#define Size_t $sizetype /* length paramater for string functions */
1352
ecfc5424
AD
1353/* SSize_t:
1354 * This symbol holds the type used by functions that return
1355 * a count of bytes or an error condition. It must be a signed type.
1356 * It is usually ssize_t, but may be long or int, etc.
1357 * It may be necessary to include <sys/types.h> or <unistd.h>
1358 * to get any typedef'ed information.
1359 * We will pick a type such that sizeof(SSize_t) == sizeof(Size_t).
1360 */
1361#define SSize_t $ssizetype /* signed count of bytes */
1362
2304df62
AD
1363/* STDCHAR:
1364 * This symbol is defined to be the type of char used in stdio.h.
1365 * It has the values "unsigned char" or "char".
fe14fcc3 1366 */
2304df62
AD
1367#define STDCHAR $stdchar /**/
1368
1369/* Uid_t:
1370 * This symbol holds the type used to declare user ids in the kernel.
1371 * It can be int, ushort, uid_t, etc... It may be necessary to include
1372 * <sys/types.h> to get any typedef'ed information.
fe14fcc3 1373 */
2304df62 1374#define Uid_t $uidtype /* UID type */
fe14fcc3 1375
c07a80fd
PP
1376/* UNLINK_ALL_VERSIONS:
1377 * This symbol, if defined, indicates that the program should arrange
1378 * ro remove all versions of a file if unlink() is called.
1379 */
1380#$d_unlnkallvers UNLINK_ALL_VERSIONS /**/
1381
85e6fe83
LW
1382/* VMS:
1383 * This symbol, if defined, indicates that the program is running under
c07a80fd
PP
1384 * VMS. It is currently automatically set by cpps running under VMS,
1385 * and is included here for completeness only.
85e6fe83 1386 */
c07a80fd 1387#$d_vms VMS /**/
85e6fe83 1388
a0d0e21e
LW
1389/* LOC_SED:
1390 * This symbol holds the complete pathname to the sed program.
85e6fe83 1391 */
1aef975c
AD
1392#define LOC_SED "$full_sed" /**/
1393
4633a7c4
LW
1394/* ARCHLIB_EXP:
1395 * This symbol contains the ~name expanded version of ARCHLIB, to be used
1396 * in programs that are not prepared to deal with ~ expansion at run-time.
1397 */
1398#$d_archlib ARCHLIB_EXP "$archlibexp" /**/
1399
8e07c86e
AD
1400/* BYTEORDER:
1401 * This symbol hold the hexadecimal constant defined in byteorder,
1402 * i.e. 0x1234 or 0x4321, etc...
1403 */
1404#define BYTEORDER 0x$byteorder /* large digits for MSB */
1405
1aef975c
AD
1406/* CSH:
1407 * This symbol, if defined, indicates that the C-shell exists.
1408 * If defined, contains the full pathname of csh.
1409 */
1410#$d_csh CSH "$full_csh" /**/
85e6fe83 1411
a0d0e21e
LW
1412/* DLSYM_NEEDS_UNDERSCORE:
1413 * This symbol, if defined, indicates that we need to prepend an
1414 * underscore to the symbol name before calling dlsym(). This only
1415 * makes sense if you *have* dlsym, which we will presume is the
1416 * case if you're using dl_dlopen.xs.
85e6fe83 1417 */
a0d0e21e
LW
1418#$d_dlsymun DLSYM_NEEDS_UNDERSCORE /* */
1419
8e07c86e
AD
1420/* Gconvert:
1421 * This preprocessor macro is defined to convert a floating point
1422 * number to a string without a trailing decimal point. This
1423 * emulates the behavior of sprintf("%g"), but is sometimes much more
1424 * efficient. If gconvert() is not available, but gcvt() drops the
1425 * trailing decimal point, then gcvt() is used. If all else fails,
1426 * a macro using sprintf("%g") is used. Arguments for the Gconvert
1427 * macro are: value, number of digits, whether trailing zeros should
1428 * be retained, and the output buffer.
1429 * Possible values are:
1430 * d_Gconvert='gconvert((x),(n),(t),(b))'
1431 * d_Gconvert='gcvt((x),(n),(b))'
1432 * d_Gconvert='sprintf((b),"%.*g",(n),(x))'
1433 * The last two assume trailing zeros should not be kept.
1434 */
1435#define Gconvert(x,n,t,b) $d_Gconvert
1436
2304df62
AD
1437/* USE_DYNAMIC_LOADING:
1438 * This symbol, if defined, indicates that dynamic loading of
1439 * some sort is available.
a687059c 1440 */
2304df62 1441#$usedl USE_DYNAMIC_LOADING /**/
a687059c 1442
8e07c86e
AD
1443/* I_DBM:
1444 * This symbol, if defined, indicates that <dbm.h> exists and should
1445 * be included.
1446 */
1447/* I_RPCSVC_DBM:
1448 * This symbol, if defined, indicates that <rpcsvc/dbm.h> exists and
1449 * should be included.
1450 */
1451#$i_dbm I_DBM /**/
1452#$i_rpcsvcdbm I_RPCSVC_DBM /**/
1453
4633a7c4
LW
1454/* I_LOCALE:
1455 * This symbol, if defined, indicates to the C program that it should
1456 * include <locale.h>.
1457 */
1458#$i_locale I_LOCALE /**/
1459
1aef975c
AD
1460/* I_SYS_STAT:
1461 * This symbol, if defined, indicates to the C program that it should
1462 * include <sys/stat.h>.
1463 */
1464#$i_sysstat I_SYS_STAT /**/
1465
8e07c86e
AD
1466/* INTSIZE:
1467 * This symbol contains the size of an int, so that the C preprocessor
1468 * can make decisions based on it.
1469 */
1470#define INTSIZE $intsize /**/
1471
94b6baf5
AD
1472/* Free_t:
1473 * This variable contains the return type of free(). It is usually
1474 * void, but occasionally int.
1475 */
2304df62
AD
1476/* Malloc_t:
1477 * This symbol is the type of pointer returned by malloc and realloc.
36ce8bec 1478 */
2304df62 1479#define Malloc_t $malloctype /**/
94b6baf5 1480#define Free_t $freetype /**/
36ce8bec 1481
85e6fe83
LW
1482/* MYMALLOC:
1483 * This symbol, if defined, indicates that we're using our own malloc.
1484 */
1485#$d_mymalloc MYMALLOC /**/
1486
4633a7c4
LW
1487/* OLDARCHLIB_EXP:
1488 * This symbol contains the ~name expanded version of OLDARCHLIB, to be
1489 * used in programs that are not prepared to deal with ~ expansion at
1490 * run-time.
1491 */
1492#$d_oldarchlib OLDARCHLIB_EXP "$oldarchlibexp" /**/
1493
1494/* PRIVLIB_EXP:
1495 * This symbol contains the ~name expanded version of PRIVLIB, to be used
1496 * in programs that are not prepared to deal with ~ expansion at run-time.
1497 */
1498#define PRIVLIB_EXP "$privlibexp" /**/
1499
8e07c86e 1500/* SIG_NAME:
4633a7c4
LW
1501 * This symbol contains a list of signal names in order of
1502 * signal number. This is intended
8e07c86e
AD
1503 * to be used as a static array initialization, like this:
1504 * char *sig_name[] = { SIG_NAME };
1505 * The signals in the list are separated with commas, and each signal
1506 * is surrounded by double quotes. There is no leading SIG in the signal
4633a7c4
LW
1507 * name, i.e. SIGQUIT is known as "QUIT".
1508 * Gaps in the signal numbers (up to NSIG) are filled in with NUMnn,
1509 * etc., where nn is the actual signal number (e.g. NUM37).
8e07c86e
AD
1510 * The signal number for sig_name[i] is stored in sig_num[i].
1511 * The last element is 0 to terminate the list with a NULL. This
1512 * corresponds to the 0 at the end of the sig_num list.
8e07c86e 1513 */
8e07c86e 1514/* SIG_NUM:
4633a7c4 1515 * This symbol contains a list of signal numbers, in the same order as the
8e07c86e
AD
1516 * SIG_NAME list. It is suitable for static array initialization, as in:
1517 * int sig_num[] = { SIG_NUM };
1518 * The signals in the list are separated with commas, and the indices
1519 * within that list and the SIG_NAME list match, so it's easy to compute
1520 * the signal name from a number or vice versa at the price of a small
4633a7c4
LW
1521 * dynamic linear lookup.
1522 * Duplicates are allowed, but are moved to the end of the list.
1523 * The signal number corresponding to sig_name[i] is sig_number[i].
1524 * if (i < NSIG) then sig_number[i] == i.
1525 * The last element is 0, corresponding to the 0 at the end of
1526 * the sig_name list.
8e07c86e 1527 */
4633a7c4 1528#define SIG_NAME "`echo $sig_name | sed 's/ /","/g'`",0 /**/
8e07c86e
AD
1529#define SIG_NUM `echo $sig_num 0 | sed 's/ /,/g'` /**/
1530
4633a7c4
LW
1531/* SITEARCH_EXP:
1532 * This symbol contains the ~name expanded version of SITEARCH, to be used
16d20bd9
AD
1533 * in programs that are not prepared to deal with ~ expansion at run-time.
1534 */
4633a7c4 1535#define SITEARCH_EXP "$sitearchexp" /**/
16d20bd9 1536
25f94b33
AD
1537/* SITELIB_EXP:
1538 * This symbol contains the ~name expanded version of SITELIB, to be used
1539 * in programs that are not prepared to deal with ~ expansion at run-time.
1540 */
1541#define SITELIB_EXP "$sitelibexp" /**/
1542
568ef1f6
PP
1543/* STARTPERL:
1544 * This variable contains the string to put in front of a perl
1545 * script to make sure (one hopes) that it runs with perl and not
1546 * some shell.
1547 */
1548#define STARTPERL "$startperl" /**/
1549
8e07c86e
AD
1550/* VOIDFLAGS:
1551 * This symbol indicates how much support of the void type is given by this
1552 * compiler. What various bits mean:
1553 *
1554 * 1 = supports declaration of void
1555 * 2 = supports arrays of pointers to functions returning void
1556 * 4 = supports comparisons between pointers to void functions and
1557 * addresses of void functions
1558 * 8 = suports declaration of generic void pointers
1559 *
1560 * The package designer should define VOIDUSED to indicate the requirements
1561 * of the package. This can be done either by #defining VOIDUSED before
1562 * including config.h, or by defining defvoidused in Myinit.U. If the
1563 * latter approach is taken, only those flags will be tested. If the
1564 * level of void support necessary is not present, defines void to int.
1565 */
1566#ifndef VOIDUSED
1567#define VOIDUSED $defvoidused
1568#endif
1569#define VOIDFLAGS $voidflags
1570#if (VOIDFLAGS & VOIDUSED) != VOIDUSED
1571#define void int /* is void to be avoided? */
1572#define M_VOID /* Xenix strikes again */
1573#endif
1574
fe14fcc3 1575#endif
8d063cd8 1576!GROK!THIS!