diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1997-11-30 07:49:50 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1997-11-30 07:49:50 +0000 |
commit | c54c74271308a8fd18f1bc3a193343d079ebe481 (patch) | |
tree | 4e044737406ff536d832bfc46880f3512fc3ee90 /gnu/usr.bin/perl/Porting | |
parent | eeacafe7910fb1a4f74af72f94a32acf464b6319 (diff) |
perl5.005_03
Diffstat (limited to 'gnu/usr.bin/perl/Porting')
-rw-r--r-- | gnu/usr.bin/perl/Porting/Glossary | 1420 | ||||
-rw-r--r-- | gnu/usr.bin/perl/Porting/makerel | 100 | ||||
-rw-r--r-- | gnu/usr.bin/perl/Porting/patchls | 431 | ||||
-rw-r--r-- | gnu/usr.bin/perl/Porting/pumpkin.pod | 1180 |
4 files changed, 3131 insertions, 0 deletions
diff --git a/gnu/usr.bin/perl/Porting/Glossary b/gnu/usr.bin/perl/Porting/Glossary new file mode 100644 index 00000000000..c71c199ec4b --- /dev/null +++ b/gnu/usr.bin/perl/Porting/Glossary @@ -0,0 +1,1420 @@ +This file contains a description of all the shell variables whose value is +determined by the Configure script. Variables intended for use in C +programs (e.g. I_UNISTD) are already described in config_h.SH. + +alignbytes (alignbytes.U): + This variable holds the number of bytes required to align a + double. Usual values are 2, 4 and 8. + +ar (Unix.U): + This variable defines the command to use to create an archive + library. For unix, it is 'ar'. + +archlib (archlib.U): + This variable holds the name of the directory in which the user wants + to put architecture-dependent public library files for $package. + It is most often a local directory such as /usr/local/lib. + Programs using this variable must be prepared to deal + with filename expansion. + +archlibexp (archlib.U): + This variable is the same as the archlib variable, but is + filename expanded at configuration time, for convenient use. + +archobjs (Unix.U): + This variable defines any additional objects that must be linked + in with the program on this architecture. On unix, it is usually + empty. It is typically used to include emulations of unix calls + or other facilities. For perl on OS/2, for example, this would + include os2/os2.obj. + +bin (bin.U): + This variable holds the name of the directory in which the user wants + to put publicly executable images for the package in question. It + is most often a local directory such as /usr/local/bin. Programs using + this variable must be prepared to deal with ~name substitution. + +bincompat3 (bincompat3.U): + This variable contains y if Perl 5.004 should be binary-compatible + with Perl 5.003. + +byteorder (byteorder.U): + This variable holds the byte order. In the following, larger digits + indicate more significance. The variable byteorder is either 4321 + on a big-endian machine, or 1234 on a little-endian, or 87654321 + on a Cray ... or 3412 with weird order ! + +c (n.U): + This variable contains the \c string if that is what causes the echo + command to suppress newline. Otherwise it is null. Correct usage is + $echo $n "prompt for a question: $c". + +castflags (d_castneg.U): + This variable contains a flag that precise difficulties the + compiler has casting odd floating values to unsigned long: + 0 = ok + 1 = couldn't cast < 0 + 2 = couldn't cast >= 0x80000000 + 4 = couldn't cast in argument expression list + +cc (cc.U): + This variable holds the name of a command to execute a C compiler which + can resolve multiple global references that happen to have the same + name. Usual values are "cc", "Mcc", "cc -M", and "gcc". + +cccdlflags (dlsrc.U): + This variable contains any special flags that might need to be + passed with cc -c to compile modules to be used to create a shared + library that will be used for dynamic loading. For hpux, this + should be +z. It is up to the makefile to use it. + +ccdlflags (dlsrc.U): + This variable contains any special flags that might need to be + passed to cc to link with a shared library for dynamic loading. + It is up to the makefile to use it. For sunos 4.1, it should + be empty. + +ccflags (ccflags.U): + This variable contains any additional C compiler flags desired by + the user. It is up to the Makefile to use this. + +cf_by (cf_who.U): + Login name of the person who ran the Configure script and answered the + questions. This is used to tag both config.sh and config_h.SH. + +cf_time (cf_who.U): + Holds the output of the "date" command when the configuration file was + produced. This is used to tag both config.sh and config_h.SH. + +cpp_stuff (cpp_stuff.U): + This variable contains an identification of the catenation mechanism + used by the C preprocessor. + +cppflags (ccflags.U): + This variable holds the flags that will be passed to the C pre- + processor. It is up to the Makefile to use it. + +cppminus (cppstdin.U): + This variable contains the second part of the string which will invoke + the C preprocessor on the standard input and produce to standard + output. This variable will have the value "-" if cppstdin needs a minus + to specify standard input, otherwise the value is "". + +cppstdin (cppstdin.U): + This variable contains the command which will invoke the C + preprocessor on standard input and put the output to stdout. + It is primarily used by other Configure units that ask about + preprocessor symbols. + +cryptlib (d_crypt.U): + This variable holds -lcrypt or the path to a libcrypt.a archive if + the crypt() function is not defined in the standard C library. It is + up to the Makefile to use this. + +d_Gconvert (d_gconvert.U): + This variable holds what Gconvert is defined as to convert + floating point numbers into strings. It could be 'gconvert' + or a more complex macro emulating gconvert with gcvt() or sprintf. + +d_access (d_access.U): + This variable conditionally defines HAS_ACCESS if the access() system + call is available to check for access permissions using real IDs. + +d_alarm (d_alarm.U): + This variable conditionally defines the HAS_ALARM symbol, which + indicates to the C program that the alarm() routine is available. + +d_archlib (archlib.U): + This variable conditionally defines ARCHLIB to hold the pathname + of architecture-dependent library files for $package. If + $archlib is the same as $privlib, then this is set to undef. + +d_bcmp (d_bcmp.U): + This variable conditionally defines the HAS_BCMP symbol if + the bcmp() routine is available to compare strings. + +d_bcopy (d_bcopy.U): + This variable conditionally defines the HAS_BCOPY symbol if + the bcopy() routine is available to copy strings. + +d_bincompat3 (bincompat3.U): + This variable conditionally defines BINCOMPAT3 so that embed.h + can take special action if Perl 5.004 should be binary-compatible + with Perl 5.003. + +d_bsdgetpgrp (d_getpgrp.U): + This variable conditionally defines USE_BSD_GETPGRP if + getpgrp needs one arguments whereas USG one needs none. + +d_bsdpgrp (d_setpgrp.U): + This variable conditionally defines USE_BSDPGRP if the notion of + process group is the BSD one. This means setpgrp needs two arguments + whereas USG one needs none. + +d_bsdsetpgrp (d_setpgrp.U): + This variable conditionally defines USE_BSD_SETPGRP if + setpgrp needs two arguments whereas USG one needs none. + See also d_setpgid for a POSIX interface. + +d_bzero (d_bzero.U): + This variable conditionally defines the HAS_BZERO symbol if + the bzero() routine is available to set memory to 0. + +d_casti32 (d_casti32.U): + This variable conditionally defines CASTI32, which indicates + whether the C compiler can cast large floats to 32-bit ints. + +d_castneg (d_castneg.U): + This variable conditionally defines CASTNEG, which indicates + wether the C compiler can cast negative float to unsigned. + +d_charvspr (d_vprintf.U): + This variable conditionally defines CHARVSPRINTF if this system + has vsprintf returning type (char*). The trend seems to be to + declare it as "int vsprintf()". + +d_chown (d_chown.U): + This variable conditionally defines the HAS_CHOWN symbol, which + indicates to the C program that the chown() routine is available. + +d_chroot (d_chroot.U): + This variable conditionally defines the HAS_CHROOT symbol, which + indicates to the C program that the chroot() routine is available. + +d_chsize (d_chsize.U): + This variable conditionally defines the CHSIZE symbol, which + indicates to the C program that the chsize() routine is available + to truncate files. You might need a -lx to get this routine. + +d_const (d_const.U): + This variable conditionally defines the HASCONST symbol, which + indicates to the C program that this C compiler knows about the + const type. + +d_crypt (d_crypt.U): + This variable conditionally defines the CRYPT symbol, which + indicates to the C program that the crypt() routine is available + to encrypt passwords and the like. + +d_csh (d_csh.U): + This variable conditionally defines the CSH symbol, which + indicates to the C program that the C-shell exists. + +d_cuserid (d_cuserid.U): + This variable conditionally defines the HAS_CUSERID symbol, which + indicates to the C program that the cuserid() routine is available + to get character login names. + +d_dbl_dig (d_dbl_dig.U): + This variable conditionally defines d_dbl_dig if this system's + header files provide DBL_DIG, which is the number of significant + digits in a double precision number. + +d_difftime (d_difftime.U): + This variable conditionally defines the HAS_DIFFTIME symbol, which + indicates to the C program that the difftime() routine is available. + +d_dirnamlen (i_dirent.U): + This variable conditionally defines DIRNAMLEN, which indicates + to the C program that the length of directory entry names is + provided by a d_namelen field. + +d_dlerror (d_dlerror.U): + This variable conditionally defines the HAS_DLERROR symbol, which + indicates to the C program that the dlerror() routine is available. + +d_dlsymun (d_dlsymun.U): + This variable conditionally defines DLSYM_NEEDS_UNDERSCORE, which + indicates that we need to prepend an underscore to the symbol + name before calling dlsym(). + +d_dosuid (d_dosuid.U): + This variable conditionally defines the symbol DOSUID, which + tells the C program that it should insert setuid emulation code + on hosts which have setuid #! scripts disabled. + +d_dup2 (d_dup2.U): + This variable conditionally defines HAS_DUP2 if dup2() is + available to duplicate file descriptors. + +d_eofnblk (nblock_io.U): + This variable conditionally defines EOF_NONBLOCK if EOF can be seen + when reading from a non-blocking I/O source. + +d_fchmod (d_fchmod.U): + This variable conditionally defines the HAS_FCHMOD symbol, which + indicates to the C program that the fchmod() routine is available + to change mode of opened files. + +d_fchown (d_fchown.U): + This variable conditionally defines the HAS_FCHOWN symbol, which + indicates to the C program that the fchown() routine is available + to change ownership of opened files. + +d_fcntl (d_fcntl.U): + This variable conditionally defines the HAS_FCNTL symbol, and indicates + whether the fcntl() function exists + +d_fgetpos (d_fgetpos.U): + This variable conditionally defines HAS_FGETPOS if fgetpos() is + available to get the file position indicator. + +d_flexfnam (d_flexfnam.U): + This variable conditionally defines the FLEXFILENAMES symbol, which + indicates that the system supports filenames longer than 14 characters. + +d_flock (d_flock.U): + This variable conditionally defines HAS_FLOCK if flock() is + available to do file locking. + +d_fork (d_fork.U): + This variable conditionally defines the HAS_FORK symbol, which + indicates to the C program that the fork() routine is available. + +d_fpathconf (d_pathconf.U): + This variable conditionally defines the HAS_FPATHCONF symbol, which + indicates to the C program that the pathconf() routine is available + to determine file-system related limits and options associated + with a given open file descriptor. + +d_fsetpos (d_fsetpos.U): + This variable conditionally defines HAS_FSETPOS if fsetpos() is + available to set the file position indicator. + +d_ftime (d_ftime.U): + This variable conditionally defines the HAS_FTIME symbol, which + indicates that the ftime() routine exists. The ftime() routine is + basically a sub-second accuracy clock. + +d_gethent (d_gethent.U): + This variable conditionally defines HAS_GETHOSTENT if gethostent() is + available to dup file descriptors. + +d_gettimeod (d_ftime.U): + This variable conditionally defines the HAS_GETTIMEOFDAY symbol, which + indicates that the gettimeofday() system call exists (to obtain a + sub-second accuracy clock). + +d_getlogin (d_getlogin.U): + This variable conditionally defines the HAS_GETLOGIN symbol, which + indicates to the C program that the getlogin() routine is available + to get the login name. + +d_getpgid (d_getpgid.U): + This variable conditionally defines the HAS_GETPGID symbol, which + indicates to the C program that the getpgid(pid) function + is available to get the process group id. + +d_getpgrp (d_getpgrp.U): + This variable conditionally defines HAS_GETPGRP if getpgrp() is + available to get the current process group. + +d_getpgrp2 (d_getpgrp2.U): + This variable conditionally defines the HAS_GETPGRP2 symbol, which + indicates to the C program that the getpgrp2() (as in DG/UX) routine + is available to get the current process group. + +d_getppid (d_getppid.U): + This variable conditionally defines the HAS_GETPPID symbol, which + indicates to the C program that the getppid() routine is available + to get the parent process ID. + +d_getprior (d_getprior.U): + This variable conditionally defines HAS_GETPRIORITY if getpriority() + is available to get a process's priority. + +d_htonl (d_htonl.U): + This variable conditionally defines HAS_HTONL if htonl() and its + friends are available to do network order byte swapping. + +d_index (d_strchr.U): + This variable conditionally defines HAS_INDEX if index() and + rindex() are available for string searching. + +d_inetaton (d_inetaton.U): + This variable conditionally defines the HAS_INET_ATON symbol, which + indicates to the C program that the inet_aton() function is available + to parse IP address "dotted-quad" strings. + +d_isascii (d_isascii.U): + This variable conditionally defines the HAS_ISASCII constant, + which indicates to the C program that isascii() is available. + +d_killpg (d_killpg.U): + This variable conditionally defines the HAS_KILLPG symbol, which + indicates to the C program that the killpg() routine is available + to kill process groups. + +d_link (d_link.U): + This variable conditionally defines HAS_LINK if link() is + available to create hard links. + +d_locconv (d_locconv.U): + This variable conditionally defines HAS_LOCALECONV if localeconv() is + available for numeric and monetary formatting conventions. + +d_lockf (d_lockf.U): + This variable conditionally defines HAS_LOCKF if lockf() is + available to do file locking. + +d_lstat (d_lstat.U): + This variable conditionally defines HAS_LSTAT if lstat() is + available to do file stats on symbolic links. + +d_mblen (d_mblen.U): + This variable conditionally defines the HAS_MBLEN symbol, which + indicates to the C program that the mblen() routine is available + to find the number of bytes in a multibye character. + +d_mbstowcs (d_mbstowcs.U): + This variable conditionally defines the HAS_MBSTOWCS symbol, which + indicates to the C program that the mbstowcs() routine is available + to convert a multibyte string into a wide character string. + +d_mbtowc (d_mbtowc.U): + This variable conditionally defines the HAS_MBTOWC symbol, which + indicates to the C program that the mbtowc() routine is available + to convert multibyte to a wide character. + +d_memcmp (d_memcmp.U): + This variable conditionally defines the HAS_MEMCMP symbol, which + indicates to the C program that the memcmp() routine is available + to compare blocks of memory. + +d_memcpy (d_memcpy.U): + This variable conditionally defines the HAS_MEMCPY symbol, which + indicates to the C program that the memcpy() routine is available + to copy blocks of memory. + +d_memmove (d_memmove.U): + This variable conditionally defines the HAS_MEMMOVE symbol, which + indicates to the C program that the memmove() routine is available + to copy potentatially overlapping blocks of memory. + +d_memset (d_memset.U): + This variable conditionally defines the HAS_MEMSET symbol, which + indicates to the C program that the memset() routine is available + to set blocks of memory. + +d_mkdir (d_mkdir.U): + This variable conditionally defines the HAS_MKDIR symbol, which + indicates to the C program that the mkdir() routine is available + to create directories.. + +d_mkfifo (d_mkfifo.U): + This variable conditionally defines the HAS_MKFIFO symbol, which + indicates to the C program that the mkfifo() routine is available. + +d_mktime (d_mktime.U): + This variable conditionally defines the HAS_MKTIME symbol, which + indicates to the C program that the mktime() routine is available. + +d_msg (d_msg.U): + This variable conditionally defines the HAS_MSG symbol, which + indicates that the entire msg*(2) library is present. + +d_mymalloc (mallocsrc.U): + This variable conditionally defines MYMALLOC in case other parts + of the source want to take special action if MYMALLOC is used. + This may include different sorts of profiling or error detection. + +d_nice (d_nice.U): + This variable conditionally defines the HAS_NICE symbol, which + indicates to the C program that the nice() routine is available. + +d_oldarchlib (oldarchlib.U): + This variable conditionally defines OLDARCHLIB to hold the pathname + of architecture-dependent library files for a previous + version of $package. + +d_open3 (d_open3.U): + This variable conditionally defines the HAS_OPEN3 manifest constant, + which indicates to the C program that the 3 argument version of + the open(2) function is available. + +d_pathconf (d_pathconf.U): + This variable conditionally defines the HAS_PATHCONF symbol, which + indicates to the C program that the pathconf() routine is available + to determine file-system related limits and options associated + with a given filename. + +d_pause (d_pause.U): + This variable conditionally defines the HAS_PAUSE symbol, which + indicates to the C program that the pause() routine is available + to suspend a process until a signal is received. + +d_pipe (d_pipe.U): + This variable conditionally defines the HAS_PIPE symbol, which + indicates to the C program that the pipe() routine is available + to create an inter-process channel. + +d_poll (d_poll.U): + This variable conditionally defines the HAS_POLL symbol, which + indicates to the C program that the poll() routine is available + to poll active file descriptors. + +d_pwage (i_pwd.U): + This varaible conditionally defines PWAGE, which indicates + that struct passwd contains pw_age. + +d_pwchange (i_pwd.U): + This varaible conditionally defines PWCHANGE, which indicates + that struct passwd contains pw_change. + +d_pwclass (i_pwd.U): + This varaible conditionally defines PWCLASS, which indicates + that struct passwd contains pw_class. + +d_pwcomment (i_pwd.U): + This varaible conditionally defines PWCOMMENT, which indicates + that struct passwd contains pw_comment. + +d_pwexpire (i_pwd.U): + This varaible conditionally defines PWEXPIRE, which indicates + that struct passwd contains pw_expire. + +d_pwquota (i_pwd.U): + This varaible conditionally defines PWQUOTA, which indicates + that struct passwd contains pw_quota. + +d_readdir (d_readdir.U): + This variable conditionally defines HAS_READDIR if readdir() is + available to read directory entries. + +d_readlink (d_readlink.U): + This variable conditionally defines the HAS_READLINK symbol, which + indicates to the C program that the readlink() routine is available + to read the value of a symbolic link. + +d_rename (d_rename.U): + This variable conditionally defines the HAS_RENAME symbol, which + indicates to the C program that the rename() routine is available + to rename files. + +d_rewinddir (d_readdir.U): + This variable conditionally defines HAS_REWINDDIR if rewinddir() is + available. + +d_rmdir (d_rmdir.U): + This variable conditionally defines HAS_RMDIR if rmdir() is + available to remove directories. + +d_safebcpy (d_safebcpy.U): + This variable conditionally defines the HAS_SAFE_BCOPY symbol if + the bcopy() routine can do overlapping copies. + +d_safemcpy (d_safemcpy.U): + This variable conditionally defines the HAS_SAFE_MEMCPY symbol if + the memcpy() routine can do overlapping copies. + +d_sanemcmp (d_sanemcmp.U): + This variable conditionally defines the HAS_SANE_MEMCMP symbol if + the memcpy() routine is available and can be used to compare relative + magnitudes of chars with their high bits set. + +d_seekdir (d_readdir.U): + This variable conditionally defines HAS_SEEKDIR if seekdir() is + available. + +d_select (d_select.U): + This variable conditionally defines HAS_SELECT if select() is + available to select active file descriptors. A <sys/time.h> + inclusion may be necessary for the timeout field. + +d_sem (d_sem.U): + This variable conditionally defines the HAS_SEM symbol, which + indicates that the entire sem*(2) library is present. + +d_setegid (d_setegid.U): + This variable conditionally defines the HAS_SETEGID symbol, which + indicates to the C program that the setegid() routine is available + to change the effective gid of the current program. + +d_seteuid (d_seteuid.U): + This variable conditionally defines the HAS_SETEUID symbol, which + indicates to the C program that the seteuid() routine is available + to change the effective uid of the current program. + +d_setlinebuf (d_setlnbuf.U): + This variable conditionally defines the HAS_SETLINEBUF symbol, which + indicates to the C program that the setlinebuf() routine is available + to change stderr or stdout from block-buffered or unbuffered to a + line-buffered mode. + +d_setlocale (d_setlocale.U): + This variable conditionally defines HAS_SETLOCALE if setlocale() is + available to handle locale-specific ctype implementations. + +d_setpgid (d_setpgid.U): + This variable conditionally defines the HAS_SETPGID symbol, which + indicates to the C program that the setpgid(pid, gpid) function + is available to set the process group id. + +d_setpgrp (d_setpgrp.U): + This variable conditionally defines HAS_SETPGRP if setpgrp() is + available to set the current process group. + +d_setpgrp2 (d_setpgrp2.U): + This variable conditionally defines the HAS_SETPGRP2 symbol, which + indicates to the C program that the setpgrp2() (as in DG/UX) routine + is available to set the current process group. + +d_setprior (d_setprior.U): + This variable conditionally defines HAS_SETPRIORITY if setpriority() + is available to set a process's priority. + +d_setregid (d_setregid.U): + This variable conditionally defines HAS_SETREGID if setregid() is + available to change the real and effective gid of the current + process. + +d_setresgid (d_setregid.U): + This variable conditionally defines HAS_SETRESGID if setresgid() is + available to change the real, effective and saved gid of the current + process. + +d_setresuid (d_setreuid.U): + This variable conditionally defines HAS_SETREUID if setresuid() is + available to change the real, effective and saved uid of the current + process. + +d_setreuid (d_setreuid.U): + This variable conditionally defines HAS_SETREUID if setreuid() is + available to change the real and effective uid of the current + process. + +d_setrgid (d_setrgid.U): + This variable conditionally defines the HAS_SETRGID symbol, which + indicates to the C program that the setrgid() routine is available + to change the real gid of the current program. + +d_setruid (d_setruid.U): + This variable conditionally defines the HAS_SETRUID symbol, which + indicates to the C program that the setruid() routine is available + to change the real uid of the current program. + +d_setsid (d_setsid.U): + This variable conditionally defines HAS_SETSID if setsid() is + available to set the process group ID. + +d_sfio (d_sfio.U): + This variable conditionally defines the USE_SFIO symbol, + and indicates whether sfio is available (and should be used). + +d_shm (d_shm.U): + This variable conditionally defines the HAS_SHM symbol, which + indicates that the entire shm*(2) library is present. + +d_shmatprototype (d_shmat.U): + This variable conditionally defines the HAS_SHMAT_PROTOTYPE + symbol, which indicates that sys/shm.h has a prototype for + shmat. + +d_sigaction (d_sigaction.U): + This variable conditionally defines the HAS_SIGACTION symbol, which + indicates that the Vr4 sigaction() routine is available. + +d_sigsetjmp (d_sigsetjmp.U): + This variable conditionally defines the HAS_SIGSETJMP symbol, + which indicates that the sigsetjmp() routine is available to + call setjmp() and optionally save the process's signal mask. + +d_socket (d_socket.U): + This variable conditionally defines HAS_SOCKET, which indicates + that the BSD socket interface is supported. + +d_sockpair (d_socket.U): + This variable conditionally defines the HAS_SOCKETPAIR symbol, which + indicates that the BSD socketpair() is supported. + +d_statblks (d_statblks.U): + This variable conditionally defines USE_STAT_BLOCKS if this system + has a stat structure declaring st_blksize and st_blocks. + +d_stdio_cnt_lval (d_stdstdio.U): + This variable conditionally defines STDIO_CNT_LVALUE if the + FILE_cnt macro can be used as an lvalue. + +d_stdio_ptr_lval (d_stdstdio.U): + This variable conditionally defines STDIO_PTR_LVALUE if the + FILE_ptr macro can be used as an lvalue. + +d_stdiobase (d_stdstdio.U): + This variable conditionally defines USE_STDIO_BASE if this system + has a FILE structure declaring a usable _base field (or equivalent) + in stdio.h. + +d_stdstdio (d_stdstdio.U): + This variable conditionally defines USE_STDIO_PTR if this system + has a FILE structure declaring usable _ptr and _cnt fields (or + equivalent) in stdio.h. + +d_strchr (d_strchr.U): + This variable conditionally defines HAS_STRCHR if strchr() and + strrchr() are available for string searching. + +d_strcoll (d_strcoll.U): + This variable conditionally defines HAS_STRCOLL if strcoll() is + available to compare strings using collating information. + +d_strctcpy (d_strctcpy.U): + This variable conditionally defines the USE_STRUCT_COPY symbol, which + indicates to the C program that this C compiler knows how to copy + structures. + +d_strerrm (d_strerror.U): + This variable holds what Strerrr is defined as to translate an error + code condition into an error message string. It could be 'strerror' + or a more complex macro emulating strrror with sys_errlist[], or the + "unknown" string when both strerror and sys_errlist are missing. + +d_strerror (d_strerror.U): + This variable conditionally defines HAS_STRERROR if strerror() is + available to translate error numbers to strings. + +d_strtod (d_strtod.U): + This variable conditionally defines the HAS_STRTOD symbol, which + indicates to the C program that the strtod() routine is available + to provide better numeric string conversion than atof(). + +d_strtol (d_strtol.U): + This variable conditionally defines the HAS_STRTOL symbol, which + indicates to the C program that the strtol() routine is available + to provide better numeric string conversion than atoi() and friends. + +d_strtoul (d_strtoul.U): + This variable conditionally defines the HAS_STRTOUL symbol, which + indicates to the C program that the strtoul() routine is available + to provide conversion of strings to unsigned long. + +d_strxfrm (d_strxfrm.U): + This variable conditionally defines HAS_STRXFRM if strxfrm() is + available to transform strings. + +d_suidsafe (d_dosuid.U): + This variable conditionally defines SETUID_SCRIPTS_ARE_SECURE_NOW + if setuid scripts can be secure. This test looks in /dev/fd/. + +d_symlink (d_symlink.U): + This variable conditionally defines the HAS_SYMLINK symbol, which + indicates to the C program that the symlink() routine is available + to create symbolic links. + +d_syscall (d_syscall.U): + This variable conditionally defines HAS_SYSCALL if syscall() is + available call arbitrary system calls. + +d_sysconf (d_sysconf.U): + This variable conditionally defines the HAS_SYSCONF symbol, which + indicates to the C program that the sysconf() routine is available + to determine system related limits and options. + +d_syserrlst (d_strerror.U): + This variable conditionally defines HAS_SYS_ERRLIST if sys_errlist[] is + available to translate error numbers to strings. + +d_system (d_system.U): + This variable conditionally defines HAS_SYSTEM if system() is + available to issue a shell command. + +d_tcgetpgrp (d_tcgtpgrp.U): + This variable conditionally defines the HAS_TCGETPGRP symbol, which + indicates to the C program that the tcgetpgrp() routine is available. + to get foreground process group ID. + +d_tcsetpgrp (d_tcstpgrp.U): + This variable conditionally defines the HAS_TCSETPGRP symbol, which + indicates to the C program that the tcsetpgrp() routine is available + to set foreground process group ID. + +d_telldir (d_readdir.U): + This variable conditionally defines HAS_TELLDIR if telldir() is + available. + +d_times (d_times.U): + This variable conditionally defines the HAS_TIMES symbol, which indicates + that the times() routine exists. The times() routine is normaly + provided on UNIX systems. You may have to include <sys/times.h>. + +d_truncate (d_truncate.U): + This variable conditionally defines HAS_TRUNCATE if truncate() is + available to truncate files. + +d_tzname (d_tzname.U): + This variable conditionally defines HAS_TZNAME if tzname[] is + available to access timezone names. + +d_umask (d_umask.U): + This variable conditionally defines the HAS_UMASK symbol, which + indicates to the C program that the umask() routine is available. + to set and get the value of the file creation mask. + +d_uname (d_gethname.U): + This variable conditionally defines the HAS_UNAME symbol, which + indicates to the C program that the uname() routine may be + used to derive the host name. + +d_vfork (d_vfork.U): + This variable conditionally defines the HAS_VFORK symbol, which + indicates the vfork() routine is available. + +d_void_closedir (d_closedir.U): + This variable conditionally defines VOID_CLOSEDIR if closedir() + does not return a value. + +d_volatile (d_volatile.U): + This variable conditionally defines the HASVOLATILE symbol, which + indicates to the C program that this C compiler knows about the + volatile declaration. + +d_vprintf (d_vprintf.U): + This variable conditionally defines the HAS_VPRINTF symbol, which + indicates to the C program that the vprintf() routine is available + to printf with a pointer to an argument list. + +d_wait4 (d_wait4.U): + This variable conditionally defines the HAS_WAIT4 symbol, which + indicates the wait4() routine is available. + +d_waitpid (d_waitpid.U): + This variable conditionally defines HAS_WAITPID if waitpid() is + available to wait for child process. + +d_wcstombs (d_wcstombs.U): + This variable conditionally defines the HAS_WCSTOMBS symbol, which + indicates to the C program that the wcstombs() routine is available + to convert wide character strings to multibyte strings. + +d_wctomb (d_wctomb.U): + This variable conditionally defines the HAS_WCTOMB symbol, which + indicates to the C program that the wctomb() routine is available + to convert a wide character to a multibyte. + +db_hashtype (i_db.U): + This variable contains the type of the hash structure element + in the <db.h> header file. In older versions of DB, it was + int, while in newer ones it is u_int32_t. + +db_prefixtype (i_db.U): + This variable contains the type of the prefix structure element + in the <db.h> header file. In older versions of DB, it was + int, while in newer ones it is size_t. + +direntrytype (i_dirent.U): + This symbol is set to 'struct direct' or 'struct dirent' depending on + whether dirent is available or not. You should use this pseudo type to + portably declare your directory entries. + +dlext (dlext.U): + This variable contains the extension that is to be used for the + dynamically loaded modules that perl generaties. + +dlsrc (dlsrc.U): + This variable contains the name of the dynamic loading file that + will be used with the package. + +dynamic_ext (Extensions.U): + This variable holds a list of extension files we want to + link dynamically into the package. It is used by Makefile. + +eagain (nblock_io.U): + This variable bears the symbolic errno code set by read() when no + data is present on the file and non-blocking I/O was enabled (otherwise, + read() blocks naturally). + +eunicefix (Init.U): + When running under Eunice this variable contains a command which will + convert a shell script to the proper form of text file for it to be + executable by the shell. On other systems it is a no-op. + +exe_ext (Unix.U): + This variable defines the extension used for executable files. + For unix it is empty. Other possible values include '.exe'. + +firstmakefile (Unix.U): + This variable defines the first file searched by make. On unix, + it is makefile (then Makefile). On case-insensitive systems, + it might be something else. This is only used to deal with + convoluted make depend tricks. + +fpostype (fpostype.U): + This variable defines Fpos_t to be something like fpost_t, long, + uint, or whatever type is used to declare file positions in libc. + +freetype (mallocsrc.U): + This variable contains the return type of free(). It is usually + void, but occasionally int. + +full_csh (d_csh.U): + This variable contains the full pathname to 'csh', whether or + not the user has specified 'portability'. This is only used + in the compiled C program, and we assume that all systems which + can share this executable will have the same full pathname to + 'csh.' + +full_sed (Loc_sed.U): + This variable contains the full pathname to 'sed', whether or + not the user has specified 'portability'. This is only used + in the compiled C program, and we assume that all systems which + can share this executable will have the same full pathname to + 'sed.' + +gidtype (gidtype.U): + This variable defines Gid_t to be something like gid_t, int, + ushort, or whatever type is used to declare the return type + of getgid(). Typically, it is the type of group ids in the kernel. + +groupstype (groupstype.U): + This variable defines Groups_t to be something like gid_t, int, + ushort, or whatever type is used for the second argument to + getgroups(). Usually, this is the same of gidtype, but + sometimes it isn't. + +i_dirent (i_dirent.U): + This variable conditionally defines I_DIRENT, which indicates + to the C program that it should include <dirent.h>. + +i_dlfcn (i_dlfcn.U): + This variable conditionally defines the I_DLFCN symbol, which + indicates to the C program that <dlfcn.h> exists and should + be included. + +i_fcntl (i_fcntl.U): + This variable controls the value of I_FCNTL (which tells + the C program to include <fcntl.h>). + +i_float (i_float.U): + This variable conditionally defines the I_FLOAT symbol, and indicates + whether a C program may include <float.h> to get symbols like DBL_MAX + or DBL_MIN, i.e. machine dependent floating point values. + +i_grp (i_grp.U): + This variable conditionally defines the I_GRP symbol, and indicates + whether a C program should include <grp.h>. + +i_limits (i_limits.U): + This variable conditionally defines the I_LIMITS symbol, and indicates + whether a C program may include <limits.h> to get symbols like WORD_BIT + and friends. + +i_locale (i_locale.U): + This variable conditionally defines the I_LOCALE symbol, + and indicates whether a C program should include <locale.h>. + +i_math (i_math.U): + This variable conditionally defines the I_MATH symbol, and indicates + whether a C program may include <math.h>. + +i_memory (i_memory.U): + This variable conditionally defines the I_MEMORY symbol, and indicates + whether a C program should include <memory.h>. + +i_neterrno (i_neterrno.U): + This variable conditionally defines the I_NET_ERRNO symbol, which + indicates to the C program that <net/errno.h> exists and should + be included. + +i_niin (i_niin.U): + This variable conditionally defines I_NETINET_IN, which indicates + to the C program that it should include <netinet/in.h>. Otherwise, + you may try <sys/in.h>. + +i_pwd (i_pwd.U): + This variable conditionally defines I_PWD, which indicates + to the C program that it should include <pwd.h>. + +i_rpcsvcdbm (i_dbm.U): + This variable conditionally defines the I_RPCSVC_DBM symbol, which + indicates to the C program that <rpcsvc/dbm.h> exists and should + be included. Some System V systems might need this instead of <dbm.h>. + +i_sfio (i_sfio.U): + This variable conditionally defines the I_SFIO symbol, + and indicates whether a C program should include <sfio.h>. + +i_sgtty (i_termio.U): + This variable conditionally defines the I_SGTTY symbol, which + indicates to the C program that it should include <sgtty.h> rather + than <termio.h>. + +i_stdarg (i_varhdr.U): + This variable conditionally defines the I_STDARG symbol, which + indicates to the C program that <stdarg.h> exists and should + be included. + +i_stddef (i_stddef.U): + This variable conditionally defines the I_STDDEF symbol, which + indicates to the C program that <stddef.h> exists and should + be included. + +i_stdlib (i_stdlib.U): + This variable conditionally defines the I_STDLIB symbol, which + indicates to the C program that <stdlib.h> exists and should + be included. + +i_string (i_string.U): + This variable conditionally defines the I_STRING symbol, which + indicates that <string.h> should be included rather than <strings.h>. + +i_sysdir (i_sysdir.U): + This variable conditionally defines the I_SYS_DIR symbol, and indicates + whether a C program should include <sys/dir.h>. + +i_sysfile (i_sysfile.U): + This variable conditionally defines the I_SYS_FILE symbol, and indicates + whether a C program should include <sys/file.h> to get R_OK and friends. + +i_sysioctl (i_sysioctl.U): + This variable conditionally defines the I_SYS_IOCTL symbol, which + indicates to the C program that <sys/ioctl.h> exists and should + be included. + +i_sysndir (i_sysndir.U): + This variable conditionally defines the I_SYS_NDIR symbol, and indicates + whether a C program should include <sys/ndir.h>. + +i_sysparam (i_sysparam.U): + This variable conditionally defines the I_SYS_PARAM symbol, and indicates + whether a C program should include <sys/param.h>. + +i_sysresrc (i_sysresrc.U): + This variable conditionally defines the I_SYS_RESOURCE symbol, + and indicates whether a C program should include <sys/resource.h>. + +i_sysselct (i_sysselct.U): + This variable conditionally defines I_SYS_SELECT, which indicates + to the C program that it should include <sys/select.h> in order to + get the definition of struct timeval. + +i_sysstat (i_sysstat.U): + This variable conditionally defines the I_SYS_STAT symbol, + and indicates whether a C program should include <sys/stat.h>. + +i_systime (i_time.U): + This variable conditionally defines I_SYS_TIME, which indicates + to the C program that it should include <sys/time.h>. + +i_systimek (i_time.U): + This variable conditionally defines I_SYS_TIME_KERNEL, which + indicates to the C program that it should include <sys/time.h> + with KERNEL defined. + +i_systimes (i_systimes.U): + This variable conditionally defines the I_SYS_TIMES symbol, and indicates + whether a C program should include <sys/times.h>. + +i_systypes (i_systypes.U): + This variable conditionally defines the I_SYS_TYPES symbol, + and indicates whether a C program should include <sys/types.h>. + +i_sysun (i_sysun.U): + This variable conditionally defines I_SYS_UN, which indicates + to the C program that it should include <sys/un.h> to get UNIX + domain socket definitions. + +i_syswait (i_syswait.U): + This variable conditionally defines I_SYS_WAIT, which indicates + to the C program that it should include <sys/wait.h>. + +i_termio (i_termio.U): + This variable conditionally defines the I_TERMIO symbol, which + indicates to the C program that it should include <termio.h> rather + than <sgtty.h>. + +i_termios (i_termio.U): + This variable conditionally defines the I_TERMIOS symbol, which + indicates to the C program that the POSIX <termios.h> file is + to be included. + +i_time (i_time.U): + This variable conditionally defines I_TIME, which indicates + to the C program that it should include <time.h>. + +i_unistd (i_unistd.U): + This variable conditionally defines the I_UNISTD symbol, and indicates + whether a C program should include <unistd.h>. + +i_utime (i_utime.U): + This variable conditionally defines the I_UTIME symbol, and indicates + whether a C program should include <utime.h>. + +i_values (i_values.U): + This variable conditionally defines the I_VALUES symbol, and indicates + whether a C program may include <values.h> to get symbols like MAXLONG + and friends. + +i_varargs (i_varhdr.U): + This variable conditionally defines I_VARARGS, which indicates + to the C program that it should include <varargs.h>. + +i_varhdr (i_varhdr.U): + Contains the name of the header to be included to get va_dcl definition. + Typically one of varargs.h or stdarg.h. + +i_vfork (i_vfork.U): + This variable conditionally defines the I_VFORK symbol, and indicates + whether a C program should include vfork.h. + +installbin (bin.U): + This variable is the same as binexp unless AFS is running in which case + the user is explicitely prompted for it. This variable should always + be used in your makefiles for maximum portability. + +installprivlib (privlib.U): + This variable is really the same as privlibexp but may differ on + those systems using AFS. For extra portability, only this variable + should be used in makefiles. + +intsize (intsize.U): + This variable contains the value of the INTSIZE symbol, + which indicates to the C program how many bytes there are + in an integer. + +large (models.U): + This variable contains a flag which will tell the C compiler and loader + to produce a program running with a large memory model. It is up to + the Makefile to use this. + +ld (dlsrc.U): + This variable indicates the program to be used to link + libraries for dynamic loading. On some systems, it is 'ld'. + On ELF systems, it should be $cc. Mostly, we'll try to respect + the hint file setting. + +lddlflags (dlsrc.U): + This variable contains any special flags that might need to be + passed to $ld to create a shared library suitable for dynamic + loading. It is up to the makefile to use it. For hpux, it + should be -b. For sunos 4.1, it is empty. + +ldflags (ccflags.U): + This variable contains any additional C loader flags desired by + the user. It is up to the Makefile to use this. + +lib_ext (Unix.U): + This variable defines the extension used for ordinary libraries. + For unix, it is '.a'. The '.' is included. Other possible + values include '.lib'. + +libperl (libperl.U): + The perl executable is obtained by linking perlmain.c with + libperl, any static extensions (usually just DynaLoader), + and any other libraries needed on this system. libperl + is usually libperl.a, but can also be libperl.so.xxx if + the user wishes to build a perl executable with a shared + library. + +libs (libs.U): + This variable holds the additional libraries we want to use. + It is up to the Makefile to deal with it. + +lns (lns.U): + This variable holds the name of the command to make + symbolic links (if they are supported). It can be used + in the Makefile. It is either 'ln -s' or 'ln' + +longsize (intsize.U): + This variable contains the value of the LONGSIZE symbol, + which indicates to the C program how many bytes there are + in a long integer. + +lseektype (lseektype.U): + This variable defines lseektype to be something like off_t, long, + or whatever type is used to declare lseek offset's type in the + kernel (which also appears to be lseek's return type). + +make (make.U): + This variable sets the path to the 'make' command. It is + here rather than in Loc.U so that users can override it + with Configure -Dmake=pmake, or equivalent. + +make_set_make (make.U): + Some versions of 'make' set the variable MAKE. Others do not. + This variable contains the string to be included in Makefile.SH + so that MAKE is set if needed, and not if not needed. + Possible values are: + make_set_make='#' # If your make program handles this for you, + make_set_make=$make # if it doesn't. + I used a comment character so that we can distinguish a + 'set' value (from a previous config.sh or Configure -D option) + from an uncomputed value. + +mallocobj (mallocsrc.U): + This variable contains the name of the malloc.o that this package + generates, if that malloc.o is preferred over the system malloc. + Otherwise the value is null. This variable is intended for generating + Makefiles. See mallocsrc. + +mallocsrc (mallocsrc.U): + This variable contains the name of the malloc.c that comes with + the package, if that malloc.c is preferred over the system malloc. + Otherwise the value is null. This variable is intended for generating + Makefiles. + +malloctype (mallocsrc.U): + This variable contains the kind of ptr returned by malloc and realloc. + +man1dir (man1dir.U): + This variable contains the name of the directory in which manual + source pages are to be put. It is the responsibility of the + Makefile.SH to get the value of this into the proper command. + You must be prepared to do the ~name expansion yourself. + +man1ext (man1dir.U): + This variable contains the extension that the manual page should + have: one of 'n', 'l', or '1'. The Makefile must supply the '.'. + See man1dir. + +man3dir (man3dir.U): + This variable contains the name of the directory in which manual + source pages are to be put. It is the responsibility of the + Makefile.SH to get the value of this into the proper command. + You must be prepared to do the ~name expansion yourself. + +man3ext (man3dir.U): + This variable contains the extension that the manual page should + have: one of 'n', 'l', or '3'. The Makefile must supply the '.'. + See man3dir. + +modetype (modetype.U): + This variable defines modetype to be something like mode_t, + int, unsigned short, or whatever type is used to declare file + modes for system calls. + +n (n.U): + This variable contains the -n flag if that is what causes the echo + command to suppress newline. Otherwise it is null. Correct usage is + $echo $n "prompt for a question: $c". + +o_nonblock (nblock_io.U): + This variable bears the symbol value to be used during open() or fcntl() + to turn on non-blocking I/O for a file descriptor. If you wish to switch + between blocking and non-blocking, you may try ioctl(FIOSNBIO) instead, + but that is only supported by some devices. + +oldarchlib (oldarchlib.U): + This variable holds the name of the directory in which perl5.000 + and perl5.001 stored + architecture-dependent public library files. + +oldarchlibexp (oldarchlib.U): + This variable is the same as the oldarchlib variable, but is + filename expanded at configuration time, for convenient use. + +optimize (ccflags.U): + This variable contains any optimizer/debugger flag that should be used. + It is up to the Makefile to use it. + +osname (Oldconfig.U): + This variable contains the operating system name (e.g. sunos, + solaris, hpux, etc.). It can be useful later on for setting + defaults. Any spaces are replaced with underscores. It is set + to a null string if we can't figure it out. + +pager (pager.U): + This variable contains the name of the preferred pager on the system. + Usual values are (the full pathnames of) more, less, pg, or cat. + +path_sep (Unix.U): + This variable defines the character used to separate elements in + the shell's PATH environment variable. On Unix, it is ':'. + This is probably identical to Head.U's p_ variable and can + probably be dropped. + +perladmin (perladmin.U): + Electronic mail address of the perl5 administrator. + +perlpath (perlpath.U): + This variable contains the eventual value of the PERLPATH symbol, + which contains the name of the perl interpreter to be used in + shell scripts and in the "eval 'exec'" idiom. + +prefix (prefix.U): + This variable holds the name of the directory below which the + user will install the package. Usually, this is /usr/local, and + executables go in /usr/local/bin, library stuff in /usr/local/lib, + man pages in /usr/local/man, etc. It is only used to set defaults + for things in bin.U, mansrc.U, privlib.U, or scriptdir.U. + +privlib (privlib.U): + This variable contains the eventual value of the PRIVLIB symbol, + which is the name of the private library for this package. It may + have a ~ on the front. It is up to the makefile to eventually create + this directory while performing installation (with ~ substitution). + +privlibexp (privlib.U): + This variable is the ~name expanded version of privlib, so that you + may use it directly in Makefiles or shell scripts. + +prototype (prototype.U): + This variable holds the eventual value of CAN_PROTOTYPE, which + indicates the C compiler can handle funciton prototypes. + +randbits (randbits.U): + This variable contains the eventual value of the RANDBITS symbol, + which indicates to the C program how many bits of random number + the rand() function produces. + +ranlib (orderlib.U): + This variable is set to the pathname of the ranlib program, if it is + needed to generate random libraries. Set to ":" if ar can generate + random libraries or if random libraries are not supported + +rd_nodata (nblock_io.U): + This variable holds the return code from read() when no data is + present. It should be -1, but some systems return 0 when O_NDELAY is + used, which is a shame because you cannot make the difference between + no data and an EOF.. Sigh! + +scriptdir (scriptdir.U): + This variable holds the name of the directory in which the user wants + to put publicly scripts for the package in question. It is either + the same directory as for binaries, or a special one that can be + mounted across different architectures, like /usr/share. Programs + must be prepared to deal with ~name expansion. + +selecttype (selecttype.U): + This variable holds the type used for the 2nd, 3rd, and 4th + arguments to select. Usually, this is 'fd_set *', if HAS_FD_SET + is defined, and 'int *' otherwise. This is only useful if you + have select(), naturally. + +sh (sh.U): + This variable contains the full pathname of the shell used + on this system to execute Bourne shell scripts. Usually, this will be + /bin/sh, though it's possible that some systems will have /bin/ksh, + /bin/pdksh, /bin/ash, /bin/bash, or even something such as + D:/bin/sh.exe. + This unit comes before Options.U, so you can't set sh with a -D + option, though you can override this (and startsh) + with -O -Dsh=/bin/whatever -Dstartsh=whatever + +shmattype (d_shmat.U): + This symbol contains the type of pointer returned by shmat(). + It can be 'void *' or 'char *'. + +shortsize (intsize.U): + This variable contains the value of the SHORTSIZE symbol, + which indicates to the C program how many bytes there are + in a short integer. + +shrpenv (libperl.U): + If the user builds a shared libperl.so, then we need to tell the + 'perl' executable where it will be able to find the installed libperl.so. + One way to do this on some systems is to set the environment variable + LD_RUN_PATH to the directory that will be the final location of the + shared libperl.so. The makefile can use this with something like + $shrpenv $(CC) -o perl perlmain.o $libperl $libs + Typical values are + shrpenv="env LD_RUN_PATH=$archlibexp/CORE" + or + shrpenv='' + See the main perl Makefile.SH for actual working usage. + Alternatively, we might be able to use a command line option such + as -R $archlibexp/CORE (Solaris, NetBSD) or -Wl,-rpath + $archlibexp/CORE (Linux). + +sig_name (sig_name.U): + This variable holds the signal names, space separated. The leading + SIG in signals name is removed. See sig_num. + +sig_num (sig_name.U): + This variable holds the signal numbers, space separated. Those numbers + correspond to the value of the signal listed in the same place within + the sig_name list. + +signal_t (d_voidsig.U): + This variable holds the type of the signal handler (void or int). + +sitearch (sitearch.U): + This variable contains the eventual value of the SITEARCH symbol, + which is the name of the private library for this package. It may + have a ~ on the front. It is up to the makefile to eventually create + this directory while performing installation (with ~ substitution). + +sitearchexp (sitearch.U): + This variable is the ~name expanded version of sitearch, so that you + may use it directly in Makefiles or shell scripts. + +sitelib (sitelib.U): + This variable contains the eventual value of the SITELIB symbol, + which is the name of the private library for this package. It may + have a ~ on the front. It is up to the makefile to eventually create + this directory while performing installation (with ~ substitution). + +sitelibexp (sitelib.U): + This variable is the ~name expanded version of sitelib, so that you + may use it directly in Makefiles or shell scripts. + +sizetype (sizetype.U): + This variable defines sizetype to be something like size_t, + unsigned long, or whatever type is used to declare length + parameters for string functions. + +small (models.U): + This variable contains a flag which will tell the C compiler and loader + to produce a program running with a small memory model. It is up to + the Makefile to use this. + +spitshell (spitshell.U): + This variable contains the command necessary to spit out a runnable + shell on this system. It is either cat or a grep -v for # comments. + +split (models.U): + This variable contains a flag which will tell the C compiler and loader + to produce a program that will run in separate I and D space, for those + machines that support separation of instruction and data space. It is + up to the Makefile to use this. + +ssizetype (ssizetype.U): + This variable defines ssizetype to be something like ssize_t, + long or int. It is used by functions that return a count + of bytes or an error condition. It must be a signed type. + We will pick a type such that sizeof(SSize_t) == sizeof(Size_t). + +startperl (startperl.U): + This variable contains the string to put on the front of a perl + script to make sure (hopefully) that it runs with perl and not some + shell. Of course, that leading line must be followed by the classical + perl idiom: + eval 'exec /usr/bin/perl -S $0 ${1+"$@"}' + if $running_under_some_shell; + to guarantee perl startup should the shell execute the script. Note + that this magic incatation is not understood by csh. + +startsh (startsh.U): + This variable contains the string to put on the front of a shell + script to make sure (hopefully) that it runs with sh and not some + other shell. + +static_ext (Extensions.U): + This variable holds a list of extension files we want to + link statically into the package. It is used by Makefile. + +stdchar (stdchar.U): + This variable conditionally defines STDCHAR to be the type of char + used in stdio.h. It has the values "unsigned char" or "char". + +timetype (d_time.U): + This variable holds the type returned by time(). It can be long, + or time_t on BSD sites (in which case <sys/types.h> should be + included). Anyway, the type Time_t should be used. + +uidtype (uidtype.U): + This variable defines Uid_t to be something like uid_t, int, + ushort, or whatever type is used to declare user ids in the kernel. + +useperlio (useperlio.U): + This variable conditionally defines the USE_PERLIO symbol, + and indicates that the PerlIO abstraction should be + used throughout. + +useshrplib (libperl.U): + This variable is set to 'yes' if the user wishes + to build a shared libperl, and 'no' otherwise. + +voidflags (voidflags.U): + This variable contains the eventual value of the VOIDFLAGS symbol, + which indicates how much support of the void type is given by this + compiler. See VOIDFLAGS for more info. + diff --git a/gnu/usr.bin/perl/Porting/makerel b/gnu/usr.bin/perl/Porting/makerel new file mode 100644 index 00000000000..f719a5e9361 --- /dev/null +++ b/gnu/usr.bin/perl/Porting/makerel @@ -0,0 +1,100 @@ +#!/bin/env perl -w + +# A first attempt at some automated support for making a perl release. +# Very basic but functional - if you're on a unix system. +# +# No matter how automated this gets, you'll always need to read +# and re-read pumpkin.pod checking for things to be done at various +# stages of the process. +# +# Tim Bunce, June 1997 + +use ExtUtils::Manifest qw(fullcheck); + +$|=1; +$relroot = ".."; # XXX make an option + +die "Must be in root of the perl source tree.\n" + unless -f "./MANIFEST" and -f "patchlevel.h"; + +$patchlevel_h = `grep '#define ' patchlevel.h`; +print $patchlevel_h; +$patchlevel = $1 if $patchlevel_h =~ /PATCHLEVEL\s+(\d+)/; +$subversion = $1 if $patchlevel_h =~ /SUBVERSION\s+(\d+)/; +die "Unable to parse patchlevel.h" unless $subversion > 0; +$vers = sprintf("5.%03d", $patchlevel); +$vers.= sprintf( "_%02d", $subversion) if $subversion; + +$perl = "perl$vers"; +$reldir = "$relroot/$perl"; +$reldir .= "-$ARGV[0]" if $ARGV[0]; + +print "\nMaking a release for $perl in $reldir\n\n"; + + +print "Cross-checking the MANIFEST...\n"; +($missfile, $missentry) = fullcheck(); +warn "Can't make a release with MANIFEST files missing.\n" if @$missfile; +warn "Can't make a release with files not listed in MANIFEST.\n" if @$missentry; +if ("@$missentry" =~ m/\.orig\b/) { + # Handy listing of find command and .orig files from patching work. + # I tend to run 'xargs rm' and copy and paste the file list. + my $cmd = "find . -name '*.orig' -print"; + print "$cmd\n"; + system($cmd); +} +die "Aborted.\n" if @$missentry or @$missfile; +print "\n"; + + +print "Setting file permissions...\n"; +system("find . -type f -print | xargs chmod -w"); +system("find . -type d -print | xargs chmod g-s"); +system("find t -name '*.t' -print | xargs chmod +x"); +system("chmod +w configure"); # special case (see pumpkin.pod) +@exe = qw( + Configure + configpm + configure + embed.pl + installperl + installman + keywords.pl + myconfig + opcode.pl + perly.fixer + t/TEST + t/*/*.t + *.SH + vms/ext/Stdio/test.pl + vms/ext/filespec.t + vms/fndvers.com + x2p/*.SH + Porting/patchls + Porting/makerel +); +system("chmod +x @exe"); +print "\n"; + + +print "Creating $reldir release directory...\n"; +die "$reldir release directory already exists\n" if -e "../$perl"; +die "$reldir.tar.gz release file already exists\n" if -e "../$reldir.tar.gz"; +mkdir($reldir, 0755) or die "mkdir $reldir: $!\n"; +print "\n"; + + +print "Copying files to release directory...\n"; +# ExtUtils::Manifest maniread does not preserve the order +$cmd = "awk '{print \$1}' MANIFEST | cpio -pdm $reldir"; +system($cmd) == 0 or die "$cmd failed"; +print "\n"; + +chdir $relroot or die $!; + +print "Creating and compressing the tar file...\n"; +$cmd = "tar cf - $perl | gzip --best > $perl.tar.gz"; +system($cmd) == 0 or die "$cmd failed"; +print "\n"; + +system("ls -ld $perl*"); diff --git a/gnu/usr.bin/perl/Porting/patchls b/gnu/usr.bin/perl/Porting/patchls new file mode 100644 index 00000000000..1d4bd5ac400 --- /dev/null +++ b/gnu/usr.bin/perl/Porting/patchls @@ -0,0 +1,431 @@ +#!/bin/perl -w +# +# patchls - patch listing utility +# +# Input is one or more patchfiles, output is a list of files to be patched. +# +# Copyright (c) 1997 Tim Bunce. All rights reserved. +# This program is free software; you can redistribute it and/or +# modify it under the same terms as Perl itself. +# +# With thanks to Tom Horsley for the seed code. + + +use Getopt::Std; +use Text::Wrap qw(wrap $columns); +use Text::Tabs qw(expand unexpand); +use strict; +use vars qw($VERSION); + +$VERSION = 2.04; + +sub usage { +die q{ + patchls [options] patchfile [ ... ] + + -h no filename headers (like grep), only the listing. + -l no listing (like grep), only the filename headers. + -i Invert: for each patched file list which patch files patch it. + -c Categorise the patch and sort by category (perl specific). + -m print formatted Meta-information (Subject,From,Msg-ID etc). + -p N strip N levels of directory Prefix (like patch), else automatic. + -v more verbose (-d for noisy debugging). + -f F only list patches which patch files matching regexp F + (F has $ appended unless it contains a /). + other options for special uses: + -I just gather and display summary Information about the patches. + -4 write to stdout the PerForce commands to prepare for patching. + -M T Like -m but only output listed meta tags (eg -M 'Title From') + -W N set wrap width to N (defaults to 70, use 0 for no wrap) +} +} + +$::opt_p = undef; # undef != 0 +$::opt_d = 0; +$::opt_v = 0; +$::opt_m = 0; +$::opt_i = 0; +$::opt_h = 0; +$::opt_l = 0; +$::opt_c = 0; +$::opt_f = ''; + +# special purpose options +$::opt_I = 0; +$::opt_4 = 0; # output PerForce commands to prepare for patching +$::opt_M = ''; # like -m but only output these meta items (-M Title) +$::opt_W = 70; # set wrap width columns (see Text::Wrap module) + +usage unless @ARGV; + +getopts("mihlvc4p:f:IM:W:") or usage; + +$columns = $::opt_W || 9999999; + +$::opt_m = 1 if $::opt_M; +my @show_meta = split(' ', $::opt_M || 'Title From Msg-ID'); + +my %cat_title = ( + 'BUILD' => 'BUILD PROCESS', + 'CORE' => 'CORE LANGUAGE', + 'DOC' => 'DOCUMENTATION', + 'LIB' => 'LIBRARY AND EXTENSIONS', + 'PORT1' => 'PORTABILITY - WIN32', + 'PORT2' => 'PORTABILITY - GENERAL', + 'TEST' => 'TESTS', + 'UTIL' => 'UTILITIES', + 'OTHER' => 'OTHER CHANGES', +); + +my %ls; + +# Style 1: +# *** perl-5.004/embed.h Sat May 10 03:39:32 1997 +# --- perl-5.004.fixed/embed.h Thu May 29 19:48:46 1997 +# *************** +# *** 308,313 **** +# --- 308,314 ---- +# +# Style 2: +# --- perl5.004001/mg.c Sun Jun 08 12:26:24 1997 +# +++ perl5.004-bc/mg.c Sun Jun 08 11:56:08 1997 +# @@ -656,9 +656,27 @@ +# or (rcs, note the different date format) +# --- 1.18 1997/05/23 19:22:04 +# +++ ./pod/perlembed.pod 1997/06/03 21:41:38 +# +# Variation: +# Index: embed.h + +my($in, $prevline, $prevtype, $ls); +my(@removed, @added); +my $prologue = 1; # assume prologue till patch or /^exit\b/ seen + +foreach my $argv (@ARGV) { + $in = $argv; + unless (open F, "<$in") { + warn "Unable to open $in: $!\n"; + next; + } + print "Reading $in...\n" if $::opt_v and @ARGV > 1; + $ls = $ls{$in} ||= { is_in => 1, in => $in }; + my $type; + while (<F>) { + unless (/^([-+*]{3}) / || /^(Index):/) { + # not an interesting patch line + # but possibly meta-information or prologue + if ($prologue) { + push @added, $1 if /^touch\s+(\S+)/; + push @removed, $1 if /^rm\s+(?:-f)?\s*(\S+)/; + $prologue = 0 if /^exit\b/; + } + next unless $::opt_m; + $ls->{From}{$1}=1,next if /^From:\s+(.*\S)/i; + $ls->{Title}{$1}=1,next if /^Subject:\s+(?:Re: )?(.*\S)/i; + $ls->{'Msg-ID'}{$1}=1,next if /^Message-Id:\s+(.*\S)/i; + $ls->{Date}{$1}=1,next if /^Date:\s+(.*\S)/i; + $ls->{$1}{$2}=1,next if /^([-\w]+):\s+(.*\S)/; + next; + } + $type = $1; + next if /^--- [0-9,]+ ----$/ || /^\*\*\* [0-9,]+ \*\*\*\*$/; + $prologue = 0; + + print "Last: $prevline","This: ${_}Got: $1\n\n" if $::opt_d; + + # Some patches have Index lines but not diff headers + # Patch copes with this, so must we. It's also handy for + # documenting manual changes by simply adding Index: lines + # to the file which describes the problem bing fixed. + add_file($ls, $1), next if /^Index:\s+(\S+)/; + + if ( ($type eq '---' and $prevtype eq '***') # Style 1 + or ($type eq '+++' and $prevtype eq '---') # Style 2 + ) { + if (/^[-+*]{3} (\S+)\s*(.*?\d\d:\d\d:\d\d)?/) { # double check + add_file($ls, $1); + } + else { + warn "$in $.: parse error (prev $prevtype, type $type)\n$prevline$_"; + } + } + } + continue { + $prevline = $_; + $prevtype = $type; + $type = ''; + } + # if we don't have a title for -m then use the file name + $ls->{Title}{$in}=1 if $::opt_m + and !$ls->{Title} and $ls->{out}; + + $ls->{category} = $::opt_c + ? categorize_files([keys %{ $ls->{out} }], $::opt_v) : ''; +} +print scalar(@ARGV)." files read.\n" if $::opt_v and @ARGV > 1; + + +# --- Firstly we filter and sort as needed --- + +my @ls = values %ls; + +if ($::opt_f) { # filter out patches based on -f <regexp> + my $out; + $::opt_f .= '$' unless $::opt_f =~ m:/:; + @ls = grep { + my @out = keys %{$_->{out}}; + my $match = 0; + for $out (@out) { + ++$match if $out =~ m/$::opt_f/o; + } + $match; + } @ls; +} + +@ls = sort { + $a->{category} cmp $b->{category} || $a->{in} cmp $b->{in} +} @ls; + + +# --- Handle special modes --- + +if ($::opt_4) { + print map { "p4 delete $_\n" } @removed if @removed; + print map { "p4 add $_\n" } @added if @added; + my @patches = grep { $_->{is_in} } @ls; + my %patched = map { ($_, 1) } map { keys %{$_->{out}} } @patches; + delete @patched{@added}; + my @patched = sort keys %patched; + print map { "p4 edit $_\n" } @patched if @patched; + exit 0; +} + +if ($::opt_I) { + my $n_patches = 0; + my($in,$out); + my %all_out; + foreach $in (@ls) { + next unless $in->{is_in}; + ++$n_patches; + my @outs = keys %{$in->{out}}; + @all_out{@outs} = ($in->{in}) x @outs; + } + my @all_out = sort keys %all_out; + my @missing = grep { ! -f $_ } @all_out; + print "$n_patches patch files patch ".@all_out." files (".@missing." missing)\n"; + print "(use -v to list patches which patch 'missing' files)\n" + if @missing && !$::opt_v; + if ($::opt_v and @missing) { + print "Missing files:\n"; + foreach $out (@missing) { + printf " %-20s\t%s\n", $out, $all_out{$out}; + } + } + print "Added files: @added\n" if @added; + print "Removed files: @removed\n" if @removed; + exit 0+@missing; +} + +unless ($::opt_c and $::opt_m) { + foreach $ls (@ls) { + next unless ($::opt_i) ? $ls->{is_out} : $ls->{is_in}; + list_files_by_patch($ls); + } +} +else { + my $c = ''; + foreach $ls (@ls) { + next unless ($::opt_i) ? $ls->{is_out} : $ls->{is_in}; + print "\n ------ $cat_title{$ls->{category}} ------\n" + if $ls->{category} ne $c; + $c = $ls->{category}; + unless ($::opt_i) { + list_files_by_patch($ls); + } + else { + my $out = $ls->{in}; + print "\n$out patched by:\n"; + # find all the patches which patch $out and list them + my @p = grep { $_->{out}->{$out} } values %ls; + foreach $ls (@p) { + list_files_by_patch($ls, ''); + } + } + } + print "\n"; +} + +exit 0; + + +# --- + + +sub add_file { + my $ls = shift; + my $out = trim_name(shift); + + $ls->{out}->{$out} = 1; + + # do the -i inverse as well, even if we're not doing -i + my $i = $ls{$out} ||= { + is_out => 1, + in => $out, + category => $::opt_c ? categorize_files([ $out ], $::opt_v) : '', + }; + $i->{out}->{$in} = 1; +} + + +sub trim_name { # reduce/tidy file paths from diff lines + my $name = shift; + $name = "$name ($in)" if $name eq "/dev/null"; + $name =~ s:\\:/:g; # adjust windows paths + $name =~ s://:/:g; # simplify (and make win \\share into absolute path) + if (defined $::opt_p) { + # strip on -p levels of directory prefix + my $dc = $::opt_p; + $name =~ s:^[^/]+/(.+)$:$1: while $dc-- > 0; + } + else { # try to strip off leading path to perl directory + # if absolute path, strip down to any *perl* directory first + $name =~ s:^/.*?perl.*?/::i; + $name =~ s:.*perl[-_]?5?[._]?[-_a-z0-9.+]*/::i; + $name =~ s:^\./::; + } + return $name; +} + + +sub list_files_by_patch { + my($ls, $name) = @_; + $name = $ls->{in} unless defined $name; + my @meta; + if ($::opt_m) { + my $meta; + foreach $meta (@show_meta) { + next unless $ls->{$meta}; + my @list = sort keys %{$ls->{$meta}}; + push @meta, sprintf "%7s: ", $meta; + if ($meta eq 'Title') { + @list = map { s/\[?PATCH\]?:?\s*//g; "\"$_\""; } @list + } + elsif ($meta eq 'From') { + # fix-up bizzare addresses from japan and ibm :-) + foreach(@list) { + s:\W+=?iso.*?<: <:; + s/\d\d-\w\w\w-\d{4}\s+\d\d:\S+\s*//; + } + } + elsif ($meta eq 'Msg-ID') { + my %from; # limit long threads to one msg-id per site + @list = map { + $from{(/@(.*?)>/ ? $1 : $_)}++ ? () : ($_); + } @list; + } + push @meta, my_wrap(""," ", join(", ",@list)."\n"); + } + $name = "\n$name" if @meta and $name; + } + # don't print the header unless the file contains something interesting + return if !@meta and !$ls->{out}; + print("$ls->{in}\n"),return if $::opt_l; # -l = no listing + + # a twisty maze of little options + my $cat = ($ls->{category} and !$::opt_m) ? "\t$ls->{category}" : ""; + print "$name$cat: " unless ($::opt_h and !$::opt_v) or !"$name$cat"; + print join('',"\n",@meta) if @meta; + + my @v = sort PATORDER keys %{ $ls->{out} }; + my $v = "@v\n"; + print $::opt_m ? " Files: ".my_wrap(""," ",$v) : $v; +} + + +sub my_wrap { + my $txt = eval { expand(wrap(@_)) }; # die's on long lines! + return $txt unless $@; + return expand("@_"); +} + + + +sub categorize_files { + my($files, $verb) = @_; + my(%c, $refine); + + foreach (@$files) { # assign a score to a file path + # the order of some of the tests is important + $c{TEST} += 5,next if m:^t/:; + $c{DOC} += 5,next if m:^pod/:; + $c{UTIL} += 10,next if m:^(utils|x2p|h2pl)/:; + $c{PORT1}+= 15,next if m:^win32:; + $c{PORT2} += 15,next + if m:^(cygwin32|os2|plan9|qnx|vms)/: + or m:^(hints|Porting|ext/DynaLoader)/: + or m:^README\.:; + $c{LIB} += 10,next + if m:^(lib|ext)/:; + $c{'CORE'} += 15,next + if m:^[^/]+[\._]([chH]|sym|pl)$:; + $c{BUILD} += 10,next + if m:^[A-Z]+$: or m:^[^/]+\.SH$: + or m:^(install|configure|configpm):i; + print "Couldn't categorise $_\n" if $::opt_v; + $c{OTHER} += 1; + } + if (keys %c > 1) { # sort to find category with highest score + refine: + ++$refine; + my @c = sort { $c{$b} <=> $c{$a} || $a cmp $b } keys %c; + my @v = map { $c{$_} } @c; + if (@v > 1 and $refine <= 1 and "@v" =~ /^(\d) \1/ + and $c[0] =~ m/^(DOC|TESTS|OTHER)/) { # rare + print "Tie, promoting $c[1] over $c[0]\n" if $::opt_d; + ++$c{$c[1]}; + goto refine; + } + print " ".@$files." patches: ", join(", ", map { "$_: $c{$_}" } @c),".\n" + if $verb; + return $c[0] || 'OTHER'; + } + else { + my($c, $v) = %c; + $c ||= 'OTHER'; $v ||= 0; + print " ".@$files." patches: $c: $v\n" if $verb; + return $c; + } +} + + +sub PATORDER { # PATORDER sort by Chip Salzenberg + my ($i, $j); + + $i = ($a =~ m#^[A-Z]+$#); + $j = ($b =~ m#^[A-Z]+$#); + return $j - $i if $i != $j; + + $i = ($a =~ m#configure|hint#i) || ($a =~ m#[S_]H$#); + $j = ($b =~ m#configure|hint#i) || ($b =~ m#[S_]H$#); + return $j - $i if $i != $j; + + $i = ($a =~ m#\.pod$#); + $j = ($b =~ m#\.pod$#); + return $j - $i if $i != $j; + + $i = ($a =~ m#include/#); + $j = ($b =~ m#include/#); + return $j - $i if $i != $j; + + if ((($i = $a) =~ s#/+[^/]*$##) + && (($j = $b) =~ s#/+[^/]*$##)) { + return $i cmp $j if $i ne $j; + } + + $i = ($a =~ m#\.h$#); + $j = ($b =~ m#\.h$#); + return $j - $i if $i != $j; + + return $a cmp $b; +} + diff --git a/gnu/usr.bin/perl/Porting/pumpkin.pod b/gnu/usr.bin/perl/Porting/pumpkin.pod new file mode 100644 index 00000000000..6706c6c3c42 --- /dev/null +++ b/gnu/usr.bin/perl/Porting/pumpkin.pod @@ -0,0 +1,1180 @@ +=head1 NAME + +Pumpkin - Notes on handling the Perl Patch Pumpkin + +=head1 SYNOPSIS + +There is no simple synopsis, yet. + +=head1 DESCRIPTION + +This document attempts to begin to describe some of the +considerations involved in patching and maintaining perl. + +This document is still under construction, and still subject to +significant changes. Still, I hope parts of it will be useful, +so I'm releasing it even though it's not done. + +For the most part, it's a collection of anecdotal information that +already assumes some familiarity with the Perl sources. I really need +an introductory section that describes the organization of the sources +and all the various auxiliary files that are part of the distribution. + +=head1 Where Do I Get Perl Sources and Related Material? + +The Comprehensive Perl Archive Network (or CPAN) is the place to go. +There are many mirrors, but the easiest thing to use is probably +http://www.perl.com/CPAN/README.html , which automatically points you to a +mirror site "close" to you. + +=head2 Perl5-porters mailing list + +The mailing list perl5-porters@perl.org +is the main group working with the development of perl. If you're +interested in all the latest developments, you should definitely +subscribe. The list is high volume, but generally has a +fairly low noise level. + +Subscribe by sending the message (in the body of your letter) + + subscribe perl5-porters + +to perl5-porters-request@perl.org . + +Archives of the list are held at: + + http://www.rosat.mpe-garching.mpg.de/mailing-lists/perl-porters/ + +=head1 How are Perl Releases Numbered? + +Perl version numbers are floating point numbers, such as 5.004. +(Observations about the imprecision of floating point numbers for +representing reality probably have more relevance than you might +imagine :-) The major version number is 5 and the '004' is the +patchlevel. (Questions such as whether or not '004' is really a minor +version number can safely be ignored.:) + +The version number is available as the magic variable $], +and can be used in comparisons, e.g. + + print "You've got an old perl\n" if $] < 5.002; + +You can also require particular version (or later) with + + use 5.002; + +At some point in the future, we may need to decide what to call the +next big revision. In the .package file used by metaconfig to +generate Configure, there are two variables that might be relevant: +$baserev=5.0 and $package=perl5. At various times, I have suggested +we might change them to $baserev=5.1 and $package=perl5.1 if want +to signify a fairly major update. Or, we might want to jump to perl6. +Let's worry about that problem when we get there. + +=head2 Subversions + +In addition, there may be "developer" sub-versions available. These +are not official releases. They may contain unstable experimental +features, and are subject to rapid change. Such developer +sub-versions are numbered with sub-version numbers. For example, +version 5.003_04 is the 4'th developer version built on top of +5.003. It might include the _01, _02, and _03 changes, but it +also might not. Sub-versions are allowed to be subversive. (But see +the next section for recent changes.) + +These sub-versions can also be used as floating point numbers, so +you can do things such as + + print "You've got an unstable perl\n" if $] == 5.00303; + +You can also require particular version (or later) with + + use 5.003_03; # the "_" is optional + +Sub-versions produced by the members of perl5-porters are usually +available on CPAN in the F<src/5.0/unsupported> directory. + +=head2 Maintenance and Development Subversions + +As an experiment, starting with version 5.004, subversions _01 through +_49 will be reserved for bug-fix maintenance releases, and subversions +_50 through _99 will be available for unstable development versions. + +The separate bug-fix track is being established to allow us an easy +way to distribute important bug fixes without waiting for the +developers to untangle all the other problems in the current +developer's release. + +Trial releases of bug-fix maintenance releases are announced on +perl5-porters. Trial releases use the new subversion number (to avoid +testers installing it over the previous release) and include a 'local +patch' entry in patchlevel.h. + +Watch for announcements of maintenance subversions in +comp.lang.perl.announce. + +=head2 Why such a complicated scheme? + +Two reasons, really. At least. + +First, we need some way to identify and release collections of patches +that are known to have new features that need testing and exploration. The +subversion scheme does that nicely while fitting into the +C<use 5.004;> mold. + +Second, since most of the folks who help maintain perl do so on a +free-time voluntary basis, perl development does not proceed at a +precise pace, though it always seems to be moving ahead quickly. +We needed some way to pass around the "patch pumpkin" to allow +different people chances to work on different aspects of the +distribution without getting in each other's way. It wouldn't be +constructive to have multiple people working on incompatible +implementations of the same idea. Instead what was needed was +some kind of "baton" or "token" to pass around so everyone knew +whose turn was next. + +=head2 Why is it called the patch pumpkin? + +Chip Salzenberg gets credit for that, with a nod to his cow orker, +David Croy. We had passed around various names (baton, token, hot +potato) but none caught on. Then, Chip asked: + +[begin quote] + + Who has the patch pumpkin? + +To explain: David Croy once told me once that at a previous job, +there was one tape drive and multiple systems that used it for backups. +But instead of some high-tech exclusion software, they used a low-tech +method to prevent multiple simultaneous backups: a stuffed pumpkin. +No one was allowed to make backups unless they had the "backup pumpkin". + +[end quote] + +The name has stuck. + +=head1 Philosophical Issues in Patching Perl + +There are no absolute rules, but there are some general guidelines I +have tried to follow as I apply patches to the perl sources. +(This section is still under construction.) + +=head2 Solve problems as generally as possible + +Never implement a specific restricted solution to a problem when you +can solve the same problem in a more general, flexible way. + +For example, for dynamic loading to work on some SVR4 systems, we had +to build a shared libperl.so library. In order to build "FAT" binaries +on NeXT 4.0 systems, we had to build a special libperl library. Rather +than continuing to build a contorted nest of special cases, I +generalized the process of building libperl so that NeXT and SVR4 users +could still get their work done, but others could build a shared +libperl if they wanted to as well. + +=head2 Seek consensus on major changes + +If you are making big changes, don't do it in secret. Discuss the +ideas in advance on perl5-porters. + +=head2 Keep the documentation up-to-date + +If your changes may affect how users use perl, then check to be sure +that the documentation is in sync with your changes. Be sure to +check all the files F<pod/*.pod> and also the F<INSTALL> document. + +Consider writing the appropriate documentation first and then +implementing your change to correspond to the documentation. + +=head2 Avoid machine-specific #ifdef's + +To the extent reasonable, try to avoid machine-specific #ifdef's in +the sources. Instead, use feature-specific #ifdef's. The reason is +that the machine-specific #ifdef's may not be valid across major +releases of the operating system. Further, the feature-specific tests +may help out folks on another platform who have the same problem. + +=head2 Allow for lots of testing + +We should never release a main version without testing it as a +subversion first. + +=head2 Test popular applications and modules. + +We should never release a main version without testing whether or not +it breaks various popular modules and applications. A partial list of +such things would include majordomo, metaconfig, apache, Tk, CGI, +libnet, and libwww, to name just a few. Of course it's quite possible +that some of those things will be just plain broken and need to be fixed, +but, in general, we ought to try to avoid breaking widely-installed +things. + +=head2 Automate generation of derivative files + +The F<embed.h>, F<keywords.h>, F<opcode.h>, and F<perltoc.pod> files +are all automatically generated by perl scripts. In general, don't +patch these directly; patch the data files instead. + +F<Configure> and F<config_h.SH> are also automatically generated by +B<metaconfig>. In general, you should patch the metaconfig units +instead of patching these files directly. However, minor changes to +F<Configure> may be made in between major sync-ups with the metaconfig +units, which tends to be complicated operations. + +=head1 How to Make a Distribution + +There really ought to be a 'make dist' target, but there isn't. +The 'dist' suite of tools also contains a number of tools that I haven't +learned how to use yet. Some of them may make this all a bit easier. + +Here are the steps I go through to prepare a patch & distribution. + +Lots of it could doubtless be automated but isn't. The Porting/makerel +(make release) perl script does now help automate some parts of it. + +=head2 Announce your intentions + +First, you should volunteer out loud to take the patch pumpkin. It's +generally counter-productive to have multiple people working in secret +on the same thing. + +At the same time, announce what you plan to do with the patch pumpkin, +to allow folks a chance to object or suggest alternatives, or do it for +you. Naturally, the patch pumpkin holder ought to incorporate various +bug fixes and documentation improvements that are posted while he or +she has the pumpkin, but there might also be larger issues at stake. + +One of the precepts of the subversion idea is that we shouldn't give +the patch pumpkin to anyone unless we have some idea what he or she +is going to do with it. + +=head2 refresh pod/perltoc.pod + +Presumably, you have done a full C<make> in your working source +directory. Before you C<make spotless> (if you do), and if you have +changed any documentation in any module or pod file, change to the +F<pod> directory and run C<make toc>. + +=head2 run installhtml to check the validity of the pod files + +=head2 update patchlevel.h + +Don't be shy about using the subversion number, even for a relatively +modest patch. We've never even come close to using all 99 subversions, +and it's better to have a distinctive number for your patch. If you +need feedback on your patch, go ahead and issue it and promise to +incorporate that feedback quickly (e.g. within 1 week) and send out a +second patch. + +=head2 run metaconfig + +If you need to make changes to Configure or config_h.SH, it may be best to +change the appropriate metaconfig units instead, and regenerate Configure. + + metaconfig -m + +will regenerate Configure and config_h.SH. More information on +obtaining and running metaconfig is in the F<U/README> file that comes +with Perl's metaconfig units. Perl's metaconfig units should be +available the same place you found this file. On CPAN, look under my +directory F<authors/id/ANDYD/> for a file such as F<5.003_07-02.U.tar.gz>. +That file should be unpacked in your main perl source directory. It +contains the files needed to run B<metaconfig> to reproduce Perl's +Configure script. (Those units are for 5.003_07. There have been +changes since then; please contact me if you want more recent +versions, and I will try to point you in the right direction.) + +Alternatively, do consider if the F<*ish.h> files might be a better +place for your changes. + +=head2 MANIFEST + +Make sure the MANIFEST is up-to-date. You can use dist's B<manicheck> +program for this. You can also use + + perl -w -MExtUtils::Manifest=fullcheck -e fullcheck + +Both commands will also list extra files in the directory that are not +listed in MANIFEST. + +The MANIFEST is normally sorted, with one exception. Perl includes +both a F<Configure> script and a F<configure> script. The +F<configure> script is a front-end to the main F<Configure>, but +is there to aid folks who use autoconf-generated F<configure> files +for other software. The problem is that F<Configure> and F<configure> +are the same on case-insensitive file systems, so I deliberately put +F<configure> first in the MANIFEST so that the extraction of +F<Configure> will overwrite F<configure> and leave you with the +correct script. (The F<configure> script must also have write +permission for this to work, so it's the only file in the distribution +I normally have with write permission.) + +If you are using metaconfig to regenerate Configure, then you should note +that metaconfig actually uses MANIFEST.new, so you want to be sure +MANIFEST.new is up-to-date too. I haven't found the MANIFEST/MANIFEST.new +distinction particularly useful, but that's probably because I still haven't +learned how to use the full suite of tools in the dist distribution. + +=head2 Check permissions + +All the tests in the t/ directory ought to be executable. The +main makefile used to do a 'chmod t/*/*.t', but that resulted in +a self-modifying distribution--something some users would strongly +prefer to avoid. Probably, the F<t/TEST> script should check for this +and do the chmod if needed, but it doesn't currently. + +In all, the following files should probably be executable: + + Configure + configpm + configure + embed.pl + installperl + installman + keywords.pl + myconfig + opcode.pl + perly.fixer + t/TEST + t/*/*.t + *.SH + vms/ext/Stdio/test.pl + vms/ext/filespec.t + vms/fndvers.com + x2p/*.SH + +Other things ought to be readable, at least :-). + +Probably, the permissions for the files could be encoded in MANIFEST +somehow, but I'm reluctant to change MANIFEST itself because that +could break old scripts that use MANIFEST. + +I seem to recall that some SVR3 systems kept some sort of file that listed +permissions for system files; something like that might be appropriate. + +=head2 Run Configure + +This will build a config.sh and config.h. You can skip this if you haven't +changed Configure or config_h.SH at all. + +=head2 Update config_H + +The config_H file is provided to help those folks who can't run Configure. +It is important to keep it up-to-date. If you have changed config_h.SH, +those changes must be reflected in config_H as well. (The name config_H was +chosen to distinguish the file from config.h even on case-insensitive file +systems.) Simply edit the existing config_H file; keep the first few +explanatory lines and then copy your new config.h below. + +It may also be necessary to update vms/config.vms and +plan9/config.plan9, though you should be quite careful in doing so if +you are not familiar with those systems. You might want to issue your +patch with a promise to quickly issue a follow-up that handles those +directories. + +=head2 make run_byacc + +If you have byacc-1.8.2 (available from CPAN), and if there have been +changes to F<perly.y>, you can regenerate the F<perly.c> file. The +run_byacc makefile target does this by running byacc and then applying +some patches so that byacc dynamically allocates space, rather than +having fixed limits. This patch is handled by the F<perly.fixer> +script. Depending on the nature of the changes to F<perly.y>, you may +or may not have to hand-edit the patch to apply correctly. If you do, +you should include the edited patch in the new distribution. If you +have byacc-1.9, the patch won't apply cleanly. Changes to the printf +output statements mean the patch won't apply cleanly. Long ago I +started to fix F<perly.fixer> to detect this, but I never completed the +task. + +Some additional notes from Larry on this: + +Don't forget to regenerate perly.c.diff. + + byacc -d perly.y + mv y.tab.c perly.c + patch perly.c <perly.c.diff + # manually apply any failed hunks + diff -c2 perly.c.orig perly.c >perly.c.diff + +One chunk of lines that often fails begins with + + #line 29 "perly.y" + +and ends one line before + + #define YYERRCODE 256 + +This only happens when you add or remove a token type. I suppose this +could be automated, but it doesn't happen very often nowadays. + +Larry + +=head2 make regen_headers + +The F<embed.h>, F<keywords.h>, and F<opcode.h> files are all automatically +generated by perl scripts. Since the user isn't guaranteed to have a +working perl, we can't require the user to generate them. Hence you have +to, if you're making a distribution. + +I used to include rules like the following in the makefile: + + # The following three header files are generated automatically + # The correct versions should be already supplied with the perl kit, + # in case you don't have perl or 'sh' available. + # The - is to ignore error return codes in case you have the source + # installed read-only or you don't have perl yet. + keywords.h: keywords.pl + @echo "Don't worry if this fails." + - perl keywords.pl + + +However, I got B<lots> of mail consisting of people worrying because the +command failed. I eventually decided that I would save myself time +and effort by manually running C<make regen_headers> myself rather +than answering all the questions and complaints about the failing +command. + +=head2 global.sym, interp.sym and perlio.sym + +Make sure these files are up-to-date. Read the comments in these +files and in perl_exp.SH to see what to do. + +=head2 Binary compatibility + +If you do change F<global.sym> or F<interp.sym>, think carefully about +what you are doing. To the extent reasonable, we'd like to maintain +souce and binary compatibility with older releases of perl. That way, +extensions built under one version of perl will continue to work with +new versions of perl. + +Of course, some incompatible changes may well be necessary. I'm just +suggesting that we not make any such changes without thinking carefully +about them first. If possible, we should provide +backwards-compatibility stubs. There's a lot of XS code out there. +Let's not force people to keep changing it. + +=head2 Changes + +Be sure to update the F<Changes> file. Try to include both an overall +summary as well as detailed descriptions of the changes. Your +audience will include other developers and users, so describe +user-visible changes (if any) in terms they will understand, not in +code like "initialize foo variable in bar function". + +There are differing opinions on whether the detailed descriptions +ought to go in the Changes file or whether they ought to be available +separately in the patch file (or both). There is no disagreement that +detailed descriptions ought to be easily available somewhere. + +=head2 OS/2-specific updates + +In the os2 directory is F<diff.configure>, a set of OS/2-specific +diffs against B<Configure>. If you make changes to Configure, you may +want to consider regenerating this diff file to save trouble for the +OS/2 maintainer. + +You can also consider the OS/2 diffs as reminders of portability +things that need to be fixed in Configure. + +=head2 VMS-specific updates + +If you have changed F<perly.y>, then you may want to update +F<vms/perly_{h,c}.vms> by running C<perl vms/vms_yfix.pl>. + +The Perl version number appears in several places under F<vms>. +It is courteous to update these versions. For example, if you are +making 5.004_42, replace "5.00441" with "5.00442". + +=head2 Making the new distribution + +Suppose, for example, that you want to make version 5.004_08. Then you can +do something like the following + + mkdir ../perl5.004_08 + awk '{print $1}' MANIFEST | cpio -pdm ../perl5.004_08 + cd ../ + tar cf perl5.004_08.tar perl5.004_08 + gzip --best perl5.004_08.tar + +These steps, with extra checks, are automated by the Porting/makerel +script. + +=head2 Making a new patch + +I find the F<makepatch> utility quite handy for making patches. +You can obtain it from any CPAN archive under +http://www.perl.com/CPAN/authors/Johan_Vromans/ . There are a couple +of differences between my version and the standard one. I have mine do +a + + # Print a reassuring "End of Patch" note so people won't + # wonder if their mailer truncated patches. + print "\n\nEnd of Patch.\n"; + +at the end. That's because I used to get questions from people asking +if their mail was truncated. + +It also writes Index: lines which include the new directory prefix +(change Index: print, approx line 294 or 310 depending on the version, +to read: print PATCH ("Index: $newdir$new\n");). That helps patches +work with more POSIX conformant patch programs. + +Here's how I generate a new patch. I'll use the hypothetical +5.004_07 to 5.004_08 patch as an example. + + # unpack perl5.004_07/ + gzip -d -c perl5.004_07.tar.gz | tar -xof - + # unpack perl5.004_08/ + gzip -d -c perl5.004_08.tar.gz | tar -xof - + makepatch perl5.004_07 perl5.004_08 > perl5.004_08.pat + +Makepatch will automatically generate appropriate B<rm> commands to remove +deleted files. Unfortunately, it will not correctly set permissions +for newly created files, so you may have to do so manually. For example, +patch 5.003_04 created a new test F<t/op/gv.t> which needs to be executable, +so at the top of the patch, I inserted the following lines: + + # Make a new test + touch t/op/gv.t + chmod +x t/opt/gv.t + +Now, of course, my patch is now wrong because makepatch didn't know I +was going to do that command, and it patched against /dev/null. + +So, what I do is sort out all such shell commands that need to be in the +patch (including possible mv-ing of files, if needed) and put that in the +shell commands at the top of the patch. Next, I delete all the patch parts +of perl5.004_08.pat, leaving just the shell commands. Then, I do the +following: + + cd perl5.004_07 + sh ../perl5.004_08.pat + cd .. + makepatch perl5.004_07 perl5.004_08 >> perl5.004_08.pat + +(Note the append to preserve my shell commands.) +Now, my patch will line up with what the end users are going to do. + +=head2 Testing your patch + +It seems obvious, but be sure to test your patch. That is, verify that +it produces exactly the same thing as your full distribution. + + rm -rf perl5.004_07 + gzip -d -c perl5.004_07.tar.gz | tar -xf - + cd perl5.004_07 + sh ../perl5.004_08.pat + patch -p1 -N < ../perl5.004_08.pat + cd .. + gdiff -r perl5.004_07 perl5.004_08 + +where B<gdiff> is GNU diff. Other diff's may also do recursive checking. + +=head2 More testing + +Again, it's obvious, but you should test your new version as widely as you +can. You can be sure you'll hear about it quickly if your version doesn't +work on both ANSI and pre-ANSI compilers, and on common systems such as +SunOS 4.1.[34], Solaris, and Linux. + +If your changes include conditional code, try to test the different +branches as thoroughly as you can. For example, if your system +supports dynamic loading, you can also test static loading with + + sh Configure -Uusedl + +You can also hand-tweak your config.h to try out different #ifdef +branches. + +=head1 Common Gotcha's + +=over 4 + +=item #elif + +The '#elif' preprocessor directive is not understood on all systems. +Specifically, I know that Pyramids don't understand it. Thus instead of the +simple + + #if defined(I_FOO) + # include <foo.h> + #elif defined(I_BAR) + # include <bar.h> + #else + # include <fubar.h> + #endif + +You have to do the more Byzantine + + #if defined(I_FOO) + # include <foo.h> + #else + # if defined(I_BAR) + # include <bar.h> + # else + # include <fubar.h> + # endif + #endif + +Incidentally, whitespace between the leading '#' and the preprocessor +command is not guaranteed, but is very portable and you may use it freely. +I think it makes things a bit more readable, especially once things get +rather deeply nested. I also think that things should almost never get +too deeply nested, so it ought to be a moot point :-) + +=item Probably Prefer POSIX + +It's often the case that you'll need to choose whether to do +something the BSD-ish way or the POSIX-ish way. It's usually not +a big problem when the two systems use different names for similar +functions, such as memcmp() and bcmp(). The perl.h header file +handles these by appropriate #defines, selecting the POSIX mem*() +functions if available, but falling back on the b*() functions, if +need be. + +More serious is the case where some brilliant person decided to +use the same function name but give it a different meaning or +calling sequence :-). getpgrp() and setpgrp() come to mind. +These are a real problem on systems that aim for conformance to +one standard (e.g. POSIX), but still try to support the other way +of doing things (e.g. BSD). My general advice (still not really +implemented in the source) is to do something like the following. +Suppose there are two alternative versions, fooPOSIX() and +fooBSD(). + + #ifdef HAS_FOOPOSIX + /* use fooPOSIX(); */ + #else + # ifdef HAS_FOOBSD + /* try to emulate fooPOSIX() with fooBSD(); + perhaps with the following: */ + # define fooPOSIX fooBSD + # else + # /* Uh, oh. We have to supply our own. */ + # define fooPOSIX Perl_fooPOSIX + # endif + #endif + +=item Think positively + +If you need to add an #ifdef test, it is usually easier to follow if you +think positively, e.g. + + #ifdef HAS_NEATO_FEATURE + /* use neato feature */ + #else + /* use some fallback mechanism */ + #endif + +rather than the more impenetrable + + #ifndef MISSING_NEATO_FEATURE + /* Not missing it, so we must have it, so use it */ + #else + /* Are missing it, so fall back on something else. */ + #endif + +Of course for this toy example, there's not much difference. But when +the #ifdef's start spanning a couple of screen fulls, and the #else's +are marked something like + + #else /* !MISSING_NEATO_FEATURE */ + +I find it easy to get lost. + +=item Providing Missing Functions -- Problem + +Not all systems have all the neat functions you might want or need, so +you might decide to be helpful and provide an emulation. This is +sound in theory and very kind of you, but please be careful about what +you name the function. Let me use the C<pause()> function as an +illustration. + +Perl5.003 has the following in F<perl.h> + + #ifndef HAS_PAUSE + #define pause() sleep((32767<<16)+32767) + #endif + +Configure sets HAS_PAUSE if the system has the pause() function, so +this #define only kicks in if the pause() function is missing. +Nice idea, right? + +Unfortunately, some systems apparently have a prototype for pause() +in F<unistd.h>, but don't actually have the function in the library. +(Or maybe they do have it in a library we're not using.) + +Thus, the compiler sees something like + + extern int pause(void); + /* . . . */ + #define pause() sleep((32767<<16)+32767) + +and dies with an error message. (Some compilers don't mind this; +others apparently do.) + +To work around this, 5.003_03 and later have the following in perl.h: + + /* Some unistd.h's give a prototype for pause() even though + HAS_PAUSE ends up undefined. This causes the #define + below to be rejected by the compiler. Sigh. + */ + #ifdef HAS_PAUSE + # define Pause pause + #else + # define Pause() sleep((32767<<16)+32767) + #endif + +This works. + +The curious reader may wonder why I didn't do the following in +F<util.c> instead: + + #ifndef HAS_PAUSE + void pause() + { + sleep((32767<<16)+32767); + } + #endif + +That is, since the function is missing, just provide it. +Then things would probably be been alright, it would seem. + +Well, almost. It could be made to work. The problem arises from the +conflicting needs of dynamic loading and namespace protection. + +For dynamic loading to work on AIX (and VMS) we need to provide a list +of symbols to be exported. This is done by the script F<perl_exp.SH>, +which reads F<global.sym> and F<interp.sym>. Thus, the C<pause> +symbol would have to be added to F<global.sym> So far, so good. + +On the other hand, one of the goals of Perl5 is to make it easy to +either extend or embed perl and link it with other libraries. This +means we have to be careful to keep the visible namespace "clean". +That is, we don't want perl's global variables to conflict with +those in the other application library. Although this work is still +in progress, the way it is currently done is via the F<embed.h> file. +This file is built from the F<global.sym> and F<interp.sym> files, +since those files already list the globally visible symbols. If we +had added C<pause> to global.sym, then F<embed.h> would contain the +line + + #define pause Perl_pause + +and calls to C<pause> in the perl sources would now point to +C<Perl_pause>. Now, when B<ld> is run to build the F<perl> executable, +it will go looking for C<perl_pause>, which probably won't exist in any +of the standard libraries. Thus the build of perl will fail. + +Those systems where C<HAS_PAUSE> is not defined would be ok, however, +since they would get a C<Perl_pause> function in util.c. The rest of +the world would be in trouble. + +And yes, this scenario has happened. On SCO, the function C<chsize> +is available. (I think it's in F<-lx>, the Xenix compatibility +library.) Since the perl4 days (and possibly before), Perl has +included a C<chsize> function that gets called something akin to + + #ifndef HAS_CHSIZE + I32 chsize(fd, length) + /* . . . */ + #endif + +When 5.003 added + + #define chsize Perl_chsize + +to F<embed.h>, the compile started failing on SCO systems. + +The "fix" is to give the function a different name. The one +implemented in 5.003_05 isn't optimal, but here's what was done: + + #ifdef HAS_CHSIZE + # ifdef my_chsize /* Probably #defined to Perl_my_chsize in embed.h */ + # undef my_chsize + # endif + # define my_chsize chsize + #endif + +My explanatory comment in patch 5.003_05 said: + + Undef and then re-define my_chsize from Perl_my_chsize to + just plain chsize if this system HAS_CHSIZE. This probably only + applies to SCO. This shows the perils of having internal + functions with the same name as external library functions :-). + +Now, we can safely put C<my_chsize> in F<global.sym>, export it, and +hide it with F<embed.h>. + +To be consistent with what I did for C<pause>, I probably should have +called the new function C<Chsize>, rather than C<my_chsize>. +However, the perl sources are quite inconsistent on this (Consider +New, Mymalloc, and Myremalloc, to name just a few.) + +There is a problem with this fix, however, in that C<Perl_chsize> +was available as a F<libperl.a> library function in 5.003, but it +isn't available any more (as of 5.003_07). This means that we've +broken binary compatibility. This is not good. + +=item Providing missing functions -- some ideas + +We currently don't have a standard way of handling such missing +function names. Right now, I'm effectively thinking aloud about a +solution. Some day, I'll try to formally propose a solution. + +Part of the problem is that we want to have some functions listed as +exported but not have their names mangled by embed.h or possibly +conflict with names in standard system headers. We actually already +have such a list at the end of F<perl_exp.SH> (though that list is +out-of-date): + + # extra globals not included above. + cat <<END >> perl.exp + perl_init_ext + perl_init_fold + perl_init_i18nl14n + perl_alloc + perl_construct + perl_destruct + perl_free + perl_parse + perl_run + perl_get_sv + perl_get_av + perl_get_hv + perl_get_cv + perl_call_argv + perl_call_pv + perl_call_method + perl_call_sv + perl_requirepv + safecalloc + safemalloc + saferealloc + safefree + +This still needs much thought, but I'm inclined to think that one +possible solution is to prefix all such functions with C<perl_> in the +source and list them along with the other C<perl_*> functions in +F<perl_exp.SH>. + +Thus, for C<chsize>, we'd do something like the following: + + /* in perl.h */ + #ifdef HAS_CHSIZE + # define perl_chsize chsize + #endif + +then in some file (e.g. F<util.c> or F<doio.c>) do + + #ifndef HAS_CHSIZE + I32 perl_chsize(fd, length) + /* implement the function here . . . */ + #endif + +Alternatively, we could just always use C<chsize> everywhere and move +C<chsize> from F<global.sym> to the end of F<perl_exp.SH>. That would +probably be fine as long as our C<chsize> function agreed with all the +C<chsize> function prototypes in the various systems we'll be using. +As long as the prototypes in actual use don't vary that much, this is +probably a good alternative. (As a counter-example, note how Configure +and perl have to go through hoops to find and use get Malloc_t and +Free_t for C<malloc> and C<free>.) + +At the moment, this latter option is what I tend to prefer. + +=item All the world's a VAX + +Sorry, showing my age:-). Still, all the world is not BSD 4.[34], +SVR4, or POSIX. Be aware that SVR3-derived systems are still quite +common (do you have any idea how many systems run SCO?) If you don't +have a bunch of v7 manuals handy, the metaconfig units (by default +installed in F</usr/local/lib/dist/U>) are a good resource to look at +for portability. + +=back + +=head1 Miscellaneous Topics + +=head2 Autoconf + +Why does perl use a metaconfig-generated Configure script instead of an +autoconf-generated configure script? + +Metaconfig and autoconf are two tools with very similar purposes. +Metaconfig is actually the older of the two, and was originally written +by Larry Wall, while autoconf is probably now used in a wider variety of +packages. The autoconf info file discusses the history of autoconf and +how it came to be. The curious reader is referred there for further +information. + +Overall, both tools are quite good, I think, and the choice of which one +to use could be argued either way. In March, 1994, when I was just +starting to work on Configure support for Perl5, I considered both +autoconf and metaconfig, and eventually decided to use metaconfig for the +following reasons: + +=over 4 + +=item Compatibility with Perl4 + +Perl4 used metaconfig, so many of the #ifdef's were already set up for +metaconfig. Of course metaconfig had evolved some since Perl4's days, +but not so much that it posed any serious problems. + +=item Metaconfig worked for me + +My system at the time was Interactive 2.2, a SVR3.2/386 derivative that +also had some POSIX support. Metaconfig-generated Configure scripts +worked fine for me on that system. On the other hand, autoconf-generated +scripts usually didn't. (They did come quite close, though, in some +cases.) At the time, I actually fetched a large number of GNU packages +and checked. Not a single one configured and compiled correctly +out-of-the-box with the system's cc compiler. + +=item Configure can be interactive + +With both autoconf and metaconfig, if the script works, everything is +fine. However, one of my main problems with autoconf-generated scripts +was that if it guessed wrong about something, it could be B<very> hard to +go back and fix it. For example, autoconf always insisted on passing the +-Xp flag to cc (to turn on POSIX behavior), even when that wasn't what I +wanted or needed for that package. There was no way short of editing the +configure script to turn this off. You couldn't just edit the resulting +Makefile at the end because the -Xp flag influenced a number of other +configure tests. + +Metaconfig's Configure scripts, on the other hand, can be interactive. +Thus if Configure is guessing things incorrectly, you can go back and fix +them. This isn't as important now as it was when we were actively +developing Configure support for new features such as dynamic loading, +but it's still useful occasionally. + +=item GPL + +At the time, autoconf-generated scripts were covered under the GNU Public +License, and hence weren't suitable for inclusion with Perl, which has a +different licensing policy. (Autoconf's licensing has since changed.) + +=item Modularity + +Metaconfig builds up Configure from a collection of discrete pieces +called "units". You can override the standard behavior by supplying your +own unit. With autoconf, you have to patch the standard files instead. +I find the metaconfig "unit" method easier to work with. Others +may find metaconfig's units clumsy to work with. + +=back + +=head2 @INC search order + +By default, the list of perl library directories in @INC is the +following: + + $archlib + $privlib + $sitearch + $sitelib + +Specifically, on my Solaris/x86 system, I run +B<sh Configure -Dprefix=/opt/perl> and I have the following +directories: + + /opt/perl/lib/i86pc-solaris/5.00307 + /opt/perl/lib + /opt/perl/lib/site_perl/i86pc-solaris + /opt/perl/lib/site_perl + +That is, perl's directories come first, followed by the site-specific +directories. + +The site libraries come second to support the usage of extensions +across perl versions. Read the relevant section in F<INSTALL> for +more information. If we ever make $sitearch version-specific, this +topic could be revisited. + +=head2 Why isn't there a directory to override Perl's library? + +Mainly because no one's gotten around to making one. Note that +"making one" involves changing perl.c, Configure, config_h.SH (and +associated files, see above), and I<documenting> it all in the +INSTALL file. + +Apparently, most folks who want to override one of the standard library +files simply do it by overwriting the standard library files. + +=head2 APPLLIB + +In the perl.c sources, you'll find an undocumented APPLLIB_EXP +variable, sort of like PRIVLIB_EXP and ARCHLIB_EXP (which are +documented in config_h.SH). Here's what APPLLIB_EXP is for, from +a mail message from Larry: + + The main intent of APPLLIB_EXP is for folks who want to send out a + version of Perl embedded in their product. They would set the symbol + to be the name of the library containing the files needed to run or to + support their particular application. This works at the "override" + level to make sure they get their own versions of any library code that + they absolutely must have configuration control over. + + As such, I don't see any conflict with a sysadmin using it for a + override-ish sort of thing, when installing a generic Perl. It should + probably have been named something to do with overriding though. Since + it's undocumented we could still change it... :-) + +Given that it's already there, you can use it to override +distribution modules. If you do + + sh Configure -Dccflags='-DAPPLLIB_EXP=/my/override' + +then perl.c will put /my/override ahead of ARCHLIB and PRIVLIB. + +=head1 Upload Your Work to CPAN + +You can upload your work to CPAN if you have a CPAN id. Check out +http://www.perl.com/CPAN/modules/04pause.html for information on +_PAUSE_, the Perl Author's Upload Server. + +I typically upload both the patch file, e.g. F<perl5.004_08.pat.gz> +and the full tar file, e.g. F<perl5.004_08.tar.gz>. + +If you want your patch to appear in the F<src/5.0/unsupported> +directory on CPAN, send e-mail to the CPAN master librarian. (Check +out http://www.perl.com/CPAN/CPAN.html ). + +=head1 Help Save the World + +You should definitely announce your patch on the perl5-porters list. +You should also consider announcing your patch on +comp.lang.perl.announce, though you should make it quite clear that a +subversion is not a production release, and be prepared to deal with +people who will not read your disclaimer. + +=head1 Todo + +Here, in no particular order, are some Configure and build-related +items that merit consideration. This list isn't exhaustive, it's just +what I came up with off the top of my head. + +=head2 Good ideas waiting for round tuits + +=over 4 + +=item installprefix + +I think we ought to support + + Configure -Dinstallprefix=/blah/blah + +Currently, we support B<-Dprefix=/blah/blah>, but the changing the install +location has to be handled by something like the F<config.over> trick +described in F<INSTALL>. AFS users also are treated specially. +We should probably duplicate the metaconfig prefix stuff for an +install prefix. + +=item Configure -Dsrcdir=/blah/blah + +We should be able to emulate B<configure --srcdir>. Tom Tromey +tromey@creche.cygnus.com has submitted some patches to +the dist-users mailing list along these lines. Eventually, they ought +to get folded back into the main distribution. + +=item Hint file fixes + +Various hint files work around Configure problems. We ought to fix +Configure so that most of them aren't needed. + +=item Hint file information + +Some of the hint file information (particularly dynamic loading stuff) +ought to be fed back into the main metaconfig distribution. + +=back + +=head2 Probably good ideas waiting for round tuits + +=over 4 + +=item GNU configure --options + +I've received sensible suggestions for --exec_prefix and other +GNU configure --options. It's not always obvious exactly what is +intended, but this merits investigation. + +=item make clean + +Currently, B<make clean> isn't all that useful, though +B<make realclean> and B<make distclean> are. This needs a bit of +thought and documentation before it gets cleaned up. + +=item Try gcc if cc fails + +Currently, we just give up. + +=item bypassing safe*alloc wrappers + +On some systems, it may be safe to call the system malloc directly +without going through the util.c safe* layers. (Such systems would +accept free(0), for example.) This might be a time-saver for systems +that already have a good malloc. (Recent Linux libc's apparently have +a nice malloc that is well-tuned for the system.) + +=back + +=head2 Vague possibilities + +=over 4 + +=item MacPerl + +Get some of the Macintosh stuff folded back into the main distribution. + +=item gconvert replacement + +Maybe include a replacement function that doesn't lose data in rare +cases of coercion between string and numerical values. + +=item long long + +Can we support C<long long> on systems where C<long long> is larger +than what we've been using for C<IV>? What if you can't C<sprintf> +a C<long long>? + +=item Improve makedepend + +The current makedepend process is clunky and annoyingly slow, but it +works for most folks. Alas, it assumes that there is a filename +$firstmakefile that the B<make> command will try to use before it uses +F<Makefile>. Such may not be the case for all B<make> commands, +particularly those on non-Unix systems. + +Probably some variant of the BSD F<.depend> file will be useful. +We ought to check how other packages do this, if they do it at all. +We could probably pre-generate the dependencies (with the exception of +malloc.o, which could probably be determined at F<Makefile.SH> +extraction time. + +=item GNU Makefile standard targets + +GNU software generally has standardized Makefile targets. Unless we +have good reason to do otherwise, I see no reason not to support them. + +=item File locking + +Somehow, straighten out, document, and implement lockf(), flock(), +and/or fcntl() file locking. It's a mess. + +=back + +=head1 AUTHORS + +Original author: Andy Dougherty doughera@lafcol.lafayette.edu . +Additions by Chip Salzenberg chip@perl.com and +Tim Bunce Tim.Bunce@ig.co.uk . + +All opinions expressed herein are those of the authorZ<>(s). + +=head1 LAST MODIFIED + +$Id: pumpkin.pod,v 1.13 1997/08/28 18:26:40 doughera Released $ |