This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl 3.0 patch #19 (combined patch)
[perl5.git] / config.h.SH
CommitLineData
8d063cd8
LW
1case $CONFIG in
2'')
3 if test ! -f config.sh; then
4 ln ../config.sh . || \
5 ln ../../config.sh . || \
6 ln ../../../config.sh . || \
7 (echo "Can't find config.sh."; exit 1)
8 echo "Using config.sh from above..."
9 fi
378cc40b 10 . ./config.sh
8d063cd8
LW
11 ;;
12esac
13echo "Extracting config.h (with variable substitutions)"
13281fa4 14sed <<!GROK!THIS! >config.h -e 's!^#undef!/\*#undef!'
8d063cd8
LW
15/* config.h
16 * This file was produced by running the config.h.SH script, which
17 * gets its values from config.sh, which is generally produced by
18 * running Configure.
19 *
20 * Feel free to modify any of this as the need arises. Note, however,
21 * that running config.h.SH again will wipe out any changes you've made.
22 * For a more permanent change edit config.sh and rerun config.h.SH.
23 */
24
25
26/* EUNICE:
27 * This symbol, if defined, indicates that the program is being compiled
28 * under the EUNICE package under VMS. The program will need to handle
29 * things like files that don't go away the first time you unlink them,
30 * due to version numbering. It will also need to compensate for lack
31 * of a respectable link() command.
32 */
33/* VMS:
34 * This symbol, if defined, indicates that the program is running under
35 * VMS. It is currently only set in conjunction with the EUNICE symbol.
36 */
37#$d_eunice EUNICE /**/
38#$d_eunice VMS /**/
39
a687059c
LW
40/* BIN:
41 * This symbol holds the name of the directory in which the user wants
42 * to put publicly executable images for the package in question. It
43 * is most often a local directory such as /usr/local/bin.
44 */
45#define BIN "$bin" /**/
46
47/* BYTEORDER:
48 * This symbol contains an encoding of the order of bytes in a long.
49 * Usual values (in octal) are 01234, 04321, 02143, 03412...
50 */
0d3e774c 51#define BYTEORDER 0x$byteorder /**/
a687059c 52
378cc40b 53/* CPPSTDIN:
36ce8bec
DFDL
54 * This symbol contains the first part of the string which will invoke
55 * the C preprocessor on the standard input and produce to standard
56 * output. Typical value of "cc -E" or "/lib/cpp".
57 */
58/* CPPMINUS:
59 * This symbol contains the second part of the string which will invoke
60 * the C preprocessor on the standard input and produce to standard
378cc40b 61 * output. This symbol will have the value "-" if CPPSTDIN needs a minus
36ce8bec
DFDL
62 * to specify standard input, otherwise the value is "".
63 */
378cc40b 64#define CPPSTDIN "$cppstdin"
36ce8bec
DFDL
65#define CPPMINUS "$cppminus"
66
a687059c
LW
67/* BCMP:
68 * This symbol, if defined, indicates that the bcmp routine is available
69 * to compare blocks of memory. If undefined, use memcmp. If that's
70 * not available, roll your own.
71 */
72#$d_bcmp BCMP /**/
73
c51b80d1
LW
74/* BCOPY:
75 * This symbol, if defined, indicates that the bcopy routine is available
76 * to copy blocks of memory. Otherwise you should probably use memcpy().
77 */
78#$d_bcopy BCOPY /**/
79
0d3e774c
LW
80/* BZERO:
81 * This symbol, if defined, indicates that the bzero routine is available
82 * to zero blocks of memory. Otherwise you should probably use memcpy().
83 */
84#$d_bzero BZERO /**/
85
b1248f16
LW
86/* CASTNEGFLOAT:
87 * This symbol, if defined, indicates that this C compiler knows how to
88 * cast negative numbers to unsigned longs, ints and shorts.
89 */
90#$d_castneg CASTNEGFLOAT /**/
91
8d063cd8
LW
92/* CHARSPRINTF:
93 * This symbol is defined if this system declares "char *sprintf()" in
94 * stdio.h. The trend seems to be to declare it as "int sprintf()". It
95 * is up to the package author to declare sprintf correctly based on the
96 * symbol.
97 */
98#$d_charsprf CHARSPRINTF /**/
99
2e1b3b7e
KK
100/* CRYPT:
101 * This symbol, if defined, indicates that the crypt routine is available
102 * to encrypt passwords and the like.
103 */
104#$d_crypt CRYPT /**/
105
bf38876a
LW
106/* CSH:
107 * This symbol, if defined, indicates that the C-shell exists.
108 * If defined, contains the full pathname of csh.
109 */
110#$d_csh CSH "$csh" /**/
111
13281fa4
LW
112/* DOSUID:
113 * This symbol, if defined, indicates that the C program should
114 * check the script that it is executing for setuid/setgid bits, and
115 * attempt to emulate setuid/setgid on systems that have disabled
116 * setuid #! scripts because the kernel can't do it securely.
117 * It is up to the package designer to make sure that this emulation
118 * is done securely. Among other things, it should do an fstat on
119 * the script it just opened to make sure it really is a setuid/setgid
120 * script, it should make sure the arguments passed correspond exactly
121 * to the argument on the #! line, and it should not trust any
122 * subprocesses to which it must pass the filename rather than the
123 * file descriptor of the script to be executed.
124 */
125#$d_dosuid DOSUID /**/
126
a687059c
LW
127/* DUP2:
128 * This symbol, if defined, indicates that the dup2 routine is available
129 * to dup file descriptors. Otherwise you should use dup().
130 */
131#$d_dup2 DUP2 /**/
132
378cc40b
LW
133/* FCHMOD:
134 * This symbol, if defined, indicates that the fchmod routine is available
135 * to change mode of opened files. If unavailable, use chmod().
136 */
137#$d_fchmod FCHMOD /**/
138
139/* FCHOWN:
140 * This symbol, if defined, indicates that the fchown routine is available
141 * to change ownership of opened files. If unavailable, use chown().
142 */
143#$d_fchown FCHOWN /**/
144
a687059c
LW
145/* FCNTL:
146 * This symbol, if defined, indicates to the C program that it should
147 * include fcntl.h.
148 */
149#$d_fcntl FCNTL /**/
150
151/* FLOCK:
152 * This symbol, if defined, indicates that the flock() routine is
153 * available to do file locking.
154 */
155#$d_flock FLOCK /**/
156
378cc40b
LW
157/* GETGROUPS:
158 * This symbol, if defined, indicates that the getgroups() routine is
159 * available to get the list of process groups. If unavailable, multiple
160 * groups are probably not supported.
161 */
162#$d_getgrps GETGROUPS /**/
163
a687059c
LW
164/* GETHOSTENT:
165 * This symbol, if defined, indicates that the gethostent() routine is
166 * available to lookup host names in some data base or other.
167 */
168#$d_gethent GETHOSTENT /**/
169
170/* GETPGRP:
171 * This symbol, if defined, indicates that the getpgrp() routine is
172 * available to get the current process group.
173 */
174#$d_getpgrp GETPGRP /**/
175
d8f2e4cc
LW
176/* GETPGRP2:
177 * This symbol, if defined, indicates that the getpgrp2() (as in DG/UX)
178 * routine is available to get the current process group.
179 */
180#$d_getpgrp2 GETPGRP2 /**/
181
a687059c
LW
182/* GETPRIORITY:
183 * This symbol, if defined, indicates that the getpriority() routine is
184 * available to get a process's priority.
185 */
186#$d_getprior GETPRIORITY /**/
187
188/* HTONS:
189 * This symbol, if defined, indicates that the htons routine (and friends)
190 * are available to do network order byte swapping.
191 */
192/* HTONL:
193 * This symbol, if defined, indicates that the htonl routine (and friends)
194 * are available to do network order byte swapping.
195 */
196/* NTOHS:
197 * This symbol, if defined, indicates that the ntohs routine (and friends)
198 * are available to do network order byte swapping.
199 */
200/* NTOHL:
201 * This symbol, if defined, indicates that the ntohl routine (and friends)
202 * are available to do network order byte swapping.
203 */
204#$d_htonl HTONS /**/
205#$d_htonl HTONL /**/
206#$d_htonl NTOHS /**/
207#$d_htonl NTOHL /**/
208
8d063cd8
LW
209/* index:
210 * This preprocessor symbol is defined, along with rindex, if the system
211 * uses the strchr and strrchr routines instead.
212 */
213/* rindex:
214 * This preprocessor symbol is defined, along with index, if the system
215 * uses the strchr and strrchr routines instead.
216 */
217#$d_index index strchr /* cultural */
218#$d_index rindex strrchr /* differences? */
219
a687059c
LW
220/* IOCTL:
221 * This symbol, if defined, indicates that sys/ioctl.h exists and should
222 * be included.
223 */
224#$d_ioctl IOCTL /**/
225
378cc40b
LW
226/* KILLPG:
227 * This symbol, if defined, indicates that the killpg routine is available
228 * to kill process groups. If unavailable, you probably should use kill
229 * with a negative process number.
230 */
231#$d_killpg KILLPG /**/
232
0d3e774c
LW
233/* LSTAT:
234 * This symbol, if defined, indicates that the lstat() routine is
235 * available to do file locking.
236 */
237#$d_lstat LSTAT /**/
238
a687059c
LW
239/* MEMCMP:
240 * This symbol, if defined, indicates that the memcmp routine is available
241 * to compare blocks of memory. If undefined, roll your own.
242 */
243#$d_memcmp MEMCMP /**/
244
378cc40b
LW
245/* MEMCPY:
246 * This symbol, if defined, indicates that the memcpy routine is available
247 * to copy blocks of memory. Otherwise you should probably use bcopy().
248 * If neither is defined, roll your own.
249 */
250#$d_memcpy MEMCPY /**/
251
a687059c
LW
252/* MKDIR:
253 * This symbol, if defined, indicates that the mkdir routine is available
254 * to create directories. Otherwise you should fork off a new process to
255 * exec /bin/mkdir.
256 */
257#$d_mkdir MKDIR /**/
258
259/* NDBM:
260 * This symbol, if defined, indicates that ndbm.h exists and should
261 * be included.
262 */
263#$d_ndbm NDBM /**/
264
265/* ODBM:
266 * This symbol, if defined, indicates that dbm.h exists and should
267 * be included.
268 */
269#$d_odbm ODBM /**/
270
271/* READDIR:
272 * This symbol, if defined, indicates that the readdir routine is available
273 * from the C library to create directories.
274 */
275#$d_readdir READDIR /**/
276
378cc40b
LW
277/* RENAME:
278 * This symbol, if defined, indicates that the rename routine is available
279 * to rename files. Otherwise you should do the unlink(), link(), unlink()
280 * trick.
281 */
282#$d_rename RENAME /**/
283
a687059c
LW
284/* RMDIR:
285 * This symbol, if defined, indicates that the rmdir routine is available
286 * to remove directories. Otherwise you should fork off a new process to
287 * exec /bin/rmdir.
288 */
289#$d_rmdir RMDIR /**/
290
378cc40b
LW
291/* SETEGID:
292 * This symbol, if defined, indicates that the setegid routine is available
293 * to change the effective gid of the current program.
294 */
295#$d_setegid SETEGID /**/
296
297/* SETEUID:
298 * This symbol, if defined, indicates that the seteuid routine is available
299 * to change the effective uid of the current program.
300 */
301#$d_seteuid SETEUID /**/
302
a687059c
LW
303/* SETPGRP:
304 * This symbol, if defined, indicates that the setpgrp() routine is
305 * available to set the current process group.
306 */
307#$d_setpgrp SETPGRP /**/
308
d8f2e4cc
LW
309/* SETPGRP2:
310 * This symbol, if defined, indicates that the setpgrp2() (as in DG/UX)
311 * routine is available to set the current process group.
312 */
313#$d_setpgrp2 SETPGRP2 /**/
314
a687059c
LW
315/* SETPRIORITY:
316 * This symbol, if defined, indicates that the setpriority() routine is
317 * available to set a process's priority.
318 */
319#$d_setprior SETPRIORITY /**/
320
321/* SETREGID:
322 * This symbol, if defined, indicates that the setregid routine is
323 * available to change the real and effective gid of the current program.
324 */
325/* SETRESGID:
326 * This symbol, if defined, indicates that the setresgid routine is
327 * available to change the real, effective and saved gid of the current
328 * program.
329 */
330#$d_setregid SETREGID /**/
331#$d_setresgid SETRESGID /**/
332
333/* SETREUID:
334 * This symbol, if defined, indicates that the setreuid routine is
335 * available to change the real and effective uid of the current program.
336 */
337/* SETRESUID:
338 * This symbol, if defined, indicates that the setresuid routine is
339 * available to change the real, effective and saved uid of the current
340 * program.
341 */
342#$d_setreuid SETREUID /**/
343#$d_setresuid SETRESUID /**/
344
378cc40b
LW
345/* SETRGID:
346 * This symbol, if defined, indicates that the setrgid routine is available
347 * to change the real gid of the current program.
348 */
349#$d_setrgid SETRGID /**/
350
351/* SETRUID:
352 * This symbol, if defined, indicates that the setruid routine is available
353 * to change the real uid of the current program.
354 */
355#$d_setruid SETRUID /**/
356
a687059c
LW
357/* SOCKET:
358 * This symbol, if defined, indicates that the BSD socket interface is
359 * supported.
360 */
361/* SOCKETPAIR:
362 * This symbol, if defined, indicates that the BSD socketpair call is
363 * supported.
364 */
365/* OLDSOCKET:
366 * This symbol, if defined, indicates that the 4.1c BSD socket interface
367 * is supported instead of the 4.2/4.3 BSD socket interface.
368 */
369#$d_socket SOCKET /**/
370
371#$d_sockpair SOCKETPAIR /**/
372
373#$d_oldsock OLDSOCKET /**/
374
c51b80d1
LW
375/* STATBLOCKS:
376 * This symbol is defined if this system has a stat structure declaring
377 * st_blksize and st_blocks.
378 */
379#$d_statblks STATBLOCKS /**/
380
36ce8bec
DFDL
381/* STDSTDIO:
382 * This symbol is defined if this system has a FILE structure declaring
383 * _ptr and _cnt in stdio.h.
384 */
385#$d_stdstdio STDSTDIO /**/
386
8d063cd8
LW
387/* STRUCTCOPY:
388 * This symbol, if defined, indicates that this C compiler knows how
389 * to copy structures. If undefined, you'll need to use a block copy
390 * routine of some sort instead.
391 */
392#$d_strctcpy STRUCTCOPY /**/
393
d8f2e4cc
LW
394/* STRERROR:
395 * This symbol, if defined, indicates that the strerror() routine is
396 * available to translate error numbers to strings.
397 */
398#$d_strerror STRERROR /**/
399
2e1b3b7e
KK
400/* SYMLINK:
401 * This symbol, if defined, indicates that the symlink routine is available
402 * to create symbolic links.
403 */
404#$d_symlink SYMLINK /**/
405
a687059c
LW
406/* SYSCALL:
407 * This symbol, if defined, indicates that the syscall routine is available
408 * to call arbitrary system calls. If undefined, that's tough.
409 */
410#$d_syscall SYSCALL /**/
411
a687059c
LW
412/* VARARGS:
413 * This symbol, if defined, indicates to the C program that it should
414 * include varargs.h.
415 */
416#$d_varargs VARARGS /**/
c51b80d1 417
03a14243
LW
418/* VFORK:
419 * This symbol, if defined, indicates that vfork() exists.
8d063cd8 420 */
03a14243 421#$d_vfork VFORK /**/
8d063cd8 422
36ce8bec
DFDL
423/* VOIDSIG:
424 * This symbol is defined if this system declares "void (*signal())()" in
425 * signal.h. The old way was to declare it as "int (*signal())()". It
426 * is up to the package author to declare things correctly based on the
427 * symbol.
428 */
429#$d_voidsig VOIDSIG /**/
430
afd9f252
LW
431/* HASVOLATILE:
432 * This symbol, if defined, indicates that this C compiler knows about
433 * the volatile declaration.
434 */
435#$d_volatile HASVOLATILE /**/
436
a687059c
LW
437/* VPRINTF:
438 * This symbol, if defined, indicates that the vprintf routine is available
439 * to printf with a pointer to an argument list. If unavailable, you
440 * may need to write your own, probably in terms of _doprnt().
441 */
442/* CHARVSPRINTF:
443 * This symbol is defined if this system has vsprintf() returning type
444 * (char*). The trend seems to be to declare it as "int vsprintf()". It
445 * is up to the package author to declare vsprintf correctly based on the
446 * symbol.
447 */
448#$d_vprintf VPRINTF /**/
449#$d_charvspr CHARVSPRINTF /**/
450
bf38876a
LW
451/* WAIT4:
452 * This symbol, if defined, indicates that wait4() exists.
453 */
454#$d_wait4 WAIT4 /**/
455
378cc40b
LW
456/* GIDTYPE:
457 * This symbol has a value like gid_t, int, ushort, or whatever type is
458 * used to declare group ids in the kernel.
459 */
460#define GIDTYPE $gidtype /**/
461
a687059c
LW
462/* I_DIRENT:
463 * This symbol, if defined, indicates to the C program that it should
464 * include dirent.h.
465 */
466/* DIRNAMLEN:
467 * This symbol, if defined, indicates to the C program that the length
468 * of directory entry names is provided by a d_namlen field. Otherwise
469 * you need to do strlen() on the d_name field.
470 */
471#$i_dirent I_DIRENT /**/
472#$d_dirnamlen DIRNAMLEN /**/
473
474/* I_FCNTL:
475 * This symbol, if defined, indicates to the C program that it should
476 * include fcntl.h.
477 */
478#$i_fcntl I_FCNTL /**/
479
480/* I_GRP:
481 * This symbol, if defined, indicates to the C program that it should
482 * include grp.h.
483 */
484#$i_grp I_GRP /**/
485
03a14243
LW
486/* I_NETINET_IN:
487 * This symbol, if defined, indicates to the C program that it should
488 * include netinet/in.h.
489 */
490#$i_niin I_NETINET_IN /**/
491
a687059c
LW
492/* I_PWD:
493 * This symbol, if defined, indicates to the C program that it should
494 * include pwd.h.
495 */
496/* PWQUOTA:
497 * This symbol, if defined, indicates to the C program that struct passwd
498 * contains pw_quota.
499 */
500/* PWAGE:
501 * This symbol, if defined, indicates to the C program that struct passwd
502 * contains pw_age.
503 */
03a14243
LW
504/* PWCHANGE:
505 * This symbol, if defined, indicates to the C program that struct passwd
506 * contains pw_change.
507 */
508/* PWCLASS:
509 * This symbol, if defined, indicates to the C program that struct passwd
510 * contains pw_class.
511 */
512/* PWEXPIRE:
513 * This symbol, if defined, indicates to the C program that struct passwd
514 * contains pw_expire.
515 */
a687059c
LW
516#$i_pwd I_PWD /**/
517#$d_pwquota PWQUOTA /**/
518#$d_pwage PWAGE /**/
bf38876a
LW
519#$d_pwchange PWCHANGE /**/
520#$d_pwclass PWCLASS /**/
521#$d_pwexpire PWEXPIRE /**/
a687059c
LW
522
523/* I_SYSDIR:
524 * This symbol, if defined, indicates to the C program that it should
525 * include sys/dir.h.
526 */
527#$i_sysdir I_SYSDIR /**/
528
529/* I_SYSIOCTL:
530 * This symbol, if defined, indicates that sys/ioctl.h exists and should
531 * be included.
532 */
533#$i_sysioctl I_SYSIOCTL /**/
534
d8f2e4cc
LW
535/* I_SYSNDIR:
536 * This symbol, if defined, indicates to the C program that it should
537 * include sys/ndir.h.
538 */
539#$i_sysndir I_SYSNDIR /**/
540
541/* I_TIME:
542 * This symbol is defined if the program should include <time.h>.
543 */
544/* I_SYSTIME:
545 * This symbol is defined if the program should include <sys/time.h>.
546 */
547/* I_SYSTIMEKERNEL:
548 * This symbol is defined if the program should include <sys/time.h>
549 * with KERNEL defined.
550 */
551#$i_time I_TIME /**/
552#$i_systime I_SYSTIME /**/
553#$d_systimekernel SYSTIMEKERNEL /**/
554
555/* I_UTIME:
556 * This symbol, if defined, indicates to the C program that it should
afd9f252 557 * include utime.h.
d8f2e4cc
LW
558 */
559#$i_utime I_UTIME /**/
560
a687059c
LW
561/* I_VARARGS:
562 * This symbol, if defined, indicates to the C program that it should
563 * include varargs.h.
564 */
565#$i_varargs I_VARARGS /**/
566
567/* I_VFORK:
568 * This symbol, if defined, indicates to the C program that it should
569 * include vfork.h.
570 */
571#$i_vfork I_VFORK /**/
572
573/* INTSIZE:
574 * This symbol contains the size of an int, so that the C preprocessor
575 * can make decisions based on it.
576 */
577#define INTSIZE $intsize /**/
578
579/* RANDBITS:
580 * This symbol contains the number of bits of random number the rand()
581 * function produces. Usual values are 15, 16, and 31.
582 */
583#define RANDBITS $randbits /**/
584
585/* SIG_NAME:
586 * This symbol contains an list of signal names in order.
587 */
588#define SIG_NAME "`echo $sig_name | sed 's/ /","/g'`" /**/
589
36ce8bec
DFDL
590/* STDCHAR:
591 * This symbol is defined to be the type of char used in stdio.h.
592 * It has the values "unsigned char" or "char".
593 */
594#define STDCHAR $stdchar /**/
595
378cc40b
LW
596/* UIDTYPE:
597 * This symbol has a value like uid_t, int, ushort, or whatever type is
598 * used to declare user ids in the kernel.
599 */
600#define UIDTYPE $uidtype /**/
601
8d063cd8
LW
602/* VOIDFLAGS:
603 * This symbol indicates how much support of the void type is given by this
604 * compiler. What various bits mean:
605 *
606 * 1 = supports declaration of void
607 * 2 = supports arrays of pointers to functions returning void
608 * 4 = supports comparisons between pointers to void functions and
609 * addresses of void functions
610 *
611 * The package designer should define VOIDUSED to indicate the requirements
612 * of the package. This can be done either by #defining VOIDUSED before
613 * including config.h, or by defining defvoidused in Myinit.U. If the
a687059c 614 * latter approach is taken, only those flags will be tested. If the
8d063cd8
LW
615 * level of void support necessary is not present, defines void to int.
616 */
617#ifndef VOIDUSED
618#define VOIDUSED $defvoidused
619#endif
620#define VOIDFLAGS $voidflags
621#if (VOIDFLAGS & VOIDUSED) != VOIDUSED
622#$define void int /* is void to be avoided? */
623#$define M_VOID /* Xenix strikes again */
624#endif
625
378cc40b
LW
626/* PRIVLIB:
627 * This symbol contains the name of the private library for this package.
628 * The library is private in the sense that it needn't be in anyone's
a687059c
LW
629 * execution path, but it should be accessible by the world. The program
630 * should be prepared to do ~ expansion.
378cc40b
LW
631 */
632#define PRIVLIB "$privlib" /**/
633
8d063cd8 634!GROK!THIS!